super.configure(element); if (element instanceof IfController) { IfController ifController = (IfController) element; theCondition.setText(ifController.getCondition()); evaluateAll.setSelected(ifController.isEvaluateAll()); }
configureTestElement(controller); 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/control/gui/IfControllerPanel.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/gui/IfControllerPanel.java
Method name: void configure(TestElement) Method name: void modifyTestElement(TestElement)
Number of AST nodes: 5 Number of AST nodes: 5
1
super.configure(element);
1
configureTestElement
2
		if (element
2
(controller);
3
 instanceof IfController) {
3
		if (controller instanceof IfController) {
4
			IfController ifController = (IfController) element;
4
			IfController ifController = (IfController) 
5
			theCondition.setText(
5
controller;
6
ifController.getCondition());
6
			ifController.setCondition(
7
			evaluateAll.setSelected(
7
theCondition.getText());
8
ifController.isEvaluateAll());
8
			ifController.setEvaluateAll(evaluateAll.isSelected());
9
		}
9
		}
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.1
Clones locationClones are declared in the same class
Number of node comparisons17
  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 fragment2
    Time elapsed for statement mapping (ms)5366.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    super.configure(element);
    1
    super.configure(element);
    1
    configureTestElement(controller);
    Differences
    Expression1Expression2Difference
    super.configure(element)configureTestElement(controller)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression super.configure(element) is a void method call, and thus it cannot be parameterized
    Expression configureTestElement(controller) is a void method call, and thus it cannot be parameterized
    1
    configureTestElement(controller);
    2
    if (element instanceof IfController)
    2
    if (element instanceof IfController)
    2
    if (controller instanceof IfController)
    Differences
    Expression1Expression2Difference
    elementcontrollerVARIABLE_NAME_MISMATCH
    2
    if (controller instanceof IfController)
    3
    IfController ifController = (IfController)element;
    3
    IfController ifController = (IfController)element;
    3
    IfController ifController = (IfController)controller;
    Differences
    Expression1Expression2Difference
    elementcontrollerVARIABLE_NAME_MISMATCH
    3
    IfController ifController = (IfController)controller;
                                                                                                              
    4
    ifController.setCondition(theCondition.getText());
    4
    theCondition.setText(ifController.getCondition());
                                                                                                              
                                                                                                                      
    5
    ifController.setEvaluateAll(evaluateAll.isSelected());
    5
    evaluateAll.setSelected(ifController.isEvaluateAll());
                                                                                                                      
    Precondition Violations (2)
    Row Violation
    1Expression super.configure(element) is a void method call, and thus it cannot be parameterized
    2Expression configureTestElement(controller) is a void method call, and thus it cannot be parameterized