File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/jdbc/config/DataSourceElement.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/java/sampler/JavaSampler.java | |||
Method name: Object clone()
|
Method name: void testEnded()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | DataSourceElement el = (DataSourceElement) super.clone();↵ | |||
2 | el.excaliburSource = excaliburSource;↵ | |||
3 | el.perThreadPoolSet = perThreadPoolSet;↵ | |||
4 | return el; | 1 | while (i.hasNext()) {↵ | |
2 | JavaSampler sampler = (JavaSampler) i.next();↵ | |||
3 | sampler.releaseJavaClient();↵ | |||
4 | i.remove();↵ | |||
5 |
| |||
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | DataSourceElement el = (DataSourceElement)super.clone(); |
| 5 | JavaSampler sampler = (JavaSampler)i.next(); | |||||||||||||||||||||||||
2 | el.excaliburSource = excaliburSource; |
| | ||||||||||||||||||||||||||
3 | el.perThreadPoolSet = perThreadPoolSet; |
| | ||||||||||||||||||||||||||
4 | return el; |
| | ||||||||||||||||||||||||||
|
| 6 | sampler.releaseJavaClient(); | ||||||||||||||||||||||||||
| 7 | i.remove(); |
Row | Violation |
---|---|
1 | Expression (JavaSampler)i.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression i.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Super method call DataSourceElement el=(DataSourceElement)super.clone(); cannot be extracted from method |
4 | Unmatched statement el.excaliburSource=excaliburSource; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement el.perThreadPoolSet=perThreadPoolSet; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement return el; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
7 | Unmatched return el; |
8 | Unmatched statement sampler.releaseJavaClient(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
9 | Clone fragment #1 returns variable el with type org.apache.jmeter.protocol.jdbc.config.DataSourceElement , while Clone fragment #2 returns variable sampler with type org.apache.jmeter.protocol.java.sampler.JavaSampler |