Buggy code:
public class ReadError extends BaseHandler { @ Override protected byte inFlows ( ) { } @ Override protected InvocationResponse doProcessing ( MessageContext mc ) throws DatabaseException { SOAPHeaderBlock messaging = Messaging . getElement ( mc . getEnvelope ( ) ) ; if ( messaging != null ) { log . debug ( "Check<seq2seq4repair_space>for<seq2seq4repair_space>Error<seq2seq4repair_space>elements<seq2seq4repair_space>to<seq2seq4repair_space>determine<seq2seq4repair_space>if<seq2seq4repair_space>message<seq2seq4repair_space>contains<seq2seq4repair_space>one<seq2seq4repair_space>or<seq2seq4repair_space>more<seq2seq4repair_space>errors" ) ; Iterator < OMElement > errorSigs = ErrorSignal . getElements ( messaging ) ; <START_BUG> if ( Utils . isNullOrEmpty ( errorSigs ) ) { <END_BUG> log . debug ( "Error<seq2seq4repair_space>Signal(s)<seq2seq4repair_space>found,<seq2seq4repair_space>read<seq2seq4repair_space>information<seq2seq4repair_space>from<seq2seq4repair_space>message" ) ; while ( errorSigs . hasNext ( ) ) { OMElement errElem = errorSigs . next ( ) ; ErrorMessage errorSignal = null ; try { errorSignal = ErrorSignal . readElement ( errElem ) ; log . debug ( "Store<seq2seq4repair_space>Error<seq2seq4repair_space>Signal<seq2seq4repair_space>in<seq2seq4repair_space>database" ) ; MessageUnitDAO . storeReceivedMessageUnit ( errorSignal ) ; MessageContextUtils . addRcvdError ( mc , errorSignal ) ; log . debug ( "Check<seq2seq4repair_space>consistency<seq2seq4repair_space>of<seq2seq4repair_space>references" ) ; if ( ! ( checkRefConsistency ( errorSignal ) ) ) { log . warn ( ( ( "The<seq2seq4repair_space>references<seq2seq4repair_space>containd<seq2seq4repair_space>in<seq2seq4repair_space>Error<seq2seq4repair_space>signal<seq2seq4repair_space>[msgId=" + ( errorSignal . getMessageId ( ) ) ) + "]<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>consistent!" ) ) ; ValueInconsistent viError = new ValueInconsistent ( ) ; viError . setErrorDetail ( "Error<seq2seq4repair_space>contains<seq2seq4repair_space>inconsistent<seq2seq4repair_space>references" ) ; viError . setRefToMessageInError ( errorSignal . getMessageId ( ) ) ; MessageContextUtils . addGeneratedError ( mc , viError ) ; MessageUnitDAO . setFailed ( errorSignal ) ; } else { log . debug ( "References<seq2seq4repair_space>are<seq2seq4repair_space>consistent" ) ; } } catch ( PackagingException ex ) { log . error ( ( "Received<seq2seq4repair_space>error<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>read<seq2seq4repair_space>from<seq2seq4repair_space>message!<seq2seq4repair_space>Details:<seq2seq4repair_space>" + ( ex . getMessage ( ) ) ) ) ; InvalidHeader invalidHdrError = new InvalidHeader ( ) ; invalidHdrError . setErrorDetail ( ( ( ( ex . getMessage ( ) ) + "\nSource<seq2seq4repair_space>of<seq2seq4repair_space>header<seq2seq4repair_space>containing<seq2seq4repair_space>the<seq2seq4repair_space>error:" ) + ( errElem . toString ( ) ) ) ) ; MessageContextUtils . addGeneratedError ( mc , invalidHdrError ) ; } } } else log . debug ( "ebMS<seq2seq4repair_space>message<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>contain<seq2seq4repair_space>Error(s)" ) ; } else { log . debug ( "Not<seq2seq4repair_space>an<seq2seq4repair_space>ebMS<seq2seq4repair_space>message,<seq2seq4repair_space>nothing<seq2seq4repair_space>to<seq2seq4repair_space>do." ) ; } return InvocationResponse . CONTINUE ; } private boolean checkRefConsistency ( final ErrorMessage errSignal ) { } }

Fix:
if ( ! ( Utils . isNullOrEmpty ( errorSigs ) ) ) {