nus-yam/ex-repair huggingface dataset:
Program: 145972
Project: 145972
Buggy source:
/** 
 * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction.
 */
public void setRayHeading(double par1,double par3,double par5,float par7,float par8){
  float f2=MathHelper.sqrt_double(par1 * par1 + par3 * par3 + par5 * par5);
  par1/=(double)f2;
  par3/=(double)f2;
  par5/=(double)f2;
  par1+=this.rand.nextGaussian() * 0.007499999832361937D * (double)par8;
  par3+=this.rand.nextGaussian() * 0.007499999832361937D * (double)par8;
  par5+=this.rand.nextGaussian() * 0.007499999832361937D * (double)par8;
  par1*=(double)par7;
  par3*=(double)par7;
  par5*=(double)par7;
  this.motionX=par1;
  this.motionY=par3;
  this.motionZ=par5;
  float f3=MathHelper.sqrt_double(par1 * par1 + par5 * par5);
  System.out.println("String_Node_Str" + par1 + "String_Node_Str"+ par3+ "String_Node_Str"+ par5+ "String_Node_Str");
  this.prevRotationYaw=this.rotationYaw=(float)(Math.atan2(par1,par5) * 180.0D / Math.PI);
  this.prevRotationPitch=this.rotationPitch=(float)(Math.atan2(par3,(double)f3) * 180.0D / Math.PI);
  System.out.println(rotationYaw + "String_Node_Str" + rotationPitch);
}

Fixed version (ground truth):
/** 
 * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction.
 */
public void setRayHeading(double par1,double par3,double par5,float par7,float par8){
  float f2=MathHelper.sqrt_double(par1 * par1 + par3 * par3 + par5 * par5);
  par1/=(double)f2;
  par3/=(double)f2;
  par5/=(double)f2;
  par1+=this.rand.nextGaussian() * 0.007499999832361937D * (double)par8;
  par3+=this.rand.nextGaussian() * 0.007499999832361937D * (double)par8;
  par5+=this.rand.nextGaussian() * 0.007499999832361937D * (double)par8;
  par1*=(double)par7;
  par3*=(double)par7;
  par5*=(double)par7;
  this.motionX=par1;
  this.motionY=par3;
  this.motionZ=par5;
  float f3=MathHelper.sqrt_double(par1 * par1 + par5 * par5);
  this.prevRotationYaw=this.rotationYaw=(float)(Math.atan2(par1,par5) * 180.0D / Math.PI);
  this.prevRotationPitch=this.rotationPitch=(float)(Math.atan2(par3,(double)f3) * 180.0D / Math.PI);
}
Program: 145973
Project: 145973
Buggy source:
public ArmorHEV(int armorType){
  super(ArmorMaterial.DIAMOND,2,armorType);
  setUnlocalizedName("String_Node_Str" + this.armorType);
  this.setIconName("String_Node_Str" + armorType);
  this.setMaxCharge(100000);
  this.setTier(2);
  this.setTransferLimit(128);
  this.setEnergyPerDamage(500);
}

Fixed version (ground truth):
public ArmorHEV(int armorType){
  super(ArmorMaterial.DIAMOND,2,armorType);
  setUnlocalizedName("String_Node_Str" + this.armorType);
  this.setIconName("String_Node_Str" + armorType);
  this.setMaxCharge(100000);
  this.setMaxDamage(100000);
  this.setTier(2);
  this.setTransferLimit(128);
  this.setEnergyPerDamage(500);
}
Program: 145974
Project: 145974
Buggy source:
public boolean onActionEnd(World world,EntityPlayer player,InfWeapon inf,boolean isRemoved){
  int ticks=maxTick - inf.getTickLeft(this);
  if (ticks < 10)   return false;
  if (isRemoved) {
    int strengh=getStrengh(inf);
    System.out.println("String_Node_Str" + strengh);
    if (!world.isRemote) {
      world.spawnEntityInWorld(new EntityBulletGauss(world,player,Math.max(5,strengh)));
    }
    double d=0.075, vel=getStrengh(inf) * d;
    Motion3D motion=new Motion3D(player,true);
    player.addVelocity(-motion.motionX * d * strengh,-motion.motionY * d * strengh,-motion.motionZ * d * strengh);
    world.playSoundAtEntity(player,SND_SHOOT_PATH,0.5F,1.0F);
  }
 else {
    player.attackEntityFrom(DamageSource.causePlayerDamage(player),getStrengh(inf) * 0.4F);
  }
  return true;
}

Fixed version (ground truth):
public boolean onActionEnd(World world,EntityPlayer player,InfWeapon inf,boolean isRemoved){
  int ticks=maxTick - inf.getTickLeft(this);
  if (ticks < 10)   return false;
  if (isRemoved) {
    int strengh=getStrengh(inf);
    if (!world.isRemote) {
      world.spawnEntityInWorld(new EntityBulletGauss(world,player,Math.max(5,strengh)));
    }
    double d=0.075, vel=getStrengh(inf) * d;
    Motion3D motion=new Motion3D(player,true);
    player.addVelocity(-motion.motionX * d * strengh,-motion.motionY * d * strengh,-motion.motionZ * d * strengh);
    world.playSoundAtEntity(player,SND_SHOOT_PATH,0.5F,1.0F);
  }
 else {
    player.attackEntityFrom(DamageSource.causePlayerDamage(player),getStrengh(inf) * 0.4F);
  }
  return true;
}
Program: 145976
Project: 145976
Buggy source:
private void attackEntityInRange(int ATTACK_RANGE){
  this.currStat=stats.ATTACKING_RANGE;
  System.err.println("String_Node_Str");
  List<EntityLiving> ls=worldObj.getEntitiesWithinAABB(Entity.class,AxisAlignedBB.getBoundingBox(posX - (ATTACK_RANGE),posY - (ATTACK_RANGE / 2),posZ - (ATTACK_RANGE),posX + (ATTACK_RANGE),posY + (ATTACK_RANGE),posZ + (ATTACK_RANGE)).expand(ATTACK_RANGE,ATTACK_RANGE,ATTACK_RANGE));
  for (int i=0; i <= ls.size(); i++) {
    try {
      EntityLivingBase toAttack=ls.get(i);
      if (!toAttack.equals(this))       toAttack.attackEntityFrom(DamageSource.causeMobDamage(this),toAttack.getHealth() - 1.5f);
    }
 catch (    Exception ex) {
      System.err.println("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void attackEntityInRange(int ATTACK_RANGE){
  this.currStat=stats.ATTACKING_RANGE;
  List<EntityLiving> ls=worldObj.getEntitiesWithinAABB(Entity.class,AxisAlignedBB.getBoundingBox(posX - (ATTACK_RANGE),posY - (ATTACK_RANGE / 2),posZ - (ATTACK_RANGE),posX + (ATTACK_RANGE),posY + (ATTACK_RANGE),posZ + (ATTACK_RANGE)).expand(ATTACK_RANGE,ATTACK_RANGE,ATTACK_RANGE));
  for (int i=0; i <= ls.size(); i++) {
    try {
      EntityLivingBase toAttack=ls.get(i);
      if (!toAttack.equals(this))       toAttack.attackEntityFrom(DamageSource.causeMobDamage(this),toAttack.getHealth() - 1.5f);
    }
 catch (    Exception ex) {
    }
  }
}
Program: 145977
Project: 145977
Buggy source:
@Override public void preInit(){
  ClientProps.loadProps(CBCMod.config);
  LIKeyProcess.addKey("String_Node_Str",ClientProps.KEY_ID_USE_BLOCK,true,new KeyUse());
}

Fixed version (ground truth):
@Override public void preInit(){
  ClientProps.loadProps(CBCMod.config);
  LIKeyProcess.addKey("String_Node_Str",ClientProps.KEY_ID_USE_BLOCK,false,new KeyUse());
}
Program: 145979
Project: 145979
Buggy source:
@Override public ItemStack getCraftingResult(InventoryCrafting inv){
  int cntRep=0;
  ItemStack theItem=null;
  for (int i=0; i < inv.getSizeInventory(); i++) {
    ItemStack s=inv.getStackInSlot(i);
    if (s != null) {
      if (s.getItem() == itemToRepair) {
        if (theItem != null) {
          return null;
        }
        theItem=s;
      }
 else       if (s.getItem() == repairMat.getItem())       ++cntRep;
    }
  }
  if (theItem == null) {
    return null;
  }
  int damage=theItem.getItemDamage();
  damage-=cntRep * amt;
  if (damage < 0)   damage=0;
  return new ItemStack(itemToRepair,1,damage);
}

Fixed version (ground truth):
@Override public ItemStack getCraftingResult(InventoryCrafting inv){
  int cntRep=0;
  ItemStack theItem=null;
  for (int i=0; i < inv.getSizeInventory(); i++) {
    ItemStack s=inv.getStackInSlot(i);
    if (s != null) {
      if (s.getItem() == itemToRepair) {
        if (theItem != null) {
          return null;
        }
        theItem=s;
      }
 else       if (s.getItem() == repairMat.getItem()) {
        ++cntRep;
      }
    }
  }
  if (theItem == null) {
    return null;
  }
  int damage=theItem.getItemDamage();
  damage-=cntRep * amt;
  if (damage < 0)   damage=0;
  return new ItemStack(itemToRepair,1,damage);
}
Program: 145980
Project: 145980
Buggy source:
@Override public boolean matches(InventoryCrafting inv,World world){
  boolean b1=false, b2=false;
  for (int i=0; i < inv.getSizeInventory(); i++) {
    ItemStack s=inv.getStackInSlot(i);
    if (s != null) {
      if (s.getItem() == itemToRepair) {
        b1=true;
      }
 else       if (s.getItem() == repairMat.getItem()) {
        b2=true;
      }
    }
  }
  return b1 && b2;
}

Fixed version (ground truth):
@Override public boolean matches(InventoryCrafting inv,World world){
  boolean b1=false, b2=false;
  for (int i=0; i < inv.getSizeInventory(); i++) {
    ItemStack s=inv.getStackInSlot(i);
    if (s != null) {
      if (s.getItem() == itemToRepair) {
        if (b1)         return false;
        if (s.getItemDamage() > 0)         b1=true;
      }
 else       if (s.getItem() == repairMat.getItem()) {
        b2=true;
      }
    }
  }
  return b1 && b2;
}
Program: 145981
Project: 145981
Buggy source:
@Override public void onBlockUse(World world,EntityPlayer player,int bx,int by,int bz){
  TileEntity te=world.getTileEntity(bx,by,bz);
  if (te == null)   return;
  TileHealthCharger te2=(TileHealthCharger)te;
  String path=te2.currentEnergy > 0 ? "String_Node_Str" : "String_Node_Str";
  world.playSoundAtEntity(player,path,0.5F,1.0F);
  UsingUtils.setBlockInUse(player,bx,by,bz);
  if (te2.currentEnergy > 0)   te2.startUsing(player);
}

Fixed version (ground truth):
@Override public void onBlockUse(World world,EntityPlayer player,int bx,int by,int bz){
  System.out.println("String_Node_Str");
  TileEntity te=world.getTileEntity(bx,by,bz);
  if (te == null)   return;
  TileHealthCharger te2=(TileHealthCharger)te;
  if (te2.canUse()) {
    te2.startUsing(player);
    UsingUtils.setBlockInUse(player,bx,by,bz);
  }
 else {
    world.playSoundAtEntity(player,"String_Node_Str",0.5F,1.0F);
  }
}
Program: 145982
Project: 145982
Buggy source:
public void startUsing(EntityPlayer player){
  chargers.add(player);
  isUsing=true;
}

Fixed version (ground truth):
public void startUsing(EntityPlayer player){
  chargers.add(player);
  worldObj.playSoundAtEntity(player,"String_Node_Str",0.5F,1.0F);
  lastActivationTick=ticksExisted;
  isUsing=true;
}
Program: 145984
Project: 145984
Buggy source:
public void stopUsing(EntityPlayer player){
  chargers.remove(player);
  if (chargers.size() == 0)   isUsing=false;
}

Fixed version (ground truth):
public void stopUsing(EntityPlayer player){
  chargers.remove(player);
  lastActivationTick=ticksExisted;
  if (ticksExisted - lastActivationTick > 20)   worldObj.playSoundAtEntity(player,"String_Node_Str",0.5F,1.0F);
  if (chargers.size() == 0)   isUsing=false;
}
Program: 145985
Project: 145985
Buggy source:
public Weapon_9mmAR_Raw(){
  super(CBCItems.ammo_9mm2);
  setIAndU("String_Node_Str");
  setCreativeTab(CBCMod.cct);
  setMaxDamage(50);
  actionShoot=new ActionAutomaticShoot(300,4,3,"String_Node_Str");
  actionReload=new ActionReload(60,"String_Node_Str","String_Node_Str");
  actionJam=new ActionJam(20,"String_Node_Str");
}

Fixed version (ground truth):
public Weapon_9mmAR_Raw(){
  super(CBCItems.ammo_9mm2);
  setIAndU("String_Node_Str");
  setCreativeTab(CBCMod.cct);
  setMaxDamage(50);
  actionShoot=new ActionAutomaticShoot(300,4,3,"String_Node_Str");
  actionReload=new ActionReload(50,"String_Node_Str","String_Node_Str");
  actionJam=new ActionJam(20,"String_Node_Str");
  actionUplift=new ActionUplift();
}
Program: 145987
Project: 145987
Buggy source:
@Override public void renderTileEntityAt(TileEntity tileentity,double d0,double d1,double d2,float f){
  TileEntityXenAmethyst amethyst=(TileEntityXenAmethyst)tileentity;
  GL11.glPushMatrix();
  if (amethyst.ticksSinceLastAtack < 10) {
    renderElectro(amethyst,Tessellator.instance,d0,d1,d2);
  }
  super.renderTileEntityAt(tileentity,d0,d1,d2,f);
  GL11.glPopMatrix();
}

Fixed version (ground truth):
@Override public void renderTileEntityAt(TileEntity tileentity,double d0,double d1,double d2,float f){
  TileEntityXenAmethyst amethyst=(TileEntityXenAmethyst)tileentity;
  GL11.glPushMatrix();
{
    if (amethyst.ticksSinceLastAtack < 10) {
      renderElectro(amethyst,Tessellator.instance,d0,d1,d2);
    }
    GL11.glPushMatrix();
{
      super.renderTileEntityAt(tileentity,d0,d1,d2,f);
    }
    GL11.glPopMatrix();
  }
  GL11.glPopMatrix();
}
Program: 145988
Project: 145988
Buggy source:
private void renderElectro(TileEntityXenAmethyst ent,Tessellator t,double x,double y,double z){
  double dx=ent.lastxCoord, dy=ent.lastyCoord, dz=ent.lastzCoord;
  double tx=0.0, ty=0.4, tz=0.0;
  GL11.glPushMatrix();
  GL11.glDisable(GL11.GL_CULL_FACE);
  GL11.glDisable(GL11.GL_LIGHTING);
  GL11.glEnable(GL11.GL_BLEND);
  GL11.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
  RenderUtils.loadTexture(ClientProps.VORTIGAUNT_RAY_PATH[RNG.nextInt(3)]);
  Vec3 v1=RenderUtils.newV3(tx - WIDTH,ty,tz), v2=RenderUtils.newV3(tx + WIDTH,ty,tz), v3=RenderUtils.newV3(tx,ty - WIDTH,tz), v4=RenderUtils.newV3(tx,ty + WIDTH,tz);
  double d=Math.sqrt(dx * dx + dy * dy + dz * dz) * 1.3;
  GL11.glTranslated(x,y,z);
  OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit,240f,240f);
  t.startDrawingQuads();
  t.setBrightness(15728880);
  t.setColorRGBA_F(0.663F,0.263F,1.0F,0.65F);
  RenderUtils.addVertex(v1,0,0);
  RenderUtils.addVertex(v2,1,0);
  RenderUtils.addVertex(v2.addVector(dx,dy,dz),1,d);
  RenderUtils.addVertex(v1.addVector(dx,dy,dz),0,d);
  RenderUtils.addVertex(v3,0,0);
  RenderUtils.addVertex(v4,1,0);
  RenderUtils.addVertex(v4.addVector(dx,dy,dz),1,d);
  RenderUtils.addVertex(v3.addVector(dx,dy,dz),0,d);
  t.draw();
  GL11.glEnable(GL11.GL_CULL_FACE);
  GL11.glEnable(GL11.GL_LIGHTING);
  GL11.glDisable(GL11.GL_BLEND);
  GL11.glPopMatrix();
}

Fixed version (ground truth):
private void renderElectro(TileEntityXenAmethyst ent,Tessellator t,double x,double y,double z){
  double dx=ent.lastxCoord, dy=ent.lastyCoord, dz=ent.lastzCoord;
  double tx=0.0, ty=0.4, tz=0.0;
  GL11.glPushMatrix();
{
    GL11.glDisable(GL11.GL_CULL_FACE);
    GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glEnable(GL11.GL_BLEND);
    GL11.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
    RenderUtils.loadTexture(ClientProps.VORTIGAUNT_RAY_PATH[RNG.nextInt(3)]);
    Vec3 v1=RenderUtils.newV3(tx - WIDTH,ty,tz), v2=RenderUtils.newV3(tx + WIDTH,ty,tz), v3=RenderUtils.newV3(tx,ty - WIDTH,tz), v4=RenderUtils.newV3(tx,ty + WIDTH,tz);
    double d=Math.sqrt(dx * dx + dy * dy + dz * dz) * 1.3;
    GL11.glTranslated(x + 0.5,y + 0.1,z + 0.5);
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit,240f,240f);
    t.startDrawingQuads();
    t.setBrightness(15728880);
    t.setColorRGBA_F(0.663F,0.263F,1.0F,0.65F);
    RenderUtils.addVertex(v1,0,0);
    RenderUtils.addVertex(v2,1,0);
    RenderUtils.addVertex(v2.addVector(dx,dy,dz),1,d);
    RenderUtils.addVertex(v1.addVector(dx,dy,dz),0,d);
    RenderUtils.addVertex(v3,0,0);
    RenderUtils.addVertex(v4,1,0);
    RenderUtils.addVertex(v4.addVector(dx,dy,dz),1,d);
    RenderUtils.addVertex(v3.addVector(dx,dy,dz),0,d);
    t.draw();
    GL11.glEnable(GL11.GL_CULL_FACE);
    GL11.glEnable(GL11.GL_LIGHTING);
    GL11.glDisable(GL11.GL_BLEND);
  }
  GL11.glPopMatrix();
}
Program: 145989
Project: 145989
Buggy source:
/** 
 * @param mo
 */
public RenderTileXenAmethyst(){
  super(new ModelXenAmethyst(),ClientProps.AMETHYST_PATH);
}

Fixed version (ground truth):
/** 
 * @param mo
 */
public RenderTileXenAmethyst(){
  super(new ModelXenAmethyst(),ClientProps.AMETHYST_PATH);
  this.reverse=false;
}
Program: 145990
Project: 145990
Buggy source:
@Override public void init(){
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityXenPortal.class,new RenderXenPortal());
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityXenLight.class,new RenderTileEntityModel(new ModelXenLight(),ClientProps.XENLIGHT_PATH).setReverse(true));
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityXenAmethyst.class,new RenderTileEntityModel(new ModelXenAmethyst(),ClientProps.AMETHYST_PATH));
  RenderingRegistry.registerEntityRenderingHandler(EntityXenPortalFX.class,new RenderXenPortalFX());
  MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(XenBlocks.xenPortal),new RenderItemPortal());
}

Fixed version (ground truth):
@Override public void init(){
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityXenPortal.class,new RenderXenPortal());
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityXenLight.class,new RenderTileEntityModel(new ModelXenLight(),ClientProps.XENLIGHT_PATH).setReverse(true));
  ClientRegistry.bindTileEntitySpecialRenderer(TileEntityXenAmethyst.class,new RenderTileXenAmethyst());
  RenderingRegistry.registerEntityRenderingHandler(EntityXenPortalFX.class,new RenderXenPortalFX());
  MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(XenBlocks.xenPortal),new RenderItemPortal());
}
Program: 145991
Project: 145991
Buggy source:
/** 
 * Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count ticks and creates a new spawn inside its implementation.
 */
@Override public void updateEntity(){
  if (++ticksSinceLastAtack > 40) {
    Entity e=MobHelper.getNearestTargetWithinAABB(worldObj,xCoord + 0.5,yCoord - 3.0,zCoord + 0.5,5.0F,GenericUtils.selectorLiving);
    if (e != null) {
      ticksSinceLastAtack=0;
      e.attackEntityFrom(DamageSource.generic,2);
      lastxCoord=e.posX - xCoord - 0.5;
      lastyCoord=e.posY + e.height - yCoord - 0.5;
      lastzCoord=e.posZ - zCoord - 0.5;
    }
  }
}

Fixed version (ground truth):
/** 
 * Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count ticks and creates a new spawn inside its implementation.
 */
@Override public void updateEntity(){
  if (++ticksSinceLastAtack > 40) {
    Entity e=MobHelper.getNearestTargetWithinAABB(worldObj,xCoord + 0.5,yCoord - 3.0,zCoord + 0.5,5.0F,GenericUtils.selectorLiving);
    if (e != null) {
      ticksSinceLastAtack=0;
      e.attackEntityFrom(DamageSource.generic,2);
      lastxCoord=e.posX - xCoord - 0.5;
      lastyCoord=e.posY + e.height * 0.5 - yCoord - 0.1;
      lastzCoord=e.posZ - zCoord - 0.5;
    }
  }
}
Program: 145992
Project: 145992
Buggy source:
public static void loadProps(Configuration config){
  LIGeneralRegistry.loadConfigurableClass(CBCMod.config,ClientProps.class);
  MDL_GONARCH=AdvancedModelLoader.loadModel(new ResourceLocation("String_Node_Str"));
  crosshairProps=new Properties();
  URL src=ClientProps.class.getResource("String_Node_Str");
  sprayProps=new Properties();
  URL src2=ClientProps.class.getResource("String_Node_Str");
  InputStream stream=null;
  try {
    stream=src.openStream();
    crosshairProps.load(new InputStreamReader(stream,Charsets.UTF_8));
    CBCMod.log.log(Level.FINE,"String_Node_Str" + src);
  }
 catch (  Exception e) {
    CBCMod.log.log(Level.SEVERE,"String_Node_Str" + src);
  }
 finally {
    try {
      if (stream != null)       stream.close();
    }
 catch (    Exception e) {
    }
  }
  try {
    stream=src2.openStream();
    sprayProps.load(new InputStreamReader(stream,Charsets.UTF_8));
    CBCMod.log.log(Level.FINE,"String_Node_Str" + src2);
  }
 catch (  Exception e) {
    CBCMod.log.log(Level.SEVERE,"String_Node_Str" + src2);
  }
 finally {
    try {
      if (stream != null)       stream.close();
    }
 catch (    Exception e) {
    }
  }
}

Fixed version (ground truth):
public static void loadProps(Configuration config){
  LIGeneralRegistry.loadConfigurableClass(CBCMod.config,ClientProps.class);
  LIKeyBinding proc=LIKeyProcess.getBindingByName(WMClientProxy.KEY_ID_RELOAD);
  MDL_GONARCH=AdvancedModelLoader.loadModel(new ResourceLocation("String_Node_Str"));
  crosshairProps=new Properties();
  URL src=ClientProps.class.getResource("String_Node_Str");
  sprayProps=new Properties();
  URL src2=ClientProps.class.getResource("String_Node_Str");
  InputStream stream=null;
  try {
    stream=src.openStream();
    crosshairProps.load(new InputStreamReader(stream,Charsets.UTF_8));
    CBCMod.log.log(Level.FINE,"String_Node_Str" + src);
  }
 catch (  Exception e) {
    CBCMod.log.log(Level.SEVERE,"String_Node_Str" + src);
  }
 finally {
    try {
      if (stream != null)       stream.close();
    }
 catch (    Exception e) {
    }
  }
  try {
    stream=src2.openStream();
    sprayProps.load(new InputStreamReader(stream,Charsets.UTF_8));
    CBCMod.log.log(Level.FINE,"String_Node_Str" + src2);
  }
 catch (  Exception e) {
    CBCMod.log.log(Level.SEVERE,"String_Node_Str" + src2);
  }
 finally {
    try {
      if (stream != null)       stream.close();
    }
 catch (    Exception e) {
    }
  }
}
Program: 145993
Project: 145993
Buggy source:
@Override protected float getModelAttribute(ItemStack item,EntityLivingBase entity){
  if (entity instanceof EntityPlayer) {
    EntityPlayer player=(EntityPlayer)entity;
    InfWeapon inf=WMInformation.getInformation(player);
    if (inf != null) {
      if (inf.isActionPresent("String_Node_Str"))       return 0.0F;
      if (InfUtils.getDeltaTick(inf,"String_Node_Str") < 15)       return 1.0F;
    }
    return 2.0F;
  }
  return 2.0F;
}

Fixed version (ground truth):
@Override protected float getModelAttribute(ItemStack item,EntityLivingBase entity){
  if (entity instanceof EntityPlayer) {
    EntityPlayer player=(EntityPlayer)entity;
    InfWeapon inf=WMInformation.instance.getInformation(player);
    if (inf != null) {
      if (inf.isActionPresent("String_Node_Str"))       return 0.0F;
      if (InfUtils.getDeltaTick(inf,"String_Node_Str") < 15)       return 1.0F;
    }
    return 2.0F;
  }
  return 2.0F;
}
Program: 145994
Project: 145994
Buggy source:
@Override public void renderEquipped(ItemStack item,RenderBlocks render,EntityLivingBase entity,ItemRenderType type){
  super.renderEquipped(item,render,entity,type);
  if (entity instanceof EntityPlayer) {
    EntityPlayer player=(EntityPlayer)entity;
    if (player.getCurrentEquippedItem() == item && ItemControlHandler.getUsingTicks(player,0) > 0) {
      GL11.glColor4f(1.0F,1.0F,1.0F,0.5F);
      RendererBulletWeapon.renderMuzzleflashIn2d(Tessellator.instance,ClientProps.EGON_MUZZLE,0.0F,-0.12F,-0.2F);
    }
  }
}

Fixed version (ground truth):
@Override public void renderEquipped(ItemStack item,RenderBlocks render,EntityLivingBase entity,ItemRenderType type){
  super.renderEquipped(item,render,entity,type);
  if (entity instanceof EntityPlayer) {
    EntityPlayer player=(EntityPlayer)entity;
    if (player.getCurrentEquippedItem() == item) {
      InfWeapon inf=WMInformation.instance.getInformation(player);
      GL11.glColor4f(1.0F,1.0F,1.0F,0.5F);
      if (inf.isActionPresent("String_Node_Str"))       RendererBulletWeapon.renderMuzzleflashIn2d(Tessellator.instance,ClientProps.EGON_MUZZLE,0.0F,-0.12F,-0.2F);
    }
  }
}
Program: 145995
Project: 145995
Buggy source:
@Override public void onUpdate(){
  if (worldObj.isRemote && !isClient && draw) {
    if (this.getDistanceSqToEntity(thrower) < 4.5)     draw=false;
    return;
  }
  if (thrower == null)   return;
  ItemStack stack=thrower.getCurrentEquippedItem();
  if (stack == null || stack.getItem() != DMItems.weapon_egon)   return;
  InfWeapon inf=WMInformation.getInformation(thrower);
  Weapon_Egon egon=(Weapon_Egon)DMItems.weapon_egon;
  if (inf == null || !(thrower.getCurrentEquippedItem() != null && thrower.getCurrentEquippedItem().getItem() == DMItems.weapon_egon && ItemControlHandler.getUsingTicks(thrower,0) > 0 && egon.canShoot(thrower,stack))) {
    this.setDead();
    return;
  }
  EntityPlayer ent=thrower;
  this.setLocationAndAngles(ent.posX,ent.posY + ent.getEyeHeight(),ent.posZ,ent.rotationYaw,ent.rotationPitch);
  float var3=0.4F;
  this.motionX=-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI) * var3;
  this.motionZ=MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI) * var3;
  this.motionY=-MathHelper.sin((this.rotationPitch) / 180.0F * (float)Math.PI) * var3;
}

Fixed version (ground truth):
@Override public void onUpdate(){
  if (worldObj.isRemote && !isClient && draw) {
    if (this.getDistanceSqToEntity(thrower) < 4.5)     draw=false;
    return;
  }
  if (thrower == null)   return;
  ItemStack stack=thrower.getCurrentEquippedItem();
  if (stack == null || stack.getItem() != DMItems.weapon_egon)   return;
  InfWeapon inf=WMInformation.instance.getInformation(thrower);
  Weapon_Egon egon=(Weapon_Egon)DMItems.weapon_egon;
  if (inf == null || !(thrower.getCurrentEquippedItem() != null && thrower.getCurrentEquippedItem().getItem() == DMItems.weapon_egon && ItemControlHandler.getUsingTicks(thrower,0) > 0 && egon.canShoot(thrower,stack))) {
    this.setDead();
    return;
  }
  EntityPlayer ent=thrower;
  this.setLocationAndAngles(ent.posX,ent.posY + ent.getEyeHeight(),ent.posZ,ent.rotationYaw,ent.rotationPitch);
  float var3=0.4F;
  this.motionX=-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI) * var3;
  this.motionZ=MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI) * var3;
  this.motionY=-MathHelper.sin((this.rotationPitch) / 180.0F * (float)Math.PI) * var3;
}
Program: 145996
Project: 145996
Buggy source:
@Override public void onItemRelease(World world,EntityPlayer pl,ItemStack stack,int keyid){
  InfWeapon inf=loadInformation(stack,pl);
switch (keyid) {
case 0:
    inf.removeAction(actionShoot.name);
  break;
default :
break;
}
}

Fixed version (ground truth):
@Override public void onItemRelease(World world,EntityPlayer pl,ItemStack stack,int keyid){
  InfWeapon inf=loadInformation(stack,pl);
switch (keyid) {
case 0:
    inf.removeAction(actionShoot.name);
  inf.removeAction(actionJam.name);
break;
default :
break;
}
}
Program: 145997
Project: 145997
Buggy source:
public Weapon_RPG_Raw(){
  super(CBCItems.ammo_rpg);
  setIAndU("String_Node_Str");
  setCreativeTab(CBCMod.cct);
  this.hasSubtypes=true;
  actionReload=new ActionReload(40,"String_Node_Str","String_Node_Str");
  actionJam=new ActionJam(40,"String_Node_Str");
  actionShoot=new ActionRocketShoot();
}

Fixed version (ground truth):
public Weapon_RPG_Raw(){
  super(CBCItems.ammo_rpg);
  setIAndU("String_Node_Str");
  setCreativeTab(CBCMod.cct);
  this.hasSubtypes=true;
  actionReload=null;
  actionJam=new ActionJam(40,"String_Node_Str");
  actionShoot=new ActionRocketShoot();
}
Program: 145998
Project: 145998
Buggy source:
@Override public void onItemRelease(World world,EntityPlayer pl,ItemStack stack,int keyid){
  super.onItemRelease(world,pl,stack,keyid);
  if (keyid == 1) {
    InfWeapon inf=loadInformation(pl);
    inf.executeAction(actionDoubleBolt);
  }
}

Fixed version (ground truth):
@Override public void onItemRelease(World world,EntityPlayer pl,ItemStack stack,int keyid){
  super.onItemRelease(world,pl,stack,keyid);
  if (keyid == 1) {
    InfWeapon inf=loadInformation(pl);
    inf.executeAction(actionDoubleBolt);
    LIKeyProcess.getBindingByName(WMClientProxy.KEY_ID_RELOAD);
  }
}
Program: 145999
Project: 145999
Buggy source:
public Weapon_Shotgun(){
  super(CBCItems.ammo_shotgun);
  setIAndU("String_Node_Str");
  setMaxDamage(8);
  setCreativeTab(CBCMod.cct);
  actionShoot=new ActionBuckshot(2,5,"String_Node_Str").setShootRate(20);
  actionReload=new ActionMultipleReload(15,300).setSound("String_Node_Str");
}

Fixed version (ground truth):
public Weapon_Shotgun(){
  super(CBCItems.ammo_shotgun);
  setIAndU("String_Node_Str");
  setMaxDamage(8);
  setCreativeTab(CBCMod.cct);
  actionShoot=new ActionBuckshot(2,5,"String_Node_Str").setShootRate(20);
  actionReload=new ActionMultipleReload(8,300).setSound("String_Node_Str").setSoundFinish("String_Node_Str");
}
Program: 146000
Project: 146000
Buggy source:
private void handleForeignKey(MetadataRepository repository,ComplexTypeMetadata type,XmlSchemaAnnotationProcessorState state,Element appInfo){
  state.markAsReference();
  String path=appInfo.getTextContent();
  FieldMetadata fieldMetadata=getFieldMetadata(repository,type,appInfo,path);
  state.setReferencedField(fieldMetadata);
  state.setReferencedType(new SoftTypeRef(repository,repository.getUserNamespace(),getTypeName(type,path),true));
}

Fixed version (ground truth):
private void handleForeignKey(MetadataRepository repository,ComplexTypeMetadata type,XmlSchemaAnnotationProcessorState state,Element appInfo){
  state.markAsReference();
  String path=appInfo.getTextContent();
  FieldMetadata fieldMetadata=getFieldMetadata(repository,type,appInfo,path,false);
  state.setReferencedField(fieldMetadata);
  state.setReferencedType(new SoftTypeRef(repository,repository.getUserNamespace(),getTypeName(type,path),true));
}
Program: 146001
Project: 146001
Buggy source:
private static FieldMetadata getFieldMetadata(MetadataRepository repository,ComplexTypeMetadata type,Element appInfo,String path){
  String typeName=getTypeName(type,path);
  String fieldPath=StringUtils.substringAfter(path,"String_Node_Str").trim();
  FieldMetadata fieldMetadata;
  if (!fieldPath.isEmpty() && (repository.getComplexType(typeName) == null || repository.getComplexType(typeName).getKeyFields().size() <= 1)) {
    fieldMetadata=new SoftFieldRef(repository,fieldPath,typeName);
  }
 else {
    fieldMetadata=new SoftIdFieldRef(repository,typeName);
  }
  fieldMetadata.setData(MetadataRepository.XSD_LINE_NUMBER,XSDParser.getStartLine(appInfo));
  fieldMetadata.setData(MetadataRepository.XSD_COLUMN_NUMBER,XSDParser.getStartColumn(appInfo));
  fieldMetadata.setData(MetadataRepository.XSD_DOM_ELEMENT,appInfo);
  return fieldMetadata;
}

Fixed version (ground truth):
private static FieldMetadata getFieldMetadata(MetadataRepository repository,ComplexTypeMetadata type,Element appInfo,String path,boolean isFKInfo){
  String typeName=getTypeName(type,path);
  String fieldPath=StringUtils.substringAfter(path,"String_Node_Str").trim();
  FieldMetadata fieldMetadata;
  if (!fieldPath.isEmpty() && isFKInfo) {
    fieldMetadata=new SoftFieldRef(repository,fieldPath,typeName);
  }
 else {
    if (!fieldPath.isEmpty() && (repository.getComplexType(typeName) == null || repository.getComplexType(typeName).getKeyFields().size() == 1)) {
      fieldMetadata=new SoftFieldRef(repository,fieldPath,typeName);
    }
 else {
      fieldMetadata=new SoftIdFieldRef(repository,typeName);
    }
  }
  fieldMetadata.setData(MetadataRepository.XSD_LINE_NUMBER,XSDParser.getStartLine(appInfo));
  fieldMetadata.setData(MetadataRepository.XSD_COLUMN_NUMBER,XSDParser.getStartColumn(appInfo));
  fieldMetadata.setData(MetadataRepository.XSD_DOM_ELEMENT,appInfo);
  return fieldMetadata;
}
Program: 146002
Project: 146002
Buggy source:
private void handleForeignKeyInfo(MetadataRepository repository,XmlSchemaAnnotationProcessorState state,Element appInfo){
  String path=appInfo.getTextContent();
  FieldMetadata fieldMetadata=getFieldMetadata(repository,(ComplexTypeMetadata)state.getReferencedType(),appInfo,path);
  state.setForeignKeyInfo(fieldMetadata);
}

Fixed version (ground truth):
private void handleForeignKeyInfo(MetadataRepository repository,XmlSchemaAnnotationProcessorState state,Element appInfo){
  String path=appInfo.getTextContent();
  FieldMetadata fieldMetadata=getFieldMetadata(repository,(ComplexTypeMetadata)state.getReferencedType(),appInfo,path,true);
  state.setForeignKeyInfo(fieldMetadata);
}
Program: 146004
Project: 146004
Buggy source:
@Override public ValidationRule createValidationRule(){
  return ValidationFactory.getRule(this);
}

Fixed version (ground truth):
@Override public ValidationRule createValidationRule(){
  List<ValidationRule> rules=new LinkedList<ValidationRule>();
  rules.add(ValidationFactory.getRule(this));
  Collection<FieldMetadata> fields=fieldType.getFields();
  for (  FieldMetadata field : fields) {
    rules.add(ValidationFactory.getRule(field));
  }
  return new CompositeValidationRule(rules.toArray(new ValidationRule[rules.size()]));
}
Program: 146005
Project: 146005
Buggy source:
CompositeValidationRule(ValidationRule... rules){
  this.rules=rules;
}

Fixed version (ground truth):
public CompositeValidationRule(ValidationRule... rules){
  this.rules=rules;
}
Program: 146007
Project: 146007
Buggy source:
@Override public void error(FieldMetadata field,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  if (error == ValidationError.TYPE_DOES_NOT_EXIST) {
    if (lineNumber < 0) {
      handler.error(fieldMetadata,message,xmlElement,line,column,error);
    }
 else {
      handler.error(fieldMetadata,message,element,lineNumber,columnNumber,error);
    }
  }
 else {
    handler.error(field,message,xmlElement,line,column,error);
  }
}

Fixed version (ground truth):
@Override public void error(FieldMetadata field,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  if (error == ValidationError.TYPE_DOES_NOT_EXIST || error == ValidationError.TYPE_DOES_NOT_OWN_FIELD) {
    if (lineNumber < 0) {
      handler.error(fieldMetadata,message,xmlElement,line,column,error);
    }
 else {
      handler.error(fieldMetadata,message,element,lineNumber,columnNumber,error);
    }
  }
 else {
    handler.error(field,message,xmlElement,line,column,error);
  }
}
Program: 146008
Project: 146008
Buggy source:
@Override public FieldMetadata freeze(ValidationHandler handler){
  if (frozenField != null) {
    return frozenField;
  }
  ComplexTypeMetadata type;
  if (containingType != null) {
    type=repository.getComplexType(containingType.getName());
  }
 else {
    type=(ComplexTypeMetadata)containingField.getType();
  }
  if (type == null) {
    Integer line=this.getData(MetadataRepository.XSD_LINE_NUMBER);
    Integer column=this.getData(MetadataRepository.XSD_COLUMN_NUMBER);
    Element xmlElement=this.getData(MetadataRepository.XSD_DOM_ELEMENT);
    handler.error(this,this.getContainingType().getName() + "String_Node_Str" + this.getName()+ "String_Node_Str",xmlElement,line,column,ValidationError.TYPE_DOES_NOT_EXIST);
    return null;
  }
  frozenField=type.getField(fieldName);
  Set<Map.Entry<String,Object>> data=additionalData.entrySet();
  for (  Map.Entry<String,Object> currentData : data) {
    frozenField.setData(currentData.getKey(),currentData.getValue());
  }
  return frozenField;
}

Fixed version (ground truth):
@Override public FieldMetadata freeze(ValidationHandler handler){
  if (frozenField != null) {
    return frozenField;
  }
  ComplexTypeMetadata type;
  if (containingType != null) {
    type=repository.getComplexType(containingType.getName());
  }
 else {
    type=(ComplexTypeMetadata)containingField.getType();
  }
  if (type == null) {
    Integer line=this.getData(MetadataRepository.XSD_LINE_NUMBER);
    Integer column=this.getData(MetadataRepository.XSD_COLUMN_NUMBER);
    Element xmlElement=this.getData(MetadataRepository.XSD_DOM_ELEMENT);
    handler.error(this,this.getContainingType().getName() + "String_Node_Str" + this.getName()+ "String_Node_Str",xmlElement,line,column,ValidationError.TYPE_DOES_NOT_EXIST);
    return null;
  }
  if (!type.hasField(fieldName)) {
    return null;
  }
  frozenField=type.getField(fieldName);
  Set<Map.Entry<String,Object>> data=additionalData.entrySet();
  for (  Map.Entry<String,Object> currentData : data) {
    frozenField.setData(currentData.getKey(),currentData.getValue());
  }
  return frozenField;
}
Program: 146009
Project: 146009
Buggy source:
@Override public FieldMetadata freeze(ValidationHandler handler){
  if (frozenField != null) {
    return frozenField;
  }
  ComplexTypeMetadata type=(ComplexTypeMetadata)repository.getType(typeName);
  if (type == null) {
    type=(ComplexTypeMetadata)repository.getNonInstantiableType(repository.getUserNamespace(),typeName);
  }
  if (type == null) {
    handler.fatal((TypeMetadata)null,"String_Node_Str" + typeName + "String_Node_Str",null,-1,-1,ValidationError.TYPE_DOES_NOT_EXIST);
    return this;
  }
  Collection<FieldMetadata> keyFields=type.getKeyFields();
  if (fieldName == null) {
    if (keyFields.size() == 1) {
      frozenField=keyFields.iterator().next();
    }
 else {
      frozenField=new CompoundFieldMetadata(keyFields.toArray(new FieldMetadata[keyFields.size()]));
    }
  }
 else {
    frozenField=type.getField(fieldName);
  }
  Set<Map.Entry<String,Object>> data=additionalData.entrySet();
  for (  Map.Entry<String,Object> currentData : data) {
    frozenField.setData(currentData.getKey(),currentData.getValue());
  }
  return frozenField;
}

Fixed version (ground truth):
@Override public FieldMetadata freeze(ValidationHandler handler){
  if (frozenField != null) {
    return frozenField;
  }
  ComplexTypeMetadata type=(ComplexTypeMetadata)repository.getType(typeName);
  if (type == null) {
    type=(ComplexTypeMetadata)repository.getNonInstantiableType(repository.getUserNamespace(),typeName);
  }
  if (type == null) {
    handler.fatal((TypeMetadata)null,"String_Node_Str" + typeName + "String_Node_Str",null,-1,-1,ValidationError.TYPE_DOES_NOT_EXIST);
    return this;
  }
  Collection<FieldMetadata> keyFields=type.getKeyFields();
  if (fieldName == null) {
    if (keyFields.size() == 1) {
      frozenField=keyFields.iterator().next();
    }
 else {
      frozenField=new CompoundFieldMetadata(keyFields.toArray(new FieldMetadata[keyFields.size()]));
    }
  }
 else {
    if (!type.hasField(fieldName)) {
      handler.error(this,"String_Node_Str" + typeName + "String_Node_Str"+ fieldName+ "String_Node_Str",type.<Element>getData(MetadataRepository.XSD_DOM_ELEMENT),type.<Integer>getData(MetadataRepository.XSD_LINE_NUMBER),type.<Integer>getData(MetadataRepository.XSD_COLUMN_NUMBER),ValidationError.TYPE_DOES_NOT_OWN_FIELD);
      return this;
    }
    frozenField=type.getField(fieldName);
  }
  Set<Map.Entry<String,Object>> data=additionalData.entrySet();
  for (  Map.Entry<String,Object> currentData : data) {
    frozenField.setData(currentData.getKey(),currentData.getValue());
  }
  return frozenField;
}
Program: 146010
Project: 146010
Buggy source:
@Override public void validate(ValidationHandler handler){
  ComplexTypeMetadata type=(ComplexTypeMetadata)repository.getType(typeName);
  if (type == null) {
    type=(ComplexTypeMetadata)repository.getNonInstantiableType(repository.getUserNamespace(),typeName);
  }
  if (type == null) {
    handler.error(this,"String_Node_Str" + typeName + "String_Node_Str",(Element)additionalData.get(MetadataRepository.XSD_DOM_ELEMENT),(Integer)additionalData.get(MetadataRepository.XSD_LINE_NUMBER),(Integer)additionalData.get(MetadataRepository.XSD_COLUMN_NUMBER),ValidationError.TYPE_DOES_NOT_EXIST);
    return;
  }
  Collection<FieldMetadata> keyFields=type.getKeyFields();
  if (keyFields.isEmpty()) {
    handler.error(type,"String_Node_Str" + typeName + "String_Node_Str",type.<Element>getData(MetadataRepository.XSD_DOM_ELEMENT),type.<Integer>getData(MetadataRepository.XSD_LINE_NUMBER),type.<Integer>getData(MetadataRepository.XSD_COLUMN_NUMBER),ValidationError.TYPE_DOES_NOT_OWN_KEY);
  }
}

Fixed version (ground truth):
@Override public void validate(ValidationHandler handler){
  ComplexTypeMetadata type=(ComplexTypeMetadata)repository.getType(typeName);
  if (type == null) {
    type=(ComplexTypeMetadata)repository.getNonInstantiableType(repository.getUserNamespace(),typeName);
  }
  if (type == null) {
    handler.error(this,"String_Node_Str" + typeName + "String_Node_Str",(Element)additionalData.get(MetadataRepository.XSD_DOM_ELEMENT),(Integer)additionalData.get(MetadataRepository.XSD_LINE_NUMBER),(Integer)additionalData.get(MetadataRepository.XSD_COLUMN_NUMBER),ValidationError.TYPE_DOES_NOT_EXIST);
    return;
  }
  if (fieldName != null && !type.hasField(fieldName)) {
    handler.error(this,"String_Node_Str" + type.getName() + "String_Node_Str"+ fieldName+ "String_Node_Str",(Element)type.getData(MetadataRepository.XSD_DOM_ELEMENT),(Integer)type.getData(MetadataRepository.XSD_LINE_NUMBER),(Integer)type.getData(MetadataRepository.XSD_COLUMN_NUMBER),ValidationError.TYPE_DOES_NOT_OWN_FIELD);
    return;
  }
  Collection<FieldMetadata> keyFields=type.getKeyFields();
  if (keyFields.isEmpty()) {
    handler.error(type,"String_Node_Str" + typeName + "String_Node_Str",type.<Element>getData(MetadataRepository.XSD_DOM_ELEMENT),type.<Integer>getData(MetadataRepository.XSD_LINE_NUMBER),type.<Integer>getData(MetadataRepository.XSD_COLUMN_NUMBER),ValidationError.TYPE_DOES_NOT_OWN_KEY);
  }
}
Program: 146013
Project: 146013
Buggy source:
@Override public void warning(TypeMetadata type,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  LOGGER.warn(message);
}

Fixed version (ground truth):
@Override public void warning(TypeMetadata type,String message,Element element,Integer lineNumber,Integer columnNumber,ValidationError error){
  LOGGER.warn(message);
}
Program: 146014
Project: 146014
Buggy source:
@Override public void error(TypeMetadata type,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  addErrorMessage(message,lineNumber,columnNumber,error);
  errorCount++;
}

Fixed version (ground truth):
@Override public void error(TypeMetadata type,String message,Element element,Integer lineNumber,Integer columnNumber,ValidationError error){
  addErrorMessage(message,lineNumber,columnNumber,error);
  errorCount++;
}
Program: 146015
Project: 146015
Buggy source:
@Override public void fatal(TypeMetadata type,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  throw new RuntimeException(message);
}

Fixed version (ground truth):
@Override public void fatal(TypeMetadata type,String message,Element element,Integer lineNumber,Integer columnNumber,ValidationError error){
  throw new RuntimeException(message);
}
Program: 146016
Project: 146016
Buggy source:
public void warning(FieldMetadata field,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  handler.warning(field,message,xmlElement,line,column,error);
}

Fixed version (ground truth):
public void warning(FieldMetadata field,String message,Element element,Integer lineNumber,Integer columnNumber,ValidationError error){
  handler.warning(field,message,xmlElement,line,column,error);
}
Program: 146017
Project: 146017
Buggy source:
@Override public void error(FieldMetadata field,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  if (error == ValidationError.TYPE_DOES_NOT_EXIST || error == ValidationError.TYPE_DOES_NOT_OWN_FIELD) {
    if (lineNumber < 0) {
      handler.error(fieldMetadata,message,xmlElement,line,column,error);
    }
 else {
      handler.error(fieldMetadata,message,element,lineNumber,columnNumber,error);
    }
  }
 else {
    handler.error(field,message,xmlElement,line,column,error);
  }
}

Fixed version (ground truth):
@Override public void error(FieldMetadata field,String message,Element element,Integer lineNumber,Integer columnNumber,ValidationError error){
  if (error == ValidationError.TYPE_DOES_NOT_EXIST || error == ValidationError.TYPE_DOES_NOT_OWN_FIELD) {
    if (lineNumber < 0) {
      handler.error(fieldMetadata,message,xmlElement,line,column,error);
    }
 else {
      handler.error(fieldMetadata,message,element,lineNumber,columnNumber,error);
    }
  }
 else {
    handler.error(field,message,xmlElement,line,column,error);
  }
}
Program: 146018
Project: 146018
Buggy source:
public void fatal(TypeMetadata type,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  handler.fatal(type,message,xmlElement,line,column,error);
}

Fixed version (ground truth):
public void fatal(TypeMetadata type,String message,Element element,Integer lineNumber,Integer columnNumber,ValidationError error){
  handler.fatal(type,message,xmlElement,line,column,error);
}
Program: 146019
Project: 146019
Buggy source:
@Override public void error(FieldMetadata field,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
}

Fixed version (ground truth):
@Override public void error(FieldMetadata field,String message,Element element,Integer lineNumber,Integer columnNumber,ValidationError error){
}
Program: 146020
Project: 146020
Buggy source:
@Override public void fatal(TypeMetadata type,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
}

Fixed version (ground truth):
@Override public void fatal(TypeMetadata type,String message,Element element,Integer lineNumber,Integer columnNumber,ValidationError error){
}
Program: 146021
Project: 146021
Buggy source:
@Override public void warning(TypeMetadata type,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
}

Fixed version (ground truth):
@Override public void warning(TypeMetadata type,String message,Element element,Integer lineNumber,Integer columnNumber,ValidationError error){
}
Program: 146024
Project: 146024
Buggy source:
void warning(TypeMetadata type,String message,Element element,int lineNumber,int columnNumber,ValidationError error);

Fixed version (ground truth):
void warning(TypeMetadata type,String message,Element element,Integer lineNumber,Integer columnNumber,ValidationError error);
Program: 146025
Project: 146025
Buggy source:
void error(TypeMetadata type,String message,Element element,int lineNumber,int columnNumber,ValidationError error);

Fixed version (ground truth):
void error(TypeMetadata type,String message,Element element,Integer lineNumber,Integer columnNumber,ValidationError error);
Program: 146026
Project: 146026
Buggy source:
void fatal(TypeMetadata type,String message,Element element,int lineNumber,int columnNumber,ValidationError error);

Fixed version (ground truth):
void fatal(TypeMetadata type,String message,Element element,Integer lineNumber,Integer columnNumber,ValidationError error);
Program: 146028
Project: 146028
Buggy source:
@Override public void warning(TypeMetadata type,String message,int lineNumber,int columnNumber,ValidationError error){
  LOGGER.warn(message);
}

Fixed version (ground truth):
@Override public void warning(TypeMetadata type,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  LOGGER.warn(message);
}
Program: 146029
Project: 146029
Buggy source:
@Override public void error(TypeMetadata type,String message,int lineNumber,int columnNumber,ValidationError error){
  addErrorMessage(message,lineNumber,columnNumber,error);
  errorCount++;
}

Fixed version (ground truth):
@Override public void error(TypeMetadata type,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  addErrorMessage(message,lineNumber,columnNumber,error);
  errorCount++;
}
Program: 146030
Project: 146030
Buggy source:
@Override public void fatal(TypeMetadata type,String message,int lineNumber,int columnNumber,ValidationError error){
  throw new RuntimeException(message);
}

Fixed version (ground truth):
@Override public void fatal(TypeMetadata type,String message,Element element,int lineNumber,int columnNumber,ValidationError error){
  throw new RuntimeException(message);
}
Program: 146031
Project: 146031
Buggy source:
/** 
 * Validates the field: performs assertions on content specific to MDM (this method should not raise XSD compliance issues).
 * @param handler A {@link ValidationHandler} to be used for error / warning reporting.
 * @see ValidationHandler#error(FieldMetadata,String,int,int,ValidationError)
 */
void validate(ValidationHandler handler);

Fixed version (ground truth):
/** 
 * Validates the field: performs assertions on content specific to MDM (this method should not raise XSD compliance issues).
 * @param handler A {@link ValidationHandler} to be used for error / warning reporting.
 * @see ValidationHandler#error(FieldMetadata,String,org.w3c.dom.Element,int,int,ValidationError)
 */
void validate(ValidationHandler handler);