Graphics2D g2 = (Graphics2D) g; int[] xp = new int[3]; int[] yp = new int[3]; xp[0] = x; xp[1] = x + 9; xp[2] = x + 4; yp[0] = y; yp[1] = y; yp[2] = y + 5; g2.setColor(color); g2.fillPolygon(xp, yp, 3);
Graphics2D g2 = (Graphics2D) g; int[] xp = new int[3]; int[] yp = new int[3]; xp[0] = x; xp[1] = x + 10; xp[2] = x + 5; yp[0] = y + 2; yp[1] = y + 2; yp[2] = y - 4; g2.setColor(Color.black); g2.fillPolygon(xp, yp, 3);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/base/AscendingIcon.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/base/DescendingIcon.java
Method name: void paintIcon(Component, Graphics, int, int) Method name: void paintIcon(Component, Graphics, int, int)
Number of AST nodes: 11 Number of AST nodes: 11
1
Graphics2D g2 = (Graphics2D) g;
1
Graphics2D g2 = (Graphics2D) g;
2
		int[] xp = new int[3];
2
		int[] xp = new int[3];
3
		int[] yp = new int[3];
3
		int[] yp = new int[3];
4
		xp[0] = x;
4
		xp[0] = x;
5
		xp[1] = x + 9;
5
		xp[1] = x + 10;
6
		xp[2] = x + 4;
6
		xp[2] = x + 5;
7
		yp[0] = y;
7
		yp[0] = y + 2;
8
		yp[1] = y;
8
		yp[1] = y + 2;
9
		yp[2] = y + 5;
9
		yp[2] = y - 4;
10
		g2.setColor(color);
10
		g2.setColor(Color.black);
11
		g2.fillPolygon(xp, yp, 3);
11
		g2.fillPolygon(xp, yp, 3);
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 in different classes having the same super class
Number of node comparisons121
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements11
    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
    1
    Graphics2D g2 = (Graphics2D)g;
    1
    Graphics2D g2 = (Graphics2D)g;
    2
    int[] xp = new int[3];
    2
    int[] xp = new int[3];
    3
    int[] yp = new int[3];
    3
    int[] yp = new int[3];
    4
    xp[0] = x;
    4
    xp[0] = x;
    5
    xp[1] = x + 9;
    5
    xp[1] = x + 9;
    5
    xp[1] = x + 10;
    Differences
    Expression1Expression2Difference
    910LITERAL_VALUE_MISMATCH
    5
    xp[1] = x + 10;
    6
    xp[2] = x + 4;
    6
    xp[2] = x + 4;
    6
    xp[2] = x + 5;
    Differences
    Expression1Expression2Difference
    45LITERAL_VALUE_MISMATCH
    6
    xp[2] = x + 5;
    7
    yp[0] = y;
    7
    yp[0] = y;
    7
    yp[0] = y + 2;
    Differences
    Expression1Expression2Difference
    yy + 2TYPE_COMPATIBLE_REPLACEMENT
    7
    yp[0] = y + 2;
    8
    yp[1] = y;
    8
    yp[1] = y;
    8
    yp[1] = y + 2;
    Differences
    Expression1Expression2Difference
    yy + 2TYPE_COMPATIBLE_REPLACEMENT
    8
    yp[1] = y + 2;
    9
    yp[2] = y + 5;
    9
    yp[2] = y + 5;
    9
    yp[2] = y - 4;
    Differences
    Expression1Expression2Difference
    54LITERAL_VALUE_MISMATCH
    +-OPERATOR_MISMATCH
    9
    yp[2] = y - 4;
    10
    g2.setColor(color);
    10
    g2.setColor(color);
    10
    g2.setColor(Color.black);
    Differences
    Expression1Expression2Difference
    colorColor.blackTYPE_COMPATIBLE_REPLACEMENT
    10
    g2.setColor(Color.black);
    11
    g2.fillPolygon(xp, yp, 3);
    11
    g2.fillPolygon(xp, yp, 3);
    Precondition Violations (0)
    Row Violation