CloneSet808


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
39201.000class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
13972
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/UnusedCodeFix.java
23933
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/RemoveDeclarationCorrectionProposal.java
Clone Instance
1
Line Count
39
Source Line
72
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/UnusedCodeFix.java

        private static class SideEffectFinder extends ASTVisitor {

                private ArrayList fSideEffectNodes;

                public SideEffectFinder(ArrayList res) {
                        fSideEffectNodes = res;
                }

                public boolean visit(Assignment node) {
                        fSideEffectNodes.add(node);
                        return false;
                }

                public boolean visit(PostfixExpression node) {
                        fSideEffectNodes.add(node);
                        return false;
                }

                public boolean visit(PrefixExpression node) {
                        Object operator = node.getOperator();
                        if (operator == PrefixExpression.Operator.INCREMENT || operator == PrefixExpression.Operator.DECREMENT) {
                                fSideEffectNodes.add(node);
                        }
                        return false;
                }

                public boolean visit(MethodInvocation node) {
                        fSideEffectNodes.add(node);
                        return false;
                }

                public boolean visit(ClassInstanceCreation node) {
                        fSideEffectNodes.add(node);
                        return false;
                }

                public boolean visit(SuperMethodInvocation node) {
                        fSideEffectNodes.add(node);
                        return false;
                }
        }


Clone Instance
2
Line Count
39
Source Line
33
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/RemoveDeclarationCorrectionProposal.java

        private static class SideEffectFinder extends ASTVisitor {

                private ArrayList fSideEffectNodes;

                public SideEffectFinder(ArrayList res) {
                        fSideEffectNodes = res;
                }

                public boolean visit(Assignment node) {
                        fSideEffectNodes.add(node);
                        return false;
                }

                public boolean visit(PostfixExpression node) {
                        fSideEffectNodes.add(node);
                        return false;
                }

                public boolean visit(PrefixExpression node) {
                        Object operator = node.getOperator();
                        if (operator == PrefixExpression.Operator.INCREMENT || operator == PrefixExpression.Operator.DECREMENT) {
                                fSideEffectNodes.add(node);
                        }
                        return false;
                }

                public boolean visit(MethodInvocation node) {
                        fSideEffectNodes.add(node);
                        return false;
                }

                public boolean visit(ClassInstanceCreation node) {
                        fSideEffectNodes.add(node);
                        return false;
                }

                public boolean visit(SuperMethodInvocation node) {
                        fSideEffectNodes.add(node);
                        return false;
                }
        }


Clone AbstractionParameter Count: 0Parameter Bindings

private static class SideEffectFinder extends ASTVisitor {
  private ArrayList fSideEffectNodes;

  public SideEffectFinder(ArrayList res) {
    fSideEffectNodes = res;
  }

  public boolean visit(Assignment node) {
    fSideEffectNodes.add(node);
    return false;
  }

  public boolean visit(PostfixExpression node) {
    fSideEffectNodes.add(node);
    return false;
  }

  public boolean visit(PrefixExpression node) {
    Object operator = node.getOperator();
    if (operator == PrefixExpression.Operator.INCREMENT || operator == PrefixExpression.Operator.DECREMENT) {
      fSideEffectNodes.add(node);
    }
    return false;
  }

  public boolean visit(MethodInvocation node) {
    fSideEffectNodes.add(node);
    return false;
  }

  public boolean visit(ClassInstanceCreation node) {
    fSideEffectNodes.add(node);
    return false;
  }

  public boolean visit(SuperMethodInvocation node) {
    fSideEffectNodes.add(node);
    return false;
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None