nus-yam/ex-repair huggingface dataset:
Program: 90727
Project: 90727
Buggy source:
/** 
 * Override of toString() that prints out  name and values of fields.
 * @see java.lang.Object#toString()
 */
public String toString(){
  StringBuffer buffer=new StringBuffer();
  buffer.append(getClass().getName());
  buffer.append("String_Node_Str");
  buffer.append("String_Node_Str" + name + "String_Node_Str");
  for (int i=0; i < values.length; i++) {
    buffer.append("String_Node_Str" + i + "String_Node_Str"+ values[i]);
  }
  buffer.append("String_Node_Str");
  buffer.append("String_Node_Str" + readOnly);
  buffer.append("String_Node_Str");
  return buffer.toString();
}

Fixed version (ground truth):
/** 
 * Override of toString() that prints out name and values of fields.
 * @see java.lang.Object#toString()
 */
public String toString(){
  StringBuffer buffer=new StringBuffer();
  buffer.append(getClass().getName());
  buffer.append("String_Node_Str").append(name).append("String_Node_Str");
  if (values != null) {
    for (int i=0; i < values.length; i++) {
      buffer.append("String_Node_Str").append(i).append("String_Node_Str").append(values[i]).append("String_Node_Str");
    }
  }
 else {
    buffer.append("String_Node_Str");
  }
  buffer.append("String_Node_Str").append(readOnly).append("String_Node_Str");
  return buffer.toString();
}
Program: 90728
Project: 90728
Buggy source:
/** 
 * Returns the string representation of this object. Preferences are separated by ';' character, while values in one preference are separated by ',' character.
 * @return the string representation of this object.
 */
public String toString(){
  StringBuffer buffer=new StringBuffer();
  buffer.append(getClass().getName()).append("String_Node_Str");
  for (Enumeration en=getNames(); en.hasMoreElements(); ) {
    String name=(String)en.nextElement();
    buffer.append(name).append("String_Node_Str");
    String[] values=getValues(name,null);
    if (values != null) {
      for (int i=0; i < values.length; i++) {
        buffer.append(values[i]).append("String_Node_Str");
      }
    }
 else {
      buffer.append("String_Node_Str");
    }
    buffer.append("String_Node_Str");
    buffer.append(isReadOnly(name));
    buffer.append("String_Node_Str");
  }
  buffer.append("String_Node_Str");
  return buffer.toString();
}

Fixed version (ground truth):
/** 
 * Returns the string representation of this object. Preferences are separated by ';' character, while values in one preference are separated by ',' character.
 * @return the string representation of this object.
 * @see java.lang.Object#toString()
 */
public String toString(){
  StringBuffer buffer=new StringBuffer();
  buffer.append(getClass().getName()).append("String_Node_Str");
  for (Enumeration en=getNames(); en.hasMoreElements(); ) {
    String name=(String)en.nextElement();
    buffer.append(name);
    buffer.append("String_Node_Str").append(isReadOnly(name)).append("String_Node_Str");
    String[] values=getValues(name,null);
    if (values != null) {
      for (int i=0; i < values.length; i++) {
        buffer.append(values[i]);
        if (i < values.length - 1) {
          buffer.append("String_Node_Str");
        }
      }
    }
 else {
      buffer.append("String_Node_Str");
    }
    buffer.append("String_Node_Str");
  }
  buffer.append("String_Node_Str");
  return buffer.toString();
}
Program: 90729
Project: 90729
Buggy source:
private boolean isPortletModeAllowedByPortlet(PortletMode mode){
  PortletDD dd=internalPortletWindow.getPortletEntity().getPortletDefinition();
  Iterator mimes=dd.getSupports().iterator();
  while (mimes.hasNext()) {
    Iterator modes=((SupportsDD)mimes.next()).getPortletModes().iterator();
    while (modes.hasNext()) {
      String m=(String)modes.next();
      if (m.equals(mode.toString())) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean isPortletModeAllowedByPortlet(PortletMode mode){
  if (isPortletModeMandatory(mode)) {
    return true;
  }
  PortletDD dd=internalPortletWindow.getPortletEntity().getPortletDefinition();
  Iterator mimes=dd.getSupports().iterator();
  while (mimes.hasNext()) {
    Iterator modes=((SupportsDD)mimes.next()).getPortletModes().iterator();
    while (modes.hasNext()) {
      String m=(String)modes.next();
      if (m.equals(mode.toString())) {
        return true;
      }
    }
  }
  return false;
}
Program: 90730
Project: 90730
Buggy source:
public PortletContainer createContainer(String containerName,PortletContainerServices services,OptionalPortletContainerServices optionalServices){
  ArgumentUtility.validateNotNull("String_Node_Str",services);
  ArgumentUtility.validateNotEmpty("String_Node_Str",containerName);
  PortletContainer container=new PortletContainerImpl(containerName,services,optionalServices);
  if (LOG.isInfoEnabled()) {
    LOG.info("String_Node_Str" + containerName + "String_Node_Str");
  }
  return container;
}

Fixed version (ground truth):
public PortletContainer createContainer(String containerName,PortletContainerServices services,OptionalPortletContainerServices optionalServices){
  ArgumentUtility.validateNotNull("String_Node_Str",services);
  ArgumentUtility.validateNotEmpty("String_Node_Str",containerName);
  DefaultOptionalServices optional=new DefaultOptionalServices(optionalServices);
  PortletContainer container=new PortletContainerImpl(containerName,services,optional);
  if (LOG.isInfoEnabled()) {
    LOG.info("String_Node_Str" + containerName + "String_Node_Str");
  }
  return container;
}
Program: 90731
Project: 90731
Buggy source:
public boolean isRequestedSessionIdValid(){
  return this.getHttpServletRequest().isRequestedSessionIdValid();
}

Fixed version (ground truth):
public boolean isRequestedSessionIdValid(){
  return getHttpServletRequest().isRequestedSessionIdValid();
}
Program: 90733
Project: 90733
Buggy source:
public PortalURL parse(HttpServletRequest req){
  String protocol=req.isSecure() ? "String_Node_Str" : "String_Node_Str";
  String server=req.getServerName();
  int port=req.getServerPort();
  PortalURL url;
  if ((req.isSecure() && port != 443) || (!req.isSecure() && port != 80)) {
    url=new PortalURL(protocol,server,port);
  }
 else {
    url=new PortalURL(protocol,server);
  }
  url.setControllerPath(req.getContextPath(),req.getServletPath());
  StringBuffer renderPath=new StringBuffer();
  if (req.getPathInfo() == null) {
    return url;
  }
  StringTokenizer st=new StringTokenizer(req.getPathInfo(),"String_Node_Str",false);
  while (st.hasMoreTokens()) {
    String token=st.nextToken();
    if (!token.startsWith(PREFIX)) {
      renderPath.append(token);
    }
 else     if (token.startsWith(PREFIX + ACTION)) {
      url.setActionWindow(decode(token)[0]);
    }
 else     if (token.startsWith(PREFIX + WINDOW_STATE)) {
      String[] decoded=decode(token);
      url.setWindowState(decoded[0],new WindowState(decoded[1]));
    }
 else     if (token.startsWith(PREFIX + PORTLET_MODE)) {
      String[] decoded=decode(token);
      url.setPortletMode(decoded[0],new PortletMode(decoded[1]));
    }
 else {
      String value=null;
      if (st.hasMoreTokens()) {
        value=st.nextToken();
      }
      url.addParameter(decode(token,value));
    }
  }
  if (renderPath.length() > 0) {
    url.setRenderPath(renderPath.toString());
  }
  return url;
}

Fixed version (ground truth):
public PortalURL parse(HttpServletRequest req){
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + req.getRequestURI());
  }
  String protocol=req.isSecure() ? "String_Node_Str" : "String_Node_Str";
  String server=req.getServerName();
  int port=req.getServerPort();
  PortalURL url;
  if ((req.isSecure() && port != 443) || (!req.isSecure() && port != 80)) {
    url=new PortalURL(protocol,server,port);
  }
 else {
    url=new PortalURL(protocol,server);
  }
  url.setControllerPath(req.getContextPath(),req.getServletPath());
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + req.getPathInfo());
  }
  StringBuffer renderPath=new StringBuffer();
  if (req.getPathInfo() == null) {
    return url;
  }
  StringTokenizer st=new StringTokenizer(req.getPathInfo(),"String_Node_Str",false);
  while (st.hasMoreTokens()) {
    String token=st.nextToken();
    if (!token.startsWith(PREFIX)) {
      renderPath.append(token);
    }
 else     if (token.startsWith(PREFIX + ACTION)) {
      url.setActionWindow(decode(token)[0]);
    }
 else     if (token.startsWith(PREFIX + WINDOW_STATE)) {
      String[] decoded=decode(token);
      url.setWindowState(decoded[0],new WindowState(decoded[1]));
    }
 else     if (token.startsWith(PREFIX + PORTLET_MODE)) {
      String[] decoded=decode(token);
      url.setPortletMode(decoded[0],new PortletMode(decoded[1]));
    }
 else {
      String value=null;
      if (st.hasMoreTokens()) {
        value=st.nextToken();
      }
      url.addParameter(decode(token,value));
    }
  }
  if (renderPath.length() > 0) {
    url.setRenderPath(renderPath.toString());
  }
  return url;
}
Program: 90734
Project: 90734
Buggy source:
/** 
 * Decode a parameter
 * @param name
 * @param value
 * @return url parameter
 */
private PortalUrlParameter decode(String name,String value){
  String nopre=name.substring((PREFIX + PORTLET_ID).length());
  String windowId=nopre.substring(0,nopre.indexOf(DELIM));
  String param=nopre.substring(nopre.indexOf(DELIM) + 1);
  ArrayList values=new ArrayList();
  for (int i=0; i < ENCODINGS.length; i++) {
    windowId=StringUtils.replace(windowId,ENCODINGS[i][1],ENCODINGS[i][0]);
    if (value != null) {
      value=StringUtils.replace(value,ENCODINGS[i][1],ENCODINGS[i][0]);
    }
    int idx, start=0;
    while ((idx=value.indexOf(VALUE_DELIM,start)) > 0) {
      values.add(value.substring(start,idx));
      start=idx;
    }
  }
  String[] vals=values.size() > 0 ? (String[])values.toArray(new String[values.size()]) : new String[]{value};
  return new PortalUrlParameter(windowId,param,vals);
}

Fixed version (ground truth):
/** 
 * Decode a parameter
 * @param name
 * @param value
 * @return url parameter
 */
private PortalUrlParameter decode(String name,String value){
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + name + "String_Node_Str"+ value+ "String_Node_Str");
  }
  String nopre=name.substring((PREFIX + PORTLET_ID).length());
  String windowId=nopre.substring(0,nopre.indexOf(DELIM));
  String param=nopre.substring(nopre.indexOf(DELIM) + 1);
  ArrayList values=new ArrayList();
  for (int i=0; i < ENCODINGS.length; i++) {
    windowId=StringUtils.replace(windowId,ENCODINGS[i][1],ENCODINGS[i][0]);
    if (value != null) {
      value=StringUtils.replace(value,ENCODINGS[i][1],ENCODINGS[i][0]);
    }
    StringTokenizer st=new StringTokenizer(value,VALUE_DELIM,false);
    while (st.hasMoreTokens()) {
      values.add(st.nextToken());
    }
  }
  String[] vals=(String[])values.toArray(new String[values.size()]);
  return new PortalUrlParameter(windowId,param,vals);
}
Program: 90735
Project: 90735
Buggy source:
public ResourceBundle getResourceBundle(java.util.Locale locale){
  if (bundles == null) {
    bundles=new ResourceBundleFactory(portletDD);
  }
  return bundles.getResourceBundle(locale);
}

Fixed version (ground truth):
public ResourceBundle getResourceBundle(Locale locale){
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + locale);
  }
  if (bundles == null) {
    bundles=new ResourceBundleFactory(portletDD);
  }
  return bundles.getResourceBundle(locale);
}
Program: 90736
Project: 90736
Buggy source:
public ResourceBundleFactory(PortletDD dd){
  bundleName=dd.getResourceBundle();
  PortletInfoDD info=dd.getPortletInfo();
  if (info != null) {
    defaultBundle=createDefaultBundle(info.getTitle(),info.getShortTitle(),info.getKeywords());
  }
 else {
    defaultBundle=EMPTY_BUNDLE;
  }
}

Fixed version (ground truth):
public ResourceBundleFactory(PortletDD dd){
  bundleName=dd.getResourceBundle();
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + bundleName);
  }
  PortletInfoDD info=dd.getPortletInfo();
  if (info != null) {
    defaultBundle=new InlinePortletResourceBundle(info.getTitle(),info.getShortTitle(),info.getKeywords());
  }
 else {
    defaultBundle=new InlinePortletResourceBundle(new Object[][]{{"String_Node_Str","String_Node_Str"}});
  }
}
Program: 90737
Project: 90737
Buggy source:
public ResourceBundle getResourceBundle(Locale locale){
  if (bundles.containsKey(locale)) {
    return (ResourceBundle)bundles.get(locale);
  }
  try {
    if (bundleName != null) {
      ClassLoader loader=Thread.currentThread().getContextClassLoader();
      ResourceBundle bundle=ResourceBundle.getBundle(bundleName,locale,loader);
      if (bundle != null) {
        bundles.put(locale,bundle);
        return bundle;
      }
    }
  }
 catch (  MissingResourceException mre) {
    LOG.info(EXCEPTIONS.getString("String_Node_Str",bundleName,mre.getMessage()));
  }
  bundles.put(locale,defaultBundle);
  return defaultBundle;
}

Fixed version (ground truth):
public ResourceBundle getResourceBundle(Locale locale){
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + bundleName + "String_Node_Str"+ locale+ "String_Node_Str");
  }
  if (bundles.containsKey(locale)) {
    return (ResourceBundle)bundles.get(locale);
  }
  try {
    ResourceBundle bundle=null;
    if (bundleName != null) {
      ClassLoader loader=Thread.currentThread().getContextClassLoader();
      bundle=ResourceBundle.getBundle(bundleName,locale,loader);
      bundles.put(locale,new CombinedPortletResourceBundle(defaultBundle,bundle));
    }
 else {
      bundles.put(locale,defaultBundle);
    }
  }
 catch (  MissingResourceException mre) {
    if (bundleName != null && LOG.isWarnEnabled()) {
      LOG.info(EXCEPTIONS.getString("String_Node_Str",bundleName,mre.getMessage()));
    }
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str" + locale + "String_Node_Str");
    }
    bundles.put(locale,defaultBundle);
  }
  return (ResourceBundle)bundles.get(locale);
}
Program: 90738
Project: 90738
Buggy source:
public void testGetResourceBundleNoBundleNullValues(){
  validDD.setResourceBundle(null);
  validDD.getPortletInfo().setTitle(null);
  validDD.getPortletInfo().setShortTitle(null);
  validDD.getPortletInfo().setKeywords(null);
  ResourceBundleFactory factory=new ResourceBundleFactory(validDD);
  ResourceBundle bundle=factory.getResourceBundle(Locale.getDefault());
  Assert.assertEquals("String_Node_Str",bundle.getString("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",bundle.getString("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",bundle.getString("String_Node_Str"));
}

Fixed version (ground truth):
public void testGetResourceBundleNoBundleNullValues(){
  validDD.setResourceBundle(null);
  validDD.getPortletInfo().setTitle(null);
  validDD.getPortletInfo().setShortTitle(null);
  validDD.getPortletInfo().setKeywords(null);
  ResourceBundleFactory factory=new ResourceBundleFactory(validDD);
  ResourceBundle bundle=factory.getResourceBundle(Locale.getDefault());
  try {
    Assert.assertEquals(null,bundle.getString("String_Node_Str"));
    fail("String_Node_Str");
  }
 catch (  Throwable t) {
  }
  try {
    Assert.assertEquals(null,bundle.getString("String_Node_Str"));
    fail("String_Node_Str");
  }
 catch (  Throwable t) {
  }
  try {
    Assert.assertEquals(null,bundle.getString("String_Node_Str"));
    fail("String_Node_Str");
  }
 catch (  Throwable t) {
  }
}
Program: 90739
Project: 90739
Buggy source:
public boolean isRequestedSessionIdValid(){
  return getHttpServletRequest().isRequestedSessionIdValid();
}

Fixed version (ground truth):
public boolean isRequestedSessionIdValid(){
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + getHttpServletRequest().isRequestedSessionIdValid());
  }
  return getHttpServletRequest().isRequestedSessionIdValid();
}
Program: 90740
Project: 90740
Buggy source:
/** 
 * Decode a parameter
 * @param name
 * @param value
 * @return url parameter
 */
private PortalUrlParameter decode(String name,String value){
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + name + "String_Node_Str"+ value+ "String_Node_Str");
  }
  String nopre=name.substring((PREFIX + PORTLET_ID).length());
  String windowId=nopre.substring(0,nopre.indexOf(DELIM));
  String param=nopre.substring(nopre.indexOf(DELIM) + 1);
  ArrayList values=new ArrayList();
  for (int i=0; i < ENCODINGS.length; i++) {
    windowId=StringUtils.replace(windowId,ENCODINGS[i][1],ENCODINGS[i][0]);
    if (value != null) {
      value=StringUtils.replace(value,ENCODINGS[i][1],ENCODINGS[i][0]);
    }
    StringTokenizer st=new StringTokenizer(value,VALUE_DELIM,false);
    while (st.hasMoreTokens()) {
      values.add(st.nextToken());
    }
  }
  String[] vals=(String[])values.toArray(new String[values.size()]);
  return new PortalUrlParameter(windowId,param,vals);
}

Fixed version (ground truth):
/** 
 * Decode a parameter
 * @param name
 * @param value
 * @return url parameter
 */
private PortalUrlParameter decode(String name,String value){
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + name + "String_Node_Str"+ value+ "String_Node_Str");
  }
  String nopre=name.substring((PREFIX + PORTLET_ID).length());
  String windowId=nopre.substring(0,nopre.indexOf(DELIM));
  String param=nopre.substring(nopre.indexOf(DELIM) + 1);
  ArrayList values=new ArrayList();
  for (int i=0; i < ENCODINGS.length; i++) {
    windowId=StringUtils.replace(windowId,ENCODINGS[i][1],ENCODINGS[i][0]);
    if (value != null) {
      value=StringUtils.replace(value,ENCODINGS[i][1],ENCODINGS[i][0]);
    }
  }
  StringTokenizer st=new StringTokenizer(value,VALUE_DELIM,false);
  while (st.hasMoreTokens()) {
    values.add(st.nextToken());
  }
  String[] vals=(String[])values.toArray(new String[values.size()]);
  return new PortalUrlParameter(windowId,param,vals);
}
Program: 90741
Project: 90741
Buggy source:
public EmbeddedDataSourceManager(String systemDirectory,String connectionString){
  this.connectionString=connectionString;
  System.setProperty("String_Node_Str",systemDirectory);
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + systemDirectory);
  }
}

Fixed version (ground truth):
public EmbeddedDataSourceManager(File systemDirectory,String connectionString){
  this.connectionString=connectionString;
  LOG.debug("String_Node_Str" + DEFAULT_SYS_DIR);
  LOG.debug("String_Node_Str" + systemDirectory);
  LOG.debug("String_Node_Str" + connectionString);
  System.setProperty("String_Node_Str",systemDirectory.getAbsolutePath());
  if (LOG.isDebugEnabled()) {
    File sysDir=systemDirectory;
    LOG.debug("String_Node_Str" + System.getProperty("String_Node_Str"));
    LOG.debug("String_Node_Str" + sysDir.getAbsolutePath());
  }
}
Program: 90742
Project: 90742
Buggy source:
/** 
 * Updates web.xml with servlet and servlet-mapping records related to PortletServlet.
 * @param context
 */
void updateWebXml(String context){
  final String[] PRIOR_ELEMENTS_SERVLET={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  final String[] PRIOR_ELEMENTS_SERVLET_MAPPING={"String_Node_Str","String_Node_Str"};
  String webapps=PlutoAdminContext.getDeploymentPath();
  File webXml=new File(webapps + PlutoAdminConstants.FS + context+ PlutoAdminConstants.FS+ "String_Node_Str"+ PlutoAdminConstants.FS+ "String_Node_Str");
  DeployWarService svc=new DeployWarService();
  String contents=svc.readFileToString(webXml);
  File portletXml=new File(webapps + PlutoAdminConstants.FS + context+ PlutoAdminConstants.FS+ "String_Node_Str"+ PlutoAdminConstants.FS+ "String_Node_Str");
  List plist=null;
  try {
    InputStream ins=new FileInputStream(portletXml);
    PortletConfigService pcsvc=new PortletConfigService(ins);
    plist=pcsvc.getPortletDDList();
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
  }
  String newWebXml=svc.addRecordsToWebXml(context,contents,PRIOR_ELEMENTS_SERVLET,plist);
  contents=newWebXml;
  newWebXml=svc.addRecordsToWebXml(context,contents,PRIOR_ELEMENTS_SERVLET_MAPPING,plist);
  System.out.println(newWebXml);
  writeStringToFile(webXml,newWebXml);
}

Fixed version (ground truth):
/** 
 * Updates web.xml with servlet and servlet-mapping records related to PortletServlet.
 * @param context
 */
void updateWebXml(String context){
  String METHOD_NAME="String_Node_Str";
  final String[] PRIOR_ELEMENTS_SERVLET={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  final String[] PRIOR_ELEMENTS_SERVLET_MAPPING={"String_Node_Str","String_Node_Str"};
  String webapps=PlutoAdminContext.getDeploymentPath();
  File webXml=new File(webapps + PlutoAdminConstants.FS + context+ PlutoAdminConstants.FS+ "String_Node_Str"+ PlutoAdminConstants.FS+ "String_Node_Str");
  DeployWarService svc=new DeployWarService();
  String contents=svc.readFileToString(webXml);
  File portletXml=new File(webapps + PlutoAdminConstants.FS + context+ PlutoAdminConstants.FS+ "String_Node_Str"+ PlutoAdminConstants.FS+ "String_Node_Str");
  List plist=null;
  try {
    InputStream ins=new FileInputStream(portletXml);
    PortletConfigService pcsvc=new PortletConfigService(ins);
    plist=pcsvc.getPortletDDList();
  }
 catch (  FileNotFoundException e) {
    logError(METHOD_NAME,e);
    throw new PlutoAdminException(e);
  }
  String newWebXml=svc.addRecordsToWebXml(context,contents,PRIOR_ELEMENTS_SERVLET,plist);
  contents=newWebXml;
  newWebXml=svc.addRecordsToWebXml(context,contents,PRIOR_ELEMENTS_SERVLET_MAPPING,plist);
  writeStringToFile(webXml,newWebXml);
}
Program: 90743
Project: 90743
Buggy source:
/** 
 * Gets the web.xml servlet-mapping record for PortletServlet from portlet.xml data
 * @param portletData Data from portlet.xml
 */
private String getServletMappingRecord(PortletDD portletData){
  StringBuffer record=new StringBuffer();
  record.append("String_Node_Str" + PlutoAdminConstants.LS);
  record.append("String_Node_Str" + portletData.getPortletName() + "String_Node_Str"+ PlutoAdminConstants.LS);
  record.append("String_Node_Str" + portletData.getPortletName() + "String_Node_Str"+ PlutoAdminConstants.LS);
  record.append("String_Node_Str" + PlutoAdminConstants.LS);
  return record.toString();
}

Fixed version (ground truth):
/** 
 * Gets the web.xml servlet-mapping record for PortletServlet from portlet.xml data
 * @param context Context name
 * @param portletData Data from portlet.xml
 * @return
 */
private String getServletMappingRecord(PortletDD portletData){
  StringBuffer record=new StringBuffer();
  record.append("String_Node_Str" + PlutoAdminConstants.LS);
  record.append("String_Node_Str" + portletData.getPortletName() + "String_Node_Str"+ PlutoAdminConstants.LS);
  record.append("String_Node_Str" + portletData.getPortletName() + "String_Node_Str"+ PlutoAdminConstants.LS);
  record.append("String_Node_Str" + PlutoAdminConstants.LS);
  return record.toString();
}
Program: 90744
Project: 90744
Buggy source:
public String readFileToString(File file){
  final String METHOD_NAME="String_Node_Str";
  String contents=null;
  FileInputStream fis=null;
  try {
    fis=new FileInputStream(file);
    int c;
    char b;
    StringBuffer sb=new StringBuffer();
    while ((c=fis.read()) != -1) {
      b=(char)c;
      sb.append(b);
    }
    contents=sb.toString().trim();
  }
 catch (  FileNotFoundException e) {
    logError(METHOD_NAME,e);
    throw new PlutoAdminException(e);
  }
catch (  IOException e) {
    logError(METHOD_NAME,e);
    throw new PlutoAdminException(e);
  }
 finally {
    if (fis != null) {
      try {
        fis.close();
      }
 catch (      IOException e) {
        logError(METHOD_NAME,e);
        throw new PlutoAdminException(e);
      }
    }
  }
  return contents;
}

Fixed version (ground truth):
/** 
 * Puts the contents of a file into a String. This only works with text files.
 * @param file The File to read
 * @return A String containing the contents of the file.
 */
public String readFileToString(File file){
  final String METHOD_NAME="String_Node_Str";
  String contents=null;
  FileInputStream fis=null;
  try {
    fis=new FileInputStream(file);
    int c;
    char b;
    StringBuffer sb=new StringBuffer();
    while ((c=fis.read()) != -1) {
      b=(char)c;
      sb.append(b);
    }
    contents=sb.toString().trim();
  }
 catch (  FileNotFoundException e) {
    logError(METHOD_NAME,e);
    throw new PlutoAdminException(e);
  }
catch (  IOException e) {
    logError(METHOD_NAME,e);
    throw new PlutoAdminException(e);
  }
 finally {
    if (fis != null) {
      try {
        fis.close();
      }
 catch (      IOException e) {
        logError(METHOD_NAME,e);
        throw new PlutoAdminException(e);
      }
    }
  }
  return contents;
}
Program: 90745
Project: 90745
Buggy source:
public void writeStringToFile(File file,String contents){
  final String METHOD_NAME="String_Node_Str";
  FileOutputStream fos=null;
  try {
    fos=new FileOutputStream(file);
    byte[] bytes=contents.getBytes();
    fos.write(bytes);
  }
 catch (  FileNotFoundException e) {
    logError(METHOD_NAME,e);
    throw new PlutoAdminException(e);
  }
catch (  IOException e) {
    logError(METHOD_NAME,e);
    throw new PlutoAdminException(e);
  }
 finally {
    if (fos != null) {
      try {
        fos.close();
      }
 catch (      IOException e) {
        logError(METHOD_NAME,e);
        throw new PlutoAdminException(e);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Writes the contents of a file into a String.
 * @param file Te File to write.
 * @param contents The String to add to the file.
 */
public void writeStringToFile(File file,String contents){
  final String METHOD_NAME="String_Node_Str";
  FileOutputStream fos=null;
  try {
    fos=new FileOutputStream(file);
    byte[] bytes=contents.getBytes();
    fos.write(bytes);
  }
 catch (  FileNotFoundException e) {
    logError(METHOD_NAME,e);
    throw new PlutoAdminException(e);
  }
catch (  IOException e) {
    logError(METHOD_NAME,e);
    throw new PlutoAdminException(e);
  }
 finally {
    if (fos != null) {
      try {
        fos.close();
      }
 catch (      IOException e) {
        logError(METHOD_NAME,e);
        throw new PlutoAdminException(e);
      }
    }
  }
}
Program: 90748
Project: 90748
Buggy source:
/** 
 * Gets the web.xml security-role-ref record for PortletServlet from portlet.xml data
 * @param context Context name
 * @param portletData Data from portlet.xml
 */
private String getSecurityRoleRefRecord(String context,PortletDD portletData){
  StringBuffer record=new StringBuffer("String_Node_Str");
  List refs=portletData.getSecurityRoleRefs();
  String link=null;
  for (Iterator iter=refs.iterator(); iter.hasNext(); ) {
    PortletConfigService.RoleRef ref=(PortletConfigService.RoleRef)iter.next();
    record.append("String_Node_Str" + PlutoAdminConstants.LS);
    record.append("String_Node_Str" + ref.roleName + "String_Node_Str"+ PlutoAdminConstants.LS);
    link=ref.roleLink;
    if (link != null && !link.equals("String_Node_Str")) {
      record.append("String_Node_Str" + link + "String_Node_Str"+ PlutoAdminConstants.LS);
    }
    record.append("String_Node_Str" + PlutoAdminConstants.LS);
  }
  return record.toString();
}

Fixed version (ground truth):
/** 
 * Gets the web.xml security-role-ref record for PortletServlet from portlet.xml data
 * @param context Context name
 * @param portletData Data from portlet.xml
 * @return
 */
private String getSecurityRoleRefRecord(String context,PortletDD portletData){
  StringBuffer record=new StringBuffer("String_Node_Str");
  List refs=portletData.getSecurityRoleRefs();
  String link=null;
  for (Iterator iter=refs.iterator(); iter.hasNext(); ) {
    PortletConfigService.RoleRef ref=(PortletConfigService.RoleRef)iter.next();
    record.append("String_Node_Str" + PlutoAdminConstants.LS);
    record.append("String_Node_Str" + ref.roleName + "String_Node_Str"+ PlutoAdminConstants.LS);
    link=ref.roleLink;
    if (link != null && !link.equals("String_Node_Str")) {
      record.append("String_Node_Str" + link + "String_Node_Str"+ PlutoAdminConstants.LS);
    }
    record.append("String_Node_Str" + PlutoAdminConstants.LS);
  }
  return record.toString();
}
Program: 90749
Project: 90749
Buggy source:
public String getMethod(){
  return this._getHttpServletRequest().getMethod();
}

Fixed version (ground truth):
public String getMethod(){
  if (included) {
    return "String_Node_Str";
  }
 else {
    return this._getHttpServletRequest().getMethod();
  }
}
Program: 90750
Project: 90750
Buggy source:
public String toString(PortalControlParameter controlParam,Boolean p_secure){
  StringBuffer urlBase=new StringBuffer(256);
  boolean secure=false;
  if (p_secure != null) {
    secure=p_secure.booleanValue();
  }
 else {
    secure=environment.getRequest().isSecure();
  }
  urlBase.append(environment.getRequest().getContextPath());
  urlBase.append(secure ? secureServlet : insecureServlet);
  String url=urlBase.toString();
  String global=getGlobalNavigationAsString();
  if (global.length() > 0) {
    url+="String_Node_Str";
    url+=global;
  }
  String control=getControlParameterAsString(controlParam);
  if (control.length() > 0) {
    url+=control;
  }
  String requestParam=getRequestParameterAsString(controlParam);
  if (requestParam.length() > 0) {
    url+=requestParam;
  }
  String local=getLocalNavigationAsString();
  if (local.length() > 0) {
    url+="String_Node_Str";
    url+=local;
  }
  return environment.getResponse().encodeURL(url);
}

Fixed version (ground truth):
public String toString(PortalControlParameter controlParam,Boolean p_secure){
  StringBuffer urlBase=new StringBuffer(256);
  boolean secure=false;
  if (p_secure != null) {
    secure=p_secure.booleanValue();
  }
 else {
    secure=environment.getRequest().isSecure();
  }
  urlBase.append(environment.getRequest().getContextPath());
  urlBase.append(secure ? secureServlet : insecureServlet);
  String url=urlBase.toString();
  String global=getGlobalNavigationAsString();
  if (global.length() > 0) {
    url+="String_Node_Str";
    url+=global;
  }
  String control=getControlParameterAsString(controlParam);
  if (control.length() > 0) {
    control=URLEncoder.encode(control);
    control=control.replace("String_Node_Str","String_Node_Str");
    url+=control;
  }
  String requestParam=getRequestParameterAsString(controlParam);
  if (requestParam.length() > 0) {
    url+=requestParam;
  }
  String local=getLocalNavigationAsString();
  if (local.length() > 0) {
    url+="String_Node_Str";
    url+=local;
  }
  return environment.getResponse().encodeURL(url);
}
Program: 90753
Project: 90753
Buggy source:
public javax.portlet.PortletRequestDispatcher getRequestDispatcher(String path){
  try {
    javax.servlet.RequestDispatcher rd=servletContext.getRequestDispatcher(path);
    if (rd == null) {
      return null;
    }
    return new PortletRequestDispatcherImpl(rd);
  }
 catch (  Exception e) {
    return null;
  }
}

Fixed version (ground truth):
public javax.portlet.PortletRequestDispatcher getRequestDispatcher(String path){
  Map parms=parseQueryParams(path);
  try {
    RequestDispatcher rd=servletContext.getRequestDispatcher(path);
    return rd == null ? null : new PortletRequestDispatcherImpl(rd,parms);
  }
 catch (  Exception e) {
    return null;
  }
}
Program: 90754
Project: 90754
Buggy source:
public PortletRequestDispatcherImpl(javax.servlet.RequestDispatcher requestDispatcher){
  this.requestDispatcher=requestDispatcher;
}

Fixed version (ground truth):
public PortletRequestDispatcherImpl(RequestDispatcher disp,Map queryParams){
  this(disp);
  this.queryParams=queryParams;
}
Program: 90755
Project: 90755
Buggy source:
public void include(RenderRequest request,RenderResponse response) throws PortletException, java.io.IOException {
  InternalPortletRequest internalRequest=CoreUtils.getInternalRequest(request);
  InternalPortletResponse internalResponse=CoreUtils.getInternalResponse(response);
  try {
    internalRequest.setIncluded(true);
    internalResponse.setIncluded(true);
    this.requestDispatcher.include((javax.servlet.http.HttpServletRequest)request,(javax.servlet.http.HttpServletResponse)response);
  }
 catch (  java.io.IOException e) {
    throw e;
  }
catch (  javax.servlet.ServletException e) {
    if (e.getRootCause() != null) {
      throw new PortletException(e.getRootCause());
    }
 else {
      throw new PortletException(e);
    }
  }
 finally {
    internalRequest.setIncluded(false);
    internalResponse.setIncluded(false);
  }
}

Fixed version (ground truth):
public void include(RenderRequest request,RenderResponse response) throws PortletException, java.io.IOException {
  InternalPortletRequest internalRequest=CoreUtils.getInternalRequest(request);
  InternalPortletResponse internalResponse=CoreUtils.getInternalResponse(response);
  if (queryParams != null) {
    internalRequest=new IncludedRenderRequestImpl(internalRequest,queryParams);
  }
  try {
    internalRequest.setIncluded(true);
    internalResponse.setIncluded(true);
    this.requestDispatcher.include((javax.servlet.http.HttpServletRequest)request,(javax.servlet.http.HttpServletResponse)response);
  }
 catch (  java.io.IOException e) {
    throw e;
  }
catch (  javax.servlet.ServletException e) {
    if (e.getRootCause() != null) {
      throw new PortletException(e.getRootCause());
    }
 else {
      throw new PortletException(e);
    }
  }
 finally {
    internalRequest.setIncluded(false);
    internalResponse.setIncluded(false);
  }
}
Program: 90756
Project: 90756
Buggy source:
public String getParameter(String name){
  if (name == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  bodyAccessed=true;
  Map parameters=this._getHttpServletRequest().getParameterMap();
  String[] values=(String[])parameters.get(name);
  if (values != null) {
    return values[0];
  }
  return null;
}

Fixed version (ground truth):
public String getParameter(String name){
  if (name == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  bodyAccessed=true;
  Map parameters=getParameterMap();
  String[] values=(String[])parameters.get(name);
  if (values != null) {
    return values[0];
  }
  return null;
}
Program: 90757
Project: 90757
Buggy source:
public java.util.Enumeration getParameterNames(){
  bodyAccessed=true;
  Map parameters=this._getHttpServletRequest().getParameterMap();
  return Collections.enumeration(parameters.keySet());
}

Fixed version (ground truth):
public java.util.Enumeration getParameterNames(){
  bodyAccessed=true;
  Map parameters=getParameterMap();
  return Collections.enumeration(parameters.keySet());
}
Program: 90758
Project: 90758
Buggy source:
public String[] getParameterValues(String name){
  if (name == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  bodyAccessed=true;
  String[] values=(String[])this._getHttpServletRequest().getParameterMap().get(name);
  if (values != null)   values=StringUtils.copy(values);
  return values;
}

Fixed version (ground truth):
public String[] getParameterValues(String name){
  if (name == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  bodyAccessed=true;
  String[] values=(String[])getParameterMap().get(name);
  if (values != null)   values=StringUtils.copy(values);
  return values;
}
Program: 90759
Project: 90759
Buggy source:
public Enumeration getAttributeNames(){
  Enumeration attributes=this._getHttpServletRequest().getAttributeNames();
  Vector portletAttributes=new Vector();
  while (attributes.hasMoreElements()) {
    String attribute=(String)attributes.nextElement();
    String portletAttribute=NamespaceMapperAccess.getNamespaceMapper().decode(portletWindow.getId(),attribute);
    if (portletAttribute != null) {
      portletAttributes.add(portletAttribute);
    }
  }
  return portletAttributes.elements();
}

Fixed version (ground truth):
public Enumeration getAttributeNames(){
  Enumeration attributes=this._getHttpServletRequest().getAttributeNames();
  Vector portletAttributes=new Vector();
  while (attributes.hasMoreElements()) {
    String attribute=(String)attributes.nextElement();
    String portletAttribute=NamespaceMapperAccess.getNamespaceMapper().decode(portletWindow.getId(),attribute);
    if (portletAttribute != null) {
      portletAttributes.add(portletAttribute);
    }
 else {
      portletAttributes.add(attribute);
    }
  }
  return portletAttributes.elements();
}
Program: 90760
Project: 90760
Buggy source:
public InternalPortletWindow getInternalPortletWindow();

Fixed version (ground truth):
InternalPortletWindow getInternalPortletWindow();
Program: 90761
Project: 90761
Buggy source:
public void setIncluded(boolean included);

Fixed version (ground truth):
void setIncluded(boolean included);
Program: 90762
Project: 90762
Buggy source:
public boolean isIncluded();

Fixed version (ground truth):
boolean isIncluded();
Program: 90764
Project: 90764
Buggy source:
public String getServerInfo(){
  return Environment.getServerInfo();
}

Fixed version (ground truth):
/** 
 * Retrieve the PortletContainer's server info.
 * @return the server info in the form of <i>Server/Version</i>
 * @see Environment#getServerInfo()
 */
public String getServerInfo(){
  return Environment.getServerInfo();
}
Program: 90765
Project: 90765
Buggy source:
public java.io.InputStream getResourceAsStream(String path){
  return servletContext.getResourceAsStream(path);
}

Fixed version (ground truth):
public InputStream getResourceAsStream(String path){
  return servletContext.getResourceAsStream(path);
}
Program: 90766
Project: 90766
Buggy source:
public PortletRequestDispatcher getRequestDispatcher(String path){
  try {
    RequestDispatcher rd=servletContext.getRequestDispatcher(path);
    return new PortletRequestDispatcherImpl(rd);
  }
 catch (  Exception e) {
    return null;
  }
}

Fixed version (ground truth):
public PortletRequestDispatcher getRequestDispatcher(String path){
  try {
    RequestDispatcher rd=servletContext.getRequestDispatcher(path);
    if (rd != null) {
      return new PortletRequestDispatcherImpl(rd);
    }
  }
 catch (  Exception e) {
  }
  return null;
}
Program: 90767
Project: 90767
Buggy source:
public PortletContextImpl(ServletContext servletContext,PortletAppDD portletAppDD){
  this.servletContext=servletContext;
  this.portletAppDD=portletAppDD;
}

Fixed version (ground truth):
/** 
 * Sole constructor.
 * @param servletContext the servlet context in which we are contained.
 * @param portletAppDD the application descriptor.
 */
public PortletContextImpl(ServletContext servletContext,PortletAppDD portletAppDD){
  this.servletContext=servletContext;
  this.portletAppDD=portletAppDD;
}
Program: 90768
Project: 90768
Buggy source:
public PortletRequestDispatcher getNamedDispatcher(String name){
  javax.servlet.RequestDispatcher rd=servletContext.getNamedDispatcher(name);
  return rd != null ? new PortletRequestDispatcherImpl(rd) : null;
}

Fixed version (ground truth):
public PortletRequestDispatcher getNamedDispatcher(String name){
  RequestDispatcher rd=servletContext.getNamedDispatcher(name);
  if (rd != null) {
    return new PortletRequestDispatcherImpl(rd);
  }
  return null;
}
Program: 90769
Project: 90769
Buggy source:
public javax.servlet.ServletContext getServletContext(){
  return httpSession.getServletContext();
}

Fixed version (ground truth):
/** 
 * HttpSession Implementation.
 * @return
 */
public ServletContext getServletContext(){
  return httpSession.getServletContext();
}
Program: 90770
Project: 90770
Buggy source:
public PortletContext getPortletContext(){
  return getInternalPortletContext();
}

Fixed version (ground truth):
public PortletContext getPortletContext(){
  return portletContext;
}
Program: 90771
Project: 90771
Buggy source:
public javax.servlet.http.HttpSessionContext getSessionContext(){
  return httpSession.getSessionContext();
}

Fixed version (ground truth):
/** 
 * Implemented for backwards compatability.
 * @deprecated
 * @return
 */
public HttpSessionContext getSessionContext(){
  return httpSession.getSessionContext();
}
Program: 90772
Project: 90772
Buggy source:
public String[] getValueNames(){
  return null;
}

Fixed version (ground truth):
/** 
 * Implemented for backwards compatibility with HttpSession.
 * @deprecated
 * @return
 */
public String[] getValueNames(){
  return httpSession.getValueNames();
}
Program: 90773
Project: 90773
Buggy source:
public Object getAttribute(String name){
  if (name == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Object attribute=this.getHttpServletRequest().getAttribute(mapper.encode(internalPortletWindow.getId(),name));
  if (attribute == null && isNameReserved(name)) {
    attribute=this.getHttpServletRequest().getAttribute(name);
  }
  return attribute;
}

Fixed version (ground truth):
public Object getAttribute(String name){
  if (name == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Object attribute=this.getHttpServletRequest().getAttribute(mapper.encode(internalPortletWindow.getId(),name));
  if (attribute == null) {
    attribute=this.getHttpServletRequest().getAttribute(name);
  }
  return attribute;
}
Program: 90774
Project: 90774
Buggy source:
public boolean isUserInRole(String role){
  return this._getHttpServletRequest().isUserInRole(role);
}

Fixed version (ground truth):
/** 
 * Determines whether a user is mapped to the specified role.  As specified in PLT-20-3, we must reference the &lt;security-role-ref&gt; mappings within the deployment descriptor. If no mapping is available, then, and only then, do we check use the actual role name specified against the web application deployment descriptor.
 * @param roleName the name of the role
 * @return true if it is determined the user has the given role.
 */
public boolean isUserInRole(String roleName){
  PortletEntity entity=portletWindow.getPortletEntity();
  PortletDefinition def=entity.getPortletDefinition();
  SecurityRoleRefSet set=def.getInitSecurityRoleRefSet();
  SecurityRoleRef ref=set.get(roleName);
  String link=null;
  if (ref != null && ref.getRoleLink() != null) {
    link=ref.getRoleLink();
  }
 else {
    link=roleName;
  }
  return this._getHttpServletRequest().isUserInRole(link);
}
Program: 90775
Project: 90775
Buggy source:
public void setRenderParameter(String key,String[] values){
  if (redirected) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (key == null || values == null || values.length == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  renderParameters.put(key,values);
  redirectAllowed=false;
}

Fixed version (ground truth):
public void setRenderParameter(String key,String[] values){
  if (redirected) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (key == null || values == null || values.length == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  renderParameters.put(key,StringUtils.copy(values));
  redirectAllowed=false;
}
Program: 90776
Project: 90776
Buggy source:
public void setRenderParameters(Map parameters){
  if (redirected) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (parameters == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  for (Iterator iter=parameters.entrySet().iterator(); iter.hasNext(); ) {
    Map.Entry entry=(Map.Entry)iter.next();
    if (!(entry.getKey() instanceof String)) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    if (!(entry.getValue() instanceof String[])) {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
  renderParameters.putAll(parameters);
  redirectAllowed=false;
}

Fixed version (ground truth):
public void setRenderParameters(Map parameters){
  if (redirected) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (parameters == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  for (Iterator iter=parameters.entrySet().iterator(); iter.hasNext(); ) {
    Map.Entry entry=(Map.Entry)iter.next();
    if (!(entry.getKey() instanceof String)) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    if (!(entry.getValue() instanceof String[])) {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
  renderParameters=StringUtils.copyParameters(parameters);
  redirectAllowed=false;
}
Program: 90777
Project: 90777
Buggy source:
public String[] getValues(String key,String[] def){
  if (key == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (changedPreferences.containsKey(key)) {
    return (String[])changedPreferences.get(key);
  }
  ListIterator iter=preferenceSetList.listIterator();
  if (removedPreferences.contains(key)) {
    iter.next();
  }
  Preference preference=null;
  while ((preference == null) && (iter.hasNext())) {
    preference=((PreferenceSet)iter.next()).get(key);
  }
  if (preference == null || !preference.isValueSet()) {
    return def;
  }
 else {
    return this.getValuesFromPreference(preference);
  }
}

Fixed version (ground truth):
public String[] getValues(String key,String[] def){
  if (key == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (changedPreferences.containsKey(key)) {
    return StringUtils.copy((String[])changedPreferences.get(key));
  }
  ListIterator iter=preferenceSetList.listIterator();
  if (removedPreferences.contains(key)) {
    iter.next();
  }
  Preference preference=null;
  while ((preference == null) && (iter.hasNext())) {
    preference=((PreferenceSet)iter.next()).get(key);
  }
  if (preference == null || !preference.isValueSet()) {
    return def;
  }
 else {
    String[] result=this.getValuesFromPreference(preference);
    if (result != null)     result=StringUtils.copy(result);
    return result;
  }
}
Program: 90778
Project: 90778
Buggy source:
public void setValues(String key,String[] values) throws ReadOnlyException {
  if (key == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (isReadOnly(key)) {
    throw new ReadOnlyException("String_Node_Str" + key + "String_Node_Str");
  }
  changedPreferences.put(key,values);
  removedPreferences.remove(key);
}

Fixed version (ground truth):
public void setValues(String key,String[] values) throws ReadOnlyException {
  if (key == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (isReadOnly(key)) {
    throw new ReadOnlyException("String_Node_Str" + key + "String_Node_Str");
  }
  changedPreferences.put(key,StringUtils.copy(values));
  removedPreferences.remove(key);
}
Program: 90779
Project: 90779
Buggy source:
public Map getParameterMap(){
  bodyAccessed=true;
  return Collections.unmodifiableMap(this._getHttpServletRequest().getParameterMap());
}

Fixed version (ground truth):
public Map getParameterMap(){
  bodyAccessed=true;
  Map result=StringUtils.copyParameters(this._getHttpServletRequest().getParameterMap());
  return result;
}
Program: 90780
Project: 90780
Buggy source:
public String[] getParameterValues(String name){
  if (name == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  bodyAccessed=true;
  Map parameters=this._getHttpServletRequest().getParameterMap();
  return (String[])parameters.get(name);
}

Fixed version (ground truth):
public String[] getParameterValues(String name){
  if (name == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  bodyAccessed=true;
  String[] values=(String[])this._getHttpServletRequest().getParameterMap().get(name);
  if (values != null)   values=StringUtils.copy(values);
  return values;
}