File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/action/ReportRemove.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/Remove.java | |||
Method name: void removeNode(ReportTreeNode)
|
Method name: void removeNode(JMeterTreeNode)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | TestElement testElement = node.getTestElement();↵ | 1 | TestElement testElement = node.getTestElement();↵ | |
2 | if (testElement.canRemove()) {↵ | 2 | if (testElement.canRemove()) {↵ | |
3 | ReportGuiPackage.getInstance().getTreeModel().removeNodeFromParent(↵ | 3 | GuiPackage.getInstance().getTreeModel().removeNodeFromParent(↵ | |
4 | node);↵ | 4 | node);↵ | |
5 | ReportGuiPackage.getInstance().removeNode(testElement);↵ | 5 | GuiPackage.getInstance().removeNode(testElement);↵ | |
6 | } else {↵ | 6 | } else {↵ | |
7 | String message = testElement.getClass().getName() + " is busy";↵ | 7 | String message = testElement.getClass().getName() + " is busy";↵ | |
8 | JOptionPane.showMessageDialog(null, message, "Cannot remove item",↵ | 8 | JOptionPane.showMessageDialog(null, message, "Cannot remove item",↵ | |
9 | JOptionPane.ERROR_MESSAGE);↵ | 9 | JOptionPane.ERROR_MESSAGE);↵ | |
10 | } | 10 |
| |
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 26 |
Number of mapped statements | 6 |
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) | 4.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | TestElement testElement = node.getTestElement(); |
| 1 | TestElement testElement = node.getTestElement(); | |||||||||||||||
2 | if (testElement.canRemove()) | 2 | if (testElement.canRemove()) | ||||||||||||||||
3 | ReportGuiPackage.getInstance().getTreeModel().removeNodeFromParent(node); |
| 3 | GuiPackage.getInstance().getTreeModel().removeNodeFromParent(node); | |||||||||||||||
4 | ReportGuiPackage.getInstance().removeNode(testElement); |
| 4 | GuiPackage.getInstance().removeNode(testElement); | |||||||||||||||
else | else | ||||||||||||||||||
5 | String message = testElement.getClass().getName() + " is busy"; | 5 | String message = testElement.getClass().getName() + " is busy"; | ||||||||||||||||
6 | JOptionPane.showMessageDialog(null, message, "Cannot remove item", JOptionPane.ERROR_MESSAGE); | 6 | JOptionPane.showMessageDialog(null, message, "Cannot remove item", JOptionPane.ERROR_MESSAGE); |
Row | Violation |
---|---|
1 | Expression node cannot be unified with expression node , because common superclass javax.swing.tree.DefaultMutableTreeNode does not declare member(s) public org.apache.jmeter.testelement.TestElement getTestElement() |
2 | Expression node cannot be unified with expression node , because common superclass type javax.swing.tree.DefaultMutableTreeNode cannot be passed as an argument to public void removeNodeFromParent(org.apache.jmeter.report.gui.tree.ReportTreeNode) |
3 | Expression ReportGuiPackage cannot be unified with expression GuiPackage , because common superclass org.apache.jmeter.util.LocaleChangeListener does not declare member(s) public static org.apache.jmeter.gui.ReportGuiPackage getInstance() , public static org.apache.jmeter.gui.GuiPackage getInstance() , public org.apache.jmeter.report.gui.tree.ReportTreeModel getTreeModel() , public org.apache.jmeter.gui.tree.JMeterTreeModel getTreeModel() |
4 | Expression ReportGuiPackage cannot be unified with expression GuiPackage , because common superclass org.apache.jmeter.util.LocaleChangeListener does not declare member(s) public static org.apache.jmeter.gui.ReportGuiPackage getInstance() , public static org.apache.jmeter.gui.GuiPackage getInstance() , public void removeNode(org.apache.jmeter.testelement.TestElement) |