if (segment != null) { Comparable key = getSectionKey(cat); paint = lookupSectionPaint(key, true); outlinePaint = lookupSectionOutlinePaint(key); outlineStroke = lookupSectionOutlineStroke(key); drawSide(g2, pieArea, segment, front, back, paint, outlinePaint, outlineStroke, false, true); }
if (segment != null) { Comparable key = getSectionKey(cat); paint = lookupSectionPaint(key); outlinePaint = lookupSectionOutlinePaint(key); outlineStroke = lookupSectionOutlineStroke(key); drawSide(g2, pieArea, segment, front, back, paint, outlinePaint, outlineStroke, true, false); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot3D.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot3D.java
Method name: void draw(Graphics2D, Rectangle2D, Point2D, PlotState, PlotRenderingInfo) Method name: void draw(Graphics2D, Rectangle2D, Point2D, PlotState, PlotRenderingInfo)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (segment != null) {
1
if (segment != null) {
2
                Comparable key = getSectionKey(cat);
2
                Comparable key = getSectionKey(cat);
3
                paint = lookupSectionPaint(key, true);
3
                paint = lookupSectionPaint(key);
4
                outlinePaint = lookupSectionOutlinePaint(key);
4
                outlinePaint = lookupSectionOutlinePaint(key);
5
                outlineStroke = lookupSectionOutlineStroke(key);
5
                outlineStroke = lookupSectionOutlineStroke(key);
6
                drawSide(g2, pieArea, segment, front, back, paint, 
6
                drawSide(g2, pieArea, segment, front, back, paint, 
7
                        outlinePaint, outlineStroke, false, true);
7
                        outlinePaint, outlineStroke, true, false);
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.2
Clones locationClones are in the same method
Number of node comparisons42
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)208.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    162
    if (segment != null)
    173
    if (segment != null)
    163
    Comparable key = getSectionKey(cat);
    174
    Comparable key = getSectionKey(cat);
    164
    paint = lookupSectionPaint(key, true);
    164
    paint = lookupSectionPaint(key, true);
    175
    paint = lookupSectionPaint(key);
    Differences
    Expression1Expression2Difference
    lookupSectionPaint(key,true)lookupSectionPaint(key)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression lookupSectionPaint(key,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression lookupSectionPaint(key) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    175
    paint = lookupSectionPaint(key);
    165
    outlinePaint = lookupSectionOutlinePaint(key);
    176
    outlinePaint = lookupSectionOutlinePaint(key);
    166
    outlineStroke = lookupSectionOutlineStroke(key);
    177
    outlineStroke = lookupSectionOutlineStroke(key);
    167
    drawSide(g2, pieArea, segment, front, back, paint, outlinePaint, outlineStroke, false, true);
    167
    drawSide(g2, pieArea, segment, front, back, paint, outlinePaint, outlineStroke, false, true);
    178
    drawSide(g2, pieArea, segment, front, back, paint, outlinePaint, outlineStroke, true, false);
    Differences
    Expression1Expression2Difference
    falsetrueLITERAL_VALUE_MISMATCH
    truefalseLITERAL_VALUE_MISMATCH
    178
    drawSide(g2, pieArea, segment, front, back, paint, outlinePaint, outlineStroke, true, false);
    Precondition Violations (2)
    Row Violation
    1Expression lookupSectionPaint(key,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression lookupSectionPaint(key) cannot be parameterized, because it has dependencies to/from statements that will be extracted