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: 5 | Number of AST nodes: 5 | |||
1 | String toolsPath = constructPath(settingsDir, "jars",↵ | 1 | String toolsPath = constructPath(jEditDir, "jars",↵ | |
2 | "tools.jar");↵ | 2 | "tools.jar");↵ | |
3 | paths.addElement(toolsPath);↵ | 3 | paths.addElement(toolsPath);↵ | |
4 | if(new File(toolsPath).exists())↵ | 4 | if(new File(toolsPath).exists())↵ | |
5 | {↵ | 5 | {↵ | |
6 | Log.log(Log.DEBUG, MiscUtilities.class,↵ | 6 | Log.log(Log.DEBUG, MiscUtilities.class,↵ | |
7 | "- is in the user's jars folder. Fine.");↵ | 7 | "- is in jEdit's system jars folder. Fine.");↵ | |
8 | // jEdit will load it automatically↵ | 8 | // jEdit will load it automatically↵ | |
9 | return true;↵ | 9 | return true;↵ | |
10 | } | 10 |
| |
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 | 14 |
Number of mapped statements | 5 |
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.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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; |