if(mappedClassInfo.matches(parser, false, false)) { ciClasses.add(mappedClassInfo); } ciAttrs.addAll(mappedClassInfo.getQualifiedMatchingAttributes(parser));
if(simpleInfo.matches(parser)) { ret.add(simpleInfo); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/completion/HQLCompletionInfoCollection.java File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/completion/HQLCompletionInfoCollection.java
Method name: CompletionCandidates getInfosStartingWith(CompletionParser) Method name: CompletionCandidates getInfosStartingWith(CompletionParser)
Number of AST nodes: 3 Number of AST nodes: 2
1
if(mappedClassInfo.matches(parser, false, false))
1
if(simpleInfo.matches(parser))
2
         {
2
         {
3
            ciClasses.add(mappedClassInfo);
3
            
4
         }
5
         ciAttrs.addAll(mappedClassInfo.getQualifiedMatchingAttributes(parser));
4
ret.add(simpleInfo);
5
         }
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.4
Clones locationClones are in the same method
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 fragment0
    Time elapsed for statement mapping (ms)9.7
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    8
    if (mappedClassInfo.matches(parser, false, false))
    8
    if (mappedClassInfo.matches(parser, false, false))
    32
    if (simpleInfo.matches(parser))
    Differences
    Expression1Expression2Difference
    mappedClassInfosimpleInfoVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.plugins.hibernate.mapping.MappedClassInfonet.sourceforge.squirrel_sql.plugins.hibernate.completion.SimpleHQLCompletionInfoSUBCLASS_TYPE_MISMATCH
    mappedClassInfo.matches(parser,false,false)simpleInfo.matches(parser)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression mappedClassInfo cannot be unified with expression simpleInfo , because common superclass net.sourceforge.squirrel_sql.fw.completion.CompletionInfo does not declare member(s) public boolean matches(net.sourceforge.squirrel_sql.fw.completion.util.CompletionParser, boolean, boolean) , public boolean matches(net.sourceforge.squirrel_sql.fw.completion.util.CompletionParser)
    Expression mappedClassInfo.matches(parser,false,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    32
    if (simpleInfo.matches(parser))
    9
    ciClasses.add(mappedClassInfo);
    9
    ciClasses.add(mappedClassInfo);
    33
    ret.add(simpleInfo);
    Differences
    Expression1Expression2Difference
    mappedClassInfosimpleInfoVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.plugins.hibernate.mapping.MappedClassInfonet.sourceforge.squirrel_sql.plugins.hibernate.completion.SimpleHQLCompletionInfoSUBCLASS_TYPE_MISMATCH
    ciClassesretVARIABLE_NAME_MISMATCH
    33
    ret.add(simpleInfo);
    10
    ciAttrs.addAll(mappedClassInfo.getQualifiedMatchingAttributes(parser));
                                                                                                                                                          
    Precondition Violations (2)
    Row Violation
    1Expression mappedClassInfo cannot be unified with expression simpleInfo , because common superclass net.sourceforge.squirrel_sql.fw.completion.CompletionInfo does not declare member(s) public boolean matches(net.sourceforge.squirrel_sql.fw.completion.util.CompletionParser, boolean, boolean) , public boolean matches(net.sourceforge.squirrel_sql.fw.completion.util.CompletionParser)
    2Expression mappedClassInfo.matches(parser,false,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted