File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/AssertionGui.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/AssertionGui.java | |||
Method name: void modifyTestElement(TestElement)
|
Method name: void modifyTestElement(TestElement)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (responseCodeButton.isSelected()) {↵ | 1 | if (containsBox.isSelected()) {↵ | |
2 | ra.setTestFieldResponseCode();↵ | 2 | ra.setToContainsType();↵ | |
3 | } else if (responseMessageButton.isSelected()) {↵ | 3 | } else if (equalsBox.isSelected()) {↵ | |
4 | ra.setTestFieldResponseMessage();↵ | |||
5 | } else if (responseHeadersButton↵ | 4 | ra.setToEqualsType();↵ | |
6 | .isSelected()) {↵ | 5 | } else if (substringBox.isSelected()) {↵ | |
7 | ra.setTestFieldResponseHeaders();↵ | 6 | ra.setToSubstringType();↵ | |
8 | } else { // Assume URL↵ | 7 | } else {↵ | |
9 | ra.setTestFieldURL();↵ | 8 | ra.setToMatchType();↵ | |
10 | } | 9 |
| |
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.5 |
Clones location | Clones are in the same method |
Number of node comparisons | 37 |
Number of mapped statements | 7 |
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) | 1.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | if (responseCodeButton.isSelected()) |
| 18 | if (containsBox.isSelected()) | ||||||||||||
11 | ra.setTestFieldResponseCode(); |
| 19 | ra.setToContainsType(); | ||||||||||||
12 | else if (responseMessageButton.isSelected()) |
| 20 | else if (equalsBox.isSelected()) | ||||||||||||
13 | ra.setTestFieldResponseMessage(); |
| 21 | ra.setToEqualsType(); | ||||||||||||
14 | else if (responseHeadersButton.isSelected()) |
| 22 | else if (substringBox.isSelected()) | ||||||||||||
15 | ra.setTestFieldResponseHeaders(); |
| 23 | ra.setToSubstringType(); | ||||||||||||
else | else | |||||||||||||||
16 | ra.setTestFieldURL(); |
| 24 | ra.setToMatchType(); |
Row | Violation |
---|---|
1 | Expression ra.setTestFieldResponseCode() is a void method call, and thus it cannot be parameterized |
2 | Expression ra.setToContainsType() is a void method call, and thus it cannot be parameterized |
3 | Expression ra.setTestFieldResponseMessage() is a void method call, and thus it cannot be parameterized |
4 | Expression ra.setToEqualsType() is a void method call, and thus it cannot be parameterized |
5 | Expression ra.setTestFieldResponseHeaders() is a void method call, and thus it cannot be parameterized |
6 | Expression ra.setToSubstringType() is a void method call, and thus it cannot be parameterized |
7 | Expression ra.setTestFieldURL() is a void method call, and thus it cannot be parameterized |
8 | Expression ra.setToMatchType() is a void method call, and thus it cannot be parameterized |