Buggy code:
public class PythonService { private ManagedCommandline command ; private AnalysisRpcClient client ; private Thread stopThread ; private PythonService ( ) { } public static synchronized PythonService openConnection ( final String pythonInterpreter ) throws Exception { final PythonService service = new PythonService ( ) ; final String scisoftRpcPort = VariablesPlugin . getDefault ( ) . getStringVariableManager ( ) . performStringSubstitution ( "${scisoft_rpc_port}" ) ; final int port = NetUtils . getFreePort ( PythonService . getServiceStartPort ( ) ) ; final File path = BundleUtils . getBundleLocation ( "org.dawb.common.python" ) ; final String script ; if ( ( ( System . getProperty ( "eclipse.debug.session" ) ) != null ) || ( ( System . getProperty ( "org.dawb.test.session" ) ) != null ) ) { script = ( path . getAbsolutePath ( ) ) + "//src//org//dawb//common//python//rpc//python_service.py" ; } else { script = ( path . getAbsolutePath ( ) ) + "//org//dawb//common//python//rpc//python_service.py" ; } service . command = new ManagedCommandline ( ) ; <START_BUG> service . command . addArguments ( new String [ ] { pythonInterpreter , script , String . valueOf ( port ) , scisoftRpcPort } ) ; <END_BUG> final Map < String , String > env = new HashMap < String , String > ( System . getenv ( ) ) ; String pythonPath = env . get ( "PYTHONPATH" ) ; StringBuilder pyBuf = ( pythonPath == null ) ? new StringBuilder ( ) : new StringBuilder ( pythonPath ) ; if ( OSUtils . isWindowsOS ( ) ) pyBuf . append ( ";" ) ; else pyBuf . append ( ":" ) ; if ( ( ( System . getProperty ( "eclipse.debug.session" ) ) != null ) || ( ( System . getProperty ( "org.dawb.test.session" ) ) != null ) ) { pyBuf . append ( ( ( BundleUtils . getBundleLocation ( "uk.ac.diamond.scisoft.python" ) . getAbsolutePath ( ) ) + "//src" ) ) ; } else { pyBuf . append ( BundleUtils . getBundleLocation ( "uk.ac.diamond.scisoft.python" ) . getAbsolutePath ( ) ) ; } env . put ( "PYTHONPATH" , pyBuf . toString ( ) ) ; service . command . setEnv ( env ) ; service . command . setStreamLogsToLogging ( true ) ; service . command . setWorkingDir ( path ) ; service . command . execute ( ) ; service . stopThread = new Thread ( "Stop<seq2seq4repair_space>Python<seq2seq4repair_space>Service" ) { public void run ( ) { service . stop ( ) ; } } ; Runtime . getRuntime ( ) . addShutdownHook ( service . stopThread ) ; service . client = service . getActiveClient ( port ) ; return service ; } public static PythonService openClient ( final int port ) throws Exception { } private AnalysisRpcClient getActiveClient ( int port ) throws Exception { } public ManagedCommandline getCommand ( ) { } public AnalysisRpcClient getClient ( ) { } public void stop ( ) { } public boolean isRunning ( ) { } public Map < String , ? extends Object > runScript ( String scriptFullPath , Map < String , ? > data , Collection < String > outputNames ) throws Exception { } public String runEdnaPlugin ( final String execDir , final String pluginName , final boolean ednaDebugMode , final String xmlInputString ) throws Exception { } public static int getDebugPort ( ) { } private static int getServiceStartPort ( ) { } }

Fix:
service . command . addArguments ( new String [ ] { pythonInterpreter , "-u" , script , String . valueOf ( port ) , scisoftRpcPort } ) ;