Buggy code:
public class CommandLineMain { private static final Map < String , CommandHandler > handlers = new HashMap < String , CommandHandler > ( ) ; private static void registerHandler ( CommandHandler handler , String ... names ) { } private static final CommandHandler operationHandler = new OperationRequestHandler ( ) ; public static void main ( String [ ] args ) throws Exception { } protected static ConsoleReader initConsoleReader ( ) { final String bindingsName ; final String osName = SecurityActions . getSystemProperty ( "os.name" ) . toLowerCase ( ) ; if ( ( osName . indexOf ( "windows" ) ) >= 0 ) { bindingsName = "keybindings//jline-windows-bindings.properties" ; } else <START_BUG> if ( osName . startsWith ( "macos" ) ) { <END_BUG> bindingsName = "keybindings//jline-mac-bindings.properties" ; } else { bindingsName = "keybindings//jline-default-bindings.properties" ; } ClassLoader cl = SecurityActions . getClassLoader ( CommandLineMain . class ) ; InputStream bindingsIs = cl . getResourceAsStream ( bindingsName ) ; if ( bindingsIs == null ) { System . err . println ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>locate<seq2seq4repair_space>key<seq2seq4repair_space>bindings<seq2seq4repair_space>for<seq2seq4repair_space>OS<seq2seq4repair_space>'" + osName ) + "':<seq2seq4repair_space>" ) + bindingsName ) ) ; try { return new ConsoleReader ( ) ; } catch ( IOException e ) { throw new IllegalStateException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>initialize<seq2seq4repair_space>console<seq2seq4repair_space>reader" , e ) ; } } else { try { final InputStream in = new FileInputStream ( FileDescriptor . in ) ; final Writer out = new PrintWriter ( new OutputStreamWriter ( System . out , System . getProperty ( "jline.WindowsTerminal.output.encoding" , System . getProperty ( "file.encoding" ) ) ) ) ; return new ConsoleReader ( in , out , bindingsIs ) ; } catch ( Exception e ) { throw new IllegalStateException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>initialize<seq2seq4repair_space>console<seq2seq4repair_space>reader" , e ) ; } finally { StreamUtils . safeClose ( bindingsIs ) ; } } } private static boolean isOperation ( String line ) { } private static class CommandContextImpl implements CommandContext { private final ConsoleReader console ; private final CommandHistory history ; private boolean terminate ; private String cmdArgs ; private Set < String > switches ; private Map < String , String > namedArgs ; private List < String > argsList ; private ModelControllerClient client ; private String defaultControllerHost = "localhost" ; private int defaultControllerPort = 9999 ; private String controllerHost ; private int controllerPort = - 1 ; private Map < String , Object > map = new HashMap < String , Object > ( ) ; private final OperationRequestParser parser = new DefaultOperationRequestParser ( ) ; private final OperationRequestAddress prefix = new DefaultOperationRequestAddress ( ) ; private final PrefixFormatter prefixFormatter = new DefaultPrefixFormatter ( ) ; private final OperationCandidatesProvider operationCandidatesProvider ; private CommandContextImpl ( ConsoleReader console ) { } @ Override public String getCommandArguments ( ) { } @ Override public void terminateSession ( ) { } @ Override public void printLine ( String message ) { } @ Override public void printColumns ( Collection < String > col ) { } @ Override public void set ( String key , Object value ) { } @ Override public Object get ( String key ) { } @ Override public ModelControllerClient getModelControllerClient ( ) { } @ Override public OperationRequestParser getOperationRequestParser ( ) { } @ Override public OperationRequestAddress getPrefix ( ) { } @ Override public PrefixFormatter getPrefixFormatter ( ) { } @ Override public OperationCandidatesProvider getOperationCandidatesProvider ( ) { } @ Override public void connectController ( String host , int port ) { } @ Override public void disconnectController ( ) { } @ Override public String getControllerHost ( ) { } @ Override public int getControllerPort ( ) { } String getPrompt ( ) { } @ Override public CommandHistory getHistory ( ) { } private class HistoryImpl implements CommandHistory { @ SuppressWarnings ( "unchecked" ) @ Override public List < String > asList ( ) { } @ Override public boolean isUseHistory ( ) { } @ Override public void setUseHistory ( boolean useHistory ) { } @ Override public void clear ( ) { } } @ Override public String getDefaultControllerHost ( ) { } @ Override public int getDefaultControllerPort ( ) { } @ Override public boolean hasSwitch ( String switchName ) { } @ Override public String getNamedArgument ( String argName ) { } @ Override public List < String > getArguments ( ) { } @ Override public boolean hasArguments ( ) { } private void parseArgs ( ) { } private void setArgs ( String args ) { } } }

Fix:
if ( osName . startsWith ( "mac" ) ) {