File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/HTMLAssertionGui.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/HTMLAssertionGui.java | |||
Method name: void modifyTestElement(TestElement)
|
Method name: void modifyTestElement(TestElement)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | String warningThresholdString = warningThresholdField.getText();↵ | 1 | String errorThresholdString = errorThresholdField.getText();↵ | |
2 | long warningThreshold = 0;↵ | 2 | long errorThreshold = 0;↵ | |
3 | try {↵ | 3 | try {↵ | |
4 | warningThreshold = Long.parseLong(warningThresholdString);↵ | 4 | errorThreshold = Long.parseLong(errorThresholdString);↵ | |
5 | } catch (NumberFormatException e) {↵ | 5 | } catch (NumberFormatException e) {↵ | |
6 | warningThreshold = 0;↵ | 6 | errorThreshold = 0;↵ | |
7 | }↵ | 7 | }↵ | |
8 | ((HTMLAssertion) inElement).setWarningThreshold(warningThreshold); | 8 | ((HTMLAssertion) inElement).setErrorThreshold(errorThreshold); | |
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 the same method |
Number of node comparisons | 13 |
Number of mapped statements | 5 |
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.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8 | String warningThresholdString = warningThresholdField.getText(); |
| 3 | String errorThresholdString = errorThresholdField.getText(); | |||||||||||||||||
9 | long warningThreshold = 0; |
| 4 | long errorThreshold = 0; | |||||||||||||||||
10 | try |
| 5 | try | |||||||||||||||||
11 | warningThreshold = Long.parseLong(warningThresholdString); |
| 6 | errorThreshold = Long.parseLong(errorThresholdString); | |||||||||||||||||
12 | ((HTMLAssertion)inElement).setWarningThreshold(warningThreshold); |
| 7 | ((HTMLAssertion)inElement).setErrorThreshold(errorThreshold); |
Row | Violation |
---|---|
1 | Expression ((HTMLAssertion)inElement).setWarningThreshold(warningThreshold) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression ((HTMLAssertion)inElement).setErrorThreshold(errorThreshold) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression ((HTMLAssertion)inElement).setWarningThreshold(warningThreshold) is a void method call, and thus it cannot be parameterized |
4 | Expression ((HTMLAssertion)inElement).setErrorThreshold(errorThreshold) is a void method call, and thus it cannot be parameterized |