nus-yam/ex-repair huggingface dataset:
Program: 134694
Project: 134694
Buggy source:
@EventHandler public void postInit(FMLPostInitializationEvent event){
  proxy.cape();
  crossBC=new CrossBuildcraft();
  CrossBigReactors.isRegistrationInOrder();
  crossIC2=new CrossIndustrialCraft2();
  crossRailcraft=new CrossRailcraft();
  crossRF=new CrossRF();
  if (recipes.toLowerCase().equals("String_Node_Str")) {
    RecipesNew.addRecipes();
  }
  if (recipes.toLowerCase().equals("String_Node_Str")) {
    logger.error("String_Node_Str");
    RecipesOld.addOldRecipes();
  }
  if (recipes.toLowerCase().equals("String_Node_Str")) {
    GregtechRecipes.addRecipes();
    logger.info("String_Node_Str");
  }
}

Fixed version (ground truth):
@EventHandler public void postInit(FMLPostInitializationEvent event){
  proxy.cape();
  crossBC=new CrossBuildcraft();
  crossIC2=new CrossIndustrialCraft2();
  crossRailcraft=new CrossRailcraft();
  crossRF=new CrossRF();
  if (recipes.equalsIgnoreCase("String_Node_Str")) {
    RecipesNew.addRecipes();
  }
  if (recipes.equalsIgnoreCase("String_Node_Str")) {
    logger.error("String_Node_Str");
    RecipesOld.addOldRecipes();
  }
  if (recipes.equalsIgnoreCase("String_Node_Str") || recipes.equalsIgnoreCase("String_Node_Str")) {
    GregtechRecipes.addRecipes();
    logger.info("String_Node_Str");
  }
}
Program: 134695
Project: 134695
Buggy source:
public EnergyStorageData getStorageData(TileEntity target){
  if (!_RFModPresent || target == null)   return null;
  RFTileEntityAverageCounter tile=new RFTileEntityAverageCounter();
  if (tile.storage == null)   return null;
  EnergyStorageData result=new EnergyStorageData();
  result.capacity=tile.storage.getMaxEnergyStored();
  result.stored=tile.storage.getEnergyStored();
  result.units="String_Node_Str";
  result.type=EnergyStorageData.TARGET_TYPE_RF;
  return result;
}

Fixed version (ground truth):
public EnergyStorageData getStorageData(TileEntity target){
  if (!_RFModPresent || target == null)   return null;
  RFTileEntityAverageCounter tile=new RFTileEntityAverageCounter();
  if (tile.storage == null)   return null;
  EnergyStorageData result=new EnergyStorageData();
  result.capacity=tile.storage.getMaxEnergyStored();
  result.stored=tile.storage.getEnergyStored();
  result.units=EnergyStorageData.UNITS_RF;
  result.type=EnergyStorageData.TARGET_TYPE_RF;
  return result;
}
Program: 134696
Project: 134696
Buggy source:
public EnergyStorageData getStorageData(TileEntity target){
  if (!_isApiAvailable || target == null)   return null;
  if (target instanceof IEnergyStorage) {
    IEnergyStorage storage=(IEnergyStorage)target;
    EnergyStorageData result=new EnergyStorageData();
    result.capacity=storage.getCapacity();
    result.stored=storage.getStored();
    result.units="String_Node_Str";
    result.type=EnergyStorageData.TARGET_TYPE_IC2;
    return result;
  }
  return null;
}

Fixed version (ground truth):
public EnergyStorageData getStorageData(TileEntity target){
  if (!_isApiAvailable || target == null)   return null;
  if (target instanceof IEnergyStorage) {
    IEnergyStorage storage=(IEnergyStorage)target;
    EnergyStorageData result=new EnergyStorageData();
    result.capacity=storage.getCapacity();
    result.stored=storage.getStored();
    result.units=EnergyStorageData.UNITS_EU;
    result.type=EnergyStorageData.TARGET_TYPE_IC2;
    return result;
  }
  return null;
}
Program: 134697
Project: 134697
Buggy source:
@SuppressWarnings("String_Node_Str") public CrossIndustrialCraft2(){
  try {
    Class.forName("String_Node_Str",false,this.getClass().getClassLoader());
    _gradItemInt=Class.forName("String_Node_Str",false,this.getClass().getClassLoader());
    _getMaxDamageEx=_gradItemInt.getMethod("String_Node_Str");
    _getDamageOfStack=_gradItemInt.getMethod("String_Node_Str",ItemStack.class);
    _isApiAvailable=true;
  }
 catch (  Exception e) {
    _isApiAvailable=false;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public CrossIndustrialCraft2(){
  try {
    Class.forName("String_Node_Str",false,this.getClass().getClassLoader());
    _gradItemInt=Class.forName("String_Node_Str",false,this.getClass().getClassLoader());
    _getMaxDamageEx=_gradItemInt.getMethod("String_Node_Str",ItemStack.class);
    _getDamageOfStack=_gradItemInt.getMethod("String_Node_Str",ItemStack.class);
    _isApiAvailable=true;
  }
 catch (  Exception e) {
    _isApiAvailable=false;
  }
}
Program: 134698
Project: 134698
Buggy source:
@Override protected ItemStack getItemStackByDamage(int damage){
  return new ItemStack(IC2NuclearControl.itemEnergySensorLocationCard,1,0);
}

Fixed version (ground truth):
@Override protected ItemStack getItemStackByDamage(int damage){
  return new ItemStack(IC2NuclearControl.itemEnergySensorLocationCard);
}
Program: 134701
Project: 134701
Buggy source:
/** 
 * Debugs stuff.
 * @author xbony2
 */
public static void debug(){
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Debugs stuff.
 * @author xbony2
 */
public static void debug(){
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
}
Program: 134702
Project: 134702
Buggy source:
@Override public int damageDropped(int i){
  if (i > 0 && i <= BlockDamages.DAMAGE_MAX) {
    if (i == BlockDamages.DAMAGE_LIGHT_ON) {
      return BlockDamages.DAMAGE_LIGHT_OFF;
    }
    return i;
  }
 else {
    return 0;
  }
}

Fixed version (ground truth):
@Override public int damageDropped(int i){
  if (i > 0 && i <= BlockDamages.DAMAGE_MAX) {
    return i;
  }
 else {
    return 0;
  }
}
Program: 134703
Project: 134703
Buggy source:
@Override public void onNeighborBlockChange(World world,int x,int y,int z,Block neighbor){
  int side=0;
  TileEntity tileentity=world.getTileEntity(x,y,z);
  if (tileentity instanceof IWrenchable) {
    side=Facing.oppositeSide[((IWrenchable)tileentity).getFacing()];
  }
  if (tileentity instanceof TileEntityLightOn) {
    if (!world.isRemote) {
      if (!world.isBlockIndirectlyGettingPowered(x,y,z)) {
        world.setBlock(x,y,z,this,BlockDamages.DAMAGE_LIGHT_OFF,2);
      }
    }
  }
  if (tileentity instanceof TileEntityLightOff) {
    if (!world.isRemote) {
      if (world.isBlockIndirectlyGettingPowered(x,y,z)) {
        world.setBlock(x,y,z,this,BlockDamages.DAMAGE_LIGHT_ON,2);
      }
    }
  }
  int metadata=world.getBlockMetadata(x,y,z);
  if (isSolidBlockRequired(metadata) && !world.isSideSolid(x + Facing.offsetsXForSide[side],y + Facing.offsetsYForSide[side],z + Facing.offsetsZForSide[side],ForgeDirection.getOrientation(side).getOpposite())) {
    if (!world.isRemote) {
      dropBlockAsItem(world,x,y,z,metadata,0);
    }
    world.setBlock(x,y,z,Blocks.air,0,3);
  }
 else {
    RedstoneHelper.checkPowered(world,tileentity);
  }
  super.onNeighborBlockChange(world,x,y,z,neighbor);
}

Fixed version (ground truth):
@Override public void onNeighborBlockChange(World world,int x,int y,int z,Block neighbor){
  int side=0;
  TileEntity tileentity=world.getTileEntity(x,y,z);
  if (tileentity instanceof IWrenchable) {
    side=Facing.oppositeSide[((IWrenchable)tileentity).getFacing()];
  }
  int metadata=world.getBlockMetadata(x,y,z);
  if (isSolidBlockRequired(metadata) && !world.isSideSolid(x + Facing.offsetsXForSide[side],y + Facing.offsetsYForSide[side],z + Facing.offsetsZForSide[side],ForgeDirection.getOrientation(side).getOpposite())) {
    if (!world.isRemote) {
      dropBlockAsItem(world,x,y,z,metadata,0);
    }
    world.setBlock(x,y,z,Blocks.air,0,3);
  }
 else {
    RedstoneHelper.checkPowered(world,tileentity);
  }
  super.onNeighborBlockChange(world,x,y,z,neighbor);
}
Program: 134704
Project: 134704
Buggy source:
/** 
 * Called whenever the block is added into the world.
 */
@Override public void onBlockAdded(World world,int x,int y,int z){
  super.onBlockAdded(world,x,y,z);
  int metadata=world.getBlockMetadata(x,y,z);
  if (metadata > BlockDamages.DAMAGE_MAX) {
    metadata=0;
  }
  if (metadata == BlockDamages.DAMAGE_LIGHT_ON) {
    if (!world.isRemote) {
      if (!world.isBlockIndirectlyGettingPowered(x,y,z)) {
        world.setBlock(x,y,z,this,BlockDamages.DAMAGE_LIGHT_OFF,2);
      }
    }
  }
  if (metadata == BlockDamages.DAMAGE_LIGHT_OFF) {
    if (!world.isRemote) {
      if (world.isBlockIndirectlyGettingPowered(x,y,z)) {
        world.setBlock(x,y,z,this,BlockDamages.DAMAGE_LIGHT_ON,2);
      }
    }
  }
  if (isSolidBlockRequired(metadata))   for (int face=0; face < 6; face++) {
    int side=Facing.oppositeSide[face];
    if (world.isSideSolid(x + Facing.offsetsXForSide[side],y + Facing.offsetsYForSide[side],z + Facing.offsetsZForSide[side],ForgeDirection.getOrientation(face))) {
      TileEntity tileentity=world.getTileEntity(x,y,z);
      if (tileentity instanceof IWrenchable) {
        ((IWrenchable)tileentity).setFacing((short)face);
      }
      break;
    }
  }
  dropBlockIfCantStay(world,x,y,z);
}

Fixed version (ground truth):
/** 
 * Called whenever the block is added into the world.
 */
@Override public void onBlockAdded(World world,int x,int y,int z){
  super.onBlockAdded(world,x,y,z);
  int metadata=world.getBlockMetadata(x,y,z);
  if (metadata > BlockDamages.DAMAGE_MAX) {
    metadata=0;
  }
  if (isSolidBlockRequired(metadata))   for (int face=0; face < 6; face++) {
    int side=Facing.oppositeSide[face];
    if (world.isSideSolid(x + Facing.offsetsXForSide[side],y + Facing.offsetsYForSide[side],z + Facing.offsetsZForSide[side],ForgeDirection.getOrientation(face))) {
      TileEntity tileentity=world.getTileEntity(x,y,z);
      if (tileentity instanceof IWrenchable) {
        ((IWrenchable)tileentity).setFacing((short)face);
      }
      break;
    }
  }
  dropBlockIfCantStay(world,x,y,z);
}
Program: 134705
Project: 134705
Buggy source:
public BlockNuclearControlMain(){
  super(Material.iron);
  setHardness(0.5F);
  setCreativeTab(IC2NuclearControl.tabIC2NC);
  subblocks=new HashMap<Integer,Subblock>();
  register(new ThermalMonitor());
  register(new IndustrialAlarm());
  register(new HowlerAlarm());
  register(new RemoteThermo());
  register(new InfoPanel());
  register(new InfoPanelExtender());
  register(new EnergyCounter());
  register(new AverageCounter());
  register(new RangeTrigger());
  register(new AdvancedInfoPanel());
  register(new AdvancedInfoPanelExtender());
  register(new Light(true));
  register(new Light(false));
}

Fixed version (ground truth):
public BlockNuclearControlMain(){
  super(Material.iron);
  setHardness(0.5F);
  setCreativeTab(IC2NuclearControl.tabIC2NC);
  subblocks=new HashMap<Integer,Subblock>();
  register(new ThermalMonitor());
  register(new IndustrialAlarm());
  register(new HowlerAlarm());
  register(new RemoteThermo());
  register(new InfoPanel());
  register(new InfoPanelExtender());
  register(new EnergyCounter());
  register(new AverageCounter());
  register(new RangeTrigger());
  register(new AdvancedInfoPanel());
  register(new AdvancedInfoPanelExtender());
}
Program: 134706
Project: 134706
Buggy source:
@EventHandler public void postInit(FMLPostInitializationEvent evt){
  crossBC=new CrossBuildcraft();
  crossIC2=new CrossIndustrialCraft2();
  crossRailcraft=new CrossRailcraft();
  crossThermalEx=new CrossRF();
  if (recipes.equals("String_Node_Str")) {
    RecipesNew.addRecipes();
  }
  if (recipes.equals("String_Node_Str")) {
    logger.error("String_Node_Str");
    RecipesOld.addOldRecipes();
  }
  if (recipes.equals("String_Node_Str")) {
    GregtechRecipes.addRecipes();
    logger.error("String_Node_Str");
  }
}

Fixed version (ground truth):
@EventHandler public void postInit(FMLPostInitializationEvent evt){
  crossBC=new CrossBuildcraft();
  crossIC2=new CrossIndustrialCraft2();
  crossRailcraft=new CrossRailcraft();
  crossRF=new CrossRF();
  if (recipes.equals("String_Node_Str")) {
    RecipesNew.addRecipes();
  }
  if (recipes.equals("String_Node_Str")) {
    logger.error("String_Node_Str");
    RecipesOld.addOldRecipes();
  }
  if (recipes.equals("String_Node_Str")) {
    GregtechRecipes.addRecipes();
    logger.error("String_Node_Str");
  }
}
Program: 134708
Project: 134708
Buggy source:
public BlockNuclearControlLight(){
  super(Material.redstoneLight);
  setHardness(0.3F);
  setStepSound(soundTypeGlass);
  setBlockName("String_Node_Str");
  setCreativeTab(IC2NuclearControl.tabIC2NC);
  register(LightDamages.DAMAGE_WHITE_OFF,false);
  register(LightDamages.DAMAGE_WHITE_ON,true);
}

Fixed version (ground truth):
public BlockNuclearControlLight(){
  super(Material.redstoneLight);
  setHardness(0.3F);
  setStepSound(soundTypeGlass);
  if (!isOn)   setCreativeTab(IC2NuclearControl.tabIC2NC);
  register(LightDamages.DAMAGE_WHITE_OFF,false);
  register(LightDamages.DAMAGE_WHITE_ON,true);
}
Program: 134709
Project: 134709
Buggy source:
@Override public int getLightValue(IBlockAccess world,int x,int y,int z){
  TileEntity entity=world.getTileEntity(x,y,z);
  if (entity instanceof TileEntityIndustrialAlarm) {
    return ((TileEntityIndustrialAlarm)entity).lightLevel;
  }
 else   if (entity instanceof TileEntityInfoPanel) {
    if (((TileEntityInfoPanel)entity).getPowered())     return 7;
 else     return 0;
  }
 else   if (entity instanceof TileEntityInfoPanelExtender) {
    TileEntityInfoPanelExtender extender=(TileEntityInfoPanelExtender)entity;
    if (extender.getScreen() != null) {
      TileEntityInfoPanel core=extender.getScreen().getCore(extender.getWorldObj());
      if (core != null && core.getPowered())       return 7;
 else       return 0;
    }
  }
 else   if (entity instanceof TileEntityLightOn) {
    return 15;
  }
  return getLightValue();
}

Fixed version (ground truth):
@Override public int getLightValue(IBlockAccess world,int x,int y,int z){
  TileEntity entity=world.getTileEntity(x,y,z);
  if (entity instanceof TileEntityIndustrialAlarm) {
    return ((TileEntityIndustrialAlarm)entity).lightLevel;
  }
 else   if (entity instanceof TileEntityInfoPanel) {
    if (((TileEntityInfoPanel)entity).getPowered())     return 7;
 else     return 0;
  }
 else   if (entity instanceof TileEntityInfoPanelExtender) {
    TileEntityInfoPanelExtender extender=(TileEntityInfoPanelExtender)entity;
    if (extender.getScreen() != null) {
      TileEntityInfoPanel core=extender.getScreen().getCore(extender.getWorldObj());
      if (core != null && core.getPowered())       return 7;
 else       return 0;
    }
  }
  return getLightValue();
}
Program: 134710
Project: 134710
Buggy source:
protected void registerBlocks(){
  GameRegistry.registerBlock(blockNuclearControlMain,ItemNuclearControlMain.class,"String_Node_Str");
  GameRegistry.registerItem(itemToolThermometer,"String_Node_Str");
  GameRegistry.registerItem(itemToolDigitalThermometer,"String_Node_Str");
  GameRegistry.registerItem(itemRemoteSensorKit,"String_Node_Str");
  GameRegistry.registerItem(itemEnergySensorKit,"String_Node_Str");
  GameRegistry.registerItem(itemMultipleSensorKit,"String_Node_Str");
  GameRegistry.registerItem(itemSensorLocationCard,"String_Node_Str");
  GameRegistry.registerItem(itemEnergySensorLocationCard,"String_Node_Str");
  GameRegistry.registerItem(itemMultipleSensorLocationCard,"String_Node_Str");
  GameRegistry.registerItem(itemEnergyArrayLocationCard,"String_Node_Str");
  GameRegistry.registerItem(itemTimeCard,"String_Node_Str");
  GameRegistry.registerItem(itemUpgrade,"String_Node_Str");
  GameRegistry.registerItem(itemTextCard,"String_Node_Str");
  GameRegistry.registerItem(itemLiquidArrayLocationCard,"String_Node_Str");
}

Fixed version (ground truth):
protected void registerBlocks(){
  GameRegistry.registerBlock(blockNuclearControlMain,ItemNuclearControlMain.class,"String_Node_Str");
  GameRegistry.registerBlock(blockNuclearControlLight,"String_Node_Str");
  GameRegistry.registerItem(itemToolThermometer,"String_Node_Str");
  GameRegistry.registerItem(itemToolDigitalThermometer,"String_Node_Str");
  GameRegistry.registerItem(itemRemoteSensorKit,"String_Node_Str");
  GameRegistry.registerItem(itemEnergySensorKit,"String_Node_Str");
  GameRegistry.registerItem(itemMultipleSensorKit,"String_Node_Str");
  GameRegistry.registerItem(itemSensorLocationCard,"String_Node_Str");
  GameRegistry.registerItem(itemEnergySensorLocationCard,"String_Node_Str");
  GameRegistry.registerItem(itemMultipleSensorLocationCard,"String_Node_Str");
  GameRegistry.registerItem(itemEnergyArrayLocationCard,"String_Node_Str");
  GameRegistry.registerItem(itemTimeCard,"String_Node_Str");
  GameRegistry.registerItem(itemUpgrade,"String_Node_Str");
  GameRegistry.registerItem(itemTextCard,"String_Node_Str");
  GameRegistry.registerItem(itemLiquidArrayLocationCard,"String_Node_Str");
}
Program: 134711
Project: 134711
Buggy source:
protected void initBlocks(){
  blockNuclearControlMain=new BlockNuclearControlMain();
  itemToolThermometer=new ItemToolThermometer().setUnlocalizedName("String_Node_Str");
  itemToolDigitalThermometer=new ItemToolDigitalThermometer(1,80,80).setUnlocalizedName("String_Node_Str");
  itemSensorLocationCard=new ItemCardReactorSensorLocation().setUnlocalizedName("String_Node_Str");
  itemUpgrade=new ItemUpgrade();
  itemTimeCard=new ItemTimeCard().setUnlocalizedName("String_Node_Str");
  itemTextCard=new ItemCardText().setUnlocalizedName("String_Node_Str");
  itemEnergySensorLocationCard=new ItemCardEnergySensorLocation().setUnlocalizedName("String_Node_Str");
  itemEnergyArrayLocationCard=new ItemCardEnergyArrayLocation().setUnlocalizedName("String_Node_Str");
  itemMultipleSensorLocationCard=new ItemCardMultipleSensorLocation();
  itemMultipleSensorKit=new ItemKitMultipleSensor().setUnlocalizedName("String_Node_Str");
  itemEnergySensorKit=new ItemKitEnergySensor().setUnlocalizedName("String_Node_Str");
  itemRemoteSensorKit=new ItemKitReactorSensor().setUnlocalizedName("String_Node_Str");
  itemLiquidArrayLocationCard=new ItemCardLiquidArrayLocation().setUnlocalizedName("String_Node_Str");
}

Fixed version (ground truth):
protected void initBlocks(){
  blockNuclearControlMain=new BlockNuclearControlMain();
  blockNuclearControlLight=new BlockNuclearControlLight();
  itemToolThermometer=new ItemToolThermometer().setUnlocalizedName("String_Node_Str");
  itemToolDigitalThermometer=new ItemToolDigitalThermometer(1,80,80).setUnlocalizedName("String_Node_Str");
  itemSensorLocationCard=new ItemCardReactorSensorLocation().setUnlocalizedName("String_Node_Str");
  itemUpgrade=new ItemUpgrade();
  itemTimeCard=new ItemTimeCard().setUnlocalizedName("String_Node_Str");
  itemTextCard=new ItemCardText().setUnlocalizedName("String_Node_Str");
  itemEnergySensorLocationCard=new ItemCardEnergySensorLocation().setUnlocalizedName("String_Node_Str");
  itemEnergyArrayLocationCard=new ItemCardEnergyArrayLocation().setUnlocalizedName("String_Node_Str");
  itemMultipleSensorLocationCard=new ItemCardMultipleSensorLocation();
  itemMultipleSensorKit=new ItemKitMultipleSensor().setUnlocalizedName("String_Node_Str");
  itemEnergySensorKit=new ItemKitEnergySensor().setUnlocalizedName("String_Node_Str");
  itemRemoteSensorKit=new ItemKitReactorSensor().setUnlocalizedName("String_Node_Str");
  itemLiquidArrayLocationCard=new ItemCardLiquidArrayLocation().setUnlocalizedName("String_Node_Str");
}
Program: 134712
Project: 134712
Buggy source:
public BlockNuclearControlLight(Material material){
  super(material);
  setHardness(0.3F);
  setStepSound(soundTypeGlass);
  setBlockName("String_Node_Str");
  setCreativeTab(IC2NuclearControl.tabIC2NC);
}

Fixed version (ground truth):
public BlockNuclearControlLight(){
  super(Material.redstoneLight);
  setHardness(0.3F);
  setStepSound(soundTypeGlass);
  setBlockName("String_Node_Str");
  setCreativeTab(IC2NuclearControl.tabIC2NC);
  register(LightDamages.DAMAGE_WHITE_OFF,false);
  register(LightDamages.DAMAGE_WHITE_ON,true);
}
Program: 134713
Project: 134713
Buggy source:
public void register(int damage,boolean onOrOff){
  isOn=onOrOff;
  if (isOn)   damageOff=damage - 1;
 else   damageOff=damage;
}

Fixed version (ground truth):
public void register(int damage,boolean on){
  isOn=on;
  if (isOn)   damageOff=damage - 1;
 else   damageOff=damage;
}
Program: 134714
Project: 134714
Buggy source:
/** 
 * Downloads the file with passed URL to the passed folder
 * @param fileURL   URL of the file that should be downloaded
 * @param folderPath    The path to which this file should be saved
 * @return  The local full path of the downloaded file, empty string is returned if a problem occurs
 */
public static String downloadFile(String fileURL,String folderPath){
  URL u;
  InputStream is=null;
  DataInputStream dis;
  String fullFileName="String_Node_Str";
  FileOutputStream output=null;
  try {
    int lastSlashPos=fileURL.lastIndexOf("String_Node_Str");
    if (lastSlashPos < 0)     return "String_Node_Str";
    fullFileName=fileURL.substring(lastSlashPos + 1);
    File parentFolder=new File(folderPath);
    if (parentFolder != null)     parentFolder.mkdirs();
    fullFileName=folderPath + fullFileName;
    u=new URL(fileURL);
    is=u.openStream();
    dis=new DataInputStream(new BufferedInputStream(is));
    output=new FileOutputStream(fullFileName);
    byte[] fileContents=new byte[dis.available()];
    while (dis.available() != 0) {
      output.write(dis.readByte());
    }
    logger.info("String_Node_Str" + fileURL + "String_Node_Str");
  }
 catch (  MalformedURLException mue) {
    fullFileName="String_Node_Str";
  }
catch (  IOException ioe) {
    fullFileName="String_Node_Str";
  }
 finally {
    try {
      if (is != null)       is.close();
      if (output != null) {
        output.flush();
        output.close();
      }
    }
 catch (    IOException ioe) {
    }
  }
  return fullFileName;
}

Fixed version (ground truth):
/** 
 * Downloads the file with passed URL to the passed folder
 * @param fileURL   URL of the file that should be downloaded
 * @param folderPath    The path to which this file should be saved
 * @return  The local full path of the downloaded file, empty string is returned if a problem occurs
 */
public static String downloadFile(String fileURL,String folderPath){
  URL u;
  InputStream is=null;
  DataInputStream dis;
  String fullFileName="String_Node_Str";
  FileOutputStream output=null;
  try {
    int lastSlashPos=fileURL.lastIndexOf("String_Node_Str");
    if (lastSlashPos < 0)     return "String_Node_Str";
    fullFileName=fileURL.substring(lastSlashPos + 1);
    File parentFolder=new File(folderPath);
    if (parentFolder != null)     parentFolder.mkdirs();
    fullFileName=folderPath + fullFileName;
    u=new URL(fileURL);
    is=u.openStream();
    dis=new DataInputStream(new BufferedInputStream(is));
    output=new FileOutputStream(fullFileName);
    byte[] fileContents=new byte[dis.available()];
    while (dis.available() != 0) {
      output.write(dis.readByte());
    }
    logger.debug("String_Node_Str" + fileURL + "String_Node_Str");
  }
 catch (  MalformedURLException mue) {
    fullFileName="String_Node_Str";
  }
catch (  IOException ioe) {
    fullFileName="String_Node_Str";
  }
 finally {
    try {
      if (is != null)       is.close();
      if (output != null) {
        output.flush();
        output.close();
      }
    }
 catch (    IOException ioe) {
    }
  }
  return fullFileName;
}
Program: 134715
Project: 134715
Buggy source:
/** 
 * Decompresses the passed GZip file, and returns the filename of the decompressed file
 * @param filename  The filename of compressed file
 * @param deleteCompressedFile  Whether to delete the original compressed file upon completion
 * @return  The filename of the output file, or empty string if a problem occurs
 */
public static String decompressGZipFile(String filename,boolean deleteCompressedFile){
  String outFilename="String_Node_Str";
  try {
    int lastDotPosition=filename.lastIndexOf("String_Node_Str");
    outFilename=filename.substring(0,lastDotPosition);
    FileInputStream inStream=new FileInputStream(filename);
    GZIPInputStream gInStream=new GZIPInputStream(inStream);
    FileOutputStream outstream=new FileOutputStream(outFilename);
    byte[] buf=new byte[1024];
    int len;
    if (gInStream.available() == 0) {
      String dummyContent="String_Node_Str";
      outstream.write(dummyContent.getBytes());
    }
 else {
      while ((len=gInStream.read(buf)) > 0) {
        outstream.write(buf,0,len);
      }
    }
    logger.info("String_Node_Str" + filename + "String_Node_Str"+ outFilename);
    gInStream.close();
    outstream.close();
  }
 catch (  IOException ioe) {
    logger.warn("String_Node_Str" + filename + "String_Node_Str"+ ioe.getMessage(),ioe);
    outFilename="String_Node_Str";
  }
 finally {
    if (deleteCompressedFile)     (new File(filename)).delete();
    return outFilename;
  }
}

Fixed version (ground truth):
/** 
 * Decompresses the passed GZip file, and returns the filename of the decompressed file
 * @param filename  The filename of compressed file
 * @param deleteCompressedFile  Whether to delete the original compressed file upon completion
 * @return  The filename of the output file, or empty string if a problem occurs
 */
public static String decompressGZipFile(String filename,boolean deleteCompressedFile){
  String outFilename="String_Node_Str";
  int lastDotPosition=filename.lastIndexOf("String_Node_Str");
  outFilename=filename.substring(0,lastDotPosition);
  try (FileInputStream fis=new FileInputStream(filename);GZIPInputStream gis=new GZIPInputStream(fis);InputStreamReader isr=new InputStreamReader(gis,"String_Node_Str");BufferedReader in=new BufferedReader(isr);OutputStreamWriter out=new OutputStreamWriter(new FileOutputStream(outFilename),"String_Node_Str")){
    String line=null;
    while ((line=in.readLine()) != null) {
      out.write(line + "String_Node_Str");
    }
    logger.info("String_Node_Str" + filename + "String_Node_Str"+ outFilename);
  }
 catch (  EOFException e) {
    logger.error("String_Node_Str" + filename + "String_Node_Str");
  }
catch (  IOException ioe) {
    logger.warn("String_Node_Str" + filename + "String_Node_Str"+ ioe.getMessage(),ioe);
    outFilename="String_Node_Str";
  }
 finally {
    if (deleteCompressedFile)     (new File(filename)).delete();
    return outFilename;
  }
}
Program: 134716
Project: 134716
Buggy source:
public static List<String> getTriplesFromFile(String filename){
  List<String> lines=new ArrayList<>();
  try (BufferedReader in=new BufferedReader(new InputStreamReader(new FileInputStream(filename),"String_Node_Str"))){
    String line=null;
    while ((line=in.readLine().trim()) != null) {
      if (line.isEmpty())       lines.add(line.trim());
    }
  }
 catch (  FileNotFoundException e) {
    throw new IllegalArgumentException("String_Node_Str" + filename + "String_Node_Str",e);
  }
catch (  UnsupportedEncodingException e) {
    throw new IllegalArgumentException("String_Node_Str",e);
  }
catch (  IOException e) {
    throw new IllegalArgumentException("String_Node_Str" + filename,e);
  }
catch (  NullPointerException e) {
    throw new IllegalArgumentException("String_Node_Str" + filename,e);
  }
  return lines;
}

Fixed version (ground truth):
public static List<String> getTriplesFromFile(String filename){
  List<String> lines=new ArrayList<>();
  try (BufferedReader in=new BufferedReader(new InputStreamReader(new FileInputStream(filename),"String_Node_Str"))){
    String line=null;
    while ((line=in.readLine()) != null) {
      if (!line.trim().isEmpty())       lines.add(line.trim());
    }
  }
 catch (  FileNotFoundException e) {
    throw new IllegalArgumentException("String_Node_Str" + filename + "String_Node_Str",e);
  }
catch (  UnsupportedEncodingException e) {
    throw new IllegalArgumentException("String_Node_Str",e);
  }
catch (  IOException e) {
    throw new IllegalArgumentException("String_Node_Str" + filename,e);
  }
catch (  NullPointerException e) {
    throw new IllegalArgumentException("String_Node_Str" + filename,e);
  }
  return lines;
}
Program: 134717
Project: 134717
Buggy source:
public BarStore(Dispatcher dispatcher){
  this.dispatcher=dispatcher;
  this.dispatcher.register(BarStore.class,new Store.Callback(){
    @Override public Agreement voteFor(    Action action){
      return vote(action);
    }
    @Override public void complete(    Action action,    Dispatcher.Channel channel){
      complete(action,channel);
    }
  }
);
}

Fixed version (ground truth):
public BarStore(Dispatcher dispatcher){
  this.dispatcher=dispatcher;
  this.dispatcher.register(BarStore.class,new Store.Callback(){
    @Override public Agreement voteFor(    Action action){
      return vote(action);
    }
    @Override public void complete(    Action action,    Dispatcher.Channel channel){
      process(action,channel);
    }
  }
);
}
Program: 134718
Project: 134718
Buggy source:
@Override public void complete(Action action,Dispatcher.Channel channel){
  complete(action,channel);
}

Fixed version (ground truth):
@Override public void complete(Action action,Dispatcher.Channel channel){
  process(action,channel);
}
Program: 134719
Project: 134719
Buggy source:
public FooStore(Dispatcher dispatcher){
  this.dispatcher=dispatcher;
  this.dispatcher.register(FooStore.class,new Store.Callback(){
    @Override public Agreement voteFor(    Action action){
      return vote(action);
    }
    @Override public void complete(    Action action,    Dispatcher.Channel channel){
      complete(action,channel);
    }
  }
);
}

Fixed version (ground truth):
public FooStore(Dispatcher dispatcher){
  this.dispatcher=dispatcher;
  this.dispatcher.register(FooStore.class,new Store.Callback(){
    @Override public Agreement voteFor(    Action action){
      return vote(action);
    }
    @Override public void complete(    Action action,    Dispatcher.Channel channel){
      process(action,channel);
    }
  }
);
}
Program: 134720
Project: 134720
Buggy source:
@Override public void complete(Action action,Dispatcher.Channel channel){
  complete(action,channel);
}

Fixed version (ground truth):
@Override public void complete(Action action,Dispatcher.Channel channel){
  process(action,channel);
}
Program: 134722
Project: 134722
Buggy source:
/** 
 */
private void sendAlarm(int code){
  try {
    ACSFaultState fs=ACSAlarmSystemInterfaceFactory.createFaultState("String_Node_Str","String_Node_Str",code);
    fs.setDescriptor(ACSFaultState.TERMINATE);
    fs.setUserTimestamp(new Timestamp(System.currentTimeMillis()));
    Properties props=new Properties();
    props.setProperty(ACSFaultState.ASI_PREFIX_PROPERTY,"String_Node_Str");
    props.setProperty(ACSFaultState.ASI_SUFFIX_PROPERTY,"String_Node_Str");
    fs.setUserProperties(props);
    alarmSource.push(fs);
  }
 catch (  Exception e) {
    m_logger.warning("String_Node_Str" + e);
  }
}

Fixed version (ground truth):
/** 
 */
private void sendAlarm(int code){
  cs.getAlarmSource().setAlarm("String_Node_Str","String_Node_Str",code,true);
}
Program: 134723
Project: 134723
Buggy source:
@Override public short getArchiveLevel(){
  return this.archiveLogLevel;
}

Fixed version (ground truth):
@Override public short getArchiveLevel(){
  return this.archiveLogLevel.shortValue();
}
Program: 134724
Project: 134724
Buggy source:
/** 
 */
public ArchiveLoggerImpl(){
  super();
}

Fixed version (ground truth):
/** 
 * Constructor
 */
public ArchiveLoggerImpl(){
  super();
}
Program: 134725
Project: 134725
Buggy source:
/** 
 * @see alma.acs.component.ComponentLifecycle#initialize()
 */
public void initialize(ContainerServices containerServices) throws ComponentLifecycleException {
  super.initialize(containerServices);
  cs=containerServices;
  m_logger=cs.getLogger();
  try {
    alarmSource=ACSAlarmSystemInterfaceFactory.createSource("String_Node_Str");
  }
 catch (  Exception e) {
    m_logger.severe("String_Node_Str" + e);
  }
  try {
    DBConfiguration config=ArchiveConfiguration.instance(m_logger);
    String logFilePath=getString(config,"String_Node_Str");
    File f=new File(logFilePath);
    if (!f.exists())     f.mkdirs();
    short fileMax=getInteger(config,"String_Node_Str").shortValue();
    int fileSizeLimit=getInteger(config,"String_Node_Str").intValue();
    if (fileMax < 1 || fileSizeLimit < 100000) {
      throw new ComponentLifecycleException("String_Node_Str");
    }
    m_logger.info("String_Node_Str" + logFilePath + "String_Node_Str"+ fileSizeLimit+ "String_Node_Str"+ fileMax);
    connectToLoggingChannel(logFilePath,fileMax,fileSizeLimit);
  }
 catch (  DatabaseException e) {
    String errorMessage="String_Node_Str" + e.getMessage();
    m_logger.severe(errorMessage);
    sendAlarm(2);
    throw new ComponentLifecycleException(errorMessage);
  }
}

Fixed version (ground truth):
/** 
 * @see alma.acs.component.ComponentLifecycle#initialize()
 */
public void initialize(ContainerServices containerServices) throws ComponentLifecycleException {
  super.initialize(containerServices);
  cs=containerServices;
  m_logger=cs.getLogger();
  try {
    String logFilePath=System.getProperty(ArchiveLoggerImpl.LOGDIR_PROPNAME,ArchiveLoggerImpl.DEFAULLOGDIR);
    File f=new File(logFilePath);
    if (!f.exists()) {
      f.mkdirs();
    }
    int fileMax=Integer.getInteger(ArchiveLoggerImpl.MAXNUMBEROFFILES_PROPNAME,ArchiveLoggerImpl.DEFAULTMAXNUMBEROFFILES);
    int fileSizeLimit=Integer.getInteger(ArchiveLoggerImpl.MAXFILESIZE_PROPNAME,ArchiveLoggerImpl.DEFAULTMAXFILESIZE);
    if (fileMax < 1 || fileSizeLimit < 100000) {
      StringBuilder str=new StringBuilder(ArchiveLoggerImpl.MAXNUMBEROFFILES_PROPNAME);
      str.append("String_Node_Str");
      str.append(ArchiveLoggerImpl.MAXFILESIZE_PROPNAME);
      str.append("String_Node_Str");
      throw new ComponentLifecycleException(str.toString());
    }
    StringBuilder str=new StringBuilder("String_Node_Str");
    str.append(logFilePath);
    str.append("String_Node_Str");
    str.append(fileSizeLimit);
    str.append("String_Node_Str");
    str.append(fileMax);
    str.append(')');
    m_logger.info(str.toString());
    connectToLoggingChannel(logFilePath,fileMax,fileSizeLimit);
  }
 catch (  Throwable t) {
    String errorMessage="String_Node_Str" + t.getMessage();
    m_logger.severe(errorMessage);
    sendAlarm(2);
    throw new ComponentLifecycleException(errorMessage,t);
  }
}
Program: 134726
Project: 134726
Buggy source:
/** 
 * @param logFilePath
 * @param fileMax
 * @param fileSizeLimit
 * @throws ComponentLifecycleException
 */
private void connectToLoggingChannel(String logFilePath,short fileMax,int fileSizeLimit) throws ComponentLifecycleException {
  try {
    ArchiveQueueFileHandler queueFileHandler=new ArchiveQueueFileHandler(m_logger,logFilePath,fileMax,fileSizeLimit);
    queueFileHandler.setAlarmHandler(new AlarmHandler(){
      @Override public void sendAlarm(      int code){
        this.sendAlarm(code);
      }
    }
);
    engine=new LCEngine(queueFileHandler);
    engine.connect(cs.getAdvancedContainerServices().getORB(),null);
    engine.enableAutoReconnection(true);
  }
 catch (  Throwable e) {
    m_logger.severe("String_Node_Str");
    sendAlarm(2);
    throw new ComponentLifecycleException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param logFilePath
 * @param fileMax
 * @param fileSizeLimit
 * @throws ComponentLifecycleException
 */
private void connectToLoggingChannel(String logFilePath,int fileMax,int fileSizeLimit) throws ComponentLifecycleException {
  try {
    ArchiveQueueFileHandler queueFileHandler=new ArchiveQueueFileHandler(m_logger,logFilePath,fileMax,fileSizeLimit);
    queueFileHandler.setAlarmHandler(new AlarmHandler(){
      @Override public void sendAlarm(      int code){
        this.sendAlarm(code);
      }
    }
);
    engine=new LCEngine(queueFileHandler);
    engine.connect(cs.getAdvancedContainerServices().getORB(),null);
    engine.enableAutoReconnection(true);
  }
 catch (  Throwable e) {
    m_logger.severe("String_Node_Str");
    sendAlarm(2);
    throw new ComponentLifecycleException(e);
  }
}
Program: 134727
Project: 134727
Buggy source:
@Override public void setArchiveLevel(short newLevel){
  this.archiveLogLevel=newLevel;
}

Fixed version (ground truth):
@Override public void setArchiveLevel(short newLevel){
  this.archiveLogLevel.set(newLevel);
}
Program: 134728
Project: 134728
Buggy source:
/** 
 * @see com.cosylab.logging.engine.cache.ILogQueueFileHandler#getNewFile()
 */
@Override public File getNewFile() throws IOException {
  final String startTimestamp=new ArchiveTimeStamp(new Timestamp(System.currentTimeMillis())).toISOString();
  final String endTimestamp="String_Node_Str";
  String fileName=String.format(FILENAME_TEMPLATE,startTimestamp,endTimestamp);
  return new File(logDir,fileName);
}

Fixed version (ground truth):
/** 
 * @see com.cosylab.logging.engine.cache.ILogQueueFileHandler#getNewFile()
 */
@Override public File getNewFile() throws IOException {
  final String startTimestamp=IsoDateFormat.formatCurrentDate();
  final String endTimestamp="String_Node_Str";
  String fileName=String.format(FILENAME_TEMPLATE,startTimestamp,endTimestamp);
  return new File(logDir,fileName);
}
Program: 134729
Project: 134729
Buggy source:
public void testNoCascading() throws Exception {
  try {
    Configuration conf=new Configuration();
    conf.setConfigurationName("String_Node_Str");
    conf.setFullName("String_Node_Str");
    conf.setActive(true);
    conf.setCreationTime(new Date());
    conf.setDescription("String_Node_Str");
    EventChannel ec=new EventChannel();
    ec.setName("String_Node_Str");
    ec.setPath("String_Node_Str");
    ec.setConfiguration(conf);
    try {
      hibernateUtil.beginTransaction();
      hibernateUtil.getSession().save(ec);
      hibernateUtil.commitTransaction();
      fail("String_Node_Str");
    }
 catch (    Throwable t) {
      hibernateUtil.closeSession();
    }
    ec=new EventChannel();
    ec.setName("String_Node_Str");
    ec.setPath("String_Node_Str");
    ec.setConfiguration(conf);
    hibernateUtil.beginTransaction();
    hibernateUtil.getSession().save(conf);
    hibernateUtil.getSession().save(ec);
    hibernateUtil.commitTransaction();
  }
 catch (  Exception ex) {
    logger.log(Level.WARNING,"String_Node_Str",ex);
    throw ex;
  }
 finally {
    dropDB();
  }
}

Fixed version (ground truth):
public void testNoCascading() throws Exception {
  try {
    Configuration conf=new Configuration();
    conf.setConfigurationName("String_Node_Str");
    conf.setFullName("String_Node_Str");
    conf.setActive(true);
    conf.setCreationTime(new Date());
    conf.setDescription("String_Node_Str");
    EventChannel ec=new EventChannel();
    ec.setName("String_Node_Str");
    ec.setPath("String_Node_Str");
    ec.setConfiguration(conf);
    try {
      hibernateUtil.beginTransaction();
      hibernateUtil.getSession().save(ec);
      hibernateUtil.commitTransaction();
      fail("String_Node_Str");
    }
 catch (    Throwable t) {
      hibernateUtil.closeSession();
    }
    ec=new EventChannel();
    ec.setName("String_Node_Str");
    ec.setPath("String_Node_Str");
    ec.setConfiguration(conf);
    hibernateUtil.beginTransaction();
    hibernateUtil.getSession().save(conf);
    hibernateUtil.getSession().save(ec);
    hibernateUtil.commitTransaction();
  }
 catch (  Exception ex) {
    logger.log(Level.WARNING,"String_Node_Str",ex);
    throw ex;
  }
}
Program: 134733
Project: 134733
Buggy source:
private void sanitizeOpNames(PrintWriter ps,OpDecl opdecl,TypeSpec ts){
  if (!(entityTypes.contains(ts))) {
    ps.print(ts.toString() + "String_Node_Str" + opdecl.name+ "String_Node_Str");
  }
 else   if (ts.typeSpec() instanceof ConstrTypeSpec && ((ConstrTypeSpec)ts).c_type_spec instanceof Interface) {
    ps.print(ts.name() + "String_Node_Str" + opdecl.name+ "String_Node_Str");
  }
 else {
    if (ts instanceof AliasTypeSpec) {
      AliasTypeSpec alias=(AliasTypeSpec)ts;
      ps.print(namingExpert.getJavaTypeForXmlTypedef(alias) + "String_Node_Str" + opdecl.name+ "String_Node_Str");
    }
 else     ps.print(ts.pack_name + "String_Node_Str" + ts.name()+ "String_Node_Str"+ opdecl.name+ "String_Node_Str");
  }
}

Fixed version (ground truth):
private void sanitizeOpNames(PrintWriter ps,OpDecl opdecl,TypeSpec ts){
  if (ts.typeSpec() instanceof ConstrTypeSpec) {
    ConstrTypeSpec cts=(ConstrTypeSpec)ts;
    if (cts.c_type_spec instanceof Interface) {
      ps.print(ts.toString() + "String_Node_Str" + opdecl.name+ "String_Node_Str");
    }
 else     if (cts.c_type_spec instanceof StructType) {
      StructType stype=(StructType)cts.c_type_spec;
      if (xmlAwareStructs.contains(stype))       ps.print(namingExpert.getJavaTypeForXmlStruct(stype) + "String_Node_Str" + opdecl.name+ "String_Node_Str");
 else       ps.print(ts.toString() + "String_Node_Str" + opdecl.name+ "String_Node_Str");
    }
 else     ps.print(ts.toString() + "String_Node_Str" + opdecl.name+ "String_Node_Str");
  }
 else   if (ts instanceof AliasTypeSpec && entityTypes.contains(ts)) {
    AliasTypeSpec alias=(AliasTypeSpec)ts;
    ps.print(namingExpert.getJavaTypeForXmlTypedef(alias) + "String_Node_Str" + opdecl.name+ "String_Node_Str");
  }
 else   ps.print(ts.toString() + "String_Node_Str" + opdecl.name+ "String_Node_Str");
}
Program: 134735
Project: 134735
Buggy source:
public void testSave(){
  EbeDocument doc=new EbeDocument();
  doc.setPath("String_Node_Str");
  doc.setDocumentInfo("String_Node_Str");
  doc.setAttributeValue("String_Node_Str","String_Node_Str");
  Completion c=new Completion();
  c.setAttributeValue("String_Node_Str","String_Node_Str");
  c.setAttributeValue("String_Node_Str","String_Node_Str");
  c.setValue("String_Node_Str");
  doc.putNode(c);
  Error e=new Error();
  e.setAttributeValue("String_Node_Str","String_Node_Str");
  e.setAttributeValue("String_Node_Str","String_Node_Str");
  e.setValue("String_Node_Str");
  Member m=new Member();
  m.setAttributeValue("String_Node_Str","String_Node_Str");
  m.setAttributeValue("String_Node_Str","String_Node_Str");
  e.setValue("String_Node_Str");
  e.putMember(m);
  doc.putNode(e);
  FileReader ref;
  FileReader created;
  char ref_buff[]=new char[10000];
  char created_buff[]=new char[10000];
  try {
    doc.save();
    ref=new FileReader(new File(xmldirs + "String_Node_Str"));
    created=new FileReader(new File("String_Node_Str"));
    ref.read(ref_buff);
    created.read(created_buff);
  }
 catch (  Exception ex) {
    System.out.println(ex);
  }
  String ref_string=new String(ref_buff);
  String created_string=new String(created_buff);
  assertTrue(ref_string.compareTo(created_string) == 0);
  try {
    (new File("String_Node_Str")).delete();
  }
 catch (  Exception ex) {
    System.out.println(ex);
  }
}

Fixed version (ground truth):
public void testSave(){
  EbeDocument doc=new EbeDocument();
  doc.setPath("String_Node_Str");
  doc.setDocumentInfo("String_Node_Str");
  doc.setAttributeValue("String_Node_Str","String_Node_Str");
  Completion c=new Completion();
  c.setAttributeValue("String_Node_Str","String_Node_Str");
  c.setAttributeValue("String_Node_Str","String_Node_Str");
  c.setValue("String_Node_Str");
  doc.putNode(c);
  Error e=new Error();
  e.setAttributeValue("String_Node_Str","String_Node_Str");
  e.setAttributeValue("String_Node_Str","String_Node_Str");
  e.setValue("String_Node_Str");
  Member m=new Member();
  m.setAttributeValue("String_Node_Str","String_Node_Str");
  m.setAttributeValue("String_Node_Str","String_Node_Str");
  m.setValue("String_Node_Str");
  e.putMember(m);
  doc.putNode(e);
  FileReader ref;
  FileReader created;
  char ref_buff[]=new char[10000];
  char created_buff[]=new char[10000];
  try {
    doc.save();
    ref=new FileReader(new File(xmldirs + "String_Node_Str"));
    created=new FileReader(new File("String_Node_Str"));
    ref.read(ref_buff);
    created.read(created_buff);
  }
 catch (  Exception ex) {
    System.out.println(ex);
  }
  String ref_string=new String(ref_buff);
  String created_string=new String(created_buff);
  assertTrue(ref_string.compareTo(created_string) == 0);
  try {
    (new File("String_Node_Str")).delete();
  }
 catch (  Exception ex) {
    System.out.println(ex);
  }
}
Program: 134736
Project: 134736
Buggy source:
@Inject @Optional private void getNotified(@UIEventTopic(STATUS_BAR_TOPIC_ID) MessageWithTime msgWithTime){
  if (slm != null) {
    String flashMsg=msgWithTime.msg;
    int timeSeconds=msgWithTime.timeSeconds;
    slm.setMessage(flashMsg);
    currentMessage=flashMsg;
    if (msgRestoreJob != null) {
      msgRestoreJob.cancel();
    }
    msgRestoreJob=new Job(MyStatusBar.class.getSimpleName() + "String_Node_Str"){
      @Override protected IStatus run(      IProgressMonitor monitor){
        uiSync.syncExec(new Runnable(){
          @Override public void run(){
            slm.setMessage(currentMessage);
          }
        }
);
        return Status.OK_STATUS;
      }
    }
;
    msgRestoreJob.schedule(timeSeconds * 1000);
  }
}

Fixed version (ground truth):
@Inject @Optional private void getNotified(@UIEventTopic(STATUS_BAR_TOPIC_ID) MessageWithTime msgWithTime){
  if (slm != null) {
    String flashMsg=msgWithTime.msg;
    int timeSeconds=msgWithTime.timeSeconds;
    slm.setMessage(flashMsg);
    clearFlashJob();
    msgRestoreJob=new Job(MyStatusBar.class.getSimpleName() + "String_Node_Str"){
      @Override protected IStatus run(      IProgressMonitor monitor){
        uiSync.syncExec(new Runnable(){
          @Override public void run(){
            slm.setMessage(permanentMessage);
          }
        }
);
        return Status.OK_STATUS;
      }
    }
;
    msgRestoreJob.schedule(timeSeconds * 1000);
  }
}
Program: 134737
Project: 134737
Buggy source:
@Override public void run(){
  slm.setMessage(currentMessage);
}

Fixed version (ground truth):
@Override public void run(){
  slm.setMessage(permanentMessage);
}
Program: 134738
Project: 134738
Buggy source:
/** 
 * Flashes a message for the given time,  or until another message gets set. Then sets the status line back to the previous content. Must only be called from the UI thread.
 * @param s The message to appear in the status bar.
 */
public void flashMessage(String s,int timeSeconds){
  MessageWithTime msgWithTime=new MessageWithTime(s,timeSeconds);
  eventBroker.post(MyStatusBar.STATUS_BAR_TOPIC_ID,msgWithTime);
}

Fixed version (ground truth):
/** 
 * Flashes a message for the given time,  or until another message gets set. Then sets the status line back to the previous non-flashed content. Must only be called from the UI thread.
 * @param s The message to appear in the status bar.
 */
public void flashMessage(String s,int timeSeconds){
  MessageWithTime msgWithTime=new MessageWithTime(s,timeSeconds);
  eventBroker.post(MyStatusBar.STATUS_BAR_TOPIC_ID,msgWithTime);
}
Program: 134739
Project: 134739
Buggy source:
/** 
 * Enable/disable the filter menu item and the filter button in the tool bar. <p> Calling this method overwrites the setting of the tool bar's "filtersBtn" via   {@link LogToolBar#setEnabled(boolean)}. This feature is needed to disable this button when jlog runs inside the OMC, because there we get calls to LogToolBar#setEnabled(true) for every table update, menu opening etc.
 * @param enable true enables the widgets
 */
public void enableFiltersWidgets(boolean enable){
  toolBar.enableFiltersButtonOverwrite(enable);
  menuBar.getFiltersMenuItem().setEnabled(enable);
  menuBar.getEngineFiltersMenuItem().setEnabled(enable);
}

Fixed version (ground truth):
/** 
 * Enable/disable the filter menu item and the filter button in the tool bar. <p> Calling this method overwrites the setting of the tool bar's "filtersBtn" via   {@link LogToolBar#setEnabled(boolean)}. This feature is needed to disable this button when jlog runs inside the OMC, because there we get calls to LogToolBar#setEnabled(true) for every table update, menu opening etc.
 * @param enable true enables the widgets
 */
public void enableFiltersWidgets(boolean enable){
  toolBar.enableFiltersButtonOverwrite(enable);
  toolBar.setEnabled(enable);
  menuBar.getFiltersMenuItem().setEnabled(enable);
  menuBar.getEngineFiltersMenuItem().setEnabled(enable);
}