File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/XMLConfPanel.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/XPathPanel.java | |||
Method name: JCheckBox getTolerant()
|
Method name: JButton getCheckXPathButton()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (tolerant == null) {↵ | 1 | if (checkXPath == null) {↵ | |
2 | tolerant = new JCheckBox(JMeterUtils.getResString("xml_tolerant_button")); //$NON-NLS-1$↵ | 2 | checkXPath = new JButton(JMeterUtils.getResString("xpath_assertion_button")); //$NON-NLS-1$↵ | |
3 | tolerant.addActionListener(new ActionListener() {↵ | 3 | checkXPath.addActionListener(new ActionListener() {↵ | |
4 | public void actionPerformed(ActionEvent e) {↵ | 4 | public void actionPerformed(ActionEvent e) {↵ | |
5 | tolerant();↵ | 5 | validXPath(xpath.getText(), true);↵ | |
6 | }↵ | 6 | }↵ | |
7 | });↵ | 7 | });↵ | |
8 | }↵ | 8 | }↵ | |
9 | return tolerant; | 9 | return checkXPath; | |
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 | 10 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 23.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (tolerant == null) |
| 1 | if (checkXPath == null) | |||||||||||||||||||||
2 | tolerant = new JCheckBox(JMeterUtils.getResString("xml_tolerant_button")); |
| 2 | checkXPath = new JButton(JMeterUtils.getResString("xpath_assertion_button")); | |||||||||||||||||||||
|
| 3 | checkXPath.addActionListener(new ActionListener() {...}); | ||||||||||||||||||||||
3 | tolerant.addActionListener(new ActionListener() {...}); |
| | ||||||||||||||||||||||
4 | return tolerant; |
| 4 | return checkXPath; |
Row | Violation |
---|---|
1 | Expression new JCheckBox(JMeterUtils.getResString("xml_tolerant_button")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new JButton(JMeterUtils.getResString("xpath_assertion_button")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement checkXPath.addActionListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ validXPath(xpath.getText(),true); } } ); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement checkXPath.addActionListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ validXPath(xpath.getText(),true); } } ); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
5 | Unmatched statement tolerant.addActionListener(new ActionListener(){ public void actionPerformed( ActionEvent e){ tolerant(); } } ); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |