Buggy code:
public abstract class HotTextAnswersQuestionView extends Composite { @ UiField Button checkAnswer ; @ UiField FlowPanel optionsContainerFpnl ; HTAnswerDragPanelVc optionsContainer ; @ UiField Label messageBodyText ; @ UiField HTMLPanel answerText ; private CollectionItemDo collectionItemDo ; private AttemptedAnswersDo attemptedAnswerDo = null ; private List randomSequenceList ; private boolean isCheckButtonEnabled = true ; private boolean isCheckAnswerButtonClicked = false ; String [ ] correctAnsSequence ; String [ ] attemptAnsSequence ; private static String SPACE = "<seq2seq4repair_space>" ; private static String COMMA = "," ; private static String SEMICOLUMN = ";" ; private static String DELIMITER_SPACE = "[\\s\\xA0]+" ; private static String STYLE_HIGHLIGHT = "htHiglightText" ; private static String STYLE_CORRECT = "correct" ; private static String STYLE_INCORRECT = "inCorrect" ; private static String STYLE_INACTIVE_BUTTON = "htPlayerSubmitInActiveButton" ; private static String STYLE_DND_CORRECT = "dragDropAnsCorrect" ; private static String STYLE_DND_INCORRECT = "dragDropAnsInCorrect" ; private static String DOT = "." ; private static String START_CORRECT_DELIMITER = "[$" ; private static String START_DELIMITER = "[" ; private static String END_CORRECT_DELIMITER = "$]" ; private static String END_DELIMITER = "]" ; private static HotTextAnswersQuestionView . HotTextAnswersQuestionViewUiBinder uiBinder = GWT . create ( HotTextAnswersQuestionView . HotTextAnswersQuestionViewUiBinder . class ) ; interface HotTextAnswersQuestionViewUiBinder extends UiBinder < Widget , HotTextAnswersQuestionView > { } private MessageProperties i18n = GWT . create ( MessageProperties . class ) ; public HotTextAnswersQuestionView ( ) { } @ UiConstructor public HotTextAnswersQuestionView ( CollectionItemDo collectionItemDo , AttemptedAnswersDo attemptedAnswerDo , List randomList ) { } private void setQuestionTypeCaption ( ) { } private void renderQuestionAnswerOptions ( ) { } public List < String > getName ( String input ) { } public void setRenderAnswers ( TreeSet < QuestionAnswerDo > answersSet ) { Iterator < QuestionAnswerDo > answersList = answersSet . iterator ( ) ; while ( answersList . hasNext ( ) ) { QuestionAnswerDo questionAnswerDo = answersList . next ( ) ; String text = StringUtil . removeAllHtmlCss ( removeHtmlTags ( InfoUtil . removeQuestionTagsOnBoldClick ( ( StringUtil . isEmpty ( questionAnswerDo . getAnswerText ( ) ) ? "" : questionAnswerDo . getAnswerText ( ) ) ) ) ) ; String [ ] temp ; if ( collectionItemDo . getResource ( ) . getHlType ( ) . equalsIgnoreCase ( i18n . GL3219_1 ( ) ) ) { temp = text . split ( HotTextAnswersQuestionView . DELIMITER_SPACE ) ; for ( int k = 0 ; k < ( temp . length ) ; k ++ ) { final InlineLabel lbl = new InlineLabel ( ( ( temp [ k ] ) + ( HotTextAnswersQuestionView . SPACE ) ) ) ; if ( ( lbl . getText ( ) . startsWith ( HotTextAnswersQuestionView . START_DELIMITER ) ) && ( ( ( ( lbl . getText ( ) . endsWith ( ( ( HotTextAnswersQuestionView . END_DELIMITER ) + ( HotTextAnswersQuestionView . SPACE ) ) ) ) || ( lbl . getText ( ) . trim ( ) . endsWith ( ( ( HotTextAnswersQuestionView . END_DELIMITER ) + ( HotTextAnswersQuestionView . DOT ) ) ) ) ) || ( lbl . getText ( ) . trim ( ) . endsWith ( ( ( HotTextAnswersQuestionView . END_DELIMITER ) + ( HotTextAnswersQuestionView . COMMA ) ) ) ) ) || ( lbl . getText ( ) . trim ( ) . endsWith ( ( ( HotTextAnswersQuestionView . END_DELIMITER ) + ( HotTextAnswersQuestionView . SEMICOLUMN ) ) ) ) ) ) { <START_BUG> String lblText = lbl . getText ( ) . replaceAll ( "[${}\\[\\]]" , "" ) ; <END_BUG> lbl . setText ( lblText ) ; lbl . getElement ( ) . setId ( HotTextAnswersQuestionView . STYLE_CORRECT ) ; } else { lbl . getElement ( ) . setId ( HotTextAnswersQuestionView . STYLE_INCORRECT ) ; } lbl . addStyleName ( "htPlayerAns" ) ; lbl . addClickHandler ( new ClickHandler ( ) { @ Override public void onClick ( ClickEvent event ) { clearAnswers ( ) ; if ( lbl . getStyleName ( ) . contains ( HotTextAnswersQuestionView . STYLE_HIGHLIGHT ) ) { lbl . removeStyleName ( HotTextAnswersQuestionView . STYLE_HIGHLIGHT ) ; } else { lbl . addStyleName ( HotTextAnswersQuestionView . STYLE_HIGHLIGHT ) ; } enableCheckAnswerButton ( ) ; } } ) ; optionsContainerFpnl . add ( lbl ) ; } } else { List < String > checkStr = getName ( text ) ; temp = checkStr . toArray ( new String [ 0 ] ) ; for ( int k = 0 ; k < ( temp . length ) ; k ++ ) { if ( ( temp [ k ] . trim ( ) . length ( ) ) > 0 ) { final InlineLabel lbl = new InlineLabel ( temp [ k ] ) ; if ( lbl . getText ( ) . startsWith ( HotTextAnswersQuestionView . SPACE ) ) { lbl . setText ( lbl . getText ( ) . trim ( ) ) ; } if ( ( lbl . getText ( ) . startsWith ( HotTextAnswersQuestionView . START_DELIMITER ) ) || ( lbl . getText ( ) . startsWith ( "<seq2seq4repair_space>[" ) ) ) { String lblText = lbl . getText ( ) . replaceAll ( "[${}\\[\\]]" , "" ) ; lbl . setText ( lblText ) ; lbl . getElement ( ) . setId ( HotTextAnswersQuestionView . STYLE_CORRECT ) ; } else { String lblText = lbl . getText ( ) . replaceAll ( "[${}\\[\\]]" , "" ) ; lbl . setText ( lblText ) ; lbl . getElement ( ) . setId ( HotTextAnswersQuestionView . STYLE_INCORRECT ) ; } lbl . addStyleName ( "htPlayerAns" ) ; lbl . addClickHandler ( new ClickHandler ( ) { @ Override public void onClick ( ClickEvent event ) { clearAnswers ( ) ; if ( lbl . getStyleName ( ) . contains ( HotTextAnswersQuestionView . STYLE_HIGHLIGHT ) ) { lbl . removeStyleName ( HotTextAnswersQuestionView . STYLE_HIGHLIGHT ) ; } else { lbl . addStyleName ( HotTextAnswersQuestionView . STYLE_HIGHLIGHT ) ; } enableCheckAnswerButton ( ) ; } } ) ; optionsContainerFpnl . add ( lbl ) ; } } } } }

Fix:
String lblText = lbl . getText ( ) . replaceAll ( "[{}\\[\\]]" , "" ) ;