File path: /jEdit-4.2/src/org/gjt/sp/jedit/pluginmgr/PluginList.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/pluginmgr/PluginList.java | |||
Method name: boolean isSatisfied()
|
Method name: boolean isSatisfied()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | String build = jEdit.getBuild();↵ | 1 | String javaVersion = System.getProperty("java.version").substring(0,3);↵ | |
2 | if((from == null || MiscUtilities.compareStrings(↵ | 2 | if((from == null || MiscUtilities.compareStrings(↵ | |
3 | build,from,false) >= 0)↵ | 3 | javaVersion,from,false) >= 0)↵ | |
4 | &&↵ | 4 | &&↵ | |
5 | (to == null || MiscUtilities.compareStrings(↵ | 5 | (to == null || MiscUtilities.compareStrings(↵ | |
6 | build,to,false) <= 0))↵ | 6 | javaVersion,to,false) <= 0))↵ | |
7 | return true;↵ | 7 | return true;↵ | |
8 | else↵ | 8 | else↵ | |
9 | return false; | 9 |
| |
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.8 |
Clones location | Clones are in the same method |
Number of node comparisons | 11 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 8 | String javaVersion = System.getProperty("java.version").substring(0, 3); | |||||||||||||||
13 | String build = jEdit.getBuild(); | | |||||||||||||||
14 | if ((from == null || MiscUtilities.compareStrings(build, from, false) >= 0) && (to == null || MiscUtilities.compareStrings(build, to, false) <= 0)) |
| 9 | if ((from == null || MiscUtilities.compareStrings(javaVersion, from, false) >= 0) && (to == null || MiscUtilities.compareStrings(javaVersion, to, false) <= 0)) | |||||||||||||
15 | return true; |
| 10 | return true; | |||||||||||||
else | else | ||||||||||||||||
16 | return false; |
| 11 | return false; |
Row | Violation |
---|---|
1 | Conditional return false; |
2 | Conditional return false; |
3 | Conditional return true; |
4 | Conditional return true; |