File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/docking/TitleBar.java | File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/model/ComponentInfo.java | |||
Method name: JButton addButton(ImageIcon, Action, String)
|
Method name: void ComponentInfo(String, TYPE, String, IComponent)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (icon == null)↵ | 1 | if (type == null)↵ | |
2 | throw new IllegalArgumentException("icon == null");↵ | 2 | throw new IllegalArgumentException("type == null");↵ | |
3 | if (action == null)↵ | 3 | if (calendarId == null)↵ | |
4 | throw new IllegalArgumentException("action == null");↵ | 4 | throw new IllegalArgumentException("calendarId == null");↵ | |
5 | if (border == null)↵ | 5 | if (component == null)↵ | |
6 | throw new IllegalArgumentException("border == null"); | 6 | throw new IllegalArgumentException("component == null"); | |
See real code fragment | See real code fragment |
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.6 |
Clones location | Clones are in different classes |
Number of node comparisons | 27 |
Number of mapped statements | 6 |
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.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (icon == null) |
| 3 | if (type == null) | ||||||||||||||
2 | throw new IllegalArgumentException("icon == null"); |
| 4 | throw new IllegalArgumentException("type == null"); | ||||||||||||||
3 | if (action == null) |
| 5 | if (calendarId == null) | ||||||||||||||
4 | throw new IllegalArgumentException("action == null"); |
| 6 | throw new IllegalArgumentException("calendarId == null"); | ||||||||||||||
5 | if (border == null) |
| 7 | if (component == null) | ||||||||||||||
6 | throw new IllegalArgumentException("border == null"); |
| 8 | throw new IllegalArgumentException("component == null"); |
Row | Violation |
---|---|
1 | Type javax.swing.ImageIcon of variable icon does not match with type org.columba.calendar.model.api.IComponent.TYPE of variable type |
2 | Type javax.swing.Action of variable action does not match with type java.lang.String of variable calendarId |
3 | Type java.lang.String of variable border does not match with type org.columba.calendar.model.api.IComponent of variable component |
4 | The refactoring of the clones is infeasible, because classes org.columba.core.gui.docking.TitleBar and org.columba.calendar.model.ComponentInfo do not have a common superclass |