Program: 73112
Project: 73112
Buggy source:
/** 
 * Add to the specified result list the bounds of the icon for the specified object.
 * @param result The list to add to.
 * @param viewSize The view size.
 * @param scaleX The x scaling factor.
 * @param scaleY The y scaling factor.
 * @param translateX The x translation.
 * @param translateY The y translation.
 * @param object The object to add.
 */
private void _addRectangle(List<IconVisibleLocation> result,Rectangle2D viewSize,double scaleX,double scaleY,double translateX,double translateY,NamedObj object){
  Locatable location=null;
  try {
    location=(Locatable)object.getAttribute("String_Node_Str",Locatable.class);
  }
 catch (  IllegalActionException e1) {
  }
  if (location != null) {
    GraphController controller=_basicGraphFrame.getJGraph().getGraphPane().getGraphController();
    Figure figure=controller.getFigure(location);
    if (figure != null) {
      Rectangle2D figureBounds=figure.getShape().getBounds2D();
      double width=figureBounds.getWidth();
      double height=figureBounds.getHeight();
      IconVisibleLocation i=new IconVisibleLocation();
      i.object=object;
      i.topLeftX=figureBounds.getX() * scaleX + translateX - _PADDING;
      i.topLeftY=figureBounds.getY() * scaleY + translateY - _PADDING;
      i.bottomRightX=i.topLeftX + (width * scaleX) + 2 * _PADDING;
      i.bottomRightY=i.topLeftY + (height * scaleY) + 2 * _PADDING;
      if (i.bottomRightX < 0.0 || i.bottomRightY < 0.0 || i.topLeftX > viewSize.getWidth() || i.topLeftY > viewSize.getHeight()) {
        return;
      }
 else {
        if (i.topLeftX < 0.0) {
          i.topLeftX=0.0;
        }
        if (i.topLeftY < 0.0) {
          i.topLeftY=0.0;
        }
        if (i.bottomRightX > viewSize.getWidth()) {
          i.bottomRightX=viewSize.getWidth();
        }
        if (i.bottomRightY > viewSize.getHeight()) {
          i.bottomRightY=viewSize.getHeight();
        }
        result.add(i);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Add to the specified result list the bounds of the icon for the specified object.
 * @param result The list to add to.
 * @param viewSize The view size.
 * @param scaleX The x scaling factor.
 * @param scaleY The y scaling factor.
 * @param translateX The x translation.
 * @param translateY The y translation.
 * @param object The object to add.
 */
private void _addRectangle(List<IconVisibleLocation> result,Rectangle2D viewSize,double scaleX,double scaleY,double translateX,double translateY,NamedObj object){
  Locatable location=null;
  try {
    location=(Locatable)object.getAttribute("String_Node_Str",Locatable.class);
  }
 catch (  IllegalActionException e1) {
  }
  if (location != null) {
    GraphController controller=_basicGraphFrame.getJGraph().getGraphPane().getGraphController();
    Figure figure=controller.getFigure(location);
    if (figure != null) {
      Rectangle2D figureBounds=figure.getShape().getBounds2D();
      double width=figureBounds.getWidth();
      double height=figureBounds.getHeight();
      IconVisibleLocation i=new IconVisibleLocation();
      i.object=object;
      i.topLeftX=figureBounds.getX() * scaleX + translateX - _PADDING;
      i.topLeftY=figureBounds.getY() * scaleY + translateY - _PADDING;
      i.bottomRightX=i.topLeftX + (width * scaleX) + 2 * _PADDING;
      i.bottomRightY=i.topLeftY + (height * scaleY) + 2 * _PADDING;
      if (i.bottomRightX < 0.0 || i.bottomRightY < 0.0 || i.topLeftX > viewSize.getWidth() || i.topLeftY > viewSize.getHeight()) {
        return;
      }
 else {
        if (i.topLeftX < 0.0) {
          i.topLeftX=0.0;
        }
        if (i.topLeftY < 0.0) {
          i.topLeftY=0.0;
        }
        if (i.bottomRightX > viewSize.getWidth()) {
          i.bottomRightX=viewSize.getWidth();
        }
        if (i.bottomRightY > viewSize.getHeight()) {
          i.bottomRightY=viewSize.getHeight();
        }
        result.add(0,i);
      }
    }
  }
}