File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/collections/HashTree.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java | |||
Method name: Collection list(Object)
|
Method name: String getContentType()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | HashTree temp = (HashTree) data.get(key);↵ | 1 | H↵ | |
2 | if (temp != null) {↵ | |||
3 | return temp.list();↵ | |||
4 | }↵ | |||
5 | return new LinkedList()↵ | 2 | eader contentTypeHeader = (Header) headers.get(CONTENT_TYPE);↵ | |
3 | if (contentTypeHeader != null) {↵ | |||
4 | return contentTypeHeader.getValue();↵ | |||
5 | }↵ | |||
6 | ; | 6 | return null; | |
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 8 |
Number of mapped statements | 2 |
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) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 1 | Header contentTypeHeader = (Header)headers.get(CONTENT_TYPE); | |||||||||||||||
1 | HashTree temp = (HashTree)data.get(key); |
| | |||||||||||||||
2 | if (temp != null) |
| 2 | if (contentTypeHeader != null) | ||||||||||||||
|
| 3 | return contentTypeHeader.getValue(); | |||||||||||||||
3 | return temp.list(); |
| | |||||||||||||||
4 | return new LinkedList(); |
| 4 | return null; |
Row | Violation |
---|---|
1 | Unmatched statement Header contentTypeHeader=(Header)headers.get(CONTENT_TYPE); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement HashTree temp=(HashTree)data.get(key); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Type org.apache.jorphan.collections.HashTree of variable temp does not match with type org.apache.jmeter.protocol.http.control.Header of variable contentTypeHeader |
4 | Unmatched statement return contentTypeHeader.getValue(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched return contentTypeHeader.getValue(); |
6 | Unmatched statement return temp.list(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | Unmatched return temp.list(); |