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