super.configureTestElement(element); TestAction ta = (TestAction) element; ta.setAction(action); ta.setTarget(target); ta.setDuration(durationString);
if (controller instanceof IfController) { IfController ifController = (IfController) controller; ifController.setCondition(theCondition.getText()); ifController.setEvaluateAll(evaluateAll.isSelected()); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/sampler/gui/TestActionGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/gui/IfControllerPanel.java
Method name: void modifyTestElement(TestElement) Method name: void modifyTestElement(TestElement)
Number of AST nodes: 5 Number of AST nodes: 4
1
super.configureTestElement(element);
2
		TestAction ta = (TestAction) element;
3
		ta.setAction(action);
4
		ta.setTarget(target);
5
		ta.setDuration(durationString);
1
if (controller instanceof IfController) {
2
			IfController ifController = (IfController) controller;
3
			ifController.setCondition(theCondition.getText());
4
			ifController.setEvaluateAll(evaluateAll.isSelected());
5
		}
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 having the same super class
Number of node comparisons15
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    super.configureTestElement(element);
    1
    super.configureTestElement(element);
    5
    ifController.setEvaluateAll(evaluateAll.isSelected());
    Differences
    Expression1Expression2Difference
    super.configureTestElement(element)ifController.setEvaluateAll(evaluateAll.isSelected())TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression ifController.setEvaluateAll(evaluateAll.isSelected()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression super.configureTestElement(element) is a void method call, and thus it cannot be parameterized
    Expression ifController.setEvaluateAll(evaluateAll.isSelected()) is a void method call, and thus it cannot be parameterized
    5
    ifController.setEvaluateAll(evaluateAll.isSelected());
    2
    TestAction ta = (TestAction)element;
    2
    TestAction ta = (TestAction)element;
    3
    IfController ifController = (IfController)controller;
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.sampler.TestActionorg.apache.jmeter.control.IfControllerSUBCLASS_TYPE_MISMATCH
    taifControllerVARIABLE_NAME_MISMATCH
    org.apache.jmeter.sampler.TestActionorg.apache.jmeter.control.IfControllerSUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.sampler.TestActionorg.apache.jmeter.control.IfControllerSUBCLASS_TYPE_MISMATCH
    elementcontrollerVARIABLE_NAME_MISMATCH
    3
    IfController ifController = (IfController)controller;
    3
    ta.setAction(action);
                                                    
    4
    ta.setTarget(target);
                                                    
    5
    ta.setDuration(durationString);
    5
    ta.setDuration(durationString);
    4
    ifController.setCondition(theCondition.getText());
    Differences
    Expression1Expression2Difference
    setDurationsetConditionMETHOD_INVOCATION_NAME_MISMATCH
    durationStringtheCondition.getText()TYPE_COMPATIBLE_REPLACEMENT
    taifControllerVARIABLE_NAME_MISMATCH
    org.apache.jmeter.sampler.TestActionorg.apache.jmeter.control.IfControllerSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression ta.setDuration(durationString) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ifController.setCondition(theCondition.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ta.setDuration(durationString) is a void method call, and thus it cannot be parameterized
    Expression ifController.setCondition(theCondition.getText()) is a void method call, and thus it cannot be parameterized
    4
    ifController.setCondition(theCondition.getText());
    Precondition Violations (8)
    Row Violation
    1Expression ifController.setEvaluateAll(evaluateAll.isSelected()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression super.configureTestElement(element) is a void method call, and thus it cannot be parameterized
    3Expression ifController.setEvaluateAll(evaluateAll.isSelected()) is a void method call, and thus it cannot be parameterized
    4Expression ta.setDuration(durationString) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression ifController.setCondition(theCondition.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression ta.setDuration(durationString) is a void method call, and thus it cannot be parameterized
    7Expression ifController.setCondition(theCondition.getText()) is a void method call, and thus it cannot be parameterized
    8Clone fragment #1 returns variables ta , while Clone fragment #2 returns variables