for (int count = 0; count < elements.length; count++) { temp.append(elements[count]); if (count + 1 < elements.length) { temp.append("\t"); } }
for (int count = 0; count < elements.length; count++) { temp.append(getColumnValue(count)); if (count + 1 < elements.length) { temp.append("\t"); } }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/collections/Data.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/collections/Data.java
Method name: String[] getDataAsText() Method name: String[] getDataAsText()
Number of AST nodes: 4 Number of AST nodes: 4
1
for (int count = 0; count < elements.length; count++) {
1
for (int count = 0; count < elements.length; count++) {
2
			temp.append(elements[count]);
2
				temp.append(getColumnValue(count));
3
			if (count + 1 < elements.length) {
3
				if (count + 1 < elements.length) {
4
				temp.append("\t");
4
					temp.append("\t");
5
			}
5
				}
6
		}
6
			}
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 the same method
Number of node comparisons9
  1. {Non-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)0.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    4
    for (int count = 0; count < elements.length; count++)
    13
    for (int count = 0; count < elements.length; count++)
    5
    temp.append(elements[count]);
    5
    temp.append(elements[count]);
    Preondition Violations
    Unmatched statement temp.append(elements[count]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                    
                                                                                  
    14
    temp.append(getColumnValue(count));
    Preondition Violations
    Unmatched statement temp.append(getColumnValue(count)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    14
    temp.append(getColumnValue(count));
    6
    if (count + 1 < elements.length)
    15
    if (count + 1 < elements.length)
    7
    temp.append("\t");
    16
    temp.append("\t");
    Precondition Violations (2)
    Row Violation
    1Unmatched statement temp.append(elements[count]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement temp.append(getColumnValue(count)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted