nus-yam/ex-repair huggingface dataset:
Program: 51675
Project: 51675
Buggy source:
public Exp resolve(Query q){
  if (names.size() == 1) {
    String upper=((String)names.elementAt(0)).toUpperCase();
    if (upper.equals("String_Node_Str") || upper.equals("String_Node_Str") || upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")) {
      return Literal.createSymbol(upper);
    }
  }
  StringWriter sw=new StringWriter();
  PrintWriter pw=new PrintWriter(sw);
  unparse(pw,new ElementCallback());
  String fullName=sw.toString();
  Member member=q.lookupMember(fullName,false);
  if (member != null) {
    return member;
  }
  OlapElement mdxElement=q.getCube();
  for (int i=0, n=names.size(); i < n; i++) {
    String name=(String)names.elementAt(i);
    mdxElement=q.lookupChild(mdxElement,name,true);
  }
  return mdxElement;
}

Fixed version (ground truth):
public Exp resolve(Query q){
  if (names.size() == 1) {
    String upper=((String)names.elementAt(0)).toUpperCase();
    if (upper.equals("String_Node_Str") || upper.equals("String_Node_Str") || upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")|| upper.equals("String_Node_Str")) {
      return Literal.createSymbol(upper);
    }
  }
  StringWriter sw=new StringWriter();
  PrintWriter pw=new PrintWriter(sw);
  unparse(pw,new ElementCallback());
  String fullName=sw.toString();
  Member member=q.lookupMember(fullName,false);
  if (member != null) {
    return member;
  }
  OlapElement mdxElement=q.getCube();
  for (int i=0, n=names.size(); i < n; i++) {
    String name=(String)names.elementAt(i);
    mdxElement=q.lookupChild(mdxElement,name,true);
  }
  return mdxElement;
}
Program: 51677
Project: 51677
Buggy source:
public QueryPart resolve(Query q){
  if (formulas != null) {
    for (int i=0; i < formulas.length; i++)     formulas[i]=(Formula)formulas[i].createElement(q);
    for (int i=0; i < formulas.length; i++)     formulas[i]=(Formula)formulas[i].resolve(q);
  }
  if (axes != null)   for (int i=0; i < axes.length; i++)   axes[i]=(QueryAxis)axes[i].resolve(q);
  if (slicer != null) {
    setSlicer((Exp)slicer.resolve(q));
  }
  for (int i=0; i < parameters.length; i++)   parameters[i]=(Parameter)parameters[i].resolve(q);
  return this;
}

Fixed version (ground truth):
public QueryPart resolve(Query q){
  if (formulas != null) {
    for (int i=0; i < formulas.length; i++)     formulas[i]=(Formula)formulas[i].createElement(q);
    for (int i=0; i < formulas.length; i++)     formulas[i]=(Formula)formulas[i].resolve(q);
  }
  if (axes != null)   for (int i=0; i < axes.length; i++)   axes[i]=(QueryAxis)axes[i].resolve(q);
  if (slicer != null) {
    setSlicer(slicer.resolve(q));
  }
  for (int i=0; i < parameters.length; i++)   parameters[i]=(Parameter)parameters[i].resolve(q);
  return this;
}
Program: 51678
Project: 51678
Buggy source:
ArrayList getDefinedMembers(){
  ArrayList definedMembers=new ArrayList();
  for (int i=0; i < formulas.length; i++) {
    if (formulas[i].isMember && formulas[i].getElement() != null) {
      definedMembers.add((Member)formulas[i].getElement());
    }
  }
  return definedMembers;
}

Fixed version (ground truth):
ArrayList getDefinedMembers(){
  ArrayList definedMembers=new ArrayList();
  for (int i=0; i < formulas.length; i++) {
    if (formulas[i].isMember && formulas[i].getElement() != null) {
      definedMembers.add(formulas[i].getElement());
    }
  }
  return definedMembers;
}
Program: 51680
Project: 51680
Buggy source:
/** 
 * Returns the axis which the result axis is based on, taking into account any axis re-ordering. <p>Suppose that they've written <pre>select {} on rows, {} on pages from Sales</pre> <p>Then we will execute <pre>select {} on columns, {} on rows from Sales</pre> getLogicalAxis(0) = 1, meaning that axis 0 of the Plato cellset matches the rows (1) axis of their query; likewise, getLogicalAxis(1) = 2.
 * @param ordinal of axis in cellset
 * @return axis label in original query (0 = columns, 1 = rows, etc.)
 */
public int getLogicalAxis(int iPhysicalAxis){
  if (iPhysicalAxis == slicerAxis || iPhysicalAxis == axes.length) {
    return slicerAxis;
  }
  String axisName=axes[iPhysicalAxis].axisName;
  for (int i=0; i < axisNames.length; i++) {
    if (axisName.equalsIgnoreCase(axisNames[i])) {
      return i;
    }
  }
  return noAxis;
}

Fixed version (ground truth):
/** 
 * Returns the axis which the result axis is based on, taking into account any axis re-ordering. <p>Suppose that they've written <pre>select {} on rows, {} on pages from Sales</pre> <p>Then we will execute <pre>select {} on columns, {} on rows from Sales</pre> getLogicalAxis(0) = 1, meaning that axis 0 of the Plato cellset matches the rows (1) axis of their query; likewise, getLogicalAxis(1) = 2.
 * @param iPhysicalAxis ordinal of axis in cellset
 * @return axis label in original query (0 = columns, 1 = rows, etc.)
 */
public int getLogicalAxis(int iPhysicalAxis){
  if (iPhysicalAxis == slicerAxis || iPhysicalAxis == axes.length) {
    return slicerAxis;
  }
  String axisName=axes[iPhysicalAxis].axisName;
  for (int i=0; i < axisNames.length; i++) {
    if (axisName.equalsIgnoreCase(axisNames[i])) {
      return i;
    }
  }
  return noAxis;
}
Program: 51681
Project: 51681
Buggy source:
public Result execute(Query query){
  Result result=new RolapResult(query);
  for (int i=0; i < query.axes.length; i++) {
    QueryAxis axis=query.axes[i];
    if (axis.nonEmpty) {
      result=new NonEmptyResult(result,query,i);
    }
  }
  return result;
}

Fixed version (ground truth):
public Result execute(Query query){
  try {
    Result result=new RolapResult(query);
    for (int i=0; i < query.axes.length; i++) {
      QueryAxis axis=query.axes[i];
      if (axis.nonEmpty) {
        result=new NonEmptyResult(result,query,i);
      }
    }
    return result;
  }
 catch (  Throwable e) {
    throw Util.newError(e,"String_Node_Str" + query.getQueryString() + "String_Node_Str");
  }
}
Program: 51685
Project: 51685
Buggy source:
/** 
 * Generates the SQL statement to access the children of <code>member</code>. For example, <blockquote> <pre>SELECT "city" FROM "customer" WHERE "country" = 'USA' AND "state_province" = 'BC' GROUP BY "city"</pre> </blockquote> retrieves the children of the member <code>[Canada].[BC]</code>. See also   {@link #makeLevelSql}.
 */
String makeChildMemberSql(RolapMember member){
  SqlQuery sqlQuery=newQuery("String_Node_Str" + member);
  for (RolapMember m=member; m != null; m=(RolapMember)m.getParentMember()) {
    RolapLevel level=(RolapLevel)m.getLevel();
    if (level.isAll()) {
      continue;
    }
    String q=level.nameExp.getExpression(sqlQuery);
    sqlQuery.addWhere(q + "String_Node_Str" + m.quoteKeyForSql());
    if (level.unique) {
      break;
    }
  }
  RolapLevel[] levels=(RolapLevel[])hierarchy.getLevels();
  RolapLevel level=levels[member.getLevel().getDepth() + 1];
  hierarchy.addToFrom(sqlQuery,level,null);
  String q=level.nameExp.getExpression(sqlQuery);
  sqlQuery.addSelect(q);
  sqlQuery.addGroupBy(q);
  String orderBy=level.ordinalExp.getExpression(sqlQuery);
  sqlQuery.addOrderBy(orderBy);
  if (!orderBy.equals(q)) {
    sqlQuery.addGroupBy(orderBy);
  }
  return sqlQuery.toString();
}

Fixed version (ground truth):
/** 
 * Generates the SQL statement to access the children of <code>member</code>. For example, <blockquote> <pre>SELECT "city" FROM "customer" WHERE "country" = 'USA' AND "state_province" = 'BC' GROUP BY "city"</pre> </blockquote> retrieves the children of the member <code>[Canada].[BC]</code>. See also   {@link #makeLevelSql}.
 */
String makeChildMemberSql(RolapMember member){
  SqlQuery sqlQuery=newQuery("String_Node_Str" + member);
  for (RolapMember m=member; m != null; m=(RolapMember)m.getParentMember()) {
    RolapLevel level=(RolapLevel)m.getLevel();
    if (level.isAll()) {
      continue;
    }
    String q=level.nameExp.getExpression(sqlQuery);
    sqlQuery.addWhere(q + "String_Node_Str" + m.quoteKeyForSql());
    if (level.unique) {
      break;
    }
  }
  RolapLevel[] levels=(RolapLevel[])hierarchy.getLevels();
  RolapLevel level=levels[member.getLevel().getDepth() + 1];
  hierarchy.addToFrom(sqlQuery,level.nameExp,null);
  String q=level.nameExp.getExpression(sqlQuery);
  sqlQuery.addSelect(q);
  sqlQuery.addGroupBy(q);
  hierarchy.addToFrom(sqlQuery,level.ordinalExp,null);
  String orderBy=level.ordinalExp.getExpression(sqlQuery);
  sqlQuery.addOrderBy(orderBy);
  if (!orderBy.equals(q)) {
    sqlQuery.addGroupBy(orderBy);
  }
  return sqlQuery.toString();
}
Program: 51686
Project: 51686
Buggy source:
/** 
 * Generates the SQL statement to access members of <code>level</code>. For example, <blockquote> <pre>SELECT "country", "state_province", "city" FROM "customer" GROUP BY "country", "state_province", "city", "foo", "bar"</pre> </blockquote> accesses the "City" level of the "Customers" hierarchy. Note that:<ul> <li><code>"country", "state_province"</code> are the parent keys;</li> <li><code>"city"</code> is the level key;</li> <li><code>"foo", "bar"</code> are member properties.</li> </ul>
 */
String makeLevelSql(RolapLevel level){
  SqlQuery sqlQuery=newQuery("String_Node_Str" + level);
  hierarchy.addToFrom(sqlQuery,level,null);
  RolapLevel[] levels=(RolapLevel[])hierarchy.getLevels();
  RolapLevel lastLevel=levels[levels.length - 1];
  int levelDepth=level.getDepth();
  for (int i=0; i <= levelDepth; i++) {
    RolapLevel level2=levels[i];
    if (level2.isAll()) {
      continue;
    }
    String q=level2.nameExp.getExpression(sqlQuery);
    sqlQuery.addSelect(q);
    if (level != lastLevel) {
      sqlQuery.addGroupBy(q);
    }
    sqlQuery.addOrderBy(level2.ordinalExp.getExpression(sqlQuery));
  }
  for (int i=0; i < level.properties.length; i++) {
    RolapProperty property=level.properties[i];
    String q=property.exp.getExpression(sqlQuery);
    sqlQuery.addSelect(q);
  }
  return sqlQuery.toString();
}

Fixed version (ground truth):
/** 
 * Generates the SQL statement to access members of <code>level</code>. For example, <blockquote> <pre>SELECT "country", "state_province", "city" FROM "customer" GROUP BY "country", "state_province", "city", "foo", "bar"</pre> </blockquote> accesses the "City" level of the "Customers" hierarchy. Note that:<ul> <li><code>"country", "state_province"</code> are the parent keys;</li> <li><code>"city"</code> is the level key;</li> <li><code>"foo", "bar"</code> are member properties.</li> </ul>
 * @pre !level.isAll()
 */
String makeLevelSql(RolapLevel level){
  Util.assertPrecondition(!level.isAll());
  SqlQuery sqlQuery=newQuery("String_Node_Str" + level);
  RolapLevel[] levels=(RolapLevel[])hierarchy.getLevels();
  RolapLevel lastLevel=levels[levels.length - 1];
  int levelDepth=level.getDepth();
  for (int i=0; i <= levelDepth; i++) {
    RolapLevel level2=levels[i];
    if (level2.isAll()) {
      continue;
    }
    hierarchy.addToFrom(sqlQuery,level2.nameExp,null);
    String q=level2.nameExp.getExpression(sqlQuery);
    sqlQuery.addSelect(q);
    if (level != lastLevel) {
      sqlQuery.addGroupBy(q);
    }
    hierarchy.addToFrom(sqlQuery,level2.ordinalExp,null);
    sqlQuery.addOrderBy(level2.ordinalExp.getExpression(sqlQuery));
  }
  for (int i=0; i < level.properties.length; i++) {
    RolapProperty property=level.properties[i];
    String q=property.exp.getExpression(sqlQuery);
    sqlQuery.addSelect(q);
  }
  return sqlQuery.toString();
}
Program: 51688
Project: 51688
Buggy source:
private String makeKeysSql(){
  SqlQuery sqlQuery=newQuery("String_Node_Str" + hierarchy);
  sqlQuery.setDistinct(true);
  RolapLevel[] levels=(RolapLevel[])hierarchy.getLevels();
  for (int i=0; i < levels.length; i++) {
    RolapLevel level=levels[i];
    if (level.isAll()) {
      continue;
    }
    hierarchy.addToFrom(sqlQuery,level,null);
    sqlQuery.addSelect(level.nameExp.getExpression(sqlQuery));
    sqlQuery.addOrderBy(level.ordinalExp.getExpression(sqlQuery));
    for (int j=0; j < level.properties.length; j++) {
      RolapProperty property=level.properties[j];
      String q=property.exp.getExpression(sqlQuery);
      sqlQuery.addSelect(q);
    }
  }
  return sqlQuery.toString();
}

Fixed version (ground truth):
private String makeKeysSql(){
  SqlQuery sqlQuery=newQuery("String_Node_Str" + hierarchy);
  sqlQuery.setDistinct(true);
  RolapLevel[] levels=(RolapLevel[])hierarchy.getLevels();
  for (int i=0; i < levels.length; i++) {
    RolapLevel level=levels[i];
    if (level.isAll()) {
      continue;
    }
    MondrianDef.Expression exp=level.nameExp;
    hierarchy.addToFrom(sqlQuery,exp,null);
    sqlQuery.addSelect(exp.getExpression(sqlQuery));
    exp=level.ordinalExp;
    hierarchy.addToFrom(sqlQuery,exp,null);
    sqlQuery.addOrderBy(exp.getExpression(sqlQuery));
    for (int j=0; j < level.properties.length; j++) {
      RolapProperty property=level.properties[j];
      exp=property.exp;
      hierarchy.addToFrom(sqlQuery,exp,null);
      sqlQuery.addSelect(exp.getExpression(sqlQuery));
    }
  }
  return sqlQuery.toString();
}
Program: 51689
Project: 51689
Buggy source:
RolapDimension createDimension(MondrianDef.CubeDimension xmlCubeDimension){
  final RolapDimension dimension=new RolapDimension(schema,this,(MondrianDef.Dimension)xmlCubeDimension,xmlCubeDimension);
  dimension.init(this);
  final RolapDimension[] newDimensions=new RolapDimension[dimensions.length + 1];
  System.arraycopy(dimensions,0,newDimensions,0,dimensions.length);
  final int localOrdinal=newDimensions.length - 1;
  newDimensions[localOrdinal]=dimension;
  this.dimensions=newDimensions;
  final int globalOrdinal=dimension.getGlobalOrdinal();
  if (globalOrdinal >= localDimensionOrdinals.length) {
    int[] newLocalDimensionOrdinals=new int[globalOrdinal + 1];
    System.arraycopy(localDimensionOrdinals,0,newLocalDimensionOrdinals,0,localDimensionOrdinals.length);
    Arrays.fill(newLocalDimensionOrdinals,localDimensionOrdinals.length,newLocalDimensionOrdinals.length,-1);
    this.localDimensionOrdinals=newLocalDimensionOrdinals;
  }
  Util.assertTrue(localDimensionOrdinals[globalOrdinal] == -1);
  localDimensionOrdinals[globalOrdinal]=localOrdinal;
  return dimension;
}

Fixed version (ground truth):
RolapDimension createDimension(MondrianDef.CubeDimension xmlCubeDimension){
  final RolapDimension dimension=new RolapDimension(schema,this,(MondrianDef.Dimension)xmlCubeDimension,xmlCubeDimension);
  dimension.init(this);
  final RolapDimension[] newDimensions=new RolapDimension[dimensions.length + 1];
  System.arraycopy(dimensions,0,newDimensions,0,dimensions.length);
  final int localOrdinal=newDimensions.length - 1;
  newDimensions[localOrdinal]=dimension;
  this.dimensions=newDimensions;
  final int globalOrdinal=dimension.getGlobalOrdinal();
  if (globalOrdinal >= localDimensionOrdinals.length) {
    int[] newLocalDimensionOrdinals=new int[globalOrdinal + 1];
    System.arraycopy(localDimensionOrdinals,0,newLocalDimensionOrdinals,0,localDimensionOrdinals.length);
    Arrays.fill(newLocalDimensionOrdinals,localDimensionOrdinals.length,newLocalDimensionOrdinals.length,-1);
    this.localDimensionOrdinals=newLocalDimensionOrdinals;
  }
  Util.assertTrue(localDimensionOrdinals[globalOrdinal] == -1);
  localDimensionOrdinals[globalOrdinal]=localOrdinal;
  registerDimension(dimension);
  return dimension;
}
Program: 51691
Project: 51691
Buggy source:
public Table(MondrianDef.Relation relation,Table parent,Condition joinCondition){
  this.relation=relation;
  Util.assertTrue(relation instanceof MondrianDef.Table,"String_Node_Str" + relation);
  this.parent=parent;
  this.joinCondition=joinCondition;
  Util.assertTrue((parent == null) == (joinCondition == null));
}

Fixed version (ground truth):
public Table(MondrianDef.Relation relation,Table parent,Condition joinCondition){
  this.relation=relation;
  Util.assertTrue(relation instanceof MondrianDef.Table || relation instanceof MondrianDef.View,"String_Node_Str" + relation + "String_Node_Str");
  this.parent=parent;
  this.joinCondition=joinCondition;
  Util.assertTrue((parent == null) == (joinCondition == null));
}
Program: 51692
Project: 51692
Buggy source:
/** 
 * Extends this 'leg' of the star by adding <code>relation</code> joined by <code>joinCondition</code>. If the same expression is already present, does not create it again.
 */
synchronized Table addJoin(MondrianDef.Relation relation,RolapStar.Condition joinCondition){
  if (relation instanceof MondrianDef.Table) {
    MondrianDef.Table table=(MondrianDef.Table)relation;
    RolapStar.Table starTable=findChild(table);
    if (starTable == null) {
      starTable=new RolapStar.Table(table,this,joinCondition);
      starTable.star=this.star;
      this.children.add(starTable);
    }
    return starTable;
  }
 else   if (relation instanceof MondrianDef.Join) {
    MondrianDef.Join join=(MondrianDef.Join)relation;
    RolapStar.Table leftTable=addJoin(join.left,joinCondition);
    String leftAlias=join.leftAlias;
    if (leftAlias == null) {
      leftAlias=join.left.getAlias();
      if (leftAlias == null) {
        throw Util.newError("String_Node_Str" + relation);
      }
    }
    String rightAlias=join.rightAlias;
    if (rightAlias == null) {
      rightAlias=join.right.getAlias();
      if (rightAlias == null) {
        throw Util.newError("String_Node_Str" + relation);
      }
    }
    joinCondition=new RolapStar.Condition(leftAlias,join.leftKey,rightAlias,join.rightKey);
    RolapStar.Table rightTable=leftTable.addJoin(join.right,joinCondition);
    return rightTable;
  }
 else {
    throw Util.newInternal("String_Node_Str" + relation);
  }
}

Fixed version (ground truth):
/** 
 * Extends this 'leg' of the star by adding <code>relation</code> joined by <code>joinCondition</code>. If the same expression is already present, does not create it again.
 */
synchronized Table addJoin(MondrianDef.Relation relation,RolapStar.Condition joinCondition){
  if (relation instanceof MondrianDef.Table || relation instanceof MondrianDef.View) {
    RolapStar.Table starTable=findChild(relation);
    if (starTable == null) {
      starTable=new RolapStar.Table(relation,this,joinCondition);
      starTable.star=this.star;
      this.children.add(starTable);
    }
    return starTable;
  }
 else   if (relation instanceof MondrianDef.Join) {
    MondrianDef.Join join=(MondrianDef.Join)relation;
    RolapStar.Table leftTable=addJoin(join.left,joinCondition);
    String leftAlias=join.leftAlias;
    if (leftAlias == null) {
      leftAlias=join.left.getAlias();
      if (leftAlias == null) {
        throw Util.newError("String_Node_Str" + relation);
      }
    }
    String rightAlias=join.rightAlias;
    if (rightAlias == null) {
      rightAlias=join.right.getAlias();
      if (rightAlias == null) {
        throw Util.newError("String_Node_Str" + relation);
      }
    }
    joinCondition=new RolapStar.Condition(leftAlias,join.leftKey,rightAlias,join.rightKey);
    RolapStar.Table rightTable=leftTable.addJoin(join.right,joinCondition);
    return rightTable;
  }
 else {
    throw Util.newInternal("String_Node_Str" + relation);
  }
}
Program: 51693
Project: 51693
Buggy source:
/** 
 * Returns a child table which maps onto a given relation, or null if there is none.
 */
public Table findChild(MondrianDef.Table table){
  for (int i=0; i < children.size(); i++) {
    Table child=(Table)children.get(i);
    if (matchesTable(child.relation,table.schema,table.name)) {
      return child;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns a child relation which maps onto a given relation, or null if there is none.
 */
public Table findChild(MondrianDef.Relation relation){
  for (int i=0; i < children.size(); i++) {
    Table child=(Table)children.get(i);
    if (child.relation.equals(relation)) {
      return child;
    }
  }
  return null;
}
Program: 51694
Project: 51694
Buggy source:
static int compareValues(Object value0,Object value1){
  if (value0 == value1) {
    return 0;
  }
 else   if (value0 == Util.nullValue) {
    return 1;
  }
 else   if (value1 == Util.nullValue) {
    return -1;
  }
 else   if (value0 instanceof String) {
    return ((String)value0).compareTo((String)value1);
  }
 else   if (value0 instanceof Number) {
    return FunUtil.sign(((Number)value0).doubleValue(),((Number)value1).doubleValue());
  }
 else {
    throw Util.newInternal("String_Node_Str" + value0);
  }
}

Fixed version (ground truth):
static int compareValues(Object value0,Object value1){
  if (value0 == value1) {
    return 0;
  }
 else   if (value0 instanceof RuntimeException || value1 instanceof RuntimeException) {
    return 0;
  }
 else   if (value0 == Util.nullValue) {
    return 1;
  }
 else   if (value1 == Util.nullValue) {
    return -1;
  }
 else   if (value0 instanceof String) {
    return ((String)value0).compareTo((String)value1);
  }
 else   if (value0 instanceof Number) {
    return FunUtil.sign(((Number)value0).doubleValue(),((Number)value1).doubleValue());
  }
 else {
    throw Util.newInternal("String_Node_Str" + value0);
  }
}
Program: 51698
Project: 51698
Buggy source:
public Object getCell(RolapMember[] members){
  CellRequest request=makeRequest(members);
  RolapMeasure measure=(RolapMeasure)members[0];
  RolapStar star=(RolapStar)measure.star;
  return star.getCell(request);
}

Fixed version (ground truth):
public Object getCell(RolapMember[] members){
  CellRequest request=makeRequest(members);
  RolapMeasure measure=(RolapMeasure)members[0];
  final RolapStar.Measure starMeasure=(RolapStar.Measure)measure.starMeasure;
  Util.assertTrue(starMeasure != null);
  RolapStar star=starMeasure.table.star;
  return star.getCell(request);
}
Program: 51699
Project: 51699
Buggy source:
/** 
 * Creates a request to evaluate the cell identified by <code>members</code>.  If any of the members is the null member, returns null, since there is no cell.
 */
CellRequest makeRequest(RolapMember[] members){
  RolapMeasure measure=(RolapMeasure)members[0];
  Util.assertTrue(measure instanceof RolapStoredMeasure);
  RolapStar star=(RolapStar)measure.star;
  Util.assertTrue(star != null);
  CellRequest request=new CellRequest((RolapStar.Measure)star.factTable.columns.get(0));
  for (int i=1; i < members.length; i++) {
    RolapMember member=members[i];
    for (RolapMember m=member; m != null; m=(RolapMember)m.getParentMember()) {
      if (m.key == null) {
        if (m == m.getHierarchy().getNullMember()) {
          return null;
        }
 else         if (m.isAll()) {
          continue;
        }
 else {
          throw Util.getRes().newInternal("String_Node_Str");
        }
      }
      RolapLevel level=(RolapLevel)m.getLevel();
      RolapStar.Column column=(RolapStar.Column)star.mapLevelToColumn.get(level);
      if (column == null) {
        return null;
      }
 else {
        request.addConstrainedColumn(column,m.key);
      }
    }
  }
  return request;
}

Fixed version (ground truth):
/** 
 * Creates a request to evaluate the cell identified by <code>members</code>.  If any of the members is the null member, returns null, since there is no cell.
 */
CellRequest makeRequest(RolapMember[] members){
  RolapMeasure measure=(RolapMeasure)members[0];
  Util.assertTrue(measure instanceof RolapStoredMeasure);
  final RolapStar.Measure starMeasure=(RolapStar.Measure)measure.starMeasure;
  Util.assertTrue(starMeasure != null);
  RolapStar star=starMeasure.table.star;
  CellRequest request=new CellRequest(starMeasure);
  for (int i=1; i < members.length; i++) {
    RolapMember member=members[i];
    for (RolapMember m=member; m != null; m=(RolapMember)m.getParentMember()) {
      if (m.key == null) {
        if (m == m.getHierarchy().getNullMember()) {
          return null;
        }
 else         if (m.isAll()) {
          continue;
        }
 else {
          throw Util.getRes().newInternal("String_Node_Str");
        }
      }
      RolapLevel level=(RolapLevel)m.getLevel();
      RolapStar.Column column=(RolapStar.Column)star.mapLevelToColumn.get(level);
      if (column == null) {
        return null;
      }
 else {
        request.addConstrainedColumn(column,m.key);
      }
    }
  }
  return request;
}
Program: 51701
Project: 51701
Buggy source:
public void testCellValue(){
  Result result=runQuery("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
  Cell cell=result.getCell(new int[]{0,0});
  Object value=cell.getValue();
  assertTrue(value instanceof Number);
  assertEquals(135215,((Number)value).intValue());
}

Fixed version (ground truth):
public void testCellValue(){
  Result result=runQuery("String_Node_Str" + nl + "String_Node_Str"+ nl+ "String_Node_Str");
  Cell cell=result.getCell(new int[]{0,0});
  Object value=cell.getValue();
  assertTrue(value instanceof Number);
  assertEquals(135215,((Number)value).intValue());
  cell=result.getCell(new int[]{1,0});
  value=cell.getValue();
  assertTrue(value instanceof Number);
  assertEquals(285011,((Number)value).intValue());
}
Program: 51702
Project: 51702
Buggy source:
private void parseOpcode(byte data) throws ProtocolError {
  boolean rsv1=(data & RSV1) == RSV1;
  boolean rsv2=(data & RSV2) == RSV2;
  boolean rsv3=(data & RSV3) == RSV3;
  if (rsv1 || rsv2 || rsv3) {
    throw new ProtocolError("String_Node_Str");
  }
  mFinal=(data & FIN) == FIN;
  mOpcode=(data & OPCODE);
  mMask=new byte[0];
  mPayload=new byte[0];
  if (!OPCODES.contains(mOpcode)) {
    throw new ProtocolError("String_Node_Str");
  }
  if (FRAGMENTED_OPCODES.contains(mOpcode) && !mFinal) {
    throw new ProtocolError("String_Node_Str");
  }
  mStage=1;
}

Fixed version (ground truth):
private void parseOpcode(byte data) throws ProtocolError {
  boolean rsv1=(data & RSV1) == RSV1;
  boolean rsv2=(data & RSV2) == RSV2;
  boolean rsv3=(data & RSV3) == RSV3;
  if (rsv1 || rsv2 || rsv3) {
    throw new ProtocolError("String_Node_Str");
  }
  mFinal=(data & FIN) == FIN;
  mOpcode=(data & OPCODE);
  mMask=new byte[0];
  mPayload=new byte[0];
  if (!OPCODES.contains(mOpcode)) {
    throw new ProtocolError("String_Node_Str");
  }
  if (!FRAGMENTED_OPCODES.contains(mOpcode) && !mFinal) {
    throw new ProtocolError("String_Node_Str");
  }
  mStage=1;
}
Program: 51703
Project: 51703
Buggy source:
@Get("String_Node_Str") public String index() throws IOException {
  String re=new Scanner(new File("String_Node_Str")).useDelimiter("String_Node_Str").next();
  BASE64Decoder d=new BASE64Decoder();
  re=new String(d.decodeBuffer(re));
  tService.test();
  return re;
}

Fixed version (ground truth):
@Get("String_Node_Str") public String index() throws IOException {
  String re=new Scanner(new File("String_Node_Str")).useDelimiter("String_Node_Str").next();
  BASE64Decoder d=new BASE64Decoder();
  re=new String(d.decodeBuffer(re));
  return re;
}
Program: 51704
Project: 51704
Buggy source:
public void onInitializationComplete(){
  if (wrongMC != null) {
    showGuiScreen(new GuiWrongMinecraft(wrongMC));
  }
 else   if (modsMissing != null) {
    showGuiScreen(new GuiModsMissing(modsMissing));
  }
 else   if (dupesFound != null) {
    showGuiScreen(new GuiDupesFound(dupesFound));
  }
 else   if (modSorting != null) {
    showGuiScreen(new GuiSortingProblem(modSorting));
  }
 else   if (customError != null) {
    showGuiScreen(new GuiCustomModLoadingErrorScreen(customError));
  }
 else {
  }
  logMissingTextureErrors();
  Loader.instance().loadingComplete();
  SplashProgress.finish();
}

Fixed version (ground truth):
public void onInitializationComplete(){
  if (wrongMC != null) {
    showGuiScreen(new GuiWrongMinecraft(wrongMC));
  }
 else   if (modsMissing != null) {
    showGuiScreen(new GuiModsMissing(modsMissing));
  }
 else   if (dupesFound != null) {
    showGuiScreen(new GuiDupesFound(dupesFound));
  }
 else   if (modSorting != null) {
    showGuiScreen(new GuiSortingProblem(modSorting));
  }
 else   if (customError != null) {
    showGuiScreen(new GuiCustomModLoadingErrorScreen(customError));
  }
 else {
    Loader.instance().loadingComplete();
    SplashProgress.finish();
  }
  logMissingTextureErrors();
}
Program: 51706
Project: 51706
Buggy source:
@Override protected void channelRead0(ChannelHandlerContext ctx,Packet msg) throws Exception {
  PacketBuffer buf=new PacketBuffer(Unpooled.buffer());
  msg.writePacketData(buf);
  FMLLog.log(Level.DEBUG,"String_Node_Str",msg.getClass().getSimpleName(),ByteBufUtils.getContentDump(buf));
  ctx.fireChannelRead(msg);
}

Fixed version (ground truth):
@Override protected void channelRead0(ChannelHandlerContext ctx,Packet msg) throws Exception {
  PacketBuffer buf=new PacketBuffer(Unpooled.buffer());
  msg.writePacketData(buf);
  FMLLog.log(Level.DEBUG,"String_Node_Str",prefix,msg.getClass().getSimpleName(),ByteBufUtils.getContentDump(buf));
  ctx.fireChannelRead(msg);
}
Program: 51707
Project: 51707
Buggy source:
@Override public void write(ChannelHandlerContext ctx,Object msg,ChannelPromise promise) throws Exception {
  if (msg instanceof Packet) {
    PacketBuffer buf=new PacketBuffer(Unpooled.buffer());
    ((Packet)msg).writePacketData(buf);
    FMLLog.log(Level.DEBUG,"String_Node_Str",msg.getClass().getSimpleName(),ByteBufUtils.getContentDump(buf));
  }
  ctx.write(msg,promise);
}

Fixed version (ground truth):
@Override public void write(ChannelHandlerContext ctx,Object msg,ChannelPromise promise) throws Exception {
  if (msg instanceof Packet) {
    PacketBuffer buf=new PacketBuffer(Unpooled.buffer());
    ((Packet)msg).writePacketData(buf);
    FMLLog.log(Level.DEBUG,"String_Node_Str",prefix,msg.getClass().getSimpleName(),ByteBufUtils.getContentDump(buf));
  }
  ctx.write(msg,promise);
}
Program: 51709
Project: 51709
Buggy source:
@Override public String[] getASMTransformerClass(){
  return new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
}

Fixed version (ground truth):
@Override public String[] getASMTransformerClass(){
  return new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
}
Program: 51710
Project: 51710
Buggy source:
public ListenerList(ListenerList parent){
  this();
  this.parent=parent;
}

Fixed version (ground truth):
public ListenerList(ListenerList parent){
  this.parent=parent;
  extendMasterList(this);
  resizeLists(maxSize);
}
Program: 51712
Project: 51712
Buggy source:
@Subscribe public void buildModList(FMLLoadEvent event){
  Builder<String,EventBus> eventBus=ImmutableMap.builder();
  for (  ModContainer mod : loader.getModList()) {
    EventBus bus=new EventBus(mod.getModId());
    boolean isActive=mod.registerBus(bus,this);
    if (isActive) {
      activeModList.add(mod);
      modStates.put(mod.getModId(),ModState.UNLOADED);
      eventBus.put(mod.getModId(),bus);
      FMLCommonHandler.instance().addModToResourcePack(mod);
    }
 else {
      FMLLog.log(mod.getModId(),Level.WARN,"String_Node_Str",mod.getModId());
      modStates.put(mod.getModId(),ModState.UNLOADED);
      modStates.put(mod.getModId(),ModState.DISABLED);
    }
  }
  eventChannels=eventBus.build();
}

Fixed version (ground truth):
@Subscribe public void buildModList(FMLLoadEvent event){
  Builder<String,EventBus> eventBus=ImmutableMap.builder();
  for (  ModContainer mod : loader.getModList()) {
    EventBus bus=new EventBus(mod.getModId());
    boolean isActive=mod.registerBus(bus,this);
    if (isActive) {
      activeModList.add(mod);
      modStates.put(mod.getModId(),ModState.UNLOADED);
      eventBus.put(mod.getModId(),bus);
      FMLCommonHandler.instance().addModToResourcePack(mod);
    }
 else {
      FMLLog.log(mod.getModId(),Level.WARN,"String_Node_Str",mod.getModId());
      modStates.put(mod.getModId(),ModState.UNLOADED);
      modStates.put(mod.getModId(),ModState.DISABLED);
    }
  }
  eventChannels=eventBus.build();
  FMLCommonHandler.instance().updateResourcePackList();
}
Program: 51713
Project: 51713
Buggy source:
@Override public void queryUser(StartupQuery query) throws InterruptedException {
  if (query.getResult() == null) {
    FMLLog.warning("String_Node_Str",query.getText());
    query.finish();
  }
 else {
    String text=query.getText() + "String_Node_Str" + "String_Node_Str";
    FMLLog.warning("String_Node_Str",text);
    if (!query.isSynchronous())     return;
    boolean done=false;
    while (!done && server.isServerRunning()) {
      if (Thread.interrupted())       throw new InterruptedException();
      DedicatedServer dedServer=(DedicatedServer)server;
synchronized (dedServer.pendingCommandList) {
        for (Iterator<ServerCommand> it=GenericIterableFactory.newCastingIterable(dedServer.pendingCommandList,ServerCommand.class).iterator(); it.hasNext(); ) {
          String cmd=it.next().command.trim().toLowerCase();
          if (cmd.equals("String_Node_Str")) {
            FMLLog.info("String_Node_Str");
            query.setResult(true);
            done=true;
            it.remove();
          }
 else           if (cmd.equals("String_Node_Str")) {
            FMLLog.info("String_Node_Str");
            query.setResult(false);
            done=true;
            it.remove();
          }
 else           if (cmd.equals("String_Node_Str")) {
            StartupQuery.abort();
          }
        }
      }
      Thread.sleep(10L);
    }
    query.finish();
  }
}

Fixed version (ground truth):
@Override public void queryUser(StartupQuery query) throws InterruptedException {
  if (query.getResult() == null) {
    FMLLog.warning("String_Node_Str",query.getText());
    query.finish();
  }
 else {
    String text=query.getText() + "String_Node_Str" + "String_Node_Str";
    FMLLog.warning("String_Node_Str",text);
    if (!query.isSynchronous())     return;
    boolean done=false;
    while (!done && server.isServerRunning()) {
      if (Thread.interrupted())       throw new InterruptedException();
      DedicatedServer dedServer=(DedicatedServer)server;
synchronized (dedServer.pendingCommandList) {
        for (Iterator<ServerCommand> it=dedServer.pendingCommandList.iterator(); it.hasNext(); ) {
          String cmd=it.next().command.trim().toLowerCase();
          if (cmd.equals("String_Node_Str")) {
            FMLLog.info("String_Node_Str");
            query.setResult(true);
            done=true;
            it.remove();
          }
 else           if (cmd.equals("String_Node_Str")) {
            FMLLog.info("String_Node_Str");
            query.setResult(false);
            done=true;
            it.remove();
          }
 else           if (cmd.equals("String_Node_Str")) {
            StartupQuery.abort();
          }
        }
      }
      Thread.sleep(10L);
    }
    query.finish();
  }
}
Program: 51715
Project: 51715
Buggy source:
public void handleServerStopped(){
  sidedDelegate.serverStopped();
  MinecraftServer server=getMinecraftServerInstance();
  Loader.instance().serverStopped();
  if (server != null)   ObfuscationReflectionHelper.setPrivateValue(MinecraftServer.class,server,false,"String_Node_Str" + "String_Node_Str","String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void handleServerStopped(){
  sidedDelegate.serverStopped();
  MinecraftServer server=getMinecraftServerInstance();
  Loader.instance().serverStopped();
  if (server != null)   ObfuscationReflectionHelper.setPrivateValue(MinecraftServer.class,server,false,"String_Node_Str" + "String_Node_Str","String_Node_Str","String_Node_Str");
  CountDownLatch latch=exitLatch;
  if (latch != null) {
    latch.countDown();
    exitLatch=null;
  }
}
Program: 51717
Project: 51717
Buggy source:
@Subscribe public void buildModList(FMLLoadEvent event){
  Builder<String,EventBus> eventBus=ImmutableMap.builder();
  for (  ModContainer mod : loader.getModList()) {
    EventBus bus=new EventBus(mod.getModId());
    boolean isActive=mod.registerBus(bus,this);
    if (isActive) {
      activeModList.add(mod);
      modStates.put(mod.getModId(),ModState.UNLOADED);
      eventBus.put(mod.getModId(),bus);
      FMLCommonHandler.instance().addModToResourcePack(mod);
    }
 else {
      FMLLog.log(mod.getModId(),Level.WARN,"String_Node_Str",mod.getModId());
      modStates.put(mod.getModId(),ModState.UNLOADED);
      modStates.put(mod.getModId(),ModState.DISABLED);
    }
  }
  eventChannels=eventBus.build();
  FMLCommonHandler.instance().updateResourcePackList();
}

Fixed version (ground truth):
@Subscribe public void buildModList(FMLLoadEvent event){
  Builder<String,EventBus> eventBus=ImmutableMap.builder();
  for (  ModContainer mod : loader.getModList()) {
    EventBus bus=new EventBus(mod.getModId());
    boolean isActive=mod.registerBus(bus,this);
    if (isActive) {
      activeModList.add(mod);
      modStates.put(mod.getModId(),ModState.UNLOADED);
      eventBus.put(mod.getModId(),bus);
      FMLCommonHandler.instance().addModToResourcePack(mod);
    }
 else {
      FMLLog.log(mod.getModId(),Level.WARN,"String_Node_Str",mod.getModId());
      modStates.put(mod.getModId(),ModState.UNLOADED);
      modStates.put(mod.getModId(),ModState.DISABLED);
    }
  }
  eventChannels=eventBus.build();
}
Program: 51718
Project: 51718
Buggy source:
@Override public void queryUser(StartupQuery query) throws InterruptedException {
  if (query.getResult() == null) {
    FMLLog.warning("String_Node_Str",query.getText());
    query.finish();
  }
 else {
    String text=query.getText() + "String_Node_Str" + "String_Node_Str";
    FMLLog.warning("String_Node_Str",text);
    if (!query.isSynchronous())     return;
    boolean done=false;
    while (!done && server.isServerRunning()) {
      if (Thread.interrupted())       throw new InterruptedException();
      DedicatedServer dedServer=(DedicatedServer)server;
synchronized (dedServer.pendingCommandList) {
        for (Iterator<ServerCommand> it=dedServer.pendingCommandList.iterator(); it.hasNext(); ) {
          String cmd=it.next().command.trim().toLowerCase();
          if (cmd.equals("String_Node_Str")) {
            FMLLog.info("String_Node_Str");
            query.setResult(true);
            done=true;
            it.remove();
          }
 else           if (cmd.equals("String_Node_Str")) {
            FMLLog.info("String_Node_Str");
            query.setResult(false);
            done=true;
            it.remove();
          }
 else           if (cmd.equals("String_Node_Str")) {
            StartupQuery.abort();
          }
        }
      }
      Thread.sleep(10L);
    }
    query.finish();
  }
}

Fixed version (ground truth):
@Override public void queryUser(StartupQuery query) throws InterruptedException {
  if (query.getResult() == null) {
    FMLLog.warning("String_Node_Str",query.getText());
    query.finish();
  }
 else {
    String text=query.getText() + "String_Node_Str" + "String_Node_Str";
    FMLLog.warning("String_Node_Str",text);
    if (!query.isSynchronous())     return;
    boolean done=false;
    while (!done && server.isServerRunning()) {
      if (Thread.interrupted())       throw new InterruptedException();
      DedicatedServer dedServer=(DedicatedServer)server;
synchronized (dedServer.pendingCommandList) {
        for (Iterator<ServerCommand> it=GenericIterableFactory.newCastingIterable(dedServer.pendingCommandList,ServerCommand.class).iterator(); it.hasNext(); ) {
          String cmd=it.next().command.trim().toLowerCase();
          if (cmd.equals("String_Node_Str")) {
            FMLLog.info("String_Node_Str");
            query.setResult(true);
            done=true;
            it.remove();
          }
 else           if (cmd.equals("String_Node_Str")) {
            FMLLog.info("String_Node_Str");
            query.setResult(false);
            done=true;
            it.remove();
          }
 else           if (cmd.equals("String_Node_Str")) {
            StartupQuery.abort();
          }
        }
      }
      Thread.sleep(10L);
    }
    query.finish();
  }
}
Program: 51719
Project: 51719
Buggy source:
public void initializeMods(){
  modController.distributeStateMessage(LoaderState.INITIALIZATION);
  modController.transition(LoaderState.POSTINITIALIZATION,false);
  modController.distributeStateMessage(FMLInterModComms.IMCEvent.class);
  modController.distributeStateMessage(LoaderState.POSTINITIALIZATION);
  modController.transition(LoaderState.AVAILABLE,false);
  modController.distributeStateMessage(LoaderState.AVAILABLE);
  GameData.dumpRegistry(minecraftDir);
  FMLLog.info("String_Node_Str",mods.size(),mods.size() == 1 ? "String_Node_Str" : "String_Node_Str");
}

Fixed version (ground truth):
public void initializeMods(){
  modController.distributeStateMessage(LoaderState.INITIALIZATION);
  modController.transition(LoaderState.POSTINITIALIZATION,false);
  modController.distributeStateMessage(FMLInterModComms.IMCEvent.class);
  modController.distributeStateMessage(LoaderState.POSTINITIALIZATION);
  modController.transition(LoaderState.AVAILABLE,false);
  modController.distributeStateMessage(LoaderState.AVAILABLE);
  GameData.freezeData();
  GameData.dumpRegistry(minecraftDir);
  FMLLog.info("String_Node_Str",mods.size(),mods.size() == 1 ? "String_Node_Str" : "String_Node_Str");
}
Program: 51721
Project: 51721
Buggy source:
@Override public void func_148756_a(int id,String name,Object thing){
  FMLLog.finer("String_Node_Str",name,id,thing);
  add(id,name,superType.cast(thing));
}

Fixed version (ground truth):
/** 
 * Add an object to the registry, trying to use the specified id.
 * @deprecated register through {@link GameRegistry} instead.
 */
@Override @Deprecated public void func_148756_a(int id,String name,Object thing){
  GameData.getMain().register(thing,name,id);
}
Program: 51722
Project: 51722
Buggy source:
public void serializeInto(Map<String,Integer> idMapping){
  for (  Entry<String,Integer> id : namedIds.entrySet()) {
    idMapping.put(discriminator + id.getKey(),id.getValue());
  }
}

Fixed version (ground truth):
public void serializeInto(Map<String,Integer> idMapping){
  for (Iterator<Object> it=iterator(); it.hasNext(); ) {
    I thing=(I)it.next();
    idMapping.put(discriminator + func_148750_c(thing),getId(thing));
  }
}
Program: 51723
Project: 51723
Buggy source:
public int getId(String itemName){
  if (namedIds.containsKey(itemName)) {
    return namedIds.get(itemName);
  }
 else {
    return -1;
  }
}

Fixed version (ground truth):
public int getId(String itemName){
  I obj=getRaw(itemName);
  if (obj == null)   return -1;
  return getId(obj);
}
Program: 51724
Project: 51724
Buggy source:
void dump(){
  for (  Entry<String,Integer> entry : namedIds.entrySet()) {
    String name=entry.getKey();
    Object thing=idMap().get(entry.getValue().intValue());
    FMLLog.finer("String_Node_Str",name,entry.getValue(),thing);
  }
}

Fixed version (ground truth):
void dump(){
  List<Integer> ids=new ArrayList<Integer>();
  for (Iterator<Object> it=iterator(); it.hasNext(); ) {
    ids.add(getId((I)it.next()));
  }
  Collections.sort(ids);
  for (  int id : ids) {
    I thing=getRaw(id);
    FMLLog.finer("String_Node_Str",func_148750_c(thing),id,thing);
  }
}
Program: 51725
Project: 51725
Buggy source:
public int add(int id,String name,I thing){
  if (name.equals(optionalDefaultName)) {
    this.optionalDefaultObject=thing;
  }
  int idToUse=id;
  if (id == 0 || availabilityMap.get(id)) {
    idToUse=availabilityMap.nextClearBit(minId);
  }
  if (idToUse >= maxId) {
    throw new RuntimeException(String.format("String_Node_Str",id));
  }
  ModContainer mc=Loader.instance().activeModContainer();
  if (mc != null) {
    String prefix=mc.getModId();
    name=prefix + "String_Node_Str" + name;
  }
  namedIds.forcePut(func_148755_c(name),idToUse);
  super.func_148756_a(idToUse,name,thing);
  useSlot(idToUse);
  FMLLog.finer("String_Node_Str",name,idToUse,thing);
  return idToUse;
}

Fixed version (ground truth):
int add(int id,String name,I thing,BitSet availabilityMap){
  if (name.equals(optionalDefaultName)) {
    this.optionalDefaultObject=thing;
  }
  int idToUse=id;
  if (id == 0 || availabilityMap.get(id)) {
    idToUse=availabilityMap.nextClearBit(minId);
  }
  if (idToUse >= maxId) {
    throw new RuntimeException(String.format("String_Node_Str",id));
  }
  ModContainer mc=Loader.instance().activeModContainer();
  if (mc != null) {
    String prefix=mc.getModId();
    name=prefix + "String_Node_Str" + name;
  }
  super.func_148756_a(idToUse,name,thing);
  FMLLog.finer("String_Node_Str",name,idToUse,thing);
  return idToUse;
}
Program: 51726
Project: 51726
Buggy source:
public FMLControlledNamespacedRegistry(String optionalDefault,int maxIdValue,int minIdValue,Class<I> type,char discriminator){
  this.superType=type;
  this.discriminator=discriminator;
  this.optionalDefaultName=optionalDefault;
  this.availabilityMap=new BitSet(maxIdValue);
  this.maxId=maxIdValue;
  this.minId=minIdValue;
  this.field_148759_a=new FMLObjectIntIdentityMap();
}

Fixed version (ground truth):
FMLControlledNamespacedRegistry(String optionalDefault,int maxIdValue,int minIdValue,Class<I> type,char discriminator){
  this.superType=type;
  this.discriminator=discriminator;
  this.optionalDefaultName=optionalDefault;
  this.maxId=maxIdValue;
  this.minId=minIdValue;
}
Program: 51727
Project: 51727
Buggy source:
public boolean contains(String itemName){
  return namedIds.containsKey(itemName);
}

Fixed version (ground truth):
public boolean contains(String itemName){
  return field_82596_a.containsKey(itemName);
}
Program: 51728
Project: 51728
Buggy source:
private FMLObjectIntIdentityMap idMap(){
  return (FMLObjectIntIdentityMap)field_148759_a;
}

Fixed version (ground truth):
private ObjectIntIdentityMap idMap(){
  return field_148759_a;
}
Program: 51729
Project: 51729
Buggy source:
public void launchIntegratedServerCallback(String dirName,String saveName){
  try {
    try {
      Thread.interrupted();
      gameReleaseLatch=new CountDownLatch(1);
      clientWaiter=Thread.currentThread();
      client.func_71371_a(dirName,saveName,(WorldSettings)null);
      System.out.printf("String_Node_Str",Thread.currentThread().isInterrupted());
      gameReleaseLatch.await();
    }
 catch (    InterruptedException ie) {
      Thread.interrupted();
      throw gre;
    }
  }
 catch (  GameRegistryException gre) {
    client.func_71403_a(null);
    showGuiScreen(new GuiModItemsMissing(gre.getItems(),gre.getMessage()));
  }
  Thread.interrupted();
}

Fixed version (ground truth):
public void launchIntegratedServerCallback(String dirName,String saveName){
  try {
    try {
      Thread.interrupted();
      gameReleaseLatch=new CountDownLatch(1);
      clientWaiter=Thread.currentThread();
      client.func_71371_a(dirName,saveName,(WorldSettings)null);
      System.out.printf("String_Node_Str",Thread.currentThread().isInterrupted());
      gameReleaseLatch.await();
    }
 catch (    InterruptedException ie) {
      Thread.interrupted();
      throw gre;
    }
  }
 catch (  GameRegistryException gre) {
    client.func_71403_a(null);
    showGuiScreen(new GuiModItemsMissing(gre.getItems()));
  }
  Thread.interrupted();
}
Program: 51730
Project: 51730
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void func_73866_w_(){
  this.field_146292_n.add(new GuiButton(1,this.field_146294_l / 2 - 75,this.field_146295_m - 38,I18n.func_135052_a("String_Node_Str")));
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void func_73866_w_(){
  this.field_146292_n.add(new GuiButton(1,this.field_146294_l / 2 - 100,this.field_146295_m - 38,I18n.func_135052_a("String_Node_Str")));
}
Program: 51731
Project: 51731
Buggy source:
public GuiModItemsMissing(List<String> items,String message){
  this.missingItems=items;
  this.message=message;
}

Fixed version (ground truth):
public GuiModItemsMissing(List<String> items){
  this.missingItems=items;
}