for(int i = 0; i < markers.size(); i++)
{
Marker marker = (Marker)markers.elementAt(i);
if(getLineOfOffset(marker.getPosition()) == line)
return marker;
}
return null;
for(int i = 0; i < jars.size(); i++)
{
PluginJAR jar = (PluginJAR)jars.elementAt(i);
if(jar.getPath().equals(path))
return jar;
}
return null;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/Buffer.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/jEdit.java
|
Method name: Marker getMarkerAtLine(int)
|
|
Method name: PluginJAR getPluginJAR(String)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | for(int i = 0; i < markers.size(); i++)↵ | | 1 | for(int i = 0; i < jars.size(); i++)↵
|
2 | {↵ | | 2 | {↵
|
3 | Marker marker = (Marker)markers.elementAt(i);↵ | | 3 | PluginJAR jar = (PluginJAR)jars.elementAt(i);↵
|
4 | if(getLineOfOffset(marker.getPosition()) == line)↵ | | 4 | if(jar.getPath().equals(path))↵
|
5 | return marker;↵ | | 5 | return jar;↵
|
6 | }↵ | | 6 | }↵
|
|
7 | return null; | | 7 | return null;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |