if (!isReady())
return new Vector<IAssociation>();
// transaction is needed for the underlying jpa architecture
EntityTransaction tx = manager.getTransaction();
if (!isReady())
return new Vector<String>();
// transaction is needed for the underlying jpa architecture
EntityTransaction tx = manager.getTransaction();
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/association/AssociationStore.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/association/AssociationStore.java
|
Method name: Collection getAllAssociations(String)
|
|
Method name: Collection getAssociatedItems(String, String)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (!isReady())↵ | | 1 | if (!isReady())↵
|
2 | return new Vector<IAssociation>();↵ | | 2 | return new Vector<String>();↵
|
|
3 | // transaction is needed for the underlying jpa architecture↵ | | 3 | // transaction is needed for the underlying jpa architecture↵
|
4 | EntityTransaction tx = manager.getTransaction(); | | 4 | EntityTransaction tx = manager.getTransaction();
|
See real code fragment |
|
See real code fragment |
Summary
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 5 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | if (!isReady()) | | 3 | if (!isReady()) |
| | | 4 | return new Vector<String>(); |
4 | return new Vector<IAssociation>(); | | | |
5 | EntityTransaction tx = manager.getTransaction(); | | 5 | EntityTransaction tx = manager.getTransaction(); |
Precondition Violations (2)
Row |
Violation |
1 | Unmatched return new Vector<String>(); |
2 | Unmatched return new Vector<IAssociation>(); |