for (int i = 0; i < _data.length; ++i) { _data[i][1] = ""; }
for (int i = 0; i < beans.length; ++i) { processBeanInfo(beans[i], info); }
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/TableInfoDataSet.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/JavabeanArrayDataSet.java
Method name: void setTableInfo(ITableInfo) Method name: void setJavabeanArray(Object[])
Number of AST nodes: 2 Number of AST nodes: 2
1
for (int i = 0; i < _data.length; ++i)
1
for (int i = 0; i < beans.length; ++i)
2
			{
2
				{
3
				_data[i][1] = "";
3
					processBeanInfo(beans[i], info);
4
			}
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.2
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    for (int i = 0; i < _data.length; ++i)
    3
    for (int i = 0; i < _data.length; ++i)
    10
    for (int i = 0; i < beans.length; ++i)
    Differences
    Expression1Expression2Difference
    _databeansVARIABLE_NAME_MISMATCH
    java.lang.String[][]java.lang.Object[]VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type int of variable _data.length does not match with type int of variable beans.length
    • Make classes java.lang.String[][] and java.lang.Object[] extend a common superclass
    10
    for (int i = 0; i < beans.length; ++i)
    4
    _data[i][1] = "";
    4
    _data[i][1] = "";
    Preondition Violations
    Unmatched statement _data[i][1]=""; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                        
                                                                          
    11
    processBeanInfo(beans[i], info);
    Preondition Violations
    Unmatched statement processBeanInfo(beans[i],info); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    Unmatched statement processBeanInfo(beans[i],info); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    11
    processBeanInfo(beans[i], info);
    Precondition Violations (5)
    Row Violation
    1Type int of variable _data.length does not match with type int of variable beans.length
    2Unmatched statement _data[i][1]=""; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched statement processBeanInfo(beans[i],info); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement processBeanInfo(beans[i],info); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    5The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero