Program: 3559
Project: 3559
Buggy source:
@SuppressWarnings("String_Node_Str") private T parseResponse(GaePendingResult<T,R> request,HTTPResponse response) throws IOException, ApiException, InterruptedException {
  if (shouldRetry(response)) {
    return request.retry();
  }
  byte[] bytes=response.getContent();
  R resp;
  String contentType=null;
  for (  HTTPHeader header : response.getHeaders()) {
    if (header.getName().equalsIgnoreCase("String_Node_Str")) {
      contentType=header.getValue();
    }
  }
  if (contentType != null && contentType.startsWith("String_Node_Str") && responseClass == PhotoRequest.Response.class && response.getResponseCode() == 200) {
    PhotoResult result=new PhotoResult();
    result.contentType=contentType;
    result.imageData=bytes;
    return (T)result;
  }
  Gson gson=new GsonBuilder().registerTypeAdapter(DateTime.class,new DateTimeAdapter()).registerTypeAdapter(Distance.class,new DistanceAdapter()).registerTypeAdapter(Duration.class,new DurationAdapter()).registerTypeAdapter(Fare.class,new FareAdapter()).registerTypeAdapter(LatLng.class,new LatLngAdapter()).registerTypeAdapter(AddressComponentType.class,new SafeEnumAdapter<AddressComponentType>(AddressComponentType.UNKNOWN)).registerTypeAdapter(AddressType.class,new SafeEnumAdapter<AddressType>(AddressType.UNKNOWN)).registerTypeAdapter(TravelMode.class,new SafeEnumAdapter<TravelMode>(TravelMode.UNKNOWN)).registerTypeAdapter(LocationType.class,new SafeEnumAdapter<LocationType>(LocationType.UNKNOWN)).registerTypeAdapter(RatingType.class,new SafeEnumAdapter<RatingType>(RatingType.UNKNOWN)).registerTypeAdapter(DayOfWeek.class,new DayOfWeekAdaptor()).registerTypeAdapter(PriceLevel.class,new PriceLevelAdaptor()).registerTypeAdapter(Instant.class,new InstantAdapter()).registerTypeAdapter(LocalTime.class,new LocalTimeAdapter()).registerTypeAdapter(GeolocationApi.Response.class,new GeolocationResponseAdapter()).setFieldNamingPolicy(fieldNamingPolicy).create();
  try {
    resp=gson.fromJson(new String(bytes,"String_Node_Str"),responseClass);
  }
 catch (  JsonSyntaxException e) {
    if (response.getResponseCode() > 399) {
      throw new IOException(String.format("String_Node_Str",response.getResponseCode(),new String(response.getContent(),Charset.defaultCharset())));
    }
    throw e;
  }
  if (resp.successful()) {
    return resp.getResult();
  }
 else {
    ApiException e=resp.getError();
    if (shouldRetry(e)) {
      return request.retry();
    }
 else {
      throw e;
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private T parseResponse(GaePendingResult<T,R> request,HTTPResponse response) throws IOException, ApiException, InterruptedException {
  if (shouldRetry(response)) {
    return request.retry();
  }
  byte[] bytes=response.getContent();
  R resp;
  String contentType=null;
  for (  HTTPHeader header : response.getHeaders()) {
    if (header.getName().equalsIgnoreCase("String_Node_Str")) {
      contentType=header.getValue();
    }
  }
  if (contentType != null && contentType.startsWith("String_Node_Str") && responseClass == PhotoRequest.Response.class && response.getResponseCode() == 200) {
    PhotoResult result=new PhotoResult();
    result.contentType=contentType;
    result.imageData=bytes;
    return (T)result;
  }
  Gson gson=new GsonBuilder().registerTypeAdapter(DateTime.class,new DateTimeAdapter()).registerTypeAdapter(Distance.class,new DistanceAdapter()).registerTypeAdapter(Duration.class,new DurationAdapter()).registerTypeAdapter(Fare.class,new FareAdapter()).registerTypeAdapter(LatLng.class,new LatLngAdapter()).registerTypeAdapter(AddressComponentType.class,new SafeEnumAdapter<AddressComponentType>(AddressComponentType.UNKNOWN)).registerTypeAdapter(AddressType.class,new SafeEnumAdapter<AddressType>(AddressType.UNKNOWN)).registerTypeAdapter(TravelMode.class,new SafeEnumAdapter<TravelMode>(TravelMode.UNKNOWN)).registerTypeAdapter(LocationType.class,new SafeEnumAdapter<LocationType>(LocationType.UNKNOWN)).registerTypeAdapter(RatingType.class,new SafeEnumAdapter<RatingType>(RatingType.UNKNOWN)).registerTypeAdapter(DayOfWeek.class,new DayOfWeekAdaptor()).registerTypeAdapter(PriceLevel.class,new PriceLevelAdaptor()).registerTypeAdapter(Instant.class,new InstantAdapter()).registerTypeAdapter(LocalTime.class,new LocalTimeAdapter()).registerTypeAdapter(GeolocationApi.Response.class,new GeolocationResponseAdapter()).registerTypeAdapter(EncodedPolyline.class,new EncodedPolylineInstanceCreator("String_Node_Str")).setFieldNamingPolicy(fieldNamingPolicy).create();
  try {
    resp=gson.fromJson(new String(bytes,"String_Node_Str"),responseClass);
  }
 catch (  JsonSyntaxException e) {
    if (response.getResponseCode() > 399) {
      throw new IOException(String.format("String_Node_Str",response.getResponseCode(),new String(response.getContent(),Charset.defaultCharset())));
    }
    throw e;
  }
  if (resp.successful()) {
    return resp.getResult();
  }
 else {
    ApiException e=resp.getError();
    if (shouldRetry(e)) {
      return request.retry();
    }
 else {
      throw e;
    }
  }
}