Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–121 unchanged (121 lines)
122 !results.hasBeenAdded(change.getEntry().getName())) {
123 copyStream(change.getInput(), out, change.getEntry());
124 it.remove();
125 results.addedFromChangeSet(change.getEntry().getName());
126 }
127 }
128 return results;
129 }
130
131 /**
132 * Checks if an ArchiveEntry is deleted later in the ChangeSet. This is
133 * necessary if an file is added with this ChangeSet, but later became
134 * deleted in the same set.
…lines 135–179 unchanged (45 lines)

After

…lines 1–121 unchanged (121 lines)
122 !results.hasBeenAdded(change.getEntry().getName())) {
123 copyStream(change.getInput(), out, change.getEntry());
124 it.remove();
125 results.addedFromChangeSet(change.getEntry().getName());
126 }
127 }
128 out.finish();
129 return results;
130 }
131
132 /**
133 * Checks if an ArchiveEntry is deleted later in the ChangeSet. This is
134 * necessary if an file is added with this ChangeSet, but later became
…lines 135–180 unchanged (46 lines)

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "changes"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "InputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "LinkedHashSet"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "archivers"
. "."
identifier "ArchiveEntry"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "archivers"
. "."
identifier "ArchiveInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "archivers"
. "."
identifier "ArchiveOutputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "utils"
. "."
identifier "IOUtils"
; ";"
block_comment "/**\n * Performs ChangeSet operations on a stream.\n * This cl"...
class_declaration
modifiers
public "public"
class "class"
identifier "ChangeSetPerformer"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Set"
variable_declarator
identifier "changes"
; ";"
block_comment "/**\n * Constructs a ChangeSetPerformer with the changes "...
constructor_declaration (+27 nodes collapsed)
block_comment "/**\n * Performs all changes collected in this ChangeSet "...
method_declaration
modifiers
public "public"
type_identifier "ChangeSetResults"
identifier "perform"
formal_parameters
( "("
formal_parameter
type_identifier "ArchiveInputStream"
identifier "in"
, ","
formal_parameter
type_identifier "ArchiveOutputStream"
identifier "out"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
local_variable_declaration
type_identifier "ChangeSetResults"
variable_declarator
identifier "results"
= "="
object_creation_expression
new "new"
type_identifier "ChangeSetResults"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
type_identifier "Set"
variable_declarator
identifier "workingSet"
= "="
object_creation_expression
new "new"
type_identifier "LinkedHashSet"
argument_list
( "("
identifier "changes"
) ")"
; ";"
for_statement (+130 nodes collapsed)
local_variable_declaration
type_identifier "ArchiveEntry"
variable_declarator
identifier "entry"
= "="
null_literal "null"
; ";"
while_statement (+320 nodes collapsed)
line_comment "// Adds files which hasn't been added from the original and "...
for_statement (+156 nodes collapsed)
return_statement
return "return"
identifier "results"
; ";"
} "}"
block_comment "/**\n * Checks if an ArchiveEntry is deleted later in the"...
method_declaration (+190 nodes collapsed)
block_comment "/**\n * Copies the ArchiveEntry to the Output stream\n "...
method_declaration (+56 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "changes"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "InputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "LinkedHashSet"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "archivers"
. "."
identifier "ArchiveEntry"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "archivers"
. "."
identifier "ArchiveInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "archivers"
. "."
identifier "ArchiveOutputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "utils"
. "."
identifier "IOUtils"
; ";"
block_comment "/**\n * Performs ChangeSet operations on a stream.\n * This cl"...
class_declaration
modifiers
public "public"
class "class"
identifier "ChangeSetPerformer"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Set"
variable_declarator
identifier "changes"
; ";"
block_comment "/**\n * Constructs a ChangeSetPerformer with the changes "...
constructor_declaration (+27 nodes collapsed)
block_comment "/**\n * Performs all changes collected in this ChangeSet "...
method_declaration
modifiers
public "public"
type_identifier "ChangeSetResults"
identifier "perform"
formal_parameters
( "("
formal_parameter
type_identifier "ArchiveInputStream"
identifier "in"
, ","
formal_parameter
type_identifier "ArchiveOutputStream"
identifier "out"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
local_variable_declaration
type_identifier "ChangeSetResults"
variable_declarator
identifier "results"
= "="
object_creation_expression
new "new"
type_identifier "ChangeSetResults"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
type_identifier "Set"
variable_declarator
identifier "workingSet"
= "="
object_creation_expression
new "new"
type_identifier "LinkedHashSet"
argument_list
( "("
identifier "changes"
) ")"
; ";"
for_statement (+130 nodes collapsed)
local_variable_declaration
type_identifier "ArchiveEntry"
variable_declarator
identifier "entry"
= "="
null_literal "null"
; ";"
while_statement (+320 nodes collapsed)
line_comment "// Adds files which hasn't been added from the original and "...
for_statement (+156 nodes collapsed)
expression_statement
method_invocation
identifier "out"
. "."
identifier "finish"
argument_list
( "("
) ")"
; ";"
return_statement
return "return"
identifier "results"
; ";"
} "}"
block_comment "/**\n * Checks if an ArchiveEntry is deleted later in the"...
method_declaration (+190 nodes collapsed)
block_comment "/**\n * Copies the ArchiveEntry to the Output stream\n "...
method_declaration (+56 nodes collapsed)
} "}"