super.configure(el); ParamModifier model = (ParamModifier) el; updateGui(model);
while (reader.hasMoreChildren()) { reader.moveDown(); JMeterProperty subProp = (JMeterProperty) readItem(reader, context, prop); prop.addProperty(subProp); reader.moveUp(); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/modifier/gui/ParamModifierGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/save/converters/MultiPropertyConverter.java
Method name: void configure(TestElement) Method name: Object unmarshal(HierarchicalStreamReader, UnmarshallingContext)
Number of AST nodes: 3 Number of AST nodes: 5
1
super.configure(el);
2
		ParamModifier model = (ParamModifier) el;
3
		updateGui(model);
1
while (reader.hasMoreChildren()) {
2
			reader.moveDown();
3
			JMeterProperty subProp = (JMeterProperty) readItem(reader, context, prop);
4
			prop.addProperty(subProp);
5
			reader.moveUp();
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.0
Clones locationClones are in different classes
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    super.configure(el);
    1
    super.configure(el);
    6
    prop.addProperty(subProp);
    Differences
    Expression1Expression2Difference
    super.configure(el)prop.addProperty(subProp)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression prop.addProperty(subProp) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression super.configure(el) is a void method call, and thus it cannot be parameterized
    Expression prop.addProperty(subProp) is a void method call, and thus it cannot be parameterized
    6
    prop.addProperty(subProp);
    2
    ParamModifier model = (ParamModifier)el;
                                                                                      
    3
    updateGui(model);
    3
    updateGui(model);
    4
    reader.moveDown();
    Differences
    Expression1Expression2Difference
    updateGuimoveDownMETHOD_INVOCATION_NAME_MISMATCH
    updateGui(model)reader.moveDown()ARGUMENT_NUMBER_MISMATCH
    readerMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression updateGui(model) is a void method call, and thus it cannot be parameterized
    Expression reader.moveDown() is a void method call, and thus it cannot be parameterized
    Expression updateGui(model) is a void method call, and thus it cannot be parameterized
    Expression reader.moveDown() is a void method call, and thus it cannot be parameterized
    4
    reader.moveDown();
                                                                                                                                                    
    5
    JMeterProperty subProp = (JMeterProperty)readItem(reader, context, prop);
    Preondition Violations
    Unmatched statement JMeterProperty subProp=(JMeterProperty)readItem(reader,context,prop); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5
    JMeterProperty subProp = (JMeterProperty)readItem(reader, context, prop);
                                          
    7
    reader.moveUp();
    Precondition Violations (8)
    Row Violation
    1Expression prop.addProperty(subProp) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression super.configure(el) is a void method call, and thus it cannot be parameterized
    3Expression prop.addProperty(subProp) is a void method call, and thus it cannot be parameterized
    4Expression updateGui(model) is a void method call, and thus it cannot be parameterized
    5Expression reader.moveDown() is a void method call, and thus it cannot be parameterized
    6Expression updateGui(model) is a void method call, and thus it cannot be parameterized
    7Expression reader.moveDown() is a void method call, and thus it cannot be parameterized
    8Unmatched statement JMeterProperty subProp=(JMeterProperty)readItem(reader,context,prop); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted