while ( children.hasNext() ) { FromClause child = ( FromClause ) children.next(); if ( child.findJoinByPathLocal( path ) != null ) { return child; } }
while ( iter.hasNext() ) { Property prop = (Property) iter.next(); if ( prop.getName().equals(propertyName) ) { return prop; } }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/tree/FromClause.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Component.java
Method name: FromClause locateChildFromClauseWithJoinByPath(String) Method name: Property getProperty(String)
Number of AST nodes: 4 Number of AST nodes: 4
1
while ( children.hasNext() ) {
1
while ( iter.hasNext() ) {
2
				FromClause child = ( FromClause ) children.next();
2
			Property prop = (Property) iter.next();
3
				if ( child.findJoinByPathLocal( path ) != null ) {
3
			if ( prop.getName().equals(propertyName) ) {
4
					return child;
4
				return prop;
5
				}
5
			}
6
			}
6
		}
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 in different classes
Number of node comparisons1