This mapping has 1 multi-map group: several pairings are equally correct there. The code view shows one arbitrary valid pairing, not the only one.

This mapping has 1 all-to-all group: 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

1package org.jsoup.nodes;
2
3import org.jsoup.helper.StringUtil;
4
5/**
6 * A {@code <!DOCTPYE>} node.
7 */
8public class DocumentType extends Node {
9 // todo: quirk mode from publicId and systemId
10
11 /**
12 * Create a new doctype element.
13 * @param name the doctype's name
14 * @param publicId the doctype's public ID
15 * @param systemId the doctype's system ID
16 * @param baseUri the doctype's base URI
17 */
18 public DocumentType(String name, String publicId, String systemId, String baseUri) {
19 super(baseUri);
20
21 attr("name", name);
22 attr("publicId", publicId);
23 attr("systemId", systemId);
24 }
25
26 @Override
27 public String nodeName() {
28 return "#doctype";
29 }
30
31 @Override
32 void outerHtmlHead(StringBuilder accum, int depth, Document.OutputSettings out) {
33 accum.append("<!DOCTYPE html");
34 if (!StringUtil.isBlank(attr("publicId")))
35 accum.append(" PUBLIC \"").append(attr("publicId")).append("\"");
36 if (!StringUtil.isBlank(attr("systemId")))
37 accum.append(' ').append(attr("systemId")).append("\"");
38 accum.append('>');
39 }
40
41 @Override
42 void outerHtmlTail(StringBuilder accum, int depth, Document.OutputSettings out) {
43 }
44}
45

After

1package org.jsoup.nodes;
2
3import org.jsoup.helper.StringUtil;
4import org.jsoup.helper.Validate;
5
6/**
7 * A {@code <!DOCTPYE>} node.
8 */
9public class DocumentType extends Node {
10 // todo: quirk mode from publicId and systemId
…lines 11–15 unchanged (5 lines)
16 * @param systemId the doctype's system ID
17 * @param baseUri the doctype's base URI
18 */
19 public DocumentType(String name, String publicId, String systemId, String baseUri) {
20 super(baseUri);
21
22 Validate.notEmpty(name);
23 attr("name", name);
24 attr("publicId", publicId);
25 attr("systemId", systemId);
26 }
27
28 @Override
29 public String nodeName() {
30 return "#doctype";
31 }
32
33 @Override
34 void outerHtmlHead(StringBuilder accum, int depth, Document.OutputSettings out) {
35 accum.append("<!DOCTYPE ").append(attr("name"));
36 if (!StringUtil.isBlank(attr("publicId")))
37 accum.append(" PUBLIC \"").append(attr("publicId")).append("\"");
38 if (!StringUtil.isBlank(attr("systemId")))
39 accum.append(" \"").append(attr("systemId")).append("\"");
40 accum.append('>');
41 }
42
43 @Override
44 void outerHtmlTail(StringBuilder accum, int depth, Document.OutputSettings out) {
45 }
46}
47

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 "StringUtil"
; ";"
block_comment "/**\n * A {@code <!DOCTPYE>} node.\n */"
class_declaration
modifiers
public "public"
class "class"
identifier "DocumentType"
superclass
extends "extends"
type_identifier "Node"
class_body
{ "{"
line_comment "// todo: quirk mode from publicId and systemId"
block_comment "/**\n * Create a new doctype element.\n * @param name "...
constructor_declaration
modifiers
public "public"
identifier "DocumentType"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "name"
, ","
formal_parameter
type_identifier "String"
identifier "publicId"
, ","
formal_parameter
type_identifier "String"
identifier "systemId"
, ","
formal_parameter
type_identifier "String"
identifier "baseUri"
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
identifier "baseUri"
) ")"
; ";"
expression_statement
method_invocation
identifier "attr"
argument_list
( "("
string_literal
" "\""
string_fragment "name"
" "\""
, ","
identifier "name"
) ")"
; ";"
expression_statement
method_invocation
identifier "attr"
argument_list
( "("
string_literal
" "\""
string_fragment "publicId"
" "\""
, ","
identifier "publicId"
) ")"
; ";"
expression_statement
method_invocation
identifier "attr"
argument_list
( "("
string_literal
" "\""
string_fragment "systemId"
" "\""
, ","
identifier "systemId"
) ")"
; ";"
} "}"
method_declaration (+21 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
void_type "void"
identifier "outerHtmlHead"
formal_parameters
( "("
formal_parameter
type_identifier "StringBuilder"
identifier "accum"
, ","
formal_parameter
integral_type
int "int"
identifier "depth"
, ","
formal_parameter
scoped_type_identifier
type_identifier "Document"
. "."
type_identifier "OutputSettings"
identifier "out"
) ")"
block
{ "{"
expression_statement
method_invocation any 1:2
identifier "accum"
. "."
identifier "append"
argument_list
( "("
string_literal
" "\""
string_fragment "<!DOCTYPE html"
" "\""
) ")"
; ";"
if_statement (+62 nodes collapsed)
if_statement
if "if"
parenthesized_expression (+21 nodes collapsed)
expression_statement
method_invocation
method_invocation
method_invocation
identifier "accum"
. "."
identifier "append"
argument_list
( "("
character_literal "' '" all 1:5
) ")"
. "."
identifier "append"
argument_list
( "("
method_invocation
identifier "attr"
argument_list
( "("
string_literal
" "\""
string_fragment "systemId"
" "\""
) ")"
) ")"
. "."
identifier "append"
argument_list
( "("
string_literal
" "\""
escape_sequence "\\\""
" "\""
) ")"
; ";"
expression_statement
method_invocation
identifier "accum"
. "."
identifier "append"
argument_list
( "("
character_literal "'>'"
) ")"
; ";"
} "}"
method_declaration (+28 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 "StringUtil"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "helper"
. "."
identifier "Validate"
; ";"
block_comment "/**\n * A {@code <!DOCTPYE>} node.\n */"
class_declaration
modifiers
public "public"
class "class"
identifier "DocumentType"
superclass
extends "extends"
type_identifier "Node"
class_body
{ "{"
line_comment "// todo: quirk mode from publicId and systemId"
block_comment "/**\n * Create a new doctype element.\n * @param name "...
constructor_declaration
modifiers
public "public"
identifier "DocumentType"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "name"
, ","
formal_parameter
type_identifier "String"
identifier "publicId"
, ","
formal_parameter
type_identifier "String"
identifier "systemId"
, ","
formal_parameter
type_identifier "String"
identifier "baseUri"
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
identifier "baseUri"
) ")"
; ";"
expression_statement
method_invocation
identifier "Validate"
. "."
identifier "notEmpty"
argument_list
( "("
identifier "name"
) ")"
; ";"
expression_statement
method_invocation
identifier "attr"
argument_list
( "("
string_literal
" "\""
string_fragment "name"
" "\""
, ","
identifier "name"
) ")"
; ";"
expression_statement
method_invocation
identifier "attr"
argument_list
( "("
string_literal
" "\""
string_fragment "publicId"
" "\""
, ","
identifier "publicId"
) ")"
; ";"
expression_statement
method_invocation
identifier "attr"
argument_list
( "("
string_literal
" "\""
string_fragment "systemId"
" "\""
, ","
identifier "systemId"
) ")"
; ";"
} "}"
method_declaration (+21 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
void_type "void"
identifier "outerHtmlHead"
formal_parameters
( "("
formal_parameter
type_identifier "StringBuilder"
identifier "accum"
, ","
formal_parameter
integral_type
int "int"
identifier "depth"
, ","
formal_parameter
scoped_type_identifier
type_identifier "Document"
. "."
type_identifier "OutputSettings"
identifier "out"
) ")"
block
{ "{"
expression_statement
method_invocation any 1:2
method_invocation any 1:2
identifier "accum"
. "."
identifier "append"
argument_list
( "("
string_literal
" "\""
string_fragment "<!DOCTYPE "
" "\""
) ")"
. "."
identifier "append"
argument_list
( "("
method_invocation
identifier "attr"
argument_list
( "("
string_literal
" "\""
string_fragment "name"
" "\""
) ")"
) ")"
; ";"
if_statement (+62 nodes collapsed)
if_statement
if "if"
parenthesized_expression (+21 nodes collapsed)
expression_statement
method_invocation
method_invocation
method_invocation
identifier "accum"
. "."
identifier "append"
argument_list
( "("
string_literal all 1:5
" "\"" all 1:5
string_fragment " " all 1:5
escape_sequence "\\\"" all 1:5
" "\"" all 1:5
) ")"
. "."
identifier "append"
argument_list
( "("
method_invocation
identifier "attr"
argument_list
( "("
string_literal
" "\""
string_fragment "systemId"
" "\""
) ")"
) ")"
. "."
identifier "append"
argument_list
( "("
string_literal
" "\""
escape_sequence "\\\""
" "\""
) ")"
; ";"
expression_statement
method_invocation
identifier "accum"
. "."
identifier "append"
argument_list
( "("
character_literal "'>'"
) ")"
; ";"
} "}"
method_declaration (+28 nodes collapsed)
} "}"