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–129 unchanged (129 lines)
130 protected void computeGeometricalProperties() {
131
132 final Vector2D[][] v = getVertices();
133
134 if (v.length == 0) {
135 final BSPTree<Euclidean2D> tree = getTree(false);
136 if ((Boolean) tree.getAttribute()) {
137 // the instance covers the whole space
138 setSize(Double.POSITIVE_INFINITY);
139 setBarycenter(Vector2D.NaN);
140 } else {
141 setSize(0);
142 setBarycenter(new Vector2D(0, 0));
…lines 143–475 unchanged (333 lines)

After

…lines 1–129 unchanged (129 lines)
130 protected void computeGeometricalProperties() {
131
132 final Vector2D[][] v = getVertices();
133
134 if (v.length == 0) {
135 final BSPTree<Euclidean2D> tree = getTree(false);
136 if (tree.getCut() == null && (Boolean) tree.getAttribute()) {
137 // the instance covers the whole space
138 setSize(Double.POSITIVE_INFINITY);
139 setBarycenter(Vector2D.NaN);
140 } else {
141 setSize(0);
142 setBarycenter(new Vector2D(0, 0));
…lines 143–475 unchanged (333 lines)

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration (+22 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ArrayList"
; ";"
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 "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "exception"
. "."
identifier "MathInternalError"
; ";"
import_declaration (+25 nodes collapsed)
import_declaration (+25 nodes collapsed)
import_declaration (+25 nodes collapsed)
import_declaration (+25 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+25 nodes collapsed)
import_declaration (+25 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "util"
. "."
identifier "FastMath"
; ";"
block_comment "/** This class represents a 2D region: a set of polygons.\n *"...
class_declaration
modifiers
public "public"
class "class"
identifier "PolygonsSet"
superclass
extends "extends"
generic_type
type_identifier "AbstractRegion"
type_arguments
< "<"
type_identifier "Euclidean2D"
, ","
type_identifier "Euclidean1D"
> ">"
class_body
{ "{"
block_comment "/** Vertices organized as boundary loops. */"
field_declaration
modifiers
private "private"
array_type
type_identifier "Vector2D"
dimensions
[ "["
] "]"
[ "["
] "]"
variable_declarator
identifier "vertices"
; ";"
block_comment "/** Build a polygons set representing the whole real line.\n "...
constructor_declaration
modifiers
public "public"
identifier "PolygonsSet"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/** Build a polygons set from a BSP tree.\n * <p>The leaf"...
constructor_declaration (+27 nodes collapsed)
block_comment "/** Build a polygons set from a Boundary REPresentation (B-r"...
constructor_declaration (+32 nodes collapsed)
block_comment "/** Build a parallellepipedic box.\n * @param xMin low bo"...
constructor_declaration (+55 nodes collapsed)
block_comment "/** Create a list of hyperplanes representing the boundary o"...
method_declaration (+162 nodes collapsed)
block_comment "/** {@inheritDoc} */"
method_declaration (+34 nodes collapsed)
block_comment "/** {@inheritDoc} */"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
protected "protected"
void_type "void"
identifier "computeGeometricalProperties"
formal_parameters
( "("
) ")"
block
{ "{"
local_variable_declaration
modifiers
final "final"
array_type
type_identifier "Vector2D"
dimensions
[ "["
] "]"
[ "["
] "]"
variable_declarator
identifier "v"
= "="
method_invocation
identifier "getVertices"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "v"
. "."
identifier "length"
== "=="
decimal_integer_literal "0"
) ")"
block
{ "{"
local_variable_declaration
modifiers
final "final"
generic_type
type_identifier "BSPTree"
type_arguments
< "<"
type_identifier "Euclidean2D"
> ">"
variable_declarator
identifier "tree"
= "="
method_invocation
identifier "getTree"
argument_list
( "("
false "false"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
cast_expression
( "("
type_identifier "Boolean"
) ")"
method_invocation
identifier "tree"
. "."
identifier "getAttribute"
argument_list
( "("
) ")"
) ")"
block (+26 nodes collapsed)
else "else"
block (+27 nodes collapsed)
} "}"
else "else"
if_statement (+331 nodes collapsed)
} "}"
block_comment "/** Get the vertices of the polygon.\n * <p>The polygon b"...
method_declaration (+829 nodes collapsed)
block_comment "/** Follow a boundary loop.\n * @param node node containi"...
method_declaration (+508 nodes collapsed)
block_comment "/** Private extension of Segment allowing comparison. */"
class_declaration (+362 nodes collapsed)
block_comment "/** Visitor building segments. */"
class_declaration (+548 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration (+22 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ArrayList"
; ";"
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 "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "exception"
. "."
identifier "MathInternalError"
; ";"
import_declaration (+25 nodes collapsed)
import_declaration (+25 nodes collapsed)
import_declaration (+25 nodes collapsed)
import_declaration (+25 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration (+25 nodes collapsed)
import_declaration (+25 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "util"
. "."
identifier "FastMath"
; ";"
block_comment "/** This class represents a 2D region: a set of polygons.\n *"...
class_declaration
modifiers
public "public"
class "class"
identifier "PolygonsSet"
superclass
extends "extends"
generic_type
type_identifier "AbstractRegion"
type_arguments
< "<"
type_identifier "Euclidean2D"
, ","
type_identifier "Euclidean1D"
> ">"
class_body
{ "{"
block_comment "/** Vertices organized as boundary loops. */"
field_declaration
modifiers
private "private"
array_type
type_identifier "Vector2D"
dimensions
[ "["
] "]"
[ "["
] "]"
variable_declarator
identifier "vertices"
; ";"
block_comment "/** Build a polygons set representing the whole real line.\n "...
constructor_declaration
modifiers
public "public"
identifier "PolygonsSet"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/** Build a polygons set from a BSP tree.\n * <p>The leaf"...
constructor_declaration (+27 nodes collapsed)
block_comment "/** Build a polygons set from a Boundary REPresentation (B-r"...
constructor_declaration (+32 nodes collapsed)
block_comment "/** Build a parallellepipedic box.\n * @param xMin low bo"...
constructor_declaration (+55 nodes collapsed)
block_comment "/** Create a list of hyperplanes representing the boundary o"...
method_declaration (+162 nodes collapsed)
block_comment "/** {@inheritDoc} */"
method_declaration (+34 nodes collapsed)
block_comment "/** {@inheritDoc} */"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
protected "protected"
void_type "void"
identifier "computeGeometricalProperties"
formal_parameters
( "("
) ")"
block
{ "{"
local_variable_declaration
modifiers
final "final"
array_type
type_identifier "Vector2D"
dimensions
[ "["
] "]"
[ "["
] "]"
variable_declarator
identifier "v"
= "="
method_invocation
identifier "getVertices"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "v"
. "."
identifier "length"
== "=="
decimal_integer_literal "0"
) ")"
block
{ "{"
local_variable_declaration
modifiers
final "final"
generic_type
type_identifier "BSPTree"
type_arguments
< "<"
type_identifier "Euclidean2D"
> ">"
variable_declarator
identifier "tree"
= "="
method_invocation
identifier "getTree"
argument_list
( "("
false "false"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
binary_expression
method_invocation
identifier "tree"
. "."
identifier "getCut"
argument_list
( "("
) ")"
== "=="
null_literal "null"
&& "&&"
cast_expression
( "("
type_identifier "Boolean"
) ")"
method_invocation
identifier "tree"
. "."
identifier "getAttribute"
argument_list
( "("
) ")"
) ")"
block (+26 nodes collapsed)
else "else"
block (+27 nodes collapsed)
} "}"
else "else"
if_statement (+331 nodes collapsed)
} "}"
block_comment "/** Get the vertices of the polygon.\n * <p>The polygon b"...
method_declaration (+829 nodes collapsed)
block_comment "/** Follow a boundary loop.\n * @param node node containi"...
method_declaration (+508 nodes collapsed)
block_comment "/** Private extension of Segment allowing comparison. */"
class_declaration (+362 nodes collapsed)
block_comment "/** Visitor building segments. */"
class_declaration (+548 nodes collapsed)
} "}"