initialize( true ); if ( bag.retainAll( c ) ) { 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/PersistentBag.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/collection/PersistentList.java
Method name: boolean retainAll(Collection) Method name: boolean removeAll(Collection)
Number of AST nodes: 5 Number of AST nodes: 5
1
initialize( true );
1
initialize( true );
2
		if ( bag.retainAll( c ) ) {
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 cases1
Number of non-refactorable cases0
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 comparisons17
  1. {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.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    initialize(true);
    2
    initialize(true);
    2
    if (bag.retainAll(c))
    2
    if (bag.retainAll(c))
    3
    if (list.removeAll(coll))
    Differences
    Expression1Expression2Difference
    retainAllremoveAllMETHOD_INVOCATION_NAME_MISMATCH
    ccollVARIABLE_NAME_MISMATCH
    baglistVARIABLE_NAME_MISMATCH
    3
    if (list.removeAll(coll))
    3
    dirty();
    4
    dirty();
    4
    return true;
    5
    return true;
    else
    else
    5
    return false;
    6
    return false;
    Precondition Violations (0)
    Row Violation