Program: 188253
Project: 188253
Buggy source:
@Override public void onClick(ClickEvent event){
  Widget sender=(Widget)event.getSource();
  if (sender == bold) {
    formatter.toggleBold();
  }
 else   if (sender == italic) {
    formatter.toggleItalic();
  }
 else   if (sender == underline) {
    formatter.toggleUnderline();
  }
 else   if (sender == subscript) {
    formatter.toggleSubscript();
  }
 else   if (sender == superscript) {
    formatter.toggleSuperscript();
  }
 else   if (sender == strikethrough) {
    formatter.toggleStrikethrough();
  }
 else   if (sender == indent) {
    formatter.rightIndent();
  }
 else   if (sender == outdent) {
    formatter.leftIndent();
  }
 else   if (sender == justifyLeft) {
    formatter.setJustification(RichTextArea.Justification.LEFT);
  }
 else   if (sender == justifyCenter) {
    formatter.setJustification(RichTextArea.Justification.CENTER);
  }
 else   if (sender == justifyRight) {
    formatter.setJustification(RichTextArea.Justification.RIGHT);
  }
 else   if (sender == insertImage) {
    Dialogs.showPromptDialog(messages.insertImageUrl(),null,null,"String_Node_Str",RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),true,false,new AsyncCallback<String>(){
      @Override public void onFailure(      Throwable caught){
      }
      @Override public void onSuccess(      String url){
        if (url != null) {
          formatter.insertImage(url);
        }
      }
    }
);
  }
 else   if (sender == createLink) {
    Dialogs.showPromptDialog(messages.insertLinkUrl(),null,null,"String_Node_Str",RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),true,false,new AsyncCallback<String>(){
      @Override public void onFailure(      Throwable caught){
      }
      @Override public void onSuccess(      String url){
        if (url != null) {
          formatter.createLink(url);
        }
      }
    }
);
  }
 else   if (sender == removeLink) {
    formatter.removeLink();
  }
 else   if (sender == ol) {
    formatter.insertOrderedList();
  }
 else   if (sender == ul) {
    formatter.insertUnorderedList();
  }
 else   if (sender == removeFormat) {
    formatter.removeFormat();
  }
 else   if (sender == code) {
    Dialogs.showPromptDialog(messages.editHTMLContent(),null,richText.getHTML(),null,RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),true,true,new AsyncCallback<String>(){
      @Override public void onFailure(      Throwable caught){
      }
      @Override public void onSuccess(      String codeHtml){
        if (codeHtml != null) {
          richText.setHTML(codeHtml);
        }
      }
    }
);
  }
 else   if (sender == richText) {
    updateStatus();
  }
}

Fixed version (ground truth):
@Override public void onClick(ClickEvent event){
  Widget sender=(Widget)event.getSource();
  if (sender == bold) {
    formatter.toggleBold();
  }
 else   if (sender == italic) {
    formatter.toggleItalic();
  }
 else   if (sender == underline) {
    formatter.toggleUnderline();
  }
 else   if (sender == subscript) {
    formatter.toggleSubscript();
  }
 else   if (sender == superscript) {
    formatter.toggleSuperscript();
  }
 else   if (sender == strikethrough) {
    formatter.toggleStrikethrough();
  }
 else   if (sender == indent) {
    formatter.rightIndent();
  }
 else   if (sender == outdent) {
    formatter.leftIndent();
  }
 else   if (sender == justifyLeft) {
    formatter.setJustification(RichTextArea.Justification.LEFT);
  }
 else   if (sender == justifyCenter) {
    formatter.setJustification(RichTextArea.Justification.CENTER);
  }
 else   if (sender == justifyRight) {
    formatter.setJustification(RichTextArea.Justification.RIGHT);
  }
 else   if (sender == insertImage) {
    Dialogs.showPromptDialog(messages.insertImageUrl(),null,null,"String_Node_Str",RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),true,false,new AsyncCallback<String>(){
      @Override public void onFailure(      Throwable caught){
      }
      @Override public void onSuccess(      String url){
        if (url != null) {
          formatter.insertImage(url);
        }
      }
    }
);
  }
 else   if (sender == createLink) {
    Dialogs.showPromptDialog(messages.insertLinkUrl(),null,null,"String_Node_Str",RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),true,false,new AsyncCallback<String>(){
      @Override public void onFailure(      Throwable caught){
      }
      @Override public void onSuccess(      String url){
        if (url != null) {
          formatter.createLink(url);
        }
      }
    }
);
  }
 else   if (sender == removeLink) {
    formatter.removeLink();
  }
 else   if (sender == ol) {
    formatter.insertOrderedList();
  }
 else   if (sender == ul) {
    formatter.insertUnorderedList();
  }
 else   if (sender == removeFormat) {
    formatter.removeFormat();
  }
 else   if (sender == code) {
    Dialogs.showPromptDialog(messages.editHTMLContent(),null,richText.getHTML(),null,RegExp.compile("String_Node_Str"),messages.cancelButton(),messages.confirmButton(),false,true,new AsyncCallback<String>(){
      @Override public void onFailure(      Throwable caught){
      }
      @Override public void onSuccess(      String codeHtml){
        if (codeHtml != null) {
          richText.setHTML(codeHtml);
        }
      }
    }
);
  }
 else   if (sender == richText) {
    updateStatus();
  }
}