Program: 78343
Project: 78343
Buggy source:
private Connection connectToSsh(ComputeEngineComputer computer,TaskListener listener) throws Exception {
  final long timeout=computer.getNode().getLaunchTimeoutMillis();
  final long startTime=System.currentTimeMillis();
  while (true) {
    try {
      long waitTime=System.currentTimeMillis() - startTime;
      if (timeout > 0 && waitTime > timeout) {
        throw new Exception("String_Node_Str" + (waitTime / 1000) + "String_Node_Str"+ (timeout / 1000)+ "String_Node_Str");
      }
      Instance instance=computer.refreshInstance();
      String host="String_Node_Str";
      NetworkInterface nic=instance.getNetworkInterfaces().get(0);
      if (nic.getAccessConfigs() != null) {
        for (        AccessConfig ac : nic.getAccessConfigs()) {
          if (ac.getType().equals(InstanceConfiguration.NAT_TYPE)) {
            host=ac.getNatIP();
          }
        }
      }
      if (host.isEmpty()) {
        host=nic.getNetworkIP();
      }
      int port=SSH_PORT;
      logInfo(computer,listener,"String_Node_Str" + host + "String_Node_Str"+ port+ "String_Node_Str"+ SSH_TIMEOUT+ "String_Node_Str");
      Connection conn=new Connection(host,port);
      ProxyConfiguration proxyConfig=Jenkins.getInstance().proxy;
      Proxy proxy=proxyConfig == null ? Proxy.NO_PROXY : proxyConfig.createProxy(host);
      if (!proxy.equals(Proxy.NO_PROXY) && proxy.address() instanceof InetSocketAddress) {
        InetSocketAddress address=(InetSocketAddress)proxy.address();
        HTTPProxyData proxyData=null;
        if (null != proxyConfig.getUserName()) {
          proxyData=new HTTPProxyData(address.getHostName(),address.getPort(),proxyConfig.getUserName(),proxyConfig.getPassword());
        }
 else {
          proxyData=new HTTPProxyData(address.getHostName(),address.getPort());
        }
        conn.setProxyData(proxyData);
        logInfo(computer,listener,"String_Node_Str");
      }
      conn.connect(new ServerHostKeyVerifier(){
        public boolean verifyServerHostKey(        String hostname,        int port,        String serverHostKeyAlgorithm,        byte[] serverHostKey) throws Exception {
          return true;
        }
      }
,SSH_TIMEOUT,SSH_TIMEOUT);
      logInfo(computer,listener,"String_Node_Str");
      return conn;
    }
 catch (    IOException e) {
      logInfo(computer,listener,"String_Node_Str" + e.getMessage());
      logInfo(computer,listener,"String_Node_Str");
      Thread.sleep(5000);
    }
  }
}

Fixed version (ground truth):
private Connection connectToSsh(ComputeEngineComputer computer,TaskListener listener) throws Exception {
  ComputeEngineInstance node=computer.getNode();
  if (node == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long timeout=node.getLaunchTimeoutMillis();
  final long startTime=System.currentTimeMillis();
  while (true) {
    try {
      long waitTime=System.currentTimeMillis() - startTime;
      if (timeout > 0 && waitTime > timeout) {
        throw new Exception("String_Node_Str" + (waitTime / 1000) + "String_Node_Str"+ (timeout / 1000)+ "String_Node_Str");
      }
      Instance instance=computer.refreshInstance();
      String host="String_Node_Str";
      NetworkInterface nic=instance.getNetworkInterfaces().get(0);
      if (nic.getAccessConfigs() != null) {
        for (        AccessConfig ac : nic.getAccessConfigs()) {
          if (ac.getType().equals(InstanceConfiguration.NAT_TYPE)) {
            host=ac.getNatIP();
          }
        }
      }
      if (host.isEmpty()) {
        host=nic.getNetworkIP();
      }
      int port=SSH_PORT;
      logInfo(computer,listener,"String_Node_Str" + host + "String_Node_Str"+ port+ "String_Node_Str"+ SSH_TIMEOUT+ "String_Node_Str");
      Connection conn=new Connection(host,port);
      ProxyConfiguration proxyConfig=Jenkins.getInstance().proxy;
      Proxy proxy=proxyConfig == null ? Proxy.NO_PROXY : proxyConfig.createProxy(host);
      if (!proxy.equals(Proxy.NO_PROXY) && proxy.address() instanceof InetSocketAddress) {
        InetSocketAddress address=(InetSocketAddress)proxy.address();
        HTTPProxyData proxyData=null;
        if (null != proxyConfig.getUserName()) {
          proxyData=new HTTPProxyData(address.getHostName(),address.getPort(),proxyConfig.getUserName(),proxyConfig.getPassword());
        }
 else {
          proxyData=new HTTPProxyData(address.getHostName(),address.getPort());
        }
        conn.setProxyData(proxyData);
        logInfo(computer,listener,"String_Node_Str");
      }
      conn.connect(new ServerHostKeyVerifier(){
        public boolean verifyServerHostKey(        String hostname,        int port,        String serverHostKeyAlgorithm,        byte[] serverHostKey) throws Exception {
          return true;
        }
      }
,SSH_TIMEOUT,SSH_TIMEOUT);
      logInfo(computer,listener,"String_Node_Str");
      return conn;
    }
 catch (    IOException e) {
      logInfo(computer,listener,"String_Node_Str" + e.getMessage());
      logInfo(computer,listener,"String_Node_Str");
      Thread.sleep(5000);
    }
  }
}