nus-yam/ex-repair huggingface dataset:
Program: 85611
Project: 85611
Buggy source:
public Request withMethodHead(){
  return appendTemporaryMethodPlaceholderStoreMethod(HttpMethods.HEAD);
}

Fixed version (ground truth):
public Request withMethodHead(){
  return appendTemporaryMethodPlaceholderStoreMethod(HttpMethod.HEAD.name());
}
Program: 85612
Project: 85612
Buggy source:
@Test public void constructQueryString_ShouldConstructQueryString_WhenParamMapGiven() throws Exception {
  final Map<String,String> expectedParams=new HashMap<String,String>(){
{
      put("String_Node_Str","String_Node_Str");
      put("String_Node_Str","String_Node_Str");
    }
  }
;
  final String actualQueryString=CollectionUtils.constructQueryString(expectedParams);
  final String expectedQueryString="String_Node_Str";
  assertThat(expectedQueryString).isEqualTo(actualQueryString);
}

Fixed version (ground truth):
@Test public void constructQueryString_ShouldConstructQueryString_WhenParamMapGiven() throws Exception {
  final Map<String,String> expectedParams=new LinkedHashMap<String,String>(){
{
      put("String_Node_Str","String_Node_Str");
      put("String_Node_Str","String_Node_Str");
    }
  }
;
  final String actualQueryString=CollectionUtils.constructQueryString(expectedParams);
  final String expectedQueryString="String_Node_Str";
  assertThat(expectedQueryString).isEqualTo(actualQueryString);
}
Program: 85613
Project: 85613
Buggy source:
public static Map<String,String> getProperties(final Object object) throws IllegalAccessException, InvocationTargetException {
  final Map<String,String> properties=new HashMap<String,String>();
  for (  final Field field : object.getClass().getDeclaredFields()) {
    AccessController.doPrivileged(new PrivilegedAction<Boolean>(){
      public Boolean run(){
        field.setAccessible(true);
        return true;
      }
    }
);
    if (skipableProperties.contains(field.getName())) {
      continue;
    }
    final Object fieldObject=ReflectionUtils.getPropertyValue(object,field.getName());
    final String value=StringUtils.isObjectSet(fieldObject) ? fieldObject.toString() : "String_Node_Str";
    properties.put(StringUtils.toLower(field.getName()),value);
  }
  return properties;
}

Fixed version (ground truth):
public static Map<String,String> getProperties(final Object object) throws IllegalAccessException, InvocationTargetException, UnsupportedEncodingException {
  final Map<String,String> properties=new HashMap<String,String>();
  for (  final Field field : object.getClass().getDeclaredFields()) {
    AccessController.doPrivileged(new PrivilegedAction<Boolean>(){
      public Boolean run(){
        field.setAccessible(true);
        return true;
      }
    }
);
    if (skipableProperties.contains(field.getName())) {
      continue;
    }
    final Object fieldObject=ReflectionUtils.getPropertyValue(object,field.getName());
    final String value=determineObjectStringValue(fieldObject);
    properties.put(StringUtils.toLower(field.getName()),value);
  }
  return properties;
}
Program: 85614
Project: 85614
Buggy source:
public int getErrorCode(){
  return errorCode;
}

Fixed version (ground truth):
public Integer getErrorCode(){
  return errorCode;
}
Program: 85615
Project: 85615
Buggy source:
public TransmissionException(String response,int errorCode){
  super(response + "String_Node_Str" + errorCode+ "String_Node_Str");
  this.errorResponse=response;
  this.errorCode=errorCode;
}

Fixed version (ground truth):
public TransmissionException(String response,Integer errorCode){
  super(String.format("String_Node_Str",response,errorCode));
  this.errorResponse=response;
  this.errorCode=errorCode;
}
Program: 85616
Project: 85616
Buggy source:
private String transmit(String soapAction,String data){
  HttpPost post=generatePost(soapAction,data);
  try {
    HttpResponse response=client.execute(post);
    return handleResponse(response);
  }
 catch (  IOException ex) {
    throw new SoapClientException(ex);
  }
catch (  SoapClientException ex) {
    throw ex;
  }
catch (  RuntimeException ex) {
    post.abort();
    throw new SoapClientException(ex);
  }
}

Fixed version (ground truth):
private String transmit(String soapAction,String data){
  HttpPost post=generatePost(soapAction,data);
  return executePost(post);
}
Program: 85617
Project: 85617
Buggy source:
@Test(timeout=5000,expected=TransmissionException.class) public void connectTimeout(){
  try {
    SoapClient client=SoapClient.builder().endpointUri("String_Node_Str").connectTimeoutInMillis(1000).build();
    client.post("String_Node_Str");
  }
 catch (  TransmissionException ex) {
    assertTrue(ex.getCause() instanceof SocketTimeoutException);
    throw ex;
  }
}

Fixed version (ground truth):
@Test(timeout=5000) public void connectTimeout(){
  exception.expect(TransmissionException.class);
  exception.expectMessage("String_Node_Str");
  SoapClient client=SoapClient.builder().endpointUri("String_Node_Str").connectTimeoutInMillis(1000).build();
  client.post("String_Node_Str");
}
Program: 85618
Project: 85618
Buggy source:
private Statement statement(final Statement base,final Description description){
  return new Statement(){
    @Override public void evaluate() throws Throwable {
      Server server=description.getAnnotation(Server.class);
      if (server != null) {
        Class<?> testClass=description.getTestClass();
        ServerProcessor processor=new ServerProcessor(server,testClass);
        processor.initServer();
        try {
          base.evaluate();
          return;
        }
  finally {
          processor.stopServer();
        }
      }
    }
  }
;
}

Fixed version (ground truth):
private Statement statement(final Statement base,final Description description){
  return new Statement(){
    @Override public void evaluate() throws Throwable {
      Server server=description.getAnnotation(Server.class);
      ServerProcessor processor=null;
      if (server != null) {
        Class<?> testClass=description.getTestClass();
        processor=new ServerProcessor(server,testClass);
        processor.initServer();
      }
      try {
        base.evaluate();
      }
  finally {
        if (processor != null) {
          processor.stopServer();
        }
      }
    }
  }
;
}
Program: 85619
Project: 85619
Buggy source:
@Override public void evaluate() throws Throwable {
  Server server=description.getAnnotation(Server.class);
  if (server != null) {
    Class<?> testClass=description.getTestClass();
    ServerProcessor processor=new ServerProcessor(server,testClass);
    processor.initServer();
    try {
      base.evaluate();
      return;
    }
  finally {
      processor.stopServer();
    }
  }
}

Fixed version (ground truth):
@Override public void evaluate() throws Throwable {
  Server server=description.getAnnotation(Server.class);
  ServerProcessor processor=null;
  if (server != null) {
    Class<?> testClass=description.getTestClass();
    processor=new ServerProcessor(server,testClass);
    processor.initServer();
  }
  try {
    base.evaluate();
  }
  finally {
    if (processor != null) {
      processor.stopServer();
    }
  }
}
Program: 85620
Project: 85620
Buggy source:
public void invoke(MessageContext messageContext,Object endpoint) throws Exception {
  ContextPayloadEndpoint payloadEndpoint=(ContextPayloadEndpoint)endpoint;
  Source requestSource=messageContext.getRequest().getPayloadSource();
  Source responseSource=payloadEndpoint.invoke(requestSource,messageContext);
  GenericSoapMessage message=new GenericSoapMessage(responseSource);
  messageContext.setResponse(message);
}

Fixed version (ground truth):
public void invoke(MessageContext messageContext,Object endpoint){
  ContextPayloadEndpoint payloadEndpoint=(ContextPayloadEndpoint)endpoint;
  Source requestSource=messageContext.getRequest().getPayloadSource();
  Source responseSource=payloadEndpoint.invoke(requestSource,messageContext);
  GenericSoapMessage message=new GenericSoapMessage(responseSource);
  messageContext.setResponse(message);
}
Program: 85621
Project: 85621
Buggy source:
/** 
 * Invokes the endpoint with the given request payload, and possibly returns a response.
 * @param request the payload of the request message, may be <code>null</code>
 * @param messageContext
 * @return the payload of the response message, may be <code>null</code> to indicate no response
 * @throws Exception if an exception occurs
 */
Source invoke(Source request,MessageContext messageContext) throws Exception ;

Fixed version (ground truth):
/** 
 * Invokes the endpoint with the given request payload, and possibly returns a response.
 * @param request the payload of the request message, may be <code>null</code>
 * @param messageContext
 * @return the payload of the response message, may be <code>null</code> to indicate no response
 * @throws Exception if an exception occurs
 */
Source invoke(Source request,MessageContext messageContext);
Program: 85622
Project: 85622
Buggy source:
@Override protected Element invokeInternal(Element requestElement,Document responseDocument) throws Exception {
  throw new SoapServerException("String_Node_Str");
}

Fixed version (ground truth):
@Override protected Element invokeInternal(Element requestElement,Document responseDocument){
  throw new SoapServerException("String_Node_Str");
}
Program: 85623
Project: 85623
Buggy source:
@Override public Source invoke(Source request,MessageContext messageContext) throws Exception {
  RequestResponder requestResponder=getRequestResponderBySessionRequestContextPath();
  if (noResponderForRequestFound(requestResponder)) {
    handleNoResponderFault(request);
  }
  SoapMessage msg=(SoapMessage)messageContext.getRequest();
  Source response=requestResponder.respond(msg);
  return response;
}

Fixed version (ground truth):
@Override public Source invoke(Source request,MessageContext messageContext){
  RequestResponder requestResponder=getRequestResponderBySessionRequestContextPath();
  if (noResponderForRequestFound(requestResponder)) {
    handleNoResponderFault();
  }
  SoapMessage msg=(SoapMessage)messageContext.getRequest();
  Source response=requestResponder.respond(msg);
  return response;
}
Program: 85624
Project: 85624
Buggy source:
private Source handleNoResponderFault(Source request){
  String msg=String.format("String_Node_Str",getRequestContextPath());
  throw new SoapServerException(msg);
}

Fixed version (ground truth):
private Source handleNoResponderFault(){
  String msg=String.format("String_Node_Str",getRequestContextPath());
  throw new SoapServerException(msg);
}
Program: 85625
Project: 85625
Buggy source:
@Override public void afterPropertiesSet() throws Exception {
  log.info("String_Node_Str");
}

Fixed version (ground truth):
@Override public void afterPropertiesSet(){
  log.info("String_Node_Str");
}
Program: 85626
Project: 85626
Buggy source:
@Override protected Object getEndpointInternal(MessageContext messageContext) throws Exception {
  return genericEndpoint;
}

Fixed version (ground truth):
@Override protected Object getEndpointInternal(MessageContext messageContext){
  return genericEndpoint;
}
Program: 85627
Project: 85627
Buggy source:
public void afterPropertiesSet() throws Exception {
  configureFactory(soap11,SoapVersion.SOAP_11);
  configureFactory(soap12,SoapVersion.SOAP_12);
}

Fixed version (ground truth):
public void afterPropertiesSet(){
  configureFactory(soap11,SoapVersion.SOAP_11);
  configureFactory(soap12,SoapVersion.SOAP_12);
}
Program: 85628
Project: 85628
Buggy source:
@Override public Source respond(OperationWrapper invokedOperation,SoapMessage message){
  try {
    String response=builder.buildSoapMessageFromOutput(invokedOperation,context);
    Source responseSource=XmlUtils.xmlStringToSource(response);
    return responseSource;
  }
 catch (  Exception e) {
    throw new SoapServerException(e);
  }
}

Fixed version (ground truth):
@Override public Source respond(OperationWrapper invokedOperation,SoapMessage message){
  try {
    String response=builder.buildSoapMessageFromOutput(invokedOperation,context);
    return XmlUtils.xmlStringToSource(response);
  }
 catch (  Exception e) {
    throw new SoapServerException(e);
  }
}
Program: 85629
Project: 85629
Buggy source:
private String performTransmission(String data) throws IOException {
  Writer outputWriter=null;
  try {
    outputStream=connection.getOutputStream();
    outputWriter=new OutputStreamWriter(outputStream,Charset.forName("String_Node_Str"));
    outputWriter.write(data);
    outputWriter.flush();
    inputStream=connection.getInputStream();
    StringBuilder response=new StringBuilder();
    int inputChar;
    while ((inputChar=inputStream.read()) != -1) {
      response.append((char)inputChar);
    }
    return response.toString();
  }
  finally {
    if (outputWriter != null)     IOUtils.closeQuietly(outputWriter);
  }
}

Fixed version (ground truth):
private String performTransmission(String data) throws IOException {
  Writer outputWriter=null;
  try {
    outputStream=connection.getOutputStream();
    outputWriter=new OutputStreamWriter(outputStream,Charset.forName("String_Node_Str"));
    outputWriter.write(data);
    outputWriter.flush();
    inputStream=connection.getInputStream();
    StringBuilder response=new StringBuilder();
    int inputChar;
    while ((inputChar=inputStream.read()) != -1) {
      response.append((char)inputChar);
    }
    return response.toString();
  }
  finally {
    if (outputWriter != null) {
      IOUtils.closeQuietly(outputWriter);
    }
  }
}
Program: 85630
Project: 85630
Buggy source:
private void cleanupResources(){
  if (inputStream != null)   IOUtils.closeQuietly(inputStream);
  if (outputStream != null)   IOUtils.closeQuietly(outputStream);
}

Fixed version (ground truth):
private void cleanupResources(){
  if (inputStream != null) {
    IOUtils.closeQuietly(inputStream);
  }
  if (outputStream != null) {
    IOUtils.closeQuietly(outputStream);
  }
}
Program: 85631
Project: 85631
Buggy source:
private void configureTls(){
  if (tlsEnabled == false)   return;
  try {
    TrustManagerFactory trustManagerFactory=TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
    trustManagerFactory.init(keyStore);
    X509TrustManager defaultTrustManager=(X509TrustManager)trustManagerFactory.getTrustManagers()[0];
    context=SSLContext.getInstance(sslContext);
    context.init(null,new TrustManager[]{defaultTrustManager},null);
    sslSocketFactory=context.getSocketFactory();
    ((HttpsURLConnection)connection).setSSLSocketFactory(sslSocketFactory);
    if (strictHostVerification == false) {
      ((HttpsURLConnection)connection).setHostnameVerifier(new SoapHostnameVerifier());
    }
  }
 catch (  GeneralSecurityException e) {
    throw new SoapClientException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void configureTls(){
  if (tlsEnabled == false) {
    return;
  }
  try {
    TrustManagerFactory trustManagerFactory=TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
    trustManagerFactory.init(keyStore);
    X509TrustManager defaultTrustManager=(X509TrustManager)trustManagerFactory.getTrustManagers()[0];
    context=SSLContext.getInstance(sslContext);
    context.init(null,new TrustManager[]{defaultTrustManager},null);
    sslSocketFactory=context.getSocketFactory();
    ((HttpsURLConnection)connection).setSSLSocketFactory(sslSocketFactory);
    if (strictHostVerification == false) {
      ((HttpsURLConnection)connection).setHostnameVerifier(new SoapHostnameVerifier());
    }
  }
 catch (  GeneralSecurityException e) {
    throw new SoapClientException("String_Node_Str",e);
  }
}
Program: 85632
Project: 85632
Buggy source:
private String encodeBasicCredentials(String user,String password){
  checkNotNull(user);
  checkNotNull(password);
  String basicAuthCredentials=user + "String_Node_Str" + password;
  return new BASE64Encoder().encode(basicAuthCredentials.getBytes());
}

Fixed version (ground truth):
private String encodeBasicCredentials(String user,String password){
  checkNotNull(user);
  checkNotNull(password);
  String basicAuthCredentials=user + "String_Node_Str" + password;
  return new BASE64Encoder().encode(basicAuthCredentials.getBytes(Charset.forName("String_Node_Str")));
}
Program: 85633
Project: 85633
Buggy source:
private String performTransmission(String data) throws IOException {
  Writer outputWriter=null;
  try {
    outputStream=connection.getOutputStream();
    outputWriter=new OutputStreamWriter(outputStream);
    outputWriter.write(data);
    outputWriter.flush();
    inputStream=connection.getInputStream();
    StringBuilder response=new StringBuilder();
    int inputChar;
    while ((inputChar=inputStream.read()) != -1) {
      response.append((char)inputChar);
    }
    return response.toString();
  }
  finally {
    if (outputWriter != null)     IOUtils.closeQuietly(outputWriter);
  }
}

Fixed version (ground truth):
private String performTransmission(String data) throws IOException {
  Writer outputWriter=null;
  try {
    outputStream=connection.getOutputStream();
    outputWriter=new OutputStreamWriter(outputStream,Charset.forName("String_Node_Str"));
    outputWriter.write(data);
    outputWriter.flush();
    inputStream=connection.getInputStream();
    StringBuilder response=new StringBuilder();
    int inputChar;
    while ((inputChar=inputStream.read()) != -1) {
      response.append((char)inputChar);
    }
    return response.toString();
  }
  finally {
    if (outputWriter != null)     IOUtils.closeQuietly(outputWriter);
  }
}
Program: 85634
Project: 85634
Buggy source:
@Override public void writeTo(OutputStream outputStream) throws IOException {
  Writer writer=new OutputStreamWriter(outputStream);
  String message=XmlUtils.sourceToXmlString(source);
  writer.write(message);
  writer.flush();
  writer.close();
}

Fixed version (ground truth):
@Override public void writeTo(OutputStream outputStream) throws IOException {
  Writer writer=new OutputStreamWriter(outputStream,Charset.forName("String_Node_Str"));
  String message=XmlUtils.sourceToXmlString(source);
  writer.write(message);
  writer.flush();
  writer.close();
}
Program: 85635
Project: 85635
Buggy source:
public SoapServerBuilder keyStoreUrl(URL value){
  server.keyStorePath=value.toString();
  return this;
}

Fixed version (ground truth):
@Deprecated public SoapServerBuilder keyStoreUrl(URL value){
  server.keyStorePath=value.toString();
  return this;
}
Program: 85636
Project: 85636
Buggy source:
@Deprecated public SoapServerBuilder keyStoreUrl(URL value){
  server.keyStorePath=value.toString();
  return this;
}

Fixed version (ground truth):
public SoapServerBuilder keyStoreUrl(URL value){
  try {
    server.keyStorePath=value.toURI().getPath();
    return this;
  }
 catch (  URISyntaxException e) {
    throw new SoapServerException(e);
  }
}
Program: 85637
Project: 85637
Buggy source:
private static String formatArgument(String argument){
  String argumentWithoutWhiteSpaces=argument.replaceAll("String_Node_Str","String_Node_Str");
  return argumentWithoutWhiteSpaces;
}

Fixed version (ground truth):
private static String formatArgument(String argument){
  String argumentWithoutWhiteSpaces=argument.trim();
  return argumentWithoutWhiteSpaces;
}
Program: 85638
Project: 85638
Buggy source:
private void validateAndInitKeystore(){
  if (keyStorePath != null) {
    try {
      InputStream in=new FileInputStream(keyStorePath);
      KeyStore ks=KeyStore.getInstance(keyStoreType);
      ks.load(in,keyStorePassword);
      in.close();
      client.keyStore=ks;
    }
 catch (    FileNotFoundException e) {
      throw new SoapClientException("String_Node_Str",e);
    }
catch (    CertificateException e) {
      throw new SoapClientException("String_Node_Str",e);
    }
catch (    NoSuchAlgorithmException e) {
      throw new SoapClientException("String_Node_Str",e);
    }
catch (    KeyStoreException e) {
      throw new SoapClientException("String_Node_Str",e);
    }
catch (    IOException e) {
      throw new SoapClientException("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
private void validateAndInitKeystore(){
  if (keyStoreUrl != null) {
    try {
      InputStream in=keyStoreUrl.openStream();
      KeyStore ks=KeyStore.getInstance(keyStoreType);
      ks.load(in,keyStorePassword);
      in.close();
      client.keyStore=ks;
    }
 catch (    FileNotFoundException e) {
      throw new SoapClientException("String_Node_Str",e);
    }
catch (    CertificateException e) {
      throw new SoapClientException("String_Node_Str",e);
    }
catch (    NoSuchAlgorithmException e) {
      throw new SoapClientException("String_Node_Str",e);
    }
catch (    KeyStoreException e) {
      throw new SoapClientException("String_Node_Str",e);
    }
catch (    IOException e) {
      throw new SoapClientException("String_Node_Str",e);
    }
  }
}
Program: 85639
Project: 85639
Buggy source:
public Builder keyStoreUrl(URL value){
  checkNotNull(value);
  keyStorePath=value.getPath();
  return this;
}

Fixed version (ground truth):
public Builder keyStoreUrl(URL value){
  checkNotNull(value);
  keyStoreUrl=value;
  return this;
}
Program: 85640
Project: 85640
Buggy source:
public SoapServerBuilder keyStoreUrl(URL value){
  server.keyStorePath=value.getPath();
  return this;
}

Fixed version (ground truth):
public SoapServerBuilder keyStoreUrl(URL value){
  server.keyStorePath=value.toString();
  return this;
}
Program: 85641
Project: 85641
Buggy source:
private void validateAndInitKeystore(){
  if (keyStorePath != null) {
    checkNotNull(keyStorePassword);
    try {
      InputStream in=new FileInputStream(keyStorePath);
      KeyStore ks=KeyStore.getInstance(keyStoreType);
      ks.load(in,keyStorePassword.toCharArray());
      in.close();
      client.keyStore=ks;
    }
 catch (    FileNotFoundException e) {
      throw new SoapBuilderException(e);
    }
catch (    CertificateException e) {
      throw new SoapBuilderException(e);
    }
catch (    NoSuchAlgorithmException e) {
      throw new SoapBuilderException(e);
    }
catch (    KeyStoreException e) {
      throw new SoapBuilderException(e);
    }
catch (    IOException e) {
      throw new SoapBuilderException(e);
    }
  }
}

Fixed version (ground truth):
private void validateAndInitKeystore(){
  if (keyStorePath != null) {
    checkNotNull(keyStorePassword);
    try {
      InputStream in=new FileInputStream(keyStorePath);
      KeyStore ks=KeyStore.getInstance(keyStoreType);
      ks.load(in,keyStorePassword.toCharArray());
      in.close();
      client.keyStore=ks;
    }
 catch (    FileNotFoundException e) {
      throw new SoapClientException("String_Node_Str",e);
    }
catch (    CertificateException e) {
      throw new SoapClientException("String_Node_Str",e);
    }
catch (    NoSuchAlgorithmException e) {
      throw new SoapClientException("String_Node_Str",e);
    }
catch (    KeyStoreException e) {
      throw new SoapClientException("String_Node_Str",e);
    }
catch (    IOException e) {
      throw new SoapClientException("String_Node_Str",e);
    }
  }
}
Program: 85642
Project: 85642
Buggy source:
public String post(String soapAction,String requestEnvelope){
  log.debug(String.format("String_Node_Str",serverUrl.toString(),soapAction,requestEnvelope));
  try {
    openConnection();
    configureTls();
    configureConnection();
    decorateConnectionWithSoap(soapAction,requestEnvelope);
    String response=transmit(requestEnvelope);
    log.debug("String_Node_Str" + requestEnvelope);
    return response;
  }
 catch (  IOException ex) {
    throw new SoapTransmissionException(ex);
  }
}

Fixed version (ground truth):
public String post(String soapAction,String requestEnvelope){
  log.debug(String.format("String_Node_Str",serverUrl.toString(),soapAction,requestEnvelope));
  openConnection();
  configureTls();
  configureConnection();
  decorateConnectionWithSoap(soapAction,requestEnvelope);
  String response=transmit(requestEnvelope);
  log.debug("String_Node_Str" + requestEnvelope);
  return response;
}
Program: 85643
Project: 85643
Buggy source:
private void openConnection() throws IOException {
  if (proxy != null) {
    connection=(HttpURLConnection)serverUrl.openConnection(proxy);
  }
 else {
    connection=(HttpURLConnection)serverUrl.openConnection();
  }
}

Fixed version (ground truth):
private void openConnection(){
  try {
    if (proxy != null) {
      connection=(HttpURLConnection)serverUrl.openConnection(proxy);
    }
 else {
      connection=(HttpURLConnection)serverUrl.openConnection();
    }
  }
 catch (  IOException e) {
    throw new SoapClientException("String_Node_Str",e);
  }
}
Program: 85644
Project: 85644
Buggy source:
private void configureConnection() throws ProtocolException {
  connection.setDoOutput(true);
  connection.setDoInput(true);
  connection.setRequestMethod(POST);
  connection.setConnectTimeout(connectTimeoutInMillis);
  connection.setReadTimeout(readTimeoutInMillis);
  if (basicAuthEncoded != null) {
    connection.setRequestProperty(PROP_AUTH,PROP_BASIC_AUTH + "String_Node_Str" + basicAuthEncoded);
  }
  if (proxyAuthEncoded != null) {
    connection.setRequestProperty(PROP_PROXY_AUTH,PROP_BASIC_AUTH + "String_Node_Str" + basicAuthEncoded);
  }
}

Fixed version (ground truth):
private void configureConnection(){
  try {
    connection.setDoOutput(true);
    connection.setDoInput(true);
    connection.setRequestMethod(POST);
    connection.setConnectTimeout(connectTimeoutInMillis);
    connection.setReadTimeout(readTimeoutInMillis);
    if (basicAuthEncoded != null) {
      connection.setRequestProperty(PROP_AUTH,PROP_BASIC_AUTH + "String_Node_Str" + basicAuthEncoded);
    }
    if (proxyAuthEncoded != null) {
      connection.setRequestProperty(PROP_PROXY_AUTH,PROP_BASIC_AUTH + "String_Node_Str" + basicAuthEncoded);
    }
  }
 catch (  ProtocolException e) {
    throw new SoapClientException("String_Node_Str",e);
  }
}
Program: 85645
Project: 85645
Buggy source:
public Builder url(String url){
  checkNotNull(url);
  try {
    client.serverUrl=new URL(url);
    client.tlsEnabled=client.serverUrl.getProtocol().equalsIgnoreCase("String_Node_Str");
    return this;
  }
 catch (  MalformedURLException ex) {
    throw new SoapBuilderException(ex);
  }
}

Fixed version (ground truth):
public Builder url(String url){
  checkNotNull(url);
  try {
    client.serverUrl=new URL(url);
    client.tlsEnabled=client.serverUrl.getProtocol().equalsIgnoreCase("String_Node_Str");
    return this;
  }
 catch (  MalformedURLException ex) {
    throw new SoapClientException(String.format("String_Node_Str",url),ex);
  }
}
Program: 85646
Project: 85646
Buggy source:
private void decorateConnectionWithSoap(String soapAction,String requestEnvelope) throws ProtocolException {
  if (requestEnvelope.contains(SOAP_1_1_NAMESPACE)) {
    if (soapAction != null) {
      connection.setRequestProperty(PROP_SOAP_ACTION_11,soapAction);
    }
    connection.setRequestProperty(PROP_CONTENT_TYPE,MIMETYPE_TEXT_XML);
  }
 else   if (requestEnvelope.contains(SOAP_1_2_NAMESPACE)) {
    connection.setRequestProperty(PROP_CONTENT_TYPE,MIMETYPE_APPLICATION_XML);
    if (soapAction != null) {
      String prop=connection.getRequestProperty(PROP_CONTENT_TYPE);
      connection.setRequestProperty(PROP_CONTENT_TYPE,prop + PROP_DELIMITER + PROP_SOAP_ACTION_12+ "String_Node_Str"+ soapAction+ "String_Node_Str");
    }
  }
  connection.setRequestProperty(PROP_CONTENT_LENGTH,Integer.toString(requestEnvelope.length()));
}

Fixed version (ground truth):
private void decorateConnectionWithSoap(String soapAction,String requestEnvelope){
  if (requestEnvelope.contains(SOAP_1_1_NAMESPACE)) {
    if (soapAction != null) {
      connection.setRequestProperty(PROP_SOAP_ACTION_11,soapAction);
    }
    connection.setRequestProperty(PROP_CONTENT_TYPE,MIMETYPE_TEXT_XML);
  }
 else   if (requestEnvelope.contains(SOAP_1_2_NAMESPACE)) {
    connection.setRequestProperty(PROP_CONTENT_TYPE,MIMETYPE_APPLICATION_XML);
    if (soapAction != null) {
      String prop=connection.getRequestProperty(PROP_CONTENT_TYPE);
      connection.setRequestProperty(PROP_CONTENT_TYPE,prop + PROP_DELIMITER + PROP_SOAP_ACTION_12+ "String_Node_Str"+ soapAction+ "String_Node_Str");
    }
  }
  connection.setRequestProperty(PROP_CONTENT_LENGTH,Integer.toString(requestEnvelope.length()));
}
Program: 85647
Project: 85647
Buggy source:
private void configureTls(){
  if (tlsEnabled == false)   return;
  try {
    TrustManagerFactory trustManagerFactory=TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
    trustManagerFactory.init(keyStore);
    X509TrustManager defaultTrustManager=(X509TrustManager)trustManagerFactory.getTrustManagers()[0];
    context=SSLContext.getInstance(sslContext);
    context.init(null,new TrustManager[]{defaultTrustManager},null);
    sslSocketFactory=context.getSocketFactory();
    ((HttpsURLConnection)connection).setSSLSocketFactory(sslSocketFactory);
    if (strictHostVerification == false) {
      ((HttpsURLConnection)connection).setHostnameVerifier(new SoapHostnameVerifier());
    }
  }
 catch (  NoSuchAlgorithmException e) {
    throw new SoapBuilderException(e);
  }
catch (  KeyManagementException e) {
    throw new SoapBuilderException(e);
  }
catch (  KeyStoreException e) {
    throw new SoapBuilderException(e);
  }
}

Fixed version (ground truth):
private void configureTls(){
  if (tlsEnabled == false)   return;
  try {
    TrustManagerFactory trustManagerFactory=TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
    trustManagerFactory.init(keyStore);
    X509TrustManager defaultTrustManager=(X509TrustManager)trustManagerFactory.getTrustManagers()[0];
    context=SSLContext.getInstance(sslContext);
    context.init(null,new TrustManager[]{defaultTrustManager},null);
    sslSocketFactory=context.getSocketFactory();
    ((HttpsURLConnection)connection).setSSLSocketFactory(sslSocketFactory);
    if (strictHostVerification == false) {
      ((HttpsURLConnection)connection).setHostnameVerifier(new SoapHostnameVerifier());
    }
  }
 catch (  NoSuchAlgorithmException e) {
    throw new SoapClientException("String_Node_Str",e);
  }
catch (  KeyManagementException e) {
    throw new SoapClientException("String_Node_Str",e);
  }
catch (  KeyStoreException e) {
    throw new SoapClientException("String_Node_Str",e);
  }
}
Program: 85648
Project: 85648
Buggy source:
public SoapTransmissionException(String response,int errorCode,Throwable cause){
  super(response + "String_Node_Str" + cause.getMessage(),cause);
  this.errorResponse=response;
  this.errorCode=errorCode;
}

Fixed version (ground truth):
public SoapTransmissionException(String response,int errorCode,Throwable cause){
  super(response + "String_Node_Str" + errorCode+ "String_Node_Str"+ cause.getMessage(),cause);
  this.errorResponse=response;
  this.errorCode=errorCode;
}
Program: 85649
Project: 85649
Buggy source:
@Override public void onAnimationEnd(Animation animation){
  removeAllViews();
  PopoverView.this.superview.removeView(PopoverView.this);
  isAnimating=false;
  if (delegate != null)   delegate.popoverViewDidDismiss(PopoverView.this);
}

Fixed version (ground truth):
@Override public void onAnimationEnd(Animation animation){
  popoverView.removeAllViews();
  removeAllViews();
  PopoverView.this.superview.removeView(PopoverView.this);
  isAnimating=false;
  if (delegate != null)   delegate.popoverViewDidDismiss(PopoverView.this);
}
Program: 85650
Project: 85650
Buggy source:
/** 
 * Dismiss the current shown popover
 * @param animated Whether it should be dismissed animated or not
 */
public void dissmissPopover(boolean animated){
  if (delegate != null)   delegate.popoverViewWillDismiss(PopoverView.this);
  if (!animated) {
    removeAllViews();
    superview.removeView(this);
    if (delegate != null)     delegate.popoverViewDidDismiss(PopoverView.this);
  }
 else {
    if (!isAnimating) {
      AlphaAnimation animation=new AlphaAnimation(1.0f,0.0f);
      animation.setDuration(fadeAnimationTime);
      animation.setAnimationListener(new AnimationListener(){
        @Override public void onAnimationStart(        Animation animation){
        }
        @Override public void onAnimationRepeat(        Animation animation){
        }
        @Override public void onAnimationEnd(        Animation animation){
          removeAllViews();
          PopoverView.this.superview.removeView(PopoverView.this);
          isAnimating=false;
          if (delegate != null)           delegate.popoverViewDidDismiss(PopoverView.this);
        }
      }
);
      isAnimating=true;
      startAnimation(animation);
    }
  }
}

Fixed version (ground truth):
/** 
 * Dismiss the current shown popover
 * @param animated Whether it should be dismissed animated or not
 */
public void dissmissPopover(boolean animated){
  if (delegate != null)   delegate.popoverViewWillDismiss(PopoverView.this);
  if (!animated) {
    popoverView.removeAllViews();
    removeAllViews();
    superview.removeView(this);
    if (delegate != null)     delegate.popoverViewDidDismiss(PopoverView.this);
  }
 else {
    if (!isAnimating) {
      AlphaAnimation animation=new AlphaAnimation(1.0f,0.0f);
      animation.setDuration(fadeAnimationTime);
      animation.setAnimationListener(new AnimationListener(){
        @Override public void onAnimationStart(        Animation animation){
        }
        @Override public void onAnimationRepeat(        Animation animation){
        }
        @Override public void onAnimationEnd(        Animation animation){
          popoverView.removeAllViews();
          removeAllViews();
          PopoverView.this.superview.removeView(PopoverView.this);
          isAnimating=false;
          if (delegate != null)           delegate.popoverViewDidDismiss(PopoverView.this);
        }
      }
);
      isAnimating=true;
      startAnimation(animation);
    }
  }
}
Program: 85652
Project: 85652
Buggy source:
@Bean public IntegrationFlow ftpMGetFlow(){
  return IntegrationFlows.from("String_Node_Str").handle(Ftp.outboundGateway(this.ftpSessionFactory,AbstractRemoteFileOutboundGateway.Command.MGET,"String_Node_Str").options(AbstractRemoteFileOutboundGateway.Option.RECURSIVE).regexFileNameFilter("String_Node_Str").localDirectoryExpression("String_Node_Str").localFilenameGeneratorExpression("String_Node_Str")).channel(remoteFileOutputChannel()).get();
}

Fixed version (ground truth):
@Bean public IntegrationFlow ftpMGetFlow(){
  return IntegrationFlows.from("String_Node_Str").handle(ftpOutboundGateway()).channel(remoteFileOutputChannel()).get();
}
Program: 85653
Project: 85653
Buggy source:
@SuppressWarnings("String_Node_Str") public Map<String,List<KafkaStream<byte[],byte[]>>> getConsumerMapWithMessageStreams(){
  if (consumerMetadata.getValueDecoder() != null) {
    return getConsumerConnector().createMessageStreams(consumerMetadata.getTopicStreamMap(),consumerMetadata.getValueDecoder(),consumerMetadata.getValueDecoder());
  }
  return getConsumerConnector().createMessageStreams(consumerMetadata.getTopicStreamMap());
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Map<String,List<KafkaStream<byte[],byte[]>>> getConsumerMapWithMessageStreams(){
  if (consumerMetadata.getValueDecoder() != null && consumerMetadata.getKeyDecoder() != null) {
    return getConsumerConnector().createMessageStreams(consumerMetadata.getTopicStreamMap(),consumerMetadata.getKeyDecoder(),consumerMetadata.getValueDecoder());
  }
  return getConsumerConnector().createMessageStreams(consumerMetadata.getTopicStreamMap());
}
Program: 85655
Project: 85655
Buggy source:
@Override protected void parseTransformer(Element element,ParserContext parserContext,BeanDefinitionBuilder builder){
  AbstractBeanDefinition executor=XQueryParserUtils.getXQueryExecutor(element);
  builder.addPropertyValue("String_Node_Str",executor);
  String resultType=element.getAttribute("String_Node_Str");
  boolean hasResultType=StringUtils.hasText(resultType);
  String xqueryResultMapper=element.getAttribute("String_Node_Str");
  boolean hasResultMapper=StringUtils.hasText(xqueryResultMapper);
  Assert.isTrue(!(hasResultType && hasResultMapper),"String_Node_Str");
  if (hasResultType) {
    Class<?> type=null;
    if ("String_Node_Str".equalsIgnoreCase(resultType)) {
      type=String.class;
    }
 else     if ("String_Node_Str".equalsIgnoreCase(resultType)) {
      type=Boolean.class;
    }
 else     if ("String_Node_Str".equalsIgnoreCase(resultType)) {
      type=Number.class;
    }
 else     if ("String_Node_Str".equalsIgnoreCase(resultType)) {
      type=Node.class;
    }
 else {
      try {
        type=Class.forName(resultType);
      }
 catch (      ClassNotFoundException e) {
        new IllegalArgumentException("String_Node_Str" + resultType + "String_Node_Str"+ "String_Node_Str",e);
      }
    }
    builder.addPropertyValue("String_Node_Str",type);
  }
 else   if (hasResultMapper) {
    builder.addPropertyReference("String_Node_Str",xqueryResultMapper);
  }
}

Fixed version (ground truth):
@Override protected void parseTransformer(Element element,ParserContext parserContext,BeanDefinitionBuilder builder){
  AbstractBeanDefinition executor=XQueryParserUtils.getXQueryExecutor(element);
  builder.addPropertyValue("String_Node_Str",executor);
  String resultType=element.getAttribute("String_Node_Str");
  boolean hasResultType=StringUtils.hasText(resultType);
  String xqueryResultMapper=element.getAttribute("String_Node_Str");
  boolean hasResultMapper=StringUtils.hasText(xqueryResultMapper);
  Assert.isTrue(!(hasResultType && hasResultMapper),"String_Node_Str");
  if (hasResultType) {
    Class<?> type=null;
    if ("String_Node_Str".equalsIgnoreCase(resultType)) {
      type=String.class;
    }
 else     if ("String_Node_Str".equalsIgnoreCase(resultType)) {
      type=Boolean.class;
    }
 else     if ("String_Node_Str".equalsIgnoreCase(resultType)) {
      type=Number.class;
    }
 else     if ("String_Node_Str".equalsIgnoreCase(resultType)) {
      type=Node.class;
    }
 else {
      try {
        type=Class.forName(resultType);
      }
 catch (      ClassNotFoundException e) {
        throw new IllegalArgumentException("String_Node_Str" + resultType + "String_Node_Str"+ "String_Node_Str",e);
      }
    }
    builder.addPropertyValue("String_Node_Str",type);
  }
 else   if (hasResultMapper) {
    builder.addPropertyReference("String_Node_Str",xqueryResultMapper);
  }
}
Program: 85656
Project: 85656
Buggy source:
/** 
 * The method that finds an implementation in the classpath for some well known providers. This will kick into action only if an   {@link XQDataSource} is notexplicitly provided by the user by invoking  {@link XQueryExecutor#setXQDataSource(XQDataSource)}The method currently looks for Saxon's implementation only
 * @return the instantiated {@link XQDataSource}
 */
private XQDataSource discoverXQDataSource(){
  Object xqDataSource=null;
  try {
    if (ClassUtils.isPresent(SAXON_XQ_DATASOURCE_CLASS,classLoader)) {
      xqDataSource=Class.forName(SAXON_XQ_DATASOURCE_CLASS).newInstance();
    }
  }
 catch (  Exception e) {
    throw new MessagingException("String_Node_Str" + "String_Node_Str",e);
  }
  Assert.notNull(xqDataSource,"String_Node_Str");
  logger.info("String_Node_Str" + xqDataSource.getClass() + "String_Node_Str");
  return (XQDataSource)xqDataSource;
}

Fixed version (ground truth):
/** 
 * The method that finds an implementation in the classpath for some well known providers. This will kick into action only if an   {@link XQDataSource} is notexplicitly provided by the user by invoking  {@link XQueryExecutor#setXQDataSource(XQDataSource)}The method currently looks for Saxon's implementation only
 * @return the instantiated {@link XQDataSource}
 */
private XQDataSource discoverXQDataSource(){
  Object dataSource=null;
  try {
    if (ClassUtils.isPresent(SAXON_XQ_DATASOURCE_CLASS,classLoader)) {
      dataSource=Class.forName(SAXON_XQ_DATASOURCE_CLASS).newInstance();
    }
  }
 catch (  Exception e) {
    throw new MessagingException("String_Node_Str" + "String_Node_Str",e);
  }
  Assert.notNull(dataSource,"String_Node_Str");
  logger.info("String_Node_Str" + dataSource.getClass() + "String_Node_Str");
  return (XQDataSource)dataSource;
}
Program: 85657
Project: 85657
Buggy source:
/** 
 * Convenience method that would be used to set the parameters in the parameter map. Any non conflicting parameters would be retained
 * @param params
 */
public void setXQueryParameters(List<XQueryParameter> params){
  if (params != null && params.size() > 0) {
    if (xQueryParameterMap == null)     xQueryParameterMap=new HashMap<String,XQueryParameter>();
    for (    XQueryParameter param : params) {
      xQueryParameterMap.put(param.getParameterName(),param);
    }
  }
}

Fixed version (ground truth):
/** 
 * Convenience method that would be used to set the parameters in the parameter map. Any non conflicting parameters would be retained
 * @param params
 */
public void setXQueryParameters(List<XQueryParameter> params){
  if (params != null && params.size() > 0) {
    if (xQueryParameterMap == null) {
      xQueryParameterMap=new HashMap<String,XQueryParameter>();
    }
    for (    XQueryParameter param : params) {
      xQueryParameterMap.put(param.getParameterName(),param);
    }
  }
}
Program: 85658
Project: 85658
Buggy source:
/** 
 * Helper method that will be used to convert a String value to Number
 * @param value
 * @param strValue
 * @return
 */
private Number convertStringToNumber(String strValue){
  Number value=null;
  try {
    if (StringUtils.hasText(strValue)) {
      if (strValue.indexOf("String_Node_Str") > 0) {
        value=Double.valueOf(strValue);
      }
 else {
        value=Long.valueOf(strValue);
      }
    }
  }
 catch (  NumberFormatException ne) {
    value=null;
  }
  return value;
}

Fixed version (ground truth):
/** 
 * Helper method that will be used to convert a String value to Number
 * @param value
 * @param strValue
 * @return
 */
private Number convertStringToNumber(String strValue){
  Number value=null;
  try {
    if (StringUtils.hasText(strValue)) {
      if (strValue.indexOf('.') > 0) {
        value=Double.valueOf(strValue);
      }
 else {
        value=Long.valueOf(strValue);
      }
    }
  }
 catch (  NumberFormatException ne) {
    value=null;
  }
  return value;
}
Program: 85659
Project: 85659
Buggy source:
/** 
 * Transforms the given   {@link Node} to a String
 * @param n
 * @return
 * @throws TransformerConfigurationException
 * @throws TransformerFactoryConfigurationError
 * @throws TransformerException
 */
protected String transformNodeToString(Node n) throws TransformerConfigurationException, TransformerFactoryConfigurationError, TransformerException {
  String value;
  StringWriter writer=new StringWriter();
  Transformer transformer=TransformerFactory.newInstance().newTransformer();
  if (formatOutput)   transformer.setOutputProperty(OutputKeys.INDENT,"String_Node_Str");
  transformer.transform(new DOMSource(n),new StreamResult(writer));
  value=writer.toString();
  return value;
}

Fixed version (ground truth):
/** 
 * Transforms the given   {@link Node} to a String
 * @param n
 * @return
 * @throws TransformerConfigurationException
 * @throws TransformerFactoryConfigurationError
 * @throws TransformerException
 */
protected String transformNodeToString(Node n) throws TransformerException {
  String value;
  StringWriter writer=new StringWriter();
  Transformer transformer=TransformerFactory.newInstance().newTransformer();
  if (formatOutput) {
    transformer.setOutputProperty(OutputKeys.INDENT,"String_Node_Str");
  }
  transformer.transform(new DOMSource(n),new StreamResult(writer));
  value=writer.toString();
  return value;
}
Program: 85660
Project: 85660
Buggy source:
public List<Boolean> mapResults(XQResultSequence result){
  List<Boolean> results=new ArrayList<Boolean>();
  try {
    while (result.next()) {
      XQItemType type=result.getItemType();
      Boolean value=convertToBoolean(type,result);
      if (value == null) {
        if (isNodeType(type)) {
          Node n=result.getNode();
          value=Boolean.valueOf(transformNodeToString(n));
        }
      }
      results.add(value);
    }
  }
 catch (  Exception e) {
    throw new MessagingException("String_Node_Str",e);
  }
  return results;
}

Fixed version (ground truth):
public List<Boolean> mapResults(XQResultSequence result){
  List<Boolean> results=new ArrayList<Boolean>();
  try {
    while (result.next()) {
      XQItemType type=result.getItemType();
      Boolean value=convertToBoolean(type,result);
      if (value == null && isNodeType(type)) {
        Node n=result.getNode();
        value=Boolean.valueOf(transformNodeToString(n));
      }
      results.add(value);
    }
  }
 catch (  Exception e) {
    throw new MessagingException("String_Node_Str",e);
  }
  return results;
}
Program: 85661
Project: 85661
Buggy source:
public List<Number> mapResults(XQResultSequence result){
  List<Number> results=new ArrayList<Number>();
  try {
    while (result.next()) {
      XQItemType type=result.getItemType();
      Number value=convertToNumber(type,result);
      if (value == null) {
        if (isNodeType(type)) {
          Node n=result.getNode();
          String strValue=transformNodeToString(n);
          if (StringUtils.hasText(strValue)) {
            if (strValue.indexOf("String_Node_Str") > 0) {
              value=Double.valueOf(strValue);
            }
 else {
              value=Long.valueOf(strValue);
            }
          }
        }
      }
      results.add(value);
    }
  }
 catch (  Exception e) {
    throw new MessagingException("String_Node_Str",e);
  }
  return results;
}

Fixed version (ground truth):
public List<Number> mapResults(XQResultSequence result){
  List<Number> results=new ArrayList<Number>();
  try {
    while (result.next()) {
      XQItemType type=result.getItemType();
      Number value=convertToNumber(type,result);
      if (value == null && isNodeType(type)) {
        Node n=result.getNode();
        String strValue=transformNodeToString(n);
        if (StringUtils.hasText(strValue)) {
          if (strValue.indexOf('.') > 0) {
            value=Double.valueOf(strValue);
          }
 else {
            value=Long.valueOf(strValue);
          }
        }
      }
      results.add(value);
    }
  }
 catch (  Exception e) {
    throw new MessagingException("String_Node_Str",e);
  }
  return results;
}
Program: 85662
Project: 85662
Buggy source:
/** 
 * Sets the expression that would be evaluated to get the parameter value
 * @param expression
 */
public void setExpression(String expression){
  Assert.isTrue(parameterValue == null,"String_Node_Str" + "String_Node_Str");
  Assert.isTrue(!StringUtils.hasText(this.expression),"String_Node_Str");
  Assert.hasText(expression,"String_Node_Str");
  this.expression=expression;
  isValueSet=false;
  SpelExpressionParser parser=new SpelExpressionParser();
  Expression expr=parser.parseExpression(expression);
  messageProcessor=new ExpressionEvaluatingMessageProcessor<Object>(expr);
}

Fixed version (ground truth):
/** 
 * Sets the expression that would be evaluated to get the parameter value
 * @param expression
 */
public final void setExpression(String expression){
  Assert.isTrue(parameterValue == null,"String_Node_Str" + "String_Node_Str");
  Assert.isTrue(!StringUtils.hasText(this.expression),"String_Node_Str");
  Assert.hasText(expression,"String_Node_Str");
  this.expression=expression;
  isValueSet=false;
  SpelExpressionParser parser=new SpelExpressionParser();
  Expression expr=parser.parseExpression(expression);
  messageProcessor=new ExpressionEvaluatingMessageProcessor<Object>(expr);
}