String _abbrev = editor.getAbbrev();
if(_abbrev == null || _abbrev.length() == 0)
{
getToolkit().beep();
return;
}
String _abbrev = editor.getAbbrev();
if(_abbrev == null || _abbrev.length() == 0)
{
getToolkit().beep();
return;
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/AddAbbrevDialog.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/AddAbbrevDialog.java
|
Method name: void actionPerformed(ActionEvent)
|
|
Method name: void actionPerformed(ActionEvent)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | String _abbrev = editor.getAbbrev();↵ | | 1 | String _abbrev = editor.getAbbrev();↵
|
2 | if(_abbrev == null || _abbrev.length() == 0)↵ | | 2 | if(_abbrev == null || _abbrev.length() == 0)↵
|
3 | {↵ | | 3 | {↵
|
4 | getToolkit().beep();↵ | | 4 | getToolkit().beep();↵
|
5 | return;↵ | | 5 | return;↵
|
6 | } | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 11 |
-
{Non-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) | 0.5 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | String _abbrev = editor.getAbbrev(); | | 10 | String _abbrev = editor.getAbbrev(); |
4 | if (_abbrev == null || _abbrev.length() == 0) | | 11 | if (_abbrev == null || _abbrev.length() == 0) |
5 | | | 12 | |
6 | | | 13 | |
Precondition Violations (2)
Row |
Violation |
1 | Conditional return; |
2 | Conditional return; |