if (classLoader == null) { bundle = ResourceBundle.getBundle(sBundlePath, Locale .getDefault()); } else { bundle = ResourceBundle.getBundle(sBundlePath, Locale .getDefault(), classLoader); } htBundles.put(sBundlePath, bundle);
if (classLoader == null) { bundle = ResourceBundle.getBundle(bundlePath, Locale .getDefault()); } else { bundle = ResourceBundle.getBundle(bundlePath, Locale .getDefault(), classLoader); } //overwrite old bundle htBundles.put(bundlePath, bundle);
Clone fragments detected by clone detection tool
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);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are declared in the same class
Number of node comparisons11
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    10
    if (classLoader == null)
    12
    if (classLoader == null)
    11
    bundle = ResourceBundle.getBundle(sBundlePath, Locale.getDefault());
    11
    bundle = ResourceBundle.getBundle(sBundlePath, Locale.getDefault());
    13
    bundle = ResourceBundle.getBundle(bundlePath, Locale.getDefault());
    Differences
    Expression1Expression2Difference
    sBundlePathbundlePathVARIABLE_NAME_MISMATCH
    13
    bundle = ResourceBundle.getBundle(bundlePath, Locale.getDefault());
    else
            
    12
    bundle = ResourceBundle.getBundle(sBundlePath, Locale.getDefault(), classLoader);
    12
    bundle = ResourceBundle.getBundle(sBundlePath, Locale.getDefault(), classLoader);
    Preondition Violations
    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
                                                                                                                                                                      
                                                                                                                                                                    
    14
    bundle = ResourceBundle.getBundle(bundlePath, Locale.getDefault(), classLoader);
    Preondition Violations
    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
    14
    bundle = ResourceBundle.getBundle(bundlePath, Locale.getDefault(), classLoader);
    13
    htBundles.put(sBundlePath, bundle);
    13
    htBundles.put(sBundlePath, bundle);
    15
    htBundles.put(bundlePath, bundle);
    Differences
    Expression1Expression2Difference
    sBundlePathbundlePathVARIABLE_NAME_MISMATCH
    15
    htBundles.put(bundlePath, bundle);
    Precondition Violations (3)
    Row Violation
    1Unmatched 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
    2Unmatched 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
    3Clone fragment #1 returns variables bundle , while Clone fragment #2 returns variables