File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/tree/ReportTreeListener.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/tree/JMeterTreeListener.java | |||
Method name: void mousePressed(MouseEvent)
|
Method name: void mousePressed(MouseEvent)
|
|||
Number of AST nodes: 13 | Number of AST nodes: 12 | |||
1 | ReportMainFrame mainFrame = ReportGuiPackage.getInstance().getMainFrame();↵ | 1 | MainFrame mainFrame = GuiPackage.getInstance().getMainFrame();↵ | |
2 | // Close any Main Menu that is open↵ | 2 | // Close any Main Menu that is open↵ | |
3 | mainFrame.closeMenu();↵ | 3 | mainFrame.closeMenu();↵ | |
4 | int selRow = tree.getRowForLocation(e.getX(), e.getY());↵ | 4 | int selRow = tree.getRowForLocation(e.getX(), e.getY());↵ | |
5 | if (tree.getPathForLocation(e.getX(), e.getY()) != null) {↵ | 5 | if (tree.getPathForLocation(e.getX(), e.getY()) != null) {↵ | |
6 | log.debug("mouse pressed, updating currentPath");↵ | 6 | log.debug("mouse pressed, updating currentPath");↵ | |
7 | currentPath = tree.getPathForLocation(e.getX(), e.getY());↵ | 7 | currentPath = tree.getPathForLocation(e.getX(), e.getY());↵ | |
8 | }↵ | 8 | }↵ | |
9 | if (selRow != -1) {↵ | 9 | if (selRow != -1) {↵ | |
10 | // updateMainMenu(((JMeterGUIComponent)↵ | 10 | // updateMainMenu(((JMeterGUIComponent)↵ | |
11 | // getCurrentNode().getUserObject()).createPopupMenu());↵ | 11 | // getCurrentNode().getUserObject()).createPopupMenu());↵ | |
12 | if (isRightClick(e)) {↵ | 12 | if (isRightClick(e)) {↵ | |
13 | if (tree.getSelectionCount() < 2) {↵ | 13 | if (tree.getSelectionCount() < 2) {↵ | |
14 | tree.setSelectionPath(currentPath);↵ | 14 | tree.setSelectionPath(currentPath);↵ | |
15 | }↵ | 15 | }↵ | |
16 | if (getCurrentNode() instanceof ReportTreeNode) {↵ | 16 | ↵ | |
17 | log.debug("About to display pop-up");↵ | 17 | log.debug("About to display pop-up");↵ | |
18 | displayPopUp(e);↵ | 18 | displayPopUp(e);↵ | |
19 | }↵ | 19 | ↵ | |
20 | }↵ | 20 | }↵ | |
21 | } | 21 |
| |
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.6 |
Clones location | Clones are in different classes |
Number of node comparisons | 27 |
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 5.4 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | MainFrame mainFrame = GuiPackage.getInstance().getMainFrame(); | |||||||||||||
1 | ReportMainFrame mainFrame = ReportGuiPackage.getInstance().getMainFrame(); | | |||||||||||||
2 | mainFrame.closeMenu(); |
| 2 | mainFrame.closeMenu(); | |||||||||||
3 | int selRow = tree.getRowForLocation(e.getX(), e.getY()); | 3 | int selRow = tree.getRowForLocation(e.getX(), e.getY()); | ||||||||||||
4 | if (tree.getPathForLocation(e.getX(), e.getY()) != null) | 4 | if (tree.getPathForLocation(e.getX(), e.getY()) != null) | ||||||||||||
5 | log.debug("mouse pressed, updating currentPath"); | 5 | log.debug("mouse pressed, updating currentPath"); | ||||||||||||
6 | currentPath = tree.getPathForLocation(e.getX(), e.getY()); | 6 | currentPath = tree.getPathForLocation(e.getX(), e.getY()); | ||||||||||||
7 | if (selRow != -1) | 7 | if (selRow != -1) | ||||||||||||
8 | if (isRightClick(e)) | 8 | if (isRightClick(e)) | ||||||||||||
9 | if (tree.getSelectionCount() < 2) | 9 | if (tree.getSelectionCount() < 2) | ||||||||||||
10 | tree.setSelectionPath(currentPath); | 10 | tree.setSelectionPath(currentPath); | ||||||||||||
| 11 | log.debug("About to display pop-up"); | |||||||||||||
| 12 | displayPopUp(e); |
Row | Violation |
---|---|
1 | Expression mainFrame cannot be unified with expression mainFrame , because common superclass javax.swing.JFrame does not declare member(s) public void closeMenu() |