This mapping has 1 multi-map group: several pairings are equally correct there. The code view shows one arbitrary valid pairing, not the only one.

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–1406 unchanged (1406 lines)
1407 || chars[i] == 'F')) {
1408 return foundDigit;
1409 }
1410 if (chars[i] == 'l'
1411 || chars[i] == 'L') {
1412 // not allowing L with an exponent or decimal point
1413 return foundDigit && !hasExp;
1414 }
1415 // last character is illegal
1416 return false;
1417 }
1418 // allowSigns is true iff the val ends in 'E'
1419 // found digit it to make sure weird stuff like '.' and '1E-' doesn't pass
…lines 1420–1424 unchanged (5 lines)

After

…lines 1–1406 unchanged (1406 lines)
1407 || chars[i] == 'F')) {
1408 return foundDigit;
1409 }
1410 if (chars[i] == 'l'
1411 || chars[i] == 'L') {
1412 // not allowing L with an exponent or decimal point
1413 return foundDigit && !hasExp && !hasDecPoint;
1414 }
1415 // last character is illegal
1416 return false;
1417 }
1418 // allowSigns is true iff the val ends in 'E'
1419 // found digit it to make sure weird stuff like '.' and '1E-' doesn't pass
…lines 1420–1424 unchanged (5 lines)

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "lang3"
. "."
identifier "math"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "math"
. "."
identifier "BigDecimal"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "math"
. "."
identifier "BigInteger"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "lang3"
. "."
identifier "StringUtils"
; ";"
block_comment "/**\n * <p>Provides extra functionality for Java Number class"...
class_declaration
modifiers
public "public"
class "class"
identifier "NumberUtils"
class_body
{ "{"
block_comment "/** Reusable Long constant for zero. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Long"
variable_declarator
identifier "LONG_ZERO"
= "="
object_creation_expression
new "new"
type_identifier "Long"
argument_list
( "("
decimal_integer_literal "0L"
) ")"
; ";"
block_comment "/** Reusable Long constant for one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Long"
variable_declarator
identifier "LONG_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Long"
argument_list
( "("
decimal_integer_literal "1L"
) ")"
; ";"
block_comment "/** Reusable Long constant for minus one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Long"
variable_declarator
identifier "LONG_MINUS_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Long"
argument_list
( "("
unary_expression
- "-"
decimal_integer_literal "1L"
) ")"
; ";"
block_comment "/** Reusable Integer constant for zero. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Integer"
variable_declarator
identifier "INTEGER_ZERO"
= "="
object_creation_expression
new "new"
type_identifier "Integer"
argument_list
( "("
decimal_integer_literal "0"
) ")"
; ";"
block_comment "/** Reusable Integer constant for one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Integer"
variable_declarator
identifier "INTEGER_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Integer"
argument_list
( "("
decimal_integer_literal "1"
) ")"
; ";"
block_comment "/** Reusable Integer constant for minus one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Integer"
variable_declarator
identifier "INTEGER_MINUS_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Integer"
argument_list
( "("
unary_expression
- "-"
decimal_integer_literal "1"
) ")"
; ";"
block_comment "/** Reusable Short constant for zero. */"
field_declaration (+22 nodes collapsed)
block_comment "/** Reusable Short constant for one. */"
field_declaration (+22 nodes collapsed)
block_comment "/** Reusable Short constant for minus one. */"
field_declaration (+24 nodes collapsed)
block_comment "/** Reusable Byte constant for zero. */"
field_declaration (+23 nodes collapsed)
block_comment "/** Reusable Byte constant for one. */"
field_declaration (+23 nodes collapsed)
block_comment "/** Reusable Byte constant for minus one. */"
field_declaration (+25 nodes collapsed)
block_comment "/** Reusable Double constant for zero. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Double"
variable_declarator
identifier "DOUBLE_ZERO"
= "="
object_creation_expression
new "new"
type_identifier "Double"
argument_list
( "("
decimal_floating_point_literal "0.0d"
) ")"
; ";"
block_comment "/** Reusable Double constant for one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Double"
variable_declarator
identifier "DOUBLE_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Double"
argument_list
( "("
decimal_floating_point_literal "1.0d"
) ")"
; ";"
block_comment "/** Reusable Double constant for minus one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Double"
variable_declarator
identifier "DOUBLE_MINUS_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Double"
argument_list
( "("
unary_expression
- "-"
decimal_floating_point_literal "1.0d"
) ")"
; ";"
block_comment "/** Reusable Float constant for zero. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Float"
variable_declarator
identifier "FLOAT_ZERO"
= "="
object_creation_expression
new "new"
type_identifier "Float"
argument_list
( "("
decimal_floating_point_literal "0.0f"
) ")"
; ";"
block_comment "/** Reusable Float constant for one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Float"
variable_declarator
identifier "FLOAT_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Float"
argument_list
( "("
decimal_floating_point_literal "1.0f"
) ")"
; ";"
block_comment "/** Reusable Float constant for minus one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Float"
variable_declarator
identifier "FLOAT_MINUS_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Float"
argument_list
( "("
unary_expression
- "-"
decimal_floating_point_literal "1.0f"
) ")"
; ";"
block_comment "/**\n * <p><code>NumberUtils</code> instances should NOT "...
constructor_declaration
modifiers
public "public"
identifier "NumberUtils"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
) ")"
; ";"
} "}"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Convert a <code>String</code> to an <code>int<"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to an <code>int<"...
method_declaration (+68 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>long<"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>long<"...
method_declaration (+68 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>float"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>float"...
method_declaration (+68 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>doubl"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>doubl"...
method_declaration (+68 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>byte<"...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>byte<"...
method_declaration (+68 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>short"...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to an <code>shor"...
method_declaration (+68 nodes collapsed)
line_comment "//----------------------------------------------------------"...
line_comment "// must handle Long, Float, Integer, Float, Short,"
line_comment "// BigDecimal, BigInteger and Byte"
line_comment "// useful methods:"
line_comment "// Byte.decode(String)"
line_comment "// Byte.valueOf(String,int radix)"
line_comment "// Byte.valueOf(String)"
line_comment "// Double.valueOf(String)"
line_comment "// Float.valueOf(String)"
line_comment "// new Float(String)"
line_comment "// Integer.valueOf(String,int radix)"
line_comment "// Integer.valueOf(String)"
line_comment "// Integer.decode(String)"
line_comment "// Integer.getInteger(String)"
line_comment "// Integer.getInteger(String,int val)"
line_comment "// Integer.getInteger(String,Integer val)"
line_comment "// new Integer(String)"
line_comment "// new Double(String)"
line_comment "// new Byte(String)"
line_comment "// new Long(String)"
line_comment "// Long.getLong(String)"
line_comment "// Long.getLong(String,int)"
line_comment "// Long.getLong(String,Integer)"
line_comment "// Long.valueOf(String,int)"
line_comment "// Long.valueOf(String)"
line_comment "// new Short(String)"
line_comment "// Short.decode(String)"
line_comment "// Short.valueOf(String,int)"
line_comment "// Short.valueOf(String)"
line_comment "// new BigDecimal(String)"
line_comment "// new BigInteger(String)"
line_comment "// new BigInteger(String,int radix)"
line_comment "// Possible inputs:"
line_comment "// 45 45.5 45E7 4.5E7 Hex Oct Binary xxxF xxxD xxxf xxxd"
line_comment "// plus minus everything. Prolly more. A lot are not separab"...
block_comment "/**\n * <p>Turns a string value into a java.lang.Number.<"...
method_declaration (+1229 nodes collapsed)
block_comment "/**\n * <p>Utility method for {@link #createNumber(java.l"...
method_declaration (+99 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>Float"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>Doubl"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>Integ"...
method_declaration (+43 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>Long<"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>BigIn"...
method_declaration (+41 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>BigDe"...
method_declaration (+71 nodes collapsed)
line_comment "// Min in array"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+172 nodes collapsed)
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+172 nodes collapsed)
line_comment "// Max in array"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+172 nodes collapsed)
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+172 nodes collapsed)
line_comment "// 3 param min"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Gets the minimum of three <code>long</code> va"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the minimum of three <code>int</code> val"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the minimum of three <code>short</code> v"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the minimum of three <code>byte</code> va"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the minimum of three <code>double</code> "...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * <p>Gets the minimum of three <code>float</code> v"...
method_declaration (+49 nodes collapsed)
line_comment "// 3 param max"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Gets the maximum of three <code>long</code> va"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the maximum of three <code>int</code> val"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the maximum of three <code>short</code> v"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the maximum of three <code>byte</code> va"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the maximum of three <code>double</code> "...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * <p>Gets the maximum of three <code>float</code> v"...
method_declaration (+49 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Checks whether the <code>String</code> contain"...
method_declaration (+97 nodes collapsed)
block_comment "/**\n * <p>Checks whether the String a valid Java number."...
method_declaration
modifiers
public "public"
static "static"
boolean_type "boolean"
identifier "isNumber"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "str"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "StringUtils"
. "."
identifier "isEmpty"
argument_list
( "("
identifier "str"
) ")"
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
local_variable_declaration
array_type
integral_type
char "char"
dimensions
[ "["
] "]"
variable_declarator
identifier "chars"
= "="
method_invocation
identifier "str"
. "."
identifier "toCharArray"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "sz"
= "="
field_access
identifier "chars"
. "."
identifier "length"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "hasExp"
= "="
false "false"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "hasDecPoint"
= "="
false "false"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "allowSigns"
= "="
false "false"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "foundDigit"
= "="
false "false"
; ";"
line_comment "// deal with any possible sign up front"
local_variable_declaration (+23 nodes collapsed)
if_statement (+175 nodes collapsed)
expression_statement
update_expression
identifier "sz"
-- "--"
; ";"
line_comment "// don't want to loop to the last char, check it afterwords"
line_comment "// for type qualifiers"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "i"
= "="
identifier "start"
; ";"
line_comment "// loop to the next to last char or to the last char if we n"...
line_comment "// make a valid number (e.g. chars[0..5] = \"1234E\")"
while_statement (+247 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "i"
< "<"
field_access
identifier "chars"
. "."
identifier "length"
) ")"
block
{ "{"
if_statement (+31 nodes collapsed)
if_statement (+31 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+58 nodes collapsed)
if_statement
if "if"
parenthesized_expression (+21 nodes collapsed)
block
{ "{"
line_comment "// not allowing L with an exponent or decimal point"
return_statement
return "return"
binary_expression any 1:2
identifier "foundDigit"
&& "&&"
unary_expression
! "!"
identifier "hasExp"
; ";"
} "}"
line_comment "// last character is illegal"
return_statement
return "return"
false "false"
; ";"
} "}"
line_comment "// allowSigns is true iff the val ends in 'E'"
line_comment "// found digit it to make sure weird stuff like '.' and '1E-"...
return_statement
return "return"
binary_expression
unary_expression
! "!"
identifier "allowSigns"
&& "&&"
identifier "foundDigit"
; ";"
} "}"
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "lang3"
. "."
identifier "math"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "math"
. "."
identifier "BigDecimal"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "math"
. "."
identifier "BigInteger"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "lang3"
. "."
identifier "StringUtils"
; ";"
block_comment "/**\n * <p>Provides extra functionality for Java Number class"...
class_declaration
modifiers
public "public"
class "class"
identifier "NumberUtils"
class_body
{ "{"
block_comment "/** Reusable Long constant for zero. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Long"
variable_declarator
identifier "LONG_ZERO"
= "="
object_creation_expression
new "new"
type_identifier "Long"
argument_list
( "("
decimal_integer_literal "0L"
) ")"
; ";"
block_comment "/** Reusable Long constant for one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Long"
variable_declarator
identifier "LONG_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Long"
argument_list
( "("
decimal_integer_literal "1L"
) ")"
; ";"
block_comment "/** Reusable Long constant for minus one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Long"
variable_declarator
identifier "LONG_MINUS_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Long"
argument_list
( "("
unary_expression
- "-"
decimal_integer_literal "1L"
) ")"
; ";"
block_comment "/** Reusable Integer constant for zero. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Integer"
variable_declarator
identifier "INTEGER_ZERO"
= "="
object_creation_expression
new "new"
type_identifier "Integer"
argument_list
( "("
decimal_integer_literal "0"
) ")"
; ";"
block_comment "/** Reusable Integer constant for one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Integer"
variable_declarator
identifier "INTEGER_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Integer"
argument_list
( "("
decimal_integer_literal "1"
) ")"
; ";"
block_comment "/** Reusable Integer constant for minus one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Integer"
variable_declarator
identifier "INTEGER_MINUS_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Integer"
argument_list
( "("
unary_expression
- "-"
decimal_integer_literal "1"
) ")"
; ";"
block_comment "/** Reusable Short constant for zero. */"
field_declaration (+22 nodes collapsed)
block_comment "/** Reusable Short constant for one. */"
field_declaration (+22 nodes collapsed)
block_comment "/** Reusable Short constant for minus one. */"
field_declaration (+24 nodes collapsed)
block_comment "/** Reusable Byte constant for zero. */"
field_declaration (+23 nodes collapsed)
block_comment "/** Reusable Byte constant for one. */"
field_declaration (+23 nodes collapsed)
block_comment "/** Reusable Byte constant for minus one. */"
field_declaration (+25 nodes collapsed)
block_comment "/** Reusable Double constant for zero. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Double"
variable_declarator
identifier "DOUBLE_ZERO"
= "="
object_creation_expression
new "new"
type_identifier "Double"
argument_list
( "("
decimal_floating_point_literal "0.0d"
) ")"
; ";"
block_comment "/** Reusable Double constant for one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Double"
variable_declarator
identifier "DOUBLE_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Double"
argument_list
( "("
decimal_floating_point_literal "1.0d"
) ")"
; ";"
block_comment "/** Reusable Double constant for minus one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Double"
variable_declarator
identifier "DOUBLE_MINUS_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Double"
argument_list
( "("
unary_expression
- "-"
decimal_floating_point_literal "1.0d"
) ")"
; ";"
block_comment "/** Reusable Float constant for zero. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Float"
variable_declarator
identifier "FLOAT_ZERO"
= "="
object_creation_expression
new "new"
type_identifier "Float"
argument_list
( "("
decimal_floating_point_literal "0.0f"
) ")"
; ";"
block_comment "/** Reusable Float constant for one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Float"
variable_declarator
identifier "FLOAT_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Float"
argument_list
( "("
decimal_floating_point_literal "1.0f"
) ")"
; ";"
block_comment "/** Reusable Float constant for minus one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Float"
variable_declarator
identifier "FLOAT_MINUS_ONE"
= "="
object_creation_expression
new "new"
type_identifier "Float"
argument_list
( "("
unary_expression
- "-"
decimal_floating_point_literal "1.0f"
) ")"
; ";"
block_comment "/**\n * <p><code>NumberUtils</code> instances should NOT "...
constructor_declaration
modifiers
public "public"
identifier "NumberUtils"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
) ")"
; ";"
} "}"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Convert a <code>String</code> to an <code>int<"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to an <code>int<"...
method_declaration (+68 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>long<"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>long<"...
method_declaration (+68 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>float"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>float"...
method_declaration (+68 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>doubl"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>doubl"...
method_declaration (+68 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>byte<"...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>byte<"...
method_declaration (+68 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>short"...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to an <code>shor"...
method_declaration (+68 nodes collapsed)
line_comment "//----------------------------------------------------------"...
line_comment "// must handle Long, Float, Integer, Float, Short,"
line_comment "// BigDecimal, BigInteger and Byte"
line_comment "// useful methods:"
line_comment "// Byte.decode(String)"
line_comment "// Byte.valueOf(String,int radix)"
line_comment "// Byte.valueOf(String)"
line_comment "// Double.valueOf(String)"
line_comment "// Float.valueOf(String)"
line_comment "// new Float(String)"
line_comment "// Integer.valueOf(String,int radix)"
line_comment "// Integer.valueOf(String)"
line_comment "// Integer.decode(String)"
line_comment "// Integer.getInteger(String)"
line_comment "// Integer.getInteger(String,int val)"
line_comment "// Integer.getInteger(String,Integer val)"
line_comment "// new Integer(String)"
line_comment "// new Double(String)"
line_comment "// new Byte(String)"
line_comment "// new Long(String)"
line_comment "// Long.getLong(String)"
line_comment "// Long.getLong(String,int)"
line_comment "// Long.getLong(String,Integer)"
line_comment "// Long.valueOf(String,int)"
line_comment "// Long.valueOf(String)"
line_comment "// new Short(String)"
line_comment "// Short.decode(String)"
line_comment "// Short.valueOf(String,int)"
line_comment "// Short.valueOf(String)"
line_comment "// new BigDecimal(String)"
line_comment "// new BigInteger(String)"
line_comment "// new BigInteger(String,int radix)"
line_comment "// Possible inputs:"
line_comment "// 45 45.5 45E7 4.5E7 Hex Oct Binary xxxF xxxD xxxf xxxd"
line_comment "// plus minus everything. Prolly more. A lot are not separab"...
block_comment "/**\n * <p>Turns a string value into a java.lang.Number.<"...
method_declaration (+1229 nodes collapsed)
block_comment "/**\n * <p>Utility method for {@link #createNumber(java.l"...
method_declaration (+99 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>Float"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>Doubl"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>Integ"...
method_declaration (+43 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>Long<"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>BigIn"...
method_declaration (+41 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>BigDe"...
method_declaration (+71 nodes collapsed)
line_comment "// Min in array"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+172 nodes collapsed)
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+172 nodes collapsed)
line_comment "// Max in array"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+172 nodes collapsed)
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+172 nodes collapsed)
line_comment "// 3 param min"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Gets the minimum of three <code>long</code> va"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the minimum of three <code>int</code> val"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the minimum of three <code>short</code> v"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the minimum of three <code>byte</code> va"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the minimum of three <code>double</code> "...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * <p>Gets the minimum of three <code>float</code> v"...
method_declaration (+49 nodes collapsed)
line_comment "// 3 param max"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Gets the maximum of three <code>long</code> va"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the maximum of three <code>int</code> val"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the maximum of three <code>short</code> v"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the maximum of three <code>byte</code> va"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the maximum of three <code>double</code> "...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * <p>Gets the maximum of three <code>float</code> v"...
method_declaration (+49 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Checks whether the <code>String</code> contain"...
method_declaration (+97 nodes collapsed)
block_comment "/**\n * <p>Checks whether the String a valid Java number."...
method_declaration
modifiers
public "public"
static "static"
boolean_type "boolean"
identifier "isNumber"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "str"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "StringUtils"
. "."
identifier "isEmpty"
argument_list
( "("
identifier "str"
) ")"
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
local_variable_declaration
array_type
integral_type
char "char"
dimensions
[ "["
] "]"
variable_declarator
identifier "chars"
= "="
method_invocation
identifier "str"
. "."
identifier "toCharArray"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "sz"
= "="
field_access
identifier "chars"
. "."
identifier "length"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "hasExp"
= "="
false "false"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "hasDecPoint"
= "="
false "false"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "allowSigns"
= "="
false "false"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "foundDigit"
= "="
false "false"
; ";"
line_comment "// deal with any possible sign up front"
local_variable_declaration (+23 nodes collapsed)
if_statement (+175 nodes collapsed)
expression_statement
update_expression
identifier "sz"
-- "--"
; ";"
line_comment "// don't want to loop to the last char, check it afterwords"
line_comment "// for type qualifiers"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "i"
= "="
identifier "start"
; ";"
line_comment "// loop to the next to last char or to the last char if we n"...
line_comment "// make a valid number (e.g. chars[0..5] = \"1234E\")"
while_statement (+247 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "i"
< "<"
field_access
identifier "chars"
. "."
identifier "length"
) ")"
block
{ "{"
if_statement (+31 nodes collapsed)
if_statement (+31 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+58 nodes collapsed)
if_statement
if "if"
parenthesized_expression (+21 nodes collapsed)
block
{ "{"
line_comment "// not allowing L with an exponent or decimal point"
return_statement
return "return"
binary_expression any 1:2
binary_expression any 1:2
identifier "foundDigit"
&& "&&"
unary_expression
! "!"
identifier "hasExp"
&& "&&"
unary_expression
! "!"
identifier "hasDecPoint"
; ";"
} "}"
line_comment "// last character is illegal"
return_statement
return "return"
false "false"
; ";"
} "}"
line_comment "// allowSigns is true iff the val ends in 'E'"
line_comment "// found digit it to make sure weird stuff like '.' and '1E-"...
return_statement
return "return"
binary_expression
unary_expression
! "!"
identifier "allowSigns"
&& "&&"
identifier "foundDigit"
; ";"
} "}"
} "}"