#vulnerable code 
                                ChunkServer.StorageHostChunkList adjustExpiryTimestamp(ChunkServer.StorageHostChunkList container, long offset) {
        if (!container.getHostInfo().hasExpiry()) {
            // Shouldn't happen, can probably remove this check.
            logger.warn("-- adjustExpiryTimestamp() - no expiry timestamp: {}", container.getHostInfo());
            return setExpiryTimestamp(container, System.currentTimeMillis() + FALLBACK_DURATION_MS);
        }
        long timestamp = container.getHostInfo().getExpiry() + offset;
        return setExpiryTimestamp(container, timestamp);
    } 
                            #location 5 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                FileGroups adjustExpiryTimestamp(FileGroups fileGroups, Optional<Long> timestampOffset) {
        // We adjust the FileGroups timestamps based on machine time/ server time deltas. This allows us to function
        // with inaccurate machine clocks. 
        List<FileChecksumStorageHostChunkLists> fileGroupsList = fileGroups.getFileGroupsList()
                .stream()
                .map(u -> adjustExpiryTimestamp(u, timestampOffset))
                .collect(toList());
        return fileGroups
                .toBuilder()
                .clearFileGroups()
                .addAllFileGroups(fileGroupsList)
                .build();
    }