nus-yam/ex-repair huggingface dataset:
Program: 24891
Project: 24891
Buggy source:
public void finish() throws IOException {
  final AggregateLinkingScoreRecord aggregateRecord=aggregateRecordB.build();
  writer.writeBootstrapData("String_Node_Str",ImmutableMap.of(F1,aggregateRecord.f1s(),PRECISION,aggregateRecord.precisions(),RECALL,aggregateRecord.recalls()),new File(outputDir,"String_Node_Str"));
  final ImmutableMap<Symbol,AggregateLinkingScoreRecord> aggregateRecordsPerEvent=aggregateRecordsPerEventTypeB.build();
  for (  Symbol eventType : aggregateRecordsPerEvent.keySet()) {
    AggregateLinkingScoreRecord recordForEventType=aggregateRecordsPerEvent.get(eventType);
    writer.writeBootstrapData("String_Node_Str" + eventType.asString(),ImmutableMap.of(F1,recordForEventType.f1s(),PRECISION,recordForEventType.precisions(),RECALL,recordForEventType.recalls()),new File(outputDir,"String_Node_Str" + eventType.asString()));
  }
}

Fixed version (ground truth):
public void finish() throws IOException {
{
    final ImmutableList<AggregateLinkingScoreRecord> aggregateRecords=aggregateRecordsB.build();
    final ImmutableList<Double> f1s=ImmutableList.copyOf(transform(aggregateRecords,AggregateLinkingScoreRecordFunctions.f1()));
    final ImmutableList<Double> precisions=ImmutableList.copyOf(transform(aggregateRecords,AggregateLinkingScoreRecordFunctions.precision()));
    final ImmutableList<Double> recalls=ImmutableList.copyOf(transform(aggregateRecords,AggregateLinkingScoreRecordFunctions.recall()));
    writer.writeBootstrapData("String_Node_Str",ImmutableMap.of(F1,new ImmutableListMultimap.Builder<String,Double>().putAll("String_Node_Str",f1s).build(),PRECISION,new ImmutableListMultimap.Builder<String,Double>().putAll("String_Node_Str",precisions).build(),RECALL,new ImmutableListMultimap.Builder<String,Double>().putAll("String_Node_Str",recalls).build()),new File(outputDir,"String_Node_Str"));
  }
{
    final ImmutableListMultimap<Symbol,AggregateLinkingScoreRecord> aggregateRecordsPerEvent=aggregateRecordsPerEventTypeB.build();
    for (    Symbol eventType : aggregateRecordsPerEvent.keySet()) {
      final ImmutableList<AggregateLinkingScoreRecord> aggregateRecordsForEvent=aggregateRecordsPerEvent.get(eventType);
      final ImmutableList<Double> f1s=ImmutableList.copyOf(transform(aggregateRecordsForEvent,AggregateLinkingScoreRecordFunctions.f1()));
      final ImmutableList<Double> precisions=ImmutableList.copyOf(transform(aggregateRecordsForEvent,AggregateLinkingScoreRecordFunctions.precision()));
      final ImmutableList<Double> recalls=ImmutableList.copyOf(transform(aggregateRecordsForEvent,AggregateLinkingScoreRecordFunctions.recall()));
      writer.writeBootstrapData("String_Node_Str",ImmutableMap.of(F1,new ImmutableListMultimap.Builder<String,Double>().putAll("String_Node_Str",f1s).build(),PRECISION,new ImmutableListMultimap.Builder<String,Double>().putAll("String_Node_Str",precisions).build(),RECALL,new ImmutableListMultimap.Builder<String,Double>().putAll("String_Node_Str",recalls).build()),new File(new File(outputDir,"String_Node_Str"),eventType.asString()));
    }
  }
}
Program: 24892
Project: 24892
Buggy source:
@Override public String apply(final DocLevelEventArg input){
  return input.eventArgumentType().asString() + "String_Node_Str" + input.eventArgumentType().asString();
}

Fixed version (ground truth):
@Override public String apply(final DocLevelEventArg input){
  return input.eventType().asString() + "String_Node_Str" + input.eventArgumentType().asString();
}
Program: 24893
Project: 24893
Buggy source:
@javax.inject.Inject public ResponsesAndLinkingFromKBPExtractor(final Optional<ImmutableMap<Symbol,File>> coreNLPDocs,final CoreNLPXMLLoader coreNLPXMLLoader,final EREToKBPEventOntologyMapper ontologyMapper,@Assisted File outputDir){
  this.coreNLPDocs=coreNLPDocs;
  this.coreNLPXMLLoader=coreNLPXMLLoader;
  this.ontologyMapper=ontologyMapper;
  this.outputDir=outputDir;
}

Fixed version (ground truth):
@javax.inject.Inject public ResponsesAndLinkingFromKBPExtractor(@CoreNLPProcessedRawDocsP final Optional<ImmutableMap<Symbol,File>> coreNLPDocs,final CoreNLPXMLLoader coreNLPXMLLoader,final EREToKBPEventOntologyMapper ontologyMapper,@Assisted File outputDir){
  this.coreNLPDocs=coreNLPDocs;
  this.coreNLPXMLLoader=coreNLPXMLLoader;
  this.ontologyMapper=ontologyMapper;
  this.outputDir=outputDir;
}
Program: 24894
Project: 24894
Buggy source:
SimpleEventOntologyMapper getOntologyMapper(Parameters params) throws IOException {
  return EREToKBPEventOntologyMapper.create2016Mapping();
}

Fixed version (ground truth):
@Provides SimpleEventOntologyMapper getOntologyMapper(Parameters params) throws IOException {
  return EREToKBPEventOntologyMapper.create2016Mapping();
}
Program: 24895
Project: 24895
Buggy source:
@Override protected void configure(){
  bind(Parameters.class).toInstance(params);
  MapBinder.newMapBinder(binder(),TypeLiteral.get(String.class),new TypeLiteral<ScoringEventObserver<DocLevelEventArg,DocLevelEventArg>>(){
  }
);
  try {
    bind(EREToKBPEventOntologyMapper.class).toInstance(EREToKBPEventOntologyMapper.create2016Mapping());
  }
 catch (  IOException ioe) {
    throw new TACKBPEALException(ioe);
  }
  install(new ResponsesAndLinkingFromEREExtractor.Module());
}

Fixed version (ground truth):
@Override protected void configure(){
  bind(Parameters.class).toInstance(params);
  MapBinder.newMapBinder(binder(),TypeLiteral.get(String.class),new TypeLiteral<ScoringEventObserver<DocLevelEventArg,DocLevelEventArg>>(){
  }
);
  try {
    bind(EREToKBPEventOntologyMapper.class).toInstance(EREToKBPEventOntologyMapper.create2016Mapping());
  }
 catch (  IOException ioe) {
    throw new TACKBPEALException(ioe);
  }
  install(new ResponsesAndLinkingFromEREExtractor.Module());
  install(new FactoryModuleBuilder().build(ResponsesAndLinkingFromKBPExtractorFactory.class));
}
Program: 24897
Project: 24897
Buggy source:
private ImmutableAggregate2015ScoringResult computeAggregateScore(final List<EALScorer2015Style.Result> perDocResults){
  final ImmutableAggregate2015ArgScoringResult argScores=computeArgScores(perDocResults);
  final ImmutableAggregate2015LinkScoringResult linkScores=computeLinkScores(perDocResults);
  final double aggregateScore=(1.0 - lambda) * argScores.overall() + lambda * linkScores.overall();
  return ImmutableAggregate2015ScoringResult.builder().argument(argScores).linking(linkScores).overall(100.0 * aggregateScore).build();
}

Fixed version (ground truth):
private ImmutableAggregate2015ScoringResult computeAggregateScore(final List<EALScorer2015Style.Result> perDocResults){
  final ImmutableAggregate2015ArgScoringResult argScores=computeArgScores(perDocResults);
  final ImmutableAggregate2015LinkScoringResult linkScores=computeLinkScores(perDocResults);
  final double aggregateScore=(1.0 - lambda) * argScores.overall() + lambda * linkScores.overall();
  return ImmutableAggregate2015ScoringResult.builder().argument(argScores).linking(linkScores).overall(aggregateScore).build();
}
Program: 24898
Project: 24898
Buggy source:
public static KBP2015Scorer fromParameters(Parameters params,Map<String,SimpleResultWriter> additionalResultWriters,Map<String,BootstrappedResultWriterSource> additionalBootstrapWriters){
  final EALScorer2015Style documentScorer=EALScorer2015Style.create(params);
  final ImmutableMap.Builder<String,SimpleResultWriter> resultWriters=ImmutableMap.builder();
  final AggregateResultWriter aggregateWriter=new AggregateResultWriter(documentScorer.lambda());
  resultWriters.put("String_Node_Str",aggregateWriter);
  resultWriters.put("String_Node_Str",new PerDocResultWriter(documentScorer.lambda()));
  resultWriters.put("String_Node_Str",new ByEventTypeResultWriter());
  resultWriters.putAll(additionalResultWriters);
  final ImmutableMap.Builder<String,BootstrappedResultWriterSource> bootstrapWriters=ImmutableMap.builder();
  bootstrapWriters.put("String_Node_Str",aggregateWriter.asBootstrappedResultWriterSource());
  bootstrapWriters.put("String_Node_Str",BootstrappedPerEventResultWriter.source());
  bootstrapWriters.putAll(additionalBootstrapWriters);
  return new KBP2015Scorer(documentScorer,resultWriters.build(),additionalBootstrapWriters,params.getOptionalInteger("String_Node_Str"),params.getOptionalInteger("String_Node_Str"));
}

Fixed version (ground truth):
public static KBP2015Scorer fromParameters(Parameters params,Map<String,SimpleResultWriter> additionalResultWriters,Map<String,BootstrappedResultWriterSource> additionalBootstrapWriters){
  final EALScorer2015Style documentScorer=EALScorer2015Style.create(params);
  final ImmutableMap.Builder<String,SimpleResultWriter> resultWriters=ImmutableMap.builder();
  final AggregateResultWriter aggregateWriter=new AggregateResultWriter(documentScorer.lambda());
  resultWriters.put("String_Node_Str",aggregateWriter);
  resultWriters.put("String_Node_Str",new PerDocResultWriter(documentScorer.lambda()));
  resultWriters.put("String_Node_Str",new ByEventTypeResultWriter());
  resultWriters.putAll(additionalResultWriters);
  final ImmutableMap.Builder<String,BootstrappedResultWriterSource> bootstrapWriters=ImmutableMap.builder();
  bootstrapWriters.put("String_Node_Str",aggregateWriter.asBootstrappedResultWriterSource());
  bootstrapWriters.put("String_Node_Str",BootstrappedPerEventResultWriter.source());
  bootstrapWriters.putAll(additionalBootstrapWriters);
  final Optional<Integer> bootstrapSeed=params.getOptionalInteger("String_Node_Str");
  if (bootstrapSeed.isPresent()) {
    log.info("String_Node_Str");
  }
  return new KBP2015Scorer(documentScorer,resultWriters.build(),bootstrapWriters.build(),bootstrapSeed,params.getOptionalInteger("String_Node_Str"));
}
Program: 24899
Project: 24899
Buggy source:
abstract double truePositives();

Fixed version (ground truth):
public abstract double truePositives();
Program: 24900
Project: 24900
Buggy source:
abstract double falseNegatives();

Fixed version (ground truth):
public abstract double falseNegatives();
Program: 24901
Project: 24901
Buggy source:
abstract double precision();

Fixed version (ground truth):
public abstract double precision();
Program: 24902
Project: 24902
Buggy source:
abstract double recall();

Fixed version (ground truth):
public abstract double recall();
Program: 24903
Project: 24903
Buggy source:
abstract double overall();

Fixed version (ground truth):
public abstract double overall();
Program: 24904
Project: 24904
Buggy source:
abstract double falsePositives();

Fixed version (ground truth):
public abstract double falsePositives();
Program: 24905
Project: 24905
Buggy source:
abstract ImmutableAggregate2015ArgScoringResult argument();

Fixed version (ground truth):
public abstract ImmutableAggregate2015ArgScoringResult argument();
Program: 24906
Project: 24906
Buggy source:
abstract ImmutableAggregate2015LinkScoringResult linking();

Fixed version (ground truth):
public abstract ImmutableAggregate2015LinkScoringResult linking();
Program: 24907
Project: 24907
Buggy source:
abstract double overall();

Fixed version (ground truth):
public abstract double overall();
Program: 24908
Project: 24908
Buggy source:
private void writeOutput(final List<EALScorer2015Style.Result> perDocResults,final File baseOutputDir) throws IOException {
  writeBothScore(perDocResults,baseOutputDir);
  final Multiset<Symbol> eventTypesSeen=HashMultiset.create();
  for (  final EALScorer2015Style.Result perDocResult : perDocResults) {
    for (    final TypeRoleFillerRealis trfr : perDocResult.argResult().argumentScoringAlignment().allEquivalenceClassess()) {
      eventTypesSeen.add(trfr.type());
    }
  }
  final File eventTypesDir=new File(baseOutputDir,"String_Node_Str");
  for (  final Multiset.Entry<Symbol> typeEntry : Multisets.copyHighestCountFirst(eventTypesSeen).entrySet()) {
    final Symbol type=typeEntry.getElement();
    final Function<EALScorer2015Style.ArgResult,EALScorer2015Style.ArgResult> filterFunction=new Function<EALScorer2015Style.ArgResult,EALScorer2015Style.ArgResult>(){
      @Override public EALScorer2015Style.ArgResult apply(      final EALScorer2015Style.ArgResult input){
        return input.copyFiltered(compose(equalTo(type),TypeRoleFillerRealis.Type));
      }
    }
;
    writeArgumentScoresForTransformedResults(perDocResults,filterFunction,new File(eventTypesDir,type.asString()));
  }
}

Fixed version (ground truth):
private void writeOutput(final List<EALScorer2015Style.Result> perDocResults,final File baseOutputDir) throws IOException {
  writeBothScore(perDocResults,baseOutputDir);
  final Multiset<Symbol> eventTypesSeen=HashMultiset.create();
  for (  final EALScorer2015Style.Result perDocResult : perDocResults) {
    for (    final TypeRoleFillerRealis trfr : perDocResult.argResult().argumentScoringAlignment().allEquivalenceClassess()) {
      eventTypesSeen.add(trfr.type());
    }
  }
  final File eventTypesDir=new File(baseOutputDir,"String_Node_Str");
  for (  final Multiset.Entry<Symbol> typeEntry : Multisets.copyHighestCountFirst(eventTypesSeen).entrySet()) {
    final Symbol type=typeEntry.getElement();
    final Function<EALScorer2015Style.ArgResult,EALScorer2015Style.ArgResult> filterFunction=new Function<EALScorer2015Style.ArgResult,EALScorer2015Style.ArgResult>(){
      @Override public EALScorer2015Style.ArgResult apply(      final EALScorer2015Style.ArgResult input){
        return input.copyFiltered(compose(equalTo(type),TypeRoleFillerRealis.Type));
      }
    }
;
    final File eventTypeDir=new File(eventTypesDir,type.asString());
    eventTypeDir.mkdirs();
    writeArgumentScoresForTransformedResults(perDocResults,filterFunction,eventTypeDir);
  }
}
Program: 24909
Project: 24909
Buggy source:
private static Response transformResponsePerson(Response r){
  if (r.role().equalTo(VEHICLE_ROLE)) {
    r=r.copyWithSwappedRole(INSTRUMENT_ROLE);
  }
  if (r.role().equalTo(ARTIFACT_ROLE)) {
    r=r.copyWithSwappedRole(PERSON_ROLE);
  }
  if (r.type().equalTo(MOVEMENT_TRANSPORT)) {
    return r.copyWithSwappedRole(MOVEMENT_TRANSPORT_PERSON);
  }
 else {
    return r;
  }
}

Fixed version (ground truth):
private static Response transformResponsePerson(Response r){
  if (r.role().equalTo(VEHICLE_ROLE)) {
    r=r.copyWithSwappedRole(INSTRUMENT_ROLE);
  }
  if (r.role().equalTo(ARTIFACT_ROLE)) {
    r=r.copyWithSwappedRole(PERSON_ROLE);
  }
  if (r.type().equalTo(MOVEMENT_TRANSPORT)) {
    return r.copyWithSwappedType(MOVEMENT_TRANSPORT_PERSON);
  }
 else {
    return r;
  }
}
Program: 24910
Project: 24910
Buggy source:
public EventArgScoringAlignment<EquivClassType> copyFiltered(final Predicate<EquivClassType> filter){
  return new EventArgScoringAlignment<EquivClassType>(docID(),argumentOutput,answerKey,Iterables.filter(truePositiveECs,filter),Iterables.filter(falseNegativeECs,filter),Iterables.filter(falseNegativeECs,filter),Iterables.filter(unassessed,filter),Multimaps.filterKeys(ecsToAnswerKey,filter),Multimaps.filterKeys(ecsToSystem,filter));
}

Fixed version (ground truth):
public EventArgScoringAlignment<EquivClassType> copyFiltered(final Predicate<EquivClassType> filter){
  return new EventArgScoringAlignment<EquivClassType>(docID(),argumentOutput,answerKey,Iterables.filter(truePositiveECs,filter),Iterables.filter(falsePositiveECs,filter),Iterables.filter(falseNegativeECs,filter),Iterables.filter(unassessed,filter),Multimaps.filterKeys(ecsToAnswerKey,filter),Multimaps.filterKeys(ecsToSystem,filter));
}
Program: 24911
Project: 24911
Buggy source:
@Override public boolean apply(final Response input){
  return input.type().equalTo(TRANSPORT_SYMBOL) && !input.role().equalTo(PRICE);
}

Fixed version (ground truth):
@Override public boolean apply(final Response input){
  return input.type().equalTo(MOVEMENT_TRANSPORT) && !input.role().equalTo(PRICE_ROLE);
}
Program: 24912
Project: 24912
Buggy source:
private static Response transformResponsePerson(Response r){
  if (r.role().equalTo(ARTIFACT)) {
    r=r.copyWithSwappedRole(INSTRUMENT);
  }
  if (r.type().equalTo(TRANSPORT_SYMBOL)) {
    return r.copyWithSwappedRole(PERSON_SYMBOL);
  }
 else {
    return r;
  }
}

Fixed version (ground truth):
private static Response transformResponsePerson(Response r){
  if (r.role().equalTo(VEHICLE_ROLE)) {
    r=r.copyWithSwappedRole(INSTRUMENT_ROLE);
  }
  if (r.role().equalTo(ARTIFACT_ROLE)) {
    r=r.copyWithSwappedRole(PERSON_ROLE);
  }
  if (r.type().equalTo(MOVEMENT_TRANSPORT)) {
    return r.copyWithSwappedRole(MOVEMENT_TRANSPORT_PERSON);
  }
 else {
    return r;
  }
}
Program: 24913
Project: 24913
Buggy source:
@Override public Predicate<AssessedResponse> assessedFilter(){
  return Predicates.alwaysTrue();
}

Fixed version (ground truth):
@Override public Predicate<AssessedResponse> assessedFilter(){
  return new Predicate<AssessedResponse>(){
    @Override public boolean apply(    final AssessedResponse input){
      return input.response().type() == MOVEMENT_TRANSPORT && input.isCorrectUpToInexactJustifications() && !input.response().role().equalTo(PRICE_ROLE);
    }
  }
;
}
Program: 24914
Project: 24914
Buggy source:
private static Response transformResponseArtifact(Response r){
  if (r.role().equalTo(VEHICLE)) {
    r=r.copyWithSwappedRole(INSTRUMENT);
  }
  if (r.type().equalTo(TRANSPORT_SYMBOL)) {
    return r.copyWithSwappedType(ARTIFACT_SYMBOL);
  }
 else {
    return r;
  }
}

Fixed version (ground truth):
private static Response transformResponseArtifact(Response r){
  if (r.role().equalTo(VEHICLE_ROLE)) {
    r=r.copyWithSwappedRole(INSTRUMENT_ROLE);
  }
  if (r.type().equalTo(MOVEMENT_TRANSPORT)) {
    return r.copyWithSwappedType(MOVEMENT_TRANSPORT_ARTIFACT);
  }
 else {
    return r;
  }
}
Program: 24915
Project: 24915
Buggy source:
@Override public Predicate<Response> unassessedFilter(){
  return Predicates.not(CorrectTransportFilter.unassessedFilter());
}

Fixed version (ground truth):
@Override public Predicate<Response> unassessedFilter(){
  return new Predicate<Response>(){
    @Override public boolean apply(    final Response input){
      return input.type().equalTo(MOVEMENT_TRANSPORT) && !input.role().equalTo(PRICE_ROLE);
    }
  }
;
}
Program: 24917
Project: 24917
Buggy source:
public LinkingScore scoreLinking(AnswerKey answerKey,Set<TypeRoleFillerRealis> linkableEquivalenceClasses,ResponseLinking referenceLinking,ResponseLinking systemLinking){
  log.info("String_Node_Str",answerKey.docId());
  checkArgument(answerKey.docId() == systemLinking.docID(),"String_Node_Str" + "String_Node_Str",systemLinking.docID(),answerKey.docId());
  checkArgument(answerKey.docId() == referenceLinking.docID(),"String_Node_Str" + "String_Node_Str",answerKey.docId(),referenceLinking.docID());
  checkArgument(systemLinking.docID() == systemLinking.docID(),"String_Node_Str" + "String_Node_Str",systemLinking.docID(),systemLinking.docID());
  checkArgument(referenceLinking.incompleteResponses().isEmpty(),"String_Node_Str",referenceLinking.docID(),referenceLinking.incompleteResponses().size());
  checkArgument(systemLinking.incompleteResponses().isEmpty(),"String_Node_Str",systemLinking.docID());
  final EventArgumentLinking referenceArgumentLinking=aligner.align(referenceLinking,answerKey);
  final EventArgumentLinking systemArgumentLinking=aligner.align(systemLinking,answerKey);
  final EventArgumentLinking filteredReferenceArgumentLinking=referenceArgumentLinking.filteredCopy(in(linkableEquivalenceClasses));
  final EventArgumentLinking filteredSystemArgumentLinking=systemArgumentLinking.filteredCopy(in(linkableEquivalenceClasses));
  return LinkingScore.from(referenceLinking,referenceArgumentLinking,systemLinking,systemArgumentLinking,linkF1.score(filteredSystemArgumentLinking.linkedAsSetOfSets(),filteredReferenceArgumentLinking.linkedAsSetOfSets()));
}

Fixed version (ground truth):
public LinkingScore scoreLinking(ScoringData scoringData){
  log.info("String_Node_Str",scoringData.answerKey().get().docId());
  checkArgument(scoringData.systemLinking().isPresent());
  checkArgument(scoringData.referenceLinking().isPresent());
  checkArgument(scoringData.answerKey().isPresent());
  final ResponseLinking referenceLinking=scoringData.referenceLinking().get();
  final AnswerKey answerKey=scoringData.answerKey().get();
  final ResponseLinking systemLinking=deleteIncorrectResponses(scoringData.systemOutput().get(),answerKey).apply(scoringData.systemLinking().get());
  checkArgument(referenceLinking.incompleteResponses().isEmpty(),"String_Node_Str",referenceLinking.docID(),referenceLinking.incompleteResponses().size());
  checkArgument(systemLinking.incompleteResponses().isEmpty(),"String_Node_Str",systemLinking.docID());
  final EventArgumentLinking referenceArgumentLinking=aligner.align(referenceLinking,answerKey);
  final EventArgumentLinking systemArgumentLinking=aligner.align(systemLinking,answerKey);
  final EventArgumentLinking filteredReferenceArgumentLinking=referenceArgumentLinking.filteredCopy(REALIS_IS_NOT_GENERIC);
  final EventArgumentLinking filteredSystemArgumentLinking=systemArgumentLinking.filteredCopy(REALIS_IS_NOT_GENERIC);
  return LinkingScore.from(referenceLinking,referenceArgumentLinking,systemLinking,systemArgumentLinking,linkF1.score(filteredSystemArgumentLinking.linkedAsSetOfSets(),filteredReferenceArgumentLinking.linkedAsSetOfSets()));
}
Program: 24919
Project: 24919
Buggy source:
private static ResponseMapping computeResponseMapping(SystemOutput input,Function<KBPString,KBPString> CASNormalizer){
  checkNotNull(input);
  final Function<Response,TypeRoleFillerRealis> trfrFunction=TypeRoleFillerRealis.extractFromSystemResponse(CASNormalizer);
  final ResponseLinking responseLinking=getResponseLinking(input);
  final Set<Response> toKeep=Sets.newHashSet();
  for (  final ResponseSet eventFrame : responseLinking.responseSets()) {
    final Multimap<TypeRoleFillerRealis,Response> groupedResponses=Multimaps.index(input.arguments().responses(),trfrFunction);
    for (    final Map.Entry<TypeRoleFillerRealis,Collection<Response>> group : groupedResponses.asMap().entrySet()) {
      final Collection<Response> competitors=group.getValue();
      final Scored<Response> selected=input.arguments().score(input.arguments().selectFromMultipleSystemResponses(competitors).get());
      toKeep.add(selected.item());
    }
  }
  final ImmutableSet<Response> toDelete=Sets.difference(input.arguments().responses(),toKeep).immutableCopy();
  log.info("String_Node_Str",input.docID(),toDelete.size(),input.arguments().size());
  return ResponseMapping.create(ImmutableMap.<Response,Response>of(),toDelete);
}

Fixed version (ground truth):
private static ResponseMapping computeResponseMapping(SystemOutput input,Function<KBPString,KBPString> CASNormalizer){
  checkNotNull(input);
  final Function<Response,TypeRoleFillerRealis> trfrFunction=TypeRoleFillerRealis.extractFromSystemResponse(CASNormalizer);
  final ResponseLinking responseLinking=getResponseLinking(input);
  final Set<Response> toKeep=Sets.newHashSet();
  for (  final ResponseSet eventFrame : responseLinking.responseSets()) {
    final Multimap<TypeRoleFillerRealis,Response> groupedResponses=Multimaps.index(eventFrame.asSet(),trfrFunction);
    for (    final Map.Entry<TypeRoleFillerRealis,Collection<Response>> group : groupedResponses.asMap().entrySet()) {
      final Collection<Response> competitors=group.getValue();
      final Scored<Response> selected=input.arguments().score(input.arguments().selectFromMultipleSystemResponses(competitors).get());
      toKeep.add(selected.item());
    }
  }
  final ImmutableSet<Response> toDelete=Sets.difference(input.arguments().responses(),toKeep).immutableCopy();
  log.info("String_Node_Str",input.docID(),toDelete.size(),input.arguments().size());
  return ResponseMapping.create(ImmutableMap.<Response,Response>of(),toDelete);
}
Program: 24920
Project: 24920
Buggy source:
@Override public Result computeResponseTransformation(final AnswerKey answerKey){
  final Function<Response,TypeRoleFillerRealis> normalizedFingerprintExtractor=TypeRoleFillerRealis.extractFromSystemResponse(answerKey.corefAnnotation().strictCASNormalizerFunction());
  final ImmutableSet<TypeRoleFillerRealis> trfrsToDelete=responsesToDelete(answerKey);
  final Predicate<Response> isInDeletedTRFR=compose(in(trfrsToDelete),normalizedFingerprintExtractor);
  final ImmutableSet<Response> responsesToDelete=FluentIterable.from(answerKey.allResponses()).filter(isInDeletedTRFR).toSet();
  return Result.create(ImmutableMap.<Response,Response>of(),responsesToDelete);
}

Fixed version (ground truth):
@Override public ResponseMapping computeResponseTransformation(final AnswerKey answerKey){
  final Function<Response,TypeRoleFillerRealis> normalizedFingerprintExtractor=TypeRoleFillerRealis.extractFromSystemResponse(answerKey.corefAnnotation().strictCASNormalizerFunction());
  final ImmutableSet<TypeRoleFillerRealis> trfrsToDelete=responsesToDelete(answerKey);
  final Predicate<Response> isInDeletedTRFR=compose(in(trfrsToDelete),normalizedFingerprintExtractor);
  final ImmutableSet<Response> responsesToDelete=FluentIterable.from(answerKey.allResponses()).filter(isInDeletedTRFR).toSet();
  return ResponseMapping.create(ImmutableMap.<Response,Response>of(),responsesToDelete);
}
Program: 24921
Project: 24921
Buggy source:
@Override public Result computeResponseTransformation(final AnswerKey answerKey){
  final ImmutableMap.Builder<Response,Response> replacements=ImmutableMap.builder();
  for (  final Response response : answerKey.allResponses()) {
    final Optional<Response> fixedResponse=fixLowercaseXInTime(response);
    if (fixedResponse.isPresent()) {
      log.info("String_Node_Str",response.canonicalArgument().string(),fixedResponse.get().canonicalArgument().string());
      replacements.put(response,fixedResponse.get());
    }
  }
  return Result.create(replacements.build(),ImmutableSet.<Response>of());
}

Fixed version (ground truth):
@Override public ResponseMapping computeResponseTransformation(final AnswerKey answerKey){
  final ImmutableMap.Builder<Response,Response> replacements=ImmutableMap.builder();
  for (  final Response response : answerKey.allResponses()) {
    final Optional<Response> fixedResponse=fixLowercaseXInTime(response);
    if (fixedResponse.isPresent()) {
      log.info("String_Node_Str",response.canonicalArgument().string(),fixedResponse.get().canonicalArgument().string());
      replacements.put(response,fixedResponse.get());
    }
  }
  return ResponseMapping.create(replacements.build(),ImmutableSet.<Response>of());
}
Program: 24922
Project: 24922
Buggy source:
public static Function<SystemOutput,SystemOutput> forSystemOutput(){
  return new Function<SystemOutput,SystemOutput>(){
    @Override public SystemOutput apply(    SystemOutput input){
      final ImmutableSet.Builder<Scored<Response>> newResponses=ImmutableSet.builder();
      for (      final Scored<Response> assessedResponse : input.scoredResponses()) {
        newResponses.add(Scored.from(assessedResponse.item().copyWithSwappedRealis(KBPRealis.Actual),assessedResponse.score()));
      }
      return SystemOutput.from(input.docId(),newResponses.build());
    }
  }
;
}

Fixed version (ground truth):
@Deprecated public static Function<SystemOutput,SystemOutput> forSystemOutput(){
  return new Function<SystemOutput,SystemOutput>(){
    @Override public SystemOutput apply(    SystemOutput input){
      final ImmutableSet.Builder<Scored<Response>> newResponses=ImmutableSet.builder();
      for (      final Scored<Response> assessedResponse : input.scoredResponses()) {
        newResponses.add(Scored.from(assessedResponse.item().copyWithSwappedRealis(KBPRealis.Actual),assessedResponse.score()));
      }
      return SystemOutput.from(input.docId(),newResponses.build());
    }
  }
;
}
Program: 24923
Project: 24923
Buggy source:
@Override public Result computeResponseTransformation(final AnswerKey answerKey){
  final Function<Response,TypeRoleFillerRealis> normalizedFingerprintExtractor=TypeRoleFillerRealis.extractFromSystemResponse(answerKey.corefAnnotation().strictCASNormalizerFunction());
  final ImmutableSet<TypeRoleFillerRealis> trfrsToDelete=computeBannedResponseSignatures(answerKey);
  final Predicate<Response> isInDeletedTRFR=compose(in(trfrsToDelete),normalizedFingerprintExtractor);
  final ImmutableSet<Response> responsesToDelete=FluentIterable.from(answerKey.allResponses()).filter(isInDeletedTRFR).toSet();
  return Result.create(ImmutableMap.<Response,Response>of(),responsesToDelete);
}

Fixed version (ground truth):
@Override public ResponseMapping computeResponseTransformation(final AnswerKey answerKey){
  final ImmutableSet<TypeRoleFillerRealis> bannedResponseSignatures=computeBannedResponseSignatures(answerKey);
  final ImmutableSet.Builder<Response> toDelete=ImmutableSet.builder();
  for (  final Response response : answerKey.allResponses()) {
    if (bannedResponseSignatures.contains(responseSignature(response))) {
      toDelete.add(response);
    }
  }
  return ResponseMapping.create(ImmutableMap.<Response,Response>of(),toDelete.build());
}
Program: 24924
Project: 24924
Buggy source:
Result computeResponseTransformation(AnswerKey answerKey);

Fixed version (ground truth):
ResponseMapping computeResponseTransformation(AnswerKey answerKey);
Program: 24925
Project: 24925
Buggy source:
public EventArgScoringAlignment<TypeRoleFillerRealis> score(ScoringData scoringData){
  final ScoringData preprocessorResult=preprocessor.transform(scoringData);
  final Function<Response,TypeRoleFillerRealis> equivalenceClassFunction=TypeRoleFillerRealis.extractFromSystemResponse(scoringData.answerKey().get().corefAnnotation().strictCASNormalizerFunction());
  final StandardScoringAligner<TypeRoleFillerRealis> scoringAligner=StandardScoringAligner.forEquivalenceClassFunction(equivalenceClassFunction);
  return scoringAligner.align(scoringData.answerKey().get(),scoringData.systemOutput().get());
}

Fixed version (ground truth):
public EventArgScoringAlignment<TypeRoleFillerRealis> score(ScoringData scoringData){
  final ScoringData preprocessorResult=preprocessor.transform(scoringData);
  final Function<Response,TypeRoleFillerRealis> equivalenceClassFunction=TypeRoleFillerRealis.extractFromSystemResponse(preprocessorResult.answerKey().get().corefAnnotation().strictCASNormalizerFunction());
  final StandardScoringAligner<TypeRoleFillerRealis> scoringAligner=StandardScoringAligner.forEquivalenceClassFunction(equivalenceClassFunction);
  return scoringAligner.align(preprocessorResult.answerKey().get(),preprocessorResult.systemOutput().get());
}
Program: 24927
Project: 24927
Buggy source:
/** 
 * Replaces one response with another, maintaining the original assessment, if any. The random number generator is used when creating a new coref cluster, if necessary,
 */
public Builder replaceAssessedResponseMaintainingAssessment(final Response original,final Response replacement,final Random rng){
  if (original.equals(replacement)) {
    return this;
  }
  if (annotatedArgs.keySet().contains(original)) {
    final ResponseAssessment assessment=annotatedArgs.get(original).assessment();
    annotatedArgs.remove(original);
    annotatedArgs.put(replacement,AssessedResponse.from(replacement,assessment));
    corefAnnotation.registerCAS(replacement.canonicalArgument(),rng);
  }
 else   if (unannotatedResponses.contains(original)) {
    unannotatedResponses.remove(original);
    if (!annotatedArgs.containsKey(replacement)) {
      unannotatedResponses.add(replacement);
    }
  }
 else {
    throw new RuntimeException("String_Node_Str" + original + "String_Node_Str"+ replacement+ "String_Node_Str"+ original+ "String_Node_Str");
  }
  return this;
}

Fixed version (ground truth):
/** 
 * Replaces one response with another, maintaining the original assessment, if any. The random number generator is used when creating a new coref cluster, if necessary,
 */
public Builder replaceAssessedResponseMaintainingAssessment(final Response original,final Response replacement,final Random rng){
  if (original.equals(replacement)) {
    return this;
  }
  if (annotatedArgs.keySet().contains(original)) {
    final ResponseAssessment assessment=annotatedArgs.get(original).assessment();
    if (annotatedArgs.containsKey(replacement)) {
      final ResponseAssessment assessmentOfReplacement=annotatedArgs.get(replacement).assessment();
      if (!assessmentOfReplacement.equals(assessment)) {
        log.warn("String_Node_Str" + "String_Node_Str",assessmentOfReplacement,assessment);
      }
    }
    annotatedArgs.remove(original);
    annotatedArgs.put(replacement,AssessedResponse.from(replacement,assessment));
    corefAnnotation.registerCAS(replacement.canonicalArgument(),rng);
  }
 else   if (unannotatedResponses.contains(original)) {
    unannotatedResponses.remove(original);
    if (!annotatedArgs.containsKey(replacement)) {
      unannotatedResponses.add(replacement);
    }
  }
 else {
    throw new RuntimeException("String_Node_Str" + original + "String_Node_Str"+ replacement+ "String_Node_Str"+ original+ "String_Node_Str");
  }
  return this;
}
Program: 24928
Project: 24928
Buggy source:
@Override public ScoringData transform(ScoringData input){
  checkArgument(input.answerKey().isPresent(),"String_Node_Str" + "String_Node_Str");
  input.answerKey().get().checkCompletelyAssesses(input.systemOutput().get());
  final ResponseMapping responseMapping=rule.computeResponseTransformation(input.answerKey().get());
  ScoringData.Builder ret=input.modifiedCopy().withAnswerKey(responseMapping.apply(input.answerKey().get()));
  if (input.systemOutput().isPresent()) {
    ret.withSystemOutput(responseMapping.apply(input.systemOutput().get()));
  }
  if (input.systemLinking().isPresent()) {
    ret.withSystemLinking(responseMapping.apply(input.systemLinking().get()));
  }
  if (input.referenceLinking().isPresent()) {
    ret.withReferenceLinking(responseMapping.apply(input.referenceLinking().get()));
  }
  return ret.build();
}

Fixed version (ground truth):
@Override public ScoringData transform(ScoringData input){
  checkArgument(input.answerKey().isPresent(),"String_Node_Str" + "String_Node_Str");
  input.answerKey().get().checkCompletelyAssesses(input.systemOutput().get());
  final ResponseMapping responseMapping=rule.computeResponseTransformation(input.answerKey().get());
  if (!responseMapping.isIdentity()) {
    log.info("String_Node_Str",rule,responseMapping.summaryString());
    ScoringData.Builder ret=input.modifiedCopy().withAnswerKey(responseMapping.apply(input.answerKey().get()));
    if (input.systemOutput().isPresent()) {
      ret.withSystemOutput(responseMapping.apply(input.systemOutput().get()));
    }
    if (input.systemLinking().isPresent()) {
      ret.withSystemLinking(responseMapping.apply(input.systemLinking().get()));
    }
    if (input.referenceLinking().isPresent()) {
      ret.withReferenceLinking(responseMapping.apply(input.referenceLinking().get()));
    }
    return ret.build();
  }
 else {
    return input;
  }
}
Program: 24929
Project: 24929
Buggy source:
private FixLowercaseXInTemporals(){
  throw new UnsupportedOperationException();
}

Fixed version (ground truth):
private FixLowercaseXInTemporals(){
}
Program: 24930
Project: 24930
Buggy source:
@Override public ScoringData transform(final ScoringData scoringData){
  checkArgument(!scoringData.referenceLinking().isPresent() && !scoringData.systemLinking().isPresent(),"String_Node_Str" + "String_Node_Str");
  checkArgument(scoringData.answerKey().isPresent(),"String_Node_Str");
  final ScoringData.Builder ret=scoringData.modifiedCopy();
  final ResponseMapping responseMapping=responseMapping(scoringData.answerKey().get());
  AnswerKey newAnswerKey=neutralizeAssessments(responseMapping.apply(scoringData.answerKey().get()));
  ret.withAnswerKey(newAnswerKey);
  if (scoringData.systemOutput().isPresent()) {
    ret.withSystemOutput(responseMapping.apply(scoringData.systemOutput().get()));
  }
  return ret.build();
}

Fixed version (ground truth):
@Override public ScoringData transform(final ScoringData scoringData){
  checkArgument(!scoringData.referenceLinking().isPresent() && !scoringData.systemLinking().isPresent(),"String_Node_Str" + "String_Node_Str");
  checkArgument(scoringData.answerKey().isPresent(),"String_Node_Str");
  final ScoringData.Builder ret=scoringData.modifiedCopy();
  final ResponseMapping responseMapping=responseMapping(scoringData.answerKey().get());
  if (!responseMapping.isIdentity()) {
    log.info("String_Node_Str",responseMapping.summaryString());
  }
  AnswerKey newAnswerKey=neutralizeAssessments(responseMapping.apply(scoringData.answerKey().get()));
  ret.withAnswerKey(newAnswerKey);
  if (scoringData.systemOutput().isPresent()) {
    ret.withSystemOutput(responseMapping.apply(scoringData.systemOutput().get()));
  }
  return ret.build();
}
Program: 24931
Project: 24931
Buggy source:
private MakeAllRealisActual(){
  throw new UnsupportedOperationException();
}

Fixed version (ground truth):
private MakeAllRealisActual(){
}
Program: 24932
Project: 24932
Buggy source:
private MakeBrokenTimesWrong(){
  throw new UnsupportedOperationException();
}

Fixed version (ground truth):
private MakeBrokenTimesWrong(){
}
Program: 24933
Project: 24933
Buggy source:
public ResponseLinking apply(ResponseLinking responseLinking){
  final Function<Response,Response> responseMapping=MapUtils.asFunction(replacedResponses,Functions.<Response>identity());
  final Predicate<Response> notDeleted=not(in(deletedResponses));
  final ImmutableSet.Builder<ResponseSet> newResponseSetsB=ImmutableSet.builder();
  for (  final ResponseSet responseSet : responseLinking.responseSets()) {
    newResponseSetsB.add(ResponseSet.from(FluentIterable.from(responseSet).filter(notDeleted).transform(responseMapping).toSet()));
  }
  final ImmutableSet<ResponseSet> newResponseSets=newResponseSetsB.build();
  final Predicate<Response> notLinked=not(in(ImmutableSet.copyOf(Iterables.concat(newResponseSets))));
  final ImmutableSet<Response> newIncompletes=FluentIterable.from(responseLinking.incompleteResponses()).filter(notDeleted).filter(notLinked).toSet();
  return ResponseLinking.from(responseLinking.docID(),newResponseSets,newIncompletes);
}

Fixed version (ground truth):
public ResponseLinking apply(ResponseLinking responseLinking){
  final Function<Response,Response> responseMapping=MapUtils.asFunction(replacedResponses,Functions.<Response>identity());
  final Predicate<Response> notDeleted=not(in(deletedResponses));
  final ImmutableSet.Builder<ResponseSet> newResponseSetsB=ImmutableSet.builder();
  for (  final ResponseSet responseSet : responseLinking.responseSets()) {
    final ImmutableSet<Response> filteredResponses=FluentIterable.from(responseSet).filter(notDeleted).transform(responseMapping).toSet();
    if (!filteredResponses.isEmpty()) {
      newResponseSetsB.add(ResponseSet.from(filteredResponses));
    }
  }
  final ImmutableSet<ResponseSet> newResponseSets=newResponseSetsB.build();
  final Predicate<Response> notLinked=not(in(ImmutableSet.copyOf(Iterables.concat(newResponseSets))));
  final ImmutableSet<Response> newIncompletes=FluentIterable.from(responseLinking.incompleteResponses()).filter(notDeleted).filter(notLinked).toSet();
  return ResponseLinking.from(responseLinking.docID(),newResponseSets,newIncompletes);
}
Program: 24934
Project: 24934
Buggy source:
public static Function<AnswerKey,AnswerKey> forAnswerKey(){
  return new Function<AnswerKey,AnswerKey>(){
    final Random rng=new Random();
    @Override public AnswerKey apply(    final AnswerKey input){
      final AnswerKey.Builder ret=input.modifiedCopyBuilder();
      for (      final Response r : input.allResponses()) {
        final Optional<Response> fixedResponse=fixLowercaseXInTime(r);
        log.info("String_Node_Str",r.canonicalArgument().string(),fixedResponse.get().canonicalArgument().string());
        ret.replaceAsssessedResponseMaintainingAssessment(r,fixedResponse.get(),rng);
      }
      return ret.build();
    }
  }
;
}

Fixed version (ground truth):
public static Function<AnswerKey,AnswerKey> forAnswerKey(){
  return new Function<AnswerKey,AnswerKey>(){
    final Random rng=new Random();
    @Override public AnswerKey apply(    final AnswerKey input){
      log.info("String_Node_Str",input.docId());
      final AnswerKey.Builder ret=input.modifiedCopyBuilder();
      for (      final Response r : input.allResponses()) {
        final Optional<Response> fixedResponse=fixLowercaseXInTime(r);
        if (fixedResponse.isPresent()) {
          log.info("String_Node_Str",r.canonicalArgument().string(),fixedResponse.get().canonicalArgument().string());
          ret.replaceAsssessedResponseMaintainingAssessment(r,fixedResponse.get(),rng);
        }
      }
      return ret.build();
    }
  }
;
}
Program: 24935
Project: 24935
Buggy source:
@Override public AnswerKey apply(final AnswerKey input){
  final AnswerKey.Builder ret=input.modifiedCopyBuilder();
  for (  final Response r : input.allResponses()) {
    final Optional<Response> fixedResponse=fixLowercaseXInTime(r);
    log.info("String_Node_Str",r.canonicalArgument().string(),fixedResponse.get().canonicalArgument().string());
    ret.replaceAsssessedResponseMaintainingAssessment(r,fixedResponse.get(),rng);
  }
  return ret.build();
}

Fixed version (ground truth):
@Override public AnswerKey apply(final AnswerKey input){
  log.info("String_Node_Str",input.docId());
  final AnswerKey.Builder ret=input.modifiedCopyBuilder();
  for (  final Response r : input.allResponses()) {
    final Optional<Response> fixedResponse=fixLowercaseXInTime(r);
    if (fixedResponse.isPresent()) {
      log.info("String_Node_Str",r.canonicalArgument().string(),fixedResponse.get().canonicalArgument().string());
      ret.replaceAsssessedResponseMaintainingAssessment(r,fixedResponse.get(),rng);
    }
  }
  return ret.build();
}
Program: 24936
Project: 24936
Buggy source:
public static Function<SystemOutput,SystemOutput> forSystemOutput(){
  return new Function<SystemOutput,SystemOutput>(){
    @Override public SystemOutput apply(    final SystemOutput input){
      final SystemOutput.Builder ret=input.modifiedCopyBuilder();
      for (      final Response response : input.responses()) {
        final Optional<Response> fixedResponse=fixLowercaseXInTime(response);
        if (fixedResponse.isPresent()) {
          log.info("String_Node_Str",response.canonicalArgument().string(),fixedResponse.get().canonicalArgument().string());
          ret.replaceResponseKeepingScoreAndMetadata(response,fixedResponse.get());
        }
      }
      return ret.build();
    }
  }
;
}

Fixed version (ground truth):
public static Function<SystemOutput,SystemOutput> forSystemOutput(){
  return new Function<SystemOutput,SystemOutput>(){
    @Override public SystemOutput apply(    final SystemOutput input){
      log.info("String_Node_Str",input.docId());
      final SystemOutput.Builder ret=input.modifiedCopyBuilder();
      for (      final Response response : input.responses()) {
        final Optional<Response> fixedResponse=fixLowercaseXInTime(response);
        if (fixedResponse.isPresent()) {
          log.info("String_Node_Str",response.canonicalArgument().string(),fixedResponse.get().canonicalArgument().string());
          ret.replaceResponseKeepingScoreAndMetadata(response,fixedResponse.get());
        }
      }
      return ret.build();
    }
  }
;
}
Program: 24937
Project: 24937
Buggy source:
private static String htmlHeader(){
  return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
}

Fixed version (ground truth):
private static String htmlHeader(){
  return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
}
Program: 24939
Project: 24939
Buggy source:
public static Function<AnswerKey,AnswerKey> forAnswerKey(){
  return new Function<AnswerKey,AnswerKey>(){
    @Override public AnswerKey apply(    final AnswerKey input){
      final AnswerKey.Builder ret=input.modifiedCopyBuilder();
      for (      final AssessedResponse assessedResponse : input.annotatedResponses()) {
        if (assessedResponse.response().isTemporal() && FieldAssessment.isAcceptable(assessedResponse.assessment().entityCorrectFiller())) {
          final String cas=assessedResponse.response().canonicalArgument().string();
          try {
            KBPTIMEXExpression.parseTIMEX(cas);
          }
 catch (          IllegalArgumentException iae) {
            log.info("String_Node_Str",cas);
            ret.replaceAssessment(assessedResponse.response(),assessedResponse.assessment().copyWithModifiedCASAssessment(FieldAssessment.INCORRECT));
          }
        }
      }
      return ret.build();
    }
  }
;
}

Fixed version (ground truth):
public static Function<AnswerKey,AnswerKey> forAnswerKey(){
  return new Function<AnswerKey,AnswerKey>(){
    @Override public AnswerKey apply(    final AnswerKey input){
      final AnswerKey.Builder ret=input.modifiedCopyBuilder();
      for (      final AssessedResponse assessedResponse : input.annotatedResponses()) {
        if (assessedResponse.response().isTemporal() && FieldAssessment.isAcceptable(assessedResponse.assessment().entityCorrectFiller())) {
          final String cas=assessedResponse.response().canonicalArgument().string();
          try {
            KBPTIMEXExpression.parseTIMEX(cas);
          }
 catch (          KBPTIMEXExpression.KBPTIMEXException te) {
            log.info("String_Node_Str",cas);
            ret.replaceAssessment(assessedResponse.response(),assessedResponse.assessment().copyWithModifiedCASAssessment(FieldAssessment.INCORRECT));
          }
        }
      }
      return ret.build();
    }
  }
;
}
Program: 24940
Project: 24940
Buggy source:
@Override public AnswerKey apply(final AnswerKey input){
  final AnswerKey.Builder ret=input.modifiedCopyBuilder();
  for (  final AssessedResponse assessedResponse : input.annotatedResponses()) {
    if (assessedResponse.response().isTemporal() && FieldAssessment.isAcceptable(assessedResponse.assessment().entityCorrectFiller())) {
      final String cas=assessedResponse.response().canonicalArgument().string();
      try {
        KBPTIMEXExpression.parseTIMEX(cas);
      }
 catch (      IllegalArgumentException iae) {
        log.info("String_Node_Str",cas);
        ret.replaceAssessment(assessedResponse.response(),assessedResponse.assessment().copyWithModifiedCASAssessment(FieldAssessment.INCORRECT));
      }
    }
  }
  return ret.build();
}

Fixed version (ground truth):
@Override public AnswerKey apply(final AnswerKey input){
  final AnswerKey.Builder ret=input.modifiedCopyBuilder();
  for (  final AssessedResponse assessedResponse : input.annotatedResponses()) {
    if (assessedResponse.response().isTemporal() && FieldAssessment.isAcceptable(assessedResponse.assessment().entityCorrectFiller())) {
      final String cas=assessedResponse.response().canonicalArgument().string();
      try {
        KBPTIMEXExpression.parseTIMEX(cas);
      }
 catch (      KBPTIMEXExpression.KBPTIMEXException te) {
        log.info("String_Node_Str",cas);
        ret.replaceAssessment(assessedResponse.response(),assessedResponse.assessment().copyWithModifiedCASAssessment(FieldAssessment.INCORRECT));
      }
    }
  }
  return ret.build();
}
Program: 24941
Project: 24941
Buggy source:
private AnswerKey(final Symbol docId,final Iterable<AssessedResponse> annotatedArgs,final Iterable<Response> unannotatedResponses,CorefAnnotation corefAnnotation){
  this.docid=checkNotNull(docId);
  try {
    this.annotatedArgs=Maps.uniqueIndex(annotatedArgs,AssessedResponse.Response);
  }
 catch (  IllegalArgumentException iae) {
    throw new IllegalStateException("String_Node_Str");
  }
  this.unannotatedResponses=ImmutableSet.copyOf(unannotatedResponses);
  this.corefAnnotation=checkNotNull(corefAnnotation);
  assertConsistency();
}

Fixed version (ground truth):
private AnswerKey(final Symbol docId,final Iterable<AssessedResponse> annotatedArgs,final Iterable<Response> unannotatedResponses,CorefAnnotation corefAnnotation){
  this.docid=checkNotNull(docId);
  try {
    this.annotatedArgs=DuplicateTolerantImmutableMapBuilder.uniqueIndex(annotatedArgs,AssessedResponse.Response);
  }
 catch (  IllegalArgumentException iae) {
    throw new IllegalStateException("String_Node_Str",iae);
  }
  this.unannotatedResponses=ImmutableSet.copyOf(unannotatedResponses);
  this.corefAnnotation=checkNotNull(corefAnnotation);
  assertConsistency();
}
Program: 24942
Project: 24942
Buggy source:
public AnswerKey build(){
  return new AnswerKey(docId,annotatedArgs.values(),unannotatedResponses,corefAnnotation.build());
}

Fixed version (ground truth):
public ImmutableMap<K,V> build(){
  return innerBuilder.build();
}