if (isDrawBarOutline() && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { Stroke stroke = getItemOutlineStroke(row, column); Paint paint = getItemOutlinePaint(row, column); if (stroke != null && paint != null) { g2.setStroke(stroke); g2.setPaint(paint); g2.draw(bar); } }
if (isDrawBarOutline() && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { Stroke stroke = getItemOutlineStroke(row, column); Paint paint = getItemOutlinePaint(row, column); if (stroke != null && paint != null) { g2.setStroke(stroke); g2.setPaint(paint); g2.draw(bar); } }
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/category/StatisticalBarRenderer.java
Method name: void drawTask(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, GanttCategoryDataset, int, int) Method name: void drawVerticalItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, StatisticalCategoryDataset, int, int)
Number of AST nodes: 7 Number of AST nodes: 7
1
if (isDrawBarOutline()
1
if (isDrawBarOutline()
2
                && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
2
                && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
3
            Stroke stroke = getItemOutlineStroke(row, column);
3
            Stroke stroke = getItemOutlineStroke(row, column);
4
            Paint paint = getItemOutlinePaint(row, column);
4
            Paint paint = getItemOutlinePaint(row, column);
5
            if (stroke != null && paint != null) {
5
            if (stroke != null && paint != null) {
6
                g2.setStroke(stroke);
6
                g2.setStroke(stroke);
7
                g2.setPaint(paint);
7
                g2.setPaint(paint);
8
                g2.draw(bar);
8
                g2.draw(bar);
9
            }
9
            }
10
        }
10
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in different classes having the same super class
Number of node comparisons25
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)35.1
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    48
    if (isDrawBarOutline() && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD)
    45
    if (isDrawBarOutline() && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD)
    49
    Stroke stroke = getItemOutlineStroke(row, column);
    46
    Stroke stroke = getItemOutlineStroke(row, column);
    50
    Paint paint = getItemOutlinePaint(row, column);
    47
    Paint paint = getItemOutlinePaint(row, column);
    51
    if (stroke != null && paint != null)
    48
    if (stroke != null && paint != null)
    52
    g2.setStroke(stroke);
    49
    g2.setStroke(stroke);
    53
    g2.setPaint(paint);
    50
    g2.setPaint(paint);
    54
    g2.draw(bar);
    51
    g2.draw(bar);
    Precondition Violations (0)
    Row Violation