Quotes the label if required.

@param lbl
The label to be quoted

@return The quoted label or the original label if quoting is not
required.
424116
private String quote(final String lbl) {
        if (lbl.indexOf(' ') == -1) {
            return lbl;
        }

        return new StringBuffer("'").append(lbl).append('\'').toString();
    }
682846
public String getLabel(HasOther e) {

	List<LangString> labels = ((HasLabel) e).getLabel();
	if ((labels == null) || (labels.isEmpty()))
	    return null;
	if (e instanceof HasLabel)
	    return labels.get(0).getValue();
	return "pFact: label TODO";
    }
627682
private StringBuilder getLabelExpression(Set<RemoteLabel> remoteLabels) {
        StringBuilder labels = new StringBuilder();
        for (RemoteLabel remoteLabel : remoteLabels) {
            labels.append(':').append(remoteLabel.getName());
        }
        return labels;
    }
1083956
protected Set<Integer> getLabelIndices(Set<L> labels) {
    Set<Integer> iLabels = new HashSet<Integer>();
    for (L label:labels) {
      int iLabel = labelIndex.indexOf(label);
      iLabels.add(iLabel);
      if (iLabel < 0) throw new IllegalArgumentException("Unknown label " + label);
    }
    return iLabels;
  }
288767
@Nullable
  static Name inlineLabel(@Nullable CharSequence label, Inliner inliner) {
    return (label == null)
        ? null
        : inliner.asName(inliner.getOptionalBinding(new Key(label)).or(label));
  }
110268
public static String getLabelFor(InputComponent<?, ?> input, boolean addColon)
   {
      String label = input.getLabel();
      // If no label was provided, use name
      if (label == null)
      {
         label = input.getName();
      }
      // if a colon is required, add it
      if (addColon && !label.endsWith(COLON))
      {
         label += COLON;
      }
      return label;
   }
42765
public Label createLocalLabel(String name) {
        Label l = (Label) currentBlockNamedLabels.get(name);
        if (l==null) {
            l = new Label();
            currentBlockNamedLabels.put(name,l);
        }
        return l;
    }
1049616
public static Label buildLabel(final String label) {
        return addLabel(Label.newBuilder(), Locale.getDefault(), label).build();
    }
1300959
protected Label createTitleLabel() {
        Label label = new Label();
        label.setWrapText(true);
        label.setMinSize(0, 0);

        return label;
    }
349138
public java.util.List<String> getLabels() {
        if (labels == null) {
            labels = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return labels;
    }
1264223
@Nullable
    protected View getCommentLabel() {
        final String commentPrompt = dialogConfiguration.commentPrompt();
        if (commentPrompt != null) {
            final TextView labelView = new TextView(this);
            labelView.setText(commentPrompt);
            return labelView;
        }
        return null;
    }
662000
def get_label(self, label, lineno):
        
        global NAMESPACE

        ex_label, namespace = Memory.id_name(label)

        for i in range(len(self.local_labels) - 1, -1, -1):  # Downstep
            result = self.local_labels[i].get(ex_label, None)
            if result is not None:
                return result

        result = Label(ex_label, lineno, namespace=namespace)
        self.local_labels[-1][ex_label] = result  # HINT: no namespace

        return result
319812
public Set<Label> getLabels() {
        Set<Label> r = new TreeSet<>();
        for (Label l : labels.values()) {
            if(!l.isEmpty())
                r.add(l);
        }
        return r;
    }
1368720
@Nonnull
  public JSLabel label (@Nonnull @Nonempty final String sName)
  {
    return addStatement (new JSLabel (sName));
  }
194341
@Nullable
  @CheckForNull
  public String getLabel() {
    String label = getString(LABEL);
    return label != null ? label : getName();
  }
834741
public BasicBlock lookupBlockByLabel(int blockLabel) {
        for (Iterator<BasicBlock> i = blockIterator(); i.hasNext();) {
            BasicBlock basicBlock = i.next();
            if (basicBlock.getLabel() == blockLabel) {
                return basicBlock;
            }
        }
        return null;
    }
736566
@Override
    public boolean validateLabel(String label) {
        Objects.requireNonNull(label, "label cannot be null");
        // check label is in set
        return !labels.contains(label);
    }