for (int row = 0; row < tbl.getRowCount(); row++) { tbl.setValueAt(mark, row, col); }
for (int i = 0; i < _tree.getRowCount(); i++) { _tree.collapseRow(i); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/smarttools/src/net/sourceforge/squirrel_sql/plugins/smarttools/SmarttoolsHelper.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/JTreeAliasesListImpl.java
Method name: void markAllRows(JTable, int, boolean) Method name: void collapseAll()
Number of AST nodes: 2 Number of AST nodes: 2
1
for (int row = 0; row < tbl.getRowCount(); row++)
1
for (int i = 0; i < _tree.getRowCount(); i++)
2
		{
3
			tbl.setValueAt(mark, row, col);
4
		
2
      {
3
         _tree.collapseRow(i);
5
}
4
      }
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 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)4.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    for (int row = 0; row < tbl.getRowCount(); row++)
    1
    for (int row = 0; row < tbl.getRowCount(); row++)
    1
    for (int i = 0; i < _tree.getRowCount(); i++)
    Differences
    Expression1Expression2Difference
    rowiVARIABLE_NAME_MISMATCH
    rowiVARIABLE_NAME_MISMATCH
    tbl_treeVARIABLE_NAME_MISMATCH
    javax.swing.JTablejavax.swing.JTreeSUBCLASS_TYPE_MISMATCH
    rowiVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression tbl cannot be unified with expression _tree , because common superclass javax.swing.JComponent does not declare member(s) public int getRowCount()
    1
    for (int i = 0; i < _tree.getRowCount(); i++)
    2
    tbl.setValueAt(mark, row, col);
    2
    tbl.setValueAt(mark, row, col);
    2
    _tree.collapseRow(i);
    Differences
    Expression1Expression2Difference
    setValueAtcollapseRowMETHOD_INVOCATION_NAME_MISMATCH
    tbl_treeVARIABLE_NAME_MISMATCH
    javax.swing.JTablejavax.swing.JTreeSUBCLASS_TYPE_MISMATCH
    tbl.setValueAt(mark,row,col)_tree.collapseRow(i)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression tbl.setValueAt(mark,row,col) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression _tree.collapseRow(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression tbl.setValueAt(mark,row,col) is a void method call, and thus it cannot be parameterized
    Expression _tree.collapseRow(i) is a void method call, and thus it cannot be parameterized
    Expression tbl cannot be unified with expression _tree , because common superclass javax.swing.JComponent does not declare member(s) public void setValueAt(java.lang.Object, int, int) , public void collapseRow(int)
    Expression tbl.setValueAt(mark,row,col) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression _tree.collapseRow(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression tbl.setValueAt(mark,row,col) is a void method call, and thus it cannot be parameterized
    Expression _tree.collapseRow(i) is a void method call, and thus it cannot be parameterized
    2
    _tree.collapseRow(i);
    Precondition Violations (10)
    Row Violation
    1Expression tbl cannot be unified with expression _tree , because common superclass javax.swing.JComponent does not declare member(s) public int getRowCount()
    2Expression tbl.setValueAt(mark,row,col) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression _tree.collapseRow(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression tbl.setValueAt(mark,row,col) is a void method call, and thus it cannot be parameterized
    5Expression _tree.collapseRow(i) is a void method call, and thus it cannot be parameterized
    6Expression tbl cannot be unified with expression _tree , because common superclass javax.swing.JComponent does not declare member(s) public void setValueAt(java.lang.Object, int, int) , public void collapseRow(int)
    7Expression tbl.setValueAt(mark,row,col) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression _tree.collapseRow(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression tbl.setValueAt(mark,row,col) is a void method call, and thus it cannot be parameterized
    10Expression _tree.collapseRow(i) is a void method call, and thus it cannot be parameterized