if((mods & InputEvent.CTRL_MASK) != 0) { if(buf == null) buf = new StringBuffer(); buf.append(getSymbolicModifierName(InputEvent.CTRL_MASK)); }
if((mods & InputEvent.ALT_MASK) != 0) { if(buf == null) buf = new StringBuffer(); buf.append(getSymbolicModifierName(InputEvent.ALT_MASK)); }
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: String modifiersToString(int) Method name: String modifiersToString(int)
Number of AST nodes: 4 Number of AST nodes: 4
1
if((mods & InputEvent.CTRL_MASK) != 0)
1
if((mods & InputEvent.ALT_MASK) != 0)
2
		{
2
		{
3
			if(buf == null)
3
			if(buf == null)
4
				buf = new StringBuffer();
4
				buf = new StringBuffer();
5
			buf.append(getSymbolicModifierName(InputEvent.CTRL_MASK));
5
			buf.append(getSymbolicModifierName(InputEvent.ALT_MASK));
6
		}
6
		}
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.3
Clones locationClones are in the same method
Number of node comparisons8
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    if ((mods & InputEvent.CTRL_MASK) != 0)
    2
    if ((mods & InputEvent.CTRL_MASK) != 0)
    6
    if ((mods & InputEvent.ALT_MASK) != 0)
    Differences
    Expression1Expression2Difference
    CTRL_MASKALT_MASKVARIABLE_NAME_MISMATCH
    6
    if ((mods & InputEvent.ALT_MASK) != 0)
    3
    if (buf == null)
    7
    if (buf == null)
    4
    buf = new StringBuffer();
    8
    buf = new StringBuffer();
    5
    buf.append(getSymbolicModifierName(InputEvent.CTRL_MASK));
    5
    buf.append(getSymbolicModifierName(InputEvent.CTRL_MASK));
    9
    buf.append(getSymbolicModifierName(InputEvent.ALT_MASK));
    Differences
    Expression1Expression2Difference
    CTRL_MASKALT_MASKVARIABLE_NAME_MISMATCH
    9
    buf.append(getSymbolicModifierName(InputEvent.ALT_MASK));
    Precondition Violations (0)
    Row Violation