File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/action/TagContactMenu.java | File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/tagging/TagCalendarMenu.java | |||
Method name: void removeAllTags()
|
Method name: void removeAllTags()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | String contactId = contactItem.getId();↵ | 1 | String activityId = activity.getId();↵ | |
2 | for (Iterator<ITag> iter = TagManager.getInstance().getAllTags(); iter↵ | 2 | for (Iterator<ITag> iter = TagManager.getInstance().getAllTags(); iter↵ | |
3 | .hasNext();) {↵ | 3 | .hasNext();) {↵ | |
4 | ITag tag = iter.next();↵ | 4 | ITag tag = iter.next();↵ | |
5 | AssociationStore.getInstance().removeAssociation(SERVICE_ID,↵ | 5 | AssociationStore.getInstance().removeAssociation(SERVICE_ID,↵ | |
6 | tag.getId(), createURI(folderId, contactId).toString());↵ | 6 | tag.getId(), createURI(calendarId, activityId).toString());↵ | |
7 | } | 7 |
| |
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
Number of mapped statements | 4 |
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) | 8.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | String contactId = contactItem.getId(); |
| 3 | String activityId = activity.getId(); | |||||||||||||||||
3 | for (Iterator<ITag> iter = TagManager.getInstance().getAllTags(); iter.hasNext(); ) | 4 | for (Iterator<ITag> iter = TagManager.getInstance().getAllTags(); iter.hasNext(); ) | ||||||||||||||||||
4 | ITag tag = iter.next(); | 5 | ITag tag = iter.next(); | ||||||||||||||||||
5 | AssociationStore.getInstance().removeAssociation(SERVICE_ID, tag.getId(), createURI(folderId, contactId).toString()); |
| 6 | AssociationStore.getInstance().removeAssociation(SERVICE_ID, tag.getId(), createURI(calendarId, activityId).toString()); |
Row | Violation |
---|---|
1 | Type org.columba.addressbook.facade.IContactItem of variable contactItem does not match with type org.columba.calendar.base.api.IActivity of variable activity |