Program: 140910
Project: 140910
Buggy source:
/** 
 * Constructor for the JFrame. Initializes components and sets up the default color gradient.
 * @param model model object
 */
public MainWindow(Model model){
  this.model=model;
  initRecentDocumentsMenu();
  initComponents();
  MenuKeysDispatcher.setupDialogActions(menuBar);
  GUIUtil.zoomMenuCommands(zoomInAction,zoomOutAction,getRootPane());
  progressPanel=new ProgressPanel();
  progressPanel.setOpaque(false);
  setGlassPane(progressPanel);
  progressPanel.setVisible(false);
  TabStop[] tabs=new TabStop[1];
  tabs[0]=new TabStop(80,TabStop.ALIGN_DECIMAL,TabStop.LEAD_NONE);
  TabSet tabset=new TabSet(tabs);
  StyleContext sc=StyleContext.getDefaultStyleContext();
  AttributeSet aset=sc.addAttribute(SimpleAttributeSet.EMPTY,StyleConstants.TabSet,tabset);
  infoTextPane.setParagraphAttributes(aset,false);
  showDebugMenuWhenAssertionsAreEnabled();
  navigableImagePanel.setInfoString("String_Node_Str");
  Color focusColor=new Color(190,230,255);
  Border border=javax.swing.BorderFactory.createLineBorder(focusColor,4);
  new FileDrop(null,navigableImagePanel,border,new FileDrop.Listener(){
    @Override public void filesDropped(    java.io.File[] files){
      try {
        int maxNbrFilesToScan=Math.min(files.length,100);
        for (int i=0; i < maxNbrFilesToScan; i++) {
          String filePath=files[i].getCanonicalPath();
          if (EsriASCIIGridReader.canRead(filePath)) {
            openGrid(filePath);
          }
        }
      }
 catch (      IOException ex) {
        ErrorDialog.showErrorDialog(OPEN_ERROR_MESSAGE,"String_Node_Str",ex,navigableImagePanel.getParent());
      }
    }
  }
);
  navigableImagePanel.addPropertyChangeListener(new PropertyChangeListener(){
    final String outOfGrid="String_Node_Str";
    final DecimalFormat valFormat=new DecimalFormat("String_Node_Str");
    final DecimalFormat slopeFormat=new DecimalFormat("String_Node_Str");
    @Override public void propertyChange(    PropertyChangeEvent evt){
      if ("String_Node_Str".equals(evt.getPropertyName())) {
        int gridCol=-1, gridRow=-1;
        double x=Double.NaN, y=Double.NaN;
        boolean validXY=false;
        int r=-1, g=-1, b=-1;
        float v=Float.NaN;
        double slope=Double.NaN;
        if (evt.getNewValue() != null && model.hasGrid()) {
          assert(evt.getNewValue() instanceof Point2D.Double);
          Grid grid=model.getGrid();
          Point2D pt=(Point2D.Double)evt.getNewValue();
          double xPerc=pt.getX();
          double yPerc=pt.getY();
          gridCol=(int)(xPerc / 100 * (grid.getCols() - 1));
          gridRow=(int)(yPerc / 100 * (grid.getRows() - 1));
          x=grid.getWest() + xPerc / 100 * grid.getWidth();
          y=grid.getNorth() - yPerc / 100 * grid.getHeight();
          validXY=Double.isFinite(x) && Double.isFinite(y);
          BufferedImage image=navigableImagePanel.getImage();
          if (image != null) {
            int imageCol=(int)(xPerc / 100 * (image.getWidth() - 1));
            int imageRow=(int)(yPerc / 100 * (image.getHeight() - 1));
            int argb=image.getRGB(imageCol,imageRow);
            Color color=new Color(argb,true);
            r=color.getRed();
            g=color.getGreen();
            b=color.getBlue();
          }
          v=grid.getValue(gridCol,gridRow);
          slope=Math.toDegrees(Math.atan(grid.get8NeighborGradient(gridCol,gridRow)));
        }
        StringBuilder sb=new StringBuilder();
        if (model.isGeneralizing()) {
          sb.append("String_Node_Str");
          sb.append(Float.isFinite(v) ? valFormat.format(v) : (validXY ? "String_Node_Str" : outOfGrid));
          sb.append("String_Node_Str");
          v=model.getFilteredGrid().getValue(gridCol,gridRow);
          sb.append(Float.isFinite(v) ? valFormat.format(v) : (validXY ? "String_Node_Str" : outOfGrid));
        }
 else {
          sb.append("String_Node_Str");
          sb.append(Float.isFinite(v) ? valFormat.format(v) : (validXY ? "String_Node_Str" : outOfGrid));
        }
        if (r >= 0) {
          if (r == g && g == b) {
            sb.append("String_Node_Str").append(r);
          }
 else {
            sb.append("String_Node_Str").append(r).append("String_Node_Str");
            sb.append(g).append("String_Node_Str").append(b);
          }
        }
 else {
          boolean rgb=false;
          if (infoTextPane.getText() != null) {
            rgb=infoTextPane.getText().contains("String_Node_Str");
          }
          sb.append("String_Node_Str").append(rgb ? "String_Node_Str" : "String_Node_Str").append("String_Node_Str").append(outOfGrid);
        }
        sb.append("String_Node_Str");
        boolean validSlope=Double.isFinite(slope);
        sb.append(validSlope ? slopeFormat.format(slope) : outOfGrid);
        if (validSlope) {
          sb.append("String_Node_Str");
        }
        boolean spherical=model.hasGrid() && model.getGrid().isCellSizeInSphericalCoordinates();
        DecimalFormat xyFormat=validXY ? new DecimalFormat(spherical ? "String_Node_Str" : "String_Node_Str") : null;
        sb.append("String_Node_Str");
        sb.append(xyFormat != null ? xyFormat.format(x) : outOfGrid);
        sb.append("String_Node_Str");
        sb.append(xyFormat != null ? xyFormat.format(y) : outOfGrid);
        boolean validCell=model.hasGrid() && gridCol >= 0 && gridCol < model.getGrid().getCols() && gridRow >= 0 && gridRow < model.getGrid().getRows();
        sb.append("String_Node_Str").append(validCell ? gridCol + 1 : outOfGrid);
        sb.append("String_Node_Str").append(validCell ? gridRow + 1 : outOfGrid);
        infoTextPane.setText(sb.toString());
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Constructor for the JFrame. Initializes components and sets up the default color gradient.
 * @param model model object
 */
public MainWindow(Model model){
  this.model=model;
  initRecentDocumentsMenu();
  initComponents();
  MenuKeysDispatcher.setupDialogActions(menuBar);
  GUIUtil.zoomMenuCommands(zoomInAction,zoomOutAction,getRootPane());
  progressPanel=new ProgressPanel();
  progressPanel.setOpaque(false);
  setGlassPane(progressPanel);
  progressPanel.setVisible(false);
  TabStop[] tabs=new TabStop[1];
  tabs[0]=new TabStop(80,TabStop.ALIGN_DECIMAL,TabStop.LEAD_NONE);
  TabSet tabset=new TabSet(tabs);
  StyleContext sc=StyleContext.getDefaultStyleContext();
  AttributeSet aset=sc.addAttribute(SimpleAttributeSet.EMPTY,StyleConstants.TabSet,tabset);
  infoTextPane.setParagraphAttributes(aset,false);
  showDebugMenuWhenAssertionsAreEnabled();
  navigableImagePanel.setInfoString("String_Node_Str");
  Color focusColor=new Color(190,230,255);
  Border border=javax.swing.BorderFactory.createLineBorder(focusColor,4);
  new FileDrop(null,navigableImagePanel,border,new FileDrop.Listener(){
    @Override public void filesDropped(    java.io.File[] files){
      try {
        int maxNbrFilesToScan=Math.min(files.length,100);
        for (int i=0; i < maxNbrFilesToScan; i++) {
          String filePath=files[i].getCanonicalPath();
          if (EsriASCIIGridReader.canRead(filePath)) {
            openGrid(filePath);
          }
        }
      }
 catch (      IOException ex) {
        ErrorDialog.showErrorDialog(OPEN_ERROR_MESSAGE,"String_Node_Str",ex,navigableImagePanel.getParent());
      }
    }
  }
);
  navigableImagePanel.addPropertyChangeListener(new PropertyChangeListener(){
    final String outOfGrid="String_Node_Str";
    final DecimalFormat valFormat=new DecimalFormat("String_Node_Str");
    final DecimalFormat slopeFormat=new DecimalFormat("String_Node_Str");
    @Override public void propertyChange(    PropertyChangeEvent evt){
      if ("String_Node_Str".equals(evt.getPropertyName())) {
        int gridCol=-1, gridRow=-1;
        double x=Double.NaN, y=Double.NaN;
        boolean validXY=false;
        int r=-1, g=-1, b=-1;
        float v=Float.NaN;
        double slope=Double.NaN;
        if (evt.getNewValue() != null && model.hasGrid()) {
          assert(evt.getNewValue() instanceof Point2D.Double);
          Grid grid=model.getGrid();
          Point2D pt=(Point2D.Double)evt.getNewValue();
          double xPerc=pt.getX();
          double yPerc=pt.getY();
          if (xPerc < 0) {
            gridCol=-1;
          }
 else           if (xPerc >= 100) {
            gridCol=grid.getCols() - 1;
          }
 else {
            gridCol=(int)(xPerc / 100 * grid.getCols());
          }
          if (yPerc < 0) {
            gridRow=-1;
          }
 else           if (yPerc >= 100) {
            gridRow=grid.getRows() - 1;
          }
 else {
            gridRow=(int)(yPerc / 100 * grid.getRows());
          }
          x=grid.getWest() + xPerc / 100 * grid.getWidth();
          y=grid.getNorth() - yPerc / 100 * grid.getHeight();
          validXY=Double.isFinite(x) && Double.isFinite(y);
          BufferedImage image=navigableImagePanel.getImage();
          if (image != null) {
            int imageCol=(int)(xPerc / 100 * (image.getWidth() - 1));
            int imageRow=(int)(yPerc / 100 * (image.getHeight() - 1));
            int argb=image.getRGB(imageCol,imageRow);
            Color color=new Color(argb,true);
            r=color.getRed();
            g=color.getGreen();
            b=color.getBlue();
          }
          v=grid.getValue(gridCol,gridRow);
          slope=Math.toDegrees(Math.atan(grid.get8NeighborGradient(gridCol,gridRow)));
        }
        StringBuilder sb=new StringBuilder();
        if (model.isGeneralizing()) {
          sb.append("String_Node_Str");
          sb.append(Float.isFinite(v) ? valFormat.format(v) : (validXY ? "String_Node_Str" : outOfGrid));
          sb.append("String_Node_Str");
          v=model.getFilteredGrid().getValue(gridCol,gridRow);
          sb.append(Float.isFinite(v) ? valFormat.format(v) : (validXY ? "String_Node_Str" : outOfGrid));
        }
 else {
          sb.append("String_Node_Str");
          sb.append(Float.isFinite(v) ? valFormat.format(v) : (validXY ? "String_Node_Str" : outOfGrid));
        }
        if (r >= 0) {
          if (r == g && g == b) {
            sb.append("String_Node_Str").append(r);
          }
 else {
            sb.append("String_Node_Str").append(r).append("String_Node_Str");
            sb.append(g).append("String_Node_Str").append(b);
          }
        }
 else {
          boolean rgb=false;
          if (infoTextPane.getText() != null) {
            rgb=infoTextPane.getText().contains("String_Node_Str");
          }
          sb.append("String_Node_Str").append(rgb ? "String_Node_Str" : "String_Node_Str").append("String_Node_Str").append(outOfGrid);
        }
        sb.append("String_Node_Str");
        boolean validSlope=Double.isFinite(slope);
        sb.append(validSlope ? slopeFormat.format(slope) : outOfGrid);
        if (validSlope) {
          sb.append("String_Node_Str");
        }
        boolean spherical=model.hasGrid() && model.getGrid().isCellSizeInSphericalCoordinates();
        DecimalFormat xyFormat=validXY ? new DecimalFormat(spherical ? "String_Node_Str" : "String_Node_Str") : null;
        sb.append("String_Node_Str");
        sb.append(xyFormat != null ? xyFormat.format(x) : outOfGrid);
        sb.append("String_Node_Str");
        sb.append(xyFormat != null ? xyFormat.format(y) : outOfGrid);
        boolean validCell=model.hasGrid() && gridCol >= 0 && gridCol < model.getGrid().getCols() && gridRow >= 0 && gridRow < model.getGrid().getRows();
        sb.append("String_Node_Str").append(validCell ? gridCol + 1 : outOfGrid);
        sb.append("String_Node_Str").append(validCell ? gridRow + 1 : outOfGrid);
        infoTextPane.setText(sb.toString());
      }
    }
  }
);
}