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–48 unchanged (48 lines)
49 /**
50 * @return True if the input object is a DelegatingMethod which has an internal Method which is equal to the internal Method of this DelegatingMethod,
51 * or if the input object is a Method which is equal to the internal Method of this DelegatingMethod.
52 */
53 @Override
54 public boolean equals(Object o) {
55 return method.equals(o);
56 }
57
58 @Override
59 public int hashCode() {
60 return 1;
61 }
62}

After

…lines 1–48 unchanged (48 lines)
49 /**
50 * @return True if the input object is a DelegatingMethod which has an internal Method which is equal to the internal Method of this DelegatingMethod,
51 * or if the input object is a Method which is equal to the internal Method of this DelegatingMethod.
52 */
53 @Override
54 public boolean equals(Object o) {
55 if (this == o) {
56 return true;
57 }
58 if (o instanceof DelegatingMethod) {
59 DelegatingMethod that = (DelegatingMethod) o;
60 return method.equals(that.method);
61 } else {
62 return method.equals(o);
63 }
64 }
65
66 @Override
67 public int hashCode() {
68 return method.hashCode();
69 }
70}

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 "creation"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "mockito"
. "."
identifier "internal"
. "."
identifier "invocation"
. "."
identifier "MockitoMethod"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Method"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Modifier"
; ";"
class_declaration
modifiers
public "public"
class "class"
identifier "DelegatingMethod"
super_interfaces
implements "implements"
type_list
type_identifier "MockitoMethod"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Method"
variable_declarator
identifier "method"
; ";"
constructor_declaration (+34 nodes collapsed)
method_declaration (+31 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "Method"
identifier "getJavaMethod"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "method"
; ";"
} "}"
method_declaration (+21 nodes collapsed)
method_declaration (+31 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration (+33 nodes collapsed)
block_comment "/**\n * @return True if the input object is a DelegatingM"...
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
boolean_type "boolean"
identifier "equals"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "o"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "method"
. "."
identifier "equals"
argument_list
( "("
identifier "o"
) ")"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
integral_type
int "int"
identifier "hashCode"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
decimal_integer_literal "1"
; ";"
} "}"
} "}"

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 "creation"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "mockito"
. "."
identifier "internal"
. "."
identifier "invocation"
. "."
identifier "MockitoMethod"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Method"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Modifier"
; ";"
class_declaration
modifiers
public "public"
class "class"
identifier "DelegatingMethod"
super_interfaces
implements "implements"
type_list
type_identifier "MockitoMethod"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Method"
variable_declarator
identifier "method"
; ";"
constructor_declaration (+34 nodes collapsed)
method_declaration (+31 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "Method"
identifier "getJavaMethod"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "method"
; ";"
} "}"
method_declaration (+21 nodes collapsed)
method_declaration (+31 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration (+33 nodes collapsed)
block_comment "/**\n * @return True if the input object is a DelegatingM"...
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
boolean_type "boolean"
identifier "equals"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "o"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
this "this"
== "=="
identifier "o"
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
if_statement
if "if"
parenthesized_expression
( "("
instanceof_expression
identifier "o"
instanceof "instanceof"
type_identifier "DelegatingMethod"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "DelegatingMethod"
variable_declarator
identifier "that"
= "="
cast_expression
( "("
type_identifier "DelegatingMethod"
) ")"
identifier "o"
; ";"
return_statement
return "return"
method_invocation
identifier "method"
. "."
identifier "equals"
argument_list
( "("
field_access
identifier "that"
. "."
identifier "method"
) ")"
; ";"
} "}"
else "else"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "method"
. "."
identifier "equals"
argument_list
( "("
identifier "o"
) ")"
; ";"
} "}"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
integral_type
int "int"
identifier "hashCode"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "method"
. "."
identifier "hashCode"
argument_list
( "("
) ")"
; ";"
} "}"
} "}"