Buggy code:
public class ClaimBackupValidator implements Callable < ResponseVS > { private static Logger log = Logger . getLogger ( ClaimBackupValidator . class ) ; private ValidatorListener validatorListener = null ; private File backupDir = null ; private List < String > errorList = new ArrayList < String > ( ) ; private Set < TrustAnchor > trustAnchors ; private X509Certificate timeStampServerCert ; private MetaInf metaInf ; private String eventURL = null ; private String claimFileName = null ; public ClaimBackupValidator ( String backupPath , ValidatorListener validatorListener ) throws Exception { } private String checkByteArraySize ( byte [ ] signedFileBytes ) { } @ Override public ResponseVS call ( ) throws Exception { } private void notifyValidationListener ( Integer statusCode , String message , ValidationEvent validationEvent ) { } private ResponseVS validateClaims ( ) throws Exception { ClaimBackupValidator . log . debug ( "validateClaims" ) ; File [ ] batchDirs = backupDir . listFiles ( ) ; int statusCode = ResponseVS . SC_OK ; int numClaimsOK = 0 ; int numClaimsERROR = 0 ; Map < String , String > signersNifMap = new HashMap < String , String > ( ) ; for ( File batchDir : batchDirs ) { if ( batchDir . isDirectory ( ) ) { File [ ] claims = batchDir . listFiles ( ) ; for ( File claim : claims ) { if ( ! ( claim . getAbsolutePath ( ) . contains ( claimFileName ) ) ) continue ; String errorMessage = null ; byte [ ] accessRequestBytes = FileUtils . getBytesFromFile ( claim ) ; SignedFile signedFile = new SignedFile ( accessRequestBytes , claim . getName ( ) , null ) ; <START_BUG> ResponseVS validationResponse = DocumentVSValidator . validateClaim ( signedFile , trustAnchors , eventURL , metaInf . getDateInit ( ) , metaInf . getDateFinish ( ) , timeStampServerCert ) ; <END_BUG> statusCode = validationResponse . getStatusCode ( ) ; if ( ( ResponseVS . SC_OK ) == ( validationResponse . getStatusCode ( ) ) ) { boolean repeatedSignature = signersNifMap . containsKey ( signedFile . getSignerNif ( ) ) ; if ( repeatedSignature ) { numClaimsERROR ++ ; errorMessage = ( ( ( ( ContextVS . getInstance ( ) . getMessage ( "claimSignatureRepeatedErrorMsg" , signedFile . getSignerNif ( ) ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( claim . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( signersNifMap . get ( signedFile . getSignerNif ( ) ) ) ; } else { numClaimsOK ++ ; signersNifMap . put ( signedFile . getSignerNif ( ) , claim . getAbsolutePath ( ) ) ; } } else { numClaimsERROR ++ ; errorMessage = ( ( "ERROR<seq2seq4repair_space>CLAIM<seq2seq4repair_space>SIGNATURE<seq2seq4repair_space>-<seq2seq4repair_space>File:<seq2seq4repair_space>" + ( claim . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>msg:<seq2seq4repair_space>" ) + ( validationResponse . getMessage ( ) ) ; } if ( errorMessage != null ) { statusCode = ResponseVS . SC_ERROR ; ClaimBackupValidator . log . error ( errorMessage ) ; errorList . add ( errorMessage ) ; } notifyValidationListener ( statusCode , validationResponse . getMessage ( ) , CLAIM ) ; } } } statusCode = ResponseVS . SC_OK ; ClaimBackupValidator . log . debug ( ( ( ( "numClaimsOK:<seq2seq4repair_space>" + numClaimsOK ) + "<seq2seq4repair_space>-<seq2seq4repair_space>numClaimsERROR:<seq2seq4repair_space>" ) + numClaimsERROR ) ) ; String message = null ; if ( ( metaInf . getNumSignatures ( ) ) != numClaimsOK ) { statusCode = ResponseVS . SC_ERROR ; message = ContextVS . getInstance ( ) . getMessage ( "numClaimSignaturesErrorMsg" , metaInf . getNumAccessRequest ( ) , numClaimsOK ) ; } else message = ContextVS . getInstance ( ) . getMessage ( "claimsValidationResultMsg" , metaInf . getNumAccessRequest ( ) ) ; return new ResponseVS ( statusCode , message ) ; } public static void main ( String [ ] args ) throws Exception { } No newline ; at end ; of file ; }

Fix:
ResponseVS validationResponse = DocumentVSValidator . validateClaim ( signedFile , trustAnchors , eventURL , metaInf . getDateBegin ( ) , metaInf . getDateFinish ( ) , timeStampServerCert ) ;