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(Collection)
|
Method name: String getContentType()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | HashTree tree = getTreePath(treePath);↵ | 1 | H↵ | |
2 | if (tree != null) {↵ | |||
3 | return tree.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.1 |
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) | 0.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Header contentTypeHeader = (Header)headers.get(CONTENT_TYPE); | ||||||||||||||||
1 | HashTree tree = getTreePath(treePath); | | ||||||||||||||||
2 | if (tree != null) |
| 2 | if (contentTypeHeader != null) | ||||||||||||||
|
| 3 | return contentTypeHeader.getValue(); | |||||||||||||||
3 | return tree.list(); |
| | |||||||||||||||
4 | return new LinkedList(); |
| 4 | return null; |
Row | Violation |
---|---|
1 | Type org.apache.jorphan.collections.HashTree of variable tree does not match with type org.apache.jmeter.protocol.http.control.Header of variable contentTypeHeader |
2 | Unmatched return contentTypeHeader.getValue(); |
3 | Unmatched return tree.list(); |