Program: 97242
Project: 97242
Buggy source:
private IHostTestEnvironment start(IServiceConnector serviceSideConnector,ITestEnvironmentServiceConfig config,PropertyParamter propertyParameter,TestEnvironmentFactory factory,String environmentFactoryClass) throws Exception {
  if (service != null) {
    throw new OseeStateException("String_Node_Str");
  }
  this.serviceSideConnector=serviceSideConnector;
  System.out.printf("String_Node_Str",InetAddress.getLocalHost().getHostAddress(),Integer.parseInt(System.getProperty("String_Node_Str")));
  brokerService=new BrokerService();
  String strUri;
  try {
    String addressAsString=getAddress();
    if (brokerPort <= 0) {
      brokerPort=getServerPort();
    }
    strUri=String.format("String_Node_Str",addressAsString,brokerPort);
    try {
      brokerService.addConnector(strUri);
      OseeLog.log(getClass(),Level.INFO,"String_Node_Str" + strUri);
    }
 catch (    Exception e) {
      OseeLog.log(getClass(),Level.SEVERE,"String_Node_Str" + strUri,e);
      strUri="String_Node_Str";
    }
  }
 catch (  Exception e) {
    OseeLog.log(getClass(),Level.SEVERE,"String_Node_Str",e);
    strUri="String_Node_Str";
  }
  Thread.currentThread().setContextClassLoader(ExportClassLoader.getInstance());
  brokerService.setEnableStatistics(false);
  brokerService.setBrokerName("String_Node_Str");
  brokerService.setPersistent(false);
  brokerService.setUseJmx(false);
  brokerService.start();
  URI uri=new URI(strUri);
  System.out.printf("String_Node_Str",strUri);
  nodeInfo=new NodeInfo("String_Node_Str",uri);
  EnvironmentCreationParameter environmentCreationParameter=new EnvironmentCreationParameter(runtimeLibraryManager,nodeInfo,serviceSideConnector,config,factory,environmentFactoryClass);
  service=new OteService(runtimeLibraryManager,environmentCreationParameter,oteSessions,propertyParameter,serviceSideConnector.getProperties());
  serviceSideConnector.init(service);
  if (propertyParameter.isLocalConnector() || propertyParameter.useJiniLookup()) {
    connectionService.addConnector(serviceSideConnector);
  }
  if (!propertyParameter.isLocalConnector()) {
    String masterURIStr=System.getProperty("String_Node_Str");
    if (masterURIStr != null) {
      try {
        messageService.get(nodeInfo).subscribe(OteBaseMessages.RequestOteHost,listenForHostRequest,this);
        masterURI=new URI(masterURIStr);
        oteServerEntry=createOTEServer(nodeInfo,environmentCreationParameter,propertyParameter,service.getServiceID().toString());
        lookupRegistration=new LookupRegistration(masterURI,masterServer,oteServerEntry,service);
        taskToCancel=executor.scheduleAtFixedRate(lookupRegistration,0,30,TimeUnit.SECONDS);
      }
 catch (      Throwable th) {
        OseeLog.log(getClass(),Level.SEVERE,th);
      }
    }
 else {
      OseeLog.log(getClass(),Level.SEVERE,"String_Node_Str");
    }
  }
 else {
    serviceSideConnector.setProperty("String_Node_Str",nodeInfo);
  }
  FrameworkUtil.getBundle(getClass()).getBundleContext().registerService(IHostTestEnvironment.class,service,null);
  return service;
}

Fixed version (ground truth):
private IHostTestEnvironment start(IServiceConnector serviceSideConnector,ITestEnvironmentServiceConfig config,PropertyParamter propertyParameter,TestEnvironmentFactory factory,String environmentFactoryClass) throws Exception {
  if (service != null) {
    throw new OseeStateException("String_Node_Str");
  }
  this.serviceSideConnector=serviceSideConnector;
  if (System.getProperty("String_Node_Str") == null) {
    System.out.println("String_Node_Str");
  }
 else {
    System.out.printf("String_Node_Str",InetAddress.getLocalHost().getHostAddress(),Integer.parseInt(System.getProperty("String_Node_Str")));
  }
  brokerService=new BrokerService();
  String strUri;
  try {
    String addressAsString=getAddress();
    if (brokerPort <= 0) {
      brokerPort=getServerPort();
    }
    strUri=String.format("String_Node_Str",addressAsString,brokerPort);
    try {
      brokerService.addConnector(strUri);
      OseeLog.log(getClass(),Level.INFO,"String_Node_Str" + strUri);
    }
 catch (    Exception e) {
      OseeLog.log(getClass(),Level.SEVERE,"String_Node_Str" + strUri,e);
      strUri="String_Node_Str";
    }
  }
 catch (  Exception e) {
    OseeLog.log(getClass(),Level.SEVERE,"String_Node_Str",e);
    strUri="String_Node_Str";
  }
  Thread.currentThread().setContextClassLoader(ExportClassLoader.getInstance());
  brokerService.setEnableStatistics(false);
  brokerService.setBrokerName("String_Node_Str");
  brokerService.setPersistent(false);
  brokerService.setUseJmx(false);
  brokerService.start();
  URI uri=new URI(strUri);
  System.out.printf("String_Node_Str",strUri);
  nodeInfo=new NodeInfo("String_Node_Str",uri);
  EnvironmentCreationParameter environmentCreationParameter=new EnvironmentCreationParameter(runtimeLibraryManager,nodeInfo,serviceSideConnector,config,factory,environmentFactoryClass);
  service=new OteService(runtimeLibraryManager,environmentCreationParameter,oteSessions,propertyParameter,serviceSideConnector.getProperties());
  serviceSideConnector.init(service);
  if (propertyParameter.isLocalConnector() || propertyParameter.useJiniLookup()) {
    connectionService.addConnector(serviceSideConnector);
  }
  if (!propertyParameter.isLocalConnector()) {
    String masterURIStr=System.getProperty("String_Node_Str");
    if (masterURIStr != null) {
      try {
        messageService.get(nodeInfo).subscribe(OteBaseMessages.RequestOteHost,listenForHostRequest,this);
        masterURI=new URI(masterURIStr);
        oteServerEntry=createOTEServer(nodeInfo,environmentCreationParameter,propertyParameter,service.getServiceID().toString());
        lookupRegistration=new LookupRegistration(masterURI,masterServer,oteServerEntry,service);
        taskToCancel=executor.scheduleAtFixedRate(lookupRegistration,0,30,TimeUnit.SECONDS);
      }
 catch (      Throwable th) {
        OseeLog.log(getClass(),Level.SEVERE,th);
      }
    }
 else {
      OseeLog.log(getClass(),Level.SEVERE,"String_Node_Str");
    }
  }
 else {
    serviceSideConnector.setProperty("String_Node_Str",nodeInfo);
  }
  FrameworkUtil.getBundle(getClass()).getBundleContext().registerService(IHostTestEnvironment.class,service,null);
  return service;
}