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–675 unchanged (675 lines)
676 }
677 if (ch == 'Y') {
678 return
679 (str.charAt(1) == 'E' || str.charAt(1) == 'e') &&
680 (str.charAt(2) == 'S' || str.charAt(2) == 's');
681 }
682 }
683 case 4: {
684 char ch = str.charAt(0);
685 if (ch == 't') {
686 return
687 (str.charAt(1) == 'r' || str.charAt(1) == 'R') &&
688 (str.charAt(2) == 'u' || str.charAt(2) == 'U') &&
…lines 689–973 unchanged (285 lines)

After

…lines 1–675 unchanged (675 lines)
676 }
677 if (ch == 'Y') {
678 return
679 (str.charAt(1) == 'E' || str.charAt(1) == 'e') &&
680 (str.charAt(2) == 'S' || str.charAt(2) == 's');
681 }
682 return false;
683 }
684 case 4: {
685 char ch = str.charAt(0);
686 if (ch == 't') {
687 return
688 (str.charAt(1) == 'r' || str.charAt(1) == 'R') &&
…lines 689–974 unchanged (286 lines)

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "lang"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "lang"
. "."
identifier "math"
. "."
identifier "NumberUtils"
; ";"
block_comment "/**\n * <p>Operations on boolean primitives and Boolean objec"...
class_declaration
modifiers
public "public"
class "class"
identifier "BooleanUtils"
class_body
{ "{"
block_comment "/**\n * <p><code>BooleanUtils</code> instances should NOT"...
constructor_declaration
modifiers
public "public"
identifier "BooleanUtils"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
) ")"
; ";"
} "}"
line_comment "// Boolean utilities"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Negates the specified boolean.</p>\n * \n "...
method_declaration (+55 nodes collapsed)
line_comment "// boolean Boolean methods"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Checks if a <code>Boolean</code> value is <cod"...
method_declaration (+46 nodes collapsed)
block_comment "/**\n * <p>Checks if a <code>Boolean</code> value is <i>n"...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * <p>Checks if a <code>Boolean</code> value is <cod"...
method_declaration (+46 nodes collapsed)
block_comment "/**\n * <p>Checks if a <code>Boolean</code> value is <i>n"...
method_declaration (+26 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Boolean factory that avoids creating new Boole"...
method_declaration (+30 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to a boolean handling <code"...
method_declaration (+46 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to a boolean handling <code"...
method_declaration (+50 nodes collapsed)
line_comment "// Integer to Boolean methods"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Converts an int to a boolean using the convent"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * <p>Converts an int to a Boolean using the convent"...
method_declaration (+34 nodes collapsed)
block_comment "/**\n * <p>Converts an Integer to a Boolean using the con"...
method_declaration (+55 nodes collapsed)
block_comment "/**\n * <p>Converts an int to a boolean specifying the co"...
method_declaration (+73 nodes collapsed)
block_comment "/**\n * <p>Converts an Integer to a boolean specifying th"...
method_declaration (+124 nodes collapsed)
block_comment "/**\n * <p>Converts an int to a Boolean specifying the co"...
method_declaration (+101 nodes collapsed)
block_comment "/**\n * <p>Converts an Integer to a Boolean specifying th"...
method_declaration (+178 nodes collapsed)
line_comment "// Boolean to Integer methods"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Converts a boolean to an int using the convent"...
method_declaration (+25 nodes collapsed)
block_comment "/**\n * <p>Converts a boolean to an Integer using the con"...
method_declaration (+30 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to a Integer using the conv"...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * <p>Converts a boolean to an int specifying the co"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to an int specifying the co"...
method_declaration (+62 nodes collapsed)
block_comment "/**\n * <p>Converts a boolean to an Integer specifying th"...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to an Integer specifying th"...
method_declaration (+58 nodes collapsed)
line_comment "// String to Boolean methods"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Converts a String to a Boolean.</p>\n * \n "...
method_declaration (+181 nodes collapsed)
block_comment "/**\n * <p>Converts a String to a Boolean throwing an exc"...
method_declaration (+178 nodes collapsed)
line_comment "// String to boolean methods"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Converts a String to a boolean (optimised for "...
method_declaration
modifiers
public "public"
static "static"
boolean_type "boolean"
identifier "toBoolean"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "str"
) ")"
block
{ "{"
line_comment "// Previously used equalsIgnoreCase, which was fast for inte"...
line_comment "// Non interned 'true' matched 15 times slower."
line_comment "// "
line_comment "// Optimisation provides same performance as before for inte"...
line_comment "// Similar performance for null, 'false', and other strings "...
line_comment "// 'true'/'TRUE' match 4 times slower, 'tRUE'/'True' 7 times"...
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "str"
== "=="
string_literal
" "\""
string_fragment "true"
" "\""
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "str"
== "=="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
switch_expression
switch "switch"
parenthesized_expression
( "("
method_invocation
identifier "str"
. "."
identifier "length"
argument_list
( "("
) ")"
) ")"
switch_block
{ "{"
switch_block_statement_group (+69 nodes collapsed)
switch_block_statement_group
switch_label
case "case"
decimal_integer_literal "3"
: ":"
block
{ "{"
local_variable_declaration
integral_type
char "char"
variable_declarator
identifier "ch"
= "="
method_invocation
identifier "str"
. "."
identifier "charAt"
argument_list
( "("
decimal_integer_literal "0"
) ")"
; ";"
if_statement (+71 nodes collapsed)
if_statement (+71 nodes collapsed)
} "}"
switch_block_statement_group (+223 nodes collapsed)
} "}"
return_statement
return "return"
false "false"
; ";"
} "}"
line_comment "// public static void main(String[] args) {"
line_comment "// long start = System.currentTimeMillis();"
line_comment "// boolean flag = true;"
line_comment "// int count = 0;"
line_comment "// for (int i = 0; i < 100000000; i++) {"
line_comment "// flag = toBoolean(\"YES\");"
line_comment "// }"
line_comment "// long end = System.currentTimeMillis();"
line_comment "// System.out.println((end - start) + \" \" + flag + \" "...
line_comment "// }"
block_comment "/**\n * <p>Converts a String to a Boolean throwing an exc"...
method_declaration (+124 nodes collapsed)
line_comment "// Boolean to String methods"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Converts a Boolean to a String returning <code"...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to a String returning <code"...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to a String returning <code"...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to a String returning one o"...
method_declaration (+58 nodes collapsed)
line_comment "// boolean to String methods"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Converts a boolean to a String returning <code"...
method_declaration (+34 nodes collapsed)
block_comment "/**\n * <p>Converts a boolean to a String returning <code"...
method_declaration (+34 nodes collapsed)
block_comment "/**\n * <p>Converts a boolean to a String returning <code"...
method_declaration (+34 nodes collapsed)
block_comment "/**\n * <p>Converts a boolean to a String returning one o"...
method_declaration (+32 nodes collapsed)
line_comment "// xor methods"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Performs an xor on a set of booleans.</p>\n "...
method_declaration (+157 nodes collapsed)
block_comment "/**\n * <p>Performs an xor on an array of Booleans.</p>\n "...
method_declaration (+146 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "lang"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "lang"
. "."
identifier "math"
. "."
identifier "NumberUtils"
; ";"
block_comment "/**\n * <p>Operations on boolean primitives and Boolean objec"...
class_declaration
modifiers
public "public"
class "class"
identifier "BooleanUtils"
class_body
{ "{"
block_comment "/**\n * <p><code>BooleanUtils</code> instances should NOT"...
constructor_declaration
modifiers
public "public"
identifier "BooleanUtils"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
) ")"
; ";"
} "}"
line_comment "// Boolean utilities"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Negates the specified boolean.</p>\n * \n "...
method_declaration (+55 nodes collapsed)
line_comment "// boolean Boolean methods"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Checks if a <code>Boolean</code> value is <cod"...
method_declaration (+46 nodes collapsed)
block_comment "/**\n * <p>Checks if a <code>Boolean</code> value is <i>n"...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * <p>Checks if a <code>Boolean</code> value is <cod"...
method_declaration (+46 nodes collapsed)
block_comment "/**\n * <p>Checks if a <code>Boolean</code> value is <i>n"...
method_declaration (+26 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Boolean factory that avoids creating new Boole"...
method_declaration (+30 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to a boolean handling <code"...
method_declaration (+46 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to a boolean handling <code"...
method_declaration (+50 nodes collapsed)
line_comment "// Integer to Boolean methods"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Converts an int to a boolean using the convent"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * <p>Converts an int to a Boolean using the convent"...
method_declaration (+34 nodes collapsed)
block_comment "/**\n * <p>Converts an Integer to a Boolean using the con"...
method_declaration (+55 nodes collapsed)
block_comment "/**\n * <p>Converts an int to a boolean specifying the co"...
method_declaration (+73 nodes collapsed)
block_comment "/**\n * <p>Converts an Integer to a boolean specifying th"...
method_declaration (+124 nodes collapsed)
block_comment "/**\n * <p>Converts an int to a Boolean specifying the co"...
method_declaration (+101 nodes collapsed)
block_comment "/**\n * <p>Converts an Integer to a Boolean specifying th"...
method_declaration (+178 nodes collapsed)
line_comment "// Boolean to Integer methods"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Converts a boolean to an int using the convent"...
method_declaration (+25 nodes collapsed)
block_comment "/**\n * <p>Converts a boolean to an Integer using the con"...
method_declaration (+30 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to a Integer using the conv"...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * <p>Converts a boolean to an int specifying the co"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to an int specifying the co"...
method_declaration (+62 nodes collapsed)
block_comment "/**\n * <p>Converts a boolean to an Integer specifying th"...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to an Integer specifying th"...
method_declaration (+58 nodes collapsed)
line_comment "// String to Boolean methods"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Converts a String to a Boolean.</p>\n * \n "...
method_declaration (+181 nodes collapsed)
block_comment "/**\n * <p>Converts a String to a Boolean throwing an exc"...
method_declaration (+178 nodes collapsed)
line_comment "// String to boolean methods"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Converts a String to a boolean (optimised for "...
method_declaration
modifiers
public "public"
static "static"
boolean_type "boolean"
identifier "toBoolean"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "str"
) ")"
block
{ "{"
line_comment "// Previously used equalsIgnoreCase, which was fast for inte"...
line_comment "// Non interned 'true' matched 15 times slower."
line_comment "// "
line_comment "// Optimisation provides same performance as before for inte"...
line_comment "// Similar performance for null, 'false', and other strings "...
line_comment "// 'true'/'TRUE' match 4 times slower, 'tRUE'/'True' 7 times"...
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "str"
== "=="
string_literal
" "\""
string_fragment "true"
" "\""
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "str"
== "=="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
switch_expression
switch "switch"
parenthesized_expression
( "("
method_invocation
identifier "str"
. "."
identifier "length"
argument_list
( "("
) ")"
) ")"
switch_block
{ "{"
switch_block_statement_group (+69 nodes collapsed)
switch_block_statement_group
switch_label
case "case"
decimal_integer_literal "3"
: ":"
block
{ "{"
local_variable_declaration
integral_type
char "char"
variable_declarator
identifier "ch"
= "="
method_invocation
identifier "str"
. "."
identifier "charAt"
argument_list
( "("
decimal_integer_literal "0"
) ")"
; ";"
if_statement (+71 nodes collapsed)
if_statement (+71 nodes collapsed)
return_statement
return "return"
false "false"
; ";"
} "}"
switch_block_statement_group (+223 nodes collapsed)
} "}"
return_statement
return "return"
false "false"
; ";"
} "}"
line_comment "// public static void main(String[] args) {"
line_comment "// long start = System.currentTimeMillis();"
line_comment "// boolean flag = true;"
line_comment "// int count = 0;"
line_comment "// for (int i = 0; i < 100000000; i++) {"
line_comment "// flag = toBoolean(\"YES\");"
line_comment "// }"
line_comment "// long end = System.currentTimeMillis();"
line_comment "// System.out.println((end - start) + \" \" + flag + \" "...
line_comment "// }"
block_comment "/**\n * <p>Converts a String to a Boolean throwing an exc"...
method_declaration (+124 nodes collapsed)
line_comment "// Boolean to String methods"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Converts a Boolean to a String returning <code"...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to a String returning <code"...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to a String returning <code"...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * <p>Converts a Boolean to a String returning one o"...
method_declaration (+58 nodes collapsed)
line_comment "// boolean to String methods"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Converts a boolean to a String returning <code"...
method_declaration (+34 nodes collapsed)
block_comment "/**\n * <p>Converts a boolean to a String returning <code"...
method_declaration (+34 nodes collapsed)
block_comment "/**\n * <p>Converts a boolean to a String returning <code"...
method_declaration (+34 nodes collapsed)
block_comment "/**\n * <p>Converts a boolean to a String returning one o"...
method_declaration (+32 nodes collapsed)
line_comment "// xor methods"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Performs an xor on a set of booleans.</p>\n "...
method_declaration (+157 nodes collapsed)
block_comment "/**\n * <p>Performs an xor on an array of Booleans.</p>\n "...
method_declaration (+146 nodes collapsed)
} "}"