nus-yam/ex-repair huggingface dataset:
Program: 150428
Project: 150428
Buggy source:
@Override public void run(){
  try {
    while (run) {
      lastRead=System.currentTimeMillis();
      try {
        handlePacket();
        if (isServerTunnel) {
          while (player.hasMessages()) {
            sendMessage(player.getMessage());
          }
        }
        flushAll();
      }
 catch (      IOException e) {
        if (run && !player.isRobot()) {
          System.out.println("String_Node_Str" + e);
          System.out.println("String_Node_Str" + streamType + "String_Node_Str"+ player.getIPAddress());
        }
        break;
      }
    }
    try {
      if (player.isKicked()) {
        kick(player.getKickMsg());
      }
      flushAll();
    }
 catch (    IOException e) {
    }
  }
  finally {
    if (EXPENSIVE_DEBUG_LOGGING) {
      inputDumper.cleanup();
      outputDumper.cleanup();
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    while (run) {
      lastRead=System.currentTimeMillis();
      try {
        handlePacket();
        if (isServerTunnel) {
          while (player.hasMessages()) {
            sendMessage(player.getMessage());
          }
        }
        flushAll();
      }
 catch (      IOException e) {
        if (run && !player.isRobot()) {
          System.out.println("String_Node_Str" + e);
          System.out.println("String_Node_Str" + streamType + "String_Node_Str"+ player.getIPAddress());
          e.printStackTrace();
        }
        break;
      }
    }
    try {
      if (player.isKicked()) {
        kick(player.getKickMsg());
      }
      flushAll();
    }
 catch (    IOException e) {
    }
  }
  finally {
    if (EXPENSIVE_DEBUG_LOGGING) {
      inputDumper.cleanup();
      outputDumper.cleanup();
    }
  }
}
Program: 150429
Project: 150429
Buggy source:
public boolean ownsLock(Player player,int x,byte y,int z){
  Coordinate coordinate=new Coordinate(x,y,z);
  Chest chest=locations.get(coordinate);
  return (chest != null) && (chest.owner == player.getName() || chest.isOpen());
}

Fixed version (ground truth):
public boolean ownsLock(Player player,int x,byte y,int z){
  Coordinate coordinate=new Coordinate(x,y,z);
  Chest chest=locations.get(coordinate);
  return (chest != null) && (chest.owner.toLowerCase().equals(player.getName().toLowerCase()) || chest.isOpen());
}
Program: 150430
Project: 150430
Buggy source:
@Override public void execute(Player player,String message){
  player.handleVisitRequests();
}

Fixed version (ground truth):
public void execute(Player player,String message){
  player.handleVisitRequests();
}
Program: 150431
Project: 150431
Buggy source:
private void freeze(int time){
  if (!frozen) {
    frozen=true;
    timer=new Timer();
    timer.schedule(new TimeFreezer(this,time),0,DELAY);
    player.addMessage("String_Node_Str");
  }
}

Fixed version (ground truth):
private void freeze(int time){
  if (!frozen) {
    frozen=true;
    timer=new Timer();
    int delay=DELAY;
    if (time == DAY) {
      delay=DELAY_DAY;
    }
 else     if (time == NIGHT) {
      delay=DELAY_NIGHT;
    }
    timer.schedule(new TimeFreezer(this,time),0,delay);
    player.addMessage("String_Node_Str");
  }
}
Program: 150432
Project: 150432
Buggy source:
public void execute(Player player,String message){
  server=player.getServer();
  this.player=player;
  String[] arguments=extractArguments(message);
  if (arguments.length == 0) {
    setTime(0);
    player.addMessage("String_Node_Str");
  }
 else   if (arguments.length >= 1) {
    String argument=arguments[0];
    int time=0;
    if (argument.equals("String_Node_Str"))     time=DAY;
 else     if (argument.equals("String_Node_Str"))     time=NIGHT;
 else {
      try {
        time=Integer.parseInt(argument);
      }
 catch (      NumberFormatException e) {
        player.addMessage("String_Node_Str");
        return;
      }
      if (time < 0 || time > 23999) {
        player.addMessage("String_Node_Str");
        return;
      }
    }
    if (arguments.length < 2)     setTime(time);
    if (arguments.length >= 2) {
      argument=arguments[1];
      if (argument.equals("String_Node_Str")) {
        freeze(time);
      }
 else       if (argument.equals("String_Node_Str")) {
        unfreeze();
      }
 else {
        player.addMessage("String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
public void execute(Player player,String message){
  server=player.getServer();
  this.player=player;
  String[] arguments=extractArguments(message);
  if (arguments.length == 0) {
    usage();
  }
 else   if (arguments.length >= 1) {
    String argument=arguments[0];
    int time=0;
    if (argument.equals("String_Node_Str")) {
      time=DAY;
    }
 else     if (argument.equals("String_Node_Str")) {
      time=NIGHT;
    }
 else     if (argument.equals("String_Node_Str") || argument.equals("String_Node_Str")) {
      player.addMessage("String_Node_Str");
      usage();
      return;
    }
 else     if (argument.equals("String_Node_Str")) {
      unfreeze();
      return;
    }
 else {
      try {
        time=Integer.parseInt(argument);
      }
 catch (      NumberFormatException e) {
        player.addMessage("String_Node_Str");
        usage();
        return;
      }
      if (time < 0 || time > 23999) {
        player.addMessage("String_Node_Str");
        return;
      }
    }
    unfreeze();
    if (arguments.length < 2)     setTime(time);
    if (arguments.length >= 2) {
      argument=arguments[1];
      if (argument.equals("String_Node_Str")) {
        freeze(time);
      }
 else {
        player.addMessage("String_Node_Str");
      }
    }
  }
}
Program: 150433
Project: 150433
Buggy source:
private void kickAllPlayers(){
  String message="String_Node_Str";
  if (restart) {
    message="String_Node_Str";
  }
  for (  Player p : playerList.getArray()) {
    p.kick(message);
  }
}

Fixed version (ground truth):
private void kickAllPlayers(){
  String message="String_Node_Str";
  if (restart) {
    message="String_Node_Str";
  }
  for (  Player player : playerList.getArray()) {
    player.kick(message);
  }
}
Program: 150435
Project: 150435
Buggy source:
public boolean setName(String name){
  name=name.trim();
  if (name.length() == 0 || this.name != null) {
    kick("String_Node_Str");
    return false;
  }
  if (server.options.getBoolean("String_Node_Str") && !server.whitelist.isWhitelisted(name)) {
    kick("String_Node_Str");
    return false;
  }
  this.name=name;
  updateGroup();
  watchdog.setName("String_Node_Str" + name);
  server.connectionLog("String_Node_Str",extsocket,name);
  server.playerList.addPlayer(this);
  return true;
}

Fixed version (ground truth):
public boolean setName(String name){
  name=name.trim();
  if (name.length() == 0 || this.name != null) {
    kick("String_Node_Str");
    return false;
  }
  if (server.options.getBoolean("String_Node_Str") && !server.whitelist.isWhitelisted(name)) {
    kick("String_Node_Str");
    return false;
  }
  if (server.playerList.findPlayerExact(name) != null) {
    kick("String_Node_Str");
    return false;
  }
  this.name=name;
  updateGroup();
  watchdog.setName("String_Node_Str" + name);
  server.connectionLog("String_Node_Str",extsocket,name);
  server.playerList.addPlayer(this);
  return true;
}
Program: 150436
Project: 150436
Buggy source:
public void close(){
  serverToClient.stop();
  clientToServer.stop();
}

Fixed version (ground truth):
public void close(){
  if (serverToClient != null) {
    serverToClient.stop();
  }
  if (clientToServer != null) {
    clientToServer.stop();
  }
  if (name != null) {
    server.playerList.removePlayer(this);
    name=null;
  }
}
Program: 150437
Project: 150437
Buggy source:
private void cleanup(){
  if (!closed) {
    closed=true;
    entityId=0;
    if (serverToClient != null) {
      serverToClient.stop();
    }
    if (clientToServer != null) {
      clientToServer.stop();
    }
    if (name != null) {
      server.playerList.removePlayer(this);
    }
    try {
      extsocket.close();
    }
 catch (    IOException e) {
    }
    try {
      intsocket.close();
    }
 catch (    IOException e) {
    }
    if (!isRobot) {
      System.out.println("String_Node_Str" + extsocket.getInetAddress().getHostAddress());
    }
  }
}

Fixed version (ground truth):
private void cleanup(){
  if (!closed) {
    closed=true;
    entityId=0;
    close();
    try {
      extsocket.close();
    }
 catch (    IOException e) {
    }
    try {
      intsocket.close();
    }
 catch (    IOException e) {
    }
    if (!isRobot) {
      System.out.println("String_Node_Str" + extsocket.getInetAddress().getHostAddress());
    }
  }
}
Program: 150438
Project: 150438
Buggy source:
@Override public void run(){
  try {
    while (run) {
      lastRead=System.currentTimeMillis();
      try {
        handlePacket();
        if (isServerTunnel) {
          while (player.hasMessages()) {
            sendMessage(player.getMessage());
          }
        }
        flushAll();
      }
 catch (      IOException e) {
        if (run) {
          e.printStackTrace();
          System.out.println(streamType + "String_Node_Str" + player.getName());
        }
        break;
      }
    }
    try {
      if (player.isKicked()) {
        kick(player.getKickMsg());
      }
      flushAll();
    }
 catch (    IOException e) {
    }
  }
  finally {
    if (EXPENSIVE_DEBUG_LOGGING) {
      inputDumper.cleanup();
      outputDumper.cleanup();
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    while (run) {
      lastRead=System.currentTimeMillis();
      try {
        handlePacket();
        if (isServerTunnel) {
          while (player.hasMessages()) {
            sendMessage(player.getMessage());
          }
        }
        flushAll();
      }
 catch (      IOException e) {
        if (run) {
          e.printStackTrace();
          System.out.println(streamType + "String_Node_Str" + player.getIPAddress());
        }
        break;
      }
    }
    try {
      if (player.isKicked()) {
        kick(player.getKickMsg());
      }
      flushAll();
    }
 catch (    IOException e) {
    }
  }
  finally {
    if (EXPENSIVE_DEBUG_LOGGING) {
      inputDumper.cleanup();
      outputDumper.cleanup();
    }
  }
}
Program: 150439
Project: 150439
Buggy source:
protected void loadDefaults(){
  defaultOptions=new Properties();
  InputStream stream=getClass().getResourceAsStream(resourceLocation + "String_Node_Str" + filename);
  try {
    try {
      defaultOptions.load(stream);
    }
  finally {
      stream.close();
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
    System.out.println("String_Node_Str" + filename);
  }
  options=new Properties(defaultOptions);
}

Fixed version (ground truth):
protected void loadDefaults(){
  defaultOptions=new Properties();
  InputStream stream=getClass().getResourceAsStream(resourceLocation + "String_Node_Str" + filename);
  try {
    try {
      defaultOptions.load(stream);
    }
  finally {
      stream.close();
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
    System.out.println("String_Node_Str" + filename);
  }
  options=(Properties)defaultOptions.clone();
}
Program: 150440
Project: 150440
Buggy source:
public void load(){
  options=new Properties(defaultOptions);
  File file=new File(filename);
  try {
    InputStream stream=new FileInputStream(file);
    try {
      options.load(stream);
    }
  finally {
      stream.close();
    }
  }
 catch (  FileNotFoundException e) {
    missingFile();
  }
catch (  IOException e) {
    e.printStackTrace();
    System.out.println("String_Node_Str" + filename);
  }
}

Fixed version (ground truth):
public void load(){
  options=(Properties)defaultOptions.clone();
  File file=new File(filename);
  try {
    InputStream stream=new FileInputStream(file);
    try {
      options.load(stream);
    }
  finally {
      stream.close();
    }
  }
 catch (  FileNotFoundException e) {
    missingFile();
  }
catch (  IOException e) {
    e.printStackTrace();
    System.out.println("String_Node_Str" + filename);
  }
}
Program: 150441
Project: 150441
Buggy source:
@Override protected void loadDefaults(){
}

Fixed version (ground truth):
@Override protected void loadDefaults(){
  defaultOptions=new Properties();
}
Program: 150442
Project: 150442
Buggy source:
@Override public void save(){
  options=new Properties();
  options.setProperty("String_Node_Str",simpleServerOptions.get("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"));
  super.save();
}

Fixed version (ground truth):
@Override public void save(){
  load();
  options=new Properties();
  options.setProperty("String_Node_Str",simpleServerOptions.get("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"));
  super.save();
}
Program: 150443
Project: 150443
Buggy source:
public static void main(String[] args){
  Serial4JArduino device=null;
  try {
    String serialPort="String_Node_Str";
    if (args.length == 1) {
      serialPort=args[0];
    }
 else {
      serialPort=Serial4JArduino.selectSerialPort();
    }
    device=new Serial4JArduino(serialPort);
    InteractiveJArduinoDataControllerClientAdvanced controller=new InteractiveJArduinoDataControllerClientAdvanced();
    device.register(controller);
    controller.register(device);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    device.close();
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  Serial4JArduino device=null;
  String serialPort=null;
  try {
    if (args.length == 1) {
      serialPort=args[0];
    }
 else {
      serialPort=Serial4JArduino.selectSerialPort();
    }
    InteractiveJArduinoDataControllerClientAdvanced controller=new InteractiveJArduinoDataControllerClientAdvanced();
    if (serialPort != null) {
      device=new Serial4JArduino(serialPort);
      device.register(controller);
      controller.register(device);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    if (device != null) {
      device.close();
    }
  }
}
Program: 150444
Project: 150444
Buggy source:
public void serialEvent(SerialPortEvent arg0){
  int data;
  try {
    while ((data=in.read()) > -1) {
      if (state == RCV_WAIT) {
        if (data == START_BYTE) {
          state=RCV_MSG;
          buffer_idx=0;
        }
      }
 else       if (state == RCV_MSG) {
        if (data == ESCAPE_BYTE) {
          state=RCV_ESC;
        }
 else         if (data == STOP_BYTE) {
          byte[] packet=new byte[buffer_idx];
          for (int i=0; i < buffer_idx; i++)           packet[i]=buffer[i];
          for (          JArduinoObserver o : observers) {
            o.receiveMsg(packet);
          }
          state=RCV_WAIT;
        }
 else         if (data == START_BYTE) {
          state=RCV_MSG;
          buffer_idx=0;
        }
 else {
          buffer[buffer_idx]=(byte)data;
          buffer_idx++;
        }
      }
 else       if (state == RCV_ESC) {
        buffer[buffer_idx]=(byte)data;
        buffer_idx++;
        state=RCV_MSG;
      }
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void serialEvent(SerialPortEvent arg0){
  int data;
  try {
    while ((data=in.read()) > -1) {
      if (state == RCV_WAIT) {
        if (data == START_BYTE) {
          state=RCV_MSG;
          buffer_idx=0;
        }
      }
 else       if (state == RCV_MSG) {
        if (data == ESCAPE_BYTE) {
          state=RCV_ESC;
        }
 else         if (data == STOP_BYTE) {
          byte[] packet=new byte[buffer_idx];
          for (int i=0; i < buffer_idx; i++) {
            packet[i]=buffer[i];
          }
          for (          JArduinoObserver o : observers) {
            o.receiveMsg(packet);
          }
          state=RCV_WAIT;
        }
 else         if (data == START_BYTE) {
          state=RCV_MSG;
          buffer_idx=0;
        }
 else {
          buffer[buffer_idx]=(byte)data;
          buffer_idx++;
        }
      }
 else       if (state == RCV_ESC) {
        buffer[buffer_idx]=(byte)data;
        buffer_idx++;
        state=RCV_MSG;
      }
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 150445
Project: 150445
Buggy source:
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=SerialSelectorGUI.selectSerialPort();
  }
  JArduino arduino=new ToneKeyKeyboard(serialPort);
  arduino.runArduinoProcess();
}

Fixed version (ground truth):
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=Serial4JArduino.selectSerialPort();
  }
  JArduino arduino=new ToneKeyKeyboard(serialPort);
  arduino.runArduinoProcess();
}
Program: 150446
Project: 150446
Buggy source:
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=SerialSelectorGUI.selectSerialPort();
  }
  JArduino arduino=new AnalogInOutSerial(serialPort);
  arduino.runArduinoProcess();
}

Fixed version (ground truth):
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=Serial4JArduino.selectSerialPort();
  }
  JArduino arduino=new AnalogInOutSerial(serialPort);
  arduino.runArduinoProcess();
}
Program: 150447
Project: 150447
Buggy source:
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=SerialSelectorGUI.selectSerialPort();
  }
  JArduino arduino=new AnalogInput(serialPort);
  arduino.runArduinoProcess();
}

Fixed version (ground truth):
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=Serial4JArduino.selectSerialPort();
  }
  JArduino arduino=new AnalogInput(serialPort);
  arduino.runArduinoProcess();
}
Program: 150448
Project: 150448
Buggy source:
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=SerialSelectorGUI.selectSerialPort();
  }
  JArduino arduino=new Blink(serialPort);
  arduino.runArduinoProcess();
}

Fixed version (ground truth):
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=Serial4JArduino.selectSerialPort();
  }
  JArduino arduino=new Blink(serialPort);
  arduino.runArduinoProcess();
}
Program: 150449
Project: 150449
Buggy source:
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=SerialSelectorGUI.selectSerialPort();
  }
  JArduino arduino=new Ping(serialPort);
  arduino.runArduinoProcess();
}

Fixed version (ground truth):
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=Serial4JArduino.selectSerialPort();
  }
  JArduino arduino=new Ping(serialPort);
  arduino.runArduinoProcess();
}
Program: 150450
Project: 150450
Buggy source:
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=SerialSelectorGUI.selectSerialPort();
  }
  JArduino arduino=new SimpleInterrupt(serialPort);
  arduino.runArduinoProcess();
}

Fixed version (ground truth):
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=Serial4JArduino.selectSerialPort();
  }
  JArduino arduino=new SimpleInterrupt(serialPort);
  arduino.runArduinoProcess();
}
Program: 150451
Project: 150451
Buggy source:
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=SerialSelectorGUI.selectSerialPort();
  }
  JArduino arduino=new Button(serialPort);
  arduino.runArduinoProcess();
}

Fixed version (ground truth):
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=Serial4JArduino.selectSerialPort();
  }
  JArduino arduino=new Button(serialPort);
  arduino.runArduinoProcess();
}
Program: 150452
Project: 150452
Buggy source:
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=SerialSelectorGUI.selectSerialPort();
  }
  JArduino arduino=new StateChangeDetection(serialPort);
  arduino.runArduinoProcess();
}

Fixed version (ground truth):
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=Serial4JArduino.selectSerialPort();
  }
  JArduino arduino=new StateChangeDetection(serialPort);
  arduino.runArduinoProcess();
}
Program: 150453
Project: 150453
Buggy source:
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=SerialSelectorGUI.selectSerialPort();
  }
  JArduino arduino=new ToneKeyboard(serialPort);
  arduino.runArduinoProcess();
}

Fixed version (ground truth):
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=Serial4JArduino.selectSerialPort();
  }
  JArduino arduino=new ToneKeyboard(serialPort);
  arduino.runArduinoProcess();
}
Program: 150454
Project: 150454
Buggy source:
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=SerialSelectorGUI.selectSerialPort();
  }
  JArduino arduino=new ToneMelody(serialPort);
  arduino.runArduinoProcess();
}

Fixed version (ground truth):
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=Serial4JArduino.selectSerialPort();
  }
  JArduino arduino=new ToneMelody(serialPort);
  arduino.runArduinoProcess();
}
Program: 150455
Project: 150455
Buggy source:
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=SerialSelectorGUI.selectSerialPort();
  }
  JArduino arduino=new ToneMultiple(serialPort);
  arduino.runArduinoProcess();
}

Fixed version (ground truth):
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=Serial4JArduino.selectSerialPort();
  }
  JArduino arduino=new ToneMultiple(serialPort);
  arduino.runArduinoProcess();
}
Program: 150456
Project: 150456
Buggy source:
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=SerialSelectorGUI.selectSerialPort();
  }
  JArduino arduino=new TonePitchFollower(serialPort);
  arduino.runArduinoProcess();
}

Fixed version (ground truth):
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=Serial4JArduino.selectSerialPort();
  }
  JArduino arduino=new TonePitchFollower(serialPort);
  arduino.runArduinoProcess();
}
Program: 150457
Project: 150457
Buggy source:
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=SerialSelectorGUI.selectSerialPort();
  }
  Serial4JArduino device=null;
  try {
    device=new Serial4JArduino(serialPort);
    InteractiveJArduinoDataControllerClient controller2=new InteractiveJArduinoDataControllerClient();
    device.register(controller2);
    controller2.register(device);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    device.close();
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  String serialPort;
  if (args.length == 1) {
    serialPort=args[0];
  }
 else {
    serialPort=Serial4JArduino.selectSerialPort();
  }
  Serial4JArduino device=null;
  try {
    device=new Serial4JArduino(serialPort);
    InteractiveJArduinoDataControllerClient controller2=new InteractiveJArduinoDataControllerClient();
    device.register(controller2);
    controller2.register(device);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    device.close();
  }
}
Program: 150458
Project: 150458
Buggy source:
/** 
 * Return a List of Objects from a single table column given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...).
 * @param sqlKey The SQL Key found in a properties file corresponding to the desired SQL statement value
 * @param params The replacement parameters
 * @param columnType The Class of the desired return Objects matching the table
 * @return The Column as a List
 * @throws SQLStatementNotFoundException if an SQL statement could not be found for the given sqlKey String
 */
public static <T>List<T> queryColumnSQLKey(String sqlKey,String columnName,Class<T> columnType,Object[] params){
  String sql=YANK_POOL_MANAGER.getMergedSqlProperties().getProperty(sqlKey);
  if (sql == null || sql.equalsIgnoreCase("String_Node_Str")) {
    throw new SQLStatementNotFoundException();
  }
 else {
    return queryBeanList(sql,columnType,params);
  }
}

Fixed version (ground truth):
/** 
 * Return a List of Objects from a single table column given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...).
 * @param sqlKey The SQL Key found in a properties file corresponding to the desired SQL statement value
 * @param params The replacement parameters
 * @param columnType The Class of the desired return Objects matching the table
 * @return The Column as a List
 * @throws SQLStatementNotFoundException if an SQL statement could not be found for the given sqlKey String
 */
public static <T>List<T> queryColumnSQLKey(String sqlKey,String columnName,Class<T> columnType,Object[] params){
  String sql=YANK_POOL_MANAGER.getMergedSqlProperties().getProperty(sqlKey);
  if (sql == null || sql.equalsIgnoreCase("String_Node_Str")) {
    throw new SQLStatementNotFoundException();
  }
 else {
    return queryColumn(sql,columnName,columnType,params);
  }
}
Program: 150459
Project: 150459
Buggy source:
/** 
 * Return just one scalar given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...). If more than one row match the query, only the first row is returned.
 * @param sqlKey The SQL Key found in a properties file corresponding to the desired SQL statement value
 * @param scalarType The Class of the desired return scalar matching the table
 * @param params The replacement parameters
 * @return The Object
 * @throws SQLStatementNotFoundException if an SQL statement could not be found for the given sqlKey String
 */
public static <T>T queryScalarSQLKey(String sqlKey,Class<T> scalarType,Object[] params){
  String sql=YANK_POOL_MANAGER.getMergedSqlProperties().getProperty(sqlKey);
  if (sql == null || sql.equalsIgnoreCase("String_Node_Str")) {
    throw new SQLStatementNotFoundException();
  }
 else {
    return queryBean(sql,scalarType,params);
  }
}

Fixed version (ground truth):
/** 
 * Return just one scalar given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...). If more than one row match the query, only the first row is returned.
 * @param sqlKey The SQL Key found in a properties file corresponding to the desired SQL statement value
 * @param scalarType The Class of the desired return scalar matching the table
 * @param params The replacement parameters
 * @return The Object
 * @throws SQLStatementNotFoundException if an SQL statement could not be found for the given sqlKey String
 */
public static <T>T queryScalarSQLKey(String sqlKey,Class<T> scalarType,Object[] params){
  String sql=YANK_POOL_MANAGER.getMergedSqlProperties().getProperty(sqlKey);
  if (sql == null || sql.equalsIgnoreCase("String_Node_Str")) {
    throw new SQLStatementNotFoundException();
  }
 else {
    return queryScalar(sql,scalarType,params);
  }
}
Program: 150460
Project: 150460
Buggy source:
/** 
 * Init method without a MYSQL_SQL.properties file
 * @param dbProperties
 */
public void init(Properties dbProperties){
  logger.info("String_Node_Str");
  if (dbProperties == null) {
    logger.error("String_Node_Str");
  }
  sqlProperties=new Properties();
  loadDriver(dbProperties);
  createPools(dbProperties);
}

Fixed version (ground truth):
/** 
 * Init method without a MYSQL_SQL.properties file
 * @param dbProperties
 */
public void init(Properties dbProperties){
  logger.info("String_Node_Str");
  if (dbProperties == null) {
    logger.error("String_Node_Str");
  }
  this.sqlProperties=new Properties();
  createPools(dbProperties);
}
Program: 150461
Project: 150461
Buggy source:
/** 
 * Returns an open connection. If no one is available, and the max number of connections has not been reached, a new connection is created.
 * @param poolName The pool name as defined in the properties file
 * @return Connection, the connection or null
 */
public Connection getConnection(String poolName){
  DBConnectionPool pool=pools.get(poolName);
  if (pool != null) {
    return pool.getConnection();
  }
 else {
    logger.error("String_Node_Str" + poolName);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns an open connection. If no one is available, and the max number of connections has not been reached, a new connection is created.
 * @param poolName The pool name as defined in the properties file
 * @return Connection, the connection or null if the number of connections in use exceeds the max allowed connections
 */
public Connection getConnection(String poolName){
  DBConnectionPool pool=pools.get(poolName);
  if (pool != null) {
    return pool.getConnection();
  }
 else {
    logger.error("String_Node_Str" + poolName);
    return null;
  }
}
Program: 150463
Project: 150463
Buggy source:
/** 
 * Closes all open connections and deregisters all drivers.
 */
public synchronized void release(){
  logger.info("String_Node_Str");
  Set<String> allPools=pools.keySet();
  for (Iterator<String> iterator=allPools.iterator(); iterator.hasNext(); ) {
    String poolName=iterator.next();
    logger.debug("String_Node_Str" + poolName + "String_Node_Str");
    pools.get(poolName).release();
  }
  try {
    DriverManager.deregisterDriver(jdbcDriver);
  }
 catch (  SQLException e) {
    logger.error("String_Node_Str" + jdbcDriver.getClass().getName(),e);
  }
  logger.info("String_Node_Str" + jdbcDriver.getClass().getName());
}

Fixed version (ground truth):
/** 
 * Closes all open connections
 */
public synchronized void release(){
  logger.info("String_Node_Str");
  Set<String> allPools=pools.keySet();
  for (Iterator<String> iterator=allPools.iterator(); iterator.hasNext(); ) {
    String poolName=iterator.next();
    logger.debug("String_Node_Str" + poolName + "String_Node_Str");
    pools.get(poolName).release();
  }
}
Program: 150464
Project: 150464
Buggy source:
/** 
 * Checks out a connection from the pool. If no free connection is available, a new connection is created unless the max number of connections has been reached. If a free connection has been closed by the database, it's removed from the pool and this method is called again recursively.
 */
public synchronized Connection getConnection(){
  Connection con=null;
  if (freeConnections.size() > 0) {
    con=freeConnections.firstElement();
    freeConnections.removeElementAt(0);
    try {
      if (con.isClosed()) {
        logger.debug("String_Node_Str");
        con=getConnection();
      }
    }
 catch (    SQLException e) {
      logger.debug("String_Node_Str",e);
      con=getConnection();
    }
  }
 else   if (maxConn == 0 || checkedOut < maxConn) {
    con=newConnection();
  }
  if (con != null) {
    checkedOut++;
  }
  logger.trace("String_Node_Str" + checkedOut);
  return con;
}

Fixed version (ground truth):
/** 
 * * Checks out a connection from the pool. If no free connection is available, a new connection is created unless the max number of connections has been reached. If a free connection has been closed by the database, it is removed from the pool and this method is called again recursively.
 * @return a Connection, null if pool size has been exceeded
 */
public synchronized Connection getConnection(){
  Connection connection=null;
  if (pool.size() > 0) {
    connection=pool.firstElement();
    pool.removeElementAt(0);
    try {
      if (connection.isClosed()) {
        logger.debug("String_Node_Str");
        connection=getConnection();
      }
    }
 catch (    SQLException e) {
      logger.debug("String_Node_Str",e);
      connection=getConnection();
    }
  }
 else   if (maxConn == 0 || checkedOut < maxConn) {
    connection=newConnection();
  }
  if (connection != null) {
    checkedOut++;
  }
  logger.trace("String_Node_Str" + checkedOut);
  return connection;
}
Program: 150465
Project: 150465
Buggy source:
/** 
 * Checks in a connection to the pool. Notify other Threads that may be waiting for a connection.
 * @param con The connection to check in
 */
public synchronized void freeConnection(Connection con){
  freeConnections.addElement(con);
  checkedOut--;
  notifyAll();
}

Fixed version (ground truth):
/** 
 * Checks in a connection to the pool. Notify other Threads that may be waiting for a connection.
 * @param con The connection to check in
 */
public synchronized void freeConnection(Connection con){
  if (con != null) {
    pool.addElement(con);
    checkedOut--;
    notifyAll();
  }
}
Program: 150466
Project: 150466
Buggy source:
/** 
 * Closes all available connections.
 */
public synchronized void release(){
  Enumeration<Connection> allConnections=freeConnections.elements();
  while (allConnections.hasMoreElements()) {
    logger.debug("String_Node_Str");
    Connection con=allConnections.nextElement();
    try {
      con.close();
      logger.debug("String_Node_Str");
    }
 catch (    SQLException e) {
      logger.error("String_Node_Str",e);
    }
catch (    Exception e) {
      logger.error("String_Node_Str",e);
    }
  }
  freeConnections.removeAllElements();
}

Fixed version (ground truth):
/** 
 * Closes all available connections.
 */
public synchronized void release(){
  Enumeration<Connection> allConnections=pool.elements();
  while (allConnections.hasMoreElements()) {
    logger.debug("String_Node_Str");
    Connection con=allConnections.nextElement();
    try {
      con.close();
      logger.debug("String_Node_Str");
    }
 catch (    SQLException e) {
      logger.error("String_Node_Str",e);
    }
catch (    Exception e) {
      logger.error("String_Node_Str",e);
    }
  }
  pool.removeAllElements();
  checkedOut=0;
}
Program: 150467
Project: 150467
Buggy source:
/** 
 * Loads a Properties file from the classpath matching the given file name
 * @param pFileName
 * @return
 */
public static Properties getPropertiesFromClasspath(String pFileName){
  Properties props=new Properties();
  try {
    props.load(ClassLoader.getSystemResourceAsStream(pFileName));
  }
 catch (  IOException e) {
    logger.error("String_Node_Str",e);
  }
  return props;
}

Fixed version (ground truth):
/** 
 * Loads a Properties file from the classpath matching the given file name
 * @param fileName
 * @return
 */
public static Properties getPropertiesFromClasspath(String fileName){
  Properties props=new Properties();
  try {
    InputStream is=ClassLoader.getSystemResourceAsStream(fileName);
    if (is == null) {
      is=Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName);
      logger.debug("String_Node_Str");
    }
    props.load(is);
  }
 catch (  IOException e) {
    logger.error("String_Node_Str",e);
  }
catch (  NullPointerException e) {
    logger.error("String_Node_Str",e);
  }
  return props;
}
Program: 150468
Project: 150468
Buggy source:
/** 
 * Loads a Properties file from the given file name
 * @param pFileName
 * @return
 */
public static Properties getPropertiesFromPath(String pFileName){
  Properties props=new Properties();
  FileInputStream fis;
  try {
    fis=new FileInputStream(pFileName);
    props.load(fis);
    fis.close();
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
  }
  return props;
}

Fixed version (ground truth):
/** 
 * Loads a Properties file from the given file name
 * @param fileName
 * @return
 */
public static Properties getPropertiesFromPath(String fileName){
  Properties props=new Properties();
  FileInputStream fis;
  try {
    fis=new FileInputStream(fileName);
    props.load(fis);
    fis.close();
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
  }
  return props;
}
Program: 150469
Project: 150469
Buggy source:
public void compile() throws Exception {
  LifecycleManager.getDefault().saveAll();
  for (  CoffeeScriptDataObject dataObject : data) {
    ProgressHandle handle=handle=ProgressHandleFactory.createHandle("String_Node_Str" + dataObject.getPrimaryFile().getNameExt(),this);
    try {
      handle.start();
      CoffeeScriptCompiler.CompilerResult result=CoffeeScriptSettings.getCompiler().compile(dataObject.getPrimaryFile().asText(),bare);
      if (result == null) {
        return;
      }
      if (result.getJs() != null) {
        FileObject folder=dataObject.getFolder().getPrimaryFile();
        FileObject file=folder.getFileObject(dataObject.getName(),"String_Node_Str");
        if (file != null) {
          file.delete();
        }
        file=folder.createData(dataObject.getName(),"String_Node_Str");
        file.getOutputStream().write(result.getJs().getBytes());
      }
 else {
      }
      handleResult(result);
    }
  finally {
      handle.finish();
    }
  }
}

Fixed version (ground truth):
public void compile() throws Exception {
  LifecycleManager.getDefault().saveAll();
  for (  CoffeeScriptDataObject coffeeFile : data) {
    ProgressHandle handle=ProgressHandleFactory.createHandle("String_Node_Str" + coffeeFile.getPrimaryFile().getNameExt(),this);
    try {
      handle.start();
      CoffeeScriptCompiler.CompilerResult result=CoffeeScriptSettings.getCompiler().compile(coffeeFile.getPrimaryFile().asText(),bare);
      if (result == null) {
        return;
      }
      if (result.getJs() != null) {
        CoffeeScriptUtils.writeJSForCoffeeScriptFile(result.getJs(),coffeeFile.getPrimaryFile());
      }
      handleResult(result);
    }
  finally {
      handle.finish();
    }
  }
}
Program: 150470
Project: 150470
Buggy source:
public void run(final CoffeeScriptParser.ParsingResult result,SchedulerEvent event){
  if ((result != null) && !CoffeeScriptAutocompileContext.get().isEnabled(result.getSnapshot().getSource().getFileObject())) {
    return;
  }
  if ((result != null) && (result.getCompilerResult() != null) && (result.getCompilerResult().getJs() != null)) {
    final FileObject coffeeFile=result.getSnapshot().getSource().getFileObject();
    final String js=result.getCompilerResult().getJs();
    try {
      FileObject folder=coffeeFile.getParent();
      FileObject file=folder.getFileObject(coffeeFile.getName(),"String_Node_Str");
      if (file == null) {
        file=folder.createData(coffeeFile.getName(),"String_Node_Str");
      }
      if (!file.asText().equals(js)) {
        OutputStream out=file.getOutputStream();
        try {
          out.write(js.getBytes(FileEncodingQuery.getEncoding(coffeeFile)));
          out.flush();
        }
  finally {
          if (out != null) {
            out.close();
          }
        }
      }
    }
 catch (    Exception e) {
      Exceptions.printStackTrace(e);
    }
  }
}

Fixed version (ground truth):
public void run(final CoffeeScriptParser.ParsingResult result,SchedulerEvent event){
  if ((result != null) && !CoffeeScriptAutocompileContext.get().isEnabled(result.getSnapshot().getSource().getFileObject())) {
    return;
  }
  if ((result != null) && (result.getCompilerResult() != null) && (result.getCompilerResult().getJs() != null)) {
    FileObject coffeeFile=result.getSnapshot().getSource().getFileObject();
    String js=result.getCompilerResult().getJs();
    CoffeeScriptUtils.writeJSForCoffeeScriptFile(js,coffeeFile);
  }
}
Program: 150472
Project: 150472
Buggy source:
@Override public void keyPressed(KeyEvent e){
  boolean isControlDown=e.isControlDown();
  boolean isShiftDown=e.isShiftDown();
switch (e.getKeyCode()) {
case KeyEvent.VK_P:
    if (isControlDown && isShiftDown) {
      int position=RSyntaxUtilities.getMatchingBracketPosition(SqlTextArea.this);
      if (position >= 0) {
        setCaretPosition(position + 1);
      }
    }
  break;
case KeyEvent.VK_F:
if (isControlDown && isShiftDown) {
  formatSelection();
}
break;
}
}

Fixed version (ground truth):
@Override public void keyPressed(KeyEvent e){
  boolean isControlDown=e.isControlDown();
  boolean isShiftDown=e.isShiftDown();
switch (e.getKeyCode()) {
case KeyEvent.VK_P:
    if (isControlDown && isShiftDown) {
      int position=RSyntaxUtilities.getMatchingBracketPosition(SqlTextArea.this,null).y;
      if (position >= 0) {
        setCaretPosition(position + 1);
      }
    }
  break;
case KeyEvent.VK_F:
if (isControlDown && isShiftDown) {
  formatSelection();
}
break;
}
}
Program: 150473
Project: 150473
Buggy source:
public SqlTextArea(){
  setTabSize(2);
  setTabsEmulated(true);
  setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_SQL);
  setMarkOccurrences(true);
  setAnimateBracketMatching(false);
  setAutoIndentEnabled(true);
  setCurrentLineHighlightColor(new Color(232,242,254));
  setMarkOccurrencesColor(new Color(220,220,220));
  setMatchedBracketBGColor(null);
  setMatchedBracketBorderColor(new Color(192,192,192));
  getActionMap().put("String_Node_Str",new RSyntaxTextAreaEditorKit.CopyAsRtfAction());
  Font editorFont=UIManager.getFont("String_Node_Str");
  editorFont=new Font("String_Node_Str",editorFont.getStyle(),editorFont.getSize());
  SyntaxScheme syntaxScheme=getSyntaxScheme();
  syntaxScheme.setStyle(Token.SEPARATOR,new Style(new Color(200,0,0),null));
  syntaxScheme.setStyle(Token.RESERVED_WORD,new Style(Color.BLUE,null,editorFont));
  setFont(editorFont);
  addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent e){
      boolean isControlDown=e.isControlDown();
      boolean isShiftDown=e.isShiftDown();
switch (e.getKeyCode()) {
case KeyEvent.VK_P:
        if (isControlDown && isShiftDown) {
          int position=RSyntaxUtilities.getMatchingBracketPosition(SqlTextArea.this);
          if (position >= 0) {
            setCaretPosition(position + 1);
          }
        }
      break;
case KeyEvent.VK_F:
    if (isControlDown && isShiftDown) {
      formatSelection();
    }
  break;
}
}
}
);
}

Fixed version (ground truth):
public SqlTextArea(){
  setTabSize(2);
  setTabsEmulated(true);
  setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_SQL);
  setMarkOccurrences(true);
  setAnimateBracketMatching(false);
  setAutoIndentEnabled(true);
  setCurrentLineHighlightColor(new Color(232,242,254));
  setMarkOccurrencesColor(new Color(220,220,220));
  setMatchedBracketBGColor(null);
  setMatchedBracketBorderColor(new Color(192,192,192));
  getActionMap().put("String_Node_Str",new RSyntaxTextAreaEditorKit.CopyAsRtfAction());
  Font editorFont=UIManager.getFont("String_Node_Str");
  editorFont=new Font("String_Node_Str",editorFont.getStyle(),editorFont.getSize());
  SyntaxScheme syntaxScheme=getSyntaxScheme();
  syntaxScheme.setStyle(Token.SEPARATOR,new Style(new Color(200,0,0),null));
  syntaxScheme.setStyle(Token.RESERVED_WORD,new Style(Color.BLUE,null,editorFont));
  setFont(editorFont);
  addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent e){
      boolean isControlDown=e.isControlDown();
      boolean isShiftDown=e.isShiftDown();
switch (e.getKeyCode()) {
case KeyEvent.VK_P:
        if (isControlDown && isShiftDown) {
          int position=RSyntaxUtilities.getMatchingBracketPosition(SqlTextArea.this,null).y;
          if (position >= 0) {
            setCaretPosition(position + 1);
          }
        }
      break;
case KeyEvent.VK_F:
    if (isControlDown && isShiftDown) {
      formatSelection();
    }
  break;
}
}
}
);
}
Program: 150474
Project: 150474
Buggy source:
@Override public final Map<String,Object> fetchOneMap(){
  return fetchOne().intoMap();
}

Fixed version (ground truth):
@Override public final Map<String,Object> fetchOneMap(){
  R record=fetchOne();
  return record == null ? null : record.intoMap();
}
Program: 150475
Project: 150475
Buggy source:
@Override protected final void prepare(ExecuteContext ctx) throws SQLException {
  if (resultSetConcurrency != 0 || resultSetType != 0 || resultSetHoldability != 0) {
    ctx.statement(ctx.connection().prepareStatement(ctx.sql(),resultSetType != 0 ? resultSetType : ResultSet.TYPE_FORWARD_ONLY,resultSetConcurrency != 0 ? resultSetConcurrency : ResultSet.CONCUR_READ_ONLY,resultSetHoldability != 0 ? resultSetHoldability : ctx.connection().getHoldability()));
  }
 else   if (isForUpdate() && asList(CUBRID,SQLSERVER).contains(ctx.configuration().dialect())) {
    ctx.data(DATA_LOCK_ROWS_FOR_UPDATE,true);
    ctx.statement(ctx.connection().prepareStatement(ctx.sql(),TYPE_SCROLL_SENSITIVE,CONCUR_UPDATABLE));
  }
 else {
    ctx.statement(ctx.connection().prepareStatement(ctx.sql()));
  }
  if (size != 0) {
    if (log.isDebugEnabled())     log.debug("String_Node_Str",size);
    ctx.statement().setFetchSize(size);
  }
  if (maxRows != 0) {
    ctx.statement().setMaxRows(maxRows);
  }
}

Fixed version (ground truth):
@Override protected final void prepare(ExecuteContext ctx) throws SQLException {
  if (resultSetConcurrency != 0 || resultSetType != 0 || resultSetHoldability != 0) {
    int type=resultSetType != 0 ? resultSetType : ResultSet.TYPE_FORWARD_ONLY;
    int concurrency=resultSetConcurrency != 0 ? resultSetConcurrency : ResultSet.CONCUR_READ_ONLY;
    if (resultSetHoldability == 0) {
      ctx.statement(ctx.connection().prepareStatement(ctx.sql(),type,concurrency));
    }
 else {
      ctx.statement(ctx.connection().prepareStatement(ctx.sql(),type,concurrency,resultSetHoldability));
    }
  }
 else   if (isForUpdate() && asList(CUBRID,SQLSERVER).contains(ctx.configuration().dialect())) {
    ctx.data(DATA_LOCK_ROWS_FOR_UPDATE,true);
    ctx.statement(ctx.connection().prepareStatement(ctx.sql(),TYPE_SCROLL_SENSITIVE,CONCUR_UPDATABLE));
  }
 else {
    ctx.statement(ctx.connection().prepareStatement(ctx.sql()));
  }
  if (size != 0) {
    if (log.isDebugEnabled())     log.debug("String_Node_Str",size);
    ctx.statement().setFetchSize(size);
  }
  if (maxRows != 0) {
    ctx.statement().setMaxRows(maxRows);
  }
}
Program: 150476
Project: 150476
Buggy source:
@BeforeClass public static void start() throws Exception {
  Class.forName("String_Node_Str");
  connection=DriverManager.getConnection("String_Node_Str","String_Node_Str","String_Node_Str");
  create=new Executor(connection,SQLDialect.H2);
}

Fixed version (ground truth):
@BeforeClass public static void start() throws Exception {
  Class.forName("String_Node_Str");
  connection=DriverManager.getConnection("String_Node_Str","String_Node_Str","String_Node_Str");
  create=DSL.using(connection,SQLDialect.H2);
}
Program: 150477
Project: 150477
Buggy source:
@BeforeClass public static void start() throws Exception {
  Class.forName("String_Node_Str");
  connection=DriverManager.getConnection("String_Node_Str","String_Node_Str","String_Node_Str");
  create=new Executor(connection,SQLDialect.H2);
}

Fixed version (ground truth):
@BeforeClass public static void start() throws Exception {
  Class.forName("String_Node_Str");
  connection=DriverManager.getConnection("String_Node_Str","String_Node_Str","String_Node_Str");
  create=DSL.using(connection,SQLDialect.H2);
}