Program: 74697
Project: 74697
Buggy source:
/** 
 * Render a visual representation of the given node. If the StringAttribute _color of the node is set then use that color to highlight the node. If the StringAttribute _explanation of the node is set then use it to set the tooltip.
 * @see diva.graph.NodeRenderer#render(java.lang.Object)
 */
public Figure render(Object n){
  Locatable location=(Locatable)n;
  final NamedObj object=location.getContainer();
  Figure result=null;
  try {
    List iconList=object.attributeList(EditorIcon.class);
    if (iconList.size() == 0) {
      XMLIcon alreadyCreated=(XMLIcon)_iconsPendingContainer.get(object);
      if (alreadyCreated != null) {
        iconList.add(alreadyCreated);
      }
    }
    if (iconList.size() == 0) {
      final EditorIcon icon=new XMLIcon(object.workspace(),"String_Node_Str");
      icon.setContainerToBe(object);
      icon.setPersistent(false);
      result=icon.createFigure();
      _iconsPendingContainer.put(object,icon);
      GraphController controller=IconController.this.getController();
      GraphModel graphModel=controller.getGraphModel();
      ChangeRequest request=new ChangeRequest(graphModel,"String_Node_Str"){
        protected void _execute() throws KernelException {
          _iconsPendingContainer.remove(object);
          if (icon.getContainer() != null) {
            return;
          }
          if (object.getAttribute("String_Node_Str") != null) {
            return;
          }
          icon.setContainer(object);
        }
      }
;
      request.setPersistent(false);
      object.requestChange(request);
    }
 else     if (iconList.size() >= 1) {
      EditorIcon icon=(EditorIcon)iconList.get(iconList.size() - 1);
      result=icon.createFigure();
    }
  }
 catch (  KernelException ex) {
    throw new InternalErrorException(null,ex,"String_Node_Str" + "String_Node_Str" + object + "String_Node_Str"+ "String_Node_Str");
  }
  result.setToolTipText(object.getClassName());
  if (object instanceof ComponentEntity) {
    ComponentEntity ce=(ComponentEntity)object;
    StringAttribute _colorAttr=(StringAttribute)(ce.getAttribute("String_Node_Str"));
    if (_colorAttr != null) {
      String _color=_colorAttr.getExpression();
      AnimationRenderer _animationRenderer=new AnimationRenderer(SVGUtilities.getColor(_color));
      _animationRenderer.renderSelected(result);
      StringAttribute _explAttr=(StringAttribute)(ce.getAttribute("String_Node_Str"));
      if (_explAttr != null) {
        result.setToolTipText(_explAttr.getExpression());
      }
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Render a visual representation of the given node. If the StringAttribute _color of the node is set then use that color to highlight the node. If the StringAttribute _explanation of the node is set then use it to set the tooltip.
 * @see diva.graph.NodeRenderer#render(java.lang.Object)
 */
public Figure render(Object n){
  Locatable location=(Locatable)n;
  final NamedObj object=location.getContainer();
  Figure result=null;
  try {
    List iconList=object.attributeList(EditorIcon.class);
    if (iconList.size() == 0) {
      XMLIcon alreadyCreated=(XMLIcon)_iconsPendingContainer.get(object);
      if (alreadyCreated != null) {
        iconList.add(alreadyCreated);
      }
    }
    if (iconList.size() == 0) {
      final EditorIcon icon=new XMLIcon(object.workspace(),"String_Node_Str");
      icon.setContainerToBe(object);
      icon.setPersistent(false);
      result=icon.createFigure();
      _iconsPendingContainer.put(object,icon);
      GraphController controller=IconController.this.getController();
      GraphModel graphModel=controller.getGraphModel();
      ChangeRequest request=new ChangeRequest(graphModel,"String_Node_Str"){
        protected void _execute() throws KernelException {
          _iconsPendingContainer.remove(object);
          if (icon.getContainer() != null) {
            return;
          }
          if (object.getAttribute("String_Node_Str") != null) {
            return;
          }
          icon.setContainer(object);
        }
      }
;
      request.setPersistent(false);
      object.requestChange(request);
    }
 else     if (iconList.size() >= 1) {
      EditorIcon icon=(EditorIcon)iconList.get(iconList.size() - 1);
      result=icon.createFigure();
    }
  }
 catch (  KernelException ex) {
    throw new InternalErrorException(null,ex,"String_Node_Str" + "String_Node_Str" + object + "String_Node_Str"+ "String_Node_Str");
  }
  result.setToolTipText(object.getClassName());
  if (object instanceof ComponentEntity) {
    ComponentEntity ce=(ComponentEntity)object;
    StringAttribute _colorAttr=(StringAttribute)(ce.getAttribute("String_Node_Str"));
    if (_colorAttr != null) {
      String _color=_colorAttr.getExpression();
      AnimationRenderer _animationRenderer=new AnimationRenderer(SVGUtilities.getColor(_color));
      _animationRenderer.renderSelected(result);
    }
    StringAttribute _explAttr=(StringAttribute)(ce.getAttribute("String_Node_Str"));
    if (_explAttr != null) {
      result.setToolTipText(_explAttr.getExpression());
    }
  }
  return result;
}