BasicSetter result = getSetterOrNull(theClass, propertyName); if (result==null) { throw new PropertyNotFoundException( "Could not find a setter for property " + propertyName + " in class " + theClass.getName() ); } return result;
BasicGetter result = getGetterOrNull(theClass, propertyName); if (result==null) { throw new PropertyNotFoundException( "Could not find a getter for " + propertyName + " in class " + theClass.getName() ); } return result;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/property/BasicPropertyAccessor.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/property/BasicPropertyAccessor.java
Method name: Setter createSetter(Class, String) Method name: Getter createGetter(Class, String)
Number of AST nodes: 4 Number of AST nodes: 4
1
BasicSetter result = getSetterOrNull(theClass, propertyName);
1
BasicGetter result = getGetterOrNull(theClass, propertyName);
2
		if (result==null) {
2
		if (result==null) {
3
			throw new PropertyNotFoundException( 
3
			throw new PropertyNotFoundException( 
4
					"Could not find a setter for property " + 
4
					"Could not find a getter for " + 
5
					propertyName + 
5
					propertyName + 
6
					" in class " + 
6
					" in class " + 
7
					theClass.getName() 
7
					theClass.getName() 
8
				);
8
			);
9
		}
9
		}
10
		return result;
10
		return result;
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.2
Clones locationClones are declared in the same class
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                                              
    1
    BasicGetter result = getGetterOrNull(theClass, propertyName);
    1
    BasicSetter result = getSetterOrNull(theClass, propertyName);
                                                                                                                              
    2
    if (result == null)
    2
    if (result == null)
    2
    if (result == null)
    Differences
    Expression1Expression2Difference
    org.hibernate.property.BasicPropertyAccessor.BasicSetterorg.hibernate.property.BasicPropertyAccessor.BasicGetterVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.property.BasicPropertyAccessor.BasicSetter of variable result does not match with type org.hibernate.property.BasicPropertyAccessor.BasicGetter of variable result
    • Make classes org.hibernate.property.BasicPropertyAccessor.BasicSetter and org.hibernate.property.BasicPropertyAccessor.BasicGetter extend a common superclass
    2
    if (result == null)
    3
    throw new PropertyNotFoundException("Could not find a setter for property " + propertyName + " in class " + theClass.getName());
    3
    throw new PropertyNotFoundException("Could not find a setter for property " + propertyName + " in class " + theClass.getName());
    3
    throw new PropertyNotFoundException("Could not find a getter for " + propertyName + " in class " + theClass.getName());
    Differences
    Expression1Expression2Difference
    "Could not find a setter for property ""Could not find a getter for "LITERAL_VALUE_MISMATCH
    3
    throw new PropertyNotFoundException("Could not find a getter for " + propertyName + " in class " + theClass.getName());
                                      
    4
    return result;
    Preondition Violations
    Unmatched statement return result; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched return result;
    4
    return result;
    4
    return result;
    4
    return result;
    Preondition Violations
    Unmatched statement return result; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched return result;
                                      
    Precondition Violations (5)
    Row Violation
    1Type org.hibernate.property.BasicPropertyAccessor.BasicSetter of variable result does not match with type org.hibernate.property.BasicPropertyAccessor.BasicGetter of variable result
    2Unmatched statement return result; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3Unmatched return result;
    4Unmatched statement return result; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    5Unmatched return result;