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: 4 | |||
1 | long errorThreshold = 0;↵ | 1 | long warningThreshold = 0;↵ | |
2 | try {↵ | 2 | try {↵ | |
3 | errorThreshold = Long.parseLong(errorThresholdString);↵ | 3 | warningThreshold = Long.parseLong(warningThresholdString);↵ | |
4 | } catch (NumberFormatException e) {↵ | 4 | } catch (NumberFormatException e) {↵ | |
5 | errorThreshold = 0;↵ | 5 | warningThreshold = 0;↵ | |
6 | }↵ | 6 | }↵ | |
7 | ((HTMLAssertion) inElement).setErrorThreshold(errorThreshold);↵ | 7 | ((HTMLAssertion) inElement).set↵ | |
8 | String warningThresholdString = warningThresholdField.getText(); | 8 | WarningThreshold(warningThreshold); | |
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 | 10 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | long errorThreshold = 0; |
| 9 | long warningThreshold = 0; | |||||||||||||||||
5 | try |
| 10 | try | |||||||||||||||||
6 | errorThreshold = Long.parseLong(errorThresholdString); |
| 11 | warningThreshold = Long.parseLong(warningThresholdString); | |||||||||||||||||
7 | ((HTMLAssertion)inElement).setErrorThreshold(errorThreshold); |
| 12 | ((HTMLAssertion)inElement).setWarningThreshold(warningThreshold); | |||||||||||||||||
8 | String warningThresholdString = warningThresholdField.getText(); | |
Row | Violation |
---|---|
1 | Expression ((HTMLAssertion)inElement).setErrorThreshold(errorThreshold) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression ((HTMLAssertion)inElement).setWarningThreshold(warningThreshold) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression ((HTMLAssertion)inElement).setErrorThreshold(errorThreshold) is a void method call, and thus it cannot be parameterized |
4 | Expression ((HTMLAssertion)inElement).setWarningThreshold(warningThreshold) is a void method call, and thus it cannot be parameterized |