Program: 31100
Project: 31100
Buggy source:
@Override public void mouseReleased(Canvas canvas,Graphics g,MouseEvent e){
  Project proj=canvas.getProject();
  if (state == MOVING) {
    setState(proj,IDLE);
    computeDxDy(proj,e,g);
    int dx=curDx;
    int dy=curDy;
    if (dx != 0 || dy != 0) {
      if (!proj.getLogisimFile().contains(canvas.getCircuit())) {
        canvas.setErrorMessage(Strings.getter("String_Node_Str"));
      }
 else       if (proj.getSelection().hasConflictWhenMoved(dx,dy)) {
        canvas.setErrorMessage(Strings.getter("String_Node_Str"));
      }
 else {
        boolean connect=shouldConnect(canvas,e.getModifiersEx());
        drawConnections=false;
        ReplacementMap repl;
        if (connect) {
          MoveGesture gesture=moveGesture;
          if (gesture == null) {
            gesture=new MoveGesture(new MoveRequestHandler(canvas),canvas.getCircuit(),canvas.getSelection().getAnchoredComponents());
          }
          canvas.setErrorMessage(new ComputingMessage(dx,dy),COLOR_COMPUTING);
          MoveResult result=gesture.forceRequest(dx,dy);
          clearCanvasMessage(canvas,dx,dy);
          repl=result.getReplacementMap();
        }
 else {
          repl=null;
        }
        Selection sel=proj.getSelection();
        proj.doAction(SelectionActions.translate(sel,dx,dy,repl));
      }
    }
    moveGesture=null;
    proj.repaintCanvas();
  }
 else   if (state == RECT_SELECT) {
    Bounds bds=Bounds.create(start).add(start.getX() + curDx,start.getY() + curDy);
    Circuit circuit=canvas.getCircuit();
    Selection sel=proj.getSelection();
    Collection<Component> in_sel=sel.getComponentsWithin(bds,g);
    for (    Component comp : circuit.getAllWithin(bds,g)) {
      if (!in_sel.contains(comp))       sel.add(comp);
    }
    Action act=SelectionActions.drop(sel,in_sel);
    if (act != null) {
      proj.doAction(act);
    }
    setState(proj,IDLE);
    proj.repaintCanvas();
  }
  if (e.getClickCount() >= 2) {
    Set<Component> comps=canvas.getProject().getSelection().getComponents();
    if (comps.size() == 1) {
      for (      Component comp : comps) {
        if (comp.getAttributeSet().containsAttribute(StdAttr.LABEL)) {
          String OldLabel=comp.getAttributeSet().getValue(StdAttr.LABEL);
          SetAttributeAction act=new SetAttributeAction(canvas.getCircuit(),Strings.getter("String_Node_Str"));
          AutoLabel.AskAndSetLabel(comp.getFactory().getDisplayName(),OldLabel,canvas.getCircuit(),comp,comp.getAttributeSet(),act,true);
          if (!act.isEmpty())           canvas.getProject().doAction(act);
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void mouseReleased(Canvas canvas,Graphics g,MouseEvent e){
  Project proj=canvas.getProject();
  if (state == MOVING) {
    setState(proj,IDLE);
    computeDxDy(proj,e,g);
    int dx=curDx;
    int dy=curDy;
    if (dx != 0 || dy != 0) {
      if (!proj.getLogisimFile().contains(canvas.getCircuit())) {
        canvas.setErrorMessage(Strings.getter("String_Node_Str"));
      }
 else       if (proj.getSelection().hasConflictWhenMoved(dx,dy)) {
        canvas.setErrorMessage(Strings.getter("String_Node_Str"));
      }
 else {
        boolean connect=shouldConnect(canvas,e.getModifiersEx());
        drawConnections=false;
        ReplacementMap repl;
        if (connect) {
          MoveGesture gesture=moveGesture;
          if (gesture == null) {
            gesture=new MoveGesture(new MoveRequestHandler(canvas),canvas.getCircuit(),canvas.getSelection().getAnchoredComponents());
          }
          canvas.setErrorMessage(new ComputingMessage(dx,dy),COLOR_COMPUTING);
          MoveResult result=gesture.forceRequest(dx,dy);
          clearCanvasMessage(canvas,dx,dy);
          repl=result.getReplacementMap();
        }
 else {
          repl=null;
        }
        Selection sel=proj.getSelection();
        proj.doAction(SelectionActions.translate(sel,dx,dy,repl));
      }
    }
    moveGesture=null;
    proj.repaintCanvas();
  }
 else   if (state == RECT_SELECT) {
    Bounds bds=Bounds.create(start).add(start.getX() + curDx,start.getY() + curDy);
    Circuit circuit=canvas.getCircuit();
    Selection sel=proj.getSelection();
    Collection<Component> in_sel=sel.getComponentsWithin(bds,g);
    for (    Component comp : circuit.getAllWithin(bds,g)) {
      if (!in_sel.contains(comp))       sel.add(comp);
    }
    Action act=SelectionActions.drop(sel,in_sel);
    if (act != null) {
      proj.doAction(act);
    }
    setState(proj,IDLE);
    proj.repaintCanvas();
  }
  if (e.getClickCount() >= 2) {
    Set<Component> comps=canvas.getProject().getSelection().getComponents();
    if (comps.size() == 1) {
      for (      Component comp : comps) {
        if (comp.getAttributeSet().containsAttribute(StdAttr.LABEL)) {
          String OldLabel=comp.getAttributeSet().getValue(StdAttr.LABEL);
          SetAttributeAction act=new SetAttributeAction(canvas.getCircuit(),Strings.getter("String_Node_Str"));
          AutoLabler.AskAndSetLabel(comp.getFactory().getDisplayName(),OldLabel,canvas.getCircuit(),comp,comp.getAttributeSet(),act,true);
          if (!act.isEmpty())           canvas.getProject().doAction(act);
        }
      }
    }
  }
}