#fixed code
                              DatastoreStorage(Datastore datastore, Duration retryBaseDelay) {
    this.datastore = Objects.requireNonNull(datastore);
    this.retryBaseDelay = Objects.requireNonNull(retryBaseDelay);

    this.componentKeyFactory = datastore.newKeyFactory().kind(KIND_COMPONENT);
    this.globalConfigKey = datastore.newKeyFactory().kind(KIND_STYX_CONFIG).newKey(KEY_GLOBAL_CONFIG);
  }
#vulnerable code 
                              List<Backfill> getBackfills() {
    final EntityQuery query = Query.entityQueryBuilder().kind(KIND_BACKFILL).build();
    final QueryResults<Entity> results = datastore.run(query);
    final ImmutableList.Builder<Backfill> resources = ImmutableList.builder();
    while (results.hasNext()) {
      resources.add(entityToBackfill(results.next()));
    }
    return resources.build();
  } 
                            #location 1 
                            #vulnerability type CHECKERS_IMMUTABLE_CAST