nus-yam/ex-repair huggingface dataset:
Program: 90574
Project: 90574
Buggy source:
@Override public void serveResource(ResourceRequest portletReq,ResourceResponse portletResp) throws PortletException, IOException {
  LOGGER.entering(LOG_CLASS,"String_Node_Str");
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
  PrintWriter writer=portletResp.getWriter();
}

Fixed version (ground truth):
@Override public void serveResource(ResourceRequest portletReq,ResourceResponse portletResp) throws PortletException, IOException {
  LOGGER.entering(LOG_CLASS,"String_Node_Str");
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
}
Program: 90575
Project: 90575
Buggy source:
@Override public void init(PortletConfig config) throws PortletException {
  this.portletConfig=config;
}

Fixed version (ground truth):
@Override public void init(PortletConfig config) throws PortletException {
}
Program: 90577
Project: 90577
Buggy source:
@Override public void init(PortletConfig config) throws PortletException {
  this.portletConfig=config;
}

Fixed version (ground truth):
@Override public void init(PortletConfig config) throws PortletException {
}
Program: 90578
Project: 90578
Buggy source:
@Override public void serveResource(ResourceRequest portletReq,ResourceResponse portletResp) throws PortletException, IOException {
  LOGGER.entering(LOG_CLASS,"String_Node_Str");
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
  PrintWriter writer=portletResp.getWriter();
}

Fixed version (ground truth):
@Override public void serveResource(ResourceRequest portletReq,ResourceResponse portletResp) throws PortletException, IOException {
  LOGGER.entering(LOG_CLASS,"String_Node_Str");
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
}
Program: 90579
Project: 90579
Buggy source:
@Override public void init(PortletConfig config) throws PortletException {
  this.portletConfig=config;
}

Fixed version (ground truth):
@Override public void init(PortletConfig config) throws PortletException {
}
Program: 90581
Project: 90581
Buggy source:
@Override public void serveResource(ResourceRequest portletReq,ResourceResponse portletResp) throws PortletException, IOException {
  LOGGER.entering(LOG_CLASS,"String_Node_Str");
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
  PrintWriter writer=portletResp.getWriter();
}

Fixed version (ground truth):
@Override public void serveResource(ResourceRequest portletReq,ResourceResponse portletResp) throws PortletException, IOException {
  LOGGER.entering(LOG_CLASS,"String_Node_Str");
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
}
Program: 90582
Project: 90582
Buggy source:
@Override public void init(PortletConfig config) throws PortletException {
  this.portletConfig=config;
}

Fixed version (ground truth):
@Override public void init(PortletConfig config) throws PortletException {
}
Program: 90583
Project: 90583
Buggy source:
@Override public void processAction(ActionRequest portletReq,ActionResponse portletResp) throws PortletException, IOException {
  LOGGER.entering(LOG_CLASS,"String_Node_Str");
  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
  StringWriter writer=new StringWriter();
}

Fixed version (ground truth):
@Override public void processAction(ActionRequest portletReq,ActionResponse portletResp) throws PortletException, IOException {
  LOGGER.entering(LOG_CLASS,"String_Node_Str");
  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
}
Program: 90585
Project: 90585
Buggy source:
@Override public void init(PortletConfig config) throws PortletException {
  this.portletConfig=config;
}

Fixed version (ground truth):
@Override public void init(PortletConfig config) throws PortletException {
}
Program: 90586
Project: 90586
Buggy source:
@Override public void processAction(ActionRequest portletReq,ActionResponse portletResp) throws PortletException, IOException {
  LOGGER.entering(LOG_CLASS,"String_Node_Str");
  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
  StringWriter writer=new StringWriter();
  QName eventQName=new QName(TCKNAMESPACE,"String_Node_Str");
  portletResp.setEvent(eventQName,"String_Node_Str");
}

Fixed version (ground truth):
@Override public void processAction(ActionRequest portletReq,ActionResponse portletResp) throws PortletException, IOException {
  LOGGER.entering(LOG_CLASS,"String_Node_Str");
  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
  QName eventQName=new QName(TCKNAMESPACE,"String_Node_Str");
  portletResp.setEvent(eventQName,"String_Node_Str");
}
Program: 90587
Project: 90587
Buggy source:
@Override public void serveResource(ResourceRequest portletReq,ResourceResponse portletResp) throws PortletException, IOException {
  LOGGER.entering(LOG_CLASS,"String_Node_Str");
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
  PrintWriter writer=portletResp.getWriter();
}

Fixed version (ground truth):
@Override public void serveResource(ResourceRequest portletReq,ResourceResponse portletResp) throws PortletException, IOException {
  LOGGER.entering(LOG_CLASS,"String_Node_Str");
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
}
Program: 90588
Project: 90588
Buggy source:
public PathDisplay(PortletRequest req,String caller){
  this.caller=caller;
  async_request_uri=(String)req.getAttribute("String_Node_Str");
  async_context_path=(String)req.getAttribute("String_Node_Str");
  async_servlet_path=(String)req.getAttribute("String_Node_Str");
  async_path_info=(String)req.getAttribute("String_Node_Str");
  async_query_string=(String)req.getAttribute("String_Node_Str");
  forward_request_uri=(String)req.getAttribute("String_Node_Str");
  forward_context_path=(String)req.getAttribute("String_Node_Str");
  forward_servlet_path=(String)req.getAttribute("String_Node_Str");
  forward_path_info=(String)req.getAttribute("String_Node_Str");
  forward_query_string=(String)req.getAttribute("String_Node_Str");
  include_request_uri=(String)req.getAttribute("String_Node_Str");
  include_context_path=(String)req.getAttribute("String_Node_Str");
  include_servlet_path=(String)req.getAttribute("String_Node_Str");
  include_path_info=(String)req.getAttribute("String_Node_Str");
  include_query_string=(String)req.getAttribute("String_Node_Str");
  method_request_uri="String_Node_Str";
  method_context_path=req.getContextPath();
  method_servlet_path="String_Node_Str";
  method_path_info="String_Node_Str";
  method_query_string="String_Node_Str";
  type="String_Node_Str";
}

Fixed version (ground truth):
public PathDisplay(PortletRequest req,String caller){
  this.caller=caller;
  async_request_uri=(String)req.getAttribute("String_Node_Str");
  async_context_path=(String)req.getAttribute("String_Node_Str");
  async_servlet_path=(String)req.getAttribute("String_Node_Str");
  async_path_info=(String)req.getAttribute("String_Node_Str");
  async_query_string=(String)req.getAttribute("String_Node_Str");
  forward_request_uri=(String)req.getAttribute("String_Node_Str");
  forward_context_path=(String)req.getAttribute("String_Node_Str");
  forward_servlet_path=(String)req.getAttribute("String_Node_Str");
  forward_path_info=(String)req.getAttribute("String_Node_Str");
  forward_query_string=(String)req.getAttribute("String_Node_Str");
  include_request_uri=(String)req.getAttribute("String_Node_Str");
  include_context_path=(String)req.getAttribute("String_Node_Str");
  include_servlet_path=(String)req.getAttribute("String_Node_Str");
  include_path_info=(String)req.getAttribute("String_Node_Str");
  include_query_string=(String)req.getAttribute("String_Node_Str");
  method_request_uri="String_Node_Str";
  method_context_path=req.getContextPath();
  method_servlet_path="String_Node_Str";
  method_path_info="String_Node_Str";
  method_path_xlated="String_Node_Str";
  method_query_string="String_Node_Str";
  type="String_Node_Str";
}
Program: 90593
Project: 90593
Buggy source:
public void setResourceID(String resourceID){
  url.setCacheability(resourceID);
}

Fixed version (ground truth):
public void setResourceID(String resourceID){
  url.setResourceID(resourceID);
}
Program: 90594
Project: 90594
Buggy source:
/** 
 * Sets values based on form input
 */
@ActionMethod(portletName="String_Node_Str") public void handleDialog(ActionRequest req,ActionResponse resp) throws PortletException, IOException {
  msg=null;
  String strType=req.getActionParameters().getValue(PARAM_TYPE);
  if (strType != null) {
    try {
      type=OutputType.valueOf(strType);
    }
 catch (    Exception e) {
      msg="String_Node_Str" + strType;
    }
  }
  String strReps=req.getActionParameters().getValue(PARAM_REPS);
  if (strReps != null) {
    try {
      reps=Integer.parseInt(strReps);
      if (reps <= 0 || reps > 8)       throw new Exception("String_Node_Str");
    }
 catch (    Exception e) {
      msg="String_Node_Str";
    }
  }
  String strDelay=req.getActionParameters().getValue(PARAM_DELAY);
  if (strDelay != null) {
    try {
      delay=Integer.parseInt(strDelay);
      if (delay < 0)       throw new Exception("String_Node_Str");
    }
 catch (    Exception e) {
      msg="String_Node_Str";
    }
  }
  String auto=req.getActionParameters().getValue(PARAM_AUTO);
  if (auto != null) {
    autoDispatch=true;
  }
 else {
    autoDispatch=false;
    if (reps > 1) {
      msg="String_Node_Str";
      reps=1;
    }
  }
  String[] state={"String_Node_Str" + delay,"String_Node_Str" + reps,type.toString(),msg,"String_Node_Str" + autoDispatch};
  LOGGER.fine("String_Node_Str" + Arrays.asList(state).toString());
}

Fixed version (ground truth):
/** 
 * Sets values based on form input
 */
@ActionMethod(portletName="String_Node_Str") public void handleDialog(ActionRequest req,ActionResponse resp) throws PortletException, IOException {
  msg=null;
  String strReps=req.getActionParameters().getValue(PARAM_REPS);
  if (strReps != null) {
    try {
      reps=Integer.parseInt(strReps);
      if (reps <= 0 || reps > 8)       throw new Exception("String_Node_Str");
    }
 catch (    Exception e) {
      msg="String_Node_Str";
    }
  }
  String strDelay=req.getActionParameters().getValue(PARAM_DELAY);
  if (strDelay != null) {
    try {
      delay=Integer.parseInt(strDelay);
      if (delay < 0)       throw new Exception("String_Node_Str");
    }
 catch (    Exception e) {
      msg="String_Node_Str";
    }
  }
  String strType=req.getActionParameters().getValue(PARAM_TYPE);
  if (strType != null) {
    try {
      type=OutputType.valueOf(strType);
      if (type == OutputType.FWD && reps > 1) {
        msg="String_Node_Str";
        reps=1;
      }
    }
 catch (    Exception e) {
      msg="String_Node_Str" + strType;
    }
  }
  String auto=req.getActionParameters().getValue(PARAM_AUTO);
  if (auto != null) {
    autoDispatch=true;
  }
 else {
    autoDispatch=false;
    if (reps > 1) {
      msg="String_Node_Str";
      reps=1;
    }
  }
  String[] state={"String_Node_Str" + delay,"String_Node_Str" + reps,type.toString(),msg,"String_Node_Str" + autoDispatch};
  LOGGER.fine("String_Node_Str" + Arrays.asList(state).toString());
}
Program: 90597
Project: 90597
Buggy source:
/** 
 * Sets values based on form input
 */
@ActionMethod(portletName="String_Node_Str") public void handleDialog(ActionRequest req,ActionResponse resp) throws PortletException, IOException {
  msg=null;
  String strReps=req.getActionParameters().getValue(PARAM_REPS);
  if (strReps != null) {
    try {
      reps=Integer.parseInt(strReps);
      if (reps <= 0 || reps > 8)       throw new Exception("String_Node_Str");
    }
 catch (    Exception e) {
      msg="String_Node_Str";
    }
  }
  String strDelay=req.getActionParameters().getValue(PARAM_DELAY);
  if (strDelay != null) {
    try {
      delay=Integer.parseInt(strDelay);
      if (delay < 0)       throw new Exception("String_Node_Str");
    }
 catch (    Exception e) {
      msg="String_Node_Str";
    }
  }
  String strType=req.getActionParameters().getValue(PARAM_TYPE);
  if (strType != null) {
    try {
      type=OutputType.valueOf(strType);
      if (type == OutputType.FWD && reps > 1) {
        msg="String_Node_Str";
        reps=1;
      }
    }
 catch (    Exception e) {
      msg="String_Node_Str" + strType;
    }
  }
  String auto=req.getActionParameters().getValue(PARAM_AUTO);
  if (auto != null) {
    autoDispatch=true;
  }
 else {
    autoDispatch=false;
    if (reps > 1) {
      msg="String_Node_Str";
      reps=1;
    }
  }
  String[] state={"String_Node_Str" + delay,"String_Node_Str" + reps,type.toString(),msg,"String_Node_Str" + autoDispatch};
  LOGGER.fine("String_Node_Str" + Arrays.asList(state).toString());
}

Fixed version (ground truth):
/** 
 * Sets values based on form input
 */
@ActionMethod(portletName="String_Node_Str") public void handleDialog(ActionRequest req,ActionResponse resp) throws PortletException, IOException {
  msg=null;
  String strReps=req.getActionParameters().getValue(PARAM_REPS);
  if (strReps != null) {
    try {
      reps=Integer.parseInt(strReps);
      if (reps <= 0 || reps > 8)       throw new Exception("String_Node_Str");
    }
 catch (    Exception e) {
      msg="String_Node_Str";
    }
  }
  String strDelay=req.getActionParameters().getValue(PARAM_DELAY);
  if (strDelay != null) {
    try {
      delay=Integer.parseInt(strDelay);
      if (delay < 0)       throw new Exception("String_Node_Str");
    }
 catch (    Exception e) {
      msg="String_Node_Str";
    }
  }
  String strType=req.getActionParameters().getValue(PARAM_TYPE);
  if (strType != null) {
    try {
      type=OutputType.valueOf(strType);
      if (reps > 1) {
        if ((type == OutputType.FWD) || (type == OutputType.DISPATCH)) {
          msg="String_Node_Str";
          reps=1;
        }
      }
    }
 catch (    Exception e) {
      msg="String_Node_Str" + strType;
    }
  }
  String auto=req.getActionParameters().getValue(PARAM_AUTO);
  if (auto != null) {
    autoDispatch=true;
  }
 else {
    autoDispatch=false;
    if (reps > 1) {
      msg="String_Node_Str";
      reps=1;
    }
  }
  String[] state={"String_Node_Str" + delay,"String_Node_Str" + reps,type.toString(),msg,"String_Node_Str" + autoDispatch};
  LOGGER.fine("String_Node_Str" + Arrays.asList(state).toString());
}
Program: 90599
Project: 90599
Buggy source:
private void dumpParameters(PortletRequest req){
  if (logger.isLoggable(Level.FINEST)) {
    StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str");
    Map<String,String[]> parms=req.getParameterMap();
    for (    String name : parms.keySet()) {
      sb.append("String_Node_Str").append(name);
      sb.append("String_Node_Str").append(Arrays.toString(parms.get(name)));
    }
    logger.finest(sb.toString());
  }
}

Fixed version (ground truth):
private void dumpParameters(String type,PortletParameters parms){
  if (logger.isLoggable(Level.FINEST)) {
    StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str").append(type).append("String_Node_Str");
    for (    String name : parms.getNames()) {
      sb.append("String_Node_Str").append(name);
      sb.append("String_Node_Str").append(Arrays.toString(parms.getValues(name)));
    }
    logger.finest(sb.toString());
  }
}
Program: 90600
Project: 90600
Buggy source:
public void processAction(ActionRequest req,ActionResponse resp) throws PortletException, IOException {
  dumpParameters(req);
  String[] vals=req.getParameterValues(PARAM_FG_COLOR);
  String r="String_Node_Str";
  String g="String_Node_Str";
  String b="String_Node_Str";
  if (vals != null) {
    for (    String v : vals) {
      if (v.equals(PARAM_FG_RED))       r="String_Node_Str";
      if (v.equals(PARAM_FG_GREEN))       g="String_Node_Str";
      if (v.equals(PARAM_FG_BLUE))       b="String_Node_Str";
    }
  }
  String clr="String_Node_Str" + r + g+ b;
  if (vals != null) {
    resp.setRenderParameter(PARAM_FG_COLOR,vals);
  }
  String subType=req.getParameter(PARAM_SUBTYPE);
  if (subType != null) {
    resp.setRenderParameter(PARAM_SUBTYPE,subType);
  }
  String text=req.getParameter(PARAM_MSG_INPUT);
  if (text != null) {
    resp.setRenderParameter(PARAM_MSG_INPUT,text);
  }
  String msg=text + DELIM + clr;
  Enumeration<QName> eqn=getPublishingEventQNames();
  if (eqn.hasMoreElements()) {
    QName qn=eqn.nextElement();
    resp.setEvent(qn,msg);
    logger.fine("String_Node_Str" + qn.toString());
  }
 else {
    logger.warning("String_Node_Str");
  }
  StringBuilder sb=new StringBuilder("String_Node_Str").append(Arrays.toString(vals));
  sb.append("String_Node_Str").append(subType);
  sb.append("String_Node_Str").append(text);
  logger.fine(sb.toString());
}

Fixed version (ground truth):
@ActionMethod(portletName="String_Node_Str",publishingEvents={@PortletQName(namespaceURI="String_Node_Str",localPart="String_Node_Str")}) public void processAction(ActionRequest req,ActionResponse resp) throws PortletException, IOException {
  dumpParameters("String_Node_Str",req.getActionParameters());
  dumpParameters("String_Node_Str",req.getRenderParameters());
  String[] vals=req.getActionParameters().getValues(PARAM_FG_COLOR);
  String r="String_Node_Str";
  String g="String_Node_Str";
  String b="String_Node_Str";
  if (vals != null) {
    for (    String v : vals) {
      if (v.equals(PARAM_FG_RED))       r="String_Node_Str";
      if (v.equals(PARAM_FG_GREEN))       g="String_Node_Str";
      if (v.equals(PARAM_FG_BLUE))       b="String_Node_Str";
    }
  }
  String clr="String_Node_Str" + r + g+ b;
  if (vals != null) {
    resp.getRenderParameters().setValues(PARAM_FG_COLOR,vals);
  }
  String subType=req.getActionParameters().getValue(PARAM_SUBTYPE);
  if (subType != null) {
    resp.getRenderParameters().setValue(PARAM_SUBTYPE,subType);
  }
  String text=req.getActionParameters().getValue(PARAM_MSG_INPUT);
  if (text != null) {
    resp.getRenderParameters().setValue(PARAM_MSG_INPUT,text);
  }
  String msg=text + DELIM + clr;
  Enumeration<QName> eqn=getPublishingEventQNames();
  if (eqn.hasMoreElements()) {
    QName qn=eqn.nextElement();
    resp.setEvent(qn,msg);
    logger.fine("String_Node_Str" + qn.toString());
  }
 else {
    logger.warning("String_Node_Str");
  }
  StringBuilder sb=new StringBuilder("String_Node_Str").append(Arrays.toString(vals));
  sb.append("String_Node_Str").append(subType);
  sb.append("String_Node_Str").append(text);
  logger.fine(sb.toString());
}
Program: 90601
Project: 90601
Buggy source:
@Override public void serveResource(ResourceRequest req,ResourceResponse resp) throws PortletException, IOException {
  resp.setContentType("String_Node_Str");
  PrintWriter writer=resp.getWriter();
  String pid=resp.getNamespace();
  Set<String> names=imgMap.keySet();
  String selType=req.getParameter(PARAM_SELTYPE);
  selType=(selType == null) ? PARAM_SELTYPE_RADIO : selType;
  String imgName=req.getParameter(PARAM_IMGNAME);
  imgName=(imgName == null) ? "String_Node_Str" : imgName;
  if (selType.equals(PARAM_SELTYPE_RADIO)) {
    for (    String name : names) {
      writer.write("String_Node_Str" + PARAM_IMGNAME + "String_Node_Str"+ name+ "String_Node_Str"+ (name.equals(imgName) ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ name);
    }
  }
 else {
    writer.write("String_Node_Str" + pid + "String_Node_Str"+ PARAM_IMGNAME+ "String_Node_Str");
    writer.write("String_Node_Str" + ("String_Node_Str".equals(imgName) ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str");
    for (    String name : names) {
      writer.write("String_Node_Str" + name + "String_Node_Str"+ (name.equals(imgName) ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ name+ "String_Node_Str");
    }
    writer.write("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void serveResource(ResourceRequest req,ResourceResponse resp) throws PortletException, IOException {
  resp.setContentType("String_Node_Str");
  PrintWriter writer=resp.getWriter();
  String pid=resp.getNamespace();
  Set<String> names=imgMap.keySet();
  String selType=req.getRenderParameters().getValue(PARAM_SELTYPE);
  selType=(selType == null) ? PARAM_SELTYPE_RADIO : selType;
  String imgName=req.getRenderParameters().getValue(PARAM_IMGNAME);
  imgName=(imgName == null) ? "String_Node_Str" : imgName;
  if (selType.equals(PARAM_SELTYPE_RADIO)) {
    for (    String name : names) {
      writer.write("String_Node_Str" + PARAM_IMGNAME + "String_Node_Str"+ name+ "String_Node_Str"+ (name.equals(imgName) ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ name);
    }
  }
 else {
    writer.write("String_Node_Str" + pid + "String_Node_Str"+ PARAM_IMGNAME+ "String_Node_Str");
    writer.write("String_Node_Str" + ("String_Node_Str".equals(imgName) ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str");
    for (    String name : names) {
      writer.write("String_Node_Str" + name + "String_Node_Str"+ (name.equals(imgName) ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ name+ "String_Node_Str");
    }
    writer.write("String_Node_Str");
  }
}
Program: 90602
Project: 90602
Buggy source:
@Override public void processAction(ActionRequest req,ActionResponse resp) throws PortletException, IOException {
  String actionName=req.getParameter("String_Node_Str");
  logger.fine("String_Node_Str" + actionName);
  ArrayList<String> msgs=new ArrayList<String>();
  StringBuffer sb=new StringBuffer();
  sb.append("String_Node_Str" + "String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  msgs.add(sb.toString());
  resp.setRenderParameter(PARAM_NUM_MSGS,"String_Node_Str");
  req.getPortletSession().setAttribute(ATTRIB_MSGS,msgs);
}

Fixed version (ground truth):
@Override public void processAction(ActionRequest req,ActionResponse resp) throws PortletException, IOException {
  String actionName=req.getActionParameters().getValue(ActionRequest.ACTION_NAME);
  logger.fine("String_Node_Str" + actionName);
  ArrayList<String> msgs=new ArrayList<String>();
  StringBuffer sb=new StringBuffer();
  sb.append("String_Node_Str" + "String_Node_Str");
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  msgs.add(sb.toString());
  resp.getRenderParameters().setValue(PARAM_NUM_MSGS,"String_Node_Str");
  req.getPortletSession().setAttribute(ATTRIB_MSGS,msgs);
}
Program: 90603
Project: 90603
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void processEvent(EventRequest req,EventResponse resp) throws PortletException, IOException {
  ArrayList<String> msgs=(ArrayList<String>)req.getPortletSession().getAttribute(ATTRIB_MSGS);
  if (msgs == null) {
    msgs=new ArrayList<String>();
  }
  String[] msg;
  int numMsgs=0;
  try {
    numMsgs=Integer.parseInt(req.getParameter(PARAM_NUM_MSGS));
  }
 catch (  Exception e) {
  }
  if (numMsgs == 0) {
    msgs.clear();
  }
  logger.fine("String_Node_Str" + msgs.size());
  try {
    String val=(String)req.getEvent().getValue();
    msg=val.split(DELIM);
  }
 catch (  Exception e) {
    msg=new String[2];
    msg[0]="String_Node_Str";
    msg[1]="String_Node_Str";
  }
  String clr=req.getParameter(PARAM_COLOR);
  clr=(clr == null) ? "String_Node_Str" : clr;
  StringBuffer sb=new StringBuffer();
  sb.append("String_Node_Str" + msg[1] + "String_Node_Str"+ clr+ "String_Node_Str");
  sb.append("String_Node_Str" + (msgs.size() + 1) + "String_Node_Str"+ msg[0]);
  sb.append("String_Node_Str");
  msgs.add(sb.toString());
  logger.fine("String_Node_Str" + sb.toString());
  resp.setRenderParameter(PARAM_NUM_MSGS,Integer.toString(msgs.size()));
  req.getPortletSession().setAttribute(ATTRIB_MSGS,msgs);
}

Fixed version (ground truth):
@EventMethod(portletName="String_Node_Str",processingEvents={@PortletQName(namespaceURI="String_Node_Str",localPart="String_Node_Str")}) @Override public void processEvent(EventRequest req,EventResponse resp) throws PortletException, IOException {
  @SuppressWarnings("String_Node_Str") ArrayList<String> msgs=(ArrayList<String>)req.getPortletSession().getAttribute(ATTRIB_MSGS);
  if (msgs == null) {
    msgs=new ArrayList<String>();
  }
  String[] msg;
  int numMsgs=0;
  try {
    numMsgs=Integer.parseInt(req.getRenderParameters().getValue(PARAM_NUM_MSGS));
  }
 catch (  Exception e) {
  }
  if (numMsgs == 0) {
    msgs.clear();
  }
  logger.fine("String_Node_Str" + msgs.size());
  try {
    String val=(String)req.getEvent().getValue();
    msg=val.split(DELIM);
  }
 catch (  Exception e) {
    msg=new String[2];
    msg[0]="String_Node_Str";
    msg[1]="String_Node_Str";
  }
  String clr=req.getRenderParameters().getValue(PARAM_COLOR);
  clr=(clr == null) ? "String_Node_Str" : clr;
  StringBuffer sb=new StringBuffer();
  sb.append("String_Node_Str" + msg[1] + "String_Node_Str"+ clr+ "String_Node_Str");
  sb.append("String_Node_Str" + (msgs.size() + 1) + "String_Node_Str"+ msg[0]);
  sb.append("String_Node_Str");
  msgs.add(sb.toString());
  logger.fine("String_Node_Str" + sb.toString());
  resp.getRenderParameters().setValue(PARAM_NUM_MSGS,Integer.toString(msgs.size()));
  req.getPortletSession().setAttribute(ATTRIB_MSGS,msgs);
}
Program: 90604
Project: 90604
Buggy source:
@Override public void serveResource(ResourceRequest req,ResourceResponse resp) throws PortletException, IOException {
  String key=req.getParameter(PARAM_IMGNAME);
  String imgDir=DEFAULT_IMAGE;
  if ((key != null) && imgMap.containsKey(key)) {
    imgDir=imgMap.get(key);
  }
  String bc=req.getParameter(PARAM_BORDER_COLOR);
  String imgStyle="String_Node_Str";
  if (bc != null) {
    imgStyle="String_Node_Str" + bc + "String_Node_Str";
  }
  String ctx=req.getContextPath();
  String ca=req.getCacheability();
  resp.setContentType("String_Node_Str");
  PrintWriter writer=resp.getWriter();
  String clr=req.getParameter(PARAM_COLOR);
  clr=(clr == null) ? "String_Node_Str" : clr;
  PortletURL aurl=null;
  String bmu="String_Node_Str";
  try {
    aurl=resp.createActionURL();
  }
 catch (  Exception e) {
  }
  if (aurl != null) {
    bmu="String_Node_Str" + aurl + "String_Node_Str";
  }
  writer.write("String_Node_Str" + clr + "String_Node_Str");
  writer.write("String_Node_Str" + clr + "String_Node_Str");
  writer.write("String_Node_Str" + clr + "String_Node_Str");
  writer.write("String_Node_Str" + ctx + imgDir+ "String_Node_Str"+ imgStyle+ "String_Node_Str");
  writer.write("String_Node_Str" + clr + "String_Node_Str");
  writer.write("String_Node_Str" + bmu + "String_Node_Str");
  writer.write("String_Node_Str" + ca + "String_Node_Str");
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
}

Fixed version (ground truth):
@Override public void serveResource(ResourceRequest req,ResourceResponse resp) throws PortletException, IOException {
  String key=req.getRenderParameters().getValue(PARAM_IMGNAME);
  String imgDir=DEFAULT_IMAGE;
  if ((key != null) && imgMap.containsKey(key)) {
    imgDir=imgMap.get(key);
  }
  String bc=req.getResourceParameters().getValue(PARAM_BORDER_COLOR);
  String imgStyle="String_Node_Str";
  if (bc != null) {
    imgStyle="String_Node_Str" + bc + "String_Node_Str";
  }
  String ctx=req.getContextPath();
  String ca=req.getCacheability();
  resp.setContentType("String_Node_Str");
  PrintWriter writer=resp.getWriter();
  String clr=req.getRenderParameters().getValue(PARAM_COLOR);
  clr=(clr == null) ? "String_Node_Str" : clr;
  PortletURL aurl=null;
  String bmu="String_Node_Str";
  try {
    aurl=resp.createActionURL();
  }
 catch (  Exception e) {
  }
  if (aurl != null) {
    bmu="String_Node_Str" + aurl + "String_Node_Str";
  }
  writer.write("String_Node_Str" + clr + "String_Node_Str");
  writer.write("String_Node_Str" + clr + "String_Node_Str");
  writer.write("String_Node_Str" + clr + "String_Node_Str");
  writer.write("String_Node_Str" + ctx + imgDir+ "String_Node_Str"+ imgStyle+ "String_Node_Str");
  writer.write("String_Node_Str" + clr + "String_Node_Str");
  writer.write("String_Node_Str" + bmu + "String_Node_Str");
  writer.write("String_Node_Str" + ca + "String_Node_Str");
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
}
Program: 90605
Project: 90605
Buggy source:
/** 
 * Sets the bean instance for all annotated methods that are members of a configured portlet class to ensure that all annotated methods of the portlet class use the same bean instance.
 * @param cls
 * @param beanInstance
 */
public void setPortletClassInstance(Class<?> cls,Object beanInstance){
  for (  List<AnnotatedMethod> list : methods.values()) {
    for (    AnnotatedMethod am : list) {
      if (am.getJavaMethod().getDeclaringClass().equals(cls)) {
        am.setPortletClassInstance(beanInstance);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Sets the bean instance for all annotated methods for a given portlet that are members of  a configured portlet class to ensure that all annotated methods of the portlet class use  the same bean instance.
 * @param portletName      The portlet name
 * @param cls              The class
 * @param beanInstance     The instance to use
 */
public void setPortletClassInstance(String portletName,Class<?> cls,Object beanInstance){
  for (  MethodIdentifier mi : getMethodIDsForPortlet(portletName)) {
    List<AnnotatedMethod> list=methods.get(mi);
    for (    AnnotatedMethod am : list) {
      if (am.getJavaMethod().getDeclaringClass().equals(cls)) {
        am.setPortletClassInstance(beanInstance);
      }
    }
  }
}
Program: 90607
Project: 90607
Buggy source:
public void addProperty(String key,String value){
  if (value == null) {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str").append(key);
    LOG.warn(txt.toString());
  }
 else   if (!key.matches(VALID_HEADER_CHARS)) {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str").append(key);
    txt.append("String_Node_Str").append(value);
    LOG.warn(txt.toString());
  }
 else {
    if (disallowedHeaders.contains(key.toUpperCase())) {
      StringBuilder txt=new StringBuilder(128);
      txt.append("String_Node_Str").append(key);
      txt.append("String_Node_Str").append(value);
      LOG.warn(txt.toString());
    }
 else {
      if (!isClosed() && isSetPropsAllowed) {
        headerData.addHttpHeader(key,value);
      }
    }
  }
}

Fixed version (ground truth):
public void addProperty(String key,String value){
  if (value == null) {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str").append(key);
    LOG.warn(txt.toString());
  }
 else   if (!key.matches(VALID_HEADER_CHARS)) {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str").append(key);
    txt.append("String_Node_Str").append(value);
    LOG.warn(txt.toString());
  }
 else {
    if (!lifecycle.matches(RESOURCE_PHASE) && disallowedHeaders.contains(key.toUpperCase())) {
      StringBuilder txt=new StringBuilder(128);
      txt.append("String_Node_Str").append(key);
      txt.append("String_Node_Str").append(value);
      LOG.warn(txt.toString());
    }
 else {
      if (!isClosed() && isSetPropsAllowed) {
        headerData.addHttpHeader(key,value);
      }
    }
  }
}
Program: 90608
Project: 90608
Buggy source:
public void setProperty(String key,String value){
  if (value == null) {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str").append(key);
    LOG.warn(txt.toString());
  }
 else   if (!key.matches(VALID_HEADER_CHARS)) {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str").append(key);
    txt.append("String_Node_Str").append(value);
    LOG.warn(txt.toString());
  }
 else {
    if (disallowedHeaders.contains(key.toUpperCase())) {
      StringBuilder txt=new StringBuilder(128);
      txt.append("String_Node_Str").append(key);
      txt.append("String_Node_Str").append(value);
      LOG.warn(txt.toString());
    }
 else {
      if (!isClosed() && isSetPropsAllowed) {
        headerData.setHttpHeader(key,value);
      }
    }
  }
}

Fixed version (ground truth):
public void setProperty(String key,String value){
  if (value == null) {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str").append(key);
    LOG.warn(txt.toString());
  }
 else   if (!key.matches(VALID_HEADER_CHARS)) {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str").append(key);
    txt.append("String_Node_Str").append(value);
    LOG.warn(txt.toString());
  }
 else {
    if (!lifecycle.matches(RESOURCE_PHASE) && disallowedHeaders.contains(key.toUpperCase())) {
      StringBuilder txt=new StringBuilder(128);
      txt.append("String_Node_Str").append(key);
      txt.append("String_Node_Str").append(value);
      LOG.warn(txt.toString());
    }
 else {
      if (!isClosed() && isSetPropsAllowed) {
        headerData.setHttpHeader(key,value);
      }
    }
  }
}
Program: 90609
Project: 90609
Buggy source:
/** 
 * Read the Web Application Deployment Descriptor.
 * @return WebAppDD instance representing the descriptor.
 * @throws java.io.IOException
 */
public PortletApplicationDefinition read(String name,String contextPath,InputStream in) throws IOException {
  if (in == null) {
    throw new IOException("String_Node_Str");
  }
  try {
    confHolder.processPortletDD(in);
    pad=confHolder.getPad();
  }
 catch (  XMLStreamException|IllegalArgumentException|JAXBException e) {
    final IOException ioe=new IOException(e.getLocalizedMessage());
    ioe.initCause(e);
    throw ioe;
  }
  pad.setName(name);
  pad.setContextPath(contextPath);
  return pad;
}

Fixed version (ground truth):
/** 
 * Read the Web Application Deployment Descriptor.
 * @return WebAppDD instance representing the descriptor.
 * @throws java.io.IOException
 */
public PortletApplicationDefinition read(String name,String contextPath,InputStream in) throws IOException {
  if (in == null) {
    throw new IOException("String_Node_Str");
  }
  PortletApplicationDefinition pad=null;
  ConfigurationHolder confHolder=new ConfigurationHolder();
  try {
    confHolder.processPortletDD(in);
    pad=confHolder.getPad();
  }
 catch (  XMLStreamException|IllegalArgumentException|JAXBException e) {
    final IOException ioe=new IOException(e.getLocalizedMessage());
    ioe.initCause(e);
    throw ioe;
  }
  pad.setName(name);
  pad.setContextPath(contextPath);
  return pad;
}
Program: 90610
Project: 90610
Buggy source:
public void mergeWebDescriptor(PortletApplicationDefinition pa,InputStream webDescriptor) throws Exception {
  confHolder=new ConfigurationHolder(pa);
  confHolder.processWebDD(webDescriptor);
}

Fixed version (ground truth):
public void mergeWebDescriptor(PortletApplicationDefinition pad,InputStream webDescriptor) throws Exception {
  ConfigurationHolder confHolder=new ConfigurationHolder(pad);
  confHolder.processWebDD(webDescriptor);
  if (isDebug) {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str").append(pad.getName());
    txt.append("String_Node_Str").append(pad.getContextPath());
    txt.append("String_Node_Str").append(pad.getPortlets().size());
    txt.append("String_Node_Str");
    String sep="String_Node_Str";
    for (    PortletDefinition pd : pad.getPortlets()) {
      txt.append(sep).append(pd.getPortletName());
      sep="String_Node_Str";
    }
    LOG.debug(txt.toString());
  }
}
Program: 90613
Project: 90613
Buggy source:
@Override public String getParameter(String name){
  String val=super.getParameter(name);
  if (LOG.isDebugEnabled()) {
    Map<String,String[]> pmap=super.getParameterMap();
    StringBuffer txt=new StringBuffer(1024);
    txt.append("String_Node_Str");
    for (    String n : pmap.keySet()) {
      txt.append("String_Node_Str" + n + "String_Node_Str");
      String[] vals=pmap.get(n);
      String sep="String_Node_Str";
      for (      String v : vals) {
        txt.append(sep + v);
        sep="String_Node_Str";
      }
      txt.append("String_Node_Str");
    }
    LOG.debug(txt.toString());
  }
  return val;
}

Fixed version (ground truth):
@Override public String getParameter(String name){
  String val=super.getParameter(name);
  if (LOG.isDebugEnabled()) {
    Map<String,String[]> pmap=super.getParameterMap();
    StringBuffer txt=new StringBuffer(1024);
    txt.append("String_Node_Str");
    for (    String n : pmap.keySet()) {
      txt.append("String_Node_Str" + n + "String_Node_Str");
      String[] vals=pmap.get(n);
      String sep="String_Node_Str";
      for (      String v : vals) {
        txt.append(sep + v);
        sep="String_Node_Str";
      }
    }
    LOG.debug(txt.toString());
  }
  return val;
}
Program: 90614
Project: 90614
Buggy source:
public PortalURL apply(){
  if (isDebug) {
    StringBuilder txt=new StringBuilder("String_Node_Str");
    txt.append("String_Node_Str").append(type);
    txt.append("String_Node_Str").append(url.getType());
    txt.append("String_Node_Str").append(url.getTargetWindow());
    LOGGER.debug(txt.toString());
  }
  return url;
}

Fixed version (ground truth):
public PortalURL apply(){
  if (isDebug) {
    StringBuilder txt=new StringBuilder("String_Node_Str");
    txt.append("String_Node_Str").append(type);
    txt.append("String_Node_Str").append(url.getType());
    txt.append("String_Node_Str").append(url.getTargetWindow());
    LOGGER.debug(txt.toString());
  }
  if (isDebug) {
    StringBuilder txt=new StringBuilder("String_Node_Str");
    txt.append(window);
    for (    PortalURLParameter p : url.getParameters()) {
      if (p.getWindowId().equals(window)) {
        txt.append("String_Node_Str").append(p.getName());
        txt.append("String_Node_Str").append(p.getType());
        txt.append("String_Node_Str").append(Arrays.toString(p.getValues()));
      }
    }
    LOGGER.debug(txt.toString());
  }
  return url;
}
Program: 90615
Project: 90615
Buggy source:
public PortletURLProviderImpl(PortalURL url,TYPE type,PortletWindow portletWindow){
  this.url=url.clone();
  this.type=type;
  this.window=portletWindow.getId().getStringId();
  if (isDebug) {
    StringBuilder txt=new StringBuilder("String_Node_Str");
    txt.append("String_Node_Str").append(type);
    txt.append("String_Node_Str").append(url.getType());
    txt.append("String_Node_Str").append(window);
    txt.append("String_Node_Str").append(url.getTargetWindow());
    LOGGER.debug(txt.toString());
  }
  this.url.setTargetWindow(window);
switch (type) {
case ACTION:
    this.url.setType(URLType.Action);
  break;
case RESOURCE:
this.url.setType(URLType.Resource);
this.url.clearResourceParameters(window);
this.url.setCacheability(ResourceURL.PAGE);
break;
default :
this.url.setType(URLType.Render);
this.url.clearParameters(window);
}
if (isTrace) {
StringBuilder txt=new StringBuilder("String_Node_Str");
txt.append("String_Node_Str").append(this.url.getType());
LOGGER.debug(txt.toString());
}
}

Fixed version (ground truth):
public PortletURLProviderImpl(PortalURL url,TYPE type,PortletWindow portletWindow){
  this.url=url.clone();
  this.type=type;
  this.window=portletWindow.getId().getStringId();
  if (isDebug) {
    StringBuilder txt=new StringBuilder("String_Node_Str");
    txt.append("String_Node_Str").append(type);
    txt.append("String_Node_Str").append(url.getType());
    txt.append("String_Node_Str").append(window);
    txt.append("String_Node_Str").append(url.getTargetWindow());
    LOGGER.debug(txt.toString());
  }
  if (isTrace) {
    StringBuilder txt=new StringBuilder("String_Node_Str");
    txt.append(window);
    for (    PortalURLParameter p : this.url.getParameters()) {
      if (p.getWindowId().equals(window)) {
        txt.append("String_Node_Str").append(p.getName());
        txt.append("String_Node_Str").append(p.getType());
        txt.append("String_Node_Str").append(Arrays.toString(p.getValues()));
      }
    }
    LOGGER.debug(txt.toString());
  }
  this.url.setTargetWindow(window);
switch (type) {
case ACTION:
    this.url.setType(URLType.Action);
  break;
case RESOURCE:
this.url.setType(URLType.Resource);
this.url.clearResourceParameters(window);
this.url.setCacheability(ResourceURL.PAGE);
break;
default :
this.url.setType(URLType.Render);
this.url.clearParameters(window);
}
if (isTrace) {
StringBuilder txt=new StringBuilder("String_Node_Str");
txt.append("String_Node_Str").append(this.url.getType());
LOGGER.debug(txt.toString());
}
}
Program: 90618
Project: 90618
Buggy source:
protected static Map<String,String[]> cloneParameterMap(Map<String,String[]> map){
  if (!map.isEmpty()) {
    Map<String,String[]> result=new HashMap<String,String[]>(map.size());
    for (    Map.Entry<String,String[]> entry : map.entrySet()) {
      if (entry.getValue() != null) {
        result.put(entry.getKey(),entry.getValue().clone());
      }
    }
    return Collections.unmodifiableMap(result);
  }
  return Collections.emptyMap();
}

Fixed version (ground truth):
protected static Map<String,String[]> cloneParameterMap(Map<String,String[]> map){
  Map<String,String[]> newMap=new HashMap<String,String[]>();
  for (  String pn : map.keySet()) {
    newMap.put(pn,map.get(pn).clone());
  }
  return newMap;
}
Program: 90620
Project: 90620
Buggy source:
public void clearResourceParameters(String window){
  handleServletRequestParams();
  HashSet<PortalURLParameter> rem=new HashSet<PortalURLParameter>();
  for (  PortalURLParameter pup : parameters) {
    if (pup.getType().equals(PortalURLParameter.PARAM_TYPE_RESOURCE) && pup.getWindowId().equals(window)) {
      rem.add(pup);
    }
  }
  if (isTrace) {
    StringBuilder txt=new StringBuilder("String_Node_Str");
    txt.append(rem.size()).append("String_Node_Str").append(window);
    LOG.debug(txt.toString());
  }
  parameters.removeAll(rem);
}

Fixed version (ground truth):
public void clearResourceParameters(String window){
  HashSet<PortalURLParameter> rem=new HashSet<PortalURLParameter>();
  for (  PortalURLParameter pup : parameters) {
    if (pup.getType().equals(PortalURLParameter.PARAM_TYPE_RESOURCE) && pup.getWindowId().equals(window)) {
      rem.add(pup);
    }
  }
  if (isTrace) {
    StringBuilder txt=new StringBuilder("String_Node_Str");
    txt.append(rem.size()).append("String_Node_Str").append(window);
    LOG.debug(txt.toString());
  }
  parameters.removeAll(rem);
}
Program: 90621
Project: 90621
Buggy source:
public void setRenderParameter(String key,String... values){
  ArgumentUtility.validateNotEmpty("String_Node_Str",key);
  ArgumentUtility.validateNotNull("String_Node_Str",values);
  checkSetStateChanged();
  if (values == null) {
    responseContext.removeParameter(windowId,key);
  }
 else {
    responseContext.setParameter(windowId,key,values.clone());
  }
}

Fixed version (ground truth):
public void setRenderParameter(String key,String... values){
  ArgumentUtility.validateNotEmpty("String_Node_Str",key);
  checkSetStateChanged();
  if (values == null) {
    responseContext.removeParameter(windowId,key);
  }
 else {
    responseContext.setParameter(windowId,key,values.clone());
  }
}
Program: 90622
Project: 90622
Buggy source:
public void processEvents(PortletContainer container,PortletWindow portletWindow,HttpServletRequest request,HttpServletResponse response,List<Event> events){
  ServletContext containerServletContext=PortalRequestContext.getContext(request).getServletContext();
  DriverConfiguration driverConfig=(DriverConfiguration)containerServletContext.getAttribute(AttributeKeys.DRIVER_CONFIG);
  PortalURL portalURL=PortalURLParserImpl.getParser().parse(request);
  for (  Event event : events) {
    List<String> portletNames=getAllPortletsRegisteredForEvent(event,driverConfig,containerServletContext);
    Collection<PortletWindowConfig> portlets=new ArrayList<PortletWindowConfig>();
    for (    String pid : portalURL.getPortletIds()) {
      portlets.add(PortletWindowConfig.fromId(pid));
    }
    for (    PortletWindowConfig config : portlets) {
      PortletWindow window=new PortletWindowImpl(container,config,portalURL);
      if (portletNames != null) {
        for (        String portlet : portletNames) {
          if (portlet.equals(config.getId())) {
            doEvent(container,window,event,request,response);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public void processEvents(PortletContainer container,PortletWindow portletWindow,HttpServletRequest request,HttpServletResponse response,List<Event> events){
  ServletContext containerServletContext=PortalRequestContext.getContext(request).getServletContext();
  DriverConfiguration driverConfig=(DriverConfiguration)containerServletContext.getAttribute(AttributeKeys.DRIVER_CONFIG);
  PortalURL portalURL=PortalRequestContext.getContext(request).createPortalURL();
  for (  Event event : events) {
    List<String> portletNames=getAllPortletsRegisteredForEvent(event,driverConfig,containerServletContext);
    Collection<PortletWindowConfig> portlets=new ArrayList<PortletWindowConfig>();
    for (    String pid : portalURL.getPortletIds()) {
      portlets.add(PortletWindowConfig.fromId(pid));
    }
    for (    PortletWindowConfig config : portlets) {
      PortletWindow window=new PortletWindowImpl(container,config,portalURL);
      if (portletNames != null) {
        for (        String portlet : portletNames) {
          if (portlet.equals(config.getId())) {
            doEvent(container,window,event,request,response);
          }
        }
      }
    }
  }
}
Program: 90623
Project: 90623
Buggy source:
public PortletRequestContextImpl(PortletContainer container,HttpServletRequest containerRequest,HttpServletResponse containerResponse,PortletWindow window,boolean useRequestParameters){
  this.container=container;
  this.containerRequest=containerRequest;
  this.containerResponse=containerResponse;
  this.window=window;
  this.url=PortalRequestContext.getContext(containerRequest).createPortalURL();
  this.paramFactory=new PortletParameterFactory(url);
}

Fixed version (ground truth):
public PortletRequestContextImpl(PortletContainer container,HttpServletRequest containerRequest,HttpServletResponse containerResponse,PortletWindow window,boolean useRequestParameters){
  this.container=container;
  this.containerRequest=containerRequest;
  this.containerResponse=containerResponse;
  this.window=window;
  this.url=PortalRequestContext.getContext(containerRequest).createPortalURL();
  this.paramFactory=url.getPortletParameterFactory();
}
Program: 90624
Project: 90624
Buggy source:
public void addPublicRenderParameter(QName qn,String identifier,String[] values){
  LOGGER.debug("String_Node_Str" + qn.toString() + "String_Node_Str"+ identifier+ "String_Node_Str"+ Arrays.toString(values));
  portletURLProvider.addPublicRenderParameter(qn,identifier,values);
}

Fixed version (ground truth):
public void addPublicRenderParameter(QName qn,String identifier,String[] values){
  if (isDebug) {
    StringBuilder txt=new StringBuilder("String_Node_Str");
    txt.append(qn.toString()).append("String_Node_Str").append(identifier).append("String_Node_Str").append(Arrays.toString(values));
    LOGGER.debug(txt.toString());
  }
  portletURLProvider.addPublicRenderParameter(qn,identifier,values);
}
Program: 90625
Project: 90625
Buggy source:
public void removePublicRenderParameter(QName qn,String id){
  LOGGER.debug("String_Node_Str" + qn.toString());
  portletURLProvider.removePublicRenderParameter(qn,id);
}

Fixed version (ground truth):
public void removePublicRenderParameter(QName qn,String id){
  if (isDebug) {
    LOGGER.debug("String_Node_Str" + qn.toString());
  }
  portletURLProvider.removePublicRenderParameter(qn,id);
}