CloneSet1167


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
20230.980class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12028
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/selectionactions/StructureSelectNextAction.java
22028
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/selectionactions/StructureSelectPreviousAction.java
Clone Instance
1
Line Count
20
Source Line
28
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/selectionactions/StructureSelectNextAction.java

        private static class NextNodeAnalyzer extends GenericVisitor {
                private final int fOffset;

                private ASTNode fNextNode;

                private NextNodeAnalyzer(int offset) {
                        super(true);
                        fOffset = offset;
                }

                public static ASTNode perform(int offset, ASTNode lastCoveringNode) {
                        NextNodeAnalyzer analyzer = new NextNodeAnalyzer(offset);
                        lastCoveringNode.accept(analyzer);
                        return analyzer.fNextNode;
                }

                protected boolean visitNode(ASTNode node) {
                        int start = node.getStartPosition();
                        int end = start + node.getLength();
                        if (start == fOffset) {
                                fNextNode = node;
                                return true;
                        }
                        else   {
                                return (start < fOffset && fOffset < end);
                        }
                }
        }


Clone Instance
2
Line Count
20
Source Line
28
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/selectionactions/StructureSelectPreviousAction.java

        private static class PreviousNodeAnalyzer extends GenericVisitor {
                private final int fOffset;

                private ASTNode fPreviousNode;

                private PreviousNodeAnalyzer(int offset) {
                        super(true);
                        fOffset = offset;
                }

                public static ASTNode perform(int offset, ASTNode lastCoveringNode) {
                        PreviousNodeAnalyzer analyzer = new PreviousNodeAnalyzer(offset);
                        lastCoveringNode.accept(analyzer);
                        return analyzer.fPreviousNode;
                }

                protected boolean visitNode(ASTNode node) {
                        int start = node.getStartPosition();
                        int end = start + node.getLength();
                        if (end == fOffset) {
                                fPreviousNode = node;
                                return true;
                        }
                        else   {
                                return (start < fOffset && fOffset < end);
                        }
                }
        }


Clone AbstractionParameter Count: 3Parameter Bindings

private static class [[#variable52327220]]extends GenericVisitor {
  private final int fOffset;

  private ASTNode  [[#variable52327b40]];

  private [[#variable52327220]](int offset) {
    super(true);
    fOffset = offset;
  }

  public static ASTNode perform(int offset, ASTNode lastCoveringNode) {
     [[#variable52327220]] analyzer = new [[#variable52327220]](offset);
    lastCoveringNode.accept(analyzer);
    return analyzer. [[#variable52327b40]];
  }

  protected boolean visitNode(ASTNode node) {
    int start = node.getStartPosition();
    int end = start + node.getLength();
    if ( [[#variable52327c40]]== fOffset) {
       [[#variable52327b40]]= node;
      return true;
    }
    else {
      return (start < fOffset && fOffset < end);
    }
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#52327220]]
PreviousNodeAnalyzer 
12[[#52327220]]
NextNodeAnalyzer 
21[[#52327b40]]
fPreviousNode 
22[[#52327b40]]
fNextNode 
31[[#52327c40]]
end 
32[[#52327c40]]
start