Object resolveEntity(String publicId, String systemId) { 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; } public void doctypeDecl(String name, String publicId, String systemId) throws Exception { if("KILLRING".equals(name)) return; Log.log(Log.ERROR,this,"killring.xml: DOCTYPE must be KILLRING"); }
Object resolveEntity(String publicId, String systemId) { 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; } public void doctypeDecl(String name, String publicId, String systemId) throws Exception { if("PERSPECTIVE".equals(name)) return; Log.log(Log.ERROR,this,"perspective.xml: DOCTYPE must be PERSPECTIVE"); }
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/PerspectiveManager.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
Object resolveEntity(String publicId, String systemId)
1
Object resolveEntity(String publicId, String systemId)
2
		{
2
		{
3
			if("killring.dtd".equals(systemId))
3
			if("perspective.dtd".equals(systemId))
4
			{
4
			{
5
				// this will result in a slight speed up, since we
5
				// this will result in a slight speed up, since we
6
				// don't need to read the DTD anyway, as AElfred is
6
				// don't need to read the DTD anyway, as AElfred is
7
				// non-validating
7
				// non-validating
8
				return new StringReader("<!-- -->");
8
				return new StringReader("<!-- -->");
9
				/* try
10
				{
11
					return new BufferedReader(new InputStreamReader(
12
						getClass().getResourceAsStream("recent.dtd")));
13
				}
14
				catch(Exception e)
15
				{
16
					Log.log(Log.ERROR,this,"Error while opening"
17
						+ " recent.dtd:");
18
					Log.log(Log.ERROR,this,e);
19
				} */
9
			}
20
			}
10
			return null;
21
			return null;
11
		}
22
		}
12
		public void doctypeDecl(String name, String publicId,
23
		public void doctypeDecl(String name, String publicId,
13
			String systemId) throws Exception
24
			String systemId) throws Exception
14
		{
25
		{
15
			if("KILLRING".equals(name))
26
			if("PERSPECTIVE".equals(name))
16
				return;
27
				return;
17
			Log.log(Log.ERROR,this,"killring.xml: DOCTYPE must be KILLRING");
28
			Log.log(Log.ERROR,this,"perspective.xml: DOCTYPE must be PERSPECTIVE");
18
		}
29
		}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0