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();
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are declared in the same class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (!isReady())
    3
    if (!isReady())
    4
    return new Vector<IAssociation>();
    4
    return new Vector<IAssociation>();
    4
    return new Vector<String>();
    Differences
    Expression1Expression2Difference
    org.columba.core.association.api.IAssociationjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.core.association.api.IAssociation does not match with type java.lang.String
    • Make classes org.columba.core.association.api.IAssociation and java.lang.String extend a common superclass
    4
    return new Vector<String>();
    5
    EntityTransaction tx = manager.getTransaction();
    5
    EntityTransaction tx = manager.getTransaction();
    Precondition Violations (2)
    Row Violation
    1Type org.columba.core.association.api.IAssociation does not match with type java.lang.String
    2Not all possible execution flows end in a return statement