nus-yam/ex-repair huggingface dataset:
Program: 34905
Project: 34905
Buggy source:
public void addPlayerInventory(int x,int y){
  for (int inventoryRowIndex=0; inventoryRowIndex < 3; ++inventoryRowIndex)   for (int inventoryColumnIndex=0; inventoryColumnIndex < 9; ++inventoryColumnIndex)   addSlotToContainer(new Slot(inventoryPlayer,9 + inventoryColumnIndex + inventoryRowIndex * 9,x + inventoryColumnIndex * 18,y + inventoryRowIndex * 18));
  for (int hotBarIndex=0; hotBarIndex < 9; ++hotBarIndex)   addSlotToContainer(new Slot(inventoryPlayer,hotBarIndex,8 + hotBarIndex * 18,y + 58));
}

Fixed version (ground truth):
protected void addPlayerInventory(int x,int y){
  if (inventoryPlayer != null) {
    for (int inventoryRowIndex=0; inventoryRowIndex < 3; ++inventoryRowIndex)     for (int inventoryColumnIndex=0; inventoryColumnIndex < 9; ++inventoryColumnIndex)     addSlotToContainer(new Slot(inventoryPlayer,9 + inventoryColumnIndex + inventoryRowIndex * 9,x + inventoryColumnIndex * 18,y + inventoryRowIndex * 18));
    for (int hotBarIndex=0; hotBarIndex < 9; ++hotBarIndex)     addSlotToContainer(new Slot(inventoryPlayer,hotBarIndex,8 + hotBarIndex * 18,y + 58));
  }
}
Program: 34907
Project: 34907
Buggy source:
@Override public ItemStack slotClick(int slotNum,int mouseButton,int modifier,EntityPlayer player){
  if (slotNum < 0 || inventorySlots.size() == 0 || inventorySlots == null)   return super.slotClick(slotNum,mouseButton,modifier,player);
  Slot slot=(Slot)inventorySlots.get(slotNum);
  if (slot instanceof SlotPhantom)   return clickPhantom(slot,mouseButton,player);
  return super.slotClick(slotNum,mouseButton,modifier,player);
}

Fixed version (ground truth):
@Override public ItemStack slotClick(int slotNum,int mouseButton,int modifier,EntityPlayer player){
  if (slotNum < 0 || slotNum >= inventorySlots.size())   return super.slotClick(slotNum,mouseButton,modifier,player);
  Slot slot=(Slot)inventorySlots.get(slotNum);
  if (slot instanceof SlotPhantom)   return ((SlotPhantom)slot).onClick(mouseButton,player);
  return super.slotClick(slotNum,mouseButton,modifier,player);
}
Program: 34908
Project: 34908
Buggy source:
@Override protected void drawGuiContainerForegroundLayer(int x,int y){
  if (drawPlayerInv)   drawString(StatCollector.translateToLocal("String_Node_Str"),5,ySize + 6,textColor);
  String name=Utils.localize(String.format("String_Node_Str",getInventoryName()));
  drawString(name,centerTitle ? getXSize() / 2 - (name.length() * 2) : titleXoffset,titleYoffset,textColor);
  drawForegroundExtra(x,y);
}

Fixed version (ground truth):
@Override protected void drawGuiContainerForegroundLayer(int x,int y){
  if (drawPlayerInv)   drawString(StatCollector.translateToLocal("String_Node_Str"),5,tileGuiYSize + 6,textColor);
  String name=Utils.localize(String.format("String_Node_Str",getInventoryName()));
  drawString(name,centerTitle ? getXSize() / 2 - (name.length() * 2) : titleXoffset,titleYoffset,textColor);
  drawForegroundExtra(x,y);
}
Program: 34909
Project: 34909
Buggy source:
@Override protected void drawGuiContainerBackgroundLayer(float f,int x,int y){
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  bindTexture(texture());
  drawTexturedModalRect(guiLeft,guiTop,0,0,xSize,ySize);
  if (drawPlayerInv) {
    bindTexture(PLAYER_INV_TEXTURE);
    drawTexturedModalRect(guiLeft,guiTop + ySize,0,0,xSizePlayerInv,ySizePlayerInv);
  }
  bindTexture(texture());
  drawBackgroundPreWidgets(f,x,y);
  if (shouldDrawWidgets)   drawWidgets(x,y);
  bindTexture(texture());
  drawBackgroundPostWidgets(f,x,y);
}

Fixed version (ground truth):
@Override protected void drawGuiContainerBackgroundLayer(float f,int x,int y){
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  bindTexture(texture());
  drawTexturedModalRect(guiLeft,guiTop,0,0,xSize,tileGuiYSize);
  if (drawPlayerInv) {
    bindTexture(PLAYER_INV_TEXTURE);
    drawTexturedModalRect(guiLeft,guiTop + tileGuiYSize,0,0,xSizePlayerInv,ySizePlayerInv);
  }
  bindTexture(texture());
  drawBackgroundPreWidgets(f,x,y);
  if (shouldDrawWidgets)   drawWidgets(x,y);
  bindTexture(texture());
  drawBackgroundPostWidgets(f,x,y);
}
Program: 34910
Project: 34910
Buggy source:
public GuiBase(Container container){
  super(container);
  this.texture=texture();
  this.xSize=getXSize();
  this.ySize=getYSize();
}

Fixed version (ground truth):
public GuiBase(Container container){
  super(container);
  texture=texture();
  xSize=getXSize();
  ySize=drawPlayerInv ? getYSize() + ySizePlayerInv : getYSize();
  tileGuiYSize=getYSize();
}
Program: 34911
Project: 34911
Buggy source:
@Override public void initGui(){
  super.initGui();
  if (drawPlayerInv)   this.guiTop=(this.height - (this.ySize + ySizePlayerInv)) / 2;
  initialize();
}

Fixed version (ground truth):
@Override public void initGui(){
  super.initGui();
  if (drawPlayerInv) {
    this.guiTop=(this.height - this.ySize) / 2;
  }
  initialize();
}
Program: 34912
Project: 34912
Buggy source:
@Override public boolean onItemUse(ItemStack stack,EntityPlayer player,World world,int x,int y,int z,int meta,float hitX,float hitY,float hitZ){
  if (world.getTileEntity(x,y,z) instanceof IConfigurableOutput) {
    player.openGui(BuildcraftAdditions.instance,Variables.Gui.MACHINE_CONFIGURATOR,world,x,y,z);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onItemUse(ItemStack stack,EntityPlayer player,World world,int x,int y,int z,int meta,float hitX,float hitY,float hitZ){
  if (world.getTileEntity(x,y,z) instanceof TileBase)   ((TileBase)world.getTileEntity(x,y,z)).sync();
  if (world.getTileEntity(x,y,z) instanceof IConfigurableOutput) {
    player.openGui(BuildcraftAdditions.instance,Variables.Gui.MACHINE_CONFIGURATOR,world,x,y,z);
    return true;
  }
  return false;
}
Program: 34913
Project: 34913
Buggy source:
@Override public IMessage onMessage(MessageConfiguration message,MessageContext ctx){
  TileEntity entity=ctx.getServerHandler().playerEntity.worldObj.getTileEntity(message.x,message.y,message.z);
  if (entity != null && entity instanceof TileKineticEnergyBufferBase) {
    IConfigurableOutput configurableOutput=(IConfigurableOutput)entity;
    configurableOutput.overrideConfiguration(message.configuration);
  }
  return null;
}

Fixed version (ground truth):
@Override public IMessage onMessage(MessageConfiguration message,MessageContext ctx){
  TileEntity entity=ctx.getServerHandler().playerEntity.worldObj.getTileEntity(message.x,message.y,message.z);
  if (entity != null && entity instanceof IConfigurableOutput) {
    IConfigurableOutput configurableOutput=(IConfigurableOutput)entity;
    configurableOutput.overrideConfiguration(message.configuration);
  }
  return null;
}
Program: 34914
Project: 34914
Buggy source:
@Override public void registerRenderers(){
  MinecraftForgeClient.registerItemRenderer(ItemsAndBlocks.ironCanister,new CanisterItemRender(ItemsAndBlocks.ironCanister));
  MinecraftForgeClient.registerItemRenderer(ItemsAndBlocks.goldCanister,new CanisterItemRender(ItemsAndBlocks.goldCanister));
  MinecraftForgeClient.registerItemRenderer(ItemsAndBlocks.diamondCanister,new CanisterItemRender(ItemsAndBlocks.diamondCanister));
  ClientRegistry.bindTileEntitySpecialRenderer(TileBasicDuster.class,new RendererDuster());
  ClientRegistry.bindTileEntitySpecialRenderer(TileSemiAutomaticDuster.class,new RendererDuster());
  ClientRegistry.bindTileEntitySpecialRenderer(TileMechanicalDuster.class,new RendererDuster());
  ClientRegistry.bindTileEntitySpecialRenderer(TileKineticDuster.class,new RendererDusterKinetic());
  ClientRegistry.bindTileEntitySpecialRenderer(TileKEBT2.class,new RendererKEBT2());
}

Fixed version (ground truth):
@Override public void registerRenderers(){
  MinecraftForgeClient.registerItemRenderer(ItemsAndBlocks.ironCanister,new CanisterItemRender(ItemsAndBlocks.ironCanister));
  MinecraftForgeClient.registerItemRenderer(ItemsAndBlocks.goldCanister,new CanisterItemRender(ItemsAndBlocks.goldCanister));
  MinecraftForgeClient.registerItemRenderer(ItemsAndBlocks.diamondCanister,new CanisterItemRender(ItemsAndBlocks.diamondCanister));
  ClientRegistry.bindTileEntitySpecialRenderer(TileBasicDuster.class,new RendererDuster());
  ClientRegistry.bindTileEntitySpecialRenderer(TileSemiAutomaticDuster.class,new RendererDuster());
  ClientRegistry.bindTileEntitySpecialRenderer(TileMechanicalDuster.class,new RendererDuster());
  ClientRegistry.bindTileEntitySpecialRenderer(TileKineticDuster.class,new RendererDusterKinetic());
  ClientRegistry.bindTileEntitySpecialRenderer(TileKEBT2.class,new RendererKEBT2());
  ClientRegistry.bindTileEntitySpecialRenderer(TileKEBT3.class,new RendererKEBT3());
}
Program: 34915
Project: 34915
Buggy source:
@Override public void updateEntity(){
  if (selfDestruct) {
    fuse--;
    if (fuse % 20 == 0)     destroyer.addChatComponentMessage(new ChatComponentText("String_Node_Str" + fuse / 20));
  }
  if (fuse <= 0 && selfDestruct)   byeBye();
  if (sync) {
    if (timer == 0) {
      sync();
      timer=20;
    }
    timer--;
  }
  if (ConfigurationHandler.powerloss)   energy=energy - loss;
  if (energy < 0)   energy=0;
  outputEnergy();
}

Fixed version (ground truth):
@Override public void updateEntity(){
  if (selfDestruct) {
    fuse--;
    if (fuse % 20 == 0)     destroyer.addChatComponentMessage(new ChatComponentText("String_Node_Str" + fuse / 20));
  }
  if (fuse <= 0 && selfDestruct)   byeBye();
  if (timer == 0) {
    sync();
    timer=20;
  }
  timer--;
  if (ConfigurationHandler.powerloss)   energy=energy - loss;
  if (energy < 0)   energy=0;
  outputEnergy();
}
Program: 34916
Project: 34916
Buggy source:
@Override public void formMultiblock(int masterX,int masterY,int masterZ){
  partOfMultiBlock=true;
  this.masterX=masterX;
  this.masterY=masterY;
  this.masterZ=masterZ;
  renderUpdate=true;
}

Fixed version (ground truth):
@Override public void formMultiblock(int masterX,int masterY,int masterZ){
  partOfMultiBlock=true;
  this.masterX=masterX;
  this.masterY=masterY;
  this.masterZ=masterZ;
}
Program: 34917
Project: 34917
Buggy source:
@Override public void updateEntity(){
  if (moved) {
    if (!patern.isPaternValid(worldObj,masterX,masterY,masterZ)) {
      patern.destroyMultiblock(worldObj,masterX,masterY,masterZ);
      patern.destroyMultiblock(worldObj,oldmasterX,oldmasterY,oldmasterZ);
    }
    moved=false;
  }
  if (renderUpdate) {
    sync();
  }
  if (!isMaster || worldObj.isRemote) {
    return;
  }
  super.updateEntity();
  energyState=(energy * 5) / maxEnergy;
  if (energyState != lastEnergyState)   renderUpdate=true;
  lastEnergyState=energyState;
}

Fixed version (ground truth):
@Override public void updateEntity(){
  if (moved) {
    if (!patern.isPaternValid(worldObj,masterX,masterY,masterZ)) {
      patern.destroyMultiblock(worldObj,masterX,masterY,masterZ);
      patern.destroyMultiblock(worldObj,oldmasterX,oldmasterY,oldmasterZ);
    }
    moved=false;
  }
  if (!isMaster || worldObj.isRemote) {
    return;
  }
  super.updateEntity();
  energyState=(energy * 5) / maxEnergy;
}
Program: 34918
Project: 34918
Buggy source:
@Override public void invalidateBlock(){
  partOfMultiBlock=false;
  isMaster=false;
  energy=0;
  for (int teller=0; teller < 6; teller++) {
    configuration[teller]=0;
  }
  energyState=0;
  lastEnergyState=0;
  worldObj.setBlockMetadataWithNotify(xCoord,yCoord,zCoord,0,2);
  worldObj.scheduleBlockUpdate(xCoord,yCoord,zCoord,ItemsAndBlocks.kebT2,80);
  sync();
}

Fixed version (ground truth):
@Override public void invalidateBlock(){
  partOfMultiBlock=false;
  isMaster=false;
  energy=0;
  for (int teller=0; teller < 6; teller++) {
    configuration[teller]=0;
  }
  energyState=0;
  worldObj.setBlockMetadataWithNotify(xCoord,yCoord,zCoord,0,2);
  worldObj.scheduleBlockUpdate(xCoord,yCoord,zCoord,ItemsAndBlocks.kebT2,80);
  sync();
}
Program: 34919
Project: 34919
Buggy source:
@Override public void makeMaster(){
  isMaster=true;
  partOfMultiBlock=true;
}

Fixed version (ground truth):
@Override public void makeMaster(){
  isMaster=true;
  partOfMultiBlock=true;
  sync();
}
Program: 34920
Project: 34920
Buggy source:
@Override public void updateEntity(){
  if (moved) {
    if (!patern.isPaternValid(worldObj,masterX,masterY,masterZ)) {
      patern.destroyMultiblock(worldObj,masterX,masterY,masterZ);
      patern.destroyMultiblock(worldObj,oldmasterX,oldmasterY,oldmasterZ);
    }
    moved=false;
  }
  if (renderUpdate) {
    sync();
    renderUpdate=false;
  }
  if (!isMaster || worldObj.isRemote) {
    return;
  }
  super.updateEntity();
}

Fixed version (ground truth):
@Override public void updateEntity(){
  if (moved) {
    if (!patern.isPaternValid(worldObj,masterX,masterY,masterZ)) {
      patern.destroyMultiblock(worldObj,masterX,masterY,masterZ);
      patern.destroyMultiblock(worldObj,oldmasterX,oldmasterY,oldmasterZ);
    }
    moved=false;
  }
  if (!isMaster || worldObj.isRemote) {
    return;
  }
  super.updateEntity();
  energyState=(int)(((long)energy) * 4) / maxEnergy;
}
Program: 34921
Project: 34921
Buggy source:
@Override public void invalidateBlock(){
  if (isMaster)   worldObj.scheduleBlockUpdate(xCoord,yCoord,zCoord,ItemsAndBlocks.kebT3Core,80);
  partOfMultiBlock=false;
  isMaster=false;
  energy=0;
  for (int teller=0; teller < 6; teller++) {
    configuration[teller]=0;
  }
  energyState=0;
  lastEnergyState=0;
  worldObj.setBlockMetadataWithNotify(xCoord,yCoord,zCoord,0,2);
  sync();
}

Fixed version (ground truth):
@Override public void invalidateBlock(){
  if (isMaster)   worldObj.scheduleBlockUpdate(xCoord,yCoord,zCoord,ItemsAndBlocks.kebT3Core,80);
  partOfMultiBlock=false;
  isMaster=false;
  energy=0;
  for (int teller=0; teller < 6; teller++) {
    configuration[teller]=0;
  }
  energyState=0;
  worldObj.setBlockMetadataWithNotify(xCoord,yCoord,zCoord,0,2);
  sync();
}
Program: 34922
Project: 34922
Buggy source:
private void addMaster(World world,int x,int y,int z,int rotationIndex){
  TileEntity entity=world.getTileEntity(x,y,z);
  if (entity != null && entity instanceof IMultiBlockTile) {
    IMultiBlockTile master=(IMultiBlockTile)entity;
    master.makeMaster(rotationIndex);
    master.sync();
  }
}

Fixed version (ground truth):
protected void addMaster(World world,int x,int y,int z,int rotationIndex){
  TileEntity entity=world.getTileEntity(x,y,z);
  if (entity != null && entity instanceof IMultiBlockTile) {
    IMultiBlockTile master=(IMultiBlockTile)entity;
    master.makeMaster(rotationIndex);
    master.sync();
  }
}
Program: 34923
Project: 34923
Buggy source:
@Override public boolean onBlockActivated(EntityPlayer player){
  if (!worldObj.isRemote)   sync();
  if (!partOfMultiBlock)   return false;
  if (isMaster) {
    player.openGui(BuildcraftAdditions.instance,Variables.GuiKEB,worldObj,xCoord,yCoord,zCoord);
    Logger.info("String_Node_Str" + energy + "String_Node_Str"+ worldObj.isRemote+ "String_Node_Str");
  }
 else {
    if (master == null)     findMaster();
    if (master != null)     master.onBlockActivated(player);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean onBlockActivated(EntityPlayer player){
  if (!worldObj.isRemote)   sync();
  if (!partOfMultiBlock)   return false;
  if (isMaster) {
    player.openGui(BuildcraftAdditions.instance,Variables.GuiKEB,worldObj,xCoord,yCoord,zCoord);
  }
 else {
    if (master == null)     findMaster();
    if (master != null)     master.onBlockActivated(player);
  }
  return true;
}
Program: 34924
Project: 34924
Buggy source:
private static void addDusts(String metalName,int color){
  Item itemDust;
  ArrayList<ItemStack> list;
  list=OreDictionary.getOres("String_Node_Str" + metalName);
  if (list.isEmpty())   return;
  if (ConfigurationHandeler.shouldRegisterDusts) {
    itemDust=new ItemDust(color).setUnlocalizedName("String_Node_Str" + metalName);
    list=OreDictionary.getOres("String_Node_Str" + metalName);
    if (!list.isEmpty())     itemDust.setUnlocalizedName(list.get(0).getUnlocalizedName().substring(5));
    GameRegistry.registerItem(itemDust,"String_Node_Str" + metalName);
    OreDictionary.registerOre("String_Node_Str" + metalName,itemDust);
    GameRegistry.addSmelting(itemDust,OreDictionary.getOres("String_Node_Str" + metalName).get(0),0);
  }
 else {
    ArrayList<ItemStack> tempList=OreDictionary.getOres("String_Node_Str" + metalName);
    if (tempList.isEmpty())     return;
    ItemStack stack=tempList.get(0);
    if (stack == null)     return;
    itemDust=stack.getItem();
  }
  for (  ItemStack stack : list)   DusterRecipes.dusting().addDusterRecipe(stack,new ItemStack(itemDust,2));
  list=OreDictionary.getOres("String_Node_Str" + metalName);
  for (  ItemStack stack : list)   DusterRecipes.dusting().addDusterRecipe(stack,new ItemStack(itemDust,1));
}

Fixed version (ground truth):
private static void addDusts(String metalName,int color){
  Item itemDust;
  ArrayList<ItemStack> list;
  list=OreDictionary.getOres("String_Node_Str" + metalName);
  if (list.isEmpty())   return;
  if (ConfigurationHandeler.shouldRegisterDusts) {
    itemDust=new ItemDust(color).setUnlocalizedName("String_Node_Str" + metalName);
    list=OreDictionary.getOres("String_Node_Str" + metalName);
    if (!list.isEmpty())     itemDust.setUnlocalizedName(list.get(0).getUnlocalizedName().substring(5));
    GameRegistry.registerItem(itemDust,"String_Node_Str" + metalName);
    OreDictionary.registerOre("String_Node_Str" + metalName,itemDust);
    GameRegistry.addSmelting(itemDust,OreDictionary.getOres("String_Node_Str" + metalName).get(0),0);
  }
 else {
    ArrayList<ItemStack> tempList=OreDictionary.getOres("String_Node_Str" + metalName);
    if (tempList.isEmpty())     return;
    ItemStack stack=tempList.get(0);
    if (stack == null)     return;
    itemDust=stack.getItem();
  }
  list=OreDictionary.getOres("String_Node_Str" + metalName);
  for (  ItemStack stack : list)   DusterRecipes.dusting().addDusterRecipe(stack,new ItemStack(itemDust,2));
  list=OreDictionary.getOres("String_Node_Str" + metalName);
  for (  ItemStack stack : list)   DusterRecipes.dusting().addDusterRecipe(stack,new ItemStack(itemDust,1));
}
Program: 34925
Project: 34925
Buggy source:
public ItemStack getDustingResult(ItemStack input){
  ItemStack result=dustingList.get(new ItemData(input)).copy();
  if (result == null)   return null;
  return result.copy();
}

Fixed version (ground truth):
public ItemStack getDustingResult(ItemStack input){
  ItemStack result=dustingList.get(new ItemData(input));
  if (result == null)   return null;
  return result.copy();
}
Program: 34926
Project: 34926
Buggy source:
@Override public void updateEntity(){
  if (worldObj.isRemote)   return;
  if (shouldUpdateCoils) {
    updateCoils();
    shouldUpdateCoils=false;
  }
  if (canCook()) {
    if (!isCooking) {
      for (      TileCoilBase coil : coils) {
        if (coil != null) {
          coil.startHeating();
          if (coil.isBurning()) {
            isCooking=true;
            doBlockUpdate();
          }
        }
      }
    }
    if (progress > 0)     isCooking=true;
    if (progress >= 6500) {
      ItemStack inputStack=getStackInSlot(0);
      ItemStack result=FurnaceRecipes.smelting().getSmeltingResult(inputStack);
      if (getStackInSlot(1) == null) {
        setInventorySlotContents(1,result.copy());
      }
 else {
        getStackInSlot(1).stackSize+=result.stackSize;
      }
      getStackInSlot(0).stackSize--;
      if (getStackInSlot(0).stackSize == 0)       setInventorySlotContents(0,null);
      progress=0;
    }
 else {
      for (      TileCoilBase coil : coils)       if (coil != null) {
        progress+=coil.getIncrement();
      }
    }
  }
 else {
    stop();
  }
  if (sync) {
    if (timer == 0) {
      PacketHandeler.instance.sendToAllAround(new MessageHeatedFurnaceProgress(this),new NetworkRegistry.TargetPoint(worldObj.provider.dimensionId,xCoord,yCoord,zCoord,5));
      timer=15;
    }
    timer--;
  }
}

Fixed version (ground truth):
@Override public void updateEntity(){
  if (worldObj.isRemote)   return;
  if (shouldUpdateCoils) {
    updateCoils();
    shouldUpdateCoils=false;
  }
  if (canCook()) {
    if (!isCooking) {
      for (      TileCoilBase coil : coils) {
        if (coil != null) {
          coil.startHeating();
          if (coil.isBurning()) {
            isCooking=true;
            doBlockUpdate();
          }
        }
      }
    }
    if (progress > 0)     isCooking=true;
    if (progress >= 6500) {
      ItemStack inputStack=getStackInSlot(0);
      ItemStack result=FurnaceRecipes.smelting().getSmeltingResult(inputStack);
      if (getStackInSlot(1) == null) {
        setInventorySlotContents(1,result.copy());
      }
 else {
        getStackInSlot(1).stackSize+=result.stackSize;
      }
      if (getStackInSlot(0).stackSize <= 1)       setInventorySlotContents(0,null);
 else       getStackInSlot(0).stackSize--;
      progress=0;
    }
 else {
      for (      TileCoilBase coil : coils)       if (coil != null) {
        progress+=coil.getIncrement();
      }
    }
  }
 else {
    stop();
  }
  if (sync) {
    if (timer == 0) {
      PacketHandeler.instance.sendToAllAround(new MessageHeatedFurnaceProgress(this),new NetworkRegistry.TargetPoint(worldObj.provider.dimensionId,xCoord,yCoord,zCoord,5));
      timer=15;
    }
    timer--;
  }
}
Program: 34928
Project: 34928
Buggy source:
@Override public void onBlockPlacedBy(World world,int i,int j,int k,EntityLivingBase entityliving,ItemStack stack){
  super.onBlockPlacedBy(world,i,j,k,entityliving,stack);
  ForgeDirection orientation=Utils.get2dOrientation(entityliving);
  world.setBlockMetadataWithNotify(i,j,k,orientation.getOpposite().ordinal(),1);
}

Fixed version (ground truth):
@Override public void onBlockPlacedBy(World world,int i,int j,int k,EntityLivingBase entityliving,ItemStack stack){
  super.onBlockPlacedBy(world,i,j,k,entityliving,stack);
  if (entityliving instanceof EntityPlayer)   Eureka.eurekaBlockEvent(world,this,i,j,k,(EntityPlayer)entityliving);
  ForgeDirection orientation=Utils.get2dOrientation(entityliving);
  world.setBlockMetadataWithNotify(i,j,k,orientation.getOpposite().ordinal(),1);
}
Program: 34929
Project: 34929
Buggy source:
@Override public void updateEntity(){
  if (energy >= 4) {
    if (getStackInSlot(0) != null && getDust(getStackInSlot(0)) != null) {
      progress++;
      energy-=4;
      oldProgressStage=progressStage;
      if (progress > 25)       progressStage=1;
      if (progress > 50)       progressStage=2;
      if (progress > 75)       progressStage=3;
      if (progress >= 100) {
        dust();
        if (player != null)         makeProgress(player);
        progress=0;
        progressStage=0;
      }
    }
 else {
      progress=0;
      progressStage=0;
    }
  }
  if (oldProgressStage != progressStage) {
    TargetPoint point=new TargetPoint(worldObj.provider.dimensionId,xCoord,yCoord,zCoord,30);
    PacketHandeler.instance.sendToAllAround(new MessageMechanicDuster(xCoord,yCoord,zCoord,progressStage,getStackInSlot(0)),point);
  }
}

Fixed version (ground truth):
@Override public void updateEntity(){
  if (energy >= 4) {
    if (getStackInSlot(0) != null && getDust(getStackInSlot(0)) != null) {
      progress++;
      energy-=4;
      oldProgressStage=progressStage;
      if (progress > 25)       progressStage=1;
      if (progress > 50)       progressStage=2;
      if (progress > 75)       progressStage=3;
      if (progress >= 100) {
        dust();
        if (player != null)         makeProgress(player,"String_Node_Str");
        progress=0;
        progressStage=0;
      }
    }
 else {
      progress=0;
      progressStage=0;
    }
  }
  if (oldProgressStage != progressStage) {
    TargetPoint point=new TargetPoint(worldObj.provider.dimensionId,xCoord,yCoord,zCoord,30);
    PacketHandeler.instance.sendToAllAround(new MessageMechanicDuster(xCoord,yCoord,zCoord,progressStage,getStackInSlot(0)),point);
  }
}
Program: 34930
Project: 34930
Buggy source:
public TileMechanicalDuster(){
  super(Variables.DustT2Key2);
}

Fixed version (ground truth):
public TileMechanicalDuster(){
  super("String_Node_Str");
}
Program: 34931
Project: 34931
Buggy source:
public static void makeProgress(EntityPlayer player,String key){
  if (player.worldObj.isRemote)   return;
  int progress=getProgress(player,key);
  NBTTagCompound tag=getTag(player);
  if (progress < EurekaRegistry.getMaxValue(key)) {
    setKey(tag,key + "String_Node_Str",progress + EurekaRegistry.getIncrement(key));
  }
  if (progress == 100) {
    if (!isUnlocked(player,key)) {
      setKey(tag,key + "String_Node_Str",true);
      String message=Utils.localize("String_Node_Str" + key + "String_Node_Str");
      player.addChatMessage(new ChatComponentText(Utils.localize("String_Node_Str")));
      player.addChatComponentMessage(new ChatComponentText(message));
    }
  }
}

Fixed version (ground truth):
public static void makeProgress(EntityPlayer player,String key){
  if (player.worldObj.isRemote)   return;
  int progress=getProgress(player,key);
  NBTTagCompound tag=getTag(player);
  if (progress < EurekaRegistry.getMaxValue(key)) {
    setKey(tag,key + "String_Node_Str",progress + EurekaRegistry.getIncrement(key));
  }
  if (progress >= EurekaRegistry.getMaxValue(key)) {
    if (!isUnlocked(player,key)) {
      setKey(tag,key + "String_Node_Str",true);
      String message=Utils.localize("String_Node_Str" + key + "String_Node_Str");
      player.addChatMessage(new ChatComponentText(Utils.localize("String_Node_Str")));
      player.addChatComponentMessage(new ChatComponentText(message));
    }
  }
}
Program: 34932
Project: 34932
Buggy source:
/** 
 * Used to check if the player can use this or not, call the eureka system here for the check or do your own check
 */
boolean isAllowed();

Fixed version (ground truth):
/** 
 * Used to check if the player can use this or not, call the eureka system here for the check or do your own check
 */
boolean isAllowed(EntityPlayer player);
Program: 34933
Project: 34933
Buggy source:
boolean isAllowed();

Fixed version (ground truth):
boolean isAllowed(EntityPlayer player);
Program: 34934
Project: 34934
Buggy source:
@Override public boolean isAllowed(){
  return false;
}

Fixed version (ground truth):
@Override public boolean isAllowed(EntityPlayer player){
  return Eureka.isUnlocked(player,Variables.DustT1Key);
}
Program: 34935
Project: 34935
Buggy source:
@SubscribeEvent public void onPlyerUsesBlock(PlayerInteractEvent event){
  if (event == null)   return;
  Block block=event.world.getBlock(event.x,event.y,event.z);
  if (block instanceof IEurekaBlock) {
    IEurekaBlock eurekaBlock=(IEurekaBlock)block;
    if (!eurekaBlock.isAllowed()) {
      World world=event.world;
      ItemStack[] stackArray=eurekaBlock.getComponents();
      for (      ItemStack stack : stackArray)       Utils.dropItemstack(world,event.x,event.y,event.z,stack);
      if (!world.isRemote)       world.setBlock(event.x,event.y,event.z,Blocks.air);
      world.markBlockForUpdate(event.x,event.y,event.z);
      if (world.isRemote)       event.entityPlayer.addChatComponentMessage(new ChatComponentText(((IEurekaBlock)block).getMessage()));
    }
  }
}

Fixed version (ground truth):
@SubscribeEvent public void onPlyerUsesBlock(PlayerInteractEvent event){
  if (event == null)   return;
  Block block=event.world.getBlock(event.x,event.y,event.z);
  if (block instanceof IEurekaBlock) {
    IEurekaBlock eurekaBlock=(IEurekaBlock)block;
    World world=event.world;
    if (!world.isRemote) {
      if (!eurekaBlock.isAllowed(event.entityPlayer)) {
        ItemStack[] stackArray=eurekaBlock.getComponents();
        for (        ItemStack stack : stackArray)         Utils.dropItemstack(world,event.x,event.y,event.z,stack);
        if (!world.isRemote)         world.setBlock(event.x,event.y,event.z,Blocks.air);
        world.markBlockForUpdate(event.x,event.y,event.z);
        event.entityPlayer.addChatComponentMessage(new ChatComponentText(((IEurekaBlock)block).getMessage()));
      }
    }
  }
}
Program: 34936
Project: 34936
Buggy source:
@SubscribeEvent public void onItemUse(PlayerUseItemEvent event){
  if (event == null)   return;
  Item item=event.item.getItem();
  if (item instanceof IEurekaItem) {
    IEurekaItem eurekaItem=(IEurekaItem)item;
    if (!eurekaItem.isAllowed()) {
      event.setCanceled(true);
      if (event.entityPlayer != null)       event.entityPlayer.addChatComponentMessage(new ChatComponentText(eurekaItem.getMessage()));
    }
  }
}

Fixed version (ground truth):
@SubscribeEvent public void onItemUse(PlayerUseItemEvent event){
  if (event == null)   return;
  Item item=event.item.getItem();
  if (item instanceof IEurekaItem) {
    IEurekaItem eurekaItem=(IEurekaItem)item;
    if (!eurekaItem.isAllowed(event.entityPlayer)) {
      event.setCanceled(true);
      if (event.entityPlayer != null)       event.entityPlayer.addChatComponentMessage(new ChatComponentText(eurekaItem.getMessage()));
    }
  }
}
Program: 34937
Project: 34937
Buggy source:
public void addDusts(String metal){
  ArrayList<ItemStack> list;
  ItemStack dust=null;
  list=OreDictionary.getOres("String_Node_Str" + metal);
  if (list.isEmpty())   return;
  list=OreDictionary.getOres("String_Node_Str" + metal);
  if (list.isEmpty())   return;
  itemDust=new ItemDust(metal);
  GameRegistry.registerItem(itemDust,"String_Node_Str" + metal);
  OreDictionary.registerOre("String_Node_Str" + metal,itemDust);
  GameRegistry.addSmelting(itemDust,OreDictionary.getOres("String_Node_Str" + metal).get(0),0);
  dust=new ItemStack(itemDust);
  dust.stackSize=2;
  for (  ItemStack stack : list)   DusterRecepies.addDusterRecepie(stack,dust);
  list=OreDictionary.getOres("String_Node_Str" + metal);
  for (  ItemStack stack : list)   DusterRecepies.addDusterRecepie(stack,dust);
}

Fixed version (ground truth):
public void addDusts(String metal){
  ArrayList<ItemStack> list;
  ItemStack dust=null;
  list=OreDictionary.getOres("String_Node_Str" + metal);
  if (list.isEmpty())   return;
  list=OreDictionary.getOres("String_Node_Str" + metal);
  if (list.isEmpty())   return;
  itemDust=new ItemDust(metal);
  GameRegistry.registerItem(itemDust,"String_Node_Str" + metal);
  OreDictionary.registerOre("String_Node_Str" + metal,itemDust);
  GameRegistry.addSmelting(itemDust,OreDictionary.getOres("String_Node_Str" + metal).get(0),0);
  dust=new ItemStack(itemDust);
  dust.stackSize=2;
  for (  ItemStack stack : list)   DusterRecepies.addDusterRecepie(stack,dust);
  list=OreDictionary.getOres("String_Node_Str" + metal);
  dust.stackSize=1;
  for (  ItemStack stack : list)   DusterRecepies.addDusterRecepie(stack,dust);
}
Program: 34938
Project: 34938
Buggy source:
/** 
 * This function must be called with the intent Action as configured in the DataWedge Application
 */
public void setDataWedgeIntentAction(string action){
  this.dataWedgeAction=action;
}

Fixed version (ground truth):
/** 
 * This function must be called with the intent Action as configured in the DataWedge Application
 */
public void setDataWedgeIntentAction(String action){
  Log.i(TAG,"String_Node_Str" + action);
  if (action == null || "String_Node_Str".equals(action))   return;
  this.dataWedgeAction=action;
}
Program: 34939
Project: 34939
Buggy source:
public void start(){
  Log.i(TAG,"String_Node_Str");
  if (hasInitialized) {
    return;
  }
synchronized (stateLock) {
    if (hasInitialized) {
      return;
    }
    Log.i(TAG,"String_Node_Str");
    applicationContext.registerReceiver(dataReceiver,new IntentFilter(dataWedgeAction));
    enableScanner(true);
    hasInitialized=true;
  }
}

Fixed version (ground truth):
public void start(){
  Log.i(TAG,"String_Node_Str");
  if (hasInitialized) {
    return;
  }
synchronized (stateLock) {
    if (hasInitialized) {
      return;
    }
    Log.i(TAG,"String_Node_Str" + dataWedgeAction);
    applicationContext.registerReceiver(dataReceiver,new IntentFilter(dataWedgeAction));
    enableScanner(true);
    hasInitialized=true;
  }
}
Program: 34941
Project: 34941
Buggy source:
public String init(ServletContext context){
  dir=Settings.getString("String_Node_Str",dir);
  loaderType=Settings.getString("String_Node_Str",loaderType);
  if (loaderType.equals("String_Node_Str")) {
    dir=context.getRealPath(dir);
  }
  if (map == null) {
    reloadMap();
  }
  return dir;
}

Fixed version (ground truth):
public String init(ServletContext context){
  dir=Settings.getString("String_Node_Str",dir);
  loaderType=Settings.getString("String_Node_Str",loaderType);
  if (loaderType.equals("String_Node_Str")) {
    if (!dir.startsWith("String_Node_Str")) {
      dir="String_Node_Str" + dir;
    }
    dir=context.getRealPath(dir);
  }
  if (map == null) {
    reloadMap();
  }
  return dir;
}
Program: 34943
Project: 34943
Buggy source:
public void init(FilterConfig config) throws ServletException {
  ServletContext context=config.getServletContext();
  Settings.setApplicationAttribute(ServletContext.class.getName(),context);
  Settings.load(context.getResourceAsStream(Settings.DEFAULT_PATH));
  map=new MapJson();
}

Fixed version (ground truth):
public void init(FilterConfig config) throws ServletException {
}
Program: 34944
Project: 34944
Buggy source:
public void doFilter(ServletRequest req,ServletResponse resp,FilterChain chain) throws ServletException, IOException {
  HttpServletRequest request=(HttpServletRequest)req;
  HttpServletResponse response=(HttpServletResponse)resp;
  if (handleRewrite(request,response)) {
    return;
  }
 else   if (handlePreview(request,response)) {
    return;
  }
  chain.doFilter(req,resp);
}

Fixed version (ground truth):
public void doFilter(ServletRequest req,ServletResponse resp,FilterChain chain) throws ServletException, IOException {
  ServletContext context=((HttpServletRequest)req).getSession().getServletContext();
  Settings.setApplicationAttribute(ServletContext.class.getName(),context);
  Settings.load(context.getResourceAsStream(Settings.DEFAULT_PATH));
  map=new MapJson();
  HttpServletRequest request=(HttpServletRequest)req;
  HttpServletResponse response=(HttpServletResponse)resp;
  if (handleRewrite(request,response)) {
    return;
  }
 else   if (handlePreview(request,response)) {
    return;
  }
  chain.doFilter(req,resp);
}
Program: 34945
Project: 34945
Buggy source:
public void doFilter(ServletRequest req,ServletResponse resp,FilterChain chain) throws ServletException, IOException {
  ServletContext context=((HttpServletRequest)req).getSession().getServletContext();
  Settings.init(context);
  map=MapCache.getInstance();
  HttpServletRequest request=(HttpServletRequest)req;
  HttpServletResponse response=(HttpServletResponse)resp;
  if (handleRewrite(request,response)) {
    return;
  }
 else   if (handlePreview(request,response)) {
    return;
  }
  chain.doFilter(req,resp);
}

Fixed version (ground truth):
public void doFilter(ServletRequest req,ServletResponse resp,FilterChain chain) throws ServletException, IOException {
  map=MapCache.getInstance();
  HttpServletRequest request=(HttpServletRequest)req;
  HttpServletResponse response=(HttpServletResponse)resp;
  if (handleRewrite(request,response)) {
    return;
  }
 else   if (handlePreview(request,response)) {
    return;
  }
  chain.doFilter(req,resp);
}
Program: 34946
Project: 34946
Buggy source:
public void contextInitialized(ServletContextEvent event){
  ServletContext ctx=event.getServletContext();
  String mdir=ctx.getRealPath("String_Node_Str");
  System.out.println("String_Node_Str" + mdir);
  timer.schedule(new ListenerTask(mdir),sec_start,sec);
}

Fixed version (ground truth):
public void contextInitialized(ServletContextEvent event){
  ServletContext ctx=event.getServletContext();
  Settings.init(ctx);
  MapCache mc=MapCache.getInstance();
  mc.init(ctx);
  System.out.println("String_Node_Str" + mc.mapPath);
  timer.schedule(new ListenerTask(mc.mapPath),sec_start,sec);
}
Program: 34947
Project: 34947
Buggy source:
public void contextDestroyed(ServletContextEvent event){
  event.getServletContext().log("String_Node_Str" + mapDir);
  timer.cancel();
}

Fixed version (ground truth):
public void contextDestroyed(ServletContextEvent event){
  event.getServletContext().log("String_Node_Str" + MapCache.getInstance().mapPath);
  timer.cancel();
}
Program: 34948
Project: 34948
Buggy source:
public void reloadMap(){
  if (map != null) {
    System.out.println("String_Node_Str" + this.dir + "String_Node_Str"+ map.hashCode()+ "String_Node_Str");
  }
  map=loadAllMap(dir);
  System.out.println("String_Node_Str" + map.hashCode() + "String_Node_Str");
}

Fixed version (ground truth):
public void reloadMap(){
  if (map != null) {
    System.out.println("String_Node_Str" + mapDir + "String_Node_Str"+ map.hashCode()+ "String_Node_Str");
  }
  map=loadAllMap(dir);
  System.out.println("String_Node_Str" + map.hashCode() + "String_Node_Str");
}
Program: 34949
Project: 34949
Buggy source:
protected JSONObject loadJson(String filename){
  InputStream input=null;
  if (this.loaderType.equals("String_Node_Str")) {
    File file=new File(dir,filename);
    if (file.canRead()) {
      try {
        input=new FileInputStream(file.getAbsolutePath());
      }
 catch (      FileNotFoundException ex) {
        input=null;
      }
    }
  }
 else {
    if (!dir.isEmpty()) {
      filename=dir + "String_Node_Str" + filename;
    }
    ServletContext ctx=(ServletContext)Settings.getApplicationAttribute(ServletContext.class.getName());
    if (ctx == null) {
      System.out.println("String_Node_Str");
      throw new IllegalArgumentException("String_Node_Str");
    }
    input=ctx.getResourceAsStream(filename);
  }
  if (input == null) {
    return null;
  }
  String data=readStream(input);
  if (data != null) {
    return JSONObject.parseObject(data);
  }
  return null;
}

Fixed version (ground truth):
protected JSONObject loadJson(String filename){
  FileInputStream input=null;
  File file=null;
  if (loaderType.equals("String_Node_Str")) {
    file=new File(filename);
  }
 else   if (!mapPath.isEmpty()) {
    file=new File(mapPath,filename);
  }
  try {
    if (file.canRead()) {
      System.out.println("String_Node_Str" + file.toPath());
      input=new FileInputStream(file);
    }
  }
 catch (  Exception ex) {
    input=null;
  }
  if (input == null) {
    return null;
  }
  String data=readStream(input);
  if (data != null) {
    return JSONObject.parseObject(data);
  }
  return null;
}
Program: 34950
Project: 34950
Buggy source:
private MapCache(){
  dir=Settings.getString("String_Node_Str",dir);
  loaderType=Settings.getString("String_Node_Str",loaderType);
  if (map == null) {
    this.reloadMap();
  }
}

Fixed version (ground truth):
private MapCache(){
}
Program: 34951
Project: 34951
Buggy source:
protected JSONObject loadAllMap(String filePath){
  JSONObject resMap=new JSONObject();
  JSONObject pkgMap=new JSONObject();
  ServletContext ctx=(ServletContext)Settings.getApplicationAttribute(ServletContext.class.getName());
  if (ctx == null) {
    System.out.println("String_Node_Str");
    throw new IllegalArgumentException("String_Node_Str");
  }
  String realDirPath=ctx.getRealPath(filePath);
  System.out.println("String_Node_Str" + realDirPath);
  File root=new File(realDirPath);
  File[] files=root.listFiles();
  for (  File file : files) {
    if (file.isDirectory()) {
      this.loadAllMap(file.getAbsolutePath());
    }
 else {
      String fileName=file.getName();
      if (fileName.matches("String_Node_Str")) {
        JSONObject json=this.loadJson(fileName);
        if (json != null) {
          System.out.println("String_Node_Str" + fileName);
          resMap=mergeJSONObjects(resMap,json.getJSONObject("String_Node_Str"));
          pkgMap=mergeJSONObjects(pkgMap,json.getJSONObject("String_Node_Str"));
        }
      }
    }
  }
  JSONObject newMap=new JSONObject();
  newMap.put("String_Node_Str",resMap);
  newMap.put("String_Node_Str",pkgMap);
  return newMap;
}

Fixed version (ground truth):
protected JSONObject loadAllMap(String filePath){
  JSONObject resMap=new JSONObject();
  JSONObject pkgMap=new JSONObject();
  System.out.println("String_Node_Str" + mapPath);
  File root=new File(mapPath);
  File[] files=root.listFiles();
  for (  File file : files) {
    if (file.isDirectory()) {
      this.loadAllMap(file.getAbsolutePath());
    }
 else {
      String fileName=file.getName();
      if (fileName.matches("String_Node_Str")) {
        JSONObject json=this.loadJson(fileName);
        if (json != null) {
          System.out.println("String_Node_Str" + fileName);
          resMap=mergeJSONObjects(resMap,json.getJSONObject("String_Node_Str"));
          pkgMap=mergeJSONObjects(pkgMap,json.getJSONObject("String_Node_Str"));
        }
      }
    }
  }
  JSONObject newMap=new JSONObject();
  newMap.put("String_Node_Str",resMap);
  newMap.put("String_Node_Str",pkgMap);
  return newMap;
}
Program: 34952
Project: 34952
Buggy source:
protected Boolean handlePreview(HttpServletRequest req,HttpServletResponse resp) throws IOException, ServletException {
  String path=req.getServletPath();
  URL url=req.getServletContext().getResource(path);
  if (url == null) {
    Pattern reg=Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE);
    Matcher matcher=reg.matcher(path);
    if (matcher.find()) {
      String ns=matcher.group(1);
      String file=matcher.group(2);
      try {
        JSONObject info=ns != null ? map.getNode(ns + "String_Node_Str" + file) : map.getNode("String_Node_Str" + file);
        if (info != null) {
          String resolved=info.getString("String_Node_Str");
          if (resolved.endsWith("String_Node_Str")) {
            req.getRequestDispatcher(path).forward(req,resp);
          }
 else {
            resolved=Settings.getString("String_Node_Str","String_Node_Str") + resolved;
            req.getRequestDispatcher(resolved).forward(req,resp);
          }
          return true;
        }
 else {
          if (!path.endsWith("String_Node_Str")) {
            path+="String_Node_Str";
          }
          req.getRequestDispatcher(path).forward(req,resp);
          return true;
        }
      }
 catch (      Exception err) {
        System.out.println(err.getMessage());
      }
    }
  }
 else   if (path.endsWith("String_Node_Str")) {
    resp.addHeader("String_Node_Str","String_Node_Str");
  }
  return false;
}

Fixed version (ground truth):
protected Boolean handlePreview(HttpServletRequest req,HttpServletResponse resp) throws IOException, ServletException {
  String path=req.getServletPath();
  URL url=req.getServletContext().getResource(path);
  if (url == null && !path.endsWith("String_Node_Str")) {
    Pattern reg=Pattern.compile("String_Node_Str",Pattern.CASE_INSENSITIVE);
    Matcher matcher=reg.matcher(path);
    if (matcher.find()) {
      String ns=matcher.group(1);
      String file=matcher.group(2);
      JSONObject info=ns != null ? map.getNode(ns + "String_Node_Str" + file) : map.getNode("String_Node_Str" + file);
      if (info != null) {
        String resolved=info.getString("String_Node_Str");
        if (resolved.endsWith("String_Node_Str")) {
          req.getRequestDispatcher(path).forward(req,resp);
        }
 else {
          resolved=Settings.getString("String_Node_Str","String_Node_Str") + resolved;
          req.getRequestDispatcher(resolved).forward(req,resp);
        }
        return true;
      }
 else {
        if (!path.endsWith("String_Node_Str")) {
          path+="String_Node_Str";
        }
        req.getRequestDispatcher(path).forward(req,resp);
        return true;
      }
    }
  }
 else   if (path.endsWith("String_Node_Str")) {
    resp.addHeader("String_Node_Str","String_Node_Str");
  }
  return false;
}
Program: 34953
Project: 34953
Buggy source:
public final WindowManager.LayoutParams getParam(){
  return new WindowManager.LayoutParams(Util.dp(48,getContext()),Util.dp(48,getContext()),WindowManager.LayoutParams.TYPE_PHONE,WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL,PixelFormat.TRANSLUCENT);
}

Fixed version (ground truth):
public final WindowManager.LayoutParams getParam(){
  return new WindowManager.LayoutParams(Util.dp(48,getContext()),Util.dp(48,getContext()),WindowManager.LayoutParams.TYPE_SYSTEM_ERROR,WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL,PixelFormat.TRANSLUCENT);
}
Program: 34954
Project: 34954
Buggy source:
@SuppressWarnings("String_Node_Str") private ValidationResult validateColumn(Object toBeValidated,AbstractAttribute attribute,ColumnValidator[] columnValidators) throws NoSuchFieldException, IllegalAccessException, InstantiationException, java.lang.reflect.InvocationTargetException, NoSuchMethodException {
  Object entityValue=getStaticFieldValue(toBeValidated.getClass(),attribute.fieldName(),toBeValidated);
  for (  ColumnValidator columnValidator : columnValidators) {
    Class<? extends Annotation> validatorAnnotation=columnValidator.getValidatorAnnotation();
    Class<?> proxyClass=Proxy.getProxyClass(Thread.currentThread().getContextClassLoader(),validatorAnnotation);
    Annotation annotationInstance=(Annotation)proxyClass.getConstructor(new Class[]{InvocationHandler.class}).newInstance(new Object[]{new DatabaseValidatorAnnotationHandler(columnValidator.getParams())});
    Class<? extends CustomValidator<?,?>> validatorClass=columnValidator.getValidatorClass();
    CustomValidator<Annotation,Object> customValidator=(CustomValidator<Annotation,Object>)validatorClass.getConstructor().newInstance();
    ValidationResult result=customValidator.onValidate(validatorAnnotation.cast(annotationInstance),entityValue);
    if (!result.isValid()) {
      return result;
    }
  }
  return ValidationResult.valid();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private ValidationResult validateColumn(Object toBeValidated,AbstractAttribute attribute,ColumnValidator[] columnValidators) throws NoSuchFieldException, IllegalAccessException, InstantiationException, java.lang.reflect.InvocationTargetException, NoSuchMethodException {
  Object entityValue=getStaticFieldValue(toBeValidated.getClass(),attribute.fieldName(),toBeValidated);
  for (  ColumnValidator columnValidator : columnValidators) {
    Class<? extends Annotation> validatorAnnotation=columnValidator.getValidatorAnnotation();
    Class<?> proxyClass=Proxy.getProxyClass(this.getClass().getClassLoader(),validatorAnnotation);
    Annotation annotationInstance=(Annotation)proxyClass.getConstructor(new Class[]{InvocationHandler.class}).newInstance(new Object[]{new DatabaseValidatorAnnotationHandler(columnValidator.getParams())});
    Class<? extends CustomValidator<?,?>> validatorClass=columnValidator.getValidatorClass();
    CustomValidator<Annotation,Object> customValidator=(CustomValidator<Annotation,Object>)validatorClass.getConstructor().newInstance();
    ValidationResult result=customValidator.onValidate(validatorAnnotation.cast(annotationInstance),entityValue);
    if (!result.isValid()) {
      return result;
    }
  }
  return ValidationResult.valid();
}