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–22 unchanged (22 lines)
23 return wanted == actual;
24 }
25
26 public void describeTo(Description description) {
27 description.appendText("same(");
28 appendQuoting(description);
29 description.appendText(wanted.toString());
30 appendQuoting(description);
31 description.appendText(")");
32 }
33
34 private void appendQuoting(Description description) {
35 if (wanted instanceof String) {
…lines 36–42 unchanged (7 lines)

After

…lines 1–22 unchanged (22 lines)
23 return wanted == actual;
24 }
25
26 public void describeTo(Description description) {
27 description.appendText("same(");
28 appendQuoting(description);
29 description.appendText(wanted == null ? "null" : wanted.toString());
30 appendQuoting(description);
31 description.appendText(")");
32 }
33
34 private void appendQuoting(Description description) {
35 if (wanted instanceof String) {
…lines 36–42 unchanged (7 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
identifier "org"
. "."
identifier "hamcrest"
. "."
identifier "Description"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "mockito"
. "."
identifier "ArgumentMatcher"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Serializable"
; ";"
class_declaration
modifiers
public "public"
class "class"
identifier "Same"
superclass
extends "extends"
generic_type
type_identifier "ArgumentMatcher"
type_arguments
< "<"
type_identifier "Object"
> ">"
super_interfaces
implements "implements"
type_list
type_identifier "Serializable"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
unary_expression
- "-"
decimal_integer_literal "1226959355938572597L"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Object"
variable_declarator
identifier "wanted"
; ";"
constructor_declaration (+22 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration
modifiers
public "public"
void_type "void"
identifier "describeTo"
formal_parameters
( "("
formal_parameter
type_identifier "Description"
identifier "description"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "description"
. "."
identifier "appendText"
argument_list
( "("
string_literal
" "\""
string_fragment "same("
" "\""
) ")"
; ";"
expression_statement
method_invocation
identifier "appendQuoting"
argument_list
( "("
identifier "description"
) ")"
; ";"
expression_statement
method_invocation
identifier "description"
. "."
identifier "appendText"
argument_list
( "("
method_invocation
identifier "wanted"
. "."
identifier "toString"
argument_list
( "("
) ")"
) ")"
; ";"
expression_statement
method_invocation
identifier "appendQuoting"
argument_list
( "("
identifier "description"
) ")"
; ";"
expression_statement
method_invocation
identifier "description"
. "."
identifier "appendText"
argument_list
( "("
string_literal
" "\""
string_fragment ")"
" "\""
) ")"
; ";"
} "}"
method_declaration (+65 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
identifier "org"
. "."
identifier "hamcrest"
. "."
identifier "Description"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "mockito"
. "."
identifier "ArgumentMatcher"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Serializable"
; ";"
class_declaration
modifiers
public "public"
class "class"
identifier "Same"
superclass
extends "extends"
generic_type
type_identifier "ArgumentMatcher"
type_arguments
< "<"
type_identifier "Object"
> ">"
super_interfaces
implements "implements"
type_list
type_identifier "Serializable"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
unary_expression
- "-"
decimal_integer_literal "1226959355938572597L"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Object"
variable_declarator
identifier "wanted"
; ";"
constructor_declaration (+22 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration
modifiers
public "public"
void_type "void"
identifier "describeTo"
formal_parameters
( "("
formal_parameter
type_identifier "Description"
identifier "description"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "description"
. "."
identifier "appendText"
argument_list
( "("
string_literal
" "\""
string_fragment "same("
" "\""
) ")"
; ";"
expression_statement
method_invocation
identifier "appendQuoting"
argument_list
( "("
identifier "description"
) ")"
; ";"
expression_statement
method_invocation
identifier "description"
. "."
identifier "appendText"
argument_list
( "("
ternary_expression
binary_expression
identifier "wanted"
== "=="
null_literal "null"
? "?"
string_literal
" "\""
string_fragment "null"
" "\""
: ":"
method_invocation
identifier "wanted"
. "."
identifier "toString"
argument_list
( "("
) ")"
) ")"
; ";"
expression_statement
method_invocation
identifier "appendQuoting"
argument_list
( "("
identifier "description"
) ")"
; ";"
expression_statement
method_invocation
identifier "description"
. "."
identifier "appendText"
argument_list
( "("
string_literal
" "\""
string_fragment ")"
" "\""
) ")"
; ";"
} "}"
method_declaration (+65 nodes collapsed)
} "}"