if((duplicateMapping & InputEvent.CTRL_MASK) != 0) { throw new IllegalArgumentException( "CTRL is mapped to more than one modifier"); } if((duplicateMapping & InputEvent.ALT_MASK) != 0) { throw new IllegalArgumentException( "ALT is mapped to more than one modifier"); } if((duplicateMapping & InputEvent.META_MASK) != 0) { throw new IllegalArgumentException( "META is mapped to more than one modifier"); }
if((duplicateMapping & InputEvent.ALT_MASK) != 0) { throw new IllegalArgumentException( "ALT is mapped to more than one modifier"); } if((duplicateMapping & InputEvent.META_MASK) != 0) { throw new IllegalArgumentException( "META is mapped to more than one modifier"); } if((duplicateMapping & InputEvent.SHIFT_MASK) != 0) { throw new IllegalArgumentException( "SHIFT is mapped to more than one modifier"); }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/KeyEventTranslator.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/KeyEventTranslator.java
Method name: void setModifierMapping(int, int, int, int) Method name: void setModifierMapping(int, int, int, int)
Number of AST nodes: 6 Number of AST nodes: 6
1
if((duplicateMapping & InputEvent.CTRL_MASK) != 0) {
2
			throw new IllegalArgumentException(
3
				"CTRL is mapped to more than one modifier");
4
		}
5
		if((duplicateMapping & InputEvent.ALT_MASK) != 0) {
1
if((duplicateMapping & InputEvent.ALT_MASK) != 0) {
6
			throw new IllegalArgumentException(
2
			throw new IllegalArgumentException(
7
				"ALT is mapped to more than one modifier");
3
				"ALT is mapped to more than one modifier");
8
		}
4
		}
9
		if((duplicateMapping & InputEvent.META_MASK) != 0) {
5
		if((duplicateMapping & InputEvent.META_MASK) != 0) {
10
			throw new IllegalArgumentException(
6
			throw new IllegalArgumentException(
11
				"META is mapped to more than one modifier");
7
				"META is mapped to more than one modifier");
12
		}
8
		}
9
		if((duplicateMapping & InputEvent.SHIFT_MASK) != 0) {
10
			throw new IllegalArgumentException(
11
				"SHIFT is mapped to more than one modifier");
12
		}
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.5
Clones locationClones are in the same method
Number of node comparisons27
  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)1.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    if ((duplicateMapping & InputEvent.CTRL_MASK) != 0)
    2
    if ((duplicateMapping & InputEvent.CTRL_MASK) != 0)
    4
    if ((duplicateMapping & InputEvent.ALT_MASK) != 0)
    Differences
    Expression1Expression2Difference
    CTRL_MASKALT_MASKVARIABLE_NAME_MISMATCH
    4
    if ((duplicateMapping & InputEvent.ALT_MASK) != 0)
    3
    throw new IllegalArgumentException("CTRL is mapped to more than one modifier");
    3
    throw new IllegalArgumentException("CTRL is mapped to more than one modifier");
    5
    throw new IllegalArgumentException("ALT is mapped to more than one modifier");
    Differences
    Expression1Expression2Difference
    "CTRL is mapped to more than one modifier""ALT is mapped to more than one modifier"LITERAL_VALUE_MISMATCH
    5
    throw new IllegalArgumentException("ALT is mapped to more than one modifier");
    4
    if ((duplicateMapping & InputEvent.ALT_MASK) != 0)
    4
    if ((duplicateMapping & InputEvent.ALT_MASK) != 0)
    6
    if ((duplicateMapping & InputEvent.META_MASK) != 0)
    Differences
    Expression1Expression2Difference
    ALT_MASKMETA_MASKVARIABLE_NAME_MISMATCH
    6
    if ((duplicateMapping & InputEvent.META_MASK) != 0)
    5
    throw new IllegalArgumentException("ALT is mapped to more than one modifier");
    5
    throw new IllegalArgumentException("ALT is mapped to more than one modifier");
    7
    throw new IllegalArgumentException("META is mapped to more than one modifier");
    Differences
    Expression1Expression2Difference
    "ALT is mapped to more than one modifier""META is mapped to more than one modifier"LITERAL_VALUE_MISMATCH
    7
    throw new IllegalArgumentException("META is mapped to more than one modifier");
    6
    if ((duplicateMapping & InputEvent.META_MASK) != 0)
    6
    if ((duplicateMapping & InputEvent.META_MASK) != 0)
    8
    if ((duplicateMapping & InputEvent.SHIFT_MASK) != 0)
    Differences
    Expression1Expression2Difference
    META_MASKSHIFT_MASKVARIABLE_NAME_MISMATCH
    8
    if ((duplicateMapping & InputEvent.SHIFT_MASK) != 0)
    7
    throw new IllegalArgumentException("META is mapped to more than one modifier");
    7
    throw new IllegalArgumentException("META is mapped to more than one modifier");
    9
    throw new IllegalArgumentException("SHIFT is mapped to more than one modifier");
    Differences
    Expression1Expression2Difference
    "META is mapped to more than one modifier""SHIFT is mapped to more than one modifier"LITERAL_VALUE_MISMATCH
    9
    throw new IllegalArgumentException("SHIFT is mapped to more than one modifier");
    Precondition Violations (0)
    Row Violation