Program: 36178
Project: 36178
Buggy source:
/** 
 * This method is responsible for submitting the form data. A thread is forked to undertake the submission.
 */
protected void submitData(String data){
  Element form=getFormElement();
  AttributeSet attrs=form.getAttributes();
  HTMLDocument doc=(HTMLDocument)form.getDocument();
  URL base=doc.getBase();
  String target=(String)attrs.getAttribute(HTML.Attribute.TARGET);
  if (target == null) {
    target="String_Node_Str";
  }
  String method=(String)attrs.getAttribute(HTML.Attribute.METHOD);
  if (method == null) {
    method="String_Node_Str";
  }
  method=method.toLowerCase();
  boolean isPostMethod=method.equals("String_Node_Str");
  if (isPostMethod) {
    storePostData(doc,target,data);
  }
  String action=(String)attrs.getAttribute(HTML.Attribute.ACTION);
  URL actionURL;
  try {
    actionURL=(action == null) ? new URL(base.getProtocol(),base.getHost(),base.getPort(),base.getFile()) : new URL(base,action);
    if (!isPostMethod) {
      String query=data.toString();
      actionURL=new URL(actionURL + "String_Node_Str" + query);
    }
  }
 catch (  MalformedURLException e) {
    actionURL=null;
  }
  final JEditorPane c=(JEditorPane)getContainer();
  HTMLEditorKit kit=(HTMLEditorKit)c.getEditorKit();
  FormSubmitEvent formEvent=null;
  if (!kit.isAutoFormSubmission() || doc.isFrameDocument()) {
    FormSubmitEvent.MethodType methodType=isPostMethod ? FormSubmitEvent.MethodType.POST : FormSubmitEvent.MethodType.GET;
    formEvent=new FormSubmitEvent(FormView.this,HyperlinkEvent.EventType.ACTIVATED,actionURL,form,target,methodType,data);
  }
  final FormSubmitEvent fse=formEvent;
  final URL url=actionURL;
  SwingUtilities.invokeLater(new Runnable(){
    public void run(){
      if (fse != null) {
        c.fireHyperlinkUpdate(fse);
      }
 else {
        try {
          c.setPage(url);
        }
 catch (        IOException e) {
          UIManager.getLookAndFeel().provideErrorFeedback(c);
        }
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * This method is responsible for submitting the form data. A thread is forked to undertake the submission.
 * @param data data to submit
 */
protected void submitData(String data){
  Element form=getFormElement();
  AttributeSet attrs=form.getAttributes();
  HTMLDocument doc=(HTMLDocument)form.getDocument();
  URL base=doc.getBase();
  String target=(String)attrs.getAttribute(HTML.Attribute.TARGET);
  if (target == null) {
    target="String_Node_Str";
  }
  String method=(String)attrs.getAttribute(HTML.Attribute.METHOD);
  if (method == null) {
    method="String_Node_Str";
  }
  method=method.toLowerCase();
  boolean isPostMethod=method.equals("String_Node_Str");
  if (isPostMethod) {
    storePostData(doc,target,data);
  }
  String action=(String)attrs.getAttribute(HTML.Attribute.ACTION);
  URL actionURL;
  try {
    actionURL=(action == null) ? new URL(base.getProtocol(),base.getHost(),base.getPort(),base.getFile()) : new URL(base,action);
    if (!isPostMethod) {
      String query=data.toString();
      actionURL=new URL(actionURL + "String_Node_Str" + query);
    }
  }
 catch (  MalformedURLException e) {
    actionURL=null;
  }
  final JEditorPane c=(JEditorPane)getContainer();
  HTMLEditorKit kit=(HTMLEditorKit)c.getEditorKit();
  FormSubmitEvent formEvent=null;
  if (!kit.isAutoFormSubmission() || doc.isFrameDocument()) {
    FormSubmitEvent.MethodType methodType=isPostMethod ? FormSubmitEvent.MethodType.POST : FormSubmitEvent.MethodType.GET;
    formEvent=new FormSubmitEvent(FormView.this,HyperlinkEvent.EventType.ACTIVATED,actionURL,form,target,methodType,data);
  }
  final FormSubmitEvent fse=formEvent;
  final URL url=actionURL;
  SwingUtilities.invokeLater(new Runnable(){
    public void run(){
      if (fse != null) {
        c.fireHyperlinkUpdate(fse);
      }
 else {
        try {
          c.setPage(url);
        }
 catch (        IOException e) {
          UIManager.getLookAndFeel().provideErrorFeedback(c);
        }
      }
    }
  }
);
}