initialize( true ); if ( set.removeAll( coll ) ) { dirty(); return true; } else { return false; }
initialize( true ); if ( list.removeAll( coll ) ) { dirty(); return true; } else { return false; }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/collection/PersistentSet.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/collection/PersistentList.java
Method name: boolean removeAll(Collection) Method name: boolean removeAll(Collection)
Number of AST nodes: 5 Number of AST nodes: 5
1
initialize( true );
1
initialize( true );
2
			if ( set.removeAll( coll ) ) {
2
			if ( list.removeAll( coll ) ) {
3
				dirty();
3
				dirty();
4
				return true;
4
				return true;
5
			}
5
			}
6
			else {
6
			else {
7
				return false;
7
				return false;
8
			}
8
			}
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons18
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    initialize(true);
    2
    initialize(true);
    3
    if (set.removeAll(coll))
    3
    if (set.removeAll(coll))
    3
    if (list.removeAll(coll))
    Differences
    Expression1Expression2Difference
    setlistVARIABLE_NAME_MISMATCH
    java.util.Setjava.util.ListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Set of variable set does not match with type java.util.List of variable list
    • Make classes java.util.Set and java.util.List extend a common superclass
    3
    if (list.removeAll(coll))
    4
    dirty();
    4
    dirty();
    5
    return true;
    5
    return true;
    5
    return true;
    Preondition Violations
    Conditional return true;
    Conditional return true;
    5
    return true;
    else
    else
    6
    return false;
    6
    return false;
    6
    return false;
    Preondition Violations
    Conditional return false;
    Conditional return false;
    6
    return false;
    Precondition Violations (5)
    Row Violation
    1Type java.util.Set of variable set does not match with type java.util.List of variable list
    2Conditional return false;
    3Conditional return false;
    4Conditional return true;
    5Conditional return true;