File path: /jEdit-4.2/src/org/gjt/sp/jedit/MiscUtilities.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/MiscUtilities.java | |||
Method name: boolean isToolsJarAvailable()
|
Method name: boolean isToolsJarAvailable()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | String jEditDir = jEdit.getJEditHome();↵ | 1 | String settingsDir = jEdit.getSettingsDirectory();↵ | |
2 | if(jEditDir != null)↵ | 2 | if(settingsDir != null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | String toolsPath = constructPath(jEditDir, "jars", ↵ | 4 | String toolsPath = constructPath(settingsDir, "jars",↵ | |
5 | "tools.jar");↵ | 5 | "tools.jar");↵ | |
6 | paths.addElement(toolsPath);↵ | 6 | paths.addElement(toolsPath);↵ | |
7 | if(new File(toolsPath).exists())↵ | 7 | if(new File(toolsPath).exists())↵ | |
8 | {↵ | 8 | {↵ | |
9 | Log.log(Log.DEBUG, MiscUtilities.class,↵ | 9 | Log.log(Log.DEBUG, MiscUtilities.class,↵ | |
10 | "- is in jEdit's system jars folder. Fine.");↵ | 10 | "- is in the user's jars folder. Fine.");↵ | |
11 | // jEdit will load it automatically↵ | 11 | // jEdit will load it automatically↵ | |
12 | return true;↵ | 12 | return true;↵ | |
13 | }↵ | 13 | }↵ | |
14 | } | 14 |
| |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 19 |
Number of mapped statements | 7 |
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.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16 | String jEditDir = jEdit.getJEditHome(); |
| 9 | String settingsDir = jEdit.getSettingsDirectory(); | |||||||||||||
17 | if (jEditDir != null) |
| 10 | if (settingsDir != null) | |||||||||||||
18 | String toolsPath = constructPath(jEditDir, "jars", "tools.jar"); |
| 11 | String toolsPath = constructPath(settingsDir, "jars", "tools.jar"); | |||||||||||||
19 | paths.addElement(toolsPath); | 12 | paths.addElement(toolsPath); | ||||||||||||||
20 | if (new File(toolsPath).exists()) | 13 | if (new File(toolsPath).exists()) | ||||||||||||||
21 | Log.log(Log.DEBUG, MiscUtilities.class, "- is in jEdit's system jars folder. Fine."); |
| 14 | Log.log(Log.DEBUG, MiscUtilities.class, "- is in the user's jars folder. Fine."); | |||||||||||||
22 | return true; |
| 15 | return true; |
Row | Violation |
---|---|
1 | Conditional return true; |
2 | Conditional return true; |