try { for( int i=0; i<size; i++ ) { final List currentResults = loaders[i].list(this); currentResults.addAll(results); results = currentResults; } success = true; } finally { dontFlushFromFind--; afterOperation(success); }
try { for( int i=0; i<size; i++ ) { final List currentResults = loaders[i].list(this); currentResults.addAll(results); results = currentResults; } success = true; } finally { afterOperation(success); }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionImpl.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java
Method name: List list(CriteriaImpl) Method name: List list(CriteriaImpl)
Number of AST nodes: 6 Number of AST nodes: 6
1
try {
1
try {
2
			for( int i=0; i<size; i++ ) {
2
			for( int i=0; i<size; i++ ) {
3
				final List currentResults = loaders[i].list(this);
3
				final List currentResults = loaders[i].list(this);
4
				currentResults.addAll(results);
4
				currentResults.addAll(results);
5
				results = currentResults;
5
				results = currentResults;
6
			}
6
			}
7
			success = true;
7
			success = true;
8
		}
8
		}
9
		finally {
9
		finally {
10
			dontFlushFromFind--;
10
			
11
			afterOperation(success);
11
afterOperation(success);
12
		}
12
		}
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 comparisons18
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.1
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    15
    for (int i = 0; i < size; i++)
    10
    for (int i = 0; i < size; i++)
    16
    final List currentResults = loaders[i].list(this);
    11
    final List currentResults = loaders[i].list(this);
    17
    currentResults.addAll(results);
    12
    currentResults.addAll(results);
    18
    results = currentResults;
    13
    results = currentResults;
    Precondition Violations (0)
    Row Violation