Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
10 | 2 | 3 | 0.987 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 10 | 469 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java |
2 | 10 | 493 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java |
| ||||
/** * Sets the source code to be parsed. * This method automatically sets the project (and compiler * options) based on the given compilation unit, in a manner * equivalent to <code>setProject(source.getJavaProject())</code> * * @param source the Java model compilation unit whose source code * is to be parsed, or <code>null</code> if none */ public void setSource(ICompilationUnit source) { this.compilationUnitSource = source; // clear the others this.rawSource = null; this.classFileSource = null; if (source != null) { this.project = source.getJavaProject(); Map options = this.project.getOptions(true); options.remove(JavaCore.COMPILER_TASK_TAGS); // no need to parse task tags this.compilerOptions = options; } } |
| ||||
/** * Sets the source code to be parsed. * <p>This method automatically sets the project (and compiler * options) based on the given compilation unit, in a manner * equivalent to <code>setProject(source.getJavaProject())</code>.</p> * <p>If the given class file has no source attachment, the creation of the * ast will fail with an IllegalStateException.</p> * * @param source the Java model class file whose corresponding source code * is to be parsed, or <code>null</code> if none */ public void setSource(IClassFile source) { this.classFileSource = source; // clear the others this.rawSource = null; this.compilationUnitSource = null; if (source != null) { this.project = source.getJavaProject(); Map options = this.project.getOptions(true); options.remove(JavaCore.COMPILER_TASK_TAGS); // no need to parse task tags this.compilerOptions = options; } } |
| |||
/** * Sets the source code to be parsed. * This method automatically sets the project (and compiler * options) based on the given compilation unit, in a manner * equivalent to <code>setProject(source.getJavaProject())</code> * * @param source the Java model compilation unit whose source code * is to be parsed, or <code>null</code> if none */ /** * Sets the source code to be parsed. * <p>This method automatically sets the project (and compiler * options) based on the given compilation unit, in a manner * equivalent to <code>setProject(source.getJavaProject())</code>.</p> * <p>If the given class file has no source attachment, the creation of the * ast will fail with an IllegalStateException.</p> * * @param source the Java model class file whose corresponding source code * is to be parsed, or <code>null</code> if none */ public void setSource( [[#variable582e1020]] source) { this. [[#variable582e0fa0]]= source; // clear the others this.rawSource = null; this. [[#variable582e0ea0]]= null; if (source != null) { this.project = source.getJavaProject(); Map options = this.project.getOptions(true); options.remove(JavaCore.COMPILER_TASK_TAGS); // no need to parse task tags this.compilerOptions = options; } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#582e1020]] | ICompilationUnit |
1 | 2 | [[#582e1020]] | IClassFile |
2 | 1 | [[#582e0fa0]] | compilationUnitSource |
2 | 2 | [[#582e0fa0]] | classFileSource |
3 | 1 | [[#582e0ea0]] | classFileSource |
3 | 2 | [[#582e0ea0]] | compilationUnitSource |