Reduce length of condition
First of all, if statusCode can be null, the code above could possibly throw a null pointer exception.

To directly answer your question though, you could use a Set, such as a HashSet.

HashSet&lt;String&gt; errorOrWarning = new HashSet&lt;String&gt;();
errorOrWarning.add(HAS_ERRORS_HAS_WARNINGS);
errorOrWarning.add(HAS_ERRORS_NO_WARNINGS);
errorOrWarning.add(HAS_ERRORS_HAS_WARNINGS);
errorOrWarning.add(NO_ERRORS_HAS_WARNINGS);


Which you can then use in a single call.

if (errorOrWarning.contains(statusCode) {
    // do something
}


This has the advantage that statusCode can be null and it would produce no exception.