int result = 0; Iterator iter = associations.iterator(); while ( iter.hasNext() ) { OuterJoinableAssociation oj = (OuterJoinableAssociation) iter.next(); if ( oj.getJoinType()==JoinFragment.LEFT_OUTER_JOIN && oj.getJoinable().isCollection() ) { result++; } } return result;
int result = 0; Iterator iter = associations.iterator(); while ( iter.hasNext() ) { OuterJoinableAssociation oj = (OuterJoinableAssociation) iter.next(); if ( oj.getJoinable().consumesEntityAlias() ) { result++; } } return result;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/loader/JoinWalker.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/loader/JoinWalker.java
Method name: int countCollectionPersisters(List) Method name: int countEntityPersisters(List)
Number of AST nodes: 7 Number of AST nodes: 7
1
int result = 0;
1
int result = 0;
2
		Iterator iter = associations.iterator();
2
		Iterator iter = associations.iterator();
3
		while ( iter.hasNext() ) {
3
		while ( iter.hasNext() ) {
4
			OuterJoinableAssociation oj = (OuterJoinableAssociation) iter.next();
4
			OuterJoinableAssociation oj = (OuterJoinableAssociation) iter.next();
5
			if ( oj.getJoinType()==JoinFragment.LEFT_OUTER_JOIN && oj.getJoinable().isCollection() ) {
5
			if ( oj.getJoinable().consumesEntityAlias() ) {
6
				result++;
6
				result++;
7
			}
7
			}
8
		}
8
		}
9
		return result;
9
		return result;
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are declared in the same class
Number of node comparisons1