nus-yam/ex-repair huggingface dataset:
Program: 161190
Project: 161190
Buggy source:
@DELETE @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Path("String_Node_Str") public Response delete(@Context final HttpServletRequest request,@PathParam("String_Node_Str") final String source,@PathParam("String_Node_Str") final String objectType,@PathParam("String_Node_Str") final String key,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") final String reason,@QueryParam("String_Node_Str") final List<String> passwords,@QueryParam("String_Node_Str") final String override){
  checkForMainSource(request,source);
  final RpslObject originalObject=rpslObjectDao.getByKey(ObjectType.getByName(objectType),key);
  updatePerformer.performUpdate(updatePerformer.createOrigin(request),updatePerformer.createUpdate(originalObject,passwords,reason,override),updatePerformer.createContent(originalObject,passwords,reason,override),Keyword.NONE,loggerContext,request);
  return Response.status(Response.Status.OK).build();
}

Fixed version (ground truth):
@DELETE @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Path("String_Node_Str") public Response delete(@Context final HttpServletRequest request,@PathParam("String_Node_Str") final String source,@PathParam("String_Node_Str") final String objectType,@PathParam("String_Node_Str") final String key,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") final String reason,@QueryParam("String_Node_Str") final List<String> passwords,@QueryParam("String_Node_Str") final String override){
  checkForMainSource(request,source);
  final RpslObject originalObject=rpslObjectDao.getByKey(ObjectType.getByName(objectType),key);
  return updatePerformer.performUpdate(updatePerformer.createOrigin(request),updatePerformer.createUpdate(originalObject,passwords,reason,override),updatePerformer.createContent(originalObject,passwords,reason,override),Keyword.NONE,loggerContext,request);
}
Program: 161191
Project: 161191
Buggy source:
@Test public void grs_lookup_object_wrong_source(){
  try {
    RestTest.target(getPort(),"String_Node_Str").request().get(String.class);
    fail();
  }
 catch (  BadRequestException e) {
    assertThat(e.getResponse().readEntity(String.class),is("String_Node_Str"));
  }
}

Fixed version (ground truth):
@Test public void grs_lookup_object_wrong_source(){
  try {
    RestTest.target(getPort(),"String_Node_Str").request().get(String.class);
    fail();
  }
 catch (  BadRequestException e) {
    assertErrorMessage(e.getResponse().readEntity(WhoisResources.class),"String_Node_Str","String_Node_Str","String_Node_Str");
  }
}
Program: 161192
Project: 161192
Buggy source:
@Test public void search_invalid_flag(){
  try {
    RestTest.target(getPort(),"String_Node_Str").request(MediaType.APPLICATION_XML).get(WhoisResources.class);
    fail();
  }
 catch (  BadRequestException e) {
    assertThat(e.getResponse().readEntity(String.class),is("String_Node_Str"));
  }
}

Fixed version (ground truth):
@Test public void search_invalid_flag(){
  try {
    RestTest.target(getPort(),"String_Node_Str").request(MediaType.APPLICATION_XML).get(WhoisResources.class);
    fail();
  }
 catch (  BadRequestException e) {
    assertErrorMessage(e.getResponse().readEntity(WhoisResources.class),"String_Node_Str","String_Node_Str","String_Node_Str");
  }
}
Program: 161193
Project: 161193
Buggy source:
@Test public void delete_referenced_from_other_objects(){
  try {
    RestTest.target(getPort(),"String_Node_Str").request().delete(String.class);
    fail();
  }
 catch (  BadRequestException e) {
    assertThat(e.getResponse().readEntity(String.class),containsString("String_Node_Str"));
  }
}

Fixed version (ground truth):
@Test public void delete_referenced_from_other_objects(){
  try {
    RestTest.target(getPort(),"String_Node_Str").request().delete(WhoisResources.class);
    fail();
  }
 catch (  BadRequestException e) {
    assertErrorMessage(e.getResponse().readEntity(WhoisResources.class),"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  }
}
Program: 161194
Project: 161194
Buggy source:
@Test public void search_invalid_source(){
  try {
    RestTest.target(getPort(),"String_Node_Str").request(MediaType.APPLICATION_XML).get(WhoisResources.class);
    fail();
  }
 catch (  BadRequestException e) {
    final String response=e.getResponse().readEntity(String.class);
    assertThat(response,is("String_Node_Str"));
    assertThat(response,not(containsString("String_Node_Str")));
  }
}

Fixed version (ground truth):
@Test public void search_invalid_source(){
  try {
    RestTest.target(getPort(),"String_Node_Str").request(MediaType.APPLICATION_XML).get(WhoisResources.class);
    fail();
  }
 catch (  BadRequestException e) {
    assertErrorMessage(e.getResponse().readEntity(WhoisResources.class),"String_Node_Str","String_Node_Str","String_Node_Str");
  }
}
Program: 161195
Project: 161195
Buggy source:
@Test public void search_multiple_sources(){
  try {
    RestTest.target(getPort(),"String_Node_Str").request(MediaType.APPLICATION_XML).get(WhoisResources.class);
    fail();
  }
 catch (  BadRequestException ignored) {
  }
}

Fixed version (ground truth):
@Test public void search_multiple_sources(){
  try {
    RestTest.target(getPort(),"String_Node_Str").request(MediaType.APPLICATION_XML).get(WhoisResources.class);
    fail();
  }
 catch (  BadRequestException e) {
    assertErrorMessage(e.getResponse().readEntity(WhoisResources.class),"String_Node_Str","String_Node_Str","String_Node_Str");
  }
}
Program: 161196
Project: 161196
Buggy source:
@Before public void setup(){
  databaseHelper.addObject("String_Node_Str");
  databaseHelper.addObject("String_Node_Str");
  databaseHelper.addObject(OWNER_MNT);
  databaseHelper.updateObject(TEST_PERSON);
}

Fixed version (ground truth):
@Before public void setup(){
  databaseHelper.addObject("String_Node_Str");
  databaseHelper.addObject(OWNER_MNT);
  databaseHelper.updateObject(TEST_PERSON);
}
Program: 161197
Project: 161197
Buggy source:
public Replay(final String whoisHost,final int whoisPort,final Resource queryLog,final int delayBetweenQueries,final int nrThreads) throws UnknownHostException {
  this.queryLog=queryLog;
  this.delayBetweenQueries=delayBetweenQueries;
  this.executorService=Executors.newFixedThreadPool(nrThreads);
  this.accessControlListManager=mock(AccessControlListManager.class);
  when(accessControlListManager.requiresAcl(any(RpslObject.class),any(Source.class))).thenReturn(false);
  queryExecutor=new QueryExecutor(new QueryExecutorConfiguration("String_Node_Str",whoisHost,whoisPort),accessControlListManager,LOGGER);
}

Fixed version (ground truth):
public Replay(final String whoisHost,final int whoisPort,final Resource queryLog,final int delayBetweenQueries,final int nrThreads) throws UnknownHostException {
  this.queryLog=queryLog;
  this.delayBetweenQueries=delayBetweenQueries;
  this.executorService=Executors.newFixedThreadPool(nrThreads);
  this.accessControlListManager=mock(AccessControlListManager.class);
  when(accessControlListManager.requiresAcl(any(RpslObject.class),any(Source.class))).thenReturn(false);
  queryExecutor=new QueryExecutor(new QueryExecutorConfiguration("String_Node_Str",whoisHost,whoisPort,-1),accessControlListManager,LOGGER);
}
Program: 161198
Project: 161198
Buggy source:
@POST @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.TEXT_PLAIN) public Response createAbuseRole(@PathParam("String_Node_Str") final String orgkey,@FormParam("String_Node_Str") final String email){
  final RpslObject organisation=objectDao.getByKey(ORGANISATION,orgkey);
  final CIString abuseContact=getAbuseContact(organisation);
  if (abuseContact != null) {
    return Response.status(Response.Status.CONFLICT).entity(abuseContact.toString()).build();
  }
  final RpslObject role=buildRole(organisation,email);
  final List<String> overridePasswords=Lists.newArrayList();
  final Origin origin=new InternalJob("String_Node_Str");
  final RpslObject createdRole=updatePerformer.performUpdate(origin,updatePerformer.createUpdate(role,overridePasswords,null),role.toString(),Keyword.NEW,loggerContext);
  final RpslObject org=addAbuseCToOrganisation(organisation,createdRole.getKey().toString());
  updatePerformer.performUpdate(origin,updatePerformer.createUpdate(org,overridePasswords,null),org.toString(),Keyword.NONE,loggerContext);
  return Response.ok(String.format("String_Node_Str",source.getName(),orgkey)).build();
}

Fixed version (ground truth):
@POST @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.TEXT_PLAIN) public Response createAbuseRole(@PathParam("String_Node_Str") final String orgkey,@FormParam("String_Node_Str") final String email){
  final List<RpslObject> organisation=objectDao.getByKeys(ORGANISATION,Lists.newArrayList(CIString.ciString(orgkey)));
  if (organisation.isEmpty()) {
    throw new WebApplicationException(Response.Status.NOT_FOUND);
  }
  final CIString abuseContact=getAbuseContact(organisation.get(0));
  if (abuseContact != null) {
    return Response.status(Response.Status.CONFLICT).entity(abuseContact.toString()).build();
  }
  final RpslObject role=buildRole(organisation.get(0),email);
  final Map<String,String> credentials=Maps.newHashMap();
  credentials.put("String_Node_Str","String_Node_Str");
  final Origin origin=new InternalJob("String_Node_Str");
  final RpslObject createdRole=updatePerformer.performUpdate(origin,updatePerformer.createOverrideUpdate(role,credentials,null),role.toString(),Keyword.NEW,loggerContext);
  final RpslObject org=addAbuseCToOrganisation(organisation.get(0),createdRole.getKey().toString());
  updatePerformer.performUpdate(origin,updatePerformer.createOverrideUpdate(org,credentials,null),org.toString(),Keyword.NONE,loggerContext);
  return Response.ok(String.format("String_Node_Str",source.getName(),orgkey)).build();
}
Program: 161199
Project: 161199
Buggy source:
private boolean isStopStatus(final RpslObject rpslObject){
switch (rpslObject.getType()) {
case INETNUM:
{
      final CIString status=rpslObject.getValueForAttribute(AttributeType.STATUS);
      return STOP_AT_STATUS_IPV4.contains(InetnumStatus.getStatusFor(status));
    }
case INET6NUM:
{
    final CIString status=rpslObject.getValueForAttribute(AttributeType.STATUS);
    return STOP_AT_STATUS_IPV6.contains(InetnumStatus.getStatusFor(status));
  }
default :
throw new IllegalArgumentException("String_Node_Str");
}
}

Fixed version (ground truth):
private boolean isStopStatus(final RpslObject rpslObject){
switch (rpslObject.getType()) {
case INETNUM:
{
      final CIString status=rpslObject.getValueForAttribute(AttributeType.STATUS);
      return STOP_AT_STATUS_IPV4.contains(InetnumStatus.getStatusFor(status));
    }
case INET6NUM:
{
    final CIString status=rpslObject.getValueForAttribute(AttributeType.STATUS);
    return STOP_AT_STATUS_IPV6.contains(Inet6numStatus.getStatusFor(status));
  }
default :
throw new IllegalArgumentException("String_Node_Str");
}
}
Program: 161201
Project: 161201
Buggy source:
private WhoisResources createWhoisResources(final HttpServletRequest request,final RpslObject rpslObject,boolean filter){
  final WhoisResources whoisResources=new WhoisResources();
  whoisResources.setWhoisObjects(Collections.singletonList(whoisObjectMapper.map(rpslObject,filter)));
  whoisResources.setLink(new Link("String_Node_Str",RestServiceHelper.getRequestURL(request)));
  whoisResources.includeTermsAndConditions();
  return whoisResources;
}

Fixed version (ground truth):
private WhoisResources createWhoisResources(final HttpServletRequest request,final RpslObject rpslObject,boolean filter){
  final WhoisResources whoisResources=new WhoisResources();
  whoisResources.setWhoisObjects(Collections.singletonList(whoisObjectMapper.map(rpslObject,filter)));
  whoisResources.setLink(new Link("String_Node_Str",RestServiceHelper.getRequestURL(request).replaceFirst("String_Node_Str","String_Node_Str")));
  whoisResources.includeTermsAndConditions();
  return whoisResources;
}
Program: 161202
Project: 161202
Buggy source:
@Test public void inet6num_with_geolocation_and_language() throws Exception {
  databaseHelper.addObject("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  ipTreeUpdater.rebuild();
  final String response=createResource("String_Node_Str").request(MediaType.APPLICATION_XML).get(String.class);
  assertThat(response,containsString("String_Node_Str"));
  assertThat(response,containsString("String_Node_Str"));
  assertThat(response,containsString("String_Node_Str"));
  assertThat(response,containsString("String_Node_Str"));
  assertThat(response,containsString("String_Node_Str"));
  assertThat(response,containsString("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void inet6num_with_geolocation_and_language() throws Exception {
  databaseHelper.addObject("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  ipTreeUpdater.rebuild();
  final String response=createResource("String_Node_Str").request(MediaType.APPLICATION_XML).get(String.class);
  assertThat(response,containsString(String.format("String_Node_Str",getPort(Audience.PUBLIC))));
  assertThat(response,containsString("String_Node_Str"));
  assertThat(response,containsString("String_Node_Str"));
  assertThat(response,containsString("String_Node_Str"));
  assertThat(response,containsString("String_Node_Str"));
  assertThat(response,containsString("String_Node_Str"));
}
Program: 161203
Project: 161203
Buggy source:
@Test public void create_succeeds() throws Exception {
  final boolean filter=false;
  final WhoisResources response=createResource(AUDIENCE,"String_Node_Str").request().post(Entity.entity(whoisObjectMapper.map(Lists.newArrayList(PAULETH_PALTHEN),filter),MediaType.APPLICATION_XML)).readEntity(WhoisResources.class);
  final WhoisObject object=response.getWhoisObjects().get(0);
  assertThat(object.getAttributes(),contains(new Attribute("String_Node_Str","String_Node_Str"),new Attribute("String_Node_Str","String_Node_Str"),new Attribute("String_Node_Str","String_Node_Str"),new Attribute("String_Node_Str","String_Node_Str"),new Attribute("String_Node_Str","String_Node_Str",null,"String_Node_Str",new Link("String_Node_Str","String_Node_Str")),new Attribute("String_Node_Str","String_Node_Str"),new Attribute("String_Node_Str","String_Node_Str"),new Attribute("String_Node_Str","String_Node_Str"),new Attribute("String_Node_Str","String_Node_Str")));
  assertThat(response.getTermsAndConditions().getHref(),is(WhoisResources.TERMS_AND_CONDITIONS));
}

Fixed version (ground truth):
@Test public void create_succeeds() throws Exception {
  final boolean filter=false;
  final WhoisResources response=createResource(AUDIENCE,"String_Node_Str").request().post(Entity.entity(whoisObjectMapper.map(Lists.newArrayList(PAULETH_PALTHEN),filter),MediaType.APPLICATION_XML)).readEntity(WhoisResources.class);
  assertThat(response.getLink().getHref(),is(String.format("String_Node_Str",getPort(AUDIENCE))));
  final WhoisObject object=response.getWhoisObjects().get(0);
  assertThat(object.getAttributes(),contains(new Attribute("String_Node_Str","String_Node_Str"),new Attribute("String_Node_Str","String_Node_Str"),new Attribute("String_Node_Str","String_Node_Str"),new Attribute("String_Node_Str","String_Node_Str"),new Attribute("String_Node_Str","String_Node_Str",null,"String_Node_Str",new Link("String_Node_Str","String_Node_Str")),new Attribute("String_Node_Str","String_Node_Str"),new Attribute("String_Node_Str","String_Node_Str"),new Attribute("String_Node_Str","String_Node_Str"),new Attribute("String_Node_Str","String_Node_Str")));
  assertThat(response.getTermsAndConditions().getHref(),is(WhoisResources.TERMS_AND_CONDITIONS));
}
Program: 161205
Project: 161205
Buggy source:
public static IpInterval<?> parseReverseDomain(String reverse){
  reverse=removeTrailingDot(reverse).toLowerCase();
  if (reverse.endsWith(Ipv4Resource.IPV4_REVERSE_DOMAIN)) {
    return Ipv4Resource.parseReverseDomain(reverse);
  }
  return Ipv6Resource.parseReverseDomain(reverse);
}

Fixed version (ground truth):
public static IpInterval<?> parseReverseDomain(String reverse){
  String result=removeTrailingDot(reverse).toLowerCase();
  if (result.endsWith(Ipv4Resource.IPV4_REVERSE_DOMAIN)) {
    return Ipv4Resource.parseReverseDomain(result);
  }
  return Ipv6Resource.parseReverseDomain(result);
}
Program: 161206
Project: 161206
Buggy source:
@Override public boolean intersects(Ipv4Resource that){
  return (this.begin() >= that.begin() && this.begin() <= that.end()) || (this.end() >= that.begin() && this.end() <= that.end()) || (that.begin() >= this.begin() && that.begin() <= this.end());
}

Fixed version (ground truth):
@Override public boolean intersects(Ipv4Resource that){
  return (isIPWithinRange(this.begin(),that) || isIPWithinRange(this.end(),that) || isIPWithinRange(that.begin(),this));
}
Program: 161207
Project: 161207
Buggy source:
public ObjectMessages validate(final RpslObject rpslObject){
  final ObjectMessages objectMessages=new ObjectMessages();
  final ObjectType objectType=rpslObject.getType();
  final Map<AttributeType,Integer> attributeCount=Maps.newEnumMap(AttributeType.class);
  for (  final AttributeTemplate attributeTemplate : attributeTemplates) {
    attributeCount.put(attributeTemplate.getAttributeType(),0);
  }
  for (  final RpslAttribute attribute : rpslObject.getAttributes()) {
    final AttributeType attributeType=attribute.getType();
    if (attributeType == null) {
      objectMessages.addMessage(attribute,ValidationMessages.unknownAttribute(attribute.getKey()));
    }
 else {
      final AttributeTemplate attributeTemplate=attributeTemplateMap.get(attributeType);
      if (attributeTemplate == null) {
        objectMessages.addMessage(attribute,ValidationMessages.invalidAttributeForObject(attributeType));
      }
 else       if (!attributeTemplate.getRequirement().equals(GENERATED)) {
        attribute.validateSyntax(objectType,objectMessages);
        attributeCount.put(attributeType,attributeCount.get(attributeType) + 1);
      }
    }
  }
  for (  final AttributeTemplate attributeTemplate : attributeTemplates) {
    final AttributeType attributeType=attributeTemplate.getAttributeType();
    final int count=attributeCount.get(attributeType);
    if (MANDATORY.equals(attributeTemplate.getRequirement()) && count == 0) {
      objectMessages.addMessage(ValidationMessages.missingMandatoryAttribute(attributeType));
    }
    if (SINGLE.equals(attributeTemplate.getCardinality()) && count > 1) {
      objectMessages.addMessage(ValidationMessages.tooManyAttributesOfType(attributeType));
    }
  }
  return objectMessages;
}

Fixed version (ground truth):
public ObjectMessages validate(final RpslObject rpslObject){
  final ObjectMessages objectMessages=new ObjectMessages();
  final ObjectType rpslObjectType=rpslObject.getType();
  final Map<AttributeType,Integer> attributeCount=Maps.newEnumMap(AttributeType.class);
  for (  final AttributeTemplate attributeTemplate : attributeTemplates) {
    attributeCount.put(attributeTemplate.getAttributeType(),0);
  }
  for (  final RpslAttribute attribute : rpslObject.getAttributes()) {
    final AttributeType attributeType=attribute.getType();
    if (attributeType == null) {
      objectMessages.addMessage(attribute,ValidationMessages.unknownAttribute(attribute.getKey()));
    }
 else {
      final AttributeTemplate attributeTemplate=attributeTemplateMap.get(attributeType);
      if (attributeTemplate == null) {
        objectMessages.addMessage(attribute,ValidationMessages.invalidAttributeForObject(attributeType));
      }
 else       if (!attributeTemplate.getRequirement().equals(GENERATED)) {
        attribute.validateSyntax(rpslObjectType,objectMessages);
        attributeCount.put(attributeType,attributeCount.get(attributeType) + 1);
      }
    }
  }
  for (  final AttributeTemplate attributeTemplate : attributeTemplates) {
    addValidationMessagesForAttributeTemplate(objectMessages,attributeTemplate,attributeCount);
  }
  return objectMessages;
}
Program: 161208
Project: 161208
Buggy source:
public CIString getKey(){
  if (key == null) {
    final ObjectTemplate objectTemplate=ObjectTemplate.getTemplate(type);
    final Iterator<AttributeType> keyAttributeIterator=objectTemplate.getKeyAttributes().iterator();
    CIString tmpKey=findAttribute(keyAttributeIterator.next()).getCleanValue();
    while (keyAttributeIterator.hasNext()) {
      tmpKey=tmpKey.append(findAttribute(keyAttributeIterator.next()).getCleanValue());
    }
    key=tmpKey;
  }
  return key;
}

Fixed version (ground truth):
public final CIString getKey(){
  if (key == null) {
    final ObjectTemplate objectTemplate=ObjectTemplate.getTemplate(type);
    final Iterator<AttributeType> keyAttributeIterator=objectTemplate.getKeyAttributes().iterator();
    CIString tmpKey=findAttribute(keyAttributeIterator.next()).getCleanValue();
    while (keyAttributeIterator.hasNext()) {
      tmpKey=tmpKey.append(findAttribute(keyAttributeIterator.next()).getCleanValue());
    }
    key=tmpKey;
  }
  return key;
}
Program: 161209
Project: 161209
Buggy source:
public RpslAttribute findAttribute(final AttributeType attributeType){
  final List<RpslAttribute> attributes=findAttributes(attributeType);
switch (attributes.size()) {
case 0:
    throw new IllegalArgumentException("String_Node_Str" + attributeType);
case 1:
  return attributes.get(0);
default :
throw new IllegalArgumentException("String_Node_Str" + attributeType);
}
}

Fixed version (ground truth):
public RpslAttribute findAttribute(final AttributeType attributeType){
  final List<RpslAttribute> foundAttributes=findAttributes(attributeType);
switch (foundAttributes.size()) {
case 0:
    throw new IllegalArgumentException("String_Node_Str" + attributeType);
case 1:
  return foundAttributes.get(0);
default :
throw new IllegalArgumentException("String_Node_Str" + attributeType);
}
}
Program: 161211
Project: 161211
Buggy source:
public Iterable<? extends ResponseObject> getResponse(final Query query,Iterable<? extends ResponseObject> result){
  result=filterPlaceholdersDecorator.decorate(query,result);
  result=dummify(result);
  result=groupRelatedObjects(query,result);
  result=filterTagsDecorator.decorate(query,result);
  result=filterPersonalDecorator.decorate(query,result);
  result=applyAbuseC(query,result);
  result=applySyntaxFilter(query,result);
  result=filterEmail(query,result);
  result=filterAuth(result);
  result=applyOutputFilters(query,result);
  return result;
}

Fixed version (ground truth):
public Iterable<? extends ResponseObject> getResponse(final Query query,Iterable<? extends ResponseObject> result){
  Iterable<? extends ResponseObject> decoratedResult=filterPlaceholdersDecorator.decorate(query,result);
  decoratedResult=filterPlaceholdersDecorator.decorate(query,decoratedResult);
  decoratedResult=dummify(decoratedResult);
  decoratedResult=groupRelatedObjects(query,decoratedResult);
  decoratedResult=filterTagsDecorator.decorate(query,decoratedResult);
  decoratedResult=filterPersonalDecorator.decorate(query,decoratedResult);
  decoratedResult=applyAbuseC(query,decoratedResult);
  decoratedResult=applySyntaxFilter(query,decoratedResult);
  decoratedResult=filterEmail(query,decoratedResult);
  decoratedResult=filterAuth(decoratedResult);
  decoratedResult=applyOutputFilters(query,decoratedResult);
  return decoratedResult;
}
Program: 161212
Project: 161212
Buggy source:
public Update(final PreparedUpdate update,UpdateContext updateContext){
  this.referenceObject=new FilterAuthFunction().apply(update.getReferenceObject());
  this.updatedObject=new FilterAuthFunction().apply(update.getUpdatedObject());
  this.action=update.getAction().name();
  this.result=RESULT_MAP.get(update.getAction());
  this.update=update;
  String reason=StringUtils.join(update.getUpdate().getDeleteReasons(),"String_Node_Str");
  if (StringUtils.isNotEmpty(reason)) {
    reason=prettyPrint(String.format("String_Node_Str",Messages.Type.INFO),reason,12,80);
  }
  versionId=updateContext.getVersionId(update);
  this.reason=reason;
}

Fixed version (ground truth):
public Update(final PreparedUpdate update,UpdateContext updateContext){
  this.referenceObject=new FilterAuthFunction().apply(update.getReferenceObject());
  this.updatedObject=new FilterAuthFunction().apply(update.getUpdatedObject());
  this.action=update.getAction().name();
  this.result=RESULT_MAP.get(update.getAction());
  this.update=update;
  String updateReason=StringUtils.join(update.getUpdate().getDeleteReasons(),"String_Node_Str");
  if (StringUtils.isNotEmpty(updateReason)) {
    updateReason=prettyPrint(String.format("String_Node_Str",Messages.Type.INFO),updateReason,12,80);
  }
  versionId=updateContext.getVersionId(update);
  this.reason=updateReason;
}
Program: 161213
Project: 161213
Buggy source:
static int readInputLine(final ByteArrayOutputStream out,int lookAhead,final InputStream in) throws IOException {
  out.reset();
  int ch=lookAhead;
  do {
    out.write(ch);
    if (ch == '\r' || ch == '\n') {
      lookAhead=readPassedEOL(out,ch,in);
      break;
    }
  }
 while ((ch=in.read()) >= 0);
  if (ch < 0) {
    lookAhead=-1;
  }
  return lookAhead;
}

Fixed version (ground truth):
static int readInputLine(final ByteArrayOutputStream out,int lookAhead,final InputStream in) throws IOException {
  int newLookAhead=lookAhead;
  out.reset();
  int ch=lookAhead;
  do {
    out.write(ch);
    if (ch == '\r' || ch == '\n') {
      newLookAhead=readPassedEOL(out,ch,in);
      break;
    }
  }
 while ((ch=in.read()) >= 0);
  if (ch < 0) {
    newLookAhead=-1;
  }
  return newLookAhead;
}
Program: 161214
Project: 161214
Buggy source:
public void setup(){
  final Splitter splitter=Splitter.on(',');
  final Iterable<String> mainSources=Collections.singletonList(valueResolver.resolveStringValue("String_Node_Str"));
  final Iterable<String> grsSources=splitter.split(valueResolver.resolveStringValue("String_Node_Str"));
  final Iterable<String> nrtmSources=splitter.split(valueResolver.resolveStringValue("String_Node_Str"));
  final Set<String> sources=Sets.newLinkedHashSet(Iterables.concat(mainSources,grsSources,nrtmSources));
  for (  final String source : sources) {
    try {
      final JdbcTemplate jdbcTemplate=sourceContext.getSourceConfiguration(Source.master(source)).getJdbcTemplate();
      truncateTables(jdbcTemplate);
      loadScripts(jdbcTemplate,"String_Node_Str");
    }
 catch (    IllegalSourceException e) {
      LOGGER.warn("String_Node_Str",source);
    }
  }
  truncateTables(aclTemplate,schedulerTemplate,mailupdatesTemplate,internalsTemplate);
}

Fixed version (ground truth):
public void setup(){
  final Splitter splitter=Splitter.on(',').trimResults();
  final Iterable<String> mainSources=Collections.singletonList(valueResolver.resolveStringValue("String_Node_Str"));
  final Iterable<String> grsSources=splitter.split(valueResolver.resolveStringValue("String_Node_Str"));
  final Iterable<String> nrtmSources=splitter.split(valueResolver.resolveStringValue("String_Node_Str"));
  final Set<String> sources=Sets.newLinkedHashSet(Iterables.concat(mainSources,grsSources,nrtmSources));
  for (  final String source : sources) {
    try {
      final JdbcTemplate jdbcTemplate=sourceContext.getSourceConfiguration(Source.master(source)).getJdbcTemplate();
      truncateTables(jdbcTemplate);
      loadScripts(jdbcTemplate,"String_Node_Str");
    }
 catch (    IllegalSourceException e) {
      LOGGER.warn("String_Node_Str",source);
    }
  }
  truncateTables(aclTemplate,schedulerTemplate,mailupdatesTemplate,internalsTemplate);
  loadScripts(internalsTemplate,"String_Node_Str");
}
Program: 161216
Project: 161216
Buggy source:
public AbuseResources mapAbuseContact(String key,String foundKey,String abuseEmail,String source){
  final AbuseResources abuseResources=new AbuseResources();
  abuseResources.setAbuseContact(new AbuseContact().setEmail(abuseEmail));
  abuseResources.setLink(new Link("String_Node_Str",String.format("String_Node_Str",source,key)));
  abuseResources.setService("String_Node_Str");
  final Parameters parameters=new Parameters();
  parameters.setPrimaryKey(new AbusePKey(foundKey));
  parameters.setSources(Lists.newArrayList(new Source(source).setName(source.toUpperCase())));
  abuseResources.setParameters(parameters);
  abuseResources.setTermsAndConditions(new Link("String_Node_Str",WhoisRestService.TERMS_AND_CONDITIONS));
  return abuseResources;
}

Fixed version (ground truth):
public AbuseResources mapAbuseContact(final String soughtKey,final String source,final Iterable<RpslAttribute> attributes){
  String foundKey="String_Node_Str";
  String abuseEmail="String_Node_Str";
  for (  final RpslAttribute attribute : attributes) {
    if (attribute.getType() == AttributeType.ABUSE_MAILBOX) {
      abuseEmail=attribute.getCleanValue().toString();
    }
 else {
      foundKey=attribute.getCleanValue().toString();
    }
  }
  final AbuseResources abuseResources=new AbuseResources();
  abuseResources.setAbuseContact(new AbuseContact().setEmail(abuseEmail));
  abuseResources.setLink(new Link("String_Node_Str",String.format("String_Node_Str",source,soughtKey)));
  abuseResources.setService("String_Node_Str");
  final Parameters parameters=new Parameters();
  parameters.setPrimaryKey(new AbusePKey(foundKey));
  parameters.setSources(Lists.newArrayList(new Source(source).setName(source.toUpperCase())));
  abuseResources.setParameters(parameters);
  abuseResources.setTermsAndConditions(new Link("String_Node_Str",WhoisRestService.TERMS_AND_CONDITIONS));
  return abuseResources;
}
Program: 161217
Project: 161217
Buggy source:
@GET @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Path("String_Node_Str") public Response abuseFind(@Context HttpServletRequest request,@PathParam("String_Node_Str") String source,@PathParam("String_Node_Str") String key){
  checkForMainSource(source);
  final String format=String.format("String_Node_Str",QueryFlag.ABUSE_CONTACT.getLongFlag(),key == null ? "String_Node_Str" : key);
  final Query query=Query.parse(format);
  final ApiResponseHandlerAbuseC apiResponseHandlerAbuseC=new ApiResponseHandlerAbuseC();
  queryHandler.streamResults(query,InetAddresses.forString(request.getRemoteAddr()),System.identityHashCode(Thread.currentThread()),apiResponseHandlerAbuseC);
  String foundKey="String_Node_Str";
  String abuseEmail="String_Node_Str";
  final RpslAttributes abuseContactInfo=apiResponseHandlerAbuseC.getAbuseContactInfo();
  if (abuseContactInfo == null) {
    throw new NotFoundException();
  }
  for (  final RpslAttribute attribute : abuseContactInfo.getAttributes()) {
    if (attribute.getType() == AttributeType.ABUSE_MAILBOX) {
      abuseEmail=attribute.getCleanValue().toString();
    }
 else {
      foundKey=attribute.getCleanValue().toString();
    }
  }
  return Response.ok(whoisObjectMapper.mapAbuseContact(key,foundKey,abuseEmail,source)).build();
}

Fixed version (ground truth):
@GET @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Path("String_Node_Str") public Response abuseFind(@Context HttpServletRequest request,@PathParam("String_Node_Str") String source,@PathParam("String_Node_Str") String key){
  checkForMainSource(source);
  final String format=String.format("String_Node_Str",QueryFlag.ABUSE_CONTACT.getLongFlag(),key == null ? "String_Node_Str" : key);
  final Query query=Query.parse(format);
  final ApiResponseHandlerAbuseC apiResponseHandlerAbuseC=new ApiResponseHandlerAbuseC();
  queryHandler.streamResults(query,InetAddresses.forString(request.getRemoteAddr()),System.identityHashCode(Thread.currentThread()),apiResponseHandlerAbuseC);
  final RpslAttributes abuseContactInfo=apiResponseHandlerAbuseC.getAbuseContactInfo();
  if (abuseContactInfo == null) {
    throw new NotFoundException();
  }
  return Response.ok(whoisObjectMapper.mapAbuseContact(key,source,abuseContactInfo.getAttributes())).build();
}
Program: 161218
Project: 161218
Buggy source:
@Test public void abuse_contact_not_found(){
}

Fixed version (ground truth):
@Test public void abuse_contact_not_found(){
  databaseHelper.addObject("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  databaseHelper.addObject("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  try {
    createResource(AUDIENCE,"String_Node_Str").accept(MediaType.APPLICATION_XML).get(AbuseResources.class);
  }
 catch (  UniformInterfaceException e) {
    assertThat(e.getResponse().getStatus(),is(Response.Status.NOT_FOUND.getStatusCode()));
  }
}
Program: 161219
Project: 161219
Buggy source:
@Override public ResponseObject apply(final @Nullable ResponseObject input){
  if (!(input instanceof RpslObject)) {
    return input;
  }
  final RpslObject rpslObject=(RpslObject)input;
  final List<RpslAttribute> newAttributes=new ArrayList<>();
  final List<RpslAttribute> abuseCAttributes=new ArrayList<>();
  if (ABUSE_CONTACT_OBJECT_TYPES.contains(rpslObject.getType())) {
    final Map<CIString,CIString> abuseContacts=abuseCFinder.getAbuseContacts(rpslObject);
    if (!abuseContacts.isEmpty()) {
      abuseCAttributes.add(rpslObject.getTypeAttribute());
      for (      final CIString abuseContact : abuseContacts.keySet()) {
        abuseCAttributes.add(new RpslAttribute(AttributeType.ABUSE_MAILBOX,abuseContact.toString()));
      }
      return new RpslAttributes(abuseCAttributes);
    }
  }
  for (  final RpslAttribute attribute : rpslObject.getAttributes()) {
    if (BRIEF_ATTRIBUTES.contains(attribute.getType())) {
      newAttributes.add(attribute);
    }
  }
  if (newAttributes.isEmpty()) {
    return null;
  }
  return new RpslAttributes(newAttributes);
}

Fixed version (ground truth):
@Override public ResponseObject apply(final @Nullable ResponseObject input){
  if (!(input instanceof RpslObject)) {
    return input;
  }
  final RpslObject rpslObject=(RpslObject)input;
  final List<RpslAttribute> newAttributes=new ArrayList<>();
  final List<RpslAttribute> abuseCAttributes=new ArrayList<>();
  if (ABUSE_CONTACT_OBJECT_TYPES.contains(rpslObject.getType())) {
    final Map<CIString,CIString> abuseContacts=abuseCFinder.getAbuseContacts(rpslObject);
    if (!abuseContacts.isEmpty()) {
      abuseCAttributes.add(rpslObject.getTypeAttribute());
      for (      final CIString abuseContact : abuseContacts.keySet()) {
        abuseCAttributes.add(new RpslAttribute(AttributeType.ABUSE_MAILBOX,abuseContacts.get(abuseContact).toString()));
      }
      return new RpslAttributes(abuseCAttributes);
    }
  }
  for (  final RpslAttribute attribute : rpslObject.getAttributes()) {
    if (BRIEF_ATTRIBUTES.contains(attribute.getType())) {
      newAttributes.add(attribute);
    }
  }
  if (newAttributes.isEmpty()) {
    return null;
  }
  return new RpslAttributes(newAttributes);
}
Program: 161220
Project: 161220
Buggy source:
@Test public void map_abuseContact() throws XMLStreamException {
  final AbuseResources result=subject.mapAbuseContact("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  assertThat(result.getAbuseContact().getEmail(),is("String_Node_Str"));
  assertThat(result.getLink().getHref(),is("String_Node_Str"));
  assertThat(result.getParameters().getPrimaryKey().getValue(),is("String_Node_Str"));
  assertThat(result.getParameters().getSources().getSources().get(0).getId(),is("String_Node_Str"));
  assertThat(result.getService(),is("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void map_abuseContact() throws XMLStreamException {
  final AbuseResources result=subject.mapAbuseContact("String_Node_Str","String_Node_Str",Lists.newArrayList(new RpslAttribute("String_Node_Str","String_Node_Str"),new RpslAttribute("String_Node_Str","String_Node_Str")));
  assertThat(result.getAbuseContact().getEmail(),is("String_Node_Str"));
  assertThat(result.getLink().getHref(),is("String_Node_Str"));
  assertThat(result.getParameters().getPrimaryKey().getValue(),is("String_Node_Str"));
  assertThat(result.getParameters().getSources().getSources().get(0).getId(),is("String_Node_Str"));
  assertThat(result.getService(),is("String_Node_Str"));
}
Program: 161221
Project: 161221
Buggy source:
@Transactional public AuthoritativeResource load(final Logger logger,final String source){
  final Set<CIString> autNums=Sets.newHashSet();
  final IntervalMap<Ipv4Resource,Ipv4Resource> inetnums=new NestedIntervalMap<>();
  final IntervalMap<Ipv6Resource,Ipv6Resource> inet6nums=new NestedIntervalMap<>();
  jdbcTemplate.query("String_Node_Str",new RowCallbackHandler(){
    @Override public void processRow(    ResultSet rs) throws SQLException {
      String resource=rs.getString(1);
      if (resource.startsWith("String_Node_Str")) {
        autNums.add(CIString.ciString(resource));
      }
 else       if (resource.indexOf(':') >= 0) {
        Ipv6Resource ipv6Resource=Ipv6Resource.parseIPv6Resource(resource);
        inet6nums.put(ipv6Resource,ipv6Resource);
      }
 else {
        Ipv4Resource ipv4Resource=Ipv4Resource.parseIPv4Resource(resource);
        inetnums.put(ipv4Resource,ipv4Resource);
      }
    }
  }
,source);
  return new AuthoritativeResource(logger,autNums,inetnums,inet6nums);
}

Fixed version (ground truth):
public AuthoritativeResource load(final Logger logger,final String source){
  final Set<CIString> autNums=Sets.newHashSet();
  final IntervalMap<Ipv4Resource,Ipv4Resource> inetnums=new NestedIntervalMap<>();
  final IntervalMap<Ipv6Resource,Ipv6Resource> inet6nums=new NestedIntervalMap<>();
  jdbcTemplate.query("String_Node_Str",new RowCallbackHandler(){
    @Override public void processRow(    ResultSet rs) throws SQLException {
      String resource=rs.getString(1);
      if (resource.startsWith("String_Node_Str")) {
        autNums.add(CIString.ciString(resource));
      }
 else       if (resource.indexOf(':') >= 0) {
        Ipv6Resource ipv6Resource=Ipv6Resource.parseIPv6Resource(resource);
        inet6nums.put(ipv6Resource,ipv6Resource);
      }
 else {
        Ipv4Resource ipv4Resource=Ipv4Resource.parseIPv4Resource(resource);
        inetnums.put(ipv4Resource,ipv4Resource);
      }
    }
  }
,source);
  return new AuthoritativeResource(logger,autNums,inetnums,inet6nums);
}
Program: 161222
Project: 161222
Buggy source:
@Transactional public void store(final String source,final AuthoritativeResource authoritativeResource){
  jdbcTemplate.update("String_Node_Str",source);
  final List<String> resources=authoritativeResource.getResources();
  jdbcTemplate.batchUpdate("String_Node_Str",new BatchPreparedStatementSetter(){
    @Override public void setValues(    final PreparedStatement ps,    final int i) throws SQLException {
      ps.setString(1,source);
      ps.setString(2,resources.get(i));
    }
    @Override public int getBatchSize(){
      return resources.size();
    }
  }
);
}

Fixed version (ground truth):
public void store(final String source,final AuthoritativeResource authoritativeResource){
  jdbcTemplate.update("String_Node_Str",source);
  final List<String> resources=authoritativeResource.getResources();
  jdbcTemplate.batchUpdate("String_Node_Str",new BatchPreparedStatementSetter(){
    @Override public void setValues(    final PreparedStatement ps,    final int i) throws SQLException {
      ps.setString(1,source);
      ps.setString(2,resources.get(i));
    }
    @Override public int getBatchSize(){
      return resources.size();
    }
  }
);
}
Program: 161223
Project: 161223
Buggy source:
@Autowired public AuthoritativeResourceData(@Value("String_Node_Str") final List<String> grsSourceNames,final ResourceDataDao resourceDataDao,final DailyScheduler dailyScheduler){
  this.resourceDataDao=resourceDataDao;
  this.dailyScheduler=dailyScheduler;
  this.sourceNames=Sets.newHashSet(Iterables.transform(grsSourceNames,new Function<String,String>(){
    @Nullable @Override public String apply(    @Nullable String input){
      return input.toLowerCase().replace("String_Node_Str","String_Node_Str");
    }
  }
));
}

Fixed version (ground truth):
@Autowired public AuthoritativeResourceData(@Value("String_Node_Str") final List<String> grsSourceNames,final ResourceDataDao resourceDataDao,final DailySchedulerDao dailySchedulerDao,DateTimeProvider dateTimeProvider){
  this.resourceDataDao=resourceDataDao;
  this.dailySchedulerDao=dailySchedulerDao;
  this.dateTimeProvider=dateTimeProvider;
  this.sourceNames=Sets.newHashSet(Iterables.transform(grsSourceNames,new Function<String,String>(){
    @Nullable @Override public String apply(    @Nullable String input){
      return input.toLowerCase().replace("String_Node_Str","String_Node_Str");
    }
  }
));
}
Program: 161224
Project: 161224
Buggy source:
@Scheduled(fixedDelay=REFRESH_DELAY) synchronized public void refreshAuthoritativeResourceCache(){
  final long lastImportTime=dailyScheduler.getDailyTaskFinishTime(AuthoritativeResourceImportTask.class);
  if (lastImportTime > lastRefresh) {
    LOGGER.debug("String_Node_Str",new LocalDateTime(lastImportTime),new LocalDateTime(lastRefresh));
    lastRefresh=lastImportTime;
    for (    final String sourceName : sourceNames) {
      try {
        LOGGER.debug("String_Node_Str",sourceName);
        authoritativeResourceCache.put(sourceName,resourceDataDao.load(LOGGER,sourceName));
      }
 catch (      RuntimeException e) {
        LOGGER.error("String_Node_Str",sourceName,e);
      }
    }
  }
}

Fixed version (ground truth):
@Scheduled(fixedDelay=REFRESH_DELAY) synchronized public void refreshAuthoritativeResourceCache(){
  final LocalDate date=dateTimeProvider.getCurrentDate();
  final long lastImportTime=dailySchedulerDao.getDailyTaskFinishTime(date,AuthoritativeResourceImportTask.class);
  if (lastImportTime > lastRefresh) {
    LOGGER.debug("String_Node_Str",new LocalDateTime(lastImportTime),new LocalDateTime(lastRefresh));
    lastRefresh=lastImportTime;
    for (    final String sourceName : sourceNames) {
      try {
        LOGGER.debug("String_Node_Str",sourceName);
        authoritativeResourceCache.put(sourceName,resourceDataDao.load(LOGGER,sourceName));
      }
 catch (      RuntimeException e) {
        LOGGER.error("String_Node_Str",sourceName,e);
      }
    }
  }
}
Program: 161225
Project: 161225
Buggy source:
@Autowired public DailyScheduler(final DateTimeProvider dateTimeProvider,@Qualifier("String_Node_Str") final DataSource internalsDataSource){
  this.dateTimeProvider=dateTimeProvider;
  this.internalsTemplate=new JdbcTemplate(internalsDataSource);
}

Fixed version (ground truth):
@Autowired public DailyScheduler(final DateTimeProvider dateTimeProvider,DailySchedulerDao dailySchedulerDao){
  this.dateTimeProvider=dateTimeProvider;
  this.dailySchedulerDao=dailySchedulerDao;
}
Program: 161226
Project: 161226
Buggy source:
@Scheduled(cron="String_Node_Str") public void executeScheduledTasks(){
  final String date=dateTimeProvider.getCurrentDate().toString();
  final String hostName=Hosts.getLocalHost().getHostName();
  for (  final DailyScheduledTask task : scheduledTasks) {
    final String taskName=task.getClass().getSimpleName();
    if (!acquireDailyTask(date,taskName,hostName)) {
      continue;
    }
    final Stopwatch stopwatch=new Stopwatch().start();
    try {
      LOGGER.debug("String_Node_Str",task);
      task.run();
      internalsTemplate.update("String_Node_Str",System.currentTimeMillis(),date,taskName);
    }
 catch (    RuntimeException e) {
      LOGGER.error("String_Node_Str",task,e);
    }
 finally {
      LOGGER.info("String_Node_Str",task,stopwatch.stop());
    }
  }
  final int deletedRows=internalsTemplate.update("String_Node_Str",date);
  LOGGER.info("String_Node_Str",date,deletedRows);
}

Fixed version (ground truth):
@Scheduled(cron="String_Node_Str") public void executeScheduledTasks(){
  final LocalDate date=dateTimeProvider.getCurrentDate();
  final String hostName=Hosts.getLocalHost().getHostName();
  for (  final DailyScheduledTask task : scheduledTasks) {
    if (!dailySchedulerDao.acquireDailyTask(date,task.getClass(),hostName)) {
      continue;
    }
    final Stopwatch stopwatch=new Stopwatch().start();
    try {
      LOGGER.debug("String_Node_Str",task);
      task.run();
      dailySchedulerDao.markTaskDone(System.currentTimeMillis(),date,task.getClass());
    }
 catch (    RuntimeException e) {
      LOGGER.error("String_Node_Str",task,e);
    }
 finally {
      LOGGER.info("String_Node_Str",task,stopwatch.stop());
    }
  }
  final int deletedRows=dailySchedulerDao.removeOldScheduledEntries(date);
  LOGGER.info("String_Node_Str",date,deletedRows);
}
Program: 161227
Project: 161227
Buggy source:
@Override public String call(){
  final Class<?> taskClass;
  try {
    taskClass=Class.forName(className);
  }
 catch (  ClassNotFoundException e) {
    return "String_Node_Str" + className + "String_Node_Str";
  }
  dailyScheduler.removeFinishedScheduledTask(taskClass);
  dailyScheduler.executeScheduledTasks();
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String call(){
  final Class<?> taskClass;
  try {
    taskClass=Class.forName(className);
  }
 catch (  ClassNotFoundException e) {
    return "String_Node_Str" + className + "String_Node_Str";
  }
  dailySchedulerDao.removeFinishedScheduledTask(taskClass);
  dailyScheduler.executeScheduledTasks();
  return "String_Node_Str";
}
Program: 161228
Project: 161228
Buggy source:
@ManagedOperation(description="String_Node_Str") @ManagedOperationParameters({@ManagedOperationParameter(name="String_Node_Str",description="String_Node_Str")}) public String runDailyScheduledTasks(final String className){
  return invokeOperation("String_Node_Str","String_Node_Str",new Callable<String>(){
    @Override public String call(){
      final Class<?> taskClass;
      try {
        taskClass=Class.forName(className);
      }
 catch (      ClassNotFoundException e) {
        return "String_Node_Str" + className + "String_Node_Str";
      }
      dailyScheduler.removeFinishedScheduledTask(taskClass);
      dailyScheduler.executeScheduledTasks();
      return "String_Node_Str";
    }
  }
);
}

Fixed version (ground truth):
@ManagedOperation(description="String_Node_Str") @ManagedOperationParameters({@ManagedOperationParameter(name="String_Node_Str",description="String_Node_Str")}) public String runDailyScheduledTasks(final String className){
  return invokeOperation("String_Node_Str","String_Node_Str",new Callable<String>(){
    @Override public String call(){
      final Class<?> taskClass;
      try {
        taskClass=Class.forName(className);
      }
 catch (      ClassNotFoundException e) {
        return "String_Node_Str" + className + "String_Node_Str";
      }
      dailySchedulerDao.removeFinishedScheduledTask(taskClass);
      dailyScheduler.executeScheduledTasks();
      return "String_Node_Str";
    }
  }
);
}
Program: 161229
Project: 161229
Buggy source:
@Autowired public DailySchedulerJmx(final DailyScheduler dailyScheduler){
  super(LOGGER);
  this.dailyScheduler=dailyScheduler;
}

Fixed version (ground truth):
@Autowired public DailySchedulerJmx(final DailyScheduler dailyScheduler,DailySchedulerDao dailySchedulerDao){
  super(LOGGER);
  this.dailyScheduler=dailyScheduler;
  this.dailySchedulerDao=dailySchedulerDao;
}
Program: 161230
Project: 161230
Buggy source:
@Before public void setUp(){
  subject=new AuthoritativeResourceData(Arrays.asList("String_Node_Str"),resourceDataDao,dailyScheduler);
}

Fixed version (ground truth):
@Before public void setUp(){
  subject=new AuthoritativeResourceData(Arrays.asList("String_Node_Str"),resourceDataDao,dailySchedulerDao,dateTimeProvider);
}