if (myClass.isInstance(args)) {
if (ascending) {
elements.addFirst(args);
} else {
elements.add(args);
}
}
if(hideFileData) {
out.write("<actual file content, not shown here>".getBytes("UTF-8"));
}
else {
super.sendData(out);
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
|
Method name: Collection findApplicableElements(JMeterTreeNode, Class, boolean)
|
|
Method name: void sendData(OutputStream)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 3
|
|
1 | if (myClass.isInstance(args)) {↵ | | 1 | if↵
|
2 | if (ascending) {↵ | | |
|
3 | elements.addFirst(args);↵ | | |
|
4 | } else {↵ | | |
|
5 | elements.add(args);↵ | | |
|
6 | }↵ | | |
|
7 | ↵ | | 2 | (hideFileData) {↵
|
| | | 3 | out.write("<actual file content, not shown here>".getBytes("UTF-8"));↵
|
| | | 4 | }↵
|
| | | 5 | else {↵
|
| | | 6 | super.sendData(out);↵
|
8 | } | | 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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
27 | if (ascending) | | 1 | if (hideFileData) |
| | | 2 | out.write("<actual file content, not shown here>".getBytes("UTF-8")); |
28 | | | | |
| | | | |
| | | 3 | |
29 | | | | |
Precondition Violations (0)
Row |
Violation |