File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/facade/ContactFacade.java | File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/facade/ContactFacade.java | |||
Method name: IContactItem getContactItem(String, String)
|
Method name: void addContacts(String, IContactItem[])
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (folderId == null)↵ | 1 | if (uid == null)↵ | |
2 | throw new IllegalArgumentException("folderId = null");↵ | 2 | throw new IllegalArgumentException("uid == null");↵ | |
3 | if (contactId == null)↵ | 3 | if (contactItems == null)↵ | |
4 | throw new IllegalArgumentException("contactId == null↵ | 4 | throw new IllegalArgumentException(↵ | |
5 | ");↵ | 5 | "Zero IContactItem's were specified to add to addressbook folder");↵ | |
6 | AddressbookTreeModel model = AddressbookTreeModel.getInstance();↵ | 6 | AddressbookTreeModel model = AddressbookTreeModel.getInstance();↵ | |
7 | IFolder f = (IFolder) model.getFolder(folderId); | 7 | IContactFolder folder = (IContactFolder) model.getFolder(uid); | |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 17 |
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) | 11.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (folderId == null) |
| 1 | if (uid == null) | ||||||||||||||||||||||||
2 | throw new IllegalArgumentException("folderId = null"); |
| 2 | throw new IllegalArgumentException("uid == null"); | ||||||||||||||||||||||||
3 | if (contactId == null) |
| 3 | if (contactItems == null) | ||||||||||||||||||||||||
4 | throw new IllegalArgumentException("contactId == null"); |
| 4 | throw new IllegalArgumentException("Zero IContactItem's were specified to add to addressbook folder"); | ||||||||||||||||||||||||
5 | AddressbookTreeModel model = AddressbookTreeModel.getInstance(); | 5 | AddressbookTreeModel model = AddressbookTreeModel.getInstance(); | |||||||||||||||||||||||||
6 | IFolder f = (IFolder)model.getFolder(folderId); |
| 6 | IContactFolder folder = (IContactFolder)model.getFolder(uid); |
Row | Violation |
---|---|
1 | Type java.lang.String of variable contactId does not match with type org.columba.addressbook.facade.IContactItem[] of variable contactItems |
2 | Expression (IFolder)model.getFolder(folderId) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression (IContactFolder)model.getFolder(uid) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Clone fragment #1 returns variable f with type org.columba.addressbook.folder.IFolder , while Clone fragment #2 returns variable folder with type org.columba.addressbook.folder.IContactFolder |