if (orientation == PlotOrientation.HORIZONTAL) { bar = new Rectangle2D.Double(java2dValue0, rectStart, rectLength, rectBreadth); } else if (orientation == PlotOrientation.VERTICAL) { bar = new Rectangle2D.Double(rectStart, java2dValue1, rectBreadth, rectLength); }
if (PlotOrientation.HORIZONTAL == l_orientation) { l_line = new Line2D.Double(l_y1, l_x1, l_y2, l_x2); } else if (PlotOrientation.VERTICAL == l_orientation) { l_line = new Line2D.Double(l_x1, l_y1, l_x2, l_y2); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/GanttRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYDifferenceRenderer.java
Method name: void drawTask(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, GanttCategoryDataset, int, int) Method name: void drawItemPass1(Graphics2D, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (orientation == PlotOrientation.HORIZONTAL) {
1
if (PlotOrientation.HORIZONTAL == l_orientation) {
2
            bar = new Rectangle2D.Double(java2dValue0, rectStart, rectLength,
2
            l_line = new Line2D.Double(
3
                    rectBreadth);
3
l_y1, l_x1, l_y2, l_x2);
4
        }
4
        }
5
        else if (orientation == PlotOrientation.VERTICAL) {
5
        else if (PlotOrientation.VERTICAL == l_orientation) {
6
            bar = new Rectangle2D.Double(rectStart, java2dValue1, rectBreadth,
6
            l_line = new Line2D.Double(
7
                    rectLength);
7
l_x1, l_y1, l_x2, l_y2);
8
        }
8
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.4
Clones locationClones are in different classes having the same super class
Number of node comparisons13
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)1.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    22
    if (orientation == PlotOrientation.HORIZONTAL)
    22
    if (orientation == PlotOrientation.HORIZONTAL)
    48
    if (PlotOrientation.HORIZONTAL == l_orientation)
    Differences
    Expression1Expression2Difference
    orientationPlotOrientation.HORIZONTALTYPE_COMPATIBLE_REPLACEMENT
    PlotOrientation.HORIZONTALl_orientationTYPE_COMPATIBLE_REPLACEMENT
    48
    if (PlotOrientation.HORIZONTAL == l_orientation)
    23
    bar = new Rectangle2D.Double(java2dValue0, rectStart, rectLength, rectBreadth);
    23
    bar = new Rectangle2D.Double(java2dValue0, rectStart, rectLength, rectBreadth);
    Preondition Violations
    Unmatched statement bar=new Rectangle2D.Double(java2dValue0,rectStart,rectLength,rectBreadth); cannot be moved, because it updates a variable modified in other unmapped statements
                                                                                                                                                                
                                                                                                        
    49
    l_line = new Line2D.Double(l_y1, l_x1, l_y2, l_x2);
    Preondition Violations
    Unmatched statement l_line=new Line2D.Double(l_y1,l_x1,l_y2,l_x2); cannot be moved, because it updates a variable modified in other unmapped statements
    49
    l_line = new Line2D.Double(l_y1, l_x1, l_y2, l_x2);
    24
    else if (orientation == PlotOrientation.VERTICAL)
    24
    else if (orientation == PlotOrientation.VERTICAL)
    50
    else if (PlotOrientation.VERTICAL == l_orientation)
    Differences
    Expression1Expression2Difference
    orientationPlotOrientation.VERTICALTYPE_COMPATIBLE_REPLACEMENT
    PlotOrientation.VERTICALl_orientationTYPE_COMPATIBLE_REPLACEMENT
    50
    else if (PlotOrientation.VERTICAL == l_orientation)
    25
    bar = new Rectangle2D.Double(rectStart, java2dValue1, rectBreadth, rectLength);
    25
    bar = new Rectangle2D.Double(rectStart, java2dValue1, rectBreadth, rectLength);
    Preondition Violations
    Unmatched statement bar=new Rectangle2D.Double(rectStart,java2dValue1,rectBreadth,rectLength); cannot be moved, because it updates a variable modified in other unmapped statements
                                                                                                                                                                
                                                                                                        
    51
    l_line = new Line2D.Double(l_x1, l_y1, l_x2, l_y2);
    Preondition Violations
    Unmatched statement l_line=new Line2D.Double(l_x1,l_y1,l_x2,l_y2); cannot be moved, because it updates a variable modified in other unmapped statements
    51
    l_line = new Line2D.Double(l_x1, l_y1, l_x2, l_y2);
    Precondition Violations (4)
    Row Violation
    1Unmatched statement bar=new Rectangle2D.Double(java2dValue0,rectStart,rectLength,rectBreadth); cannot be moved, because it updates a variable modified in other unmapped statements
    2Unmatched statement bar=new Rectangle2D.Double(rectStart,java2dValue1,rectBreadth,rectLength); cannot be moved, because it updates a variable modified in other unmapped statements
    3Unmatched statement l_line=new Line2D.Double(l_y1,l_x1,l_y2,l_x2); cannot be moved, because it updates a variable modified in other unmapped statements
    4Unmatched statement l_line=new Line2D.Double(l_x1,l_y1,l_x2,l_y2); cannot be moved, because it updates a variable modified in other unmapped statements