Source:
<code>public InterpreterResult interpret(String cmd, InterpreterContext contextInterpreter) { LOGGER.debug("Run shell command '" + cmd + "'"); OutputStream outStream = new ByteArrayOutputStream(); CommandLine cmdLine = CommandLine.parse(shell); if (isWindows) { String[] lines = StringUtils.split(cmd, "\n"); cmd = StringUtils.join(lines, " && "); } cmdLine.addArgument(cmd, false); try { DefaultExecutor executor = new DefaultExecutor(); executor.setStreamHandler(new PumpStreamHandler( contextInterpreter.out, contextInterpreter.out)); Long timeOutProperty; try { <START> timeOutProperty = Long.valueOf(getProperty(TIMEOUT_PROPERTY)); <END> } catch (Exception e) { timeOutProperty = DEFAULT_TIMEOUT_PROPERTY; LOGGER.error("Cannot convert TIMEOUT_PROPERTY to Long value, switching to default value", e); } executor.setWatchdog(new ExecuteWatchdog(timeOutProperty)); executors.put(contextInterpreter.getParagraphId(), executor); if (Boolean.valueOf(getProperty(DIRECTORY_USER_HOME))) { executor.setWorkingDirectory(new File(System.getProperty("user.home"))); } int exitVal = executor.execute(cmdLine); LOGGER.info("Paragraph " + contextInterpreter.getParagraphId() + " return with exit value: " + exitVal); return new InterpreterResult(Code.SUCCESS, outStream.toString()); } catch (ExecuteException e) { int exitValue = e.getExitValue(); LOGGER.error("Can not run " + cmd, e); Code code = Code.ERROR; String message = outStream.toString(); if (exitValue == 143) { code = Code.INCOMPLETE; message += "Paragraph received a SIGTERM\n"; LOGGER.info("The paragraph " + contextInterpreter.getParagraphId() + " stopped executing: " + message); } message += "ExitValue: " + exitValue; return new InterpreterResult(code, message); } catch (IOException e) { LOGGER.error("Can not run " + cmd, e); return new InterpreterResult(Code.ERROR, e.getMessage()); } finally { executors.remove(contextInterpreter.getParagraphId()); } }</code><technical_language>getProperty(key, default)</technical_language>

Target:
public InterpreterResult interpret(String cmd, InterpreterContext contextInterpreter) { LOGGER.debug("Run shell command '" + cmd + "'"); OutputStream outStream = new ByteArrayOutputStream(); CommandLine cmdLine = CommandLine.parse(shell); if (isWindows) { String[] lines = StringUtils.split(cmd, "\n"); cmd = StringUtils.join(lines, " && "); } cmdLine.addArgument(cmd, false); try { DefaultExecutor executor = new DefaultExecutor(); executor.setStreamHandler(new PumpStreamHandler( contextInterpreter.out, contextInterpreter.out)); executor.setWatchdog(new ExecuteWatchdog( Long.valueOf(getProperty(TIMEOUT_PROPERTY, DEFAULT_TIMEOUT_PROPERTY)))); executors.put(contextInterpreter.getParagraphId(), executor); if (Boolean.valueOf(getProperty(DIRECTORY_USER_HOME))) { executor.setWorkingDirectory(new File(System.getProperty("user.home"))); } int exitVal = executor.execute(cmdLine); LOGGER.info("Paragraph " + contextInterpreter.getParagraphId() + " return with exit value: " + exitVal); return new InterpreterResult(Code.SUCCESS, outStream.toString()); } catch (ExecuteException e) { int exitValue = e.getExitValue(); LOGGER.error("Can not run " + cmd, e); Code code = Code.ERROR; String message = outStream.toString(); if (exitValue == 143) { code = Code.INCOMPLETE; message += "Paragraph received a SIGTERM\n"; LOGGER.info("The paragraph " + contextInterpreter.getParagraphId() + " stopped executing: " + message); } message += "ExitValue: " + exitValue; return new InterpreterResult(code, message); } catch (IOException e) { LOGGER.error("Can not run " + cmd, e); return new InterpreterResult(Code.ERROR, e.getMessage()); } finally { executors.remove(contextInterpreter.getParagraphId()); } }