File path: /apache-jmeter-2.11/test/src/org/apache/jmeter/resources/PackageTest.java | File path: /apache-jmeter-2.11/src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java | |||
Method name: String printLabels(Map
|
Method name: String convertSoapHeaders(Map
|
|||
Number of AST nodes: 3 | Number of AST nodes: 2 | |||
1 | /** | 1 | public String convertSoapHeaders(Map<String, String> ht) { | |
2 | * Build message with misssing labels per bundle | 2 | StringBuilder buf = new StringBuilder(); | |
3 | * @param missingLabelsPerBundle | 3 | for (Entry<String, String> entry : ht.entrySet()) { | |
4 | * @return String | 4 | buf.append(entry.getKey()).append("=").append(entry.getValue()).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$ | |
5 | */ | 5 | } | |
6 | private String printLabels(Map<String, Map<String, String>> missingLabelsPerBundle) { | 6 | return buf.toString(); | |
7 | StringBuilder builder = new StringBuilder(); | 7 | } | |
8 | for (Iterator<Map.Entry<String,Map<String, String>>> iterator = missingLabelsPerBundle.entrySet().iterator(); iterator.hasNext();) { | |||
9 | Map.Entry<String,Map<String, String>> entry = iterator.next(); | |||
10 | builder.append("Missing labels in bundle:"+entry.getKey()+"\r\n"); | |||
11 | for (Iterator<Map.Entry<String,String>> it2 = entry.getValue().entrySet().iterator(); it2.hasNext();) { | |||
12 | Map.Entry<String,String> entry2 = it2.next(); | |||
13 | builder.append(entry2.getKey()+"="+entry2.getValue()+"\r\n"); | |||
14 | } | |||
15 | builder.append("======================================================\r\n"); | |||
16 | } | |||
17 | return builder.toString(); | |||
18 | } | |||
See real code fragment | See real code fragment |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Similarity Score | 0.750 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | for (Iterator<Map.Entry<String, String>> it2 = entry.getValue().entrySet().iterator(); it2.hasNext(); ) |
| 2 | for (Entry<String, String> entry : ht.entrySet()) | ||||||||||||||
6 | Map.Entry<String, String> entry2 = it2.next(); |
| | |||||||||||||||
7 | builder.append(entry2.getKey() + "=" + entry2.getValue() + "\r\n"); |
| 3 | buf.append(entry.getKey()).append("=").append(entry.getValue()).append("\n"); |
Row | Violation |
---|---|
1 | Expression buf.append(entry.getKey()).append("=").append(entry.getValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |