File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/util/JsseSSLManager.java | |||
Method name: String sendPostData(PostMethod)
|
Method name: SSLContext createContext()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | for(int i = 0; i < partNo; i++) {↵ | 1 | for (int i = 0; i < trustmanagers.length; i++) {↵ | |
2 | if(parts[i] instanceof ViewableFilePart) {↵ | 2 | ↵ | |
3 | ((ViewableFilePart) parts[i]).setHideFileData(false);↵ | |||
4 | }↵ | 3 | if (trustmanagers[i] instanceof X509TrustManager) {↵ | |
4 | trustmanagers[i] = new CustomX509TrustManager(↵ | |||
5 | (X509TrustManager)trustmanagers[i]); ↵ | |||
5 | ↵ | 6 | }↵ | |
6 | } | 7 |
| |
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 | 7 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 13.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
37 | for (int i = 0; i < partNo; i++) |
| 17 | for (int i = 0; i < trustmanagers.length; i++) | ||||||||||||||||||||
38 | if (parts[i] instanceof ViewableFilePart) |
| 18 | if (trustmanagers[i] instanceof X509TrustManager) | ||||||||||||||||||||
|
| 19 | trustmanagers[i] = new CustomX509TrustManager((X509TrustManager)trustmanagers[i]); | |||||||||||||||||||||
39 | ((ViewableFilePart)parts[i]).setHideFileData(false); |
| |
Row | Violation |
---|---|
1 | Expression trustmanagers.length cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Type org.apache.commons.httpclient.methods.multipart.Part[] of variable parts does not match with type javax.net.ssl.TrustManager[] of variable trustmanagers |
3 | Expression parts[i] instanceof ViewableFilePart cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression trustmanagers[i] instanceof X509TrustManager cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type org.apache.jmeter.protocol.http.sampler.HTTPSampler2.ViewableFilePart does not match with type javax.net.ssl.X509TrustManager |
6 | Unmatched statement trustmanagers[i]=new CustomX509TrustManager((X509TrustManager)trustmanagers[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
7 | Unmatched statement ((ViewableFilePart)parts[i]).setHideFileData(false); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | The refactoring of the clones is infeasible, because classes org.apache.jmeter.protocol.http.sampler.HTTPSampler2 and org.apache.jmeter.util.JsseSSLManager do not have a common superclass |