y = (float) titleArea.getMaxY(); if (horizontalAlignment == HorizontalAlignment.LEFT) { anchor = TextBlockAnchor.BOTTOM_LEFT; } else if (horizontalAlignment == HorizontalAlignment.CENTER) { anchor = TextBlockAnchor.BOTTOM_CENTER; } else if (horizontalAlignment == HorizontalAlignment.RIGHT) { anchor = TextBlockAnchor.BOTTOM_RIGHT; }
x = (float) titleArea.getMaxX(); if (verticalAlignment == VerticalAlignment.TOP) { anchor = TextBlockAnchor.BOTTOM_RIGHT; } else if (verticalAlignment == VerticalAlignment.CENTER) { anchor = TextBlockAnchor.BOTTOM_CENTER; } else if (verticalAlignment == VerticalAlignment.BOTTOM) { anchor = TextBlockAnchor.BOTTOM_LEFT; }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/title/TextTitle.java File path: /jfreechart-1.0.10/src/org/jfree/chart/title/TextTitle.java
Method name: void drawHorizontal(Graphics2D, Rectangle2D) Method name: void drawVertical(Graphics2D, Rectangle2D)
Number of AST nodes: 7 Number of AST nodes: 7
1
y = (float) titleArea.getMaxY();
1
x = (float) titleArea.getMaxX();
2
            if (horizontalAlignment == HorizontalAlignment.LEFT) {
2
            if (verticalAlignment == VerticalAlignment.TOP) {
3
                anchor = TextBlockAnchor.BOTTOM_LEFT;
3
                anchor = TextBlockAnchor.BOTTOM_RIGHT;
4
            }
4
            }
5
            else if (horizontalAlignment == HorizontalAlignment.CENTER) {
5
            else if (verticalAlignment == VerticalAlignment.CENTER) {
6
                anchor = TextBlockAnchor.BOTTOM_CENTER;
6
                anchor = TextBlockAnchor.BOTTOM_CENTER;
7
            }
7
            }
8
            else if (horizontalAlignment == HorizontalAlignment.RIGHT) {
8
            else if (verticalAlignment == VerticalAlignment.BOTTOM) {
9
                anchor = TextBlockAnchor.BOTTOM_RIGHT;
9
                anchor = TextBlockAnchor.BOTTOM_LEFT;
10
            }
10
            }
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.8
Clones locationClones are declared in the same class
Number of node comparisons9