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–200 unchanged (200 lines)
201 "categories.default-prefix") + " ";
202 this.categoryKeys = generateKeys(categoryCount, prefix);
203 }
204
205 }
206 else {
207 this.seriesKeys = null;
208 this.categoryKeys = null;
209 }
210 }
211
212 }
213
214 /**
…lines 215–331 unchanged (117 lines)
332 * @see #setSeriesKeys(Comparable[])
333 */
334 public void setCategoryKeys(Comparable[] categoryKeys) {
335 if (categoryKeys == null) {
336 throw new IllegalArgumentException("Null 'categoryKeys' argument.");
337 }
338 if (categoryKeys.length != this.startData[0].length) {
339 throw new IllegalArgumentException(
340 "The number of categories does not match the data.");
341 }
342 for (int i = 0; i < categoryKeys.length; i++) {
343 if (categoryKeys[i] == null) {
344 throw new IllegalArgumentException(
…lines 345–803 unchanged (459 lines)

After

…lines 1–200 unchanged (200 lines)
201 "categories.default-prefix") + " ";
202 this.categoryKeys = generateKeys(categoryCount, prefix);
203 }
204
205 }
206 else {
207 this.seriesKeys = new Comparable[0];
208 this.categoryKeys = new Comparable[0];
209 }
210 }
211
212 }
213
214 /**
…lines 215–331 unchanged (117 lines)
332 * @see #setSeriesKeys(Comparable[])
333 */
334 public void setCategoryKeys(Comparable[] categoryKeys) {
335 if (categoryKeys == null) {
336 throw new IllegalArgumentException("Null 'categoryKeys' argument.");
337 }
338 if (categoryKeys.length != getCategoryCount()) {
339 throw new IllegalArgumentException(
340 "The number of categories does not match the data.");
341 }
342 for (int i = 0; i < categoryKeys.length; i++) {
343 if (categoryKeys[i] == null) {
344 throw new IllegalArgumentException(
…lines 345–803 unchanged (459 lines)

Before

program
block_comment "/* ========================================================="...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "category"
; ";"
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 "Arrays"
; ";"
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"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ResourceBundle"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "DataUtilities"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "UnknownKeyException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "general"
. "."
identifier "AbstractSeriesDataset"
; ";"
block_comment "/**\r\n * A convenience class that provides a default implemen"...
class_declaration
modifiers
public "public"
class "class"
identifier "DefaultIntervalCategoryDataset"
superclass
extends "extends"
type_identifier "AbstractSeriesDataset"
super_interfaces
implements "implements"
type_list
type_identifier "IntervalCategoryDataset"
class_body
{ "{"
block_comment "/** The series keys. */"
field_declaration
modifiers
private "private"
array_type
type_identifier "Comparable"
dimensions
[ "["
] "]"
variable_declarator
identifier "seriesKeys"
; ";"
block_comment "/** The category keys. */"
field_declaration
modifiers
private "private"
array_type
type_identifier "Comparable"
dimensions
[ "["
] "]"
variable_declarator
identifier "categoryKeys"
; ";"
block_comment "/** Storage for the start value data. */"
field_declaration
modifiers
private "private"
array_type
type_identifier "Number"
dimensions
[ "["
] "]"
[ "["
] "]"
variable_declarator
identifier "startData"
; ";"
block_comment "/** Storage for the end value data. */"
field_declaration
modifiers
private "private"
array_type
type_identifier "Number"
dimensions
[ "["
] "]"
[ "["
] "]"
variable_declarator
identifier "endData"
; ";"
block_comment "/**\r\n * Creates a new dataset using the specified data v"...
constructor_declaration (+54 nodes collapsed)
block_comment "/**\r\n * Constructs a dataset and populates it with data "...
constructor_declaration (+42 nodes collapsed)
block_comment "/**\r\n * Constructs a DefaultIntervalCategoryDataset, pop"...
constructor_declaration (+50 nodes collapsed)
block_comment "/**\r\n * Constructs a DefaultIntervalCategoryDataset, pop"...
constructor_declaration
modifiers
public "public"
identifier "DefaultIntervalCategoryDataset"
formal_parameters (+38 nodes collapsed)
constructor_body
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "startData"
= "="
identifier "starts"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "endData"
= "="
identifier "ends"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
binary_expression
identifier "starts"
!= "!="
null_literal "null"
&& "&&"
binary_expression
identifier "ends"
!= "!="
null_literal "null"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "baseName"
= "="
string_literal
" "\""
string_fragment "org.jfree.data.resources.DataPackageResources"
" "\""
; ";"
local_variable_declaration
type_identifier "ResourceBundle"
variable_declarator
identifier "resources"
= "="
method_invocation
identifier "ResourceBundle"
. "."
identifier "getBundle"
argument_list
( "("
identifier "baseName"
) ")"
; ";"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "seriesCount"
= "="
field_access
identifier "starts"
. "."
identifier "length"
; ";"
if_statement (+53 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "seriesCount"
> ">"
decimal_integer_literal "0"
) ")"
block (+273 nodes collapsed)
else "else"
block
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "seriesKeys"
= "="
null_literal "null"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "categoryKeys"
= "="
null_literal "null"
; ";"
} "}"
} "}"
} "}"
block_comment "/**\r\n * Returns the number of series in the dataset (pos"...
method_declaration (+51 nodes collapsed)
block_comment "/**\r\n * Returns a series index.\r\n *\r\n * @param s"...
method_declaration (+90 nodes collapsed)
block_comment "/**\r\n * Returns the name of the specified series.\r\n "...
method_declaration (+70 nodes collapsed)
block_comment "/**\r\n * Sets the names of the series in the dataset.\r\n "...
method_declaration (+91 nodes collapsed)
block_comment "/**\r\n * Returns the number of categories in the dataset."...
method_declaration (+71 nodes collapsed)
block_comment "/**\r\n * Returns a list of the categories in the dataset."...
method_declaration (+62 nodes collapsed)
block_comment "/**\r\n * Sets the categories for the dataset.\r\n *\r\n "...
method_declaration
modifiers
public "public"
void_type "void"
identifier "setCategoryKeys"
formal_parameters
( "("
formal_parameter
array_type
type_identifier "Comparable"
dimensions
[ "["
] "]"
identifier "categoryKeys"
) ")"
block
{ "{"
if_statement (+25 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "categoryKeys"
. "."
identifier "length"
!= "!="
field_access
array_access
field_access
this "this"
. "."
identifier "startData"
[ "["
decimal_integer_literal "0"
] "]"
. "."
identifier "length"
) ")"
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "IllegalArgumentException"
argument_list
( "("
string_literal
" "\""
string_fragment "The number of categories does not match the data."
" "\""
) ")"
; ";"
} "}"
for_statement (+61 nodes collapsed)
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "categoryKeys"
= "="
identifier "categoryKeys"
; ";"
expression_statement
method_invocation
identifier "fireDatasetChanged"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/**\r\n * Returns the data value for one category in a ser"...
method_declaration (+105 nodes collapsed)
block_comment "/**\r\n * Returns the data value for one category in a ser"...
method_declaration (+31 nodes collapsed)
block_comment "/**\r\n * Returns the start data value for one category in"...
method_declaration (+105 nodes collapsed)
block_comment "/**\r\n * Returns the start data value for one category in"...
method_declaration (+131 nodes collapsed)
block_comment "/**\r\n * Returns the end data value for one category in a"...
method_declaration (+105 nodes collapsed)
block_comment "/**\r\n * Returns the end data value for one category in a"...
method_declaration (+129 nodes collapsed)
block_comment "/**\r\n * Sets the start data value for one category in a "...
method_declaration (+144 nodes collapsed)
block_comment "/**\r\n * Sets the end data value for one category in a se"...
method_declaration (+144 nodes collapsed)
block_comment "/**\r\n * Returns the index for the given category.\r\n "...
method_declaration (+90 nodes collapsed)
block_comment "/**\r\n * Generates an array of keys, by appending a space"...
method_declaration (+97 nodes collapsed)
block_comment "/**\r\n * Returns a column key.\r\n *\r\n * @param col"...
method_declaration (+26 nodes collapsed)
block_comment "/**\r\n * Returns a column index.\r\n *\r\n * @param c"...
method_declaration (+49 nodes collapsed)
block_comment "/**\r\n * Returns a row index.\r\n *\r\n * @param rowK"...
method_declaration (+24 nodes collapsed)
block_comment "/**\r\n * Returns a list of the series in the dataset. Th"...
method_declaration (+68 nodes collapsed)
block_comment "/**\r\n * Returns the name of the specified series.\r\n "...
method_declaration (+67 nodes collapsed)
block_comment "/**\r\n * Returns the number of categories in the dataset."...
method_declaration (+22 nodes collapsed)
block_comment "/**\r\n * Returns the number of series in the dataset (pos"...
method_declaration (+22 nodes collapsed)
block_comment "/**\r\n * Tests this dataset for equality with an arbitrar"...
method_declaration (+183 nodes collapsed)
block_comment "/**\r\n * Returns a clone of this dataset.\r\n * \r\n "...
method_declaration (+121 nodes collapsed)
block_comment "/**\r\n * Tests two double[][] arrays for equality.\r\n "...
method_declaration (+153 nodes collapsed)
block_comment "/**\r\n * Clones a two dimensional array of <code>Number</"...
method_declaration (+173 nodes collapsed)
} "}"

After

program
block_comment "/* ========================================================="...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "category"
; ";"
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 "Arrays"
; ";"
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"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ResourceBundle"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "DataUtilities"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "UnknownKeyException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "general"
. "."
identifier "AbstractSeriesDataset"
; ";"
block_comment "/**\r\n * A convenience class that provides a default implemen"...
class_declaration
modifiers
public "public"
class "class"
identifier "DefaultIntervalCategoryDataset"
superclass
extends "extends"
type_identifier "AbstractSeriesDataset"
super_interfaces
implements "implements"
type_list
type_identifier "IntervalCategoryDataset"
class_body
{ "{"
block_comment "/** The series keys. */"
field_declaration
modifiers
private "private"
array_type
type_identifier "Comparable"
dimensions
[ "["
] "]"
variable_declarator
identifier "seriesKeys"
; ";"
block_comment "/** The category keys. */"
field_declaration
modifiers
private "private"
array_type
type_identifier "Comparable"
dimensions
[ "["
] "]"
variable_declarator
identifier "categoryKeys"
; ";"
block_comment "/** Storage for the start value data. */"
field_declaration
modifiers
private "private"
array_type
type_identifier "Number"
dimensions
[ "["
] "]"
[ "["
] "]"
variable_declarator
identifier "startData"
; ";"
block_comment "/** Storage for the end value data. */"
field_declaration
modifiers
private "private"
array_type
type_identifier "Number"
dimensions
[ "["
] "]"
[ "["
] "]"
variable_declarator
identifier "endData"
; ";"
block_comment "/**\r\n * Creates a new dataset using the specified data v"...
constructor_declaration (+54 nodes collapsed)
block_comment "/**\r\n * Constructs a dataset and populates it with data "...
constructor_declaration (+42 nodes collapsed)
block_comment "/**\r\n * Constructs a DefaultIntervalCategoryDataset, pop"...
constructor_declaration (+50 nodes collapsed)
block_comment "/**\r\n * Constructs a DefaultIntervalCategoryDataset, pop"...
constructor_declaration
modifiers
public "public"
identifier "DefaultIntervalCategoryDataset"
formal_parameters (+38 nodes collapsed)
constructor_body
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "startData"
= "="
identifier "starts"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "endData"
= "="
identifier "ends"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
binary_expression
identifier "starts"
!= "!="
null_literal "null"
&& "&&"
binary_expression
identifier "ends"
!= "!="
null_literal "null"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "baseName"
= "="
string_literal
" "\""
string_fragment "org.jfree.data.resources.DataPackageResources"
" "\""
; ";"
local_variable_declaration
type_identifier "ResourceBundle"
variable_declarator
identifier "resources"
= "="
method_invocation
identifier "ResourceBundle"
. "."
identifier "getBundle"
argument_list
( "("
identifier "baseName"
) ")"
; ";"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "seriesCount"
= "="
field_access
identifier "starts"
. "."
identifier "length"
; ";"
if_statement (+53 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "seriesCount"
> ">"
decimal_integer_literal "0"
) ")"
block (+273 nodes collapsed)
else "else"
block
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "seriesKeys"
= "="
array_creation_expression
new "new"
type_identifier "Comparable"
dimensions_expr
[ "["
decimal_integer_literal "0"
] "]"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "categoryKeys"
= "="
array_creation_expression
new "new"
type_identifier "Comparable"
dimensions_expr
[ "["
decimal_integer_literal "0"
] "]"
; ";"
} "}"
} "}"
} "}"
block_comment "/**\r\n * Returns the number of series in the dataset (pos"...
method_declaration (+51 nodes collapsed)
block_comment "/**\r\n * Returns a series index.\r\n *\r\n * @param s"...
method_declaration (+90 nodes collapsed)
block_comment "/**\r\n * Returns the name of the specified series.\r\n "...
method_declaration (+70 nodes collapsed)
block_comment "/**\r\n * Sets the names of the series in the dataset.\r\n "...
method_declaration (+91 nodes collapsed)
block_comment "/**\r\n * Returns the number of categories in the dataset."...
method_declaration (+71 nodes collapsed)
block_comment "/**\r\n * Returns a list of the categories in the dataset."...
method_declaration (+62 nodes collapsed)
block_comment "/**\r\n * Sets the categories for the dataset.\r\n *\r\n "...
method_declaration
modifiers
public "public"
void_type "void"
identifier "setCategoryKeys"
formal_parameters
( "("
formal_parameter
array_type
type_identifier "Comparable"
dimensions
[ "["
] "]"
identifier "categoryKeys"
) ")"
block
{ "{"
if_statement (+25 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "categoryKeys"
. "."
identifier "length"
!= "!="
method_invocation
identifier "getCategoryCount"
argument_list
( "("
) ")"
) ")"
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "IllegalArgumentException"
argument_list
( "("
string_literal
" "\""
string_fragment "The number of categories does not match the data."
" "\""
) ")"
; ";"
} "}"
for_statement (+61 nodes collapsed)
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "categoryKeys"
= "="
identifier "categoryKeys"
; ";"
expression_statement
method_invocation
identifier "fireDatasetChanged"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/**\r\n * Returns the data value for one category in a ser"...
method_declaration (+105 nodes collapsed)
block_comment "/**\r\n * Returns the data value for one category in a ser"...
method_declaration (+31 nodes collapsed)
block_comment "/**\r\n * Returns the start data value for one category in"...
method_declaration (+105 nodes collapsed)
block_comment "/**\r\n * Returns the start data value for one category in"...
method_declaration (+131 nodes collapsed)
block_comment "/**\r\n * Returns the end data value for one category in a"...
method_declaration (+105 nodes collapsed)
block_comment "/**\r\n * Returns the end data value for one category in a"...
method_declaration (+129 nodes collapsed)
block_comment "/**\r\n * Sets the start data value for one category in a "...
method_declaration (+144 nodes collapsed)
block_comment "/**\r\n * Sets the end data value for one category in a se"...
method_declaration (+144 nodes collapsed)
block_comment "/**\r\n * Returns the index for the given category.\r\n "...
method_declaration (+90 nodes collapsed)
block_comment "/**\r\n * Generates an array of keys, by appending a space"...
method_declaration (+97 nodes collapsed)
block_comment "/**\r\n * Returns a column key.\r\n *\r\n * @param col"...
method_declaration (+26 nodes collapsed)
block_comment "/**\r\n * Returns a column index.\r\n *\r\n * @param c"...
method_declaration (+49 nodes collapsed)
block_comment "/**\r\n * Returns a row index.\r\n *\r\n * @param rowK"...
method_declaration (+24 nodes collapsed)
block_comment "/**\r\n * Returns a list of the series in the dataset. Th"...
method_declaration (+68 nodes collapsed)
block_comment "/**\r\n * Returns the name of the specified series.\r\n "...
method_declaration (+67 nodes collapsed)
block_comment "/**\r\n * Returns the number of categories in the dataset."...
method_declaration (+22 nodes collapsed)
block_comment "/**\r\n * Returns the number of series in the dataset (pos"...
method_declaration (+22 nodes collapsed)
block_comment "/**\r\n * Tests this dataset for equality with an arbitrar"...
method_declaration (+183 nodes collapsed)
block_comment "/**\r\n * Returns a clone of this dataset.\r\n * \r\n "...
method_declaration (+121 nodes collapsed)
block_comment "/**\r\n * Tests two double[][] arrays for equality.\r\n "...
method_declaration (+153 nodes collapsed)
block_comment "/**\r\n * Clones a two dimensional array of <code>Number</"...
method_declaration (+173 nodes collapsed)
} "}"