Program: 17812
Project: 17812
Buggy source:
private PathInfo parseRequestUri(final String uri) throws BatchException {
  PathInfoImpl pathInfo=new PathInfoImpl();
  pathInfo.setServiceRoot(batchRequestPathInfo.getServiceRoot());
  pathInfo.setPrecedingPathSegment(batchRequestPathInfo.getPrecedingSegments());
  final String odataPathSegmentsAsString;
  final String queryParametersAsString;
  try {
    Scanner uriScanner=new Scanner(uri).useDelimiter(LF);
    URI uriObject=new URI(uri);
    if (uriObject.isAbsolute()) {
      Pattern regexRequestUri=Pattern.compile(baseUri + "String_Node_Str");
      if (uriScanner.hasNext(regexRequestUri)) {
        uriScanner.next(regexRequestUri);
        MatchResult result=uriScanner.match();
        if (result.groupCount() == 2) {
          odataPathSegmentsAsString=result.group(1);
          queryParametersAsString=result.group(2) != null ? result.group(2) : "String_Node_Str";
        }
 else {
          uriScanner.close();
          throw new BatchException(BatchException.INVALID_URI.addContent(currentLineNumber));
        }
      }
 else {
        uriScanner.close();
        throw new BatchException(BatchException.INVALID_URI.addContent(currentLineNumber));
      }
    }
 else {
      Pattern regexRequestUri=Pattern.compile("String_Node_Str");
      if (uriScanner.hasNext(regexRequestUri)) {
        uriScanner.next(regexRequestUri);
        MatchResult result=uriScanner.match();
        if (result.groupCount() == 2) {
          odataPathSegmentsAsString=result.group(1);
          queryParametersAsString=result.group(2) != null ? result.group(2) : "String_Node_Str";
        }
 else {
          uriScanner.close();
          throw new BatchException(BatchException.INVALID_URI.addContent(currentLineNumber));
        }
      }
 else       if (uriScanner.hasNext("String_Node_Str")) {
        uriScanner.close();
        throw new BatchException(BatchException.UNSUPPORTED_ABSOLUTE_PATH.addContent(currentLineNumber));
      }
 else {
        uriScanner.close();
        throw new BatchException(BatchException.INVALID_URI.addContent(currentLineNumber));
      }
    }
    uriScanner.close();
    pathInfo.setODataPathSegment(parseODataPathSegments(odataPathSegmentsAsString));
    if (!odataPathSegmentsAsString.startsWith("String_Node_Str")) {
      String requestUri=baseUri + "String_Node_Str" + odataPathSegmentsAsString+ queryParametersAsString;
      pathInfo.setRequestUri(new URI(requestUri));
    }
    return pathInfo;
  }
 catch (  URISyntaxException e1) {
    throw new BatchException(BatchException.INVALID_URI.addContent(currentLineNumber));
  }
}

Fixed version (ground truth):
private PathInfo parseRequestUri(final String uri) throws BatchException {
  PathInfoImpl pathInfo=new PathInfoImpl();
  pathInfo.setServiceRoot(batchRequestPathInfo.getServiceRoot());
  pathInfo.setPrecedingPathSegment(batchRequestPathInfo.getPrecedingSegments());
  final String odataPathSegmentsAsString;
  final String queryParametersAsString;
  try {
    Scanner uriScanner=new Scanner(uri).useDelimiter(LF);
    URI uriObject=new URI(uri);
    if (uriObject.isAbsolute()) {
      Pattern regexRequestUri=Pattern.compile(baseUri + "String_Node_Str");
      if (uriScanner.hasNext(regexRequestUri)) {
        uriScanner.next(regexRequestUri);
        MatchResult result=uriScanner.match();
        if (result.groupCount() == 2) {
          odataPathSegmentsAsString=result.group(1);
          queryParametersAsString=result.group(2) != null ? result.group(2) : "String_Node_Str";
        }
 else {
          uriScanner.close();
          throw new BatchException(BatchException.INVALID_URI.addContent(currentLineNumber));
        }
      }
 else {
        uriScanner.close();
        throw new BatchException(BatchException.INVALID_URI.addContent(currentLineNumber));
      }
    }
 else {
      Pattern regexRequestUri=Pattern.compile("String_Node_Str");
      if (uriScanner.hasNext(regexRequestUri)) {
        uriScanner.next(regexRequestUri);
        MatchResult result=uriScanner.match();
        if (result.groupCount() == 2) {
          odataPathSegmentsAsString=result.group(1);
          queryParametersAsString=result.group(2) != null ? result.group(2) : "String_Node_Str";
        }
 else {
          uriScanner.close();
          throw new BatchException(BatchException.INVALID_URI.addContent(currentLineNumber));
        }
      }
 else       if (uriScanner.hasNext("String_Node_Str")) {
        uriScanner.close();
        throw new BatchException(BatchException.UNSUPPORTED_ABSOLUTE_PATH.addContent(currentLineNumber));
      }
 else {
        uriScanner.close();
        throw new BatchException(BatchException.INVALID_URI.addContent(currentLineNumber));
      }
    }
    uriScanner.close();
    pathInfo.setODataPathSegment(parseODataPathSegments(odataPathSegmentsAsString));
    if (!odataPathSegmentsAsString.startsWith("String_Node_Str")) {
      String requestUri=baseUri + "String_Node_Str" + odataPathSegmentsAsString+ queryParametersAsString;
      pathInfo.setRequestUri(new URI(requestUri));
    }
    return pathInfo;
  }
 catch (  URISyntaxException e) {
    throw new BatchException(BatchException.INVALID_URI.addContent(currentLineNumber),e);
  }
}