private static String reduceVariant ( final String variant ) { if ( isEmpty ( variant ) ) throw new AssertionError ( "Shouldn't happen, can't reduce non existent variant" ) ; int indexOfUnderscore = variant . lastIndexOf ( ' ' ) ; if ( indexOfUnderscore == - 1 ) return "" ; return variant . substring ( 0 , indexOfUnderscore ) ; }
This function is used internally to reduce the variant - > a_b_c - > a_b .