Program: 111551
Project: 111551
Buggy source:
public void run(){
  CConn cc=null;
  Socket sock=null;
  if (via.getValueStr() != null) {
    StringParameter gatewayHost=new StringParameter("String_Node_Str","String_Node_Str","String_Node_Str");
    StringParameter remoteHost=new StringParameter("String_Node_Str","String_Node_Str","String_Node_Str");
    IntParameter localPort=new IntParameter("String_Node_Str","String_Node_Str",TcpSocket.findFreeTcpPort());
    IntParameter remotePort=new IntParameter("String_Node_Str","String_Node_Str",5900);
    if (vncServerName.getValueStr() == null)     usage();
    interpretViaParam(gatewayHost,remoteHost,remotePort,vncServerName,localPort);
    createTunnel(gatewayHost.getValueStr(),remoteHost.getValueStr(),remotePort.getValue(),localPort.getValue());
  }
  if (listenMode.getValue()) {
    int port=5500;
    if (vncServerName.getValue() != null && Character.isDigit(vncServerName.getValue().charAt(0)))     port=Integer.parseInt(vncServerName.getValue());
    TcpListener listener=null;
    try {
      listener=new TcpListener(null,port);
    }
 catch (    java.lang.Exception e) {
      System.out.println(e.toString());
      System.exit(1);
    }
    vlog.info("String_Node_Str" + port);
    while (true) {
      sock=listener.accept();
      if (sock != null)       break;
    }
  }
  try {
    cc=new CConn(this,sock,vncServerName.getValue());
    while (true)     cc.processMsg();
  }
 catch (  EndOfStream e) {
    vlog.info(e.toString());
  }
catch (  java.lang.Exception e) {
    if (cc != null)     cc.deleteWindow();
    if (cc == null || !cc.shuttingDown) {
      e.printStackTrace();
      JOptionPane.showMessageDialog(null,e.toString(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    }
  }
  if (cc != null)   cc.deleteWindow();
  nViewers--;
  if (!applet && nViewers == 0) {
    System.exit(0);
  }
}

Fixed version (ground truth):
public void run(){
  CConn cc=null;
  Socket sock=null;
  if (via.getValueStr() != null) {
    StringParameter gatewayHost=new StringParameter("String_Node_Str","String_Node_Str","String_Node_Str");
    StringParameter remoteHost=new StringParameter("String_Node_Str","String_Node_Str","String_Node_Str");
    IntParameter localPort=new IntParameter("String_Node_Str","String_Node_Str",TcpSocket.findFreeTcpPort());
    IntParameter remotePort=new IntParameter("String_Node_Str","String_Node_Str",5900);
    if (vncServerName.getValueStr() == null)     usage();
    interpretViaParam(gatewayHost,remoteHost,remotePort,vncServerName,localPort);
    createTunnel(gatewayHost.getValueStr(),remoteHost.getValueStr(),remotePort.getValue(),localPort.getValue());
  }
  if (listenMode.getValue()) {
    int port=5500;
    if (vncServerName.getValue() != null && Character.isDigit(vncServerName.getValue().charAt(0)))     port=Integer.parseInt(vncServerName.getValue());
    TcpListener listener=null;
    try {
      listener=new TcpListener(null,port);
    }
 catch (    java.lang.Exception e) {
      System.out.println(e.toString());
      System.exit(1);
    }
    vlog.info("String_Node_Str" + port);
    while (true) {
      sock=listener.accept();
      if (sock != null)       break;
    }
  }
  try {
    cc=new CConn(this,sock,vncServerName.getValue());
    while (!stop)     cc.processMsg();
    if (nViewers > 1) {
      cc=null;
      return;
    }
  }
 catch (  EndOfStream e) {
    vlog.info(e.toString());
  }
catch (  java.lang.Exception e) {
    if (cc != null)     cc.deleteWindow();
    if (cc == null || !cc.shuttingDown) {
      e.printStackTrace();
      JOptionPane.showMessageDialog(null,e.toString(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    }
  }
  if (cc != null)   cc.deleteWindow();
  nViewers--;
  if (!applet && nViewers == 0) {
    System.exit(0);
  }
}