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);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same java file |
Number of node comparisons | 13 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.9 |
Clone type | Type 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); |
| | | | |
4 | g2.setColor(INACTIVE_LABEL_COLOR); | | 4 | g2.setColor(INACTIVE_LABEL_COLOR); |
5 | g2.drawRect(3, 2, 4, 4); | | 5 | g2.drawRect(2, 3, 5, 5); |
Precondition Violations (0)
Row |
Violation |