Program: 170224
Project: 170224
Buggy source:
private void buildUI(Container container){
  buildPropDescTable();
  curDiag=getNewDiag();
  MouseListener mouseListener=new MouseAdapter(){
    public void mouseClicked(    MouseEvent e){
      int i=jtp.indexAtLocation(e.getX(),e.getY());
      if (i == -1)       return;
      ButtonTabComponent b=(ButtonTabComponent)driver.jtp.getTabComponentAt(i);
      Diagram diag=b.diag;
      if (diag == null) {
        curDiag=getNewDiag();
      }
      curDiag=diag;
      frame.repaint();
    }
  }
;
  jtp.addMouseListener(mouseListener);
  container.setLayout(new BoxLayout(container,BoxLayout.Y_AXIS));
  Box box1=new Box(BoxLayout.Y_AXIS);
  container.add(box1);
  Box box4=new Box(BoxLayout.X_AXIS);
  box1.add(box4);
  int sf=(int)Math.round(100.0 * scalingFactor);
  JSlider zoomControl=new JSlider(JSlider.VERTICAL,60,200,sf);
  zoomControl.setPreferredSize(new Dimension(40,200));
  zoomControl.setMajorTickSpacing(20);
  zoomControl.setPaintTicks(true);
  zoomControl.setSnapToTicks(true);
  zoomControl.setPaintLabels(false);
  zoomControl.setPaintTrack(true);
  zoomControl.setVisible(true);
  zoomControl.addChangeListener(this);
  zoomControl.getInputMap().put(escapeKS,"String_Node_Str");
  zoomControl.getActionMap().put("String_Node_Str",escapeAction);
  Box box45=new Box(BoxLayout.Y_AXIS);
  Box box46=new Box(BoxLayout.X_AXIS);
  Box box5=new Box(BoxLayout.X_AXIS);
  Box box61=new Box(BoxLayout.X_AXIS);
  Box box62=new Box(BoxLayout.X_AXIS);
  Box box6=new Box(BoxLayout.Y_AXIS);
  box5.add(Box.createRigidArea(new Dimension(10,0)));
  box6.add(Box.createRigidArea(new Dimension(0,10)));
  scaleLab=new JLabel();
  box61.add(scaleLab);
  box61.add(Box.createRigidArea(new Dimension(5,0)));
  box62.add(zoom);
  box62.add(Box.createRigidArea(new Dimension(5,0)));
  box6.add(zoomControl);
  box6.add(Box.createRigidArea(new Dimension(0,10)));
  scaleLab.setForeground(Color.BLUE);
  String scale="String_Node_Str";
  scaleLab.setText(scale);
  box6.add(Box.createRigidArea(new Dimension(0,10)));
  box6.add(box61);
  box6.add(Box.createRigidArea(new Dimension(0,10)));
  box6.add(box62);
  box5.add(box6);
  box5.add(Box.createRigidArea(new Dimension(10,0)));
  grid.setFont(fontg);
  grid.setSelected(true);
  grid.setActionCommand("String_Node_Str");
  grid.addActionListener(this);
  grid.setBackground(slateGray1);
  grid.setBorderPaintedFlat(false);
  box6.add(Box.createRigidArea(new Dimension(0,10)));
  box45.add(box5);
  box45.add(Box.createRigidArea(new Dimension(0,10)));
  box46.add(grid);
  box46.add(Box.createRigidArea(new Dimension(0,10)));
  box45.add(box46);
  box4.add(box45);
  Point p=jtp.getLocation();
  jtp.setLocation(p.x + 100,p.y);
  box4.add(jtp);
  box4.add(Box.createRigidArea(new Dimension(50,0)));
  curDiag.area.setAlignmentX(Component.LEFT_ALIGNMENT);
  diagDesc.setAlignmentX(Component.CENTER_ALIGNMENT);
  box1.add(diagDesc);
  Font ft=fontg.deriveFont(Font.BOLD);
  diagDesc.setFont(ft);
  diagDesc.setPreferredSize(new Dimension(0,gFontHeight * 2));
  diagDesc.setForeground(Color.BLUE);
  box1.add(Box.createRigidArea(new Dimension(0,4)));
  Box box2=new Box(BoxLayout.X_AXIS);
  box2.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY));
  box1.add(box2);
  box2.add(pan);
  box2.add(Box.createRigidArea(new Dimension(10,0)));
  box2.add(Box.createHorizontalGlue());
  pan.setSelected(false);
  pan.setFont(fontg);
  pan.setActionCommand("String_Node_Str");
  pan.addActionListener(this);
  pan.setBackground(slateGray1);
  pan.setBorderPaintedFlat(false);
  ButtonGroup butGroup=new ButtonGroup();
  String buttonNames[]={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (int j=0; j < but.length; j++) {
    but[j]=new JRadioButton();
    but[j].addActionListener(this);
    butGroup.add(but[j]);
    box2.add(but[j]);
    but[j].setText(buttonNames[j]);
    but[j].setFocusable(true);
  }
  adjustFonts();
  but[0].setSelected(true);
  box2.add(Box.createHorizontalGlue());
  Component[] comps=box2.getComponents();
  for (int j=0; j < comps.length; j++) {
    if (comps[j] instanceof JRadioButton) {
      JRadioButton jrb=(JRadioButton)comps[j];
      jrb.getInputMap().put(escapeKS,"String_Node_Str");
      jrb.getActionMap().put("String_Node_Str",escapeAction);
    }
  }
  BufferedImage image=loadImage("String_Node_Str");
  frame.setIconImage(image);
  leafIcon=new ImageIcon(image);
  image=loadImage("String_Node_Str");
  javaIcon=new ImageIcon(image);
  image=loadImage("String_Node_Str");
  jarIcon=new ImageIcon(image);
  image=loadImage("String_Node_Str");
  folderIcon=new ImageIcon(image);
  image=loadImage("String_Node_Str");
  classIcon=new ImageIcon(image);
  Toolkit tk=Toolkit.getDefaultToolkit();
  image=null;
  openPawCursor=null;
  image=loadImage("String_Node_Str");
  openPawCursor=tk.createCustomCursor(image,new Point(15,15),"String_Node_Str");
  closedPawCursor=null;
  image=loadImage("String_Node_Str");
  closedPawCursor=tk.createCustomCursor(image,new Point(15,15),"String_Node_Str");
  image=loadImage("String_Node_Str");
  drag_icon=tk.createCustomCursor(image,new Point(1,1),"String_Node_Str");
}

Fixed version (ground truth):
private void buildUI(Container container){
  buildPropDescTable();
  curDiag=getNewDiag();
  MouseListener mouseListener=new MouseAdapter(){
    public void mouseClicked(    MouseEvent e){
      int i=jtp.indexAtLocation(e.getX(),e.getY());
      if (i == -1)       return;
      ButtonTabComponent b=(ButtonTabComponent)driver.jtp.getTabComponentAt(i);
      Diagram diag=b.diag;
      if (diag == null) {
        curDiag=getNewDiag();
      }
      curDiag=diag;
      frame.repaint();
    }
  }
;
  jtp.addMouseListener(mouseListener);
  container.setLayout(new BoxLayout(container,BoxLayout.Y_AXIS));
  Box box1=new Box(BoxLayout.Y_AXIS);
  container.add(box1);
  Box box4=new Box(BoxLayout.X_AXIS);
  box1.add(box4);
  int sf=(int)Math.round(100.0 * scalingFactor);
  JSlider zoomControl=new JSlider(JSlider.VERTICAL,60,200,sf);
  zoomControl.setPreferredSize(new Dimension(40,200));
  zoomControl.setMajorTickSpacing(20);
  zoomControl.setPaintTicks(true);
  zoomControl.setSnapToTicks(true);
  zoomControl.setPaintLabels(false);
  zoomControl.setPaintTrack(true);
  zoomControl.setVisible(true);
  zoomControl.addChangeListener(this);
  zoomControl.getInputMap().put(escapeKS,"String_Node_Str");
  zoomControl.getActionMap().put("String_Node_Str",escapeAction);
  Box box45=new Box(BoxLayout.Y_AXIS);
  Box box46=new Box(BoxLayout.X_AXIS);
  Box box5=new Box(BoxLayout.X_AXIS);
  Box box61=new Box(BoxLayout.X_AXIS);
  Box box62=new Box(BoxLayout.X_AXIS);
  Box box6=new Box(BoxLayout.Y_AXIS);
  box5.add(Box.createRigidArea(new Dimension(10,0)));
  box6.add(Box.createRigidArea(new Dimension(0,10)));
  scaleLab=new JLabel();
  box61.add(scaleLab);
  box61.add(Box.createRigidArea(new Dimension(5,0)));
  box62.add(zoom);
  box62.add(Box.createRigidArea(new Dimension(5,0)));
  box6.add(zoomControl);
  box6.add(Box.createRigidArea(new Dimension(0,10)));
  scaleLab.setForeground(Color.BLUE);
  String scale="String_Node_Str";
  scaleLab.setText(scale);
  box6.add(Box.createRigidArea(new Dimension(0,10)));
  box6.add(box61);
  box6.add(Box.createRigidArea(new Dimension(0,10)));
  box6.add(box62);
  box5.add(box6);
  box5.add(Box.createRigidArea(new Dimension(10,0)));
  grid.setFont(fontg);
  grid.setSelected(true);
  grid.setActionCommand("String_Node_Str");
  grid.addActionListener(this);
  grid.setBackground(slateGray1);
  grid.setBorderPaintedFlat(false);
  box6.add(Box.createRigidArea(new Dimension(0,10)));
  box45.add(box5);
  box45.add(Box.createRigidArea(new Dimension(0,10)));
  box46.add(grid);
  box46.add(Box.createRigidArea(new Dimension(0,10)));
  box45.add(box46);
  box4.add(box45);
  Point p=jtp.getLocation();
  jtp.setLocation(p.x + 100,p.y);
  box4.add(jtp);
  box4.add(Box.createRigidArea(new Dimension(50,0)));
  curDiag.area.setAlignmentX(Component.LEFT_ALIGNMENT);
  diagDesc.setAlignmentX(Component.CENTER_ALIGNMENT);
  box1.add(diagDesc);
  Font ft=fontg.deriveFont(Font.BOLD);
  diagDesc.setFont(ft);
  diagDesc.setPreferredSize(new Dimension(0,gFontHeight * 2));
  diagDesc.setForeground(Color.BLUE);
  box1.add(Box.createRigidArea(new Dimension(0,4)));
  Box box2=new Box(BoxLayout.X_AXIS);
  box2.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY));
  box1.add(box2);
  box2.add(pan);
  box2.add(Box.createRigidArea(new Dimension(10,0)));
  pan.setSelected(false);
  pan.setFont(fontg);
  pan.setActionCommand("String_Node_Str");
  pan.addActionListener(this);
  pan.setBackground(slateGray1);
  pan.setBorderPaintedFlat(false);
  ButtonGroup butGroup=new ButtonGroup();
  box21=new Box(BoxLayout.X_AXIS);
  box2.add(box21);
  String buttonNames[]={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (int j=0; j < but.length; j++) {
    but[j]=new JRadioButton();
    but[j].addActionListener(this);
    butGroup.add(but[j]);
    box21.add(but[j]);
    but[j].setText(buttonNames[j]);
    but[j].setFocusable(true);
  }
  adjustFonts();
  but[0].setSelected(true);
  box2.add(Box.createRigidArea(new Dimension(10,0)));
  for (int j=0; j < but.length; j++) {
    but[j].getInputMap().put(escapeKS,"String_Node_Str");
    but[j].getActionMap().put("String_Node_Str",escapeAction);
  }
  BufferedImage image=loadImage("String_Node_Str");
  frame.setIconImage(image);
  leafIcon=new ImageIcon(image);
  image=loadImage("String_Node_Str");
  javaIcon=new ImageIcon(image);
  image=loadImage("String_Node_Str");
  jarIcon=new ImageIcon(image);
  image=loadImage("String_Node_Str");
  folderIcon=new ImageIcon(image);
  image=loadImage("String_Node_Str");
  classIcon=new ImageIcon(image);
  Toolkit tk=Toolkit.getDefaultToolkit();
  image=null;
  openPawCursor=null;
  image=loadImage("String_Node_Str");
  openPawCursor=tk.createCustomCursor(image,new Point(15,15),"String_Node_Str");
  closedPawCursor=null;
  image=loadImage("String_Node_Str");
  closedPawCursor=tk.createCustomCursor(image,new Point(15,15),"String_Node_Str");
  image=loadImage("String_Node_Str");
  drag_icon=tk.createCustomCursor(image,new Point(1,1),"String_Node_Str");
}