PlasticTheme[] themes = computeThemes(); for (int i = 0; i < themes.length; i++) { String str = themes[i].getName(); if (name.equals(str)) { return themes[i]; } } return null;
PlasticTheme[] themes = computeThemes(); for (int i = 0; i < themes.length; i++) { String str = themes[i].getName(); if (name.equals(str)) { return themes[i]; } } return null;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/themes/plugin/PlasticLookAndFeelConfigPlugin.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/themes/plugin/PlasticLookAndFeelPlugin.java
Method name: PlasticTheme getTheme(String) Method name: PlasticTheme getTheme(String)
Number of AST nodes: 6 Number of AST nodes: 6
1
PlasticTheme[] themes = computeThemes();
1
PlasticTheme[] themes = computeThemes();
2
        for (int i = 0; i < themes.length; i++) {
2
		for (int i = 0; i < themes.length; i++) {
3
            String str = themes[i].getName();
3
			String str = themes[i].getName();
4
            if (name.equals(str)) {
4
			if (name.equals(str)) {
5
                return themes[i];
5
				return themes[i];
6
            }
7
        }
8
        
6
			}
7
		}
9
return null;
8
		return null;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes
Number of node comparisons12
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    PlasticTheme[] themes = computeThemes();
    1
    PlasticTheme[] themes = computeThemes();
    2
    for (int i = 0; i < themes.length; i++)
    2
    for (int i = 0; i < themes.length; i++)
    3
    String str = themes[i].getName();
    3
    String str = themes[i].getName();
    4
    if (name.equals(str))
    4
    if (name.equals(str))
    5
    return themes[i];
    5
    return themes[i];
    6
    return null;
    6
    return null;
    Precondition Violations (0)
    Row Violation