putValue(SMALL_ICON, ImageLoader.getSmallIcon(IconKeys.EDIT_DELETE));
putValue(LARGE_ICON, ImageLoader.getIcon(IconKeys.EDIT_DELETE));
setEnabled(false);
putValue(SMALL_ICON, ImageLoader.getSmallIcon(IconKeys.EDIT_DELETE));
// large icon for toolbar
putValue(LARGE_ICON, ImageLoader.getIcon(IconKeys.EDIT_DELETE));
// disable toolbar text
setShowToolBarText(false);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/action/RemoveCardAction.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/globalactions/DeleteAction.java
|
Method name: void RemoveCardAction(IFrameMediator)
|
|
Method name: void DeleteAction(IFrameMediator)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | putValue(SMALL_ICON, ImageLoader.getSmallIcon(IconKeys.EDIT_DELETE));↵ | | 1 | putValue(SMALL_ICON, ImageLoader.getSmallIcon(IconKeys.EDIT_DELETE));↵
|
|
| | | 2 | // large icon for toolbar↵
|
2 | putValue(LARGE_ICON, ImageLoader.getIcon(IconKeys.EDIT_DELETE));↵ | | 3 | putValue(LARGE_ICON, ImageLoader.getIcon(IconKeys.EDIT_DELETE));↵
|
|
|
3 | setEnabled↵ | | 4 | // disable toolbar text↵
|
4 | (false); | | 5 | setShowToolBarText(false);
|
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 9 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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 |
4 | putValue(SMALL_ICON, ImageLoader.getSmallIcon(IconKeys.EDIT_DELETE)); | | 3 | putValue(SMALL_ICON, ImageLoader.getSmallIcon(IconKeys.EDIT_DELETE)); |
5 | putValue(LARGE_ICON, ImageLoader.getIcon(IconKeys.EDIT_DELETE)); | | 4 | putValue(LARGE_ICON, ImageLoader.getIcon(IconKeys.EDIT_DELETE)); |
6 | setEnabled(false); | | 5 | setShowToolBarText(false); |
Precondition Violations (4)
Row |
Violation |
1 | Expression setEnabled(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression setShowToolBarText(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression setEnabled(false) is a void method call, and thus it cannot be parameterized |
4 | Expression setShowToolBarText(false) is a void method call, and thus it cannot be parameterized |