nus-yam/ex-repair huggingface dataset:
Program: 57857
Project: 57857
Buggy source:
/** 
 * Returns the filtered configuration (only properties starting with the specified prefix). The property keys are also trimmed from the prefix. The returned   {@link Properties} object is used to initialized the{@link AuthenticationHandler}. <p/> This method can be overriden by subclasses to obtain the configuration from other configuration source than the web.xml file.
 * @param configPrefix configuration prefix to use for extracting configuration properties.
 * @param filterConfig filter configuration object
 * @return the configuration to be used with the {@link AuthenticationHandler} instance.
 * @throws ServletException thrown if the configuration could not be created.
 */
protected Properties getConfiguration(String configPrefix,FilterConfig filterConfig) throws ServletException {
  Properties props=new Properties();
  Enumeration names=filterConfig.getInitParameterNames();
  while (names.hasMoreElements()) {
    String name=(String)names.nextElement();
    if (name.startsWith(configPrefix)) {
      String value=filterConfig.getInitParameter(name);
      props.put(name.substring(configPrefix.length()),value);
    }
  }
  return props;
}

Fixed version (ground truth):
/** 
 * Returns the filtered configuration (only properties starting with the specified prefix). The property keys are also trimmed from the prefix. The returned   {@link Properties} object is used to initialized the{@link AuthenticationHandler}. <p/> This method can be overriden by subclasses to obtain the configuration from other configuration source than the web.xml file.
 * @param configPrefix configuration prefix to use for extracting configuration properties.
 * @param filterConfig filter configuration object
 * @return the configuration to be used with the {@link AuthenticationHandler} instance.
 * @throws ServletException thrown if the configuration could not be created.
 */
protected Properties getConfiguration(String configPrefix,FilterConfig filterConfig) throws ServletException {
  Properties props=new Properties();
  Enumeration<?> names=filterConfig.getInitParameterNames();
  while (names.hasMoreElements()) {
    String name=(String)names.nextElement();
    if (name.startsWith(configPrefix)) {
      String value=filterConfig.getInitParameter(name);
      props.put(name.substring(configPrefix.length()),value);
    }
  }
  return props;
}
Program: 57859
Project: 57859
Buggy source:
/** 
 * Sync two replicas 
 */
private void testSyncReplicas(ReplicaRecoveryInfo replica1,ReplicaRecoveryInfo replica2,InterDatanodeProtocol dn1,InterDatanodeProtocol dn2,long expectLen) throws IOException {
  DatanodeInfo[] locs=new DatanodeInfo[]{mock(DatanodeInfo.class),mock(DatanodeInfo.class)};
  RecoveringBlock rBlock=new RecoveringBlock(block,locs,RECOVERY_ID);
  ArrayList<BlockRecord> syncList=new ArrayList<BlockRecord>(2);
  BlockRecord record1=new BlockRecord(new DatanodeID("String_Node_Str","String_Node_Str",44,55),dn1,replica1);
  BlockRecord record2=new BlockRecord(new DatanodeID("String_Node_Str","String_Node_Str",11,22),dn2,replica2);
  syncList.add(record1);
  syncList.add(record2);
  when(dn1.updateReplicaUnderRecovery((Block)anyObject(),anyLong(),anyLong())).thenReturn(new Block(block.getBlockId(),expectLen,block.getGenerationStamp()));
  when(dn2.updateReplicaUnderRecovery((Block)anyObject(),anyLong(),anyLong())).thenReturn(new Block(block.getBlockId(),expectLen,block.getGenerationStamp()));
  dn.syncBlock(rBlock,syncList);
}

Fixed version (ground truth):
/** 
 * Sync two replicas 
 */
private void testSyncReplicas(ReplicaRecoveryInfo replica1,ReplicaRecoveryInfo replica2,InterDatanodeProtocol dn1,InterDatanodeProtocol dn2,long expectLen) throws IOException {
  DatanodeInfo[] locs=new DatanodeInfo[]{mock(DatanodeInfo.class),mock(DatanodeInfo.class)};
  RecoveringBlock rBlock=new RecoveringBlock(block,locs,RECOVERY_ID);
  ArrayList<BlockRecord> syncList=new ArrayList<BlockRecord>(2);
  BlockRecord record1=new BlockRecord(new DatanodeID("String_Node_Str","String_Node_Str",44,55),dn1,replica1);
  BlockRecord record2=new BlockRecord(new DatanodeID("String_Node_Str","String_Node_Str",11,22),dn2,replica2);
  syncList.add(record1);
  syncList.add(record2);
  when(dn1.updateReplicaUnderRecovery((ExtendedBlock)anyObject(),anyLong(),anyLong())).thenReturn(new ExtendedBlock(block.getBlockPoolId(),block.getBlockId(),expectLen,block.getGenerationStamp()));
  when(dn2.updateReplicaUnderRecovery((ExtendedBlock)anyObject(),anyLong(),anyLong())).thenReturn(new ExtendedBlock(block.getBlockPoolId(),block.getBlockId(),expectLen,block.getGenerationStamp()));
  dn.syncBlock(rBlock,syncList);
}
Program: 57860
Project: 57860
Buggy source:
@Test public void getClasspath(){
  assertTrue(JVMUtil.getClasspath().length > 0);
  assertTrue(JVMUtil.getClasspath(ClassLoader.getSystemClassLoader()).length > 0);
  assertArrayEquals(JVMUtil.getClasspath(),JVMUtil.getClasspath(ClassLoader.getSystemClassLoader()));
  assertEquals(1,JVMUtil.getClasspath(null).length);
}

Fixed version (ground truth):
@Test public void getClasspath(){
  try {
    assertTrue(JVMUtil.getClasspath().length > 0);
    assertTrue(JVMUtil.getClasspath(ClassLoader.getSystemClassLoader()).length > 0);
    assertArrayEquals(JVMUtil.getClasspath(),JVMUtil.getClasspath(ClassLoader.getSystemClassLoader()));
    assertEquals(1,JVMUtil.getClasspath(null).length);
  }
 catch (  Exception e) {
    assertEquals("String_Node_Str",e.getMessage());
    assertEquals(RuntimeException.class,e.getClass());
    assertEquals("String_Node_Str",e.getCause().getMessage());
    assertEquals(java.util.zip.ZipException.class,e.getCause().getClass());
  }
}
Program: 57861
Project: 57861
Buggy source:
@Test public void getJavaRuntimeInfo(){
  String arch=JVMUtil.getJavaRuntimeInfo().getSunArchDataModel();
  assertTrue("String_Node_Str".equals(arch) || "String_Node_Str".equals(arch));
  String boot=JVMUtil.getJavaRuntimeInfo().getSunBootClassPath();
  File[] classpathes=JVMUtil.getClasspath();
  boolean flag=false;
  for (  File classpath : classpathes) {
    if (classpath.getAbsolutePath().equals(boot)) {
      flag=true;
      break;
    }
  }
  assertTrue(flag);
}

Fixed version (ground truth):
@Test public void getJavaRuntimeInfo(){
  String arch=JVMUtil.getJavaRuntimeInfo().getSunArchDataModel();
  assertTrue("String_Node_Str".equals(arch) || "String_Node_Str".equals(arch));
  String boot=JVMUtil.getJavaRuntimeInfo().getSunBootClassPath();
  try {
    File[] classpathes=JVMUtil.getClasspath();
    boolean flag=false;
    for (    File classpath : classpathes) {
      if (classpath.getAbsolutePath().equals(boot)) {
        flag=true;
        break;
      }
    }
    assertTrue(flag);
  }
 catch (  Exception e) {
    assertEquals("String_Node_Str",e.getMessage());
    assertEquals(RuntimeException.class,e.getClass());
    assertEquals("String_Node_Str",e.getCause().getMessage());
    assertEquals(java.util.zip.ZipException.class,e.getCause().getClass());
  }
}
Program: 57862
Project: 57862
Buggy source:
@Test public void getLocalHostname(){
  assertEquals("String_Node_Str",NetworkUtil.getLocalHostname());
}

Fixed version (ground truth):
@Test public void getLocalHostname(){
}
Program: 57863
Project: 57863
Buggy source:
@Test public void getLocalHostIp(){
  assertEquals("String_Node_Str",NetworkUtil.getLocalHostIp());
}

Fixed version (ground truth):
@Test public void getLocalHostIp(){
}
Program: 57865
Project: 57865
Buggy source:
@Test public void retrieve(){
  try {
    Resource resource=access.retrieve(id,"String_Node_Str");
    byte[] raw=StreamUtil.readBytes(new File(log4j),true).getRawBytes();
    assertArrayEquals(raw,resource.getBody().getRawBytes());
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Test public void retrieve(){
  store();
  try {
    Resource resource=access.retrieve(id,"String_Node_Str");
    byte[] raw=StreamUtil.readBytes(new File(log4j),true).getRawBytes();
    assertArrayEquals(raw,resource.getBody().getRawBytes());
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 57866
Project: 57866
Buggy source:
@Test public void store(){
  File file=new File(log4j);
  try {
    ByteArray byteArray=StreamUtil.readBytes(file,true);
    Resource resource=new FileResource(id,byteArray);
    resource.getHeader().ext("String_Node_Str");
    assertEquals(2256099345L,resource.checksum());
    access.store(resource);
    byte[] raw=StreamUtil.readBytes(new File(log4j),true).getRawBytes();
    assertArrayEquals(raw,resource.getBody().getRawBytes());
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Test public void store(){
  File file=new File(log4j);
  try {
    ByteArray byteArray=StreamUtil.readBytes(file,true);
    Resource resource=new FileResource(id,byteArray);
    resource.getHeader().ext("String_Node_Str");
    assertEquals(4114700253L,resource.checksum());
    access.store(resource);
    byte[] raw=StreamUtil.readBytes(new File(log4j),true).getRawBytes();
    assertArrayEquals(raw,resource.getBody().getRawBytes());
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 57867
Project: 57867
Buggy source:
@Test public void remove(){
  try {
    assertTrue(access.remove(id,"String_Node_Str"));
  }
 catch (  AccessException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Test public void remove(){
  store();
  try {
    assertTrue(access.remove(id,"String_Node_Str"));
  }
 catch (  AccessException e) {
    e.printStackTrace();
  }
}
Program: 57868
Project: 57868
Buggy source:
@Test public void find(){
  AccessStrategy strategy=new DivideThousand();
  String where=strategy.find(1234567890);
  assertEquals("String_Node_Str",where);
  where=strategy.find(123456789);
  assertEquals("String_Node_Str",where);
}

Fixed version (ground truth):
@Test public void find(){
  AccessStrategy strategy=new DivideThousand();
  String where=strategy.find(1234567890);
  assertEquals("String_Node_Str".replace("String_Node_Str",File.separator),where);
  where=strategy.find(123456789);
  assertEquals("String_Node_Str".replace("String_Node_Str",File.separator),where);
}
Program: 57869
Project: 57869
Buggy source:
@Test public void exportBean() throws IOException {
  CsvBean bean=processor.exportBean(CsvBean.class,testBeanPath);
  assertEquals(bean,createBean("String_Node_Str",25,"String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
@Test public void exportBean() throws IOException {
  importBean();
  CsvBean bean=processor.exportBean(CsvBean.class,testBeanPath);
  assertEquals(bean,createBean("String_Node_Str",25,"String_Node_Str","String_Node_Str"));
}
Program: 57870
Project: 57870
Buggy source:
@Test public void exportBeans() throws IOException {
  List<CsvBean> list=processor.exportBeans(CsvBean.class,testBeansPath);
  for (  CsvBean bean : list) {
    logger.info(bean);
  }
}

Fixed version (ground truth):
@Test public void exportBeans() throws IOException {
  importBeans();
  List<CsvBean> list=processor.exportBeans(CsvBean.class,testBeansPath);
  for (  CsvBean bean : list) {
    logger.info(bean);
  }
}
Program: 57871
Project: 57871
Buggy source:
@Test public void setLocation(){
  AppInfo app=new AppInfo();
  app.setLocation("String_Node_Str");
  assertEquals("String_Node_Str",app.getAppVersion());
  app.setLocation("String_Node_Str");
  assertEquals("String_Node_Str",app.getSpecificationTitle());
  assertEquals("String_Node_Str",app.getSpecificationVersion());
  assertEquals("String_Node_Str",app.getSpecificationVendor());
  assertEquals("String_Node_Str",app.getImplementationTitle());
}

Fixed version (ground truth):
@Test public void setLocation(){
  AppInfo app=new AppInfo();
  app.setLocation("String_Node_Str");
  assertEquals("String_Node_Str",app.getAppVersion());
}
Program: 57872
Project: 57872
Buggy source:
@Override public List<String> getSuggestions(CommandSource source,String arguments,Location<World> targetPosition) throws CommandException {
  if (!(source instanceof Player)) {
    return null;
  }
  PlotPlayer player=SpongeUtil.getPlayer((Player)source);
  String[] args=arguments.split("String_Node_Str");
  if (args.length == 0) {
    return Collections.singletonList(MainCommand.getInstance().toString());
  }
  Collection objects=MainCommand.getInstance().tab(player,args,arguments.endsWith("String_Node_Str"));
  if (objects == null) {
    return null;
  }
  List<String> result=new ArrayList<>();
  for (  Object o : objects) {
    result.add(o.toString());
  }
  return result.isEmpty() ? null : result;
}

Fixed version (ground truth):
@Override public List<String> getSuggestions(CommandSource source,String arguments,Location<World> targetPosition) throws CommandException {
  if (!(source instanceof Player)) {
    return ImmutableList.of();
  }
  PlotPlayer player=SpongeUtil.getPlayer((Player)source);
  String[] args=arguments.split("String_Node_Str");
  if (args.length == 0) {
    return Collections.singletonList(MainCommand.getInstance().toString());
  }
  Collection objects=MainCommand.getInstance().tab(player,args,arguments.endsWith("String_Node_Str"));
  if (objects == null) {
    return ImmutableList.of();
  }
  List<String> result=new ArrayList<>();
  for (  Object o : objects) {
    result.add(o.toString());
  }
  return result;
}
Program: 57873
Project: 57873
Buggy source:
@Override public List<String> getSuggestions(CommandSource source,String arguments,Location<World> targetPosition) throws CommandException {
  if (!(source instanceof Player)) {
    return null;
  }
  PlotPlayer player=SpongeUtil.getPlayer((Player)source);
  String[] args=arguments.split("String_Node_Str");
  if (args.length == 0) {
    return Collections.singletonList(MainCommand.getInstance().toString());
  }
  Collection objects=MainCommand.getInstance().tab(player,args,arguments.endsWith("String_Node_Str"));
  if (objects == null) {
    return null;
  }
  List<String> result=new ArrayList<>();
  for (  Object o : objects) {
    result.add(o.toString());
  }
  return result.isEmpty() ? null : result;
}

Fixed version (ground truth):
@Override public List<String> getSuggestions(CommandSource source,String arguments,Location<World> targetPosition) throws CommandException {
  if (!(source instanceof Player)) {
    return ImmutableList.of();
  }
  PlotPlayer player=SpongeUtil.getPlayer((Player)source);
  String[] args=arguments.split("String_Node_Str");
  if (args.length == 0) {
    return Collections.singletonList(MainCommand.getInstance().toString());
  }
  Collection objects=MainCommand.getInstance().tab(player,args,arguments.endsWith("String_Node_Str"));
  if (objects == null) {
    return ImmutableList.of();
  }
  List<String> result=new ArrayList<>();
  for (  Object o : objects) {
    result.add(o.toString());
  }
  return result;
}
Program: 57875
Project: 57875
Buggy source:
public boolean isSolid(int i){
  return i != 0 && Block.getBlockById(i).isVisuallyOpaque();
}

Fixed version (ground truth):
public boolean isSolid(int i){
  return i != 0 && Block.getBlockById(i).isFullyOpaque(Block.getBlockById(i).getDefaultState());
}
Program: 57876
Project: 57876
Buggy source:
public void setBiomes(LocalChunk<char[]> lc){
  if (lc.biomes != null) {
    World worldObj=getSpongeWorld();
    int bx=lc.getX() << 4;
    int bz=lc.getX() << 4;
    String last=null;
    BiomeType biome=null;
    for (int x=0; x < lc.biomes.length; x++) {
      String[] biomes2=lc.biomes[x];
      if (biomes2 != null) {
        for (int y=0; y < biomes2.length; y++) {
          String biomeStr=biomes2[y];
          if (biomeStr != null) {
            if (last == null || !StringMan.isEqual(last,biomeStr)) {
              biome=SpongeUtil.getBiome(biomeStr.toUpperCase());
            }
            worldObj.setBiome(bx,bz,biome);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public void setBiomes(LocalChunk<char[]> lc){
  if (lc.biomes != null) {
    World worldObj=getSpongeWorld();
    int bx=lc.getX() << 4;
    int bz=lc.getX() << 4;
    String last=null;
    BiomeType biome=null;
    for (int x=0; x < lc.biomes.length; x++) {
      String[] biomes2=lc.biomes[x];
      if (biomes2 != null) {
        for (int y=0; y < biomes2.length; y++) {
          String biomeStr=biomes2[y];
          if (biomeStr != null) {
            if (last == null || !StringMan.isEqual(last,biomeStr)) {
              biome=SpongeUtil.getBiome(biomeStr.toUpperCase());
            }
            worldObj.setBiome(bx,0,bz,biome);
          }
        }
      }
    }
  }
}
Program: 57877
Project: 57877
Buggy source:
@Override public PlotBlock getBlock(int x,int y,int z){
  World worldObj=getSpongeWorld();
  BlockState block=worldObj.getBlock(x,y,z);
  if (block == null) {
    return PlotBlock.get(0,0);
  }
  return SpongeUtil.getPlotBlock(block);
}

Fixed version (ground truth):
@Override public PlotBlock getBlock(int x,int y,int z){
  World worldObj=getSpongeWorld();
  BlockState block=worldObj.getBlock(x,y,z);
  return SpongeUtil.getPlotBlock(block);
}
Program: 57881
Project: 57881
Buggy source:
public boolean setAir(PlotArea plotArea,PlotId plotId,PlotBlock[] blocks){
  Plot plot=plotArea.getPlotAbs(plotId);
  if (!plot.isBasePlot()) {
    return false;
  }
  ClassicPlotWorld dpw=(ClassicPlotWorld)plotArea;
  LocalBlockQueue queue=plotArea.getQueue(false);
  int maxY=plotArea.getPlotManager().getWorldHeight();
  for (  RegionWrapper region : plot.getRegions()) {
    Location pos1=new Location(plotArea.worldname,region.minX,dpw.PLOT_HEIGHT + 1,region.minZ);
    Location pos2=new Location(plotArea.worldname,region.maxX,Math.min(maxY,255),region.maxZ);
    queue.setCuboid(pos1,pos2,blocks);
  }
  queue.enqueue();
  return true;
}

Fixed version (ground truth):
public boolean setAir(PlotArea plotArea,PlotId plotId,PlotBlock[] blocks){
  Plot plot=plotArea.getPlotAbs(plotId);
  if (!plot.isBasePlot()) {
    return false;
  }
  ClassicPlotWorld dpw=(ClassicPlotWorld)plotArea;
  LocalBlockQueue queue=plotArea.getQueue(false);
  int maxY=plotArea.getPlotManager().getWorldHeight();
  for (  RegionWrapper region : plot.getRegions()) {
    Location pos1=new Location(plotArea.worldname,region.minX,dpw.PLOT_HEIGHT + 1,region.minZ);
    Location pos2=new Location(plotArea.worldname,region.maxX,maxY,region.maxZ);
    queue.setCuboid(pos1,pos2,blocks);
  }
  queue.enqueue();
  return true;
}
Program: 57883
Project: 57883
Buggy source:
@Override public boolean createRoadSouthEast(PlotArea plotArea,Plot plot){
  ClassicPlotWorld dpw=(ClassicPlotWorld)plotArea;
  Location pos2=getPlotTopLocAbs(plotArea,plot.getId());
  int sx=pos2.getX() + 1;
  int ex=sx + dpw.ROAD_WIDTH - 1;
  int sz=pos2.getZ() + 1;
  int ez=sz + dpw.ROAD_WIDTH - 1;
  LocalBlockQueue queue=plotArea.getQueue(false);
  queue.setCuboid(new Location(plotArea.worldname,sx + 1,dpw.ROAD_HEIGHT + 1,sz + 1),new Location(plotArea.worldname,ex - 1,255,ez - 1),PlotBlock.get((short)0,(byte)0));
  queue.setCuboid(new Location(plotArea.worldname,sx + 1,0,sz + 1),new Location(plotArea.worldname,ex - 1,0,ez - 1),PlotBlock.get((short)7,(byte)0));
  queue.setCuboid(new Location(plotArea.worldname,sx + 1,1,sz + 1),new Location(plotArea.worldname,ex - 1,dpw.ROAD_HEIGHT,ez - 1),dpw.ROAD_BLOCK);
  queue.enqueue();
  return true;
}

Fixed version (ground truth):
@Override public boolean createRoadSouthEast(PlotArea plotArea,Plot plot){
  ClassicPlotWorld dpw=(ClassicPlotWorld)plotArea;
  Location pos2=getPlotTopLocAbs(plotArea,plot.getId());
  int sx=pos2.getX() + 1;
  int ex=sx + dpw.ROAD_WIDTH - 1;
  int sz=pos2.getZ() + 1;
  int ez=sz + dpw.ROAD_WIDTH - 1;
  LocalBlockQueue queue=plotArea.getQueue(false);
  queue.setCuboid(new Location(plotArea.worldname,sx + 1,dpw.ROAD_HEIGHT + 1,sz + 1),new Location(plotArea.worldname,ex - 1,dpw.getPlotManager().getWorldHeight(),ez - 1),PlotBlock.get((short)0,(byte)0));
  queue.setCuboid(new Location(plotArea.worldname,sx + 1,0,sz + 1),new Location(plotArea.worldname,ex - 1,0,ez - 1),PlotBlock.get((short)7,(byte)0));
  queue.setCuboid(new Location(plotArea.worldname,sx + 1,1,sz + 1),new Location(plotArea.worldname,ex - 1,dpw.ROAD_HEIGHT,ez - 1),dpw.ROAD_BLOCK);
  queue.enqueue();
  return true;
}
Program: 57884
Project: 57884
Buggy source:
@Override public boolean removeRoadSouthEast(PlotArea plotArea,Plot plot){
  ClassicPlotWorld dpw=(ClassicPlotWorld)plotArea;
  Location location=getPlotTopLocAbs(dpw,plot.getId());
  int sx=location.getX() + 1;
  int ex=sx + dpw.ROAD_WIDTH - 1;
  int sz=location.getZ() + 1;
  int ez=sz + dpw.ROAD_WIDTH - 1;
  LocalBlockQueue queue=plotArea.getQueue(false);
  queue.setCuboid(new Location(plotArea.worldname,sx,dpw.ROAD_HEIGHT + 1,sz),new Location(plotArea.worldname,ex,255,ez),PlotBlock.get((short)0,(byte)0));
  queue.setCuboid(new Location(plotArea.worldname,sx,1,sz),new Location(plotArea.worldname,ex,dpw.ROAD_HEIGHT - 1,ez),dpw.MAIN_BLOCK);
  queue.setCuboid(new Location(plotArea.worldname,sx,dpw.ROAD_HEIGHT,sz),new Location(plotArea.worldname,ex,dpw.ROAD_HEIGHT,ez),dpw.TOP_BLOCK);
  queue.enqueue();
  return true;
}

Fixed version (ground truth):
@Override public boolean removeRoadSouthEast(PlotArea plotArea,Plot plot){
  ClassicPlotWorld dpw=(ClassicPlotWorld)plotArea;
  Location location=getPlotTopLocAbs(dpw,plot.getId());
  int sx=location.getX() + 1;
  int ex=sx + dpw.ROAD_WIDTH - 1;
  int sz=location.getZ() + 1;
  int ez=sz + dpw.ROAD_WIDTH - 1;
  LocalBlockQueue queue=plotArea.getQueue(false);
  queue.setCuboid(new Location(plotArea.worldname,sx,dpw.ROAD_HEIGHT + 1,sz),new Location(plotArea.worldname,ex,plotArea.getPlotManager().getWorldHeight(),ez),PlotBlock.get((short)0,(byte)0));
  queue.setCuboid(new Location(plotArea.worldname,sx,1,sz),new Location(plotArea.worldname,ex,dpw.ROAD_HEIGHT - 1,ez),dpw.MAIN_BLOCK);
  queue.setCuboid(new Location(plotArea.worldname,sx,dpw.ROAD_HEIGHT,sz),new Location(plotArea.worldname,ex,dpw.ROAD_HEIGHT,ez),dpw.TOP_BLOCK);
  queue.enqueue();
  return true;
}
Program: 57885
Project: 57885
Buggy source:
@Override public boolean removeRoadSouth(PlotArea plotArea,Plot plot){
  ClassicPlotWorld dpw=(ClassicPlotWorld)plotArea;
  Location pos1=getPlotBottomLocAbs(plotArea,plot.getId());
  Location pos2=getPlotTopLocAbs(plotArea,plot.getId());
  int sz=pos2.getZ() + 1;
  int ez=sz + dpw.ROAD_WIDTH - 1;
  int sx=pos1.getX() - 1;
  int ex=pos2.getX() + 1;
  LocalBlockQueue queue=plotArea.getQueue(false);
  int maxY=plotArea.getPlotManager().getWorldHeight();
  queue.setCuboid(new Location(plotArea.worldname,sx,Math.min(dpw.PLOT_HEIGHT,dpw.ROAD_HEIGHT) + 1,sz),new Location(plotArea.worldname,ex,Math.min(maxY,255),ez),PlotBlock.get((short)0,(byte)0));
  queue.setCuboid(new Location(plotArea.worldname,sx + 1,1,sz),new Location(plotArea.worldname,ex - 1,dpw.PLOT_HEIGHT - 1,ez),dpw.MAIN_BLOCK);
  queue.setCuboid(new Location(plotArea.worldname,sx + 1,dpw.PLOT_HEIGHT,sz),new Location(plotArea.worldname,ex - 1,dpw.PLOT_HEIGHT,ez),dpw.TOP_BLOCK);
  queue.enqueue();
  return true;
}

Fixed version (ground truth):
@Override public boolean removeRoadSouth(PlotArea plotArea,Plot plot){
  ClassicPlotWorld dpw=(ClassicPlotWorld)plotArea;
  Location pos1=getPlotBottomLocAbs(plotArea,plot.getId());
  Location pos2=getPlotTopLocAbs(plotArea,plot.getId());
  int sz=pos2.getZ() + 1;
  int ez=sz + dpw.ROAD_WIDTH - 1;
  int sx=pos1.getX() - 1;
  int ex=pos2.getX() + 1;
  LocalBlockQueue queue=plotArea.getQueue(false);
  queue.setCuboid(new Location(plotArea.worldname,sx,Math.min(dpw.PLOT_HEIGHT,dpw.ROAD_HEIGHT) + 1,sz),new Location(plotArea.worldname,ex,plotArea.getPlotManager().getWorldHeight(),ez),PlotBlock.get((short)0,(byte)0));
  queue.setCuboid(new Location(plotArea.worldname,sx + 1,1,sz),new Location(plotArea.worldname,ex - 1,dpw.PLOT_HEIGHT - 1,ez),dpw.MAIN_BLOCK);
  queue.setCuboid(new Location(plotArea.worldname,sx + 1,dpw.PLOT_HEIGHT,sz),new Location(plotArea.worldname,ex - 1,dpw.PLOT_HEIGHT,ez),dpw.TOP_BLOCK);
  queue.enqueue();
  return true;
}
Program: 57886
Project: 57886
Buggy source:
@Override public boolean removeRoadEast(PlotArea plotArea,Plot plot){
  ClassicPlotWorld dpw=(ClassicPlotWorld)plotArea;
  Location pos1=getPlotBottomLocAbs(plotArea,plot.getId());
  Location pos2=getPlotTopLocAbs(plotArea,plot.getId());
  int sx=pos2.getX() + 1;
  int ex=sx + dpw.ROAD_WIDTH - 1;
  int sz=pos1.getZ() - 1;
  int ez=pos2.getZ() + 1;
  LocalBlockQueue queue=plotArea.getQueue(false);
  int maxY=plotArea.getPlotManager().getWorldHeight();
  queue.setCuboid(new Location(plotArea.worldname,sx,Math.min(dpw.PLOT_HEIGHT,dpw.ROAD_HEIGHT) + 1,sz),new Location(plotArea.worldname,ex,Math.min(maxY,255),ez),PlotBlock.get((short)0,(byte)0));
  queue.setCuboid(new Location(plotArea.worldname,sx,1,sz + 1),new Location(plotArea.worldname,ex,dpw.PLOT_HEIGHT - 1,ez - 1),dpw.MAIN_BLOCK);
  queue.setCuboid(new Location(plotArea.worldname,sx,dpw.PLOT_HEIGHT,sz + 1),new Location(plotArea.worldname,ex,dpw.PLOT_HEIGHT,ez - 1),dpw.TOP_BLOCK);
  queue.enqueue();
  return true;
}

Fixed version (ground truth):
@Override public boolean removeRoadEast(PlotArea plotArea,Plot plot){
  ClassicPlotWorld dpw=(ClassicPlotWorld)plotArea;
  Location pos1=getPlotBottomLocAbs(plotArea,plot.getId());
  Location pos2=getPlotTopLocAbs(plotArea,plot.getId());
  int sx=pos2.getX() + 1;
  int ex=sx + dpw.ROAD_WIDTH - 1;
  int sz=pos1.getZ() - 1;
  int ez=pos2.getZ() + 1;
  LocalBlockQueue queue=plotArea.getQueue(false);
  queue.setCuboid(new Location(plotArea.worldname,sx,Math.min(dpw.PLOT_HEIGHT,dpw.ROAD_HEIGHT) + 1,sz),new Location(plotArea.worldname,ex,plotArea.getPlotManager().getWorldHeight(),ez),PlotBlock.get((short)0,(byte)0));
  queue.setCuboid(new Location(plotArea.worldname,sx,1,sz + 1),new Location(plotArea.worldname,ex,dpw.PLOT_HEIGHT - 1,ez - 1),dpw.MAIN_BLOCK);
  queue.setCuboid(new Location(plotArea.worldname,sx,dpw.PLOT_HEIGHT,sz + 1),new Location(plotArea.worldname,ex,dpw.PLOT_HEIGHT,ez - 1),dpw.TOP_BLOCK);
  queue.enqueue();
  return true;
}
Program: 57887
Project: 57887
Buggy source:
public boolean setAll(PlotArea plotArea,PlotId plotId,PlotBlock[] blocks){
  Plot plot=plotArea.getPlotAbs(plotId);
  if (!plot.isBasePlot()) {
    return false;
  }
  LocalBlockQueue queue=plotArea.getQueue(false);
  int maxY=plotArea.getPlotManager().getWorldHeight();
  for (  RegionWrapper region : plot.getRegions()) {
    Location pos1=new Location(plotArea.worldname,region.minX,1,region.minZ);
    Location pos2=new Location(plotArea.worldname,region.maxX,Math.min(maxY,255),region.maxZ);
    queue.setCuboid(pos1,pos2,blocks);
  }
  queue.enqueue();
  return true;
}

Fixed version (ground truth):
public boolean setAll(PlotArea plotArea,PlotId plotId,PlotBlock[] blocks){
  Plot plot=plotArea.getPlotAbs(plotId);
  if (!plot.isBasePlot()) {
    return false;
  }
  LocalBlockQueue queue=plotArea.getQueue(false);
  int maxY=plotArea.getPlotManager().getWorldHeight();
  for (  RegionWrapper region : plot.getRegions()) {
    Location pos1=new Location(plotArea.worldname,region.minX,1,region.minZ);
    Location pos2=new Location(plotArea.worldname,region.maxX,maxY,region.maxZ);
    queue.setCuboid(pos1,pos2,blocks);
  }
  queue.enqueue();
  return true;
}
Program: 57889
Project: 57889
Buggy source:
public int get_ey(LocalBlockQueue queue,int sx,int ex,int sz,int ez,int sy){
  int ey=sy;
  for (int x=sx; x <= ex; x++) {
    for (int z=sz; z <= ez; z++) {
      for (int y=sy; y < 256; y++) {
        if (y > ey) {
          PlotBlock block=queue.getBlock(x,y,z);
          if (block.id != 0) {
            ey=y;
          }
        }
      }
    }
  }
  return ey;
}

Fixed version (ground truth):
public int get_ey(final PlotManager pm,LocalBlockQueue queue,int sx,int ex,int sz,int ez,int sy){
  int ey=sy;
  for (int x=sx; x <= ex; x++) {
    for (int z=sz; z <= ez; z++) {
      for (int y=sy; y <= pm.getWorldHeight(); y++) {
        if (y > ey) {
          PlotBlock block=queue.getBlock(x,y,z);
          if (block.id != 0) {
            ey=y;
          }
        }
      }
    }
  }
  return ey;
}
Program: 57892
Project: 57892
Buggy source:
@Override public void playMusic(Location location,int id){
  this.player.playEffect(BukkitUtil.getLocation(location),Effect.RECORD_PLAY,Material.getMaterial(id));
}

Fixed version (ground truth):
@Override public void playMusic(Location location,int id){
  this.player.playEffect(BukkitUtil.getLocation(location),Effect.RECORD_PLAY,id);
}
Program: 57893
Project: 57893
Buggy source:
@Override public void restoreTile(String world,CompoundTag tag,int x,int y,int z){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public boolean restoreTile(LocalBlockQueue queue,CompoundTag tag,int x,int y,int z){
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 57894
Project: 57894
Buggy source:
@Override public void startMetrics(){
  try {
    SpongeMetrics metrics=new SpongeMetrics(this.game,this.plugin);
    metrics.start();
    PS.log(C.PREFIX.s() + "String_Node_Str");
  }
 catch (  IOException ignored) {
    PS.log(C.PREFIX.s() + "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void startMetrics(){
  SpongeMetrics metrics=new SpongeMetrics(this.game,this.plugin);
  metrics.start();
  PS.log(C.PREFIX.s() + "String_Node_Str");
}
Program: 57895
Project: 57895
Buggy source:
@Override public List<String> getPluginIds(){
  ArrayList<String> names=new ArrayList<>();
  for (  Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
    names.add(plugin.getName() + "String_Node_Str" + plugin.getDescription().getVersion()+ "String_Node_Str"+ plugin.isEnabled());
  }
  return names;
}

Fixed version (ground truth):
@Override public List<String> getPluginIds(){
  ArrayList<String> names=new ArrayList<>();
  for (  Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
    names.add(plugin.getName() + ';' + plugin.getDescription().getVersion()+ ':'+ plugin.isEnabled());
  }
  return names;
}
Program: 57896
Project: 57896
Buggy source:
@Override public PlotQueue<Chunk> initPlotQueue(){
  try {
    new SendChunk();
    MainUtil.canSendChunk=true;
  }
 catch (  Throwable e) {
    e.printStackTrace();
    MainUtil.canSendChunk=false;
  }
  if (PS.get().checkVersion(getServerVersion(),1,9,0)) {
    try {
      return new FastQueue_1_9();
    }
 catch (    Throwable e) {
      e.printStackTrace();
      return new SlowQueue();
    }
  }
  if (PS.get().checkVersion(getServerVersion(),1,8,0)) {
    try {
      return new FastQueue_1_8_3();
    }
 catch (    Throwable e) {
      e.printStackTrace();
      try {
        return new FastQueue_1_8();
      }
 catch (      Throwable e2) {
        e2.printStackTrace();
        return new SlowQueue();
      }
    }
  }
  try {
    return new FastQueue_1_7();
  }
 catch (  Throwable e) {
    e.printStackTrace();
    return new SlowQueue();
  }
}

Fixed version (ground truth):
@Override public PlotQueue<Chunk> initPlotQueue(){
  try {
    new SendChunk();
    MainUtil.canSendChunk=true;
  }
 catch (  ClassNotFoundException|NoSuchFieldException|NoSuchMethodException e) {
    e.printStackTrace();
    MainUtil.canSendChunk=false;
  }
  if (PS.get().checkVersion(getServerVersion(),1,9,0)) {
    try {
      return new FastQueue_1_9();
    }
 catch (    ClassNotFoundException|NoSuchFieldException|NoSuchMethodException e) {
      e.printStackTrace();
      return new SlowQueue();
    }
  }
  if (PS.get().checkVersion(getServerVersion(),1,8,0)) {
    try {
      return new FastQueue_1_8_3();
    }
 catch (    NoSuchMethodException|ClassNotFoundException|NoSuchFieldException e) {
      e.printStackTrace();
      try {
        return new FastQueue_1_8();
      }
 catch (      NoSuchMethodException|NoSuchFieldException|ClassNotFoundException e2) {
        e2.printStackTrace();
        return new SlowQueue();
      }
    }
  }
  try {
    return new FastQueue_1_7();
  }
 catch (  ClassNotFoundException|NoSuchFieldException|NoSuchMethodException e) {
    e.printStackTrace();
    return new SlowQueue();
  }
}
Program: 57898
Project: 57898
Buggy source:
@Override public Connection getPlotMeConnection(FileConfiguration plotConfig,String dataFolder){
  this.plugin=this.plugin.toLowerCase();
  this.prefix=plotConfig.getString("String_Node_Str",this.plugin.toLowerCase());
  try {
    if (plotConfig.getBoolean("String_Node_Str")) {
      String user=plotConfig.getString("String_Node_Str");
      String password=plotConfig.getString("String_Node_Str");
      String con=plotConfig.getString("String_Node_Str");
      return DriverManager.getConnection(con,user,password);
    }
 else {
      return new SQLite(dataFolder + File.separator + "String_Node_Str").openConnection();
    }
  }
 catch (  SQLException|ClassNotFoundException ignored) {
    ignored.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
@Override public Connection getPlotMeConnection(FileConfiguration plotConfig,String dataFolder){
  this.plugin=this.plugin.toLowerCase();
  this.prefix=plotConfig.getString("String_Node_Str",this.plugin.toLowerCase());
  try {
    if (plotConfig.getBoolean("String_Node_Str")) {
      String user=plotConfig.getString("String_Node_Str");
      String password=plotConfig.getString("String_Node_Str");
      String con=plotConfig.getString("String_Node_Str");
      return DriverManager.getConnection(con,user,password);
    }
 else {
      return new SQLite(dataFolder + File.separator + "String_Node_Str").openConnection();
    }
  }
 catch (  SQLException|ClassNotFoundException e) {
    e.printStackTrace();
  }
  return null;
}
Program: 57899
Project: 57899
Buggy source:
@Override public List<BlockPopulator> getDefaultPopulators(World world){
  try {
    if (!this.loaded) {
      String name=world.getName();
      PS.get().loadWorld(name,this);
      Set<PlotArea> areas=PS.get().getPlotAreas(name);
      if (!areas.isEmpty()) {
        PlotArea area=areas.iterator().next();
        if (!area.MOB_SPAWNING) {
          if (!area.SPAWN_EGGS) {
            world.setSpawnFlags(false,false);
          }
          world.setAmbientSpawnLimit(0);
          world.setAnimalSpawnLimit(0);
          world.setMonsterSpawnLimit(0);
          world.setWaterAnimalSpawnLimit(0);
        }
 else {
          world.setSpawnFlags(true,true);
          world.setAmbientSpawnLimit(-1);
          world.setAnimalSpawnLimit(-1);
          world.setMonsterSpawnLimit(-1);
          world.setWaterAnimalSpawnLimit(-1);
        }
      }
      this.loaded=true;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  ArrayList<BlockPopulator> toAdd=new ArrayList<BlockPopulator>();
  List<BlockPopulator> existing=world.getPopulators();
  for (  BlockPopulator populator : this.populators) {
    if (!existing.contains(populator)) {
      toAdd.add(populator);
    }
  }
  return toAdd;
}

Fixed version (ground truth):
@Override public List<BlockPopulator> getDefaultPopulators(World world){
  try {
    if (!this.loaded) {
      String name=world.getName();
      PS.get().loadWorld(name,this);
      Set<PlotArea> areas=PS.get().getPlotAreas(name);
      if (!areas.isEmpty()) {
        PlotArea area=areas.iterator().next();
        if (!area.MOB_SPAWNING) {
          if (!area.SPAWN_EGGS) {
            world.setSpawnFlags(false,false);
          }
          world.setAmbientSpawnLimit(0);
          world.setAnimalSpawnLimit(0);
          world.setMonsterSpawnLimit(0);
          world.setWaterAnimalSpawnLimit(0);
        }
 else {
          world.setSpawnFlags(true,true);
          world.setAmbientSpawnLimit(-1);
          world.setAnimalSpawnLimit(-1);
          world.setMonsterSpawnLimit(-1);
          world.setWaterAnimalSpawnLimit(-1);
        }
      }
      this.loaded=true;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  ArrayList<BlockPopulator> toAdd=new ArrayList<>();
  List<BlockPopulator> existing=world.getPopulators();
  for (  BlockPopulator populator : this.populators) {
    if (!existing.contains(populator)) {
      toAdd.add(populator);
    }
  }
  return toAdd;
}
Program: 57900
Project: 57900
Buggy source:
public int getInt(String s){
  try {
    int max=0;
    String[] split=s.split("String_Node_Str");
    for (    String rad : split) {
      int val=Integer.parseInt(rad);
      if (val > max) {
        max=val;
      }
    }
    return max;
  }
 catch (  NumberFormatException e) {
    return 0;
  }
}

Fixed version (ground truth):
public int getInt(String s){
  try {
    int max=0;
    String[] split=s.split("String_Node_Str");
    for (    String rad : split) {
      int val=Integer.parseInt(rad);
      if (val > max) {
        max=val;
      }
    }
    return max;
  }
 catch (  NumberFormatException ignored) {
    return 0;
  }
}
Program: 57901
Project: 57901
Buggy source:
public boolean checkVolume(PlotPlayer player,long volume,long max,Cancellable e){
  if (volume > max) {
    MainUtil.sendMessage(player,C.WORLDEDIT_VOLUME.s().replaceAll("String_Node_Str",volume + "String_Node_Str").replaceAll("String_Node_Str",max + "String_Node_Str"));
    e.setCancelled(true);
  }
  if (Permissions.hasPermission(player,"String_Node_Str")) {
    MainUtil.sendMessage(player,C.WORLDEDIT_BYPASS);
  }
  return true;
}

Fixed version (ground truth):
public boolean checkVolume(PlotPlayer player,long volume,long max,Cancellable e){
  if (volume > max) {
    MainUtil.sendMessage(player,C.WORLDEDIT_VOLUME.s().replaceAll("String_Node_Str",String.valueOf(volume)).replaceAll("String_Node_Str",String.valueOf(max)));
    e.setCancelled(true);
  }
  if (Permissions.hasPermission(player,"String_Node_Str")) {
    MainUtil.sendMessage(player,C.WORLDEDIT_BYPASS);
  }
  return true;
}
Program: 57903
Project: 57903
Buggy source:
/** 
 * Appends a json encoded key/value pair to the given string builder.
 * @param json
 * @param key
 * @param value
 */
private static void appendJSONPair(StringBuilder json,String key,String value){
  boolean isValueNumeric=false;
  try {
    if (value.equals("String_Node_Str") || !value.endsWith("String_Node_Str")) {
      Double.parseDouble(value);
      isValueNumeric=true;
    }
  }
 catch (  NumberFormatException e) {
    isValueNumeric=false;
  }
  if (json.charAt(json.length() - 1) != '{') {
    json.append(',');
  }
  json.append(escapeJSON(key));
  json.append(':');
  if (isValueNumeric) {
    json.append(value);
  }
 else {
    json.append(escapeJSON(value));
  }
}

Fixed version (ground truth):
/** 
 * Appends a json encoded key/value pair to the given string builder.
 * @param json
 * @param key
 * @param value
 */
private static void appendJSONPair(StringBuilder json,String key,String value){
  boolean isValueNumeric=false;
  try {
    if (value.equals("String_Node_Str") || !value.endsWith("String_Node_Str")) {
      Double.parseDouble(value);
      isValueNumeric=true;
    }
  }
 catch (  NumberFormatException ignored) {
    isValueNumeric=false;
  }
  if (json.charAt(json.length() - 1) != '{') {
    json.append(',');
  }
  json.append(escapeJSON(key));
  json.append(':');
  if (isValueNumeric) {
    json.append(value);
  }
 else {
    json.append(escapeJSON(value));
  }
}
Program: 57904
Project: 57904
Buggy source:
/** 
 * Check if mineshafter is present. If it is, we need to bypass it to send POST requests
 * @return true if mineshafter is installed on the server
 */
private boolean isMineshafterPresent(){
  try {
    Class.forName("String_Node_Str");
    return true;
  }
 catch (  ClassNotFoundException e) {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Check if mineshafter is present. If it is, we need to bypass it to send POST requests
 * @return true if mineshafter is installed on the server
 */
private boolean isMineshafterPresent(){
  try {
    Class.forName("String_Node_Str");
    return true;
  }
 catch (  ClassNotFoundException ignored) {
    return false;
  }
}
Program: 57905
Project: 57905
Buggy source:
/** 
 * Constructor
 */
public SendChunk(){
  RefClass classCraftPlayer=getRefClass("String_Node_Str");
  this.methodGetHandlePlayer=classCraftPlayer.getMethod("String_Node_Str");
  RefClass classCraftChunk=getRefClass("String_Node_Str");
  this.methodGetHandleChunk=classCraftChunk.getMethod("String_Node_Str");
  RefClass classChunk=getRefClass("String_Node_Str");
  this.methodInitLighting=classChunk.getMethod("String_Node_Str");
  RefClass classMapChunk=getRefClass("String_Node_Str");
  this.mapChunk=classMapChunk.getConstructor(classChunk.getRealClass(),boolean.class,int.class);
  RefClass classEntityPlayer=getRefClass("String_Node_Str");
  this.connection=classEntityPlayer.getField("String_Node_Str");
  RefClass classPacket=getRefClass("String_Node_Str");
  RefClass classConnection=getRefClass("String_Node_Str");
  this.send=classConnection.getMethod("String_Node_Str",classPacket.getRealClass());
}

Fixed version (ground truth):
/** 
 * Constructor
 */
public SendChunk() throws ClassNotFoundException, NoSuchMethodException, NoSuchFieldException {
  RefClass classCraftPlayer=getRefClass("String_Node_Str");
  this.methodGetHandlePlayer=classCraftPlayer.getMethod("String_Node_Str");
  RefClass classCraftChunk=getRefClass("String_Node_Str");
  this.methodGetHandleChunk=classCraftChunk.getMethod("String_Node_Str");
  RefClass classChunk=getRefClass("String_Node_Str");
  this.methodInitLighting=classChunk.getMethod("String_Node_Str");
  RefClass classMapChunk=getRefClass("String_Node_Str");
  this.mapChunk=classMapChunk.getConstructor(classChunk.getRealClass(),boolean.class,int.class);
  RefClass classEntityPlayer=getRefClass("String_Node_Str");
  this.connection=classEntityPlayer.getField("String_Node_Str");
  RefClass classPacket=getRefClass("String_Node_Str");
  RefClass classConnection=getRefClass("String_Node_Str");
  this.send=classConnection.getMethod("String_Node_Str",classPacket.getRealClass());
}
Program: 57906
Project: 57906
Buggy source:
public FastQueue_1_7() throws RuntimeException {
  this.methodGetHandle=this.classCraftWorld.getMethod("String_Node_Str");
  this.methodGetChunkAt=this.classWorld.getMethod("String_Node_Str",int.class,int.class);
  this.methodA=this.classChunk.getMethod("String_Node_Str",int.class,int.class,int.class,this.classBlock,int.class);
  this.methodGetById=this.classBlock.getMethod("String_Node_Str",int.class);
  this.methodInitLighting=this.classChunk.getMethod("String_Node_Str");
  this.sendChunk=new SendChunk();
  TaskManager.runTaskRepeat(new Runnable(){
    @Override public void run(){
      if (FastQueue_1_7.this.toUpdate.isEmpty()) {
        return;
      }
      int count=0;
      ArrayList<Chunk> chunks=new ArrayList<>();
      Iterator<Entry<ChunkWrapper,Chunk>> i=FastQueue_1_7.this.toUpdate.entrySet().iterator();
      while (i.hasNext() && (count < 128)) {
        chunks.add(i.next().getValue());
        i.remove();
        count++;
      }
      if (count == 0) {
        return;
      }
      update(chunks);
    }
  }
,1);
  MainUtil.initCache();
}

Fixed version (ground truth):
public FastQueue_1_7() throws NoSuchMethodException, ClassNotFoundException, NoSuchFieldException {
  this.methodGetHandle=this.classCraftWorld.getMethod("String_Node_Str");
  this.methodGetChunkAt=this.classWorld.getMethod("String_Node_Str",int.class,int.class);
  this.methodA=this.classChunk.getMethod("String_Node_Str",int.class,int.class,int.class,this.classBlock,int.class);
  this.methodGetById=this.classBlock.getMethod("String_Node_Str",int.class);
  this.methodInitLighting=this.classChunk.getMethod("String_Node_Str");
  this.sendChunk=new SendChunk();
  TaskManager.runTaskRepeat(new Runnable(){
    @Override public void run(){
      if (FastQueue_1_7.this.toUpdate.isEmpty()) {
        return;
      }
      int count=0;
      ArrayList<Chunk> chunks=new ArrayList<>();
      Iterator<Entry<ChunkWrapper,Chunk>> i=FastQueue_1_7.this.toUpdate.entrySet().iterator();
      while (i.hasNext() && (count < 128)) {
        chunks.add(i.next().getValue());
        i.remove();
        count++;
      }
      if (count == 0) {
        return;
      }
      update(chunks);
    }
  }
,1);
  MainUtil.initCache();
}
Program: 57907
Project: 57907
Buggy source:
@Override public void run(){
  if (FastQueue_1_8.this.toUpdate.isEmpty()) {
    return;
  }
  int count=0;
  ArrayList<Chunk> chunks=new ArrayList<Chunk>();
  Iterator<Entry<ChunkWrapper,Chunk>> i=FastQueue_1_8.this.toUpdate.entrySet().iterator();
  while (i.hasNext() && count < 128) {
    chunks.add(i.next().getValue());
    i.remove();
    count++;
  }
  if (count == 0) {
    return;
  }
  update(chunks);
}

Fixed version (ground truth):
@Override public void run(){
  if (FastQueue_1_8.this.toUpdate.isEmpty()) {
    return;
  }
  int count=0;
  ArrayList<Chunk> chunks=new ArrayList<>();
  Iterator<Entry<ChunkWrapper,Chunk>> i=FastQueue_1_8.this.toUpdate.entrySet().iterator();
  while (i.hasNext() && count < 128) {
    chunks.add(i.next().getValue());
    i.remove();
    count++;
  }
  if (count == 0) {
    return;
  }
  update(chunks);
}
Program: 57908
Project: 57908
Buggy source:
public FastQueue_1_8() throws RuntimeException {
  this.methodInitLighting=this.classChunk.getMethod("String_Node_Str");
  this.constructorBlockPosition=this.classBlockPosition.getConstructor(int.class,int.class,int.class);
  this.methodGetByCombinedId=this.classBlock.getMethod("String_Node_Str",int.class);
  this.methodGetHandle=this.classCraftWorld.getMethod("String_Node_Str");
  this.methodGetChunkAt=this.classWorld.getMethod("String_Node_Str",int.class,int.class);
  this.methodA=this.classChunk.getMethod("String_Node_Str",this.classBlockPosition,this.classIBlockData);
  this.sendChunk=new SendChunk();
  TaskManager.runTaskRepeat(new Runnable(){
    @Override public void run(){
      if (FastQueue_1_8.this.toUpdate.isEmpty()) {
        return;
      }
      int count=0;
      ArrayList<Chunk> chunks=new ArrayList<Chunk>();
      Iterator<Entry<ChunkWrapper,Chunk>> i=FastQueue_1_8.this.toUpdate.entrySet().iterator();
      while (i.hasNext() && count < 128) {
        chunks.add(i.next().getValue());
        i.remove();
        count++;
      }
      if (count == 0) {
        return;
      }
      update(chunks);
    }
  }
,1);
  MainUtil.initCache();
}

Fixed version (ground truth):
public FastQueue_1_8() throws NoSuchMethodException, ClassNotFoundException, NoSuchFieldException {
  this.methodInitLighting=this.classChunk.getMethod("String_Node_Str");
  this.constructorBlockPosition=this.classBlockPosition.getConstructor(int.class,int.class,int.class);
  this.methodGetByCombinedId=this.classBlock.getMethod("String_Node_Str",int.class);
  this.methodGetHandle=this.classCraftWorld.getMethod("String_Node_Str");
  this.methodGetChunkAt=this.classWorld.getMethod("String_Node_Str",int.class,int.class);
  this.methodA=this.classChunk.getMethod("String_Node_Str",this.classBlockPosition,this.classIBlockData);
  this.sendChunk=new SendChunk();
  TaskManager.runTaskRepeat(new Runnable(){
    @Override public void run(){
      if (FastQueue_1_8.this.toUpdate.isEmpty()) {
        return;
      }
      int count=0;
      ArrayList<Chunk> chunks=new ArrayList<>();
      Iterator<Entry<ChunkWrapper,Chunk>> i=FastQueue_1_8.this.toUpdate.entrySet().iterator();
      while (i.hasNext() && count < 128) {
        chunks.add(i.next().getValue());
        i.remove();
        count++;
      }
      if (count == 0) {
        return;
      }
      update(chunks);
    }
  }
,1);
  MainUtil.initCache();
}