super(host, port);
if (cps <=0) {
throw new IllegalArgumentException("Speed (cps) <= 0");
}
CPS=cps;
if (cps <=0) {
throw new IllegalArgumentException("Speed (cps) <= 0");
}
sslSock=sock;
CPS=cps;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/util/SlowSocket.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/util/SlowSSLSocket.java
|
Method name: void SlowSocket(int, String, int)
|
|
Method name: void SlowSSLSocket(SSLSocket, int)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | super(host, port);↵ | | |
|
2 | if (cps <=0) {↵ | | 1 | if (cps <=0) {↵
|
3 | throw new IllegalArgumentException("Speed (cps) <= 0");↵ | | 2 | throw new IllegalArgumentException("Speed (cps) <= 0");↵
|
4 | }↵ | | 3 | }↵
|
5 | ↵ | | 4 | sslSock=sock;↵
|
6 | CPS=cps; | | 5 | CPS=cps;
|
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 having the same super class |
Number of node comparisons | 7 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.4 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | super(host, port); | | | |
2 | if (cps <= 0) | | 1 | if (cps <= 0) |
3 | throw new IllegalArgumentException("Speed (cps) <= 0"); | | 2 | throw new IllegalArgumentException("Speed (cps) <= 0"); |
| | | 3 | sslSock = sock; |
4 | CPS = cps; | | 4 | CPS = cps; |
Precondition Violations (0)
Row |
Violation |