CloneSet1068


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
35240.986class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
135123
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AbstractTypeDeclaration.java
23393
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Annotation.java
Clone Instance
1
Line Count
35
Source Line
123
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AbstractTypeDeclaration.java

        /**
         * Returns the name of the type declared in this type declaration.
         * 
         * @return the type name node
         * @since 2.0 (originally declared on <code>TypeDeclaration</code>)
         */
        public SimpleName getName() {
                if (this.typeName == null) {
                        // lazy init must be thread-safe for readers
                        synchronized (this ) {
                                if (this.typeName == null) {
                                        preLazyInit();
                                        this.typeName = new SimpleName(this.ast);
                                        postLazyInit(this.typeName, internalNameProperty());
                                }
                        }
                }
                return this.typeName;
        }

        /**
         * Sets the name of the type declared in this type declaration to the
         * given name.
         * 
         * @param typeName the new type name
         * @exception IllegalArgumentException if:
         * <ul>
         * <li>the node belongs to a different AST</li>
         * <li>the node already has a parent</li>
         * </ul>
         * @since 2.0 (originally declared on <code>TypeDeclaration</code>)
         */
        public void setName(SimpleName typeName) {
                if (typeName == null) {
                        throw new IllegalArgumentException();
                }
                ChildPropertyDescriptor p = internalNameProperty();
                ASTNode oldChild = this.typeName;
                preReplaceChild(oldChild, typeName, p);
                this.typeName = typeName;
                postReplaceChild(oldChild, typeName, p);
        }


Clone Instance
2
Line Count
33
Source Line
93
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Annotation.java

        /**
         * Returns the annotation type name of this annotation.
         * 
         * @return the annotation type name
         */
        public Name getTypeName() {
                if (this.typeName == null) {
                        // lazy init must be thread-safe for readers
                        synchronized (this ) {
                                if (this.typeName == null) {
                                        preLazyInit();
                                        this.typeName = new SimpleName(this.ast);
                                        postLazyInit(this.typeName, internalTypeNameProperty());
                                }
                        }
                }
                return this.typeName;
        }

        /**
         * Sets the annotation type name of this annotation.
         * 
         * @param typeName the annotation type name
         * @exception IllegalArgumentException if:
         * <ul>
         * <li>the node belongs to a different AST</li>
         * <li>the node already has a parent</li>
         * </ul>
         */
        public void setTypeName(Name typeName) {
                if (typeName == null) {
                        throw new IllegalArgumentException();
                }
                ChildPropertyDescriptor p = internalTypeNameProperty();
                ASTNode oldChild = this.typeName;
                preReplaceChild(oldChild, typeName, p);
                this.typeName = typeName;
                postReplaceChild(oldChild, typeName, p);
        }


Clone AbstractionParameter Count: 4Parameter Bindings

/**
         * Returns the name of the type declared in this type declaration.
         * 
         * @return the type name node
         * @since 2.0 (originally declared on <code>TypeDeclaration</code>)
         */
/**
         * Returns the annotation type name of this annotation.
         * 
         * @return the annotation type name
         */
public [[#variable58a03920]]  [[#variable58a038a0]]() {
  if (this.typeName == null) {
    // lazy init must be thread-safe for readers
    synchronized (this ) {
      if (this.typeName == null) {
        preLazyInit();
        this.typeName = new SimpleName(this.ast);
        postLazyInit(this.typeName,  [[#variable58a03820]]());
      }
    }
  }
  return this.typeName;
}

/**
         * Sets the name of the type declared in this type declaration to the
         * given name.
         * 
         * @param typeName the new type name
         * @exception IllegalArgumentException if:
         * <ul>
         * <li>the node belongs to a different AST</li>
         * <li>the node already has a parent</li>
         * </ul>
         * @since 2.0 (originally declared on <code>TypeDeclaration</code>)
         */
/**
         * Sets the annotation type name of this annotation.
         * 
         * @param typeName the annotation type name
         * @exception IllegalArgumentException if:
         * <ul>
         * <li>the node belongs to a different AST</li>
         * <li>the node already has a parent</li>
         * </ul>
         */
public void [[#variable58a03740]]( [[#variable58a03920]] typeName) {
  if (typeName == null) {
    throw new IllegalArgumentException();
  }
  ChildPropertyDescriptor p = [[#variable58a03820]]();
  ASTNode oldChild = this.typeName;
  preReplaceChild(oldChild, typeName, p);
  this.typeName = typeName;
  postReplaceChild(oldChild, typeName, p);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#58a03920]]
SimpleName 
12[[#58a03920]]
Name 
21[[#58a038a0]]
getName 
22[[#58a038a0]]
getTypeName 
31[[#58a03820]]
internalNameProperty 
32[[#58a03820]]
internalTypeNameProperty 
41[[#58a03740]]
setName 
42[[#58a03740]]
setTypeName