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.9 |
Clones location | Clones are in different classes |
Number of node comparisons | 27 |
Number of mapped statements | 10 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 11.1 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | ReportMainFrame mainFrame = ReportGuiPackage.getInstance().getMainFrame(); |
| 1 | MainFrame mainFrame = GuiPackage.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"); | |||||||||||||||||||
11 | if (getCurrentNode() instanceof ReportTreeNode) | | |||||||||||||||||||
12 | log.debug("About to display pop-up"); | | |||||||||||||||||||
13 | displayPopUp(e); |
| | ||||||||||||||||||
|
| 12 | displayPopUp(e); |
Row | Violation |
---|---|
1 | 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.gui.ReportMainFrame getMainFrame() , public org.apache.jmeter.gui.MainFrame getMainFrame() |
2 | Expression mainFrame cannot be unified with expression mainFrame , because common superclass javax.swing.JFrame does not declare member(s) public void closeMenu() |
3 | Unmatched statement displayPopUp(e); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement displayPopUp(e); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |