CloneSet87


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
53220.998class_body_declarations[4]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
15465
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryType.java
25360
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceType.java
Clone Instance
1
Line Count
54
Source Line
65
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryType.java

/**
 * @see IType#codeComplete(char[], int, int, char[][], char[][], int[], boolean, ICompletionRequestor)
 * @deprecated
 */
public void codeComplete(char[] snippet, int insertion, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic,ICompletionRequestor requestor) throws JavaModelException {
        codeComplete(snippet, insertion, position, localVariableTypeNames, localVariableNames, localVariableModifiers, isStatic, requestor, DefaultWorkingCopyOwner.PRIMARY);
}

/**
 * @see IType#codeComplete(char[], int, int, char[][], char[][], int[], boolean, ICompletionRequestor, WorkingCopyOwner)
 * @deprecated
 */
public void codeComplete(char[] snippet, int insertion, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic,ICompletionRequestor requestor,WorkingCopyOwner owner) throws JavaModelException {
        if (requestor == null) {
                throw new IllegalArgumentException("Completion requestor cannot be null"); //$NON-NLS-1$
        }
        codeComplete(snippet, insertion, position, localVariableTypeNames, localVariableNames, localVariableModifiers, isStatic, new org.eclipse.jdt.internal.codeassist.CompletionRequestorWrapper(requestor), owner);
}

/*
 * @see IType#codeComplete(char[], int, int, char[][], char[][], int[], boolean, ICompletionRequestor)
 */
public void codeComplete(char[] snippet, int insertion, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic,CompletionRequestor requestor) throws JavaModelException {
        codeComplete(snippet, insertion, position, localVariableTypeNames, localVariableNames, localVariableModifiers, isStatic, requestor, DefaultWorkingCopyOwner.PRIMARY);
}

/*
 * @see IType#codeComplete(char[], int, int, char[][], char[][], int[], boolean, ICompletionRequestor, WorkingCopyOwner)
 */
public void codeComplete(char[] snippet, int insertion, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic,CompletionRequestor requestor,WorkingCopyOwner owner) throws JavaModelException {
        if (requestor == null) {
                throw new IllegalArgumentException("Completion requestor cannot be null"); //$NON-NLS-1$
        }
        JavaProject project = (JavaProject) getJavaProject();
        SearchableEnvironment environment = project.newSearchableNameEnvironment(owner);
        CompletionEngine engine = new CompletionEngine(environment, requestor, project.getOptions(true), project);

        String source = getClassFile().getSource();
        if (source != null && insertion > -1 && insertion < source.length()) {
                // code complete

                char[] prefix = CharOperation.concat(source.substring(0, insertion).toCharArray(), new char[] {
                                                                                                               '{'
                                                                                                              } );
                char[] suffix =  CharOperation.concat(new char[] {
                                                                  '}'
                                                                 },    source.substring(insertion).toCharArray());
                char[] fakeSource = CharOperation.concat(prefix, snippet, suffix);
                BasicCompilationUnit cu =
                        new BasicCompilationUnit(
                                fakeSource, 
                                null, 
                                getElementName(), 
                                project         ); // use project to retrieve corresponding .java IFile
                engine.complete(cu, prefix.length + position, prefix.length);
        }
        else   {
                engine.complete(this, snippet, position, localVariableTypeNames, localVariableNames, localVariableModifiers, isStatic);
        }
        if (NameLookup.VERBOSE) {
                System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInSourcePackage: " + environment.nameLookup.timeSpentInSeekTypesInSourcePackage + "ms");  //$NON-NLS-1$ //$NON-NLS-2$
                System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInBinaryPackage: " + environment.nameLookup.timeSpentInSeekTypesInBinaryPackage + "ms");  //$NON-NLS-1$ //$NON-NLS-2$
        }
}


Clone Instance
2
Line Count
53
Source Line
60
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceType.java

/**
 * @see IType
 * @deprecated
 */
public void codeComplete(char[] snippet, int insertion, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic,ICompletionRequestor requestor) throws JavaModelException {
        codeComplete(snippet, insertion, position, localVariableTypeNames, localVariableNames, localVariableModifiers, isStatic, requestor, DefaultWorkingCopyOwner.PRIMARY);
}

/**
 * @see IType
 * @deprecated
 */
public void codeComplete(char[] snippet, int insertion, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic,ICompletionRequestor requestor,WorkingCopyOwner owner) throws JavaModelException {
        if (requestor == null) {
                throw new IllegalArgumentException("Completion requestor cannot be null"); //$NON-NLS-1$
        }
        codeComplete(snippet, insertion, position, localVariableTypeNames, localVariableNames, localVariableModifiers, isStatic, new org.eclipse.jdt.internal.codeassist.CompletionRequestorWrapper(requestor), owner);
}

/**
 * @see IType
 */
public void codeComplete(char[] snippet, int insertion, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic,CompletionRequestor requestor) throws JavaModelException {
        codeComplete(snippet, insertion, position, localVariableTypeNames, localVariableNames, localVariableModifiers, isStatic, requestor, DefaultWorkingCopyOwner.PRIMARY);
}

/**
 * @see IType
 */
public void codeComplete(char[] snippet, int insertion, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic,CompletionRequestor requestor,WorkingCopyOwner owner) throws JavaModelException {
        if (requestor == null) {
                throw new IllegalArgumentException("Completion requestor cannot be null"); //$NON-NLS-1$
        }

        JavaProject project = (JavaProject) getJavaProject();
        SearchableEnvironment environment = project.newSearchableNameEnvironment(owner);
        CompletionEngine engine = new CompletionEngine(environment, requestor, project.getOptions(true), project);

        String source = getCompilationUnit().getSource();
        if (source != null && insertion > -1 && insertion < source.length()) {

                char[] prefix = CharOperation.concat(source.substring(0, insertion).toCharArray(), new char[] {
                                                                                                               '{'
                                                                                                              } );
                char[] suffix = CharOperation.concat(new char[] {
                                                                 '}'
                                                                },    source.substring(insertion).toCharArray());
                char[] fakeSource = CharOperation.concat(prefix, snippet, suffix);
                BasicCompilationUnit cu =
                        new BasicCompilationUnit(
                                fakeSource, 
                                null, 
                                getElementName(), 
                                getParent()     );
                engine.complete(cu, prefix.length + position, prefix.length);
        }
        else   {
                engine.complete(this, snippet, position, localVariableTypeNames, localVariableNames, localVariableModifiers, isStatic);
        }
        if (NameLookup.VERBOSE) {
                System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInSourcePackage: " + environment.nameLookup.timeSpentInSeekTypesInSourcePackage + "ms");  //$NON-NLS-1$ //$NON-NLS-2$
                System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInBinaryPackage: " + environment.nameLookup.timeSpentInSeekTypesInBinaryPackage + "ms");  //$NON-NLS-1$ //$NON-NLS-2$
        }
}


Clone AbstractionParameter Count: 2Parameter Bindings

/**
 * @see IType
 * @deprecated
 */
/**
 * @see IType#codeComplete(char[], int, int, char[][], char[][], int[], boolean, ICompletionRequestor)
 * @deprecated
 */
public void codeComplete(char[] snippet, int insertion, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic, ICompletionRequestor requestor) throws JavaModelException {
  codeComplete(snippet, insertion, position, localVariableTypeNames, localVariableNames, localVariableModifiers, isStatic, requestor, DefaultWorkingCopyOwner.PRIMARY);
}

/**
 * @see IType
 * @deprecated
 */
/**
 * @see IType#codeComplete(char[], int, int, char[][], char[][], int[], boolean, ICompletionRequestor, WorkingCopyOwner)
 * @deprecated
 */
public void codeComplete(char[] snippet, int insertion, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic, ICompletionRequestor requestor, WorkingCopyOwner owner) throws JavaModelException {
  if (requestor == null) {
    throw new IllegalArgumentException("Completion requestor cannot be null"); //$NON-NLS-1$
  }
  codeComplete(snippet, insertion, position, localVariableTypeNames, localVariableNames, localVariableModifiers, isStatic, new org.eclipse.jdt.internal.codeassist.CompletionRequestorWrapper(requestor), owner);
}

/**
 * @see IType
 */
/*
 * @see IType#codeComplete(char[], int, int, char[][], char[][], int[], boolean, ICompletionRequestor)
 */
public void codeComplete(char[] snippet, int insertion, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic, CompletionRequestor requestor) throws JavaModelException {
  codeComplete(snippet, insertion, position, localVariableTypeNames, localVariableNames, localVariableModifiers, isStatic, requestor, DefaultWorkingCopyOwner.PRIMARY);
}

/**
 * @see IType
 */
/*
 * @see IType#codeComplete(char[], int, int, char[][], char[][], int[], boolean, ICompletionRequestor, WorkingCopyOwner)
 */
public void codeComplete(char[] snippet, int insertion, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic, CompletionRequestor requestor, WorkingCopyOwner owner) throws JavaModelException {
  if (requestor == null) {
    throw new IllegalArgumentException("Completion requestor cannot be null"); //$NON-NLS-1$
  }
  JavaProject project = (JavaProject) getJavaProject();
  SearchableEnvironment environment = project.newSearchableNameEnvironment(owner);
  CompletionEngine engine = new CompletionEngine(environment, requestor, project.getOptions(true), project);
  String source = [[#variable59463e60]]().getSource();
  if (source != null && insertion > -1 && insertion < source.length()) {
    // code complete
    char[] prefix = CharOperation.concat(source.substring(0, insertion).toCharArray(), new char[] {
                                                                                                    '{'
                                                                                                  } );
    char[] suffix = CharOperation.concat(new char[] {
                                                      '}'
                                                    }, source.substring(insertion).toCharArray());
    char[] fakeSource = CharOperation.concat(prefix, snippet, suffix);
    BasicCompilationUnit cu = new BasicCompilationUnit(fakeSource, null, getElementName(),  [[#variable59463e80]]); // use project to retrieve corresponding .java IFile
    engine.complete(cu, prefix.length + position, prefix.length);
  }
  else {
    engine.complete(this, snippet, position, localVariableTypeNames, localVariableNames, localVariableModifiers, isStatic);
  }
  if (NameLookup.VERBOSE) {
    System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInSourcePackage: " + environment.nameLookup.timeSpentInSeekTypesInSourcePackage + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
    System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInBinaryPackage: " + environment.nameLookup.timeSpentInSeekTypesInBinaryPackage + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#59463e60]]
getCompilationUnit 
12[[#59463e60]]
getClassFile 
21[[#59463e80]]
getParent() 
22[[#59463e80]]
project