Program: 25252
Project: 25252
Buggy source:
/** 
 * The CLI erroneously appends absolute path for URI's. It also replaces the double slashes to single slashes. Eg. /home/some/path/file:/home/git/lens/target/tempdata_*.txt This Util method removes the erroneously appended absolute path for URI's. And appends :/// for the URI's. Paths with hdfs/s3/s3n are appended with double slashes :// Any new URI's have to be handled appropriately
 * @param path
 * @return
 */
public String removePrefixBeforeURI(String path){
  path=path.replaceAll("String_Node_Str","String_Node_Str");
  path=path.replaceAll("String_Node_Str","String_Node_Str");
  if (path.startsWith("String_Node_Str")) {
    path=path.replaceFirst("String_Node_Str",System.getProperty("String_Node_Str"));
  }
  String projectDir=Paths.get("String_Node_Str").toAbsolutePath().toString();
  int indexOfUriInit=path.indexOf("String_Node_Str");
  int currDirLen=projectDir.length();
  String escapedSlashes="String_Node_Str";
  Pattern pattern=Pattern.compile("String_Node_Str");
  Matcher match=pattern.matcher(path);
  if (match.find() && config.getProperties().get(PATH_PREFIX + match.group(1)) != null) {
    escapedSlashes=config.getProperties().get(PATH_PREFIX + match.group(1));
  }
  if (path.startsWith(projectDir) && indexOfUriInit != -1) {
    path=path.substring(currDirLen + 1,path.length());
  }
  indexOfUriInit=path.indexOf("String_Node_Str");
  if (indexOfUriInit != -1 && !path.contains("String_Node_Str")) {
    path=path.substring(0,indexOfUriInit) + escapedSlashes + path.substring(indexOfUriInit + 2);
  }
  return path;
}

Fixed version (ground truth):
/** 
 * The CLI erroneously appends absolute path for URI's. It also replaces the double slashes to single slashes. Eg. /home/some/path/file:/home/git/lens/target/tempdata_*.txt This Util method removes the erroneously appended absolute path for URI's. And appends :/// for the URI's. Paths with hdfs/s3/s3n are appended with double slashes :// Any new URI's have to be handled appropriately
 * @param path input path
 * @return cleaned up path
 */
public String removePrefixBeforeURI(String path){
  path=path.replaceAll("String_Node_Str","String_Node_Str");
  path=path.replaceAll("String_Node_Str","String_Node_Str");
  if (path.startsWith("String_Node_Str")) {
    path=path.replaceFirst("String_Node_Str",System.getProperty("String_Node_Str"));
  }
  String projectDir=Paths.get("String_Node_Str").toAbsolutePath().toString();
  int indexOfUriInit=path.indexOf("String_Node_Str");
  int currDirLen=projectDir.length();
  String escapedSlashes="String_Node_Str";
  Pattern pattern=Pattern.compile("String_Node_Str");
  Matcher match=pattern.matcher(path);
  if (match.find() && config.getProperties().get(PATH_PREFIX + match.group(1)) != null) {
    escapedSlashes=config.getProperties().get(PATH_PREFIX + match.group(1));
  }
  if (path.startsWith(projectDir) && indexOfUriInit != -1) {
    path=path.substring(currDirLen + 1,path.length());
  }
  indexOfUriInit=path.indexOf("String_Node_Str");
  if (indexOfUriInit != -1 && !path.contains("String_Node_Str")) {
    path=path.substring(0,indexOfUriInit) + escapedSlashes + path.substring(indexOfUriInit + 2);
  }
  return path;
}