File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.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 | HTTPSamplerBase base = (HTTPSamplerBase) super.clone();↵ | |||
2 | base.dynamicPath = dynamicPath;↵ | |||
3 | base.fileList = null;↵ | |||
4 | return base; | 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 | HTTPSamplerBase base = (HTTPSamplerBase)super.clone(); |
| 5 | JavaSampler sampler = (JavaSampler)i.next(); | |||||||||||||||||||||||||
2 | base.dynamicPath = dynamicPath; |
| | ||||||||||||||||||||||||||
3 | base.fileList = null; |
| | ||||||||||||||||||||||||||
4 | return base; |
| | ||||||||||||||||||||||||||
|
| 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 HTTPSamplerBase base=(HTTPSamplerBase)super.clone(); cannot be extracted from method |
4 | Unmatched statement base.dynamicPath=dynamicPath; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement base.fileList=null; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement return base; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
7 | Unmatched return base; |
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 base with type org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase , while Clone fragment #2 returns variable sampler with type org.apache.jmeter.protocol.java.sampler.JavaSampler |