if (table.equalsIgnoreCase(ti.getSimpleName())) { result = true; break; }
if(propertyInfo.getCompareString().equals(attrName)) { return propertyInfo; }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/util/DBUtil.java File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/mapping/MappedClassInfo.java
Method name: boolean containsTable(List, String) Method name: PropertyInfo getAttributeByName(String)
Number of AST nodes: 3 Number of AST nodes: 2
1
if (table.equalsIgnoreCase(ti.getSimpleName()))
1
if(propertyInfo.getCompareString().equals(attrName))
2
			{
3
				result = true;
4
				break;
5
			
2
         {
3
            return propertyInfo;
6
}
4
         }
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 in different classes
Number of node comparisons7
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)7.8
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    3
    if (table.equalsIgnoreCase(ti.getSimpleName()))
    3
    if (table.equalsIgnoreCase(ti.getSimpleName()))
    2
    if (propertyInfo.getCompareString().equals(attrName))
    Differences
    Expression1Expression2Difference
    ti.getSimpleName()attrNameTYPE_COMPATIBLE_REPLACEMENT
    equalsIgnoreCaseequalsMETHOD_INVOCATION_NAME_MISMATCH
    tablepropertyInfo.getCompareString()TYPE_COMPATIBLE_REPLACEMENT
    2
    if (propertyInfo.getCompareString().equals(attrName))
                                                  
    3
    return propertyInfo;
    Preondition Violations
    Unmatched statement return propertyInfo; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched return propertyInfo;
    3
    return propertyInfo;
    4
    result = true;
                                  
    5
    break;
    5
    break;
    Preondition Violations
    Unmatched break;
                      
    Precondition Violations (4)
    Row Violation
    1Unmatched statement return propertyInfo; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched return propertyInfo;
    3Unmatched break;
    4The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero