if ( persisterNode != null ) { try { collection.setCollectionPersisterClass( ReflectHelper.classForName( persisterNode .getValue() ) ); } catch (ClassNotFoundException cnfe) { throw new MappingException( "Could not find collection persister class: " + persisterNode.getValue() ); } }
if ( persisterNode != null ) { try { entity.setEntityPersisterClass( ReflectHelper.classForName( persisterNode .getValue() ) ); } catch (ClassNotFoundException cnfe) { throw new MappingException( "Could not find persister class: " + persisterNode.getValue() ); } }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/HbmBinder.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/HbmBinder.java
Method name: void bindCollection(Element, Collection, String, String, Mappings, java.util.Map) Method name: void bindPersistentClassCommonValues(Element, PersistentClass, Mappings, java.util.Map)
Number of AST nodes: 3 Number of AST nodes: 3
1
if ( persisterNode != null ) {
1
if ( persisterNode != null ) {
2
			try {
2
			try {
3
				collection.setCollectionPersisterClass( ReflectHelper.classForName( persisterNode
3
				entity.setEntityPersisterClass( ReflectHelper.classForName( persisterNode
4
					.getValue() ) );
4
					.getValue() ) );
5
			}
5
			}
6
			catch (ClassNotFoundException cnfe) {
6
			catch (ClassNotFoundException cnfe) {
7
				throw new MappingException( "Could not find collection persister class: "
7
				throw new MappingException( "Could not find persister class: "
8
					+ persisterNode.getValue() );
8
					+ persisterNode.getValue() );
9
			}
9
			}
10
		}
10
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are declared in the same class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    28
    if (persisterNode != null)
    20
    if (persisterNode != null)
    29
    try
    29
    try
    21
    try
    Differences
    Expression1Expression2Difference
    "Could not find collection persister class: ""Could not find persister class: "LITERAL_VALUE_MISMATCH
    21
    try
                                                                                                                                                                                      
    22
    entity.setEntityPersisterClass(ReflectHelper.classForName(persisterNode.getValue()));
    Preondition Violations
    Unmatched statement entity.setEntityPersisterClass(ReflectHelper.classForName(persisterNode.getValue())); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched statement entity.setEntityPersisterClass(ReflectHelper.classForName(persisterNode.getValue())); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    22
    entity.setEntityPersisterClass(ReflectHelper.classForName(persisterNode.getValue()));
    30
    collection.setCollectionPersisterClass(ReflectHelper.classForName(persisterNode.getValue()));
    30
    collection.setCollectionPersisterClass(ReflectHelper.classForName(persisterNode.getValue()));
    Preondition Violations
    Unmatched statement collection.setCollectionPersisterClass(ReflectHelper.classForName(persisterNode.getValue())); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched statement collection.setCollectionPersisterClass(ReflectHelper.classForName(persisterNode.getValue())); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
                                                                                                                                                                                                      
    Precondition Violations (4)
    Row Violation
    1Unmatched statement entity.setEntityPersisterClass(ReflectHelper.classForName(persisterNode.getValue())); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement entity.setEntityPersisterClass(ReflectHelper.classForName(persisterNode.getValue())); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    3Unmatched statement collection.setCollectionPersisterClass(ReflectHelper.classForName(persisterNode.getValue())); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched statement collection.setCollectionPersisterClass(ReflectHelper.classForName(persisterNode.getValue())); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted