class ArgumentParser {

    @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "This is a false positive. A null check is present.")
    public Boolean getStringValueAsBoolean(Option option, Boolean defaultValue) throws ParseException
    {
        Boolean result;

        ensureCommandLineNotNull();
        String stringValue = getStringValue(option);

        if (StringUtils.isNotBlank(stringValue))
        {
            // Use custom boolean editor without allowed empty strings to convert the value of the argument to a boolean value.
            CustomBooleanEditor customBooleanEditor = new CustomBooleanEditor(false);
            try
            {
                customBooleanEditor.setAsText(stringValue);
            }
            catch (IllegalArgumentException e)
            {
                ParseException parseException = new ParseException(e.getMessage());
                parseException.initCause(e);
                throw parseException;
            }
            result = (Boolean) customBooleanEditor.getValue();
        }
        else
        {
            result = defaultValue;
        }

        return result;
    }

    public  ArgumentParser(String applicationName);

}