File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/monitor/parser/MonitorHandler.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/SoapSampler.java | |||
Method name: void startElement(String, String, String, Attributes)
|
Method name: int setPostHeaders(PostMethod)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for (int idx = 0; idx < attributes.getLength(); idx++) {↵ | 1 | for (int idx = 0; idx < ↵ | |
2 | String attr = attributes.getQName(idx);↵ | |||
3 | if (attr.equals(Constants.ATTRIBUTE_NAME)) {↵ | |||
4 | connector.setName(attributes↵ | 2 | headerSize; idx++) {↵ | |
3 | Header hd = mngr.getHeader(idx);↵ | |||
4 | if (HEADER_CONTENT_LENGTH.equalsIgnoreCase(hd.getName())) {// Use this to override file length↵ | |||
5 | .getValue(idx));↵ | 5 | length = Integer.parseInt(hd.getValue());↵ | |
6 | }↵ | |||
7 | ↵ | 6 | }↵ | |
7 | // All the other headers are set up by HTTPSampler2.setupConnection()↵ | |||
8 | } | 8 | } | |
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 | 9 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
29 | for (int idx = 0; idx < attributes.getLength(); idx++) |
| 5 | for (int idx = 0; idx < headerSize; idx++) | ||||||||||||||||
|
| 6 | Header hd = mngr.getHeader(idx); | |||||||||||||||||
30 | String attr = attributes.getQName(idx); |
| | |||||||||||||||||
31 | if (attr.equals(Constants.ATTRIBUTE_NAME)) |
| 7 | if (HEADER_CONTENT_LENGTH.equalsIgnoreCase(hd.getName())) | ||||||||||||||||
|
| 8 | length = Integer.parseInt(hd.getValue()); | |||||||||||||||||
32 | connector.setName(attributes.getValue(idx)); |
| |
Row | Violation |
---|---|
1 | Unmatched statement Header hd=mngr.getHeader(idx); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement String attr=attributes.getQName(idx); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement length=Integer.parseInt(hd.getValue()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement connector.setName(attributes.getValue(idx)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |