nus-yam/ex-repair huggingface dataset:
Program: 59382
Project: 59382
Buggy source:
public void pullImage(String imageName){
  PullImageCmd pullImageCmd=this.dockerClient.pullImageCmd(imageName);
  int tagSeparator=imageName.indexOf(TAG_SEPARATOR);
  if (tagSeparator > 0) {
    pullImageCmd.withRepository(imageName.substring(0,tagSeparator));
    pullImageCmd.withTag(imageName.substring(tagSeparator + 1));
  }
  InputStream exec=pullImageCmd.exec();
  String log=IOUtil.asString(exec);
}

Fixed version (ground truth):
public void pullImage(String imageName){
  PullImageCmd pullImageCmd=this.dockerClient.pullImageCmd(imageName);
  if (this.cubeConfiguration.getDockerRegistry() != null) {
    pullImageCmd.withRegistry(this.cubeConfiguration.getDockerRegistry());
  }
  int tagSeparator=imageName.indexOf(TAG_SEPARATOR);
  if (tagSeparator > 0) {
    pullImageCmd.withRepository(imageName.substring(0,tagSeparator));
    pullImageCmd.withTag(imageName.substring(tagSeparator + 1));
  }
  InputStream exec=pullImageCmd.exec();
  String log=IOUtil.asString(exec);
}
Program: 59383
Project: 59383
Buggy source:
@Override @SideOnly(Side.CLIENT) public ISound getSound(){
  return new SoundTile(this,getSoundEvent(),getVolume(),1.0F,true,0,Vector3.fromTileCenter(this).vec3());
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public ISound getSound(){
  return new SoundTile(this,getSoundEvent(),getVolume(),1.0F,true,0,new Vec3d(pos).addVector(0.5,0.5,0.5));
}
Program: 59385
Project: 59385
Buggy source:
@Override public int fill(FluidStack resource,boolean doFill){
  if (from == null || allowInsertion(sideConfig.sideTypes[sideCache[from.ordinal()]])) {
    if (resource == null) {
      return 0;
    }
    for (int j=0; j < tanks.length && tanks[j].getSpace() > 0; j++) {
      int toFill=tanks[j].fill(resource,doFill);
      if (toFill > 0) {
        return toFill;
      }
    }
  }
  return 0;
}

Fixed version (ground truth):
@Override public int fill(FluidStack resource,boolean doFill){
  if (from == null || allowInsertion(sideConfig.sideTypes[sideCache[from.ordinal()]])) {
    if (resource == null) {
      return 0;
    }
    for (int j=0; j < tanks.length && tanks[j].getSpace() > 0; j++) {
      int toFill=tanks[j].fill(new FluidStack(resource,Math.min(resource.amount,amountInput)),doFill);
      if (toFill > 0) {
        return toFill;
      }
    }
  }
  return 0;
}
Program: 59386
Project: 59386
Buggy source:
@Nullable @Override public FluidStack drain(int maxDrain,boolean doDrain){
  if (from == null || allowExtraction(sideConfig.sideTypes[sideCache[from.ordinal()]])) {
    if (maxDrain <= 0) {
      return null;
    }
    for (int j=tanks.length - 1; j >= 0 && tanks[j].getFluidAmount() > 0; j--) {
      FluidStack toDrain=tanks[j].drain(maxDrain,doDrain);
      if (toDrain != null) {
        return toDrain;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
@Nullable @Override public FluidStack drain(int maxDrain,boolean doDrain){
  if (from == null || allowExtraction(sideConfig.sideTypes[sideCache[from.ordinal()]])) {
    if (maxDrain <= 0) {
      return null;
    }
    for (int j=tanks.length - 1; j >= 0; j--) {
      if (tanks[j].getFluidAmount() <= 0) {
        continue;
      }
      return tanks[j].drain(Math.min(maxDrain,amountOutput),doDrain);
    }
  }
  return null;
}
Program: 59388
Project: 59388
Buggy source:
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  int change;
  float pitch;
  if (GuiScreen.isShiftKeyDown()) {
    change=8000;
    pitch=0.9F;
    if (mouseButton == 1) {
      change=4000;
      pitch=0.8F;
    }
  }
 else   if (GuiScreen.isCtrlKeyDown()) {
    change=500;
    pitch=0.5F;
    if (mouseButton == 1) {
      change=100;
      pitch=0.4F;
    }
  }
 else {
    change=2000;
    pitch=0.7F;
    if (mouseButton == 1) {
      change=1000;
      pitch=0.6F;
    }
  }
  int curInput=myTile.amountInput;
  int curOutput=myTile.amountOutput;
  boolean[] curLocks=myTile.locks.clone();
switch (buttonName) {
case "String_Node_Str":
    myTile.amountInput-=change;
  pitch-=0.1F;
break;
case "String_Node_Str":
myTile.amountInput+=change;
pitch+=0.1F;
break;
case "String_Node_Str":
myTile.amountOutput-=change;
pitch-=0.1F;
break;
case "String_Node_Str":
myTile.amountOutput+=change;
pitch+=0.1F;
break;
case "String_Node_Str":
myTile.locks[0]=!myTile.locks[0];
pitch=myTile.locks[0] ? 0.8F : 0.4F;
break;
case "String_Node_Str":
myTile.locks[1]=!myTile.locks[1];
pitch=myTile.locks[1] ? 0.8F : 0.4F;
break;
case "String_Node_Str":
myTile.locks[2]=!myTile.locks[2];
pitch=myTile.locks[2] ? 0.8F : 0.4F;
break;
}
playClickSound(pitch);
myTile.sendModePacket();
myTile.amountInput=curInput;
myTile.amountOutput=curOutput;
myTile.locks=curLocks;
}

Fixed version (ground truth):
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  int change;
  float pitch;
  if (GuiScreen.isShiftKeyDown()) {
    change=1000;
    pitch=0.9F;
    if (mouseButton == 1) {
      change=100;
      pitch=0.8F;
    }
    if (GuiScreen.isCtrlKeyDown()) {
      change*=10;
    }
  }
 else   if (GuiScreen.isCtrlKeyDown()) {
    change=5;
    pitch=0.5F;
    if (mouseButton == 1) {
      change=1;
      pitch=0.4F;
    }
  }
 else {
    change=50;
    pitch=0.7F;
    if (mouseButton == 1) {
      change=10;
      pitch=0.6F;
    }
  }
  change=MathHelper.clamp(change,1,8000);
  int curInput=myTile.amountInput;
  int curOutput=myTile.amountOutput;
  boolean[] curLocks=myTile.locks.clone();
switch (buttonName) {
case "String_Node_Str":
    myTile.amountInput-=change;
  pitch-=0.1F;
break;
case "String_Node_Str":
myTile.amountInput+=change;
pitch+=0.1F;
break;
case "String_Node_Str":
myTile.amountOutput-=change;
pitch-=0.1F;
break;
case "String_Node_Str":
myTile.amountOutput+=change;
pitch+=0.1F;
break;
case "String_Node_Str":
myTile.locks[0]=!myTile.locks[0];
pitch=myTile.locks[0] ? 0.8F : 0.4F;
break;
case "String_Node_Str":
myTile.locks[1]=!myTile.locks[1];
pitch=myTile.locks[1] ? 0.8F : 0.4F;
break;
case "String_Node_Str":
myTile.locks[2]=!myTile.locks[2];
pitch=myTile.locks[2] ? 0.8F : 0.4F;
break;
}
playClickSound(pitch);
myTile.sendModePacket();
myTile.amountInput=curInput;
myTile.amountOutput=curOutput;
myTile.locks=curLocks;
}
Program: 59389
Project: 59389
Buggy source:
public ContainerSatchel(ItemStack stack,InventoryPlayer inventory){
  super(stack,inventory);
  isCreative=ItemSatchel.isCreative(stack);
  isVoid=ItemSatchel.isVoid(stack);
  storageIndex=ItemSatchel.getStorageIndex(stack);
  rowSize=MathHelper.clamp(storageIndex,9,14);
  int rows=MathHelper.clamp(storageIndex,2,9);
  int slots=rowSize * rows;
  int yOffset=17;
  bindPlayerInventory(inventory);
switch (storageIndex) {
case 0:
    addSlotToContainer(isVoid ? new SlotSatchelVoid(containerWrapper,0,80,26) : new SlotSatchelCreative(this,containerWrapper,0,80,26));
  rowSize=1;
break;
case 1:
yOffset+=9;
for (int i=0; i < 9; i++) {
addSlotToContainer(new SlotValidated(this,containerWrapper,i,8 + i % rowSize * 18,yOffset + i / rowSize * 18));
}
break;
default :
for (int i=0; i < slots; i++) {
addSlotToContainer(new SlotValidated(this,containerWrapper,i,8 + i % rowSize * 18,yOffset + i / rowSize * 18));
}
break;
}
}

Fixed version (ground truth):
public ContainerSatchel(ItemStack stack,InventoryPlayer inventory){
  super(stack,inventory);
  isCreative=ItemSatchel.isCreative(stack);
  isVoid=ItemSatchel.isVoid(stack);
  storageIndex=ItemSatchel.getStorageIndex(stack);
  rowSize=MathHelper.clamp(storageIndex,9,14);
  int rows=MathHelper.clamp(storageIndex,2,9);
  int slots=rowSize * rows;
  int yOffset=17;
  bindPlayerInventory(inventory);
switch (storageIndex) {
case 0:
    if (isVoid) {
      addSlotToContainer(new SlotSatchelVoid(containerWrapper,0,80,26));
    }
 else {
      addSlotToContainer(new SlotSatchelCreative(this,containerWrapper,0,80,26));
    }
  rowSize=1;
break;
case 1:
yOffset+=9;
for (int i=0; i < 9; i++) {
addSlotToContainer(new SlotValidated(this,containerWrapper,i,8 + i % rowSize * 18,yOffset + i / rowSize * 18));
}
break;
default :
for (int i=0; i < slots; i++) {
addSlotToContainer(new SlotValidated(this,containerWrapper,i,8 + i % rowSize * 18,yOffset + i / rowSize * 18));
}
break;
}
}
Program: 59390
Project: 59390
Buggy source:
public ContainerSatchel(ItemStack stack,InventoryPlayer inventory){
  super(stack,inventory);
  isCreative=ItemSatchel.isCreative(stack);
  isVoid=ItemSatchel.isVoid(stack);
  storageIndex=ItemSatchel.getStorageIndex(stack);
  rowSize=MathHelper.clamp(storageIndex,9,14);
  int rows=MathHelper.clamp(storageIndex,2,9);
  int slots=rowSize * rows;
  int yOffset=17;
  bindPlayerInventory(inventory);
switch (storageIndex) {
case 0:
    addSlotToContainer(isVoid ? new Slot(containerWrapper,0,80,26){
      @Override public void putStack(      ItemStack stack){
      }
    }
 : new SlotSatchelCreative(this,containerWrapper,0,80,26));
  rowSize=1;
break;
case 1:
yOffset+=9;
for (int i=0; i < 9; i++) {
addSlotToContainer(new SlotValidated(this,containerWrapper,i,8 + i % rowSize * 18,yOffset + i / rowSize * 18));
}
break;
default :
for (int i=0; i < slots; i++) {
addSlotToContainer(new SlotValidated(this,containerWrapper,i,8 + i % rowSize * 18,yOffset + i / rowSize * 18));
}
break;
}
}

Fixed version (ground truth):
public ContainerSatchel(ItemStack stack,InventoryPlayer inventory){
  super(stack,inventory);
  isCreative=ItemSatchel.isCreative(stack);
  isVoid=ItemSatchel.isVoid(stack);
  storageIndex=ItemSatchel.getStorageIndex(stack);
  rowSize=MathHelper.clamp(storageIndex,9,14);
  int rows=MathHelper.clamp(storageIndex,2,9);
  int slots=rowSize * rows;
  int yOffset=17;
  bindPlayerInventory(inventory);
switch (storageIndex) {
case 0:
    addSlotToContainer(isVoid ? new SlotSatchelVoid(containerWrapper,0,80,26) : new SlotSatchelCreative(this,containerWrapper,0,80,26));
  rowSize=1;
break;
case 1:
yOffset+=9;
for (int i=0; i < 9; i++) {
addSlotToContainer(new SlotValidated(this,containerWrapper,i,8 + i % rowSize * 18,yOffset + i / rowSize * 18));
}
break;
default :
for (int i=0; i < slots; i++) {
addSlotToContainer(new SlotValidated(this,containerWrapper,i,8 + i % rowSize * 18,yOffset + i / rowSize * 18));
}
break;
}
}
Program: 59391
Project: 59391
Buggy source:
@Override public int colorMultiplier(ItemStack stack,int tintIndex){
  EntityList.EntityEggInfo info=null;
  if (stack.hasTagCompound()) {
    ResourceLocation id=new ResourceLocation(stack.getTagCompound().getString("String_Node_Str"));
    info=EntityList.ENTITY_EGGS.get(id);
  }
  if (info != null) {
switch (tintIndex) {
case 1:
      return info.primaryColor;
case 2:
    return info.secondaryColor;
}
}
return 0xFFFFFF;
}

Fixed version (ground truth):
public int colorMultiplier(ItemStack stack,int tintIndex){
  EntityList.EntityEggInfo info=null;
  if (stack.hasTagCompound()) {
    ResourceLocation id=new ResourceLocation(stack.getTagCompound().getString("String_Node_Str"));
    info=EntityList.ENTITY_EGGS.get(id);
  }
  if (info != null) {
switch (tintIndex) {
case 1:
      return info.primaryColor;
case 2:
    return info.secondaryColor;
}
}
return 0xFFFFFF;
}
Program: 59392
Project: 59392
Buggy source:
public static void refresh(){
  Minecraft.getMinecraft().addScheduledTask(EnchanterRecipeCategory::refresh);
}

Fixed version (ground truth):
public static void refresh(){
  FMLCommonHandler.instance().getMinecraftServerInstance().addScheduledTask(EnchanterRecipeCategory::refresh);
}
Program: 59393
Project: 59393
Buggy source:
@Override public void initialize(FMLInitializationEvent event){
  super.initialize(event);
  RenderCache.initialize();
  RenderStrongbox.initialize();
  Minecraft.getMinecraft().getItemColors().registerItemColorHandler(TEItems.itemMorb,TEItems.itemMorb);
}

Fixed version (ground truth):
@Override public void initialize(FMLInitializationEvent event){
  super.initialize(event);
  RenderCache.initialize();
  RenderStrongbox.initialize();
  Minecraft.getMinecraft().getItemColors().registerItemColorHandler(TEItems.itemMorb::colorMultiplier,TEItems.itemMorb);
}
Program: 59394
Project: 59394
Buggy source:
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  int change;
  float pitch;
  if (GuiScreen.isShiftKeyDown()) {
    change=64;
    pitch=0.9F;
    if (mouseButton == 1) {
      change=32;
      pitch=0.8F;
    }
  }
 else   if (GuiScreen.isCtrlKeyDown()) {
    change=4;
    pitch=0.5F;
    if (mouseButton == 1) {
      change=1;
      pitch=0.4F;
    }
  }
 else {
    change=16;
    pitch=0.7F;
    if (mouseButton == 1) {
      change=8;
      pitch=0.6F;
    }
  }
  int curInput=myTile.amountInput;
  int curOutput=myTile.amountOutput;
  if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    myTile.amountInput-=change;
    pitch-=0.1F;
  }
 else   if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    myTile.amountInput+=change;
    pitch+=0.1F;
  }
 else   if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    myTile.amountOutput-=change;
    pitch-=0.1F;
  }
 else   if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    myTile.amountOutput+=change;
    pitch+=0.1F;
  }
  playClickSound(1.0F,pitch);
  myTile.sendModePacket();
  myTile.amountInput=curInput;
  myTile.amountOutput=curOutput;
}

Fixed version (ground truth):
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  int change;
  float pitch;
  if (GuiScreen.isShiftKeyDown()) {
    change=64;
    pitch=0.9F;
    if (mouseButton == 1) {
      change=32;
      pitch=0.8F;
    }
  }
 else   if (GuiScreen.isCtrlKeyDown()) {
    change=4;
    pitch=0.5F;
    if (mouseButton == 1) {
      change=1;
      pitch=0.4F;
    }
  }
 else {
    change=16;
    pitch=0.7F;
    if (mouseButton == 1) {
      change=8;
      pitch=0.6F;
    }
  }
  int curInput=myTile.amountInput;
  int curOutput=myTile.amountOutput;
  if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    myTile.amountInput-=change;
    pitch-=0.1F;
  }
 else   if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    myTile.amountInput+=change;
    pitch+=0.1F;
  }
 else   if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    myTile.amountOutput-=change;
    pitch-=0.1F;
  }
 else   if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    myTile.amountOutput+=change;
    pitch+=0.1F;
  }
  playClickSound(pitch);
  myTile.sendModePacket();
  myTile.amountInput=curInput;
  myTile.amountOutput=curOutput;
}
Program: 59395
Project: 59395
Buggy source:
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  if (buttonName.equals("String_Node_Str")) {
    if (myTile.modeFlag == 1) {
      playClickSound(1.0F,0.8F);
    }
 else {
      playClickSound(1.0F,0.6F);
    }
    myTile.toggleMode();
  }
}

Fixed version (ground truth):
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  if (buttonName.equals("String_Node_Str")) {
    if (myTile.modeFlag == 1) {
      playClickSound(0.8F);
    }
 else {
      playClickSound(0.6F);
    }
    myTile.toggleMode();
  }
}
Program: 59396
Project: 59396
Buggy source:
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  if (buttonName.equals("String_Node_Str")) {
    if (myTile.lockPrimary) {
      playClickSound(1.0F,0.6F);
    }
 else {
      playClickSound(1.0F,0.8F);
    }
    myTile.setMode(!myTile.lockPrimary);
  }
}

Fixed version (ground truth):
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  if (buttonName.equals("String_Node_Str")) {
    if (myTile.lockPrimary) {
      playClickSound(0.6F);
    }
 else {
      playClickSound(0.8F);
    }
    myTile.setMode(!myTile.lockPrimary);
  }
}
Program: 59397
Project: 59397
Buggy source:
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  if (buttonName.equals("String_Node_Str")) {
    if (myTile.lockPrimary) {
      playClickSound(1.0F,0.6F);
    }
 else {
      playClickSound(1.0F,0.8F);
    }
    myTile.setMode(!myTile.lockPrimary);
  }
}

Fixed version (ground truth):
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  if (buttonName.equals("String_Node_Str")) {
    if (myTile.lockPrimary) {
      playClickSound(0.6F);
    }
 else {
      playClickSound(0.8F);
    }
    myTile.setMode(!myTile.lockPrimary);
  }
}
Program: 59398
Project: 59398
Buggy source:
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  if (buttonName.equals("String_Node_Str")) {
    if (myTile.extractFlag) {
      playClickSound(1.0F,0.8F);
    }
 else {
      playClickSound(1.0F,0.6F);
    }
    myTile.setMode(!myTile.extractFlag);
  }
}

Fixed version (ground truth):
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  if (buttonName.equals("String_Node_Str")) {
    if (myTile.extractFlag) {
      playClickSound(0.8F);
    }
 else {
      playClickSound(0.6F);
    }
    myTile.setMode(!myTile.extractFlag);
  }
}
Program: 59399
Project: 59399
Buggy source:
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  int change;
  float pitch;
  if (GuiScreen.isShiftKeyDown()) {
    change=1000;
    pitch=0.9F;
    if (mouseButton == 1) {
      change=100;
      pitch=0.8F;
    }
    if (GuiScreen.isCtrlKeyDown()) {
      change*=10;
    }
  }
 else   if (GuiScreen.isCtrlKeyDown()) {
    change=5;
    pitch=0.5F;
    if (mouseButton == 1) {
      change=1;
      pitch=0.4F;
    }
  }
 else {
    change=50;
    pitch=0.7F;
    if (mouseButton == 1) {
      change=10;
      pitch=0.6F;
    }
  }
  int curReceive=baseTile.amountRecv;
  int curSend=baseTile.amountSend;
  if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    baseTile.amountRecv-=change;
    pitch-=0.1F;
  }
 else   if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    baseTile.amountRecv+=change;
    pitch+=0.1F;
  }
 else   if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    baseTile.amountSend-=change;
    pitch-=0.1F;
  }
 else   if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    baseTile.amountSend+=change;
    pitch+=0.1F;
  }
  playClickSound(1.0F,pitch);
  baseTile.sendModePacket();
  baseTile.amountRecv=curReceive;
  baseTile.amountSend=curSend;
}

Fixed version (ground truth):
@Override public void handleElementButtonClick(String buttonName,int mouseButton){
  int change;
  float pitch;
  if (GuiScreen.isShiftKeyDown()) {
    change=1000;
    pitch=0.9F;
    if (mouseButton == 1) {
      change=100;
      pitch=0.8F;
    }
    if (GuiScreen.isCtrlKeyDown()) {
      change*=10;
    }
  }
 else   if (GuiScreen.isCtrlKeyDown()) {
    change=5;
    pitch=0.5F;
    if (mouseButton == 1) {
      change=1;
      pitch=0.4F;
    }
  }
 else {
    change=50;
    pitch=0.7F;
    if (mouseButton == 1) {
      change=10;
      pitch=0.6F;
    }
  }
  int curReceive=baseTile.amountRecv;
  int curSend=baseTile.amountSend;
  if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    baseTile.amountRecv-=change;
    pitch-=0.1F;
  }
 else   if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    baseTile.amountRecv+=change;
    pitch+=0.1F;
  }
 else   if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    baseTile.amountSend-=change;
    pitch-=0.1F;
  }
 else   if (buttonName.equalsIgnoreCase("String_Node_Str")) {
    baseTile.amountSend+=change;
    pitch+=0.1F;
  }
  playClickSound(pitch);
  baseTile.sendModePacket();
  baseTile.amountRecv=curReceive;
  baseTile.amountSend=curSend;
}
Program: 59400
Project: 59400
Buggy source:
public void updateRender(){
  renderFlag=false;
  boolean sendUpdate=false;
  int curDisplayLevel=0;
  int curLight=getLightValue();
  if (tank.getFluidAmount() > 0) {
    curDisplayLevel=(int)(tank.getFluidAmount() / (float)getCapacity(level,enchantHolding) * (RENDER_LEVELS - 1));
    if (curDisplayLevel == 0) {
      curDisplayLevel=1;
    }
    if (lastDisplayLevel == 0) {
      lastDisplayLevel=curDisplayLevel;
      sendUpdate=true;
    }
  }
 else   if (lastDisplayLevel != 0) {
    lastDisplayLevel=0;
    sendUpdate=true;
  }
  if (curDisplayLevel != lastDisplayLevel) {
    lastDisplayLevel=curDisplayLevel;
    sendUpdate=true;
  }
  if (curLight != getLightValue()) {
    updateLighting();
    sendUpdate=true;
  }
  if (sendUpdate) {
    sendTilePacket(Side.CLIENT);
  }
}

Fixed version (ground truth):
public void updateRender(){
  renderFlag=false;
  boolean sendUpdate=false;
  int curDisplayLevel=0;
  int curLight=getLightValue();
  if (tank.getFluidAmount() > 0) {
    curDisplayLevel=(int)(tank.getFluidAmount() / (float)getCapacity(level,enchantHolding) * (RENDER_LEVELS - 1));
    if (curDisplayLevel == 0) {
      curDisplayLevel=1;
    }
    if (lastDisplayLevel == 0) {
      lastDisplayLevel=curDisplayLevel;
      sendUpdate=true;
    }
  }
 else   if (lastDisplayLevel != 0) {
    lastDisplayLevel=0;
    sendUpdate=true;
  }
  if (lastDisplayLevel != curDisplayLevel) {
    lastDisplayLevel=curDisplayLevel;
    sendUpdate=true;
  }
  if (sendUpdate) {
    updateLighting();
    sendTilePacket(Side.CLIENT);
  }
}
Program: 59401
Project: 59401
Buggy source:
@Override public void initGui(){
  super.initGui();
  slotInput=addElement(new ElementSlotOverlay(this,44,20).setSlotInfo(0,4,2));
  slotOutput[0]=(ElementSlotOverlay)addElement(new ElementSlotOverlay(this,112,31).setSlotInfo(3,1,2));
  slotOutput[1]=(ElementSlotOverlay)addElement(new ElementSlotOverlay(this,112,31).setSlotInfo(2,1,1));
  slotTankOutput[0]=(ElementSlotOverlay)addElement(new ElementSlotOverlay(this,152,9).setSlotInfo(3,3,2).setVisible(false));
  slotTankOutput[1]=(ElementSlotOverlay)addElement(new ElementSlotOverlay(this,152,9).setSlotInfo(1,3,1).setVisible(false));
  addElement(new ElementEnergyStored(this,8,8,baseTile.getEnergyStorage()));
  addElement(new ElementFluidTank(this,44,19,myTile.getTank(0)).setGauge(0).setAlwaysShow(true).setShort());
  addElement(new ElementFluidTank(this,152,9,myTile.getTank(1)).setGauge(1).setAlwaysShow(true));
  progressFluid=(ElementFluid)addElement(new ElementFluid(this,76,34).setFluid(myTile.getTankFluid(0)).setSize(24,16));
  progressOverlay=(ElementDualScaled)addElement(new ElementDualScaled(this,76,34).setMode(1).setBackground(false).setSize(24,16).setTexture(TEX_DROP_RIGHT,64,16));
  speed=(ElementDualScaled)addElement(new ElementDualScaled(this,44,52).setSize(16,16).setTexture(TEX_FLAME,32,16));
}

Fixed version (ground truth):
@Override public void initGui(){
  super.initGui();
  slotInput=addElement(new ElementSlotOverlay(this,44,19).setSlotInfo(0,4,2));
  slotOutput[0]=(ElementSlotOverlay)addElement(new ElementSlotOverlay(this,112,31).setSlotInfo(3,1,2));
  slotOutput[1]=(ElementSlotOverlay)addElement(new ElementSlotOverlay(this,112,31).setSlotInfo(2,1,1));
  slotTankOutput[0]=(ElementSlotOverlay)addElement(new ElementSlotOverlay(this,152,9).setSlotInfo(3,3,2).setVisible(false));
  slotTankOutput[1]=(ElementSlotOverlay)addElement(new ElementSlotOverlay(this,152,9).setSlotInfo(1,3,1).setVisible(false));
  addElement(new ElementEnergyStored(this,8,8,baseTile.getEnergyStorage()));
  addElement(new ElementFluidTank(this,44,19,myTile.getTank(0)).setGauge(0).setAlwaysShow(true).setShort());
  addElement(new ElementFluidTank(this,152,9,myTile.getTank(1)).setGauge(1).setAlwaysShow(true));
  progressFluid=(ElementFluid)addElement(new ElementFluid(this,76,34).setFluid(myTile.getTankFluid(0)).setSize(24,16));
  progressOverlay=(ElementDualScaled)addElement(new ElementDualScaled(this,76,34).setMode(1).setBackground(false).setSize(24,16).setTexture(TEX_DROP_RIGHT,64,16));
  speed=(ElementDualScaled)addElement(new ElementDualScaled(this,44,52).setSize(16,16).setTexture(TEX_FLAME,32,16));
}
Program: 59402
Project: 59402
Buggy source:
protected void drawSlotNoBorder(int x,int y){
  sizeX=0;
  sizeY=0;
  int offsetX=slotColor / 3 * 128;
  int offsetY=slotColor % 3 * 32;
switch (slotType) {
case 0:
    sizeX=16;
  sizeY=16;
offsetX+=8;
offsetY+=8;
break;
case 1:
sizeX=24;
sizeY=24;
offsetX+=36;
offsetY+=4;
break;
case 2:
sizeX=42;
sizeY=24;
offsetX+=75;
offsetY+=4;
break;
case 3:
sizeX=16;
sizeY=60;
offsetX=slotColor * 32 + 8;
offsetY=98;
break;
case 4:
sizeX=16;
sizeY=29;
offsetX=slotColor * 32 + 8;
offsetY=162;
break;
}
switch (slotRender) {
case 0:
sizeY/=2;
break;
case 1:
sizeY/=2;
y+=sizeY;
offsetY+=sizeY;
break;
case 2:
break;
}
gui.drawTexturedModalRect(x,y,offsetX,offsetY,sizeX,sizeY);
}

Fixed version (ground truth):
protected void drawSlotNoBorder(int x,int y){
  sizeX=0;
  sizeY=0;
  int offsetX=slotColor / 3 * 128;
  int offsetY=slotColor % 3 * 32;
switch (slotType) {
case 0:
    sizeX=16;
  sizeY=16;
offsetX+=8;
offsetY+=8;
break;
case 1:
sizeX=24;
sizeY=24;
offsetX+=36;
offsetY+=4;
break;
case 2:
sizeX=42;
sizeY=24;
offsetX+=75;
offsetY+=4;
break;
case 3:
sizeX=16;
sizeY=60;
offsetX=slotColor * 32 + 8;
offsetY=98;
break;
case 4:
sizeX=16;
sizeY=30;
offsetX=slotColor * 32 + 8;
offsetY=162;
break;
}
switch (slotRender) {
case 0:
sizeY/=2;
break;
case 1:
sizeY/=2;
y+=sizeY;
offsetY+=sizeY;
break;
case 2:
break;
}
gui.drawTexturedModalRect(x,y,offsetX,offsetY,sizeX,sizeY);
}
Program: 59403
Project: 59403
Buggy source:
private boolean canStartHandler(){
  if (!FluidHelper.isFluidHandler(inventory[1])) {
    hasFluidHandler=false;
    return false;
  }
  if (energyStorage.getEnergyStored() < TransposerManager.DEFAULT_ENERGY) {
    return false;
  }
  IFluidHandler handler=inventory[1].getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY,null);
  if (!extractMode) {
    if (tank.getFluid() == null || tank.getFluidAmount() < Fluid.BUCKET_VOLUME) {
      return false;
    }
    return handler.fill(new FluidStack(tank.getFluid(),Fluid.BUCKET_VOLUME),false) > 0;
  }
 else {
    if (tank.getSpace() < Fluid.BUCKET_VOLUME) {
      return false;
    }
    FluidStack drain=handler.drain(Fluid.BUCKET_VOLUME,false);
    return tank.fill(drain,false) > 0;
  }
}

Fixed version (ground truth):
private boolean canStartHandler(){
  if (!FluidHelper.isFluidHandler(inventory[1])) {
    hasFluidHandler=false;
    return false;
  }
  if (energyStorage.getEnergyStored() < TransposerManager.DEFAULT_ENERGY) {
    return false;
  }
  if (inventory[2] != null) {
    return false;
  }
  IFluidHandler handler=inventory[1].getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY,null);
  if (!extractMode) {
    if (tank.getFluid() == null || tank.getFluidAmount() < Fluid.BUCKET_VOLUME) {
      return false;
    }
    return handler.fill(new FluidStack(tank.getFluid(),Fluid.BUCKET_VOLUME),false) > 0;
  }
 else {
    if (tank.getSpace() < Fluid.BUCKET_VOLUME) {
      return false;
    }
    FluidStack drain=handler.drain(Fluid.BUCKET_VOLUME,false);
    return tank.fill(drain,false) > 0;
  }
}
Program: 59404
Project: 59404
Buggy source:
@Override public void initGui(){
  super.initGui();
  slotInput=addElement(new ElementSlotOverlay(this,53,26).setSlotInfo(0,0,2));
  slotOutput=addElement(new ElementSlotOverlay(this,112,31).setSlotInfo(3,1,2));
  addElement(new ElementEnergyStored(this,8,8,baseTile.getEnergyStorage()));
  progress=(ElementDualScaled)addElement(new ElementDualScaled(this,79,34).setMode(1).setSize(24,16).setTexture(TEX_ARROW_RIGHT,64,16));
  speed=(ElementDualScaled)addElement(new ElementDualScaled(this,53,44).setSize(16,16).setTexture(TEX_FLAME,32,16));
  modeSel=(ElementButton)addElement(new ElementButton(this,80,53,"String_Node_Str",176,0,176,16,176,32,16,16,TEX_PATH));
}

Fixed version (ground truth):
@Override public void initGui(){
  super.initGui();
  slotInput=addElement(new ElementSlotOverlay(this,53,26).setSlotInfo(0,0,2));
  slotOutput=addElement(new ElementSlotOverlay(this,112,31).setSlotInfo(3,1,2));
  addElement(new ElementEnergyStored(this,8,8,baseTile.getEnergyStorage()));
  progress=(ElementDualScaled)addElement(new ElementDualScaled(this,79,34).setMode(1).setSize(24,16).setTexture(TEX_ARROW_RIGHT,64,16));
  speed=(ElementDualScaled)addElement(new ElementDualScaled(this,53,44).setSize(16,16).setTexture(TEX_COMPACT,32,16));
  modeSel=(ElementButton)addElement(new ElementButton(this,80,53,"String_Node_Str",176,0,176,16,176,32,16,16,TEX_PATH));
}
Program: 59406
Project: 59406
Buggy source:
@Override public EnumActionResult onItemUseFirst(ItemStack stack,EntityPlayer player,World world,BlockPos pos,EnumFacing side,float hitX,float hitY,float hitZ,EnumHand hand){
  IBlockState state=world.getBlockState(pos);
  Block block=state.getBlock();
  if (world.isAirBlock(pos)) {
    return EnumActionResult.PASS;
  }
  RayTraceResult traceResult=RayTracer.retrace(player);
  PlayerInteractEvent event=new PlayerInteractEvent.RightClickBlock(player,hand,stack,pos,side,traceResult.hitVec);
  if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Result.DENY) {
    return EnumActionResult.PASS;
  }
  if (ServerHelper.isServerWorld(world) && player.isSneaking() && block instanceof IDismantleable&& ((IDismantleable)block).canDismantle(world,pos,state,player)) {
    ((IDismantleable)block).dismantleBlock(world,pos,state,player,false);
    return EnumActionResult.SUCCESS;
  }
  if (BlockHelper.canRotate(block)) {
    if (player.isSneaking()) {
      world.setBlockState(pos,BlockHelper.rotateVanillaBlockAlt(world,state,pos),3);
      world.playSound(null,pos,block.getSoundType(state,world,pos,player).getBreakSound(),SoundCategory.BLOCKS,1.0F,0.6F);
    }
 else {
      world.setBlockState(pos,BlockHelper.rotateVanillaBlock(world,state,pos),3);
      world.playSound(null,pos,block.getSoundType(state,world,pos,player).getBreakSound(),SoundCategory.BLOCKS,1.0F,0.8F);
    }
    return ServerHelper.isServerWorld(world) ? EnumActionResult.SUCCESS : EnumActionResult.PASS;
  }
 else   if (!player.isSneaking() && block.rotateBlock(world,pos,side)) {
    player.swingArm(hand);
    return ServerHelper.isServerWorld(world) ? EnumActionResult.SUCCESS : EnumActionResult.PASS;
  }
  return EnumActionResult.PASS;
}

Fixed version (ground truth):
@Override public EnumActionResult onItemUseFirst(ItemStack stack,EntityPlayer player,World world,BlockPos pos,EnumFacing side,float hitX,float hitY,float hitZ,EnumHand hand){
  IBlockState state=world.getBlockState(pos);
  Block block=state.getBlock();
  if (world.isAirBlock(pos)) {
    return EnumActionResult.PASS;
  }
  RayTraceResult traceResult=RayTracer.retrace(player);
  PlayerInteractEvent event=new PlayerInteractEvent.RightClickBlock(player,hand,stack,pos,side,traceResult.hitVec);
  if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Result.DENY) {
    return EnumActionResult.PASS;
  }
  if (ServerHelper.isServerWorld(world) && player.isSneaking() && block instanceof IDismantleable&& ((IDismantleable)block).canDismantle(world,pos,state,player)) {
    ((IDismantleable)block).dismantleBlock(world,pos,state,player,false);
    return EnumActionResult.SUCCESS;
  }
  if (BlockHelper.canRotate(block)) {
    world.setBlockState(pos,BlockHelper.rotateVanillaBlock(world,state,pos),3);
    player.swingArm(hand);
    return ServerHelper.isServerWorld(world) ? EnumActionResult.SUCCESS : EnumActionResult.PASS;
  }
 else   if (!player.isSneaking() && block.rotateBlock(world,pos,side)) {
    player.swingArm(hand);
    return ServerHelper.isServerWorld(world) ? EnumActionResult.SUCCESS : EnumActionResult.PASS;
  }
  return EnumActionResult.PASS;
}
Program: 59407
Project: 59407
Buggy source:
@Override public IExtendedBlockState handleState(IExtendedBlockState state,TileEntity tileEntity){
  TileCell cell=(TileCell)tileEntity;
  state=state.withProperty(TEProps.CREATIVE,cell.isCreative);
  state=state.withProperty(TEProps.LEVEL,cell.getLevel());
  state=state.withProperty(TEProps.LIGHT,Math.min(15,cell.getScaledEnergyStored(16)));
  state=state.withProperty(TEProps.SCALE,cell.getLightValue());
  state=state.withProperty(TEProps.FACING,EnumFacing.VALUES[cell.getFacing()]);
  state=state.withProperty(TEProps.SIDE_CONFIG,cell.sideCache.clone());
  return state;
}

Fixed version (ground truth):
@Override public IExtendedBlockState handleState(IExtendedBlockState state,TileEntity tileEntity){
  TileCell cell=(TileCell)tileEntity;
  if (cell == null) {
    return null;
  }
  state=state.withProperty(TEProps.CREATIVE,cell.isCreative);
  state=state.withProperty(TEProps.LEVEL,cell.getLevel());
  state=state.withProperty(TEProps.LIGHT,Math.min(15,cell.getScaledEnergyStored(16)));
  state=state.withProperty(TEProps.SCALE,cell.getLightValue());
  state=state.withProperty(TEProps.FACING,EnumFacing.VALUES[cell.getFacing()]);
  state=state.withProperty(TEProps.SIDE_CONFIG,cell.sideCache.clone());
  return state;
}
Program: 59408
Project: 59408
Buggy source:
@Override public IExtendedBlockState handleState(IExtendedBlockState state,TileEntity tile){
  TileDynamoBase dynamo=(TileDynamoBase)tile;
  state=state.withProperty(TEProps.CREATIVE,dynamo.isCreative);
  state=state.withProperty(TEProps.LEVEL,dynamo.getLevel());
  state=state.withProperty(TEProps.ACTIVE,dynamo.isActive);
  state=state.withProperty(TEProps.FACING,EnumFacing.VALUES[dynamo.getFacing()]);
  state=state.withProperty(TEProps.ACTIVE_SPRITE_PROPERTY,new ResourceLocation(dynamo.getActiveIcon().getIconName()));
  return state;
}

Fixed version (ground truth):
@Override public IExtendedBlockState handleState(IExtendedBlockState state,TileEntity tile){
  TileDynamoBase dynamo=(TileDynamoBase)tile;
  if (dynamo == null) {
    return null;
  }
  state=state.withProperty(TEProps.CREATIVE,dynamo.isCreative);
  state=state.withProperty(TEProps.LEVEL,dynamo.getLevel());
  state=state.withProperty(TEProps.ACTIVE,dynamo.isActive);
  state=state.withProperty(TEProps.FACING,EnumFacing.VALUES[dynamo.getFacing()]);
  state=state.withProperty(TEProps.ACTIVE_SPRITE_PROPERTY,new ResourceLocation(dynamo.getActiveIcon().getIconName()));
  return state;
}
Program: 59409
Project: 59409
Buggy source:
@Override public IExtendedBlockState handleState(IExtendedBlockState state,TileEntity tileEntity){
  TileMachineBase machineBase=((TileMachineBase)tileEntity);
  state=state.withProperty(TEProps.CREATIVE,machineBase.isCreative);
  state=state.withProperty(TEProps.LEVEL,machineBase.getLevel());
  state=state.withProperty(TEProps.ACTIVE,machineBase.isActive);
  state=state.withProperty(TEProps.FACING,EnumFacing.VALUES[machineBase.getFacing()]);
  state=state.withProperty(TEProps.SIDE_CONFIG,machineBase.sideCache);
  state=state.withProperty(TEProps.TILE,machineBase);
  return state;
}

Fixed version (ground truth):
@Override public IExtendedBlockState handleState(IExtendedBlockState state,TileEntity tileEntity){
  TileMachineBase machineBase=((TileMachineBase)tileEntity);
  if (machineBase == null) {
    return null;
  }
  state=state.withProperty(TEProps.CREATIVE,machineBase.isCreative);
  state=state.withProperty(TEProps.LEVEL,machineBase.getLevel());
  state=state.withProperty(TEProps.ACTIVE,machineBase.isActive);
  state=state.withProperty(TEProps.FACING,EnumFacing.VALUES[machineBase.getFacing()]);
  state=state.withProperty(TEProps.SIDE_CONFIG,machineBase.sideCache);
  state=state.withProperty(TEProps.TILE,machineBase);
  return state;
}
Program: 59410
Project: 59410
Buggy source:
@Override public IExtendedBlockState handleState(IExtendedBlockState state,TileEntity tileEntity){
  TileTank tank=((TileTank)tileEntity);
  state=state.withProperty(TEProps.CREATIVE,tank.isCreative);
  state=state.withProperty(TEProps.LEVEL,tank.getLevel());
  state=state.withProperty(TEProps.ACTIVE,tank.enableAutoOutput);
  state=state.withProperty(TEProps.FLUID,tank.getTankFluid());
  return state;
}

Fixed version (ground truth):
@Override public IExtendedBlockState handleState(IExtendedBlockState state,TileEntity tileEntity){
  TileTank tank=((TileTank)tileEntity);
  if (tank == null) {
    return null;
  }
  state=state.withProperty(TEProps.CREATIVE,tank.isCreative);
  state=state.withProperty(TEProps.LEVEL,tank.getLevel());
  state=state.withProperty(TEProps.ACTIVE,tank.enableAutoOutput);
  state=state.withProperty(TEProps.FLUID,tank.getTankFluid());
  return state;
}
Program: 59411
Project: 59411
Buggy source:
public boolean extractItem(int slot,int amount,EnumFacing side){
  if (slot > inventory.length) {
    return false;
  }
  ItemStack stack=inventory[slot];
  if (stack != null) {
    amount=Math.min(amount,stack.getMaxStackSize() - stack.stackSize);
    stack=inventory[slot].copy();
  }
  int initialAmount=amount;
  TileEntity adjInv=BlockHelper.getAdjacentTileEntity(this,side);
  if (Utils.isAccessibleInput(adjInv,side)) {
    IItemHandler inv=adjInv.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY,side.getOpposite());
    for (int i=0; i < inv.getSlots() && amount > 0; i++) {
      ItemStack queryStack=inv.extractItem(i,amount,true);
      if (queryStack == null) {
        continue;
      }
      if (stack == null) {
        if (isItemValidForSlot(slot,queryStack)) {
          int toExtract=Math.min(amount,queryStack.stackSize);
          stack=inv.extractItem(i,toExtract,false);
          amount-=toExtract;
        }
      }
 else       if (ItemHelper.itemsEqualWithMetadata(stack,queryStack,true)) {
        int toExtract=Math.min(stack.getMaxStackSize() - stack.stackSize,Math.min(amount,queryStack.stackSize));
        ItemStack extracted=inv.extractItem(slot,toExtract,false);
        toExtract=Math.min(toExtract,extracted == null ? 0 : extracted.stackSize);
        stack.stackSize+=toExtract;
        amount-=toExtract;
      }
    }
    if (initialAmount != amount) {
      inventory[slot]=stack;
      adjInv.markDirty();
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean extractItem(int slot,int amount,EnumFacing side){
  if (slot > inventory.length) {
    return false;
  }
  ItemStack stack=inventory[slot];
  if (stack != null) {
    amount=Math.min(amount,stack.getMaxStackSize() - stack.stackSize);
    stack=inventory[slot].copy();
  }
  int initialAmount=amount;
  TileEntity adjInv=BlockHelper.getAdjacentTileEntity(this,side);
  if (Utils.isAccessibleInput(adjInv,side)) {
    IItemHandler inv=adjInv.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY,side.getOpposite());
    for (int i=0; i < inv.getSlots() && amount > 0; i++) {
      ItemStack queryStack=inv.extractItem(i,amount,true);
      if (queryStack == null) {
        continue;
      }
      if (stack == null) {
        if (isItemValidForSlot(slot,queryStack)) {
          int toExtract=Math.min(amount,queryStack.stackSize);
          stack=inv.extractItem(i,toExtract,false);
          amount-=toExtract;
        }
      }
 else       if (ItemHelper.itemsEqualWithMetadata(stack,queryStack,true)) {
        int toExtract=Math.min(stack.getMaxStackSize() - stack.stackSize,Math.min(amount,queryStack.stackSize));
        ItemStack extracted=inv.extractItem(i,toExtract,false);
        toExtract=Math.min(toExtract,extracted == null ? 0 : extracted.stackSize);
        stack.stackSize+=toExtract;
        amount-=toExtract;
      }
    }
    if (initialAmount != amount) {
      inventory[slot]=stack;
      adjInv.markDirty();
      return true;
    }
  }
  return false;
}
Program: 59412
Project: 59412
Buggy source:
public static int getEnergyValue(ItemStack stack){
  if (stack == null) {
    return 0;
  }
  int energy=fuels.get(new ComparableItemStack(stack));
  return energy > 0 ? energy : GameRegistry.getFuelValue(stack) * CoreProps.RF_PER_MJ * 3 / 2;
}

Fixed version (ground truth):
public static int getEnergyValue(ItemStack stack){
  if (stack == null) {
    return 0;
  }
  if (stack.getItem().hasContainerItem(stack)) {
    return 0;
  }
  int energy=fuels.get(new ComparableItemStack(stack));
  return energy > 0 ? energy : TileEntityFurnace.getItemBurnTime(stack) * CoreProps.RF_PER_MJ;
}
Program: 59413
Project: 59413
Buggy source:
@Override protected void transferOutput(){
  transferHandler();
  if (!enableAutoOutput) {
    return;
  }
  int side;
  for (int i=outputTracker + 1; i <= outputTracker + 6; i++) {
    side=i % 6;
    if (sideCache[side] == 2 || sideCache[side] == 4) {
      if (transferItem(2,ITEM_TRANSFER[level],EnumFacing.VALUES[side])) {
        outputTracker=side;
        break;
      }
    }
  }
}

Fixed version (ground truth):
@Override protected void transferOutput(){
  if (!enableAutoOutput) {
    return;
  }
  int side;
  for (int i=outputTracker + 1; i <= outputTracker + 6; i++) {
    side=i % 6;
    if (sideCache[side] == 2 || sideCache[side] == 4) {
      if (transferItem(2,ITEM_TRANSFER[level],EnumFacing.VALUES[side])) {
        outputTracker=side;
        break;
      }
    }
  }
}
Program: 59414
Project: 59414
Buggy source:
private void updateHandler(){
  boolean curActive=isActive;
  if (isActive) {
    processTick();
    if (processRem <= 0) {
      if (processFinishHandler()) {
        transferOutput();
        transferInput();
      }
      energyStorage.modifyEnergyStored(-processRem);
      if (!redstoneControlOrDisable() || !canStartHandler()) {
        processOff();
      }
 else {
        processStartHandler();
      }
    }
  }
 else   if (redstoneControlOrDisable()) {
    if (timeCheck() && !canStartHandler()) {
      transferOutput();
      transferInput();
    }
    if (timeCheckEighth() && canStartHandler()) {
      processStartHandler();
      processTick();
      isActive=true;
    }
  }
  updateIfChanged(curActive);
  chargeEnergy();
}

Fixed version (ground truth):
private void updateHandler(){
  boolean curActive=isActive;
  if (isActive) {
    processTick();
    if (processRem <= 0) {
      if (processFinishHandler()) {
        transferHandler();
        transferOutput();
        transferInput();
      }
      energyStorage.modifyEnergyStored(-processRem);
      if (!redstoneControlOrDisable() || !canStartHandler()) {
        processOff();
      }
 else {
        processStartHandler();
      }
    }
  }
 else   if (redstoneControlOrDisable()) {
    if (timeCheck()) {
      transferOutput();
      transferInput();
    }
    if (timeCheckEighth() && canStartHandler()) {
      processStartHandler();
      processTick();
      isActive=true;
    }
  }
  updateIfChanged(curActive);
  chargeEnergy();
}
Program: 59415
Project: 59415
Buggy source:
private boolean fillHandler(){
  IFluidHandler handler=inventory[1].getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY,null);
  int filled=tank.getFluid() == null ? 0 : handler.fill(new FluidStack(tank.getFluid(),Fluid.BUCKET_VOLUME),true);
  IFluidTankProperties[] tankProperties=handler.getTankProperties();
  if (filled > 0) {
    tank.drain(filled,true);
    if (tankProperties[0].getContents().amount >= tankProperties[0].getCapacity()) {
      return true;
    }
    return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean fillHandler(){
  IFluidHandler handler=inventory[1].getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY,null);
  int filled=tank.getFluid() == null ? 0 : handler.fill(new FluidStack(tank.getFluid(),Fluid.BUCKET_VOLUME),true);
  IFluidTankProperties[] tankProperties=handler.getTankProperties();
  if (tankProperties == null || tankProperties.length < 1) {
    return true;
  }
  if (filled > 0) {
    tank.drain(filled,true);
    if (tankProperties[0].getContents().amount >= tankProperties[0].getCapacity()) {
      return true;
    }
    return false;
  }
  return true;
}
Program: 59416
Project: 59416
Buggy source:
private boolean emptyHandler(){
  IFluidHandler handler=inventory[1].getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY,null);
  FluidStack drainStack=handler.drain(Fluid.BUCKET_VOLUME,true);
  int drained=drainStack == null ? 0 : drainStack.amount;
  IFluidTankProperties[] tankProperties=handler.getTankProperties();
  if (drained > 0) {
    tank.fill(drainStack,true);
    if (tankProperties[0].getContents() == null) {
      return true;
    }
    return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean emptyHandler(){
  IFluidHandler handler=inventory[1].getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY,null);
  FluidStack drainStack=handler.drain(Fluid.BUCKET_VOLUME,true);
  int drained=drainStack == null ? 0 : drainStack.amount;
  IFluidTankProperties[] tankProperties=handler.getTankProperties();
  if (tankProperties == null || tankProperties.length < 1) {
    return true;
  }
  if (drained > 0) {
    tank.fill(drainStack,true);
    if (tankProperties[0].getContents() == null) {
      return true;
    }
    return false;
  }
  return true;
}
Program: 59417
Project: 59417
Buggy source:
public BlockTank(){
  super(Material.GLASS);
  setUnlocalizedName("String_Node_Str");
  setHardness(15.0F);
  setResistance(25.0F);
}

Fixed version (ground truth):
public BlockTank(){
  super(Material.GLASS);
  setUnlocalizedName("String_Node_Str");
  setHardness(15.0F);
  setResistance(25.0F);
  basicGui=false;
}
Program: 59419
Project: 59419
Buggy source:
public static void initialize(IModRegistry registry){
  IJeiHelpers jeiHelpers=registry.getJeiHelpers();
  IGuiHelper guiHelper=jeiHelpers.getGuiHelper();
  registry.addRecipeHandlers(new DynamoFuelHandler());
  initSteamCategory(registry,guiHelper);
  initMagmaticCategory(registry,guiHelper);
  initCompressionCategory(registry,guiHelper);
  initReactantItemCategory(registry,guiHelper);
  initReactantFluidCategory(registry,guiHelper);
  initEnervation(registry,guiHelper);
  initNumismatic(registry,guiHelper);
  initCoolantCategory(registry,guiHelper);
}

Fixed version (ground truth):
public static void initialize(IModRegistry registry){
  IJeiHelpers jeiHelpers=registry.getJeiHelpers();
  IGuiHelper guiHelper=jeiHelpers.getGuiHelper();
  registry.addRecipeHandlers(new DynamoFuelHandler());
  initSteam(registry,guiHelper);
  initMagmatic(registry,guiHelper);
  initCompression(registry,guiHelper);
  initReactantFluid(registry,guiHelper);
  initReactantSolid(registry,guiHelper);
  initEnervation(registry,guiHelper);
  initNumismatic(registry,guiHelper);
  initCoolantCategory(registry,guiHelper);
}
Program: 59420
Project: 59420
Buggy source:
@Override @SideOnly(Side.CLIENT) public void registerModels(){
  final ModelResourceLocation location=new ModelResourceLocation("String_Node_Str","String_Node_Str");
  ModelLoader.setCustomMeshDefinition(this,new ItemMeshDefinition(){
    @Override public ModelResourceLocation getModelLocation(    ItemStack stack){
      return location;
    }
  }
);
  ModelRegistryHelper.register(location,new CCBakeryModel("String_Node_Str"));
  BlockBakery.registerItemKeyGenerator(this,new IItemStackKeyGenerator(){
    @Override public String generateKey(    ItemStack stack){
      String fluid="String_Node_Str";
      if (stack.getTagCompound() != null) {
        fluid="String_Node_Str" + stack.getTagCompound().getString("String_Node_Str");
      }
      return BlockBakery.defaultItemKeyGenerator.generateKey(stack) + fluid;
    }
  }
);
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public void registerModels(){
  final ModelResourceLocation location=new ModelResourceLocation("String_Node_Str","String_Node_Str");
  ModelLoader.setCustomMeshDefinition(this,new ItemMeshDefinition(){
    @Override public ModelResourceLocation getModelLocation(    ItemStack stack){
      return location;
    }
  }
);
  ModelLoader.setCustomModelResourceLocation(this,0,location);
  ModelRegistryHelper.register(location,new CCBakeryModel("String_Node_Str"));
  BlockBakery.registerItemKeyGenerator(this,new IItemStackKeyGenerator(){
    @Override public String generateKey(    ItemStack stack){
      String fluid="String_Node_Str";
      if (stack.getTagCompound() != null) {
        fluid="String_Node_Str" + stack.getTagCompound().getString("String_Node_Str");
      }
      return BlockBakery.defaultItemKeyGenerator.generateKey(stack) + fluid;
    }
  }
);
}
Program: 59421
Project: 59421
Buggy source:
@Override public ItemStack decrStackSize(int slot,int amount){
  updateClient=true;
  return super.decrStackSize(slot,amount);
}

Fixed version (ground truth):
@Override public ItemStack decrStackSize(int slot,int amount){
  ItemStack result=super.decrStackSize(slot,amount);
  updateClient=true;
  return result;
}
Program: 59422
Project: 59422
Buggy source:
@Override public void setInventorySlotContents(int slot,ItemStack stack){
  updateClient=true;
  super.setInventorySlotContents(slot,stack);
}

Fixed version (ground truth):
@Override public void setInventorySlotContents(int slot,ItemStack stack){
  super.setInventorySlotContents(slot,stack);
  updateClient=true;
}