Buggy code:
public class FBUtilities { private static Logger logger_ = LoggerFactory . getLogger ( FBUtilities . class ) ; public static final BigInteger TWO = new BigInteger ( "2" ) ; private static volatile InetAddress localInetAddress_ ; private static final ThreadLocal < MessageDigest > localMD5Digest = new ThreadLocal < MessageDigest > ( ) { @ Override protected MessageDigest initialValue ( ) { } @ Override public MessageDigest get ( ) { } } ; public static final int MAX_UNSIGNED_SHORT = 65535 ; public static MessageDigest threadLocalMD5Digest ( ) { } public static MessageDigest newMessageDigest ( String algorithm ) { } public static double parseDoubleOrPercent ( String value ) { } public static InetAddress getLocalAddress ( ) { } public static long absoluteFromFraction ( double fractOrAbs , long total ) { } public static Pair < BigInteger , Boolean > midpoint ( BigInteger left , BigInteger right , int sigbits ) { } public static int compareUnsigned ( byte [ ] bytes1 , byte [ ] bytes2 , int offset1 , int offset2 , int len1 , int len2 ) { } public static byte [ ] xor ( byte [ ] left , byte [ ] right ) { } public static BigInteger hashToBigInteger ( ByteBuffer data ) { } public static byte [ ] hash ( ByteBuffer ... data ) { } public static byte [ ] hexToBytes ( String str ) { } public static String bytesToHex ( byte ... bytes ) { } public static void renameWithConfirm ( String tmpFilename , String filename ) throws IOException { } public static CollatingIterator getCollatingIterator ( ) { } public static void atomicSetMax ( AtomicInteger atomic , int i ) { } public static void atomicSetMax ( AtomicLong atomic , long i ) { } public static void serialize ( TSerializer serializer , TBase struct , DataOutput out ) throws IOException { } public static void deserialize ( TDeserializer deserializer , TBase struct , DataInput in ) throws IOException { } public static void sortSampledKeys ( List < DecoratedKey > keys , Range range ) { } public static int encodedUTF8Length ( String st ) { } public static ByteBuffer toByteBuffer ( long n ) { } public static String resourceToFile ( String filename ) throws ConfigurationException { } public static String getReleaseVersionString ( ) { } public static long timestampMicros ( ) { } public static void waitOnFutures ( Iterable < Future < ? > > futures ) { } public static IPartitioner newPartitioner ( String partitionerClassName ) throws ConfigurationException { } public static AbstractType getComparator ( String compareWith ) throws ConfigurationException { } public static < T > Class < T > classForName ( String classname , String readable ) throws ConfigurationException { } public static < T > T construct ( String classname , String readable ) throws ConfigurationException { } public static < T > T getInstance ( String classname , String readable ) throws ConfigurationException { Class cls = FBUtilities . classForName ( classname , readable ) ; T rval = null ; try { <START_BUG> rval = ( ( T ) ( cls . getDeclaredMethod ( "getInstance" ) . invoke ( null , ( ( Object ) ( null ) ) ) ) ) ; <END_BUG> } catch ( NoSuchMethodException e ) { throw new ConfigurationException ( "Class<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>the<seq2seq4repair_space>getInstance<seq2seq4repair_space>method<seq2seq4repair_space>with<seq2seq4repair_space>no<seq2seq4repair_space>arguments" ) ; } catch ( InvocationTargetException e ) { throw new ConfigurationException ( String . format ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>call<seq2seq4repair_space>method<seq2seq4repair_space>getInstance<seq2seq4repair_space>on<seq2seq4repair_space>%s<seq2seq4repair_space>class<seq2seq4repair_space>%s" , readable , classname ) ) ; } catch ( IllegalAccessException e ) { throw new ConfigurationException ( String . format ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>call<seq2seq4repair_space>method<seq2seq4repair_space>getInstance<seq2seq4repair_space>on<seq2seq4repair_space>%s<seq2seq4repair_space>class<seq2seq4repair_space>%s" , readable , classname ) ) ; } return rval ; } public static < T extends Comparable > SortedSet < T > singleton ( T column ) { } public static String toString ( Map < ? , ? > map ) { } public static Field getProtectedField ( Class klass , String fieldName ) { } }

Fix:
rval = ( ( T ) ( cls . getDeclaredMethod ( "getInstance" ) . invoke ( new Object [ ] { null , null } ) ) ) ;