Buggy code:
public String getValueForChoiceKey ( final String surveyId , final String promptId , final String key ) throws DomainException { } private String getChoiceValueFrom ( final Prompt prompt , final String label ) throws DomainException { } public String getLabelForChoiceKey ( final String surveyId , final String promptId , final String key ) throws DomainException { } public Map < Integer , LabelValuePair > getChoiceGlossaryFor ( final String surveyId , final String promptId ) throws DomainException { } public String getUnitFor ( final String surveyId , final String promptId ) throws DomainException { } public JSONObject toJson ( final boolean withId , final boolean withClasses , final boolean withRoles , final boolean withParticipants , final boolean withAnalysts , final boolean withAuthors , final boolean withSupervisors , final boolean withXml , final boolean withSurveys ) throws JSONException { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } private String getChoiceLabelFrom ( final Prompt prompt , final String key ) throws DomainException { } private static String getId ( final Node root ) throws DomainException { } private static String getName ( final Node root ) throws DomainException { } private static URL getServerUrl ( final Node root ) throws DomainException { } private static URL getIconUrl ( final Node root ) throws DomainException { } private static String getAuthoredBy ( final Node root ) throws DomainException { } private static Map < String , Survey > getSurveys ( final Node root ) throws DomainException { } private static List < Survey > processSurveys ( final Nodes surveys ) throws DomainException { } private static List < String > getSurveyItemIds ( final Collection < SurveyItem > items ) { } private static Survey processSurvey ( final Node survey ) throws DomainException { } private static List < SurveyItem > processContentList ( final String surveyId , final Nodes contentListItems ) throws DomainException { } private static Message processMessage ( final String containerId , final Node message , final int index , final List < SurveyItem > alreadyProcessedItemsInSurveyItemGroup ) throws DomainException { } private static RepeatableSet processRepeatableSet ( final String containerId , final Node repeatableSet , final int index , final List < SurveyItem > alreadyProcessedItemsInSurveyItemGroup ) throws DomainException { } private static final Lock parserLock = new ReentrantLock ( ) ; private static Prompt processPrompt ( final String containerId , final Node prompt , final int index , final List < SurveyItem > alreadyProcessedItemsInSurveyItemGroup ) throws DomainException { Nodes ids = prompt . query ( Campaign . XML_PROMPT_ID ) ; if ( ( ids . size ( ) ) == 0 ) { throw new DomainException ( ( "The<seq2seq4repair_space>prompt<seq2seq4repair_space>ID<seq2seq4repair_space>is<seq2seq4repair_space>missing:<seq2seq4repair_space>" + containerId ) ) ; } else if ( ( ids . size ( ) ) > 1 ) { throw new DomainException ( ( "Multiple<seq2seq4repair_space>prompt<seq2seq4repair_space>IDs<seq2seq4repair_space>were<seq2seq4repair_space>found:<seq2seq4repair_space>" + containerId ) ) ; } String id = ids . get ( 0 ) . getValue ( ) . trim ( ) ; if ( ( id . length ( ) ) == 0 ) { throw new DomainException ( ( "The<seq2seq4repair_space>prompt's<seq2seq4repair_space>ID<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>only<seq2seq4repair_space>whitespace<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>survey<seq2seq4repair_space>item<seq2seq4repair_space>container:<seq2seq4repair_space>" + containerId ) ) ; } if ( ! ( Campaign . VALID_CHARACTERS_PATTERN . matcher ( id ) . matches ( ) ) ) { throw new DomainException ( ( "The<seq2seq4repair_space>prompt's<seq2seq4repair_space>ID<seq2seq4repair_space>contains<seq2seq4repair_space>illegal<seq2seq4repair_space>characters:<seq2seq4repair_space>" + id ) ) ; } String condition = null ; Nodes conditions = prompt . query ( Campaign . XML_PROMPT_CONDITION ) ; if ( ( conditions . size ( ) ) > 1 ) { throw new DomainException ( ( "Multiple<seq2seq4repair_space>prompt<seq2seq4repair_space>conditions<seq2seq4repair_space>were<seq2seq4repair_space>found:<seq2seq4repair_space>" + id ) ) ; } else if ( ( conditions . size ( ) ) == 1 ) { condition = conditions . get ( 0 ) . getValue ( ) . trim ( ) ; condition = Campaign . validateCondition ( condition , id , containerId , alreadyProcessedItemsInSurveyItemGroup ) ; } String unit = null ; Nodes units = prompt . query ( Campaign . XML_PROMPT_UNIT ) ; if ( ( units . size ( ) ) > 1 ) { throw new DomainException ( ( "Multiple<seq2seq4repair_space>prompt<seq2seq4repair_space>units<seq2seq4repair_space>were<seq2seq4repair_space>found:<seq2seq4repair_space>" + id ) ) ; } else if ( ( units . size ( ) ) == 1 ) { unit = units . get ( 0 ) . getValue ( ) . trim ( ) ; if ( ! ( Campaign . VALID_CHARACTERS_PATTERN . matcher ( unit ) . matches ( ) ) ) { <START_BUG> throw new DomainException ( ( "The<seq2seq4repair_space>prompts's<seq2seq4repair_space>ID<seq2seq4repair_space>contains<seq2seq4repair_space>illegal<seq2seq4repair_space>characters:<seq2seq4repair_space>" + id ) ) ; <END_BUG> } } Nodes texts = prompt . query ( Campaign . XML_PROMPT_TEXT ) ; if ( ( texts . size ( ) ) == 0 ) { throw new DomainException ( ( "The<seq2seq4repair_space>prompt<seq2seq4repair_space>text<seq2seq4repair_space>is<seq2seq4repair_space>missing:<seq2seq4repair_space>" + id ) ) ; } else if ( ( texts . size ( ) ) > 1 ) { throw new DomainException ( ( "Multiple<seq2seq4repair_space>prompt<seq2seq4repair_space>texts<seq2seq4repair_space>were<seq2seq4repair_space>found:<seq2seq4repair_space>" + id ) ) ; } String text = texts . get ( 0 ) . getValue ( ) . trim ( ) ; if ( ( text . length ( ) ) == 0 ) { throw new DomainException ( ( "The<seq2seq4repair_space>prompt's<seq2seq4repair_space>text<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>whitespace<seq2seq4repair_space>only:<seq2seq4repair_space>" + id ) ) ; } String abbreviatedText = null ; Nodes abbreviatedTexts = prompt . query ( Campaign . XML_PROMPT_ABBREVIATED_TEXT ) ; if ( ( abbreviatedTexts . size ( ) ) > 1 ) { throw new DomainException ( ( "Multiple<seq2seq4repair_space>prompt<seq2seq4repair_space>abbreviated<seq2seq4repair_space>texts<seq2seq4repair_space>were<seq2seq4repair_space>found:<seq2seq4repair_space>" + id ) ) ; } else if ( ( abbreviatedTexts . size ( ) ) == 1 ) { abbreviatedText = abbreviatedTexts . get ( 0 ) . getValue ( ) . trim ( ) ; if ( ( abbreviatedText . length ( ) ) == 0 ) { throw new DomainException ( ( "The<seq2seq4repair_space>prompt's<seq2seq4repair_space>abbreviated<seq2seq4repair_space>text<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>whitespace<seq2seq4repair_space>only:<seq2seq4repair_space>" + id ) ) ; } } String explanationText = null ; Nodes explanationTexts = prompt . query ( Campaign . XML_PROMPT_EXPLANATION_TEXT ) ; if ( ( explanationTexts . size ( ) ) > 1 ) { throw new DomainException ( ( "Multiple<seq2seq4repair_space>prompt<seq2seq4repair_space>explanation<seq2seq4repair_space>texts<seq2seq4repair_space>were<seq2seq4repair_space>found:<seq2seq4repair_space>" + id ) ) ; }

Fix:
throw new DomainException ( ( "The<seq2seq4repair_space>prompt's<seq2seq4repair_space>unit<seq2seq4repair_space>contains<seq2seq4repair_space>illegal<seq2seq4repair_space>characters:<seq2seq4repair_space>" + id ) ) ;