CloneSet783


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
14210.998class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
114253
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java
214574
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java
Clone Instance
1
Line Count
14
Source Line
253
Source File
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));
                }
        }


Clone Instance
2
Line Count
14
Source Line
574
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java

        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));
                }
        }


Clone AbstractionParameter Count: 1Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#c208a920]]
addNonFinalLocalProposal 
12[[#c208a920]]
addNeedToEmulateProposal