nus-yam/ex-repair huggingface dataset:
Program: 52181
Project: 52181
Buggy source:
public void run(){
  try {
    writeToStream(context,object,stream,emitPasswords);
    stream.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
catch (  PackageException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    writeToStream(context,object,stream,emitPasswords);
    stream.close();
  }
 catch (  IOException e) {
    log.error(e);
  }
catch (  PackageException e) {
    log.error(e);
  }
}
Program: 52184
Project: 52184
Buggy source:
/** 
 * Initalise a new change holder for an existing item
 * @param i The Item to store
 */
public BulkEditChange(Item i){
  item=i;
  newItem=false;
  empty=true;
  adds=new ArrayList<DCValue>();
  removes=new ArrayList<DCValue>();
  constant=new ArrayList<DCValue>();
  complete=new ArrayList<DCValue>();
  oldMappedCollections=new ArrayList<Collection>();
  newMappedCollections=new ArrayList<Collection>();
}

Fixed version (ground truth):
/** 
 * Initialise a new change holder for an existing item
 * @param i The Item to store
 */
public BulkEditChange(Item i){
  item=i;
  newItem=false;
  empty=true;
  adds=new ArrayList<DCValue>();
  removes=new ArrayList<DCValue>();
  constant=new ArrayList<DCValue>();
  complete=new ArrayList<DCValue>();
  oldMappedCollections=new ArrayList<Collection>();
  newMappedCollections=new ArrayList<Collection>();
}
Program: 52185
Project: 52185
Buggy source:
/** 
 * Initalise this class with values from dspace.cfg
 */
private void init(){
  setValueSeparator();
  setFieldSeparator();
  headings=new ArrayList<String>();
  lines=new ArrayList<DSpaceCSVLine>();
  counter=0;
  ignore=new Hashtable<String,String>();
  String toIgnore=ConfigurationManager.getProperty("String_Node_Str");
  if ((toIgnore == null) || ("String_Node_Str".equals(toIgnore.trim()))) {
    toIgnore="String_Node_Str" + "String_Node_Str";
  }
  String[] toIgnoreArray=toIgnore.split("String_Node_Str");
  for (  String toIgnoreString : toIgnoreArray) {
    if (!"String_Node_Str".equals(toIgnoreString.trim())) {
      ignore.put(toIgnoreString.trim(),toIgnoreString.trim());
    }
  }
}

Fixed version (ground truth):
/** 
 * Initialise this class with values from dspace.cfg
 */
private void init(){
  setValueSeparator();
  setFieldSeparator();
  headings=new ArrayList<String>();
  lines=new ArrayList<DSpaceCSVLine>();
  counter=0;
  ignore=new Hashtable<String,String>();
  String toIgnore=ConfigurationManager.getProperty("String_Node_Str");
  if ((toIgnore == null) || ("String_Node_Str".equals(toIgnore.trim()))) {
    toIgnore="String_Node_Str" + "String_Node_Str";
  }
  String[] toIgnoreArray=toIgnore.split("String_Node_Str");
  for (  String toIgnoreString : toIgnoreArray) {
    if (!"String_Node_Str".equals(toIgnoreString.trim())) {
      ignore.put(toIgnoreString.trim(),toIgnoreString.trim());
    }
  }
}
Program: 52187
Project: 52187
Buggy source:
/** 
 * Set the value separator for multiple values stored in one csv value. Is set in dspace.cfg as bulkedit.valueseparator If not set, defaults to double pipe '||'
 */
private void setValueSeparator(){
  valueSeparator=ConfigurationManager.getProperty("String_Node_Str");
  if ((valueSeparator != null) && (!"String_Node_Str".equals(valueSeparator.trim()))) {
    valueSeparator=valueSeparator.trim();
  }
 else {
    valueSeparator="String_Node_Str";
  }
  Pattern spchars=Pattern.compile("String_Node_Str");
  Matcher match=spchars.matcher(valueSeparator);
  escpaedValueSeparator=match.replaceAll("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Set the value separator for multiple values stored in one csv value. Is set in dspace.cfg as bulkedit.valueseparator If not set, defaults to double pipe '||'
 */
private void setValueSeparator(){
  valueSeparator=ConfigurationManager.getProperty("String_Node_Str");
  if ((valueSeparator != null) && (!"String_Node_Str".equals(valueSeparator.trim()))) {
    valueSeparator=valueSeparator.trim();
  }
 else {
    valueSeparator="String_Node_Str";
  }
  Pattern spchars=Pattern.compile("String_Node_Str");
  Matcher match=spchars.matcher(valueSeparator);
  escapedValueSeparator=match.replaceAll("String_Node_Str");
}
Program: 52188
Project: 52188
Buggy source:
/** 
 * output the explanation of the stat block in the relevant format
 * @param explanation     the explanatory or clarification text for the stats
 * @return      a string contianing the formatted explanation
 */
abstract public String blockExplanation(String explanation);

Fixed version (ground truth):
/** 
 * output the explanation of the stat block in the relevant format
 * @param explanation     the explanatory or clarification text for the stats
 * @return      a string containing the formatted explanation
 */
abstract public String blockExplanation(String explanation);
Program: 52189
Project: 52189
Buggy source:
/** 
 * Syncronize the cached list of analysis / report files with the reports directory We synchronize if: 1) The number of files is different (ie. files have been added or removed) 2) We haven't cached anything yet 3) The cache was last generate over an hour ago
 */
private static void syncFileList(){
  File[] fileList=StatisticsLoader.getAnalysisAndReportFileList();
  if (fileList != null && fileList.length != fileCount)   StatisticsLoader.loadFileList(fileList);
 else   if (lastLoaded == null)   StatisticsLoader.loadFileList(fileList);
 else   if (DateUtils.addHours(lastLoaded,1).before(new Date()))   StatisticsLoader.loadFileList(fileList);
}

Fixed version (ground truth):
/** 
 * Synchronize the cached list of analysis / report files with the reports directory We synchronize if: 1) The number of files is different (ie. files have been added or removed) 2) We haven't cached anything yet 3) The cache was last generate over an hour ago
 */
private static void syncFileList(){
  File[] fileList=StatisticsLoader.getAnalysisAndReportFileList();
  if (fileList != null && fileList.length != fileCount)   StatisticsLoader.loadFileList(fileList);
 else   if (lastLoaded == null)   StatisticsLoader.loadFileList(fileList);
 else   if (DateUtils.addHours(lastLoaded,1).before(new Date()))   StatisticsLoader.loadFileList(fileList);
}
Program: 52190
Project: 52190
Buggy source:
/** 
 * The helper function to vaildate the DatePattern.
 * @param pstrPattern The DatePattern to be validated.
 * @return The validated date pattern or defautlt DATE_PATTERN
 */
private String checkPattern(String pstrPattern){
  String strRet=null;
  SimpleDateFormat objFmt=new SimpleDateFormat(DATE_PATTERN);
  try {
    this.mobjSDF=new SimpleDateFormat(pstrPattern);
    strRet=pstrPattern;
  }
 catch (  NullPointerException NPExIgnore) {
    LogLog.error("String_Node_Str" + pstrPattern,NPExIgnore);
    this.mobjSDF=objFmt;
    strRet=DATE_PATTERN;
  }
catch (  IllegalArgumentException IlArgExIgnore) {
    LogLog.error("String_Node_Str" + pstrPattern,IlArgExIgnore);
    this.mobjSDF=objFmt;
    strRet=DATE_PATTERN;
  }
 finally {
    objFmt=null;
  }
  return strRet;
}

Fixed version (ground truth):
/** 
 * The helper function to validate the DatePattern.
 * @param pstrPattern The DatePattern to be validated.
 * @return The validated date pattern or defautlt DATE_PATTERN
 */
private String checkPattern(String pstrPattern){
  String strRet=null;
  SimpleDateFormat objFmt=new SimpleDateFormat(DATE_PATTERN);
  try {
    this.mobjSDF=new SimpleDateFormat(pstrPattern);
    strRet=pstrPattern;
  }
 catch (  NullPointerException NPExIgnore) {
    LogLog.error("String_Node_Str" + pstrPattern,NPExIgnore);
    this.mobjSDF=objFmt;
    strRet=DATE_PATTERN;
  }
catch (  IllegalArgumentException IlArgExIgnore) {
    LogLog.error("String_Node_Str" + pstrPattern,IlArgExIgnore);
    this.mobjSDF=objFmt;
    strRet=DATE_PATTERN;
  }
 finally {
    objFmt=null;
  }
  return strRet;
}
Program: 52192
Project: 52192
Buggy source:
/** 
 * Loads SubmissionConfig object for the given submission info object. If a SubmissionConfig object cannot be loaded, a Servlet Error is thrown. <p> This method just loads this SubmissionConfig object internally, so that it is available via a call to "getSubmissionConfig()"
 * @param request The HTTP Servlet Request object
 * @param subInfo the SubmissionInfo object we are loading into
 * @param forceReload If true, this method reloads from stratch (and overwrites cached SubmissionConfig)
 */
private static void loadSubmissionConfig(HttpServletRequest request,SubmissionInfo subInfo,boolean forceReload) throws ServletException {
  log.debug("String_Node_Str");
  if (!forceReload) {
    subInfo.submissionConfig=loadSubmissionConfigFromCache(request.getSession(),subInfo.getCollectionHandle(),subInfo.isInWorkflow());
  }
  if (subInfo.submissionConfig == null || forceReload) {
    subInfo.submissionConfig=submissionConfigReader.getSubmissionConfig(subInfo.getCollectionHandle(),subInfo.isInWorkflow());
    saveSubmissionConfigToCache(request.getSession(),subInfo.submissionConfig,subInfo.getCollectionHandle(),subInfo.isInWorkflow());
    loadProgressBar(request,subInfo,true);
  }
 else {
    log.debug("String_Node_Str");
    loadProgressBar(request,subInfo,false);
  }
}

Fixed version (ground truth):
/** 
 * Loads SubmissionConfig object for the given submission info object. If a SubmissionConfig object cannot be loaded, a Servlet Error is thrown. <p> This method just loads this SubmissionConfig object internally, so that it is available via a call to "getSubmissionConfig()"
 * @param request The HTTP Servlet Request object
 * @param subInfo the SubmissionInfo object we are loading into
 * @param forceReload If true, this method reloads from scratch (and overwrites cached SubmissionConfig)
 */
private static void loadSubmissionConfig(HttpServletRequest request,SubmissionInfo subInfo,boolean forceReload) throws ServletException {
  log.debug("String_Node_Str");
  if (!forceReload) {
    subInfo.submissionConfig=loadSubmissionConfigFromCache(request.getSession(),subInfo.getCollectionHandle(),subInfo.isInWorkflow());
  }
  if (subInfo.submissionConfig == null || forceReload) {
    subInfo.submissionConfig=submissionConfigReader.getSubmissionConfig(subInfo.getCollectionHandle(),subInfo.isInWorkflow());
    saveSubmissionConfigToCache(request.getSession(),subInfo.submissionConfig,subInfo.getCollectionHandle(),subInfo.isInWorkflow());
    loadProgressBar(request,subInfo,true);
  }
 else {
    log.debug("String_Node_Str");
    loadProgressBar(request,subInfo,false);
  }
}
Program: 52193
Project: 52193
Buggy source:
/** 
 * Formats the file size. Examples: - 50 = 50B - 1024 = 1KB - 1,024,000 = 1MB etc The numbers are formatted using java Locales
 * @param in The number to covnert
 * @return the file size as a String
 */
public static String formatFileSize(double in){
  NumberFormat nf=NumberFormat.getNumberInstance(Locale.getDefault());
  DecimalFormat df=(DecimalFormat)nf;
  df.applyPattern("String_Node_Str");
  if (in < 1024) {
    df.applyPattern("String_Node_Str");
    return df.format(in) + "String_Node_Str" + "String_Node_Str";
  }
 else   if (in < 1024000) {
    in=in / 1024;
    return df.format(in) + "String_Node_Str" + "String_Node_Str";
  }
 else   if (in < 1024000000) {
    in=in / 1024000;
    return df.format(in) + "String_Node_Str" + "String_Node_Str";
  }
 else {
    in=in / 1024000000;
    return df.format(in) + "String_Node_Str" + "String_Node_Str";
  }
}

Fixed version (ground truth):
/** 
 * Formats the file size. Examples: - 50 = 50B - 1024 = 1KB - 1,024,000 = 1MB etc The numbers are formatted using java Locales
 * @param in The number to convert
 * @return the file size as a String
 */
public static String formatFileSize(double in){
  NumberFormat nf=NumberFormat.getNumberInstance(Locale.getDefault());
  DecimalFormat df=(DecimalFormat)nf;
  df.applyPattern("String_Node_Str");
  if (in < 1024) {
    df.applyPattern("String_Node_Str");
    return df.format(in) + "String_Node_Str" + "String_Node_Str";
  }
 else   if (in < 1024000) {
    in=in / 1024;
    return df.format(in) + "String_Node_Str" + "String_Node_Str";
  }
 else   if (in < 1024000000) {
    in=in / 1024000;
    return df.format(in) + "String_Node_Str" + "String_Node_Str";
  }
 else {
    in=in / 1024000000;
    return df.format(in) + "String_Node_Str" + "String_Node_Str";
  }
}
Program: 52194
Project: 52194
Buggy source:
/** 
 * So that any left over indices for items which have been deleted can be assured to have been removed, this method checks for indicies for items which are not in the item table. If it finds an index which does not have an associated item it removes it.
 * @param table		the index table to check
 * @param map		the name of the associated distinct mapping table
 * @param withdrawn TODO
 * @throws BrowseException
 */
public void pruneExcess(String table,String map,boolean withdrawn) throws BrowseException ;

Fixed version (ground truth):
/** 
 * So that any left over indices for items which have been deleted can be assured to have been removed, this method checks for indices for items which are not in the item table. If it finds an index which does not have an associated item it removes it.
 * @param table		the index table to check
 * @param map		the name of the associated distinct mapping table
 * @param withdrawn TODO
 * @throws BrowseException
 */
public void pruneExcess(String table,String map,boolean withdrawn) throws BrowseException ;
Program: 52195
Project: 52195
Buggy source:
private static void init(){
  if (hiddenElementSets == null) {
    hiddenElementSets=new HashMap<String,Set<String>>();
    hiddenElementMaps=new HashMap<String,Map<String,Set<String>>>();
    Enumeration pne=ConfigurationManager.propertyNames();
    while (pne.hasMoreElements()) {
      String key=(String)pne.nextElement();
      if (key.startsWith(CONFIG_PREFIX)) {
        String mdField=key.substring(CONFIG_PREFIX.length());
        String segment[]=mdField.split("String_Node_Str",3);
        if (segment.length == 3) {
          Map<String,Set<String>> eltMap=hiddenElementMaps.get(segment[0]);
          if (eltMap == null) {
            eltMap=new HashMap<String,Set<String>>();
            hiddenElementMaps.put(segment[0],eltMap);
          }
          if (!eltMap.containsKey(segment[1])) {
            eltMap.put(segment[1],new HashSet<String>());
          }
          eltMap.get(segment[1]).add(segment[2]);
        }
 else         if (segment.length == 2) {
          if (!hiddenElementSets.containsKey(segment[0])) {
            hiddenElementSets.put(segment[0],new HashSet<String>());
          }
          hiddenElementSets.get(segment[0]).add(segment[1]);
        }
 else {
          log.warn("String_Node_Str" + mdField + "String_Node_Str"+ key);
        }
      }
    }
  }
}

Fixed version (ground truth):
private static synchronized void init(){
  if (!isInitialized()) {
    hiddenElementSets=new HashMap<String,Set<String>>();
    hiddenElementMaps=new HashMap<String,Map<String,Set<String>>>();
    Enumeration pne=ConfigurationManager.propertyNames();
    while (pne.hasMoreElements()) {
      String key=(String)pne.nextElement();
      if (key.startsWith(CONFIG_PREFIX)) {
        String mdField=key.substring(CONFIG_PREFIX.length());
        String segment[]=mdField.split("String_Node_Str",3);
        if (segment.length == 3) {
          Map<String,Set<String>> eltMap=hiddenElementMaps.get(segment[0]);
          if (eltMap == null) {
            eltMap=new HashMap<String,Set<String>>();
            hiddenElementMaps.put(segment[0],eltMap);
          }
          if (!eltMap.containsKey(segment[1])) {
            eltMap.put(segment[1],new HashSet<String>());
          }
          eltMap.get(segment[1]).add(segment[2]);
        }
 else         if (segment.length == 2) {
          if (!hiddenElementSets.containsKey(segment[0])) {
            hiddenElementSets.put(segment[0],new HashSet<String>());
          }
          hiddenElementSets.get(segment[0]).add(segment[1]);
        }
 else {
          log.warn("String_Node_Str" + mdField + "String_Node_Str"+ key);
        }
      }
    }
  }
}
Program: 52196
Project: 52196
Buggy source:
public static boolean isHidden(Context context,String schema,String element,String qualifier) throws SQLException {
  if (context != null && AuthorizeManager.isAdmin(context))   return false;
  init();
  if (qualifier == null) {
    Set<String> elts=hiddenElementSets.get(schema);
    return elts == null ? false : elts.contains(element);
  }
 else {
    Map<String,Set<String>> elts=hiddenElementMaps.get(schema);
    if (elts == null)     return false;
    Set<String> quals=elts.get(element);
    return quals == null ? false : quals.contains(qualifier);
  }
}

Fixed version (ground truth):
public static boolean isHidden(Context context,String schema,String element,String qualifier) throws SQLException {
  if (context != null && AuthorizeManager.isAdmin(context))   return false;
  if (!isInitialized()) {
    init();
  }
  if (qualifier == null) {
    Set<String> elts=hiddenElementSets.get(schema);
    return elts == null ? false : elts.contains(element);
  }
 else {
    Map<String,Set<String>> elts=hiddenElementMaps.get(schema);
    if (elts == null)     return false;
    Set<String> quals=elts.get(element);
    return quals == null ? false : quals.contains(qualifier);
  }
}
Program: 52197
Project: 52197
Buggy source:
private static void initCache(Context context) throws SQLException {
  if (id2field != null)   return;
synchronized (MetadataField.class) {
    if (id2field == null) {
      HashMap new_id2field=new HashMap();
      log.info("String_Node_Str");
      TableRowIterator tri=DatabaseManager.queryTable(context,"String_Node_Str","String_Node_Str");
      try {
        while (tri.hasNext()) {
          TableRow row=tri.next();
          int fieldID=row.getIntColumn("String_Node_Str");
          new_id2field.put(new Integer(fieldID),new MetadataField(row));
        }
      }
  finally {
        if (tri != null)         tri.close();
      }
      id2field=new_id2field;
    }
  }
}

Fixed version (ground truth):
private static synchronized void initCache(Context context) throws SQLException {
  if (!isCacheInitialized()) {
    HashMap new_id2field=new HashMap();
    log.info("String_Node_Str");
    TableRowIterator tri=DatabaseManager.queryTable(context,"String_Node_Str","String_Node_Str");
    try {
      while (tri.hasNext()) {
        TableRow row=tri.next();
        int fieldID=row.getIntColumn("String_Node_Str");
        new_id2field.put(new Integer(fieldID),new MetadataField(row));
      }
    }
  finally {
      if (tri != null)       tri.close();
    }
    id2field=new_id2field;
  }
}
Program: 52198
Project: 52198
Buggy source:
/** 
 * Find the field corresponding to the given numeric ID.  The ID is a database key internal to DSpace.
 * @param context context, in case we need to read it in from DB
 * @param id the metadata field ID
 * @return the metadata field object
 * @throws SQLException
 */
public static MetadataField find(Context context,int id) throws SQLException {
  initCache(context);
  Integer iid=new Integer(id);
  if (!id2field.containsKey(iid))   return null;
  return (MetadataField)id2field.get(iid);
}

Fixed version (ground truth):
/** 
 * Find the field corresponding to the given numeric ID.  The ID is a database key internal to DSpace.
 * @param context context, in case we need to read it in from DB
 * @param id the metadata field ID
 * @return the metadata field object
 * @throws SQLException
 */
public static MetadataField find(Context context,int id) throws SQLException {
  if (!isCacheInitialized()) {
    initCache(context);
  }
  Integer iid=new Integer(id);
  if (!id2field.containsKey(iid))   return null;
  return (MetadataField)id2field.get(iid);
}
Program: 52199
Project: 52199
Buggy source:
private static void initCache(Context context) throws SQLException {
  if (id2schema != null && name2schema != null)   return;
synchronized (MetadataSchema.class) {
    if (id2schema == null && name2schema == null) {
      log.info("String_Node_Str");
      HashMap new_id2schema=new HashMap();
      HashMap new_name2schema=new HashMap();
      TableRowIterator tri=DatabaseManager.queryTable(context,"String_Node_Str","String_Node_Str");
      try {
        while (tri.hasNext()) {
          TableRow row=tri.next();
          MetadataSchema s=new MetadataSchema(row);
          new_id2schema.put(new Integer(s.schemaID),s);
          new_name2schema.put(s.name,s);
        }
      }
  finally {
        if (tri != null)         tri.close();
      }
      id2schema=new_id2schema;
      name2schema=new_name2schema;
    }
  }
}

Fixed version (ground truth):
private static synchronized void initCache(Context context) throws SQLException {
  if (!isCacheInitialized()) {
    log.info("String_Node_Str");
    HashMap new_id2schema=new HashMap();
    HashMap new_name2schema=new HashMap();
    TableRowIterator tri=DatabaseManager.queryTable(context,"String_Node_Str","String_Node_Str");
    try {
      while (tri.hasNext()) {
        TableRow row=tri.next();
        MetadataSchema s=new MetadataSchema(row);
        new_id2schema.put(new Integer(s.schemaID),s);
        new_name2schema.put(s.name,s);
      }
    }
  finally {
      if (tri != null)       tri.close();
    }
    id2schema=new_id2schema;
    name2schema=new_name2schema;
  }
}
Program: 52200
Project: 52200
Buggy source:
/** 
 * Get the schema corresponding with this short name.
 * @param context context, in case we need to read it in from DB
 * @param shortName the short name for the schema
 * @return the metadata schema object
 * @throws SQLException
 */
public static MetadataSchema find(Context context,String shortName) throws SQLException {
  if (shortName == null)   return null;
  initCache(context);
  if (!name2schema.containsKey(shortName))   return null;
  return (MetadataSchema)name2schema.get(shortName);
}

Fixed version (ground truth):
/** 
 * Get the schema corresponding with this short name.
 * @param context context, in case we need to read it in from DB
 * @param shortName the short name for the schema
 * @return the metadata schema object
 * @throws SQLException
 */
public static MetadataSchema find(Context context,String shortName) throws SQLException {
  if (shortName == null)   return null;
  if (!isCacheInitialized()) {
    initCache(context);
  }
  if (!name2schema.containsKey(shortName))   return null;
  return (MetadataSchema)name2schema.get(shortName);
}
Program: 52201
Project: 52201
Buggy source:
public static String[] getPluginNames(){
  if (pluginNames == null) {
    try {
      if (dci == null)       dci=new DCInputsReader();
    }
 catch (    DCInputsReaderException e) {
      log.error("String_Node_Str",e);
    }
    List<String> names=new ArrayList<String>();
    Iterator pi=dci.getPairsNameIterator();
    while (pi.hasNext())     names.add((String)pi.next());
    pluginNames=names.toArray(new String[names.size()]);
    log.debug("String_Node_Str" + Arrays.deepToString(pluginNames));
  }
  return pluginNames;
}

Fixed version (ground truth):
public static String[] getPluginNames(){
  if (pluginNames == null) {
    try {
      if (dci == null)       dci=new DCInputsReader();
    }
 catch (    DCInputsReaderException e) {
      log.error("String_Node_Str",e);
    }
    List<String> names=new ArrayList<String>();
    Iterator pi=dci.getPairsNameIterator();
    while (pi.hasNext()) {
      names.add((String)pi.next());
    }
    pluginNames=names.toArray(new String[names.size()]);
    log.debug("String_Node_Str" + Arrays.deepToString(pluginNames));
  }
  return pluginNames;
}
Program: 52202
Project: 52202
Buggy source:
/** 
 * Close any IndexSearcher that is currently open.
 */
public static void close(){
  if (searcher != null) {
    try {
      searcher.close();
      searcher=null;
    }
 catch (    IOException ioe) {
      log.error("String_Node_Str",ioe);
    }
  }
}

Fixed version (ground truth):
/** 
 * Close any IndexSearcher that is currently open.
 */
public static synchronized void close(){
  if (searcher != null) {
    try {
      searcher.close();
      searcher=null;
    }
 catch (    IOException ioe) {
      log.error("String_Node_Str",ioe);
    }
  }
}
Program: 52203
Project: 52203
Buggy source:
/** 
 * Return all the configured sort options
 * @return
 * @throws SortException
 */
public static Set<SortOption> getSortOptions() throws SortException {
  if (SortOption.sortOptionsSet != null)   return SortOption.sortOptionsSet;
synchronized (SortOption.class) {
    if (SortOption.sortOptionsSet == null) {
      Set<SortOption> newSortOptionsSet=new HashSet<SortOption>();
      int idx=1;
      String option;
      while (((option=ConfigurationManager.getProperty("String_Node_Str" + idx))) != null) {
        SortOption so=new SortOption(idx,option);
        newSortOptionsSet.add(so);
        idx++;
      }
      SortOption.sortOptionsSet=newSortOptionsSet;
    }
  }
  return SortOption.sortOptionsSet;
}

Fixed version (ground truth):
/** 
 * Return all the configured sort options
 * @return
 * @throws SortException
 */
public static Set<SortOption> getSortOptions() throws SortException {
  if (SortOption.sortOptionsSet == null) {
    throw new SortException("String_Node_Str");
  }
  return SortOption.sortOptionsSet;
}
Program: 52206
Project: 52206
Buggy source:
/** 
 * Return a Group Type string (see RoleDisseminator.GROUP_TYPE_* constants) which describes the type of group and its relation to the given object. <P> As a basic example, if the Group is a Collection Administration group, the Group Type string returned should be "ADMIN" <P> If type string cannot be determined, null is returned.
 * @param dso the related DSpaceObject
 * @param group the group
 * @return a group type string or null
 */
private String getGroupType(DSpaceObject dso,Group group){
  if (dso.getType() == Constants.COMMUNITY) {
    Community community=(Community)dso;
    if (community.getAdministrators().equals(group))     return GROUP_TYPE_ADMIN;
  }
 else   if (dso.getType() == Constants.COLLECTION) {
    Collection collection=(Collection)dso;
    if (collection.getAdministrators().equals(group))     return GROUP_TYPE_ADMIN;
 else     if (collection.getSubmitters().equals(group))     return GROUP_TYPE_SUBMIT;
 else     if (collection.getWorkflowGroup(1).equals(group))     return GROUP_TYPE_WORKFLOW_STEP_1;
 else     if (collection.getWorkflowGroup(2).equals(group))     return GROUP_TYPE_WORKFLOW_STEP_2;
 else     if (collection.getWorkflowGroup(3).equals(group))     return GROUP_TYPE_WORKFLOW_STEP_3;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Return a Group Type string (see RoleDisseminator.GROUP_TYPE_* constants) which describes the type of group and its relation to the given object. <P> As a basic example, if the Group is a Collection Administration group, the Group Type string returned should be "ADMIN" <P> If type string cannot be determined, null is returned.
 * @param dso the related DSpaceObject
 * @param group the group
 * @return a group type string or null
 */
private String getGroupType(DSpaceObject dso,Group group){
  if (dso.getType() == Constants.COMMUNITY) {
    Community community=(Community)dso;
    if (community.getAdministrators() != null && community.getAdministrators().equals(group))     return GROUP_TYPE_ADMIN;
  }
 else   if (dso.getType() == Constants.COLLECTION) {
    Collection collection=(Collection)dso;
    if (collection.getAdministrators() != null && collection.getAdministrators().equals(group))     return GROUP_TYPE_ADMIN;
 else     if (collection.getSubmitters() != null && collection.getSubmitters().equals(group))     return GROUP_TYPE_SUBMIT;
 else     if (collection.getWorkflowGroup(1) != null && collection.getWorkflowGroup(1).equals(group))     return GROUP_TYPE_WORKFLOW_STEP_1;
 else     if (collection.getWorkflowGroup(2) != null && collection.getWorkflowGroup(2).equals(group))     return GROUP_TYPE_WORKFLOW_STEP_2;
 else     if (collection.getWorkflowGroup(3) != null && collection.getWorkflowGroup(3).equals(group))     return GROUP_TYPE_WORKFLOW_STEP_3;
  }
  return null;
}
Program: 52209
Project: 52209
Buggy source:
/** 
 * Emit XML describing a single Group.
 * @param context the DSpace Context
 * @parm relatedObjectthe DSpaceObject related to this group (if any)
 * @param group the Group to describe
 * @param write the description to this stream
 */
private void writeGroup(Context context,DSpaceObject relatedObject,Group group,XMLStreamWriter writer) throws XMLStreamException, PackageException {
  writer.writeStartElement(GROUP);
  writer.writeAttribute(ID,String.valueOf(group.getID()));
  writer.writeAttribute(NAME,PackageUtils.crosswalkDefaultGroupName(context,group.getName()));
  String groupType=getGroupType(relatedObject,group);
  if (groupType != null && !groupType.isEmpty())   writer.writeAttribute(TYPE,groupType);
  writer.writeStartElement(MEMBERS);
  for (  EPerson member : group.getMembers()) {
    writer.writeEmptyElement(MEMBER);
    writer.writeAttribute(ID,String.valueOf(member.getID()));
    writer.writeAttribute(NAME,member.getName());
  }
  writer.writeEndElement();
  writer.writeStartElement(MEMBER_GROUPS);
  for (  Group member : group.getMemberGroups()) {
    writer.writeEmptyElement(MEMBER_GROUP);
    writer.writeAttribute(ID,String.valueOf(member.getID()));
    writer.writeAttribute(NAME,PackageUtils.crosswalkDefaultGroupName(context,member.getName()));
  }
  writer.writeEndElement();
  writer.writeEndElement();
}

Fixed version (ground truth):
/** 
 * Emit XML describing a single Group.
 * @param context the DSpace Context
 * @parm relatedObjectthe DSpaceObject related to this group (if any)
 * @param group the Group to describe
 * @param write the description to this stream
 */
private void writeGroup(Context context,DSpaceObject relatedObject,Group group,XMLStreamWriter writer) throws XMLStreamException, PackageException {
  writer.writeStartElement(GROUP);
  writer.writeAttribute(ID,String.valueOf(group.getID()));
  writer.writeAttribute(NAME,PackageUtils.translateGroupNameForExport(context,group.getName()));
  String groupType=getGroupType(relatedObject,group);
  if (groupType != null && !groupType.isEmpty())   writer.writeAttribute(TYPE,groupType);
  writer.writeStartElement(MEMBERS);
  for (  EPerson member : group.getMembers()) {
    writer.writeEmptyElement(MEMBER);
    writer.writeAttribute(ID,String.valueOf(member.getID()));
    writer.writeAttribute(NAME,member.getName());
  }
  writer.writeEndElement();
  writer.writeStartElement(MEMBER_GROUPS);
  for (  Group member : group.getMemberGroups()) {
    writer.writeEmptyElement(MEMBER_GROUP);
    writer.writeAttribute(ID,String.valueOf(member.getID()));
    writer.writeAttribute(NAME,PackageUtils.translateGroupNameForExport(context,member.getName()));
  }
  writer.writeEndElement();
  writer.writeEndElement();
}
Program: 52211
Project: 52211
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",URLEncode(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(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()));
  return super.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 {
  Request request=ObjectModelHelper.getRequest(objectModel);
  String scope=request.getParameter("String_Node_Str");
  if (scope != null)   parameters.put("String_Node_Str",scope);
  String query=getQuery();
  if (!"String_Node_Str".equals(query))   parameters.put("String_Node_Str",URLEncode(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(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()));
  return super.generateURL("String_Node_Str",parameters);
}
Program: 52213
Project: 52213
Buggy source:
/** 
 * Find the eperson by their email address
 * @return EPerson
 */
public static EPerson findByEmail(Context context,String email) throws SQLException, AuthorizeException {
  TableRow row=DatabaseManager.findByUnique(context,"String_Node_Str","String_Node_Str",email);
  if (row == null) {
    return null;
  }
 else {
    EPerson fromCache=(EPerson)context.fromCache(EPerson.class,row.getIntColumn("String_Node_Str"));
    if (fromCache != null) {
      return fromCache;
    }
 else {
      return new EPerson(context,row);
    }
  }
}

Fixed version (ground truth):
/** 
 * Find the eperson by their email address
 * @return EPerson
 */
public static EPerson findByEmail(Context context,String email) throws SQLException, AuthorizeException {
  if (email == null) {
    return null;
  }
  TableRow row=DatabaseManager.findByUnique(context,"String_Node_Str","String_Node_Str",email.toLowerCase());
  if (row == null) {
    return null;
  }
 else {
    EPerson fromCache=(EPerson)context.fromCache(EPerson.class,row.getIntColumn("String_Node_Str"));
    if (fromCache != null) {
      return fromCache;
    }
 else {
      return new EPerson(context,row);
    }
  }
}
Program: 52215
Project: 52215
Buggy source:
private synchronized String toStringInternal(){
  if (granularity == DateGran.YEAR)   return yearIso.format(calendar.getTime());
 else   if (granularity == DateGran.MONTH)   return yearMonthIso.format(calendar.getTime());
 else   if (granularity == DateGran.DAY)   return dateIso.format(calendar.getTime());
 else   return fullIso.format(calendar.getTime());
}

Fixed version (ground truth):
private synchronized String toStringInternal(){
  if (granularity == DateGran.YEAR)   return String.format("String_Node_Str",getYear());
 else   if (granularity == DateGran.MONTH)   return String.format("String_Node_Str",getYear(),getMonth());
 else   if (granularity == DateGran.DAY)   return String.format("String_Node_Str",getYear(),getMonth(),getDay());
 else   return fullIso.format(calendar.getTime());
}
Program: 52216
Project: 52216
Buggy source:
/** 
 * Construct a date from a Dublin Core value
 * @param fromDC the date string, in ISO 8601 (no timezone, always use UTC/GMT)
 */
public DCDate(String fromDC){
  super();
  if ((fromDC == null) || fromDC.equals("String_Node_Str")) {
    return;
  }
  granularity=DateGran.TIME;
  Date date=tryParse(fullIso,fromDC);
  if (date == null)   date=tryParse(fullIso2,fromDC);
  if (date == null)   date=tryParse(fullIso3,fromDC);
  if (date == null) {
    date=tryParse(dateIso,fromDC);
    granularity=DateGran.DAY;
  }
  if (date == null) {
    date=tryParse(yearMonthIso,fromDC);
    granularity=DateGran.MONTH;
  }
  if (date == null) {
    date=tryParse(yearIso,fromDC);
    granularity=DateGran.YEAR;
  }
  if (date == null)   log.warn("String_Node_Str" + fromDC + "String_Node_Str");
 else   setTime(date);
}

Fixed version (ground truth):
/** 
 * Construct a date from a Dublin Core value
 * @param fromDC the date string, in ISO 8601 (no timezone, always use UTC/GMT)
 */
public DCDate(String fromDC){
  super();
  if ((fromDC == null) || fromDC.equals("String_Node_Str")) {
    return;
  }
  granularity=DateGran.TIME;
  Date date=tryParse(fullIso,fromDC);
  if (date == null)   date=tryParse(fullIso2,fromDC);
  if (date == null)   date=tryParse(fullIso3,fromDC);
  if (date == null) {
    date=tryParse(dateIso,fromDC);
    if (date != null) {
      long ldate=date.getTime();
      date=new Date(ldate - localZone.getOffset(ldate));
      granularity=DateGran.DAY;
    }
  }
  if (date == null) {
    date=tryParse(yearMonthIso,fromDC);
    if (date != null) {
      long ldate=date.getTime();
      date=new Date(ldate - localZone.getOffset(ldate));
      granularity=DateGran.MONTH;
    }
  }
  if (date == null) {
    date=tryParse(yearIso,fromDC);
    if (date != null) {
      long ldate=date.getTime();
      date=new Date(ldate - localZone.getOffset(ldate));
      granularity=DateGran.YEAR;
    }
  }
  if (date == null)   log.warn("String_Node_Str" + fromDC + "String_Node_Str");
 else   setTime(date);
}
Program: 52227
Project: 52227
Buggy source:
public void addBody(Body body) throws WingException {
  Division updated=body.addDivision("String_Node_Str","String_Node_Str");
  updated.setHead(T_head);
  updated.addPara(T_para1);
  updated.addPara().addXref(contextPath,T_go_home);
}

Fixed version (ground truth):
public void addBody(Body body) throws WingException {
  Division updated=body.addDivision("String_Node_Str","String_Node_Str");
  updated.setHead(T_head);
  updated.addPara(T_para1);
  updated.addPara().addXref(contextPath + "String_Node_Str",T_go_home);
}
Program: 52228
Project: 52228
Buggy source:
/** 
 * Interpret named event type.
 * @param text name of event type.
 * @returns numeric value of event type or 0 for error.
 */
public static int parseEventType(String s){
  if (s.equals("String_Node_Str") | s.equalsIgnoreCase("String_Node_Str")) {
    int result=0;
    for (int i=0; i < eventTypeText.length; ++i)     result|=(1 << i);
    return result;
  }
  for (int i=0; i < eventTypeText.length; ++i)   if (eventTypeText[i].equalsIgnoreCase(s))   return 1 << i;
  return 0;
}

Fixed version (ground truth):
/** 
 * Interpret named event type.
 * @param text name of event type.
 * @returns numeric value of event type or 0 for error.
 */
public static int parseEventType(String s){
  if ("String_Node_Str".equals(s) || "String_Node_Str".equalsIgnoreCase(s)) {
    int result=0;
    for (int i=0; i < eventTypeText.length; ++i)     result|=(1 << i);
    return result;
  }
  for (int i=0; i < eventTypeText.length; ++i)   if (eventTypeText[i].equalsIgnoreCase(s))   return 1 << i;
  return 0;
}
Program: 52229
Project: 52229
Buggy source:
/** 
 * Translate a textual DSpace Object type name into an event subject-type mask. NOTE: This returns a BIT-MASK, not a numeric type value; the mask is only used within the event system.
 * @param s text name of object type.
 * @returns numeric value of object type or 0 for error.
 */
public static int parseObjectType(String s){
  if (s.equals("String_Node_Str") | s.equalsIgnoreCase("String_Node_Str"))   return ALL_OBJECTS_MASK;
 else {
    int id=Constants.getTypeID(s.toUpperCase());
    if (id >= 0)     return 1 << id;
  }
  return 0;
}

Fixed version (ground truth):
/** 
 * Translate a textual DSpace Object type name into an event subject-type mask. NOTE: This returns a BIT-MASK, not a numeric type value; the mask is only used within the event system.
 * @param s text name of object type.
 * @returns numeric value of object type or 0 for error.
 */
public static int parseObjectType(String s){
  if ("String_Node_Str".equals(s) || "String_Node_Str".equalsIgnoreCase(s))   return ALL_OBJECTS_MASK;
 else {
    int id=Constants.getTypeID(s.toUpperCase());
    if (id >= 0)     return 1 << id;
  }
  return 0;
}
Program: 52230
Project: 52230
Buggy source:
private void sendFile(HttpServletRequest request,HttpServletResponse response,String file,String mimeType,boolean compressed) throws ServletException, IOException {
  File f=new File(ConfigurationManager.getProperty("String_Node_Str"),file);
  if (!f.exists()) {
    response.setStatus(HttpServletResponse.SC_NOT_FOUND);
    JSPManager.showJSP(request,response,"String_Node_Str");
    return;
  }
  long lastMod=f.lastModified();
  response.setDateHeader("String_Node_Str",lastMod);
  long modSince=request.getDateHeader("String_Node_Str");
  if (modSince != -1 && lastMod < modSince) {
    response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
    return;
  }
  if (compressed) {
    response.setHeader("String_Node_Str","String_Node_Str");
  }
  InputStream is=new FileInputStream(f);
  response.setContentType(mimeType);
  response.setHeader("String_Node_Str",String.valueOf(f.length()));
  Utils.bufferedCopy(is,response.getOutputStream());
  is.close();
  response.getOutputStream().flush();
}

Fixed version (ground truth):
private void sendFile(HttpServletRequest request,HttpServletResponse response,String file,String mimeType,boolean compressed) throws ServletException, IOException {
  File f=new File(ConfigurationManager.getProperty("String_Node_Str"),file);
  if (!f.exists()) {
    response.setStatus(HttpServletResponse.SC_NOT_FOUND);
    JSPManager.showJSP(request,response,"String_Node_Str");
    return;
  }
  long lastMod=f.lastModified();
  response.setDateHeader("String_Node_Str",lastMod);
  long modSince=request.getDateHeader("String_Node_Str");
  if (modSince != -1 && lastMod < modSince) {
    response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
    return;
  }
  if (compressed) {
    response.setHeader("String_Node_Str","String_Node_Str");
  }
  InputStream is=new FileInputStream(f);
  try {
    response.setContentType(mimeType);
    response.setHeader("String_Node_Str",String.valueOf(f.length()));
    Utils.bufferedCopy(is,response.getOutputStream());
  }
  finally {
    is.close();
  }
  response.getOutputStream().flush();
}
Program: 52232
Project: 52232
Buggy source:
/** 
 * Sets the cause1 value for this LNIRemoteException.
 * @param cause1
 */
public void setCause1(java.lang.Object cause1){
  this.cause1=cause1;
}

Fixed version (ground truth):
/** 
 * Sets the cause1 value for this LNIRemoteException.
 * @param cause1
 */
public synchronized void setCause1(java.lang.Object cause1){
  this.cause1=cause1;
}
Program: 52233
Project: 52233
Buggy source:
public synchronized boolean equals(java.lang.Object obj){
  if (!(obj instanceof LNIRemoteException))   return false;
  LNIRemoteException other=(LNIRemoteException)obj;
  if (obj == null)   return false;
  if (this == obj)   return true;
  if (__equalsCalc != null) {
    return (__equalsCalc == obj);
  }
  __equalsCalc=obj;
  boolean _equals;
  _equals=true && ((this.cause1 == null && other.getCause1() == null) || (this.cause1 != null && this.cause1.equals(other.getCause1()))) && ((this.message1 == null && other.getMessage1() == null) || (this.message1 != null && this.message1.equals(other.getMessage1())));
  __equalsCalc=null;
  return _equals;
}

Fixed version (ground truth):
public synchronized boolean equals(java.lang.Object obj){
  if (!(obj instanceof LNIRemoteException))   return false;
  LNIRemoteException other=(LNIRemoteException)obj;
  if (this == obj)   return true;
  if (__equalsCalc != null) {
    return (__equalsCalc == obj);
  }
  __equalsCalc=obj;
  boolean _equals;
  _equals=true && ((this.cause1 == null && other.getCause1() == null) || (this.cause1 != null && this.cause1.equals(other.getCause1()))) && ((this.message1 == null && other.getMessage1() == null) || (this.message1 != null && this.message1.equals(other.getMessage1())));
  __equalsCalc=null;
  return _equals;
}
Program: 52234
Project: 52234
Buggy source:
/** 
 * Gets the cause1 value for this LNIRemoteException.
 * @return cause1
 */
public java.lang.Object getCause1(){
  return cause1;
}

Fixed version (ground truth):
/** 
 * Gets the cause1 value for this LNIRemoteException.
 * @return cause1
 */
public synchronized java.lang.Object getCause1(){
  return cause1;
}
Program: 52235
Project: 52235
Buggy source:
/** 
 * Sets the message1 value for this LNIRemoteException.
 * @param message1
 */
public void setMessage1(java.lang.String message1){
  this.message1=message1;
}

Fixed version (ground truth):
/** 
 * Sets the message1 value for this LNIRemoteException.
 * @param message1
 */
public synchronized void setMessage1(java.lang.String message1){
  this.message1=message1;
}
Program: 52236
Project: 52236
Buggy source:
/** 
 * Gets the message1 value for this LNIRemoteException.
 * @return message1
 */
public java.lang.String getMessage1(){
  return message1;
}

Fixed version (ground truth):
/** 
 * Gets the message1 value for this LNIRemoteException.
 * @return message1
 */
public synchronized java.lang.String getMessage1(){
  return message1;
}
Program: 52237
Project: 52237
Buggy source:
/** 
 * @param elements
 * @param attributes
 * @return
 */
protected SwordValidationInfo validate(SwordValidationInfo info,Properties validationContext){
  if (errorURI == null) {
    info.addValidationInfo(new SwordValidationInfo(xmlName,ATTRIBUTE_HREF_NAME,SwordValidationInfo.MISSING_ATTRIBUTE_WARNING,SwordValidationInfoType.WARNING));
  }
 else {
    boolean validUri=true;
    if (errorURI.startsWith("String_Node_Str")) {
      if (!(errorURI.equals(ErrorCodes.ERROR_CONTENT) | errorURI.equals(ErrorCodes.ERROR_CHECKSUM_MISMATCH) | errorURI.equals(ErrorCodes.ERROR_BAD_REQUEST)| errorURI.equals(ErrorCodes.TARGET_OWNER_UKNOWN)| errorURI.equals(ErrorCodes.MEDIATION_NOT_ALLOWED))) {
        info.addValidationInfo(new SwordValidationInfo(xmlName,ATTRIBUTE_HREF_NAME,"String_Node_Str",SwordValidationInfoType.ERROR));
        validUri=false;
      }
    }
    if (validUri) {
      SwordValidationInfo item=new SwordValidationInfo(xmlName,ATTRIBUTE_HREF_NAME);
      item.setContentDescription(errorURI);
      info.addAttributeValidationInfo(item);
    }
  }
  return info;
}

Fixed version (ground truth):
/** 
 * @param elements
 * @param attributes
 * @return
 */
protected SwordValidationInfo validate(SwordValidationInfo info,Properties validationContext){
  if (errorURI == null) {
    info.addValidationInfo(new SwordValidationInfo(xmlName,ATTRIBUTE_HREF_NAME,SwordValidationInfo.MISSING_ATTRIBUTE_WARNING,SwordValidationInfoType.WARNING));
  }
 else {
    boolean validUri=true;
    if (errorURI.startsWith("String_Node_Str")) {
      if (!(errorURI.equals(ErrorCodes.ERROR_CONTENT) || errorURI.equals(ErrorCodes.ERROR_CHECKSUM_MISMATCH) || errorURI.equals(ErrorCodes.ERROR_BAD_REQUEST)|| errorURI.equals(ErrorCodes.TARGET_OWNER_UKNOWN)|| errorURI.equals(ErrorCodes.MEDIATION_NOT_ALLOWED))) {
        info.addValidationInfo(new SwordValidationInfo(xmlName,ATTRIBUTE_HREF_NAME,"String_Node_Str",SwordValidationInfoType.ERROR));
        validUri=false;
      }
    }
    if (validUri) {
      SwordValidationInfo item=new SwordValidationInfo(xmlName,ATTRIBUTE_HREF_NAME);
      item.setContentDescription(errorURI);
      info.addAttributeValidationInfo(item);
    }
  }
  return info;
}
Program: 52240
Project: 52240
Buggy source:
public String getServletPath(){
  return this.getServletPath();
}

Fixed version (ground truth):
public String getServletPath(){
  return this.cocoonRequest.getServletPath();
}
Program: 52241
Project: 52241
Buggy source:
public String getRequestURI(){
  return this.getRequestURI();
}

Fixed version (ground truth):
public String getRequestURI(){
  return this.cocoonRequest.getRequestURI();
}
Program: 52242
Project: 52242
Buggy source:
public String getRemoteUser(){
  return this.getRemoteUser();
}

Fixed version (ground truth):
public String getRemoteUser(){
  return this.cocoonRequest.getRemoteUser();
}
Program: 52243
Project: 52243
Buggy source:
public HttpSession getSession(boolean arg0){
  return this.getSession(arg0);
}

Fixed version (ground truth):
public HttpSession getSession(boolean arg0){
  return (HttpSession)this.cocoonRequest.getSession(arg0);
}