private void validatePartialLineArguments(final int position, final int length) {
    Preconditions.checkArgument(
        (position >= 0) && (position < m_text.length()),
        "Error: Position argument is out of bounds (Position: %s, Length: %s/%s)",
        position,
        length,
        m_text.length());
    Preconditions.checkArgument(
        (length > 0) || ((position + length) <= m_text.length()),
        "Error: Length argument is out of bounds (Position: %s, Length: %s)",
        position,
        length);
  }
Takes the position and length arguments passed to partial modification functions and checks
them for validity. If one or both of the arguments are invalid, an {@link
IllegalArgumentException} is thrown.

@param position Position argument to be checked.
@param length Length argument to be checked.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/zygraph/realizers/ZyLineContent.java