Program: 73072
Project: 73072
Buggy source:
/** 
 * Determine the path to the omc binary that user (probably) wants to use and the working directory of where that binary (most likely) should be started in. This will returns for example 'c:\openmodelica132\omc.exe' or '/usr/local/share/openmodelica/omc' depending on such factors as: OS type, environmental Variables settings, where the first matching binary found.
 * @return full path to the omc binary and the working folder.
 * @exception ConnectException If OPENMODELICAHOME is not set and we could not find binary file in the path.
 */
private File[] _getOmcBinaryPaths() throws ConnectException {
  String binaryName="String_Node_Str";
  if (_os == osType.WINDOWS) {
    binaryName+="String_Node_Str";
  }
  File omcBinary=null;
  File omcWorkingDirectory=null;
  File openModelicaHomeDirectory=null;
  String loggerInfo="String_Node_Str";
  _omcLoggerInstance.getInfo(loggerInfo);
  String openModelicaHome=System.getenv("String_Node_Str");
  if (openModelicaHome == null) {
    loggerInfo="String_Node_Str";
    _omcLoggerInstance.getInfo(loggerInfo);
    File omc=_findExecutableOnPath(binaryName);
    if (omc != null) {
      loggerInfo="String_Node_Str" + omc.getAbsolutePath();
      _omcLoggerInstance.getInfo(loggerInfo);
      openModelicaHome=omc.getParentFile().getParentFile().getAbsolutePath();
    }
 else {
      final String m="String_Node_Str" + binaryName + "String_Node_Str";
      _omcLoggerInstance.getInfo(m);
      throw new ConnectException(m);
    }
  }
  openModelicaHomeDirectory=new File(openModelicaHome);
  String[] subdirs={"String_Node_Str"};
  for (  String subdir : subdirs) {
    String path=openModelicaHomeDirectory.getAbsolutePath() + File.separator;
    path+=subdir.equals("String_Node_Str") ? binaryName : subdir + File.separator + binaryName;
    File file=new File(path);
    if (file.exists()) {
      omcBinary=file;
      loggerInfo="String_Node_Str" + omcBinary.getAbsolutePath() + "String_Node_Str";
      _omcLoggerInstance.getInfo(loggerInfo);
      break;
    }
 else {
      loggerInfo="String_Node_Str" + path + "String_Node_Str";
      _omcLoggerInstance.getInfo(loggerInfo);
    }
  }
  if (omcBinary == null) {
    loggerInfo="String_Node_Str";
    _omcLoggerInstance.getInfo(loggerInfo);
    throw new ConnectException(loggerInfo);
  }
  if (System.getenv("String_Node_Str") == null)   omcWorkingDirectory=new File(System.getProperty("String_Node_Str") + "String_Node_Str");
 else   omcWorkingDirectory=new File(System.getProperty("String_Node_Str") + "String_Node_Str" + System.getenv("String_Node_Str")+ "String_Node_Str");
  String workingDirectory="String_Node_Str" + omcWorkingDirectory.getAbsolutePath() + "String_Node_Str";
  loggerInfo=workingDirectory;
  _omcLoggerInstance.getInfo(loggerInfo);
  System.out.println("String_Node_Str" + omcWorkingDirectory);
  return new File[]{omcBinary,omcWorkingDirectory};
}

Fixed version (ground truth):
/** 
 * Determine the path to the omc binary that user (probably) wants to use and the working directory of where that binary (most likely) should be started in. This will returns for example 'c:\openmodelica132\omc.exe' or '/usr/local/share/openmodelica/omc' depending on such factors as: OS type, environmental Variables settings, where the first matching binary found.
 * @return full path to the omc binary and the working folder.
 * @exception ConnectException If OPENMODELICAHOME is not set and we could not find binary file in the path.
 */
private File[] _getOmcBinaryPaths() throws ConnectException {
  String binaryName="String_Node_Str";
  if (_os == osType.WINDOWS) {
    binaryName+="String_Node_Str";
  }
  File omcBinary=null;
  File omcWorkingDirectory=null;
  File openModelicaHomeDirectory=null;
  String loggerInfo="String_Node_Str";
  _omcLogger.getInfo(loggerInfo);
  String openModelicaHome=System.getenv("String_Node_Str");
  if (openModelicaHome == null) {
    loggerInfo="String_Node_Str";
    _omcLogger.getInfo(loggerInfo);
    File omc=_findExecutableOnPath(binaryName);
    if (omc != null) {
      loggerInfo="String_Node_Str" + omc.getAbsolutePath();
      _omcLogger.getInfo(loggerInfo);
      openModelicaHome=omc.getParentFile().getParentFile().getAbsolutePath();
    }
 else {
      final String m="String_Node_Str" + binaryName + "String_Node_Str";
      _omcLogger.getInfo(m);
      throw new ConnectException(m);
    }
  }
  openModelicaHomeDirectory=new File(openModelicaHome);
  String[] subdirs={"String_Node_Str"};
  for (  String subdir : subdirs) {
    String path=openModelicaHomeDirectory.getAbsolutePath() + File.separator;
    path+=subdir.equals("String_Node_Str") ? binaryName : subdir + File.separator + binaryName;
    File file=new File(path);
    if (file.exists()) {
      omcBinary=file;
      loggerInfo="String_Node_Str" + omcBinary.getAbsolutePath() + "String_Node_Str";
      _omcLogger.getInfo(loggerInfo);
      break;
    }
 else {
      loggerInfo="String_Node_Str" + path + "String_Node_Str";
      _omcLogger.getInfo(loggerInfo);
    }
  }
  if (omcBinary == null) {
    loggerInfo="String_Node_Str";
    _omcLogger.getInfo(loggerInfo);
    throw new ConnectException(loggerInfo);
  }
  if (System.getenv("String_Node_Str") == null)   omcWorkingDirectory=new File(System.getProperty("String_Node_Str") + "String_Node_Str");
 else   omcWorkingDirectory=new File(System.getProperty("String_Node_Str") + "String_Node_Str" + System.getenv("String_Node_Str")+ "String_Node_Str");
  String workingDirectory="String_Node_Str" + omcWorkingDirectory.getAbsolutePath() + "String_Node_Str";
  loggerInfo=workingDirectory;
  _omcLogger.getInfo(loggerInfo);
  System.out.println("String_Node_Str" + omcWorkingDirectory);
  return new File[]{omcBinary,omcWorkingDirectory};
}