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–110 unchanged (110 lines)
111 * If the stack contains an element with this tag's name, pop up the stack to remove the first occurrence. If not
112 * found, skips.
113 *
114 * @param endTag tag to close
115 */
116 private void popStackToClose(Token.EndTag endTag) {
117 String elName = endTag.name();
118 Element firstFound = null;
119
120 for (int pos = stack.size() -1; pos >= 0; pos--) {
121 Element next = stack.get(pos);
122 if (next.nodeName().equals(elName)) {
123 firstFound = next;
…lines 124–144 unchanged (21 lines)

After

…lines 1–110 unchanged (110 lines)
111 * If the stack contains an element with this tag's name, pop up the stack to remove the first occurrence. If not
112 * found, skips.
113 *
114 * @param endTag tag to close
115 */
116 private void popStackToClose(Token.EndTag endTag) {
117 String elName = endTag.normalName();
118 Element firstFound = null;
119
120 for (int pos = stack.size() -1; pos >= 0; pos--) {
121 Element next = stack.get(pos);
122 if (next.nodeName().equals(elName)) {
123 firstFound = next;
…lines 124–144 unchanged (21 lines)

Before

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "parser"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "Jsoup"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "helper"
. "."
identifier "Validate"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "nodes"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Reader"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "StringReader"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
block_comment "/**\n * Use the {@code XmlTreeBuilder} when you want to parse"...
class_declaration
modifiers
public "public"
class "class"
identifier "XmlTreeBuilder"
superclass
extends "extends"
type_identifier "TreeBuilder"
class_body
{ "{"
method_declaration
type_identifier "ParseSettings"
identifier "defaultSettings"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
identifier "ParseSettings"
. "."
identifier "preserveCase"
; ";"
} "}"
method_declaration (+40 nodes collapsed)
method_declaration (+46 nodes collapsed)
method_declaration (+81 nodes collapsed)
method_declaration (+176 nodes collapsed)
method_declaration (+28 nodes collapsed)
method_declaration (+130 nodes collapsed)
method_declaration (+250 nodes collapsed)
method_declaration (+61 nodes collapsed)
method_declaration (+81 nodes collapsed)
block_comment "/**\n * If the stack contains an element with this tag's "...
method_declaration
modifiers
private "private"
void_type "void"
identifier "popStackToClose"
formal_parameters
( "("
formal_parameter
scoped_type_identifier
type_identifier "Token"
. "."
type_identifier "EndTag"
identifier "endTag"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "elName"
= "="
method_invocation
identifier "endTag"
. "."
identifier "name"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
type_identifier "Element"
variable_declarator
identifier "firstFound"
= "="
null_literal "null"
; ";"
for_statement (+77 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "firstFound"
== "=="
null_literal "null"
) ")"
return_statement
return "return"
; ";"
line_comment "// not found, skip"
for_statement (+68 nodes collapsed)
} "}"
method_declaration (+66 nodes collapsed)
} "}"

After

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "parser"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "Jsoup"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "helper"
. "."
identifier "Validate"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "nodes"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Reader"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "StringReader"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
block_comment "/**\n * Use the {@code XmlTreeBuilder} when you want to parse"...
class_declaration
modifiers
public "public"
class "class"
identifier "XmlTreeBuilder"
superclass
extends "extends"
type_identifier "TreeBuilder"
class_body
{ "{"
method_declaration
type_identifier "ParseSettings"
identifier "defaultSettings"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
identifier "ParseSettings"
. "."
identifier "preserveCase"
; ";"
} "}"
method_declaration (+40 nodes collapsed)
method_declaration (+46 nodes collapsed)
method_declaration (+81 nodes collapsed)
method_declaration (+176 nodes collapsed)
method_declaration (+28 nodes collapsed)
method_declaration (+130 nodes collapsed)
method_declaration (+250 nodes collapsed)
method_declaration (+61 nodes collapsed)
method_declaration (+81 nodes collapsed)
block_comment "/**\n * If the stack contains an element with this tag's "...
method_declaration
modifiers
private "private"
void_type "void"
identifier "popStackToClose"
formal_parameters
( "("
formal_parameter
scoped_type_identifier
type_identifier "Token"
. "."
type_identifier "EndTag"
identifier "endTag"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "elName"
= "="
method_invocation
identifier "endTag"
. "."
identifier "normalName"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
type_identifier "Element"
variable_declarator
identifier "firstFound"
= "="
null_literal "null"
; ";"
for_statement (+77 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "firstFound"
== "=="
null_literal "null"
) ")"
return_statement
return "return"
; ";"
line_comment "// not found, skip"
for_statement (+68 nodes collapsed)
} "}"
method_declaration (+66 nodes collapsed)
} "}"