Program: 170246
Project: 170246
Buggy source:
/** 
 * Create the GUI and show it. For thread safety, this method should be invoked from the event-dispatching thread.
 */
private void createAndShowGUI(){
  Dimension dim=Toolkit.getDefaultToolkit().getScreenSize();
  frame=this;
  frame.setTitle("String_Node_Str");
  SwingUtilities.updateComponentTreeUI(frame);
  frame.setUndecorated(false);
  frame.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
  applyOrientation(frame);
  int w=(int)dim.getWidth();
  int h=(int)dim.getHeight();
  maxX=(int)(w * .8);
  maxY=(int)(h * .8);
  buffer=new BufferedImage(w,h,BufferedImage.TYPE_INT_RGB);
  osg=buffer.createGraphics();
  bs=new BasicStroke(1.5f,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND);
  osg.setStroke(bs);
  osg.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  readPropertiesFile();
  if (null == (generalFont=properties.get("String_Node_Str")))   generalFont="String_Node_Str";
  if (null == (fixedFont=properties.get("String_Node_Str")))   fixedFont="String_Node_Str";
  String dfs=properties.get("String_Node_Str");
  if (dfs == null)   defaultFontSize=14;
 else   defaultFontSize=Integer.parseInt(dfs);
  String dcl=properties.get("String_Node_Str");
  if (dcl == null) {
    defaultCompLang=findGLFromLabel("String_Node_Str");
    propertiesChanged=true;
  }
 else {
    if (dcl.equals("String_Node_Str"))     dcl="String_Node_Str";
    defaultCompLang=findGLFromLabel(dcl);
  }
  startProperties=new HashMap<String,String>();
  for (  String s : properties.keySet()) {
    startProperties.put(s,properties.get(s));
  }
  fontg=new Font(generalFont,Font.PLAIN,defaultFontSize);
  fontf=new Font(fixedFont,Font.PLAIN,defaultFontSize);
  osg.setFont(fontg);
  FontMetrics metrics=osg.getFontMetrics(fontg);
  fontWidth=metrics.charWidth('n');
  fontHeight=metrics.getAscent() + metrics.getLeading();
  jfl=new JTextField("String_Node_Str");
  jfl.setText("String_Node_Str" + fixedFont + "String_Node_Str"+ generalFont);
  jtp=new JTabbedPaneWithCloseIcons(this);
  jtp.setForeground(Color.BLACK);
  jtp.setBackground(Color.WHITE);
  BufferedImage image=loadImage("String_Node_Str");
  if (image != null) {
    favicon=new ImageIcon(image);
    frame.setIconImage(image);
  }
 else {
    MyOptionPane.showMessageDialog(frame,"String_Node_Str");
  }
  frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
  closeTabAction=new CloseTabAction();
  closeAppAction=new CloseAppAction();
  escapeAction=new EscapeAction();
  frame.addWindowListener(new WindowAdapter(){
    @Override public void windowClosing(    WindowEvent ev){
      closeAppAction.actionPerformed(new ActionEvent(ev,0,"String_Node_Str"));
    }
  }
);
  jtp.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(escapeKS,"String_Node_Str");
  jtp.getActionMap().put("String_Node_Str",escapeAction);
  Container cont=frame.getContentPane();
  buildUI(cont);
  frame.add(Box.createRigidArea(new Dimension(0,10)));
  String t=properties.get("String_Node_Str");
  int x=0, y=0, w2=1200, h2=800;
  if (t != null)   x=Integer.parseInt(t);
  t=properties.get("String_Node_Str");
  if (t != null)   y=Integer.parseInt(t);
  Point p=new Point(x,y);
  frame.setLocation(p);
  t=properties.get("String_Node_Str");
  if (t != null)   w2=Integer.parseInt(t);
  t=properties.get("String_Node_Str");
  if (t != null)   h2=Integer.parseInt(t);
  Dimension dim2=new Dimension(w2,h2);
  frame.setPreferredSize(dim2);
  frame.repaint();
  frame.pack();
  frame.setVisible(true);
  frame.addComponentListener(this);
  frame.repaint();
  wDiff=frame.getWidth() - curDiag.area.getWidth();
  hDiff=frame.getHeight() - curDiag.area.getHeight();
  diagramName=properties.get("String_Node_Str");
  boolean small=(diagramName) == null ? false : true;
  if (!small)   new SplashWindow(frame,3000,this,small);
  if (diagramName != null) {
    actionPerformed(new ActionEvent(this,ActionEvent.ACTION_PERFORMED,"String_Node_Str" + diagramName));
  }
  frame.repaint();
}

Fixed version (ground truth):
/** 
 * Create the GUI and show it. For thread safety, this method should be invoked from the event-dispatching thread.
 */
private void createAndShowGUI(){
  Dimension dim=Toolkit.getDefaultToolkit().getScreenSize();
  frame=this;
  frame.setTitle("String_Node_Str");
  SwingUtilities.updateComponentTreeUI(frame);
  frame.setUndecorated(false);
  frame.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
  applyOrientation(frame);
  int w=(int)dim.getWidth();
  int h=(int)dim.getHeight();
  maxX=(int)(w * .8);
  maxY=(int)(h * .8);
  buffer=new BufferedImage(w,h,BufferedImage.TYPE_INT_RGB);
  osg=buffer.createGraphics();
  bs=new BasicStroke(1.5f,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND);
  osg.setStroke(bs);
  osg.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  readPropertiesFile();
  if (null == (generalFont=properties.get("String_Node_Str")))   generalFont="String_Node_Str";
  if (null == (fixedFont=properties.get("String_Node_Str")))   fixedFont="String_Node_Str";
  String dfs=properties.get("String_Node_Str");
  if (dfs == null)   defaultFontSize=14;
 else   defaultFontSize=Integer.parseInt(dfs);
  String dcl=properties.get("String_Node_Str");
  if (dcl == null) {
    defaultCompLang=findGLFromLabel("String_Node_Str");
    propertiesChanged=true;
  }
 else {
    if (dcl.equals("String_Node_Str"))     dcl="String_Node_Str";
    defaultCompLang=findGLFromLabel(dcl);
  }
  Iterator entries=jarFiles.entrySet().iterator();
  String z="String_Node_Str";
  String cma="String_Node_Str";
  boolean first=true;
  while (entries.hasNext()) {
    @SuppressWarnings("String_Node_Str") Entry<String,String> thisEntry=(Entry<String,String>)entries.next();
    if (!first) {
      z+=cma + thisEntry.getKey() + "String_Node_Str"+ thisEntry.getValue();
      cma="String_Node_Str";
    }
    first=false;
  }
  properties.put("String_Node_Str",z);
  startProperties=new HashMap<String,String>();
  for (  String s : properties.keySet()) {
    startProperties.put(s,properties.get(s));
  }
  fontg=new Font(generalFont,Font.PLAIN,defaultFontSize);
  fontf=new Font(fixedFont,Font.PLAIN,defaultFontSize);
  osg.setFont(fontg);
  FontMetrics metrics=osg.getFontMetrics(fontg);
  fontWidth=metrics.charWidth('n');
  fontHeight=metrics.getAscent() + metrics.getLeading();
  jfl=new JTextField("String_Node_Str");
  jfl.setText("String_Node_Str" + fixedFont + "String_Node_Str"+ generalFont);
  jtp=new JTabbedPaneWithCloseIcons(this);
  jtp.setForeground(Color.BLACK);
  jtp.setBackground(Color.WHITE);
  BufferedImage image=loadImage("String_Node_Str");
  if (image != null) {
    favicon=new ImageIcon(image);
    frame.setIconImage(image);
  }
 else {
    MyOptionPane.showMessageDialog(frame,"String_Node_Str");
  }
  frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
  closeTabAction=new CloseTabAction();
  closeAppAction=new CloseAppAction();
  escapeAction=new EscapeAction();
  frame.addWindowListener(new WindowAdapter(){
    @Override public void windowClosing(    WindowEvent ev){
      closeAppAction.actionPerformed(new ActionEvent(ev,0,"String_Node_Str"));
    }
  }
);
  jtp.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(escapeKS,"String_Node_Str");
  jtp.getActionMap().put("String_Node_Str",escapeAction);
  Container cont=frame.getContentPane();
  buildUI(cont);
  frame.add(Box.createRigidArea(new Dimension(0,10)));
  String t=properties.get("String_Node_Str");
  int x=0, y=0, w2=1200, h2=800;
  if (t != null)   x=Integer.parseInt(t);
  t=properties.get("String_Node_Str");
  if (t != null)   y=Integer.parseInt(t);
  Point p=new Point(x,y);
  frame.setLocation(p);
  t=properties.get("String_Node_Str");
  if (t != null)   w2=Integer.parseInt(t);
  t=properties.get("String_Node_Str");
  if (t != null)   h2=Integer.parseInt(t);
  Dimension dim2=new Dimension(w2,h2);
  frame.setPreferredSize(dim2);
  frame.repaint();
  frame.pack();
  frame.setVisible(true);
  frame.addComponentListener(this);
  frame.repaint();
  wDiff=frame.getWidth() - curDiag.area.getWidth();
  hDiff=frame.getHeight() - curDiag.area.getHeight();
  diagramName=properties.get("String_Node_Str");
  boolean small=(diagramName) == null ? false : true;
  if (!small)   new SplashWindow(frame,3000,this,small);
  if (diagramName != null) {
    actionPerformed(new ActionEvent(this,ActionEvent.ACTION_PERFORMED,"String_Node_Str" + diagramName));
  }
  frame.repaint();
}