ArrayList<HQLKeywordInfo> ret = new ArrayList<HQLKeywordInfo>(hqlKeywords.length); for (String hqlKeyword : hqlKeywords) { ret.add(new HQLKeywordInfo(hqlKeyword)); } return ret;
ArrayList<HQLFunctionInfo> ret = new ArrayList<HQLFunctionInfo>(_builtInFunctions.length); for (String builtInFunction : _builtInFunctions) { ret.add(new HQLFunctionInfo(builtInFunction)); } return ret;
Clone fragments detected by clone detection tool
File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/completion/HQLKeywordInfo.java File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/completion/HQLFunctionInfo.java
Method name: ArrayList createInfos() Method name: ArrayList createInfos()
Number of AST nodes: 4 Number of AST nodes: 4
1
ArrayList<HQLKeywordInfo> ret = new ArrayList<HQLKeywordInfo>(hqlKeywords.length);
1
ArrayList<HQLFunctionInfo> ret = new ArrayList<HQLFunctionInfo>(_builtInFunctions.length);
2
      for (String hqlKeyword : hqlKeywords)
2
      for (String builtInFunction : _builtInFunctions)
3
      {
3
      {
4
         ret.add(new HQLKeywordInfo(hqlKeyword));
4
         ret.add(new HQLFunctionInfo(builtInFunction));
5
      }
5
      }
6
      return ret;
6
      return ret;
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    ArrayList<HQLKeywordInfo> ret = new ArrayList<HQLKeywordInfo>(hqlKeywords.length);
    1
    ArrayList<HQLKeywordInfo> ret = new ArrayList<HQLKeywordInfo>(hqlKeywords.length);
    1
    ArrayList<HQLFunctionInfo> ret = new ArrayList<HQLFunctionInfo>(_builtInFunctions.length);
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.plugins.hibernate.completion.HQLKeywordInfonet.sourceforge.squirrel_sql.plugins.hibernate.completion.HQLFunctionInfoSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.plugins.hibernate.completion.HQLKeywordInfonet.sourceforge.squirrel_sql.plugins.hibernate.completion.HQLFunctionInfoSUBCLASS_TYPE_MISMATCH
    hqlKeywords_builtInFunctionsVARIABLE_NAME_MISMATCH
    1
    ArrayList<HQLFunctionInfo> ret = new ArrayList<HQLFunctionInfo>(_builtInFunctions.length);
    2
    for (String hqlKeyword : hqlKeywords)
    2
    for (String hqlKeyword : hqlKeywords)
    2
    for (String builtInFunction : _builtInFunctions)
    Differences
    Expression1Expression2Difference
    hqlKeywordbuiltInFunctionVARIABLE_NAME_MISMATCH
    hqlKeywords_builtInFunctionsVARIABLE_NAME_MISMATCH
    2
    for (String builtInFunction : _builtInFunctions)
    3
    ret.add(new HQLKeywordInfo(hqlKeyword));
    3
    ret.add(new HQLKeywordInfo(hqlKeyword));
    3
    ret.add(new HQLFunctionInfo(builtInFunction));
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.plugins.hibernate.completion.HQLKeywordInfonet.sourceforge.squirrel_sql.plugins.hibernate.completion.HQLFunctionInfoSUBCLASS_TYPE_MISMATCH
    hqlKeywordbuiltInFunctionVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression new HQLKeywordInfo(hqlKeyword) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new HQLFunctionInfo(builtInFunction) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new HQLKeywordInfo(hqlKeyword) cannot be unified with expression new HQLFunctionInfo(builtInFunction) , because common superclass type net.sourceforge.squirrel_sql.plugins.hibernate.completion.SimpleHQLCompletionInfo cannot be passed as an argument to public boolean add(net.sourceforge.squirrel_sql.plugins.hibernate.completion.HQLKeywordInfo)
    3
    ret.add(new HQLFunctionInfo(builtInFunction));
    4
    return ret;
    4
    return ret;
    Precondition Violations (3)
    Row Violation
    1Expression new HQLKeywordInfo(hqlKeyword) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression new HQLFunctionInfo(builtInFunction) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression new HQLKeywordInfo(hqlKeyword) cannot be unified with expression new HQLFunctionInfo(builtInFunction) , because common superclass type net.sourceforge.squirrel_sql.plugins.hibernate.completion.SimpleHQLCompletionInfo cannot be passed as an argument to public boolean add(net.sourceforge.squirrel_sql.plugins.hibernate.completion.HQLKeywordInfo)