restoreClass(el,reader,TestElement.GUI_CLASS); restoreClass(el,reader,TestElement.TEST_CLASS); restoreItem(el,reader,TestElement.NAME,true); restoreItem(el,reader,TestElement.ENABLED,false);
saveClass(el,writer,TestElement.GUI_CLASS); saveClass(el,writer,TestElement.TEST_CLASS); saveItem(el,writer,TestElement.NAME,true); saveItem(el,writer,TestElement.ENABLED,false);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/save/converters/ConversionHelp.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/save/converters/ConversionHelp.java
Method name: void restoreSpecialProperties(TestElement, HierarchicalStreamReader) Method name: void saveSpecialProperties(TestElement, HierarchicalStreamWriter)
Number of AST nodes: 4 Number of AST nodes: 4
1
restoreClass(el,reader,TestElement.GUI_CLASS);
1
saveClass(el,writer,TestElement.GUI_CLASS);
2
        restoreClass(el,reader,TestElement.TEST_CLASS);
2
        saveClass(el,writer,TestElement.TEST_CLASS);
3
        restoreItem(el,reader,TestElement.NAME,true);
3
        saveItem(el,writer,TestElement.NAME,true);
4
        restoreItem(el,reader,TestElement.ENABLED,false);
4
        saveItem(el,writer,TestElement.ENABLED,false);
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.0
Clones locationClones are declared in the same class
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    restoreClass(el, reader, TestElement.GUI_CLASS);
    1
    restoreClass(el, reader, TestElement.GUI_CLASS);
    3
    saveItem(el, writer, TestElement.NAME, true);
    Differences
    Expression1Expression2Difference
    restoreClasssaveItemMETHOD_INVOCATION_NAME_MISMATCH
    restoreClass(el,reader,TestElement.GUI_CLASS)saveItem(el,writer,TestElement.NAME,true)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression saveItem(el,writer,TestElement.NAME,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method saveItem
    Expression restoreClass(el,reader,TestElement.GUI_CLASS) is a void method call, and thus it cannot be parameterized
    Expression saveItem(el,writer,TestElement.NAME,true) is a void method call, and thus it cannot be parameterized
    Expression saveItem(el,writer,TestElement.NAME,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method saveItem
    Expression restoreClass(el,reader,TestElement.GUI_CLASS) is a void method call, and thus it cannot be parameterized
    Expression saveItem(el,writer,TestElement.NAME,true) is a void method call, and thus it cannot be parameterized
    3
    saveItem(el, writer, TestElement.NAME, true);
    2
    restoreClass(el, reader, TestElement.TEST_CLASS);
    2
    restoreClass(el, reader, TestElement.TEST_CLASS);
    4
    saveItem(el, writer, TestElement.ENABLED, false);
    Differences
    Expression1Expression2Difference
    restoreClasssaveItemMETHOD_INVOCATION_NAME_MISMATCH
    restoreClass(el,reader,TestElement.TEST_CLASS)saveItem(el,writer,TestElement.ENABLED,false)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression restoreClass(el,reader,TestElement.TEST_CLASS) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method restoreClass
    Expression saveItem(el,writer,TestElement.ENABLED,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method saveItem
    Expression restoreClass(el,reader,TestElement.TEST_CLASS) is a void method call, and thus it cannot be parameterized
    Expression saveItem(el,writer,TestElement.ENABLED,false) is a void method call, and thus it cannot be parameterized
    Expression restoreClass(el,reader,TestElement.TEST_CLASS) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method restoreClass
    Expression saveItem(el,writer,TestElement.ENABLED,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method saveItem
    Expression restoreClass(el,reader,TestElement.TEST_CLASS) is a void method call, and thus it cannot be parameterized
    Expression saveItem(el,writer,TestElement.ENABLED,false) is a void method call, and thus it cannot be parameterized
    4
    saveItem(el, writer, TestElement.ENABLED, false);
    3
    restoreItem(el, reader, TestElement.NAME, true);
    3
    restoreItem(el, reader, TestElement.NAME, true);
    1
    saveClass(el, writer, TestElement.GUI_CLASS);
    Differences
    Expression1Expression2Difference
    restoreItemsaveClassMETHOD_INVOCATION_NAME_MISMATCH
    restoreItem(el,reader,TestElement.NAME,true)saveClass(el,writer,TestElement.GUI_CLASS)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression restoreItem(el,reader,TestElement.NAME,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method restoreItem
    Expression restoreItem(el,reader,TestElement.NAME,true) is a void method call, and thus it cannot be parameterized
    Expression saveClass(el,writer,TestElement.GUI_CLASS) is a void method call, and thus it cannot be parameterized
    Expression restoreItem(el,reader,TestElement.NAME,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method restoreItem
    Expression restoreItem(el,reader,TestElement.NAME,true) is a void method call, and thus it cannot be parameterized
    Expression saveClass(el,writer,TestElement.GUI_CLASS) is a void method call, and thus it cannot be parameterized
    1
    saveClass(el, writer, TestElement.GUI_CLASS);
    4
    restoreItem(el, reader, TestElement.ENABLED, false);
    4
    restoreItem(el, reader, TestElement.ENABLED, false);
    2
    saveClass(el, writer, TestElement.TEST_CLASS);
    Differences
    Expression1Expression2Difference
    restoreItemsaveClassMETHOD_INVOCATION_NAME_MISMATCH
    restoreItem(el,reader,TestElement.ENABLED,false)saveClass(el,writer,TestElement.TEST_CLASS)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression restoreItem(el,reader,TestElement.ENABLED,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method restoreItem
    Expression saveClass(el,writer,TestElement.TEST_CLASS) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method saveClass
    Expression restoreItem(el,reader,TestElement.ENABLED,false) is a void method call, and thus it cannot be parameterized
    Expression saveClass(el,writer,TestElement.TEST_CLASS) is a void method call, and thus it cannot be parameterized
    Expression restoreItem(el,reader,TestElement.ENABLED,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method restoreItem
    Expression saveClass(el,writer,TestElement.TEST_CLASS) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method saveClass
    Expression restoreItem(el,reader,TestElement.ENABLED,false) is a void method call, and thus it cannot be parameterized
    Expression saveClass(el,writer,TestElement.TEST_CLASS) is a void method call, and thus it cannot be parameterized
    2
    saveClass(el, writer, TestElement.TEST_CLASS);
    Precondition Violations (28)
    Row Violation
    1Expression saveItem(el,writer,TestElement.NAME,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression restoreClass(el,reader,TestElement.GUI_CLASS) is a void method call, and thus it cannot be parameterized
    3Expression saveItem(el,writer,TestElement.NAME,true) is a void method call, and thus it cannot be parameterized
    4Expression saveItem(el,writer,TestElement.NAME,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression restoreClass(el,reader,TestElement.GUI_CLASS) is a void method call, and thus it cannot be parameterized
    6Expression saveItem(el,writer,TestElement.NAME,true) is a void method call, and thus it cannot be parameterized
    7Expression restoreClass(el,reader,TestElement.TEST_CLASS) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression saveItem(el,writer,TestElement.ENABLED,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression restoreClass(el,reader,TestElement.TEST_CLASS) is a void method call, and thus it cannot be parameterized
    10Expression saveItem(el,writer,TestElement.ENABLED,false) is a void method call, and thus it cannot be parameterized
    11Expression restoreClass(el,reader,TestElement.TEST_CLASS) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Expression saveItem(el,writer,TestElement.ENABLED,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression restoreClass(el,reader,TestElement.TEST_CLASS) is a void method call, and thus it cannot be parameterized
    14Expression saveItem(el,writer,TestElement.ENABLED,false) is a void method call, and thus it cannot be parameterized
    15Expression restoreItem(el,reader,TestElement.NAME,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Expression restoreItem(el,reader,TestElement.NAME,true) is a void method call, and thus it cannot be parameterized
    17Expression saveClass(el,writer,TestElement.GUI_CLASS) is a void method call, and thus it cannot be parameterized
    18Expression restoreItem(el,reader,TestElement.NAME,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19Expression restoreItem(el,reader,TestElement.NAME,true) is a void method call, and thus it cannot be parameterized
    20Expression saveClass(el,writer,TestElement.GUI_CLASS) is a void method call, and thus it cannot be parameterized
    21Expression restoreItem(el,reader,TestElement.ENABLED,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    22Expression saveClass(el,writer,TestElement.TEST_CLASS) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    23Expression restoreItem(el,reader,TestElement.ENABLED,false) is a void method call, and thus it cannot be parameterized
    24Expression saveClass(el,writer,TestElement.TEST_CLASS) is a void method call, and thus it cannot be parameterized
    25Expression restoreItem(el,reader,TestElement.ENABLED,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    26Expression saveClass(el,writer,TestElement.TEST_CLASS) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    27Expression restoreItem(el,reader,TestElement.ENABLED,false) is a void method call, and thus it cannot be parameterized
    28Expression saveClass(el,writer,TestElement.TEST_CLASS) is a void method call, and thus it cannot be parameterized