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–5 unchanged (5 lines)
6
7import java.lang.reflect.Array;
8
9//stolen from hamcrest because I didn't want to have more dependency than Matcher class
10public class Equality {
11
12 public static boolean areEqual(Object o1, Object o2) {
13 if (o1 == null || o2 == null) {
14 return o1 == null && o2 == null;
15 } else if (isArray(o1)) {
16 return isArray(o2) && areArraysEqual(o1, o2);
17 } else {
18 return o1.equals(o2);
…lines 19–41 unchanged (23 lines)

After

…lines 1–6 unchanged (6 lines)
7import java.lang.reflect.Array;
8
9//stolen from hamcrest because I didn't want to have more dependency than Matcher class
10public class Equality {
11
12 public static boolean areEqual(Object o1, Object o2) {
13 if (o1 == o2 ) {
14 return true;
15 } else if (o1 == null || o2 == null) {
16 return o1 == null && o2 == null;
17 } else if (isArray(o1)) {
18 return isArray(o2) && areArraysEqual(o1, o2);
19 } else {
20 return o1.equals(o2);
21 }
…lines 22–43 unchanged (22 lines)

Before

program
block_comment "/*\n * Copyright (c) 2007 Mockito contributors\n * This progra"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "mockito"
. "."
identifier "internal"
. "."
identifier "matchers"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Array"
; ";"
line_comment "//stolen from hamcrest because I didn't want to have more de"...
class_declaration
modifiers
public "public"
class "class"
identifier "Equality"
class_body
{ "{"
method_declaration
modifiers
public "public"
static "static"
boolean_type "boolean"
identifier "areEqual"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "o1"
, ","
formal_parameter
type_identifier "Object"
identifier "o2"
) ")"
block
{ "{"
if_statement (+80 nodes collapsed)
} "}"
method_declaration (+39 nodes collapsed)
method_declaration (+39 nodes collapsed)
method_declaration (+89 nodes collapsed)
method_declaration (+30 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Copyright (c) 2007 Mockito contributors\n * This progra"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "mockito"
. "."
identifier "internal"
. "."
identifier "matchers"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Array"
; ";"
line_comment "//stolen from hamcrest because I didn't want to have more de"...
class_declaration
modifiers
public "public"
class "class"
identifier "Equality"
class_body
{ "{"
method_declaration
modifiers
public "public"
static "static"
boolean_type "boolean"
identifier "areEqual"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "o1"
, ","
formal_parameter
type_identifier "Object"
identifier "o2"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "o1"
== "=="
identifier "o2"
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
else "else"
if_statement (+80 nodes collapsed)
} "}"
method_declaration (+39 nodes collapsed)
method_declaration (+39 nodes collapsed)
method_declaration (+89 nodes collapsed)
method_declaration (+30 nodes collapsed)
} "}"