Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
12 | 2 | 2 | 0.991 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 12 | 163 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MovedMemberAnalyzer.java |
2 | 12 | 177 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MovedMemberAnalyzer.java |
| ||||
//---- helper methods -------------------------------------- private boolean isSourceAccess(IBinding binding) { if (binding instanceof IMethodBinding) { IMethodBinding method = (IMethodBinding) binding; return Modifier.isStatic(method.getModifiers()) && Bindings.equals(fSource, method.getDeclaringClass()); } else if (binding instanceof ITypeBinding) { ITypeBinding type = (ITypeBinding) binding; return Modifier.isStatic(type.getModifiers()) && Bindings.equals(fSource, type.getDeclaringClass()); } else if (binding instanceof IVariableBinding) { IVariableBinding field = (IVariableBinding) binding; return field.isField() && Modifier.isStatic(field.getModifiers()) && Bindings.equals(fSource, field.getDeclaringClass()); } return false; } |
| ||||
private boolean isTargetAccess(IBinding binding) { if (binding instanceof IMethodBinding) { IMethodBinding method = (IMethodBinding) binding; return Modifier.isStatic(method.getModifiers()) && Bindings.equals(fTarget, method.getDeclaringClass()); } else if (binding instanceof ITypeBinding) { ITypeBinding type = (ITypeBinding) binding; return Modifier.isStatic(type.getModifiers()) && Bindings.equals(fTarget, type.getDeclaringClass()); } else if (binding instanceof IVariableBinding) { IVariableBinding field = (IVariableBinding) binding; return field.isField() && Modifier.isStatic(field.getModifiers()) && Bindings.equals(fTarget, field.getDeclaringClass()); } return false; } |
| |||
//---- helper methods -------------------------------------- private boolean [[#variableb84c0940]](IBinding binding) { if (binding instanceof IMethodBinding) { IMethodBinding method = (IMethodBinding) binding; return Modifier.isStatic(method.getModifiers()) && Bindings.equals( [[#variableb84c08c0]], method.getDeclaringClass()); } else if (binding instanceof ITypeBinding) { ITypeBinding type = (ITypeBinding) binding; return Modifier.isStatic(type.getModifiers()) && Bindings.equals( [[#variableb84c08c0]], type.getDeclaringClass()); } else if (binding instanceof IVariableBinding) { IVariableBinding field = (IVariableBinding) binding; return field.isField() && Modifier.isStatic(field.getModifiers()) && Bindings.equals( [[#variableb84c08c0]], field.getDeclaringClass()); } return false; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b84c0940]] | isSourceAccess |
1 | 2 | [[#b84c0940]] | isTargetAccess |
2 | 1 | [[#b84c08c0]] | fSource |
2 | 2 | [[#b84c08c0]] | fTarget |