Icon oldIcon = this.icon;
this.icon = ico;
iconBounds = new Rectangle(0, 0, ico.getIconWidth(), ico.getIconHeight());
border.setIcon(icon);
firePropertyChange("icon", oldIcon, icon);
Icon oldIcon = this.icon;
this.icon = ico;
iconBounds = new Rectangle(0, 0, ico.getIconWidth(), ico
.getIconHeight());
border.setIcon(icon);
firePropertyChange("icon", oldIcon, icon);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/base/IconTextField.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/search/IconTextField.java
|
Method name: void setIcon(Icon)
|
|
Method name: void setIcon(Icon)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | Icon oldIcon = this.icon;↵ | | 1 | Icon oldIcon = this.icon;↵
|
2 | this.icon = ico;↵ | | 2 | this.icon = ico;↵
|
3 | iconBounds = new Rectangle(0, 0, ico.getIconWidth(), ico↵ | | 3 | iconBounds = new Rectangle(0, 0, ico.getIconWidth(), ico↵
|
4 | .getIconHeight());↵ | | 4 | .getIconHeight());↵
|
5 | border.setIcon(icon);↵ | | 5 | border.setIcon(icon);↵
|
6 | firePropertyChange("icon", oldIcon, icon); | | 6 | firePropertyChange("icon", oldIcon, icon);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 12 |
-
{Non-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) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | Icon oldIcon = this.icon; | | 1 | Icon oldIcon = this.icon; |
2 | this.icon = ico; | | 2 | this.icon = ico; |
3 | iconBounds = new Rectangle(0, 0, ico.getIconWidth(), ico.getIconHeight()); | | 3 | iconBounds = new Rectangle(0, 0, ico.getIconWidth(), ico.getIconHeight()); |
4 | border.setIcon(icon); | | 4 | border.setIcon(icon); |
5 | firePropertyChange("icon", oldIcon, icon); | | 5 | firePropertyChange("icon", oldIcon, icon); |
Precondition Violations (1)
Row |
Violation |
1 | Expression border cannot be unified with expression border , because common superclass javax.swing.border.AbstractBorder does not declare member(s) public void setIcon(javax.swing.Icon) |