| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 39 | 2 | 0 | 1.000 | statement_sequence[4] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 39 | 282 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java |
| 2 | 38 | 167 | plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java |
| ||||
if (methodDecls != null) {
if (typeBinding.isInterface()) {
// we cannot create problem methods for an interface. So we have to generate a clinit
// which should contain all the problem
classFile.addProblemClinit(problemsCopy);
for (int i = 0, length = methodDecls.length; i < length; i++) {
AbstractMethodDeclaration methodDecl = methodDecls[i];
MethodBinding method = methodDecl.binding;
if (method == null || method.isConstructor()) continue ;
classFile.addAbstractMethod(methodDecl, method);
}
}
else {
for (int i = 0, length = methodDecls.length; i < length; i++) {
AbstractMethodDeclaration methodDecl = methodDecls[i];
MethodBinding method = methodDecl.binding;
if (method == null) continue ;
if (method.isConstructor()) {
classFile.addProblemConstructor(methodDecl, method, problemsCopy);
}
else {
classFile.addProblemMethod(methodDecl, method, problemsCopy);
}
}
}
// add abstract methods
classFile.addDefaultAbstractMethods();
}
// propagate generation of (problem) member types
if (typeDeclaration.memberTypes != null) {
for (int i = 0, max = typeDeclaration.memberTypes.length; i < max; i++) {
TypeDeclaration memberType = typeDeclaration.memberTypes[i];
if (memberType.binding != null) {
classFile.recordNestedMemberAttribute(memberType.binding);
ClassFile.createProblemType(memberType, unitResult);
}
}
}
classFile.addAttributes();
unitResult.record(typeBinding.constantPoolName(), classFile);
|
| ||||
if (methodDecls != null) {
if (typeBinding.isInterface()) {
// we cannot create problem methods for an interface. So we have to generate a clinit
// which should contain all the problem
classFile.addProblemClinit(problemsCopy);
for (int i = 0, length = methodDecls.length; i < length; i++) {
AbstractMethodDeclaration methodDecl = methodDecls[i];
MethodBinding method = methodDecl.binding;
if (method == null || method.isConstructor()) continue ;
classFile.addAbstractMethod(methodDecl, method);
}
}
else {
for (int i = 0, length = methodDecls.length; i < length; i++) {
AbstractMethodDeclaration methodDecl = methodDecls[i];
MethodBinding method = methodDecl.binding;
if (method == null) continue ;
if (method.isConstructor()) {
classFile.addProblemConstructor(methodDecl, method, problemsCopy);
}
else {
classFile.addProblemMethod(methodDecl, method, problemsCopy);
}
}
}
// add abstract methods
classFile.addDefaultAbstractMethods();
}
// propagate generation of (problem) member types
if (typeDeclaration.memberTypes != null) {
for (int i = 0, max = typeDeclaration.memberTypes.length; i < max; i++) {
TypeDeclaration memberType = typeDeclaration.memberTypes[i];
if (memberType.binding != null) {
classFile.recordNestedMemberAttribute(memberType.binding);
ClassFile.createProblemType(memberType, unitResult);
}
}
}
classFile.addAttributes();
unitResult.record(typeBinding.constantPoolName(), classFile);
|
| |||
if (methodDecls != null) {
if (typeBinding.isInterface()) {
// we cannot create problem methods for an interface. So we have to generate a clinit
// which should contain all the problem
classFile.addProblemClinit(problemsCopy);
for (int i = 0, length = methodDecls.length; i < length; i++) {
AbstractMethodDeclaration methodDecl = methodDecls[i];
MethodBinding method = methodDecl.binding;
if (method == null || method.isConstructor())
continue ;
classFile.addAbstractMethod(methodDecl, method);
}
}
else {
for (int i = 0, length = methodDecls.length; i < length; i++) {
AbstractMethodDeclaration methodDecl = methodDecls[i];
MethodBinding method = methodDecl.binding;
if (method == null)
continue ;
if (method.isConstructor()) {
classFile.addProblemConstructor(methodDecl, method, problemsCopy);
}
else {
classFile.addProblemMethod(methodDecl, method, problemsCopy);
}
}
}
// add abstract methods
classFile.addDefaultAbstractMethods();
}
// propagate generation of (problem) member types
if (typeDeclaration.memberTypes != null) {
for (int i = 0, max = typeDeclaration.memberTypes.length; i < max; i++) {
TypeDeclaration memberType = typeDeclaration.memberTypes[i];
if (memberType.binding != null) {
classFile.recordNestedMemberAttribute(memberType.binding);
ClassFile.createProblemType(memberType, unitResult);
}
}
}
classFile.addAttributes();
unitResult.record(typeBinding.constantPoolName(), classFile);
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| None | |||