| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 20 | 2 | 3 | 0.980 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 20 | 28 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/selectionactions/StructureSelectNextAction.java |
| 2 | 20 | 28 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/selectionactions/StructureSelectPreviousAction.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);
}
}
}
|
| ||||
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);
}
}
}
|
| |||
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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#52327220]] | PreviousNodeAnalyzer |
| 1 | 2 | [[#52327220]] | NextNodeAnalyzer |
| 2 | 1 | [[#52327b40]] | fPreviousNode |
| 2 | 2 | [[#52327b40]] | fNextNode |
| 3 | 1 | [[#52327c40]] | end |
| 3 | 2 | [[#52327c40]] | start |