Graphics2D g2 = (Graphics2D) g; if (isActive()) g2.setColor(ACTIVE_LABEL_COLOR); else g2.setColor(INACTIVE_LABEL_COLOR); g2.drawRect(3, 2, 4, 4);
Graphics2D g2 = (Graphics2D) g; if (isActive()) g2.setColor(ACTIVE_LABEL_COLOR); else g2.setColor(INACTIVE_LABEL_COLOR); g2.drawRect(2, 3, 5, 5);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/docking/DockableView.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/docking/DockableView.java
Method name: void paintIcon(Component, Graphics, int, int) Method name: void paintIcon(Component, Graphics, int, int)
Number of AST nodes: 5 Number of AST nodes: 5
1
Graphics2D g2 = (Graphics2D) g;
1
Graphics2D g2 = (Graphics2D) g;
2
			
2
			if (isActive())
3
			if (isActive())
3
				g2.setColor(ACTIVE_LABEL_COLOR);
4
				g2.setColor(ACTIVE_LABEL_COLOR);
4
			else
5
			else
5
				g2.setColor(INACTIVE_LABEL_COLOR);
6
				g2.setColor(INACTIVE_LABEL_COLOR);
6
			g2.drawRect(3, 2, 4, 4);
7
			g2.drawRect(2, 3, 5, 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.1
Clones locationClones are in the same java file
Number of node comparisons13
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    Graphics2D g2 = (Graphics2D)g;
    1
    Graphics2D g2 = (Graphics2D)g;
    2
    if (isActive())
    2
    if (isActive())
    3
    g2.setColor(ACTIVE_LABEL_COLOR);
    3
    g2.setColor(ACTIVE_LABEL_COLOR);
    else
    else
    4
    g2.setColor(INACTIVE_LABEL_COLOR);
    4
    g2.setColor(INACTIVE_LABEL_COLOR);
    5
    g2.drawRect(3, 2, 4, 4);
    5
    g2.drawRect(3, 2, 4, 4);
    5
    g2.drawRect(2, 3, 5, 5);
    Differences
    Expression1Expression2Difference
    32LITERAL_VALUE_MISMATCH
    23LITERAL_VALUE_MISMATCH
    45LITERAL_VALUE_MISMATCH
    45LITERAL_VALUE_MISMATCH
    5
    g2.drawRect(2, 3, 5, 5);
    Precondition Violations (0)
    Row Violation