g.setColor(color1); g.drawLine(x + i * 4 + 2,y + 3, x + i * 4 + 2,y + 3); g.setColor(color2); g.drawLine(x + i * 4 + 3,y + 4, x + i * 4 + 3,y + 4); g.setColor(color1); g.drawLine(x + i * 4 + 4,y + 5, x + i * 4 + 4,y + 5); g.setColor(color2); g.drawLine(x + i * 4 + 5,y + 6, x + i * 4 + 5,y + 6);
g.setColor(color1); g.drawLine(x + 3,y + i * 4 + 2, x + 3,y + i * 4 + 2); g.setColor(color2); g.drawLine(x + 4,y + i * 4 + 3, x + 4,y + i * 4 + 3); g.setColor(color1); g.drawLine(x + 5,y + i * 4 + 4, x + 5,y + i * 4 + 4); g.setColor(color2); g.drawLine(x + 6,y + i * 4 + 5, x + 6,y + i * 4 + 5);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/PanelWindowContainer.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/PanelWindowContainer.java
Method name: void paintHorizBorder(Graphics, int, int, int) Method name: void paintVertBorder(Graphics, int, int, int)
Number of AST nodes: 8 Number of AST nodes: 8
1
g.setColor(color1);
1
g.setColor(color1);
2
				g.drawLine(x + i * 4 + 2,y + 3,
2
				g.drawLine(x + 3,y + i * 4 + 2,
3
					x + i * 4 + 2,y + 3);
3
					x + 3,y + i * 4 + 2);
4
				g.setColor(color2);
4
				g.setColor(color2);
5
				g.drawLine(x + i * 4 + 3,y + 4,
5
				g.drawLine(x + 4,y + i * 4 + 3,
6
					x + i * 4 + 3,y + 4);
6
					x + 4,y + i * 4 + 3);
7
				g.setColor(color1);
7
				g.setColor(color1);
8
				g.drawLine(x + i * 4 + 4,y + 5,
8
				g.drawLine(x + 5,y + i * 4 + 4,
9
					x + i * 4 + 4,y + 5);
9
					x + 5,y + i * 4 + 4);
10
				g.setColor(color2);
10
				g.setColor(color2);
11
				g.drawLine(x + i * 4 + 5,y + 6,
11
				g.drawLine(x + 6,y + i * 4 + 5,
12
					x + i * 4 + 5,y + 6);
12
					x + 6,y + i * 4 + 5);
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.0
Clones locationClones are declared in the same class
Number of node comparisons25
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    4
    g.setColor(color1);
    4
    g.setColor(color1);
    5
    g.drawLine(x + i * 4 + 2, y + 3, x + i * 4 + 2, y + 3);
    5
    g.drawLine(x + i * 4 + 2, y + 3, x + i * 4 + 2, y + 3);
    7
    g.drawLine(x + 4, y + i * 4 + 3, x + 4, y + i * 4 + 3);
    Differences
    Expression1Expression2Difference
    24LITERAL_VALUE_MISMATCH
    x + i * 4xINFIX_LEFT_OPERAND_MISMATCH
    yy + i * 4INFIX_LEFT_OPERAND_MISMATCH
    24LITERAL_VALUE_MISMATCH
    x + i * 4xINFIX_LEFT_OPERAND_MISMATCH
    yy + i * 4INFIX_LEFT_OPERAND_MISMATCH
    7
    g.drawLine(x + 4, y + i * 4 + 3, x + 4, y + i * 4 + 3);
    6
    g.setColor(color2);
    6
    g.setColor(color2);
    7
    g.drawLine(x + i * 4 + 3, y + 4, x + i * 4 + 3, y + 4);
    7
    g.drawLine(x + i * 4 + 3, y + 4, x + i * 4 + 3, y + 4);
    5
    g.drawLine(x + 3, y + i * 4 + 2, x + 3, y + i * 4 + 2);
    Differences
    Expression1Expression2Difference
    x + i * 4xINFIX_LEFT_OPERAND_MISMATCH
    42LITERAL_VALUE_MISMATCH
    yy + i * 4INFIX_LEFT_OPERAND_MISMATCH
    x + i * 4xINFIX_LEFT_OPERAND_MISMATCH
    42LITERAL_VALUE_MISMATCH
    yy + i * 4INFIX_LEFT_OPERAND_MISMATCH
    5
    g.drawLine(x + 3, y + i * 4 + 2, x + 3, y + i * 4 + 2);
    8
    g.setColor(color1);
    8
    g.setColor(color1);
    9
    g.drawLine(x + i * 4 + 4, y + 5, x + i * 4 + 4, y + 5);
    9
    g.drawLine(x + i * 4 + 4, y + 5, x + i * 4 + 4, y + 5);
    11
    g.drawLine(x + 6, y + i * 4 + 5, x + 6, y + i * 4 + 5);
    Differences
    Expression1Expression2Difference
    46LITERAL_VALUE_MISMATCH
    x + i * 4xINFIX_LEFT_OPERAND_MISMATCH
    yy + i * 4INFIX_LEFT_OPERAND_MISMATCH
    46LITERAL_VALUE_MISMATCH
    x + i * 4xINFIX_LEFT_OPERAND_MISMATCH
    yy + i * 4INFIX_LEFT_OPERAND_MISMATCH
    11
    g.drawLine(x + 6, y + i * 4 + 5, x + 6, y + i * 4 + 5);
    10
    g.setColor(color2);
    10
    g.setColor(color2);
    11
    g.drawLine(x + i * 4 + 5, y + 6, x + i * 4 + 5, y + 6);
    11
    g.drawLine(x + i * 4 + 5, y + 6, x + i * 4 + 5, y + 6);
    9
    g.drawLine(x + 5, y + i * 4 + 4, x + 5, y + i * 4 + 4);
    Differences
    Expression1Expression2Difference
    x + i * 4xINFIX_LEFT_OPERAND_MISMATCH
    64LITERAL_VALUE_MISMATCH
    yy + i * 4INFIX_LEFT_OPERAND_MISMATCH
    x + i * 4xINFIX_LEFT_OPERAND_MISMATCH
    64LITERAL_VALUE_MISMATCH
    yy + i * 4INFIX_LEFT_OPERAND_MISMATCH
    9
    g.drawLine(x + 5, y + i * 4 + 4, x + 5, y + i * 4 + 4);
    Precondition Violations (0)
    Row Violation