Buggy code:
public class OptionConverter { static String DELIM_START = "${" ; static char DELIM_STOP = '}' ; static int DELIM_START_LEN = 2 ; static int DELIM_STOP_LEN = 1 ; static StringBuffer sbuf = new StringBuffer ( ) ; private OptionConverter ( ) { } public static String [ ] concatanateArrays ( String [ ] l , String [ ] r ) { } public static String convertSpecialChars ( String s ) { } public static String getSystemProperty ( String key , String def ) { } public static Object instantiateByKey ( Properties props , String key , Class superClass , Object defaultValue ) { } public static boolean toBoolean ( String value , boolean dEfault ) { } public static int toInt ( String value , int dEfault ) { } public static Level toLevel ( String value , Level defaultValue ) { if ( value == null ) return defaultValue ; int hashIndex = value . indexOf ( '#' ) ; if ( hashIndex == ( - 1 ) ) { if ( "NULL" . equalsIgnoreCase ( value ) ) { return null ; } else { return ( ( Level ) ( Level . toLevel ( value , defaultValue ) ) ) ; } } Level result = defaultValue ; String clazz = value . substring ( ( hashIndex + 1 ) ) ; String levelName = value . substring ( 0 , hashIndex ) ; if ( "NULL" . equalsIgnoreCase ( levelName ) ) { return null ; } LogLog . debug ( ( ( ( ( ( ( "toLevel" + ":class=[" ) + clazz ) + "]" ) + ":pri=[" ) + levelName ) + "]" ) ) ; try { Class customLevel = Loader . loadClass ( clazz ) ; <START_BUG> Class [ ] paramTypes = new Class [ ] { String . class , Priority . class } ; <END_BUG> Method toLevelMethod = customLevel . getMethod ( "toLevel" , paramTypes ) ; Object [ ] params = new Object [ ] { levelName , defaultValue } ; Object o = toLevelMethod . invoke ( null , params ) ; result = ( ( Level ) ( o ) ) ; } catch ( ClassNotFoundException e ) { LogLog . warn ( ( ( "custom<seq2seq4repair_space>level<seq2seq4repair_space>class<seq2seq4repair_space>[" + clazz ) + "]<seq2seq4repair_space>not<seq2seq4repair_space>found." ) ) ; } catch ( NoSuchMethodException e ) { LogLog . warn ( ( ( ( "custom<seq2seq4repair_space>level<seq2seq4repair_space>class<seq2seq4repair_space>[" + clazz ) + "]" ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>a<seq2seq4repair_space>constructor<seq2seq4repair_space>which<seq2seq4repair_space>takes<seq2seq4repair_space>one<seq2seq4repair_space>string<seq2seq4repair_space>parameter" ) , e ) ; } catch ( InvocationTargetException e ) { LogLog . warn ( ( ( ( "custom<seq2seq4repair_space>level<seq2seq4repair_space>class<seq2seq4repair_space>[" + clazz ) + "]" ) + "<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>instantiated" ) , e ) ; } catch ( ClassCastException e ) { LogLog . warn ( ( ( "class<seq2seq4repair_space>[" + clazz ) + "]<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>subclass<seq2seq4repair_space>of<seq2seq4repair_space>org.apache.log4j.Level" ) , e ) ; } catch ( IllegalAccessException e ) { LogLog . warn ( ( ( "class<seq2seq4repair_space>[" + clazz ) + "]<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>instantiated<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>access<seq2seq4repair_space>restrictions" ) , e ) ; } catch ( Exception e ) { LogLog . warn ( ( ( ( ( "class<seq2seq4repair_space>[" + clazz ) + "],<seq2seq4repair_space>level<seq2seq4repair_space>[" ) + levelName ) + "]<seq2seq4repair_space>conversion<seq2seq4repair_space>failed." ) , e ) ; } return result ; } public static long toFileSize ( String value , long dEfault ) { } public static String findAndSubst ( String key , Properties props ) { } public static Object instantiateByClassName ( String className , Class superClass , Object defaultValue ) { } public static String substVars ( String val , Properties props ) throws IllegalArgumentException { } public static void selectAndConfigure ( URL url , String clazz , LoggerRepository hierarchy ) { } }

Fix:
Class [ ] paramTypes = new Class [ ] { String . class , Level . class } ;