URL url; if (small) url = ResourceLoader.class.getResource(path + "/16x16/" + name); else url = ResourceLoader.class.getResource(path + "/22x22/" + name); if (url == null) url = getFallback(small); ImageIcon icon = new ImageIcon(url); return icon;
URL url; if (small) url = ResourceLoader.class.getResource(path + "/16x16/" + name); else url = ResourceLoader.class.getResource(path + "/22x22/" + name); if (url == null) url = getFallback(small); ImageIcon icon = new ImageIcon(url); return icon;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/resourceloader/ResourceLoader.java File path: /columba-1.4-src/plugins/org.columba.chat.altura/src/org/columba/chat/resourceloader/ResourceLoader.java
Method name: ImageIcon getIcon(String, String, boolean) Method name: ImageIcon getIcon(String, String, boolean)
Number of AST nodes: 8 Number of AST nodes: 8
1
URL url;
1
URL url;
2
		if (small)
2
		if (small)
3
			url = ResourceLoader.class.getResource(path + "/16x16/" + name);
3
			url = ResourceLoader.class.getResource(path + "/16x16/" + name);
4
		else
4
		else
5
			url = ResourceLoader.class.getResource(path + "/22x22/" + name);
5
			url = ResourceLoader.class.getResource(path + "/22x22/" + name);
6
		if (url == null)
6
		if (url == null)
7
			url = getFallback(small);
7
			url = getFallback(small);
8
		ImageIcon icon = new ImageIcon(url);
8
		ImageIcon icon = new ImageIcon(url);
9
		return icon;
9
		return icon;
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 comparisons25
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.3
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    URL url;
    1
    URL url;
    2
    if (small)
    2
    if (small)
    3
    url = ResourceLoader.class.getResource(path + "/16x16/" + name);
    3
    url = ResourceLoader.class.getResource(path + "/16x16/" + name);
    else
    else
    4
    url = ResourceLoader.class.getResource(path + "/22x22/" + name);
    4
    url = ResourceLoader.class.getResource(path + "/22x22/" + name);
    5
    if (url == null)
    5
    if (url == null)
    6
    url = getFallback(small);
    6
    url = getFallback(small);
    7
    ImageIcon icon = new ImageIcon(url);
    7
    ImageIcon icon = new ImageIcon(url);
    8
    return icon;
    8
    return icon;
    Precondition Violations (0)
    Row Violation