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 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 8 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | if ((mods & InputEvent.CTRL_MASK) != 0) | | 6 | if ((mods & InputEvent.ALT_MASK) != 0) |
3 | | | 7 | |
4 | buf = new StringBuffer(); | | 8 | buf = new StringBuffer(); |
5 | buf.append(getSymbolicModifierName(InputEvent.CTRL_MASK)); | | 9 | buf.append(getSymbolicModifierName(InputEvent.ALT_MASK)); |
Precondition Violations (0)
Row |
Violation |