choiceList.removeAllItems(); for (int i = 0; i < items.length; i++) { choiceList.addItem(items[i]); }
this.clearFiles(); for (int idx=0; idx < files.length; idx++) { addFilename(files[idx]); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/gui/JLabeledChoice.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/FileListPanel.java
Method name: void setValues(String[]) Method name: void setFiles(String[])
Number of AST nodes: 3 Number of AST nodes: 3
1
choiceList.removeAllItems();
2
		
1
this.clearFiles();
3
for (int i = 0; i < items.length; i++) {
2
        for (int idx=0; idx < files.length; idx++) {
4
			choiceList.addItem(items[i]);
3
            addFilename(files[idx]);
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    choiceList.removeAllItems();
    1
    choiceList.removeAllItems();
    1
    this.clearFiles();
    Differences
    Expression1Expression2Difference
    removeAllItemsclearFilesMETHOD_INVOCATION_NAME_MISMATCH
    choiceListthisTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression choiceList.removeAllItems() is a void method call, and thus it cannot be parameterized
    Expression this.clearFiles() is a void method call, and thus it cannot be parameterized
    1
    this.clearFiles();
    2
    for (int i = 0; i < items.length; i++)
    2
    for (int i = 0; i < items.length; i++)
    2
    for (int idx = 0; idx < files.length; idx++)
    Differences
    Expression1Expression2Difference
    iidxVARIABLE_NAME_MISMATCH
    iidxVARIABLE_NAME_MISMATCH
    itemsfilesVARIABLE_NAME_MISMATCH
    iidxVARIABLE_NAME_MISMATCH
    2
    for (int idx = 0; idx < files.length; idx++)
    3
    choiceList.addItem(items[i]);
    3
    choiceList.addItem(items[i]);
    3
    addFilename(files[idx]);
    Differences
    Expression1Expression2Difference
    addItemaddFilenameMETHOD_INVOCATION_NAME_MISMATCH
    itemsfilesVARIABLE_NAME_MISMATCH
    iidxVARIABLE_NAME_MISMATCH
    choiceListMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression choiceList.addItem(items[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addFilename(files[idx]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression choiceList.addItem(items[i]) is a void method call, and thus it cannot be parameterized
    Expression addFilename(files[idx]) is a void method call, and thus it cannot be parameterized
    Expression choiceList.addItem(items[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addFilename(files[idx]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression choiceList.addItem(items[i]) is a void method call, and thus it cannot be parameterized
    Expression addFilename(files[idx]) is a void method call, and thus it cannot be parameterized
    3
    addFilename(files[idx]);
    Precondition Violations (10)
    Row Violation
    1Expression choiceList.removeAllItems() is a void method call, and thus it cannot be parameterized
    2Expression this.clearFiles() is a void method call, and thus it cannot be parameterized
    3Expression choiceList.addItem(items[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression addFilename(files[idx]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression choiceList.addItem(items[i]) is a void method call, and thus it cannot be parameterized
    6Expression addFilename(files[idx]) is a void method call, and thus it cannot be parameterized
    7Expression choiceList.addItem(items[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression addFilename(files[idx]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression choiceList.addItem(items[i]) is a void method call, and thus it cannot be parameterized
    10Expression addFilename(files[idx]) is a void method call, and thus it cannot be parameterized