Program: 74847
Project: 74847
Buggy source:
/** 
 * Perform the action by opening documentation for the target. In the default situation, the documentation is in doc.codeDoc. However, if we have a custom application like HyVisual, VisualSense or Viptos, then we create the docs in doc.codeDoc<i>ApplicationName</i>.doc.codeDoc.  However, this directory gets jar up and shipped with these apps when we ship windows installers and the docs are found at doc.codeDoc again.  So, if _applicationName is set, we look in doc.codeDoc<i>_applicationName</i>.doc.codeDoc.  If that is not found, we look in doc.codeDoc.  If that is not found, we bring up   {@link ptolemy.vergil.actor.DocBuilderGUI}.
 */
public void actionPerformed(ActionEvent e){
  super.actionPerformed(e);
  if (_configuration == null) {
    MessageHandler.error("String_Node_Str");
  }
  NamedObj target=getTarget();
  if (target == null) {
    return;
  }
  List docAttributes=target.attributeList(DocAttribute.class);
  if (docAttributes.size() == 0) {
    String className=target.getClass().getName();
    Effigy context=Configuration.findEffigy(target);
    if (context == null) {
      context=Configuration.findEffigy(target.getContainer());
      if (context == null) {
        MessageHandler.error("String_Node_Str" + target.getFullName());
      }
    }
    getDocumentation(_configuration,className,context);
  }
 else {
    DocAttribute docAttribute=(DocAttribute)docAttributes.get(docAttributes.size() - 1);
    Effigy context=Configuration.findEffigy(target);
    if (context == null) {
      context=Configuration.findEffigy(target.getContainer());
      if (context == null) {
        MessageHandler.error("String_Node_Str" + target.getFullName());
      }
    }
    ComponentEntity effigy=context.getEntity("String_Node_Str");
    if (effigy == null) {
      try {
        effigy=new DocEffigy(context,"String_Node_Str");
      }
 catch (      KernelException exception) {
        throw new InternalErrorException(exception);
      }
    }
    if (!(effigy instanceof DocEffigy)) {
      MessageHandler.error("String_Node_Str" + "String_Node_Str");
    }
    ((DocEffigy)effigy).setDocAttribute(docAttribute);
    ComponentEntity tableau=((Effigy)effigy).getEntity("String_Node_Str");
    if (tableau == null) {
      try {
        tableau=new DocTableau((DocEffigy)effigy,"String_Node_Str");
        ((DocTableau)tableau).setTitle("String_Node_Str" + target.getFullName());
      }
 catch (      KernelException exception) {
        throw new InternalErrorException(exception);
      }
    }
    if (!(tableau instanceof DocTableau)) {
      MessageHandler.error("String_Node_Str" + "String_Node_Str");
    }
    ((DocTableau)tableau).show();
  }
}

Fixed version (ground truth):
/** 
 * Perform the action by opening documentation for the target. In the default situation, the documentation is in doc.codeDoc. However, if we have a custom application like HyVisual, VisualSense or Viptos, then we create the docs in doc.codeDoc<i>ApplicationName</i>.doc.codeDoc.  However, this directory gets jar up and shipped with these apps when we ship windows installers and the docs are found at doc.codeDoc again.  So, if _applicationName is set, we look in doc.codeDoc<i>_applicationName</i>.doc.codeDoc.  If that is not found, we look in doc.codeDoc.  If that is not found, we bring up   {@link ptolemy.vergil.actor.DocBuilderGUI}.
 */
public void actionPerformed(ActionEvent e){
  super.actionPerformed(e);
  if (_configuration == null) {
    MessageHandler.error("String_Node_Str");
  }
  NamedObj target=getTarget();
  if (target == null) {
    return;
  }
  List docAttributes=target.attributeList(DocAttribute.class);
  if (docAttributes.size() == 0) {
    String className=target.getClass().getName();
    Effigy context=Configuration.findEffigy(target);
    NamedObj container=target.getContainer();
    while (context == null && container != null) {
      context=Configuration.findEffigy(container);
      container=container.getContainer();
    }
    if (context == null) {
      MessageHandler.error("String_Node_Str" + target.getFullName());
    }
    getDocumentation(_configuration,className,context);
  }
 else {
    DocAttribute docAttribute=(DocAttribute)docAttributes.get(docAttributes.size() - 1);
    Effigy context=Configuration.findEffigy(target);
    if (context == null) {
      context=Configuration.findEffigy(target.getContainer());
      if (context == null) {
        MessageHandler.error("String_Node_Str" + target.getFullName());
      }
    }
    ComponentEntity effigy=context.getEntity("String_Node_Str");
    if (effigy == null) {
      try {
        effigy=new DocEffigy(context,"String_Node_Str");
      }
 catch (      KernelException exception) {
        throw new InternalErrorException(exception);
      }
    }
    if (!(effigy instanceof DocEffigy)) {
      MessageHandler.error("String_Node_Str" + "String_Node_Str");
    }
    ((DocEffigy)effigy).setDocAttribute(docAttribute);
    ComponentEntity tableau=((Effigy)effigy).getEntity("String_Node_Str");
    if (tableau == null) {
      try {
        tableau=new DocTableau((DocEffigy)effigy,"String_Node_Str");
        ((DocTableau)tableau).setTitle("String_Node_Str" + target.getFullName());
      }
 catch (      KernelException exception) {
        throw new InternalErrorException(exception);
      }
    }
    if (!(tableau instanceof DocTableau)) {
      MessageHandler.error("String_Node_Str" + "String_Node_Str");
    }
    ((DocTableau)tableau).show();
  }
}