if("killring.dtd".equals(systemId))
{
// this will result in a slight speed up, since we
// don't need to read the DTD anyway, as AElfred is
// non-validating
return new StringReader("<!-- -->");
}
return null;
if("recent.dtd".equals(systemId))
{
// this will result in a slight speed up, since we
// don't need to read the DTD anyway, as AElfred is
// non-validating
return new StringReader("<!-- -->");
/* try
{
return new BufferedReader(new InputStreamReader(
getClass().getResourceAsStream("recent.dtd")));
}
catch(Exception e)
{
Log.log(Log.ERROR,this,"Error while opening"
+ " recent.dtd:");
Log.log(Log.ERROR,this,e);
} */
}
return null;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/buffer/KillRing.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/BufferHistory.java
|
Method name: Object resolveEntity(String, String)
|
|
Method name: Object resolveEntity(String, String)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if("killring.dtd".equals(systemId))↵ | | 1 | if("recent.dtd".equals(systemId))↵
|
2 | {↵ | | 2 | {↵
|
3 | // this will result in a slight speed up, since we↵ | | 3 | // this will result in a slight speed up, since we↵
|
4 | // don't need to read the DTD anyway, as AElfred is↵ | | 4 | // don't need to read the DTD anyway, as AElfred is↵
|
5 | // non-validating↵ | | 5 | // non-validating↵
|
6 | return new StringReader("<!-- -->");↵ | | 6 | return new StringReader("<!-- -->");↵
|
|
| | | 7 | /* try↵
|
| | | 8 | {↵
|
| | | 9 | return new BufferedReader(new InputStreamReader(↵
|
| | | 10 | getClass().getResourceAsStream("recent.dtd")));↵
|
| | | 11 | }↵
|
| | | 12 | catch(Exception e)↵
|
| | | 13 | {↵
|
| | | 14 | Log.log(Log.ERROR,this,"Error while opening"↵
|
| | | 15 | + " recent.dtd:");↵
|
| | | 16 | Log.log(Log.ERROR,this,e);↵
|
| | | 17 | } */↵
|
7 | }↵ | | 18 | }↵
|
|
8 | return null; | | 19 | return null;
|
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if ("killring.dtd".equals(systemId)) | | 1 | if ("recent.dtd".equals(systemId)) |
2 | return new StringReader("<!-- -->"); | | 2 | return new StringReader("<!-- -->"); |
3 | return null; | | 3 | return null; |
Precondition Violations (0)
Row |
Violation |