if ((store.getAllAssociations("itemId1") != null)
&& (store.getAllAssociations("itemId1").size() == 1))
System.out.println("'itemId1' found 1 time");
else
fail("Associated item not found "
+ store.getAssociatedItems("serviceId1", "metaDataId1")
.size());
if ((store.getAssociatedItems("serviceId1", "metaDataId1") != null)
&& (store.getAssociatedItems("serviceId1", "metaDataId1")
.size() == 2))
System.out.println("Associated item size correct!");
else
fail("Associated item size not correct, "
+ store.getAssociatedItems("serviceId1", "metaDataId1")
.size() + " should be 2");
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/test/java/org/columba/core/associations/AssociationStoreCases.java
|
|
File path: /columba-1.4-src/core/src/test/java/org/columba/core/associations/AssociationStoreCases.java
|
Method name: void testGetAllAssociations()
|
|
Method name: void testRemoveAssociation()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if ((store.getAllAssociations("itemId1") != null)↵ | | 1 | if ((store.getAssociatedItems("serviceId1", "metaDataId1") != null)↵
|
2 | && (store.getAllAssociations("itemId1")↵ | | 2 | && (store.getAssociatedItems("serviceId1", "metaDataId1")↵
|
3 | .size() == 1))↵ | | 3 | .size() == 2))↵
|
4 | System.out.println("'itemId1' found 1 time");↵ | | 4 | System.out.println("Associated item size correct!");↵
|
5 | else↵ | | 5 | else↵
|
6 | fail("Associated item not found "↵ | | 6 | fail("Associated item size not correct, "↵
|
7 | + store.getAssociatedItems("serviceId1", "metaDataId1")↵ | | 7 | + store.getAssociatedItems("serviceId1", "metaDataId1")↵
|
8 | .size()); | | 8 | .size() + " should be 2");
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 1 |