nus-yam/ex-repair huggingface dataset:
Program: 11919
Project: 11919
Buggy source:
TridentWorld(String name,WorldLoader loader){
  this.name=name;
  this.loader=loader;
  this.random=new Random();
}

Fixed version (ground truth):
TridentWorld(String name,WorldLoader loader){
  this.name=name;
  this.loader=loader;
  this.random=new Random();
  spawnLocation=new Location(this,0d,0d,0d);
  TridentLogger logger=Trident.getLogger();
  logger.info("String_Node_Str" + name + "String_Node_Str");
  logger.info("String_Node_Str");
  File directory=new File(name + File.separator);
  File levelFile=new File(directory,"String_Node_Str");
  CompoundTag level;
  try {
    level=new NBTDecoder(new DataInputStream(new FileInputStream(levelFile))).decode().getTagAs("String_Node_Str");
  }
 catch (  FileNotFoundException ignored) {
    return;
  }
catch (  NBTException ex) {
    logger.info("String_Node_Str");
    ex.printStackTrace();
    return;
  }
  logger.info("String_Node_Str");
  spawnLocation.setX(((IntTag)level.getTag("String_Node_Str")).getValue());
  spawnLocation.setY(((IntTag)level.getTag("String_Node_Str")).getValue());
  spawnLocation.setZ(((IntTag)level.getTag("String_Node_Str")).getValue());
  dimension=Dimension.OVERWORLD;
  difficulty=Difficulty.getDifficulty(((IntTag)level.getTag("String_Node_Str")).getValue());
  defaultGamemode=GameMode.getGameMode(((IntTag)level.getTag("String_Node_Str")).getValue());
  type=LevelType.getLevelType(((StringTag)level.getTag("String_Node_Str")).getValue());
  logger.info("String_Node_Str");
  File region=new File(directory,"String_Node_Str" + File.separator);
  if (!(region.exists()) || !(region.isDirectory())) {
    throw new IllegalStateException("String_Node_Str");
  }
  for (  File file : region.listFiles()) {
    String[] strings=file.getName().split("String_Node_Str");
    logger.info("String_Node_Str" + file.getName() + "String_Node_Str");
    if (strings.length != 3 && !(strings[0].equals("String_Node_Str")) && !(file.getName().endsWith("String_Node_Str"))) {
      continue;
    }
    int chunkX;
    int chunkZ;
    try {
      chunkX=(int)Math.floor(Integer.parseInt(strings[1]) * 32);
      chunkZ=(int)Math.floor(Integer.parseInt(strings[2]) * 32);
    }
 catch (    NumberFormatException ex) {
      continue;
    }
    for (    ChunkLocation loc : loadedChunks.keySet()) {
      if (loc.getX() == chunkX && loc.getZ() == chunkZ)       continue;
    }
    logger.info("String_Node_Str" + file.getName() + "String_Node_Str");
    RegionFile regionFile;
    try {
      regionFile=new RegionFile(file.toPath());
    }
 catch (    IOException ex) {
      logger.info("String_Node_Str");
      ex.printStackTrace();
      continue;
    }
    ChunkLocation location=new ChunkLocation(chunkX,chunkZ);
    TridentChunk chunk;
    try {
      chunk=regionFile.loadChunkData(this);
    }
 catch (    NBTException|IOException|DataFormatException e) {
      logger.info("String_Node_Str");
      e.printStackTrace();
      continue;
    }
    loadedChunks.put(location,chunk);
    logger.info("String_Node_Str" + file.getName() + "String_Node_Str");
  }
}
Program: 11920
Project: 11920
Buggy source:
@Override public GameMode getDefaultGamemode(){
  return GameMode.SURVIVAL;
}

Fixed version (ground truth):
@Override public GameMode getDefaultGamemode(){
  return defaultGamemode;
}
Program: 11921
Project: 11921
Buggy source:
@Override public Dimension getDimesion(){
  return Dimension.OVERWORLD;
}

Fixed version (ground truth):
@Override public Dimension getDimesion(){
  return dimension;
}
Program: 11922
Project: 11922
Buggy source:
@Override public Difficulty getDifficulty(){
  return Difficulty.NORMAL;
}

Fixed version (ground truth):
@Override public Difficulty getDifficulty(){
  return difficulty;
}
Program: 11923
Project: 11923
Buggy source:
@Override public LevelType getLevelType(){
  return LevelType.DEFAULT;
}

Fixed version (ground truth):
@Override public LevelType getLevelType(){
  return type;
}
Program: 11927
Project: 11927
Buggy source:
public static Player spawnPlayer(ClientConnection connection,UUID id){
  OfflinePlayer offlinePlayer=OfflinePlayer.getOfflinePlayer(id);
  TridentPlayer p=new TridentPlayer(offlinePlayer.toNbt(),(TridentWorld)offlinePlayer.getWorld(),connection);
  p.connection.sendPacket(new PacketPlayOutJoinGame().set("String_Node_Str",p.getId()).set("String_Node_Str",p.getGameMode()).set("String_Node_Str",p.getWorld().getDimesion()).set("String_Node_Str",p.getWorld().getDifficulty()).set("String_Node_Str",(short)10).set("String_Node_Str",LevelType.DEFAULT));
  p.connection.sendPacket(new PacketPlayOutSpawnPosition().set("String_Node_Str",p.getSpawnLocation()));
  p.connection.sendPacket(p.abilities.toPacket());
  p.connection.sendPacket(new PacketPlayOutPlayerCompleteMove().set("String_Node_Str",p.getLocation()).set("String_Node_Str",(byte)0));
  p.sendChunks(7);
  players.add(p);
  return p;
}

Fixed version (ground truth):
public static Player spawnPlayer(ClientConnection connection,UUID id,String name){
  OfflinePlayer offlinePlayer=OfflinePlayer.getOfflinePlayer(id);
  if (offlinePlayer == null) {
    offlinePlayer=OfflinePlayer.generatePlayer(name,id);
  }
  TridentPlayer p=new TridentPlayer(offlinePlayer.toNbt(),(TridentWorld)offlinePlayer.getWorld(),connection);
  p.connection.sendPacket(new PacketPlayOutJoinGame().set("String_Node_Str",p.getId()).set("String_Node_Str",p.getGameMode()).set("String_Node_Str",p.getWorld().getDimesion()).set("String_Node_Str",p.getWorld().getDifficulty()).set("String_Node_Str",(short)10).set("String_Node_Str",LevelType.DEFAULT));
  p.connection.sendPacket(new PacketPlayOutSpawnPosition().set("String_Node_Str",p.getSpawnLocation()));
  p.connection.sendPacket(p.abilities.toPacket());
  p.connection.sendPacket(new PacketPlayOutPlayerCompleteMove().set("String_Node_Str",p.getLocation()).set("String_Node_Str",(byte)0));
  p.sendChunks(7);
  players.add(p);
  return p;
}
Program: 11928
Project: 11928
Buggy source:
/** 
 * Converts the PacketData to a Packet depending on the ConnectionStage of the Client <p/>   {@inheritDoc}
 */
@Override protected void messageReceived(ChannelHandlerContext context,PacketData data) throws Exception {
  if (this.connection.isEncryptionEnabled()) {
    data.decrypt(this.connection);
  }
  Packet packet=this.protocol.getPacket(data.getId(),this.connection.getStage(),PacketType.IN);
  if (packet.getId() == -1) {
    this.connection.logout();
    return;
  }
  System.out.println("String_Node_Str" + packet.getClass().getSimpleName());
  packet.decode(data.getData());
  try {
    packet.handleReceived(this.connection);
  }
 catch (  Exception ex) {
switch (this.connection.getStage()) {
case LOGIN:
      PacketLoginOutDisconnect disconnect=new PacketLoginOutDisconnect();
    disconnect.setJsonMessage(ex.getMessage());
  this.connection.sendPacket(disconnect);
this.connection.logout();
break;
case PLAY:
PacketPlayOutDisconnect quit=new PacketPlayOutDisconnect();
quit.set("String_Node_Str",ex.getMessage());
this.connection.sendPacket(quit);
this.connection.logout();
break;
default :
ex.printStackTrace();
break;
}
}
}

Fixed version (ground truth):
/** 
 * Converts the PacketData to a Packet depending on the ConnectionStage of the Client <p/>   {@inheritDoc}
 */
@Override protected void messageReceived(ChannelHandlerContext context,PacketData data) throws Exception {
  if (this.connection.isEncryptionEnabled()) {
    data.decrypt(this.connection);
  }
  Packet packet=this.protocol.getPacket(data.getId(),this.connection.getStage(),PacketType.IN);
  if (packet.getId() == -1) {
    this.connection.logout();
    return;
  }
  System.out.println("String_Node_Str" + packet.getClass().getSimpleName());
  packet.decode(data.getData());
  try {
    packet.handleReceived(this.connection);
  }
 catch (  Exception ex) {
    ex.printStackTrace();
switch (this.connection.getStage()) {
case LOGIN:
      PacketLoginOutDisconnect disconnect=new PacketLoginOutDisconnect();
    disconnect.setJsonMessage(ex.getMessage());
  this.connection.sendPacket(disconnect);
this.connection.logout();
case PLAY:
PacketPlayOutDisconnect quit=new PacketPlayOutDisconnect();
quit.set("String_Node_Str",ex.getMessage());
this.connection.sendPacket(quit);
this.connection.logout();
default :
break;
}
}
}
Program: 11929
Project: 11929
Buggy source:
@Override public void handleReceived(ClientConnection connection){
  TridentPlayer player=((PlayerConnection)connection).getPlayer();
  World world=player.getWorld();
  StatusType type=StatusType.getStatus((int)this.actionId);
switch (type) {
case RESPAWN:
    PacketPlayOutPlayerRespawn respawn=new PacketPlayOutPlayerRespawn();
  respawn.set("String_Node_Str",(int)world.getDimesion().toByte()).set("String_Node_Str",(int)world.getDifficulity().toByte()).set("String_Node_Str",(int)world.getDefaultGamemode().toByte());
connection.sendPacket(respawn);
break;
case STATISTICS_REQUEST:
PacketPlayOutStatistics statistics=new PacketPlayOutStatistics();
statistics.set("String_Node_Str",null);
connection.sendPacket(statistics);
break;
case OPEN_INVENTORY_ACHEIVEMENT:
break;
default :
throw new IllegalArgumentException("String_Node_Str");
}
}

Fixed version (ground truth):
@Override public void handleReceived(ClientConnection connection){
  TridentPlayer player=((PlayerConnection)connection).getPlayer();
  World world=player.getWorld();
  StatusType type=StatusType.getStatus((int)this.actionId);
switch (type) {
case RESPAWN:
    PacketPlayOutPlayerRespawn respawn=new PacketPlayOutPlayerRespawn();
  respawn.set("String_Node_Str",(int)world.getDimesion().toByte()).set("String_Node_Str",(int)world.getDifficulty().toByte()).set("String_Node_Str",(int)world.getDefaultGamemode().toByte());
connection.sendPacket(respawn);
break;
case STATISTICS_REQUEST:
PacketPlayOutStatistics statistics=new PacketPlayOutStatistics();
statistics.set("String_Node_Str",null);
connection.sendPacket(statistics);
break;
case OPEN_INVENTORY_ACHEIVEMENT:
break;
default :
throw new IllegalArgumentException("String_Node_Str");
}
}
Program: 11930
Project: 11930
Buggy source:
/** 
 * Inherits constructor from   {@link net.tridentsdk.entity.TridentProjectile}
 */
public TridentEgg(UUID uniqueId,Location spawnLocation,ProjectileSource source){
  super(uniqueId,spawnLocation,source);
}

Fixed version (ground truth):
/** 
 * Inherits constructor from   {@link net.tridentsdk.entity.TridentProjectile}
 */
public TridentEgg(UUID uniqueId,Location spawnLocation,ProjectileSource source){
  super(uniqueId,spawnLocation,source,false);
}
Program: 11931
Project: 11931
Buggy source:
/** 
 * Inherits from   {@link net.tridentsdk.entity.TridentProjectile}
 */
public TridentSnowball(UUID uniqueId,Location spawnLocation,ProjectileSource source){
  super(uniqueId,spawnLocation,source);
}

Fixed version (ground truth):
/** 
 * Inherits from   {@link net.tridentsdk.entity.TridentProjectile}
 */
public TridentSnowball(UUID uniqueId,Location spawnLocation,ProjectileSource source){
  super(uniqueId,spawnLocation,source,false);
}
Program: 11932
Project: 11932
Buggy source:
public TridentWitherSkull(UUID uniqueId,Location spawnLocation,ProjectileSource source){
  super(uniqueId,spawnLocation,source);
}

Fixed version (ground truth):
public TridentWitherSkull(UUID uniqueId,Location spawnLocation,ProjectileSource source){
  super(uniqueId,spawnLocation,source,false);
}
Program: 11933
Project: 11933
Buggy source:
/** 
 * Converts the PacketData to a Packet depending on the ConnectionStage of the Client <p/>   {@inheritDoc}
 */
@Override protected void messageReceived(ChannelHandlerContext context,PacketData data) throws Exception {
  if (this.connection.isEncryptionEnabled()) {
    data.decrypt(this.connection);
  }
  Packet packet=this.protocol.getPacket(data.getId(),this.connection.getStage(),PacketType.IN);
  if (packet.getId() == -1) {
    this.connection.logout();
    return;
  }
  System.out.println("String_Node_Str" + packet.getClass().getSimpleName());
  packet.decode(data.getData());
  try {
    packet.handleReceived(this.connection);
  }
 catch (  Exception ex) {
switch (this.connection.getStage()) {
case LOGIN:
      PacketLoginOutDisconnect disconnect=new PacketLoginOutDisconnect();
    disconnect.setJsonMessage(ex.getMessage());
  this.connection.sendPacket(disconnect);
this.connection.logout();
break;
case PLAY:
PacketPlayOutDisconnect quit=new PacketPlayOutDisconnect();
quit.set("String_Node_Str",ex.getMessage());
this.connection.sendPacket(quit);
this.connection.logout();
break;
default :
ex.printStackTrace();
break;
}
}
final ClientConnection finalConnection=this.connection;
BackgroundTaskExecutor.execute(new Runnable(){
@Override public void run(){
PlayerThreads.clientThreadHandle(finalConnection);
}
}
);
}

Fixed version (ground truth):
/** 
 * Converts the PacketData to a Packet depending on the ConnectionStage of the Client <p/>   {@inheritDoc}
 */
@Override protected void messageReceived(ChannelHandlerContext context,PacketData data) throws Exception {
  if (this.connection.isEncryptionEnabled()) {
    data.decrypt(this.connection);
  }
  Packet packet=this.protocol.getPacket(data.getId(),this.connection.getStage(),PacketType.IN);
  if (packet.getId() == -1) {
    this.connection.logout();
    return;
  }
  System.out.println("String_Node_Str" + packet.getClass().getSimpleName());
  packet.decode(data.getData());
  try {
    packet.handleReceived(this.connection);
  }
 catch (  Exception ex) {
switch (this.connection.getStage()) {
case LOGIN:
      PacketLoginOutDisconnect disconnect=new PacketLoginOutDisconnect();
    disconnect.setJsonMessage(ex.getMessage());
  this.connection.sendPacket(disconnect);
this.connection.logout();
break;
case PLAY:
PacketPlayOutDisconnect quit=new PacketPlayOutDisconnect();
quit.set("String_Node_Str",ex.getMessage());
this.connection.sendPacket(quit);
this.connection.logout();
break;
default :
ex.printStackTrace();
break;
}
}
}
Program: 11934
Project: 11934
Buggy source:
@Benchmark public void put(Blackhole blackhole){
  blackhole.consume(PlayerThreads.clientThreadHandle(TestPlayerThreads.CLIENT_CONNECTION));
}

Fixed version (ground truth):
@Benchmark public void put(Blackhole blackhole){
  blackhole.consume(PlayerThreads.clientThreadHandle(TestPlayerThreads.PLAYER));
}
Program: 11935
Project: 11935
Buggy source:
@Benchmark public void remove(Blackhole blackhole){
  PlayerThreads.remove(TestPlayerThreads.CLIENT_CONNECTION);
}

Fixed version (ground truth):
@Benchmark public void remove(Blackhole blackhole){
  PlayerThreads.remove(TestPlayerThreads.PLAYER);
}
Program: 11936
Project: 11936
Buggy source:
public String getVersion(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getVersion(){
  return "String_Node_Str";
}
Program: 11937
Project: 11937
Buggy source:
/** 
 * Creates the server access base, distributing information to the fields available
 * @param config the configuration to use for option lookup
 */
public static TridentServer createServer(JsonConfig config){
  TridentServer server=new TridentServer(config);
  Trident.setServer(server);
  server.SERVER_THREAD.set(server.taskExecutor.getScaledThread().asThread());
  return server;
}

Fixed version (ground truth):
/** 
 * Creates the server access base, distributing information to the fields available
 * @param config the configuration to use for option lookup
 */
public static TridentServer createServer(JsonConfig config,ConcurrentTaskExecutor<?> taskExecutor){
  TridentServer server=new TridentServer(config,taskExecutor);
  Trident.setServer(server);
  server.SERVER_THREAD.set(server.taskExecutor.getScaledThread().asThread());
  return server;
}
Program: 11938
Project: 11938
Buggy source:
public int getMaxPlayers(){
  return getConfig().getInt("String_Node_Str",Defaults.MAX_PLAYERS);
}

Fixed version (ground truth):
@Override public int getMaxPlayers(){
  return this.getConfig().getInt("String_Node_Str",Defaults.MAX_PLAYERS);
}
Program: 11939
Project: 11939
Buggy source:
public String getMotd(){
  return getConfig().getString("String_Node_Str",Defaults.MOTD);
}

Fixed version (ground truth):
@Override public String getMotd(){
  return this.getConfig().getString("String_Node_Str",Defaults.MOTD);
}
Program: 11940
Project: 11940
Buggy source:
public JsonConfig getConfig(){
  return config;
}

Fixed version (ground truth):
public JsonConfig getConfig(){
  return this.config;
}
Program: 11941
Project: 11941
Buggy source:
/** 
 * Puts a task into the execution queue
 */
public void addTask(Runnable task){
  this.taskExecutor.getScaledThread().addTask(task);
}

Fixed version (ground truth):
/** 
 * Puts a task into the execution queue
 */
@Override public void addTask(Runnable task){
  this.taskExecutor.getScaledThread().addTask(task);
}
Program: 11942
Project: 11942
Buggy source:
public int setMotdImage(Image image){
  return -1;
}

Fixed version (ground truth):
@Override public int setMotdImage(Image image){
  return -1;
}
Program: 11943
Project: 11943
Buggy source:
public File getMotdImage(){
  return new File(getConfig().getString("String_Node_Str",Defaults.MOTD_IMAGE_LOCATION));
}

Fixed version (ground truth):
public File getMotdImage(){
  return new File(this.getConfig().getString("String_Node_Str",Defaults.MOTD_IMAGE_LOCATION));
}
Program: 11944
Project: 11944
Buggy source:
public void setMotd(String motd){
  getConfig().setString("String_Node_Str",motd);
}

Fixed version (ground truth):
public void setMotd(String motd){
  this.getConfig().setString("String_Node_Str",motd);
}
Program: 11945
Project: 11945
Buggy source:
public BufferedImage getMotdPictureImage(){
  BufferedImage img=null;
  try {
    img=ImageIO.read(new File(getConfig().getString("String_Node_Str",Defaults.MOTD_IMAGE_LOCATION)));
  }
 catch (  IOException ex) {
    ex.printStackTrace();
  }
  return img;
}

Fixed version (ground truth):
@Override public BufferedImage getMotdPictureImage(){
  BufferedImage img=null;
  try {
    img=ImageIO.read(new File(this.getConfig().getString("String_Node_Str",Defaults.MOTD_IMAGE_LOCATION)));
  }
 catch (  IOException ex) {
    ex.printStackTrace();
  }
  return img;
}
Program: 11946
Project: 11946
Buggy source:
public Difficulty getDifficulty(){
  byte difficulty=getConfig().getByte("String_Node_Str",Defaults.DIFFICULTY.toByte());
switch (difficulty) {
case 0:
    return Difficulty.PEACEFUL;
case 1:
  return Difficulty.EASY;
case 2:
return Difficulty.NORMAL;
case 3:
return Difficulty.HARD;
}
return null;
}

Fixed version (ground truth):
@Override public Difficulty getDifficulty(){
  byte difficulty=this.getConfig().getByte("String_Node_Str",Defaults.DIFFICULTY.toByte());
switch (difficulty) {
case 0:
    return Difficulty.PEACEFUL;
case 1:
  return Difficulty.EASY;
case 2:
return Difficulty.NORMAL;
case 3:
return Difficulty.HARD;
}
return null;
}
Program: 11947
Project: 11947
Buggy source:
/** 
 * Initializes the server with the configuration file
 * @param config the configuration to use for option lookup
 */
private static void init(JsonConfig config){
  final ConcurrentTaskExecutor<?> taskExecutor=new ConcurrentTaskExecutor<>(1);
  final JsonConfig innerConfig=config;
  taskExecutor.getScaledThread().addTask(new Runnable(){
    @Override public void run(){
      TridentServer.createServer(innerConfig);
    }
  }
);
  try {
    ServerBootstrap b=new ServerBootstrap();
    b.group(TridentStart.bossGroup,TridentStart.workerGroup).channel(NioServerSocketChannel.class).childHandler(new ClientChannelInitializer()).option(ChannelOption.TCP_NODELAY,true);
    ChannelFuture f=b.bind(new InetSocketAddress(config.getString("String_Node_Str","String_Node_Str"),config.getInt("String_Node_Str",25565))).sync();
    f.channel().closeFuture().sync();
  }
 catch (  InterruptedException e) {
  }
catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    TridentServer.getInstance().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Initializes the server with the configuration file
 * @param config the configuration to use for option lookup
 */
private static void init(JsonConfig config){
  final ConcurrentTaskExecutor<?> taskExecutor=new ConcurrentTaskExecutor<>(1);
  final JsonConfig innerConfig=config;
  taskExecutor.getScaledThread().addTask(new Runnable(){
    @Override public void run(){
      TridentServer.createServer(innerConfig,taskExecutor);
    }
  }
);
  try {
    ServerBootstrap b=new ServerBootstrap();
    b.group(TridentStart.bossGroup,TridentStart.workerGroup).channel(NioServerSocketChannel.class).childHandler(new ClientChannelInitializer()).option(ChannelOption.TCP_NODELAY,true);
    ChannelFuture f=b.bind(new InetSocketAddress(config.getString("String_Node_Str","String_Node_Str"),config.getInt("String_Node_Str",25565))).sync();
    f.channel().closeFuture().sync();
  }
 catch (  InterruptedException e) {
  }
catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    TridentServer.getInstance().shutdown();
  }
}
Program: 11948
Project: 11948
Buggy source:
/** 
 * Starts the server up when the jarfile is run
 * @param args the command line arguments
 */
public static void main(String... args) throws Exception {
  OptionParser parser=new OptionParser();
  parser.acceptsAll(TridentStart.asList("String_Node_Str","String_Node_Str"),"String_Node_Str").forHelp();
  OptionSpec<Boolean> append=parser.acceptsAll(TridentStart.asList("String_Node_Str"),"String_Node_Str").withRequiredArg().ofType(Boolean.class).defaultsTo(true).describedAs("String_Node_Str");
  OptionSpec<File> properties=parser.acceptsAll(TridentStart.asList("String_Node_Str"),"String_Node_Str").withRequiredArg().ofType(File.class).defaultsTo(new File("String_Node_Str")).describedAs("String_Node_Str");
  OptionSet options=null;
  File f;
  try {
    options=parser.parse(args);
  }
 catch (  OptionException ex) {
    ex.printStackTrace();
    return;
  }
  if (!((f=properties.value(options)).exists())) {
    InputStream link=(TridentServer.class.getResourceAsStream("String_Node_Str"));
    Files.copy(link,f.getAbsoluteFile().toPath());
  }
  TridentStart.init(new JsonConfig(f));
}

Fixed version (ground truth):
/** 
 * Starts the server up when the jarfile is run
 * @param args the command line arguments
 */
public static void main(String... args) throws Exception {
  OptionParser parser=new OptionParser();
  parser.acceptsAll(TridentStart.asList("String_Node_Str","String_Node_Str"),"String_Node_Str").forHelp();
  OptionSpec<Boolean> append=parser.acceptsAll(TridentStart.asList("String_Node_Str"),"String_Node_Str").withRequiredArg().ofType(Boolean.class).defaultsTo(true).describedAs("String_Node_Str");
  OptionSpec<File> properties=parser.acceptsAll(TridentStart.asList("String_Node_Str"),"String_Node_Str").withRequiredArg().ofType(File.class).defaultsTo(new File("String_Node_Str")).describedAs("String_Node_Str");
  OptionSet options=null;
  try {
    options=parser.parse(args);
  }
 catch (  OptionException ex) {
    ex.printStackTrace();
    return;
  }
  File f;
  if (!(f=properties.value(options)).exists()) {
    InputStream link=TridentServer.class.getResourceAsStream("String_Node_Str");
    Files.copy(link,f.getAbsoluteFile().toPath());
  }
  TridentStart.init(new JsonConfig(f));
}
Program: 11949
Project: 11949
Buggy source:
@Override public void run(){
  TridentServer.createServer(innerConfig);
}

Fixed version (ground truth):
@Override public void run(){
  TridentServer.createServer(innerConfig,taskExecutor);
}
Program: 11950
Project: 11950
Buggy source:
@Override public void handleReceived(ClientConnection connection){
  PacketStatusOutResponse packet=new PacketStatusOutResponse();
  PacketStatusOutResponse.Response response=packet.getResponse();
  response.description.text=TridentServer.getInstance().getConfig().getString("String_Node_Str","String_Node_Str");
  response.players.max=TridentServer.getInstance().getConfig().getInt("String_Node_Str",10);
  packet.set("String_Node_Str",response);
  connection.sendPacket(packet);
}

Fixed version (ground truth):
@Override public void handleReceived(ClientConnection connection){
  PacketStatusOutResponse packet=new PacketStatusOutResponse();
  PacketStatusOutResponse.Response response=packet.getResponse();
  response.description.text=TridentServer.getInstance().getConfig().getString("String_Node_Str","String_Node_Str");
  response.players.max=TridentServer.getInstance().getConfig().getInt("String_Node_Str",10);
  packet.response=response;
  connection.sendPacket(packet);
}
Program: 11951
Project: 11951
Buggy source:
public RegionFile getRegionFile(File serverDirectory,int chunkX,int chunkZ){
  int actualX=chunkX >> 5;
  int actualZ=chunkZ >> 5;
  File regionDir=new File(serverDirectory,"String_Node_Str");
  File actualFile=new File(regionDir,"String_Node_Str" + actualX + "String_Node_Str"+ actualZ+ "String_Node_Str");
  RegionFile file=this.regionFiles.get(actualFile);
  if (file == null) {
    if (!regionDir.exists()) {
      regionDir.mkdirs();
    }
    try {
      file=new RegionFile(actualFile);
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
    this.regionFiles.put(actualFile,file);
  }
  return file;
}

Fixed version (ground truth):
public RegionFile getRegionFile(File serverDirectory,int chunkX,int chunkZ){
  int actualX=chunkX >> 5;
  int actualZ=chunkZ >> 5;
  File regionDir=new File(serverDirectory,"String_Node_Str");
  File actualFile=new File(regionDir,"String_Node_Str" + actualX + "String_Node_Str"+ actualZ+ "String_Node_Str");
  RegionFile file=this.regionFiles.get(actualFile);
  if (file == null) {
    if (!regionDir.exists()) {
      regionDir.mkdirs();
    }
    try {
      file=new RegionFile(actualFile);
    }
 catch (    IOException|DataFormatException|NBTException e) {
      e.printStackTrace();
    }
    this.regionFiles.put(actualFile,file);
  }
  return file;
}
Program: 11952
Project: 11952
Buggy source:
public void setName(String name){
  this.name=name;
  this.id=((TridentServer)Trident.getServer()).getProfileRepository().findProfilesByNames(name)[0].getId();
}

Fixed version (ground truth):
public void setName(String name){
  this.name=name;
  this.id=null;
}
Program: 11953
Project: 11953
Buggy source:
@Override public void update(){
  super.update();
  Sample.INSTANCE.play(Assets.SND_CLICK,1,1,1.2f);
}

Fixed version (ground truth):
@Override public void update(){
  super.update();
  if (brightness < 1.0f && brightness > MIN_BRIGHTNESS) {
    if ((brightness-=Game.elapsed) <= MIN_BRIGHTNESS) {
      brightness=MIN_BRIGHTNESS;
    }
    updateBrightness();
  }
}
Program: 11955
Project: 11955
Buggy source:
@Override public boolean touchUp(int screenX,int screenY,int pointer,int button){
  eventTouch.dispatch(pointers.remove(button).up());
  return true;
}

Fixed version (ground truth):
@Override public boolean touchUp(int screenX,int screenY,int pointer,int button){
  Touch touch=pointers.remove(button);
  if (touch != null) {
    eventTouch.dispatch(touch.up());
    return true;
  }
  return false;
}
Program: 11956
Project: 11956
Buggy source:
private void populateList(){
  listContent.clear();
  tempPos=0;
  final PDInputProcessor inputProcessor=(PDInputProcessor)Game.instance.getInputProcessor();
  final Map<Integer,PDInputProcessor.GameActionWrapper> keyMappings=inputProcessor.getKeyMappings();
  final Map<GameAction,KeyPair> mappings=new TreeMap<>();
  for (  Map.Entry<Integer,PDInputProcessor.GameActionWrapper> entry : keyMappings.entrySet()) {
    final Integer key=entry.getKey();
    final PDInputProcessor.GameActionWrapper value=entry.getValue();
    final GameAction action=value.gameAction;
    KeyPair keyPair=mappings.get(action);
    if (keyPair == null) {
      mappings.put(action,keyPair=new KeyPair());
    }
    if (value.defaultKey) {
      keyPair.key1=key;
    }
 else {
      keyPair.key2=key;
    }
  }
  for (  Map.Entry<GameAction,KeyPair> entry : mappings.entrySet()) {
    addKey(listContent,width,entry);
  }
  listContent.setSize(0,tempPos);
}

Fixed version (ground truth):
private void populateList(){
  listContent.clear();
  tempPos=0;
  final PDInputProcessor inputProcessor=(PDInputProcessor)Game.instance.getInputProcessor();
  final Map<Integer,PDInputProcessor.GameActionWrapper> keyMappings=inputProcessor.getKeyMappings();
  final Map<GameAction,KeyPair> mappings=new TreeMap<>();
  for (  GameAction action : GameAction.values()) {
    if (action.getDescription() != null) {
      mappings.put(action,new KeyPair());
    }
  }
  for (  Map.Entry<Integer,PDInputProcessor.GameActionWrapper> entry : keyMappings.entrySet()) {
    final Integer key=entry.getKey();
    final PDInputProcessor.GameActionWrapper value=entry.getValue();
    final GameAction action=value.gameAction;
    KeyPair keyPair=mappings.get(action);
    if (keyPair == null) {
      mappings.put(action,keyPair=new KeyPair());
    }
    if (value.defaultKey) {
      keyPair.key1=key;
    }
 else {
      keyPair.key2=key;
    }
  }
  for (  Map.Entry<GameAction,KeyPair> entry : mappings.entrySet()) {
    addKey(listContent,width,entry);
  }
  listContent.setSize(0,tempPos);
}
Program: 11957
Project: 11957
Buggy source:
private void fetchNewRequests(FreenetURI uri){
  FetchResult fetchResult=null;
  if (!uri.hasMetaStrings()) {
    uri=uri.addMetaStrings(new String[]{"String_Node_Str"});
  }
  try {
    fetchResult=CENOClient.nodeInterface.fetchURI(uri);
  }
 catch (  FetchException e) {
switch (e.getMode()) {
case PERMANENT_REDIRECT:
      fetchNewRequests(e.newURI);
    break;
case ALL_DATA_NOT_FOUND:
case DATA_NOT_FOUND:
  Logger.warning(Channel.class,"String_Node_Str" + uri);
break;
case RECENTLY_FAILED:
try {
Thread.sleep(TimeUnit.MINUTES.toMillis(10));
}
 catch (InterruptedException e1) {
}
 finally {
fetchNewRequests(uri);
}
return;
default :
Logger.warning(Channel.class,"String_Node_Str" + uri + "String_Node_Str"+ e.getMessage());
break;
}
if (e.isDefinitelyFatal()) {
Logger.error(Channel.class,"String_Node_Str" + uri + "String_Node_Str"+ e.getMessage());
return;
}
}
try {
String fetchedString=fetchResult.toString();
RequestReceiver.signalReceived(fetchedString.split("String_Node_Str"));
}
 catch (NullPointerException e) {
Logger.warning(this,"String_Node_Str");
}
return;
}

Fixed version (ground truth):
private void fetchNewRequests(FreenetURI uri){
  FetchResult fetchResult=null;
  try {
    fetchResult=CENOBridge.nodeInterface.fetchURI(uri);
  }
 catch (  FetchException e) {
switch (e.getMode()) {
case PERMANENT_REDIRECT:
      fetchNewRequests(e.newURI);
    break;
case ALL_DATA_NOT_FOUND:
case DATA_NOT_FOUND:
  Logger.warning(Channel.class,"String_Node_Str" + uri);
break;
case RECENTLY_FAILED:
try {
Thread.sleep(TimeUnit.MINUTES.toMillis(10));
}
 catch (InterruptedException e1) {
}
 finally {
fetchNewRequests(uri);
}
return;
default :
Logger.warning(Channel.class,"String_Node_Str" + uri + "String_Node_Str"+ e.getMessage());
break;
}
if (e.isDefinitelyFatal()) {
Logger.error(Channel.class,"String_Node_Str" + uri + "String_Node_Str"+ e.getMessage());
return;
}
}
try {
String fetchedString=fetchResult.toString();
RequestReceiver.signalReceived(fetchedString.split("String_Node_Str"));
}
 catch (NullPointerException e) {
Logger.warning(this,"String_Node_Str");
}
return;
}
Program: 11958
Project: 11958
Buggy source:
public void runPlugin(PluginRespirator pr){
}

Fixed version (ground truth):
public void runPlugin(PluginRespirator pr){
  pluginRespirator=pr;
  client=new HighLevelSimpleClientInterface(pluginRespirator.getNode(),pluginRespirator.getHLSimpleClient());
  nodeInterface=new NodeInterface(pluginRespirator.getNode(),pluginRespirator);
  nodeInterface.initFetchContexts();
  CENOL10n.getInstance().setLanguageFromEnvVar("String_Node_Str");
  initConfig=new Configuration(CONFIGPATH);
  initConfig.readProperties();
  if (initConfig.getProperty("String_Node_Str") == null || initConfig.getProperty("String_Node_Str").isEmpty()) {
    Logger.warning(this,"String_Node_Str");
    FreenetURI[] keyPair=nodeInterface.generateKeyPair();
    initConfig.setProperty("String_Node_Str",keyPair[0].toString());
    initConfig.setProperty("String_Node_Str",keyPair[1].toString());
    initConfig.storeProperties();
  }
  AsymmetricCipherKeyPair asymKeyPair;
  if (initConfig.getProperty("String_Node_Str") == null || initConfig.getProperty("String_Node_Str") == null || initConfig.getProperty("String_Node_Str") == null) {
    Logger.warning(this,"String_Node_Str");
    asymKeyPair=Crypto.generateAsymKey();
    initConfig.setProperty("String_Node_Str",((RSAKeyParameters)asymKeyPair.getPrivate()).getExponent().toString(23));
    initConfig.setProperty("String_Node_Str",((RSAKeyParameters)asymKeyPair.getPublic()).getModulus().toString(32));
    initConfig.setProperty("String_Node_Str",((RSAKeyParameters)asymKeyPair.getPublic()).getExponent().toString(32));
    initConfig.storeProperties();
  }
 else {
    asymKeyPair=new AsymmetricCipherKeyPair(new RSAKeyParameters(false,new BigInteger(initConfig.getProperty("String_Node_Str"),32),new BigInteger(initConfig.getProperty("String_Node_Str"),32)),new RSAKeyParameters(true,new BigInteger(initConfig.getProperty("String_Node_Str"),32),new BigInteger(initConfig.getProperty("String_Node_Str"),32)));
  }
  try {
    channelMaker=new ChannelMaker(initConfig.getProperty("String_Node_Str"),asymKeyPair);
  }
 catch (  CENOException e) {
    Logger.error(this,"String_Node_Str");
    terminate();
  }
  String confIsMasterBridge=initConfig.getProperty("String_Node_Str");
  if (confIsMasterBridge != null && confIsMasterBridge.equals("String_Node_Str")) {
    isMasterBridge=true;
  }
  String confIsSingalBridge=initConfig.getProperty("String_Node_Str");
  if (confIsSingalBridge != null && confIsSingalBridge.equals("String_Node_Str")) {
    isSignalBridge=true;
  }
  cenoHttpServer=new Server();
  configHttpServer(cenoHttpServer);
  try {
    cenoHttpServer.start();
    cenoHttpServer.join();
  }
 catch (  InterruptedException interruptedEx) {
    Logger.normal(this,"String_Node_Str");
    terminate();
    return;
  }
catch (  Exception ex) {
    Logger.error(this,"String_Node_Str");
    Logger.error(this,ex.getMessage());
    terminate();
    return;
  }
}
Program: 11959
Project: 11959
Buggy source:
public static FreenetURI insertSingleChunk(FreenetURI uri,String content,ClientPutCallback cb) throws InsertException, PersistenceDisabledException, UnsupportedEncodingException {
}

Fixed version (ground truth):
public static FreenetURI insertSingleChunk(FreenetURI uri,String content,ClientPutCallback cb) throws InsertException, PersistenceDisabledException, UnsupportedEncodingException {
  RandomAccessBucket b=new SimpleReadOnlyArrayBucket(content.getBytes("String_Node_Str"));
  InsertContext ctx=node.clientCore.makeClient((short)0,true,false).getInsertContext(true);
  ClientPutter clientPutter=new ClientPutter(cb,b,uri,null,ctx,RequestStarter.INTERACTIVE_PRIORITY_CLASS,false,null,false,node.clientCore.clientContext,null,-1L);
  node.clientCore.clientContext.start(clientPutter);
  return uri;
}
Program: 11960
Project: 11960
Buggy source:
@Override public FreenetURI insertBundleManifest(FreenetURI insertURI,String content,String defaultName,ClientPutCallback insertCb) throws IOException, InsertException {
  String defName;
  if (defaultName == null || defaultName.isEmpty()) {
    defName="String_Node_Str";
  }
 else {
    defName=defaultName;
  }
  Bucket bucket=node.clientCore.tempBucketFactory.makeBucket(content.length());
  BucketTools.copyFrom(bucket,new ByteArrayInputStream(content.getBytes(StandardCharsets.UTF_8),0,content.length()),content.length());
  HashMap<String,Object> bucketsByName=new HashMap<String,Object>();
  bucketsByName.put(defName,bucket);
  FreenetURI requestURI=HighLevelSimpleClientInterface.insertManifestCb(insertURI,bucketsByName,defName,RequestStarter.INTERACTIVE_PRIORITY_CLASS,null,insertCb);
  return requestURI;
}

Fixed version (ground truth):
@Override public FreenetURI insertBundleManifest(FreenetURI insertURI,String content,String defaultName,ClientPutCallback insertCb) throws IOException, InsertException {
  String defName;
  if (defaultName == null || defaultName.isEmpty()) {
    defName="String_Node_Str";
  }
 else {
    defName=defaultName;
  }
  Bucket bucket=node.clientCore.tempBucketFactory.makeBucket(content.getBytes().length);
  BucketTools.copyFrom(bucket,new ByteArrayInputStream(content.getBytes()),content.getBytes().length);
  HashMap<String,Object> bucketsByName=new HashMap<String,Object>();
  bucketsByName.put(defName,bucket);
  FreenetURI requestURI=HighLevelSimpleClientInterface.insertManifestCb(insertURI,bucketsByName,defName,RequestStarter.INTERACTIVE_PRIORITY_CLASS,null,insertCb);
  return requestURI;
}
Program: 11961
Project: 11961
Buggy source:
public LANGUAGE getLanguageFromEnvVar(String envVar){
  String envVal=System.getenv(envVar);
  if (envVal != null && !envVal.isEmpty()) {
    envVal=envVal.split("String_Node_Str")[0];
  }
  LANGUAGE lang=LANGUAGE.mapToLanguage(envVal);
  if (lang == null) {
    lang=LANGUAGE.ENGLISH;
  }
  return lang;
}

Fixed version (ground truth):
public LANGUAGE getLanguageFromEnvVar(String envVar){
  String envVal=System.getenv(envVar);
  if (envVal != null && !envVal.isEmpty()) {
    envVal=envVal.split("String_Node_Str")[0];
  }
 else {
    envVal="String_Node_Str";
  }
  LANGUAGE lang=LANGUAGE.mapToLanguage(envVal);
  return lang;
}
Program: 11962
Project: 11962
Buggy source:
public static FreenetURI insertManifestCb(FreenetURI insertURI,HashMap<String,Object> bucketsByName,String defaultName,short priorityClass,byte[] forceCryptoKey,ClientPutCallback insertCb) throws InsertException {
  DefaultManifestPutter putter;
  try {
    putter=new DefaultManifestPutter(insertCb,BaseManifestPutter.bucketsByNameToManifestEntries(bucketsByName),priorityClass,insertURI,defaultName,getInsertContext(true),false,forceCryptoKey,null);
  }
 catch (  TooManyFilesInsertException e) {
    Logger.warning(HighLevelSimpleClientInterface.class,"String_Node_Str" + insertURI.toASCIIString());
    return null;
  }
  try {
    HLSCInterface.node.clientCore.clientContext.start(putter);
  }
 catch (  PersistenceDisabledException e) {
    Logger.warning(HighLevelSimpleClientInterface.class,"String_Node_Str" + insertURI.toASCIIString() + "String_Node_Str"+ e.getMessage());
    return null;
  }
  return insertURI;
}

Fixed version (ground truth):
public static FreenetURI insertManifestCb(FreenetURI insertURI,HashMap<String,Object> bucketsByName,String defaultName,short priorityClass,byte[] forceCryptoKey,ClientPutCallback insertCb) throws InsertException {
  DefaultManifestPutter putter;
  try {
    putter=new DefaultManifestPutter(insertCb,BaseManifestPutter.bucketsByNameToManifestEntries(bucketsByName),priorityClass,insertURI,defaultName,getInsertContext(true),false,forceCryptoKey,node.clientCore.clientContext);
  }
 catch (  TooManyFilesInsertException e) {
    Logger.warning(HighLevelSimpleClientInterface.class,"String_Node_Str" + insertURI.toASCIIString());
    return null;
  }
  try {
    HLSCInterface.node.clientCore.clientContext.start(putter);
  }
 catch (  PersistenceDisabledException e) {
    Logger.warning(HighLevelSimpleClientInterface.class,"String_Node_Str" + insertURI.toASCIIString() + "String_Node_Str"+ e.getMessage());
    return null;
  }
  return insertURI;
}
Program: 11963
Project: 11963
Buggy source:
public static void insertBundle(String url,Bundle bundle,ClientPutCallback insertCallback) throws IOException, InsertException {
  if (bundle.getContent().isEmpty()) {
    throw new IOException();
  }
  Map<String,String> splitMap=URLtoUSKTools.splitURL(url);
  FreenetURI insertKey=URLtoUSKTools.computeInsertURI(splitMap.get("String_Node_Str"),CENOBridge.initConfig.getProperty("String_Node_Str"));
  insertFreesite(insertKey,splitMap.get("String_Node_Str"),bundle.getContent(),insertCallback);
}

Fixed version (ground truth):
public static void insertBundle(String url,Bundle bundle,ClientPutCallback insertCallback) throws IOException, InsertException {
  if (bundle.getContent().isEmpty()) {
    throw new IOException();
  }
  Map<String,String> splitMap=URLtoUSKTools.splitURL(url);
  if (splitMap.get("String_Node_Str").isEmpty()) {
    splitMap.put("String_Node_Str","String_Node_Str");
  }
  FreenetURI insertKey=URLtoUSKTools.computeInsertURI(splitMap.get("String_Node_Str"),CENOBridge.initConfig.getProperty("String_Node_Str"));
  insertFreesite(insertKey,splitMap.get("String_Node_Str"),bundle.getContent(),insertCallback);
}
Program: 11964
Project: 11964
Buggy source:
/** 
 * RequestReceiver constructor that follows the singleton pattern.
 * @param freemailBoxesArray an array of freemail boxes the requestreceiver will poll for freemails
 */
public RequestReceiver(String[] freemailBoxesArray){
synchronized (RequestReceiver.class) {
    if (requestReceiver == null) {
      requestReceiver.freemailBoxes=new LinkedList<String>();
      for (      String freemailBox : freemailBoxesArray) {
        addFreemailBox(freemailBox);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * RequestReceiver constructor that follows the singleton pattern.
 * @param freemailBoxesArray an array of freemail boxes the requestreceiver will poll for freemails
 */
public RequestReceiver(String[] freemailBoxesArray){
synchronized (RequestReceiver.class) {
    if (requestReceiver == null) {
      requestReceiver=new RequestReceiver();
      requestReceiver.freemailBoxes=new LinkedList<String>();
      for (      String freemailBox : freemailBoxesArray) {
        addFreemailBox(freemailBox);
      }
    }
  }
}
Program: 11965
Project: 11965
Buggy source:
/** 
 * Starts a thread that polls freemail boxes
 */
public void loopFreemailBoxes(){
  if (requestReceiver.fmBoxLooper != null) {
    requestReceiver.fmBoxLooper=new FreemailBoxLooper();
    requestReceiver.looperThread=new Thread(fmBoxLooper);
    requestReceiver.looperThread.start();
  }
}

Fixed version (ground truth):
/** 
 * Starts a thread that polls freemail boxes
 */
public void loopFreemailBoxes(){
  if (requestReceiver.fmBoxLooper == null) {
    requestReceiver.fmBoxLooper=new FreemailBoxLooper();
    requestReceiver.looperThread=new Thread(requestReceiver.fmBoxLooper);
    requestReceiver.looperThread.start();
  }
}
Program: 11966
Project: 11966
Buggy source:
public CENOException(CENOErrCode errCode){
  super(errCode.toString());
  this.errCode=errCode;
}

Fixed version (ground truth):
/** 
 * Constructs a CENO exception with an error code from the errorConditions doc file.
 * @param errCode the {@link CENOErrCode} correspondingto this exception
 */
public CENOException(CENOErrCode errCode){
  super(errCode.toString());
  this.errCode=errCode;
}
Program: 11967
Project: 11967
Buggy source:
protected String printStaticHTML(String filename){
  InputStream is=AbstractCENOClientHandler.class.getResourceAsStream(filename);
  if (is == null) {
    return "String_Node_Str";
  }
  BufferedReader br=new BufferedReader(new InputStreamReader(is));
  String line="String_Node_Str";
  StringBuilder htmlContent=new StringBuilder();
  try {
    while ((line=br.readLine()) != null) {
      htmlContent.append(line);
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
    return "String_Node_Str";
  }
  return htmlContent.toString();
}

Fixed version (ground truth):
protected String printStaticHTML(String filename){
  InputStream is=AbstractCENOClientHandler.class.getResourceAsStream(filename);
  if (is == null) {
    return returnErrorJSON(new CENOException(CENOErrCode.LCS_HANDLER_STATIC_NOT_FOUND));
  }
  BufferedReader br=new BufferedReader(new InputStreamReader(is));
  String line="String_Node_Str";
  StringBuilder htmlContent=new StringBuilder();
  try {
    while ((line=br.readLine()) != null) {
      htmlContent.append(line);
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
    return returnErrorJSON(new CENOException(CENOErrCode.LCS_HANDLER_STATIC_IO));
  }
  return htmlContent.toString();
}
Program: 11970
Project: 11970
Buggy source:
protected void writeWelcome(Request baseRequest,HttpServletResponse response,String requestPath) throws IOException {
  response.setContentType("String_Node_Str");
  response.setStatus(HttpServletResponse.SC_OK);
  response.getWriter().println("String_Node_Str");
  baseRequest.setHandled(true);
}

Fixed version (ground truth):
protected void writeWelcome(Request baseRequest,HttpServletResponse response,String requestPath) throws IOException {
  response.setContentType("String_Node_Str");
  response.setStatus(HttpServletResponse.SC_OK);
  response.getWriter().print("String_Node_Str");
  baseRequest.setHandled(true);
}
Program: 11971
Project: 11971
Buggy source:
protected void writeError(Request baseRequest,HttpServletResponse response,String requestPath) throws IOException {
  response.setContentType("String_Node_Str");
  response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
  response.getWriter().println("String_Node_Str" + requestPath);
  baseRequest.setHandled(true);
}

Fixed version (ground truth):
protected void writeError(Request baseRequest,HttpServletResponse response,String requestPath) throws IOException {
  response.setContentType("String_Node_Str");
  response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
  response.getWriter().print("String_Node_Str" + requestPath);
  baseRequest.setHandled(true);
}
Program: 11973
Project: 11973
Buggy source:
/** 
 * Execute the command in the session created
 * @param command
 */
public void runCommand(String command) throws Exception {
  String result="String_Node_Str";
  Channel channel=session.openChannel("String_Node_Str");
  ((ChannelExec)channel).setCommand(command);
  channel.setInputStream(null);
  ((ChannelExec)channel).setErrStream(System.err);
  InputStream in=channel.getInputStream();
  ((ChannelExec)channel).setPty(true);
  channel.connect();
  byte[] tmp=new byte[1024];
  while (true) {
    while (in.available() > 0) {
      int i=in.read(tmp,0,1024);
      if (i < 0) {
        break;
      }
      result=result + new String(tmp,0,i);
    }
    this.result=result;
    this.setResult(result);
    if (channel.isClosed()) {
      if (in.available() > 0) {
        continue;
      }
      this.exitStatus=channel.getExitStatus();
      break;
    }
    try {
      Thread.sleep(1000);
    }
 catch (    Exception ee) {
    }
  }
  channel.disconnect();
}

Fixed version (ground truth):
/** 
 * Execute the command in the session created
 * @param command
 */
public void runCommand(String command) throws Exception {
  String result="String_Node_Str";
  String extras="String_Node_Str";
  Channel channel=session.openChannel("String_Node_Str");
  ((ChannelExec)channel).setCommand(extras + command);
  channel.setInputStream(null);
  ((ChannelExec)channel).setErrStream(System.err);
  InputStream in=channel.getInputStream();
  ((ChannelExec)channel).setPty(true);
  channel.connect();
  byte[] tmp=new byte[1024];
  while (true) {
    while (in.available() > 0) {
      int i=in.read(tmp,0,1024);
      if (i < 0) {
        break;
      }
      result=result + new String(tmp,0,i);
    }
    this.result=result;
    this.setResult(result);
    if (channel.isClosed()) {
      if (in.available() > 0) {
        continue;
      }
      this.exitStatus=channel.getExitStatus();
      break;
    }
    try {
      Thread.sleep(1000);
    }
 catch (    Exception ee) {
    }
  }
  channel.disconnect();
}
Program: 11975
Project: 11975
Buggy source:
public boolean dropAllIndexes(){
  ImmutableOpenMap<String,ImmutableOpenMap<String,AliasMetaData>> indexes=this.client.admin().cluster().prepareState().execute().actionGet().getState().getMetaData().aliases();
  return false;
}

Fixed version (ground truth):
public boolean dropAllIndexes(){
  boolean result=true;
  ImmutableOpenMap<String,IndexMetaData> indexes=this.client.admin().cluster().prepareState().execute().actionGet().getState().getMetaData().getIndices();
  for (  String indexName : indexes.keys().toArray(String.class)) {
    DeleteIndexRequest deleteIndexRequest=new DeleteIndexRequest(indexName);
    DeleteIndexResponse res=this.client.admin().indices().delete(deleteIndexRequest).actionGet();
    result=indexExists(indexName);
  }
  return result;
}