if("actions.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("actions.dtd")));
}
catch(Exception e)
{
Log.log(Log.ERROR,this,"Error while opening"
+ " actions.dtd:");
Log.log(Log.ERROR,this,e);
} */
}
return null;
if("mirrors.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;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/ActionListHandler.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/pluginmgr/MirrorListHandler.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("actions.dtd".equals(systemId))↵ | | 1 | if("mirrors.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("actions.dtd")));↵ | | |
|
11 | }↵ | | |
|
12 | catch(Exception e)↵ | | |
|
13 | {↵ | | |
|
14 | Log.log(Log.ERROR,this,"Error while opening"↵ | | |
|
15 | + " actions.dtd:");↵ | | |
|
16 | Log.log(Log.ERROR,this,e);↵ | | |
|
17 | } */↵ | | |
|
18 | }↵ | | 7 | }↵
|
|
19 | return null; | | 8 | 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.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if ("actions.dtd".equals(systemId)) | | 1 | if ("mirrors.dtd".equals(systemId)) |
2 | return new StringReader("<!-- -->"); | | 2 | return new StringReader("<!-- -->"); |
3 | return null; | | 3 | return null; |
Precondition Violations (0)
Row |
Violation |