nus-yam/ex-repair huggingface dataset:
Program: 130633
Project: 130633
Buggy source:
@SuppressWarnings({"String_Node_Str"}) public static XEnvironment makeEnv(String str,XProgram init){
  if (NEWDEBUG.debug.fpql.x_typing) {
    init.doTypes();
  }
  XEnvironment ret=new XEnvironment(init,str);
  Map<String,Integer> extra=new HashMap<>();
  int i=0;
  for (  String k : init.order) {
    XExp se=init.exps.get(k);
    try {
      XObject xxx=se.accept(init,new XOps(ret));
      if (xxx == null) {
        throw new RuntimeException();
      }
      if (se instanceof Flower) {
        Flower f=(Flower)se;
        if (ret.objs.containsKey(f.ty)) {
          throw new RuntimeException("String_Node_Str" + f.ty);
        }
        XCtx c=(XCtx)xxx;
        if (f.ty != null) {
          ret.objs.put(f.ty,c.schema);
          extra.put(f.ty,i);
        }
      }
      if (ret.objs.containsKey(k)) {
        throw new RuntimeException("String_Node_Str" + k);
      }
      ret.objs.put(k,xxx);
      i++;
    }
 catch (    Throwable t) {
      t.printStackTrace();
      throw new LineException(t.getLocalizedMessage(),k,"String_Node_Str");
    }
  }
  int j=0;
  for (  Entry<String,Integer> e : extra.entrySet()) {
    init.order.add(e.getValue() + j,e.getKey());
    j++;
  }
  return ret;
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str"}) public static XEnvironment makeEnv(String str,XProgram init,String[] toUpdate){
  if (NEWDEBUG.debug.fpql.x_typing) {
    init.doTypes();
  }
  XEnvironment ret=new XEnvironment(init,str);
  Map<String,Integer> extra=new HashMap<>();
  int i=0;
  for (  String k : init.order) {
    XExp se=init.exps.get(k);
    try {
      XObject xxx=se.accept(init,new XOps(ret));
      if (xxx == null) {
        throw new RuntimeException();
      }
      if (se instanceof Flower) {
        Flower f=(Flower)se;
        if (ret.objs.containsKey(f.ty)) {
          throw new RuntimeException("String_Node_Str" + f.ty);
        }
        XCtx c=(XCtx)xxx;
        if (f.ty != null) {
          ret.objs.put(f.ty,c.schema);
          extra.put(f.ty,i);
        }
      }
      if (ret.objs.containsKey(k)) {
        throw new RuntimeException("String_Node_Str" + k);
      }
      ret.objs.put(k,xxx);
      toUpdate[0]="String_Node_Str" + k;
      i++;
    }
 catch (    Throwable t) {
      t.printStackTrace();
      throw new LineException(t.getLocalizedMessage(),k,"String_Node_Str");
    }
  }
  int j=0;
  for (  Entry<String,Integer> e : extra.entrySet()) {
    init.order.add(e.getValue() + j,e.getKey());
    j++;
  }
  return ret;
}
Program: 130635
Project: 130635
Buggy source:
@Override protected FqlEnvironment makeEnv(String str,FQLProgram init){
  Triple<FqlEnvironment,String,List<Throwable>> envX=Driver.makeEnv(init);
  if (envX.third.isEmpty()) {
    textForCache.put(envX.first,envX.second);
    return envX.first;
  }
 else {
    String ret="String_Node_Str";
    for (    Throwable t : envX.third) {
      ret+=t.getMessage() + "String_Node_Str";
      t.printStackTrace();
    }
    throw new RuntimeException(ret);
  }
}

Fixed version (ground truth):
@Override protected FqlEnvironment makeEnv(String str,FQLProgram init){
  Triple<FqlEnvironment,String,List<Throwable>> envX=Driver.makeEnv(init,toUpdate);
  if (envX.third.isEmpty()) {
    textForCache.put(envX.first,envX.second);
    return envX.first;
  }
 else {
    String ret="String_Node_Str";
    for (    Throwable t : envX.third) {
      ret+=t.getMessage() + "String_Node_Str";
      t.printStackTrace();
    }
    throw new RuntimeException(ret);
  }
}
Program: 130636
Project: 130636
Buggy source:
@Override protected FQLPPEnvironment makeEnv(String program,FQLPPProgram init){
  return FQLPPDriver.makeEnv(program,init);
}

Fixed version (ground truth):
@Override protected FQLPPEnvironment makeEnv(String program,FQLPPProgram init){
  return FQLPPDriver.makeEnv(program,init,toUpdate);
}
Program: 130638
Project: 130638
Buggy source:
@SuppressWarnings("String_Node_Str") public void runAction(){
  toDisplay=null;
  if (temp != null) {
    temp.stop();
  }
  temp=null;
  if (thread != null) {
    thread.stop();
  }
  thread=null;
  thread=new Thread(this);
  temp=new Thread(new Runnable(){
    @Override public void run(){
      try {
        respArea.setText("String_Node_Str");
        for (; ; ) {
          Thread.sleep(250);
          if (toDisplay != null) {
            respArea.setText(toDisplay);
            return;
          }
 else           if (thread != null) {
            respArea.setText(respArea.getText() + "String_Node_Str");
          }
        }
      }
 catch (      InterruptedException ie) {
        ie.printStackTrace();
      }
catch (      Throwable tt) {
        tt.printStackTrace();
        respArea.setText(tt.getMessage());
      }
    }
  }
);
  temp.setPriority(Thread.MIN_PRIORITY);
  temp.start();
  thread.setPriority(Thread.MIN_PRIORITY);
  thread.start();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void runAction(){
  toDisplay=null;
  if (temp != null) {
    temp.stop();
  }
  temp=null;
  if (thread != null) {
    thread.stop();
  }
  thread=new Thread(this);
  temp=new Thread(new Runnable(){
    @Override public void run(){
      try {
        respArea.setText("String_Node_Str");
        int count=0;
        for (; ; ) {
          count++;
          Thread.sleep(250);
          if (toDisplay != null) {
            respArea.setText(toDisplay);
            return;
          }
 else           if (thread != null) {
            if (toUpdate[0] != null) {
              if ((count % 8) == 0) {
                respArea.setText(toUpdate[0] + "String_Node_Str");
              }
 else {
                respArea.setText(respArea.getText() + "String_Node_Str");
              }
            }
 else {
              if (respArea.getText().length() > 1024 * 16) {
                respArea.setText("String_Node_Str");
              }
              respArea.setText(respArea.getText() + "String_Node_Str");
            }
          }
        }
      }
 catch (      InterruptedException ie) {
        ie.printStackTrace();
      }
catch (      Throwable tt) {
        tt.printStackTrace();
        respArea.setText(tt.getMessage());
      }
    }
  }
);
  temp.setPriority(Thread.MIN_PRIORITY);
  temp.start();
  thread.setPriority(Thread.MIN_PRIORITY);
  thread.start();
}
Program: 130639
Project: 130639
Buggy source:
@Override protected Environment<OplObject> makeEnv(String str,Program<OplExp> init){
  return OplDriver.makeEnv(str,init);
}

Fixed version (ground truth):
@Override protected Environment<OplObject> makeEnv(String str,Program<OplExp> init){
  last_env=OplDriver.makeEnv(str,init,toUpdate,last_str,last_prog,last_env);
  last_prog=init;
  last_str=str;
  return last_env;
}
Program: 130640
Project: 130640
Buggy source:
public static final Parser<?> decl(){
  Parser p1=Parsers.tuple(ident(),term("String_Node_Str"),exp());
  return Parsers.or(new Parser[]{p1});
}

Fixed version (ground truth):
public static final Parser<?> decl(){
  return null;
}
Program: 130641
Project: 130641
Buggy source:
public static final Parser<?> exp(){
  Reference ref=Parser.newReference();
  Parser<?> theory=theory();
  Parser<?> model=model();
  Parser<?> trans=trans();
  Parser<?> trans_pres=trans_pres();
  Parser<?> eval=Parsers.tuple(term("String_Node_Str"),ident(),oplTerm());
  Parser<?> java=java();
  Parser<?> mapping=mapping();
  Parser<?> delta=Parsers.tuple(term("String_Node_Str"),ident(),ident());
  Parser<?> sigma=Parsers.tuple(term("String_Node_Str"),ident(),ident());
  Parser<?> presentation=presentation();
  Parser<?> sat=Parsers.tuple(term("String_Node_Str"),ident());
  Parser<?> ubersat=Parsers.tuple(term("String_Node_Str"),ident(),ident());
  Parser<?> unsat=Parsers.tuple(term("String_Node_Str"),ident());
  Parser<?> flower=flower();
  Parser<?> schema=schema();
  Parser<?> projE=Parsers.tuple(term("String_Node_Str"),ident());
  Parser<?> projA=Parsers.tuple(term("String_Node_Str"),ident());
  Parser<?> projT=Parsers.tuple(term("String_Node_Str"),ident());
  Parser<?> projEA=Parsers.tuple(term("String_Node_Str"),ident());
  Parser<?> inst=Parsers.tuple(term("String_Node_Str"),ident(),ident(),ident());
  Parser<?> query=query();
  Parser<?> idQ=Parsers.tuple(term("String_Node_Str"),ident());
  Parser<?> apply=Parsers.tuple(term("String_Node_Str"),ident(),ident());
  Parser<?> a=Parsers.or(new Parser<?>[]{apply,idQ,query,projEA,inst,schema,projE,projA,projT,flower,ubersat,sigma,sat,unsat,presentation,delta,mapping,theory,model,eval,trans,trans_pres,java});
  ref.set(a);
  return a;
}

Fixed version (ground truth):
public static final Parser<?> exp(){
  Reference ref=Parser.newReference();
  Parser<?> theory=theory();
  Parser<?> a=Parsers.or(new Parser<?>[]{theory});
  ref.set(a);
  return a;
}
Program: 130643
Project: 130643
Buggy source:
@Override public Boolean apply(Pair<List<E>,List<E>> xxx){
  List<E> A=xxx.first;
  List<E> B=xxx.second;
  if (A.size() != B.size()) {
    throw new RuntimeException();
  }
  if (A.isEmpty()) {
    return false;
  }
  E a=A.get(0);
  E b=B.get(0);
  if (gt.apply(new Pair<>(b,a))) {
    return true;
  }
 else   if (gt.apply(new Pair<>(a,b))) {
    return false;
  }
 else   if (a.equals(b)) {
    return apply(new Pair<>(A.subList(1,A.size()),B.subList(1,B.size())));
  }
  return false;
}

Fixed version (ground truth):
@Override public Boolean apply(Pair<KBExp<C,V>,KBExp<C,V>> xxx){
  KBExp<C,V> s=xxx.first;
  KBExp<C,V> t=xxx.second;
  if (t.isVar) {
    return !t.equals(s) && s.vars().contains(t.getVar().var);
  }
  if (s.isVar) {
    return false;
  }
  KBApp<C,V> s0=s.getApp();
  KBApp<C,V> t0=t.getApp();
  C f=s0.f;
  C g=t0.f;
  for (  KBExp<C,V> si : s0.args) {
    if (apply(new Pair<>(si,t)) || si.equals(t)) {
      return true;
    }
  }
  if (gt.apply(new Pair<>(f,g))) {
    for (    KBExp<C,V> ti : t0.args) {
      if (!apply(new Pair<>(s,ti))) {
        return false;
      }
    }
    return true;
  }
  if (f.equals(g)) {
    for (    KBExp<C,V> ti : t0.args) {
      if (!this.apply(new Pair<>(s0,ti))) {
        return false;
      }
    }
    int i=0;
    for (    KBExp<C,V> si : s0.args) {
      if (i > t0.args.size()) {
        return false;
      }
      KBExp<C,V> ti=t0.args.get(i++);
      if (this.apply(new Pair<>(si,ti))) {
        return true;
      }
      if (this.apply(new Pair<>(ti,si))) {
        return false;
      }
      if (si.equals(ti)) {
        continue;
      }
      return false;
    }
  }
  return false;
}
Program: 130644
Project: 130644
Buggy source:
public static <C,V>Function<Pair<KBExp<C,V>,KBExp<C,V>>,Boolean> pogt(Function<Pair<C,C>,Boolean> gt,String which){
  return new Function<Pair<KBExp<C,V>,KBExp<C,V>>,Boolean>(){
    @Override public Boolean apply(    Pair<KBExp<C,V>,KBExp<C,V>> xxx){
      KBExp<C,V> s=xxx.first;
      KBExp<C,V> t=xxx.second;
      if (s.hasAsSubterm(t) && !t.equals(s)) {
        return true;
      }
      if (t.isVar) {
        return !t.equals(s) && s.vars().contains(t.getVar().var);
      }
      if (s.isVar) {
        return false;
      }
      KBApp<C,V> s0=s.getApp();
      KBApp<C,V> t0=t.getApp();
      C f=s0.f;
      C g=t0.f;
      if (gt.apply(new Pair<>(f,g))) {
        for (        KBExp<C,V> ti : t0.args) {
          if (!apply(new Pair<>(s,ti))) {
            return false;
          }
        }
        return true;
      }
 else       if (f.equals(g)) {
        if (which == "String_Node_Str") {
          return baglt(this).apply(new Pair<>(tobag(s0.args),tobag(t0.args)));
        }
 else         if (which == "String_Node_Str") {
          return lexlt(this).apply(new Pair<>(t0.args,s0.args));
        }
 else {
          throw new RuntimeException();
        }
      }
 else {
        for (        KBExp<C,V> si : s0.args) {
          if (apply(new Pair<>(si,t)) || si.equals(t)) {
            return true;
          }
        }
        return false;
      }
    }
  }
;
}

Fixed version (ground truth):
public static <C,V>Function<Pair<KBExp<C,V>,KBExp<C,V>>,Boolean> pogt(Function<Pair<C,C>,Boolean> gt){
  return new Function<Pair<KBExp<C,V>,KBExp<C,V>>,Boolean>(){
    @Override public Boolean apply(    Pair<KBExp<C,V>,KBExp<C,V>> xxx){
      KBExp<C,V> s=xxx.first;
      KBExp<C,V> t=xxx.second;
      if (t.isVar) {
        return !t.equals(s) && s.vars().contains(t.getVar().var);
      }
      if (s.isVar) {
        return false;
      }
      KBApp<C,V> s0=s.getApp();
      KBApp<C,V> t0=t.getApp();
      C f=s0.f;
      C g=t0.f;
      for (      KBExp<C,V> si : s0.args) {
        if (apply(new Pair<>(si,t)) || si.equals(t)) {
          return true;
        }
      }
      if (gt.apply(new Pair<>(f,g))) {
        for (        KBExp<C,V> ti : t0.args) {
          if (!apply(new Pair<>(s,ti))) {
            return false;
          }
        }
        return true;
      }
      if (f.equals(g)) {
        for (        KBExp<C,V> ti : t0.args) {
          if (!this.apply(new Pair<>(s0,ti))) {
            return false;
          }
        }
        int i=0;
        for (        KBExp<C,V> si : s0.args) {
          if (i > t0.args.size()) {
            return false;
          }
          KBExp<C,V> ti=t0.args.get(i++);
          if (this.apply(new Pair<>(si,ti))) {
            return true;
          }
          if (this.apply(new Pair<>(ti,si))) {
            return false;
          }
          if (si.equals(ti)) {
            continue;
          }
          return false;
        }
      }
      return false;
    }
  }
;
}
Program: 130645
Project: 130645
Buggy source:
public OplToKB(OplSig sig){
  this.sig=sig;
  if (DEBUG.debug.opl_require_const) {
    checkEmpty();
  }
  KB=convert(this.sig,"String_Node_Str");
  KB.complete();
}

Fixed version (ground truth):
public OplToKB(OplSig sig){
  this.sig=sig;
  if (DEBUG.debug.opl_require_const) {
    checkEmpty();
  }
  KB=convert(this.sig);
  KB.complete();
}
Program: 130646
Project: 130646
Buggy source:
private static KB<String,String> convert(OplSig s,String which){
  Function<Pair<String,String>,Boolean> gt=x -> {
    Integer l=s.prec.get(x.first);
    Integer r=s.prec.get(x.second);
    return l > r;
  }
;
  if (!s.symbols.keySet().equals(s.prec.keySet())) {
    if (DEBUG.debug.opl_alpha) {
      gt=x -> {
        return x.first.toString().compareTo(x.second) > 0;
      }
;
    }
 else {
      throw new RuntimeException("String_Node_Str");
    }
  }
  Set<Pair<KBExp<String,String>,KBExp<String,String>>> eqs=new HashSet<>();
  for (  Triple<OplCtx<String>,OplTerm,OplTerm> eq : s.equations) {
    eqs.add(new Pair<>(convert(eq.second),convert(eq.third)));
  }
  Iterator<String> fr=new Iterator<String>(){
    int i=0;
    @Override public boolean hasNext(){
      return true;
    }
    @Override public String next(){
      return "String_Node_Str" + (i++);
    }
  }
;
  return new KB<>(eqs,KBOrders.pogt(gt,which),fr);
}

Fixed version (ground truth):
private static KB<String,String> convert(OplSig s){
  Function<Pair<String,String>,Boolean> gt=x -> {
    Integer l=s.prec.get(x.first);
    Integer r=s.prec.get(x.second);
    return l > r;
  }
;
  if (!s.symbols.keySet().equals(s.prec.keySet())) {
    if (DEBUG.debug.opl_alpha) {
      gt=x -> {
        return x.first.toString().compareTo(x.second) > 0;
      }
;
    }
 else {
      throw new RuntimeException("String_Node_Str");
    }
  }
  Set<Pair<KBExp<String,String>,KBExp<String,String>>> eqs=new HashSet<>();
  for (  Triple<OplCtx<String>,OplTerm,OplTerm> eq : s.equations) {
    eqs.add(new Pair<>(convert(eq.second),convert(eq.third)));
  }
  Iterator<String> fr=new Iterator<String>(){
    int i=0;
    @Override public boolean hasNext(){
      return true;
    }
    @Override public String next(){
      return "String_Node_Str" + (i++);
    }
  }
;
  return new KB<>(eqs,KBOrders.pogt(gt),fr);
}
Program: 130649
Project: 130649
Buggy source:
public static void main(String[] args) throws InterruptedException {
  final Object semaphore=new Object();
  Console.INSTANCE.initialize(GlobalServiceResolver.INSTANCE);
  Console.INSTANCE.start();
synchronized (semaphore) {
    semaphore.wait();
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws InterruptedException {
  Console.INSTANCE.initialize(GlobalServiceResolver.INSTANCE);
  Console.INSTANCE.start();
  new Semaphore(0).acquire();
}
Program: 130650
Project: 130650
Buggy source:
protected static Object convert(String typeName,String value){
  if ("String_Node_Str".equals(value)) {
    return null;
  }
  Class<?> type=toClass(typeName);
  if (type == null) {
    new IllegalArgumentException("String_Node_Str" + toParameter(type));
  }
  if ((type.isAssignableFrom(Boolean.class)) || (type == Boolean.TYPE)) {
    return Boolean.valueOf(value);
  }
  if ((type.isAssignableFrom(Byte.class)) || (type == Boolean.TYPE)) {
    return Byte.decode(value);
  }
  if ((type.isAssignableFrom(Short.class)) || (type == Short.TYPE)) {
    return Short.decode(value);
  }
  if ((type.isAssignableFrom(Integer.class)) || (type == Integer.TYPE)) {
    return Integer.decode(value);
  }
  if ((type.isAssignableFrom(Long.class)) || (type == Long.TYPE)) {
    return Long.decode(value);
  }
  if ((type.isAssignableFrom(Float.class)) || (type == Float.TYPE)) {
    return Float.valueOf(value);
  }
  if ((type.isAssignableFrom(Double.class)) || (type == Double.TYPE)) {
    return Double.valueOf(value);
  }
  if ((type.isAssignableFrom(Character.class)) || (type == Character.TYPE)) {
    if (value.length() != 1) {
      throw new IllegalArgumentException("String_Node_Str" + value);
    }
    return new Character(value.charAt(0));
  }
  if (type.isAssignableFrom(String.class)) {
    return value;
  }
  throw new IllegalArgumentException("String_Node_Str" + toParameter(type));
}

Fixed version (ground truth):
protected static Object convert(String typeName,String value) throws IllegalArgumentException {
  if ("String_Node_Str".equals(value)) {
    return null;
  }
  Class<?> type=toClass(typeName);
  if (type == null) {
    throw new IllegalArgumentException("String_Node_Str" + toParameter(null));
  }
  if ((type.isAssignableFrom(Boolean.class)) || (type == Boolean.TYPE)) {
    return Boolean.valueOf(value);
  }
  if ((type.isAssignableFrom(Byte.class)) || (type == Boolean.TYPE)) {
    return Byte.decode(value);
  }
  if ((type.isAssignableFrom(Short.class)) || (type == Short.TYPE)) {
    return Short.decode(value);
  }
  if ((type.isAssignableFrom(Integer.class)) || (type == Integer.TYPE)) {
    return Integer.decode(value);
  }
  if ((type.isAssignableFrom(Long.class)) || (type == Long.TYPE)) {
    return Long.decode(value);
  }
  if ((type.isAssignableFrom(Float.class)) || (type == Float.TYPE)) {
    return Float.valueOf(value);
  }
  if ((type.isAssignableFrom(Double.class)) || (type == Double.TYPE)) {
    return Double.valueOf(value);
  }
  if ((type.isAssignableFrom(Character.class)) || (type == Character.TYPE)) {
    if (value.length() != 1) {
      throw new IllegalArgumentException("String_Node_Str" + value);
    }
    return new Character(value.charAt(0));
  }
  if (type.isAssignableFrom(String.class)) {
    return value;
  }
  throw new IllegalArgumentException("String_Node_Str" + toParameter(type));
}
Program: 130651
Project: 130651
Buggy source:
public void drawArmor(){
  GL11.glDisable(GL11.GL_DEPTH_TEST);
  res=new ScaledResolution(Minecraft.getMinecraft(),Minecraft.getMinecraft().displayWidth,Minecraft.getMinecraft().displayHeight);
  int x=(res.getScaledWidth() / 2) - 11;
  int y=res.getScaledHeight() - 49;
switch (EventArmorTick.size) {
case 1:
    Minecraft.getMinecraft().getTextureManager().bindTexture(r);
  Util.drawTexturedModalRect(x,y,0,0,9,9);
break;
case 2:
Minecraft.getMinecraft().getTextureManager().bindTexture(r);
Util.drawTexturedModalRect(x,y,9,0,18,9);
break;
}
}

Fixed version (ground truth):
public void drawArmor(){
  GL11.glDisable(GL11.GL_DEPTH_TEST);
  res=new ScaledResolution(Minecraft.getMinecraft(),Minecraft.getMinecraft().displayWidth,Minecraft.getMinecraft().displayHeight);
  int x=(res.getScaledWidth() / 2) - 11;
  int y=res.getScaledHeight() - 49;
  Item boots=null;
  Item body=null;
  Item legs=null;
  Item helmet=null;
  ItemStack stackBoots=Minecraft.getMinecraft().thePlayer.inventory.armorItemInSlot(0);
  ItemStack stackLegs=Minecraft.getMinecraft().thePlayer.inventory.armorItemInSlot(1);
  ItemStack stackBody=Minecraft.getMinecraft().thePlayer.inventory.armorItemInSlot(2);
  ItemStack stackHelmet=Minecraft.getMinecraft().thePlayer.inventory.armorItemInSlot(3);
  float speedMultiplier=1;
  if (stackBoots != null)   boots=stackBoots.getItem();
 else   boots=null;
  if (stackBody != null)   body=stackBody.getItem();
 else   body=null;
  if (stackLegs != null)   legs=stackLegs.getItem();
 else   legs=null;
  if (stackHelmet != null)   helmet=stackHelmet.getItem();
 else   helmet=null;
  int size=0;
  if (boots == TwilightItemsArmor.haliteBoots && legs == TwilightItemsArmor.haliteLeggings && body == TwilightItemsArmor.haliteChestplate && helmet == TwilightItemsArmor.haliteHelmet)   size=1;
switch (size) {
case 1:
    Minecraft.getMinecraft().getTextureManager().bindTexture(r);
  Util.drawTexturedModalRect(x,y,0,0,9,9);
break;
case 2:
Minecraft.getMinecraft().getTextureManager().bindTexture(r);
Util.drawTexturedModalRect(x,y,9,0,18,9);
break;
}
GL11.glEnable(GL11.GL_DEPTH_TEST);
}
Program: 130653
Project: 130653
Buggy source:
@SideOnly(Side.CLIENT) @SubscribeEvent public void renderOverlay(RenderGameOverlayEvent.Post event){
  if (event.isCanceled() || event.type != ElementType.EXPERIENCE)   return;
  if ((EventArmorTick.size != 0) && !Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) {
    gui.drawArmor();
  }
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @SubscribeEvent public void renderOverlay(RenderGameOverlayEvent.Post event){
  if (event.isCanceled() || event.type != ElementType.EXPERIENCE)   return;
  if (!Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) {
    gui.drawArmor();
  }
}
Program: 130654
Project: 130654
Buggy source:
public static boolean isDeveloperName(String name){
  for (int i=0; i < devs.length; i++) {
    return name.equals(devs[i]);
  }
  return false;
}

Fixed version (ground truth):
public static boolean isDeveloperName(String name){
  for (int i=0; i < devs.length; i++) {
    if (name.equalsIgnoreCase(devs[i]))     return true;
  }
  return false;
}
Program: 130655
Project: 130655
Buggy source:
@Override protected void dropFewItems(boolean par1,int par2){
  Item i=getDropItem();
  Item i2=VanillaItemsWeapons.sandslash;
  int var3, var4;
  var3=this.rand.nextInt(6) + 4;
  for (var4=0; var4 < var3; var4++)   this.dropItem(i,1);
  for (var4=0; var4 < 1; var4++)   this.dropItem(i2,1);
}

Fixed version (ground truth):
@Override protected void dropFewItems(boolean par1,int par2){
  this.dropItem(VanillaItemsOther.divineShards,this.rand.nextInt(4) + 3);
  this.dropItem(VanillaItemsWeapons.sandslash,1);
}
Program: 130656
Project: 130656
Buggy source:
@Override public boolean onItemUse(ItemStack stack,EntityPlayer player,World world,int x,int y,int z,int par7,float par8,float par9,float par10){
  if (world.provider.dimensionId != 0)   player.addChatMessage(Util.getChatComponent(Util.AQUA + "String_Node_Str"));
  if (!world.isRemote) {
    EntityAncientEntity entity=new EntityAncientEntity(world);
    entity.setPosition(x,y + 1,z);
    if (world.getCollidingBoundingBoxes(entity,entity.boundingBox).isEmpty()) {
      world.spawnEntityInWorld(entity);
      if (player.capabilities.isCreativeMode)       stack.stackSize--;
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean onItemUse(ItemStack stack,EntityPlayer player,World world,int x,int y,int z,int par7,float par8,float par9,float par10){
  if (world.provider.dimensionId != 0)   player.addChatMessage(Util.getChatComponent(Util.AQUA + "String_Node_Str"));
  if (!world.isRemote) {
    EntityAncientEntity entity=new EntityAncientEntity(world);
    entity.setPosition(x,y + 1,z);
    if (world.getCollidingBoundingBoxes(entity,entity.boundingBox).isEmpty()) {
      world.spawnEntityInWorld(entity);
      if (!player.capabilities.isCreativeMode)       stack.stackSize--;
    }
  }
  return true;
}
Program: 130657
Project: 130657
Buggy source:
@Override public ItemStack transferStackInSlot(EntityPlayer player,int index){
  ItemStack itemstack=null;
  Slot slot=(Slot)this.inventorySlots.get(index);
  if (slot != null && slot.getHasStack()) {
    ItemStack itemstack1=slot.getStack();
    itemstack=itemstack1.copy();
    if (itemstack.getItem() != VetheaItems.acid)     return null;
    if (!this.mergeItemStack(itemstack1,this.numRows * 9,this.inventorySlots.size(),true)) {
      return null;
    }
    if (itemstack1.stackSize == 0) {
      slot.putStack((ItemStack)null);
    }
 else {
      slot.onSlotChanged();
    }
  }
  return itemstack;
}

Fixed version (ground truth):
@Override public ItemStack transferStackInSlot(EntityPlayer player,int index){
  ItemStack itemstack=null;
  Slot slot=(Slot)this.inventorySlots.get(index);
  if (slot != null && slot.getHasStack()) {
    ItemStack itemstack1=slot.getStack();
    itemstack=itemstack1.copy();
    if (itemstack.getItem() != VetheaItems.acid)     return null;
    if ((index == 0 && !this.mergeItemStack(itemstack1,1,this.inventorySlots.size(),false)) || (index != 0 && !this.mergeItemStack(itemstack1,0,1,false)))     return null;
    if (itemstack1.stackSize == 0) {
      slot.putStack((ItemStack)null);
    }
 else {
      slot.onSlotChanged();
    }
  }
  return itemstack;
}
Program: 130658
Project: 130658
Buggy source:
@Override public void updateEntity(){
  super.updateEntity();
  for (int n=0; n < 3; n++) {
    DivineRPG.proxy.spawnParticle(this.worldObj,this.xCoord + 0.5,this.yCoord + 0.5,this.zCoord + 0.5,"String_Node_Str",true,3);
  }
  if (!this.worldObj.isRemote) {
    if (this.spawnTimer > 0)     this.spawnTimer--;
    if (this.spawnTimer == 0) {
      int c=this.worldObj.getEntitiesWithinAABB(Entity.class,AxisAlignedBB.getBoundingBox(this.xCoord,this.yCoord,this.zCoord,this.xCoord + 1,this.yCoord + 1,this.zCoord + 1).expand(8,6,8)).size();
      for (int x=-4; x <= 4; x++) {
        for (int y=-2; y <= 4; y++) {
          for (int z=-4; z <= 4; z++) {
            if (this.yCoord + y > 0 && this.worldObj.getBlock(this.xCoord + x,this.yCoord + y,this.zCoord + z) == Blocks.air && this.worldObj.getBlock(this.xCoord + x,this.yCoord + y + 1,this.zCoord + z) == Blocks.air && this.worldObj.getBlock(this.xCoord + x,this.yCoord + y - 1,this.zCoord + z) != Blocks.air && this.rand.nextInt(20) == 0 && c < 8) {
              Entity e=EntityList.createEntityByName(this.entityName,this.worldObj);
              if (e != null) {
                e.setLocationAndAngles(this.xCoord + x,this.yCoord + y,this.zCoord + z,this.rand.nextInt(360),0);
                this.worldObj.spawnEntityInWorld(e);
              }
            }
          }
        }
      }
      this.spawnTimer=400;
    }
  }
}

Fixed version (ground truth):
@Override public void updateEntity(){
  super.updateEntity();
  for (int n=0; n < 3; n++) {
    DivineRPG.proxy.spawnParticle(this.worldObj,this.xCoord + 0.5,this.yCoord + 0.5,this.zCoord + 0.5,"String_Node_Str",true,3);
  }
  if (!this.worldObj.isRemote) {
    if (this.spawnTimer > 0)     this.spawnTimer--;
    if (this.spawnTimer == 0) {
      int c=this.worldObj.getEntitiesWithinAABB(EntityRoamer.class,AxisAlignedBB.getBoundingBox(this.xCoord,this.yCoord,this.zCoord,this.xCoord + 1,this.yCoord + 1,this.zCoord + 1).expand(8,6,8)).size();
      if (c < 8) {
        for (int x=-4; x <= 4; x++) {
          for (int y=-2; y <= 4; y++) {
            for (int z=-4; z <= 4; z++) {
              if (this.yCoord + y > 0 && this.worldObj.getBlock(this.xCoord + x,this.yCoord + y,this.zCoord + z) == Blocks.air && this.worldObj.getBlock(this.xCoord + x,this.yCoord + y + 1,this.zCoord + z) == Blocks.air && this.worldObj.getBlock(this.xCoord + x,this.yCoord + y - 1,this.zCoord + z) != Blocks.air && this.rand.nextInt(20) == 0) {
                Entity e=EntityList.createEntityByName(this.entityName,this.worldObj);
                if (e != null) {
                  e.setLocationAndAngles(this.xCoord + x,this.yCoord + y,this.zCoord + z,this.rand.nextInt(360),0);
                  this.worldObj.spawnEntityInWorld(e);
                  System.out.println("String_Node_Str");
                }
              }
            }
          }
        }
      }
      this.spawnTimer=50;
    }
  }
}
Program: 130661
Project: 130661
Buggy source:
public void manageAbilities(){
  if (this.abilityCooldown == 0) {
    this.abilityCooldown=200;
switch (this.rand.nextInt(3)) {
case 0:
      ability=CEILING;
    this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0);
  this.playSound(Sounds.ceilingExplosions.getPrefixedName(),1.0F,1.0F);
if (!this.worldObj.isRemote) Util.sendMessageToAll("String_Node_Str");
break;
case 1:
ability=CANNONS;
break;
case 2:
ability=FLOOR;
break;
default :
break;
}
}
 else if (this.abilityCooldown > 0) {
this.abilityCooldown--;
}
System.out.println(abilityCooldown);
}

Fixed version (ground truth):
public void manageAbilities(){
  if (this.abilityCooldown == 0) {
    this.abilityCooldown=200;
switch (this.rand.nextInt(3)) {
case 0:
      ability=CEILING;
    this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0);
  this.playSound(Sounds.ceilingExplosions.getPrefixedName(),1.0F,1.0F);
if (!this.worldObj.isRemote) Util.sendMessageToAll("String_Node_Str");
break;
case 1:
ability=CANNONS;
break;
case 2:
ability=FLOOR;
break;
default :
break;
}
}
 else if (this.abilityCooldown > 0) {
this.abilityCooldown--;
}
}
Program: 130662
Project: 130662
Buggy source:
@Override public int quantityDropped(Random rand){
  if (twilightOre)   return edenArmor;
  return 1;
}

Fixed version (ground truth):
@Override public int quantityDropped(int meta,int fortune,Random random){
  if (twilightOre && fortune > 0) {
    int j=random.nextInt(fortune + 2) - 1;
    if (j < 0)     j=0;
    return (j + 1);
  }
  return 1;
}
Program: 130663
Project: 130663
Buggy source:
@Override public void render(Entity entity,float f,float f1,float f2,float f3,float f4,float f5){
  super.render(entity,f,f1,f2,f3,f4,f5);
  setRotationAngles(f,f1,f2,f3,f4,f5,entity);
  frostBody.render(f5);
  shard1.render(f5);
  shard2.render(f5);
  shard7.render(f5);
  shard8.render(f5);
  shard4.render(f5);
  shard3.render(f5);
  shard5.render(f5);
  shard6.render(f5);
}

Fixed version (ground truth):
@Override public void render(Entity entity,float f,float f1,float f2,float f3,float f4,float f5){
  super.render(entity,f,f1,f2,f3,f4,f5);
  setRotationAngles(f,f1,f2,f3,f4,f5,entity);
  GL11.glPushMatrix();
  GL11.glScalef(2,2,2);
  frostBody.render(f5);
  shard1.render(f5);
  shard2.render(f5);
  shard7.render(f5);
  shard8.render(f5);
  shard4.render(f5);
  shard3.render(f5);
  shard5.render(f5);
  shard6.render(f5);
  GL11.glPopMatrix();
}
Program: 130665
Project: 130665
Buggy source:
public EntityFractite(World var1){
  super(var1);
  this.getNavigator().setAvoidsWater(true);
  this.tasks.addTask(1,new EntityAISwimming(this));
  this.tasks.addTask(8,new EntityAIWatchClosest(this,EntityPlayer.class,32.0F));
  this.tasks.addTask(9,new EntityAILookIdle(this));
}

Fixed version (ground truth):
public EntityFractite(World var1){
  super(var1);
  this.getNavigator().setAvoidsWater(true);
  this.tasks.addTask(1,new EntityAISwimming(this));
  this.tasks.addTask(8,new EntityAIWatchClosest(this,EntityPlayer.class,32.0F));
  this.tasks.addTask(9,new EntityAILookIdle(this));
  this.setSize(1.7f,1.3f);
}
Program: 130666
Project: 130666
Buggy source:
@Override public void onLivingUpdate(){
  if (!this.worldObj.isRemote) {
    if (this.entityToAttack == null && this.worldObj.getClosestVulnerablePlayerToEntity(this,22F) != null) {
      this.entityToAttack=this.worldObj.getClosestVulnerablePlayerToEntity(this,22F);
    }
    --this.heightOffsetUpdateTime;
    if (this.heightOffsetUpdateTime <= 0) {
      this.heightOffsetUpdateTime=100;
      this.heightOffset=0.5F + (float)this.rand.nextGaussian() * 3.0F;
    }
    if (this.getEntityToAttack() != null && this.getEntityToAttack().posY + (double)this.getEntityToAttack().getEyeHeight() + 5 > this.posY + (double)this.getEyeHeight() + (double)this.heightOffset) {
      this.motionY+=(0.30000001192092896D - this.motionY) * 0.30000001192092896D;
    }
 else     if (this.getEntityToAttack() != null && this.getEntityToAttack().posY + (double)this.getEntityToAttack().getEyeHeight() <= this.posY + (double)this.getEyeHeight() + (double)this.heightOffset) {
      this.attackEntity(this.getEntityToAttack(),this.getDistanceToEntity(this.getEntityToAttack()));
    }
  }
  if (!this.onGround && this.motionY < 0.0D) {
    this.motionY*=0.6D;
  }
  super.onLivingUpdate();
}

Fixed version (ground truth):
@Override public void onLivingUpdate(){
  if (!this.worldObj.isRemote) {
    if (this.entityToAttack == null && this.worldObj.getClosestVulnerablePlayerToEntity(this,22F) != null) {
      this.entityToAttack=this.worldObj.getClosestVulnerablePlayerToEntity(this,22F);
    }
    if (this.getEntityToAttack() != null && this.getEntityToAttack() instanceof EntityPlayer && ((EntityPlayer)this.getEntityToAttack()).capabilities.isCreativeMode) {
      this.entityToAttack=null;
    }
    --this.heightOffsetUpdateTime;
    if (this.heightOffsetUpdateTime <= 0) {
      this.heightOffsetUpdateTime=100;
      this.heightOffset=0.5F + (float)this.rand.nextGaussian() * 3.0F;
    }
    if (this.getEntityToAttack() != null && this.getEntityToAttack().posY + (double)this.getEntityToAttack().getEyeHeight() + 5 > this.posY + (double)this.getEyeHeight() + (double)this.heightOffset) {
      this.motionY+=(0.30000001192092896D - this.motionY) * 0.30000001192092896D;
    }
 else     if (this.getEntityToAttack() != null && this.getEntityToAttack().posY + (double)this.getEntityToAttack().getEyeHeight() <= this.posY + (double)this.getEyeHeight() + (double)this.heightOffset) {
      this.attackEntity(this.getEntityToAttack(),this.getDistanceToEntity(this.getEntityToAttack()));
    }
  }
  if (!this.onGround && this.motionY < 0.0D) {
    this.motionY*=0.6D;
  }
  super.onLivingUpdate();
}
Program: 130667
Project: 130667
Buggy source:
public EntityFrost(World var1){
  super(var1);
  this.experienceValue=20;
}

Fixed version (ground truth):
public EntityFrost(World var1){
  super(var1);
  this.experienceValue=20;
  this.setSize(1,1);
}
Program: 130668
Project: 130668
Buggy source:
@Override protected void onImpact(MovingObjectPosition pos){
  if (!this.worldObj.isRemote) {
    if (pos.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
      int var2=pos.blockX;
      int var3=pos.blockY;
      int var4=pos.blockZ;
switch (pos.sideHit) {
case 0:
        var3--;
      break;
case 1:
    var3++;
  break;
case 2:
var4--;
break;
case 3:
var4++;
break;
case 4:
var2--;
break;
case 5:
var2++;
}
if (this.worldObj.isAirBlock(var2,var3,var4)) {
this.worldObj.setBlock(var2,var3,var4,Blocks.fire);
}
}
 else if (pos.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY) {
pos.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this.shootingEntity,pos.entityHit),10.0F);
}
setDead();
}
}

Fixed version (ground truth):
@Override protected void onImpact(MovingObjectPosition pos){
  if (!this.worldObj.isRemote) {
    if (pos.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
      int var2=pos.blockX;
      int var3=pos.blockY;
      int var4=pos.blockZ;
switch (pos.sideHit) {
case 0:
        var3--;
      break;
case 1:
    var3++;
  break;
case 2:
var4--;
break;
case 3:
var4++;
break;
case 4:
var2--;
break;
case 5:
var2++;
}
if (this.worldObj.isAirBlock(var2,var3,var4)) {
this.worldObj.setBlock(var2,var3,var4,Blocks.fire);
}
}
 else if (pos.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY) {
pos.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this,this.shootingEntity),10.0F);
}
setDead();
}
}
Program: 130672
Project: 130672
Buggy source:
@Override public Chunk provideChunk(int i,int j){
  this.rand.setSeed(i * 341873128712L + j * 132897987541L);
  Block[] var3=new Block[32768];
  this.biomesForGeneration=this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration,i * 16,j * 16,16,16);
  this.generateTerrain(i,j,var3,this.biomesForGeneration,this.generatedTemperatures);
  this.replaceBlocksForBiome(i,j,var3,this.biomesForGeneration);
  Chunk var4=new Chunk(this.worldObj,var3,i,j);
  byte[] var5=var4.getBiomeArray();
  for (int var6=0; var6 < var5.length; ++var6) {
    var5[var6]=(byte)this.biomesForGeneration[var6].biomeID;
  }
  var4.generateSkylightMap();
  return var4;
}

Fixed version (ground truth):
@Override public Chunk provideChunk(int i,int j){
  this.rand.setSeed(i * 341873128712L + j * 132897987541L);
  Block[] blocks=new Block[32768];
  this.biomesForGeneration=this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration,i * 16,j * 16,16,16);
  this.generateTerrain(i,j,blocks,this.biomesForGeneration,this.generatedTemperatures);
  this.replaceBlocksForBiome(i,j,blocks,this.biomesForGeneration);
  for (int n=0; n < 32767; n++) {
    if (blocks[n] == TwilightBlocks.apalachiaGrass && blocks[n + 1] != null)     blocks[n]=TwilightBlocks.apalachiaDirt;
  }
  Chunk var4=new Chunk(this.worldObj,blocks,i,j);
  byte[] var5=var4.getBiomeArray();
  for (int var6=0; var6 < var5.length; ++var6) {
    var5[var6]=(byte)this.biomesForGeneration[var6].biomeID;
  }
  var4.generateSkylightMap();
  return var4;
}
Program: 130673
Project: 130673
Buggy source:
public Chunk provideChunk(int par1,int par2){
  this.rand.setSeed((long)par1 * 391279128714L + (long)par2 * 132894987741L);
  Block[] ablock=new Block[32768];
  this.biomesForGeneration=this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration,par1 * 16,par2 * 16,16,16);
  this.generateTerrain(par1,par2,ablock,this.biomesForGeneration);
  this.replaceBlocksForBiome(par1,par2,ablock,this.biomesForGeneration);
  Chunk chunk=new Chunk(this.worldObj,ablock,par1,par2);
  byte[] abyte=chunk.getBiomeArray();
  for (int k=0; k < abyte.length; ++k) {
    abyte[k]=(byte)this.biomesForGeneration[k].biomeID;
  }
  chunk.generateSkylightMap();
  return chunk;
}

Fixed version (ground truth):
public Chunk provideChunk(int par1,int par2){
  this.rand.setSeed((long)par1 * 391279128714L + (long)par2 * 132894987741L);
  Block[] blocks=new Block[32768];
  this.biomesForGeneration=this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration,par1 * 16,par2 * 16,16,16);
  this.generateTerrain(par1,par2,blocks,this.biomesForGeneration);
  this.replaceBlocksForBiome(par1,par2,blocks,this.biomesForGeneration);
  for (int i=0; i < 32767; i++) {
    if (blocks[i] == TwilightBlocks.edenGrass && blocks[i + 1] != null)     blocks[i]=TwilightBlocks.edenDirt;
  }
  Chunk chunk=new Chunk(this.worldObj,blocks,par1,par2);
  byte[] abyte=chunk.getBiomeArray();
  for (int k=0; k < abyte.length; ++k) {
    abyte[k]=(byte)this.biomesForGeneration[k].biomeID;
  }
  chunk.generateSkylightMap();
  return chunk;
}
Program: 130675
Project: 130675
Buggy source:
public Chunk provideChunk(int par1,int par2){
  this.hellRNG.setSeed((long)par1 * 341873128712L + (long)par2 * 132897987541L);
  Block[] abyte=new Block[32768];
  this.generateNetherTerrain(par1,par2,abyte);
  this.replaceBlocksForBiome(par1,par2,abyte);
  this.netherCaveGenerator.func_151539_a(this,this.worldObj,par1,par2,abyte);
  Chunk chunk=new Chunk(this.worldObj,abyte,par1,par2);
  BiomeGenBase[] abiomegenbase=this.worldObj.getWorldChunkManager().loadBlockGeneratorData((BiomeGenBase[])null,par1 * 16,par2 * 16,16,16);
  byte[] abyte1=chunk.getBiomeArray();
  for (int k=0; k < abyte1.length; ++k) {
    abyte1[k]=(byte)abiomegenbase[k].biomeID;
  }
  chunk.resetRelightChecks();
  return chunk;
}

Fixed version (ground truth):
public Chunk provideChunk(int par1,int par2){
  this.hellRNG.setSeed((long)par1 * 341873128712L + (long)par2 * 132897987541L);
  Block[] blocks=new Block[32768];
  this.generateNetherTerrain(par1,par2,blocks);
  this.replaceBlocksForBiome(par1,par2,blocks);
  for (int i=0; i < 32767; i++) {
    if (blocks[i] == TwilightBlocks.mortumGrass && blocks[i + 1] != null)     blocks[i]=TwilightBlocks.mortumDirt;
  }
  Chunk chunk=new Chunk(this.worldObj,blocks,par1,par2);
  BiomeGenBase[] abiomegenbase=this.worldObj.getWorldChunkManager().loadBlockGeneratorData((BiomeGenBase[])null,par1 * 16,par2 * 16,16,16);
  byte[] abyte1=chunk.getBiomeArray();
  for (int k=0; k < abyte1.length; ++k) {
    abyte1[k]=(byte)abiomegenbase[k].biomeID;
  }
  chunk.resetRelightChecks();
  return chunk;
}
Program: 130677
Project: 130677
Buggy source:
@Override public Chunk provideChunk(int i,int j){
  this.rand.setSeed(i * 341873128712L + j * 132897987541L);
  Block[] var3=new Block[65536];
  this.biomesForGeneration=this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration,i * 16,j * 16,16,16);
  this.generateTerrain(i,j,var3,this.biomesForGeneration,this.generatedTemperatures);
  this.replaceBlocksForBiome(i,j,var3,this.biomesForGeneration);
  Chunk var4=new Chunk(this.worldObj,var3,i,j);
  byte[] var5=var4.getBiomeArray();
  for (int var6=0; var6 < var5.length; ++var6) {
    var5[var6]=(byte)this.biomesForGeneration[var6].biomeID;
  }
  var4.generateSkylightMap();
  return var4;
}

Fixed version (ground truth):
@Override public Chunk provideChunk(int i,int j){
  this.rand.setSeed(i * 341873128712L + j * 132897987541L);
  Block[] blocks=new Block[65536];
  this.biomesForGeneration=this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration,i * 16,j * 16,16,16);
  this.generateTerrain(i,j,blocks,this.biomesForGeneration,this.generatedTemperatures);
  this.replaceBlocksForBiome(i,j,blocks,this.biomesForGeneration);
  for (int n=0; n < 65535; n++) {
    if (blocks[n] == TwilightBlocks.skythernGrass && blocks[n + 1] != null)     blocks[n]=TwilightBlocks.skythernDirt;
  }
  Chunk var4=new Chunk(this.worldObj,blocks,i,j);
  byte[] var5=var4.getBiomeArray();
  for (int var6=0; var6 < var5.length; ++var6) {
    var5[var6]=(byte)this.biomesForGeneration[var6].biomeID;
  }
  var4.generateSkylightMap();
  return var4;
}
Program: 130679
Project: 130679
Buggy source:
@Override public Chunk provideChunk(int i,int j){
  this.rand.setSeed(i * 341873128712L + j * 132897987541L);
  Block[] var3=new Block[32768];
  this.biomesForGeneration=this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration,i * 16,j * 16,16,16);
  this.generateTerrain(i,j,var3,this.biomesForGeneration,this.generatedTemperatures);
  this.replaceBlocksForBiome(i,j,var3,this.biomesForGeneration);
  Chunk var4=new Chunk(this.worldObj,var3,i,j);
  byte[] var5=var4.getBiomeArray();
  for (int var6=0; var6 < var5.length; ++var6) {
    var5[var6]=(byte)this.biomesForGeneration[var6].biomeID;
  }
  var4.generateSkylightMap();
  return var4;
}

Fixed version (ground truth):
@Override public Chunk provideChunk(int i,int j){
  this.rand.setSeed(i * 341873128712L + j * 132897987541L);
  Block[] blocks=new Block[32768];
  this.biomesForGeneration=this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration,i * 16,j * 16,16,16);
  this.generateTerrain(i,j,blocks,this.biomesForGeneration,this.generatedTemperatures);
  this.replaceBlocksForBiome(i,j,blocks,this.biomesForGeneration);
  for (int n=0; n < 32767; n++) {
    if (blocks[n] == TwilightBlocks.wildwoodGrass && blocks[n + 1] != null)     blocks[n]=TwilightBlocks.wildwoodDirt;
  }
  Chunk var4=new Chunk(this.worldObj,blocks,i,j);
  byte[] var5=var4.getBiomeArray();
  for (int var6=0; var6 < var5.length; ++var6) {
    var5[var6]=(byte)this.biomesForGeneration[var6].biomeID;
  }
  var4.generateSkylightMap();
  return var4;
}
Program: 130681
Project: 130681
Buggy source:
private void generateOverworld(World world,Random random,int x,int z){
  BiomeGenBase biome=world.getWorldChunkManager().getBiomeGenAt(x,z);
  addOreSpawn(VanillaBlocks.realmiteOre,world,random,x,z,16,16,5,4,1,25);
  addOreSpawn(VanillaBlocks.arlemiteOre,world,random,x,z,16,16,2,3,1,15);
  addOreSpawn(VanillaBlocks.rupeeOre,world,random,x,z,16,16,2,3,1,15);
  addOreSpawn(Blocks.diamond_ore,world,random,x,z,16,16,2,6,1,23);
  if (world.provider.dimensionId == 0) {
    if (random.nextInt(8) == 0) {
      int posX=x + random.nextInt(16) + 8;
      int posY=random.nextInt(150);
      int posZ=z + random.nextInt(16) + 8;
      if (random.nextInt(10) == 0 || posY < 60)       (new WorldGenLakes(VanillaBlocks.tar)).generate(world,random,posX,posY,posZ);
    }
  }
  if (world.provider.dimensionId == 0) {
    for (int i=0; i < 3; i++) {
      int posX=x + random.nextInt(16) + 8;
      int posY=random.nextInt(60);
      int posZ=z + random.nextInt(16) + 8;
      (new WorldGenDivineDungeon()).generate(world,random,posX,posY,posZ);
    }
  }
  if (biome instanceof BiomeGenForest) {
    for (int i=0; i < 3; i++) {
      int posX=x + random.nextInt(16);
      int posZ=z + random.nextInt(16);
      int posY=world.getHeightValue(posX,posZ);
      (new WorldGenDivineTree(true)).generate(world,random,posX,posY,posZ);
    }
  }
}

Fixed version (ground truth):
private void generateOverworld(World world,Random random,int x,int z){
  BiomeGenBase biome=world.getWorldChunkManager().getBiomeGenAt(x,z);
  addOreSpawn(VanillaBlocks.realmiteOre,world,random,x,z,16,16,5,4,1,25);
  addOreSpawn(VanillaBlocks.arlemiteOre,world,random,x,z,16,16,2,3,1,15);
  addOreSpawn(VanillaBlocks.rupeeOre,world,random,x,z,16,16,2,3,1,15);
  addOreSpawn(Blocks.diamond_ore,world,random,x,z,16,16,2,6,1,23);
  if (random.nextInt(8) == 0) {
    int posX=x + random.nextInt(16) + 8;
    int posY=random.nextInt(150);
    int posZ=z + random.nextInt(16) + 8;
    if (random.nextInt(10) == 0 || posY < 60)     (new WorldGenLakes(VanillaBlocks.tar)).generate(world,random,posX,posY,posZ);
  }
  for (int i=0; i < 3; i++) {
    int posX=x + random.nextInt(16) + 8;
    int posY=random.nextInt(60);
    int posZ=z + random.nextInt(16) + 8;
    (new WorldGenDivineDungeon()).generate(world,random,posX,posY,posZ);
  }
  if (biome instanceof BiomeGenForest) {
    for (int i=0; i < 3; i++) {
      int posX=x + random.nextInt(16);
      int posZ=z + random.nextInt(16);
      int posY=world.getHeightValue(posX,posZ);
      (new WorldGenDivineTree(true)).generate(world,random,posX,posY,posZ);
    }
  }
}
Program: 130682
Project: 130682
Buggy source:
private void generateNether(World world,Random random,int x,int z){
  addNetherOreSpawn(VanillaBlocks.netheriteOre,world,random,x,z,16,16,10,4,1,128);
  addNetherOreSpawn(VanillaBlocks.bloodgemOre,world,random,x,z,16,16,11,5,1,128);
  if (world.provider.dimensionId == -1) {
    for (int i=0; i < 2; ++i) {
      int posX=x + random.nextInt(16) + 8;
      int posY=random.nextInt(120) + 4;
      int posZ=z + random.nextInt(16) + 8;
      (new WorldGenBlueFire()).generate(world,random,posX,posY,posZ);
    }
  }
}

Fixed version (ground truth):
private void generateNether(World world,Random random,int x,int z){
  addNetherOreSpawn(VanillaBlocks.netheriteOre,world,random,x,z,16,16,10,4,1,128);
  addNetherOreSpawn(VanillaBlocks.bloodgemOre,world,random,x,z,16,16,11,5,1,128);
  for (int i=0; i < 2; ++i) {
    int posX=x + random.nextInt(16) + 8;
    int posY=random.nextInt(120) + 4;
    int posZ=z + random.nextInt(16) + 8;
    (new WorldGenBlueFire()).generate(world,random,posX,posY,posZ);
  }
}
Program: 130683
Project: 130683
Buggy source:
@Override public void generate(Random rand,int chunkX,int chunkZ,World world,IChunkProvider chunkGenerator,IChunkProvider chunkProvider){
switch (world.provider.dimensionId) {
case -1:
    generateNether(world,rand,chunkX * 16,chunkZ * 16);
case 0:
  generateOverworld(world,rand,chunkX * 16,chunkZ * 16);
case 1:
generateEnd(world,rand,chunkX * 16,chunkZ * 16);
}
}

Fixed version (ground truth):
@Override public void generate(Random rand,int chunkX,int chunkZ,World world,IChunkProvider chunkGenerator,IChunkProvider chunkProvider){
switch (world.provider.dimensionId) {
case -1:
    generateNether(world,rand,chunkX * 16,chunkZ * 16);
  break;
case 0:
generateOverworld(world,rand,chunkX * 16,chunkZ * 16);
break;
case 1:
generateEnd(world,rand,chunkX * 16,chunkZ * 16);
break;
}
}