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–88 unchanged (88 lines)
89 pos+= c.length;
90 continue;
91 }
92// // contract with translators is that they have to understand codepoints
93// // and they just took care of a surrogate pair
94 for (int pt = 0; pt < consumed; pt++) {
95 pos += Character.charCount(Character.codePointAt(input, pos));
96 }
97 }
98 }
99
100 /**
101 * Helper method to create a merger of this translator with another set of
…lines 102–126 unchanged (25 lines)

After

…lines 1–88 unchanged (88 lines)
89 pos+= c.length;
90 continue;
91 }
92// // contract with translators is that they have to understand codepoints
93// // and they just took care of a surrogate pair
94 for (int pt = 0; pt < consumed; pt++) {
95 pos += Character.charCount(Character.codePointAt(input, pt));
96 }
97 }
98 }
99
100 /**
101 * Helper method to create a merger of this translator with another set of
…lines 102–126 unchanged (25 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
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "lang3"
. "."
identifier "text"
. "."
identifier "translate"
; ";"
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 "StringWriter"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Writer"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Locale"
; ";"
block_comment "/**\n * An API for translating text. \n * Its core use is to e"...
class_declaration
modifiers
public "public"
abstract "abstract"
class "class"
identifier "CharSequenceTranslator"
class_body
{ "{"
block_comment "/**\n * Translate a set of codepoints, represented by an "...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Helper for non-Writer usage. \n * @param input"...
method_declaration (+100 nodes collapsed)
block_comment "/**\n * Translate an input onto a Writer. This is intenti"...
method_declaration
modifiers
public "public"
final "final"
void_type "void"
identifier "translate"
formal_parameters
( "("
formal_parameter
type_identifier "CharSequence"
identifier "input"
, ","
formal_parameter
type_identifier "Writer"
identifier "out"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
if_statement (+25 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "input"
== "=="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
; ";"
} "}"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "pos"
= "="
decimal_integer_literal "0"
; ";"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "len"
= "="
method_invocation
identifier "input"
. "."
identifier "length"
argument_list
( "("
) ")"
; ";"
while_statement
while "while"
parenthesized_expression
( "("
binary_expression
identifier "pos"
< "<"
identifier "len"
) ")"
block
{ "{"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "consumed"
= "="
method_invocation
identifier "translate"
argument_list
( "("
identifier "input"
, ","
identifier "pos"
, ","
identifier "out"
) ")"
; ";"
if_statement (+62 nodes collapsed)
line_comment "// // contract with translators is that they have t"...
line_comment "// // and they just took care of a surrogate pair"
for_statement
for "for"
( "("
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "pt"
= "="
decimal_integer_literal "0"
; ";"
binary_expression
identifier "pt"
< "<"
identifier "consumed"
; ";"
update_expression
identifier "pt"
++ "++"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "pos"
+= "+="
method_invocation
identifier "Character"
. "."
identifier "charCount"
argument_list
( "("
method_invocation
identifier "Character"
. "."
identifier "codePointAt"
argument_list
( "("
identifier "input"
, ","
identifier "pos"
) ")"
) ")"
; ";"
} "}"
} "}"
} "}"
block_comment "/**\n * Helper method to create a merger of this translat"...
method_declaration (+81 nodes collapsed)
block_comment "/**\n * <p>Returns an upper case hexadecimal <code>String"...
method_declaration (+37 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
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "lang3"
. "."
identifier "text"
. "."
identifier "translate"
; ";"
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 "StringWriter"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Writer"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Locale"
; ";"
block_comment "/**\n * An API for translating text. \n * Its core use is to e"...
class_declaration
modifiers
public "public"
abstract "abstract"
class "class"
identifier "CharSequenceTranslator"
class_body
{ "{"
block_comment "/**\n * Translate a set of codepoints, represented by an "...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Helper for non-Writer usage. \n * @param input"...
method_declaration (+100 nodes collapsed)
block_comment "/**\n * Translate an input onto a Writer. This is intenti"...
method_declaration
modifiers
public "public"
final "final"
void_type "void"
identifier "translate"
formal_parameters
( "("
formal_parameter
type_identifier "CharSequence"
identifier "input"
, ","
formal_parameter
type_identifier "Writer"
identifier "out"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
if_statement (+25 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "input"
== "=="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
; ";"
} "}"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "pos"
= "="
decimal_integer_literal "0"
; ";"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "len"
= "="
method_invocation
identifier "input"
. "."
identifier "length"
argument_list
( "("
) ")"
; ";"
while_statement
while "while"
parenthesized_expression
( "("
binary_expression
identifier "pos"
< "<"
identifier "len"
) ")"
block
{ "{"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "consumed"
= "="
method_invocation
identifier "translate"
argument_list
( "("
identifier "input"
, ","
identifier "pos"
, ","
identifier "out"
) ")"
; ";"
if_statement (+62 nodes collapsed)
line_comment "// // contract with translators is that they have t"...
line_comment "// // and they just took care of a surrogate pair"
for_statement
for "for"
( "("
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "pt"
= "="
decimal_integer_literal "0"
; ";"
binary_expression
identifier "pt"
< "<"
identifier "consumed"
; ";"
update_expression
identifier "pt"
++ "++"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "pos"
+= "+="
method_invocation
identifier "Character"
. "."
identifier "charCount"
argument_list
( "("
method_invocation
identifier "Character"
. "."
identifier "codePointAt"
argument_list
( "("
identifier "input"
, ","
identifier "pt"
) ")"
) ")"
; ";"
} "}"
} "}"
} "}"
block_comment "/**\n * Helper method to create a merger of this translat"...
method_declaration (+81 nodes collapsed)
block_comment "/**\n * <p>Returns an upper case hexadecimal <code>String"...
method_declaration (+37 nodes collapsed)
} "}"