if ((x + bb.getWidth() / 2) > dataArea.getMaxX()) {
float xstart = (float) valueToJava2D(Math.max(first,
axisMin), dataArea, edge);
if (bb.getWidth() < (dataArea.getMaxX() - xstart)) {
x = ((float) dataArea.getMaxX() + xstart) / 2.0f;
}
else {
label = null;
}
}
if ((x - bb.getWidth() / 2) < dataArea.getX()) {
float xlast = (float) valueToJava2D(Math.min(last,
axisMax), dataArea, edge);
if (bb.getWidth() < (xlast - dataArea.getX())) {
x = (xlast + (float) dataArea.getX()) / 2.0f;
}
else {
label = null;
}
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/PeriodAxis.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/PeriodAxis.java
|
Method name: AxisState drawTickLabels(int, Graphics2D, AxisState, Rectangle2D, RectangleEdge)
|
|
Method name: AxisState drawTickLabels(int, Graphics2D, AxisState, Rectangle2D, RectangleEdge)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if ((x + bb.getWidth() / 2) > dataArea.getMaxX()) {↵ | | 1 | if ((x - bb.getWidth() / 2) < dataArea.getX()) {↵
|
2 | float xstart = (float) valueToJava2D(Math.max(first, ↵ | | 2 | float xlast = (float) valueToJava2D(Math.min(last, ↵
|
3 | axisMin), dataArea, edge);↵ | | 3 | axisMax), dataArea, edge);↵
|
4 | if (bb.getWidth() < (dataArea.getMaxX() - xstart)) {↵ | | 4 | if (bb.getWidth() < (xlast - dataArea.getX())) {↵
|
5 | x = ((float) dataArea.getMaxX() + xstart) / 2.0f; ↵ | | 5 | x = (xlast + (float) dataArea.getX()) / 2.0f; ↵
|
6 | }↵ | | 6 | }↵
|
7 | else {↵ | | 7 | else {↵
|
8 | label = null;↵ | | 8 | label = null;↵
|
9 | }↵ | | 9 | }↵
|
10 | } | | 10 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 1 |