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;
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;
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: 6 Number of AST nodes: 6
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;
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons36
  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)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;
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables yp, g2, xp , while Clone fragment #2 returns variables yp, g2, xp