CloneSet848


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
19220.996class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1191142
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java
2191163
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java
Clone Instance
1
Line Count
19
Source Line
1142
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java

        private static boolean getConvertForLoopProposal(IInvocationContext context, ASTNode node, ArrayList resultingCollections) throws CoreException {
                ForStatement forStatement = getEnclosingForStatementHeader(node);
                if (forStatement == null)
                        return false;

                if (resultingCollections == null)
                        return true;

                IFix fix = ControlStatementsFix.createConvertForLoopToEnhancedFix(context.getASTRoot(), forStatement);
                if (fix == null)
                        return false;

                Image image = JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
                ICleanUp cleanUp = new ControlStatementsCleanUp(ControlStatementsCleanUp.CONVERT_FOR_LOOP_TO_ENHANCED_FOR_LOOP);
                FixCorrectionProposal proposal = new FixCorrectionProposal(fix, cleanUp, 1, image, context);
                proposal.setCommandId(CONVERT_FOR_LOOP_ID);

                resultingCollections.add(proposal);
                return true;
        }


Clone Instance
2
Line Count
19
Source Line
1163
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java

        private static boolean getConvertIterableLoopProposal(IInvocationContext context, ASTNode node, ArrayList resultingCollections) throws CoreException {
                ForStatement forStatement = getEnclosingForStatementHeader(node);
                if (forStatement == null)
                        return false;

                if (resultingCollections == null)
                        return true;

                IFix fix = ControlStatementsFix.createConvertIterableLoopToEnhancedFix(context.getASTRoot(), forStatement);
                if (fix == null)
                        return false;

                Image image = JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
                ICleanUp cleanUp = new ControlStatementsCleanUp(ControlStatementsCleanUp.CONVERT_FOR_LOOP_TO_ENHANCED_FOR_LOOP);
                FixCorrectionProposal proposal = new FixCorrectionProposal(fix, cleanUp, 1, image, context);
                proposal.setCommandId(CONVERT_FOR_LOOP_ID);

                resultingCollections.add(proposal);
                return true;
        }


Clone AbstractionParameter Count: 2Parameter Bindings

private static boolean  [[#variable55c64400]](IInvocationContext context, ASTNode node, ArrayList resultingCollections) throws CoreException {
  ForStatement forStatement = getEnclosingForStatementHeader(node);
  if (forStatement == null)
    return false;
  if (resultingCollections == null)
    return true;
  IFix fix = ControlStatementsFix. [[#variable55c643a0]](context.getASTRoot(), forStatement);
  if (fix == null)
    return false;
  Image image = JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
  ICleanUp cleanUp = new ControlStatementsCleanUp(ControlStatementsCleanUp.CONVERT_FOR_LOOP_TO_ENHANCED_FOR_LOOP);
  FixCorrectionProposal proposal = new FixCorrectionProposal(fix, cleanUp, 1, image, context);
  proposal.setCommandId(CONVERT_FOR_LOOP_ID);
  resultingCollections.add(proposal);
  return true;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#55c64400]]
getConvertForLoopProposal 
12[[#55c64400]]
getConvertIterableLoopProposal 
21[[#55c643a0]]
createConvertForLoopToEnhancedFix 
22[[#55c643a0]]
createConvertIterableLoopToEnhancedFix