File path: /columba-1.4-src/plugins/org.columba.chat.altura/src/org/columba/chat/ui/conversation/ConversationController.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/menu/ExtendableMenuBar.java | |||
Method name: boolean exists(String)
|
Method name: boolean exists(String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if ( jabberId == null ) throw new IllegalArgumentException("jabberId == null");↵ | 1 | if ( menuId == null ) throw new IllegalArgumentException("menuId == null");↵ | |
2 | ↵ | 2 | ↵ | |
3 | if (chatMap.containsKey(jabberId))↵ | 3 | if ( map.containsKey(↵ | |
4 | return true;↵ | 4 | menuId)) return true;↵ | |
5 | ↵ | |||
5 | return false; | 6 |
| |
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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 11 |
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.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (jabberId == null) |
| 1 | if (menuId == null) | |||||||||||||||||
2 | throw new IllegalArgumentException("jabberId == null"); |
| 2 | throw new IllegalArgumentException("menuId == null"); | |||||||||||||||||
3 | if (chatMap.containsKey(jabberId)) |
| 3 | if (map.containsKey(menuId)) | |||||||||||||||||
4 | return true; | 4 | return true; | ||||||||||||||||||
5 | return false; | 5 | return false; |
Row | Violation |
---|---|
1 | Type java.util.Map<java.lang.String,org.columba.chat.ui.conversation.api.IChatMediator> of variable chatMap does not match with type java.util.Hashtable<java.lang.String,org.columba.core.gui.menu.ExtendableMenu> of variable map |
2 | The refactoring of the clones is infeasible, because classes org.columba.chat.ui.conversation.ConversationController and org.columba.core.gui.menu.ExtendableMenuBar do not have a common superclass |