if(mappedClassInfo.matches(parser, false, false)) { ciClasses.add(mappedClassInfo); } ciAttrs.addAll(mappedClassInfo.getQualifiedMatchingAttributes(parser));
if(colInfo.upperCaseCompletionStringStartsWith(upperCaseColNamePattern)) { ret.add(colInfo); }
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/codecompletion/src/net/sourceforge/squirrel_sql/plugins/codecompletion/CodeCompletionTableInfo.java
Method name: CompletionCandidates getInfosStartingWith(CompletionParser) Method name: ArrayList getColumns(net.sourceforge.squirrel_sql.client.session.schemainfo.SchemaInfo, String)
Number of AST nodes: 3 Number of AST nodes: 2
1
if(mappedClassInfo.matches(parser, false, false))
1
if(
2
         {
3
            ciClasses.add(mappedClassInfo);
4
         }
5
         ciAttrs.addAll(mappedClassInfo.getQualifiedMatchingAttributes(parser));
2
colInfo.upperCaseCompletionStringStartsWith(upperCaseColNamePattern))
3
         {
4
            ret.add(colInfo);
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 different classes
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)10.2
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    8
    if (mappedClassInfo.matches(parser, false, false))
    8
    if (mappedClassInfo.matches(parser, false, false))
    23
    if (colInfo.upperCaseCompletionStringStartsWith(upperCaseColNamePattern))
    Differences
    Expression1Expression2Difference
    matchesupperCaseCompletionStringStartsWithMETHOD_INVOCATION_NAME_MISMATCH
    mappedClassInfocolInfoVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.plugins.hibernate.mapping.MappedClassInfonet.sourceforge.squirrel_sql.plugins.codecompletion.CodeCompletionInfoSUBCLASS_TYPE_MISMATCH
    mappedClassInfo.matches(parser,false,false)colInfo.upperCaseCompletionStringStartsWith(upperCaseColNamePattern)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression mappedClassInfo.matches(parser,false,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression colInfo.upperCaseCompletionStringStartsWith(upperCaseColNamePattern) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression mappedClassInfo cannot be unified with expression colInfo , 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)
    Expression mappedClassInfo.matches(parser,false,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression colInfo.upperCaseCompletionStringStartsWith(upperCaseColNamePattern) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    23
    if (colInfo.upperCaseCompletionStringStartsWith(upperCaseColNamePattern))
    9
    ciClasses.add(mappedClassInfo);
    9
    ciClasses.add(mappedClassInfo);
    24
    ret.add(colInfo);
    Differences
    Expression1Expression2Difference
    mappedClassInfocolInfoVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.plugins.hibernate.mapping.MappedClassInfonet.sourceforge.squirrel_sql.plugins.codecompletion.CodeCompletionInfoSUBCLASS_TYPE_MISMATCH
    ciClassesretVARIABLE_NAME_MISMATCH
    24
    ret.add(colInfo);
    10
    ciAttrs.addAll(mappedClassInfo.getQualifiedMatchingAttributes(parser));
                                                                                                                                                          
    Precondition Violations (6)
    Row Violation
    1Expression mappedClassInfo.matches(parser,false,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression colInfo.upperCaseCompletionStringStartsWith(upperCaseColNamePattern) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression mappedClassInfo cannot be unified with expression colInfo , 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)
    4Expression mappedClassInfo.matches(parser,false,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression colInfo.upperCaseCompletionStringStartsWith(upperCaseColNamePattern) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.hibernate.completion.HQLCompletionInfoCollection and net.sourceforge.squirrel_sql.plugins.codecompletion.CodeCompletionTableInfo do not have a common superclass