The invisible method_invocation nodes are a weird combination of both N:M and 1:1 group mapping at the same time.

This mapping is unfinished: 9 of 829 nodes are still unmarked.

This mapping has 20 all-to-all groups: every node on one side corresponds to every node on the other, and none is deleted or inserted. Each member carries an all N:M badge; selecting one highlights all of its counterparts, in the tree and in the code view alike.

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–39 unchanged (39 lines)
40
41 /**
42 Get the unencoded XML declaration.
43 @return XML declaration
44 */
45 public String getWholeDeclaration() {
46 final String decl = this.name;
47 if(decl.equals("xml") && attributes.size() > 1 ) {
48 StringBuilder sb = new StringBuilder(decl);
49 final String version = attributes.get("version");
50 if( version != null ) {
51 sb.append(" version=\"").append(version).append("\"");
52 }
53 final String encoding = attributes.get("encoding");
54 if( encoding != null ) {
55 sb.append(" encoding=\"").append(encoding).append("\"");
56 }
57 return sb.toString();
58 }
59 else {
60 return this.name;
61 }
62 }
63
64 void outerHtmlHead(Appendable accum, int depth, Document.OutputSettings out) throws IOException {
65 accum
66 .append("<")
67 .append(isProcessingInstruction ? "!" : "?")
68 .append(getWholeDeclaration())
69 .append(">");
70 }
71
72 void outerHtmlTail(Appendable accum, int depth, Document.OutputSettings out) {}
73
74 @Override
75 public String toString() {
…lines 76–79 unchanged (4 lines)

After

…lines 1–39 unchanged (39 lines)
40
41 /**
42 Get the unencoded XML declaration.
43 @return XML declaration
44 */
45 public String getWholeDeclaration() {
46 return attributes.html().trim(); // attr html starts with a " "
47 }
48
49 void outerHtmlHead(Appendable accum, int depth, Document.OutputSettings out) throws IOException {
50 accum
51 .append("<")
52 .append(isProcessingInstruction ? "!" : "?")
53 .append(name);
54 attributes.html(accum, out);
55 accum
56 .append(isProcessingInstruction ? "!" : "?")
57 .append(">");
58 }
59
60 void outerHtmlTail(Appendable accum, int depth, Document.OutputSettings out) {}
61
62 @Override
63 public String toString() {
…lines 64–67 unchanged (4 lines)

Before

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "nodes"
; ";"
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 "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
block_comment "/**\n An XML Declaration.\n\n @author Jonathan Hedley, jonathan"...
class_declaration
modifiers
public "public"
class "class"
identifier "XmlDeclaration"
superclass
extends "extends"
type_identifier "Node"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "String"
variable_declarator
identifier "name"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "isProcessingInstruction"
; ";"
line_comment "// <! if true, <? if false, declaration (and last data char "...
block_comment "/**\n Create a new XML declaration\n @param name of de"...
constructor_declaration (+56 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "nodeName"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
string_literal
" "\""
string_fragment "#declaration"
" "\""
; ";"
} "}"
block_comment "/**\n * Get the name of this declaration.\n * @return "...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "name"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "name"
; ";"
} "}"
block_comment "/**\n Get the unencoded XML declaration.\n @return XML"...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getWholeDeclaration"
formal_parameters
( "("
) ")"
block
{ "{"
local_variable_declaration
modifiers
final "final"
type_identifier "String"
variable_declarator
identifier "decl"
= "="
field_access
this "this"
. "."
identifier "name"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
method_invocation
identifier "decl"
. "."
identifier "equals"
argument_list
( "("
string_literal
" "\""
string_fragment "xml"
" "\""
) ")"
&& "&&"
binary_expression
method_invocation
identifier "attributes"
. "."
identifier "size"
argument_list
( "("
) ")"
> ">"
decimal_integer_literal "1"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "StringBuilder"
variable_declarator
identifier "sb"
= "="
object_creation_expression
new "new"
type_identifier "StringBuilder"
argument_list
( "("
identifier "decl"
) ")"
; ";"
local_variable_declaration
modifiers
final "final"
type_identifier "String"
variable_declarator
identifier "version"
= "="
method_invocation
identifier "attributes"
. "."
identifier "get"
argument_list
( "("
string_literal
" "\""
string_fragment "version"
" "\""
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "version"
!= "!="
null_literal "null"
) ")"
block
{ "{"
expression_statement
method_invocation
method_invocation
method_invocation
identifier "sb"
. "."
identifier "append"
argument_list
( "("
string_literal
" "\""
string_fragment " version="
escape_sequence "\\\""
" "\""
) ")"
. "."
identifier "append"
argument_list
( "("
identifier "version"
) ")"
. "."
identifier "append"
argument_list
( "("
string_literal
" "\""
escape_sequence "\\\""
" "\""
) ")"
; ";"
} "}"
local_variable_declaration
modifiers
final "final"
type_identifier "String"
variable_declarator
identifier "encoding"
= "="
method_invocation
identifier "attributes"
. "."
identifier "get"
argument_list
( "("
string_literal
" "\""
string_fragment "encoding"
" "\""
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "encoding"
!= "!="
null_literal "null"
) ")"
block
{ "{"
expression_statement
method_invocation
method_invocation
method_invocation
identifier "sb"
. "."
identifier "append"
argument_list
( "("
string_literal
" "\""
string_fragment " encoding="
escape_sequence "\\\""
" "\""
) ")"
. "."
identifier "append"
argument_list
( "("
identifier "encoding"
) ")"
. "."
identifier "append"
argument_list
( "("
string_literal
" "\""
escape_sequence "\\\""
" "\""
) ")"
; ";"
} "}"
return_statement
return "return"
method_invocation
identifier "sb"
. "."
identifier "toString"
argument_list
( "("
) ")"
; ";"
} "}"
else "else"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "name"
; ";"
} "}"
} "}"
method_declaration
void_type "void"
identifier "outerHtmlHead"
formal_parameters
( "("
formal_parameter
type_identifier "Appendable"
identifier "accum"
, ","
formal_parameter
integral_type
int "int"
identifier "depth"
, ","
formal_parameter
scoped_type_identifier
type_identifier "Document"
. "."
type_identifier "OutputSettings"
identifier "out"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
expression_statement all 1:2
method_invocation
method_invocation
method_invocation (+29 nodes collapsed)
. "."
identifier "append"
argument_list
( "("
method_invocation
identifier "getWholeDeclaration"
argument_list
( "("
) ")"
) ")"
. "."
identifier "append"
argument_list
( "("
string_literal
" "\""
string_fragment ">"
" "\""
) ")"
; ";" all 1:2
} "}"
method_declaration (+24 nodes collapsed)
method_declaration (+22 nodes collapsed)
} "}"

After

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "nodes"
; ";"
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 "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
block_comment "/**\n An XML Declaration.\n\n @author Jonathan Hedley, jonathan"...
class_declaration
modifiers
public "public"
class "class"
identifier "XmlDeclaration"
superclass
extends "extends"
type_identifier "Node"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "String"
variable_declarator
identifier "name"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "isProcessingInstruction"
; ";"
line_comment "// <! if true, <? if false, declaration (and last data char "...
block_comment "/**\n Create a new XML declaration\n @param name of de"...
constructor_declaration (+56 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "nodeName"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
string_literal
" "\""
string_fragment "#declaration"
" "\""
; ";"
} "}"
block_comment "/**\n * Get the name of this declaration.\n * @return "...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "name"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "name"
; ";"
} "}"
block_comment "/**\n Get the unencoded XML declaration.\n @return XML"...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getWholeDeclaration"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
method_invocation
identifier "attributes"
. "."
identifier "html"
argument_list
( "("
) ")"
. "."
identifier "trim"
argument_list
( "("
) ")"
; ";"
line_comment "// attr html starts with a \" \""
} "}"
method_declaration
void_type "void"
identifier "outerHtmlHead"
formal_parameters
( "("
formal_parameter
type_identifier "Appendable"
identifier "accum"
, ","
formal_parameter
integral_type
int "int"
identifier "depth"
, ","
formal_parameter
scoped_type_identifier
type_identifier "Document"
. "."
type_identifier "OutputSettings"
identifier "out"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
expression_statement all 1:2
method_invocation
method_invocation (+29 nodes collapsed)
. "."
identifier "append"
argument_list
( "("
identifier "name"
) ")"
; ";" all 1:2
expression_statement
method_invocation
identifier "attributes"
. "."
identifier "html"
argument_list
( "("
identifier "accum"
, ","
identifier "out"
) ")"
; ";"
expression_statement all 1:2
method_invocation (+29 nodes collapsed)
; ";" all 1:2
} "}"
method_declaration (+24 nodes collapsed)
method_declaration (+22 nodes collapsed)
} "}"