public String getEntityName(Criteria subcriteria, String propertyName) { if ( propertyName.indexOf( '.' ) > 0 ) { String root = StringHelper.root( propertyName ); Criteria crit = getAliasedCriteria( root ); if ( crit != null ) { return getEntityName( crit ); } } return getEntityName( subcriteria );
public String getSQLAlias(Criteria criteria, String propertyName) { if ( propertyName.indexOf( '.' ) > 0 ) { String root = StringHelper.root( propertyName ); Criteria subcriteria = getAliasedCriteria( root ); if ( subcriteria != null ) { return getSQLAlias( subcriteria ); } } return getSQLAlias( criteria );
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public String getEntityName(Criteria subcriteria, String propertyName) {
1
public String getSQLAlias(Criteria criteria, String propertyName) {
2
		if ( propertyName.indexOf( '.' ) > 0 ) {
2
		if ( propertyName.indexOf( '.' ) > 0 ) {
3
			String root = StringHelper.root( propertyName );
3
			String root = StringHelper.root( propertyName );
4
			Criteria crit = getAliasedCriteria( root );
4
			Criteria subcriteria = getAliasedCriteria( root );
5
			if ( crit != null ) {
5
			if ( subcriteria != null ) {
6
				return getEntityName( crit );
6
				return getSQLAlias( subcriteria );
7
			}
7
			}
8
		}
8
		}
9
		return getEntityName( subcriteria );
9
		return getSQLAlias( criteria );
10
	
10
	
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.0
Clones location
Number of node comparisons0