initialize( true ); if ( list.removeAll( coll ) ) { dirty(); return true; } else { return false; }
initialize( true ); if ( bag.removeAll( c ) ) { 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/PersistentList.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/collection/PersistentBag.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 ( list.removeAll( coll ) ) {
2
			if ( bag.removeAll( c ) ) {
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.3
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.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    initialize(true);
    2
    initialize(true);
    3
    if (list.removeAll(coll))
    3
    if (list.removeAll(coll))
    3
    if (bag.removeAll(c))
    Differences
    Expression1Expression2Difference
    collcVARIABLE_NAME_MISMATCH
    listbagVARIABLE_NAME_MISMATCH
    3
    if (bag.removeAll(c))
    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 (4)
    Row Violation
    1Conditional return false;
    2Conditional return false;
    3Conditional return true;
    4Conditional return true;