if ( "index".equals( propertyName ) ) { if ( isManyToMany() ) { throw new QueryException( "index() function not supported for many-to-many association" ); } return indexColumnNames; }
if ( "index".equals( propertyName ) ) { if ( isManyToMany() ) { throw new QueryException( "index() function not supported for many-to-many association" ); } return StringHelper.qualify( alias, indexColumnNames ); }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java
Method name: String[] toColumns(String) Method name: String[] toColumns(String, String)
Number of AST nodes: 4 Number of AST nodes: 4
1
if ( "index".equals( propertyName ) ) {
1
if ( "index".equals( propertyName ) ) {
2
			if ( isManyToMany() ) {
2
			if ( isManyToMany() ) {
3
				throw new QueryException( "index() function not supported for many-to-many association" );
3
				throw new QueryException( "index() function not supported for many-to-many association" );
4
			}
4
			}
5
			return indexColumnNames;
5
			return StringHelper.qualify( alias, indexColumnNames );
6
		}
6
		}
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 declared in the same class
Number of node comparisons8
  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)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if ("index".equals(propertyName))
    1
    if ("index".equals(propertyName))
    2
    if (isManyToMany())
    2
    if (isManyToMany())
    3
    throw new QueryException("index() function not supported for many-to-many association");
    3
    throw new QueryException("index() function not supported for many-to-many association");
    4
    return indexColumnNames;
    4
    return indexColumnNames;
    4
    return StringHelper.qualify(alias, indexColumnNames);
    Differences
    Expression1Expression2Difference
    indexColumnNamesStringHelper.qualify(alias,indexColumnNames)TYPE_COMPATIBLE_REPLACEMENT
    4
    return StringHelper.qualify(alias, indexColumnNames);
    Precondition Violations (0)
    Row Violation