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 focusLost(FocusEvent)
|
Method name: void focusLost(FocusEvent)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | boolean isInvalid = false;↵ | 1 | boolean isInvalid = false;↵ | |
2 | try {↵ | 2 | try {↵ | |
3 | long errorThreshold = Long.parseLong(errorThresholdString);↵ | 3 | long warningThreshold = Long.parseLong(warningThresholdString);↵ | |
4 | if (errorThreshold < 0) {↵ | 4 | if (warningThreshold < 0) {↵ | |
5 | isInvalid = true;↵ | 5 | isInvalid = true;↵ | |
6 | }↵ | 6 | }↵ | |
7 | } catch (NumberFormatException ex) {↵ | 7 | } catch (NumberFormatException ex) {↵ | |
8 | isInvalid = true;↵ | 8 | isInvalid = true;↵ | |
9 | }↵ | 9 | }↵ | |
10 | if (isInvalid) {↵ | 10 | if (isInvalid) {↵ | |
11 | log.warn("HTMLAssertionGui: Error threshold Not a valid number!");↵ | 11 | log.warn("HTMLAssertionGui: Error threshold Not a valid number!");↵ | |
12 | JOptionPane.showMessageDialog(null, "Threshold for errors is invalid", "Error",↵ | 12 | JOptionPane.showMessageDialog(null, "Threshold for warnings is invalid", "Error",↵ | |
13 | JOptionPane.ERROR_MESSAGE);↵ | 13 | JOptionPane.ERROR_MESSAGE);↵ | |
14 | } | 14 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 19 |
Number of mapped statements | 8 |
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.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | boolean isInvalid = false; | 14 | boolean isInvalid = false; | ||||||||||||||
5 | try | 15 | try | ||||||||||||||
6 | long errorThreshold = Long.parseLong(errorThresholdString); |
| 16 | long warningThreshold = Long.parseLong(warningThresholdString); | |||||||||||||
7 | if (errorThreshold < 0) |
| 17 | if (warningThreshold < 0) | |||||||||||||
8 | isInvalid = true; | 18 | isInvalid = true; | ||||||||||||||
9 | if (isInvalid) | 19 | if (isInvalid) | ||||||||||||||
10 | log.warn("HTMLAssertionGui: Error threshold Not a valid number!"); | 20 | log.warn("HTMLAssertionGui: Error threshold Not a valid number!"); | ||||||||||||||
11 | JOptionPane.showMessageDialog(null, "Threshold for errors is invalid", "Error", JOptionPane.ERROR_MESSAGE); |
| 21 | JOptionPane.showMessageDialog(null, "Threshold for warnings is invalid", "Error", JOptionPane.ERROR_MESSAGE); |
Row | Violation |
---|