Source:
<code>public CompletableFuture<List<PresignedUrl>> authWrites(PublicKeyHash owner, PublicKeyHash writerHash, List<byte[]> signedHashes, List<Integer> blockSizes, boolean isRaw, TransactionId tid) { try { if (signedHashes.size() > 50) throw new IllegalStateException("Too many writes to auth!"); if (blockSizes.size() != signedHashes.size()) throw new IllegalStateException("Number of sizes doesn't match number of signed hashes!"); PublicSigningKey writer = getSigningKey(writerHash).get().get(); List<Pair<Multihash, Integer>> blockProps = new ArrayList<>(); for (int i=0; i < signedHashes.size(); i++) { Cid.Codec codec = isRaw ? Cid.Codec.Raw : Cid.Codec.DagCbor; Cid cid = new Cid(1, codec, Multihash.Type.sha2_256, writer.unsignMessage(signedHashes.get(i))); blockProps.add(new Pair<>(cid, blockSizes.get(i))); } List<PresignedUrl> res = new ArrayList<>(); for (Pair<Multihash, Integer> props : blockProps) { if (props.left.type != Multihash.Type.sha2_256) throw new IllegalStateException("Can only pre-auth writes of sha256 hashed blocks!"); transactions.addBlock(props.left, tid, owner); String s3Key = hashToKey(props.left); String contentSha256 = ArrayOps.bytesToHex(props.left.getHash()); <START> String host = bucket + "." + region + ".linodeobjects.com"; <END> Map<String, String> extraHeaders = new LinkedHashMap<>(); extraHeaders.put("Content-Type", "application/octet-stream"); res.add(S3Request.preSignUrl(s3Key, props.right, contentSha256, false, ZonedDateTime.now(), "PUT", host, extraHeaders, region, accessKeyId, secretKey)); } return Futures.of(res); } catch (Exception e) { throw new RuntimeException(e); } }</code><technical_language>hard-code</technical_language>

Target:
public CompletableFuture<List<PresignedUrl>> authWrites(PublicKeyHash owner, PublicKeyHash writerHash, List<byte[]> signedHashes, List<Integer> blockSizes, boolean isRaw, TransactionId tid) { try { if (signedHashes.size() > 50) throw new IllegalStateException("Too many writes to auth!"); if (blockSizes.size() != signedHashes.size()) throw new IllegalStateException("Number of sizes doesn't match number of signed hashes!"); PublicSigningKey writer = getSigningKey(writerHash).get().get(); List<Pair<Multihash, Integer>> blockProps = new ArrayList<>(); for (int i=0; i < signedHashes.size(); i++) { Cid.Codec codec = isRaw ? Cid.Codec.Raw : Cid.Codec.DagCbor; Cid cid = new Cid(1, codec, Multihash.Type.sha2_256, writer.unsignMessage(signedHashes.get(i))); blockProps.add(new Pair<>(cid, blockSizes.get(i))); } List<PresignedUrl> res = new ArrayList<>(); for (Pair<Multihash, Integer> props : blockProps) { if (props.left.type != Multihash.Type.sha2_256) throw new IllegalStateException("Can only pre-auth writes of sha256 hashed blocks!"); transactions.addBlock(props.left, tid, owner); String s3Key = hashToKey(props.left); String contentSha256 = ArrayOps.bytesToHex(props.left.getHash()); String host = bucket + "." + regionEndpoint; Map<String, String> extraHeaders = new LinkedHashMap<>(); extraHeaders.put("Content-Type", "application/octet-stream"); res.add(S3Request.preSignUrl(s3Key, props.right, contentSha256, false, ZonedDateTime.now(), "PUT", host, extraHeaders, region, accessKeyId, secretKey)); } return Futures.of(res); } catch (Exception e) { throw new RuntimeException(e); } }