nus-yam/ex-repair huggingface dataset:
Program: 54850
Project: 54850
Buggy source:
@Override public LowLevelHttpRequest buildRequest(String name,String url){
  assertEquals(TEST_REQUEST_URL,url);
  return new MockLowLevelHttpRequest(){
    @Override public LowLevelHttpResponse execute(){
      lowLevelExecCalls++;
      MockLowLevelHttpResponse response=new MockLowLevelHttpResponse();
      if (directDownloadEnabled) {
        response.setStatusCode(200);
        response.addHeader("String_Node_Str",String.valueOf(contentLength));
        response.setContent(testChunkStream);
        return response;
      }
      assertEquals("String_Node_Str" + bytesDownloaded + "String_Node_Str"+ (bytesDownloaded + TEST_CHUNK_SIZE - 1),getHeaders().get("String_Node_Str").get(0));
      if (testServerError && lowLevelExecCalls == 2) {
        response.setStatusCode(500);
        return response;
      }
 else       if (testClientError) {
        response.setStatusCode(404);
        return response;
      }
      response.setStatusCode(206);
      response.addHeader("String_Node_Str","String_Node_Str" + bytesDownloaded + "String_Node_Str"+ (bytesDownloaded + TEST_CHUNK_SIZE - 1)+ "String_Node_Str"+ contentLength);
      response.setContent(testChunkStream);
      bytesDownloaded+=TEST_CHUNK_SIZE;
      return response;
    }
  }
;
}

Fixed version (ground truth):
@Override public LowLevelHttpRequest buildRequest(String name,String url){
  assertEquals(TEST_REQUEST_URL,url);
  return new MockLowLevelHttpRequest(){
    @Override public LowLevelHttpResponse execute(){
      lowLevelExecCalls++;
      MockLowLevelHttpResponse response=new MockLowLevelHttpResponse();
      if (directDownloadEnabled) {
        response.setStatusCode(200);
        response.addHeader("String_Node_Str",String.valueOf(contentLength));
        response.setContent(new ByteArrayInputStream(new byte[contentLength - bytesDownloaded]));
        return response;
      }
      assertEquals("String_Node_Str" + bytesDownloaded + "String_Node_Str"+ (bytesDownloaded + TEST_CHUNK_SIZE - 1),getHeaders().get("String_Node_Str").get(0));
      if (testServerError && lowLevelExecCalls == 2) {
        response.setStatusCode(500);
        return response;
      }
 else       if (testClientError) {
        response.setStatusCode(404);
        return response;
      }
      response.setStatusCode(206);
      int upper=Math.min(bytesDownloaded + TEST_CHUNK_SIZE,contentLength) - 1;
      response.addHeader("String_Node_Str","String_Node_Str" + bytesDownloaded + "String_Node_Str"+ upper+ "String_Node_Str"+ contentLength);
      int bytesDownloadedCur=upper - bytesDownloaded + 1;
      response.setContent(new ByteArrayInputStream(new byte[bytesDownloadedCur]));
      bytesDownloaded+=bytesDownloadedCur;
      return response;
    }
  }
;
}
Program: 54851
Project: 54851
Buggy source:
public void testDownloadOneCallHalfChunkSize() throws Exception {
  int contentLength=MediaHttpDownloader.MAXIMUM_CHUNK_SIZE / 2;
  ByteArrayOutputStream outputStream=new ByteArrayOutputStream();
  MediaTransport fakeTransport=new MediaTransport(contentLength);
  MediaHttpDownloader downloader=new MediaHttpDownloader(fakeTransport,null);
  downloader.download(new GenericUrl(TEST_REQUEST_URL),outputStream);
  assertEquals(TEST_CHUNK_SIZE,outputStream.size());
  assertEquals(1,fakeTransport.lowLevelExecCalls);
}

Fixed version (ground truth):
public void testDownloadOneCallHalfChunkSize() throws Exception {
  int contentLength=MediaHttpDownloader.MAXIMUM_CHUNK_SIZE / 2;
  ByteArrayOutputStream outputStream=new ByteArrayOutputStream();
  MediaTransport fakeTransport=new MediaTransport(contentLength);
  MediaHttpDownloader downloader=new MediaHttpDownloader(fakeTransport,null);
  downloader.download(new GenericUrl(TEST_REQUEST_URL),outputStream);
  assertEquals(contentLength,outputStream.size());
  assertEquals(1,fakeTransport.lowLevelExecCalls);
}
Program: 54852
Project: 54852
Buggy source:
@Override public LowLevelHttpResponse execute(){
  lowLevelExecCalls++;
  MockLowLevelHttpResponse response=new MockLowLevelHttpResponse();
  if (directDownloadEnabled) {
    response.setStatusCode(200);
    response.addHeader("String_Node_Str",String.valueOf(contentLength));
    response.setContent(testChunkStream);
    return response;
  }
  assertEquals("String_Node_Str" + bytesDownloaded + "String_Node_Str"+ (bytesDownloaded + TEST_CHUNK_SIZE - 1),getHeaders().get("String_Node_Str").get(0));
  if (testServerError && lowLevelExecCalls == 2) {
    response.setStatusCode(500);
    return response;
  }
 else   if (testClientError) {
    response.setStatusCode(404);
    return response;
  }
  response.setStatusCode(206);
  response.addHeader("String_Node_Str","String_Node_Str" + bytesDownloaded + "String_Node_Str"+ (bytesDownloaded + TEST_CHUNK_SIZE - 1)+ "String_Node_Str"+ contentLength);
  response.setContent(testChunkStream);
  bytesDownloaded+=TEST_CHUNK_SIZE;
  return response;
}

Fixed version (ground truth):
@Override public LowLevelHttpResponse execute(){
  lowLevelExecCalls++;
  MockLowLevelHttpResponse response=new MockLowLevelHttpResponse();
  if (directDownloadEnabled) {
    response.setStatusCode(200);
    response.addHeader("String_Node_Str",String.valueOf(contentLength));
    response.setContent(new ByteArrayInputStream(new byte[contentLength - bytesDownloaded]));
    return response;
  }
  assertEquals("String_Node_Str" + bytesDownloaded + "String_Node_Str"+ (bytesDownloaded + TEST_CHUNK_SIZE - 1),getHeaders().get("String_Node_Str").get(0));
  if (testServerError && lowLevelExecCalls == 2) {
    response.setStatusCode(500);
    return response;
  }
 else   if (testClientError) {
    response.setStatusCode(404);
    return response;
  }
  response.setStatusCode(206);
  int upper=Math.min(bytesDownloaded + TEST_CHUNK_SIZE,contentLength) - 1;
  response.addHeader("String_Node_Str","String_Node_Str" + bytesDownloaded + "String_Node_Str"+ upper+ "String_Node_Str"+ contentLength);
  int bytesDownloadedCur=upper - bytesDownloaded + 1;
  response.setContent(new ByteArrayInputStream(new byte[bytesDownloadedCur]));
  bytesDownloaded+=bytesDownloadedCur;
  return response;
}
Program: 54853
Project: 54853
Buggy source:
public void testDownloadMultipleCallsMaxChunkSize() throws Exception {
  int contentLength=MediaHttpDownloader.MAXIMUM_CHUNK_SIZE * 3;
  ByteArrayOutputStream outputStream=new ByteArrayOutputStream();
  MediaTransport fakeTransport=new MediaTransport(contentLength);
  MediaHttpDownloader downloader=new MediaHttpDownloader(fakeTransport,null);
  downloader.download(new GenericUrl(TEST_REQUEST_URL),outputStream);
  assertEquals(TEST_CHUNK_SIZE,outputStream.size());
  assertEquals(3,fakeTransport.lowLevelExecCalls);
}

Fixed version (ground truth):
public void testDownloadMultipleCallsMaxChunkSize() throws Exception {
  int contentLength=MediaHttpDownloader.MAXIMUM_CHUNK_SIZE * 3;
  ByteArrayOutputStream outputStream=new ByteArrayOutputStream();
  MediaTransport fakeTransport=new MediaTransport(contentLength);
  MediaHttpDownloader downloader=new MediaHttpDownloader(fakeTransport,null);
  downloader.download(new GenericUrl(TEST_REQUEST_URL),outputStream);
  assertEquals(contentLength,outputStream.size());
  assertEquals(3,fakeTransport.lowLevelExecCalls);
}
Program: 54854
Project: 54854
Buggy source:
public void testSetBytesDownloaded() throws Exception {
  int contentLength=MediaHttpDownloader.MAXIMUM_CHUNK_SIZE;
  MediaTransport fakeTransport=new MediaTransport(contentLength);
  fakeTransport.bytesDownloaded=contentLength - 10000;
  MediaHttpDownloader downloader=new MediaHttpDownloader(fakeTransport,null);
  downloader.setBytesDownloaded(contentLength - 10000);
  ByteArrayOutputStream outputStream=new ByteArrayOutputStream();
  downloader.download(new GenericUrl(TEST_REQUEST_URL),outputStream);
  assertEquals(1,fakeTransport.lowLevelExecCalls);
}

Fixed version (ground truth):
public void testSetBytesDownloaded() throws Exception {
  int contentLength=MediaHttpDownloader.MAXIMUM_CHUNK_SIZE;
  MediaTransport fakeTransport=new MediaTransport(contentLength);
  fakeTransport.bytesDownloaded=contentLength - 10000;
  MediaHttpDownloader downloader=new MediaHttpDownloader(fakeTransport,null);
  downloader.setBytesDownloaded(contentLength - 10000);
  ByteArrayOutputStream outputStream=new ByteArrayOutputStream();
  downloader.download(new GenericUrl(TEST_REQUEST_URL),outputStream);
  assertEquals(10000,outputStream.size());
  assertEquals(1,fakeTransport.lowLevelExecCalls);
}
Program: 54855
Project: 54855
Buggy source:
@Override protected void doPost(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException {
  String subscriptionId=req.getHeader(SubscriptionHeaders.SUBSCRIPTION_ID);
  if (subscriptionId == null) {
    resp.sendError(HttpServletResponse.SC_BAD_REQUEST,"String_Node_Str");
    return;
  }
  String topicId=req.getHeader(SubscriptionHeaders.TOPIC_ID);
  String topicUri=req.getHeader(SubscriptionHeaders.TOPIC_URI);
  String eventType=req.getHeader(SubscriptionHeaders.EVENT_TYPE);
  String clientToken=req.getHeader(SubscriptionHeaders.CLIENT_TOKEN);
  if (topicId == null || topicUri == null || eventType == null) {
    resp.sendError(HttpServletResponse.SC_BAD_REQUEST,"String_Node_Str");
    return;
  }
  InputStream contentStream=req.getInputStream();
  try {
    UnparsedNotification notification=new UnparsedNotification(subscriptionId,topicId,topicUri,clientToken,eventType,req.getContentType(),contentStream);
    if (!getSubscriptionManager().deliverNotification(notification)) {
      sendUnsubscribeResponse(resp,notification);
    }
  }
 catch (  Exception ex) {
    throw new IOException(ex);
  }
 finally {
    contentStream.close();
  }
}

Fixed version (ground truth):
@Override protected void doPost(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException {
  String subscriptionId=req.getHeader(SubscriptionHeaders.SUBSCRIPTION_ID);
  if (subscriptionId == null) {
    resp.sendError(HttpServletResponse.SC_BAD_REQUEST,"String_Node_Str");
    return;
  }
  String topicId=req.getHeader(SubscriptionHeaders.TOPIC_ID);
  String topicUri=req.getHeader(SubscriptionHeaders.TOPIC_URI);
  String eventType=req.getHeader(SubscriptionHeaders.EVENT_TYPE);
  String clientToken=req.getHeader(SubscriptionHeaders.CLIENT_TOKEN);
  if (topicId == null || topicUri == null || eventType == null) {
    resp.sendError(HttpServletResponse.SC_BAD_REQUEST,"String_Node_Str");
    return;
  }
  InputStream contentStream=req.getInputStream();
  try {
    UnparsedNotification notification=new UnparsedNotification(subscriptionId,topicId,topicUri,clientToken,eventType,req.getContentType(),contentStream);
    if (!getSubscriptionManager().deliverNotification(notification)) {
      sendUnsubscribeResponse(resp,notification);
    }
  }
 catch (  Exception ex) {
    IOException io=new IOException();
    io.initCause(ex);
    throw io;
  }
 finally {
    contentStream.close();
  }
}
Program: 54856
Project: 54856
Buggy source:
public void testLoad() throws IOException {
  GoogleClientSecrets clientSecrets=GoogleClientSecrets.load(new GsonFactory(),new ByteArrayInputStream(CLIENT_SECRETS.getBytes(Charsets.UTF_8)));
  Details installed=clientSecrets.getInstalled();
  assertNotNull(installed);
  assertEquals(CLIENT_ID,installed.getClientId());
  assertEquals(CLIENT_SECRET,installed.getClientSecret());
}

Fixed version (ground truth):
public void testLoad() throws IOException {
  GoogleClientSecrets clientSecrets=GoogleClientSecrets.load(new GsonFactory(),new ByteArrayInputStream(StringUtils.getBytesUtf8(CLIENT_SECRETS)));
  Details installed=clientSecrets.getInstalled();
  assertNotNull(installed);
  assertEquals(CLIENT_ID,installed.getClientId());
  assertEquals(CLIENT_SECRET,installed.getClientSecret());
}
Program: 54858
Project: 54858
Buggy source:
/** 
 * Create an instance of   {@link AppAssertionFlow} that is specialized for communicating with Google APIs.
 * @param robotName Identifier that will eventually become the primary key for the credentialobject created by this flow. This is usually the application's identifier.
 * @param scope OAuth scope for which we are requesting access.
 * @param transport Instance that we will use for network communication.
 * @param jsonFactory Instance that we will use to deserialize responses from the auth server.
 */
public GoogleAppAssertionFlow(String robotName,String scope,HttpTransport transport,JsonFactory jsonFactory){
  super(robotName,GoogleAccessTokenRequest.AUTHORIZATION_SERVER_URL,scope,GoogleAccessTokenRequest.AUTHORIZATION_SERVER_URL,transport,jsonFactory);
}

Fixed version (ground truth):
/** 
 * Create an instance of   {@link AppAssertionFlow} that is specialized for communicating withGoogle APIs.
 * @param robotName Identifier that will eventually become the primary key for the credentialobject created by this flow. This is usually the application's identifier.
 * @param scope OAuth scope for which we are requesting access.
 * @param transport Instance that we will use for network communication.
 * @param jsonFactory Instance that we will use to deserialize responses from the auth server.
 */
public GoogleAppAssertionFlow(String robotName,String scope,HttpTransport transport,JsonFactory jsonFactory){
  super(robotName,GoogleAccessTokenRequest.AUTHORIZATION_SERVER_URL,scope,GoogleAccessTokenRequest.AUTHORIZATION_SERVER_URL,transport,jsonFactory);
}
Program: 54860
Project: 54860
Buggy source:
/** 
 * Returns a deep clone of the given key/value data, such that the result is a completely independent copy. <p> This should not be used directly in the implementation of   {@code Object.clone()}. Instead use  {@link #deepCopy(Object,Object)} for that purpose.</p> <p> Final fields cannot be changed and therefore their value won't be copied. </p>
 * @param data key/value data object or map to clone or {@code null} for a {@code null} returnvalue
 * @return deep clone or {@code null} for {@code null} input
 */
@SuppressWarnings("String_Node_Str") public static <T>T clone(T data){
  if (data == null || Data.isPrimitive(data.getClass())) {
    return data;
  }
  if (data instanceof GenericData) {
    return (T)((GenericData)data).clone();
  }
  T copy;
  Class<?> dataClass=data.getClass();
  if (dataClass.isArray()) {
    copy=(T)Array.newInstance(dataClass.getComponentType(),Array.getLength(data));
  }
 else   if (data instanceof ArrayMap<?,?>) {
    copy=(T)ArrayMap.create();
  }
 else {
    copy=(T)Types.newInstance(dataClass);
  }
  deepCopy(data,copy);
  return copy;
}

Fixed version (ground truth):
/** 
 * Returns a deep clone of the given key/value data, such that the result is a completely independent copy. <p> This should not be used directly in the implementation of   {@code Object.clone()}. Instead use  {@link #deepCopy(Object,Object)} for that purpose.</p> <p> Final fields cannot be changed and therefore their value won't be copied. </p>
 * @param data key/value data object or map to clone or {@code null} for a {@code null} returnvalue
 * @return deep clone or {@code null} for {@code null} input
 */
@SuppressWarnings("String_Node_Str") public static <T>T clone(T data){
  if (data == null || Data.isPrimitive(data.getClass())) {
    return data;
  }
  if (data instanceof GenericData) {
    return (T)((GenericData)data).clone();
  }
  T copy;
  Class<?> dataClass=data.getClass();
  if (dataClass.isArray()) {
    copy=(T)Array.newInstance(dataClass.getComponentType(),Array.getLength(data));
  }
 else   if (data instanceof ArrayMap<?,?>) {
    copy=(T)((ArrayMap<?,?>)data).clone();
  }
 else {
    copy=(T)Types.newInstance(dataClass);
  }
  deepCopy(data,copy);
  return copy;
}
Program: 54862
Project: 54862
Buggy source:
public void intercept(HttpRequest request){
  if (overrideThisMethod(request)) {
    HttpMethod method=request.method;
    request.method=HttpMethod.POST;
    request.headers.set("String_Node_Str",method.name());
    if (request.content == null) {
      InputStreamContent content=new InputStreamContent();
      content.setByteArrayInput(new byte[0]);
      request.content=content;
    }
  }
  if (!HttpTransport.useLowLevelHttpTransport().supportsHead()) {
    overriddenMethods.add("String_Node_Str");
  }
}

Fixed version (ground truth):
public void intercept(HttpRequest request){
  if (overrideThisMethod(request)) {
    HttpMethod method=request.method;
    request.method=HttpMethod.POST;
    request.headers.set("String_Node_Str",method.name());
    if (request.content == null) {
      InputStreamContent content=new InputStreamContent();
      content.setByteArrayInput(new byte[0]);
      request.content=content;
    }
  }
}
Program: 54864
Project: 54864
Buggy source:
public void test() throws IOException {
  HttpTransport transport=GoogleTransport.create();
  GoogleStorageAuthentication.authorize(transport,"String_Node_Str","String_Node_Str");
  HttpExecuteIntercepter intercepter=transport.intercepters.get(1);
  HttpRequest request=transport.buildPutRequest();
  request.setUrl("String_Node_Str");
  GoogleHeaders headers=(GoogleHeaders)request.headers;
  headers.date="String_Node_Str";
  MockHttpContent content=new MockHttpContent();
  content.length=4539;
  content.type="String_Node_Str";
  request.content=content;
  headers.googAcl="String_Node_Str";
  headers.set("String_Node_Str",Arrays.asList("String_Node_Str","String_Node_Str"));
  intercepter.intercept(request);
  assertEquals("String_Node_Str",request.headers.authorization);
}

Fixed version (ground truth):
public void test() throws Exception {
  subtest("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  subtest("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  subtest("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  subtest("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  subtest("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 54866
Project: 54866
Buggy source:
public void test() throws IOException {
  HttpTransport transport=GoogleTransport.create();
  GoogleStorageAuthentication.authorize(transport,"String_Node_Str","String_Node_Str");
  HttpExecuteIntercepter intercepter=transport.intercepters.get(1);
  HttpRequest request=transport.buildPutRequest();
  request.setUrl("String_Node_Str");
  GoogleHeaders headers=(GoogleHeaders)request.headers;
  headers.date="String_Node_Str";
  MockHttpContent content=new MockHttpContent();
  content.length=4539;
  content.type="String_Node_Str";
  request.content=content;
  headers.googAcl="String_Node_Str";
  headers.set("String_Node_Str",Arrays.asList("String_Node_Str","String_Node_Str"));
  intercepter.intercept(request);
  assertEquals("String_Node_Str",request.headers.authorization);
}

Fixed version (ground truth):
public void test() throws Exception {
  subtest("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  subtest("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  subtest("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  subtest("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  subtest("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 54867
Project: 54867
Buggy source:
NetHttpRequest(NetHttpTransport transport,String requestMethod,String url) throws IOException {
  this.transport=transport;
  HttpURLConnection connection=this.connection=(HttpURLConnection)new URL(url).openConnection();
  connection.setRequestMethod(requestMethod);
  connection.setUseCaches(false);
}

Fixed version (ground truth):
NetHttpRequest(NetHttpTransport transport,String requestMethod,String url) throws IOException {
  this.transport=transport;
  HttpURLConnection connection=this.connection=(HttpURLConnection)new URL(url).openConnection();
  connection.setRequestMethod(requestMethod);
  connection.setUseCaches(false);
  connection.setInstanceFollowRedirects(false);
}
Program: 54869
Project: 54869
Buggy source:
NetHttpTransport(){
}

Fixed version (ground truth):
NetHttpTransport(){
  HttpURLConnection.setFollowRedirects(false);
}
Program: 54870
Project: 54870
Buggy source:
public DateTime(boolean dateOnly,long value,Integer tzShift){
  this.dateOnly=false;
  this.value=value;
  this.tzShift=tzShift;
}

Fixed version (ground truth):
public DateTime(boolean dateOnly,long value,Integer tzShift){
  this.dateOnly=dateOnly;
  this.value=value;
  this.tzShift=tzShift;
}
Program: 54871
Project: 54871
Buggy source:
public void testParseDateTime(){
  expectExceptionForParseRfc3339("String_Node_Str");
  expectExceptionForParseRfc3339("String_Node_Str");
  DateTime.parseRfc3339("String_Node_Str");
  DateTime.parseRfc3339("String_Node_Str");
}

Fixed version (ground truth):
public void testParseDateTime(){
  expectExceptionForParseRfc3339("String_Node_Str");
  expectExceptionForParseRfc3339("String_Node_Str");
  DateTime value=DateTime.parseRfc3339("String_Node_Str");
  assertTrue(value.dateOnly);
  value=DateTime.parseRfc3339("String_Node_Str");
  assertFalse(value.dateOnly);
}
Program: 54872
Project: 54872
Buggy source:
ApacheHttpTransport(){
  HttpParams params=new BasicHttpParams();
  HttpConnectionParams.setStaleCheckingEnabled(params,false);
  HttpConnectionParams.setConnectionTimeout(params,20 * 1000);
  HttpConnectionParams.setSoTimeout(params,20 * 1000);
  HttpConnectionParams.setSocketBufferSize(params,8192);
  this.httpClient=new DefaultHttpClient(params);
}

Fixed version (ground truth):
ApacheHttpTransport(){
  HttpParams params=new BasicHttpParams();
  HttpConnectionParams.setStaleCheckingEnabled(params,false);
  HttpConnectionParams.setConnectionTimeout(params,20 * 1000);
  HttpConnectionParams.setSoTimeout(params,20 * 1000);
  HttpConnectionParams.setSocketBufferSize(params,8192);
  params.setBooleanParameter(ClientPNames.HANDLE_REDIRECTS,false);
  this.httpClient=new DefaultHttpClient(params);
}
Program: 54873
Project: 54873
Buggy source:
@Override public LowLevelHttpResponse execute() throws IOException {
  HttpURLConnection connection=this.connection;
  HttpContent content=this.content;
  if (content != null) {
    connection.setDoOutput(true);
    addHeader("String_Node_Str",content.getType());
    String contentEncoding=content.getEncoding();
    if (contentEncoding != null) {
      addHeader("String_Node_Str",contentEncoding);
    }
    long contentLength=content.getLength();
    if (contentLength >= 0) {
      addHeader("String_Node_Str",Long.toString(contentLength));
    }
    content.writeTo(connection.getOutputStream());
  }
  String httpStrictPostRedirect=System.getProperty("String_Node_Str");
  try {
    System.setProperty("String_Node_Str","String_Node_Str");
    connection.connect();
    return new NetHttpResponse(connection);
  }
  finally {
    if (httpStrictPostRedirect == null) {
      System.clearProperty("String_Node_Str");
    }
 else {
      System.setProperty("String_Node_Str",httpStrictPostRedirect);
    }
  }
}

Fixed version (ground truth):
@Override public LowLevelHttpResponse execute() throws IOException {
  HttpURLConnection connection=this.connection;
  HttpContent content=this.content;
  if (content != null) {
    connection.setDoOutput(true);
    addHeader("String_Node_Str",content.getType());
    String contentEncoding=content.getEncoding();
    if (contentEncoding != null) {
      addHeader("String_Node_Str",contentEncoding);
    }
    long contentLength=content.getLength();
    if (contentLength >= 0) {
      addHeader("String_Node_Str",Long.toString(contentLength));
    }
    content.writeTo(connection.getOutputStream());
  }
  connection.connect();
  return new NetHttpResponse(connection);
}
Program: 54876
Project: 54876
Buggy source:
private void computeAliases(Object element,SortedSet<String> aliases){
  for (  Map.Entry<String,Object> entry : DataUtil.mapOf(element).entrySet()) {
    Object value=entry.getValue();
    if (value != null) {
      String name=entry.getKey();
      if (!"String_Node_Str".equals(name)) {
        int colon=name.indexOf(':');
        boolean isAttribute=name.charAt(0) == '@';
        if (colon != -1 || !isAttribute) {
          String alias=colon == -1 ? "String_Node_Str" : name.substring(name.charAt(0) == '@' ? 1 : 0,colon);
          aliases.add(alias);
        }
        if (!isAttribute && !FieldInfo.isPrimitive(value)) {
          computeAliases(value,aliases);
        }
      }
    }
  }
}

Fixed version (ground truth):
private void computeAliases(Object element,SortedSet<String> aliases){
  for (  Map.Entry<String,Object> entry : DataUtil.mapOf(element).entrySet()) {
    Object value=entry.getValue();
    if (value != null) {
      String name=entry.getKey();
      if (!"String_Node_Str".equals(name)) {
        int colon=name.indexOf(':');
        boolean isAttribute=name.charAt(0) == '@';
        if (colon != -1 || !isAttribute) {
          String alias=colon == -1 ? "String_Node_Str" : name.substring(name.charAt(0) == '@' ? 1 : 0,colon);
          aliases.add(alias);
        }
        if (!isAttribute && !FieldInfo.isPrimitive(value)) {
          if (value instanceof Collection<?>) {
            for (            Object subValue : (Collection<?>)value) {
              computeAliases(subValue,aliases);
            }
          }
 else {
            computeAliases(value,aliases);
          }
        }
      }
    }
  }
}
Program: 54877
Project: 54877
Buggy source:
public static TestSuite suite(){
  TestSuite result=new TestSuite();
  result.addTest(com.google.api.client.auth.oauth.AllTests.suite());
  result.addTest(com.google.api.client.googleapis.auth.storage.AllTests.suite());
  result.addTest(com.google.api.client.http.AllTests.suite());
  result.addTest(com.google.api.client.util.AllTests.suite());
  return result;
}

Fixed version (ground truth):
public static TestSuite suite(){
  TestSuite result=new TestSuite();
  result.addTest(com.google.api.client.auth.oauth.AllTests.suite());
  result.addTest(com.google.api.client.googleapis.auth.storage.AllTests.suite());
  result.addTest(com.google.api.client.http.AllTests.suite());
  result.addTest(com.google.api.client.util.AllTests.suite());
  result.addTest(com.google.api.client.xml.AllTests.suite());
  return result;
}
Program: 54878
Project: 54878
Buggy source:
@Before public void setup(){
  MockitoAnnotations.initMocks(this);
  fragment=new LightCycleSupportFragment();
  fragment.addLifeCycleComponent(lightCycle);
  activityController=attach(fragment);
}

Fixed version (ground truth):
@Before public void setup(){
  MockitoAnnotations.initMocks(this);
  fragment=new LightCycleSupportFragment();
  fragment.attachLightCycle(lightCycle);
  activityController=attach(fragment);
}
Program: 54879
Project: 54879
Buggy source:
@Before public void setUp() throws Exception {
  MockitoAnnotations.initMocks(this);
  dispatcher=new SupportFragmentLightCycleDispatcher().addLifeCycleComponent(lifeCycleComponent1).addLifeCycleComponent(lifeCycleComponent2);
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  MockitoAnnotations.initMocks(this);
  dispatcher=new SupportFragmentLightCycleDispatcher();
  dispatcher.attachLightCycle(lifeCycleComponent1);
  dispatcher.attachLightCycle(lifeCycleComponent2);
}
Program: 54880
Project: 54880
Buggy source:
@Override public boolean onTouch(View v,MotionEvent event){
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
    isClick=true;
  touchPosition(i);
return true;
case MotionEvent.ACTION_CANCEL:
touchPosition(-1);
return true;
case MotionEvent.ACTION_MOVE:
isClick=false;
return false;
case MotionEvent.ACTION_UP:
touchPosition(-1);
if (isClick && mNavigationDrawerCallbacks != null) {
mNavigationDrawerCallbacks.onNavigationDrawerItemSelected(i);
}
return true;
}
return false;
}

Fixed version (ground truth):
@Override public boolean onTouch(View v,MotionEvent event){
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
    touchPosition(i);
  return false;
case MotionEvent.ACTION_CANCEL:
touchPosition(-1);
return false;
case MotionEvent.ACTION_MOVE:
return false;
case MotionEvent.ACTION_UP:
touchPosition(-1);
return false;
}
return true;
}
Program: 54881
Project: 54881
Buggy source:
@Override public void onBindViewHolder(NavigationDrawerAdapter.ViewHolder viewHolder,final int i){
  viewHolder.textView.setText(mData.get(i).getText());
  viewHolder.textView.setCompoundDrawablesWithIntrinsicBounds(mData.get(i).getDrawable(),null,null,null);
  viewHolder.itemView.setOnTouchListener(new View.OnTouchListener(){
    @Override public boolean onTouch(    View v,    MotionEvent event){
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
        isClick=true;
      touchPosition(i);
    return true;
case MotionEvent.ACTION_CANCEL:
  touchPosition(-1);
return true;
case MotionEvent.ACTION_MOVE:
isClick=false;
return false;
case MotionEvent.ACTION_UP:
touchPosition(-1);
if (isClick && mNavigationDrawerCallbacks != null) {
mNavigationDrawerCallbacks.onNavigationDrawerItemSelected(i);
}
return true;
}
return false;
}
}
);
if (mSelectedPosition == i && mTouchedPosition == i) {
viewHolder.itemView.setBackgroundColor(Color.LTGRAY);
}
 else if (mSelectedPosition == i || mTouchedPosition == i) {
viewHolder.itemView.setBackgroundColor(viewHolder.itemView.getContext().getResources().getColor(R.color.selected_gray));
}
 else {
viewHolder.itemView.setBackgroundColor(Color.TRANSPARENT);
}
}

Fixed version (ground truth):
@Override public void onBindViewHolder(NavigationDrawerAdapter.ViewHolder viewHolder,final int i){
  viewHolder.textView.setText(mData.get(i).getText());
  viewHolder.textView.setCompoundDrawablesWithIntrinsicBounds(mData.get(i).getDrawable(),null,null,null);
  viewHolder.itemView.setOnTouchListener(new View.OnTouchListener(){
    @Override public boolean onTouch(    View v,    MotionEvent event){
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
        touchPosition(i);
      return false;
case MotionEvent.ACTION_CANCEL:
    touchPosition(-1);
  return false;
case MotionEvent.ACTION_MOVE:
return false;
case MotionEvent.ACTION_UP:
touchPosition(-1);
return false;
}
return true;
}
}
);
viewHolder.itemView.setOnClickListener(new View.OnClickListener(){
@Override public void onClick(View v){
if (mNavigationDrawerCallbacks != null) mNavigationDrawerCallbacks.onNavigationDrawerItemSelected(i);
}
}
);
if (mSelectedPosition == i || mTouchedPosition == i) {
viewHolder.itemView.setBackgroundColor(viewHolder.itemView.getContext().getResources().getColor(R.color.selected_gray));
}
 else {
viewHolder.itemView.setBackgroundColor(Color.TRANSPARENT);
}
}
Program: 54882
Project: 54882
Buggy source:
public SettingsHandler(String passwordToken){
  this.passwordToken=passwordToken;
}

Fixed version (ground truth):
public SettingsHandler(String settingNamePasswordToken){
  this.settingNamePasswordToken=settingNamePasswordToken;
}
Program: 54883
Project: 54883
Buggy source:
protected void writeSettings(Map<String,String> settings,BufferedWriter writer) throws IOException {
  Set<String> names=new TreeSet<>(settings.keySet());
  for (  String name : names) {
    String value=settings.get(name);
    if (maskingPassword && value.contains(passwordToken)) {
      value="String_Node_Str";
    }
    writer.write(name + "String_Node_Str" + value);
    writer.newLine();
  }
}

Fixed version (ground truth):
protected void writeSettings(Map<String,String> settings,BufferedWriter writer) throws IOException {
  Set<String> names=new TreeSet<>(settings.keySet());
  for (  String name : names) {
    if (maskingPassword && name.contains(settingNamePasswordToken)) {
      writer.write(name + "String_Node_Str");
    }
 else {
      writer.write(name + "String_Node_Str" + settings.get(name));
    }
    writer.newLine();
  }
}
Program: 54884
Project: 54884
Buggy source:
@Override public URL getResourceUrl(String resourcePath){
  String resourceName=getResourceBasePath() + "String_Node_Str" + resourcePath;
  return this.getClass().getClassLoader().getResource(resourceName);
}

Fixed version (ground truth):
@Override public URL getResourceUrl(String resourcePath){
  if (!isValidResourcePath(resourceBasePath,resourcePath)) {
    log.warn("String_Node_Str",resourcePath,resourceBasePath);
    return null;
  }
  String resourceName=getResourceBasePath() + "String_Node_Str" + resourcePath;
  return this.getClass().getClassLoader().getResource(resourceName);
}
Program: 54885
Project: 54885
Buggy source:
@Override public URL getResourceUrl(String resourcePath){
  String resourceName=getResourceBasePath() + "String_Node_Str" + resourcePath;
  String artifactPath=resourcePath.substring(0,resourcePath.indexOf('/') + 1);
  if (pathAliases.containsKey(artifactPath)) {
    String artifactVersion=pathAliases.get(artifactPath);
    if (!resourcePath.startsWith(artifactVersion)) {
      String aliasedPath=artifactVersion + resourcePath.substring(artifactPath.length());
      log.trace("String_Node_Str",resourcePath,aliasedPath);
      resourceName=getResourceBasePath() + "String_Node_Str" + aliasedPath;
    }
  }
  URL url=this.getClass().getClassLoader().getResource(resourceName);
  if (url == null) {
    log.warn("String_Node_Str",resourceName);
  }
  return url;
}

Fixed version (ground truth):
@Override public URL getResourceUrl(String resourcePath){
  if (!isValidResourcePath(resourceBasePath,resourcePath)) {
    log.warn("String_Node_Str",resourcePath,resourceBasePath);
    return null;
  }
  String resourceName=getResourceBasePath() + "String_Node_Str" + resourcePath;
  String artifactPath=resourcePath.substring(0,resourcePath.indexOf('/') + 1);
  if (pathAliases.containsKey(artifactPath)) {
    String artifactVersion=pathAliases.get(artifactPath);
    if (!resourcePath.startsWith(artifactVersion)) {
      String aliasedPath=artifactVersion + resourcePath.substring(artifactPath.length());
      log.trace("String_Node_Str",resourcePath,aliasedPath);
      resourceName=getResourceBasePath() + "String_Node_Str" + aliasedPath;
    }
  }
  URL url=this.getClass().getClassLoader().getResource(resourceName);
  if (url == null) {
    log.warn("String_Node_Str",resourceName);
  }
  return url;
}
Program: 54886
Project: 54886
Buggy source:
private void commit(CharSequence content){
  checkCommitted();
  finalizeResponse();
  if (getContentType() == null) {
    contentType(HttpConstants.ContentType.TEXT_HTML);
  }
  try {
    if (content != null) {
      contentLength(content.toString().getBytes().length);
      httpServletResponse.getWriter().append(content);
    }
    log.trace("String_Node_Str");
    if (chunked) {
      httpServletResponse.flushBuffer();
    }
  }
 catch (  IOException e) {
    throw new PippoRuntimeException(e);
  }
}

Fixed version (ground truth):
private void commit(CharSequence content){
  checkCommitted();
  finalizeResponse();
  if (getContentType() == null) {
    contentType(HttpConstants.ContentType.TEXT_HTML);
  }
  try {
    if (content != null) {
      contentLength(content.toString().getBytes().length);
      httpServletResponse.getWriter().append(content);
    }
    log.trace("String_Node_Str");
    if (chunked) {
      httpServletResponse.flushBuffer();
    }
    finishGZip();
  }
 catch (  IOException e) {
    throw new PippoRuntimeException(e);
  }
}
Program: 54887
Project: 54887
Buggy source:
public GZipRequestResponseFactory(Application application){
  super(application);
  application.getRoutePostDispatchListeners().add(this);
}

Fixed version (ground truth):
public GZipRequestResponseFactory(Application application){
  super(application);
}
Program: 54888
Project: 54888
Buggy source:
void finish(){
  try {
    if (writer != null) {
      writer.close();
    }
 else {
      if (stream != null) {
        stream.close();
      }
    }
  }
 catch (  IOException e) {
  }
}

Fixed version (ground truth):
public void finish(){
  IoUtils.close(writer);
  IoUtils.close(stream);
}
Program: 54889
Project: 54889
Buggy source:
@Override public WebServer setPippoFilter(PippoFilter pippoFilter){
  this.application=pippoFilter.getApplication();
}

Fixed version (ground truth):
@Override public WebServer setPippoFilter(PippoFilter pippoFilter){
  this.application=pippoFilter.getApplication();
  return this;
}
Program: 54890
Project: 54890
Buggy source:
@Override public WebServer setPippoFilter(PippoFilter pippoFilter){
  super.setPippoFilter(pippoFilter);
  application=pippoFilter.getApplication();
}

Fixed version (ground truth):
@Override public WebServer setPippoFilter(PippoFilter pippoFilter){
  super.setPippoFilter(pippoFilter);
  application=pippoFilter.getApplication();
  return this;
}
Program: 54891
Project: 54891
Buggy source:
private void enableSSLConnector(Tomcat tomcat){
  log.info("String_Node_Str");
  Connector connector=tomcat.getConnector();
  connector.setPort(getSettings().getPort());
  connector.setSecure(true);
  connector.setScheme("String_Node_Str");
  connector.setAttribute("String_Node_Str",getSettings().getKeyAlias());
  connector.setAttribute("String_Node_Str",getSettings().getKeystorePassword());
  connector.setAttribute("String_Node_Str",getSettings().getKeyType());
  connector.setAttribute("String_Node_Str",getSettings().getKeystoreFile());
  connector.setAttribute("String_Node_Str",getSettings().getTruststoreFile());
  connector.setAttribute("String_Node_Str",getSettings().getTruststorePassword());
  connector.setAttribute("String_Node_Str",getSettings().getClientAuth());
  connector.setAttribute("String_Node_Str","String_Node_Str");
  connector.setAttribute("String_Node_Str","String_Node_Str");
  connector.setAttribute("String_Node_Str",getSettings().getMaxConnections());
  connector.setAttribute("String_Node_Str","String_Node_Str");
  connector.setAttribute("String_Node_Str",true);
}

Fixed version (ground truth):
private void enableSSLConnector(Tomcat tomcat){
  log.info("String_Node_Str");
  Connector connector=tomcat.getConnector();
  connector.setPort(getSettings().getPort());
  connector.setSecure(true);
  connector.setScheme("String_Node_Str");
  connector.setAttribute("String_Node_Str",getSettings().getKeyAlias());
  connector.setAttribute("String_Node_Str",getSettings().getKeystorePassword());
  connector.setAttribute("String_Node_Str",getSettings().getKeyType());
  connector.setAttribute("String_Node_Str",getSettings().getKeystoreFile());
  connector.setAttribute("String_Node_Str",getSettings().getClientAuth());
  if (getSettings().getClientAuth()) {
    connector.setAttribute("String_Node_Str",getSettings().getTruststoreFile());
    connector.setAttribute("String_Node_Str",getSettings().getTruststorePassword());
  }
  connector.setAttribute("String_Node_Str","String_Node_Str");
  connector.setAttribute("String_Node_Str","String_Node_Str");
  connector.setAttribute("String_Node_Str",getSettings().getMaxConnections());
  connector.setAttribute("String_Node_Str","String_Node_Str");
  connector.setAttribute("String_Node_Str",true);
}
Program: 54892
Project: 54892
Buggy source:
/** 
 * Transforms an url pattern like "/{name}/id/*" into a regex like "/([^/]*)/id/*." <p/> Also handles regular expressions if defined inside routes: For instance "/users/{username: [a-zA-Z][a-zA-Z_0-9]}" becomes "/users/([a-zA-Z][a-zA-Z_0-9])"
 * @return The converted regex with default matching regex - or the regexspecified by the user.
 */
private String getRegex(String urlPattern){
  StringBuffer buffer=new StringBuffer();
  Matcher matcher=PATTERN_FOR_VARIABLE_PARTS_OF_ROUTE.matcher(urlPattern);
  while (matcher.find()) {
    String variablePartOfRouteName=matcher.group(1);
    String namedVariablePartOfRoute=matcher.group(3);
    String namedVariablePartOfORouteReplacedWithRegex;
    if (namedVariablePartOfRoute != null) {
      String variableRegex=replacePosixClasses(namedVariablePartOfRoute);
      namedVariablePartOfORouteReplacedWithRegex=String.format("String_Node_Str",variablePartOfRouteName,Matcher.quoteReplacement(variableRegex));
    }
 else {
      namedVariablePartOfORouteReplacedWithRegex=String.format(VARIABLE_ROUTES_DEFAULT_REGEX,variablePartOfRouteName);
    }
    matcher.appendReplacement(buffer,namedVariablePartOfORouteReplacedWithRegex);
  }
  matcher.appendTail(buffer);
  return buffer.toString();
}

Fixed version (ground truth):
/** 
 * Transforms an url pattern like "/{name}/id/*" into a regex like "/([^/]*)/id/*." <p/> Also handles regular expressions if defined inside routes: For instance "/users/{username: [a-zA-Z][a-zA-Z_0-9]}" becomes "/users/([a-zA-Z][a-zA-Z_0-9])"
 * @return The converted regex with default matching regex - or the regexspecified by the user.
 */
private String getRegex(String urlPattern){
  StringBuffer buffer=new StringBuffer();
  Matcher matcher=PATTERN_FOR_VARIABLE_PARTS_OF_ROUTE.matcher(urlPattern);
  int pathParameterIndex=0;
  while (matcher.find()) {
    String namedVariablePartOfRoute=matcher.group(3);
    String namedVariablePartOfORouteReplacedWithRegex;
    if (namedVariablePartOfRoute != null) {
      String variableRegex=replacePosixClasses(namedVariablePartOfRoute);
      namedVariablePartOfORouteReplacedWithRegex=String.format("String_Node_Str",getPathParameterRegexGroupName(pathParameterIndex),Matcher.quoteReplacement(variableRegex));
    }
 else {
      namedVariablePartOfORouteReplacedWithRegex=String.format(VARIABLE_ROUTES_DEFAULT_REGEX,getPathParameterRegexGroupName(pathParameterIndex));
    }
    matcher.appendReplacement(buffer,namedVariablePartOfORouteReplacedWithRegex);
    pathParameterIndex++;
  }
  matcher.appendTail(buffer);
  return buffer.toString();
}
Program: 54893
Project: 54893
Buggy source:
private Map<String,String> getParameters(PatternBinding binding,String requestUri){
  if (binding.getParameterNames().isEmpty()) {
    return Collections.EMPTY_MAP;
  }
  Map<String,String> parameters=new HashMap<>();
  List<String> parameterNames=binding.getParameterNames();
  Matcher matcher=binding.getPattern().matcher(requestUri);
  matcher.matches();
  int groupCount=matcher.groupCount();
  if (groupCount > 0) {
    for (    String name : parameterNames) {
      parameters.put(name,matcher.group(name));
    }
  }
  return parameters;
}

Fixed version (ground truth):
private Map<String,String> getParameters(PatternBinding binding,String requestUri){
  if (binding.getParameterNames().isEmpty()) {
    return Collections.EMPTY_MAP;
  }
  Map<String,String> parameters=new HashMap<>();
  List<String> parameterNames=binding.getParameterNames();
  Matcher matcher=binding.getPattern().matcher(requestUri);
  matcher.matches();
  int groupCount=matcher.groupCount();
  if (groupCount > 0) {
    for (int i=0; i < parameterNames.size(); i++) {
      parameters.put(parameterNames.get(i),matcher.group(getPathParameterRegexGroupName(i)));
    }
  }
  return parameters;
}
Program: 54894
Project: 54894
Buggy source:
public String getAbsoluteUriPattern(){
  if (absoluteUriPattern == null) {
    RouteGroup group=this.group;
    String path=this.uriPattern;
    while (group != null) {
      path=StringUtils.addStart(StringUtils.addStart(path,"String_Node_Str"),group.getUriPattern());
      group=group.getParent();
    }
    absoluteUriPattern=StringUtils.removeEnd(path,"String_Node_Str");
  }
  return absoluteUriPattern;
}

Fixed version (ground truth):
public String getAbsoluteUriPattern(){
  if (absoluteUriPattern == null) {
    RouteGroup group=this.group;
    String path=this.uriPattern;
    while (group != null) {
      path=StringUtils.addStart(StringUtils.addStart(path,"String_Node_Str"),group.getUriPattern());
      group=group.getParent();
    }
    absoluteUriPattern="String_Node_Str".equals(path) ? path : StringUtils.removeEnd(path,"String_Node_Str");
  }
  return absoluteUriPattern;
}
Program: 54895
Project: 54895
Buggy source:
@Override public void handleResource(String resourcePath,RouteContext routeContext){
  URL url=getResourceUrl(resourcePath);
  if (url == null) {
    routeContext.getResponse().notFound().commit();
  }
 else {
    streamResource(url,routeContext);
  }
  routeContext.next();
}

Fixed version (ground truth):
@Override public void handleResource(String resourcePath,RouteContext routeContext){
  URL url=getResourceUrl(resourcePath);
  if (url == null) {
    routeContext.getResponse().notFound().commit();
  }
 else {
    streamResource(url,routeContext);
  }
}
Program: 54896
Project: 54896
Buggy source:
private PatternBinding getBinding(String nameOrUriPattern){
  Collection<List<PatternBinding>> values=bindingsCache.values();
  for (  List<PatternBinding> bindings : values) {
    for (    PatternBinding binding : bindings) {
      if (nameOrUriPattern.equals(binding.getRoute().getNameOrUriPattern())) {
        return binding;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
private PatternBinding getBinding(String nameOrUriPattern){
  Collection<List<PatternBinding>> values=bindingsCache.values();
  Route route;
  for (  List<PatternBinding> bindings : values) {
    for (    PatternBinding binding : bindings) {
      route=binding.getRoute();
      if (nameOrUriPattern.equals(route.getName()) || nameOrUriPattern.equals(route.getUriPattern())) {
        return binding;
      }
    }
  }
  return null;
}
Program: 54897
Project: 54897
Buggy source:
private void removeBinding(Route route){
  PatternBinding binding=getBinding(route.getNameOrUriPattern());
  bindingsCache.get(route.getRequestMethod()).remove(binding);
}

Fixed version (ground truth):
private void removeBinding(Route route){
  String nameOrUriPattern=StringUtils.isNullOrEmpty(route.getName()) ? route.getUriPattern() : route.getName();
  PatternBinding binding=getBinding(nameOrUriPattern);
  bindingsCache.get(route.getRequestMethod()).remove(binding);
}
Program: 54898
Project: 54898
Buggy source:
@Override public Reader getReader(String templateName) throws LoaderException {
  StringBuilder path=new StringBuilder("String_Node_Str");
  if (getPrefix() != null) {
    path.append(getPrefix());
    if (!getPrefix().endsWith(String.valueOf(File.separatorChar))) {
      path.append(File.separatorChar);
    }
  }
  String resource=path.toString() + templateName + (getSuffix() == null ? "String_Node_Str" : getSuffix());
  String location=resource;
  if (resource.charAt(0) == '/') {
    location=resource.substring(1);
  }
  URL url=ClasspathUtils.locateOnClasspath(location);
  if (url == null) {
    throw new LoaderException(null,"String_Node_Str" + location + "String_Node_Str");
  }
  Reader reader=null;
  try {
    InputStream is=url.openStream();
    InputStreamReader isr=new InputStreamReader(is,getCharset());
    reader=new BufferedReader(isr);
  }
 catch (  IOException e) {
    throw new PippoRuntimeException(e);
  }
  return reader;
}

Fixed version (ground truth):
@Override public Reader getReader(String templateName) throws LoaderException {
  StringBuilder path=new StringBuilder("String_Node_Str");
  if (getPrefix() != null) {
    path.append(getPrefix());
    if (!getPrefix().endsWith(String.valueOf('/'))) {
      path.append('/');
    }
  }
  String resource=path.toString() + templateName + (getSuffix() == null ? "String_Node_Str" : getSuffix());
  String location=resource;
  if (resource.charAt(0) == '/') {
    location=resource.substring(1);
  }
  URL url=ClasspathUtils.locateOnClasspath(location);
  if (url == null) {
    throw new LoaderException(null,"String_Node_Str" + location + "String_Node_Str");
  }
  Reader reader=null;
  try {
    InputStream is=url.openStream();
    InputStreamReader isr=new InputStreamReader(is,getCharset());
    reader=new BufferedReader(isr);
  }
 catch (  IOException e) {
    throw new PippoRuntimeException(e);
  }
  return reader;
}