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–55 unchanged (55 lines)
56 } else {
57 entityValue = Integer.parseInt(input.subSequence(start, end).toString(), 10);
58 }
59 } catch(NumberFormatException nfe) {
60 return 0;
61 }
62
63 out.write(entityValue);
64 return 2 + (end - start) + (isHex ? 1 : 0) + 1;
65 }
66 return 0;
67 }
68}
69

After

…lines 1–56 unchanged (56 lines)
57 entityValue = Integer.parseInt(input.subSequence(start, end).toString(), 10);
58 }
59 } catch(NumberFormatException nfe) {
60 return 0;
61 }
62
63 if(entityValue > 0xFFFF) {
64 char[] chrs = Character.toChars(entityValue);
65 out.write(chrs[0]);
66 out.write(chrs[1]);
67 } else {
68 out.write(entityValue);
69 }
70 return 2 + (end - start) + (isHex ? 1 : 0) + 1;
71 }
72 return 0;
73 }
74}
75

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 "Writer"
; ";"
block_comment "/**\n * Translate XML numeric entities of the form &#[xX]?\\d+"...
class_declaration
modifiers
public "public"
class "class"
identifier "NumericEntityUnescaper"
superclass
extends "extends"
type_identifier "CharSequenceTranslator"
class_body
{ "{"
block_comment "/**\n * {@inheritDoc}\n */"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
integral_type
int "int"
identifier "translate"
formal_parameters
( "("
formal_parameter
type_identifier "CharSequence"
identifier "input"
, ","
formal_parameter
integral_type
int "int"
identifier "index"
, ","
formal_parameter
type_identifier "Writer"
identifier "out"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
line_comment "// TODO: Protect from ArrayIndexOutOfBounds"
if_statement
if "if"
parenthesized_expression (+30 nodes collapsed)
block
{ "{"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "start"
= "="
binary_expression
identifier "index"
+ "+"
decimal_integer_literal "2"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "isHex"
= "="
false "false"
; ";"
local_variable_declaration
integral_type
char "char"
variable_declarator
identifier "firstChar"
= "="
method_invocation
identifier "input"
. "."
identifier "charAt"
argument_list
( "("
identifier "start"
) ")"
; ";"
if_statement (+29 nodes collapsed)
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "end"
= "="
identifier "start"
; ";"
while_statement (+24 nodes collapsed)
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "entityValue"
; ";"
try_statement (+93 nodes collapsed)
expression_statement
method_invocation
identifier "out"
. "."
identifier "write"
argument_list
( "("
identifier "entityValue"
) ")"
; ";"
return_statement (+27 nodes collapsed)
} "}"
return_statement
return "return"
decimal_integer_literal "0"
; ";"
} "}"
} "}"

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 "Writer"
; ";"
block_comment "/**\n * Translate XML numeric entities of the form &#[xX]?\\d+"...
class_declaration
modifiers
public "public"
class "class"
identifier "NumericEntityUnescaper"
superclass
extends "extends"
type_identifier "CharSequenceTranslator"
class_body
{ "{"
block_comment "/**\n * {@inheritDoc}\n */"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
integral_type
int "int"
identifier "translate"
formal_parameters
( "("
formal_parameter
type_identifier "CharSequence"
identifier "input"
, ","
formal_parameter
integral_type
int "int"
identifier "index"
, ","
formal_parameter
type_identifier "Writer"
identifier "out"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
line_comment "// TODO: Protect from ArrayIndexOutOfBounds"
if_statement
if "if"
parenthesized_expression (+30 nodes collapsed)
block
{ "{"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "start"
= "="
binary_expression
identifier "index"
+ "+"
decimal_integer_literal "2"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "isHex"
= "="
false "false"
; ";"
local_variable_declaration
integral_type
char "char"
variable_declarator
identifier "firstChar"
= "="
method_invocation
identifier "input"
. "."
identifier "charAt"
argument_list
( "("
identifier "start"
) ")"
; ";"
if_statement (+29 nodes collapsed)
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "end"
= "="
identifier "start"
; ";"
while_statement (+24 nodes collapsed)
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "entityValue"
; ";"
try_statement (+93 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "entityValue"
> ">"
hex_integer_literal "0xFFFF"
) ")"
block
{ "{"
local_variable_declaration
array_type
integral_type
char "char"
dimensions
[ "["
] "]"
variable_declarator
identifier "chrs"
= "="
method_invocation
identifier "Character"
. "."
identifier "toChars"
argument_list
( "("
identifier "entityValue"
) ")"
; ";"
expression_statement
method_invocation
identifier "out"
. "."
identifier "write"
argument_list
( "("
array_access
identifier "chrs"
[ "["
decimal_integer_literal "0"
] "]"
) ")"
; ";"
expression_statement
method_invocation
identifier "out"
. "."
identifier "write"
argument_list
( "("
array_access
identifier "chrs"
[ "["
decimal_integer_literal "1"
] "]"
) ")"
; ";"
} "}"
else "else"
block
{ "{"
expression_statement
method_invocation
identifier "out"
. "."
identifier "write"
argument_list
( "("
identifier "entityValue"
) ")"
; ";"
} "}"
return_statement (+27 nodes collapsed)
} "}"
return_statement
return "return"
decimal_integer_literal "0"
; ";"
} "}"
} "}"