Program: 3568
Project: 3568
Buggy source:
@SuppressWarnings("String_Node_Str") private T parseResponse(OkHttpPendingResult<T,R> request,Response response) throws Exception {
  if (RETRY_ERROR_CODES.contains(response.code()) && cumulativeSleepTime < errorTimeOut) {
    return request.retry();
  }
  byte[] bytes=getBytes(response);
  R resp;
  String contentType=response.header("String_Node_Str");
  if (contentType != null && contentType.startsWith("String_Node_Str") && responseClass == PhotoRequest.Response.class && response.code() == 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()).setFieldNamingPolicy(fieldNamingPolicy).create();
  try {
    resp=gson.fromJson(new String(bytes,"String_Node_Str"),responseClass);
  }
 catch (  JsonSyntaxException e) {
    if (!response.isSuccessful()) {
      throw new IOException(String.format("String_Node_Str",response.code(),response.message()));
    }
    throw e;
  }
  if (resp.successful()) {
    return resp.getResult();
  }
 else {
    ApiException e=resp.getError();
    if (e instanceof OverQueryLimitException && cumulativeSleepTime < errorTimeOut) {
      return request.retry();
    }
 else {
      throw e;
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private T parseResponse(OkHttpPendingResult<T,R> request,Response response) throws Exception {
  if (RETRY_ERROR_CODES.contains(response.code()) && cumulativeSleepTime < errorTimeOut) {
    return request.retry();
  }
  byte[] bytes=getBytes(response);
  R resp;
  String contentType=response.header("String_Node_Str");
  LOG.log(Level.INFO,"String_Node_Str",response);
  LOG.log(Level.INFO,"String_Node_Str",new String(bytes,"String_Node_Str"));
  if (contentType != null && contentType.startsWith("String_Node_Str") && responseClass == PhotoRequest.Response.class && response.code() == 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) {
    LOG.log(Level.INFO,"String_Node_Str",e);
    if (!response.isSuccessful()) {
      throw new IOException(String.format("String_Node_Str",response.code(),response.message()));
    }
    throw e;
  }
  if (resp.successful()) {
    return resp.getResult();
  }
 else {
    ApiException e=resp.getError();
    if (e instanceof OverQueryLimitException && cumulativeSleepTime < errorTimeOut) {
      return request.retry();
    }
 else {
      throw e;
    }
  }
}