File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/box/CalendarBox.java | File path: /columba-1.4-src/contact/src/main/java/org/columba/contact/gui/box/ContactBox.java | |||
Method name: void handlePopupEvent(MouseEvent)
|
Method name: void handlePopupEvent(MouseEvent)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if ( list.getSelectedIndices().length <= 1 ) {↵ | 1 | if (list.getSelectedIndices().length <= 1) {↵ | |
2 | // select new item↵ | 2 | // select new item↵ | |
3 | int index = list.locationToIndex(p);↵ | 3 | int index = list.locationToIndex(p);↵ | |
4 | list.setSelectedIndex(index);↵ | 4 | list.setSelectedIndex(index);↵ | |
5 | }↵ | 5 | }↵ | |
6 | // show context menu↵ | 6 | // show context menu↵ | |
7 | getPopupMenu().show(e.getComponent(), p.x, p.y); | 7 |
| |
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 11 |
Number of mapped statements | 4 |
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) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (list.getSelectedIndices().length <= 1) |
| 3 | if (list.getSelectedIndices().length <= 1) | ||||||||||
4 | int index = list.locationToIndex(p); |
| 4 | int index = list.locationToIndex(p); | ||||||||||
5 | list.setSelectedIndex(index); |
| 5 | list.setSelectedIndex(index); | ||||||||||
6 | getPopupMenu().show(e.getComponent(), p.x, p.y); | 6 | getPopupMenu().show(e.getComponent(), p.x, p.y); |
Row | Violation |
---|