nus-yam/ex-repair huggingface dataset:
Program: 52124
Project: 52124
Buggy source:
@Override public List<Record> getByIdentifier(Context context,Map<String,Set<String>> keys) throws HttpException, IOException {
  Set<String> pmids=keys != null ? keys.get(PUBMED) : null;
  Set<String> dois=keys != null ? keys.get(DOI) : null;
  List<Record> results=new ArrayList<Record>();
  if (pmids != null && pmids.size() > 0 && dois == null) {
    for (    String pmid : pmids) {
      PubmedItem p=null;
      try {
        p=pubmedService.getByPubmedID(pmid);
      }
 catch (      Exception e) {
        log.error(LogManager.getHeader(context,"String_Node_Str","String_Node_Str" + pmid),e);
      }
      if (p != null)       results.add(convert(p));
    }
  }
 else   if (dois != null && dois.size() > 0 && pmids == null) {
    StringBuffer query=new StringBuffer();
    for (    String d : dois) {
      if (query.length() > 0) {
        query.append("String_Node_Str");
      }
      query.append(d).append("String_Node_Str");
    }
    List<PubmedItem> pubmedResults=pubmedService.search(query.toString());
    for (    PubmedItem p : pubmedResults) {
      results.add(convert(p));
    }
  }
 else {
    List<PubmedItem> pubmedResults=pubmedService.search(dois.iterator().next(),pmids.iterator().next());
    if (pubmedResults != null) {
      for (      PubmedItem p : pubmedResults) {
        results.add(convert(p));
      }
    }
  }
  return results;
}

Fixed version (ground truth):
@Override public List<Record> getByIdentifier(Context context,Map<String,Set<String>> keys) throws HttpException, IOException {
  Set<String> pmids=keys != null ? keys.get(PUBMED) : null;
  Set<String> dois=keys != null ? keys.get(DOI) : null;
  List<Record> results=new ArrayList<Record>();
  if (pmids != null && pmids.size() > 0 && (dois == null || dois.size() == 0)) {
    for (    String pmid : pmids) {
      PubmedItem p=null;
      try {
        p=pubmedService.getByPubmedID(pmid);
      }
 catch (      Exception e) {
        log.error(LogManager.getHeader(context,"String_Node_Str","String_Node_Str" + pmid),e);
      }
      if (p != null)       results.add(convert(p));
    }
  }
 else   if (dois != null && dois.size() > 0 && (pmids == null || pmids.size() == 0)) {
    StringBuffer query=new StringBuffer();
    for (    String d : dois) {
      if (query.length() > 0) {
        query.append("String_Node_Str");
      }
      query.append(d).append("String_Node_Str");
    }
    List<PubmedItem> pubmedResults=pubmedService.search(query.toString());
    for (    PubmedItem p : pubmedResults) {
      results.add(convert(p));
    }
  }
 else   if (dois != null && dois.size() > 0 && pmids != null && pmids.size() > 0) {
    List<PubmedItem> pubmedResults=pubmedService.search(dois.iterator().next(),pmids.iterator().next());
    if (pubmedResults != null) {
      for (      PubmedItem p : pubmedResults) {
        results.add(convert(p));
      }
    }
  }
  return results;
}
Program: 52125
Project: 52125
Buggy source:
public void setTransformationEngine(TransformationEngine transformationEngine){
  this.transformationEngine=transformationEngine;
  MultipleSubmissionLookupDataLoader dataLoader=(MultipleSubmissionLookupDataLoader)transformationEngine.getDataLoader();
  this.idents2provs=new HashMap<String,List<SubmissionLookupProvider>>();
  this.searchProviders=new ArrayList<SubmissionLookupProvider>();
  if (providers != null) {
    this.providers=new ArrayList<SubmissionLookupProvider>();
    for (    SubmissionLookupProvider p : dataLoader.getProviders()) {
      this.providers.add(p);
      if (p.isSearchProvider()) {
        searchProviders.add(p);
      }
      List<String> suppIdentifiers=p.getSupportedIdentifiers();
      if (suppIdentifiers != null) {
        for (        String ident : suppIdentifiers) {
          List<SubmissionLookupProvider> tmp=idents2provs.get(ident);
          if (tmp == null) {
            tmp=new ArrayList<SubmissionLookupProvider>();
            idents2provs.put(ident,tmp);
          }
          tmp.add(p);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void setTransformationEngine(TransformationEngine transformationEngine){
  this.transformationEngine=transformationEngine;
  MultipleSubmissionLookupDataLoader dataLoader=(MultipleSubmissionLookupDataLoader)transformationEngine.getDataLoader();
  this.idents2provs=new HashMap<String,List<SubmissionLookupProvider>>();
  this.searchProviders=new ArrayList<SubmissionLookupProvider>();
  if (providers == null) {
    this.providers=new ArrayList<SubmissionLookupProvider>();
    for (    SubmissionLookupProvider p : dataLoader.getProviders()) {
      this.providers.add(p);
      if (p.isSearchProvider()) {
        searchProviders.add(p);
      }
      List<String> suppIdentifiers=p.getSupportedIdentifiers();
      if (suppIdentifiers != null) {
        for (        String ident : suppIdentifiers) {
          List<SubmissionLookupProvider> tmp=idents2provs.get(ident);
          if (tmp == null) {
            tmp=new ArrayList<SubmissionLookupProvider>();
            idents2provs.put(ident,tmp);
          }
          tmp.add(p);
        }
      }
    }
  }
}
Program: 52126
Project: 52126
Buggy source:
@Override public List<Value> getValues(String md){
  if (enhancedMetadata != null && enhancedMetadata.keySet().contains(md)) {
    if (cacheEnhanched != null && cacheEnhanched.keySet().contains(md)) {
      List<Value> values=new ArrayList<Value>();
      for (      String s : cacheEnhanched.get(md)) {
        values.add(new StringValue(s));
      }
      return values;
    }
 else {
      EnhancerSubmissionLookup enhancer=enhancedMetadata.get(md);
      List<String> values=enhancer.getValues(this);
      List<Value> valuesvalues=new ArrayList<Value>();
      for (      String s : values) {
        valuesvalues.add(new StringValue(s));
      }
      cacheEnhanched.put(md,values);
      return valuesvalues;
    }
  }
 else {
    return lookupPublication.getValues(md);
  }
}

Fixed version (ground truth):
@Override public List<Value> getValues(String md){
  if (enhancedMetadata != null && enhancedMetadata.keySet().contains(md)) {
    if (cacheEnhanched != null && cacheEnhanched.keySet().contains(md)) {
      List<Value> values=new ArrayList<Value>();
      for (      String s : cacheEnhanched.get(md)) {
        values.add(new StringValue(s));
      }
      return values;
    }
 else {
      EnhancerSubmissionLookup enhancer=enhancedMetadata.get(md);
      List<String> values=enhancer.getValues(this);
      if (values != null && values.size() > 0) {
        List<Value> valuesvalues=new ArrayList<Value>();
        for (        String s : values) {
          valuesvalues.add(new StringValue(s));
        }
        cacheEnhanched.put(md,values);
        return valuesvalues;
      }
    }
    return null;
  }
 else {
    return lookupPublication.getValues(md);
  }
}
Program: 52127
Project: 52127
Buggy source:
@Override public List<Value> getValues(String md){
  List<String> stringValues=storage.get(md);
  List<Value> values=new ArrayList<Value>();
  for (  String value : stringValues) {
    values.add(new StringValue(value));
  }
  return values;
}

Fixed version (ground truth):
@Override public List<Value> getValues(String md){
  List<String> stringValues=storage.get(md);
  if (stringValues == null) {
    return null;
  }
  List<Value> values=new ArrayList<Value>();
  for (  String value : stringValues) {
    values.add(new StringValue(value));
  }
  return values;
}
Program: 52128
Project: 52128
Buggy source:
private String getMetadata(String formName,Record itemLookup,String name){
  String type=SubmissionLookupService.getType(itemLookup);
  String md=outputMap.get(name);
  if (md != null && md.contains("String_Node_Str")) {
    String[] cond=md.trim().split("String_Node_Str");
    for (int idx=1; idx < cond.length; idx++) {
      boolean temp=itemLookup.getFields().contains(cond[idx]);
      if (temp) {
        return null;
      }
    }
    return cond[0];
  }
  return md;
}

Fixed version (ground truth):
private String getMetadata(String formName,Record itemLookup,String name){
  String type=SubmissionLookupService.getType(itemLookup);
  String md=outputMap.get(type + "String_Node_Str" + name);
  if (StringUtils.isBlank(md)) {
    md=outputMap.get(formName + "String_Node_Str" + name);
    if (StringUtils.isBlank(md)) {
      md=outputMap.get(name);
    }
  }
  if (md != null && md.contains("String_Node_Str")) {
    String[] cond=md.trim().split("String_Node_Str");
    for (int idx=1; idx < cond.length; idx++) {
      boolean temp=itemLookup.getFields().contains(cond[idx]);
      if (temp) {
        return null;
      }
    }
    return cond[0];
  }
  return md;
}
Program: 52129
Project: 52129
Buggy source:
private boolean isValidMetadata(String formName,String[] md){
  try {
    return getDCInput(formName,md[0],md[1],md[2]) != null;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return false;
}

Fixed version (ground truth):
private boolean isValidMetadata(String formName,String[] md){
  try {
    if (extraMetadataToKeep != null && extraMetadataToKeep.contains(StringUtils.join(Arrays.copyOfRange(md,0,3),"String_Node_Str"))) {
      return true;
    }
    return getDCInput(formName,md[0],md[1],md[2]) != null;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return false;
}
Program: 52130
Project: 52130
Buggy source:
@Override public Record modify(MutableRecord rec){
  for (  String target_field : merge_field_map.keySet()) {
    List<String> source_fields=merge_field_map.get(target_field);
    for (    String source_field : source_fields) {
      List<Value> values=rec.getValues(source_field);
      for (      Value value : values) {
        rec.addValue(target_field,value);
      }
      rec.removeField(source_field);
    }
  }
  return rec;
}

Fixed version (ground truth):
@Override public Record modify(MutableRecord rec){
  if (merge_field_map != null) {
    for (    String target_field : merge_field_map.keySet()) {
      List<String> source_fields=merge_field_map.get(target_field);
      for (      String source_field : source_fields) {
        List<Value> values=rec.getValues(source_field);
        if (values != null && values.size() > 0) {
          for (          Value value : values) {
            rec.addValue(target_field,value);
          }
        }
        rec.removeField(source_field);
      }
    }
  }
  return rec;
}
Program: 52132
Project: 52132
Buggy source:
@Override public Record modify(MutableRecord record){
  if (mapConfig != null && fieldKeys != null) {
    for (    String key : fieldKeys) {
      List<Value> values=record.getValues(key);
      List<Value> newValues=new ArrayList<Value>();
      for (      Value value : values) {
        String stringValue=value.getAsString();
        String tmp="String_Node_Str";
        if (mapConfig.containsKey(stringValue)) {
          tmp=mapConfig.getProperty(stringValue,mapConfig.getProperty("String_Node_Str"));
        }
 else {
          tmp=mapConfig.getProperty("String_Node_Str");
          for (          String regex : regexConfig.keySet()) {
            if (stringValue != null && stringValue.matches(regex)) {
              tmp=stringValue.replaceAll(regex,regexConfig.get(regex));
            }
          }
        }
        if ("String_Node_Str".equals(tmp)) {
          newValues.add(new StringValue(stringValue));
        }
 else         if (StringUtils.isNotBlank(tmp)) {
          newValues.add(new StringValue(tmp));
        }
 else         newValues.add(new StringValue(stringValue));
      }
      record.updateField(key,newValues);
    }
  }
  return record;
}

Fixed version (ground truth):
@Override public Record modify(MutableRecord record){
  if (mapping != null && fieldKeys != null) {
    for (    String key : fieldKeys) {
      List<Value> values=record.getValues(key);
      if (values == null)       continue;
      List<Value> newValues=new ArrayList<Value>();
      for (      Value value : values) {
        String stringValue=value.getAsString();
        String tmp="String_Node_Str";
        if (mapping.containsKey(stringValue)) {
          tmp=mapping.get(stringValue);
        }
 else {
          tmp=defaultValue;
          for (          String regex : regexConfig.keySet()) {
            if (stringValue != null && stringValue.matches(regex)) {
              tmp=stringValue.replaceAll(regex,regexConfig.get(regex));
            }
          }
        }
        if ("String_Node_Str".equals(tmp)) {
          newValues.add(new StringValue(stringValue));
        }
 else         if (StringUtils.isNotBlank(tmp)) {
          newValues.add(new StringValue(tmp));
        }
 else         newValues.add(new StringValue(stringValue));
      }
      record.updateField(key,newValues);
    }
  }
  return record;
}
Program: 52134
Project: 52134
Buggy source:
public static String getProviderName(Record rec){
  return getFirstValue(rec,SubmissionLookupService.PROVIDER_NAME_FIELD);
}

Fixed version (ground truth):
public static String getProviderName(Record rec){
  return SubmissionLookupUtils.getFirstValue(rec,SubmissionLookupService.PROVIDER_NAME_FIELD);
}
Program: 52135
Project: 52135
Buggy source:
public static String getType(Record rec){
  return getFirstValue(rec,SubmissionLookupProvider.TYPE);
}

Fixed version (ground truth):
public static String getType(Record rec){
  return SubmissionLookupUtils.getFirstValue(rec,SubmissionLookupProvider.TYPE);
}
Program: 52137
Project: 52137
Buggy source:
@Override public Record modify(MutableRecord rec){
  if (merge_field_map != null) {
    for (    String target_field : merge_field_map.keySet()) {
      List<String> source_fields=merge_field_map.get(target_field);
      for (      String source_field : source_fields) {
        List<Value> values=rec.getValues(source_field);
        if (values != null && values.size() > 0) {
          for (          Value value : values) {
            rec.addValue(target_field,value);
          }
        }
        rec.removeField(source_field);
      }
    }
  }
  return rec;
}

Fixed version (ground truth):
@Override public Record modify(MutableRecord rec){
  if (merge_field_map != null) {
    for (    String target_field : merge_field_map.keySet()) {
      List<String> source_fields=merge_field_map.get(target_field);
      for (      String source_field : source_fields) {
        List<Value> values=rec.getValues(source_field);
        if (values != null && values.size() > 0) {
          for (          Value value : values) {
            rec.addValue(target_field,value);
          }
        }
      }
    }
  }
  return rec;
}
Program: 52138
Project: 52138
Buggy source:
public List<String> getIdentifiers(){
  List<String> identifiers=new ArrayList<String>();
  identifiers.add("String_Node_Str");
  identifiers.add("String_Node_Str");
  identifiers.add("String_Node_Str");
  return identifiers;
}

Fixed version (ground truth):
public List<String> getIdentifiers(){
  List<String> allSupportedIdentifiers=new ArrayList<String>();
  MultipleSubmissionLookupDataLoader dataLoader=(MultipleSubmissionLookupDataLoader)phase1TransformationEngine.getDataLoader();
  for (  SubmissionLookupProvider provider : dataLoader.getProviders()) {
    for (    String identifier : provider.getSupportedIdentifiers()) {
      if (!allSupportedIdentifiers.contains(identifier)) {
        allSupportedIdentifiers.add(identifier);
      }
    }
  }
  return allSupportedIdentifiers;
}
Program: 52139
Project: 52139
Buggy source:
public Record getTotalPublication(List<SubmissionLookupProvider> providers){
  if (publications == null) {
    return null;
  }
 else   if (publications.size() == 1) {
    return publications.get(0);
  }
 else {
    MutableRecord pub=new SubmissionLookupPublication(MERGED_PUBLICATION_PROVIDER);
    for (    SubmissionLookupProvider prov : providers) {
      for (      Record p : publications) {
        if (!SubmissionLookupService.getProviderName(p).equals(prov.getShortName())) {
          continue;
        }
        for (        String field : p.getFields()) {
          List<Value> values=p.getValues(field);
          if (values != null && values.size() > 0) {
            if (!pub.getFields().contains(field)) {
              for (              Value v : values) {
                pub.addValue(field,v);
              }
            }
          }
        }
      }
    }
    return pub;
  }
}

Fixed version (ground truth):
public Record getTotalPublication(List<SubmissionLookupProvider> providers){
  if (publications == null) {
    return null;
  }
 else   if (publications.size() == 1) {
    return publications.get(0);
  }
 else {
    MutableRecord pub=new SubmissionLookupPublication(MERGED_PUBLICATION_PROVIDER);
    for (    Record p : publications) {
      for (      String field : p.getFields()) {
        List<Value> values=p.getValues(field);
        if (values != null && values.size() > 0) {
          if (!pub.getFields().contains(field)) {
            for (            Value v : values) {
              pub.addValue(field,v);
            }
          }
        }
      }
    }
    return pub;
  }
}
Program: 52140
Project: 52140
Buggy source:
private List<Map<String,Object>> getLightResultList(List<ItemSubmissionLookupDTO> result){
  List<Map<String,Object>> publications=new ArrayList<Map<String,Object>>();
  if (result != null && result.size() > 0) {
    for (    ItemSubmissionLookupDTO item : result) {
      String uuid=item.getUUID();
      Record pub=item.getTotalPublication(service.getProviders());
      Map<String,Object> data=new HashMap<String,Object>();
      data.put("String_Node_Str",uuid);
      data.put("String_Node_Str",item.getProviders());
      data.put("String_Node_Str",SubmissionLookupService.getFirstValue(pub,"String_Node_Str"));
      data.put("String_Node_Str",pub.getValues("String_Node_Str") != null ? StringUtils.join(pub.getValues("String_Node_Str").iterator(),"String_Node_Str") : "String_Node_Str");
      data.put("String_Node_Str",SubmissionLookupService.getFirstValue(pub,"String_Node_Str"));
      publications.add(data);
    }
  }
  return publications;
}

Fixed version (ground truth):
private List<Map<String,Object>> getLightResultList(List<ItemSubmissionLookupDTO> result){
  List<Map<String,Object>> publications=new ArrayList<Map<String,Object>>();
  if (result != null && result.size() > 0) {
    for (    ItemSubmissionLookupDTO item : result) {
      String uuid=item.getUUID();
      Record pub=item.getTotalPublication(service.getProviders());
      Map<String,Object> data=new HashMap<String,Object>();
      data.put("String_Node_Str",uuid);
      data.put("String_Node_Str",item.getProviders());
      data.put("String_Node_Str",SubmissionLookupService.getFirstValue(pub,"String_Node_Str"));
      List<String> authors=SubmissionLookupService.getStringValuesFromValues(pub,"String_Node_Str");
      data.put("String_Node_Str",authors != null ? StringUtils.join(authors.iterator(),"String_Node_Str") : "String_Node_Str");
      data.put("String_Node_Str",SubmissionLookupService.getFirstValue(pub,"String_Node_Str"));
      publications.add(data);
    }
  }
  return publications;
}
Program: 52143
Project: 52143
Buggy source:
public SubmissionLookupOutputGenerator(){
  dtoList=new ArrayList<ItemSubmissionLookupDTO>();
}

Fixed version (ground truth):
public SubmissionLookupOutputGenerator(){
}
Program: 52144
Project: 52144
Buggy source:
/** 
 * Search the database for a DOI, using the type and id of an DSpaceObject.
 * @param context
 * @param dso DSpaceObject to find doi for.
 * @return The DOI as String or null if DOI was not found.
 * @throws SQLException 
 */
public static String getDOIByObject(Context context,DSpaceObject dso) throws SQLException {
  String sql="String_Node_Str" + "String_Node_Str";
  TableRow doiRow=DatabaseManager.querySingleTable(context,"String_Node_Str",sql,dso.getType(),dso.getID());
  if (null == doiRow) {
    return null;
  }
  if (doiRow.isColumnNull("String_Node_Str")) {
    log.error("String_Node_Str" + dso.getTypeText() + "String_Node_Str"+ dso.getID()+ "String_Node_Str");
    throw new IllegalStateException("String_Node_Str" + "String_Node_Str" + dso.getTypeText() + "String_Node_Str"+ dso.getID()+ "String_Node_Str");
  }
  return DOI.SCHEME + doiRow.getStringColumn("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Search the database for a DOI, using the type and id of an DSpaceObject.
 * @param context
 * @param dso DSpaceObject to find doi for. DOIs with status DELETED will beignored.
 * @return The DOI as String or null if DOI was not found.
 * @throws SQLException
 */
public static String getDOIByObject(Context context,DSpaceObject dso) throws SQLException {
  String sql="String_Node_Str" + "String_Node_Str";
  TableRow doiRow=DatabaseManager.querySingleTable(context,"String_Node_Str",sql,dso.getType(),dso.getID(),DOIIdentifierProvider.DELETED);
  if (null == doiRow) {
    return null;
  }
  if (doiRow.isColumnNull("String_Node_Str")) {
    log.error("String_Node_Str" + dso.getTypeText() + "String_Node_Str"+ dso.getID()+ "String_Node_Str");
    throw new IllegalStateException("String_Node_Str" + "String_Node_Str" + dso.getTypeText() + "String_Node_Str"+ dso.getID()+ "String_Node_Str");
  }
  return DOI.SCHEME + doiRow.getStringColumn("String_Node_Str");
}
Program: 52145
Project: 52145
Buggy source:
/** 
 * Adds a DOI to the metadata of an item.
 * @param context
 * @param dso DSpaceObject the DOI should be added to.
 * @param doi The DOI that should be added as metadata.
 * @throws SQLException
 * @throws AuthorizeException 
 */
protected void saveDOIToObject(Context context,DSpaceObject dso,String doi) throws SQLException, AuthorizeException {
  if (!(dso instanceof Item)) {
    throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + dso.getTypeText() + "String_Node_Str");
  }
  Item item=(Item)dso;
  item.addMetadata(MD_SCHEMA,DOI_ELEMENT,DOI_QUALIFIER,null,doi);
  try {
    item.update();
    context.commit();
    log.info("String_Node_Str",doi);
  }
 catch (  SQLException ex) {
    throw ex;
  }
catch (  AuthorizeException ex) {
    throw ex;
  }
}

Fixed version (ground truth):
/** 
 * Adds a DOI to the metadata of an item.
 * @param context
 * @param dso DSpaceObject the DOI should be added to.
 * @param doi The DOI that should be added as metadata.
 * @throws SQLException
 * @throws AuthorizeException 
 */
protected void saveDOIToObject(Context context,DSpaceObject dso,String doi) throws SQLException, AuthorizeException {
  if (!(dso instanceof Item)) {
    throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + dso.getTypeText() + "String_Node_Str");
  }
  Item item=(Item)dso;
  item.addMetadata(MD_SCHEMA,DOI_ELEMENT,DOI_QUALIFIER,null,doi);
  try {
    item.update();
    context.commit();
  }
 catch (  SQLException ex) {
    throw ex;
  }
catch (  AuthorizeException ex) {
    throw ex;
  }
}
Program: 52146
Project: 52146
Buggy source:
@Override public void delete(Context context,DSpaceObject dso,String identifier) throws IdentifierException {
  String doi=DOI.formatIdentifier(identifier);
  TableRow doiRow=null;
  String oldStatus=null;
  try {
    doiRow=DatabaseManager.findByUnique(context,"String_Node_Str","String_Node_Str",doi.substring(DOI.SCHEME.length()));
  }
 catch (  SQLException sqle) {
    throw new RuntimeException(sqle);
  }
  if (null != doiRow) {
    if (doiRow.getIntColumn("String_Node_Str") != dso.getID() || doiRow.getIntColumn("String_Node_Str") != dso.getType()) {
      throw new DOIIdentifierException("String_Node_Str" + "String_Node_Str",DOIIdentifierException.MISMATCH);
    }
  }
  try {
    removeDOIFromObject(context,dso,doi);
  }
 catch (  AuthorizeException ex) {
    log.error("String_Node_Str",ex);
    throw new DOIIdentifierException("String_Node_Str",ex,DOIIdentifierException.UNAUTHORIZED_METADATA_MANIPULATION);
  }
catch (  SQLException ex) {
    log.error("String_Node_Str" + ex.getMessage());
    throw new RuntimeException("String_Node_Str" + "String_Node_Str" + dso.getID(),ex);
  }
  if (null != doiRow) {
    doiRow.setColumn("String_Node_Str",DELETED);
    try {
      DatabaseManager.update(context,doiRow);
    }
 catch (    SQLException sqle) {
      log.warn("String_Node_Str",doi);
      throw new RuntimeException(sqle);
    }
  }
  connector.deleteDOI(context,doi);
}

Fixed version (ground truth):
@Override public void delete(Context context,DSpaceObject dso,String identifier) throws IdentifierException {
  String doi=DOI.formatIdentifier(identifier);
  TableRow doiRow=null;
  String oldStatus=null;
  try {
    doiRow=DatabaseManager.findByUnique(context,"String_Node_Str","String_Node_Str",doi.substring(DOI.SCHEME.length()));
  }
 catch (  SQLException sqle) {
    throw new RuntimeException(sqle);
  }
  if (null != doiRow) {
    if (doiRow.getIntColumn("String_Node_Str") != dso.getID() || doiRow.getIntColumn("String_Node_Str") != dso.getType()) {
      throw new DOIIdentifierException("String_Node_Str" + "String_Node_Str",DOIIdentifierException.MISMATCH);
    }
  }
  try {
    removeDOIFromObject(context,dso,doi);
  }
 catch (  AuthorizeException ex) {
    log.error("String_Node_Str",ex);
    throw new DOIIdentifierException("String_Node_Str",ex,DOIIdentifierException.UNAUTHORIZED_METADATA_MANIPULATION);
  }
catch (  SQLException ex) {
    log.error("String_Node_Str" + ex.getMessage());
    throw new RuntimeException("String_Node_Str" + "String_Node_Str" + dso.getID(),ex);
  }
  if (null != doiRow) {
    doiRow.setColumn("String_Node_Str",DELETED);
    try {
      DatabaseManager.update(context,doiRow);
      context.commit();
    }
 catch (    SQLException sqle) {
      log.warn("String_Node_Str",doi);
      throw new RuntimeException(sqle);
    }
  }
  connector.deleteDOI(context,doi);
}
Program: 52147
Project: 52147
Buggy source:
/** 
 * This identifier provider supports identifiers in the following format: <ul> <li>doi:10.123/456</li> <li>10.123/456</li> <li>http://dx.doi.org/10.123/456</li> </ul>
 * @param identifier to check if it is in a supported format.
 * @return 
 */
@Override public boolean supports(String identifier){
  try {
    DOI.formatIdentifier(identifier);
  }
 catch (  IdentifierException e) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * This identifier provider supports identifiers in the following format: <ul> <li>doi:10.123/456</li> <li>10.123/456</li> <li>http://dx.doi.org/10.123/456</li> </ul>
 * @param identifier to check if it is in a supported format.
 * @return 
 */
@Override public boolean supports(String identifier){
  try {
    DOI.formatIdentifier(identifier);
  }
 catch (  IdentifierException e) {
    return false;
  }
catch (  IllegalArgumentException e) {
    return false;
  }
  return true;
}
Program: 52148
Project: 52148
Buggy source:
@Override public void delete(Context context,DSpaceObject dso,String identifier) throws IdentifierException {
  String doi=DOI.formatIdentifier(identifier);
  TableRow doiRow=null;
  String oldStatus=null;
  try {
    doiRow=DatabaseManager.findByUnique(context,"String_Node_Str","String_Node_Str",doi);
  }
 catch (  SQLException sqle) {
    throw new RuntimeException(sqle);
  }
  if (null != doiRow) {
    if (doiRow.getIntColumn("String_Node_Str") != dso.getID() || doiRow.getIntColumn("String_Node_Str") != dso.getType()) {
      throw new DOIIdentifierException("String_Node_Str" + "String_Node_Str",DOIIdentifierException.MISMATCH);
    }
  }
  try {
    removeDOIFromObject(context,dso,doi);
  }
 catch (  AuthorizeException ex) {
    log.error("String_Node_Str",ex);
    throw new DOIIdentifierException("String_Node_Str",ex,DOIIdentifierException.UNAUTHORIZED_METADATA_MANIPULATION);
  }
catch (  SQLException ex) {
    log.error("String_Node_Str" + ex.getMessage());
    throw new RuntimeException("String_Node_Str" + "String_Node_Str" + dso.getID(),ex);
  }
  if (null != doiRow) {
    doiRow.setColumn("String_Node_Str","String_Node_Str");
    try {
      DatabaseManager.update(context,doiRow);
    }
 catch (    SQLException sqle) {
      log.warn("String_Node_Str",doi);
      throw new RuntimeException(sqle);
    }
  }
  connector.deleteDOI(context,doi);
}

Fixed version (ground truth):
@Override public void delete(Context context,DSpaceObject dso,String identifier) throws IdentifierException {
  String doi=DOI.formatIdentifier(identifier);
  TableRow doiRow=null;
  String oldStatus=null;
  try {
    doiRow=DatabaseManager.findByUnique(context,"String_Node_Str","String_Node_Str",doi.substring(DOI.SCHEME.length()));
  }
 catch (  SQLException sqle) {
    throw new RuntimeException(sqle);
  }
  if (null != doiRow) {
    if (doiRow.getIntColumn("String_Node_Str") != dso.getID() || doiRow.getIntColumn("String_Node_Str") != dso.getType()) {
      throw new DOIIdentifierException("String_Node_Str" + "String_Node_Str",DOIIdentifierException.MISMATCH);
    }
  }
  try {
    removeDOIFromObject(context,dso,doi);
  }
 catch (  AuthorizeException ex) {
    log.error("String_Node_Str",ex);
    throw new DOIIdentifierException("String_Node_Str",ex,DOIIdentifierException.UNAUTHORIZED_METADATA_MANIPULATION);
  }
catch (  SQLException ex) {
    log.error("String_Node_Str" + ex.getMessage());
    throw new RuntimeException("String_Node_Str" + "String_Node_Str" + dso.getID(),ex);
  }
  if (null != doiRow) {
    doiRow.setColumn("String_Node_Str","String_Node_Str");
    try {
      DatabaseManager.update(context,doiRow);
    }
 catch (    SQLException sqle) {
      log.warn("String_Node_Str",doi);
      throw new RuntimeException(sqle);
    }
  }
  connector.deleteDOI(context,doi);
}
Program: 52149
Project: 52149
Buggy source:
public void updateMetadata(Context context,DSpaceObject dso,String identifier) throws IdentifierException {
  String doi=DOI.formatIdentifier(identifier);
  TableRow doiRow=null;
  try {
    doiRow=DatabaseManager.findByUnique(context,"String_Node_Str","String_Node_Str",doi);
  }
 catch (  SQLException sqle) {
    log.warn("String_Node_Str",sqle);
    throw new RuntimeException("String_Node_Str" + "String_Node_Str",sqle);
  }
  if (null == doiRow) {
    log.error("String_Node_Str" + "String_Node_Str",doi);
    throw new DOIIdentifierException("String_Node_Str",DOIIdentifierException.DOI_DOES_NOT_EXIST);
  }
  if (doiRow.getIntColumn("String_Node_Str") != dso.getID() || doiRow.getIntColumn("String_Node_Str") != dso.getType()) {
    log.error("String_Node_Str" + "String_Node_Str",new String[]{doi,dso.getTypeText(),Integer.toString(dso.getID())});
    throw new DOIIdentifierException("String_Node_Str" + "String_Node_Str",DOIIdentifierException.MISMATCH);
  }
  connector.updateMetadata(context,dso,doi);
}

Fixed version (ground truth):
public void updateMetadata(Context context,DSpaceObject dso,String identifier) throws IdentifierException {
  String doi=DOI.formatIdentifier(identifier);
  TableRow doiRow=null;
  try {
    doiRow=DatabaseManager.findByUnique(context,"String_Node_Str","String_Node_Str",doi.substring(DOI.SCHEME.length()));
  }
 catch (  SQLException sqle) {
    log.warn("String_Node_Str",sqle);
    throw new RuntimeException("String_Node_Str" + "String_Node_Str",sqle);
  }
  if (null == doiRow) {
    log.error("String_Node_Str" + "String_Node_Str",doi);
    throw new DOIIdentifierException("String_Node_Str",DOIIdentifierException.DOI_DOES_NOT_EXIST);
  }
  if (doiRow.getIntColumn("String_Node_Str") != dso.getID() || doiRow.getIntColumn("String_Node_Str") != dso.getType()) {
    log.error("String_Node_Str" + "String_Node_Str",new String[]{doi,dso.getTypeText(),Integer.toString(dso.getID())});
    throw new DOIIdentifierException("String_Node_Str" + "String_Node_Str",DOIIdentifierException.MISMATCH);
  }
  connector.updateMetadata(context,dso,doi);
}
Program: 52154
Project: 52154
Buggy source:
@Override public ListItemsResults getItemsUntil(List<Filter> filters,int offset,int length,String setSpec,Date from){
  filters.add(new Filter(new DateFromFilter(from),FilterScope.Query));
  filters.add(new Filter(new DspaceSetSpecFilter(setSpec),FilterScope.Query));
  return this.getItems(filters,offset,length);
}

Fixed version (ground truth):
@Override public ListItemsResults getItemsUntil(List<Filter> filters,int offset,int length,String setSpec,Date from){
  filters.add(new Filter(new DateUntilFilter(from),FilterScope.Query));
  filters.add(new Filter(new DspaceSetSpecFilter(setSpec),FilterScope.Query));
  return this.getItems(filters,offset,length);
}
Program: 52155
Project: 52155
Buggy source:
/** 
 * Find a particular Shibboleth header value and return the all values. The header name uses a bit of fuzzy logic, so it will first try case sensitive, then it will try lowercase, and finally it will try uppercase. Shibboleth attributes may contain multiple values separated by a semicolon and semicolons are escaped with a backslash. This method will split all the attributes into a list and unescape semicolons. If no attributes are found then null is returned.
 * @param request The HTTP request to look for headers values on.
 * @param name The name of the header
 * @return The list of values found, or null if none found.
 */
private List<String> findMultipleHeaders(HttpServletRequest request,String name){
  String values=findHeader(request,name);
  if (values == null)   return null;
  List<String> valueList=new ArrayList<String>();
  int idx=0;
  do {
    idx=values.indexOf(';',idx);
    if (idx == 0) {
      values=values.substring(1,values.length());
    }
 else     if (idx > 0 && values.charAt(idx - 1) != '\\') {
      idx++;
    }
 else     if (idx > 0) {
      String value=values.substring(0,idx);
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      valueList.add(value);
      values=values.substring(idx + 1,values.length());
      idx=0;
    }
  }
 while (idx >= 0);
  if (values.length() > 0) {
    values=values.replaceAll("String_Node_Str","String_Node_Str");
    valueList.add(values);
  }
  return valueList;
}

Fixed version (ground truth):
/** 
 * Find a particular Shibboleth header value and return the all values. The header name uses a bit of fuzzy logic, so it will first try case sensitive, then it will try lowercase, and finally it will try uppercase. Shibboleth attributes may contain multiple values separated by a semicolon and semicolons are escaped with a backslash. This method will split all the attributes into a list and unescape semicolons. If no attributes are found then null is returned.
 * @param request The HTTP request to look for headers values on.
 * @param name The name of the header
 * @return The list of values found, or null if none found.
 */
private List<String> findMultipleHeaders(HttpServletRequest request,String name){
  String values=findHeader(request,name);
  if (values == null)   return null;
  List<String> valueList=new ArrayList<String>();
  int idx=0;
  do {
    idx=values.indexOf(';',idx);
    if (idx == 0) {
      values=values.substring(1,values.length());
    }
 else     if (idx > 0 && values.charAt(idx - 1) == '\\') {
      idx++;
    }
 else     if (idx > 0) {
      String value=values.substring(0,idx);
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      valueList.add(value);
      values=values.substring(idx + 1,values.length());
      idx=0;
    }
  }
 while (idx >= 0);
  if (values.length() > 0) {
    values=values.replaceAll("String_Node_Str","String_Node_Str");
    valueList.add(values);
  }
  return valueList;
}
Program: 52159
Project: 52159
Buggy source:
public void setDefaultSort(boolean defaultSort){
  this.defaultSort=defaultSort;
}

Fixed version (ground truth):
public void setDefaultSort(DiscoverySortFieldConfiguration defaultSort){
  this.defaultSort=defaultSort;
}
Program: 52161
Project: 52161
Buggy source:
protected String getParameterOrder(){
  String sortOrder=ObjectModelHelper.getRequest(objectModel).getParameter("String_Node_Str");
  if (sortOrder == null) {
    sortOrder=new DSpace().getConfigurationService().getProperty("String_Node_Str");
  }
  return sortOrder;
}

Fixed version (ground truth):
protected String getParameterOrder(){
  return ObjectModelHelper.getRequest(objectModel).getParameter("String_Node_Str");
}
Program: 52163
Project: 52163
Buggy source:
/** 
 * Generate a url to the simple search url.
 */
protected String generateURL(Map<String,String> parameters) throws UIException {
  String query=getQuery();
  if (!"String_Node_Str".equals(query)) {
    parameters.put("String_Node_Str",encodeForURL(query));
  }
  if (parameters.get("String_Node_Str") == null) {
    parameters.put("String_Node_Str",String.valueOf(getParameterPage()));
  }
  if (parameters.get("String_Node_Str") == null) {
    parameters.put("String_Node_Str",String.valueOf(getParameterRpp()));
  }
  if (parameters.get("String_Node_Str") == null) {
    parameters.put("String_Node_Str",String.valueOf(this.getParameterGroup()));
  }
  if (getParameterSortBy() != null) {
    parameters.put("String_Node_Str",String.valueOf(getParameterSortBy()));
  }
  if (parameters.get("String_Node_Str") == null) {
    parameters.put("String_Node_Str",getParameterOrder());
  }
  if (parameters.get("String_Node_Str") == null) {
    parameters.put("String_Node_Str",String.valueOf(getParameterEtAl()));
  }
  if (parameters.get("String_Node_Str") == null) {
    parameters.put("String_Node_Str",getParameterScope());
  }
  return AbstractDSpaceTransformer.generateURL("String_Node_Str",parameters);
}

Fixed version (ground truth):
/** 
 * Generate a url to the simple search url.
 */
protected String generateURL(Map<String,String> parameters) throws UIException {
  String query=getQuery();
  if (!"String_Node_Str".equals(query)) {
    parameters.put("String_Node_Str",encodeForURL(query));
  }
  if (parameters.get("String_Node_Str") == null) {
    parameters.put("String_Node_Str",String.valueOf(getParameterPage()));
  }
  if (parameters.get("String_Node_Str") == null) {
    parameters.put("String_Node_Str",String.valueOf(getParameterRpp()));
  }
  if (parameters.get("String_Node_Str") == null) {
    parameters.put("String_Node_Str",String.valueOf(this.getParameterGroup()));
  }
  if (parameters.get("String_Node_Str") == null && getParameterSortBy() != null) {
    parameters.put("String_Node_Str",String.valueOf(getParameterSortBy()));
  }
  if (parameters.get("String_Node_Str") == null && getParameterOrder() != null) {
    parameters.put("String_Node_Str",getParameterOrder());
  }
  if (parameters.get("String_Node_Str") == null) {
    parameters.put("String_Node_Str",String.valueOf(getParameterEtAl()));
  }
  if (parameters.get("String_Node_Str") == null && getParameterScope() != null) {
    parameters.put("String_Node_Str",getParameterScope());
  }
  return AbstractDSpaceTransformer.generateURL("String_Node_Str",parameters);
}
Program: 52164
Project: 52164
Buggy source:
@Override public ActionResult execute(Context c,XmlWorkflowItem wfi,Step step,HttpServletRequest request) throws SQLException, AuthorizeException, IOException {
  if (request.getParameter("String_Node_Str") != null) {
    WorkflowRequirementsManager.addClaimedUser(c,wfi,step,c.getCurrentUser());
    return new ActionResult(ActionResult.TYPE.TYPE_OUTCOME,ActionResult.OUTCOME_COMPLETE);
  }
 else {
    return new ActionResult(ActionResult.TYPE.TYPE_CANCEL);
  }
}

Fixed version (ground truth):
@Override public ActionResult execute(Context c,XmlWorkflowItem wfi,Step step,HttpServletRequest request) throws SQLException, AuthorizeException, IOException {
  if (request.getParameter("String_Node_Str") != null || request.getParameter("String_Node_Str") != null) {
    WorkflowRequirementsManager.addClaimedUser(c,wfi,step,c.getCurrentUser());
    return new ActionResult(ActionResult.TYPE.TYPE_OUTCOME,ActionResult.OUTCOME_COMPLETE);
  }
 else {
    return new ActionResult(ActionResult.TYPE.TYPE_CANCEL);
  }
}
Program: 52168
Project: 52168
Buggy source:
/** 
 * Create a <div> element with <mptr> which references a child object via its handle (and via a local file name, when recursively disseminating all child objects).
 * @param type - type attr value for the <div>
 * @param dso - object for which to create the div
 * @param params
 * @return
 */
protected Div makeChildDiv(String type,DSpaceObject dso,PackageParameters params){
  String handle=dso.getHandle();
  Div div=new Div();
  div.setID(gensym("String_Node_Str"));
  div.setTYPE(type);
  boolean emptyDiv=true;
  if (handle == null || handle.length() == 0) {
    log.warn("String_Node_Str" + type + "String_Node_Str"+ dso.toString());
  }
 else {
    Mptr mptr=new Mptr();
    mptr.setID(gensym("String_Node_Str"));
    mptr.setLOCTYPE(Loctype.HANDLE);
    mptr.setXlinkHref(handle);
    div.getContent().add(mptr);
    emptyDiv=false;
  }
  if (params.recursiveModeEnabled()) {
    String childFileExtension=(params.getBooleanProperty("String_Node_Str",false)) ? "String_Node_Str" : "String_Node_Str";
    Mptr mptr2=new Mptr();
    mptr2.setID(gensym("String_Node_Str"));
    mptr2.setLOCTYPE(Loctype.URL);
    mptr2.setXlinkHref(PackageUtils.getPackageName(dso,childFileExtension));
    div.getContent().add(mptr2);
    emptyDiv=false;
  }
  if (emptyDiv) {
    return null;
  }
 else {
    return div;
  }
}

Fixed version (ground truth):
/** 
 * Create a <div> element with <mptr> which references a child object via its handle (and via a local file name, when recursively disseminating all child objects).
 * @param type - type attr value for the <div>
 * @param dso - object for which to create the div
 * @param params
 * @return
 */
protected Div makeChildDiv(String type,DSpaceObject dso,PackageParameters params){
  String handle=dso.getHandle();
  Div div=new Div();
  div.setID(gensym("String_Node_Str"));
  div.setTYPE(type);
  if (handle == null || handle.length() == 0) {
    log.warn("String_Node_Str" + type + "String_Node_Str"+ dso.toString());
  }
 else {
    Mptr mptr=new Mptr();
    mptr.setID(gensym("String_Node_Str"));
    mptr.setLOCTYPE(Loctype.HANDLE);
    mptr.setXlinkHref(handle);
    div.getContent().add(mptr);
  }
  String childFileExtension=(params.getBooleanProperty("String_Node_Str",false)) ? "String_Node_Str" : "String_Node_Str";
  Mptr mptr2=new Mptr();
  mptr2.setID(gensym("String_Node_Str"));
  mptr2.setLOCTYPE(Loctype.URL);
  mptr2.setXlinkHref(PackageUtils.getPackageName(dso,childFileExtension));
  div.getContent().add(mptr2);
  return div;
}
Program: 52169
Project: 52169
Buggy source:
/** 
 * Gets all <code>file</code> elements which make up the item's content.
 * @return a List of <code>Element</code>s.
 */
public List<Element> getContentFiles() throws MetadataValidationException {
  if (contentFiles != null) {
    return contentFiles;
  }
  Element fileSec=mets.getChild("String_Node_Str",metsNS);
  if (fileSec == null) {
    throw new MetadataValidationException("String_Node_Str");
  }
  contentFiles=new ArrayList<Element>();
  Iterator fgi=fileSec.getChildren("String_Node_Str",metsNS).iterator();
  while (fgi.hasNext()) {
    Element fg=(Element)fgi.next();
    Iterator fi=fg.getChildren("String_Node_Str",metsNS).iterator();
    while (fi.hasNext()) {
      Element f=(Element)fi.next();
      contentFiles.add(f);
    }
  }
  return contentFiles;
}

Fixed version (ground truth):
/** 
 * Gets all <code>file</code> elements which make up the item's content.
 * @return a List of <code>Element</code>s.
 */
public List<Element> getContentFiles() throws MetadataValidationException {
  if (contentFiles != null) {
    return contentFiles;
  }
  contentFiles=new ArrayList<Element>();
  Element fileSec=mets.getChild("String_Node_Str",metsNS);
  if (fileSec != null) {
    Iterator fgi=fileSec.getChildren("String_Node_Str",metsNS).iterator();
    while (fgi.hasNext()) {
      Element fg=(Element)fgi.next();
      Iterator fi=fg.getChildren("String_Node_Str",metsNS).iterator();
      while (fi.hasNext()) {
        Element f=(Element)fi.next();
        contentFiles.add(f);
      }
    }
  }
  return contentFiles;
}
Program: 52173
Project: 52173
Buggy source:
/** 
 * Add File to list of successfully disseminated package files
 * @param file File
 */
protected void addToPackageList(File f){
  packageFileList.add(f);
}

Fixed version (ground truth):
/** 
 * Add File to list of successfully disseminated package files
 * @param file File
 */
protected void addToPackageList(File f){
  if (!packageFileList.contains(f)) {
    packageFileList.add(f);
  }
}
Program: 52174
Project: 52174
Buggy source:
/** 
 * Store original package on disk and companion file containing SWORD headers as found in the deposit object Also write companion file with header info from the deposit object.
 * @param deposit
 */
private void storePackageAsFile(Deposit deposit) throws IOException {
  String path=swordService.getSwordConfig().getFailedPackageDir();
  File dir=new File(path);
  if (!dir.exists() || !dir.isDirectory()) {
    throw new IOException("String_Node_Str");
  }
  String filenameBase="String_Node_Str" + deposit.getUsername() + "String_Node_Str"+ (new Date()).getTime();
  File packageFile=new File(path,filenameBase);
  File headersFile=new File(path,filenameBase + "String_Node_Str");
  InputStream is=deposit.getFile();
  FileOutputStream fos=new FileOutputStream(packageFile);
  Utils.copy(is,fos);
  fos.close();
  is.close();
  PrintWriter pw=new PrintWriter(new BufferedWriter(new FileWriter(headersFile)));
  pw.println("String_Node_Str" + deposit.getContentDisposition());
  pw.println("String_Node_Str" + deposit.getContentType());
  pw.println("String_Node_Str" + deposit.getPackaging());
  pw.println("String_Node_Str" + deposit.getLocation());
  pw.println("String_Node_Str" + deposit.getOnBehalfOf());
  pw.println("String_Node_Str" + deposit.getSlug());
  pw.println("String_Node_Str" + deposit.getUsername());
  pw.close();
}

Fixed version (ground truth):
/** 
 * Store original package on disk and companion file containing SWORD headers as found in the deposit object Also write companion file with header info from the deposit object.
 * @param deposit
 */
private void storePackageAsFile(Deposit deposit) throws IOException {
  String path=swordService.getSwordConfig().getFailedPackageDir();
  File dir=new File(path);
  if (!dir.exists() || !dir.isDirectory()) {
    throw new IOException("String_Node_Str");
  }
  String filenameBase="String_Node_Str" + deposit.getUsername() + "String_Node_Str"+ (new Date()).getTime();
  File packageFile=new File(path,filenameBase);
  File headersFile=new File(path,filenameBase + "String_Node_Str");
  InputStream is=new BufferedInputStream(new FileInputStream(deposit.getFile()));
  OutputStream fos=new BufferedOutputStream(new FileOutputStream(packageFile));
  Utils.copy(is,fos);
  fos.close();
  is.close();
  PrintWriter pw=new PrintWriter(new BufferedWriter(new FileWriter(headersFile)));
  pw.println("String_Node_Str" + deposit.getContentDisposition());
  pw.println("String_Node_Str" + deposit.getContentType());
  pw.println("String_Node_Str" + deposit.getPackaging());
  pw.println("String_Node_Str" + deposit.getLocation());
  pw.println("String_Node_Str" + deposit.getOnBehalfOf());
  pw.println("String_Node_Str" + deposit.getSlug());
  pw.println("String_Node_Str" + deposit.getUsername());
  pw.close();
}
Program: 52176
Project: 52176
Buggy source:
String getStringColumnCanonicalized(String column){
  if (!hasColumnCanonicalized(column)) {
    throw new IllegalArgumentException("String_Node_Str" + column);
  }
  if (isColumnNull(column)) {
    return null;
  }
  Object value=data.get(column);
  if (value == null) {
    throw new IllegalArgumentException("String_Node_Str" + column + "String_Node_Str");
  }
  if (!(value instanceof String)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return (String)value;
}

Fixed version (ground truth):
String getStringColumnCanonicalized(String column){
  if (!hasColumnCanonicalized(column)) {
    throw new IllegalArgumentException("String_Node_Str" + column);
  }
  if (isColumnNullCanonicalized(column)) {
    return null;
  }
  Object value=data.get(column);
  if (value == null) {
    throw new IllegalArgumentException("String_Node_Str" + column + "String_Node_Str");
  }
  if (!(value instanceof String)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return (String)value;
}
Program: 52178
Project: 52178
Buggy source:
/** 
 * Do nothing, to prevent wrapped stream from being closed prematurely.
 */
public void close(){
}

Fixed version (ground truth):
/** 
 * Do nothing, to prevent wrapped stream from being closed prematurely.
 */
@Override public void close(){
}