| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 35 | 2 | 4 | 0.986 | class_body_declarations[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 35 | 123 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AbstractTypeDeclaration.java |
| 2 | 33 | 93 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Annotation.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);
}
|
| ||||
/**
* 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);
}
|
| |||
/**
* 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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#58a03920]] | SimpleName |
| 1 | 2 | [[#58a03920]] | Name |
| 2 | 1 | [[#58a038a0]] | getName |
| 2 | 2 | [[#58a038a0]] | getTypeName |
| 3 | 1 | [[#58a03820]] | internalNameProperty |
| 3 | 2 | [[#58a03820]] | internalTypeNameProperty |
| 4 | 1 | [[#58a03740]] | setName |
| 4 | 2 | [[#58a03740]] | setTypeName |