test_class.declarator: runner
test_class.modifier: private
test_class.original_string: private BaseNativeApplicationRunner runner;
test_class.type: BaseNativeApplicationRunner
test_class.var_name: runner
test_class.file: interactivespaces-core/src/test/java/interactivespaces/util/process/BaseNativeApplicationRunnerTest.java
test_class.identifier: BaseNativeApplicationRunnerTest
test_case.body: @Test
    public void testEnvironmentModification() {
      Map<String, String> processEnvironment = Maps.newHashMap();
      processEnvironment.put("foo", "bar");
      processEnvironment.put("bletch", "spam");
      processEnvironment.put("spam", "blorg");
  
      Map<String, String> modificationEnvironment = Maps.newHashMap();
      modificationEnvironment.put("foo", "yowza");
      modificationEnvironment.put("hiya", "there");
      modificationEnvironment.put("spam", null);
  
      runner.modifyEnvironment(processEnvironment, modificationEnvironment);
  
      Assert.assertEquals("yowza", processEnvironment.get("foo"));
      Assert.assertEquals("spam", processEnvironment.get("bletch"));
      Assert.assertEquals("there", processEnvironment.get("hiya"));
      Assert.assertFalse(processEnvironment.containsKey("spam"));
    }
test_case.class_method_signature: BaseNativeApplicationRunnerTest.testEnvironmentModification()
test_case.full_signature: @Test public void testEnvironmentModification()
test_case.identifier: testEnvironmentModification
test_case.invocations: newHashMap put put put newHashMap put put put modifyEnvironment assertEquals get assertEquals get assertEquals get assertFalse containsKey
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEnvironmentModification()
focal_class.declarator: RESTART_DURATION_MAXIMUM_DEFAULT = 10000
focal_class.modifier: public static final
focal_class.original_string: public static final int RESTART_DURATION_MAXIMUM_DEFAULT = 10000;
focal_class.type: int
focal_class.var_name: RESTART_DURATION_MAXIMUM_DEFAULT
focal_class.declarator: process
focal_class.modifier: private
focal_class.original_string: private Process process;
focal_class.type: Process
focal_class.var_name: process
focal_class.declarator: processLock = new ReentrantLock(true)
focal_class.modifier: private final
focal_class.original_string: private final Lock processLock = new ReentrantLock(true);
focal_class.type: Lock
focal_class.var_name: processLock
focal_class.declarator: restartBegin = 0
focal_class.modifier: private
focal_class.original_string: private long restartBegin = 0;
focal_class.type: long
focal_class.var_name: restartBegin
focal_class.declarator: restartDurationMaximum = RESTART_DURATION_MAXIMUM_DEFAULT
focal_class.modifier: private
focal_class.original_string: private long restartDurationMaximum = RESTART_DURATION_MAXIMUM_DEFAULT;
focal_class.type: long
focal_class.var_name: restartDurationMaximum
focal_class.declarator: restartStrategy
focal_class.modifier: private volatile
focal_class.original_string: private volatile RestartStrategy<NativeApplicationRunner> restartStrategy;
focal_class.type: RestartStrategy<NativeApplicationRunner>
focal_class.var_name: restartStrategy
focal_class.declarator: restarter
focal_class.modifier: private
focal_class.original_string: private RestartStrategyInstance<NativeApplicationRunner> restarter;
focal_class.type: RestartStrategyInstance<NativeApplicationRunner>
focal_class.var_name: restarter
focal_class.declarator: restartProcess
focal_class.modifier: private
focal_class.original_string: private Process restartProcess;
focal_class.type: Process
focal_class.var_name: restartProcess
focal_class.declarator: spaceEnvironment
focal_class.modifier: private final
focal_class.original_string: private final InteractiveSpacesEnvironment spaceEnvironment;
focal_class.type: InteractiveSpacesEnvironment
focal_class.var_name: spaceEnvironment
focal_class.declarator: log
focal_class.modifier: private final
focal_class.original_string: private final Log log;
focal_class.type: Log
focal_class.var_name: log
focal_class.declarator: commandLine
focal_class.modifier: private
focal_class.original_string: private String[] commandLine;
focal_class.type: String[]
focal_class.var_name: commandLine
focal_class.declarator: executableFolder
focal_class.modifier: private
focal_class.original_string: private File executableFolder;
focal_class.type: File
focal_class.var_name: executableFolder
focal_class.declarator: executablePath
focal_class.modifier: private
focal_class.original_string: private String executablePath;
focal_class.type: String
focal_class.var_name: executablePath
focal_class.declarator: cleanEnvironment
focal_class.modifier: private
focal_class.original_string: private boolean cleanEnvironment;
focal_class.type: boolean
focal_class.var_name: cleanEnvironment
focal_class.declarator: environment = Maps.newHashMap()
focal_class.modifier: private
focal_class.original_string: private Map<String, String> environment = Maps.newHashMap();
focal_class.type: Map<String, String>
focal_class.var_name: environment
focal_class.declarator: commandArguments = Lists.newArrayList()
focal_class.modifier: private
focal_class.original_string: private List<String> commandArguments = Lists.newArrayList();
focal_class.type: List<String>
focal_class.var_name: commandArguments
focal_class.declarator: listeners = Lists.newCopyOnWriteArrayList()
focal_class.modifier: private final
focal_class.original_string: private final List<NativeApplicationRunnerListener> listeners = Lists.newCopyOnWriteArrayList();
focal_class.type: List<NativeApplicationRunnerListener>
focal_class.var_name: listeners
focal_class.declarator: runnerState =
        new AtomicReference<NativeApplicationRunnerState>(NativeApplicationRunnerState.NOT_STARTED)
focal_class.modifier: private final
focal_class.original_string: private final AtomicReference<NativeApplicationRunnerState> runnerState =
        new AtomicReference<NativeApplicationRunnerState>(NativeApplicationRunnerState.NOT_STARTED);
focal_class.type: AtomicReference<NativeApplicationRunnerState>
focal_class.var_name: runnerState
focal_class.declarator: runnerParser
focal_class.modifier: private
focal_class.original_string: private NativeApplicationRunnerParser runnerParser;
focal_class.type: NativeApplicationRunnerParser
focal_class.var_name: runnerParser
focal_class.declarator: fileSupport = FileSupportImpl.INSTANCE
focal_class.modifier: private
focal_class.original_string: private FileSupport fileSupport = FileSupportImpl.INSTANCE;
focal_class.type: FileSupport
focal_class.var_name: fileSupport
focal_class.file: interactivespaces-core/src/main/java/interactivespaces/util/process/BaseNativeApplicationRunner.java
focal_class.identifier: BaseNativeApplicationRunner
focal_class.interfaces: implements NativeApplicationRunner
focal_class.class_method_signature: BaseNativeApplicationRunner.BaseNativeApplicationRunner(NativeApplicationRunnerParser runnerParser,
        InteractiveSpacesEnvironment spaceEnvironment, Log log)
focal_class.full_signature: public  BaseNativeApplicationRunner(NativeApplicationRunnerParser runnerParser,
        InteractiveSpacesEnvironment spaceEnvironment, Log log)
focal_class.identifier: BaseNativeApplicationRunner
focal_class.modifiers: public
focal_class.parameters: (NativeApplicationRunnerParser runnerParser,
        InteractiveSpacesEnvironment spaceEnvironment, Log log)
focal_class.signature:  BaseNativeApplicationRunner(NativeApplicationRunnerParser runnerParser,
        InteractiveSpacesEnvironment spaceEnvironment, Log log)
focal_class.class_method_signature: BaseNativeApplicationRunner.setCleanEnvironment(boolean cleanEnvironment)
focal_class.full_signature: @Override public void setCleanEnvironment(boolean cleanEnvironment)
focal_class.identifier: setCleanEnvironment
focal_class.modifiers: @Override public
focal_class.parameters: (boolean cleanEnvironment)
focal_class.return: void
focal_class.signature: void setCleanEnvironment(boolean cleanEnvironment)
focal_class.class_method_signature: BaseNativeApplicationRunner.setExecutablePath(String executablePath)
focal_class.full_signature: @Override public NativeApplicationRunner setExecutablePath(String executablePath)
focal_class.identifier: setExecutablePath
focal_class.modifiers: @Override public
focal_class.parameters: (String executablePath)
focal_class.return: NativeApplicationRunner
focal_class.signature: NativeApplicationRunner setExecutablePath(String executablePath)
focal_class.class_method_signature: BaseNativeApplicationRunner.addEnvironmentVariables(Map<String, String> environmentVariables)
focal_class.full_signature: @Override public NativeApplicationRunner addEnvironmentVariables(Map<String, String> environmentVariables)
focal_class.identifier: addEnvironmentVariables
focal_class.modifiers: @Override public
focal_class.parameters: (Map<String, String> environmentVariables)
focal_class.return: NativeApplicationRunner
focal_class.signature: NativeApplicationRunner addEnvironmentVariables(Map<String, String> environmentVariables)
focal_class.class_method_signature: BaseNativeApplicationRunner.addCommandArguments(String... arguments)
focal_class.full_signature: @Override public NativeApplicationRunner addCommandArguments(String... arguments)
focal_class.identifier: addCommandArguments
focal_class.modifiers: @Override public
focal_class.parameters: (String... arguments)
focal_class.return: NativeApplicationRunner
focal_class.signature: NativeApplicationRunner addCommandArguments(String... arguments)
focal_class.class_method_signature: BaseNativeApplicationRunner.parseCommandArguments(String arguments)
focal_class.full_signature: @Override public NativeApplicationRunner parseCommandArguments(String arguments)
focal_class.identifier: parseCommandArguments
focal_class.modifiers: @Override public
focal_class.parameters: (String arguments)
focal_class.return: NativeApplicationRunner
focal_class.signature: NativeApplicationRunner parseCommandArguments(String arguments)
focal_class.class_method_signature: BaseNativeApplicationRunner.parseEnvironment(String variables)
focal_class.full_signature: @Override public NativeApplicationRunner parseEnvironment(String variables)
focal_class.identifier: parseEnvironment
focal_class.modifiers: @Override public
focal_class.parameters: (String variables)
focal_class.return: NativeApplicationRunner
focal_class.signature: NativeApplicationRunner parseEnvironment(String variables)
focal_class.class_method_signature: BaseNativeApplicationRunner.configure(NativeApplicationDescription description)
focal_class.full_signature: @Override public void configure(NativeApplicationDescription description)
focal_class.identifier: configure
focal_class.modifiers: @Override public
focal_class.parameters: (NativeApplicationDescription description)
focal_class.return: void
focal_class.signature: void configure(NativeApplicationDescription description)
focal_class.class_method_signature: BaseNativeApplicationRunner.configure(Map<String, Object> config)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public void configure(Map<String, Object> config)
focal_class.identifier: configure
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (Map<String, Object> config)
focal_class.return: void
focal_class.signature: void configure(Map<String, Object> config)
focal_class.class_method_signature: BaseNativeApplicationRunner.prepare()
focal_class.full_signature: @VisibleForTesting void prepare()
focal_class.identifier: prepare
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void prepare()
focal_class.class_method_signature: BaseNativeApplicationRunner.startup()
focal_class.full_signature: @Override public void startup()
focal_class.identifier: startup
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startup()
focal_class.class_method_signature: BaseNativeApplicationRunner.attemptRun(boolean firstTime)
focal_class.full_signature: private Process attemptRun(boolean firstTime)
focal_class.identifier: attemptRun
focal_class.modifiers: private
focal_class.parameters: (boolean firstTime)
focal_class.return: Process
focal_class.signature: Process attemptRun(boolean firstTime)
focal_class.class_method_signature: BaseNativeApplicationRunner.modifyEnvironment(Map<String, String> processEnvironment, Map<String, String> modificationEnvironment)
focal_class.full_signature: @VisibleForTesting void modifyEnvironment(Map<String, String> processEnvironment, Map<String, String> modificationEnvironment)
focal_class.identifier: modifyEnvironment
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: (Map<String, String> processEnvironment, Map<String, String> modificationEnvironment)
focal_class.return: void
focal_class.signature: void modifyEnvironment(Map<String, String> processEnvironment, Map<String, String> modificationEnvironment)
focal_class.class_method_signature: BaseNativeApplicationRunner.shutdown()
focal_class.full_signature: @Override public void shutdown()
focal_class.identifier: shutdown
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void shutdown()
focal_class.class_method_signature: BaseNativeApplicationRunner.isRunning()
focal_class.full_signature: @Override public boolean isRunning()
focal_class.identifier: isRunning
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isRunning()
focal_class.class_method_signature: BaseNativeApplicationRunner.getState()
focal_class.full_signature: @Override public NativeApplicationRunnerState getState()
focal_class.identifier: getState
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: NativeApplicationRunnerState
focal_class.signature: NativeApplicationRunnerState getState()
focal_class.class_method_signature: BaseNativeApplicationRunner.logProcessResultStreams()
focal_class.full_signature: private void logProcessResultStreams()
focal_class.identifier: logProcessResultStreams
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void logProcessResultStreams()
focal_class.class_method_signature: BaseNativeApplicationRunner.startRestarter()
focal_class.full_signature: private boolean startRestarter()
focal_class.identifier: startRestarter
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean startRestarter()
focal_class.class_method_signature: BaseNativeApplicationRunner.isRestarterActive()
focal_class.full_signature: private boolean isRestarterActive()
focal_class.identifier: isRestarterActive
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isRestarterActive()
focal_class.class_method_signature: BaseNativeApplicationRunner.handleProcessExit(int exitValue, String[] commands)
focal_class.full_signature: public abstract boolean handleProcessExit(int exitValue, String[] commands)
focal_class.identifier: handleProcessExit
focal_class.modifiers: public abstract
focal_class.parameters: (int exitValue, String[] commands)
focal_class.return: boolean
focal_class.signature: boolean handleProcessExit(int exitValue, String[] commands)
focal_class.class_method_signature: BaseNativeApplicationRunner.attemptRestart()
focal_class.full_signature: @Override public void attemptRestart()
focal_class.identifier: attemptRestart
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void attemptRestart()
focal_class.class_method_signature: BaseNativeApplicationRunner.isRestarted()
focal_class.full_signature: @Override public boolean isRestarted()
focal_class.identifier: isRestarted
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isRestarted()
focal_class.class_method_signature: BaseNativeApplicationRunner.restartComplete(boolean success)
focal_class.full_signature: @Override public void restartComplete(boolean success)
focal_class.identifier: restartComplete
focal_class.modifiers: @Override public
focal_class.parameters: (boolean success)
focal_class.return: void
focal_class.signature: void restartComplete(boolean success)
focal_class.class_method_signature: BaseNativeApplicationRunner.setRestartStrategy(RestartStrategy<NativeApplicationRunner> restartStrategy)
focal_class.full_signature: @Override public void setRestartStrategy(RestartStrategy<NativeApplicationRunner> restartStrategy)
focal_class.identifier: setRestartStrategy
focal_class.modifiers: @Override public
focal_class.parameters: (RestartStrategy<NativeApplicationRunner> restartStrategy)
focal_class.return: void
focal_class.signature: void setRestartStrategy(RestartStrategy<NativeApplicationRunner> restartStrategy)
focal_class.class_method_signature: BaseNativeApplicationRunner.getRestartStrategy()
focal_class.full_signature: @Override public RestartStrategy<NativeApplicationRunner> getRestartStrategy()
focal_class.identifier: getRestartStrategy
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: RestartStrategy<NativeApplicationRunner>
focal_class.signature: RestartStrategy<NativeApplicationRunner> getRestartStrategy()
focal_class.class_method_signature: BaseNativeApplicationRunner.setRestartDurationMaximum(long restartDurationMaximum)
focal_class.full_signature: @Override public void setRestartDurationMaximum(long restartDurationMaximum)
focal_class.identifier: setRestartDurationMaximum
focal_class.modifiers: @Override public
focal_class.parameters: (long restartDurationMaximum)
focal_class.return: void
focal_class.signature: void setRestartDurationMaximum(long restartDurationMaximum)
focal_class.class_method_signature: BaseNativeApplicationRunner.addNativeApplicationRunnerListener(NativeApplicationRunnerListener listener)
focal_class.full_signature: @Override public void addNativeApplicationRunnerListener(NativeApplicationRunnerListener listener)
focal_class.identifier: addNativeApplicationRunnerListener
focal_class.modifiers: @Override public
focal_class.parameters: (NativeApplicationRunnerListener listener)
focal_class.return: void
focal_class.signature: void addNativeApplicationRunnerListener(NativeApplicationRunnerListener listener)
focal_class.class_method_signature: BaseNativeApplicationRunner.removeNativeApplicationRunnerListener(NativeApplicationRunnerListener listener)
focal_class.full_signature: @Override public void removeNativeApplicationRunnerListener(NativeApplicationRunnerListener listener)
focal_class.identifier: removeNativeApplicationRunnerListener
focal_class.modifiers: @Override public
focal_class.parameters: (NativeApplicationRunnerListener listener)
focal_class.return: void
focal_class.signature: void removeNativeApplicationRunnerListener(NativeApplicationRunnerListener listener)
focal_class.class_method_signature: BaseNativeApplicationRunner.notifyApplicationStarting()
focal_class.full_signature: private void notifyApplicationStarting()
focal_class.identifier: notifyApplicationStarting
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void notifyApplicationStarting()
focal_class.class_method_signature: BaseNativeApplicationRunner.handleApplicationRunning()
focal_class.full_signature: private void handleApplicationRunning()
focal_class.identifier: handleApplicationRunning
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void handleApplicationRunning()
focal_class.class_method_signature: BaseNativeApplicationRunner.handleApplicationShutdownRequested()
focal_class.full_signature: private boolean handleApplicationShutdownRequested()
focal_class.identifier: handleApplicationShutdownRequested
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean handleApplicationShutdownRequested()
focal_class.class_method_signature: BaseNativeApplicationRunner.handleApplicationShutdown(NativeApplicationRunnerState finalState)
focal_class.full_signature: private void handleApplicationShutdown(NativeApplicationRunnerState finalState)
focal_class.identifier: handleApplicationShutdown
focal_class.modifiers: private
focal_class.parameters: (NativeApplicationRunnerState finalState)
focal_class.return: void
focal_class.signature: void handleApplicationShutdown(NativeApplicationRunnerState finalState)
focal_class.class_method_signature: BaseNativeApplicationRunner.handleApplicationStartupFailed()
focal_class.full_signature: private void handleApplicationStartupFailed()
focal_class.identifier: handleApplicationStartupFailed
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void handleApplicationStartupFailed()
focal_class.class_method_signature: BaseNativeApplicationRunner.getCommandLine()
focal_class.full_signature: public String[] getCommandLine()
focal_class.identifier: getCommandLine
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getCommandLine()
focal_class.class_method_signature: BaseNativeApplicationRunner.getEnvironment()
focal_class.full_signature: public Map<String, String> getEnvironment()
focal_class.identifier: getEnvironment
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> getEnvironment()
focal_class.class_method_signature: BaseNativeApplicationRunner.getSpaceEnvironment()
focal_class.full_signature: public InteractiveSpacesEnvironment getSpaceEnvironment()
focal_class.identifier: getSpaceEnvironment
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: InteractiveSpacesEnvironment
focal_class.signature: InteractiveSpacesEnvironment getSpaceEnvironment()
focal_class.class_method_signature: BaseNativeApplicationRunner.getLog()
focal_class.full_signature: public Log getLog()
focal_class.identifier: getLog
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Log
focal_class.signature: Log getLog()
focal_method.body: @VisibleForTesting
    void modifyEnvironment(Map<String, String> processEnvironment, Map<String, String> modificationEnvironment) {
      for (Entry<String, String> entry : modificationEnvironment.entrySet()) {
        String value = entry.getValue();
        if (value != null) {
          processEnvironment.put(entry.getKey(), value);
        } else {
          processEnvironment.remove(entry.getKey());
        }
      }
    }
focal_method.class_method_signature: BaseNativeApplicationRunner.modifyEnvironment(Map<String, String> processEnvironment, Map<String, String> modificationEnvironment)
focal_method.full_signature: @VisibleForTesting void modifyEnvironment(Map<String, String> processEnvironment, Map<String, String> modificationEnvironment)
focal_method.identifier: modifyEnvironment
focal_method.invocations: entrySet getValue put getKey remove getKey
focal_method.modifiers: @VisibleForTesting
focal_method.parameters: (Map<String, String> processEnvironment, Map<String, String> modificationEnvironment)
focal_method.return: void
focal_method.signature: void modifyEnvironment(Map<String, String> processEnvironment, Map<String, String> modificationEnvironment)