Buggy code:
public class Parser { public Parser . ParseMode parseMode ; public EndianAwareDataInputStream is ; public EndianAwareDataOutputStream os ; private ByteOrder order = ByteOrder . BIG_ENDIAN ; private Stack < ThirdPartyParseable > beanStack = new Stack < ThirdPartyParseable > ( ) ; public boolean ignoreEOF = false ; public ThirdPartyParseable peekBean ( ) { } public void popBean ( ) { } public ByteOrder order ( ) { } public void pushBean ( ThirdPartyParseable bean ) { } public void order ( ByteOrder order ) { } public void readToExistingBean ( InputStream is , ThirdPartyParseable target ) throws IllegalAccessException , UnrecognizedFormatException { } public void readToExistingBean ( EndianAwareDataInputStream is , ThirdPartyParseable target ) throws IllegalAccessException , UnrecognizedFormatException { } public void littleEndian ( ) { } public void bigEndian ( ) { } public < CLASS extends ThirdPartyParseable > CLASS readToNewBean ( InputStream is , Class < CLASS > clazz ) throws IllegalAccessException , UnrecognizedFormatException { } public < CLASS extends ThirdPartyParseable > CLASS readToNewBean ( EndianAwareDataInputStream is , Class < CLASS > clazz ) throws IllegalAccessException , UnrecognizedFormatException { } public void writeBean ( ThirdPartyParseable bean , OutputStream os ) { } public void writeBean ( ThirdPartyParseable bean , EndianAwareDataOutputStream os ) { } public String readUTF8FileToString ( File f ) throws FileNotFoundException , IOException { } private void ensureContextInstantiatedForReading ( EndianAwareDataInputStream is , ThirdPartyParseable bean ) { } private void ensureContextInstantiatedForWriting ( EndianAwareDataOutputStream os , ThirdPartyParseable bean ) { } private < CLASS > CLASS get ( ThirdPartyParseable obj , String property , Class < ? extends CLASS > propertyReturnClass ) { } private Class getPropertyReturnType ( ThirdPartyParseable obj , String property ) throws NoSuchMethodException { } private void set ( ThirdPartyParseable obj , String property , Object value , Class < ? > targetClass ) { } private static void invokeSet ( Object obj , String mName , Object value , Class argClass ) { } public enum ParseMode { READ , WRITE ; } public void ignoreEOF ( boolean doIt ) { } protected abstract class RWHelper { public final void go ( ) { } public abstract void read ( EndianAwareDataInputStream is , ThirdPartyParseable bean ) throws IOException { } public abstract void write ( EndianAwareDataOutputStream os , ThirdPartyParseable bean ) throws IOException { } } public void bytesOfCount ( final int count , final Parser . PropertyDestination dest ) { } public void float8 ( final Parser . PropertyDestination < Double > dest ) { } public void float4 ( final Parser . PropertyDestination < Float > dest ) { } public void int4u ( final Parser . PropertyDestination < Long > dest ) { } public void int8s ( final Parser . PropertyDestination < Long > dest ) { } public void int4s ( final Parser . PropertyDestination < Integer > dest ) { } public byte [ ] flipEndian ( final byte [ ] bytes ) { } public void expectBytes ( final byte [ ] bytes , final FailureBehavior failureBehavior ) { } public void expectString ( final String string , FailureBehavior failureBehavior ) { } public void bytesEndingWith ( final byte [ ] ending , final Parser . PropertyDestination targetProperty , final boolean includeEndingWhenReading ) { } protected static < CLASS > CLASS convertFromString ( String s , Class < CLASS > targetClass ) throws NumberFormatException { } public abstract class PropertyDestination < PROPERTY_CLASS > { Class < PROPERTY_CLASS > propertyClass ; public Class < PROPERTY_CLASS > getPropertyClass ( ) { } public PropertyDestination ( Class < PROPERTY_CLASS > propertyClass ) { } public abstract void set ( PROPERTY_CLASS value , ThirdPartyParseable bean ) { } public abstract PROPERTY_CLASS get ( ThirdPartyParseable bean ) { } public String getAsString ( ThirdPartyParseable bean ) { } } public < PROPERTY_CLASS > Parser . PropertyDestination < PROPERTY_CLASS > property ( final String propertyName , final Class < PROPERTY_CLASS > elementType ) { } public < PROPERTY_CLASS extends Object > Parser . PropertyDestination < PROPERTY_CLASS > indexedProperty ( final String propertyName , final Class < PROPERTY_CLASS > elementType , final int index ) { } public < CLASS > void stringEndingWith ( final String ending , final Parser . PropertyDestination < CLASS > property , final boolean includeEndingWhenReading ) { <START_BUG> stringEndingWith ( new String [ ] { ending } , property , includeEndingWhenReading ) ; <END_BUG> } public < CLASS > void stringEndingWith ( String [ ] endings , final Parser . PropertyDestination < CLASS > property , final boolean includeEndingWhenReading ) { } public < CLASS > void stringEndingWith ( final String ending , final StringParser sParser , final Parser . PropertyDestination < CLASS > property , final boolean includeEndingWhenReading ) { } public < CLASS extends ThirdPartyParseable > void subParseProposedClasses ( final Parser . PropertyDestination < CLASS > pDest , final ClassInclusion ... inclusions ) { } public void stringCSVEndingWith ( final String ending , final Class < ? > propertyType , final boolean includeEndingWhenReading , String ... properties ) { } public < CLASS > void stringOfLength ( final int propertyNumBytes , final Parser . PropertyDestination < CLASS > dest ) { } public < CLASS extends ThirdPartyParseable > void arrayOf ( final int count , final String arrayOrListPropertyName , final Class < CLASS > elementClass ) { } public void dumpState ( ) { } }

Fix:
stringEndingWith ( ( ending != null ? new String [ ] { ending } : null ) , property , includeEndingWhenReading ) ;