try
{
NameSpace.class.getMethod("addCommandPath",
new Class[] { String.class, Class.class });
}
catch(Exception e)
{
Log.log(Log.ERROR,BeanShell.class,"You have BeanShell version " + Interpreter.VERSION + " in your CLASSPATH.");
Log.log(Log.ERROR,BeanShell.class,"Please remove it from the CLASSPATH since jEdit can only run with the bundled BeanShell version " + REQUIRED_VERSION);
System.exit(1);
}
try
{
textArea.getDropTarget().addDropTargetListener(
new DropHandler(textArea));
textArea.setDragAndDropCallback(
Java14.class.getMethod("dragAndDropCallback",
new Class[] { JEditTextArea.class,
InputEvent.class, boolean.class }));
}
catch(Exception e)
{
Log.log(Log.ERROR,Java14.class,e);
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/BeanShell.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/Java14.java
|
Method name: void init()
|
|
Method name: void initTextArea(JEditTextArea)
|
Number of AST nodes: 2
|
|
Number of AST nodes: 3
|
|
1 | try↵ | | 1 | try↵
|
2 | {↵ | | 2 | {↵
|
3 | NameSpace.class.getMethod("addCommandPath",↵ | | 3 | ↵
|
4 | new Class[] { String↵ | | 4 | textArea.getDropTarget().addDropTargetListener(↵
|
| | | 5 | new DropHandler(textArea));↵
|
| | | 6 | textArea.setDragAndDropCallback(↵
|
| | | 7 | Java14.class.getMethod("dragAndDropCallback",↵
|
| | | 8 | new Class[] { JEditTextArea.class,↵
|
5 | .class, Class.class });↵ | | 9 | InputEvent.class, boolean.class }));↵
|
6 | }↵ | | 10 | }↵
|
7 | catch(Exception e)↵ | | 11 | catch(Exception e)↵
|
8 | {↵ | | 12 | {↵
|
9 | Log.log(Log.ERROR,BeanShell.class,"You have BeanShell version " + Interpreter.VERSION + " in your CLASSPATH.");↵ | | 13 | Log.log(Log.ERROR,↵
|
10 | Log.log(Log.ERROR,BeanShell.class,"Please remove it from the CLASSPATH since jEdit can only run with the bundled BeanShell version " + REQUIRED_VERSION);↵ | | |
|
11 | System.exit(1);↵ | | 14 | Java14.class,e);↵
|
12 | } | | 15 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |