nus-yam/ex-repair huggingface dataset:
Program: 93645
Project: 93645
Buggy source:
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  DBObject content=context.getContent();
  if (content == null)   content=new BasicDBObject();
  if (content instanceof BasicDBList) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str");
    return;
  }
  String id=context.getDocumentId();
  if (content.get("String_Node_Str") == null) {
    content.put("String_Node_Str",getId(id));
  }
 else   if (!content.get("String_Node_Str").equals(id)) {
    ResponseHelper.endExchange(exchange,HttpStatus.SC_NOT_ACCEPTABLE);
    logger.warn("String_Node_Str");
    return;
  }
  ObjectId etag=RequestHelper.getUpdateEtag(exchange);
  int SC=DocumentDAO.upsertDocument(context.getDBName(),context.getCollectionName(),context.getDocumentId(),content,etag,false);
  if (context.getWarnings() != null && !context.getWarnings().isEmpty()) {
    DocumentRepresentationFactory.sendDocument(exchange.getRequestPath(),exchange,context,new BasicDBObject());
  }
  ResponseHelper.endExchange(exchange,SC);
}

Fixed version (ground truth):
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  DBObject content=context.getContent();
  if (content == null)   content=new BasicDBObject();
  if (content instanceof BasicDBList) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str");
    return;
  }
  String id=context.getDocumentId();
  if (content.get("String_Node_Str") == null) {
    content.put("String_Node_Str",getId(id));
  }
 else   if (!content.get("String_Node_Str").equals(id)) {
    ResponseHelper.endExchange(exchange,HttpStatus.SC_NOT_ACCEPTABLE);
    logger.warn("String_Node_Str");
    return;
  }
  ObjectId etag=RequestHelper.getUpdateEtag(exchange);
  int SC=DocumentDAO.upsertDocument(context.getDBName(),context.getCollectionName(),context.getDocumentId(),content,etag,false);
  exchange.setResponseCode(SC);
  if (context.getWarnings() != null && !context.getWarnings().isEmpty()) {
    DocumentRepresentationFactory.sendDocument(exchange.getRequestPath(),exchange,context,new BasicDBObject());
  }
  exchange.endExchange();
}
Program: 93646
Project: 93646
Buggy source:
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  String db=context.getDBName();
  String co=context.getCollectionName();
  String id=context.getIndexId();
  if (id.startsWith("String_Node_Str") || id.equals("String_Node_Str")) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_UNAUTHORIZED,id + "String_Node_Str");
    return;
  }
  IndexDAO.deleteIndex(db,co,id);
  if (context.getWarnings() != null && !context.getWarnings().isEmpty()) {
    DocumentRepresentationFactory.sendDocument(exchange.getRequestPath(),exchange,context,new BasicDBObject());
  }
  ResponseHelper.endExchange(exchange,HttpStatus.SC_GONE);
}

Fixed version (ground truth):
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  String db=context.getDBName();
  String co=context.getCollectionName();
  String id=context.getIndexId();
  if (id.startsWith("String_Node_Str") || id.equals("String_Node_Str")) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_UNAUTHORIZED,id + "String_Node_Str");
    return;
  }
  int SC=IndexDAO.deleteIndex(db,co,id);
  exchange.setResponseCode(SC);
  if (context.getWarnings() != null && !context.getWarnings().isEmpty()) {
    DocumentRepresentationFactory.sendDocument(exchange.getRequestPath(),exchange,context,new BasicDBObject());
  }
  exchange.endExchange();
}
Program: 93647
Project: 93647
Buggy source:
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  String db=context.getDBName();
  String co=context.getCollectionName();
  String id=context.getIndexId();
  if (id.startsWith("String_Node_Str")) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str");
    return;
  }
  DBObject content=context.getContent();
  DBObject keys=(DBObject)content.get("String_Node_Str");
  DBObject ops=(DBObject)content.get("String_Node_Str");
  if (keys == null) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str",null);
    return;
  }
  if (ops == null) {
    ops=new BasicDBObject();
  }
  ops.put("String_Node_Str",id);
  try {
    IndexDAO.createIndex(db,co,keys,ops);
  }
 catch (  Throwable t) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str",t);
  }
  if (context.getWarnings() != null && !context.getWarnings().isEmpty()) {
    DocumentRepresentationFactory.sendDocument(exchange.getRequestPath(),exchange,context,new BasicDBObject());
  }
  ResponseHelper.endExchange(exchange,HttpStatus.SC_CREATED);
}

Fixed version (ground truth):
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  String db=context.getDBName();
  String co=context.getCollectionName();
  String id=context.getIndexId();
  if (id.startsWith("String_Node_Str")) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str");
    return;
  }
  DBObject content=context.getContent();
  DBObject keys=(DBObject)content.get("String_Node_Str");
  DBObject ops=(DBObject)content.get("String_Node_Str");
  if (keys == null) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str",null);
    return;
  }
  if (ops == null) {
    ops=new BasicDBObject();
  }
  ops.put("String_Node_Str",id);
  try {
    IndexDAO.createIndex(db,co,keys,ops);
  }
 catch (  Throwable t) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str",t);
    return;
  }
  exchange.setResponseCode(HttpStatus.SC_CREATED);
  if (context.getWarnings() != null && !context.getWarnings().isEmpty()) {
    DocumentRepresentationFactory.sendDocument(exchange.getRequestPath(),exchange,context,new BasicDBObject());
  }
  exchange.endExchange();
}
Program: 93649
Project: 93649
Buggy source:
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  if (context.getMethod() == RequestContext.METHOD.GET || context.getMethod() == RequestContext.METHOD.DELETE) {
    next.handleRequest(exchange,context);
    return;
  }
  HeaderValues contentTypes=exchange.getRequestHeaders().get(Headers.CONTENT_TYPE);
  if (contentTypes == null || contentTypes.isEmpty() || !(contentTypes.contains(Representation.HAL_JSON_MEDIA_TYPE) || contentTypes.contains(JSON_MEDIA_TYPE))) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE,"String_Node_Str" + Representation.HAL_JSON_MEDIA_TYPE + "String_Node_Str"+ JSON_MEDIA_TYPE);
    return;
  }
  String _content=ChannelReader.read(exchange.getRequestChannel());
  DBObject content;
  try {
    content=(DBObject)JSON.parse(_content);
  }
 catch (  JSONParseException ex) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str",ex);
    return;
  }
  HashSet<String> keysToRemove=new HashSet<>();
  content.keySet().stream().filter((key) -> (key.startsWith("String_Node_Str"))).forEach((key) -> {
    keysToRemove.add(key);
  }
);
  keysToRemove.stream().map((keyToRemove) -> {
    content.removeField(keyToRemove);
    return keyToRemove;
  }
).forEach((keyToRemove) -> {
    context.addWarning("String_Node_Str" + keyToRemove + "String_Node_Str");
  }
);
  context.setContent(content);
  next.handleRequest(exchange,context);
}

Fixed version (ground truth):
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  if (context.getMethod() == RequestContext.METHOD.GET || context.getMethod() == RequestContext.METHOD.DELETE) {
    next.handleRequest(exchange,context);
    return;
  }
  HeaderValues contentTypes=exchange.getRequestHeaders().get(Headers.CONTENT_TYPE);
  if (contentTypes == null || contentTypes.isEmpty() || contentTypes.stream().noneMatch(ct -> ct.startsWith(Representation.HAL_JSON_MEDIA_TYPE) || ct.startsWith(JSON_MEDIA_TYPE))) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE,"String_Node_Str" + Representation.HAL_JSON_MEDIA_TYPE + "String_Node_Str"+ JSON_MEDIA_TYPE);
    return;
  }
  String _content=ChannelReader.read(exchange.getRequestChannel());
  DBObject content;
  try {
    content=(DBObject)JSON.parse(_content);
  }
 catch (  JSONParseException ex) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str",ex);
    return;
  }
  HashSet<String> keysToRemove=new HashSet<>();
  content.keySet().stream().filter((key) -> (key.startsWith("String_Node_Str"))).forEach((key) -> {
    keysToRemove.add(key);
  }
);
  keysToRemove.stream().map((keyToRemove) -> {
    content.removeField(keyToRemove);
    return keyToRemove;
  }
).forEach((keyToRemove) -> {
    context.addWarning("String_Node_Str" + keyToRemove + "String_Node_Str");
  }
);
  context.setContent(content);
  next.handleRequest(exchange,context);
}
Program: 93650
Project: 93650
Buggy source:
/** 
 * @param dbName
 * @return the db props
 */
public static DBObject getDbProps(String dbName){
  DBCollection propscoll=CollectionDAO.getCollection(dbName,"String_Node_Str");
  DBObject row=propscoll.findOne(METADATA_QUERY);
  if (row != null) {
    row.removeField("String_Node_Str");
    Object etag=row.get("String_Node_Str");
    if (etag != null && ObjectId.isValid("String_Node_Str" + etag)) {
      ObjectId oid=new ObjectId("String_Node_Str" + etag);
      row.put("String_Node_Str",Instant.ofEpochSecond(oid.getTimestamp()).toString());
    }
  }
  return row;
}

Fixed version (ground truth):
/** 
 * @param dbName
 * @return the db props
 */
public static DBObject getDbProps(String dbName){
  if (!DBDAO.doesDbExists(dbName))   return null;
  DBCollection propscoll=CollectionDAO.getCollection(dbName,"String_Node_Str");
  DBObject row=propscoll.findOne(METADATA_QUERY);
  if (row != null) {
    row.removeField("String_Node_Str");
    Object etag=row.get("String_Node_Str");
    if (etag != null && ObjectId.isValid("String_Node_Str" + etag)) {
      ObjectId oid=new ObjectId("String_Node_Str" + etag);
      row.put("String_Node_Str",Instant.ofEpochSecond(oid.getTimestamp()).toString());
    }
  }
  return row;
}
Program: 93651
Project: 93651
Buggy source:
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  List<String> colls=DBDAO.getDbCollections(DBDAO.getDB(context.getDBName()));
  List<DBObject> data;
  data=DBDAO.getData(context.getDBName(),colls,context.getPage(),context.getPagesize());
  exchange.setResponseCode(HttpStatus.SC_OK);
  DBRepresentationFactory.sendHal(exchange,context,data,colls.size());
  exchange.endExchange();
}

Fixed version (ground truth):
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  List<String> colls=DBDAO.getDbCollections(DBDAO.getDB(context.getDBName()));
  List<DBObject> data=DBDAO.getData(context.getDBName(),colls,context.getPage(),context.getPagesize());
  exchange.setResponseCode(HttpStatus.SC_OK);
  DBRepresentationFactory.sendHal(exchange,context,data,colls.size());
  exchange.endExchange();
}
Program: 93656
Project: 93656
Buggy source:
@Override public void handleRequest(HttpServerExchange exchange) throws Exception {
  try {
    next.handleRequest(exchange);
  }
 catch (  CommandFailureException cfe) {
    logger.error("String_Node_Str",cfe);
    Object errmsg=cfe.getCommandResult().get("String_Node_Str");
    if ("String_Node_Str".equals(errmsg))     ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_INTERNAL_SERVER_ERROR,"String_Node_Str",cfe);
 else     ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_INTERNAL_SERVER_ERROR,"String_Node_Str",cfe);
  }
catch (  Throwable t) {
    logger.error("String_Node_Str",t);
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_INTERNAL_SERVER_ERROR,"String_Node_Str",t);
  }
}

Fixed version (ground truth):
@Override public void handleRequest(HttpServerExchange exchange) throws Exception {
  try {
    next.handleRequest(exchange);
  }
 catch (  CommandFailureException cfe) {
    logger.error("String_Node_Str",cfe);
    Object errmsg=cfe.getCommandResult().get("String_Node_Str");
    if (errmsg != null && errmsg instanceof String && ("String_Node_Str".equals(errmsg) || ((String)errmsg).contains("String_Node_Str")))     ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_INTERNAL_SERVER_ERROR,"String_Node_Str",cfe);
 else     ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_INTERNAL_SERVER_ERROR,"String_Node_Str",cfe);
  }
catch (  Throwable t) {
    logger.error("String_Node_Str",t);
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_INTERNAL_SERVER_ERROR,"String_Node_Str",t);
  }
}
Program: 93657
Project: 93657
Buggy source:
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  if (context.getDBName() != null && context.getCollectionName() != null) {
    DBObject collProps=null;
    if (!cacheEnabled) {
      collProps=CollectionDAO.getCollectionProps(context.getDBName(),context.getCollectionName());
      if (collProps != null)       collProps.put("String_Node_Str",false);
    }
 else {
      LoadingCache<String,Optional<DBObject>> collectionPropsCache=LocalCachesSingleton.getInstance().getCollectionCache();
      Optional<DBObject> _collMetadata=collectionPropsCache.getIfPresent(context.getDBName() + SEPARATOR + context.getCollectionName());
      if (_collMetadata != null) {
        if (_collMetadata.isPresent()) {
          collProps=_collMetadata.get();
          collProps.put("String_Node_Str",true);
        }
 else         collProps=null;
      }
 else {
        _collMetadata=collectionPropsCache.get(context.getDBName() + SEPARATOR + context.getCollectionName());
        if (_collMetadata.isPresent()) {
          collProps=_collMetadata.get();
          collProps.put("String_Node_Str",false);
        }
 else         collProps=null;
      }
    }
    context.setCollectionProps(collProps);
  }
  next.handleRequest(exchange,context);
}

Fixed version (ground truth):
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  if (context.getDBName() != null && context.getCollectionName() != null) {
    DBObject collProps=null;
    if (!cacheEnabled) {
      collProps=CollectionDAO.getCollectionProps(context.getDBName(),context.getCollectionName());
      if (collProps != null)       collProps.put("String_Node_Str",false);
    }
 else {
      LoadingCache<String,Optional<DBObject>> collectionPropsCache=LocalCachesSingleton.getInstance().getCollectionCache();
      Optional<DBObject> _collMetadata=collectionPropsCache.getIfPresent(context.getDBName() + SEPARATOR + context.getCollectionName());
      if (_collMetadata != null) {
        if (_collMetadata.isPresent()) {
          collProps=_collMetadata.get();
          collProps.put("String_Node_Str",true);
        }
 else         collProps=null;
      }
 else {
        try {
          _collMetadata=collectionPropsCache.getUnchecked(context.getDBName() + SEPARATOR + context.getCollectionName());
        }
 catch (        UncheckedExecutionException uex) {
          if (uex.getCause() instanceof MongoException) {
            throw (MongoException)uex.getCause();
          }
 else {
            throw uex;
          }
        }
        if (_collMetadata.isPresent()) {
          collProps=_collMetadata.get();
          collProps.put("String_Node_Str",false);
        }
 else         collProps=null;
      }
    }
    context.setCollectionProps(collProps);
  }
  next.handleRequest(exchange,context);
}
Program: 93658
Project: 93658
Buggy source:
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  if (context.getDBName() != null) {
    DBObject dbProps=null;
    if (!cacheEnabled) {
      dbProps=DBDAO.getDbProps(context.getDBName());
      if (dbProps != null)       dbProps.put("String_Node_Str",false);
    }
 else {
      LoadingCache<String,Optional<DBObject>> dbPropsCache=LocalCachesSingleton.getInstance().getDbCache();
      Optional<DBObject> _dbMetadata=dbPropsCache.getIfPresent(context.getDBName());
      if (_dbMetadata != null) {
        if (_dbMetadata.isPresent()) {
          dbProps=_dbMetadata.get();
          dbProps.put("String_Node_Str",true);
        }
 else         dbProps=null;
      }
 else {
        _dbMetadata=dbPropsCache.get(context.getDBName());
        if (_dbMetadata.isPresent()) {
          dbProps=_dbMetadata.get();
          dbProps.put("String_Node_Str",false);
        }
 else         dbProps=null;
      }
    }
    context.setDbProps(dbProps);
  }
  next.handleRequest(exchange,context);
}

Fixed version (ground truth):
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  if (context.getDBName() != null) {
    DBObject dbProps;
    if (!cacheEnabled) {
      dbProps=DBDAO.getDbProps(context.getDBName());
      if (dbProps != null)       dbProps.put("String_Node_Str",false);
    }
 else {
      LoadingCache<String,Optional<DBObject>> dbPropsCache=LocalCachesSingleton.getInstance().getDbCache();
      Optional<DBObject> _dbMetadata=dbPropsCache.getIfPresent(context.getDBName());
      if (_dbMetadata != null) {
        if (_dbMetadata.isPresent()) {
          dbProps=_dbMetadata.get();
          dbProps.put("String_Node_Str",true);
        }
 else         dbProps=null;
      }
 else {
        try {
          _dbMetadata=dbPropsCache.getUnchecked(context.getDBName());
        }
 catch (        UncheckedExecutionException uex) {
          if (uex.getCause() instanceof MongoException) {
            throw (MongoException)uex.getCause();
          }
 else {
            throw uex;
          }
        }
        if (_dbMetadata != null && _dbMetadata.isPresent()) {
          dbProps=_dbMetadata.get();
          dbProps.put("String_Node_Str",false);
        }
 else         dbProps=null;
      }
    }
    context.setDbProps(dbProps);
  }
  next.handleRequest(exchange,context);
}
Program: 93659
Project: 93659
Buggy source:
private static BasicDBList getStackTraceJson(Throwable t){
  if (t == null || t.getStackTrace() == null)   return null;
  BasicDBList list=new BasicDBList();
  for (  StackTraceElement e : t.getStackTrace()) {
    list.add(e.toString());
  }
  return list;
}

Fixed version (ground truth):
private static BasicDBList getStackTraceJson(Throwable t){
  if (t == null || t.getStackTrace() == null)   return null;
  StringWriter sw=new StringWriter();
  PrintWriter pw=new PrintWriter(sw);
  t.printStackTrace(pw);
  String st=sw.toString();
  st=st.replaceAll("String_Node_Str","String_Node_Str");
  String[] lines=st.split("String_Node_Str");
  BasicDBList list=new BasicDBList();
  list.addAll(Arrays.asList(lines));
  return list;
}
Program: 93663
Project: 93663
Buggy source:
/** 
 * partial update db properties
 * @param exchange
 * @param context
 * @throws Exception
 */
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  if (context.getDBName().isEmpty() || context.getDBName().startsWith("String_Node_Str")) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str");
    return;
  }
  DBObject content=context.getContent();
  if (content == null) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str");
    return;
  }
  if (content instanceof BasicDBList) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str");
    return;
  }
  ObjectId etag=RequestHelper.getWriteEtag(exchange);
  if (etag == null) {
    ResponseHelper.endExchange(exchange,HttpStatus.SC_CONFLICT);
    return;
  }
  int SC=DBDAO.upsertDB(context.getDBName(),content,etag,true);
  exchange.setResponseCode(SC);
  if (context.getWarnings() != null && !context.getWarnings().isEmpty()) {
    DocumentRepresentationFactory.sendDocument(exchange.getRequestPath(),exchange,context,new BasicDBObject());
  }
  exchange.endExchange();
}

Fixed version (ground truth):
/** 
 * partial update db properties
 * @param exchange
 * @param context
 * @throws Exception
 */
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  if (context.getDBName().isEmpty() || context.getDBName().startsWith("String_Node_Str")) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str");
    return;
  }
  DBObject content=context.getContent();
  if (content == null) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str");
    return;
  }
  if (content instanceof BasicDBList) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str");
    return;
  }
  ObjectId etag=RequestHelper.getWriteEtag(exchange);
  if (etag == null) {
    ResponseHelper.endExchange(exchange,HttpStatus.SC_CONFLICT);
    return;
  }
  int SC=DBDAO.upsertDB(context.getDBName(),content,etag,true);
  exchange.setResponseCode(SC);
  if (context.getWarnings() != null && !context.getWarnings().isEmpty()) {
    DocumentRepresentationFactory.sendDocument(exchange.getRequestPath(),exchange,context,new BasicDBObject());
  }
  exchange.endExchange();
  LocalCachesSingleton.getInstance().invalidateDb(context.getDBName());
}
Program: 93664
Project: 93664
Buggy source:
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  if (context.getMethod() == RequestContext.METHOD.GET || context.getMethod() == RequestContext.METHOD.DELETE) {
    next.handleRequest(exchange,context);
    return;
  }
  HeaderValues contentTypes=exchange.getRequestHeaders().get(Headers.CONTENT_TYPE);
  if (contentTypes == null || contentTypes.isEmpty() || !contentTypes.contains(Representation.HAL_JSON_MEDIA_TYPE) || !contentTypes.contains(JSON_MEDIA_TYPE)) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE,"String_Node_Str" + Representation.HAL_JSON_MEDIA_TYPE + "String_Node_Str"+ JSON_MEDIA_TYPE);
    return;
  }
  String _content=ChannelReader.read(exchange.getRequestChannel());
  DBObject content;
  try {
    content=(DBObject)JSON.parse(_content);
  }
 catch (  JSONParseException ex) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str",ex);
    return;
  }
  HashSet<String> keysToRemove=new HashSet<>();
  content.keySet().stream().filter((key) -> (key.startsWith("String_Node_Str"))).forEach((key) -> {
    keysToRemove.add(key);
  }
);
  keysToRemove.stream().map((keyToRemove) -> {
    content.removeField(keyToRemove);
    return keyToRemove;
  }
).forEach((keyToRemove) -> {
    context.addWarning("String_Node_Str" + keyToRemove + "String_Node_Str");
  }
);
  context.setContent(content);
  next.handleRequest(exchange,context);
}

Fixed version (ground truth):
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  if (context.getMethod() == RequestContext.METHOD.GET || context.getMethod() == RequestContext.METHOD.DELETE) {
    next.handleRequest(exchange,context);
    return;
  }
  HeaderValues contentTypes=exchange.getRequestHeaders().get(Headers.CONTENT_TYPE);
  if (contentTypes == null || contentTypes.isEmpty() || !(contentTypes.contains(Representation.HAL_JSON_MEDIA_TYPE) || contentTypes.contains(JSON_MEDIA_TYPE))) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE,"String_Node_Str" + Representation.HAL_JSON_MEDIA_TYPE + "String_Node_Str"+ JSON_MEDIA_TYPE);
    return;
  }
  String _content=ChannelReader.read(exchange.getRequestChannel());
  DBObject content;
  try {
    content=(DBObject)JSON.parse(_content);
  }
 catch (  JSONParseException ex) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_ACCEPTABLE,"String_Node_Str",ex);
    return;
  }
  HashSet<String> keysToRemove=new HashSet<>();
  content.keySet().stream().filter((key) -> (key.startsWith("String_Node_Str"))).forEach((key) -> {
    keysToRemove.add(key);
  }
);
  keysToRemove.stream().map((keyToRemove) -> {
    content.removeField(keyToRemove);
    return keyToRemove;
  }
).forEach((keyToRemove) -> {
    context.addWarning("String_Node_Str" + keyToRemove + "String_Node_Str");
  }
);
  context.setContent(content);
  next.handleRequest(exchange,context);
}
Program: 93665
Project: 93665
Buggy source:
@Before @Override public void setUp() throws Exception {
  super.setUp();
  notDecompressingExecutor=Executor.newInstance(HttpClients.custom().disableContentCompression().build()).auth(new HttpHost(conf.getHttpHost()),"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Before @Override public void setUp() throws Exception {
  super.setUp();
  notDecompressingExecutor=Executor.newInstance(HttpClients.custom().disableContentCompression().build()).auth(new HttpHost("String_Node_Str"),"String_Node_Str","String_Node_Str");
}
Program: 93666
Project: 93666
Buggy source:
public void addRepresentation(String rel,Representation rep){
  if (dbObject.get("String_Node_Str") == null)   dbObject.put("String_Node_Str",new BasicDBObject());
  BasicDBObject _embedded=(BasicDBObject)dbObject.get("String_Node_Str");
  if (_embedded.get(rel) == null)   _embedded.put(rel,new BasicDBObject());
  BasicDBObject _rel=(BasicDBObject)_embedded.get(rel);
  _rel.putAll((BSONObject)((Representation)rep).getDBObject());
}

Fixed version (ground truth):
public void addRepresentation(String rel,Representation rep){
  if (dbObject.get("String_Node_Str") == null)   dbObject.put("String_Node_Str",new BasicDBObject());
  BasicDBObject _embedded=(BasicDBObject)dbObject.get("String_Node_Str");
  if (_embedded.get(rel) == null)   _embedded.put(rel,new BasicDBList());
  BasicDBList _rel=(BasicDBList)_embedded.get(rel);
  _rel.add(((Representation)rep).getDBObject());
}
Program: 93668
Project: 93668
Buggy source:
private static Representation addData(Representation rep,DBObject data){
  data.keySet().stream().forEach((key) -> {
    Object value=data.get(key);
    if (value instanceof DBObject) {
      rep.addRepresentation(key,addData(new Representation("String_Node_Str"),(DBObject)value));
    }
 else     if (value instanceof BasicDBList) {
      BasicDBList list=((BasicDBList)value);
      for (      String key2 : list.keySet()) {
        if (list.get(key2) instanceof DBObject) {
          rep.addRepresentation(key2,addData(new Representation("String_Node_Str" + key2),(DBObject)value));
        }
 else {
          rep.addProperty(key2,value);
        }
      }
    }
 else {
      if (value instanceof ObjectId) {
        value=value.toString();
      }
      rep.addProperty(key,value);
    }
  }
);
  return rep;
}

Fixed version (ground truth):
private static void addData(Representation rep,DBObject data){
  data.keySet().stream().forEach((key) -> {
    Object value=data.get(key);
    if (value instanceof ObjectId) {
      rep.addProperty(key,value.toString());
    }
 else {
      rep.addProperty(key,value);
    }
  }
);
}
Program: 93669
Project: 93669
Buggy source:
public static Representation getDocument(HttpServerExchange exchange,RequestContext context,DBObject data) throws IllegalQueryParamenterException {
  String requestPath=URLUtilis.getRequestPath(exchange);
  Representation rep=new Representation(requestPath);
  data.keySet().stream().forEach((key) -> {
    Object value=data.get(key);
    if (value instanceof ObjectId) {
      value=value.toString();
    }
    rep.addProperty(key,value);
  }
);
  TreeMap<String,String> links=null;
  try {
    links=getRelationshipsLinks(exchange,context,data);
  }
 catch (  InvalidMetadataException ex) {
    logger.warn(ex.getMessage(),context.getDBName(),context.getCollectionName(),ex);
  }
  if (links != null) {
    for (    String k : links.keySet()) {
      rep.addLink(new Link(k,links.get(k)));
    }
  }
  return rep;
}

Fixed version (ground truth):
public static Representation getDocument(String href,HttpServerExchange exchange,RequestContext context,DBObject data) throws IllegalQueryParamenterException {
  Representation rep=new Representation(href);
  data.keySet().stream().forEach((key) -> {
    Object value=data.get(key);
    if (value instanceof ObjectId) {
      value=value.toString();
    }
    rep.addProperty(key,value);
  }
);
  TreeMap<String,String> links=null;
  try {
    links=getRelationshipsLinks(context,data);
  }
 catch (  InvalidMetadataException ex) {
    logger.warn(ex.getMessage(),context.getDBName(),context.getCollectionName(),ex);
  }
  if (links != null) {
    for (    String k : links.keySet()) {
      rep.addLink(new Link(k,links.get(k)));
    }
  }
  return rep;
}
Program: 93670
Project: 93670
Buggy source:
public static void sendDocument(HttpServerExchange exchange,RequestContext context,DBObject data) throws IllegalQueryParamenterException, URISyntaxException {
  Representation rep=getDocument(exchange,context,data);
  exchange.getResponseHeaders().put(Headers.CONTENT_TYPE,HAL_JSON_MEDIA_TYPE);
  exchange.getResponseSender().send(rep.toString());
}

Fixed version (ground truth):
public static void sendDocument(String href,HttpServerExchange exchange,RequestContext context,DBObject data) throws IllegalQueryParamenterException, URISyntaxException {
  Representation rep=getDocument(href,exchange,context,data);
  exchange.getResponseHeaders().put(Headers.CONTENT_TYPE,HAL_JSON_MEDIA_TYPE);
  exchange.getResponseSender().send(rep.toString());
}
Program: 93671
Project: 93671
Buggy source:
private static TreeMap<String,String> getRelationshipsLinks(HttpServerExchange exchange,RequestContext context,DBObject data) throws InvalidMetadataException {
  TreeMap<String,String> links=new TreeMap<>();
  List<Relationship> rels;
  try {
    rels=Relationship.getFromJson((DBObject)context.getCollectionProps());
  }
 catch (  InvalidMetadataException ex) {
    logger.error("String_Node_Str",context.getDBName(),context.getCollectionName(),ex);
    throw new InvalidMetadataException("String_Node_Str" + context.getDBName() + "String_Node_Str"+ context.getCollectionName()+ "String_Node_Str",ex);
  }
  if (rels == null) {
    return links;
  }
  for (  Relationship rel : rels) {
    try {
      String link=rel.getRelationshipLink(context.getDBName(),context.getCollectionName(),data);
      if (link != null) {
        links.put(rel.getRel(),link);
      }
    }
 catch (    IllegalArgumentException ex) {
      logger.warn("String_Node_Str",context.getDBName(),context.getCollectionName(),context.getDocumentId(),ex);
    }
  }
  return links;
}

Fixed version (ground truth):
private static TreeMap<String,String> getRelationshipsLinks(RequestContext context,DBObject data) throws InvalidMetadataException {
  TreeMap<String,String> links=new TreeMap<>();
  List<Relationship> rels;
  try {
    rels=Relationship.getFromJson((DBObject)context.getCollectionProps());
  }
 catch (  InvalidMetadataException ex) {
    logger.error("String_Node_Str",context.getDBName(),context.getCollectionName(),ex);
    throw new InvalidMetadataException("String_Node_Str" + context.getDBName() + "String_Node_Str"+ context.getCollectionName()+ "String_Node_Str",ex);
  }
  if (rels == null) {
    return links;
  }
  for (  Relationship rel : rels) {
    try {
      String link=rel.getRelationshipLink(context.getDBName(),context.getCollectionName(),data);
      if (link != null) {
        links.put(rel.getRel(),link);
      }
    }
 catch (    IllegalArgumentException ex) {
      logger.warn("String_Node_Str",context.getDBName(),context.getCollectionName(),context.getDocumentId(),ex);
    }
  }
  return links;
}
Program: 93672
Project: 93672
Buggy source:
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  ObjectId oid;
  String sid;
  if (ObjectId.isValid(context.getDocumentId())) {
    sid=null;
    oid=new ObjectId(context.getDocumentId());
  }
 else {
    sid=context.getDocumentId();
    oid=null;
  }
  BasicDBObject query;
  if (oid != null) {
    query=new BasicDBObject("String_Node_Str",oid);
  }
 else {
    query=new BasicDBObject("String_Node_Str",sid);
  }
  DBObject document=CollectionDAO.getCollection(context.getDBName(),context.getCollectionName()).findOne(query);
  if (document == null) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_FOUND,"String_Node_Str" + context.getDBName() + "String_Node_Str"+ context.getCollectionName()+ "String_Node_Str"+ context.getDocumentId()+ "String_Node_Str");
    return;
  }
  Object etag=document.get("String_Node_Str");
  if (etag != null && ObjectId.isValid("String_Node_Str" + etag)) {
    ObjectId _etag=new ObjectId("String_Node_Str" + etag);
    document.put("String_Node_Str",Instant.ofEpochSecond(_etag.getTimestamp()).toString());
    if (false && RequestHelper.checkReadEtag(exchange,etag.toString())) {
      ResponseHelper.endExchange(exchange,HttpStatus.SC_NOT_MODIFIED);
      return;
    }
  }
  ResponseHelper.injectEtagHeader(exchange,document);
  exchange.setResponseCode(HttpStatus.SC_OK);
  DocumentRepresentationFactory.sendDocument(exchange,context,document);
  exchange.endExchange();
}

Fixed version (ground truth):
@Override public void handleRequest(HttpServerExchange exchange,RequestContext context) throws Exception {
  ObjectId oid;
  String sid;
  if (ObjectId.isValid(context.getDocumentId())) {
    sid=null;
    oid=new ObjectId(context.getDocumentId());
  }
 else {
    sid=context.getDocumentId();
    oid=null;
  }
  BasicDBObject query;
  if (oid != null) {
    query=new BasicDBObject("String_Node_Str",oid);
  }
 else {
    query=new BasicDBObject("String_Node_Str",sid);
  }
  DBObject document=CollectionDAO.getCollection(context.getDBName(),context.getCollectionName()).findOne(query);
  if (document == null) {
    ResponseHelper.endExchangeWithMessage(exchange,HttpStatus.SC_NOT_FOUND,"String_Node_Str" + context.getDBName() + "String_Node_Str"+ context.getCollectionName()+ "String_Node_Str"+ context.getDocumentId()+ "String_Node_Str");
    return;
  }
  Object etag=document.get("String_Node_Str");
  if (etag != null && ObjectId.isValid("String_Node_Str" + etag)) {
    ObjectId _etag=new ObjectId("String_Node_Str" + etag);
    document.put("String_Node_Str",Instant.ofEpochSecond(_etag.getTimestamp()).toString());
    if (false && RequestHelper.checkReadEtag(exchange,etag.toString())) {
      ResponseHelper.endExchange(exchange,HttpStatus.SC_NOT_MODIFIED);
      return;
    }
  }
  String requestPath=URLUtilis.removeTrailingSlashes(URLUtilis.getRequestPath(exchange));
  ResponseHelper.injectEtagHeader(exchange,document);
  exchange.setResponseCode(HttpStatus.SC_OK);
  DocumentRepresentationFactory.sendDocument(requestPath,exchange,context,document);
  exchange.endExchange();
}
Program: 93675
Project: 93675
Buggy source:
/** 
 * Expire a cookie, notifying a User Agent to remove it from its cookie jar. The context must have first been routed to a   {@link io.vertx.ext.web.handler.CookieHandler} for this to work.
 * @param name  the name of the cookie
 * @return the cookie, if it existed, or null
 */
@Nullable Cookie removeCookie(String name);

Fixed version (ground truth):
/** 
 * Remove a cookie from the cookie set. If invalidate is true then it will expire a cookie, notifying a User Agent to remove it from its cookie jar. The context must have first been routed to a  {@link io.vertx.ext.web.handler.CookieHandler} for this to work.
 * @param name  the name of the cookie
 * @return the cookie, if it existed, or null
 */
@Nullable Cookie removeCookie(String name,boolean invalidate);
Program: 93676
Project: 93676
Buggy source:
private void addStoreSessionHandler(RoutingContext context){
  context.addHeadersEndHandler(v -> {
    Session session=context.session();
    if (!session.isDestroyed()) {
      final int currentStatusCode=context.response().getStatusCode();
      if (currentStatusCode >= 200 && currentStatusCode < 400) {
        session.setAccessed();
        if (session.isRegenerated()) {
          final Cookie cookie=context.getCookie(sessionCookieName);
          cookie.setValue(session.id()).setPath("String_Node_Str").setSecure(sessionCookieSecure).setHttpOnly(sessionCookieHttpOnly);
          sessionStore.delete(session.oldId(),delete -> {
            if (delete.failed()) {
              log.error("String_Node_Str",delete.cause());
            }
 else {
              sessionStore.put(session,res -> {
                if (res.failed()) {
                  log.error("String_Node_Str",res.cause());
                }
              }
);
            }
          }
);
        }
 else {
          sessionStore.put(session,res -> {
            if (res.failed()) {
              log.error("String_Node_Str",res.cause());
            }
          }
);
        }
      }
 else {
        context.removeCookie(sessionCookieName);
      }
    }
 else {
      sessionStore.delete(session.id(),res -> {
        if (res.failed()) {
          log.error("String_Node_Str",res.cause());
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
private void addStoreSessionHandler(RoutingContext context){
  context.addHeadersEndHandler(v -> {
    Session session=context.session();
    if (!session.isDestroyed()) {
      final int currentStatusCode=context.response().getStatusCode();
      if (currentStatusCode >= 200 && currentStatusCode < 400) {
        session.setAccessed();
        if (session.isRegenerated()) {
          final Cookie cookie=context.getCookie(sessionCookieName);
          cookie.setValue(session.id()).setPath("String_Node_Str").setSecure(sessionCookieSecure).setHttpOnly(sessionCookieHttpOnly);
          sessionStore.delete(session.oldId(),delete -> {
            if (delete.failed()) {
              log.error("String_Node_Str",delete.cause());
            }
 else {
              sessionStore.put(session,res -> {
                if (res.failed()) {
                  log.error("String_Node_Str",res.cause());
                }
              }
);
            }
          }
);
        }
 else {
          sessionStore.put(session,res -> {
            if (res.failed()) {
              log.error("String_Node_Str",res.cause());
            }
          }
);
        }
      }
 else {
        context.removeCookie(sessionCookieName,false);
      }
    }
 else {
      sessionStore.delete(session.id(),res -> {
        if (res.failed()) {
          log.error("String_Node_Str",res.cause());
        }
      }
);
    }
  }
);
}
Program: 93677
Project: 93677
Buggy source:
@Override public Cookie removeCookie(String name){
  return decoratedContext.removeCookie(name);
}

Fixed version (ground truth):
@Override public Cookie removeCookie(String name,boolean invalidate){
  return decoratedContext.removeCookie(name,invalidate);
}
Program: 93678
Project: 93678
Buggy source:
@Override public Cookie removeCookie(String name){
  Cookie cookie=cookiesMap().get(name);
  if (cookie != null) {
    if (cookie.isFromUserAgent()) {
      cookie.setMaxAge(0L);
    }
 else {
      cookiesMap().remove(name);
    }
  }
  return cookie;
}

Fixed version (ground truth):
@Override public Cookie removeCookie(String name,boolean invalidate){
  Cookie cookie=cookiesMap().get(name);
  if (cookie != null) {
    if (invalidate && cookie.isFromUserAgent()) {
      cookie.setMaxAge(0L);
    }
 else {
      cookiesMap().remove(name);
    }
  }
  return cookie;
}
Program: 93679
Project: 93679
Buggy source:
@Override public Cookie removeCookie(String name){
  return inner.removeCookie(name);
}

Fixed version (ground truth):
@Override public Cookie removeCookie(String name,boolean invalidate){
  return inner.removeCookie(name,invalidate);
}
Program: 93680
Project: 93680
Buggy source:
@Override public ReadStream<Buffer> handler(Handler<Buffer> handler){
  if (handler != null) {
    handler.handle(TestUtils.randomBuffer(1024));
    vertx.runOnContext(v -> exceptionHandler.handle(cause));
  }
  return this;
}

Fixed version (ground truth):
@Override public ReadStream<Buffer> handler(Handler<Buffer> handler){
  if (handler != null) {
    vertx.runOnContext(v -> exceptionHandler.handle(cause));
  }
  return this;
}
Program: 93681
Project: 93681
Buggy source:
@Test public void testRequestPumpErrorNotYetConnected() throws Exception {
  HttpRequest<Buffer> post=client.post(DEFAULT_HTTP_PORT,DEFAULT_HTTP_HOST,"String_Node_Str");
  server.requestHandler(req -> fail());
  Throwable cause=new Throwable();
  startServer();
  post.sendStream(new ReadStream<Buffer>(){
    Handler<Throwable> exceptionHandler;
    @Override public ReadStream<Buffer> exceptionHandler(    Handler<Throwable> handler){
      exceptionHandler=handler;
      return this;
    }
    @Override public ReadStream<Buffer> handler(    Handler<Buffer> handler){
      if (handler != null) {
        handler.handle(TestUtils.randomBuffer(1024));
        vertx.runOnContext(v -> exceptionHandler.handle(cause));
      }
      return this;
    }
    @Override public ReadStream<Buffer> pause(){
      return this;
    }
    @Override public ReadStream<Buffer> resume(){
      return this;
    }
    @Override public ReadStream<Buffer> endHandler(    Handler<Void> endHandler){
      return this;
    }
  }
,onFailure(err -> {
    assertSame(cause,err);
    testComplete();
  }
));
  await();
}

Fixed version (ground truth):
@Test public void testRequestPumpErrorNotYetConnected() throws Exception {
  HttpRequest<Buffer> post=client.post(DEFAULT_HTTP_PORT,DEFAULT_HTTP_HOST,"String_Node_Str");
  server.requestHandler(req -> fail());
  Throwable cause=new Throwable();
  startServer();
  post.sendStream(new ReadStream<Buffer>(){
    Handler<Throwable> exceptionHandler;
    @Override public ReadStream<Buffer> exceptionHandler(    Handler<Throwable> handler){
      exceptionHandler=handler;
      return this;
    }
    @Override public ReadStream<Buffer> handler(    Handler<Buffer> handler){
      if (handler != null) {
        vertx.runOnContext(v -> exceptionHandler.handle(cause));
      }
      return this;
    }
    @Override public ReadStream<Buffer> pause(){
      return this;
    }
    @Override public ReadStream<Buffer> resume(){
      return this;
    }
    @Override public ReadStream<Buffer> endHandler(    Handler<Void> endHandler){
      return this;
    }
  }
,onFailure(err -> {
    assertSame(cause,err);
    testComplete();
  }
));
  await();
}
Program: 93682
Project: 93682
Buggy source:
@Override public RequestParameter isValidSingleParam(String value){
  try {
    Number number=parseNumber.apply(value);
    if (number != null && this.testMaximum(number) && this.testMinimum(number) && this.testMultipleOf(number)) {
      return RequestParameter.create(number);
    }
 else {
      throw ValidationException.ValidationExceptionFactory.generateNotMatchValidationException("String_Node_Str");
    }
  }
 catch (  NumberFormatException e) {
    throw ValidationException.ValidationExceptionFactory.generateNotMatchValidationException("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public RequestParameter isValidSingleParam(String value){
  try {
    Number number=parseNumber.apply(value);
    checkMaximum(number);
    checkMinimum(number);
    checkMultipleOf(number);
    return RequestParameter.create(number);
  }
 catch (  NumberFormatException e) {
    throw ValidationException.ValidationExceptionFactory.generateNotMatchValidationException("String_Node_Str");
  }
}
Program: 93684
Project: 93684
Buggy source:
@Override public OpenAPI3RouterFactory addSecurityHandler(String securitySchemaName,Handler handler){
  SecurityRequirementKey key=new SecurityRequirementKey(securitySchemaName);
  securityHandlers.put(key,handler);
  return this;
}

Fixed version (ground truth):
@Override public OpenAPI3RouterFactory addSecurityHandler(String securitySchemaName,Handler handler){
  securityHandlers.addSecurityRequirement(securitySchemaName,handler);
  return this;
}
Program: 93685
Project: 93685
Buggy source:
public OpenAPI3RouterFactoryImpl(Vertx vertx,OpenAPI spec){
  super(vertx,spec);
  this.operations=new LinkedHashMap<>();
  this.securityHandlers=new HashMap<>();
  for (  Map.Entry<String,? extends PathItem> pathEntry : spec.getPaths().entrySet()) {
    for (    Map.Entry<PathItem.HttpMethod,? extends Operation> opEntry : pathEntry.getValue().readOperationsMap().entrySet()) {
      this.operations.put(opEntry.getValue().getOperationId(),new OperationValue(HttpMethod.valueOf(opEntry.getKey().name()),pathEntry.getKey(),opEntry.getValue(),pathEntry.getValue().getParameters()));
    }
  }
}

Fixed version (ground truth):
public OpenAPI3RouterFactoryImpl(Vertx vertx,OpenAPI spec){
  super(vertx,spec);
  this.operations=new LinkedHashMap<>();
  this.securityHandlers=new SecurityHandlersStore();
  for (  Map.Entry<String,? extends PathItem> pathEntry : spec.getPaths().entrySet()) {
    for (    Map.Entry<PathItem.HttpMethod,? extends Operation> opEntry : pathEntry.getValue().readOperationsMap().entrySet()) {
      this.operations.put(opEntry.getValue().getOperationId(),new OperationValue(HttpMethod.valueOf(opEntry.getKey().name()),pathEntry.getKey(),opEntry.getValue(),pathEntry.getValue().getParameters()));
    }
  }
}
Program: 93686
Project: 93686
Buggy source:
@Override public OpenAPI3RouterFactory addSecuritySchemaScopeValidator(String securitySchemaName,String scopeName,Handler handler){
  SecurityRequirementKey key=new SecurityRequirementKey(securitySchemaName,scopeName);
  securityHandlers.put(key,handler);
  return this;
}

Fixed version (ground truth):
@Override public OpenAPI3RouterFactory addSecuritySchemaScopeValidator(String securitySchemaName,String scopeName,Handler handler){
  securityHandlers.addSecurityRequirement(securitySchemaName,scopeName,handler);
  return this;
}
Program: 93687
Project: 93687
Buggy source:
@Test public void requireSecurityHandler() throws Exception {
  CountDownLatch latch=new CountDownLatch(1);
  OpenAPI3RouterFactory.createRouterFactoryFromFile(this.vertx,"String_Node_Str",openAPI3RouterFactoryAsyncResult -> {
    routerFactory=openAPI3RouterFactoryAsyncResult.result();
    routerFactory.setOptions(new DesignDrivenRouterFactoryOptions().setRequireSecurityHandlers(true));
    routerFactory.addHandlerByOperationId("String_Node_Str",routingContext -> {
      routingContext.response().setStatusCode(200).setStatusMessage(routingContext.get("String_Node_Str") + "String_Node_Str").end();
    }
);
    latch.countDown();
  }
);
  awaitLatch(latch);
  assertThrow(() -> routerFactory.getRouter(),RouterFactoryException.class);
  routerFactory.addSecurityHandler("String_Node_Str",routingContext -> routingContext.next());
  assertNotThrow(() -> routerFactory.getRouter(),RouterFactoryException.class);
}

Fixed version (ground truth):
@Test public void requireSecurityHandler() throws Exception {
  CountDownLatch latch=new CountDownLatch(1);
  OpenAPI3RouterFactory.createRouterFactoryFromFile(this.vertx,"String_Node_Str",openAPI3RouterFactoryAsyncResult -> {
    routerFactory=openAPI3RouterFactoryAsyncResult.result();
    routerFactory.setOptions(new DesignDrivenRouterFactoryOptions().setRequireSecurityHandlers(true));
    routerFactory.addHandlerByOperationId("String_Node_Str",routingContext -> {
      routingContext.response().setStatusCode(200).setStatusMessage(routingContext.get("String_Node_Str") + "String_Node_Str").end();
    }
);
    latch.countDown();
  }
);
  awaitLatch(latch);
  assertThrow(routerFactory::getRouter,RouterFactoryException.class);
  routerFactory.addSecurityHandler("String_Node_Str",routingContext -> routingContext.next());
  assertNotThrow(routerFactory::getRouter,RouterFactoryException.class);
}