if("perspective.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;
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;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/PerspectiveManager.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/buffer/KillRing.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("perspective.dtd".equals(systemId))
1
if("killring.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
				} */
18
			}
7
			}
19
			return null;
8
			return null;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes having the same super class
Number of node comparisons5
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if ("perspective.dtd".equals(systemId))
    1
    if ("perspective.dtd".equals(systemId))
    1
    if ("killring.dtd".equals(systemId))
    Differences
    Expression1Expression2Difference
    "perspective.dtd""killring.dtd"LITERAL_VALUE_MISMATCH
    1
    if ("killring.dtd".equals(systemId))
    2
    return new StringReader("<!-- -->");
    2
    return new StringReader("<!-- -->");
    3
    return null;
    3
    return null;
    Precondition Violations (0)
    Row Violation