nus-yam/ex-repair huggingface dataset:
Program: 150376
Project: 150376
Buggy source:
public static Config load(){
  File file=new File("String_Node_Str","String_Node_Str");
  if (!file.exists()) {
    return null;
  }
  XMLReader xml;
  try {
    xml=XMLReaderFactory.createXMLReader();
  }
 catch (  SAXException e) {
    e.printStackTrace();
    return null;
  }
  LegacyTagResolver handler;
  try {
    handler=new LegacyTagResolver();
  }
 catch (  SAXException e) {
    e.printStackTrace();
    return null;
  }
  xml.setContentHandler(handler);
  xml.setErrorHandler(handler);
  try {
    xml.setFeature("String_Node_Str",false);
    xml.setEntityResolver(handler);
    xml.parse(new InputSource(new FileReader(file)));
  }
 catch (  FileNotFoundException e) {
    return null;
  }
catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  return handler.config();
}

Fixed version (ground truth):
public static Config load(){
  File file=new File("String_Node_Str","String_Node_Str");
  if (!file.exists()) {
    return null;
  }
  System.out.println("String_Node_Str");
  XMLReader xml;
  try {
    xml=XMLReaderFactory.createXMLReader();
  }
 catch (  SAXException e) {
    e.printStackTrace();
    return null;
  }
  LegacyTagResolver handler;
  try {
    handler=new LegacyTagResolver();
  }
 catch (  SAXException e) {
    e.printStackTrace();
    return null;
  }
  xml.setContentHandler(handler);
  xml.setErrorHandler(handler);
  try {
    xml.setFeature("String_Node_Str",false);
    xml.setEntityResolver(handler);
    xml.parse(new InputSource(new FileReader(file)));
  }
 catch (  FileNotFoundException e) {
    return null;
  }
catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  return handler.config();
}
Program: 150377
Project: 150377
Buggy source:
public boolean loadResources(){
  for (  Resource resource : resources) {
    resource.load();
  }
  if (playerList != null) {
    playerList.updatePlayerGroups();
  }
  if (globalConfig.loadsuccess) {
    config=globalConfig.config;
  }
 else {
    System.out.println("String_Node_Str");
  }
  if (!Translations.getInstance().setLanguage(options.get("String_Node_Str"))) {
    options.set("String_Node_Str","String_Node_Str");
    options.save();
  }
  addressFactory.toggle(!options.getBoolean("String_Node_Str"));
  return globalConfig.loadsuccess;
}

Fixed version (ground truth):
public boolean loadResources(){
  for (  Resource resource : resources) {
    resource.load();
  }
  if (globalConfig.loadsuccess) {
    config=globalConfig.config;
  }
 else {
    System.out.println("String_Node_Str");
  }
  if (playerList != null) {
    playerList.updatePlayerGroups();
  }
  if (!Translations.getInstance().setLanguage(options.get("String_Node_Str"))) {
    options.set("String_Node_Str","String_Node_Str");
    options.save();
  }
  addressFactory.toggle(!options.getBoolean("String_Node_Str"));
  return globalConfig.loadsuccess;
}
Program: 150378
Project: 150378
Buggy source:
public void execute(Player player,String message){
  List<Area> areas=player.getServer().config.dimensions.areas(player.position());
  StringBuilder str=new StringBuilder();
  for (  Area area : areas) {
    str.append(area.name);
    str.append("String_Node_Str");
  }
  if (!areas.isEmpty()) {
    str.delete(str.length() - 2,str.length() - 1);
  }
  player.addTMessage(Color.GRAY,"String_Node_Str",Color.WHITE,str.toString());
}

Fixed version (ground truth):
public void execute(Player player,String message){
  List<Area> areas=player.getServer().config.dimensions.areas(player.position());
  StringBuilder str=new StringBuilder();
  if (areas == null || areas.isEmpty()) {
    player.addTMessage(Color.GRAY,"String_Node_Str");
    return;
  }
  for (  Area area : areas) {
    str.append(area.name);
    str.append("String_Node_Str");
  }
  if (!areas.isEmpty()) {
    str.delete(str.length() - 2,str.length() - 1);
  }
  player.addTCaptionedMessage("String_Node_Str",str.toString());
}
Program: 150381
Project: 150381
Buggy source:
public AreaStoragePair playerArea(Player player){
  String name=player.getName().toLowerCase();
  for (  DimensionConfig dim : dimensions) {
    Stack<AreaStorage> stack=new Stack<AreaStorage>();
    stack.add(dim.topAreas);
    while (!stack.isEmpty()) {
      AreaStorage storage=stack.pop();
      for (      Area area : storage) {
        if (area.owner == name) {
          return new AreaStoragePair(storage,area);
        }
        stack.add(area.areas);
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public AreaStoragePair playerArea(Player player){
  String name=player.getName().toLowerCase();
  for (  DimensionConfig dim : dimensions) {
    Stack<AreaStorage> stack=new Stack<AreaStorage>();
    stack.add(dim.topAreas);
    while (!stack.isEmpty()) {
      AreaStorage storage=stack.pop();
      for (      Area area : storage) {
        if (area.owner.equals(name)) {
          return new AreaStoragePair(storage,area);
        }
        stack.add(area.areas);
      }
    }
  }
  return null;
}
Program: 150382
Project: 150382
Buggy source:
public DimensionConfig add(Dimension dimension){
  DimensionConfig newDimension=new DimensionConfig();
  newDimension.dimension=dimension;
  newDimension.init();
  dimensions.put(dimension,newDimension);
  return newDimension;
}

Fixed version (ground truth):
public DimensionConfig add(Dimension dimension){
  DimensionConfig newDimension=new DimensionConfig();
  newDimension.dimension=dimension;
  newDimension.init();
  newDimension.finish();
  dimensions.put(dimension,newDimension);
  return newDimension;
}
Program: 150383
Project: 150383
Buggy source:
protected void processBOM() throws IOException {
  byte[] bom=new byte[BOM_SIZE];
  int read=pushbackReader.read(bom,0,BOM_SIZE);
  int unread=0;
  if (read > 0) {
    Set<String> encodings=BOMS.keySet();
    Iterator<String> itr=encodings.iterator();
    while (itr.hasNext()) {
      String currentEncoding=itr.next();
      byte[] currentBOM=BOMS.get(currentEncoding);
      if (arrayStartsWith(bom,currentBOM)) {
        encoding=currentEncoding;
        unread=currentBOM.length;
        break;
      }
    }
    if (unread <= BOM_SIZE && unread > 0) {
      pushbackReader.unread(bom,unread,read - unread);
    }
  }
  if (encoding == null) {
    reader=new InputStreamReader(pushbackReader);
  }
 else {
    reader=new InputStreamReader(pushbackReader,encoding);
  }
}

Fixed version (ground truth):
protected void processBOM() throws IOException {
  byte[] bom=new byte[BOM_SIZE];
  int read=pushbackReader.read(bom,0,BOM_SIZE);
  int unread=0;
  if (read > 0) {
    Set<String> encodings=BOMS.keySet();
    Iterator<String> itr=encodings.iterator();
    while (itr.hasNext()) {
      String currentEncoding=itr.next();
      byte[] currentBOM=BOMS.get(currentEncoding);
      if (arrayStartsWith(bom,currentBOM)) {
        encoding=currentEncoding;
        unread=currentBOM.length;
        break;
      }
    }
    if (unread <= BOM_SIZE) {
      pushbackReader.unread(bom,unread,read - unread);
    }
  }
  if (encoding == null) {
    reader=new InputStreamReader(pushbackReader);
  }
 else {
    reader=new InputStreamReader(pushbackReader,encoding);
  }
}
Program: 150386
Project: 150386
Buggy source:
public static Config load(){
  File file=new File("String_Node_Str","String_Node_Str");
  if (!file.exists()) {
    return null;
  }
  System.out.println("String_Node_Str");
  XMLReader xml;
  try {
    xml=XMLReaderFactory.createXMLReader();
  }
 catch (  SAXException e) {
    e.printStackTrace();
    return null;
  }
  LegacyTagResolver handler;
  try {
    handler=new LegacyTagResolver();
  }
 catch (  SAXException e) {
    e.printStackTrace();
    return null;
  }
  xml.setContentHandler(handler);
  xml.setErrorHandler(handler);
  try {
    xml.setFeature("String_Node_Str",false);
    xml.setEntityResolver(handler);
    xml.parse(new InputSource(new FileReader(file)));
  }
 catch (  FileNotFoundException e) {
    return null;
  }
catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  return handler.config();
}

Fixed version (ground truth):
public static Config load(){
  File file=new File("String_Node_Str","String_Node_Str");
  if (!file.exists()) {
    return null;
  }
  System.out.println("String_Node_Str");
  XMLReader xml;
  try {
    xml=XMLReaderFactory.createXMLReader();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  LegacyTagResolver handler;
  try {
    handler=new LegacyTagResolver();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  xml.setContentHandler(handler);
  xml.setErrorHandler(handler);
  try {
    xml.setFeature("String_Node_Str",false);
    xml.setEntityResolver(handler);
    xml.parse(new InputSource(new FileReader(file)));
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
    return null;
  }
catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  return handler.config();
}
Program: 150387
Project: 150387
Buggy source:
@Override void setAttribute(String name,String value) throws SAXException {
  if (name.equals(ID)) {
    id=getInt(value);
  }
 else   if (name.equals(NAME)) {
    this.name=value.toLowerCase();
  }
 else   if (name.equals(COLOR)) {
    color=value.charAt(0);
  }
 else   if (name.equals(IGNORE_CHESTS)) {
    ignoreChestLocks=true;
  }
 else   if (name.equals(IGNORE_AREAS)) {
    ignoreAreas=true;
  }
 else   if (name.equals(FORWARD_UNKNOWN)) {
    forwardUnknownCommands=true;
  }
 else   if (name.equals(SHOW_TITLE)) {
    showTitle=true;
  }
 else   if (name.equals(COOLDOWN)) {
    cooldown=getInt(value);
  }
 else   if (name.equals(WARMUP)) {
    warmup=getInt(value);
  }
}

Fixed version (ground truth):
@Override void setAttribute(String name,String value) throws SAXException {
  if (name.equals(ID)) {
    id=getInt(value);
  }
 else   if (name.equals(NAME)) {
    this.name=value;
  }
 else   if (name.equals(COLOR)) {
    color=value.charAt(0);
  }
 else   if (name.equals(IGNORE_CHESTS)) {
    ignoreChestLocks=true;
  }
 else   if (name.equals(IGNORE_AREAS)) {
    ignoreAreas=true;
  }
 else   if (name.equals(FORWARD_UNKNOWN)) {
    forwardUnknownCommands=true;
  }
 else   if (name.equals(SHOW_TITLE)) {
    showTitle=true;
  }
 else   if (name.equals(COOLDOWN)) {
    cooldown=getInt(value);
  }
 else   if (name.equals(WARMUP)) {
    warmup=getInt(value);
  }
}
Program: 150388
Project: 150388
Buggy source:
private long lastBackupAge(){
  return age(newestBackup());
}

Fixed version (ground truth):
private long lastBackupAge(){
  long age=age(newestBackup());
  return (age >= 0) ? age : Long.MAX_VALUE;
}
Program: 150389
Project: 150389
Buggy source:
private static long age(File file){
  try {
    if (file == null) {
      return 0;
    }
 else {
      return System.currentTimeMillis() - date(file);
    }
  }
 catch (  ParseException e) {
    return System.currentTimeMillis() - file.lastModified();
  }
}

Fixed version (ground truth):
private static long age(File file){
  try {
    if (file == null) {
      return -1;
    }
 else {
      return System.currentTimeMillis() - date(file);
    }
  }
 catch (  ParseException e) {
    return System.currentTimeMillis() - file.lastModified();
  }
}
Program: 150390
Project: 150390
Buggy source:
public boolean allowGuestJoin(){
  return server.options.getBoolean("String_Node_Str");
}

Fixed version (ground truth):
public boolean allowGuestJoin(){
  return server.options.getBoolean("String_Node_Str") || !server.options.getBoolean("String_Node_Str");
}
Program: 150391
Project: 150391
Buggy source:
private void startup(){
  restart=false;
  loadResources();
  if (permissions.loadsuccess == false) {
    System.out.println("String_Node_Str");
    System.exit(1);
  }
  authenticator=new Authenticator(this);
  playerList=new PlayerList(options);
  requestTracker=new RequestTracker(this);
  messager=new Messager(this);
  minecraft=new MinecraftWrapper(this,options,systemInput);
  if (!minecraft.prepareServerJar()) {
    System.out.println("String_Node_Str");
    System.exit(1);
  }
  try {
    minecraft.start();
  }
 catch (  InterruptedException e) {
  }
  if (options.getBoolean("String_Node_Str")) {
    telnetServer=new TelnetServer(this);
  }
  if (options.getBoolean("String_Node_Str")) {
    rconServer=new RconServer(this);
  }
  world=new WorldFile(options.get("String_Node_Str"));
  autoSpaceCheck=new AutoFreeSpaceChecker(this);
  autoBackup=new AutoBackup(this);
  autosave=new AutoSave(this);
  autoRestart=new AutoRestart(this);
  c10t=new AutoRun(this,options.get("String_Node_Str"));
  if (options.contains("String_Node_Str")) {
    try {
      time.freeze(time.parse(options.get("String_Node_Str")));
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
    }
  }
  bots.ready();
}

Fixed version (ground truth):
private void startup(){
  restart=false;
  loadResources();
  if (permissions.loadsuccess == false) {
    System.out.println("String_Node_Str");
    System.exit(1);
  }
  authenticator=new Authenticator(this);
  playerList=new PlayerList(options);
  requestTracker=new RequestTracker(this);
  messager=new Messager(this);
  messageLog=new MessageLog(options.get("String_Node_Str"),options.getBoolean("String_Node_Str"));
  minecraft=new MinecraftWrapper(this,options,systemInput);
  if (!minecraft.prepareServerJar()) {
    System.out.println("String_Node_Str");
    System.exit(1);
  }
  try {
    minecraft.start();
  }
 catch (  InterruptedException e) {
  }
  if (options.getBoolean("String_Node_Str")) {
    telnetServer=new TelnetServer(this);
  }
  if (options.getBoolean("String_Node_Str")) {
    rconServer=new RconServer(this);
  }
  world=new WorldFile(options.get("String_Node_Str"));
  autoSpaceCheck=new AutoFreeSpaceChecker(this);
  autoBackup=new AutoBackup(this);
  autosave=new AutoSave(this);
  autoRestart=new AutoRestart(this);
  c10t=new AutoRun(this,options.get("String_Node_Str"));
  if (options.contains("String_Node_Str")) {
    try {
      time.freeze(time.parse(options.get("String_Node_Str")));
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
    }
  }
  bots.ready();
}
Program: 150392
Project: 150392
Buggy source:
private void initialize(){
  resources=new LinkedList<Resource>();
  resources.add(permissions=new PermissionConfig(this));
  resources.add(options=new Options());
  resources.add(robots=new RobotList());
  resources.add(motd=new MOTD());
  resources.add(rules=new Rules());
  resources.add(helptext=new HelpText());
  resources.add(kits=new KitList(this));
  resources.add(ipBans=new IPBanList());
  resources.add(whitelist=new WhiteList());
  resources.add(mutelist=new MuteList());
  resources.add(giveAliasList=new GiveAliasList());
  resources.add(data=new GlobalData());
  resources.add(docs=new ReadFiles());
  time=new Time(this);
  bots=new BotController(this);
  systemInput=new SystemInputQueue();
  adminLog=new AdminLog();
  errorLog=new ErrorLog();
  connectionLog=new ConnectionLog();
  messageLog=new MessageLog(options.get("String_Node_Str"),options.getBoolean("String_Node_Str"));
  commandParser=new CommandParser(options,permissions);
}

Fixed version (ground truth):
private void initialize(){
  resources=new LinkedList<Resource>();
  resources.add(permissions=new PermissionConfig(this));
  resources.add(options=new Options());
  resources.add(robots=new RobotList());
  resources.add(motd=new MOTD());
  resources.add(rules=new Rules());
  resources.add(helptext=new HelpText());
  resources.add(kits=new KitList(this));
  resources.add(ipBans=new IPBanList());
  resources.add(whitelist=new WhiteList());
  resources.add(mutelist=new MuteList());
  resources.add(giveAliasList=new GiveAliasList());
  resources.add(data=new GlobalData());
  resources.add(docs=new ReadFiles());
  time=new Time(this);
  bots=new BotController(this);
  systemInput=new SystemInputQueue();
  adminLog=new AdminLog();
  errorLog=new ErrorLog();
  connectionLog=new ConnectionLog();
  commandParser=new CommandParser(options,permissions);
}
Program: 150393
Project: 150393
Buggy source:
@Override public void run(){
  while (run) {
    if (needsBackup()) {
      try {
        server.saveLock.acquire();
      }
 catch (      InterruptedException e) {
        continue;
      }
      forceBackup=false;
      server.autoSpaceCheck.check(true);
      if (server.options.getBoolean("String_Node_Str")) {
        server.runCommand("String_Node_Str",t("String_Node_Str"));
      }
      server.setSaving(true);
      server.runCommand("String_Node_Str",null);
      while (server.isSaving()) {
        try {
          Thread.sleep(100);
        }
 catch (        InterruptedException e) {
        }
      }
      try {
        backup();
      }
 catch (      IOException e) {
        server.errorLog(e,"String_Node_Str");
        System.out.println("String_Node_Str" + e);
        System.out.println("String_Node_Str");
      }
      server.saveLock.release();
      pauseBackup=(server.numPlayers() == 0);
    }
    try {
      Thread.sleep(60000);
    }
 catch (    InterruptedException e) {
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  while (run) {
    if (needsBackup()) {
      try {
        server.saveLock.acquire();
      }
 catch (      InterruptedException e) {
        continue;
      }
      forceBackup=false;
      server.autoSpaceCheck.check(true);
      if (server.options.getBoolean("String_Node_Str")) {
        server.runCommand("String_Node_Str",t("String_Node_Str"));
      }
      server.setSaving(true);
      server.runCommand("String_Node_Str",null);
      while (server.isSaving()) {
        try {
          Thread.sleep(100);
        }
 catch (        InterruptedException e) {
        }
      }
      try {
        backup();
      }
 catch (      IOException e) {
        server.errorLog(e,"String_Node_Str");
        System.out.println("String_Node_Str" + e);
        System.out.println("String_Node_Str");
      }
      server.saveLock.release();
      if (server.numPlayers() == 0) {
        pauseBackup=true;
      }
    }
    if (pauseBackup && server.numPlayers() > 0) {
      pauseBackup=false;
    }
    try {
      Thread.sleep(60000);
    }
 catch (    InterruptedException e) {
    }
  }
}
Program: 150394
Project: 150394
Buggy source:
@Override public void save(){
  load();
  options.setProperty("String_Node_Str","String_Node_Str");
  options.setProperty("String_Node_Str","String_Node_Str");
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  super.save();
}

Fixed version (ground truth):
@Override public void save(){
  load();
  options.setProperty("String_Node_Str","String_Node_Str");
  options.setProperty("String_Node_Str","String_Node_Str");
  options.setProperty("String_Node_Str","String_Node_Str");
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  super.save();
}
Program: 150395
Project: 150395
Buggy source:
public void teleportSelf(Position position){
  try {
    teleport(position);
  }
 catch (  Exception e) {
    addTMessage(Color.RED,"String_Node_Str");
    return;
  }
  lastTeleport=new Date().getTime();
}

Fixed version (ground truth):
public void teleportSelf(Position position){
  try {
    teleport(position);
  }
 catch (  Exception e) {
    addTMessage(Color.RED,"String_Node_Str");
    return;
  }
  lastTeleport=System.currentTimeMillis();
}
Program: 150396
Project: 150396
Buggy source:
private int cooldownLeft(){
  int cooldown=getGroup().getCooldownMillis();
  if (lastTeleport > new Date().getTime() - cooldown) {
    return (int)(cooldown - new Date().getTime() + lastTeleport);
  }
 else {
    return 0;
  }
}

Fixed version (ground truth):
private int cooldownLeft(){
  int cooldown=getGroup().getCooldownMillis();
  if (lastTeleport > System.currentTimeMillis() - cooldown) {
    return (int)(cooldown - System.currentTimeMillis() + lastTeleport);
  }
 else {
    return 0;
  }
}
Program: 150398
Project: 150398
Buggy source:
public List<String> getHomesPlayerInvitedTo(String playerName){
  List<String> invitedTo=new LinkedList<String>();
  for (  String name : playerData.names()) {
    NBTCompound player=playerData.get(name);
    if (player.containsKey(HOME)) {
      HomePoint home=new HomePoint(player.getCompound(HOME));
      if (home.invites.contains(new NBTString(playerName))) {
        invitedTo.add(name);
      }
    }
  }
  return invitedTo;
}

Fixed version (ground truth):
public List<String> getHomesPlayerInvitedTo(String playerName){
  List<String> invitedHomes=new LinkedList<String>();
  for (  String name : playerData.names()) {
    NBTCompound player=playerData.get(name);
    if (player.containsKey(HOME)) {
      HomePoint home=new HomePoint(player.getCompound(HOME));
      if (home.invites.contains(new NBTString(playerName))) {
        invitedHomes.add(name);
      }
    }
  }
  return invitedHomes;
}
Program: 150399
Project: 150399
Buggy source:
public void loadResources(){
  for (  Resource resource : resources) {
    resource.load();
  }
  if (playerList != null) {
    playerList.updatePlayerGroups();
  }
  if (!Translations.getInstance().setLanguage(options.get("String_Node_Str"))) {
    options.set("String_Node_Str","String_Node_Str");
    options.save();
  }
  addressFactory.toggle(!options.getBoolean("String_Node_Str"));
  commandParser.reload();
}

Fixed version (ground truth):
public void loadResources(){
  for (  Resource resource : resources) {
    resource.load();
  }
  if (playerList != null) {
    playerList.updatePlayerGroups();
  }
  if (!Translations.getInstance().setLanguage(options.get("String_Node_Str"))) {
    options.set("String_Node_Str","String_Node_Str");
    options.save();
  }
  addressFactory.toggle(!options.getBoolean("String_Node_Str"));
}
Program: 150400
Project: 150400
Buggy source:
public String getHelpText(String prefix){
  if (name != null) {
    return Color.DARK_GREEN + prefix + helpText;
  }
 else {
    return helpText;
  }
}

Fixed version (ground truth):
public String getHelpText(String prefix){
  if (help != null) {
    return Color.DARK_GREEN + prefix + help+ "String_Node_Str"+ Color.WHITE+ t(commandCode);
  }
 else {
    return t(commandCode);
  }
}
Program: 150401
Project: 150401
Buggy source:
protected AbstractCommand(String name,String commandCode){
  if (name != null) {
    helpText=name + Color.WHITE + "String_Node_Str"+ t(commandCode);
    int splitIndex=name.indexOf("String_Node_Str");
    if (splitIndex != -1) {
      name=name.substring(0,splitIndex);
    }
  }
 else {
    helpText=t(commandCode);
  }
  this.name=name;
  this.commandCode=commandCode;
}

Fixed version (ground truth):
protected AbstractCommand(String name,String commandCode){
  help=name;
  if (name != null) {
    int splitIndex=name.indexOf("String_Node_Str");
    if (splitIndex != -1) {
      name=name.substring(0,splitIndex);
    }
  }
  this.name=name;
  this.commandCode=commandCode;
}
Program: 150402
Project: 150402
Buggy source:
public void giveLock(Player player,Coordinate coordinate,String name){
  giveLock(player.getName(),coordinate,name);
}

Fixed version (ground truth):
public void giveLock(Player player,Coordinate coordinate,String name){
  giveLock(player.getName().toLowerCase(),coordinate,name);
}
Program: 150403
Project: 150403
Buggy source:
public String getInvitedPlayer(String prefix){
  for (  String playerName : getPlayersInvited()) {
    if (playerName.startsWith(prefix)) {
      return playerName;
    }
  }
  return prefix;
}

Fixed version (ground truth):
public String getInvitedPlayer(String prefix){
  if (getPlayersInvited().contains(prefix)) {
    return prefix;
  }
  for (  String playerName : getPlayersInvited()) {
    if (playerName.startsWith(prefix)) {
      return playerName;
    }
  }
  return prefix;
}
Program: 150404
Project: 150404
Buggy source:
public void close(){
  if (serverToClient != null) {
    serverToClient.stop();
  }
  if (clientToServer != null) {
    clientToServer.stop();
  }
  if (name != null) {
    server.authenticator.unbanLogin(this);
    if (usedAuthenticator) {
      if (guest) {
        server.authenticator.releaseGuestName(name);
      }
 else {
        server.authenticator.rememberAuthentication(name,getIPAddress());
      }
    }
 else     if (guest) {
      server.authenticator.rememberGuest(name,getIPAddress());
    }
    server.data.players.stats.add(this,StatField.PLAY_TIME,(int)(System.currentTimeMillis() - connected) / 1000 / 60);
    server.data.players.stats.add(this,StatField.BLOCKS_DESTROYED,blocksDestroyed);
    server.data.players.stats.add(this,StatField.BLOCKS_PLACED,blocksPlaced);
    server.data.save();
    server.playerList.removePlayer(this);
    name=null;
  }
}

Fixed version (ground truth):
public void close(){
  if (serverToClient != null) {
    serverToClient.stop();
  }
  if (clientToServer != null) {
    clientToServer.stop();
  }
  if (name != null) {
    server.authenticator.unbanLogin(this);
    if (usedAuthenticator) {
      if (guest) {
        server.authenticator.releaseGuestName(name);
      }
 else {
        server.authenticator.rememberAuthentication(name,getIPAddress());
      }
    }
 else     if (guest) {
      if (isKicked) {
        server.authenticator.releaseGuestName(name);
      }
 else {
        server.authenticator.rememberGuest(name,getIPAddress());
      }
    }
    server.data.players.stats.add(this,StatField.PLAY_TIME,(int)(System.currentTimeMillis() - connected) / 1000 / 60);
    server.data.players.stats.add(this,StatField.BLOCKS_DESTROYED,blocksDestroyed);
    server.data.players.stats.add(this,StatField.BLOCKS_PLACED,blocksPlaced);
    server.data.save();
    server.playerList.removePlayer(this);
    name=null;
  }
}
Program: 150406
Project: 150406
Buggy source:
public synchronized String getNextAddress(){
  if (!canCycle()) {
    return "String_Node_Str";
  }
  if (octets[2] >= 255) {
    if (octets[1] >= 255) {
      if (octets[0] >= 255) {
        octets[0]=0;
      }
 else {
        ++octets[0];
      }
      octets[1]=0;
    }
 else {
      ++octets[1];
    }
    octets[2]=2;
  }
 else {
    ++octets[2];
  }
  return "String_Node_Str" + octets[0] + "String_Node_Str"+ octets[1]+ "String_Node_Str"+ octets[2];
}

Fixed version (ground truth):
public synchronized String getNextAddress(){
  if (!enabled || !canCycle()) {
    return "String_Node_Str";
  }
  if (octets[2] >= 255) {
    if (octets[1] >= 255) {
      if (octets[0] >= 255) {
        octets[0]=0;
      }
 else {
        ++octets[0];
      }
      octets[1]=0;
    }
 else {
      ++octets[1];
    }
    octets[2]=2;
  }
 else {
    ++octets[2];
  }
  return "String_Node_Str" + octets[0] + "String_Node_Str"+ octets[1]+ "String_Node_Str"+ octets[2];
}
Program: 150407
Project: 150407
Buggy source:
private void toggle(boolean enabled){
  canCycle=enabled ? null : false;
}

Fixed version (ground truth):
private void toggle(boolean enabled){
  LocalAddressFactory.enabled=enabled;
}
Program: 150409
Project: 150409
Buggy source:
/** 
 * PERMISSIONS 
 */
public boolean vanillaOnlineMode(){
  return !server.options.getBoolean("String_Node_Str") && server.options.getBoolean("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * PERMISSIONS 
 */
public boolean vanillaOnlineMode(){
  return false;
}
Program: 150410
Project: 150410
Buggy source:
@Override public void finalize(){
  timer.cancel();
  cleanLoginRequests();
}

Fixed version (ground truth):
@Override public void finalize(){
  try {
    timer.cancel();
  }
 catch (  Exception e) {
  }
  cleanLoginRequests();
}
Program: 150411
Project: 150411
Buggy source:
@Override public void save(){
  load();
  options.setProperty("String_Node_Str","String_Node_Str");
  if (simpleServerOptions.getBoolean("String_Node_Str")) {
    options.setProperty("String_Node_Str","String_Node_Str");
  }
 else {
    options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  }
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  super.save();
}

Fixed version (ground truth):
@Override public void save(){
  load();
  options.setProperty("String_Node_Str","String_Node_Str");
  options.setProperty("String_Node_Str","String_Node_Str");
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  options.setProperty("String_Node_Str",simpleServerOptions.get("String_Node_Str"));
  super.save();
}
Program: 150412
Project: 150412
Buggy source:
public void handleOutput(String line){
  if (!server.options.getBoolean("String_Node_Str") && line.contains("String_Node_Str")) {
    return;
  }
  Integer[] ports=server.getRobotPorts();
  if (ports != null) {
    for (    Integer port : ports) {
      if (port != null) {
        if (line.contains(port.toString())) {
          server.removeRobotPort(port);
          return;
        }
      }
    }
  }
  if (line.contains("String_Node_Str")) {
synchronized (this) {
      loaded=true;
      notifyAll();
    }
  }
 else   if (line.contains("String_Node_Str") || line.contains("String_Node_Str")) {
    server.setSaving(false);
    if (server.options.getBoolean("String_Node_Str")) {
      server.runCommand("String_Node_Str",t("String_Node_Str"));
    }
  }
 else   if (line.contains("String_Node_Str")) {
    handleError(new Exception(line));
  }
 else   if (line.matches("String_Node_Str")) {
    return;
  }
 else   if (line.contains("String_Node_Str") && server.options.getBoolean("String_Node_Str")) {
    return;
  }
 else {
    Matcher connect=CONNECT.matcher(line);
    if (connect.find()) {
      if (server.bots.ninja(connect.group(1))) {
        return;
      }
    }
 else {
      Matcher disconnect=DISCONNECT.matcher(line);
      if (disconnect.find()) {
        if (server.bots.ninja(disconnect.group(1))) {
          return;
        }
      }
    }
  }
  server.addOutputLine(line);
  System.out.println(line);
}

Fixed version (ground truth):
public void handleOutput(String line){
  if (!server.options.getBoolean("String_Node_Str") && line.contains("String_Node_Str")) {
    return;
  }
  Integer[] ports=server.getRobotPorts();
  if (ports != null) {
    for (    Integer port : ports) {
      if (port != null) {
        if (line.contains(port.toString())) {
          server.removeRobotPort(port);
          return;
        }
      }
    }
  }
  if (ignoreLine()) {
    return;
  }
  if (line.contains("String_Node_Str")) {
synchronized (this) {
      loaded=true;
      notifyAll();
    }
  }
 else   if (line.contains("String_Node_Str") || line.contains("String_Node_Str")) {
    server.setSaving(false);
    if (server.options.getBoolean("String_Node_Str")) {
      server.runCommand("String_Node_Str",t("String_Node_Str"));
    }
  }
 else   if (line.contains("String_Node_Str")) {
    handleError(new Exception(line));
  }
 else   if (line.matches("String_Node_Str")) {
    return;
  }
 else   if (line.contains("String_Node_Str") && server.options.getBoolean("String_Node_Str")) {
    ignoreNextLines(3);
    return;
  }
 else {
    Matcher connect=CONNECT.matcher(line);
    if (connect.find()) {
      if (server.bots.ninja(connect.group(1))) {
        return;
      }
    }
 else {
      Matcher disconnect=DISCONNECT.matcher(line);
      if (disconnect.find()) {
        if (server.bots.ninja(disconnect.group(1))) {
          return;
        }
      }
    }
  }
  server.addOutputLine(line);
  System.out.println(line);
}
Program: 150413
Project: 150413
Buggy source:
private void sendMessagePacket(String message) throws IOException {
  if (message.length() > MESSAGE_SIZE) {
    System.out.println("String_Node_Str" + message);
    return;
  }
  write(0x03);
  write(message);
  packetFinished();
}

Fixed version (ground truth):
private void sendMessagePacket(String message) throws IOException {
  if (message.length() > MESSAGE_SIZE) {
    System.out.println("String_Node_Str" + message);
    return;
  }
  if (message.length() > 0) {
    write(0x03);
    write(message);
    packetFinished();
  }
}
Program: 150414
Project: 150414
Buggy source:
private void sendMessage(String message) throws IOException {
  if (message.length() > MESSAGE_SIZE) {
    int end=MESSAGE_SIZE - 1;
    while (end > 0 && message.charAt(end) != ' ') {
      end--;
    }
    if (end == 0) {
      end=MESSAGE_SIZE;
    }
 else {
      end++;
    }
    if (message.charAt(end) == '\u00a7') {
      end--;
    }
    String firstPart=message.substring(0,end);
    sendMessagePacket(firstPart);
    sendMessage(getLastColorCode(firstPart) + message.substring(end));
  }
 else {
    int end=message.length();
    if (message.charAt(end - 1) == '\u00a7') {
      end--;
    }
    sendMessagePacket(message.substring(0,end));
  }
}

Fixed version (ground truth):
private void sendMessage(String message) throws IOException {
  if (message.length() > 0) {
    if (message.length() > MESSAGE_SIZE) {
      int end=MESSAGE_SIZE - 1;
      while (end > 0 && message.charAt(end) != ' ') {
        end--;
      }
      if (end == 0) {
        end=MESSAGE_SIZE;
      }
 else {
        end++;
      }
      if (end > 0 && message.charAt(end) == '\u00a7') {
        end--;
      }
      String firstPart=message.substring(0,end);
      sendMessagePacket(firstPart);
      sendMessage(getLastColorCode(firstPart) + message.substring(end));
    }
 else {
      int end=message.length();
      if (message.charAt(end - 1) == '\u00a7') {
        end--;
      }
      sendMessagePacket(message.substring(0,end));
    }
  }
}
Program: 150415
Project: 150415
Buggy source:
public void execute(Player player,String message){
  String name=extractArgument(message);
  if (name == null) {
    if (player.isAttemptLock()) {
      player.setAttemptedAction(null);
      player.addTMessage(Color.GRAY,"String_Node_Str");
      return;
    }
 else {
      name="String_Node_Str";
    }
  }
  if (name.equals("String_Node_Str")) {
    Map<String,Integer> list=player.getServer().data.chests.chestList(player);
    if (list.size() == 0) {
      player.addTMessage(Color.GRAY,"String_Node_Str");
    }
 else {
      player.addTMessage(Color.GRAY,"String_Node_Str");
      for (      String current : list.keySet()) {
        player.addMessage(Color.GRAY,list.get(current) + "String_Node_Str" + current);
      }
    }
  }
 else {
    player.addTMessage(Color.GRAY,"String_Node_Str");
    player.setAttemptedAction(Action.Lock);
    player.setChestName(name);
  }
}

Fixed version (ground truth):
public void execute(Player player,String message){
  String name=extractArgument(message);
  if (name == null) {
    if (player.isAttemptLock()) {
      player.setAttemptedAction(null);
      player.addTMessage(Color.GRAY,"String_Node_Str");
      return;
    }
  }
  if (name != null && name.equals("String_Node_Str")) {
    Map<String,Integer> list=player.getServer().data.chests.chestList(player);
    if (list.size() == 0) {
      player.addTMessage(Color.GRAY,"String_Node_Str");
    }
 else {
      player.addTMessage(Color.GRAY,"String_Node_Str");
      for (      String current : list.keySet()) {
        player.addMessage(Color.GRAY,list.get(current) + "String_Node_Str" + current);
      }
    }
  }
 else {
    player.addTMessage(Color.GRAY,"String_Node_Str");
    player.setAttemptedAction(Action.Lock);
    player.setChestName(name);
  }
}
Program: 150416
Project: 150416
Buggy source:
@Override public void load(){
  boolean success=false;
  File inFile=getFile();
  try {
    BufferedReader reader=new BufferedReader(new FileReader(inFile));
    try {
      String line;
      while ((line=reader.readLine()) != null) {
        if (!line.startsWith("String_Node_Str")) {
          loadLine(line);
        }
      }
      success=true;
    }
  finally {
      reader.close();
    }
  }
 catch (  FileNotFoundException e) {
    System.out.println(getFilename() + "String_Node_Str");
    loadDefaults();
    save();
    success=true;
  }
catch (  IOException e) {
    e.printStackTrace();
  }
  if (!success) {
    System.out.println("String_Node_Str" + getFilename() + "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void load(){
  boolean success=false;
  File inFile=getFile();
  try {
    BufferedReader reader=new BufferedReader(new FileReader(inFile));
    try {
      String line;
      while ((line=reader.readLine()) != null) {
        if (!line.startsWith("String_Node_Str")) {
          loadLine(line);
        }
      }
      success=true;
    }
  finally {
      reader.close();
    }
  }
 catch (  FileNotFoundException e) {
    missingFile();
    loadDefaults();
    save();
    success=true;
  }
catch (  IOException e) {
    e.printStackTrace();
  }
  if (!success) {
    System.out.println("String_Node_Str" + getFilename() + "String_Node_Str");
  }
}
Program: 150417
Project: 150417
Buggy source:
@Override public void load(){
  if (layered) {
    properties=(SortedProperties)defaultProperties.clone();
  }
 else {
    properties=new SortedProperties();
  }
  try {
    InputStream stream=new FileInputStream(getFile());
    try {
      properties.load(stream);
    }
  finally {
      stream.close();
    }
  }
 catch (  FileNotFoundException e) {
    System.out.println(getFilename() + "String_Node_Str");
    properties=(SortedProperties)defaultProperties.clone();
    save();
  }
catch (  IOException e) {
    System.out.println("String_Node_Str" + e);
    System.out.println("String_Node_Str" + getFilename());
  }
}

Fixed version (ground truth):
@Override public void load(){
  if (layered) {
    properties=(SortedProperties)defaultProperties.clone();
  }
 else {
    properties=new SortedProperties();
  }
  try {
    InputStream stream=new FileInputStream(getFile());
    try {
      properties.load(stream);
    }
  finally {
      stream.close();
    }
  }
 catch (  FileNotFoundException e) {
    missingFile();
    properties=(SortedProperties)defaultProperties.clone();
    save();
  }
catch (  IOException e) {
    System.out.println("String_Node_Str" + e);
    System.out.println("String_Node_Str" + getFilename());
  }
}
Program: 150420
Project: 150420
Buggy source:
public void removePlayerArea(Player player){
  String name=player.getName().toLowerCase();
  if (!playerHasArea(player)) {
    return;
  }
  String path="String_Node_Str" + escape(name) + "String_Node_Str";
  config.clearTree(path);
  if (config.getList("String_Node_Str").size() == 0) {
    config.addProperty("String_Node_Str","String_Node_Str");
  }
}

Fixed version (ground truth):
public void removePlayerArea(Player player){
  String name=player.getName().toLowerCase();
  if (!playerHasArea(player)) {
    return;
  }
  String path="String_Node_Str" + escape(name) + "String_Node_Str";
  config.clearTree(path);
  if (config.getList("String_Node_Str").size() == 0) {
    config.addProperty("String_Node_Str","String_Node_Str");
  }
  save();
}
Program: 150421
Project: 150421
Buggy source:
public Chest adjacentChest(Coordinate coordinate){
  Chest chest=chestAt(coordinate);
  if (chest == null) {
    chest=chestAt(coordinate.add(1,0,0));
  }
  if (chest == null) {
    chest=chestAt(coordinate.add(-1,0,0));
  }
  if (chest == null) {
    chest=chestAt(coordinate.add(0,0,1));
  }
  if (chest == null) {
    chest=chestAt(coordinate.add(0,0,-1));
  }
  return chest;
}

Fixed version (ground truth):
public Chest adjacentChest(Coordinate coordinate){
  Chest chest=chestAt(coordinate.add(1,0,0));
  if (chest == null) {
    chest=chestAt(coordinate.add(-1,0,0));
  }
  if (chest == null) {
    chest=chestAt(coordinate.add(0,0,1));
  }
  if (chest == null) {
    chest=chestAt(coordinate.add(0,0,-1));
  }
  return chest;
}
Program: 150422
Project: 150422
Buggy source:
public Chest adjacentChest(Coordinate coordinate){
  Chest chest=chestAt(coordinate);
  if (chest == null)   chest=chestAt(coordinate.add(1,0,0));
  if (chest == null)   chest=chestAt(coordinate.add(1,0,0));
  if (chest == null)   chest=chestAt(coordinate.add(1,0,0));
  return chest;
}

Fixed version (ground truth):
public Chest adjacentChest(Coordinate coordinate){
  Chest chest=chestAt(coordinate);
  if (chest == null)   chest=chestAt(coordinate.add(1,0,0));
  if (chest == null)   chest=chestAt(coordinate.add(-1,0,0));
  if (chest == null)   chest=chestAt(coordinate.add(0,0,1));
  if (chest == null)   chest=chestAt(coordinate.add(0,0,-1));
  return chest;
}
Program: 150423
Project: 150423
Buggy source:
public boolean parseCommand(String message){
  if (closed) {
    return true;
  }
  if (message.equals(server.getCommandParser().commandPrefix() + "String_Node_Str"))   message=lastCommand;
  PlayerCommand command=server.getCommandParser().getPlayerCommand(message);
  if (command == null) {
    return false;
  }
  boolean invalidCommand=command.getName() == null;
  if (!invalidCommand && !commandAllowed(command.getName())) {
    addMessage("String_Node_Str");
    return true;
  }
  command.execute(this,message);
  lastCommand=message;
  return !((server.permissions.commandShouldPassThroughToMod(command.getName()) || server.options.getBoolean("String_Node_Str") || invalidCommand) && server.options.contains("String_Node_Str"));
}

Fixed version (ground truth):
public boolean parseCommand(String message){
  if (closed) {
    return true;
  }
  if (message.equals(server.getCommandParser().commandPrefix() + "String_Node_Str"))   message=lastCommand;
  PlayerCommand command=server.getCommandParser().getPlayerCommand(message);
  if (command == null) {
    return false;
  }
  boolean invalidCommand=command.getName() == null;
  if (!invalidCommand && !commandAllowed(command.getName())) {
    addMessage("String_Node_Str");
    return true;
  }
  command.execute(this,message);
  lastCommand=message;
  return !((server.permissions.commandShouldPassThroughToMod(command.getName()) || server.options.getBoolean("String_Node_Str") || invalidCommand|| command instanceof ExternalCommand) && server.options.contains("String_Node_Str"));
}
Program: 150424
Project: 150424
Buggy source:
public boolean parseCommand(String message){
  if (closed) {
    return true;
  }
  if (message.equals(server.getCommandParser().commandPrefix() + "String_Node_Str"))   message=lastCommand;
  PlayerCommand command=server.getCommandParser().getPlayerCommand(message);
  if (command == null) {
    return false;
  }
  boolean invalidCommand=command.getName() == null;
  if (invalidCommand && !commandAllowed(command.getName())) {
    addMessage("String_Node_Str");
    return true;
  }
  command.execute(this,message);
  lastCommand=message;
  return !((server.permissions.commandShouldPassThroughToMod(command.getName()) || server.options.getBoolean("String_Node_Str") || invalidCommand) && server.options.contains("String_Node_Str"));
}

Fixed version (ground truth):
public boolean parseCommand(String message){
  if (closed) {
    return true;
  }
  if (message.equals(server.getCommandParser().commandPrefix() + "String_Node_Str"))   message=lastCommand;
  PlayerCommand command=server.getCommandParser().getPlayerCommand(message);
  if (command == null) {
    return false;
  }
  boolean invalidCommand=command.getName() == null;
  if (!invalidCommand && !commandAllowed(command.getName())) {
    addMessage("String_Node_Str");
    return true;
  }
  command.execute(this,message);
  lastCommand=message;
  return !((server.permissions.commandShouldPassThroughToMod(command.getName()) || server.options.getBoolean("String_Node_Str") || invalidCommand) && server.options.contains("String_Node_Str"));
}
Program: 150425
Project: 150425
Buggy source:
private void copyUnknownBlob() throws IOException {
  byte unknown=in.readByte();
  write(unknown);
  while (unknown != 0x7f) {
    int type=(unknown & 0xE0) >> 5;
switch (type) {
case 0:
      write(in.readByte());
    break;
case 1:
  write(in.readShort());
break;
case 2:
write(in.readInt());
break;
case 3:
write(in.readFloat());
break;
case 4:
write(in.readUTF());
break;
case 5:
write(in.readShort());
write(in.readByte());
write(in.readShort());
}
unknown=in.readByte();
write(unknown);
}
}

Fixed version (ground truth):
private void copyUnknownBlob() throws IOException {
  byte unknown=in.readByte();
  write(unknown);
  while (unknown != 0x7f) {
    int type=(unknown & 0xE0) >> 5;
switch (type) {
case 0:
      write(in.readByte());
    break;
case 1:
  write(in.readShort());
break;
case 2:
write(in.readInt());
break;
case 3:
write(in.readFloat());
break;
case 4:
write(readUTF16());
break;
case 5:
write(in.readShort());
write(in.readByte());
write(in.readShort());
}
unknown=in.readByte();
write(unknown);
}
}
Program: 150426
Project: 150426
Buggy source:
private void sendMessage(String message) throws IOException {
  write(0x03);
  write(message);
  packetFinished();
}

Fixed version (ground truth):
private void sendMessage(String message) throws IOException {
}