nus-yam/ex-repair huggingface dataset:
Program: 99289
Project: 99289
Buggy source:
public boolean doWork() throws IOException {
  boolean worked=false;
  String name=queue.dequeue();
  if (name != null) {
    worked=true;
    String[] pathsOrUrls=null;
    try {
      pathsOrUrls=db.nameToUrls(name);
    }
 catch (    IOException e) {
      LOGGER.severe("String_Node_Str" + name + "String_Node_Str"+ e.getLocalizedMessage());
      return false;
    }
    try {
      if (pathsOrUrls != null) {
        for (        String pathOrUrl : pathsOrUrls) {
          LOGGER.info("String_Node_Str" + name + "String_Node_Str"+ pathOrUrl);
          CloseableIterator<CaptureSearchResult> itr=indexFile(pathOrUrl);
          target.addSearchResults(name,itr);
          itr.close();
          break;
        }
      }
    }
 catch (    IOException e) {
      LOGGER.severe("String_Node_Str" + name + "String_Node_Str");
      e.printStackTrace();
    }
  }
  return worked;
}

Fixed version (ground truth):
public boolean doWork() throws IOException {
  boolean worked=false;
  String name=queue.dequeue();
  if (name != null) {
    worked=true;
    String[] pathsOrUrls=null;
    try {
      pathsOrUrls=db.nameToUrls(name);
    }
 catch (    IOException e) {
      LOGGER.severe("String_Node_Str" + name + "String_Node_Str"+ e.getLocalizedMessage());
      return false;
    }
    try {
      if (pathsOrUrls != null) {
        for (        String pathOrUrl : pathsOrUrls) {
          LOGGER.info("String_Node_Str" + name + "String_Node_Str"+ pathOrUrl);
          CloseableIterator<CaptureSearchResult> itr=indexFile(pathOrUrl);
          target.addSearchResults(name,itr);
          itr.close();
          break;
        }
      }
    }
 catch (    Exception e) {
      LOGGER.severe("String_Node_Str" + name + "String_Node_Str");
      e.printStackTrace();
    }
  }
  return worked;
}
Program: 99290
Project: 99290
Buggy source:
public ReplayRenderer getRenderer(WaybackRequest wbRequest,CaptureSearchResult result,Resource resource){
  ReplayRenderer r=decorated.getRenderer(wbRequest,result,resource);
  return getDecoratedRenderer(r);
}

Fixed version (ground truth):
public ReplayRenderer getRenderer(WaybackRequest wbRequest,CaptureSearchResult result,Resource httpHeadersResource,Resource payloadResource){
  ReplayRenderer r=decorated.getRenderer(wbRequest,result,httpHeadersResource,payloadResource);
  return getDecoratedRenderer(r);
}
Program: 99292
Project: 99292
Buggy source:
@Override public void renderResource(HttpServletRequest httpRequest,HttpServletResponse httpResponse,WaybackRequest wbRequest,CaptureSearchResult result,Resource resource,ResultURIConverter uriConverter,CaptureSearchResults results) throws ServletException, IOException, WaybackException {
  MementoUtils.addMementoHeaders(httpResponse,results,wbRequest);
  decorated.renderResource(httpRequest,httpResponse,wbRequest,result,resource,uriConverter,results);
}

Fixed version (ground truth):
@Override public void renderResource(HttpServletRequest httpRequest,HttpServletResponse httpResponse,WaybackRequest wbRequest,CaptureSearchResult result,Resource httpHeadersResource,Resource payloadResource,ResultURIConverter uriConverter,CaptureSearchResults results) throws ServletException, IOException, WaybackException {
  MementoUtils.addMementoHeaders(httpResponse,results,wbRequest);
  decorated.renderResource(httpRequest,httpResponse,wbRequest,result,httpHeadersResource,payloadResource,uriConverter,results);
}
Program: 99293
Project: 99293
Buggy source:
private CaptureSearchResult genericResult(WARCRecord rec){
  CaptureSearchResult result=new CaptureSearchResult();
  result.setMimeType(DEFAULT_VALUE);
  result.setHttpCode(DEFAULT_VALUE);
  result.setRedirectUrl(DEFAULT_VALUE);
  ArchiveRecordHeader header=rec.getHeader();
  String file=transformWARCFilename(header.getReaderIdentifier());
  long offset=header.getOffset();
  result.setCaptureTimestamp(transformWARCDate(header.getDate()));
  result.setFile(file);
  result.setOffset(offset);
  result.setDigest(transformWARCDigest(header.getHeaderValue(WARCRecord.HEADER_KEY_PAYLOAD_DIGEST)));
  String origUrl=header.getUrl();
  if (origUrl == null) {
    String type=header.getHeaderValue(WARCConstants.HEADER_KEY_TYPE).toString();
    if (type.equals(WARCConstants.WARCRecordType.WARCINFO)) {
      String filename=header.getHeaderValue(WARCConstants.HEADER_KEY_FILENAME).toString();
      result.setOriginalUrl("String_Node_Str" + filename);
      result.setUrlKey("String_Node_Str" + filename);
    }
 else {
      result.setOriginalUrl(DEFAULT_VALUE);
      result.setUrlKey(DEFAULT_VALUE);
    }
  }
 else {
    result.setOriginalUrl(origUrl);
    try {
      String urlKey=canonicalizer.urlStringToKey(origUrl);
      result.setUrlKey(urlKey);
    }
 catch (    URIException e) {
      String shortUrl=(origUrl.length() < 100) ? origUrl : origUrl.substring(0,100);
      LOGGER.warning("String_Node_Str" + shortUrl + "String_Node_Str"+ file+ "String_Node_Str"+ offset);
      result.setUrlKey(origUrl);
    }
  }
  return result;
}

Fixed version (ground truth):
private CaptureSearchResult genericResult(WARCRecord rec){
  CaptureSearchResult result=new CaptureSearchResult();
  result.setMimeType(DEFAULT_VALUE);
  result.setHttpCode(DEFAULT_VALUE);
  result.setRedirectUrl(DEFAULT_VALUE);
  ArchiveRecordHeader header=rec.getHeader();
  String file=transformWARCFilename(header.getReaderIdentifier());
  long offset=header.getOffset();
  result.setCaptureTimestamp(transformWARCDate(header.getDate()));
  result.setFile(file);
  result.setOffset(offset);
  result.setDigest(transformWARCDigest(header.getHeaderValue(WARCRecord.HEADER_KEY_PAYLOAD_DIGEST)));
  String origUrl=header.getUrl();
  if (origUrl == null) {
    String type=header.getHeaderValue(WARCConstants.HEADER_KEY_TYPE).toString();
    if (type.equals(WARCConstants.WARCRecordType.warcinfo)) {
      String filename=header.getHeaderValue(WARCConstants.HEADER_KEY_FILENAME).toString();
      result.setOriginalUrl("String_Node_Str" + filename);
      result.setUrlKey("String_Node_Str" + filename);
    }
 else {
      result.setOriginalUrl(DEFAULT_VALUE);
      result.setUrlKey(DEFAULT_VALUE);
    }
  }
 else {
    result.setOriginalUrl(origUrl);
    try {
      String urlKey=canonicalizer.urlStringToKey(origUrl);
      result.setUrlKey(urlKey);
    }
 catch (    URIException e) {
      String shortUrl=(origUrl.length() < 100) ? origUrl : origUrl.substring(0,100);
      LOGGER.warning("String_Node_Str" + shortUrl + "String_Node_Str"+ file+ "String_Node_Str"+ offset);
      result.setUrlKey(origUrl);
    }
  }
  return result;
}
Program: 99294
Project: 99294
Buggy source:
private CaptureSearchResult adaptInner(WARCRecord rec) throws IOException {
  ArchiveRecordHeader header=rec.getHeader();
  String type=header.getHeaderValue(WARCConstants.HEADER_KEY_TYPE).toString();
  CaptureSearchResult result=genericResult(rec);
  if (type.equals(WARCConstants.WARCRecordType.RESPONSE)) {
    String mime=annotater.transformHTTPMime(header.getMimetype());
    if (mime != null && mime.equals("String_Node_Str")) {
      rec.close();
      result.setDigest(transformWARCDigest(rec.getDigestStr()));
      result.setMimeType(mime);
    }
 else {
      result=adaptWARCHTTPResponse(result,rec);
    }
  }
 else   if (type.equals(WARCConstants.WARCRecordType.REVISIT)) {
    result.setMimeType("String_Node_Str");
  }
 else   if (type.equals(WARCConstants.WARCRecordType.REQUEST)) {
    if (processAll) {
      result.setMimeType("String_Node_Str");
    }
 else {
      result=null;
    }
  }
 else   if (type.equals(WARCConstants.WARCRecordType.METADATA)) {
    if (processAll) {
      result.setMimeType("String_Node_Str");
    }
 else {
      result=null;
    }
  }
 else   if (type.equals(WARCConstants.WARCRecordType.WARCINFO)) {
    result.setMimeType(WARC_FILEDESC_VERSION);
  }
 else {
    LOGGER.info("String_Node_Str" + type);
  }
  return result;
}

Fixed version (ground truth):
private CaptureSearchResult adaptInner(WARCRecord rec) throws IOException {
  ArchiveRecordHeader header=rec.getHeader();
  String typeStr=header.getHeaderValue(WARCConstants.HEADER_KEY_TYPE).toString();
  WARCRecordType type;
  try {
    type=WARCRecordType.valueOf(typeStr);
  }
 catch (  IllegalArgumentException e) {
    LOGGER.warning("String_Node_Str" + typeStr);
    return null;
  }
  CaptureSearchResult result=genericResult(rec);
switch (type) {
case response:
    String mime=annotater.transformHTTPMime(header.getMimetype());
  if (mime != null && mime.equals("String_Node_Str")) {
    rec.close();
    result.setDigest(transformWARCDigest(rec.getDigestStr()));
    result.setMimeType(mime);
  }
 else {
    result=adaptWARCHTTPResponse(result,rec);
  }
break;
case revisit:
result.setMimeType("String_Node_Str");
break;
case request:
if (processAll) {
result.setMimeType("String_Node_Str");
}
 else {
result=null;
}
break;
case metadata:
if (processAll) {
result.setMimeType("String_Node_Str");
}
 else {
result=null;
}
break;
case warcinfo:
result.setMimeType(WARC_FILEDESC_VERSION);
break;
default :
LOGGER.info("String_Node_Str" + type);
break;
}
return result;
}
Program: 99295
Project: 99295
Buggy source:
protected Resource getResource(CaptureSearchResult closest,Set<String> skipFiles) throws ResourceNotAvailableException, ConfigurationException {
  if ((skipFiles != null) && skipFiles.contains(closest.getFile())) {
    throw new ResourceNotAvailableException("String_Node_Str" + closest.getFile(),null);
  }
  return getCollection().getResourceStore().retrieveResource(closest);
}

Fixed version (ground truth):
protected Resource getResource(CaptureSearchResult closest,Set<String> skipFiles) throws ResourceNotAvailableException, ConfigurationException {
  if ((skipFiles != null) && skipFiles.contains(closest.getFile())) {
    throw new ResourceNotAvailableException("String_Node_Str" + closest.getFile());
  }
  return getCollection().getResourceStore().retrieveResource(closest);
}
Program: 99299
Project: 99299
Buggy source:
private void asyncUpdateCheck(Jedis jedis,String url,String current,int refreshTime,int maxTime){
  long startTime=System.currentTimeMillis();
  long ttl=jedis.ttl(url);
  PerformanceLogger.noteElapsed("String_Node_Str",System.currentTimeMillis() - startTime,((maxTime == totalTTL) ? "String_Node_Str" + current.length() : current));
  redisConn.returnJedisInstance(jedis);
  jedis=null;
  if ((maxTime - ttl) >= refreshTime) {
    LOGGER.info("String_Node_Str" + (maxTime - ttl) + "String_Node_Str"+ refreshTime);
synchronized (urlsToUpdate) {
      if (urlsToUpdate.contains(url)) {
        return;
      }
      urlsToUpdate.add(url);
    }
    updateService.submit(new CacheUpdateTask(url,current));
  }
}

Fixed version (ground truth):
private void asyncUpdateCheck(long ttl,String url,String current,int refreshTime,int maxTime){
  if ((maxTime - ttl) >= refreshTime) {
    LOGGER.info("String_Node_Str" + (maxTime - ttl) + "String_Node_Str"+ refreshTime);
synchronized (urlsToUpdate) {
      if (urlsToUpdate.contains(url)) {
        return;
      }
      urlsToUpdate.add(url);
    }
    updateService.submit(new CacheUpdateTask(url,current));
  }
}
Program: 99301
Project: 99301
Buggy source:
public int filterObject(CaptureSearchResult r){
  String captureDate=r.getCaptureTimestamp();
  return (endDate.substring(0,captureDate.length()).compareTo(captureDate) < 0) ? FILTER_ABORT : FILTER_INCLUDE;
}

Fixed version (ground truth):
public int filterObject(CaptureSearchResult r){
  String captureDate=r.getCaptureTimestamp();
  int captureDateLength=Math.min(captureDate.length(),endDate.length());
  return (endDate.substring(0,captureDateLength).compareTo(captureDate) < 0) ? FILTER_ABORT : FILTER_INCLUDE;
}
Program: 99303
Project: 99303
Buggy source:
private RobotResponse loadRobotsUrl(String url){
  int status=200;
  try {
    HttpGet httpGet=new HttpGet(url);
    HttpResponse response=httpClient.execute(httpGet);
    String contents=null;
    if (response != null) {
      status=response.getStatusLine().getStatusCode();
    }
    if (status == 200) {
      contents=EntityUtils.toString(response.getEntity());
    }
 else {
      return new RobotResponse(status);
    }
    return new RobotResponse(contents);
  }
 catch (  Exception exc) {
    LOGGER.info("String_Node_Str" + exc + "String_Node_Str"+ url+ "String_Node_Str"+ status);
    return new RobotResponse(status);
  }
}

Fixed version (ground truth):
private RobotResponse loadRobotsUrl(String url){
  int status=200;
  try {
    HttpGet httpGet=new HttpGet(url);
    HttpResponse response=httpClient.execute(httpGet);
    String contents=null;
    if (response != null) {
      status=response.getStatusLine().getStatusCode();
    }
    if (status == 200) {
      contents=EntityUtils.toString(response.getEntity());
      return new RobotResponse(contents,status);
    }
 else {
      return new RobotResponse(null,status);
    }
  }
 catch (  Exception exc) {
    LOGGER.info("String_Node_Str" + exc + "String_Node_Str"+ url+ "String_Node_Str"+ status);
    return new RobotResponse(null,status);
  }
}
Program: 99304
Project: 99304
Buggy source:
RobotResponse(int status){
  this.status=status;
}

Fixed version (ground truth):
RobotResponse(String contents,int status){
  this.contents=contents;
  this.status=status;
}
Program: 99306
Project: 99306
Buggy source:
private RobotResponse loadRobotsUrl(String url){
  int status=200;
  try {
    HttpGet httpGet=new HttpGet(url);
    HttpResponse response=httpClient.execute(httpGet);
    String contents=null;
    if (response != null) {
      status=response.getStatusLine().getStatusCode();
    }
    if (status == 200) {
      contents=EntityUtils.toString(response.getEntity());
    }
 else {
      return new RobotResponse(status);
    }
    return new RobotResponse(contents);
  }
 catch (  Exception exc) {
    LOGGER.info("String_Node_Str" + exc + "String_Node_Str"+ url+ "String_Node_Str"+ status);
    return new RobotResponse(status);
  }
}

Fixed version (ground truth):
private RobotResponse loadRobotsUrl(String url){
  int status=200;
  try {
    HttpGet httpGet=new HttpGet(url);
    HttpResponse response=httpClient.execute(httpGet);
    String contents=null;
    if (response != null) {
      status=response.getStatusLine().getStatusCode();
    }
    if (status == 200) {
      contents=EntityUtils.toString(response.getEntity());
      return new RobotResponse(contents,status);
    }
 else {
      return new RobotResponse(null,status);
    }
  }
 catch (  Exception exc) {
    LOGGER.info("String_Node_Str" + exc + "String_Node_Str"+ url+ "String_Node_Str"+ status);
    return new RobotResponse(null,status);
  }
}
Program: 99307
Project: 99307
Buggy source:
RobotResponse(int status){
  this.status=status;
}

Fixed version (ground truth):
RobotResponse(String contents,int status){
  this.contents=contents;
  this.status=status;
}
Program: 99309
Project: 99309
Buggy source:
private RobotResponse loadRobotsUrl(String url){
  int status=200;
  try {
    HttpGet httpGet=new HttpGet(url);
    HttpResponse response=httpClient.execute(httpGet);
    String contents=null;
    if (response != null) {
      status=response.getStatusLine().getStatusCode();
    }
    if (status == 200) {
      contents=EntityUtils.toString(response.getEntity());
      return new RobotResponse(contents,status);
    }
 else {
      return new RobotResponse(null,status);
    }
  }
 catch (  Exception exc) {
    LOGGER.info("String_Node_Str" + exc + "String_Node_Str"+ url+ "String_Node_Str"+ status);
    return new RobotResponse(null,status);
  }
}

Fixed version (ground truth):
private RobotResponse loadRobotsUrl(String url){
  int status=200;
  try {
    HttpGet httpGet=new HttpGet(url);
    HttpResponse response=httpClient.execute(httpGet);
    String contents=null;
    if (response != null) {
      status=response.getStatusLine().getStatusCode();
    }
    if (status == 200) {
      contents=EntityUtils.toString(response.getEntity());
    }
 else {
      return new RobotResponse(status);
    }
    return new RobotResponse(contents);
  }
 catch (  Exception exc) {
    LOGGER.info("String_Node_Str" + exc + "String_Node_Str"+ url+ "String_Node_Str"+ status);
    return new RobotResponse(status);
  }
}
Program: 99310
Project: 99310
Buggy source:
RobotResponse(String contents,int status){
  this.contents=contents;
  this.status=status;
}

Fixed version (ground truth):
RobotResponse(int status){
  this.status=status;
}
Program: 99311
Project: 99311
Buggy source:
public WaybackRequest parse(HttpServletRequest httpRequest,AccessPoint wbContext) throws BadQueryException, BetterRequestException {
  WaybackRequest wbRequest=super.parse(httpRequest,wbContext);
  if (wbRequest != null) {
    String id=httpRequest.getHeader("String_Node_Str");
    if (id == null)     id=httpRequest.getRemoteAddr();
    if (wbRequest.isReplayRequest()) {
      String replayTimestamp=wbRequest.getReplayTimestamp();
      if (replayTimestamp != null) {
        BDBMap.addTimestampForId(httpRequest.getContextPath(),id,replayTimestamp);
      }
      throw new BetterRequestException(wbRequest.getRequestUrl());
    }
    String replayDateStr=BDBMap.getTimestampForId(httpRequest.getContextPath(),id);
    wbRequest.setReplayTimestamp(replayDateStr);
    wbRequest.setAnchorTimestamp(replayDateStr);
  }
  return wbRequest;
}

Fixed version (ground truth):
public WaybackRequest parse(HttpServletRequest httpRequest,AccessPoint wbContext) throws BadQueryException, BetterRequestException {
  WaybackRequest wbRequest=super.parse(httpRequest,wbContext);
  if (wbRequest != null) {
    String id=httpRequest.getHeader("String_Node_Str");
    if (id == null)     id=httpRequest.getRemoteAddr();
    if (wbRequest.isReplayRequest()) {
      String replayTimestamp=wbRequest.getReplayTimestamp();
      if (replayTimestamp != null) {
        BDBMap.addTimestampForId(httpRequest.getContextPath(),id,replayTimestamp);
        throw new BetterRequestException(wbRequest.getRequestUrl());
      }
    }
    String replayDateStr=BDBMap.getTimestampForId(httpRequest.getContextPath(),id);
    wbRequest.setReplayTimestamp(replayDateStr);
    wbRequest.setAnchorTimestamp(replayDateStr);
  }
  return wbRequest;
}
Program: 99312
Project: 99312
Buggy source:
/** 
 * Attempt to extract the hostname component of an absolute URL argument.
 * @param url the url String from which to extract the hostname
 * @return the hostname within the URL, or the url argument if the host cannot be found.
 */
public static String urlToHost(String url){
  String lcUrl=url.toLowerCase();
  if (lcUrl.startsWith("String_Node_Str")) {
    return lcUrl.substring(4);
  }
  for (  String scheme : ALL_SCHEMES) {
    if (lcUrl.startsWith(scheme)) {
      int authorityIdx=scheme.length();
      Matcher m=HOST_REGEX_SIMPLE.matcher(lcUrl.substring(authorityIdx));
      if (m.find()) {
        return m.group(1);
      }
    }
  }
  return url;
}

Fixed version (ground truth):
/** 
 * Attempt to extract the hostname component of an absolute URL argument.
 * @param url the url String from which to extract the hostname
 * @return the hostname within the URL, or the url argument if the host cannot be found.
 */
public static String urlToHost(String url){
  String lcUrl=url.toLowerCase();
  if (lcUrl.startsWith(DNS_SCHEME)) {
    return lcUrl.substring(DNS_SCHEME.length());
  }
  for (  String scheme : ALL_SCHEMES) {
    if (lcUrl.startsWith(scheme)) {
      int authorityIdx=scheme.length();
      Matcher m=HOST_REGEX_SIMPLE.matcher(lcUrl.substring(authorityIdx));
      if (m.find()) {
        return m.group(1);
      }
    }
  }
  return url;
}
Program: 99313
Project: 99313
Buggy source:
/** 
 * Extract userinfo from the absolute URL argument, that is, "username@", or "username:password@" if present.
 * @param url the URL from which to extract the userinfo
 * @return the userinfo found, not including the "@", or null if no userinfois found
 */
public static String urlToUserInfo(String url){
  String lcUrl=url.toLowerCase();
  if (lcUrl.startsWith("String_Node_Str")) {
    return null;
  }
  for (  String scheme : ALL_SCHEMES) {
    if (lcUrl.startsWith(scheme)) {
      int authorityIdx=scheme.length();
      Matcher m=USERINFO_REGEX_SIMPLE.matcher(lcUrl.substring(authorityIdx));
      if (m.find()) {
        return m.group(1);
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Extract userinfo from the absolute URL argument, that is, "username@", or "username:password@" if present.
 * @param url the URL from which to extract the userinfo
 * @return the userinfo found, not including the "@", or null if no userinfois found
 */
public static String urlToUserInfo(String url){
  String lcUrl=url.toLowerCase();
  if (lcUrl.startsWith(DNS_SCHEME)) {
    return null;
  }
  for (  String scheme : ALL_SCHEMES) {
    if (lcUrl.startsWith(scheme)) {
      int authorityIdx=scheme.length();
      Matcher m=USERINFO_REGEX_SIMPLE.matcher(lcUrl.substring(authorityIdx));
      if (m.find()) {
        return m.group(1);
      }
    }
  }
  return null;
}
Program: 99315
Project: 99315
Buggy source:
public void testStripDefaultPort(){
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void testStripDefaultPort(){
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
  assertSDP("String_Node_Str","String_Node_Str");
}
Program: 99316
Project: 99316
Buggy source:
public void testUrlToUserInfo(){
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals("String_Node_Str",UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals("String_Node_Str",UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals("String_Node_Str",UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals("String_Node_Str",UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals("String_Node_Str",UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals("String_Node_Str",UrlOperations.urlToHost("String_Node_Str"));
  assertEquals("String_Node_Str",UrlOperations.urlToHost("String_Node_Str"));
}

Fixed version (ground truth):
public void testUrlToUserInfo(){
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals(null,UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals("String_Node_Str",UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals("String_Node_Str",UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals("String_Node_Str",UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals("String_Node_Str",UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals("String_Node_Str",UrlOperations.urlToUserInfo("String_Node_Str"));
  assertEquals("String_Node_Str",UrlOperations.urlToHost("String_Node_Str"));
  assertEquals("String_Node_Str",UrlOperations.urlToHost("String_Node_Str"));
}
Program: 99317
Project: 99317
Buggy source:
public static String urlToHost(String url){
  if (url.startsWith("String_Node_Str")) {
    return url.substring(4);
  }
  for (  String scheme : ALL_SCHEMES) {
    if (url.startsWith(scheme)) {
      int hostIdx=scheme.length();
      Matcher m=AUTHORITY_REGEX_SIMPLE.matcher(url.substring(hostIdx));
      if (m.find()) {
        return m.group(0);
      }
    }
  }
  return url;
}

Fixed version (ground truth):
public static String urlToHost(String url){
  String lcUrl=url.toLowerCase();
  if (lcUrl.startsWith("String_Node_Str")) {
    return lcUrl.substring(4);
  }
  for (  String scheme : ALL_SCHEMES) {
    if (lcUrl.startsWith(scheme)) {
      int authorityIdx=scheme.length();
      Matcher m=HOST_REGEX_SIMPLE.matcher(lcUrl.substring(authorityIdx));
      if (m.find()) {
        return m.group(1);
      }
    }
  }
  return url;
}
Program: 99319
Project: 99319
Buggy source:
public StringPrefixIterator(Iterator<String> inner,String prefix){
  this.prefix=prefix;
  this.inner=inner;
}

Fixed version (ground truth):
public StringPrefixIterator(Iterator<String> inner,String prefix){
  this.prefix=prefix;
  this.inner=inner;
  if (inner instanceof ZiplinesChunkIterator) {
    truncated=((ZiplinesChunkIterator)inner).isTruncated();
  }
}
Program: 99320
Project: 99320
Buggy source:
/** 
 * @return a BufferedReader of the underlying compressed data in this block
 * @throws IOException for usual reasons
 */
public BufferedReader readBlock() throws IOException {
  URL u=new URL(urlOrPath);
  URLConnection uc=u.openConnection();
  StringBuilder sb=new StringBuilder(16);
  sb.append(BYTES_HEADER).append(offset).append(BYTES_MINUS);
  sb.append((offset + BLOCK_SIZE) - 1);
  uc.setRequestProperty(RANGE_HEADER,sb.toString());
  return new BufferedReader(new InputStreamReader(new GZIPInputStream(uc.getInputStream())));
}

Fixed version (ground truth):
/** 
 * @return a BufferedReader of the underlying compressed data in this block
 * @throws IOException for usual reasons
 */
public BufferedReader readBlock() throws IOException {
  StringBuilder sb=new StringBuilder(16);
  sb.append(BYTES_HEADER).append(offset).append(BYTES_MINUS);
  sb.append((offset + BLOCK_SIZE) - 1);
  LOGGER.trace("String_Node_Str" + urlOrPath + "String_Node_Str"+ sb.toString()+ "String_Node_Str");
  URL u=new URL(urlOrPath);
  URLConnection uc=u.openConnection();
  uc.setRequestProperty(RANGE_HEADER,sb.toString());
  return new BufferedReader(new InputStreamReader(new GZIPInputStream(uc.getInputStream())));
}
Program: 99321
Project: 99321
Buggy source:
/** 
 * @param blocks which should be fetched and unzipped, one after another
 */
public ZiplinesChunkIterator(List<ZiplinedBlock> blocks){
  blockItr=blocks.iterator();
}

Fixed version (ground truth):
/** 
 * @param blocks which should be fetched and unzipped, one after another
 */
public ZiplinesChunkIterator(List<ZiplinedBlock> blocks){
  LOGGER.info("String_Node_Str" + blocks.size() + "String_Node_Str");
  blockItr=blocks.iterator();
}
Program: 99322
Project: 99322
Buggy source:
public Iterator<String> getStringPrefixIterator(String prefix) throws ResourceIndexNotAvailableException, IOException {
  CloseableIterator<String> itr=chunkIndex.getRecordIteratorLT(prefix);
  ArrayList<ZiplinedBlock> blocks=new ArrayList<ZiplinedBlock>();
  boolean first=true;
  while (itr.hasNext()) {
    String blockDescriptor=itr.next();
    String parts[]=blockDescriptor.split("String_Node_Str");
    if (parts.length != 3) {
      throw new ResourceIndexNotAvailableException("String_Node_Str" + blockDescriptor + "String_Node_Str");
    }
    String prefCmp=prefix;
    String blockCmp=parts[0];
    if (first) {
      first=false;
    }
 else     if (!blockCmp.startsWith(prefCmp)) {
      break;
    }
    String url=chunkMap.get(parts[1]);
    long offset=Long.parseLong(parts[2]);
    blocks.add(new ZiplinedBlock(url,offset));
  }
  itr.close();
  return new StringPrefixIterator(new ZiplinesChunkIterator(blocks),prefix);
}

Fixed version (ground truth):
public Iterator<String> getStringPrefixIterator(String prefix) throws ResourceIndexNotAvailableException, IOException {
  ArrayList<ZiplinedBlock> blocks=new ArrayList<ZiplinedBlock>();
  boolean first=true;
  int numBlocks=0;
  boolean truncated=false;
  CloseableIterator<String> itr=null;
  try {
    itr=chunkIndex.getRecordIteratorLT(prefix);
    while (itr.hasNext()) {
      if (numBlocks >= maxBlocks) {
        truncated=true;
        break;
      }
      String blockDescriptor=itr.next();
      numBlocks++;
      String parts[]=blockDescriptor.split("String_Node_Str");
      if (parts.length != 3) {
        throw new ResourceIndexNotAvailableException("String_Node_Str" + blockDescriptor + "String_Node_Str");
      }
      String prefCmp=prefix;
      String blockCmp=parts[0];
      if (first) {
        first=false;
      }
 else       if (!blockCmp.startsWith(prefCmp)) {
        break;
      }
      String url=chunkMap.get(parts[1]);
      long offset=Long.parseLong(parts[2]);
      blocks.add(new ZiplinedBlock(url,offset));
    }
  }
  finally {
    if (itr != null) {
      itr.close();
    }
  }
  ZiplinesChunkIterator zci=new ZiplinesChunkIterator(blocks);
  zci.setTruncated(truncated);
  return new StringPrefixIterator(zci,prefix);
}
Program: 99324
Project: 99324
Buggy source:
/** 
 * @param context
 * @return singleton BDBMap for the context
 */
public static BDBMap getContextMap(String context){
  if (context == null)   context="String_Node_Str";
  if (context.startsWith("String_Node_Str")) {
    context=context.substring(1);
  }
  BDBMap map=null;
synchronized (Timestamp.class) {
    if (!bdbMaps.containsKey(context)) {
      bdbMaps.put(context,new BDBMap(context,BDB_DIR));
    }
    map=(BDBMap)bdbMaps.get(context);
  }
  return map;
}

Fixed version (ground truth):
/** 
 * @param context
 * @return singleton BDBMap for the context
 */
public static BDBMap getContextMap(String context){
  if (context == null)   context="String_Node_Str";
  if (context.startsWith("String_Node_Str")) {
    context=context.substring(1);
  }
  BDBMap map=null;
synchronized (Timestamp.class) {
    if (!bdbMaps.containsKey(context)) {
      File bdbDir=new File(BDB_DIR,context);
      bdbMaps.put(context,new BDBMap(context,bdbDir.getAbsolutePath()));
    }
    map=(BDBMap)bdbMaps.get(context);
  }
  return map;
}
Program: 99325
Project: 99325
Buggy source:
/** 
 * add BASE tag and javascript to a page that will rewrite embedded URLs  to point back into the WM
 * @param page
 * @param result
 * @param uriConverter
 */
private void markUpPage(StringBuffer page,SearchResult result,ReplayResultURIConverter uriConverter){
  insertBaseTag(page,result);
  insertJavascript(page,result,uriConverter);
}

Fixed version (ground truth):
/** 
 * add BASE tag and javascript to a page that will rewrite embedded URLs  to point back into the WM, also attempt to fix up URL attributes in some tags that must be correct at page load (FRAME, META, LINK, SCRIPT)
 * @param page
 * @param result
 * @param uriConverter
 */
private void markUpPage(StringBuffer page,SearchResult result,ReplayResultURIConverter uriConverter){
  String wmPrefix=uriConverter.getReplayUriPrefix();
  String pageUrl=result.get(WaybackConstants.RESULT_URL);
  String pageTS=result.get(WaybackConstants.RESULT_CAPTURE_DATE);
  TagMagix.markupTagRE(page,wmPrefix,pageUrl,pageTS,"String_Node_Str","String_Node_Str");
  TagMagix.markupTagRE(page,wmPrefix,pageUrl,pageTS,"String_Node_Str","String_Node_Str");
  TagMagix.markupTagRE(page,wmPrefix,pageUrl,pageTS,"String_Node_Str","String_Node_Str");
  TagMagix.markupTagRE(page,wmPrefix,pageUrl,pageTS,"String_Node_Str","String_Node_Str");
  insertBaseTag(page,result);
  insertJavascript(page,result,uriConverter);
}
Program: 99326
Project: 99326
Buggy source:
public void renderResource(HttpServletRequest httpRequest,HttpServletResponse httpResponse,WaybackRequest wbRequest,SearchResult result,Resource resource,ReplayResultURIConverter uriConverter) throws ServletException, IOException {
  if (resource == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (result == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (!wbRequest.get(WaybackConstants.REQUEST_EXACT_DATE).equals(result.get(WaybackConstants.RESULT_CAPTURE_DATE))) {
    String betterURI=uriConverter.makeReplayURI(result);
    redirectToBetterUrl(httpResponse,betterURI);
  }
 else {
    if (isRawReplayResult(result)) {
      super.renderResource(httpRequest,httpResponse,wbRequest,result,resource,uriConverter);
    }
 else {
      resource.parseHeaders();
      copyRecordHttpHeader(httpResponse,resource,uriConverter,result,false);
      byte[] bbuffer=new byte[4 * 1024];
      StringBuffer sbuffer=new StringBuffer();
      for (int r=-1; (r=resource.read(bbuffer,0,bbuffer.length)) != -1; ) {
        String chunk=new String(bbuffer);
        sbuffer.append(chunk.substring(0,r));
      }
      markUpPage(sbuffer,result,uriConverter);
      httpResponse.setHeader("String_Node_Str","String_Node_Str" + sbuffer.length());
      ServletOutputStream out=httpResponse.getOutputStream();
      out.print(new String(sbuffer));
    }
  }
}

Fixed version (ground truth):
public void renderResource(HttpServletRequest httpRequest,HttpServletResponse httpResponse,WaybackRequest wbRequest,SearchResult result,Resource resource,ReplayResultURIConverter uriConverter) throws ServletException, IOException {
  if (resource == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (result == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (!wbRequest.get(WaybackConstants.REQUEST_EXACT_DATE).equals(result.get(WaybackConstants.RESULT_CAPTURE_DATE))) {
    String betterURI=uriConverter.makeReplayURI(result);
    redirectToBetterUrl(httpResponse,betterURI);
  }
 else {
    if (isRawReplayResult(result)) {
      super.renderResource(httpRequest,httpResponse,wbRequest,result,resource,uriConverter);
    }
 else {
      resource.parseHeaders();
      copyRecordHttpHeader(httpResponse,resource,uriConverter,result,false);
      byte[] bbuffer=new byte[4 * 1024];
      StringBuffer sbuffer=new StringBuffer();
      for (int r=-1; (r=resource.read(bbuffer,0,bbuffer.length)) != -1; ) {
        sbuffer.append(new String(bbuffer,0,r));
      }
      markUpPage(sbuffer,result,uriConverter);
      httpResponse.setHeader("String_Node_Str","String_Node_Str" + sbuffer.length());
      ServletOutputStream out=httpResponse.getOutputStream();
      out.print(new String(sbuffer));
    }
  }
}
Program: 99327
Project: 99327
Buggy source:
/** 
 * Constructor -- chew search result summaries into format easier for JSPs to digest.
 * @param httpRequest 
 * @param wbRequest 
 * @param results
 * @param uriConverter 
 * @throws ParseException 
 */
public UIQueryResults(HttpServletRequest httpRequest,WaybackRequest wbRequest,SearchResults results,ReplayResultURIConverter uriConverter) throws ParseException {
  this.searchUrl=wbRequest.get(WaybackConstants.RESULT_URL);
  this.startTimestamp=Timestamp.parseBefore(results.getFilter(WaybackConstants.REQUEST_START_DATE));
  this.endTimestamp=Timestamp.parseBefore(results.getFilter(WaybackConstants.REQUEST_END_DATE));
  this.firstResultTimestamp=Timestamp.parseBefore(results.getFirstResultDate());
  this.lastResultTimestamp=Timestamp.parseBefore(results.getLastResultDate());
  this.resultsReturned=Integer.parseInt(results.getFilter(WaybackConstants.RESULTS_NUM_RETURNED));
  this.resultsMatching=Integer.parseInt(results.getFilter(WaybackConstants.RESULTS_NUM_RESULTS));
  this.resultsPerPage=Integer.parseInt(results.getFilter(WaybackConstants.RESULTS_REQUESTED));
  this.firstResult=Integer.parseInt(results.getFilter(WaybackConstants.RESULTS_FIRST_RETURNED));
  this.lastResult=(firstResult + resultsReturned);
  numPages=Math.round((int)Math.ceil(resultsMatching / resultsPerPage)) + 1;
  curPage=Math.round((int)Math.floor(firstResult / resultsPerPage)) + 1;
  this.results=results;
  this.uriConverter=uriConverter;
  this.wbRequest=wbRequest;
  this.httpRequest=httpRequest;
}

Fixed version (ground truth):
/** 
 * Constructor -- chew search result summaries into format easier for JSPs to digest.
 * @param httpRequest 
 * @param wbRequest 
 * @param results
 * @param uriConverter 
 * @throws ParseException 
 */
public UIQueryResults(HttpServletRequest httpRequest,WaybackRequest wbRequest,SearchResults results,ReplayResultURIConverter uriConverter) throws ParseException {
  this.searchUrl=wbRequest.get(WaybackConstants.RESULT_URL);
  this.startTimestamp=Timestamp.parseBefore(results.getFilter(WaybackConstants.REQUEST_START_DATE));
  this.endTimestamp=Timestamp.parseBefore(results.getFilter(WaybackConstants.REQUEST_END_DATE));
  this.firstResultTimestamp=Timestamp.parseBefore(results.getFirstResultDate());
  this.lastResultTimestamp=Timestamp.parseBefore(results.getLastResultDate());
  this.resultsReturned=Integer.parseInt(results.getFilter(WaybackConstants.RESULTS_NUM_RETURNED));
  this.resultsMatching=Integer.parseInt(results.getFilter(WaybackConstants.RESULTS_NUM_RESULTS));
  this.resultsPerPage=Integer.parseInt(results.getFilter(WaybackConstants.RESULTS_REQUESTED));
  this.firstResult=Integer.parseInt(results.getFilter(WaybackConstants.RESULTS_FIRST_RETURNED)) + 1;
  this.lastResult=((firstResult - 1) + resultsReturned);
  numPages=Math.round((int)Math.ceil(resultsMatching / resultsPerPage));
  curPage=Math.round((int)Math.floor((firstResult - 1) / resultsPerPage)) + 1;
  this.results=results;
  this.uriConverter=uriConverter;
  this.wbRequest=wbRequest;
  this.httpRequest=httpRequest;
}
Program: 99328
Project: 99328
Buggy source:
/** 
 * The pre-defined Stormpath access control settings are defined here.
 * @param http the  {@link HttpSecurity} to be modified
 * @throws Exception if an error occurs
 */
@Override public void init(HttpSecurity http) throws Exception {
  ApplicationContext context=http.getSharedObject(ApplicationContext.class);
  context.getAutowireCapableBeanFactory().autowireBean(this);
  if (stormpathEnabled && stormpathSpringSecurityAutoload) {
    stormpathSecurityConfigurerAdapter.init(http);
  }
}

Fixed version (ground truth):
/** 
 * The pre-defined Stormpath access control settings are defined here.
 * @param http the  {@link HttpSecurity} to be modified
 * @throws Exception if an error occurs
 */
@Override public void init(HttpSecurity http) throws Exception {
  ApplicationContext context=http.getSharedObject(ApplicationContext.class);
  context.getAutowireCapableBeanFactory().autowireBean(this);
  if (stormpathEnabled && (stormpathSpringSecurityAutoload || manuallyConfigured)) {
    stormpathSecurityConfigurerAdapter.init(http);
  }
}
Program: 99329
Project: 99329
Buggy source:
/** 
 * Extend WebSecurityConfigurerAdapter and configure the   {@code HttpSecurity} object usingthe  {@link com.stormpath.spring.config.StormpathWebSecurityConfigurer#stormpath stormpath()} utility method.For example: <pre> import static com.stormpath.spring.config.StormpathWebSecurityConfigurer.stormpath;
 * @Configuration public class SecurityConfig extends WebSecurityConfigurerAdapter {
 * @Override public void configure(HttpSecurity http) throws Exception { http .apply(stormpath()) //other http config here } } </pre>
 * @return the StormpathWebSecurityConfigurer object
 */
public static AbstractHttpConfigurer<?,HttpSecurity> stormpath(){
  return new StormpathWebSecurityConfigurer();
}

Fixed version (ground truth):
/** 
 * Extend WebSecurityConfigurerAdapter and configure the   {@code HttpSecurity} object usingthe  {@link com.stormpath.spring.config.StormpathWebSecurityConfigurer#stormpath stormpath()} utility method.For example: <pre> import static com.stormpath.spring.config.StormpathWebSecurityConfigurer.stormpath;
 * @Configuration public class SecurityConfig extends WebSecurityConfigurerAdapter {
 * @Override public void configure(HttpSecurity http) throws Exception { http .apply(stormpath()) //other http config here } } </pre>
 * @return the StormpathWebSecurityConfigurer object
 */
public static AbstractHttpConfigurer<?,HttpSecurity> stormpath(){
  return new StormpathWebSecurityConfigurer(true);
}
Program: 99330
Project: 99330
Buggy source:
public AuthenticationProvider stormpathAuthenticationProvider(){
  StormpathAuthenticationProvider provider;
  if (oktaEnabled) {
    provider=new OktaAuthenticationProvider(application);
  }
 else {
    provider=new StormpathAuthenticationProvider(application);
  }
  provider.setGroupGrantedAuthorityResolver(stormpathGroupGrantedAuthorityResolver());
  provider.setGroupPermissionResolver(stormpathGroupPermissionResolver());
  provider.setAccountGrantedAuthorityResolver(stormpathAccountGrantedAuthorityResolver());
  provider.setAccountPermissionResolver(stormpathAccountPermissionResolver());
  provider.setAuthenticationTokenFactory(stormpathAuthenticationTokenFactory());
  return provider;
}

Fixed version (ground truth):
public AuthenticationProvider stormpathAuthenticationProvider(){
  StormpathAuthenticationProvider provider;
  if (oktaEnabled) {
    provider=new OktaAuthenticationProvider(application,client);
  }
 else {
    provider=new StormpathAuthenticationProvider(application);
  }
  provider.setGroupGrantedAuthorityResolver(stormpathGroupGrantedAuthorityResolver());
  provider.setGroupPermissionResolver(stormpathGroupPermissionResolver());
  provider.setAccountGrantedAuthorityResolver(stormpathAccountGrantedAuthorityResolver());
  provider.setAccountPermissionResolver(stormpathAccountPermissionResolver());
  provider.setAuthenticationTokenFactory(stormpathAuthenticationTokenFactory());
  return provider;
}
Program: 99331
Project: 99331
Buggy source:
public OktaAuthenticationProvider(Application application){
  super(application);
  this.application=application;
}

Fixed version (ground truth):
public OktaAuthenticationProvider(Application application,Client client){
  super(application);
  this.application=application;
  this.client=client;
}
Program: 99332
Project: 99332
Buggy source:
@Override public Authentication authenticate(Authentication authentication) throws AuthenticationException {
  Account account;
  Authentication returnToken=null;
  try {
    if (authentication instanceof ProviderAuthenticationToken) {
      returnToken=authentication;
    }
 else     if (authentication instanceof JwtProviderAuthenticationToken) {
      return authentication;
    }
 else {
      AuthenticationRequest request=createAuthenticationRequest(authentication);
      try {
        AccessTokenResult result=(AccessTokenResult)application.authenticateAccount(request);
        account=result.getAccount();
        User userDetails=new User(account.getHref(),"String_Node_Str",getGrantedAuthorities(account));
        returnToken=new JwtProviderAuthenticationToken(userDetails,result.getTokenResponse().getAccessToken(),result.getTokenResponse().getRefreshToken(),result);
      }
  finally {
        request.clear();
      }
    }
  }
 catch (  ResourceException e) {
    String msg=Strings.clean(e.getMessage());
    if (msg == null) {
      msg=Strings.clean(e.getDeveloperMessage());
    }
    if (msg == null) {
      msg="String_Node_Str";
    }
    throw new AuthenticationServiceException(msg,e);
  }
  return returnToken;
}

Fixed version (ground truth):
@Override public Authentication authenticate(Authentication authentication) throws AuthenticationException {
  Account account;
  Authentication returnToken=null;
  try {
    if (authentication instanceof ProviderAuthenticationToken) {
      returnToken=authentication;
    }
 else     if (authentication instanceof JwtProviderAuthenticationToken) {
      OktaAuthNAuthenticator authNAuthenticator=client.instantiate(OktaAuthNAuthenticator.class);
      authNAuthenticator.assertValidAccessToken(((JwtProviderAuthenticationToken)authentication).getAccessToken());
      return authentication;
    }
 else {
      AuthenticationRequest request=createAuthenticationRequest(authentication);
      try {
        AccessTokenResult result=(AccessTokenResult)application.authenticateAccount(request);
        account=result.getAccount();
        User userDetails=new User(account.getHref(),"String_Node_Str",getGrantedAuthorities(account));
        returnToken=new JwtProviderAuthenticationToken(userDetails,result.getTokenResponse().getAccessToken(),result.getTokenResponse().getRefreshToken(),result);
      }
  finally {
        request.clear();
      }
    }
  }
 catch (  ResourceException e) {
    String msg=Strings.clean(e.getMessage());
    if (msg == null) {
      msg=Strings.clean(e.getDeveloperMessage());
    }
    if (msg == null) {
      msg="String_Node_Str";
    }
    throw new AuthenticationServiceException(msg,e);
  }
  return returnToken;
}
Program: 99333
Project: 99333
Buggy source:
@Override public AuthenticationResult authenticateAccount(AuthenticationRequest request) throws ResourceException {
  return new OktaAuthNAuthenticator(getDataStore()).authenticate((DefaultUsernamePasswordRequest)request);
}

Fixed version (ground truth):
@Override public AuthenticationResult authenticateAccount(AuthenticationRequest request) throws ResourceException {
  return new DefaultOktaAuthNAuthenticator(getDataStore()).authenticate((DefaultUsernamePasswordRequest)request);
}
Program: 99334
Project: 99334
Buggy source:
@Override public IdSiteAuthenticator forApplication(Application application){
  if (application instanceof OAuthApplication) {
    return ((OAuthApplication)application).createIdSiteAuthenticator();
  }
  try {
    Method dataStoreMethod=AbstractResource.class.getDeclaredMethod("String_Node_Str");
    dataStoreMethod.setAccessible(true);
    InternalDataStore internalDataStore=(InternalDataStore)dataStoreMethod.invoke(application);
    return new DefaultIdSiteAuthenticator(application,internalDataStore);
  }
 catch (  NoSuchMethodException e) {
    throw new UnsupportedOperationException("String_Node_Str",e);
  }
catch (  IllegalAccessException e) {
    throw new UnsupportedOperationException("String_Node_Str",e);
  }
catch (  InvocationTargetException e) {
    throw new UnsupportedOperationException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public IdSiteAuthenticator forApplication(Application application){
  return ((OAuthApplication)application).createIdSiteAuthenticator();
}