Program: 134769
Project: 134769
Buggy source:
/** 
 * Creates a new RemoteThreadsMonitor with the given command line args
 * @param args The command line arguments.
 */
public RemoteThreadsMonitor(String[] args){
  if (args.length == 1) {
    boolean isNumber=true;
    boolean isHost=true;
    int pid=0;
    InetAddress remoteHost=null;
    try {
      pid=Integer.valueOf(args[0]);
    }
 catch (    NumberFormatException e) {
      isNumber=false;
    }
    try {
      remoteHost=InetAddress.getByName(args[0]);
    }
 catch (    UnknownHostException e) {
      isHost=false;
    }
    if (isNumber) {
      try {
        rtc=new RemoteThreadsClient(pid);
      }
 catch (      RemoteThreadsException e) {
        System.err.println("String_Node_Str");
        e.printStackTrace();
        System.exit(1);
      }
    }
 else     if (isHost) {
      try {
        rtc=new RemoteThreadsClient(remoteHost);
      }
 catch (      RemoteThreadsException e) {
        System.err.println("String_Node_Str");
        e.printStackTrace();
        System.exit(1);
      }
    }
 else {
      try {
        rtc=new RemoteThreadsClient(args[0]);
      }
 catch (      RemoteThreadsException e) {
        System.err.println("String_Node_Str");
        e.printStackTrace();
        System.exit(1);
      }
    }
  }
 else   if (args.length == 2) {
    try {
      InetAddress remoteHost=null;
      try {
        remoteHost=InetAddress.getByName(args[0]);
      }
 catch (      UnknownHostException e) {
        System.err.println("String_Node_Str" + args[0]);
        System.exit(1);
      }
      rtc=new RemoteThreadsClient(remoteHost,Integer.valueOf(args[1]).intValue());
    }
 catch (    NumberFormatException e) {
      System.err.println("String_Node_Str");
      e.printStackTrace();
      System.exit(1);
    }
catch (    RemoteThreadsException e) {
      System.err.println("String_Node_Str");
      e.printStackTrace();
      System.exit(1);
    }
  }
  if (rtc.connect()) {
    System.out.println("String_Node_Str");
  }
 else {
    System.err.println("String_Node_Str");
    System.exit(1);
  }
}

Fixed version (ground truth):
/** 
 * Creates a new RemoteThreadsMonitor with the given command line args
 * @param args The command line arguments.
 */
public RemoteThreadsMonitor(String[] args){
  if (args.length == 1) {
    boolean isNumber=true;
    boolean isHost=true;
    int pid=0;
    InetAddress remoteHost=null;
    try {
      pid=Integer.valueOf(args[0]);
    }
 catch (    NumberFormatException e) {
      isNumber=false;
    }
    try {
      remoteHost=InetAddress.getByName(args[0]);
    }
 catch (    UnknownHostException e) {
      isHost=false;
    }
    if (isNumber) {
      try {
        rtc=new RemoteThreadsClient(pid);
      }
 catch (      RemoteThreadsException e) {
        System.err.println("String_Node_Str");
        e.printStackTrace();
        System.exit(1);
      }
    }
 else     if (isHost) {
      try {
        rtc=new RemoteThreadsClient(remoteHost);
      }
 catch (      RemoteThreadsException e) {
        System.err.println("String_Node_Str");
        e.printStackTrace();
        System.exit(1);
      }
    }
 else {
      try {
        rtc=new RemoteThreadsClient(args[0]);
      }
 catch (      RemoteThreadsException e) {
        System.err.println("String_Node_Str");
        e.printStackTrace();
        System.exit(1);
      }
    }
  }
 else   if (args.length == 2) {
    try {
      InetAddress remoteHost=null;
      try {
        remoteHost=InetAddress.getByName(args[0]);
      }
 catch (      UnknownHostException e) {
        System.err.println("String_Node_Str" + args[0]);
        System.exit(1);
      }
      rtc=new RemoteThreadsClient(remoteHost,Integer.valueOf(args[1]).intValue());
    }
 catch (    NumberFormatException e) {
      System.err.println("String_Node_Str");
      e.printStackTrace();
      System.exit(1);
    }
catch (    RemoteThreadsException e) {
      System.err.println("String_Node_Str");
      e.printStackTrace();
      System.exit(1);
    }
  }
  if (rtc != null && rtc.connect()) {
    System.out.println("String_Node_Str");
  }
 else {
    System.err.println("String_Node_Str");
    System.exit(1);
  }
}