File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/tagging/TagCalendarMenu.java | File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/action/TagContactMenu.java | |||
Method name: boolean checkAssocation(String, String, ITag)
|
Method name: boolean checkAssocation(String, String, ITag)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | Collection<IAssociation> c = AssociationStore.getInstance()↵ | 1 | Collection<IAssociation> c = AssociationStore.getInstance()↵ | |
2 | .getAllAssociations(uri.toString());↵ | 2 | .getAllAssociations(uri.toString());↵ | |
3 | for (IAssociation as : c) {↵ | 3 | for (IAssociation as : c) {↵ | |
4 | if (as.getServiceId().equals(SERVICE_ID)↵ | 4 | if (as.getServiceId().equals(SERVICE_ID)↵ | |
5 | && (as.getMetaDataId() != null)↵ | 5 | && (as.getMetaDataId() != null)↵ | |
6 | && (as.getMetaDataId().equals(tag.getId()))) {↵ | 6 | && (as.getMetaDataId().equals(tag.getId()))) {↵ | |
7 | return true;↵ | 7 | return true;↵ | |
8 | }↵ | 8 | }↵ | |
9 | }↵ | 9 | }↵ | |
10 | return false; | 10 |
| |
See real code fragment | See real code fragment |
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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 9 |
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) | 0.6 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
6 | Collection<IAssociation> c = AssociationStore.getInstance().getAllAssociations(uri.toString()); | 2 | Collection<IAssociation> c = AssociationStore.getInstance().getAllAssociations(uri.toString()); | |
7 | for (IAssociation as : c) | 3 | for (IAssociation as : c) | |
8 | if (as.getServiceId().equals(SERVICE_ID) && (as.getMetaDataId() != null) && (as.getMetaDataId().equals(tag.getId()))) | 4 | if (as.getServiceId().equals(SERVICE_ID) && (as.getMetaDataId() != null) && (as.getMetaDataId().equals(tag.getId()))) | |
9 | return true; | 5 | return true; | |
10 | return false; | 6 | return false; |
Row | Violation |
---|