nus-yam/ex-repair huggingface dataset:
Program: 109829
Project: 109829
Buggy source:
/** 
 * Helper method for registering slabs, since they're pretty funky
 * @param block
 * @param singleSlab
 * @param doubleSlab
 * @param name
 * @return
 */
private static BlockSlab registerSlab(BlockSlab block,BlockSlab singleSlab,BlockSlab doubleSlab,String name){
  block=registerBlock(block,new ItemTropicraftSlab(block,singleSlab,doubleSlab),name,false,CreativeTabRegistry.tropicraftTab);
  ImmutableSet<IBlockState> presets=getBlockPresets(block);
  ITropicraftBlock tcBlock=(ITropicraftBlock)block;
  if (presets.isEmpty()) {
    registerBlockVariant(block,name,0);
  }
 else {
    for (    IBlockState state : presets) {
      String stateName=tcBlock.getStateName(state);
      int stateMeta=block.getMetaFromState(state);
      registerBlockVariant(block,name,stateMeta,stateName);
    }
  }
  block.setCreativeTab(CreativeTabRegistry.tropicraftTab);
  return block;
}

Fixed version (ground truth):
/** 
 * Helper method for registering slabs, since they're pretty funky
 * @param block
 * @param singleSlab
 * @param doubleSlab
 * @param name
 * @return
 */
private static BlockSlab registerSlab(BlockSlab block,BlockSlab singleSlab,BlockSlab doubleSlab,String name){
  block=registerBlock(block,new ItemTropicraftSlab(block,singleSlab,doubleSlab),name,false,CreativeTabRegistry.tropicraftTab);
  ImmutableSet<IBlockState> presets=getBlockPresets(block);
  ITropicraftBlock tcBlock=(ITropicraftBlock)block;
  if (presets.isEmpty()) {
    registerBlockVariant(block,name,0);
  }
 else {
    for (    IBlockState state : presets) {
      String stateName=tcBlock.getStateName(state);
      int stateMeta=block.getMetaFromState(state);
      registerBlockVariant(block,stateName,stateMeta,null);
    }
  }
  block.setCreativeTab(CreativeTabRegistry.tropicraftTab);
  return block;
}
Program: 109830
Project: 109830
Buggy source:
/** 
 * Register a block with metadata
 * @param block Block being registered
 * @param name Name of the image prefix
 * @param names Names of the images
 */
private static <T extends Block & ITropicraftBlock>T registerMultiBlock(T block,Class<? extends ItemBlock> clazz,String name,Object... itemCtorArgs){
  try {
    Class<?>[] ctorArgClasses=new Class<?>[itemCtorArgs.length + 1];
    ctorArgClasses[0]=Block.class;
    for (int idx=1; idx < ctorArgClasses.length; idx++) {
      ctorArgClasses[idx]=itemCtorArgs[idx - 1].getClass();
    }
    ItemBlock itemBlockInstance;
    if (clazz != null) {
      Constructor<? extends ItemBlock> itemConstructor=clazz.getConstructor(ctorArgClasses);
      itemBlockInstance=itemConstructor.newInstance(ObjectArrays.concat(block,itemCtorArgs));
    }
 else {
      itemBlockInstance=null;
    }
    block=registerBlock(block,itemBlockInstance,name,false,CreativeTabRegistry.tropicraftTab);
    ImmutableSet<IBlockState> presets=getBlockPresets(block);
    if (presets.isEmpty()) {
      registerBlockVariant(block,name,0);
    }
 else {
      for (      IBlockState state : presets) {
        String stateName=block.getStateName(state);
        int stateMeta=block.getMetaFromState(state);
        registerBlockVariant(block,name,stateMeta,stateName);
      }
    }
    block.setCreativeTab(CreativeTabRegistry.tropicraftTab);
    return block;
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str" + name);
    e.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Register a block with metadata
 * @param block Block being registered
 * @param name Name of the image prefix
 * @param names Names of the images
 */
private static <T extends Block & ITropicraftBlock>T registerMultiBlock(T block,Class<? extends ItemBlock> clazz,String name,Object... itemCtorArgs){
  try {
    Class<?>[] ctorArgClasses=new Class<?>[itemCtorArgs.length + 1];
    ctorArgClasses[0]=Block.class;
    for (int idx=1; idx < ctorArgClasses.length; idx++) {
      ctorArgClasses[idx]=itemCtorArgs[idx - 1].getClass();
    }
    ItemBlock itemBlockInstance;
    if (clazz != null) {
      Constructor<? extends ItemBlock> itemConstructor=clazz.getConstructor(ctorArgClasses);
      itemBlockInstance=itemConstructor.newInstance(ObjectArrays.concat(block,itemCtorArgs));
    }
 else {
      itemBlockInstance=null;
    }
    block=registerBlock(block,itemBlockInstance,name,false,CreativeTabRegistry.tropicraftTab);
    ImmutableSet<IBlockState> presets=getBlockPresets(block);
    if (presets.isEmpty()) {
      registerBlockVariant(block,name,0);
    }
 else {
      for (      IBlockState state : presets) {
        String stateName=block.getStateName(state);
        int stateMeta=block.getMetaFromState(state);
        registerBlockVariant(block,stateName,stateMeta,null);
      }
    }
    block.setCreativeTab(CreativeTabRegistry.tropicraftTab);
    return block;
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str" + name);
    e.printStackTrace();
  }
  return null;
}
Program: 109831
Project: 109831
Buggy source:
public HashMap<Integer,Block> genBlockIDSchemToBlockWithRegistry(NBTTagCompound parMappingNBT){
  HashMap<String,Block> swapMap=new HashMap<String,Block>();
  HashMap<Integer,Block> finalMap=new HashMap<Integer,Block>();
  try {
    Set set=Block.blockRegistry.getKeys();
    Iterator it=set.iterator();
    while (it.hasNext()) {
      String tagName=(String)it.next();
      Block block=(Block)Block.blockRegistry.getObject(tagName);
      if (block != null) {
        if (!block.getUnlocalizedName().equals("String_Node_Str")) {
          swapMap.put(CoroUtilBlock.getNameByBlock(block),block);
        }
      }
    }
    it=parMappingNBT.getKeySet().iterator();
    while (it.hasNext()) {
      String tagName=(String)it.next();
      int tag=parMappingNBT.getInteger(tagName);
      if (swapMap.get(tagName) != null) {
        finalMap.put(tag,swapMap.get(tagName));
      }
 else {
        System.out.println("String_Node_Str" + tag);
      }
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
  return finalMap;
}

Fixed version (ground truth):
public HashMap<Integer,Block> genBlockIDSchemToBlockWithRegistry(NBTTagCompound parMappingNBT){
  HashMap<String,Block> swapMap=new HashMap<String,Block>();
  HashMap<Integer,Block> finalMap=new HashMap<Integer,Block>();
  try {
    Set set=Block.REGISTRY.getKeys();
    Iterator it=set.iterator();
    while (it.hasNext()) {
      ResourceLocation tagName=(ResourceLocation)it.next();
      Block block=Block.REGISTRY.getObject(tagName);
      if (block != null) {
        if (!block.getUnlocalizedName().equals("String_Node_Str")) {
          swapMap.put(tagName.toString(),block);
        }
      }
    }
    it=parMappingNBT.getKeySet().iterator();
    while (it.hasNext()) {
      String tagName=(String)it.next();
      int tag=parMappingNBT.getInteger(tagName);
      if (swapMap.get(tagName) != null) {
        finalMap.put(tag,swapMap.get(tagName));
      }
 else {
        System.out.println("String_Node_Str" + tag);
      }
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
  return finalMap;
}
Program: 109832
Project: 109832
Buggy source:
public void scanLevelToData(World worldObj){
  resetData();
  for (int xx=0; xx < map_sizeX; xx++) {
    for (int yy=0; yy < map_sizeY; yy++) {
      for (int zz=0; zz < map_sizeZ; zz++) {
        int index=yy * map_sizeX * map_sizeZ + zz * map_sizeX + xx;
        World worldRef=worldObj;
        build_blockIDArr[xx][yy][zz]=worldRef.getBlock(map_coord_minX + xx,map_coord_minY + yy,map_coord_minZ + zz);
        build_blockMetaArr[xx][yy][zz]=worldRef.getBlockMetadata(map_coord_minX + xx,map_coord_minY + yy,map_coord_minZ + zz);
      }
    }
  }
}

Fixed version (ground truth):
public void scanLevelToData(World worldObj){
  resetData();
  for (int xx=0; xx < map_sizeX; xx++) {
    for (int yy=0; yy < map_sizeY; yy++) {
      for (int zz=0; zz < map_sizeZ; zz++) {
        int index=yy * map_sizeX * map_sizeZ + zz * map_sizeX + xx;
        World worldRef=worldObj;
        IBlockState state=worldRef.getBlockState(new BlockPos(map_coord_minX + xx,map_coord_minY + yy,map_coord_minZ + zz));
        build_blockIDArr[xx][yy][zz]=state.getBlock();
        build_blockMetaArr[xx][yy][zz]=state.getBlock().getMetaFromState(state);
      }
    }
  }
}
Program: 109833
Project: 109833
Buggy source:
public Block getConvertInternalIDToBlock(int internalID){
  Block block=null;
  if (!getVersion().equals("String_Node_Str") || internalID > blockIDHighestVanilla) {
    if (blockMappingInternalIDToBlock.containsKey(internalID)) {
      block=blockMappingInternalIDToBlock.get(internalID);
      if (block == null) {
        System.out.println("String_Node_Str" + internalID);
      }
    }
 else {
      System.out.println("String_Node_Str" + internalID);
    }
  }
 else {
    block=(Block)Block.blockRegistry.getObjectById(internalID);
    if (block == null) {
      System.out.println("String_Node_Str" + internalID);
    }
  }
  return block;
}

Fixed version (ground truth):
public Block getConvertInternalIDToBlock(int internalID){
  Block block=null;
  if (!getVersion().equals("String_Node_Str") || internalID > blockIDHighestVanilla) {
    if (blockMappingInternalIDToBlock.containsKey(internalID)) {
      block=blockMappingInternalIDToBlock.get(internalID);
      if (block == null) {
        System.out.println("String_Node_Str" + internalID);
      }
    }
 else {
      System.out.println("String_Node_Str" + internalID);
    }
  }
 else {
    block=Block.REGISTRY.getObjectById(internalID);
    if (block == null) {
      System.out.println("String_Node_Str" + internalID);
    }
  }
  return block;
}
Program: 109835
Project: 109835
Buggy source:
public HashMap<Integer,Block> genBlockIDSchemToBlockWithUnlocalizedName(NBTTagCompound parMappingNBT){
  HashMap<String,Block> swapMap=new HashMap<String,Block>();
  HashMap<Integer,Block> finalMap=new HashMap<Integer,Block>();
  try {
    Set set=Block.blockRegistry.getKeys();
    Iterator it=set.iterator();
    while (it.hasNext()) {
      String tagName=(String)it.next();
      Block block=(Block)Block.blockRegistry.getObject(tagName);
      if (block != null) {
        if (!block.getUnlocalizedName().equals("String_Node_Str")) {
          swapMap.put(block.getUnlocalizedName(),block);
        }
      }
    }
    it=parMappingNBT.getKeySet().iterator();
    while (it.hasNext()) {
      String tagName=(String)it.next();
      int tag=parMappingNBT.getInteger(tagName);
      if (swapMap.get(tagName) == null && !tagName.contains("String_Node_Str")) {
        tagName=tagName.replace("String_Node_Str","String_Node_Str");
      }
      if (swapMap.get(tagName) != null) {
        finalMap.put(tag,swapMap.get(tagName));
      }
 else {
        System.out.println("String_Node_Str" + tag + "String_Node_Str"+ tagName);
      }
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
  return finalMap;
}

Fixed version (ground truth):
public HashMap<Integer,Block> genBlockIDSchemToBlockWithUnlocalizedName(NBTTagCompound parMappingNBT){
  HashMap<String,Block> swapMap=new HashMap<String,Block>();
  HashMap<Integer,Block> finalMap=new HashMap<Integer,Block>();
  try {
    Set set=Block.REGISTRY.getKeys();
    Iterator it=set.iterator();
    while (it.hasNext()) {
      ResourceLocation tagName=(ResourceLocation)it.next();
      Block block=Block.REGISTRY.getObject(tagName);
      if (block != null) {
        if (!block.getUnlocalizedName().equals("String_Node_Str")) {
          swapMap.put(block.getUnlocalizedName(),block);
        }
      }
    }
    it=parMappingNBT.getKeySet().iterator();
    while (it.hasNext()) {
      String tagName=(String)it.next();
      int tag=parMappingNBT.getInteger(tagName);
      if (swapMap.get(tagName) == null && !tagName.contains("String_Node_Str")) {
        tagName=tagName.replace("String_Node_Str","String_Node_Str");
      }
      if (swapMap.get(tagName) != null) {
        finalMap.put(tag,swapMap.get(tagName));
      }
 else {
        System.out.println("String_Node_Str" + tag + "String_Node_Str"+ tagName);
      }
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
  return finalMap;
}
Program: 109836
Project: 109836
Buggy source:
public HashMap<Block,Integer> getBlockToInternalIDMap(){
  HashMap<Block,Integer> map=new HashMap<Block,Integer>();
  Set set=Block.blockRegistry.getKeys();
  Iterator it=set.iterator();
  int i=0;
  while (it.hasNext()) {
    String tagName=(String)it.next();
    Block block=(Block)Block.blockRegistry.getObject(tagName);
    if (block != null) {
      if (!block.getUnlocalizedName().equals("String_Node_Str")) {
        map.put(block,i);
        i++;
      }
    }
  }
  return map;
}

Fixed version (ground truth):
public HashMap<Block,Integer> getBlockToInternalIDMap(){
  HashMap<Block,Integer> map=new HashMap<Block,Integer>();
  Set set=Block.REGISTRY.getKeys();
  Iterator it=set.iterator();
  int i=0;
  while (it.hasNext()) {
    ResourceLocation tagName=(ResourceLocation)it.next();
    Block block=Block.REGISTRY.getObject(tagName);
    if (block != null) {
      if (!block.getUnlocalizedName().equals("String_Node_Str")) {
        map.put(block,i);
        i++;
      }
    }
  }
  return map;
}
Program: 109837
Project: 109837
Buggy source:
public NBTTagCompound genBlockIDToNameMap(){
  NBTTagCompound nbt=new NBTTagCompound();
  Set set=Block.blockRegistry.getKeys();
  Iterator it=set.iterator();
  int i=0;
  while (it.hasNext()) {
    String tagName=(String)it.next();
    Block block=(Block)Block.blockRegistry.getObject(tagName);
    if (block != null) {
      if (!block.getUnlocalizedName().equals("String_Node_Str")) {
        nbt.setInteger(CoroUtilBlock.getNameByBlock(block),i);
        i++;
      }
    }
  }
  return nbt;
}

Fixed version (ground truth):
public NBTTagCompound genBlockIDToNameMap(){
  NBTTagCompound nbt=new NBTTagCompound();
  Set set=Block.REGISTRY.getKeys();
  Iterator it=set.iterator();
  int i=0;
  while (it.hasNext()) {
    ResourceLocation tagName=(ResourceLocation)it.next();
    Block block=Block.REGISTRY.getObject(tagName);
    if (block != null) {
      if (!block.getUnlocalizedName().equals("String_Node_Str")) {
        nbt.setInteger(tagName.toString(),i);
        i++;
      }
    }
  }
  return nbt;
}
Program: 109838
Project: 109838
Buggy source:
public static void rotateSet(BuildJob parBuildJob,BlockPos coords,Block id,int meta){
  coords=rotate(coords,parBuildJob.direction,new Vec3d(parBuildJob.build_startX,parBuildJob.build_startY,parBuildJob.build_startZ),new Vec3d(parBuildJob.build.map_sizeX,parBuildJob.build.map_sizeY,parBuildJob.build.map_sizeZ));
  World world=DimensionManager.getWorld(parBuildJob.build.dim);
  if (world != null) {
    world.setBlock(coords.getX(),coords.getY(),coords.getZ(),id,meta,2);
  }
}

Fixed version (ground truth):
public static void rotateSet(BuildJob parBuildJob,BlockPos coords,Block id,int meta){
  coords=rotate(coords,parBuildJob.direction,new Vec3d(parBuildJob.build_startX,parBuildJob.build_startY,parBuildJob.build_startZ),new Vec3d(parBuildJob.build.map_sizeX,parBuildJob.build.map_sizeY,parBuildJob.build.map_sizeZ));
  World world=DimensionManager.getWorld(parBuildJob.build.dim);
  if (world != null) {
    world.setBlockState(coords,id.getDefaultState(),2);
  }
}
Program: 109841
Project: 109841
Buggy source:
public void renderScubaGear(Entity entityIn,float limbSwing,float limbSwingAmount,float ageInTicks,float netHeadYaw,float headPitch,float scale,boolean renderHead){
  hose4.rotateAngleX=0.3075211F;
  if (!(entityIn instanceof EntityPlayer))   return;
  EntityPlayer player=(EntityPlayer)entityIn;
  boolean showHead=player.getItemStackFromSlot(EntityEquipmentSlot.HEAD) != null;
  bipedHead.showModel=showHead;
  if (showHead) {
    hose6.rotateAngleX=0F;
    hose6.rotateAngleY=0F;
    hose6.rotateAngleZ=0F;
    hose6.renderWithRotation(scale);
  }
  boolean showChest=player.getItemStackFromSlot(EntityEquipmentSlot.CHEST) != null;
  bipedBody.showModel=showChest;
  if (showChest) {
    renderTank(entityIn,limbSwing,limbSwingAmount,ageInTicks,netHeadYaw,headPitch,scale);
    renderBCD(entityIn,limbSwing,limbSwingAmount,ageInTicks,netHeadYaw,headPitch,scale);
  }
  boolean showLegs=player.getItemStackFromSlot(EntityEquipmentSlot.FEET) != null;
  bipedRightLeg.showModel=showLegs;
  bipedLeftLeg.showModel=showLegs;
  if (renderHead) {
    bipedHead.render(scale);
  }
  bipedBody.render(scale);
  bipedRightArm.render(scale);
  bipedLeftArm.render(scale);
  bipedRightLeg.render(scale);
  bipedLeftLeg.render(scale);
}

Fixed version (ground truth):
public void renderScubaGear(Entity entityIn,float limbSwing,float limbSwingAmount,float ageInTicks,float netHeadYaw,float headPitch,float scale,boolean renderHead){
  hose4.rotateAngleX=0.3075211F;
  if (!(entityIn instanceof EntityPlayer))   return;
  EntityPlayer player=(EntityPlayer)entityIn;
  boolean showHead=player.getItemStackFromSlot(EntityEquipmentSlot.HEAD) != null && this.slot == EntityEquipmentSlot.HEAD;
  bipedHead.showModel=showHead;
  if (showHead) {
    hose6.rotateAngleX=0F;
    hose6.rotateAngleY=0F;
    hose6.rotateAngleZ=0F;
    hose6.renderWithRotation(scale);
  }
  boolean showChest=player.getItemStackFromSlot(EntityEquipmentSlot.CHEST) != null && this.slot == EntityEquipmentSlot.CHEST;
  bipedBody.showModel=showChest;
  if (showChest) {
    renderTank(entityIn,limbSwing,limbSwingAmount,ageInTicks,netHeadYaw,headPitch,scale);
    renderBCD(entityIn,limbSwing,limbSwingAmount,ageInTicks,netHeadYaw,headPitch,scale);
  }
  boolean showLegs=player.getItemStackFromSlot(EntityEquipmentSlot.FEET) != null && this.slot == EntityEquipmentSlot.FEET;
  bipedRightLeg.showModel=showLegs;
  bipedLeftLeg.showModel=showLegs;
  if (renderHead) {
    bipedHead.render(scale);
  }
  bipedBody.render(scale);
  bipedRightArm.render(scale);
  bipedLeftArm.render(scale);
  bipedRightLeg.render(scale);
  bipedLeftLeg.render(scale);
}
Program: 109844
Project: 109844
Buggy source:
@Override public String getArmorTexture(ItemStack stack,Entity entity,EntityEquipmentSlot slot,String type){
  return Info.ARMOR_LOCATION + "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getArmorTexture(ItemStack stack,Entity entity,EntityEquipmentSlot slot,String type){
  String color=scubaMaterial == ScubaMaterial.DRY ? "String_Node_Str" : "String_Node_Str";
  return Info.ARMOR_LOCATION + "String_Node_Str" + color+ "String_Node_Str";
}
Program: 109845
Project: 109845
Buggy source:
/** 
 * Override this method to have an item handle its own armor rendering.
 * @param entityLiving  The entity wearing the armor
 * @param itemStack  The itemStack to render the model of
 * @param armorSlot  The slot the armor is in
 * @param _default Original armor model. Will have attributes set.
 * @return  A ModelBiped to render instead of the default
 */
@Override @SideOnly(Side.CLIENT) public net.minecraft.client.model.ModelBiped getArmorModel(EntityLivingBase entityLiving,ItemStack itemstack,EntityEquipmentSlot armorSlot,net.minecraft.client.model.ModelBiped _default){
  if (itemstack == null) {
    return null;
  }
  ModelBiped armorModel=EntityRenderRegistry.scubaGearModel;
  if (armorModel != null) {
    armorModel.isSneak=entityLiving.isSneaking();
    armorModel.isRiding=entityLiving.isRiding();
    armorModel.isChild=entityLiving.isChild();
    armorModel.rightArmPose=entityLiving.getHeldItemMainhand() != null ? ModelBiped.ArmPose.BLOCK : ModelBiped.ArmPose.EMPTY;
    return armorModel;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Override this method to have an item handle its own armor rendering.
 * @param entityLiving  The entity wearing the armor
 * @param itemStack  The itemStack to render the model of
 * @param armorSlot  The slot the armor is in
 * @param _default Original armor model. Will have attributes set.
 * @return  A ModelBiped to render instead of the default
 */
@Override @SideOnly(Side.CLIENT) public net.minecraft.client.model.ModelBiped getArmorModel(EntityLivingBase entityLiving,ItemStack itemstack,EntityEquipmentSlot armorSlot,net.minecraft.client.model.ModelBiped _default){
  if (itemstack == null) {
    return null;
  }
  ModelBiped armorModel;
  armorModel=EntityRenderRegistry.getScubaModel(armorSlot);
  if (armorModel != null) {
    armorModel.isSneak=entityLiving.isSneaking();
    armorModel.isRiding=entityLiving.isRiding();
    armorModel.isChild=entityLiving.isChild();
    armorModel.rightArmPose=entityLiving.getHeldItemMainhand() != null ? ModelBiped.ArmPose.BLOCK : ModelBiped.ArmPose.EMPTY;
    return armorModel;
  }
  return null;
}
Program: 109849
Project: 109849
Buggy source:
@Override public void updateTick(World worldIn,BlockPos pos,IBlockState state,Random rand){
  if (worldIn.isAirBlock(pos.up())) {
    int height;
    BlockPos ground=pos;
    for (height=1; worldIn.getBlockState(ground=ground.down()).getBlock() == this; ++height)     ;
    if (height < MAX_HEIGHT) {
      worldIn.setBlockState(pos.up(),getDefaultState());
    }
  }
  super.updateTick(worldIn,pos,state,rand);
}

Fixed version (ground truth):
@Override public void updateTick(World worldIn,BlockPos pos,IBlockState state,Random rand){
  if (worldIn.isAirBlock(pos.up())) {
    int height;
    BlockPos ground=pos;
    for (height=1; worldIn.getBlockState(ground=ground.down()).getBlock() == this; ++height)     ;
    if (height < MAX_HEIGHT && worldIn.rand.nextInt(worldIn.getBlockState(ground).getBlock().isFertile(worldIn,ground) ? GROWTH_RATE_FERTILE : GROWTH_RATE_INFERTILE) == 0) {
      worldIn.setBlockState(pos.up(),getDefaultState());
    }
  }
  super.updateTick(worldIn,pos,state,rand);
}
Program: 109850
Project: 109850
Buggy source:
@Override public int getColorFromItemstack(ItemStack stack,int tintIndex){
  return SandColors.getColor(tintIndex);
}

Fixed version (ground truth):
@Override public int getColorFromItemstack(ItemStack stack,int tintIndex){
  return SandColors.getColor(tintIndex - 1);
}
Program: 109851
Project: 109851
Buggy source:
private void checkMouseHover(ItemStack itemstack,int k,int l,int size){
  float scale;
switch (mc.gameSettings.guiScale) {
case 1:
    scale=4F;
  break;
case 2:
scale=2F;
break;
case 3:
scale=3F;
break;
default :
scale=2F;
}
int i=(int)(Mouse.getEventX() / scale);
int j=(int)(height - Mouse.getEventY() / scale);
boolean flag=(i >= k && j >= l && i < k + size && j < l + size);
if (itemstack != null && flag) {
String s=itemstack.getItem().getItemStackDisplayName(itemstack);
if (s.length() > 0) {
RenderHelper.disableStandardItemLighting();
GlStateManager.disableLighting();
GlStateManager.disableDepth();
int l2=fontRendererObj.getStringWidth(s);
int i2=i - l2 - 4;
int k2=j;
drawGradientRect(i2 - 3,k2 - 3,i2 + l2 + 3,k2 + 8 + 3,0xc0000000,0xc0000000);
fontRendererObj.drawStringWithShadow(s,i2,k2,-1);
GlStateManager.enableLighting();
GlStateManager.enableDepth();
}
}
}

Fixed version (ground truth):
/** 
 * Draw the name of an item when it's hovered over in game
 * @param itemstack ItemStack being hovered over
 * @param k x coord
 * @param l y coord
 * @param size size...of something idk what :D
 */
private void checkMouseHover(ItemStack itemstack,int k,int l,int size){
  int i=Mouse.getEventX() * this.width / this.mc.displayWidth;
  int j=this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1;
  boolean flag=(i >= k && j >= l && i < k + size && j < l + size);
  if (itemstack != null && flag) {
    String s=itemstack.getItem().getItemStackDisplayName(itemstack);
    if (s.length() > 0) {
      RenderHelper.disableStandardItemLighting();
      GlStateManager.disableLighting();
      GlStateManager.disableDepth();
      int l2=fontRendererObj.getStringWidth(s);
      int i2=i - l2 - 4;
      int k2=j;
      drawGradientRect(i2 - 3,k2 - 3,i2 + l2 + 3,k2 + 8 + 3,0xc0000000,0xc0000000);
      fontRendererObj.drawStringWithShadow(s,i2,k2,-1);
      GlStateManager.enableLighting();
      GlStateManager.enableDepth();
    }
  }
}
Program: 109853
Project: 109853
Buggy source:
@Override public void onBlockDestroyedByPlayer(World world,BlockPos pos,IBlockState state){
  if (!world.isRemote) {
    TorchSection section=state.getValue(SECTION);
    if (section == TorchSection.LOWER) {
      dropBlockAsItem(world,pos,state,0);
      world.setBlockToAir(pos.up());
      world.setBlockToAir(pos.up(2));
    }
 else     if (section == TorchSection.MIDDLE) {
      dropBlockAsItem(world,pos.down(),world.getBlockState(pos.down()),0);
      world.setBlockToAir(pos.down());
      world.setBlockToAir(pos.up());
    }
 else {
      dropBlockAsItem(world,pos.down(2),world.getBlockState(pos.down(2)),0);
      world.setBlockToAir(pos.down());
      world.setBlockToAir(pos.down(2));
    }
  }
}

Fixed version (ground truth):
@Override public void onBlockDestroyedByPlayer(World world,BlockPos pos,IBlockState state){
  if (!world.isRemote) {
    TorchSection section=state.getValue(SECTION);
    if (section == TorchSection.LOWER) {
      dropBlockAsItem(world,pos,state,0);
      if (world.getBlockState(pos.up()).getBlock() == this) {
        world.setBlockToAir(pos.up());
      }
      if (world.getBlockState(pos.up(2)).getBlock() == this) {
        world.setBlockToAir(pos.up(2));
      }
    }
 else     if (section == TorchSection.MIDDLE) {
      dropBlockAsItem(world,pos.down(),world.getBlockState(pos.down()),0);
      if (world.getBlockState(pos.down()).getBlock() == this) {
        world.setBlockToAir(pos.down());
      }
      if (world.getBlockState(pos.up()).getBlock() == this) {
        world.setBlockToAir(pos.up());
      }
    }
 else {
      dropBlockAsItem(world,pos.down(2),world.getBlockState(pos.down(2)),0);
      if (world.getBlockState(pos.down()).getBlock() == this) {
        world.setBlockToAir(pos.down());
      }
      if (world.getBlockState(pos.down(2)).getBlock() == this) {
        world.setBlockToAir(pos.down(2));
      }
    }
  }
}
Program: 109855
Project: 109855
Buggy source:
@Override public boolean receiveClientEvent(int id,int type){
  System.out.println("String_Node_Str");
  return super.receiveClientEvent(id,type);
}

Fixed version (ground truth):
@Override public boolean receiveClientEvent(int id,int type){
  return super.receiveClientEvent(id,type);
}
Program: 109856
Project: 109856
Buggy source:
@Override public void update(){
  if (!worldObj.isRemote) {
    System.out.println(radius + "String_Node_Str" + pos.getX()+ "String_Node_Str"+ pos.getZ()+ "String_Node_Str"+ state+ "String_Node_Str"+ lavaLevel);
    System.out.println("String_Node_Str" + ticksUntilSmoking + "String_Node_Str"+ ticksUntilRising+ "String_Node_Str"+ ticksUntilEruption+ "String_Node_Str"+ ticksUntilRetreating+ "String_Node_Str"+ ticksUntilDormant);
  }
  if (radius == -1) {
    radius=findRadius();
  }
  if (lavaLevel == -1) {
    setLavaLevel();
  }
  updateStates();
switch (state) {
case DORMANT:
    break;
case ERUPTING:
  if (!worldObj.isRemote) {
    if (worldObj.rand.nextInt(15) == 0)     throwLavaFromCaldera((worldObj.rand.nextDouble() * 0.5) + (lavaLevel > 90 ? 1 : 0.75));
    if (worldObj.rand.nextInt(15) == 0)     throwLavaFromCaldera((worldObj.rand.nextDouble() * 0.5) + (lavaLevel > 90 ? 1 : 0.75));
  }
break;
case RETREATING:
if (ticksUntilDormant % 30 == 0) {
lowerLavaLevels();
}
break;
case RISING:
if (worldObj.isRemote) {
spewSmoke();
}
if (ticksUntilEruption % 20 == 0) {
if (lavaLevel < MAX_LAVA_LEVEL_DURING_ERUPTION) {
raiseLavaLevels();
}
 else {
ticksUntilEruption=0;
worldObj.playSound(this.pos.getX(),73,this.pos.getY(),SoundEvents.ENTITY_GENERIC_EXPLODE,SoundCategory.NEUTRAL,1.0F,worldObj.rand.nextFloat() / 4 + 0.825F,false);
int balls=worldObj.rand.nextInt(25) + 15;
for (int i=0; i < balls; i++) {
throwLavaFromCaldera((worldObj.rand.nextDouble() * 0.5) + 1.25);
}
break;
}
}
break;
case SMOKING:
if (worldObj.isRemote) {
spewSmoke();
}
break;
default :
break;
}
}

Fixed version (ground truth):
@Override public void update(){
  if (!worldObj.isRemote) {
  }
  if (radius == -1) {
    radius=findRadius();
  }
  if (lavaLevel == -1) {
    setLavaLevel();
  }
  updateStates();
switch (state) {
case DORMANT:
    break;
case ERUPTING:
  if (!worldObj.isRemote) {
    if (worldObj.rand.nextInt(15) == 0)     throwLavaFromCaldera((worldObj.rand.nextDouble() * 0.5) + (lavaLevel > 90 ? 1 : 0.75));
    if (worldObj.rand.nextInt(15) == 0)     throwLavaFromCaldera((worldObj.rand.nextDouble() * 0.5) + (lavaLevel > 90 ? 1 : 0.75));
  }
break;
case RETREATING:
if (ticksUntilDormant % 30 == 0) {
lowerLavaLevels();
}
break;
case RISING:
if (worldObj.isRemote) {
spewSmoke();
}
if (ticksUntilEruption % 20 == 0) {
if (lavaLevel < MAX_LAVA_LEVEL_DURING_ERUPTION) {
raiseLavaLevels();
}
 else {
ticksUntilEruption=0;
worldObj.playSound(this.pos.getX(),73,this.pos.getY(),SoundEvents.ENTITY_GENERIC_EXPLODE,SoundCategory.NEUTRAL,1.0F,worldObj.rand.nextFloat() / 4 + 0.825F,false);
int balls=worldObj.rand.nextInt(25) + 15;
for (int i=0; i < balls; i++) {
throwLavaFromCaldera((worldObj.rand.nextDouble() * 0.5) + 1.25);
}
break;
}
}
break;
case SMOKING:
if (worldObj.isRemote) {
spewSmoke();
}
break;
default :
break;
}
}
Program: 109859
Project: 109859
Buggy source:
public static DateTime longToDateTime(long l){
  return new org.joda.time.DateTime(l);
}

Fixed version (ground truth):
@Nullable public static DateTime longToDateTime(@Nullable Long l){
  if (l == null) {
    return null;
  }
  return new org.joda.time.DateTime(l);
}
Program: 109860
Project: 109860
Buggy source:
public static long dateTimeToLong(@Nonnull DateTime d){
  return d.getMillis();
}

Fixed version (ground truth):
@Nullable public static Long dateTimeToLong(@Nullable DateTime d){
  if (d == null) {
    return null;
  }
  return d.getMillis();
}
Program: 109861
Project: 109861
Buggy source:
public static long dateTimeToLongUtc(@Nonnull DateTime d){
  return d.withZone(DateTimeZone.UTC).getMillis();
}

Fixed version (ground truth):
@Nullable public static Long dateTimeToLongUtc(@Nullable DateTime d){
  if (d == null) {
    return null;
  }
  return d.withZone(DateTimeZone.UTC).getMillis();
}
Program: 109862
Project: 109862
Buggy source:
public static long localDateTimeToLongUtc(@Nonnull LocalDateTime d){
  return d.toInstant(ZoneOffset.UTC).toEpochMilli();
}

Fixed version (ground truth):
@Nullable public static Long localDateTimeToLongUtc(@Nullable LocalDateTime d){
  if (d == null) {
    return null;
  }
  return d.toInstant(ZoneOffset.UTC).toEpochMilli();
}
Program: 109863
Project: 109863
Buggy source:
public static LocalDateTime longToLocalDateTimeUtc(long l){
  return Instant.ofEpochMilli(l).atZone(ZoneOffset.UTC).toLocalDateTime();
}

Fixed version (ground truth):
@Nullable public static LocalDateTime longToLocalDateTimeUtc(@Nullable Long l){
  if (l == null) {
    return null;
  }
  return Instant.ofEpochMilli(l).atZone(ZoneOffset.UTC).toLocalDateTime();
}
Program: 109864
Project: 109864
Buggy source:
public static LocalDateTime longToLocalDateTime(long l){
  return Instant.ofEpochMilli(l).atZone(ZoneId.systemDefault()).toLocalDateTime();
}

Fixed version (ground truth):
@Nullable public static LocalDateTime longToLocalDateTime(@Nullable Long l){
  if (l == null) {
    return null;
  }
  return Instant.ofEpochMilli(l).atZone(ZoneId.systemDefault()).toLocalDateTime();
}
Program: 109865
Project: 109865
Buggy source:
public static long localDateTimeToLong(@Nonnull LocalDateTime d){
  return d.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli();
}

Fixed version (ground truth):
@Nullable public static Long localDateTimeToLong(@Nullable LocalDateTime d){
  if (d == null) {
    return null;
  }
  return d.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli();
}
Program: 109866
Project: 109866
Buggy source:
public static long dateToLong(@Nonnull Date d){
  return d.getTime();
}

Fixed version (ground truth):
@Nullable public static Long dateToLong(@Nullable Date d){
  if (d == null) {
    return null;
  }
  return d.getTime();
}
Program: 109867
Project: 109867
Buggy source:
public static DateTime longToDateTimeUtc(long l){
  return new org.joda.time.DateTime(l,DateTimeZone.UTC);
}

Fixed version (ground truth):
@Nullable public static DateTime longToDateTimeUtc(@Nullable Long l){
  if (l == null) {
    return null;
  }
  return new org.joda.time.DateTime(l,DateTimeZone.UTC);
}
Program: 109868
Project: 109868
Buggy source:
public static Date longToDate(long l){
  return new Date(l);
}

Fixed version (ground truth):
@Nullable public static Date longToDate(@Nullable Long l){
  if (l == null) {
    return null;
  }
  return new Date(l);
}
Program: 109869
Project: 109869
Buggy source:
public void endTransaction(@Nonnull String databaseName,boolean success){
  if (success) {
    getWritableDatabase(databaseName).setTransactionSuccessful();
  }
  getWritableDatabase(databaseName).endTransaction();
  postEndTransactionEvent(success);
}

Fixed version (ground truth):
public void endTransaction(@Nonnull String databaseName,boolean success){
  if (success) {
    getWritableDatabase(databaseName).setTransactionSuccessful();
  }
  Set<String> tableNameChanges=transactionChangesTableNamesMap.get(databaseName);
  transactionChangesTableNamesMap.remove(databaseName);
  getWritableDatabase(databaseName).endTransaction();
  postEndTransactionEvent(success,getDatabaseName(),tableNameChanges);
}
Program: 109870
Project: 109870
Buggy source:
private void postUpdateEvent(@Nonnull DatabaseWrapper db,@Nonnull String tableName,int rowsAffected){
  Bus bus=getBus();
  if (bus != null) {
    if (!db.inTransaction()) {
      bus.post(new DatabaseUpdateEvent(tableName,rowsAffected));
    }
 else {
      transactionChangesTableNames.add(tableName);
    }
  }
}

Fixed version (ground truth):
private void postUpdateEvent(@Nonnull DatabaseWrapper db,@Nonnull String tableName,int rowsAffected){
  Bus bus=getBus();
  if (bus != null) {
    if (!db.inTransaction()) {
      bus.post(new DatabaseUpdateEvent(tableName,rowsAffected));
    }
 else {
      addTransactionTableNameChange(tableName);
    }
  }
}
Program: 109871
Project: 109871
Buggy source:
private void postEndTransactionEvent(boolean success){
  Bus bus=getBus();
  if (bus != null) {
    bus.post(new DatabaseEndTransactionEvent(success,transactionChangesTableNames));
    transactionChangesTableNames.clear();
  }
}

Fixed version (ground truth):
private void postEndTransactionEvent(boolean success,String databaseName,Set<String> tableNameChanges){
  Bus bus=getBus();
  if (bus != null && tableNameChanges != null) {
    bus.post(new DatabaseEndTransactionEvent(success,databaseName,tableNameChanges));
  }
}
Program: 109872
Project: 109872
Buggy source:
private void postDeleteEvent(@Nonnull DatabaseWrapper db,@Nonnull String tableName,int rowsAffected){
  Bus bus=getBus();
  if (bus != null) {
    if (!db.inTransaction()) {
      bus.post(new DatabaseDeleteEvent(tableName,rowsAffected));
    }
 else {
      transactionChangesTableNames.add(tableName);
    }
  }
}

Fixed version (ground truth):
private void postDeleteEvent(@Nonnull DatabaseWrapper db,@Nonnull String tableName,int rowsAffected){
  Bus bus=getBus();
  if (bus != null) {
    if (!db.inTransaction()) {
      bus.post(new DatabaseDeleteEvent(tableName,rowsAffected));
    }
 else {
      addTransactionTableNameChange(tableName);
    }
  }
}
Program: 109873
Project: 109873
Buggy source:
private void postInsertEvent(@Nullable DatabaseWrapper db,@Nonnull String tableName,long rowId){
  Bus bus=getBus();
  if (bus != null) {
    if (!(db != null && db.inTransaction())) {
      bus.post(new DatabaseInsertEvent(tableName,rowId));
    }
 else {
      transactionChangesTableNames.add(tableName);
    }
  }
}

Fixed version (ground truth):
private void postInsertEvent(@Nullable DatabaseWrapper db,@Nonnull String tableName,long rowId){
  Bus bus=getBus();
  if (bus != null) {
    if (!(db != null && db.inTransaction())) {
      bus.post(new DatabaseInsertEvent(tableName,rowId));
    }
 else {
      addTransactionTableNameChange(tableName);
    }
  }
}
Program: 109874
Project: 109874
Buggy source:
public DatabaseEndTransactionEvent(boolean success,@Nonnull Set<String> tablesChanged){
  super("String_Node_Str");
  this.tablesChanged.addAll(tablesChanged);
  this.success=success;
}

Fixed version (ground truth):
public DatabaseEndTransactionEvent(boolean success,@Nonnull String databaseName,@Nonnull Set<String> tablesChanged){
  super("String_Node_Str");
  this.databaseName=databaseName;
  this.tablesChanged=tablesChanged;
  this.success=success;
}
Program: 109875
Project: 109875
Buggy source:
public void connectAllDatabases(){
  Collection<AndroidDatabase> databases=getDatabases();
  for (  AndroidDatabase database : databases) {
    connectDatabase(database.getName());
  }
}

Fixed version (ground truth):
public void connectAllDatabases(){
  createDatabaseMap();
  Collection<AndroidDatabase> databases=getDatabases();
  for (  AndroidDatabase database : databases) {
    connectDatabase(database.getName());
  }
}
Program: 109876
Project: 109876
Buggy source:
public T findByRowId(String databaseName,long rowId){
  return findBySelection(databaseName,getPrimaryKey() + "String_Node_Str" + rowId,null,null);
}

Fixed version (ground truth):
public T findByRowId(String databaseName,long rowId){
  return findBySelection(databaseName,getPrimaryKey() + "String_Node_Str",new String[]{String.valueOf(rowId)},null);
}
Program: 109877
Project: 109877
Buggy source:
public Cursor findCursorByRowId(String databaseName,long rowId){
  return findCursorBySelection(databaseName,getPrimaryKey() + "String_Node_Str" + rowId,null);
}

Fixed version (ground truth):
public Cursor findCursorByRowId(String databaseName,long rowId){
  return findCursorBySelection(databaseName,getPrimaryKey() + "String_Node_Str",new String[]{String.valueOf(rowId)},null);
}
Program: 109878
Project: 109878
Buggy source:
public T findByRowId(String databaseName,long rowId){
  return findBySelection(databaseName,getPrimaryKey() + "String_Node_Str" + rowId,null,null);
}

Fixed version (ground truth):
public T findByRowId(String databaseName,long rowId){
  return findBySelection(databaseName,getPrimaryKey() + "String_Node_Str",new String[]{String.valueOf(rowId)},null);
}
Program: 109879
Project: 109879
Buggy source:
public Cursor findCursorByRowId(String databaseName,long rowId){
  return findCursorBySelection(databaseName,getPrimaryKey() + "String_Node_Str" + rowId,null);
}

Fixed version (ground truth):
public Cursor findCursorByRowId(String databaseName,long rowId){
  return findCursorBySelection(databaseName,getPrimaryKey() + "String_Node_Str",new String[]{String.valueOf(rowId)},null);
}
Program: 109880
Project: 109880
Buggy source:
public AndroidDatabase(String name,String password,String path,int version){
  this.name=name;
  this.password=password;
  this.path=path;
  this.version=version;
}

Fixed version (ground truth):
public AndroidDatabase(String name,String password,String path,int version){
  this.name=name;
  this.password=password;
  this.encrypted=password != null;
  this.path=path;
  this.version=version;
}
Program: 109881
Project: 109881
Buggy source:
private void openDatabase(AndroidDatabase db){
  if (db.isEncrypted()) {
    db.setSecureSqLiteDatabase(net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(db.getPath(),db.getPassword(),null));
  }
 else {
    db.setSqLiteDatabase(SQLiteDatabase.openOrCreateDatabase(db.getPath(),null));
  }
}

Fixed version (ground truth):
private void openDatabase(AndroidDatabase db){
  if (db.isEncrypted()) {
    try {
      db.setSecureSqLiteDatabase(net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(db.getPath(),db.getPassword(),null));
    }
 catch (    UnsatisfiedLinkError e) {
      throw new IllegalStateException("String_Node_Str",e);
    }
  }
 else {
    db.setSqLiteDatabase(SQLiteDatabase.openOrCreateDatabase(db.getPath(),null));
  }
}
Program: 109882
Project: 109882
Buggy source:
public Item next(){
  if (null == x) {
    throw new NoSuchElementException();
  }
  Item item=x.value;
  x=x.next;
  return item;
}

Fixed version (ground truth):
public Item next(){
  if (!hasNext()) {
    throw new NoSuchElementException();
  }
  Item item=x.value;
  x=x.prev;
  return item;
}
Program: 109883
Project: 109883
Buggy source:
public Item removeFirst(){
  if (null == first) {
    throw new NoSuchElementException();
  }
  Node tmp=first;
  first=first.prev;
  if (null != first) {
    first.next=null;
  }
  tmp.prev=null;
  size--;
  return tmp.value;
}

Fixed version (ground truth):
public Item removeFirst(){
  if (isEmpty()) {
    throw new NoSuchElementException();
  }
  Node tmp=first;
  first=first.prev;
  if (null != first) {
    first.next=null;
  }
 else {
    first=last=null;
  }
  tmp.prev=null;
  size--;
  return tmp.value;
}
Program: 109884
Project: 109884
Buggy source:
public Item removeLast(){
  if (null == first) {
    throw new NoSuchElementException();
  }
  Node tmp=last;
  last=last.next;
  if (null != last) {
    last.prev=null;
  }
  tmp.next=null;
  size--;
  return tmp.value;
}

Fixed version (ground truth):
public Item removeLast(){
  if (isEmpty()) {
    throw new NoSuchElementException();
  }
  Node tmp=last;
  last=last.next;
  if (null != last) {
    last.prev=null;
  }
 else {
    first=last=null;
  }
  tmp.next=null;
  size--;
  return tmp.value;
}
Program: 109885
Project: 109885
Buggy source:
@Test public void testOneElement(){
  Deque<Integer> d=new Deque<Integer>();
  Integer item=Integer.valueOf(5);
  Assert.assertTrue(d.isEmpty());
  d.addFirst(item);
  Assert.assertTrue(d.size() == 1);
  Assert.assertFalse(d.isEmpty());
  Integer x=d.removeLast();
  Assert.assertTrue(x.equals(item));
  Assert.assertTrue(d.size() == 0);
  Assert.assertTrue(d.isEmpty());
}

Fixed version (ground truth):
@Test public void testOneElement(){
  Deque<Integer> d=new Deque<Integer>();
  Integer item=Integer.valueOf(5);
  Assert.assertTrue(d.isEmpty());
  d.addFirst(item);
  Assert.assertTrue(d.size() == 1);
  Assert.assertFalse(d.isEmpty());
  Integer x=d.removeLast();
  Assert.assertTrue(x.equals(item));
  Assert.assertTrue(d.size() == 0);
  Assert.assertTrue(d.isEmpty());
  d.addLast(item);
  Assert.assertTrue(d.size() == 1);
  Assert.assertFalse(d.isEmpty());
  x=d.removeFirst();
  Assert.assertTrue(x.equals(item));
  Assert.assertTrue(d.size() == 0);
  Assert.assertTrue(d.isEmpty());
}
Program: 109886
Project: 109886
Buggy source:
@Test public void testIterator(){
  Deque<Integer> d=new Deque<Integer>();
  List<Integer> values=new ArrayList<Integer>(Arrays.asList(1,3,5,7,9,11,13,15,19,21));
  for (  Integer item : values) {
    d.addFirst(item);
  }
  List<Integer> reversed=new ArrayList<Integer>(values);
  Collections.reverse(reversed);
  int i=0;
  for (  Integer item : d) {
    Assert.assertEquals(reversed.get(i),item);
    i++;
  }
}

Fixed version (ground truth):
@Test public void testIterator(){
  Deque<Integer> d=new Deque<Integer>();
  List<Integer> values=new ArrayList<Integer>(Arrays.asList(1,3,5,7,9,11,13,15,19,21));
  for (  Integer item : values) {
    d.addFirst(item);
  }
  List<Integer> reversed=new ArrayList<Integer>(values);
  Collections.reverse(reversed);
  int i=0;
  for (  Integer item : d) {
    Assert.assertEquals(reversed.get(i),item);
    i++;
  }
  Assert.assertTrue(i == reversed.size());
}
Program: 109888
Project: 109888
Buggy source:
CopyConstantAnalysis(){
  super();
  verbose=true;
}

Fixed version (ground truth):
public CopyConstantAnalysis(){
  super();
  verbose=true;
}
Program: 109889
Project: 109889
Buggy source:
public static void main(String args[]){
  String classPath="String_Node_Str";
  String mainClass=null;
  try {
    int i=0;
    while (true) {
      if (args[i].equals("String_Node_Str")) {
        classPath=args[i + 1];
        i+=2;
      }
 else {
        mainClass=args[i];
        i++;
        break;
      }
    }
    if (i != args.length || mainClass == null)     throw new Exception();
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str");
    System.exit(1);
  }
  String[] sootArgs={"String_Node_Str",classPath,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",mainClass,"String_Node_Str","String_Node_Str",mainClass};
  CopyConstantTest cgt=new CopyConstantTest();
  PackManager.v().getPack("String_Node_Str").add(new Transform("String_Node_Str",cgt));
  soot.Main.main(sootArgs);
}

Fixed version (ground truth):
public static void main(String args[]){
  String classPath="String_Node_Str";
  String mainClass=null;
  try {
    int i=0;
    while (true) {
      if (args[i].equals("String_Node_Str")) {
        classPath=args[i + 1];
        i+=2;
      }
 else {
        mainClass=args[i];
        i++;
        break;
      }
    }
    if (i != args.length || mainClass == null)     throw new Exception();
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str");
    System.exit(1);
  }
  String[] sootArgs={"String_Node_Str",classPath,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",mainClass,"String_Node_Str","String_Node_Str",mainClass};
  CopyConstantTest cgt=new CopyConstantTest();
  PackManager.v().getPack("String_Node_Str").add(new Transform("String_Node_Str",cgt));
  soot.Main.main(sootArgs);
}
Program: 109890
Project: 109890
Buggy source:
@Override protected void init(NodeMainExecutor nodeMainExecutor){
  this.nodeMainExecutor=nodeMainExecutor;
  nodeConfiguration=NodeConfiguration.newPublic(InetAddressFactory.newNonLoopback().getHostAddress(),getMasterUri());
  if (getIntent().hasExtra(ROBOT_DESCRIPTION_EXTRA)) {
    robotDescription=(RobotDescription)getIntent().getSerializableExtra(ROBOT_DESCRIPTION_EXTRA);
  }
  if (robotDescription != null) {
    if (fromAppChooser) {
      robotNameResolver.setRobot(robotDescription);
    }
    dashboard.setRobotName(robotDescription.getRobotType());
  }
 else {
    dashboard.setRobotName(getRobotNameSpace().getNamespace().toString());
  }
  nodeMainExecutor.execute(robotNameResolver,nodeConfiguration.setNodeName("String_Node_Str"));
  while (getAppNameSpace() == null) {
    try {
      Thread.sleep(100);
    }
 catch (    Exception e) {
    }
  }
  nodeMainExecutor.execute(dashboard,nodeConfiguration.setNodeName("String_Node_Str"));
  if (fromAppChooser && startApplication) {
    if (getIntent().getBooleanExtra("String_Node_Str",false)) {
      restartApp();
    }
 else     startApp();
  }
 else   if (startApplication) {
    startApp();
  }
}

Fixed version (ground truth):
@Override protected void init(NodeMainExecutor nodeMainExecutor){
  this.nodeMainExecutor=nodeMainExecutor;
  nodeConfiguration=NodeConfiguration.newPublic(InetAddressFactory.newNonLoopback().getHostAddress(),getMasterUri());
  if (getIntent().hasExtra(ROBOT_DESCRIPTION_EXTRA)) {
    robotDescription=(RobotDescription)getIntent().getSerializableExtra(ROBOT_DESCRIPTION_EXTRA);
  }
  if (robotDescription != null) {
    robotNameResolver.setRobot(robotDescription);
    dashboard.setRobotName(robotDescription.getRobotType());
  }
 else   if (fromApplication) {
    robotNameResolver.setRobotName(getIntent().getStringExtra("String_Node_Str"));
    dashboard.setRobotName(getIntent().getStringExtra("String_Node_Str"));
  }
  nodeMainExecutor.execute(robotNameResolver,nodeConfiguration.setNodeName("String_Node_Str"));
  while (getAppNameSpace() == null) {
    try {
      Thread.sleep(100);
    }
 catch (    Exception e) {
    }
  }
  if (robotDescription == null) {
    dashboard.setRobotName(getRobotNameSpace().getNamespace().toString());
  }
  nodeMainExecutor.execute(dashboard,nodeConfiguration.setNodeName("String_Node_Str"));
  if (fromAppChooser && startApplication) {
    if (getIntent().getBooleanExtra("String_Node_Str",false)) {
      restartApp();
    }
 else     startApp();
  }
 else   if (startApplication) {
    startApp();
  }
}