Buggy code:
public class S3Source extends SyncSource < S3Source . S3SyncObject > { private static final Logger l4j = Logger . getLogger ( S3Source . class ) ; public static final String BUCKET_OPTION = "source-bucket" ; public static final String BUCKET_DESC = "Required.<seq2seq4repair_space>Specifies<seq2seq4repair_space>the<seq2seq4repair_space>source<seq2seq4repair_space>bucket<seq2seq4repair_space>to<seq2seq4repair_space>use." ; public static final String BUCKET_ARG_NAME = "bucket" ; public static final String DECODE_KEYS_OPTION = "source-decode-keys" ; public static final String DECODE_KEYS_DESC = "If<seq2seq4repair_space>specified,<seq2seq4repair_space>keys<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>URL-decoded<seq2seq4repair_space>after<seq2seq4repair_space>listing<seq2seq4repair_space>them.<seq2seq4repair_space>This<seq2seq4repair_space>can<seq2seq4repair_space>fix<seq2seq4repair_space>problems<seq2seq4repair_space>if<seq2seq4repair_space>you<seq2seq4repair_space>see<seq2seq4repair_space>file<seq2seq4repair_space>or<seq2seq4repair_space>directory<seq2seq4repair_space>names<seq2seq4repair_space>with<seq2seq4repair_space>characters<seq2seq4repair_space>like<seq2seq4repair_space>%2f<seq2seq4repair_space>in<seq2seq4repair_space>them." ; public static final String DISABLE_VHOSTS_OPTION = "source-disable-vhost" ; public static final String DISABLE_VHOSTS_DESC = "If<seq2seq4repair_space>specified,<seq2seq4repair_space>virtual<seq2seq4repair_space>hosted<seq2seq4repair_space>buckets<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>disabled<seq2seq4repair_space>and<seq2seq4repair_space>path-style<seq2seq4repair_space>buckets<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>used." ; public static final String OPERATION_DELETE_OBJECT = "S3DeleteObject" ; private String protocol ; private String endpoint ; private String accessKey ; private String secretKey ; private boolean disableVHosts ; private String bucketName ; private String rootKey ; private boolean decodeKeys ; private AmazonS3 s3 ; @ Override public boolean canHandleSource ( String sourceUri ) { } @ Override public Options getCustomOptions ( ) { } @ Override public void parseCustomOptions ( CommandLine line ) { } @ Override public void configure ( SyncSource source , Iterator < SyncFilter > filters , SyncTarget target ) { Assert . hasText ( accessKey , "accessKey<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; Assert . hasText ( secretKey , "secretKey<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; Assert . hasText ( bucketName , "bucketName<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; <START_BUG> Assert . isTrue ( bucketName . matches ( "[A-Za-z0-9.-_]+" ) , ( ( bucketName ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>bucket<seq2seq4repair_space>name" ) ) ; <END_BUG> AWSCredentials creds = new BasicAWSCredentials ( accessKey , secretKey ) ; ClientConfiguration config = new ClientConfiguration ( ) ; if ( ( protocol ) != null ) config . setProtocol ( Protocol . valueOf ( protocol . toUpperCase ( ) ) ) ; s3 = new com . amazonaws . services . s3 . AmazonS3Client ( creds , config ) ; if ( ( endpoint ) != null ) s3 . setEndpoint ( endpoint ) ; if ( disableVHosts ) { S3Source . l4j . info ( "The<seq2seq4repair_space>use<seq2seq4repair_space>of<seq2seq4repair_space>virtual<seq2seq4repair_space>hosted<seq2seq4repair_space>buckets<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>s3<seq2seq4repair_space>source<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>DISABLED.<seq2seq4repair_space>Path<seq2seq4repair_space>style<seq2seq4repair_space>buckets<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>used." ) ; S3ClientOptions opts = new S3ClientOptions ( ) ; opts . setPathStyleAccess ( true ) ; s3 . setS3ClientOptions ( opts ) ; } if ( ! ( s3 . doesBucketExist ( bucketName ) ) ) { throw new ConfigurationException ( ( ( "The<seq2seq4repair_space>bucket<seq2seq4repair_space>" + ( bucketName ) ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist." ) ) ; } if ( ( rootKey ) == null ) rootKey = "" ; if ( rootKey . startsWith ( "//" ) ) rootKey = rootKey . substring ( 1 ) ; } @ Override public Iterator < S3Source . S3SyncObject > iterator ( ) { } @ Override public Iterator < S3Source . S3SyncObject > childIterator ( S3Source . S3SyncObject syncObject ) { } @ Override public void delete ( final S3Source . S3SyncObject syncObject ) { } @ Override public String getName ( ) { } @ Override public String getDocumentation ( ) { } protected String getRelativePath ( String key ) { } protected String decodeKey ( String key ) { } private Map < String , SyncMetadata . UserMetadata > toMetaMap ( Map < String , String > sourceMap ) { } public class S3SyncObject extends SyncObject < String > { public S3SyncObject ( String key , String relativePath , boolean isCommonPrefix ) { } @ Override public InputStream createSourceInputStream ( ) { } @ Override protected void loadObject ( ) { } } protected class PrefixIterator extends ReadOnlyIterator < S3Source . S3SyncObject > { private String key ; private ObjectListing listing ; private Iterator < S3ObjectSummary > objectIterator ; private Iterator < String > prefixIterator ; public PrefixIterator ( String key ) { } @ Override protected S3Source . S3SyncObject getNextObject ( ) { } private void getNextBatch ( ) { } } public String getBucketName ( ) { } public void setBucketName ( String bucketName ) { } public String getRootKey ( ) { } public void setRootKey ( String rootKey ) { } public String getProtocol ( ) { } public void setProtocol ( String protocol ) { } public String getEndpoint ( ) { } public void setEndpoint ( String endpoint ) { } public String getAccessKey ( ) { } public void setAccessKey ( String accessKey ) { } public String getSecretKey ( ) { } public void setSecretKey ( String secretKey ) { } public boolean isDecodeKeys ( ) { } public void setDecodeKeys ( boolean decodeKeys ) { } }

Fix:
Assert . isTrue ( bucketName . matches ( "[A-Za-z0-9._-]+" ) , ( ( bucketName ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>bucket<seq2seq4repair_space>name" ) ) ;