File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/ObjectTree.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/ObjectTree.java | |||
Method name: void addToPopup(DatabaseObjectType, Action)
|
Method name: void addToPopup(DatabaseObjectType, JMenu)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (dboType == null)↵ | 1 | if (dboType == null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | throw new IllegalArgumentException("Null DatabaseObjectType passed");↵ | 3 | throw new IllegalArgumentException("DatabaseObjectType == null");↵ | |
4 | }↵ | 4 | }↵ | |
5 | if (action == null)↵ | 5 | if (menu == null)↵ | |
6 | {↵ | 6 | {↵ | |
7 | throw new IllegalArgumentException("Null Action passed");↵ | 7 | throw new IllegalArgumentException("JMenu == null");↵ | |
8 | }↵ | 8 | }↵ | |
9 | final JPopupMenu pop = getPopup(dboType, true);↵ | 9 | final JPopupMenu pop = getPopup(dboType, true);↵ | |
10 | pop.add(action); | 10 | pop.add(menu); | |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 17 |
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) | 1.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (dboType == null) | 1 | if (dboType == null) | |||||||||||||||
2 | throw new IllegalArgumentException("Null DatabaseObjectType passed"); |
| 2 | throw new IllegalArgumentException("DatabaseObjectType == null"); | ||||||||||||||
3 | if (action == null) |
| 3 | if (menu == null) | ||||||||||||||
4 | throw new IllegalArgumentException("Null Action passed"); |
| 4 | throw new IllegalArgumentException("JMenu == null"); | ||||||||||||||
5 | final JPopupMenu pop = getPopup(dboType, true); | 5 | final JPopupMenu pop = getPopup(dboType, true); | |||||||||||||||
6 | pop.add(action); |
| 6 | pop.add(menu); |
Row | Violation |
---|---|
1 | Type javax.swing.Action of variable action does not match with type javax.swing.JMenu of variable menu |
2 | Type javax.swing.Action of variable action does not match with type javax.swing.JMenu of variable menu |