if(action == null) return null; else { String shortcut1 = jEdit.getProperty(action + ".shortcut"); String shortcut2 = jEdit.getProperty(action + ".shortcut2"); if(shortcut1 == null || shortcut1.length() == 0) { if(shortcut2 == null || shortcut2.length() == 0) return null; else return shortcut2; } else { if(shortcut2 == null || shortcut2.length() == 0) return shortcut1; else return shortcut1 + " or " + shortcut2; } }
if(action == null) return null; else { String shortcut1 = jEdit.getProperty(action + ".shortcut"); String shortcut2 = jEdit.getProperty(action + ".shortcut2"); if(shortcut1 == null || shortcut1.length() == 0) { if(shortcut2 == null || shortcut2.length() == 0) return null; else return shortcut2; } else { if(shortcut2 == null || shortcut2.length() == 0) return shortcut1; else return shortcut1 + " or " + shortcut2; } }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/menu/EnhancedCheckBoxMenuItem.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/menu/EnhancedMenuItem.java
Method name: String getShortcut() Method name: String getShortcut()
Number of AST nodes: 11 Number of AST nodes: 11
1
if(action == null)
1
if(action == null)
2
			return null;
2
			return null;
3
		else
3
		else
4
		{
4
		{
5
			String shortcut1 = jEdit.getProperty(action + ".shortcut");
5
			String shortcut1 = jEdit.getProperty(action + ".shortcut");
6
			String shortcut2 = jEdit.getProperty(action + ".shortcut2");
6
			String shortcut2 = jEdit.getProperty(action + ".shortcut2");
7
			if(shortcut1 == null || shortcut1.length() == 0)
7
			if(shortcut1 == null || shortcut1.length() == 0)
8
			{
8
			{
9
				if(shortcut2 == null || shortcut2.length() == 0)
9
				if(shortcut2 == null || shortcut2.length() == 0)
10
					return null;
10
					return null;
11
				else
11
				else
12
					return shortcut2;
12
					return shortcut2;
13
			}
13
			}
14
			else
14
			else
15
			{
15
			{
16
				if(shortcut2 == null || shortcut2.length() == 0)
16
				if(shortcut2 == null || shortcut2.length() == 0)
17
					return shortcut1;
17
					return shortcut1;
18
				else
18
				else
19
					return shortcut1 + " or " + shortcut2;
19
					return shortcut1 + " or " + shortcut2;
20
			}
20
			}
21
		}
21
		}
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)1.3
Clones locationClones are in different classes having the same super class
Number of node comparisons45
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements11
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.4
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    if (action == null)
    1
    if (action == null)
    2
    return null;
    2
    return null;
    else
    else
    3
    String shortcut1 = jEdit.getProperty(action + ".shortcut");
    3
    String shortcut1 = jEdit.getProperty(action + ".shortcut");
    4
    String shortcut2 = jEdit.getProperty(action + ".shortcut2");
    4
    String shortcut2 = jEdit.getProperty(action + ".shortcut2");
    5
    if (shortcut1 == null || shortcut1.length() == 0)
    5
    if (shortcut1 == null || shortcut1.length() == 0)
    6
    if (shortcut2 == null || shortcut2.length() == 0)
    6
    if (shortcut2 == null || shortcut2.length() == 0)
    7
    return null;
    7
    return null;
    else
    else
    8
    return shortcut2;
    8
    return shortcut2;
    else
    else
    9
    if (shortcut2 == null || shortcut2.length() == 0)
    9
    if (shortcut2 == null || shortcut2.length() == 0)
    10
    return shortcut1;
    10
    return shortcut1;
    else
    else
    11
    return shortcut1 + " or " + shortcut2;
    11
    return shortcut1 + " or " + shortcut2;
    Precondition Violations (0)
    Row Violation