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/SizeAssertionGui.java | |||
Method name: void focusLost(FocusEvent)
|
Method name: void focusLost(FocusEvent)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 6 | |||
1 | boolean isInvalid = false;↵ | |||
2 | try {↵ | |||
3 | long warningThreshold↵ | 1 | try {↵ | |
4 | = Long.parseLong(warningThresholdString);↵ | 2 | long assertionSize = Long.parseLong(sizeString);↵ | |
5 | if (warningThreshold < 0) {↵ | 3 | if (assertionSize < 0) {↵ | |
6 | isInvalid = true;↵ | 4 | isInvalid = true;↵ | |
7 | }↵ | 5 | }↵ | |
8 | } catch (NumberFormatException ex) {↵ | 6 | } catch (NumberFormatException ex) {↵ | |
9 | isInvalid = true;↵ | 7 | isInvalid = true;↵ | |
10 | }↵ | 8 | }↵ | |
11 | if (isInvalid) {↵ | 9 | if (isInvalid) {↵ | |
12 | log.warn("HTMLAssertionGui: Error threshold Not a valid number!");↵ | 10 | ↵ | |
13 | JOptionPane.showMessageDialog(null, "Threshold for warnings is invalid", ↵ | 11 | JOptionPane.showMessageDialog(null, ↵ | |
12 | JMeterUtils.getResString("size_assertion_input_error"), //$NON-NLS-1$↵ | |||
14 | "Error",↵ | 13 | "Error",↵ | |
15 | JOptionPane.ERROR_MESSAGE);↵ | 14 | JOptionPane.ERROR_MESSAGE);↵ | |
16 | } | 15 |
| |
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 different classes having the same super class |
Number of node comparisons | 15 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.3 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14 | boolean isInvalid = false; | | |||||||||||||||
15 | try | 4 | try | ||||||||||||||
16 | long warningThreshold = Long.parseLong(warningThresholdString); |
| 5 | long assertionSize = Long.parseLong(sizeString); | |||||||||||||
17 | if (warningThreshold < 0) |
| 6 | if (assertionSize < 0) | |||||||||||||
18 | isInvalid = true; | 7 | isInvalid = true; | ||||||||||||||
19 | if (isInvalid) | 8 | if (isInvalid) | ||||||||||||||
20 | log.warn("HTMLAssertionGui: Error threshold Not a valid number!"); | | |||||||||||||||
21 | JOptionPane.showMessageDialog(null, "Threshold for warnings is invalid", "Error", JOptionPane.ERROR_MESSAGE); |
| 9 | JOptionPane.showMessageDialog(null, JMeterUtils.getResString("size_assertion_input_error"), "Error", JOptionPane.ERROR_MESSAGE); |
Row | Violation |
---|