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–29 unchanged (29 lines)
30 * @param str The string from which the hyphens should be removed.
31 *
32 * @return the new String.
33 */
34 static String stripLeadingHyphens(String str)
35 {
36 if (str.startsWith("--"))
37 {
38 return str.substring(2, str.length());
39 }
40 else if (str.startsWith("-"))
41 {
42 return str.substring(1, str.length());
…lines 43–67 unchanged (25 lines)

After

…lines 1–29 unchanged (29 lines)
30 * @param str The string from which the hyphens should be removed.
31 *
32 * @return the new String.
33 */
34 static String stripLeadingHyphens(String str)
35 {
36 if (str == null) {
37 return null;
38 }
39 if (str.startsWith("--"))
40 {
41 return str.substring(2, str.length());
42 }
43 else if (str.startsWith("-"))
44 {
…lines 45–70 unchanged (26 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"
; ";"
block_comment "/**\n * Contains useful helper methods for classes within thi"...
class_declaration
class "class"
identifier "Util"
class_body
{ "{"
block_comment "/**\n * <p>Remove the hyphens from the begining of <code>"...
method_declaration
modifiers
static "static"
type_identifier "String"
identifier "stripLeadingHyphens"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "str"
) ")"
block
{ "{"
if_statement (+77 nodes collapsed)
return_statement
return "return"
identifier "str"
; ";"
} "}"
block_comment "/**\n * Remove the leading and trailing quotes from <code"...
method_declaration (+101 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"
; ";"
block_comment "/**\n * Contains useful helper methods for classes within thi"...
class_declaration
class "class"
identifier "Util"
class_body
{ "{"
block_comment "/**\n * <p>Remove the hyphens from the begining of <code>"...
method_declaration
modifiers
static "static"
type_identifier "String"
identifier "stripLeadingHyphens"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "str"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "str"
== "=="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
null_literal "null"
; ";"
} "}"
if_statement (+77 nodes collapsed)
return_statement
return "return"
identifier "str"
; ";"
} "}"
block_comment "/**\n * Remove the leading and trailing quotes from <code"...
method_declaration (+101 nodes collapsed)
} "}"