Entry entry = (Entry)windows.get(name);
if(entry == null)
{
Log.log(Log.ERROR,this,"Unknown dockable window: " + name);
return null;
}
Entry entry = (Entry)windows.get(name);
if(entry == null)
{
Log.log(Log.ERROR,this,"Unknown dockable window: " + name);
return;
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/DockableWindowManager.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/DockableWindowManager.java
|
Method name: JComponent floatDockableWindow(String)
|
|
Method name: void hideDockableWindow(String)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | Entry entry = (Entry)windows.get(name);↵ | | 1 | Entry entry = (Entry)windows.get(name);↵
|
2 | if(entry == null)↵ | | 2 | if(entry == null)↵
|
3 | {↵ | | 3 | {↵
|
4 | Log.log(Log.ERROR,this,"Unknown dockable window: " + name);↵ | | 4 | Log.log(Log.ERROR,this,"Unknown dockable window: " + name);↵
|
5 | return null;↵ | | 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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | Entry entry = (Entry)windows.get(name); | | 1 | Entry entry = (Entry)windows.get(name); |
2 | if (entry == null) | | 2 | if (entry == null) |
3 | Log.log(Log.ERROR, this, "Unknown dockable window: " + name); | | 3 | Log.log(Log.ERROR, this, "Unknown dockable window: " + name); |
| | | 4 | |
4 | | | | |
Precondition Violations (2)
Row |
Violation |
1 | Unmatched return; |
2 | Unmatched return null; |