Source:
<code>public void copyObject( String bucketName, String objectName, Map<String, String> headerMap, ServerSideEncryption sse, String srcBucketName, String srcObjectName, ServerSideEncryption srcSse, CopyConditions copyConditions) throws ErrorResponseException, IllegalArgumentException, InsufficientDataException, InternalException, InvalidBucketNameException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException { ServerSideEncryptionCustomerKey srcSsec = null; if (srcSse instanceof ServerSideEncryptionCustomerKey) { srcSsec = (ServerSideEncryptionCustomerKey) srcSse; } checkReadRequestSse(srcSse); CopyObjectArgs.Builder builder = CopyObjectArgs.builder() .bucket(bucketName) .object(objectName) .headers(headerMap) .sse(sse) .srcBucket(srcBucketName) .srcObject(srcObjectName) .srcSsec(srcSsec); if (copyConditions != null) { Map<String, String> map = copyConditions.getConditions(); String value; builder.srcMatchETag(map.get("x-amz-copy-source-if-match")); builder.srcNotMatchETag(map.get("x-amz-copy-source-if-none-match")); value = map.get("x-amz-copy-source-if-modified-since"); if (value != null) { builder.srcModifiedSince(ZonedDateTime.parse(value, Time.HTTP_HEADER_DATE_FORMAT)); } value = map.get("x-amz-copy-source-if-unmodified-since"); if (value != null) { builder.srcUnmodifiedSince(ZonedDateTime.parse(value, Time.HTTP_HEADER_DATE_FORMAT)); } value = map.get("x-amz-metadata-directive"); if (value != null) { <START> builder.metadataDirective(Directive.REPLACE); <END> } } copyObject(builder.build()); }</code><technical_language>suggestion builder.metadataDirective(value);</technical_language>

Target:
public void copyObject( String bucketName, String objectName, Map<String, String> headerMap, ServerSideEncryption sse, String srcBucketName, String srcObjectName, ServerSideEncryption srcSse, CopyConditions copyConditions) throws ErrorResponseException, IllegalArgumentException, InsufficientDataException, InternalException, InvalidBucketNameException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException { ServerSideEncryptionCustomerKey srcSsec = null; if (srcSse instanceof ServerSideEncryptionCustomerKey) { srcSsec = (ServerSideEncryptionCustomerKey) srcSse; } checkReadRequestSse(srcSse); CopyObjectArgs.Builder builder = CopyObjectArgs.builder() .bucket(bucketName) .object(objectName) .headers(headerMap) .sse(sse) .srcBucket(srcBucketName) .srcObject(srcObjectName) .srcSsec(srcSsec); if (copyConditions != null) { Map<String, String> map = copyConditions.getConditions(); String value; builder.srcMatchETag(map.get("x-amz-copy-source-if-match")); builder.srcNotMatchETag(map.get("x-amz-copy-source-if-none-match")); value = map.get("x-amz-copy-source-if-modified-since"); if (value != null) { builder.srcModifiedSince(ZonedDateTime.parse(value, Time.HTTP_HEADER_DATE_FORMAT)); } value = map.get("x-amz-copy-source-if-unmodified-since"); if (value != null) { builder.srcUnmodifiedSince(ZonedDateTime.parse(value, Time.HTTP_HEADER_DATE_FORMAT)); } value = map.get("x-amz-metadata-directive"); if (value != null) { builder.metadataDirective(Directive.valueOf(value)); } } copyObject(builder.build()); }