File path: /jEdit-4.2/src/org/gjt/sp/jedit/menu/EnhancedCheckBoxMenuItem.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/menu/EnhancedMenuItem.java | |||
Method name: String getShortcut()
|
Method name: String getShortcut()
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | if(action == null)↵ | 1 | if(action == null)↵ | |
2 | return null;↵ | 2 | return null;↵ | |
3 | else↵ | 3 | else↵ | |
4 | {↵ | 4 | {↵ | |
5 | String shortcut1 = jEdit.getProperty(action + ".shortcut");↵ | 5 | String shortcut1 = jEdit.getProperty(action + ".shortcut");↵ | |
6 | String shortcut2 = jEdit.getProperty(action + ".shortcut2");↵ | 6 | String shortcut2 = jEdit.getProperty(action + ".shortcut2");↵ | |
7 | if(shortcut1 == null || shortcut1.length() == 0)↵ | 7 | if(shortcut1 == null || shortcut1.length() == 0)↵ | |
8 | {↵ | 8 | {↵ | |
9 | if(shortcut2 == null || shortcut2.length() == 0)↵ | 9 | if(shortcut2 == null || shortcut2.length() == 0)↵ | |
10 | return null;↵ | 10 | return null;↵ | |
11 | else↵ | 11 | else↵ | |
12 | return shortcut2;↵ | 12 | return shortcut2;↵ | |
13 | }↵ | 13 | }↵ | |
14 | else↵ | 14 | else↵ | |
15 | {↵ | 15 | {↵ | |
16 | if(shortcut2 == null || shortcut2.length() == 0)↵ | 16 | if(shortcut2 == null || shortcut2.length() == 0)↵ | |
17 | return shortcut1;↵ | 17 | return shortcut1;↵ | |
18 | else↵ | 18 | else↵ | |
19 | return shortcut1 + " or " + shortcut2;↵ | 19 | return shortcut1 + " or " + shortcut2;↵ | |
20 | }↵ | 20 | }↵ | |
21 | } | 21 |
| |
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) | 1.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 45 |
Number of mapped statements | 11 |
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) | 2.4 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | if (action == null) | 1 | if (action == null) | |
2 | return null; | 2 | return null; | |
else | else | |||
3 | String shortcut1 = jEdit.getProperty(action + ".shortcut"); | 3 | String shortcut1 = jEdit.getProperty(action + ".shortcut"); | |
4 | String shortcut2 = jEdit.getProperty(action + ".shortcut2"); | 4 | String shortcut2 = jEdit.getProperty(action + ".shortcut2"); | |
5 | if (shortcut1 == null || shortcut1.length() == 0) | 5 | if (shortcut1 == null || shortcut1.length() == 0) | |
6 | if (shortcut2 == null || shortcut2.length() == 0) | 6 | if (shortcut2 == null || shortcut2.length() == 0) | |
7 | return null; | 7 | return null; | |
else | else | |||
8 | return shortcut2; | 8 | return shortcut2; | |
else | else | |||
9 | if (shortcut2 == null || shortcut2.length() == 0) | 9 | if (shortcut2 == null || shortcut2.length() == 0) | |
10 | return shortcut1; | 10 | return shortcut1; | |
else | else | |||
11 | return shortcut1 + " or " + shortcut2; | 11 | return shortcut1 + " or " + shortcut2; |
Row | Violation |
---|