Object[] rowData = new Object[getColumnCount()]; for (int i = 0; i < rowData.length; i++) { rowData[i] = createDefaultValue(i); } return rowData;
Object[] rowData = new Object[getColumnCount()]; for (int i = 0; i < rowData.length; i++) { rowData[i] = model.getColumnValue(i, row); } return rowData;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/PowerTableModel.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/PowerTableModel.java
Method name: Object[] createDefaultRow() Method name: Object[] getRowData(int)
Number of AST nodes: 4 Number of AST nodes: 4
1
Object[] rowData = new Object[getColumnCount()];
1
Object[] rowData = new Object[getColumnCount()];
2
		for (int i = 0; i < rowData.length; i++) {
2
		for (int i = 0; i < rowData.length; i++) {
3
			rowData[i] = createDefaultValue(i);
3
			rowData[i] = model.getColumnValue(i, row);
4
		}
4
		}
5
		return rowData;
5
		return rowData;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are declared in the same class
Number of node comparisons8
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    Object[] rowData = new Object[getColumnCount()];
    1
    Object[] rowData = new Object[getColumnCount()];
    2
    for (int i = 0; i < rowData.length; i++)
    2
    for (int i = 0; i < rowData.length; i++)
                                                                                        
    3
    rowData[i] = model.getColumnValue(i, row);
    Preondition Violations
    Unmatched statement rowData[i]=model.getColumnValue(i,row); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3
    rowData[i] = model.getColumnValue(i, row);
    3
    rowData[i] = createDefaultValue(i);
    3
    rowData[i] = createDefaultValue(i);
    Preondition Violations
    Unmatched statement rowData[i]=createDefaultValue(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                            
    4
    return rowData;
    4
    return rowData;
    Precondition Violations (2)
    Row Violation
    1Unmatched statement rowData[i]=model.getColumnValue(i,row); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement rowData[i]=createDefaultValue(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted