// Path: ostara-service/src/main/java/org/ostara/cmd/util/ProcessCall.java
// public class ProcessCall implements Callable<ProcessCallOutput> {
// 
//    private final Process process;
// 
//    public ProcessCall(Process process) {
//       this.process = process;
//    }
// 
//    public ProcessCallOutput call() throws IOException, InterruptedException {
//       ProcessCallOutput processOutput = new ProcessCallOutput();
//       StringBuilder outputBuffer = new StringBuilder(512);
//       StringBuilder errOutputBuffer = new StringBuilder(512);
//       BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
//       BufferedReader errin = new BufferedReader(new InputStreamReader(process.getErrorStream()));
//       String line = null;
// 
//       try {
//          while ((line = in.readLine()) != null) {
//             outputBuffer.append(line + "\n");
//          }
//          while ((line = errin.readLine()) != null) {
//             errOutputBuffer.append(line + "\n");
//          }
//          processOutput.exitValue = process.waitFor();
//       } finally {
//          process.getInputStream().close();
//          process.getOutputStream().close();
//          process.getErrorStream().close();
//          in.close();
//          errin.close();
//       }
//       processOutput.output = outputBuffer.toString();
//       processOutput.errOutput = errOutputBuffer.toString();
//       return processOutput;
//    }
// }
// 
// Path: ostara-service/src/main/java/org/ostara/cmd/util/ProcessCallOutput.java
// public class ProcessCallOutput {
//    public int exitValue;
// 
//    public String output;
// 
//    public String errOutput;
// }


import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.SystemUtils;
import org.ostara.cmd.util.ProcessCall;
import org.ostara.cmd.util.ProcessCallOutput;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
				ProcessBuilder processBuilder = new ProcessBuilder();
				processBuilder.redirectErrorStream(true);
				processBuilder.directory(new File(cmdExecDir));

				StringBuilder cmdToLog = new StringBuilder();

				for (String s : cmdLine) {
					s = s.replaceFirst("https://.*[@]", "https://");
					cmdToLog.append(s).append(" ");
				}

				logger.info("Executing process: " + cmdToLog);

				p = processBuilder.command(cmdLine).start();
				if (wait) {
					processCall = new ProcessCall(p);
					output = processCall.call();
				}
			} catch (Exception e) {
				logger.error(e.getMessage(), e);
				error = e;
				retry++;
				continue;
			}
			break;
		}

		if (output == null) {
			result.setException(error);
		} else if (output.exitValue != 0) {
// Path: ostara-service/src/main/java/org/ostara/cmd/util/ProcessCall.java
// public class ProcessCall implements Callable<ProcessCallOutput> {
// 
//    private final Process process;
// 
//    public ProcessCall(Process process) {
//       this.process = process;
//    }
// 
//    public ProcessCallOutput call() throws IOException, InterruptedException {
//       ProcessCallOutput processOutput = new ProcessCallOutput();
//       StringBuilder outputBuffer = new StringBuilder(512);
//       StringBuilder errOutputBuffer = new StringBuilder(512);
//       BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
//       BufferedReader errin = new BufferedReader(new InputStreamReader(process.getErrorStream()));
//       String line = null;
// 
//       try {
//          while ((line = in.readLine()) != null) {
//             outputBuffer.append(line + "\n");
//          }
//          while ((line = errin.readLine()) != null) {
//             errOutputBuffer.append(line + "\n");
//          }
//          processOutput.exitValue = process.waitFor();
//       } finally {
//          process.getInputStream().close();
//          process.getOutputStream().close();
//          process.getErrorStream().close();
//          in.close();
//          errin.close();
//       }
//       processOutput.output = outputBuffer.toString();
//       processOutput.errOutput = errOutputBuffer.toString();
//       return processOutput;
//    }
// }
// 
// Path: ostara-service/src/main/java/org/ostara/cmd/util/ProcessCallOutput.java
// public class ProcessCallOutput {
//    public int exitValue;
// 
//    public String output;
// 
//    public String errOutput;
// }


// Path: ostara-service/src/main/java/org/ostara/cmd/BaseCmdLineCmd.java
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.SystemUtils;
import org.ostara.cmd.util.ProcessCall;
import org.ostara.cmd.util.ProcessCallOutput;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

				ProcessBuilder processBuilder = new ProcessBuilder();
				processBuilder.redirectErrorStream(true);
				processBuilder.directory(new File(cmdExecDir));

				StringBuilder cmdToLog = new StringBuilder();

				for (String s : cmdLine) {
					s = s.replaceFirst("https://.*[@]", "https://");
					cmdToLog.append(s).append(" ");
				}

				logger.info("Executing process: " + cmdToLog);

				p = processBuilder.command(cmdLine).start();
				if (wait) {
					processCall = new ProcessCall(p);
					output = processCall.call();
				}
			} catch (Exception e) {
				logger.error(e.getMessage(), e);
				error = e;
				retry++;
				continue;
			}
			break;
		}

		if (output == null) {
			result.setException(error);
		} else if (output.exitValue != 0) {
			result.setException(new RuntimeException(