CloneSet1056


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
20250.971class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
121114
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredBlock.java
220139
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredBlock.java
Clone Instance
1
Line Count
21
Source Line
114
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredBlock.java

/*
 * Record a statement declaration 
 */
public RecoveredElement add(Statement stmt, int bracketBalanceValue) {
        return this.add(stmt, bracketBalanceValue, false);
}

/*
 * Record a statement declaration 
 */
public RecoveredElement add(Statement stmt, int bracketBalanceValue, boolean delegatedByParent) {

        /* do not consider a nested block starting passed the block end (if set)
                it must be belonging to an enclosing block */
        if (this.blockDeclaration.sourceEnd != 0 &&
                           stmt.sourceStart > this.blockDeclaration.sourceEnd) {
                if (delegatedByParent) return this ; //ignore
                return this.parent.add(stmt, bracketBalanceValue);
        }

        RecoveredStatement element = new RecoveredStatement(stmt, this, bracketBalanceValue);
        this.attach(element);
        if (stmt.sourceEnd == 0) return element;
        return this ;
}


Clone Instance
2
Line Count
20
Source Line
139
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredBlock.java

/*
 * Addition of a type to an initializer (act like inside method body)
 */
public RecoveredElement add(TypeDeclaration typeDeclaration, int bracketBalanceValue) {
        return this.add(typeDeclaration, bracketBalanceValue, false);
}

/*
 * Addition of a type to an initializer (act like inside method body)
 */
public RecoveredElement add(TypeDeclaration typeDeclaration, int bracketBalanceValue, boolean delegatedByParent) {

        /* do not consider a type starting passed the block end (if set)
                it must be belonging to an enclosing block */
        if (this.blockDeclaration.sourceEnd != 0 &&
                           typeDeclaration.declarationSourceStart > this.blockDeclaration.sourceEnd) {
                if (delegatedByParent) return this ; //ignore
                return this.parent.add(typeDeclaration, bracketBalanceValue);
        }

        RecoveredStatement element = new RecoveredType(typeDeclaration, this, bracketBalanceValue);
        this.attach(element);
        if (typeDeclaration.declarationSourceEnd == 0) return element;
        return this ;
}


Clone AbstractionParameter Count: 5Parameter Bindings

/*
 * Addition of a type to an initializer (act like inside method body)
 */
/*
 * Record a statement declaration 
 */
public RecoveredElement add( [[#variable4e345b60]]  [[#variable4e3459e0]], int bracketBalanceValue) {
  return this.add( [[#variable4e3459e0]], bracketBalanceValue, false);
}

/*
 * Addition of a type to an initializer (act like inside method body)
 */
/*
 * Record a statement declaration 
 */
public RecoveredElement add( [[#variable4e345b60]]  [[#variable4e3459e0]], int bracketBalanceValue, boolean delegatedByParent) {
  /* do not consider a type starting passed the block end (if set)
                  it must be belonging to an enclosing block */
  /* do not consider a nested block starting passed the block end (if set)
                  it must be belonging to an enclosing block */
  if (this.blockDeclaration.sourceEnd != 0 && [[#variable4e3459e0]]. [[#variable54196b20]] > this.blockDeclaration.sourceEnd) {
    if (delegatedByParent)
      return this ; //ignore
    return this.parent.add( [[#variable4e3459e0]], bracketBalanceValue);
  }
  RecoveredStatement element = new [[#variable99f278a0]]( [[#variable4e3459e0]], this, bracketBalanceValue);
  this.attach(element);
  if ( [[#variable4e3459e0]]. [[#variable4e345ac0]]== 0)
    return element;
  return this ;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#4e345b60]]
TypeDeclaration 
12[[#4e345b60]]
Statement 
21[[#4e3459e0]]
typeDeclaration 
22[[#4e3459e0]]
stmt 
31[[#54196b20]]
declarationSourceStart 
32[[#54196b20]]
sourceStart 
41[[#99f278a0]]
RecoveredType 
42[[#99f278a0]]
RecoveredStatement 
51[[#4e345ac0]]
declarationSourceEnd 
52[[#4e345ac0]]
sourceEnd