Program: 73266
Project: 73266
Buggy source:
/** 
 * Layout the given composite. Main entry point for the layout action. Create a KIELER KGraph data structure corresponding to the Ptolemy model, instantiate a KIELER layout algorithm (AbstractLayoutProvider) and run its doLayout() method on the KGraph. The KGraph is augmented with layout information (position and sizes of objects and bend points for connections). This information is then reapplied to the ptolemy model by stating MoMLChangeRequests with location attributes for nodes. Connection bend points are applied using   {@link LayoutHint}s.
 * @param composite the container of the diagram in terms of a GraphModel.
 */
@Override public void layout(Object composite){
  long overallTime=System.currentTimeMillis();
  _report("String_Node_Str");
  long graphOverhead=System.currentTimeMillis();
  KNode parentNode=KimlUtil.createInitializedNode();
  KShapeLayout parentLayout=parentNode.getData(KShapeLayout.class);
  Options._configureLayout(parentLayout,_layoutOptions,getLayoutTarget().getGraphModel());
  _createGraph(composite,parentNode);
  graphOverhead=System.currentTimeMillis() - graphOverhead;
  InstancePool<AbstractLayoutProvider> layouterPool=_getLayouterPool();
  AbstractLayoutProvider layoutProvider=layouterPool.fetch();
  IKielerProgressMonitor progressMonitor=new BasicProgressMonitor();
  layoutProvider.doLayout(parentNode,progressMonitor);
  if (DEBUG) {
    KielerGraphUtil._writeToFile(parentNode);
  }
  KVector offset=KielerGraphUtil._getUpperLeftCorner(parentNode);
  parentLayout.setXpos(parentLayout.getXpos() - (float)offset.x);
  parentLayout.setYpos(parentLayout.getYpos() - (float)offset.y);
  long momlRequestOverhead=System.currentTimeMillis();
  try {
    _applyLayout(parentNode);
    momlRequestOverhead=System.currentTimeMillis() - momlRequestOverhead;
    overallTime=System.currentTimeMillis() - overallTime;
    _report("String_Node_Str" + overallTime + "String_Node_Str"+ graphOverhead+ "String_Node_Str"+ Math.round(progressMonitor.getExecutionTime() * 1000)+ "String_Node_Str"+ momlRequestOverhead+ "String_Node_Str");
    layouterPool.release(layoutProvider);
  }
 catch (  IllegalActionException e) {
    throw new GraphInvalidStateException(e,"String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Layout the given composite. Main entry point for the layout action. Create a KIELER KGraph data structure corresponding to the Ptolemy model, instantiate a KIELER layout algorithm (AbstractLayoutProvider) and run its doLayout() method on the KGraph. The KGraph is augmented with layout information (position and sizes of objects and bend points for connections). This information is then reapplied to the ptolemy model by stating MoMLChangeRequests with location attributes for nodes. Connection bend points are applied using   {@link LayoutHint}s.
 * @param composite the container of the diagram in terms of a GraphModel.
 */
@Override public void layout(Object composite){
  long overallTime=System.currentTimeMillis();
  _report("String_Node_Str");
  long graphOverhead=overallTime;
  KNode parentNode=KimlUtil.createInitializedNode();
  KShapeLayout parentLayout=parentNode.getData(KShapeLayout.class);
  if (_top != null) {
    Dimension contentSize=_top.getContentSize();
    parentLayout.setWidth(contentSize.width);
    parentLayout.setHeight(contentSize.height);
  }
  Options._configureLayout(parentLayout,_layoutOptions,getLayoutTarget().getGraphModel());
  _createGraph(composite,parentNode);
  graphOverhead=System.currentTimeMillis() - graphOverhead;
  InstancePool<AbstractLayoutProvider> layouterPool=_getLayouterPool();
  AbstractLayoutProvider layoutProvider=layouterPool.fetch();
  IKielerProgressMonitor progressMonitor=new BasicProgressMonitor();
  layoutProvider.doLayout(parentNode,progressMonitor);
  if (DEBUG) {
    KielerGraphUtil._writeToFile(parentNode);
  }
  KVector offset=KielerGraphUtil._getUpperLeftCorner(parentNode);
  parentLayout.setXpos(parentLayout.getXpos() - (float)offset.x);
  parentLayout.setYpos(parentLayout.getYpos() - (float)offset.y);
  long momlRequestOverhead=System.currentTimeMillis();
  try {
    _applyLayout(parentNode);
    momlRequestOverhead=System.currentTimeMillis() - momlRequestOverhead;
    overallTime=System.currentTimeMillis() - overallTime;
    _report("String_Node_Str" + overallTime + "String_Node_Str"+ graphOverhead+ "String_Node_Str"+ Math.round(progressMonitor.getExecutionTime() * 1000)+ "String_Node_Str"+ momlRequestOverhead+ "String_Node_Str");
    layouterPool.release(layoutProvider);
  }
 catch (  IllegalActionException e) {
    throw new GraphInvalidStateException(e,"String_Node_Str" + e.getMessage());
  }
}