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–373 unchanged (373 lines)
374 if (lhs == null || rhs == null) {
375 this.setEquals(false);
376 return this;
377 }
378 Class lhsClass = lhs.getClass();
379 if (!lhsClass.isArray()) {
380 // The simple case, not an array, just test the element
381 isEquals = lhs.equals(rhs);
382 } else if (lhs.getClass() != rhs.getClass()) {
383 // Here when we compare different dimensions, for example: a boolean[][] to a boolean[]
384 this.setEquals(false);
385 }
386 // 'Switch' on type of array, to dispatch to the correct handler
387 // This handles multi dimensional arrays of the same depth
388 else if (lhs instanceof long[]) {
…lines 389–844 unchanged (456 lines)

After

…lines 1–373 unchanged (373 lines)
374 if (lhs == null || rhs == null) {
375 this.setEquals(false);
376 return this;
377 }
378 Class lhsClass = lhs.getClass();
379 if (!lhsClass.isArray()) {
380 if (lhs instanceof java.math.BigDecimal) {
381 isEquals = (((java.math.BigDecimal)lhs).compareTo(rhs) == 0);
382 } else {
383 // The simple case, not an array, just test the element
384 isEquals = lhs.equals(rhs);
385 }
386 } else if (lhs.getClass() != rhs.getClass()) {
387 // Here when we compare different dimensions, for example: a boolean[][] to a boolean[]
388 this.setEquals(false);
389 }
390 // 'Switch' on type of array, to dispatch to the correct handler
391 // This handles multi dimensional arrays of the same depth
…lines 392–848 unchanged (457 lines)

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "lang"
. "."
identifier "builder"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "AccessibleObject"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Field"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Modifier"
; ";"
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 "Collection"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Collections"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
block_comment "/**\n * <p>Assists in implementing {@link Object#equals(Objec"...
class_declaration
modifiers
public "public"
class "class"
identifier "EqualsBuilder"
class_body
{ "{"
block_comment "/**\n * If the fields tested are equals.\n * The defau"...
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "isEquals"
= "="
true "true"
; ";"
block_comment "/**\n * <p>Constructor for EqualsBuilder.</p>\n *\n "...
constructor_declaration
modifiers
public "public"
identifier "EqualsBuilder"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
line_comment "// do nothing for now."
} "}"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>This method uses reflection to determine if th"...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * <p>This method uses reflection to determine if th"...
method_declaration (+44 nodes collapsed)
block_comment "/**\n * <p>This method uses reflection to determine if th"...
method_declaration (+44 nodes collapsed)
block_comment "/**\n * <p>This method uses reflection to determine if th"...
method_declaration (+40 nodes collapsed)
block_comment "/**\n * <p>This method uses reflection to determine if th"...
method_declaration (+44 nodes collapsed)
block_comment "/**\n * <p>This method uses reflection to determine if th"...
method_declaration (+331 nodes collapsed)
block_comment "/**\n * <p>Appends the fields and values defined by the g"...
method_declaration (+286 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Adds the result of <code>super.equals()</code>"...
method_declaration (+40 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Test if two <code>Object</code>s are equal usi"...
method_declaration
modifiers
public "public"
type_identifier "EqualsBuilder"
identifier "append"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "lhs"
, ","
formal_parameter
type_identifier "Object"
identifier "rhs"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "isEquals"
== "=="
false "false"
) ")"
block
{ "{"
return_statement
return "return"
this "this"
; ";"
} "}"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "lhs"
== "=="
identifier "rhs"
) ")"
block
{ "{"
return_statement
return "return"
this "this"
; ";"
} "}"
if_statement (+32 nodes collapsed)
local_variable_declaration
type_identifier "Class"
variable_declarator
identifier "lhsClass"
= "="
method_invocation
identifier "lhs"
. "."
identifier "getClass"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
unary_expression
! "!"
method_invocation
identifier "lhsClass"
. "."
identifier "isArray"
argument_list
( "("
) ")"
) ")"
block
{ "{"
line_comment "// The simple case, not an array, just test the element"
expression_statement
assignment_expression
identifier "isEquals"
= "="
method_invocation
identifier "lhs"
. "."
identifier "equals"
argument_list
( "("
identifier "rhs"
) ")"
; ";"
} "}"
else "else"
if_statement (+433 nodes collapsed)
return_statement
return "return"
this "this"
; ";"
} "}"
block_comment "/**\n * <p>\n * Test if two <code>long</code> s are eq"...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * <p>Test if two <code>int</code>s are equal.</p>\n "...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * <p>Test if two <code>short</code>s are equal.</p>"...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * <p>Test if two <code>char</code>s are equal.</p>\n"...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * <p>Test if two <code>byte</code>s are equal.</p>\n"...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * <p>Test if two <code>double</code>s are equal by "...
method_declaration (+61 nodes collapsed)
block_comment "/**\n * <p>Test if two <code>float</code>s are equal byt "...
method_declaration (+61 nodes collapsed)
block_comment "/**\n * <p>Test if two <code>booleans</code>s are equal.<"...
method_declaration (+50 nodes collapsed)
block_comment "/**\n * <p>Performs a deep comparison of two <code>Object"...
method_declaration (+173 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>long</code>."...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>int</code>. "...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>short</code>"...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>char</code>."...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>byte</code>."...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>double</code"...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>float</code>"...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>boolean</cod"...
method_declaration (+173 nodes collapsed)
block_comment "/**\n * <p>Returns <code>true</code> if the fields that h"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isEquals"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "isEquals"
; ";"
} "}"
block_comment "/**\n * Sets the <code>isEquals</code> value.\n * \n "...
method_declaration (+23 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "lang"
. "."
identifier "builder"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "AccessibleObject"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Field"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Modifier"
; ";"
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 "Collection"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Collections"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
block_comment "/**\n * <p>Assists in implementing {@link Object#equals(Objec"...
class_declaration
modifiers
public "public"
class "class"
identifier "EqualsBuilder"
class_body
{ "{"
block_comment "/**\n * If the fields tested are equals.\n * The defau"...
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "isEquals"
= "="
true "true"
; ";"
block_comment "/**\n * <p>Constructor for EqualsBuilder.</p>\n *\n "...
constructor_declaration
modifiers
public "public"
identifier "EqualsBuilder"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
line_comment "// do nothing for now."
} "}"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>This method uses reflection to determine if th"...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * <p>This method uses reflection to determine if th"...
method_declaration (+44 nodes collapsed)
block_comment "/**\n * <p>This method uses reflection to determine if th"...
method_declaration (+44 nodes collapsed)
block_comment "/**\n * <p>This method uses reflection to determine if th"...
method_declaration (+40 nodes collapsed)
block_comment "/**\n * <p>This method uses reflection to determine if th"...
method_declaration (+44 nodes collapsed)
block_comment "/**\n * <p>This method uses reflection to determine if th"...
method_declaration (+331 nodes collapsed)
block_comment "/**\n * <p>Appends the fields and values defined by the g"...
method_declaration (+286 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Adds the result of <code>super.equals()</code>"...
method_declaration (+40 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Test if two <code>Object</code>s are equal usi"...
method_declaration
modifiers
public "public"
type_identifier "EqualsBuilder"
identifier "append"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "lhs"
, ","
formal_parameter
type_identifier "Object"
identifier "rhs"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "isEquals"
== "=="
false "false"
) ")"
block
{ "{"
return_statement
return "return"
this "this"
; ";"
} "}"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "lhs"
== "=="
identifier "rhs"
) ")"
block
{ "{"
return_statement
return "return"
this "this"
; ";"
} "}"
if_statement (+32 nodes collapsed)
local_variable_declaration
type_identifier "Class"
variable_declarator
identifier "lhsClass"
= "="
method_invocation
identifier "lhs"
. "."
identifier "getClass"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
unary_expression
! "!"
method_invocation
identifier "lhsClass"
. "."
identifier "isArray"
argument_list
( "("
) ")"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
instanceof_expression
identifier "lhs"
instanceof "instanceof"
scoped_type_identifier
scoped_type_identifier
type_identifier "java"
. "."
type_identifier "math"
. "."
type_identifier "BigDecimal"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "isEquals"
= "="
parenthesized_expression
( "("
binary_expression
method_invocation
parenthesized_expression
( "("
cast_expression
( "("
scoped_type_identifier
scoped_type_identifier
type_identifier "java"
. "."
type_identifier "math"
. "."
type_identifier "BigDecimal"
) ")"
identifier "lhs"
) ")"
. "."
identifier "compareTo"
argument_list
( "("
identifier "rhs"
) ")"
== "=="
decimal_integer_literal "0"
) ")"
; ";"
} "}"
else "else"
block
{ "{"
line_comment "// The simple case, not an array, just test the element"
expression_statement
assignment_expression
identifier "isEquals"
= "="
method_invocation
identifier "lhs"
. "."
identifier "equals"
argument_list
( "("
identifier "rhs"
) ")"
; ";"
} "}"
} "}"
else "else"
if_statement (+433 nodes collapsed)
return_statement
return "return"
this "this"
; ";"
} "}"
block_comment "/**\n * <p>\n * Test if two <code>long</code> s are eq"...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * <p>Test if two <code>int</code>s are equal.</p>\n "...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * <p>Test if two <code>short</code>s are equal.</p>"...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * <p>Test if two <code>char</code>s are equal.</p>\n"...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * <p>Test if two <code>byte</code>s are equal.</p>\n"...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * <p>Test if two <code>double</code>s are equal by "...
method_declaration (+61 nodes collapsed)
block_comment "/**\n * <p>Test if two <code>float</code>s are equal byt "...
method_declaration (+61 nodes collapsed)
block_comment "/**\n * <p>Test if two <code>booleans</code>s are equal.<"...
method_declaration (+50 nodes collapsed)
block_comment "/**\n * <p>Performs a deep comparison of two <code>Object"...
method_declaration (+173 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>long</code>."...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>int</code>. "...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>short</code>"...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>char</code>."...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>byte</code>."...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>double</code"...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>float</code>"...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * <p>Deep comparison of array of <code>boolean</cod"...
method_declaration (+173 nodes collapsed)
block_comment "/**\n * <p>Returns <code>true</code> if the fields that h"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isEquals"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "isEquals"
; ";"
} "}"
block_comment "/**\n * Sets the <code>isEquals</code> value.\n * \n "...
method_declaration (+23 nodes collapsed)
} "}"