code: public static File getPathtoProject(final File filename, final File traceFilename, final File inputMap, final Job job) {
          if (job.getGeneratecopyouter() != Job.Generate.OLDSOLUTION) {
              if (isOutFile(traceFilename, inputMap)) {
                  return toFile(getRelativePathFromOut(traceFilename.getAbsoluteFile(), job));
              } else {
                  return getRelativePath(traceFilename.getAbsoluteFile(), inputMap.getAbsoluteFile()).getParentFile();
              }
          } else {
              return FileUtils.getRelativePath(filename);
          }
      }
docs: Get path to base directory
  
  @param filename relative input file path from base directory
  @param traceFilename absolute input file
  @param inputMap absolute path to start file
  @return path to base directory, {@code null} if not available