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–590 unchanged (590 lines)
591 * fraction as the numerator divided by denominator multiplied by 100.
592 * </p>
593 *
594 * @return the fraction percentage as a <tt>double</tt>.
595 */
596 public double percentageValue() {
597 return multiply(100).doubleValue();
598 }
599
600 /**
601 * <p>Creates a {@code Fraction} instance with the 2 parts
602 * of a fraction Y/Z.</p>
603 *
…lines 604–667 unchanged (64 lines)

After

…lines 1–590 unchanged (590 lines)
591 * fraction as the numerator divided by denominator multiplied by 100.
592 * </p>
593 *
594 * @return the fraction percentage as a <tt>double</tt>.
595 */
596 public double percentageValue() {
597 return 100 * doubleValue();
598 }
599
600 /**
601 * <p>Creates a {@code Fraction} instance with the 2 parts
602 * of a fraction Y/Z.</p>
603 *
…lines 604–667 unchanged (64 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 "math3"
. "."
identifier "fraction"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Serializable"
; ";"
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 "math3"
. "."
identifier "FieldElement"
; ";"
import_declaration (+22 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 "exception"
. "."
identifier "MathArithmeticException"
; ";"
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 "NullArgumentException"
; ";"
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 "ArithmeticUtils"
; ";"
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 "/**\n * Representation of a rational number.\n *\n * implements"...
class_declaration
modifiers
public "public"
class "class"
identifier "Fraction"
superclass
extends "extends"
type_identifier "Number"
super_interfaces
implements "implements"
type_list
generic_type
type_identifier "FieldElement"
type_arguments
< "<"
type_identifier "Fraction"
> ">"
, ","
generic_type
type_identifier "Comparable"
type_arguments
< "<"
type_identifier "Fraction"
> ">"
, ","
type_identifier "Serializable"
class_body
{ "{"
block_comment "/** A fraction representing \"2 / 1\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "TWO"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "2"
, ","
decimal_integer_literal "1"
) ")"
; ";"
block_comment "/** A fraction representing \"1\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "ONE"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "1"
, ","
decimal_integer_literal "1"
) ")"
; ";"
block_comment "/** A fraction representing \"0\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "ZERO"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "0"
, ","
decimal_integer_literal "1"
) ")"
; ";"
block_comment "/** A fraction representing \"4/5\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "FOUR_FIFTHS"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "4"
, ","
decimal_integer_literal "5"
) ")"
; ";"
block_comment "/** A fraction representing \"1/5\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "ONE_FIFTH"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "1"
, ","
decimal_integer_literal "5"
) ")"
; ";"
block_comment "/** A fraction representing \"1/2\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "ONE_HALF"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "1"
, ","
decimal_integer_literal "2"
) ")"
; ";"
block_comment "/** A fraction representing \"1/4\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "ONE_QUARTER"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "1"
, ","
decimal_integer_literal "4"
) ")"
; ";"
block_comment "/** A fraction representing \"1/3\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "ONE_THIRD"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "1"
, ","
decimal_integer_literal "3"
) ")"
; ";"
block_comment "/** A fraction representing \"3/5\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "THREE_FIFTHS"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "3"
, ","
decimal_integer_literal "5"
) ")"
; ";"
block_comment "/** A fraction representing \"3/4\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "THREE_QUARTERS"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "3"
, ","
decimal_integer_literal "4"
) ")"
; ";"
block_comment "/** A fraction representing \"2/5\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "TWO_FIFTHS"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "2"
, ","
decimal_integer_literal "5"
) ")"
; ";"
block_comment "/** A fraction representing \"2/4\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "TWO_QUARTERS"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "2"
, ","
decimal_integer_literal "4"
) ")"
; ";"
block_comment "/** A fraction representing \"2/3\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "TWO_THIRDS"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "2"
, ","
decimal_integer_literal "3"
) ")"
; ";"
block_comment "/** A fraction representing \"-1 / 1\". */"
field_declaration (+21 nodes collapsed)
block_comment "/** Serializable version identifier */"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "3698073679419233275L"
; ";"
block_comment "/** The denominator. */"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "denominator"
; ";"
block_comment "/** The numerator. */"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "numerator"
; ";"
block_comment "/**\n * Create a fraction given the double value.\n * "...
constructor_declaration (+28 nodes collapsed)
block_comment "/**\n * Create a fraction given the double value and maxi"...
constructor_declaration (+43 nodes collapsed)
block_comment "/**\n * Create a fraction given the double value and maxi"...
constructor_declaration (+35 nodes collapsed)
block_comment "/**\n * Create a fraction given the double value and eith"...
constructor_declaration (+530 nodes collapsed)
block_comment "/**\n * Create a fraction from an int.\n * The fractio"...
constructor_declaration (+23 nodes collapsed)
block_comment "/**\n * Create a fraction given the numerator and denomin"...
constructor_declaration (+208 nodes collapsed)
block_comment "/**\n * Returns the absolute value of this fraction.\n "...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * Compares this object to another based on size.\n "...
method_declaration (+92 nodes collapsed)
block_comment "/**\n * Gets the fraction as a <tt>double</tt>. This calc"...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * Test for the equality of two fractions. If the l"...
method_declaration (+87 nodes collapsed)
block_comment "/**\n * Gets the fraction as a <tt>float</tt>. This calcu"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Access the denominator.\n * @return the denomi"...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getDenominator"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "denominator"
; ";"
} "}"
block_comment "/**\n * Access the numerator.\n * @return the numerato"...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getNumerator"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "numerator"
; ";"
} "}"
block_comment "/**\n * Gets a hashCode for the fraction.\n * @return "...
method_declaration (+34 nodes collapsed)
block_comment "/**\n * Gets the fraction as an <tt>int</tt>. This return"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Gets the fraction as a <tt>long</tt>. This return"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Return the additive inverse of this fraction.\n "...
method_declaration (+57 nodes collapsed)
block_comment "/**\n * Return the multiplicative inverse of this fractio"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * <p>Adds the value of this fraction to another, re"...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Add an integer to the fraction.\n * @param i t"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * <p>Subtracts the value of another fraction from t"...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Subtract an integer from the fraction.\n * @pa"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Implement add and subtract using algorithm descri"...
method_declaration (+458 nodes collapsed)
block_comment "/**\n * <p>Multiplies the value of this fraction by anoth"...
method_declaration (+153 nodes collapsed)
block_comment "/**\n * Multiply the fraction by an integer.\n * @para"...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>Divide the value of this fraction by another.<"...
method_declaration (+92 nodes collapsed)
block_comment "/**\n * Divide the fraction by an integer.\n * @param "...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>\n * Gets the fraction percentage as a <tt>"...
method_declaration
modifiers
public "public"
floating_point_type
double "double"
identifier "percentageValue"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
method_invocation
identifier "multiply"
argument_list
( "("
decimal_integer_literal "100"
) ")"
. "."
identifier "doubleValue"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/**\n * <p>Creates a {@code Fraction} instance with the 2"...
method_declaration (+218 nodes collapsed)
block_comment "/**\n * <p>\n * Returns the {@code String} representin"...
method_declaration (+91 nodes collapsed)
block_comment "/** {@inheritDoc} */"
method_declaration (+21 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
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "fraction"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Serializable"
; ";"
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 "math3"
. "."
identifier "FieldElement"
; ";"
import_declaration (+22 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 "exception"
. "."
identifier "MathArithmeticException"
; ";"
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 "NullArgumentException"
; ";"
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 "ArithmeticUtils"
; ";"
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 "/**\n * Representation of a rational number.\n *\n * implements"...
class_declaration
modifiers
public "public"
class "class"
identifier "Fraction"
superclass
extends "extends"
type_identifier "Number"
super_interfaces
implements "implements"
type_list
generic_type
type_identifier "FieldElement"
type_arguments
< "<"
type_identifier "Fraction"
> ">"
, ","
generic_type
type_identifier "Comparable"
type_arguments
< "<"
type_identifier "Fraction"
> ">"
, ","
type_identifier "Serializable"
class_body
{ "{"
block_comment "/** A fraction representing \"2 / 1\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "TWO"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "2"
, ","
decimal_integer_literal "1"
) ")"
; ";"
block_comment "/** A fraction representing \"1\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "ONE"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "1"
, ","
decimal_integer_literal "1"
) ")"
; ";"
block_comment "/** A fraction representing \"0\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "ZERO"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "0"
, ","
decimal_integer_literal "1"
) ")"
; ";"
block_comment "/** A fraction representing \"4/5\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "FOUR_FIFTHS"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "4"
, ","
decimal_integer_literal "5"
) ")"
; ";"
block_comment "/** A fraction representing \"1/5\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "ONE_FIFTH"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "1"
, ","
decimal_integer_literal "5"
) ")"
; ";"
block_comment "/** A fraction representing \"1/2\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "ONE_HALF"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "1"
, ","
decimal_integer_literal "2"
) ")"
; ";"
block_comment "/** A fraction representing \"1/4\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "ONE_QUARTER"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "1"
, ","
decimal_integer_literal "4"
) ")"
; ";"
block_comment "/** A fraction representing \"1/3\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "ONE_THIRD"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "1"
, ","
decimal_integer_literal "3"
) ")"
; ";"
block_comment "/** A fraction representing \"3/5\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "THREE_FIFTHS"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "3"
, ","
decimal_integer_literal "5"
) ")"
; ";"
block_comment "/** A fraction representing \"3/4\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "THREE_QUARTERS"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "3"
, ","
decimal_integer_literal "4"
) ")"
; ";"
block_comment "/** A fraction representing \"2/5\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "TWO_FIFTHS"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "2"
, ","
decimal_integer_literal "5"
) ")"
; ";"
block_comment "/** A fraction representing \"2/4\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "TWO_QUARTERS"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "2"
, ","
decimal_integer_literal "4"
) ")"
; ";"
block_comment "/** A fraction representing \"2/3\". */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Fraction"
variable_declarator
identifier "TWO_THIRDS"
= "="
object_creation_expression
new "new"
type_identifier "Fraction"
argument_list
( "("
decimal_integer_literal "2"
, ","
decimal_integer_literal "3"
) ")"
; ";"
block_comment "/** A fraction representing \"-1 / 1\". */"
field_declaration (+21 nodes collapsed)
block_comment "/** Serializable version identifier */"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "3698073679419233275L"
; ";"
block_comment "/** The denominator. */"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "denominator"
; ";"
block_comment "/** The numerator. */"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "numerator"
; ";"
block_comment "/**\n * Create a fraction given the double value.\n * "...
constructor_declaration (+28 nodes collapsed)
block_comment "/**\n * Create a fraction given the double value and maxi"...
constructor_declaration (+43 nodes collapsed)
block_comment "/**\n * Create a fraction given the double value and maxi"...
constructor_declaration (+35 nodes collapsed)
block_comment "/**\n * Create a fraction given the double value and eith"...
constructor_declaration (+530 nodes collapsed)
block_comment "/**\n * Create a fraction from an int.\n * The fractio"...
constructor_declaration (+23 nodes collapsed)
block_comment "/**\n * Create a fraction given the numerator and denomin"...
constructor_declaration (+208 nodes collapsed)
block_comment "/**\n * Returns the absolute value of this fraction.\n "...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * Compares this object to another based on size.\n "...
method_declaration (+92 nodes collapsed)
block_comment "/**\n * Gets the fraction as a <tt>double</tt>. This calc"...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * Test for the equality of two fractions. If the l"...
method_declaration (+87 nodes collapsed)
block_comment "/**\n * Gets the fraction as a <tt>float</tt>. This calcu"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Access the denominator.\n * @return the denomi"...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getDenominator"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "denominator"
; ";"
} "}"
block_comment "/**\n * Access the numerator.\n * @return the numerato"...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getNumerator"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "numerator"
; ";"
} "}"
block_comment "/**\n * Gets a hashCode for the fraction.\n * @return "...
method_declaration (+34 nodes collapsed)
block_comment "/**\n * Gets the fraction as an <tt>int</tt>. This return"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Gets the fraction as a <tt>long</tt>. This return"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Return the additive inverse of this fraction.\n "...
method_declaration (+57 nodes collapsed)
block_comment "/**\n * Return the multiplicative inverse of this fractio"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * <p>Adds the value of this fraction to another, re"...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Add an integer to the fraction.\n * @param i t"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * <p>Subtracts the value of another fraction from t"...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Subtract an integer from the fraction.\n * @pa"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Implement add and subtract using algorithm descri"...
method_declaration (+458 nodes collapsed)
block_comment "/**\n * <p>Multiplies the value of this fraction by anoth"...
method_declaration (+153 nodes collapsed)
block_comment "/**\n * Multiply the fraction by an integer.\n * @para"...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>Divide the value of this fraction by another.<"...
method_declaration (+92 nodes collapsed)
block_comment "/**\n * Divide the fraction by an integer.\n * @param "...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>\n * Gets the fraction percentage as a <tt>"...
method_declaration
modifiers
public "public"
floating_point_type
double "double"
identifier "percentageValue"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
decimal_integer_literal "100"
* "*"
method_invocation
identifier "doubleValue"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/**\n * <p>Creates a {@code Fraction} instance with the 2"...
method_declaration (+218 nodes collapsed)
block_comment "/**\n * <p>\n * Returns the {@code String} representin"...
method_declaration (+91 nodes collapsed)
block_comment "/** {@inheritDoc} */"
method_declaration (+21 nodes collapsed)
} "}"