| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 16 | 2 | 2 | 0.953 | executable_statement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 16 | 890 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeRefactoringProcessor.java |
| 2 | 16 | 909 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeRefactoringProcessor.java |
| ||||
{
final ASTNode type = node;
while (node != null && !(node instanceof MethodDeclaration) && !(node instanceof VariableDeclarationFragment))
node = node.getParent();
if (node != null) {
final int delta = node.getStartPosition() + node.getLength() - type.getStartPosition();
if (node instanceof MethodDeclaration)
binding = ((MethodDeclaration) node).resolveBinding();
else if (node instanceof VariableDeclarationFragment)
binding = ((VariableDeclarationFragment) node).resolveBinding();
if (binding != null) {
node = target.findDeclaringNode(binding.getKey());
if (node instanceof MethodDeclaration || node instanceof VariableDeclarationFragment) {
node = NodeFinder.perform(target, node.getStartPosition() + node.getLength() - delta, 0);
if (node instanceof SimpleName)
rewriteTypeOccurrence(estimate, rewrite, node, group);
}
}
}
}
|
| ||||
{
final ASTNode name = node;
while (node != null && !(node instanceof MethodDeclaration) && !(node instanceof VariableDeclarationFragment))
node = node.getParent();
if (node != null) {
final int delta = node.getStartPosition() + node.getLength() - name.getStartPosition();
if (node instanceof MethodDeclaration)
binding = ((MethodDeclaration) node).resolveBinding();
else if (node instanceof VariableDeclarationFragment)
binding = ((VariableDeclarationFragment) node).resolveBinding();
if (binding != null) {
node = target.findDeclaringNode(binding.getKey());
if (node instanceof SimpleName || node instanceof MethodDeclaration || node instanceof VariableDeclarationFragment) {
node = NodeFinder.perform(target, node.getStartPosition() + node.getLength() - delta, 0);
if (node instanceof SimpleName)
rewriteTypeOccurrence(estimate, rewrite, node, group);
}
}
}
}
|
| |||
{
final ASTNode [[#variablea46192e0]]= node;
while (node != null && !(node instanceof MethodDeclaration) && !(node instanceof VariableDeclarationFragment))
node = node.getParent();
if (node != null) {
final int delta = node.getStartPosition() + node.getLength() - [[#variablea46192e0]].getStartPosition();
if (node instanceof MethodDeclaration)
binding = ((MethodDeclaration) node).resolveBinding();
else
if (node instanceof VariableDeclarationFragment)
binding = ((VariableDeclarationFragment) node).resolveBinding();
if (binding != null) {
node = target.findDeclaringNode(binding.getKey());
if ( [[#variablea4619340]]|| node instanceof VariableDeclarationFragment) {
node = NodeFinder.perform(target, node.getStartPosition() + node.getLength() - delta, 0);
if (node instanceof SimpleName)
rewriteTypeOccurrence(estimate, rewrite, node, group);
}
}
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#a46192e0]] | name |
| 1 | 2 | [[#a46192e0]] | type |
| 2 | 1 | [[#a4619340]] | node instanceof SimpleName || node instanceof MethodDeclaration |
| 2 | 2 | [[#a4619340]] | node instanceof MethodDeclaration |