for (int i = 0; i < constraintViews.length; i++) { constraintViews[i].removeAllFoldingPoints(); }
for (int i = 0; i < _executionListeners.length; i++) { _executionListeners[i].statementExecuted(sql); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/graph/src/net/sourceforge/squirrel_sql/plugins/graph/GraphDesktopController.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/SQLExecuterTask.java
Method name: void removeConstraintViews(ConstraintView[], boolean) Method name: void run()
Number of AST nodes: 2 Number of AST nodes: 2
1
for (int i = 0; i < constraintViews.length; i++)
1
for (int i = 0; i < _executionListeners.length; i++)
2
         {
2
            {
3
            constraintViews[i].removeAllFoldingPoints();
3
            
4
   _executionListeners[i].statementExecuted(sql);
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 comparisons4
  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)1.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    for (int i = 0; i < constraintViews.length; i++)
    3
    for (int i = 0; i < constraintViews.length; i++)
    1
    for (int i = 0; i < _executionListeners.length; i++)
    Differences
    Expression1Expression2Difference
    constraintViews_executionListenersVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.plugins.graph.ConstraintView[]net.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListener[]VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type int of variable constraintViews.length does not match with type int of variable _executionListeners.length
    • Make classes net.sourceforge.squirrel_sql.plugins.graph.ConstraintView[] and net.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListener[] extend a common superclass
    1
    for (int i = 0; i < _executionListeners.length; i++)
    4
    constraintViews[i].removeAllFoldingPoints();
    4
    constraintViews[i].removeAllFoldingPoints();
    2
    _executionListeners[i].statementExecuted(sql);
    Differences
    Expression1Expression2Difference
    removeAllFoldingPointsstatementExecutedMETHOD_INVOCATION_NAME_MISMATCH
    constraintViews_executionListenersVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.plugins.graph.ConstraintView[]net.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListener[]VARIABLE_TYPE_MISMATCH
    constraintViews[i].removeAllFoldingPoints()_executionListeners[i].statementExecuted(sql)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression constraintViews[i].removeAllFoldingPoints() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression _executionListeners[i].statementExecuted(sql) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression constraintViews[i].removeAllFoldingPoints() is a void method call, and thus it cannot be parameterized
    Expression _executionListeners[i].statementExecuted(sql) is a void method call, and thus it cannot be parameterized
    Type net.sourceforge.squirrel_sql.plugins.graph.ConstraintView[] of variable constraintViews does not match with type net.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListener[] of variable _executionListeners
    • Make classes net.sourceforge.squirrel_sql.plugins.graph.ConstraintView[] and net.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListener[] extend a common superclass
    Expression constraintViews[i].removeAllFoldingPoints() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression _executionListeners[i].statementExecuted(sql) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression constraintViews[i].removeAllFoldingPoints() is a void method call, and thus it cannot be parameterized
    Expression _executionListeners[i].statementExecuted(sql) is a void method call, and thus it cannot be parameterized
    2
    _executionListeners[i].statementExecuted(sql);
    Precondition Violations (11)
    Row Violation
    1Type int of variable constraintViews.length does not match with type int of variable _executionListeners.length
    2Expression constraintViews[i].removeAllFoldingPoints() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression _executionListeners[i].statementExecuted(sql) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression constraintViews[i].removeAllFoldingPoints() is a void method call, and thus it cannot be parameterized
    5Expression _executionListeners[i].statementExecuted(sql) is a void method call, and thus it cannot be parameterized
    6Type net.sourceforge.squirrel_sql.plugins.graph.ConstraintView[] of variable constraintViews does not match with type net.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListener[] of variable _executionListeners
    7Expression constraintViews[i].removeAllFoldingPoints() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression _executionListeners[i].statementExecuted(sql) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression constraintViews[i].removeAllFoldingPoints() is a void method call, and thus it cannot be parameterized
    10Expression _executionListeners[i].statementExecuted(sql) is a void method call, and thus it cannot be parameterized
    11The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.graph.GraphDesktopController and do not have a common superclass