Rectangle2D bb = TextUtilities.getTextBounds(label, g2, g2.getFontMetrics()); 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;
Rectangle2D bb = TextUtilities.getTextBounds(label, g2, g2.getFontMetrics()); 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: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
Rectangle2D bb = TextUtilities.getTextBounds(label, g2, 
1
Rectangle2D bb = TextUtilities.getTextBounds(label, g2, 
2
                        g2.getFontMetrics());
2
                        g2.getFontMetrics());
3
                if ((x + bb.getWidth() / 2) > dataArea.getMaxX()) {
3
                if ((x - bb.getWidth() / 2) < dataArea.getX()) {
4
                    float xstart = (float) valueToJava2D(Math.max(first, 
4
                    float xlast = (float) valueToJava2D(Math.min(last, 
5
                            axisMin), dataArea, edge);
5
                            axisMax), dataArea, edge);
6
                    if (bb.getWidth() < (dataArea.getMaxX() - xstart)) {
6
                    if (bb.getWidth() < (xlast - dataArea.getX())) {
7
                        x = ((float) dataArea.getMaxX() + xstart) / 2.0f;   
7
                        x = (xlast + (float) dataArea.getX()) / 2.0f;   
8
                    }
8
                    }
9
                    else {
9
                    else {
10
                        label = null;
10
                        label = null;
11
                    
11
                    
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0