| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 30 | 2 | 1 | 0.997 | class_body_declarations[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 30 | 126 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMethod.java |
| 2 | 29 | 470 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceType.java |
| ||||
public ITypeParameter[] getTypeParameters() throws JavaModelException {
SourceMethodElementInfo info = (SourceMethodElementInfo) getElementInfo();
return info.typeParameters;
}
/**
* @see IMethod#getTypeParameterSignatures()
* @since 3.0
* @deprecated
*/
public String[] getTypeParameterSignatures() throws JavaModelException {
ITypeParameter[] typeParameters = getTypeParameters();
int length = typeParameters.length;
String[] typeParameterSignatures = new String[length];
for (int i = 0; i < length; i++) {
TypeParameter typeParameter = (TypeParameter) typeParameters[i];
TypeParameterElementInfo info = (TypeParameterElementInfo) typeParameter.getElementInfo();
char[][] bounds = info.bounds;
if (bounds == null) {
typeParameterSignatures[i] = Signature.createTypeParameterSignature(typeParameter.getElementName(), CharOperation.NO_STRINGS);
}
else {
int boundsLength = bounds.length;
char[][] boundSignatures = new char[boundsLength][];
for (int j = 0; j < boundsLength; j++) {
boundSignatures[j] = Signature.createCharArrayTypeSignature(bounds[j], false);
}
typeParameterSignatures[i] = new String(Signature.createTypeParameterSignature(typeParameter.getElementName().toCharArray(), boundSignatures));
}
}
return typeParameterSignatures;
}
|
| ||||
public ITypeParameter[] getTypeParameters() throws JavaModelException {
SourceTypeElementInfo info = (SourceTypeElementInfo) getElementInfo();
return info.typeParameters;
}
/**
* @see IType#getTypeParameterSignatures()
* @since 3.0
*/
public String[] getTypeParameterSignatures() throws JavaModelException {
ITypeParameter[] typeParameters = getTypeParameters();
int length = typeParameters.length;
String[] typeParameterSignatures = new String[length];
for (int i = 0; i < length; i++) {
TypeParameter typeParameter = (TypeParameter) typeParameters[i];
TypeParameterElementInfo info = (TypeParameterElementInfo) typeParameter.getElementInfo();
char[][] bounds = info.bounds;
if (bounds == null) {
typeParameterSignatures[i] = Signature.createTypeParameterSignature(typeParameter.getElementName(), CharOperation.NO_STRINGS);
}
else {
int boundsLength = bounds.length;
char[][] boundSignatures = new char[boundsLength][];
for (int j = 0; j < boundsLength; j++) {
boundSignatures[j] = Signature.createCharArrayTypeSignature(bounds[j], false);
}
typeParameterSignatures[i] = new String(Signature.createTypeParameterSignature(typeParameter.getElementName().toCharArray(), boundSignatures));
}
}
return typeParameterSignatures;
}
|
| |||
public ITypeParameter[] getTypeParameters() throws JavaModelException {
[[#variable60cd8f20]] info = ( [[#variable60cd8f20]]) getElementInfo();
return info.typeParameters;
}
/**
* @see IMethod#getTypeParameterSignatures()
* @since 3.0
* @deprecated
*/
/**
* @see IType#getTypeParameterSignatures()
* @since 3.0
*/
public String[] getTypeParameterSignatures() throws JavaModelException {
ITypeParameter[] typeParameters = getTypeParameters();
int length = typeParameters.length;
String[] typeParameterSignatures = new String[length];
for (int i = 0; i < length; i++) {
TypeParameter typeParameter = (TypeParameter) typeParameters[i];
TypeParameterElementInfo info = (TypeParameterElementInfo) typeParameter.getElementInfo();
char[][] bounds = info.bounds;
if (bounds == null) {
typeParameterSignatures[i] = Signature.createTypeParameterSignature(typeParameter.getElementName(), CharOperation.NO_STRINGS);
}
else {
int boundsLength = bounds.length;
char[][] boundSignatures = new char[boundsLength][];
for (int j = 0; j < boundsLength; j++) {
boundSignatures[j] = Signature.createCharArrayTypeSignature(bounds[j], false);
}
typeParameterSignatures[i] = new String(Signature.createTypeParameterSignature(typeParameter.getElementName().toCharArray(), boundSignatures));
}
}
return typeParameterSignatures;
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#60cd8f20]] | SourceMethodElementInfo |
| 1 | 2 | [[#60cd8f20]] | SourceTypeElementInfo |