Program: 7140
Project: 7140
Buggy source:
private void addListeners(){
  v.addUpListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      Rectangle2D.Double old=m.getBounds();
      m.updateBounds(new Rectangle2D.Double(old.x,old.y + (1 * old.getHeight() * MOVE_LENGTH),old.width,old.height));
      v.repaint(m.getLines());
    }
  }
);
  v.addDownListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      Rectangle2D.Double old=m.getBounds();
      m.updateBounds(new Rectangle2D.Double(old.x,old.y - (1 * old.getHeight() * MOVE_LENGTH),old.width,old.height));
      v.repaint(m.getLines());
    }
  }
);
  v.addLeftListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      Rectangle2D.Double old=m.getBounds();
      m.updateBounds(new Rectangle2D.Double(old.x - (1 * old.width * MOVE_LENGTH),old.y,old.width,old.height));
      v.repaint(m.getLines());
    }
  }
);
  v.addRightListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      Rectangle2D.Double old=m.getBounds();
      m.updateBounds(new Rectangle2D.Double(old.x + (1 * old.width * MOVE_LENGTH),old.y,old.width,old.height));
      v.repaint(m.getLines());
    }
  }
);
  v.addInListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      Rectangle2D.Double old=m.getBounds();
      m.updateBounds(zoomRect(ZOOM_LENGTH,true,old));
      v.repaint(m.getLines());
    }
  }
);
  v.addOutListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      Rectangle2D.Double old=m.getBounds();
      m.updateBounds(zoomRect(ZOOM_LENGTH,false,old));
      v.repaint(m.getLines());
    }
  }
);
  v.addCanvasMouseListener(new MouseAdapter(){
    private Point a=null;
    private Point b=null;
    private Rectangle2D.Double p=null;
    public void mousePressed(    MouseEvent e){
      a=e.getPoint();
    }
    public void mouseReleased(    MouseEvent e){
      if (a == null)       return;
      b=e.getPoint();
      if (Math.abs(b.x - a.x) < v.getCanvasWidth() / 100 || Math.abs(b.y - a.y) < v.getCanvasHeight() / 100)       return;
      p=point2DToRectangle(pixelToUTM(a),pixelToUTM(b));
      fixRatio(p,m.getBounds());
      m.updateBounds(p);
      v.repaint(m.getLines());
    }
    public void mouseClicked(    MouseEvent e){
      System.out.println("String_Node_Str");
      v.setLabel(m.getClosestRoad(pixelToUTM(e.getPoint())));
    }
  }
);
  v.addCanvasComponentListener(new ComponentAdapter(){
    private int oldWidth=v.getCanvasWidth();
    private int oldHeight=v.getCanvasHeight();
    @Override public void componentResized(    ComponentEvent e){
      Stopwatch timer=new Stopwatch("String_Node_Str");
      Rectangle2D.Double map=m.getBounds();
      int newWidth=v.getCanvasWidth();
      int newHeight=v.getCanvasHeight();
      double x_adjust=map.width * (((double)newWidth - oldWidth) / oldWidth);
      double y_adjust=map.height * (((double)newHeight - oldHeight) / oldHeight);
      m.updateBounds(new Rectangle2D.Double(map.x,map.y - y_adjust,map.width + x_adjust,map.height + y_adjust));
      oldWidth=newWidth;
      oldHeight=newHeight;
      timer.printTime();
      v.repaint(m.getLines());
    }
  }
);
}

Fixed version (ground truth):
private void addListeners(){
  v.addUpListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      Rectangle2D.Double old=m.getBounds();
      m.updateBounds(new Rectangle2D.Double(old.x,old.y + (1 * old.getHeight() * MOVE_LENGTH),old.width,old.height));
      v.repaint(m.getLines());
    }
  }
);
  v.addDownListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      Rectangle2D.Double old=m.getBounds();
      m.updateBounds(new Rectangle2D.Double(old.x,old.y - (1 * old.getHeight() * MOVE_LENGTH),old.width,old.height));
      v.repaint(m.getLines());
    }
  }
);
  v.addLeftListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      Rectangle2D.Double old=m.getBounds();
      m.updateBounds(new Rectangle2D.Double(old.x - (1 * old.width * MOVE_LENGTH),old.y,old.width,old.height));
      v.repaint(m.getLines());
    }
  }
);
  v.addRightListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      Rectangle2D.Double old=m.getBounds();
      m.updateBounds(new Rectangle2D.Double(old.x + (1 * old.width * MOVE_LENGTH),old.y,old.width,old.height));
      v.repaint(m.getLines());
    }
  }
);
  v.addInListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      Rectangle2D.Double old=m.getBounds();
      m.updateBounds(zoomRect(ZOOM_LENGTH,true,old));
      v.repaint(m.getLines());
    }
  }
);
  v.addOutListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      Rectangle2D.Double old=m.getBounds();
      m.updateBounds(zoomRect(ZOOM_LENGTH,false,old));
      v.repaint(m.getLines());
    }
  }
);
  v.addCanvasMouseListener(new MouseAdapter(){
    private Point a=null;
    private Point b=null;
    private Rectangle2D.Double p=null;
    public void mousePressed(    MouseEvent e){
      a=e.getPoint();
    }
    public void mouseReleased(    MouseEvent e){
      if (a == null)       return;
      b=e.getPoint();
      if (Math.abs(b.x - a.x) < v.getCanvasWidth() / 100 || Math.abs(b.y - a.y) < v.getCanvasHeight() / 100)       return;
      p=point2DToRectangle(pixelToUTM(a),pixelToUTM(b));
      fixRatio(p,m.getBounds());
      m.updateBounds(p);
      v.repaint(m.getLines());
    }
    @Override public void mouseMoved(    MouseEvent e){
      v.setLabel(m.getClosestRoad(pixelToUTM(e.getPoint())));
    }
  }
);
  v.addCanvasComponentListener(new ComponentAdapter(){
    private int oldWidth=v.getCanvasWidth();
    private int oldHeight=v.getCanvasHeight();
    @Override public void componentResized(    ComponentEvent e){
      Stopwatch timer=new Stopwatch("String_Node_Str");
      Rectangle2D.Double map=m.getBounds();
      int newWidth=v.getCanvasWidth();
      int newHeight=v.getCanvasHeight();
      double x_adjust=map.width * (((double)newWidth - oldWidth) / oldWidth);
      double y_adjust=map.height * (((double)newHeight - oldHeight) / oldHeight);
      m.updateBounds(new Rectangle2D.Double(map.x,map.y - y_adjust,map.width + x_adjust,map.height + y_adjust));
      oldWidth=newWidth;
      oldHeight=newHeight;
      timer.printTime();
      v.repaint(m.getLines());
    }
  }
);
}