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: 9 | Number of AST nodes: 9 | |||
1 | String shortcut1 = jEdit.getProperty(action + ".shortcut");↵ | 1 | String shortcut1 = jEdit.getProperty(action + ".shortcut");↵ | |
2 | String shortcut2 = jEdit.getProperty(action + ".shortcut2");↵ | 2 | String shortcut2 = jEdit.getProperty(action + ".shortcut2");↵ | |
3 | if(shortcut1 == null || shortcut1.length() == 0)↵ | 3 | if(shortcut1 == null || shortcut1.length() == 0)↵ | |
4 | {↵ | 4 | {↵ | |
5 | if(shortcut2 == null || shortcut2.length() == 0)↵ | 5 | if(shortcut2 == null || shortcut2.length() == 0)↵ | |
6 | return null;↵ | 6 | return null;↵ | |
7 | else↵ | 7 | else↵ | |
8 | return shortcut2;↵ | 8 | return shortcut2;↵ | |
9 | }↵ | 9 | }↵ | |
10 | else↵ | 10 | else↵ | |
11 | {↵ | 11 | {↵ | |
12 | if(shortcut2 == null || shortcut2.length() == 0)↵ | 12 | if(shortcut2 == null || shortcut2.length() == 0)↵ | |
13 | return shortcut1;↵ | 13 | return shortcut1;↵ | |
14 | else↵ | 14 | else↵ | |
15 | return shortcut1 + " or " + shortcut2;↵ | 15 | return shortcut1 + " or " + shortcut2;↵ | |
16 | } | 16 |
| |
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.9 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 34 |
Number of mapped statements | 9 |
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 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
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 |
---|