File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/samplers/BatchSampleSender.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/samplers/StatisticalSampleSender.java | |||
Method name: void testEnded(String)
|
Method name: void testEnded(String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | try {↵ | 1 | try {↵ | |
2 | if (sampleStore.size() != 0) {↵ | 2 | if (sampleStore.size() != 0) {↵ | |
3 | listener.processBatch(sampleStore);↵ | 3 | ↵ | |
4 | sampleStore.clear();↵ | 4 | sendBatch();↵ | |
5 | }↵ | 5 | }↵ | |
6 | listener.testEnded(host);↵ | 6 | listener.testEnded(host);↵ | |
7 | } catch (RemoteException err) {↵ | 7 | } catch (RemoteException err) {↵ | |
8 | log.error("testEnded(host)", err);↵ | 8 | log.warn("testEnded(hostname)", err);↵ | |
9 | } | 9 |
| |
See real code fragment | See real code fragment |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 10 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 96.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | try |
| 1 | try | |||||||||||||||||||||
2 | if (sampleStore.size() != 0) | 2 | if (sampleStore.size() != 0) | ||||||||||||||||||||||
3 | listener.processBatch(sampleStore); |
| | ||||||||||||||||||||||
4 | sampleStore.clear(); |
| 3 | sendBatch(); | |||||||||||||||||||||
5 | listener.testEnded(host); | 4 | listener.testEnded(host); |
Row | Violation |
---|---|
1 | Expression log.error("testEnded(host)",err) is a void method call, and thus it cannot be parameterized |
2 | Expression log.warn("testEnded(hostname)",err) is a void method call, and thus it cannot be parameterized |
3 | Unmatched statement listener.processBatch(sampleStore); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement listener.processBatch(sampleStore); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
5 | Expression sampleStore.clear() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression sendBatch() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression sampleStore.clear() is a void method call, and thus it cannot be parameterized |
8 | Expression sendBatch() is a void method call, and thus it cannot be parameterized |
9 | Expression sampleStore.clear() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression sendBatch() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression sampleStore.clear() is a void method call, and thus it cannot be parameterized |
12 | Expression sendBatch() is a void method call, and thus it cannot be parameterized |