| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 25 | 2 | 3 | 0.989 | class_body_declarations[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 25 | 75 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ConvertIterableLoopOperation.java |
| 2 | 24 | 259 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/OverrideMethodDialog.java |
| ||||
/**
* Returns the supertype of the given type with the qualified name.
*
* @param binding the binding of the type
* @param name the qualified name of the supertype
* @return the supertype, or <code>null</code>
*/
private static ITypeBinding getSuperType( final ITypeBinding binding, final String name) {
if (binding.isArray() || binding.isPrimitive())
return null;
if (binding.getQualifiedName().startsWith(name))
return binding;
final ITypeBinding type = binding.getSuperclass();
if (type != null) {
final ITypeBinding result = getSuperType(type, name);
if (result != null)
return result;
}
final ITypeBinding[] types = binding.getInterfaces();
for (int index = 0; index < types.length; index++) {
final ITypeBinding result = getSuperType(types[index], name);
if (result != null)
return result;
}
return null;
}
/** Has the element variable been assigned outside the for statement? */
private boolean fAssigned = false;
|
| ||||
private static ITypeBinding getSuperType( final ITypeBinding binding, final String name) {
if (binding.isArray() || binding.isPrimitive())
return null;
if (binding.getQualifiedName().startsWith(name))
return binding;
final ITypeBinding type = binding.getSuperclass();
if (type != null) {
final ITypeBinding result = getSuperType(type, name);
if (result != null)
return result;
}
final ITypeBinding[] types = binding.getInterfaces();
for (int index = 0; index < types.length; index++) {
final ITypeBinding result = getSuperType(types[index], name);
if (result != null)
return result;
}
return null;
}
private CompilationUnit fUnit = null;
|
| |||
/**
* Returns the supertype of the given type with the qualified name.
*
* @param binding the binding of the type
* @param name the qualified name of the supertype
* @return the supertype, or <code>null</code>
*/
private static ITypeBinding getSuperType( final ITypeBinding binding, final String name) {
if (binding.isArray() || binding.isPrimitive())
return null;
if (binding.getQualifiedName().startsWith(name))
return binding;
final ITypeBinding type = binding.getSuperclass();
if (type != null) {
final ITypeBinding result = getSuperType(type, name);
if (result != null)
return result;
}
final ITypeBinding[] types = binding.getInterfaces();
for (int index = 0; index < types.length; index++) {
final ITypeBinding result = getSuperType(types[index], name);
if (result != null)
return result;
}
return null;
}
/** Has the element variable been assigned outside the for statement? */
private [[#variablec2774d60]] [[#variablec2774d00]]= [[#variablec2774c60]];
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#c2774d60]] | boolean |
| 1 | 2 | [[#c2774d60]] | CompilationUnit |
| 2 | 1 | [[#c2774d00]] | fAssigned |
| 2 | 2 | [[#c2774d00]] | fUnit |
| 3 | 1 | [[#c2774c60]] | false |
| 3 | 2 | [[#c2774c60]] | null |