Program: 64903
Project: 64903
Buggy source:
@Override public void writeProvider(OutputStream sourceProviderStream,OutputStream classProviderStream,OutputStream sourceProviderListenerStream,OutputStream classProviderListenerStream,DBWSBuilder builder){
  StringBuilder source=new StringBuilder(DBWS_PROVIDER_SOURCE_PREAMBLE);
  String wsdlPathPrevix=getWSDLPathPrefix();
  if (wsdlPathPrevix != null) {
    source.append(DBWS_PROVIDER_SOURCE_WSDL_LOCATION);
  }
  source.append(DBWS_PROVIDER_SOURCE_SERVICE_NAME);
  String serviceName=builder.getWSDLGenerator().getServiceName();
  source.append(serviceName);
  source.append(DBWS_PROVIDER_SOURCE_PORT_NAME);
  source.append(serviceName + "String_Node_Str");
  source.append(DBWS_PROVIDER_SOURCE_TARGET_NAMESPACE);
  source.append(builder.getWSDLGenerator().getServiceNameSpace());
  source.append(DBWS_PROVIDER_SOURCE_SUFFIX);
  if (builder.usesSOAP12()) {
    if (builder.mtomEnabled()) {
      source.append(DBWS_PROVIDER_SOAP12_MTOM_BINDING);
    }
 else {
      source.append(DBWS_PROVIDER_SOAP12_BINDING);
    }
  }
 else {
    if (builder.mtomEnabled()) {
      source.append(DBWS_PROVIDER_SOAP11_MTOM_BINDING);
    }
  }
  source.append(DBWS_PROVIDER_SOURCE_CLASSDEF);
  if (sourceProviderStream != __nullStream) {
    OutputStreamWriter osw=new OutputStreamWriter(new BufferedOutputStream(sourceProviderStream));
    try {
      osw.write(source.toString());
      osw.flush();
    }
 catch (    IOException e) {
    }
  }
  if (classProviderStream != __nullStream) {
    InMemoryCompiler providerCompiler=new InMemoryCompiler(PROVIDER_NAME);
    if (providerCompiler.getCompiler() == null) {
      throw new IllegalStateException("String_Node_Str" + "String_Node_Str");
    }
    byte[] bytes=providerCompiler.compile(source);
    if (bytes.length == 0) {
      DiagnosticCollector<JavaFileObject> collector=providerCompiler.getDiagnosticsCollector();
      StringBuilder diagBuf=new StringBuilder("String_Node_Str" + "String_Node_Str");
      for (      Diagnostic<? extends JavaFileObject> d : collector.getDiagnostics()) {
        if (d.getKind() == Diagnostic.Kind.ERROR) {
          diagBuf.append(d.getMessage(null));
          diagBuf.append("String_Node_Str");
        }
      }
      throw new IllegalStateException(diagBuf.toString());
    }
 else {
      try {
        classProviderStream.write(bytes,0,bytes.length);
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
    }
  }
  if (sourceProviderListenerStream != __nullStream) {
    OutputStreamWriter osw=new OutputStreamWriter(new BufferedOutputStream(sourceProviderListenerStream));
    try {
      osw.write(PROVIDER_LISTENER_SOURCE);
      osw.flush();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
  if (classProviderListenerStream != __nullStream) {
    try {
      InputStream is=this.getClass().getClassLoader().getResourceAsStream(ProviderListener.class.getName().replace('.','/') + DOT_CLASS);
      byte[] buffer=new byte[DEFAULT_BUFFER_SIZE];
      int n=0;
      while (-1 != (n=is.read(buffer))) {
        classProviderListenerStream.write(buffer,0,n);
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Override public void writeProvider(OutputStream sourceProviderStream,OutputStream classProviderStream,OutputStream sourceProviderListenerStream,OutputStream classProviderListenerStream,DBWSBuilder builder){
  StringBuilder source=new StringBuilder(DBWS_PROVIDER_SOURCE_PREAMBLE_START);
  if (builder.usesSOAP12()) {
    if (builder.mtomEnabled()) {
      source.append(DBWS_PROVIDER_SOURCE_SOAP12HTTP_MTOM_BINDING);
    }
 else {
      source.append(DBWS_PROVIDER_SOURCE_SOAP12HTTP_BINDING);
    }
  }
 else {
    if (builder.mtomEnabled()) {
      source.append(DBWS_PROVIDER_SOURCE_SOAP11HTTP_MTOM_BINDING);
    }
  }
  source.append(new StringBuilder(DBWS_PROVIDER_SOURCE_PREAMBLE_END));
  String wsdlPathPrevix=getWSDLPathPrefix();
  if (wsdlPathPrevix != null) {
    source.append(DBWS_PROVIDER_SOURCE_WSDL_LOCATION);
  }
  source.append(DBWS_PROVIDER_SOURCE_SERVICE_NAME);
  String serviceName=builder.getWSDLGenerator().getServiceName();
  source.append(serviceName);
  source.append(DBWS_PROVIDER_SOURCE_PORT_NAME);
  source.append(serviceName + "String_Node_Str");
  source.append(DBWS_PROVIDER_SOURCE_TARGET_NAMESPACE);
  source.append(builder.getWSDLGenerator().getServiceNameSpace());
  source.append(DBWS_PROVIDER_SOURCE_SUFFIX);
  if (builder.usesSOAP12()) {
    if (builder.mtomEnabled()) {
      source.append(DBWS_PROVIDER_SOAP12_MTOM_BINDING);
    }
 else {
      source.append(DBWS_PROVIDER_SOAP12_BINDING);
    }
  }
 else {
    if (builder.mtomEnabled()) {
      source.append(DBWS_PROVIDER_SOAP11_MTOM_BINDING);
    }
  }
  source.append(DBWS_PROVIDER_SOURCE_CLASSDEF);
  if (sourceProviderStream != __nullStream) {
    OutputStreamWriter osw=new OutputStreamWriter(new BufferedOutputStream(sourceProviderStream));
    try {
      osw.write(source.toString());
      osw.flush();
    }
 catch (    IOException e) {
    }
  }
  if (classProviderStream != __nullStream) {
    InMemoryCompiler providerCompiler=new InMemoryCompiler(PROVIDER_NAME);
    if (providerCompiler.getCompiler() == null) {
      throw new IllegalStateException("String_Node_Str" + "String_Node_Str");
    }
    byte[] bytes=providerCompiler.compile(source);
    if (bytes.length == 0) {
      DiagnosticCollector<JavaFileObject> collector=providerCompiler.getDiagnosticsCollector();
      StringBuilder diagBuf=new StringBuilder("String_Node_Str" + "String_Node_Str");
      for (      Diagnostic<? extends JavaFileObject> d : collector.getDiagnostics()) {
        if (d.getKind() == Diagnostic.Kind.ERROR) {
          diagBuf.append(d.getMessage(null));
          diagBuf.append("String_Node_Str");
        }
      }
      throw new IllegalStateException(diagBuf.toString());
    }
 else {
      try {
        classProviderStream.write(bytes,0,bytes.length);
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
    }
  }
  if (sourceProviderListenerStream != __nullStream) {
    OutputStreamWriter osw=new OutputStreamWriter(new BufferedOutputStream(sourceProviderListenerStream));
    try {
      osw.write(PROVIDER_LISTENER_SOURCE);
      osw.flush();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
  if (classProviderListenerStream != __nullStream) {
    try {
      InputStream is=this.getClass().getClassLoader().getResourceAsStream(ProviderListener.class.getName().replace('.','/') + DOT_CLASS);
      byte[] buffer=new byte[DEFAULT_BUFFER_SIZE];
      int n=0;
      while (-1 != (n=is.read(buffer))) {
        classProviderListenerStream.write(buffer,0,n);
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}