HttpMirrorThread thd = new HttpMirrorThread(clientSocket);
log.info("Starting new Mirror thread");
thd.start();
if (queue == null) {
queue = new SampleQueue();
Thread thread = new Thread(queue);
// thread.setPriority(Thread.MAX_PRIORITY);
thread.start();
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/control/HttpMirrorServer.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/threads/ThreadGroup.java
|
Method name: void run()
|
|
Method name: void sampleOccurred(SampleEvent)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 4
|
|
1 | HttpMirror↵ | | 1 | if (queue == null) {↵
|
| | | 2 | queue = new SampleQueue();↵
|
2 | Thread thd = new HttpMirrorThread(clientSocket);↵ | | 3 | Thread thread = new ↵
|
3 | log.info("Starting new Mirror thread"↵ | | 4 | Thread(queue);↵
|
4 | );↵ | | 5 | // thread.setPriority(Thread.MAX_PRIORITY);↵
|
5 | thd.start(); | | 6 | thread.start();↵
|
| | | 7 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 8 |
-
{Non-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.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 2 | queue = new SampleQueue(); |
| | | 3 | Thread thread = new Thread(queue); |
13 | HttpMirrorThread thd = new HttpMirrorThread(clientSocket); | | | |
14 | log.info("Starting new Mirror thread"); | | | |
15 | thd.start(); | | 4 | thread.start(); |
Precondition Violations (1)
Row |
Violation |
1 | Unmatched statement HttpMirrorThread thd=new HttpMirrorThread(clientSocket); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |