Program: 48769
Project: 48769
Buggy source:
private ServiceContents(long genCount) throws Exception {
  this.genCount=genCount;
  long startNanos=System.nanoTime();
  String sessionTicket=loginAndGetSessionTicket();
  ManagedObjectReference svcRef=new ManagedObjectReference();
  boolean done=false;
  svcRef.setType("String_Node_Str");
  svcRef.setValue("String_Node_Str");
  try {
    initVmomiClient();
    instance=vmomiClient.createStub(ServiceInstance.class,svcRef);
    instanceContent=instance.retrieveContent();
    sessionManager=vmomiClient.createStub(SessionManager.class,instanceContent.getSessionManager());
    if (sessionTicket != null) {
      try {
        sessionManager.loginBySessionTicket(sessionTicket);
      }
 catch (      Exception e) {
        logger.error("String_Node_Str",e);
        throw e;
      }
    }
 else     if (userName != null) {
      logger.info("String_Node_Str");
      sessionManager.login(userName,password,locale);
    }
 else {
      throw VcException.LOGIN_ERROR();
    }
    fileManager=getManagedObject(instanceContent.getFileManager());
    vmdkManager=getManagedObject(instanceContent.getVirtualDiskManager());
    taskManager=getManagedObject(instanceContent.getTaskManager());
    ovfManager=getManagedObject(instanceContent.getOvfManager());
    perfManager=getManagedObject(instanceContent.getPerfManager());
    optionManager=getManagedObject(instanceContent.getSetting());
    propertyCollector=getManagedObject(instanceContent.getPropertyCollector());
    extensionManager=getManagedObject(instanceContent.getExtensionManager());
    logger.info("String_Node_Str" + Thread.currentThread().getName() + "String_Node_Str"+ serviceName+ "String_Node_Str"+ genCount+ "String_Node_Str"+ TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNanos)+ "String_Node_Str");
    done=true;
  }
  finally {
    if (!done) {
      cleanup();
    }
  }
}

Fixed version (ground truth):
private ServiceContents(long genCount) throws Exception {
  this.genCount=genCount;
  long startNanos=System.nanoTime();
  String sessionTicket=loginAndGetSessionTicket();
  ManagedObjectReference svcRef=new ManagedObjectReference();
  boolean done=false;
  svcRef.setType("String_Node_Str");
  svcRef.setValue("String_Node_Str");
  try {
    initVmomiClient();
    instance=vmomiClient.createStub(ServiceInstance.class,svcRef);
    instanceContent=instance.retrieveContent();
    sessionManager=vmomiClient.createStub(SessionManager.class,instanceContent.getSessionManager());
    if (sessionTicket != null) {
      try {
        sessionManager.loginBySessionTicket(sessionTicket);
      }
 catch (      Exception e) {
        logger.error("String_Node_Str",e);
        throw e;
      }
    }
 else     if (userName != null) {
      logger.info("String_Node_Str");
      sessionManager.login(userName,password,locale);
    }
 else {
      throw VcException.LOGIN_ERROR();
    }
    fileManager=getManagedObject(instanceContent.getFileManager());
    vmdkManager=getManagedObject(instanceContent.getVirtualDiskManager());
    taskManager=getManagedObject(instanceContent.getTaskManager());
    ovfManager=getManagedObject(instanceContent.getOvfManager());
    perfManager=getManagedObject(instanceContent.getPerfManager());
    optionManager=getManagedObject(instanceContent.getSetting());
    propertyCollector=getManagedObject(instanceContent.getPropertyCollector());
    extensionManager=getManagedObject(instanceContent.getExtensionManager());
    alarmManager=getManagedObject(instanceContent.getAlarmManager());
    logger.info("String_Node_Str" + Thread.currentThread().getName() + "String_Node_Str"+ serviceName+ "String_Node_Str"+ genCount+ "String_Node_Str"+ TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNanos)+ "String_Node_Str");
    done=true;
  }
  finally {
    if (!done) {
      cleanup();
    }
  }
}