Shape bounds = TextUtilities.calculateRotatedStringBounds(label, g2, (float) anchorPoint.getX(), (float) anchorPoint.getY(), position.getTextAnchor(), position.getAngle(), position.getRotationAnchor()); if (bounds != null) { if (!bar.contains(bounds.getBounds2D())) { if (!negative) { position = getPositiveItemLabelPositionFallback(); } else { position = getNegativeItemLabelPositionFallback(); } if (position != null) { anchorPoint = calculateLabelAnchorPoint( position.getItemLabelAnchor(), bar, plot.getOrientation());
Shape bounds = TextUtilities.calculateRotatedStringBounds(label, g2, (float) anchorPoint.getX(), (float) anchorPoint.getY(), position.getTextAnchor(), position.getAngle(), position.getRotationAnchor()); if (bounds != null) { if (!bar.contains(bounds.getBounds2D())) { if (!negative) { position = getPositiveItemLabelPositionFallback(); } else { position = getNegativeItemLabelPositionFallback(); } if (position != null) { anchorPoint = calculateLabelAnchorPoint( position.getItemLabelAnchor(), bar, plot.getOrientation());
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BarRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYBarRenderer.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
Shape bounds = TextUtilities.calculateRotatedStringBounds(label,
1
Shape bounds = TextUtilities.calculateRotatedStringBounds(label, 
2
                    g2, (float) anchorPoint.getX(), (float) anchorPoint.getY(),
2
                    g2, (float) anchorPoint.getX(), (float) anchorPoint.getY(),
3
                    position.getTextAnchor(), position.getAngle(),
3
                    position.getTextAnchor(), position.getAngle(),
4
                    position.getRotationAnchor());
4
                    position.getRotationAnchor());
5
            
5
            if (bounds != null) {
6
            if (bounds != null) {
6
                if (!bar.contains(bounds.getBounds2D())) {
7
                if (!bar.contains(bounds.getBounds2D())) {
7
                    if (!negative) {
8
                    if (!negative) {
8
                        position = getPositiveItemLabelPositionFallback();
9
                        position = getPositiveItemLabelPositionFallback();
9
                    }
10
                    }
10
                    else {
11
                    else {
11
                        position = getNegativeItemLabelPositionFallback();
12
                        position = getNegativeItemLabelPositionFallback();
12
                    }
13
                    }
13
                    if (position != null) {
14
                    if (position != null) {
14
                        anchorPoint = calculateLabelAnchorPoint(
15
                        anchorPoint = calculateLabelAnchorPoint(
15
                                position.getItemLabelAnchor(), bar,
16
                                position.getItemLabelAnchor(), bar, 
16
                                plot.getOrientation());
17
                                plot.getOrientation());
17
                    
18
                    
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