File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/Remove.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/action/ReportRemove.java | |||
Method name: void removeNode(JMeterTreeNode)
|
Method name: void removeNode(ReportTreeNode)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (testElement.canRemove()) {↵ | 1 | if (testElement.canRemove()) {↵ | |
2 | GuiPackage.getInstance().getTreeModel().removeNodeFromParent(↵ | 2 | ReportGuiPackage.getInstance().getTreeModel().removeNodeFromParent(↵ | |
3 | node);↵ | 3 | node);↵ | |
4 | GuiPackage.getInstance().removeNode(testElement);↵ | 4 | ReportGuiPackage.getInstance().removeNode(testElement);↵ | |
5 | } else {↵ | 5 | } else {↵ | |
6 | String message = testElement.getClass().getName() + " is busy";↵ | 6 | String message = testElement.getClass().getName() + " is busy";↵ | |
7 | JOptionPane.showMessageDialog(null, message, "Cannot remove item", ↵ | 7 | JOptionPane.showMessageDialog(null, message, "Cannot remove item",↵ | |
8 | JOptionPane.ERROR_MESSAGE);↵ | 8 | JOptionPane.ERROR_MESSAGE);↵ | |
9 | } | 9 |
| |
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 different classes |
Number of node comparisons | 25 |
Number of mapped statements | 5 |
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.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (testElement.canRemove()) | 2 | if (testElement.canRemove()) | ||||||||||||||||
3 | GuiPackage.getInstance().getTreeModel().removeNodeFromParent(node); |
| 3 | ReportGuiPackage.getInstance().getTreeModel().removeNodeFromParent(node); | |||||||||||||||
4 | GuiPackage.getInstance().removeNode(testElement); |
| 4 | ReportGuiPackage.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 | Type org.apache.jmeter.gui.GuiPackage of variable GuiPackage.getInstance() does not match with type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage.getInstance() |
2 | Type org.apache.jmeter.gui.GuiPackage of variable GuiPackage does not match with type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage |
3 | Type org.apache.jmeter.gui.GuiPackage of variable GuiPackage.getInstance() does not match with type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage.getInstance() |
4 | Type org.apache.jmeter.gui.GuiPackage of variable GuiPackage does not match with type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage |