Program: 180465
Project: 180465
Buggy source:
/** 
 * Handles popup menu button clicks
 * @param text The text of the button that was just clicked
 */
public void popupMenuEvent(String text){
  if (text.contains(("String_Node_Str"))) {
    PersonalizedVisualizationViewer currentViewer=applet.getCurrentViewer();
    Layout<P2PVertex,P2PConnection> graphLayout=null;
    P2PNetworkGraph graph=applet.getGraph().getReferenceGraph();
    if (text.equals("String_Node_Str")) {
      graphLayout=new FRLayout<P2PVertex,P2PConnection>(graph,currentViewer.getSize());
    }
 else     if (text.equals("String_Node_Str")) {
      graphLayout=new ISOMLayout<P2PVertex,P2PConnection>(graph);
    }
 else     if (text.equals("String_Node_Str")) {
      graphLayout=new KKLayout<P2PVertex,P2PConnection>(graph);
    }
 else     if (text.equals("String_Node_Str")) {
      graphLayout=new BalloonLayout<P2PVertex,P2PConnection>(P2PNetworkGraph.makeTreeGraph(graph));
    }
 else     if (text.equals("String_Node_Str")) {
      graphLayout=new TreeLayout<P2PVertex,P2PConnection>(P2PNetworkGraph.makeTreeGraph(graph));
    }
 else {
      graphLayout=new CircleLayout<P2PVertex,P2PConnection>(graph);
    }
    currentViewer.getModel().setGraphLayout(graphLayout);
    for (    P2PVertex v : graphLayout.getGraph().getVertices()) {
      graphLayout.lock(v,true);
    }
  }
 else   if (text.equals("String_Node_Str")) {
    gm.setMode(Mode.PICKING);
  }
 else   if (text.equals("String_Node_Str")) {
    gm.setMode(Mode.TRANSFORMING);
  }
 else {
    JOptionPane.showMessageDialog(this,"String_Node_Str" + text,"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    return;
  }
  setVisible(false);
  setEnabled(false);
}

Fixed version (ground truth):
/** 
 * Handles popup menu button clicks
 * @param text The text of the button that was just clicked
 */
public void popupMenuEvent(String text){
  if (text.contains(("String_Node_Str"))) {
    VisualizationViewer<P2PVertex,P2PConnection> currentViewer=applet.getCurrentViewer();
    Layout<P2PVertex,P2PConnection> currentLayout=currentViewer.getGraphLayout();
    Layout<P2PVertex,P2PConnection> newLayout=null;
    P2PNetworkGraph graph=applet.getGraph().getReferenceGraph();
    if (text.equals("String_Node_Str")) {
      newLayout=new FRLayout<P2PVertex,P2PConnection>(graph,currentViewer.getSize());
    }
 else     if (text.equals("String_Node_Str")) {
      newLayout=new ISOMLayout<P2PVertex,P2PConnection>(graph);
    }
 else     if (text.equals("String_Node_Str")) {
      newLayout=new KKLayout<P2PVertex,P2PConnection>(graph);
    }
 else     if (text.equals("String_Node_Str")) {
      newLayout=new SpringLayout2<P2PVertex,P2PConnection>(graph);
    }
 else     if (text.equals("String_Node_Str")) {
      newLayout=new BalloonLayout<P2PVertex,P2PConnection>(P2PNetworkGraph.makeTreeGraph(graph));
    }
 else     if (text.equals("String_Node_Str")) {
      newLayout=new RadialTreeLayout<P2PVertex,P2PConnection>(P2PNetworkGraph.makeTreeGraph(graph));
    }
 else     if (text.equals("String_Node_Str")) {
      newLayout=new TreeLayout<P2PVertex,P2PConnection>(P2PNetworkGraph.makeTreeGraph(graph));
    }
 else {
      newLayout=new CircleLayout<P2PVertex,P2PConnection>(graph);
    }
    newLayout.setInitializer(currentViewer.getGraphLayout());
    newLayout.setSize(currentViewer.getSize());
    LayoutTransition<P2PVertex,P2PConnection> transition=new LayoutTransition<P2PVertex,P2PConnection>(currentViewer,currentLayout,newLayout);
    Animator transitionAnimator=new Animator(transition);
    transitionAnimator.start();
    stopAnimateTimer.schedule(new StopAnimateTask(transitionAnimator,newLayout),5000);
    currentViewer.getRenderContext().getMultiLayerTransformer().setToIdentity();
    currentViewer.repaint();
  }
 else   if (text.equals("String_Node_Str")) {
    gm.setMode(Mode.PICKING);
  }
 else   if (text.equals("String_Node_Str")) {
    gm.setMode(Mode.TRANSFORMING);
  }
 else {
    JOptionPane.showMessageDialog(this,"String_Node_Str" + text,"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    return;
  }
  setVisible(false);
  setEnabled(false);
}