double tickLabelWidth
= estimateMaximumTickLabelWidth(g2, getTickUnit());
// Compute number of labels
double n = getRange().getLength()
* tickLabelWidth / dataArea.getWidth();
double tickLabelWidth
= estimateMaximumTickLabelWidth(g2, getTickUnit());
// Compute number of labels
double n = getRange().getLength()
* tickLabelWidth / dataArea.getHeight();
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CyclicNumberAxis.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CyclicNumberAxis.java
|
Method name: void selectHorizontalAutoTickUnit(Graphics2D, Rectangle2D, Rectangle2D, RectangleEdge)
|
|
Method name: void selectVerticalAutoTickUnit(Graphics2D, Rectangle2D, Rectangle2D, RectangleEdge)
|
Number of AST nodes: 2
|
|
Number of AST nodes: 2
|
|
1 | double tickLabelWidth ↵ | | 1 | double tickLabelWidth ↵
|
2 | = estimateMaximumTickLabelWidth(g2, getTickUnit());↵ | | 2 | = estimateMaximumTickLabelWidth(g2, getTickUnit());↵
|
3 | ↵ | | |
|
4 | // Compute number of labels↵ | | 3 | // Compute number of labels↵
|
5 | double n = getRange().getLength() ↵ | | 4 | double n = getRange().getLength() ↵
|
6 | * tickLabelWidth / dataArea.getWidth(); | | 5 | * tickLabelWidth / dataArea.getHeight();
|
See real code fragment |
|
See real code fragment |
Summary
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 | 4 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
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 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | double tickLabelWidth = estimateMaximumTickLabelWidth(g2, getTickUnit()); | | 1 | double tickLabelWidth = estimateMaximumTickLabelWidth(g2, getTickUnit()); |
2 | double n = getRange().getLength() * tickLabelWidth / dataArea.getWidth(); | | 2 | double n = getRange().getLength() * tickLabelWidth / dataArea.getHeight(); |
Precondition Violations (0)
Row |
Violation |