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.

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–295 unchanged (295 lines)
296 *
297 * @param token
298 */
299 private boolean isShortOption(String token)
300 {
301 // short options (-S, -SV, -S=V, -SV1=V2, -S1S2)
302 return token.startsWith("-") && token.length() >= 2 && options.hasShortOption(token.substring(1, 2));
303
304 // remove leading "-" and "=value"
305 }
306
307 /**
308 * Tells if the token looks like a long option.
309 *
310 * @param token
311 */
…lines 312–697 unchanged (386 lines)

After

…lines 1–295 unchanged (295 lines)
296 *
297 * @param token
298 */
299 private boolean isShortOption(String token)
300 {
301 // short options (-S, -SV, -S=V, -SV1=V2, -S1S2)
302 if (!token.startsWith("-") || token.length() == 1)
303 {
304 return false;
305 }
306
307 // remove leading "-" and "=value"
308 int pos = token.indexOf("=");
309 String optName = pos == -1 ? token.substring(1) : token.substring(1, pos);
310 return options.hasShortOption(optName);
311 }
312
313 /**
314 * Tells if the token looks like a long option.
315 *
316 * @param token
…lines 317–703 unchanged (387 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 "Enumeration"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Properties"
; ";"
block_comment "/**\n * Default parser.\n * \n * @version $Id$\n * @since 1.3\n *"...
class_declaration
modifiers
public "public"
class "class"
identifier "DefaultParser"
super_interfaces
implements "implements"
type_list
type_identifier "CommandLineParser"
class_body
{ "{"
block_comment "/** The command-line instance. */"
field_declaration
modifiers
protected "protected"
type_identifier "CommandLine"
variable_declarator
identifier "cmd"
; ";"
block_comment "/** The current options. */"
field_declaration
modifiers
protected "protected"
type_identifier "Options"
variable_declarator
identifier "options"
; ";"
block_comment "/**\n * Flag indicating how unrecognized tokens are handl"...
field_declaration
modifiers
protected "protected"
boolean_type "boolean"
variable_declarator
identifier "stopAtNonOption"
; ";"
block_comment "/** The token currently processed. */"
field_declaration
modifiers
protected "protected"
type_identifier "String"
variable_declarator
identifier "currentToken"
; ";"
block_comment "/** The last option parsed. */"
field_declaration
modifiers
protected "protected"
type_identifier "Option"
variable_declarator
identifier "currentOption"
; ";"
block_comment "/** Flag indicating if tokens should no longer be analyzed a"...
field_declaration
modifiers
protected "protected"
boolean_type "boolean"
variable_declarator
identifier "skipParsing"
; ";"
block_comment "/** The required options and groups expected to be found whe"...
field_declaration
modifiers
protected "protected"
type_identifier "List"
variable_declarator
identifier "expectedOpts"
; ";"
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Parse the arguments according to the specified op"...
method_declaration (+44 nodes collapsed)
method_declaration (+44 nodes collapsed)
block_comment "/**\n * Parse the arguments according to the specified op"...
method_declaration (+179 nodes collapsed)
block_comment "/**\n * Sets the values of Options using the values in <c"...
method_declaration (+328 nodes collapsed)
block_comment "/**\n * Throws a {@link MissingOptionException} if all of"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * Throw a {@link MissingArgumentException} if the c"...
method_declaration (+45 nodes collapsed)
block_comment "/**\n * Handle any command line token.\n *\n * @par"...
method_declaration (+227 nodes collapsed)
block_comment "/**\n * Returns true is the token is a valid argument.\n "...
method_declaration (+33 nodes collapsed)
block_comment "/**\n * Check if the token is a negative number.\n *\n "...
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Tells if the token looks like an option.\n *\n "...
method_declaration (+31 nodes collapsed)
block_comment "/**\n * Tells if the token looks like a short option.\n "...
method_declaration
modifiers
private "private"
boolean_type "boolean"
identifier "isShortOption"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "token"
) ")"
block
{ "{"
line_comment "// short options (-S, -SV, -S=V, -SV1=V2, -S1S2)"
return_statement
return "return"
binary_expression any 2:1
binary_expression any 2:1
method_invocation
identifier "token"
. "."
identifier "startsWith"
argument_list
( "("
string_literal
" "\""
string_fragment "-"
" "\""
) ")"
&& "&&"
binary_expression
method_invocation
identifier "token"
. "."
identifier "length"
argument_list
( "("
) ")"
>= ">="
decimal_integer_literal "2"
&& "&&"
method_invocation
identifier "options"
. "."
identifier "hasShortOption"
argument_list
( "("
method_invocation
identifier "token"
. "."
identifier "substring"
argument_list
( "("
decimal_integer_literal "1"
, ","
decimal_integer_literal "2"
) ")"
) ")"
; ";"
line_comment "// remove leading \"-\" and \"=value\""
} "}"
block_comment "/**\n * Tells if the token looks like a long option.\n "...
method_declaration (+166 nodes collapsed)
block_comment "/**\n * Handles an unknown token. If the token starts wit"...
method_declaration (+96 nodes collapsed)
block_comment "/**\n * Handles the following tokens:\n *\n * --L\n "...
method_declaration (+58 nodes collapsed)
block_comment "/**\n * Handles the following tokens:\n *\n * --L\n "...
method_declaration (+116 nodes collapsed)
block_comment "/**\n * Handles the following tokens:\n *\n * --L=V"...
method_declaration (+214 nodes collapsed)
block_comment "/**\n * Handles the following tokens:\n *\n * -S\n "...
method_declaration (+568 nodes collapsed)
block_comment "/**\n * Search for a prefix that is the long name of an o"...
method_declaration (+115 nodes collapsed)
block_comment "/**\n * Check if the specified token is a Java-like prope"...
method_declaration (+81 nodes collapsed)
method_declaration (+90 nodes collapsed)
block_comment "/**\n * Removes the option or its group from the list of "...
method_declaration (+117 nodes collapsed)
block_comment "/**\n * Breaks <code>token</code> into its constituent pa"...
method_declaration (+182 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 "Enumeration"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Properties"
; ";"
block_comment "/**\n * Default parser.\n * \n * @version $Id$\n * @since 1.3\n *"...
class_declaration
modifiers
public "public"
class "class"
identifier "DefaultParser"
super_interfaces
implements "implements"
type_list
type_identifier "CommandLineParser"
class_body
{ "{"
block_comment "/** The command-line instance. */"
field_declaration
modifiers
protected "protected"
type_identifier "CommandLine"
variable_declarator
identifier "cmd"
; ";"
block_comment "/** The current options. */"
field_declaration
modifiers
protected "protected"
type_identifier "Options"
variable_declarator
identifier "options"
; ";"
block_comment "/**\n * Flag indicating how unrecognized tokens are handl"...
field_declaration
modifiers
protected "protected"
boolean_type "boolean"
variable_declarator
identifier "stopAtNonOption"
; ";"
block_comment "/** The token currently processed. */"
field_declaration
modifiers
protected "protected"
type_identifier "String"
variable_declarator
identifier "currentToken"
; ";"
block_comment "/** The last option parsed. */"
field_declaration
modifiers
protected "protected"
type_identifier "Option"
variable_declarator
identifier "currentOption"
; ";"
block_comment "/** Flag indicating if tokens should no longer be analyzed a"...
field_declaration
modifiers
protected "protected"
boolean_type "boolean"
variable_declarator
identifier "skipParsing"
; ";"
block_comment "/** The required options and groups expected to be found whe"...
field_declaration
modifiers
protected "protected"
type_identifier "List"
variable_declarator
identifier "expectedOpts"
; ";"
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Parse the arguments according to the specified op"...
method_declaration (+44 nodes collapsed)
method_declaration (+44 nodes collapsed)
block_comment "/**\n * Parse the arguments according to the specified op"...
method_declaration (+179 nodes collapsed)
block_comment "/**\n * Sets the values of Options using the values in <c"...
method_declaration (+328 nodes collapsed)
block_comment "/**\n * Throws a {@link MissingOptionException} if all of"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * Throw a {@link MissingArgumentException} if the c"...
method_declaration (+45 nodes collapsed)
block_comment "/**\n * Handle any command line token.\n *\n * @par"...
method_declaration (+227 nodes collapsed)
block_comment "/**\n * Returns true is the token is a valid argument.\n "...
method_declaration (+33 nodes collapsed)
block_comment "/**\n * Check if the token is a negative number.\n *\n "...
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Tells if the token looks like an option.\n *\n "...
method_declaration (+31 nodes collapsed)
block_comment "/**\n * Tells if the token looks like a short option.\n "...
method_declaration
modifiers
private "private"
boolean_type "boolean"
identifier "isShortOption"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "token"
) ")"
block
{ "{"
line_comment "// short options (-S, -SV, -S=V, -SV1=V2, -S1S2)"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression any 2:1
unary_expression
! "!"
method_invocation
identifier "token"
. "."
identifier "startsWith"
argument_list
( "("
string_literal
" "\""
string_fragment "-"
" "\""
) ")"
|| "||"
binary_expression
method_invocation
identifier "token"
. "."
identifier "length"
argument_list
( "("
) ")"
== "=="
decimal_integer_literal "1"
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
line_comment "// remove leading \"-\" and \"=value\""
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "pos"
= "="
method_invocation
identifier "token"
. "."
identifier "indexOf"
argument_list
( "("
string_literal
" "\""
string_fragment "="
" "\""
) ")"
; ";"
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "optName"
= "="
ternary_expression
binary_expression
identifier "pos"
== "=="
unary_expression
- "-"
decimal_integer_literal "1"
? "?"
method_invocation
identifier "token"
. "."
identifier "substring"
argument_list
( "("
decimal_integer_literal "1"
) ")"
: ":"
method_invocation
identifier "token"
. "."
identifier "substring"
argument_list
( "("
decimal_integer_literal "1"
, ","
identifier "pos"
) ")"
; ";"
return_statement
return "return"
method_invocation
identifier "options"
. "."
identifier "hasShortOption"
argument_list
( "("
identifier "optName"
) ")"
; ";"
} "}"
block_comment "/**\n * Tells if the token looks like a long option.\n "...
method_declaration (+166 nodes collapsed)
block_comment "/**\n * Handles an unknown token. If the token starts wit"...
method_declaration (+96 nodes collapsed)
block_comment "/**\n * Handles the following tokens:\n *\n * --L\n "...
method_declaration (+58 nodes collapsed)
block_comment "/**\n * Handles the following tokens:\n *\n * --L\n "...
method_declaration (+116 nodes collapsed)
block_comment "/**\n * Handles the following tokens:\n *\n * --L=V"...
method_declaration (+214 nodes collapsed)
block_comment "/**\n * Handles the following tokens:\n *\n * -S\n "...
method_declaration (+568 nodes collapsed)
block_comment "/**\n * Search for a prefix that is the long name of an o"...
method_declaration (+115 nodes collapsed)
block_comment "/**\n * Check if the specified token is a Java-like prope"...
method_declaration (+81 nodes collapsed)
method_declaration (+90 nodes collapsed)
block_comment "/**\n * Removes the option or its group from the list of "...
method_declaration (+117 nodes collapsed)
block_comment "/**\n * Breaks <code>token</code> into its constituent pa"...
method_declaration (+182 nodes collapsed)
} "}"