CloneSet1739


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
28230.990class_body_declarations[4]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
128114
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMImport.java
22897
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMPackage.java
Clone Instance
1
Line Count
28
Source Line
114
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMImport.java

/** 
 * @see IDOMNode#getContents()
 */
public String getContents() {
        if (fName == null) {
                return null;
        }
        else   {
                return super.getContents();
        }
}

/**
 * @see DOMNode#getDetailedNode()
 */
protected DOMNode getDetailedNode() {
        return (DOMNode) getFactory().createImport(getContents());
}

/**
 * @see IDOMNode#getJavaElement
 */
public IJavaElement getJavaElement(IJavaElement parent) throws IllegalArgumentException {
        if (parent.getElementType() == IJavaElement.COMPILATION_UNIT) {
                return ((ICompilationUnit) parent).getImport(getName());
        }
        else   {
                throw new IllegalArgumentException(Messages.element_illegalParent);
        }
}

/**
 * @see IDOMNode#getNodeType()
 */
public int getNodeType() {
        return IDOMNode.IMPORT;
}


Clone Instance
2
Line Count
28
Source Line
97
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMPackage.java

/**
 * @see IDOMNode#getContents()
 */
public String getContents() {
        if (fName == null) {
                return null;
        }
        else   {
                return super.getContents();
        }
}

/**
 * @see DOMNode#getDetailedNode()
 */
protected DOMNode getDetailedNode() {
        return (DOMNode) getFactory().createPackage(getContents());
}

/**
 * @see IDOMNode#getJavaElement
 */
public IJavaElement getJavaElement(IJavaElement parent) throws IllegalArgumentException {
        if (parent.getElementType() == IJavaElement.COMPILATION_UNIT) {
                return ((ICompilationUnit) parent).getPackageDeclaration(getName());
        }
        else   {
                throw new IllegalArgumentException(Messages.element_illegalParent);
        }
}

/**
 * @see IDOMNode#getNodeType()
 */
public int getNodeType() {
        return IDOMNode.PACKAGE;
}


Clone AbstractionParameter Count: 3Parameter Bindings

/** 
 * @see IDOMNode#getContents()
 */
/**
 * @see IDOMNode#getContents()
 */
public String getContents() {
  if (fName == null) {
    return null;
  }
  else {
    return super.getContents();
  }
}

/**
 * @see DOMNode#getDetailedNode()
 */
protected DOMNode getDetailedNode() {
  return (DOMNode) getFactory(). [[#variablec348e500]](getContents());
}

/**
 * @see IDOMNode#getJavaElement
 */
public IJavaElement getJavaElement(IJavaElement parent) throws IllegalArgumentException {
  if (parent.getElementType() == IJavaElement.COMPILATION_UNIT) {
    return ((ICompilationUnit) parent). [[#variable54304b80]](getName());
  }
  else {
    throw new IllegalArgumentException(Messages.element_illegalParent);
  }
}

/**
 * @see IDOMNode#getNodeType()
 */
public int getNodeType() {
  return IDOMNode. [[#variablec348e560]];
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#c348e500]]
createImport 
12[[#c348e500]]
createPackage 
21[[#54304b80]]
getImport 
22[[#54304b80]]
getPackageDeclaration 
31[[#c348e560]]
IMPORT 
32[[#c348e560]]
PACKAGE