File path: /jEdit-4.2/src/org/gjt/sp/jedit/jEdit.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/jEdit.java | |||
Method name: Buffer openFile(View, String, String, boolean, Hashtable)
|
Method name: Buffer openTemporary(View, String, String, boolean)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if(view != null && parent == null)↵ | 1 | if(view != null && parent == null)↵ | |
2 | parent = view.getBuffer().getDirectory();↵ | 2 | parent = view.getBuffer().getDirectory();↵ | |
3 | if(MiscUtilities.isURL(path))↵ | 3 | if(MiscUtilities.isURL(path))↵ | |
4 | {↵ | 4 | {↵ | |
5 | if(MiscUtilities.getProtocolOfURL(path).equals("file"))↵ | 5 | if(MiscUtilities.getProtocolOfURL(path).equals("file"))↵ | |
6 | path = path.substring(5);↵ | 6 | path = path.substring(5);↵ | |
7 | }↵ | 7 | }↵ | |
8 | path = MiscUtilities.constructPath(parent,path); | 8 |
| |
See real code fragment | See real code fragment |
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.7 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
Number of mapped statements | 6 |
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) | 1.7 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
2 | if (view != null && parent == null) | 1 | if (view != null && parent == null) | |
3 | parent = view.getBuffer().getDirectory(); | 2 | parent = view.getBuffer().getDirectory(); | |
4 | if (MiscUtilities.isURL(path)) | 3 | if (MiscUtilities.isURL(path)) | |
5 | if (MiscUtilities.getProtocolOfURL(path).equals("file")) | 4 | if (MiscUtilities.getProtocolOfURL(path).equals("file")) | |
6 | path = path.substring(5); | 5 | path = path.substring(5); | |
7 | path = MiscUtilities.constructPath(parent, path); | 6 | path = MiscUtilities.constructPath(parent, path); |
Row | Violation |
---|