nus-yam/ex-repair huggingface dataset:
Program: 134200
Project: 134200
Buggy source:
private int getAmount(){
  Random rand=new Random();
  return rand.nextInt(99) + 1 <= triplechance ? 3 : rand.nextInt(99) + 1 <= doublechance ? 2 : 0;
}

Fixed version (ground truth):
private int getAmount(){
  Random rand=new Random();
  return rand.nextInt(99) + 1 <= triplechance ? 3 : rand.nextInt(99) + 1 <= doublechance ? 2 : 1;
}
Program: 134204
Project: 134204
Buggy source:
public static void progressAll(){
  for (  LivingEntity entity : instances.keySet())   instances.get(entity).progress();
}

Fixed version (ground truth):
public static void progressAll(){
  for (  LivingEntity entity : instances.keySet()) {
    if (instances.get(entity) == null)     continue;
    instances.get(entity).progress();
  }
}
Program: 134205
Project: 134205
Buggy source:
public static void removeAroundPoint(Location loc,double radius){
  for (  Player player : instances.keySet()) {
    Combustion combustion=instances.get(player);
    if (combustion.location.distance(loc) <= radius) {
      explode(player);
      instances.remove(player);
    }
  }
}

Fixed version (ground truth):
public static void removeAroundPoint(Location loc,double radius){
  for (  Player player : instances.keySet()) {
    Combustion combustion=instances.get(player);
    if (combustion.location.getWorld() == loc.getWorld()) {
      if (combustion.location.distance(loc) <= radius) {
        explode(player);
        instances.remove(player);
      }
    }
  }
}
Program: 134207
Project: 134207
Buggy source:
public boolean progress(){
  if (System.currentTimeMillis() - time >= interval) {
    time=System.currentTimeMillis();
    if (progress < height) {
      moveEarth();
      removeTimers.put(player,System.currentTimeMillis());
    }
 else {
      if (removeTimers.get(player) + removeTimer <= System.currentTimeMillis()) {
        baseblocks.put(location.clone().add(direction.clone().multiply(-1 * (height))).getBlock(),(height - 1));
        if (!revertblocks()) {
          instances.remove(id);
        }
      }
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean progress(){
  if (System.currentTimeMillis() - time >= interval) {
    time=System.currentTimeMillis();
    if (progress < height) {
      moveEarth();
      removeTimers.put(player,System.currentTimeMillis());
    }
 else {
      if (removeTimers.contains(player)) {
        if (removeTimers.get(player) + removeTimer <= System.currentTimeMillis()) {
          baseblocks.put(location.clone().add(direction.clone().multiply(-1 * (height))).getBlock(),(height - 1));
          if (!revertblocks()) {
            instances.remove(id);
          }
        }
      }
      return false;
    }
  }
  return true;
}
Program: 134208
Project: 134208
Buggy source:
private int getAmount(){
  Random rand=new Random();
  return rand.nextInt(99) + 1 <= triplechance ? 3 : rand.nextInt(99) + 1 <= doublechance ? 2 : 0;
}

Fixed version (ground truth):
private int getAmount(){
  Random rand=new Random();
  return rand.nextInt(99) + 1 <= triplechance ? 3 : rand.nextInt(99) + 1 <= doublechance ? 2 : 1;
}
Program: 134209
Project: 134209
Buggy source:
public void run(){
  try {
    interval=System.currentTimeMillis() - time;
    time=System.currentTimeMillis();
    ProjectKorra.time_step=interval;
    AvatarState.manageAvatarStates();
    ChiPassive.handlePassive();
    TempPotionEffect.progressAll();
    handleDayNight();
    Flight.handle();
    for (    Player p : RapidPunch.instance.keySet())     RapidPunch.instance.get(p).startPunch(p);
    for (    int i : RevertChecker.airRevertQueue.keySet()) {
      Methods.revertAirBlock(i);
      RevertChecker.airRevertQueue.remove(i);
    }
  }
 catch (  Exception e) {
    Methods.stopBending();
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void run(){
  try {
    interval=System.currentTimeMillis() - time;
    time=System.currentTimeMillis();
    ProjectKorra.time_step=interval;
    AvatarState.manageAvatarStates();
    ChiPassive.handlePassive();
    TempPotionEffect.progressAll();
    handleDayNight();
    Flight.handle();
    for (    Player p : RapidPunch.instances.keySet()) {
      if (p == null)       continue;
      RapidPunch.instances.get(p).startPunch(p);
    }
    for (    int i : RevertChecker.airRevertQueue.keySet()) {
      Methods.revertAirBlock(i);
      RevertChecker.airRevertQueue.remove(i);
    }
  }
 catch (  Exception e) {
    Methods.stopBending();
    e.printStackTrace();
  }
}
Program: 134210
Project: 134210
Buggy source:
public static void stopBending(){
  List<AbilityModule> abilities=AbilityModuleManager.ability;
  for (  AbilityModule ab : abilities) {
    ab.stop();
  }
  AirBlast.removeAll();
  AirBubble.removeAll();
  AirShield.instances.clear();
  AirSuction.instances.clear();
  AirScooter.removeAll();
  AirSpout.removeAll();
  AirSwipe.instances.clear();
  Tornado.instances.clear();
  AirBurst.removeAll();
  Catapult.removeAll();
  CompactColumn.removeAll();
  EarthBlast.removeAll();
  EarthColumn.removeAll();
  EarthPassive.removeAll();
  EarthArmor.removeAll();
  EarthTunnel.instances.clear();
  Shockwave.removeAll();
  Tremorsense.removeAll();
  FreezeMelt.removeAll();
  IceSpike.removeAll();
  IceSpike2.removeAll();
  WaterManipulation.removeAll();
  WaterSpout.removeAll();
  WaterWall.removeAll();
  Wave.removeAll();
  Plantbending.regrowAll();
  OctopusForm.removeAll();
  Bloodbending.instances.clear();
  FireStream.removeAll();
  Fireball.removeAll();
  WallOfFire.instances.clear();
  Lightning.instances.clear();
  FireShield.removeAll();
  FireBlast.removeAll();
  FireBurst.removeAll();
  FireJet.instances.clear();
  Cook.removeAll();
  Illumination.removeAll();
  RapidPunch.instance.clear();
  Flight.removeAll();
  WaterReturn.removeAll();
  TempBlock.removeAll();
  removeAllEarthbendedBlocks();
  EarthPassive.removeAll();
}

Fixed version (ground truth):
public static void stopBending(){
  List<AbilityModule> abilities=AbilityModuleManager.ability;
  for (  AbilityModule ab : abilities) {
    ab.stop();
  }
  AirBlast.removeAll();
  AirBubble.removeAll();
  AirShield.instances.clear();
  AirSuction.instances.clear();
  AirScooter.removeAll();
  AirSpout.removeAll();
  AirSwipe.instances.clear();
  Tornado.instances.clear();
  AirBurst.removeAll();
  Catapult.removeAll();
  CompactColumn.removeAll();
  EarthBlast.removeAll();
  EarthColumn.removeAll();
  EarthPassive.removeAll();
  EarthArmor.removeAll();
  EarthTunnel.instances.clear();
  Shockwave.removeAll();
  Tremorsense.removeAll();
  FreezeMelt.removeAll();
  IceSpike.removeAll();
  IceSpike2.removeAll();
  WaterManipulation.removeAll();
  WaterSpout.removeAll();
  WaterWall.removeAll();
  Wave.removeAll();
  Plantbending.regrowAll();
  OctopusForm.removeAll();
  Bloodbending.instances.clear();
  FireStream.removeAll();
  Fireball.removeAll();
  WallOfFire.instances.clear();
  Lightning.instances.clear();
  FireShield.removeAll();
  FireBlast.removeAll();
  FireBurst.removeAll();
  FireJet.instances.clear();
  Cook.removeAll();
  Illumination.removeAll();
  RapidPunch.instances.clear();
  Flight.removeAll();
  WaterReturn.removeAll();
  TempBlock.removeAll();
  removeAllEarthbendedBlocks();
  EarthPassive.removeAll();
}
Program: 134211
Project: 134211
Buggy source:
@EventHandler public void onNameTag(AsyncPlayerReceiveNameTagEvent e){
  List<Element> elements=Methods.getBendingPlayer(e.getNamedPlayer().getName()).getElements();
  if (elements != null && plugin.getConfig().getBoolean("String_Node_Str")) {
    if (elements.size() > 1)     e.setTag(ChatColor.LIGHT_PURPLE + e.getNamedPlayer().getName());
 else     if (elements.get(0).equals(Element.Earth))     e.setTag(ChatColor.GREEN + e.getNamedPlayer().getName());
 else     if (elements.get(0).equals(Element.Air))     e.setTag(ChatColor.GRAY + e.getNamedPlayer().getName());
 else     if (elements.get(0).equals(Element.Water))     e.setTag(ChatColor.AQUA + e.getNamedPlayer().getName());
 else     if (elements.get(0).equals(Element.Fire))     e.setTag(ChatColor.RED + e.getNamedPlayer().getName());
 else     if (elements.get(0).equals(Element.Chi))     e.setTag(ChatColor.GOLD + e.getNamedPlayer().getName());
  }
}

Fixed version (ground truth):
@EventHandler public void onNameTag(AsyncPlayerReceiveNameTagEvent e){
  List<Element> elements=Methods.getBendingPlayer(e.getNamedPlayer().getName()).getElements();
  if (elements != null && plugin.getConfig().getBoolean("String_Node_Str")) {
    if (elements.size() < 1)     e.setTag(ChatColor.LIGHT_PURPLE + e.getNamedPlayer().getName());
 else     if (elements.get(0).equals(Element.Earth))     e.setTag(ChatColor.GREEN + e.getNamedPlayer().getName());
 else     if (elements.get(0).equals(Element.Air))     e.setTag(ChatColor.GRAY + e.getNamedPlayer().getName());
 else     if (elements.get(0).equals(Element.Water))     e.setTag(ChatColor.AQUA + e.getNamedPlayer().getName());
 else     if (elements.get(0).equals(Element.Fire))     e.setTag(ChatColor.RED + e.getNamedPlayer().getName());
 else     if (elements.get(0).equals(Element.Chi))     e.setTag(ChatColor.GOLD + e.getNamedPlayer().getName());
  }
}
Program: 134212
Project: 134212
Buggy source:
public void startPunch(Player p){
  if (numpunches >= punches)   instance.remove(p);
  if (target instanceof LivingEntity && target != null) {
    LivingEntity lt=(LivingEntity)target;
    Methods.damageEntity(p,target,damage);
    if (target instanceof Player)     if (ChiPassive.willChiBlock((Player)target)) {
      ChiPassive.blockChi((Player)target);
    }
    lt.setNoDamageTicks(0);
  }
  cooldowns.put(p.getName(),System.currentTimeMillis());
  swing(p);
  numpunches++;
}

Fixed version (ground truth):
public void startPunch(Player p){
  if (numpunches >= punches)   instances.remove(p);
  if (target instanceof LivingEntity && target != null) {
    LivingEntity lt=(LivingEntity)target;
    Methods.damageEntity(p,target,damage);
    if (target instanceof Player)     if (ChiPassive.willChiBlock((Player)target)) {
      ChiPassive.blockChi((Player)target);
    }
    lt.setNoDamageTicks(0);
  }
  cooldowns.put(p.getName(),System.currentTimeMillis());
  swing(p);
  numpunches++;
}
Program: 134213
Project: 134213
Buggy source:
public RapidPunch(Player p){
  if (instance.containsKey(p))   return;
  if (cooldowns.containsKey(p.getName())) {
    if (cooldowns.get(p.getName()) + cooldown >= System.currentTimeMillis()) {
      return;
    }
 else {
      cooldowns.remove(p.getName());
    }
  }
  Entity t=Methods.getTargetedEntity(p,distance,new ArrayList<Entity>());
  if (t == null)   return;
  target=t;
  numpunches=0;
  instance.put(p,this);
}

Fixed version (ground truth):
public RapidPunch(Player p){
  if (instances.containsKey(p))   return;
  if (cooldowns.containsKey(p.getName())) {
    if (cooldowns.get(p.getName()) + cooldown >= System.currentTimeMillis()) {
      return;
    }
 else {
      cooldowns.remove(p.getName());
    }
  }
  Entity t=Methods.getTargetedEntity(p,distance,new ArrayList<Entity>());
  if (t == null)   return;
  target=t;
  numpunches=0;
  instances.put(p,this);
}
Program: 134214
Project: 134214
Buggy source:
private void explode(){
  boolean explode=true;
  for (  Block block : Methods.getBlocksAroundPoint(location,3)) {
    if (Methods.isRegionProtectedFromBuild(player,"String_Node_Str",block.getLocation())) {
      explode=false;
      break;
    }
  }
  if (explode) {
    explosion=player.getWorld().spawn(location,TNTPrimed.class);
    explosion.setFuseTicks(0);
    float yield=1;
switch (player.getWorld().getDifficulty()) {
case PEACEFUL:
      yield*=2.;
    break;
case EASY:
  yield*=2.;
break;
case NORMAL:
yield*=1.;
break;
case HARD:
yield*=3. / 4.;
break;
}
explosion.setYield(yield);
explosions.put(explosion,this);
}
ignite(location);
remove();
}

Fixed version (ground truth):
private void explode(){
  boolean explode=true;
  for (  Block block : Methods.getBlocksAroundPoint(location,3)) {
    if (Methods.isRegionProtectedFromBuild(player,"String_Node_Str",block.getLocation())) {
      explode=false;
      break;
    }
  }
  if (explode) {
    explosion=player.getWorld().spawn(location,TNTPrimed.class);
    explosion.setFuseTicks(0);
    float yield=1;
    if (!AvatarState.isAvatarState(player)) {
      if (Methods.isDay(player.getWorld())) {
        Methods.firebendingDayAugment(yield,player.getWorld());
      }
 else {
        yield*=1.;
      }
    }
 else {
      yield*=AvatarState.factor;
    }
    explosion.setYield(yield);
    explosions.put(explosion,this);
  }
  ignite(location);
  remove();
}
Program: 134217
Project: 134217
Buggy source:
public static ITextComponent chunkPos(ChunkPos pos){
  return pos != null ? RecurrentComplex.translations.format("String_Node_Str",pos.chunkXPos,pos.chunkZPos) : RecurrentComplex.translations.format("String_Node_Str");
}

Fixed version (ground truth):
public static ITextComponent chunkPos(ChunkPos pos){
  return pos != null ? RecurrentComplex.translations.format("String_Node_Str",pos.x,pos.z) : RecurrentComplex.translations.format("String_Node_Str");
}
Program: 134218
Project: 134218
Buggy source:
public static void setSubtypes(BiomeDictionary.Type type,List<BiomeDictionary.Type> types){
  SafeReflector.of(BiomeDictionary.Type.class,"String_Node_Str",field -> field.set(type,types));
}

Fixed version (ground truth):
public static void setSubtypes(BiomeDictionary.Type type,List<BiomeDictionary.Type> types){
  SafeReflector.of(BiomeDictionary.Type.class,field -> field.set(type,types),"String_Node_Str");
}
Program: 134219
Project: 134219
Buggy source:
public static Map<String,BiomeDictionary.Type> getMap(){
  return SafeReflector.get(BiomeDictionary.Type.class,"String_Node_Str",null);
}

Fixed version (ground truth):
public static Map<String,BiomeDictionary.Type> getMap(){
  return SafeReflector.get(BiomeDictionary.Type.class,null,"String_Node_Str");
}
Program: 134220
Project: 134220
Buggy source:
public static List<BiomeDictionary.Type> getSubtypes(BiomeDictionary.Type type){
  return SafeReflector.get(BiomeDictionary.Type.class,"String_Node_Str",type,new ArrayList<>());
}

Fixed version (ground truth):
public static List<BiomeDictionary.Type> getSubtypes(BiomeDictionary.Type type){
  return SafeReflector.get(BiomeDictionary.Type.class,type,new ArrayList<>(),"String_Node_Str");
}
Program: 134221
Project: 134221
Buggy source:
@Override void execute(MockWorld world,ICommandSender commandSender,String[] args) throws CommandException {
  RCEntityInfo RCEntityInfo=RCCommands.getStructureEntityInfo(commandSender,null);
  SelectionOwner selectionOwner=RCCommands.getSelectionOwner(commandSender,null,true);
  RCCommands.assertSize(commandSender,selectionOwner);
  BlockArea area=selectionOwner.getSelection();
  IvWorldData worldData=IvWorldData.capture(world,area,true);
  BlockPos lowerCorner=area.getLowerCorner();
  BlockPos higherCorner=area.getHigherCorner();
  RCEntityInfo.setWorldDataClipboard(worldData.createTagCompound());
  commandSender.sendMessage(ServerTranslations.format("String_Node_Str",String.valueOf(lowerCorner.getX()),String.valueOf(lowerCorner.getY()),String.valueOf(lowerCorner.getZ()),String.valueOf(higherCorner.getX()),String.valueOf(higherCorner.getY()),String.valueOf(higherCorner.getZ())));
}

Fixed version (ground truth):
@Override public void execute(MockWorld world,ICommandSender commandSender,String[] args) throws CommandException {
  RCEntityInfo RCEntityInfo=RCCommands.getStructureEntityInfo(commandSender,null);
  SelectionOwner selectionOwner=RCCommands.getSelectionOwner(commandSender,null,true);
  RCCommands.assertSize(commandSender,selectionOwner);
  BlockArea area=selectionOwner.getSelection();
  IvWorldData worldData=IvWorldData.capture(world,area,true);
  BlockPos lowerCorner=area.getLowerCorner();
  BlockPos higherCorner=area.getHigherCorner();
  RCEntityInfo.setWorldDataClipboard(worldData.createTagCompound());
  commandSender.sendMessage(ServerTranslations.format("String_Node_Str",String.valueOf(lowerCorner.getX()),String.valueOf(lowerCorner.getY()),String.valueOf(lowerCorner.getZ()),String.valueOf(higherCorner.getX()),String.valueOf(higherCorner.getY()),String.valueOf(higherCorner.getZ())));
}
Program: 134222
Project: 134222
Buggy source:
@Override void execute(MockWorld world,ICommandSender commandSender,String[] args) throws CommandException {
  RCParameters parameters=RCParameters.of(args);
  SelectionOwner selectionOwner=RCCommands.getSelectionOwner(commandSender,null,true);
  RCCommands.assertSize(commandSender,selectionOwner);
  BlockArea area=selectionOwner.getSelection();
  double expandFloor=parameters.get().doubleAt(0).optional().orElse(1.);
  CommandSelectFloor.placeNaturalFloor(world,area,expandFloor);
  CommandSelectSpace.placeNaturalAir(world,area,3,3);
}

Fixed version (ground truth):
@Override public void execute(MockWorld world,ICommandSender commandSender,String[] args) throws CommandException {
  RCParameters parameters=RCParameters.of(args);
  SelectionOwner selectionOwner=RCCommands.getSelectionOwner(commandSender,null,true);
  RCCommands.assertSize(commandSender,selectionOwner);
  BlockArea area=selectionOwner.getSelection();
  double expandFloor=parameters.get().doubleAt(0).optional().orElse(1.);
  CommandSelectFloor.placeNaturalFloor(world,area,expandFloor);
  CommandSelectSpace.placeNaturalAir(world,area,3,3);
}
Program: 134223
Project: 134223
Buggy source:
@Override void execute(MockWorld world,ICommandSender commandSender,String[] args) throws CommandException {
  SelectionOwner selectionOwner=RCCommands.getSelectionOwner(commandSender,null,true);
  RCCommands.assertSize(commandSender,selectionOwner);
  BlockArea area=selectionOwner.getSelection();
  RCParameters parameters=RCParameters.of(args);
  int floorDistance=parameters.get().intAt(0).optional().orElse(0) + 1;
  int maxClosedSides=parameters.get().intAt(1).optional().orElse(3);
  placeNaturalAir(world,area,floorDistance,maxClosedSides);
}

Fixed version (ground truth):
@Override public void execute(MockWorld world,ICommandSender commandSender,String[] args) throws CommandException {
  SelectionOwner selectionOwner=RCCommands.getSelectionOwner(commandSender,null,true);
  RCCommands.assertSize(commandSender,selectionOwner);
  BlockArea area=selectionOwner.getSelection();
  RCParameters parameters=RCParameters.of(args);
  int floorDistance=parameters.get().intAt(0).optional().orElse(0) + 1;
  int maxClosedSides=parameters.get().intAt(1).optional().orElse(3);
  placeNaturalAir(world,area,floorDistance,maxClosedSides);
}
Program: 134224
Project: 134224
Buggy source:
@Override public List<String> getTabCompletions(MinecraftServer server,ICommandSender sender,String[] args,@Nullable BlockPos pos){
  RCParameters parameters=RCParameters.of(args);
  RCExpect<?> expect=RCExpect.startRC();
  expect.next(RecurrentComplex.saver.keySet());
  expect.next(args1 -> parameters.get().first().optional().map(RecurrentComplex.saver::get).map(a -> a.getRegistry().ids()).orElse(Collections.emptySet()));
  expect.named("String_Node_Str").resourceDirectory();
  return expect.get(server,sender,args,pos);
}

Fixed version (ground truth):
@Override public List<String> getTabCompletions(MinecraftServer server,ICommandSender sender,String[] args,@Nullable BlockPos pos){
  RCParameters parameters=RCParameters.of(args);
  RCExpect<?> expect=RCExpect.startRC();
  expect.next(RecurrentComplex.saver.keySet());
  expect.next(args1 -> parameters.get().first().tryGet().map(RecurrentComplex.saver::get).map(a -> a.getRegistry().ids()).orElse(Collections.emptySet()));
  expect.named("String_Node_Str").resourceDirectory();
  return expect.get(server,sender,args,pos);
}
Program: 134226
Project: 134226
Buggy source:
protected boolean addStructureLog(ICommandSender commandSender,BiPredicate<String,Structure<?>> predicate,String msg){
  PriorityQueue<String> structures=CommandSearchStructure.search(StructureRegistry.INSTANCE.activeIDs(),(  String name) -> predicate.test(name,StructureRegistry.INSTANCE.get(name)) ? 0 : 1);
  if (structures.size() > 0) {
    commandSender.addChatMessage(new TextComponentString(msg + "String_Node_Str"));
    CommandSearchStructure.postResultMessage(commandSender,RCTextStyle::structure,structures);
    return false;
  }
  return true;
}

Fixed version (ground truth):
protected boolean addStructureLog(ICommandSender commandSender,BiPredicate<String,Structure<?>> predicate,String msg){
  PriorityQueue<String> structures=CommandSearchStructure.search(StructureRegistry.INSTANCE.activeIDs(),(  String name) -> predicate.test(name,StructureRegistry.INSTANCE.get(name)) ? 0 : 1);
  if (structures.size() > 0) {
    commandSender.sendMessage(new TextComponentString(msg + "String_Node_Str"));
    CommandSearchStructure.postResultMessage(commandSender,RCTextStyle::structure,structures);
    return false;
  }
  return true;
}
Program: 134227
Project: 134227
Buggy source:
@Override public void readUpdateData(ByteBuf buffer,String context){
  if ("String_Node_Str".equals(context)) {
    previewType=Operation.PreviewType.findOrDefault(ByteBufUtils.readUTF8String(buffer),Operation.PreviewType.SHAPE);
  }
 else   if ("String_Node_Str".equals(context)) {
    try {
      NBTTagCompound tag=ByteBufUtils.readTag(buffer);
      danglingOperation=tag != null ? OperationRegistry.readOperation(tag) : null;
    }
 catch (    Exception e) {
      RecurrentComplex.logger.warn("String_Node_Str",buffer);
    }
  }
 else   if ("String_Node_Str".equals(context)) {
    showGrid=buffer.readBoolean();
  }
}

Fixed version (ground truth):
@Override public void readUpdateData(ByteBuf buffer,String context){
  if ("String_Node_Str".equals(context)) {
    previewType=Operation.PreviewType.findOrDefault(ByteBufUtils.readUTF8String(buffer),Operation.PreviewType.SHAPE);
  }
 else   if ("String_Node_Str".equals(context)) {
    try {
      NBTTagCompound tag=ByteBufUtils.readTag(buffer);
      danglingOperation=tag != null ? OperationRegistry.readOperation(tag) : null;
    }
 catch (    Exception e) {
      RecurrentComplex.logger.warn("String_Node_Str",e);
    }
  }
 else   if ("String_Node_Str".equals(context)) {
    showGrid=buffer.readBoolean();
  }
}
Program: 134228
Project: 134228
Buggy source:
public static SchematicFile loadSchematicFromFile(File file) throws SchematicFile.UnsupportedSchematicFormatException {
  NBTTagCompound compound=null;
  try (FileInputStream fileInputStream=new FileInputStream(file)){
    compound=CompressedStreamTools.readCompressed(fileInputStream);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  if (compound != null)   return new SchematicFile(compound);
  return null;
}

Fixed version (ground truth):
public static SchematicFile loadSchematicFromFile(File file) throws SchematicFile.UnsupportedSchematicFormatException {
  NBTTagCompound compound=null;
  try (FileInputStream fileInputStream=new FileInputStream(file)){
    compound=CompressedStreamTools.readCompressed(fileInputStream);
  }
 catch (  Exception e) {
    throw new SchematicFile.UnsupportedSchematicFormatException("String_Node_Str");
  }
  if (compound != null)   return new SchematicFile(compound);
  return null;
}
Program: 134229
Project: 134229
Buggy source:
public static int getRotations(EnumFacing front,boolean mirrorX,EnumFacing toFront){
  Integer rotations=Directions.getHorizontalClockwiseRotations(front,toFront,mirrorX);
  return rotations == null ? 0 : rotations;
}

Fixed version (ground truth):
public static int getRotations(EnumFacing front,boolean mirrorX,EnumFacing toFront){
  Integer rotations=RCDirections.getHorizontalClockwiseRotations(front,toFront,mirrorX);
  return rotations == null ? 0 : rotations;
}
Program: 134231
Project: 134231
Buggy source:
@Override public void processServer(PacketSaveInvGenComponent message,MessageContext ctx,WorldServer server){
  NetHandlerPlayServer playServer=ctx.getServerHandler();
  EntityPlayerMP player=playServer.playerEntity;
  if (RecurrentComplex.checkPerms(player))   return;
  SaveDirectoryData.Result saveDirectoryDataResult=message.getSaveDirectoryDataResult();
  String path=saveDirectoryDataResult.directory.subDirectoryName() + "String_Node_Str";
  String id=message.getKey();
  GenericItemCollectionRegistry.INSTANCE.register(id,"String_Node_Str",message.getInventoryGenerator(),saveDirectoryDataResult.directory.isActive(),LeveledRegistry.Level.CUSTOM);
  if (RCCommands.informSaveResult((message.getInventoryGenerator() != null && id != null) && RecurrentComplex.saver.trySave(saveDirectoryDataResult.directory.toPath(),RCFileSuffix.INVENTORY_GENERATION_COMPONENT,id),player,path,RCFileSaver.INVENTORY_GENERATION_COMPONENT,id)) {
    if (saveDirectoryDataResult.deleteOther)     RCCommands.informDeleteResult(RecurrentComplex.saver.tryDeleteWithID(saveDirectoryDataResult.directory.opposite().toPath(),id,RCFileSuffix.INVENTORY_GENERATION_COMPONENT),player,RCFileSaver.INVENTORY_GENERATION_COMPONENT,id,saveDirectoryDataResult.directory.opposite().subDirectoryName());
    ItemStack heldItem=playServer.playerEntity.getHeldItem(EnumHand.MAIN_HAND);
    if (heldItem != null && heldItem.getItem() instanceof ItemInventoryGenComponentTag)     ItemInventoryGenComponentTag.setComponentKey(heldItem,id);
    player.openContainer.detectAndSendChanges();
  }
}

Fixed version (ground truth):
@Override public void processServer(PacketSaveInvGenComponent message,MessageContext ctx,WorldServer server){
  NetHandlerPlayServer playServer=ctx.getServerHandler();
  EntityPlayerMP player=playServer.playerEntity;
  if (RecurrentComplex.checkPerms(player))   return;
  SaveDirectoryData.Result saveDirectoryDataResult=message.getSaveDirectoryDataResult();
  String id=message.getKey();
  ResourceDirectory saveDir=saveDirectoryDataResult.directory;
  ResourceDirectory delDir=saveDir.opposite();
  GenericItemCollectionRegistry.INSTANCE.register(id,"String_Node_Str",message.getInventoryGenerator(),saveDir.isActive(),saveDir.getLevel());
  if (RCCommands.informSaveResult((message.getInventoryGenerator() != null && id != null) && RecurrentComplex.saver.trySave(saveDir.toPath(),RCFileSuffix.INVENTORY_GENERATION_COMPONENT,id),player,saveDir.subDirectoryName(),RCFileSaver.INVENTORY_GENERATION_COMPONENT,id)) {
    if (saveDirectoryDataResult.deleteOther)     RCCommands.informDeleteResult(RecurrentComplex.saver.tryDeleteWithID(delDir.toPath(),id,RCFileSuffix.INVENTORY_GENERATION_COMPONENT),player,RCFileSaver.INVENTORY_GENERATION_COMPONENT,id,delDir.subDirectoryName());
    ItemStack heldItem=playServer.playerEntity.getHeldItem(EnumHand.MAIN_HAND);
    if (heldItem != null && heldItem.getItem() instanceof ItemInventoryGenComponentTag)     ItemInventoryGenComponentTag.setComponentKey(heldItem,id);
    player.openContainer.detectAndSendChanges();
  }
}
Program: 134232
Project: 134232
Buggy source:
@Override public void processServer(PacketSaveStructure message,MessageContext ctx,WorldServer server){
  NetHandlerPlayServer netHandlerPlayServer=ctx.getServerHandler();
  EntityPlayerMP player=netHandlerPlayServer.playerEntity;
  if (RecurrentComplex.checkPerms(player))   return;
  StructureEntityInfo structureEntityInfo=StructureEntityInfo.get(player,null);
  GenericStructureInfo genericStructureInfo=message.getStructureInfo();
  if (structureEntityInfo != null)   genericStructureInfo.worldDataCompound=structureEntityInfo.getCachedExportStructureBlockDataNBT();
  SaveDirectoryData.Result saveDirectoryDataResult=message.getSaveDirectoryDataResult();
  String id=message.getStructureID();
  ResourceDirectory saveDir=saveDirectoryDataResult.directory;
  ResourceDirectory delDir=saveDir.opposite();
  StructureRegistry.INSTANCE.register(id,"String_Node_Str",genericStructureInfo,saveDir.isActive(),LeveledRegistry.Level.CUSTOM);
  if (RCCommands.informSaveResult(RecurrentComplex.saver.trySave(saveDir.toPath(),RCFileSaver.STRUCTURE,id),player,saveDir.subDirectoryName(),RCFileSaver.STRUCTURE,id))   if (saveDirectoryDataResult.deleteOther)   RCCommands.informDeleteResult(RecurrentComplex.saver.tryDeleteWithID(delDir.toPath(),id,RCFileSaver.STRUCTURE),player,RCFileSaver.STRUCTURE,id,delDir.subDirectoryName());
}

Fixed version (ground truth):
@Override public void processServer(PacketSaveStructure message,MessageContext ctx,WorldServer server){
  NetHandlerPlayServer netHandlerPlayServer=ctx.getServerHandler();
  EntityPlayerMP player=netHandlerPlayServer.playerEntity;
  if (RecurrentComplex.checkPerms(player))   return;
  StructureEntityInfo structureEntityInfo=StructureEntityInfo.get(player,null);
  GenericStructureInfo genericStructureInfo=message.getStructureInfo();
  if (structureEntityInfo != null)   genericStructureInfo.worldDataCompound=structureEntityInfo.getCachedExportStructureBlockDataNBT();
  SaveDirectoryData.Result saveDirectoryDataResult=message.getSaveDirectoryDataResult();
  String id=message.getStructureID();
  ResourceDirectory saveDir=saveDirectoryDataResult.directory;
  ResourceDirectory delDir=saveDir.opposite();
  StructureRegistry.INSTANCE.register(id,"String_Node_Str",genericStructureInfo,saveDir.isActive(),saveDir.getLevel());
  if (RCCommands.informSaveResult(RecurrentComplex.saver.trySave(saveDir.toPath(),RCFileSaver.STRUCTURE,id),player,saveDir.subDirectoryName(),RCFileSaver.STRUCTURE,id))   if (saveDirectoryDataResult.deleteOther)   RCCommands.informDeleteResult(RecurrentComplex.saver.tryDeleteWithID(delDir.toPath(),id,RCFileSaver.STRUCTURE),player,RCFileSaver.STRUCTURE,id,delDir.subDirectoryName());
}
Program: 134233
Project: 134233
Buggy source:
@Override public StructureInfo register(String id,String domain,StructureInfo structureInfo,boolean active,ILevel level){
  if (active && !(RCConfig.shouldStructureGenerate(id,domain) && structureInfo.areDependenciesResolved()))   active=false;
  clearCaches();
  return super.register(id,domain,structureInfo,active,level);
}

Fixed version (ground truth):
@Override public StructureInfo register(String id,String domain,StructureInfo structureInfo,boolean active,ILevel level){
  if (active && !(RCConfig.shouldStructureGenerate(id,domain) && structureInfo.areDependenciesResolved()))   active=false;
  StructureInfo prev=super.register(id,domain,structureInfo,active,level);
  clearCaches();
  return prev;
}
Program: 134234
Project: 134234
Buggy source:
@Override public GenericItemCollection.Component register(String id,String domain,GenericItemCollection.Component component,boolean active,ILevel level){
  if (component.inventoryGeneratorID == null || component.inventoryGeneratorID.length() == 0)   component.inventoryGeneratorID=id;
  if (active && !RCConfig.shouldInventoryGeneratorGenerate(id,domain))   active=false;
  Set<String> generating=activeIDs().stream().collect(Collectors.toSet());
  GenericItemCollection.Component register=super.register(id,domain,component,active,level);
  clearCaches(generating);
  return register;
}

Fixed version (ground truth):
@Override public GenericItemCollection.Component register(String id,String domain,GenericItemCollection.Component component,boolean active,ILevel level){
  if (component.inventoryGeneratorID == null || component.inventoryGeneratorID.length() == 0)   component.inventoryGeneratorID=id;
  if (active && !RCConfig.shouldInventoryGeneratorGenerate(id,domain))   active=false;
  Set<String> generating=activeIDs().stream().collect(Collectors.toSet());
  GenericItemCollection.Component prev=super.register(id,domain,component,active,level);
  clearCaches(generating);
  return prev;
}
Program: 134235
Project: 134235
Buggy source:
@Override public TableElement elementForIndexInSegment(GuiTable table,int index,int segment){
  if (isListSegment(segment)) {
    T t=list.get(index);
    TableCellButton[] cells=getEntryActions(index);
    for (    TableCellButton cell : cells) {
      cell.addAction(() -> {
        T entry=list.get(index);
        performEntryAction(cell.actionID,index,entry);
      }
);
      cell.id="String_Node_Str" + index;
    }
    return new TableElementCell(getDisplayString(t),new TableCellMulti(cells));
  }
  int addIndex=getAddIndex(segment);
  if (addIndex >= 0) {
    if (isUsesPresetActionForAdding()) {
      TableCellPresetAction cell=new TableCellPresetAction("String_Node_Str" + addIndex,getAddTitle(),getAddActions());
      cell.setActionButtonWidth(0.2f);
      cell.addAction(actionID -> createAddAction(addIndex,actionID).run());
      return new TableElementCell(cell);
    }
 else {
      TableCellButton[] cells=getAddActions();
      for (      TableCellButton cell : cells) {
        cell.addAction(createAddAction(addIndex,cell.actionID));
        cell.id="String_Node_Str" + addIndex;
      }
      return new TableElementCell(new TableCellMulti(cells));
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public TableElement elementForIndexInSegment(GuiTable table,int index,int segment){
  if (isListSegment(segment)) {
    T t=list.get(index);
    TableCellButton[] cells=getEntryActions(index);
    for (    TableCellButton cell : cells) {
      cell.addAction(() -> {
        T entry=list.get(index);
        performEntryAction(cell.actionID,index,entry);
      }
);
      cell.setId("String_Node_Str" + index);
    }
    return new TableElementCell(getDisplayString(t),new TableCellMulti(cells));
  }
  int addIndex=getAddIndex(segment);
  if (addIndex >= 0) {
    if (isUsesPresetActionForAdding()) {
      TableCellPresetAction cell=new TableCellPresetAction("String_Node_Str" + addIndex,getAddTitle(),getAddActions());
      cell.setActionButtonWidth(0.2f);
      cell.addAction(actionID -> createAddAction(addIndex,actionID).run());
      return new TableElementCell(cell);
    }
 else {
      TableCellButton[] cells=getAddActions();
      for (      TableCellButton cell : cells) {
        cell.addAction(createAddAction(addIndex,cell.actionID));
        cell.setId("String_Node_Str" + addIndex);
      }
      return new TableElementCell(new TableCellMulti(cells));
    }
  }
  return null;
}
Program: 134236
Project: 134236
Buggy source:
@Override public void execute(MinecraftServer server,ICommandSender commandSender,String[] args) throws CommandException {
  if (args.length <= 0) {
    throw ServerTranslations.wrongUsageException("String_Node_Str");
  }
  String structureID=args[0];
  StructureInfo<?> structureInfo=StructureRegistry.INSTANCE.getStructure(structureID);
  World world=commandSender.getEntityWorld();
  if (structureInfo == null) {
    throw ServerTranslations.commandException("String_Node_Str",structureID);
  }
  BlockPos coord;
  if (args.length >= 4)   coord=parseBlockPos(commandSender,args,1,false);
 else   coord=commandSender.getPosition();
  int rotation=args.length >= 5 ? parseInt(args[4]) : 0;
  boolean mirror=args.length >= 6 && parseBoolean(args[5]);
  AxisAlignedTransform2D transform=AxisAlignedTransform2D.from(rotation,mirror);
  if (structureInfo instanceof GenericStructureInfo)   OperationRegistry.queueOperation(new OperationGenerateStructure((GenericStructureInfo)structureInfo,null,transform,coord,true,structureID),commandSender);
 else {
    new StructureGenerator<>(structureInfo).world((WorldServer)world).transform(transform).lowerCoord(coord).asSource(true).generate();
  }
}

Fixed version (ground truth):
@Override public void execute(MinecraftServer server,ICommandSender commandSender,String[] args) throws CommandException {
  if (args.length <= 0) {
    throw ServerTranslations.wrongUsageException("String_Node_Str");
  }
  String structureID=args[0];
  StructureInfo<?> structureInfo=StructureRegistry.INSTANCE.getStructure(structureID);
  World world=commandSender.getEntityWorld();
  if (structureInfo == null) {
    throw ServerTranslations.commandException("String_Node_Str",structureID);
  }
  BlockPos coord;
  if (args.length >= 4)   coord=parseBlockPos(commandSender,args,1,false);
 else   coord=commandSender.getPosition();
  int rotation=args.length >= 5 ? parseInt(args[4]) : 0;
  boolean mirror=args.length >= 6 && parseBoolean(args[5]);
  AxisAlignedTransform2D transform=AxisAlignedTransform2D.from(rotation,mirror);
  if (structureInfo instanceof GenericStructureInfo)   OperationRegistry.queueOperation(new OperationGenerateStructure((GenericStructureInfo)structureInfo,structureID,transform,coord,true,structureID),commandSender);
 else {
    new StructureGenerator<>(structureInfo).world((WorldServer)world).transform(transform).lowerCoord(coord).asSource(true).generate();
  }
}
Program: 134238
Project: 134238
Buggy source:
@Override public void transformBlock(InstanceData instanceData,Phase phase,StructureSpawnContext context,BlockPos sourcePos,BlockPos worldPos,IBlockState sourceState,double density){
  WorldServer world=context.environment.world;
  if (phase == Phase.AFTER) {
    Set<BlockPos> remove=new HashSet<>();
    if (visitRecursively(new BlockArea(worldPos.subtract(new Vec3i(2,2,2)),worldPos.add(new Vec3i(2,2,2))).stream().filter(pos -> !instanceData.cloud.containsKey(pos)).collect(Collectors.toCollection(HashSet::new)),(changed,pos) -> {
      IBlockState state=world.getBlockState(pos);
      boolean isFoliage=RCBlockLogic.isFoliage(state,world,pos);
      if (!RCBlockLogic.canStay(state,world,pos))       context.setBlock(pos,Blocks.AIR.getDefaultState(),2);
 else       if (!isFoliage && !state.getBlock().isReplaceable(world,pos))       return false;
 else       if (isFoliage && remove.size() < MAX_TREE_SIZE && remove.add(pos))       neighbors(pos).forEach(changed::add);
      return true;
    }
)) {
      remove.forEach(pos -> context.setBlock(pos,Blocks.AIR.getDefaultState(),2));
    }
  }
 else {
    context.setBlock(worldPos,Blocks.AIR.getDefaultState(),2);
  }
}

Fixed version (ground truth):
@Override public void transformBlock(InstanceData instanceData,Phase phase,StructureSpawnContext context,BlockPos sourcePos,BlockPos worldPos,IBlockState sourceState,double density){
  WorldServer world=context.environment.world;
  if (phase == Phase.AFTER) {
    Set<BlockPos> remove=new HashSet<>();
    HashSet<BlockPos> check=new BlockArea(worldPos.subtract(new Vec3i(2,2,2)),worldPos.add(new Vec3i(2,2,2))).stream().filter(pos -> !instanceData.cloud.containsKey(pos)).collect(Collectors.toCollection(HashSet::new));
    if (visitRecursively(check,(changed,pos) -> {
      IBlockState state=world.getBlockState(pos);
      boolean isFoliage=RCBlockLogic.isFoliage(state,world,pos);
      if (!RCBlockLogic.canStay(state,world,pos))       context.setBlock(pos,Blocks.AIR.getDefaultState(),2);
 else       if (!isFoliage && !state.getBlock().isReplaceable(world,pos))       return false;
 else       if (isFoliage && remove.size() < MAX_TREE_SIZE && remove.add(pos))       neighbors(pos).forEach(changed::add);
      return true;
    }
)) {
      remove.forEach(pos -> context.setBlock(pos,Blocks.AIR.getDefaultState(),2));
    }
  }
 else {
    context.setBlock(worldPos,Blocks.AIR.getDefaultState(),2);
  }
}
Program: 134239
Project: 134239
Buggy source:
@Nonnull @Override public <I extends StructureGenerationInfo>List<I> generationInfos(@Nonnull Class<I> clazz){
  return generationInfos.stream().filter(info -> clazz.isAssignableFrom(info.getClass())).map(info -> (I)info).collect(Collectors.toList());
}

Fixed version (ground truth):
@Nonnull @Override public <I extends StructureGenerationInfo>List<I> generationInfos(@Nonnull Class<? extends I> clazz){
  return generationInfos.stream().filter(info -> clazz.isAssignableFrom(info.getClass())).map(info -> (I)info).collect(Collectors.toList());
}
Program: 134240
Project: 134240
Buggy source:
private GuiValidityStateIndicator.State currentNameState(){
  if (StructureRegistry.INSTANCE.allStructureIDs().contains(structureKey))   return GuiValidityStateIndicator.State.SEMI_VALID;
  return structureKey.trim().length() > 0 && !structureKey.contains("String_Node_Str") ? GuiValidityStateIndicator.State.VALID : GuiValidityStateIndicator.State.INVALID;
}

Fixed version (ground truth):
private GuiValidityStateIndicator.State currentNameState(){
  return StructureInfos.isSimpleID(structureKey) ? StructureRegistry.INSTANCE.allStructureIDs().contains(structureKey) ? GuiValidityStateIndicator.State.SEMI_VALID : GuiValidityStateIndicator.State.VALID : GuiValidityStateIndicator.State.INVALID;
}
Program: 134241
Project: 134241
Buggy source:
@Override public TableElement elementForIndexInSegment(GuiTable table,int index,int segment){
  if (segment == 0) {
    TableCellString cell=new TableCellString("String_Node_Str",genInfo.id());
    cell.setTooltip(IvTranslations.formatLines("String_Node_Str"));
    cell.setShowsValidityState(true);
    cell.setValidityState(StructureInfos.isSimpleIDState(genInfo.id()));
    cell.addPropertyListener(cell1 -> {
      genInfo.setID((String)cell1.getPropertyValue());
      ((TableCellString)cell1).setValidityState(StructureInfos.isSimpleIDState(genInfo.id()));
    }
);
    return new TableElementCell(IvTranslations.get("String_Node_Str"),cell);
  }
  return super.elementForIndexInSegment(table,index,segment);
}

Fixed version (ground truth):
@Override public TableElement elementForIndexInSegment(GuiTable table,int index,int segment){
  if (segment == 0) {
    TableCellString cell=new TableCellString("String_Node_Str",genInfo.id());
    cell.setTooltip(IvTranslations.formatLines("String_Node_Str"));
    cell.setShowsValidityState(true);
    cell.setValidityState(currentIDState());
    cell.addPropertyListener(cell1 -> {
      genInfo.setID((String)cell1.getPropertyValue());
      ((TableCellString)cell1).setValidityState(currentIDState());
    }
);
    return new TableElementCell(IvTranslations.get("String_Node_Str"),cell);
  }
  return super.elementForIndexInSegment(table,index,segment);
}
Program: 134242
Project: 134242
Buggy source:
@Override public TableElement elementForIndexInSegment(GuiTable table,int index,int segment){
switch (segment) {
case 1:
{
      TableCellString cell=new TableCellString("String_Node_Str",generationInfo.listID);
      cell.addPropertyListener(this);
      return new TableElementCell(IvTranslations.get("String_Node_Str"),cell);
    }
case 2:
  return RCGuiTables.defaultWeightElement(cell -> generationInfo.weight=TableElements.toDouble((Float)cell.getPropertyValue()),generationInfo.weight);
case 4:
{
  TableCellEnum cell=new TableCellEnum<>("String_Node_Str",generationInfo.front,TableDirections.getDirectionOptions(Directions.HORIZONTAL));
  cell.addPropertyListener(this);
  return new TableElementCell(IvTranslations.get("String_Node_Str"),cell);
}
}
return super.elementForIndexInSegment(table,index,segment);
}

Fixed version (ground truth):
@Override public TableElement elementForIndexInSegment(GuiTable table,int index,int segment){
switch (segment) {
case 1:
{
      TableCellString cell=new TableCellString("String_Node_Str",generationInfo.listID);
      cell.setShowsValidityState(true);
      cell.setValidityState(currentStructureListIDState());
      cell.addPropertyListener(cell1 -> {
        generationInfo.listID=cell.getPropertyValue();
        cell.setValidityState(currentStructureListIDState());
      }
);
      return new TableElementCell(IvTranslations.get("String_Node_Str"),cell);
    }
case 2:
  return RCGuiTables.defaultWeightElement(cell -> generationInfo.weight=TableElements.toDouble((Float)cell.getPropertyValue()),generationInfo.weight);
case 4:
{
  TableCellEnum cell=new TableCellEnum<>("String_Node_Str",generationInfo.front,TableDirections.getDirectionOptions(Directions.HORIZONTAL));
  cell.addPropertyListener(cell1 -> generationInfo.front=(EnumFacing)cell.getPropertyValue());
  return new TableElementCell(IvTranslations.get("String_Node_Str"),cell);
}
}
return super.elementForIndexInSegment(table,index,segment);
}
Program: 134243
Project: 134243
Buggy source:
@Override public TableElement elementForIndexInSegment(GuiTable table,int index,int segment){
  if (segment == 2) {
switch (index) {
case 0:
{
        TableCellFloatNullable cell=new TableCellFloatNullable("String_Node_Str",TableElements.toFloat(transformer.naturalExpansionDistance),1.0f,0,40,"String_Node_Str","String_Node_Str");
        cell.setScale(Scales.pow(5));
        cell.addPropertyListener(this);
        cell.setTooltip(IvTranslations.formatLines("String_Node_Str"));
        return new TableElementCell(IvTranslations.get("String_Node_Str"),cell);
      }
case 1:
{
      TableCellFloatNullable cell=new TableCellFloatNullable("String_Node_Str",TableElements.toFloat(transformer.naturalExpansionRandomization),1.0f,0,40,"String_Node_Str","String_Node_Str");
      cell.setScale(Scales.pow(5));
      cell.addPropertyListener(this);
      cell.setTooltip(IvTranslations.formatLines("String_Node_Str"));
      return new TableElementCell(IvTranslations.get("String_Node_Str"),cell);
    }
}
}
return super.elementForIndexInSegment(table,index,segment);
}

Fixed version (ground truth):
@Override public TableElement elementForIndexInSegment(GuiTable table,int index,int segment){
  if (segment == 2) {
switch (index) {
case 0:
{
        TableCellFloat cell=new TableCellFloat("String_Node_Str",TableElements.toFloat(transformer.naturalExpansionDistance),0,40);
        cell.setScale(Scales.pow(5));
        cell.addPropertyListener(this);
        cell.setTooltip(IvTranslations.formatLines("String_Node_Str"));
        return new TableElementCell(IvTranslations.get("String_Node_Str"),cell);
      }
case 1:
{
      TableCellFloat cell=new TableCellFloat("String_Node_Str",TableElements.toFloat(transformer.naturalExpansionRandomization),0,40);
      cell.setScale(Scales.pow(5));
      cell.addPropertyListener(this);
      cell.setTooltip(IvTranslations.formatLines("String_Node_Str"));
      return new TableElementCell(IvTranslations.get("String_Node_Str"),cell);
    }
}
}
return super.elementForIndexInSegment(table,index,segment);
}
Program: 134244
Project: 134244
Buggy source:
@Override public TableElement elementForIndexInSegment(GuiTable table,int index,int segment){
  if (segment == 2) {
switch (index) {
case 0:
{
        TableCellFloatNullable cell=new TableCellFloatNullable("String_Node_Str",TableElements.toFloat(transformer.naturalExpansionDistance),1.0f,0,40,"String_Node_Str","String_Node_Str");
        cell.setScale(Scales.pow(5));
        cell.addPropertyListener(this);
        cell.setTooltip(IvTranslations.formatLines("String_Node_Str"));
        return new TableElementCell(IvTranslations.get("String_Node_Str"),cell);
      }
case 1:
{
      TableCellFloatNullable cell=new TableCellFloatNullable("String_Node_Str",TableElements.toFloat(transformer.naturalExpansionRandomization),1.0f,0,40,"String_Node_Str","String_Node_Str");
      cell.setScale(Scales.pow(5));
      cell.addPropertyListener(this);
      cell.setTooltip(IvTranslations.formatLines("String_Node_Str"));
      return new TableElementCell(IvTranslations.get("String_Node_Str"),cell);
    }
}
}
return super.elementForIndexInSegment(table,index,segment);
}

Fixed version (ground truth):
@Override public TableElement elementForIndexInSegment(GuiTable table,int index,int segment){
  if (segment == 2) {
switch (index) {
case 0:
{
        TableCellFloat cell=new TableCellFloat("String_Node_Str",TableElements.toFloat(transformer.naturalExpansionDistance),0,40);
        cell.setScale(Scales.pow(5));
        cell.addPropertyListener(this);
        cell.setTooltip(IvTranslations.formatLines("String_Node_Str"));
        return new TableElementCell(IvTranslations.get("String_Node_Str"),cell);
      }
case 1:
{
      TableCellFloat cell=new TableCellFloat("String_Node_Str",TableElements.toFloat(transformer.naturalExpansionRandomization),0,40);
      cell.setScale(Scales.pow(5));
      cell.addPropertyListener(this);
      cell.setTooltip(IvTranslations.formatLines("String_Node_Str"));
      return new TableElementCell(IvTranslations.get("String_Node_Str"),cell);
    }
}
}
return super.elementForIndexInSegment(table,index,segment);
}