if (value instanceof List) { ((List) value).remove(index); }
if (value instanceof List) { ((List) value).set(index, new StringProperty(prop, prop)); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/property/CollectionProperty.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/property/CollectionProperty.java
Method name: void remove(int) Method name: void set(int, String)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (value instanceof List) {
1
if (value instanceof List) {
2
			((List) value).remove(index);
2
			((List) value).set(index, new StringProperty(prop, prop));
3
		}
3
		}
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.1
Clones locationClones are declared in the same class
Number of node comparisons4
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    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.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (value instanceof List)
    1
    if (value instanceof List)
    2
    ((List)value).remove(index);
    2
    ((List)value).remove(index);
    2
    ((List)value).set(index, new StringProperty(prop, prop));
    Differences
    Expression1Expression2Difference
    removesetMETHOD_INVOCATION_NAME_MISMATCH
    ((List)value).remove(index)((List)value).set(index,new StringProperty(prop,prop))ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression ((List)value).remove(index) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ((List)value).set(index,new StringProperty(prop,prop)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ((List)value).remove(index) is a void method call, and thus it cannot be parameterized
    Expression ((List)value).set(index,new StringProperty(prop,prop)) is a void method call, and thus it cannot be parameterized
    Expression ((List)value).remove(index) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ((List)value).set(index,new StringProperty(prop,prop)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ((List)value).remove(index) is a void method call, and thus it cannot be parameterized
    Expression ((List)value).set(index,new StringProperty(prop,prop)) is a void method call, and thus it cannot be parameterized
    2
    ((List)value).set(index, new StringProperty(prop, prop));
    Precondition Violations (8)
    Row Violation
    1Expression ((List)value).remove(index) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression ((List)value).set(index,new StringProperty(prop,prop)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression ((List)value).remove(index) is a void method call, and thus it cannot be parameterized
    4Expression ((List)value).set(index,new StringProperty(prop,prop)) is a void method call, and thus it cannot be parameterized
    5Expression ((List)value).remove(index) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression ((List)value).set(index,new StringProperty(prop,prop)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression ((List)value).remove(index) is a void method call, and thus it cannot be parameterized
    8Expression ((List)value).set(index,new StringProperty(prop,prop)) is a void method call, and thus it cannot be parameterized