Requires N:M mapping.

This mapping has 10 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–225 unchanged (225 lines)
226 */
227 private void processOptionToken(String token, boolean stopAtNonOption)
228 {
229 if (options.hasOption(token))
230 {
231 currentOption = options.getOption(token);
232 tokens.add(token);
233 }
234 else if (stopAtNonOption)
235 {
236 eatTheRest = true;
237 tokens.add(token);
238 }
239 }
240
241 /**
242 * <p>Breaks <code>token</code> into its constituent parts
243 * using the following algorithm.
…lines 244–298 unchanged (55 lines)

After

…lines 1–231 unchanged (231 lines)
232 }
233 else if (stopAtNonOption)
234 {
235 eatTheRest = true;
236 }
237
238 tokens.add(token);
239 }
240
241 /**
242 * <p>Breaks <code>token</code> into its constituent parts
243 * using the following algorithm.
244 * <ul>
…lines 245–298 unchanged (54 lines)

Before

program
block_comment "/**\n * Licensed to the Apache Software Foundation (ASF) unde"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ArrayList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Arrays"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
block_comment "/**\n * The class PosixParser provides an implementation of t"...
class_declaration
modifiers
public "public"
class "class"
identifier "PosixParser"
superclass
extends "extends"
type_identifier "Parser"
class_body
{ "{"
block_comment "/** holder for flattened tokens */"
field_declaration
modifiers
private "private"
type_identifier "List"
variable_declarator
identifier "tokens"
= "="
object_creation_expression
new "new"
type_identifier "ArrayList"
argument_list
( "("
) ")"
; ";"
block_comment "/** specifies if bursting should continue */"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "eatTheRest"
; ";"
block_comment "/** holder for the current option */"
field_declaration
modifiers
private "private"
type_identifier "Option"
variable_declarator
identifier "currentOption"
; ";"
block_comment "/** the command line Options */"
field_declaration
modifiers
private "private"
type_identifier "Options"
variable_declarator
identifier "options"
; ";"
block_comment "/**\n * Resets the members to their original state i.e. r"...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>An implementation of {@link Parser}'s abstract"...
method_declaration (+409 nodes collapsed)
block_comment "/**\n * Adds the remaining tokens to the processed tokens"...
method_declaration (+54 nodes collapsed)
block_comment "/**\n * <p>If there is a current option and it can have a"...
method_declaration (+125 nodes collapsed)
block_comment "/**\n * <p>If an {@link Option} exists for <code>token</c"...
method_declaration
modifiers
private "private"
void_type "void"
identifier "processOptionToken"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "token"
, ","
formal_parameter
boolean_type "boolean"
identifier "stopAtNonOption"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "options"
. "."
identifier "hasOption"
argument_list
( "("
identifier "token"
) ")"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "currentOption"
= "="
method_invocation
identifier "options"
. "."
identifier "getOption"
argument_list
( "("
identifier "token"
) ")"
; ";"
expression_statement all 2:1
method_invocation all 2:1
identifier "tokens" all 2:1
. "." all 2:1
identifier "add" all 2:1
argument_list all 2:1
( "(" all 2:1
identifier "token" all 2:1
) ")" all 2:1
; ";" all 2:1
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
identifier "stopAtNonOption"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "eatTheRest"
= "="
true "true"
; ";"
expression_statement all 2:1
method_invocation all 2:1
identifier "tokens" all 2:1
. "." all 2:1
identifier "add" all 2:1
argument_list all 2:1
( "(" all 2:1
identifier "token" all 2:1
) ")" all 2:1
; ";" all 2:1
} "}"
} "}"
block_comment "/**\n * <p>Breaks <code>token</code> into its constituent"...
method_declaration (+217 nodes collapsed)
} "}"

After

program
block_comment "/**\n * Licensed to the Apache Software Foundation (ASF) unde"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ArrayList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Arrays"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
block_comment "/**\n * The class PosixParser provides an implementation of t"...
class_declaration
modifiers
public "public"
class "class"
identifier "PosixParser"
superclass
extends "extends"
type_identifier "Parser"
class_body
{ "{"
block_comment "/** holder for flattened tokens */"
field_declaration
modifiers
private "private"
type_identifier "List"
variable_declarator
identifier "tokens"
= "="
object_creation_expression
new "new"
type_identifier "ArrayList"
argument_list
( "("
) ")"
; ";"
block_comment "/** specifies if bursting should continue */"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "eatTheRest"
; ";"
block_comment "/** holder for the current option */"
field_declaration
modifiers
private "private"
type_identifier "Option"
variable_declarator
identifier "currentOption"
; ";"
block_comment "/** the command line Options */"
field_declaration
modifiers
private "private"
type_identifier "Options"
variable_declarator
identifier "options"
; ";"
block_comment "/**\n * Resets the members to their original state i.e. r"...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>An implementation of {@link Parser}'s abstract"...
method_declaration (+409 nodes collapsed)
block_comment "/**\n * Adds the remaining tokens to the processed tokens"...
method_declaration (+54 nodes collapsed)
block_comment "/**\n * <p>If there is a current option and it can have a"...
method_declaration (+125 nodes collapsed)
block_comment "/**\n * <p>If an {@link Option} exists for <code>token</c"...
method_declaration
modifiers
private "private"
void_type "void"
identifier "processOptionToken"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "token"
, ","
formal_parameter
boolean_type "boolean"
identifier "stopAtNonOption"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "options"
. "."
identifier "hasOption"
argument_list
( "("
identifier "token"
) ")"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "currentOption"
= "="
method_invocation
identifier "options"
. "."
identifier "getOption"
argument_list
( "("
identifier "token"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
identifier "stopAtNonOption"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "eatTheRest"
= "="
true "true"
; ";"
} "}"
expression_statement all 2:1
method_invocation all 2:1
identifier "tokens" all 2:1
. "." all 2:1
identifier "add" all 2:1
argument_list all 2:1
( "(" all 2:1
identifier "token" all 2:1
) ")" all 2:1
; ";" all 2:1
} "}"
block_comment "/**\n * <p>Breaks <code>token</code> into its constituent"...
method_declaration (+217 nodes collapsed)
} "}"