Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
14 | 2 | 1 | 0.998 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 14 | 253 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java |
2 | 14 | 574 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java |
| ||||
public static void addNonFinalLocalProposal(IInvocationContext context, IProblemLocation problem, Collection proposals) { ICompilationUnit cu = context.getCompilationUnit(); ASTNode selectedNode = problem.getCoveringNode(context.getASTRoot()); if ( !(selectedNode instanceof SimpleName)) { return; } IBinding binding = ((SimpleName) selectedNode).resolveBinding(); if (binding instanceof IVariableBinding) { binding = ((IVariableBinding) binding).getVariableDeclaration(); Image image = JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE); String label = Messages.format(CorrectionMessages.ModifierCorrectionSubProcessor_changemodifiertofinal_description, binding.getName()); proposals.add(new ModifierChangeCompletionProposal(label, cu, binding, selectedNode, Modifier.FINAL, 0, 5, image)); } } |
| ||||
public static void addNeedToEmulateProposal(IInvocationContext context, IProblemLocation problem, Collection proposals) { ICompilationUnit cu = context.getCompilationUnit(); ASTNode selectedNode = problem.getCoveringNode(context.getASTRoot()); if ( !(selectedNode instanceof SimpleName)) { return; } IBinding binding = ((SimpleName) selectedNode).resolveBinding(); if (binding instanceof IVariableBinding) { binding = ((IVariableBinding) binding).getVariableDeclaration(); Image image = JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE); String label = Messages.format(CorrectionMessages.ModifierCorrectionSubProcessor_changemodifiertofinal_description, binding.getName()); proposals.add(new ModifierChangeCompletionProposal(label, cu, binding, selectedNode, Modifier.FINAL, 0, 5, image)); } } |
| |||
public static void [[#variablec208a920]](IInvocationContext context, IProblemLocation problem, Collection proposals) { ICompilationUnit cu = context.getCompilationUnit(); ASTNode selectedNode = problem.getCoveringNode(context.getASTRoot()); if ( !(selectedNode instanceof SimpleName)) { return; } IBinding binding = ((SimpleName) selectedNode).resolveBinding(); if (binding instanceof IVariableBinding) { binding = ((IVariableBinding) binding).getVariableDeclaration(); Image image = JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE); String label = Messages.format(CorrectionMessages.ModifierCorrectionSubProcessor_changemodifiertofinal_description, binding.getName()); proposals.add(new ModifierChangeCompletionProposal(label, cu, binding, selectedNode, Modifier.FINAL, 0, 5, image)); } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#c208a920]] | addNonFinalLocalProposal |
1 | 2 | [[#c208a920]] | addNeedToEmulateProposal |