File path: /columba-1.4-src/core/src/main/java/org/columba/core/resourceloader/GlobalResourceLoader.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/resourceloader/GlobalResourceLoader.java | |||
Method name: String getString(String, String, String)
|
Method name: void reload()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (classLoader == null) {↵ | 1 | if (classLoader == null) {↵ | |
2 | bundle = ResourceBundle.getBundle(sBundlePath, Locale↵ | 2 | bundle = ResourceBundle.getBundle(bundlePath, Locale↵ | |
3 | .getDefault());↵ | 3 | .getDefault());↵ | |
4 | } else {↵ | 4 | } else {↵ | |
5 | bundle = ResourceBundle.getBundle(sBundlePath, Locale↵ | 5 | bundle = ResourceBundle.getBundle(bundlePath, Locale↵ | |
6 | .getDefault(), classLoader);↵ | 6 | .getDefault(), classLoader);↵ | |
7 | }↵ | 7 | }↵ | |
8 | //overwrite old bundle↵ | |||
8 | htBundles.put(sBundlePath, bundle); | 9 | htBundles.put(bundlePath, bundle); | |
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 declared in the same class |
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) | 1.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | if (classLoader == null) | 12 | if (classLoader == null) | |||||||||||
11 | bundle = ResourceBundle.getBundle(sBundlePath, Locale.getDefault()); |
| 13 | bundle = ResourceBundle.getBundle(bundlePath, Locale.getDefault()); | ||||||||||
else | | |||||||||||||
12 | bundle = ResourceBundle.getBundle(sBundlePath, Locale.getDefault(), classLoader); |
| | |||||||||||
|
| 14 | bundle = ResourceBundle.getBundle(bundlePath, Locale.getDefault(), classLoader); | |||||||||||
13 | htBundles.put(sBundlePath, bundle); |
| 15 | htBundles.put(bundlePath, bundle); |
Row | Violation |
---|---|
1 | Unmatched statement bundle=ResourceBundle.getBundle(sBundlePath,Locale.getDefault(),classLoader); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement bundle=ResourceBundle.getBundle(bundlePath,Locale.getDefault(),classLoader); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Clone fragment #1 returns variables bundle , while Clone fragment #2 returns variables |