super.configure(el);
XPathAssertion assertion = (XPathAssertion) el;
xpath.setXPath(assertion.getXPathString());
xpath.setNegated(assertion.isNegated());
xml.configure(assertion);
super.configure(element);
if (element instanceof IfController) {
IfController ifController = (IfController) element;
theCondition.setText(ifController.getCondition());
evaluateAll.setSelected(ifController.isEvaluateAll());
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/XPathAssertionGui.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/gui/IfControllerPanel.java
|
Method name: void configure(TestElement)
|
|
Method name: void configure(TestElement)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | super.configure(el);↵ | | 1 | super.configure(element);↵
|
2 | XPathAssertion assertion = (XPathAssertion) el;↵ | | 2 | ↵
|
3 | xpath.setXPath(assertion.getXPathString());↵ | | |
|
4 | xpath.setNegated(assertion.isNegated());↵ | | |
|
|
5 | xml.configure(assertion); | | 3 | if (element instanceof IfController) {↵
|
| | | 4 | IfController ifController = (IfController) element;↵
|
| | | 5 | theCondition.setText(ifController.getCondition());↵
|
| | | 6 | evaluateAll.setSelected(ifController.isEvaluateAll());↵
|
| | | 7 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | super.configure(el); | | 1 | super.configure(element); |
2 | XPathAssertion assertion = (XPathAssertion)el; | | | |
3 | xpath.setXPath(assertion.getXPathString()); | | | |
4 | xpath.setNegated(assertion.isNegated()); | | | |
5 | xml.configure(assertion); | | | |
Precondition Violations (0)
Row |
Violation |