A convenience method to shorten the creation of a basic proposal.
<p>
Equivalent to <code>basicProposal( s, lastWord, false )</code>.
</p>

@param s
@param lastWord
@return a non-null proposal
519488
public static RoboconfCompletionProposal basicProposal( String s, String lastWord ) {
		return basicProposal( s, lastWord, false );
	}
1125830
public String resolveProps(@Nullable String s) {
		if (s == null) {
			return null;
		}

		int ipos = 0;
		int pos = s.indexOf("${", ipos);

		if (pos == -1)
			return s;

		StringBuilder sb = new StringBuilder();

		while (ipos < s.length()) {
			pos = s.indexOf("${", ipos);

			if (pos < 0) {
				sb.append(s.substring(ipos));
				break;
			}

			if (pos != ipos)
				sb.append(s.substring(ipos, pos));

			int end = s.indexOf('}', pos);

			if (end < 0)
				break;

			int start = pos + 2;

			String key = s.substring(start, end);
			String val = resolveString(key);

			if (val != null)
				sb.append(val);
			else
				sb.append("${").append(key).append("}");

			ipos = end + 1;
		}

		return sb.toString();
	}
835531
public static ListSupertaggedSentence createWithUnobservedSupertags(List<String> words, List<String> pos) {
    return new ListSupertaggedSentence(WordAndPos.createExample(words, pos),
        Collections.nCopies(words.size(), Collections.<HeadedSyntacticCategory>emptyList()),
        Collections.nCopies(words.size(), Collections.<Double>emptyList()));
  }
1130352
public void add(byte b, String s) {
		if (s != null) {
			String s2 = get(b);
			if (s2 == null)
				s2 = s;
			else
				s2 += lineSeparator + s;
			set(b, s2);
		}
	}
1343144
public SimplifySpanBuild appendToFirst(String text) {
        if (TextUtils.isEmpty(text)) return this;

        mNormalSizeText.append(text);
        mBeforeStringBuilder.append(text);
        return this;
    }
548265
@Override
    public JsDestinationAddress createSystemDestination(String prefix)
                    throws SIResourceException, SIMPDestinationAlreadyExistsException, SIIncorrectCallException
    {
        //prefixes should be unique, 24 chars or less and
        //can contain the characters a-z, A-Z, 0-9, ., /, and %.
        boolean valid = isDestinationPrefixValid(prefix);
        if (!valid)
        {
            throw new SIInvalidDestinationPrefixException(
                            nls.getFormattedMessage(
                                                    "INVALID_DESTINATION_PREFIX_ERROR_CWSIP0023",
                                                    new Object[] { prefix },
                                                    null));
        }

        return _destinationManager.createSystemDestination(prefix);
    }
385807
public Criteria startsWith(String s) {
		assertNoBlankInWildcardedQuery(s, false, true);
		predicates.add(new Predicate(OperationKey.STARTS_WITH, s));
		return this;

	}
543655
public synchronized PacketBuilder withShort(final short s)
    {
        checkBuilt();
        try
        {
            dataOutputStream.writeShort(s);
        }
        catch (final IOException e)
        {
            logger.error("Unable to add short: {} : {}", e.getClass(), e.getMessage());
        }
        return this;
    }
1214221
public Word<I> findSeparatingWord(final S s1, final S s2) {

        final FastMealyState<O> n1 = this.nodeToObservationMap.get(s1);
        final FastMealyState<O> n2 = this.nodeToObservationMap.get(s2);

        return NearLinearEquivalenceTest.findSeparatingWord(this.observationTree, n1, n2, this.alphabet, true);
    }
2118
public void setKeyword(String keyword) {
    if(keyword != null) {
      keyword = keyword.trim();
    }
    this.keyword = keyword;
  }
726501
public static String endWithNewLine(String sdpDescription) {
        if (sdpDescription == null || sdpDescription.isEmpty()) {
            throw new IllegalArgumentException("The SDP description cannot be null or empty");
        }
        return sdpDescription.trim().concat("\n");
    }
1297394
protected Message createMessage(ConnectionContext context, BasicMessage basicMessage) throws JMSException {
        return createMessage(context, basicMessage, null);
    }
175428
@Override
    public Collection<String> wordsNearestSum(String word, int n) {
        //INDArray vec = Transforms.unitVec(this.lookupTable.vector(word));
        INDArray vec = this.lookupTable.vector(word);
        return wordsNearestSum(vec, n);
    }
1127055
public static List<RoboconfCompletionProposal> buildProposalsFromMap( Map<String,String> candidates, String prefix ) {

		List<RoboconfCompletionProposal> result = new ArrayList<> ();
		for( Map.Entry<String,String> entry : candidates.entrySet()) {

			// Matching candidate?
			String candidate = entry.getKey();
			if( ! startsWith( candidate, prefix ))
				continue;

			// No description => basic proposal
			if( Utils.isEmptyOrWhitespaces( entry.getValue())) {
				result.add( basicProposal( candidate, prefix ));
			}

			// Otherwise, show the description
			else {
				result.add( new RoboconfCompletionProposal(
						candidate,
						candidate,
						entry.getValue(),
						prefix.length()));
			}
		}

		return result;
	}
915637
public CompletionContext drop(int nbWords) {
		return new CompletionContext(new ArrayList<String>(words.subList(nbWords, words.size())), wordIndex-nbWords, position);
	}
190676
public FbBotMillResponse createResponse(MessageEnvelope envelope) {
		String lastMessage = safeGetMessage(envelope);
		return ReplyFactory.addTextMessageOnly(lastMessage).build(envelope);
	}
902415
public static String toLowerCase(final String s) {
        if (s == null) {
            return null;
        } else {
            return s.toLowerCase(Locale.ENGLISH);
        }
    }