if (!childNode.getUserObject().toString().startsWith("BIN$")) { result.add(childNode); }
if (colInfo.getSimpleName().equals(pkColName)) { result.add(colInfo); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/expander/OracleTableParentExpander.java File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/commands/DropPrimaryKeyCommand.java
Method name: List createChildren(ISession, ObjectTreeNode) Method name: TableColumnInfo[] getPkTableColumns(ITableInfo)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (!childNode.getUserObject().toString().startsWith("BIN$")) {
1
if (
2
                    result.add(childNode);
3
                
2
colInfo.getSimpleName().equals(pkColName))
3
				{
4
					result.add(colInfo);
4
}
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.2
Clones locationClones are in different classes
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)30.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    if (!childNode.getUserObject().toString().startsWith("BIN$"))
    5
    if (!childNode.getUserObject().toString().startsWith("BIN$"))
    7
    if (colInfo.getSimpleName().equals(pkColName))
    Differences
    Expression1Expression2Difference
    !childNode.getUserObject().toString().startsWith("BIN$")colInfo.getSimpleName().equals(pkColName)TYPE_COMPATIBLE_REPLACEMENT
    7
    if (colInfo.getSimpleName().equals(pkColName))
    6
    result.add(childNode);
    6
    result.add(childNode);
    8
    result.add(colInfo);
    Differences
    Expression1Expression2Difference
    childNodecolInfoVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeNodenet.sourceforge.squirrel_sql.fw.sql.TableColumnInfoVARIABLE_TYPE_MISMATCH
    java.util.Listjava.util.ArrayListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeNode of variable childNode does not match with type net.sourceforge.squirrel_sql.fw.sql.TableColumnInfo of variable colInfo
    • Make classes net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeNode and net.sourceforge.squirrel_sql.fw.sql.TableColumnInfo extend a common superclass
    Type java.util.List<net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeNode> of variable result does not match with type java.util.ArrayList<net.sourceforge.squirrel_sql.fw.sql.TableColumnInfo> of variable result
    • Make classes java.util.List and java.util.ArrayList extend a common superclass
    8
    result.add(colInfo);
    Precondition Violations (3)
    Row Violation
    1Type net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeNode of variable childNode does not match with type net.sourceforge.squirrel_sql.fw.sql.TableColumnInfo of variable colInfo
    2Type java.util.List<net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeNode> of variable result does not match with type java.util.ArrayList<net.sourceforge.squirrel_sql.fw.sql.TableColumnInfo> of variable result
    3The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.oracle.expander.OracleTableParentExpander and net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropPrimaryKeyCommand do not have a common superclass