assertEquals("Left most point on the axis should be beginning of " + "range.", plotArea.getX(), this.axis.valueToJava2D( this.axis.getLowerBound(), plotArea, edge), EPSILON); assertEquals("Right most point on the axis should be end of range.", plotArea.getX() + plotArea.getWidth(), this.axis.valueToJava2D(this.axis.getUpperBound(), plotArea, edge), EPSILON); assertEquals("Center point on the axis should geometric mean of the bounds.", plotArea.getX() + (plotArea.getWidth() / 2), this.axis.valueToJava2D(Math.sqrt(this.axis.getLowerBound() * this.axis.getUpperBound()), plotArea, edge), EPSILON);
assertEquals("Right most point on the axis should be end of range.", this.axis.getUpperBound(), this.axis.java2DToValue( plotArea.getX() + plotArea.getWidth(), plotArea, edge), EPSILON); assertEquals("Left most point on the axis should be beginning of " + "range.", this.axis.getLowerBound(), this.axis.java2DToValue(plotArea.getX(), plotArea, edge), EPSILON); assertEquals("Center point on the axis should geometric mean of the " + "bounds.", Math.sqrt(this.axis.getUpperBound() * this.axis.getLowerBound()), this.axis.java2DToValue( plotArea.getX() + (plotArea.getWidth() / 2), plotArea, edge), EPSILON);
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/chart/axis/junit/LogarithmicAxisTests.java File path: /jfreechart-1.0.10/tests/org/jfree/chart/axis/junit/LogarithmicAxisTests.java
Method name: void checkPointsToJava2D(RectangleEdge, Rectangle2D) Method name: void checkPointsToValue(RectangleEdge, Rectangle2D)
Number of AST nodes: 3 Number of AST nodes: 3
1
assertEquals("Left most point on the axis should be beginning of "
1
assertEquals("Right most point on the axis should be end of range.",
2
                  + "range.", plotArea.getX(), this.axis.valueToJava2D(
2
                 this.axis.getUpperBound(), this.axis.java2DToValue(
3
                  this.axis.getLowerBound(), plotArea, edge), 
3
                 plotArea.getX() + plotArea.getWidth(), plotArea, edge), 
4
EPSILON);
4
                 EPSILON);
5
 
6
         assertEquals("Right most point on the axis should be end of range.", 
5
         assertEquals("Left most point on the axis should be beginning of "
7
                  plotArea.getX() + plotArea.getWidth(), 
6
                 + "range.", this.axis.getLowerBound(), 
8
                  this.axis.valueToJava2D(this.axis.getUpperBound(), 
7
                 this.axis.java2DToValue(plotArea.getX(), plotArea, edge), 
9
                  plotArea, edge), EPSILON);
8
                 EPSILON);
10
 
11
         assertEquals("Center point on the axis should geometric mean of the bounds.", 
9
         assertEquals("Center point on the axis should geometric mean of the "
12
                  plotArea.getX() + (plotArea.getWidth() / 2), 
10
                 + "bounds.", Math.sqrt(this.axis.getUpperBound() 
13
                  this.axis.valueToJava2D(Math.sqrt(this.axis.getLowerBound() 
11
                 * this.axis.
14
                  * this.axis.getUpperBound()
12
getLowerBound()), this.axis.java2DToValue(
15
), plotArea, edge), 
13
                 plotArea.getX() + (plotArea.getWidth() / 2), plotArea, edge), 
16
EPSILON);
14
                 EPSILON);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons9
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    assertEquals("Left most point on the axis should be beginning of " + "range.", plotArea.getX(), this.axis.valueToJava2D(this.axis.getLowerBound(), plotArea, edge), EPSILON);
    1
    assertEquals("Left most point on the axis should be beginning of " + "range.", plotArea.getX(), this.axis.valueToJava2D(this.axis.getLowerBound(), plotArea, edge), EPSILON);
    3
    assertEquals("Center point on the axis should geometric mean of the " + "bounds.", Math.sqrt(this.axis.getUpperBound() * this.axis.getLowerBound()), this.axis.java2DToValue(plotArea.getX() + (plotArea.getWidth() / 2), plotArea, edge), EPSILON);
    Differences
    Expression1Expression2Difference
    "Left most point on the axis should be beginning of ""Center point on the axis should geometric mean of the "LITERAL_VALUE_MISMATCH
    "range.""bounds."LITERAL_VALUE_MISMATCH
    plotArea.getX()Math.sqrt(this.axis.getUpperBound() * this.axis.getLowerBound())TYPE_COMPATIBLE_REPLACEMENT
    this.axis.getLowerBound()plotArea.getX() + (plotArea.getWidth() / 2)TYPE_COMPATIBLE_REPLACEMENT
    valueToJava2Djava2DToValueMETHOD_INVOCATION_NAME_MISMATCH
    3
    assertEquals("Center point on the axis should geometric mean of the " + "bounds.", Math.sqrt(this.axis.getUpperBound() * this.axis.getLowerBound()), this.axis.java2DToValue(plotArea.getX() + (plotArea.getWidth() / 2), plotArea, edge), EPSILON);
    2
    assertEquals("Right most point on the axis should be end of range.", plotArea.getX() + plotArea.getWidth(), this.axis.valueToJava2D(this.axis.getUpperBound(), plotArea, edge), EPSILON);
    2
    assertEquals("Right most point on the axis should be end of range.", plotArea.getX() + plotArea.getWidth(), this.axis.valueToJava2D(this.axis.getUpperBound(), plotArea, edge), EPSILON);
    1
    assertEquals("Right most point on the axis should be end of range.", this.axis.getUpperBound(), this.axis.java2DToValue(plotArea.getX() + plotArea.getWidth(), plotArea, edge), EPSILON);
    Differences
    Expression1Expression2Difference
    plotArea.getX() + plotArea.getWidth()this.axis.getUpperBound()TYPE_COMPATIBLE_REPLACEMENT
    this.axis.getUpperBound()plotArea.getX() + plotArea.getWidth()TYPE_COMPATIBLE_REPLACEMENT
    valueToJava2Djava2DToValueMETHOD_INVOCATION_NAME_MISMATCH
    1
    assertEquals("Right most point on the axis should be end of range.", this.axis.getUpperBound(), this.axis.java2DToValue(plotArea.getX() + plotArea.getWidth(), plotArea, edge), EPSILON);
    3
    assertEquals("Center point on the axis should geometric mean of the bounds.", plotArea.getX() + (plotArea.getWidth() / 2), this.axis.valueToJava2D(Math.sqrt(this.axis.getLowerBound() * this.axis.getUpperBound()), plotArea, edge), EPSILON);
    3
    assertEquals("Center point on the axis should geometric mean of the bounds.", plotArea.getX() + (plotArea.getWidth() / 2), this.axis.valueToJava2D(Math.sqrt(this.axis.getLowerBound() * this.axis.getUpperBound()), plotArea, edge), EPSILON);
    2
    assertEquals("Left most point on the axis should be beginning of " + "range.", this.axis.getLowerBound(), this.axis.java2DToValue(plotArea.getX(), plotArea, edge), EPSILON);
    Differences
    Expression1Expression2Difference
    "Center point on the axis should geometric mean of the bounds.""Left most point on the axis should be beginning of " + "range."TYPE_COMPATIBLE_REPLACEMENT
    plotArea.getX() + (plotArea.getWidth() / 2)this.axis.getLowerBound()TYPE_COMPATIBLE_REPLACEMENT
    Math.sqrt(this.axis.getLowerBound() * this.axis.getUpperBound())plotArea.getX()TYPE_COMPATIBLE_REPLACEMENT
    valueToJava2Djava2DToValueMETHOD_INVOCATION_NAME_MISMATCH
    2
    assertEquals("Left most point on the axis should be beginning of " + "range.", this.axis.getLowerBound(), this.axis.java2DToValue(plotArea.getX(), plotArea, edge), EPSILON);
    Precondition Violations (0)
    Row Violation