if(settings == null)
{
GUIUtilities.error(view,"no-settings",new String[0]);
return;
}
if(view.getMacroRecorder() != null)
{
GUIUtilities.error(view,"already-recording",new String[0]);
return;
}
if(settings == null)
{
GUIUtilities.error(view,"no-settings",new String[0]);
return;
}
if(view.getMacroRecorder() != null)
{
GUIUtilities.error(view,"already-recording",new String[0]);
return;
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/Macros.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/Macros.java
|
Method name: void recordTemporaryMacro(View)
|
|
Method name: void recordMacro(View)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if(settings == null)↵ | | 1 | if(settings == null)↵
|
2 | {↵ | | 2 | {↵
|
3 | GUIUtilities.error(view,"no-settings",new String[0]);↵ | | 3 | GUIUtilities.error(view,"no-settings",new String[0]);↵
|
4 | return;↵ | | 4 | return;↵
|
5 | }↵ | | 5 | }↵
|
|
6 | if(view.getMacroRecorder() != null)↵ | | 6 | if(view.getMacroRecorder() != null)↵
|
7 | {↵ | | 7 | {↵
|
8 | GUIUtilities.error(view,"already-recording",new String[0]);↵ | | 8 | GUIUtilities.error(view,"already-recording",new String[0]);↵
|
9 | return;↵ | | 9 | return;↵
|
10 | } | | 10 | }
|
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 28 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 6 |
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 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | if (settings == null) | | 2 | if (settings == null) |
3 | GUIUtilities.error(view, "no-settings", new String[0]); | | 3 | GUIUtilities.error(view, "no-settings", new String[0]); |
4 | | | 4 | |
5 | if (view.getMacroRecorder() != null) | | 5 | if (view.getMacroRecorder() != null) |
6 | GUIUtilities.error(view, "already-recording", new String[0]); | | 6 | GUIUtilities.error(view, "already-recording", new String[0]); |
7 | | | 7 | |
Precondition Violations (4)
Row |
Violation |
1 | Conditional return; |
2 | Conditional return; |
3 | Conditional return; |
4 | Conditional return; |