if(propertyInfo.matchesUnQualified(parser.getLastToken())) { ret.add(propertyInfo); }
if (infos[i].upperCaseCompletionStringEquals(upperCaseTableNamePat)) { toReturn = infos[i]; break; }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/mapping/MappedClassInfo.java File path: /sql12/plugins/codecompletion/src/net/sourceforge/squirrel_sql/plugins/codecompletion/StandardCompletorModel.java
Method name: Collection getMatchingAttributes(CompletionParser) Method name: ArrayList getColumnsForName(String, String, String, String, int)
Number of AST nodes: 2 Number of AST nodes: 3
1
if(propertyInfo.matchesUnQualified(parser.getLastToken()))
1
if
2
         {
3
            ret.add(propertyInfo);
4
         
2
 (infos[i].upperCaseCompletionStringEquals(upperCaseTableNamePat))
3
				{
4
					toReturn = infos[i];
5
					break;
5
}
6
				}
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.6
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 fragment1
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)6.7
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    3
    if (propertyInfo.matchesUnQualified(parser.getLastToken()))
    3
    if (propertyInfo.matchesUnQualified(parser.getLastToken()))
    14
    if (infos[i].upperCaseCompletionStringEquals(upperCaseTableNamePat))
    Differences
    Expression1Expression2Difference
    parser.getLastToken()upperCaseTableNamePatTYPE_COMPATIBLE_REPLACEMENT
    matchesUnQualifiedupperCaseCompletionStringEqualsMETHOD_INVOCATION_NAME_MISMATCH
    net.sourceforge.squirrel_sql.plugins.hibernate.mapping.PropertyInfonet.sourceforge.squirrel_sql.plugins.codecompletion.CodeCompletionInfoSUBCLASS_TYPE_MISMATCH
    propertyInfoinfos[i]TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression propertyInfo cannot be unified with expression infos[i] , because common superclass net.sourceforge.squirrel_sql.fw.completion.CompletionInfo does not declare member(s) public boolean matchesUnQualified(java.lang.String)
    14
    if (infos[i].upperCaseCompletionStringEquals(upperCaseTableNamePat))
    4
    ret.add(propertyInfo);
    4
    ret.add(propertyInfo);
    Preondition Violations
    Unmatched statement ret.add(propertyInfo); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                      
                                                
    15
    toReturn = infos[i];
    Preondition Violations
    Unmatched statement toReturn=infos[i]; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    15
    toReturn = infos[i];
                        
    16
    break;
    Preondition Violations
    Unmatched break;
    16
    break;
    Precondition Violations (5)
    Row Violation
    1Expression propertyInfo cannot be unified with expression infos[i] , because common superclass net.sourceforge.squirrel_sql.fw.completion.CompletionInfo does not declare member(s) public boolean matchesUnQualified(java.lang.String)
    2Unmatched statement ret.add(propertyInfo); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3Unmatched statement toReturn=infos[i]; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched break;
    5The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero