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); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
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); |
| 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); |
| 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); |
| 2 | assertEquals("Left most point on the axis should be beginning of " + "range.", this.axis.getLowerBound(), this.axis.java2DToValue(plotArea.getX(), plotArea, edge), EPSILON); |
Row | Violation |
---|