Program: 59366
Project: 59366
Buggy source:
/** 
 * Publish JAX-WS server side endpoint.
 */
public void publishEndpoint(EndpointBuilder endpointBuilder){
  checkArgument(endpointBuilder != null,"String_Node_Str");
  Endpoint endpoint=Endpoint.publish(endpointBuilder.getPath(),endpointBuilder.getService());
  if (endpointBuilder.isMtomEnabled()) {
    ((SOAPBinding)endpoint.getBinding()).setMTOMEnabled(true);
  }
  org.apache.cxf.endpoint.Endpoint cxfendpoint=null;
  ServerRegistry sr=bus.getExtension(org.apache.cxf.endpoint.ServerRegistry.class);
  for (  Server s : sr.getServers()) {
    Class<?> endpointClass=((Class)s.getEndpoint().getService().get("String_Node_Str"));
    if (endpointBuilder.getService().getClass().getName().equals(endpointClass.getName()) || (endpointClass.isInterface() && endpointClass.isAssignableFrom(endpointBuilder.getService().getClass()))) {
      cxfendpoint=s.getEndpoint();
      break;
    }
  }
  if (cxfendpoint == null) {
    throw new RuntimeException("String_Node_Str" + endpointBuilder.getService().getClass().getSimpleName() + "String_Node_Str"+ "String_Node_Str");
  }
  Invoker invoker=cxfendpoint.getService().getInvoker();
  ValidatorFactory vf=Validation.buildDefaultValidatorFactory();
  invoker=this.createValidatingInvoker(invoker,vf.getValidator());
  if (endpointBuilder.getSessionFactory() != null) {
    invoker=unitOfWorkInvokerBuilder.create(endpointBuilder.getService(),invoker,endpointBuilder.getSessionFactory());
    cxfendpoint.getService().setInvoker(invoker);
  }
  invoker=instrumentedInvokerBuilder.create(endpointBuilder.getService(),invoker);
  cxfendpoint.getService().setInvoker(invoker);
  if (endpointBuilder.getAuthentication() != null) {
    BasicAuthenticationInterceptor basicAuthInterceptor=this.createBasicAuthenticationInterceptor();
    basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication());
    cxfendpoint.getInInterceptors().add(basicAuthInterceptor);
  }
  if (endpointBuilder.getCxfInInterceptors() != null) {
    cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors());
  }
  if (endpointBuilder.getCxfInFaultInterceptors() != null) {
    cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors());
  }
  if (endpointBuilder.getCxfOutInterceptors() != null) {
    cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors());
  }
  if (endpointBuilder.getCxfOutFaultInterceptors() != null) {
    cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors());
  }
}

Fixed version (ground truth):
/** 
 * Publish JAX-WS server side endpoint.
 */
public void publishEndpoint(EndpointBuilder endpointBuilder){
  checkArgument(endpointBuilder != null,"String_Node_Str");
  EndpointImpl cxfendpoint=new EndpointImpl(bus,endpointBuilder.getService());
  cxfendpoint.publish(endpointBuilder.getPath());
  if (endpointBuilder.isMtomEnabled()) {
    ((SOAPBinding)cxfendpoint.getBinding()).setMTOMEnabled(true);
  }
  Invoker invoker=cxfendpoint.getService().getInvoker();
  ValidatorFactory vf=Validation.buildDefaultValidatorFactory();
  invoker=this.createValidatingInvoker(invoker,vf.getValidator());
  if (endpointBuilder.getSessionFactory() != null) {
    invoker=unitOfWorkInvokerBuilder.create(endpointBuilder.getService(),invoker,endpointBuilder.getSessionFactory());
    cxfendpoint.getService().setInvoker(invoker);
  }
  invoker=instrumentedInvokerBuilder.create(endpointBuilder.getService(),invoker);
  cxfendpoint.getService().setInvoker(invoker);
  if (endpointBuilder.getAuthentication() != null) {
    BasicAuthenticationInterceptor basicAuthInterceptor=this.createBasicAuthenticationInterceptor();
    basicAuthInterceptor.setAuthenticator(endpointBuilder.getAuthentication());
    cxfendpoint.getInInterceptors().add(basicAuthInterceptor);
  }
  if (endpointBuilder.getCxfInInterceptors() != null) {
    cxfendpoint.getInInterceptors().addAll(endpointBuilder.getCxfInInterceptors());
  }
  if (endpointBuilder.getCxfInFaultInterceptors() != null) {
    cxfendpoint.getInFaultInterceptors().addAll(endpointBuilder.getCxfInFaultInterceptors());
  }
  if (endpointBuilder.getCxfOutInterceptors() != null) {
    cxfendpoint.getOutInterceptors().addAll(endpointBuilder.getCxfOutInterceptors());
  }
  if (endpointBuilder.getCxfOutFaultInterceptors() != null) {
    cxfendpoint.getOutFaultInterceptors().addAll(endpointBuilder.getCxfOutFaultInterceptors());
  }
}