CloneSet1880


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
41220.990compilation_unit
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
14111
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AnonymousTypeProposalInfo.java
24111
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/TypeProposalInfo.java
Clone Instance
1
Line Count
41
Source Line
11
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AnonymousTypeProposalInfo.java

/*******************************************************************************
 * Copyright (c) 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.ui.text.java;

import org.eclipse.jdt.core.CompletionProposal;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.JavaModelException;

import org.eclipse.jdt.internal.corext.template.java.SignatureUtil;


/**
 * Proposal info that computes the javadoc lazily when it is queried.
 *
 * @since 3.1
 */
public final class AnonymousTypeProposalInfo extends MemberProposalInfo {

        /**
         * Creates a new proposal info.
         *
         * @param project the java project to reference when resolving types
         * @param proposal the proposal to generate information for
         */
        public AnonymousTypeProposalInfo(IJavaProject project, CompletionProposal proposal) {
                super(project, proposal);
        }

        /**
         * Resolves the member described by the receiver and returns it if found.
         * Returns <code>null</code> if no corresponding member can be found.
         *
         * @return the resolved member or <code>null</code> if none is found
         * @throws JavaModelException if accessing the java model fails
         */
        protected IMember resolveMember() throws JavaModelException {
                char[] signature = fProposal.getDeclarationSignature();
                String typeName = SignatureUtil.stripSignatureToFQN(String.valueOf(signature));
                return fJavaProject.findType(typeName);
        }
}




Clone Instance
2
Line Count
41
Source Line
11
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/TypeProposalInfo.java

/*******************************************************************************
 * Copyright (c) 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.ui.text.java;

import org.eclipse.jdt.core.CompletionProposal;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.JavaModelException;

import org.eclipse.jdt.internal.corext.template.java.SignatureUtil;


/**
 * Proposal info that computes the javadoc lazily when it is queried.
 *
 * @since 3.1
 */
public final class TypeProposalInfo extends MemberProposalInfo {

        /**
         * Creates a new proposal info.
         *
         * @param project the java project to reference when resolving types
         * @param proposal the proposal to generate information for
         */
        public TypeProposalInfo(IJavaProject project, CompletionProposal proposal) {
                super(project, proposal);
        }

        /**
         * Resolves the member described by the receiver and returns it if found.
         * Returns <code>null</code> if no corresponding member can be found.
         *
         * @return the resolved member or <code>null</code> if none is found
         * @throws JavaModelException if accessing the java model fails
         */
        protected IMember resolveMember() throws JavaModelException {
                char[] signature = fProposal.getSignature();
                String typeName = SignatureUtil.stripSignatureToFQN(String.valueOf(signature));
                return fJavaProject.findType(typeName);
        }
}




Clone AbstractionParameter Count: 2Parameter Bindings

/*******************************************************************************
 * Copyright (c) 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.ui.text.java;

import org.eclipse.jdt.core.CompletionProposal;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.corext.template.java.SignatureUtil;

/**
 * Proposal info that computes the javadoc lazily when it is queried.
 *
 * @since 3.1
 */
public final class [[#variable99182a20]]extends MemberProposalInfo {
  /**
           * Creates a new proposal info.
           *
           * @param project the java project to reference when resolving types
           * @param proposal the proposal to generate information for
           */
  public [[#variable99182a20]](IJavaProject project, CompletionProposal proposal) {
    super(project, proposal);
  }

  /**
           * Resolves the member described by the receiver and returns it if found.
           * Returns <code>null</code> if no corresponding member can be found.
           *
           * @return the resolved member or <code>null</code> if none is found
           * @throws JavaModelException if accessing the java model fails
           */
  protected IMember resolveMember() throws JavaModelException {
    char[] signature = fProposal. [[#variable991828e0]]();
    String typeName = SignatureUtil.stripSignatureToFQN(String.valueOf(signature));
    return fJavaProject.findType(typeName);
  }
}


 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#99182a20]]
AnonymousTypeProposalInfo 
12[[#99182a20]]
TypeProposalInfo 
21[[#991828e0]]
getDeclarationSignature 
22[[#991828e0]]
getSignature