if (!_loading && data != null) { return _schemaInfoCache.getExtColumnInfosByColumnNameForReadOnly().containsKey(data); } return false;
if (!_loading && data != null) { return _schemaInfoCache.getKeywordsForReadOnly().containsKey(data); } return false;
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfo.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfo.java
Method name: boolean isColumn(CaseInsensitiveString) Method name: boolean isKeyword(CaseInsensitiveString)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (!_loading && data != null)
1
if (!_loading && data != null)
2
      {
2
      {
3
         return _schemaInfoCache.getExtColumnInfosByColumnNameForReadOnly().containsKey(data);
3
         return _schemaInfoCache.getKeywordsForReadOnly().containsKey(data);
4
      }
4
      }
5
      return false;
5
      return false;
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.2
Clones locationClones are declared in the same class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)19.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (!_loading && data != null)
    1
    if (!_loading && data != null)
    2
    return _schemaInfoCache.getExtColumnInfosByColumnNameForReadOnly().containsKey(data);
    2
    return _schemaInfoCache.getExtColumnInfosByColumnNameForReadOnly().containsKey(data);
    2
    return _schemaInfoCache.getKeywordsForReadOnly().containsKey(data);
    Differences
    Expression1Expression2Difference
    getExtColumnInfosByColumnNameForReadOnlygetKeywordsForReadOnlyMETHOD_INVOCATION_NAME_MISMATCH
    java.util.Map>java.util.TreeMapVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Map<net.sourceforge.squirrel_sql.client.session.schemainfo.CaseInsensitiveString,java.util.List<net.sourceforge.squirrel_sql.client.session.ExtendedColumnInfo>> of variable _schemaInfoCache.getExtColumnInfosByColumnNameForReadOnly() does not match with type java.util.TreeMap<net.sourceforge.squirrel_sql.client.session.schemainfo.CaseInsensitiveString,java.lang.String> of variable _schemaInfoCache.getKeywordsForReadOnly()
    • Make classes java.util.Map> and java.util.TreeMap extend a common superclass
    2
    return _schemaInfoCache.getKeywordsForReadOnly().containsKey(data);
    3
    return false;
    3
    return false;
    Precondition Violations (1)
    Row Violation
    1Type java.util.Map<net.sourceforge.squirrel_sql.client.session.schemainfo.CaseInsensitiveString,java.util.List<net.sourceforge.squirrel_sql.client.session.ExtendedColumnInfo>> of variable _schemaInfoCache.getExtColumnInfosByColumnNameForReadOnly() does not match with type java.util.TreeMap<net.sourceforge.squirrel_sql.client.session.schemainfo.CaseInsensitiveString,java.lang.String> of variable _schemaInfoCache.getKeywordsForReadOnly()