code: public void setAssignedLabel(Label l) throws IOException {
          if(l==null) {
              canRoam = true;
              assignedNode = null;
          } else {
              canRoam = false;
              if(l== Jenkins.getInstance().getSelfLabel())  assignedNode = null;
              else                                        assignedNode = l.getExpression();
          }
          save();
      }
docs: Sets the assigned label.