nus-yam/ex-repair huggingface dataset:
Program: 90518
Project: 90518
Buggy source:
/** 
 * Returns the portlet session. <p> Note that since portlet request instance is created everytime the portlet container receives an incoming request, the portlet session instance held by the request instance is also re-created for each incoming request. </p>
 */
@Override public PortletSession getPortletSession(boolean create){
  return requestContext.getPortletSession(true);
}

Fixed version (ground truth):
/** 
 * Returns the portlet session. <p> Note that since portlet request instance is created everytime the portlet container receives an incoming request, the portlet session instance held by the request instance is also re-created for each incoming request. </p>
 */
@Override public PortletSession getPortletSession(boolean create){
  return requestContext.getPortletSession(create);
}
Program: 90519
Project: 90519
Buggy source:
/** 
 * Checks if the specified content type is valid (supported by the portlet). The specified content type should be a tripped mime type without any character encoding suffix.
 * @param contentType  the content type to check.
 * @return true if the content type is valid, false otherwise.
 */
protected boolean isValidContentType(String contentType){
  boolean valid=false;
  for (  String supportedType : getResponseContentTypes()) {
    if (supportedType.equals(contentType)) {
      valid=true;
    }
 else     if (supportedType.indexOf("String_Node_Str") >= 0) {
      int index=supportedType.indexOf("String_Node_Str");
      String supportedPrefix=supportedType.substring(0,index);
      String supportedSuffix=supportedType.substring(index + 1);
      index=contentType.indexOf("String_Node_Str");
      String typePrefix=contentType.substring(0,index);
      String typeSuffix=contentType.substring(index + 1);
      if (supportedPrefix.equals("String_Node_Str") || supportedPrefix.equals(typePrefix)) {
        if (supportedSuffix.equals("String_Node_Str") || supportedSuffix.equals(typeSuffix)) {
          valid=true;
        }
      }
    }
  }
  return valid;
}

Fixed version (ground truth):
/** 
 * Checks if the specified content type is valid (supported by the portlet). The specified content type should be a tripped mime type without any character encoding suffix.
 * @param contentType the content type to check.
 * @return true if the content type is valid, false otherwise.
 */
protected boolean isValidContentType(String contentType){
}
Program: 90520
Project: 90520
Buggy source:
@Override public void setContentType(String contentType){
  ArgumentUtility.validateNotNull("String_Node_Str",contentType);
  int index=contentType.indexOf(';');
  if (index != -1) {
    contentType=contentType.substring(0,index);
  }
  contentType=contentType.trim();
  if (!isValidContentType(contentType)) {
    throw new IllegalArgumentException("String_Node_Str" + contentType + "String_Node_Str");
  }
  super.setContentType(contentType);
}

Fixed version (ground truth):
@Override public void setContentType(String contentType){
  ArgumentUtility.validateNotNull("String_Node_Str",contentType);
  contentType=contentType.replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
  if (!isValidContentType(contentType)) {
    throw new IllegalArgumentException("String_Node_Str" + contentType + "String_Node_Str");
  }
  super.setContentType(contentType);
}
Program: 90521
Project: 90521
Buggy source:
@RenderMode(name="String_Node_Str") public void doView(RenderRequest portletReq,RenderResponse portletResp) throws PortletException, IOException {
  PrintWriter writer=portletResp.getWriter();
  ModuleTestCaseDetails tcd=new ModuleTestCaseDetails();
  RenderParameters renderParams=portletReq.getRenderParameters();
  if (renderParams.getValue("String_Node_Str") != null && renderParams.getValue("String_Node_Str").equals("String_Node_Str")) {
    TestResult result=tcd.getTestResultFailed(V3RENDERSTATETESTS_SPEC2_12_MUTABLERENDERSTATE_SETPORTLETMODE2);
    if (portletReq.getPortletMode().equals(new PortletMode("String_Node_Str"))) {
      result.setTcSuccess(true);
    }
 else {
      result.appendTcDetail("String_Node_Str" + portletReq.getPortletMode().toString());
    }
    result.writeTo(writer);
  }
}

Fixed version (ground truth):
@RenderMode(name="String_Node_Str") public void doView(RenderRequest portletReq,RenderResponse portletResp) throws PortletException, IOException {
  PrintWriter writer=portletResp.getWriter();
  ModuleTestCaseDetails tcd=new ModuleTestCaseDetails();
  RenderParameters renderParams=portletReq.getRenderParameters();
  if (renderParams.getValue("String_Node_Str") != null && renderParams.getValue("String_Node_Str").equals("String_Node_Str")) {
    TestResult result=tcd.getTestResultFailed(V3RENDERSTATETESTS_SPEC2_12_MUTABLERENDERSTATE_SETPORTLETMODE2);
    if (portletReq.getPortletMode().equals(new PortletMode("String_Node_Str"))) {
      result.setTcSuccess(true);
    }
 else {
      result.appendTcDetail("String_Node_Str" + portletReq.getPortletMode().toString());
    }
    result.writeTo(writer);
  }
  if (renderParams.getValue("String_Node_Str") != null && renderParams.getValue("String_Node_Str").equals("String_Node_Str")) {
    TestResult result=tcd.getTestResultFailed(V3RENDERSTATETESTS_SPEC2_12_MUTABLERENDERSTATE_SETWINDOWSTATE2);
    if (portletReq.getWindowState().equals(new WindowState("String_Node_Str"))) {
      result.setTcSuccess(true);
    }
 else {
      result.appendTcDetail("String_Node_Str" + portletReq.getWindowState().toString());
    }
    result.writeTo(writer);
  }
}
Program: 90523
Project: 90523
Buggy source:
/** 
 * Producer method for the resource parameters.
 */
@Produces @PortletRequestScoped @Named("String_Node_Str") public static ResourceParameters getResourceParameters(){
}

Fixed version (ground truth):
/** 
 * Producer method for the resource parameters.
 */
@Produces @PortletRequestScoped @Named("String_Node_Str") @Typed(ResourceParameters.class) public static ResourceParameters getResourceParameters(){
}
Program: 90524
Project: 90524
Buggy source:
/** 
 * Producer method for the action parameters.
 */
@Produces @PortletRequestScoped @Named("String_Node_Str") public static ActionParameters getActionParameters(){
}

Fixed version (ground truth):
/** 
 * Producer method for the action parameters.
 */
@Produces @PortletRequestScoped @Named("String_Node_Str") @Typed(ActionParameters.class) public static ActionParameters getActionParameters(){
}
Program: 90525
Project: 90525
Buggy source:
/** 
 * Producer method for the render paramters.
 */
@Produces @PortletRequestScoped @Named("String_Node_Str") public static RenderParameters getRenderParameters(){
}

Fixed version (ground truth):
/** 
 * Producer method for the render paramters.
 */
@Produces @PortletRequestScoped @Named("String_Node_Str") @Typed(RenderParameters.class) public static RenderParameters getRenderParameters(){
}
Program: 90526
Project: 90526
Buggy source:
/** 
 * Producer method for the mutable render parameters.
 */
@Produces @PortletRequestScoped @Named("String_Node_Str") public static MutableRenderParameters getMutableRenderParameters(){
}

Fixed version (ground truth):
/** 
 * Producer method for the mutable render parameters.
 */
@Produces @PortletRequestScoped @Named("String_Node_Str") @Typed(MutableRenderParameters.class) public static MutableRenderParameters getMutableRenderParameters(){
}
Program: 90528
Project: 90528
Buggy source:
@Override public void render(RenderRequest portletReq,RenderResponse portletResp) throws PortletException, IOException {
  PrintWriter writer=portletResp.getWriter();
  String msg=(String)portletReq.getPortletSession().getAttribute(RESULT_ATTR_PREFIX + V2DISPATCHERTESTS3S_SPEC2_19_FORWARDJSPRESOURCE_DISPATCH4,APPLICATION_SCOPE);
  if (msg == null) {
    writer.write("String_Node_Str");
    PortletURL purl=portletResp.createRenderURL();
    TestLink tl=new TestLink(V2DISPATCHERTESTS3S_SPEC2_19_FORWARDJSPRESOURCE_DISPATCH4,purl);
    tl.writeTo(writer);
    writer.write("String_Node_Str");
    ResourceURL resurl=portletResp.createResourceURL();
    resurl.setCacheability(PAGE);
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str" + resurl.toString() + "String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
  }
 else {
    portletReq.getPortletSession().removeAttribute(RESULT_ATTR_PREFIX + V2DISPATCHERTESTS3S_SPEC2_19_FORWARDJSPRESOURCE_DISPATCH4,APPLICATION_SCOPE);
    writer.write("String_Node_Str" + msg + "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void render(RenderRequest portletReq,RenderResponse portletResp) throws PortletException, IOException {
  PrintWriter writer=portletResp.getWriter();
  String msg=(String)portletReq.getPortletSession().getAttribute(RESULT_ATTR_PREFIX + V2DISPATCHERTESTS3S_SPEC2_19_FORWARDJSPRESOURCE_DISPATCH4,APPLICATION_SCOPE);
  if (msg == null) {
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    ResourceURL resurl=portletResp.createResourceURL();
    resurl.setCacheability(PAGE);
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str" + resurl.toString() + "String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
  }
 else {
    portletReq.getPortletSession().removeAttribute(RESULT_ATTR_PREFIX + V2DISPATCHERTESTS3S_SPEC2_19_FORWARDJSPRESOURCE_DISPATCH4,APPLICATION_SCOPE);
    writer.write("String_Node_Str" + msg + "String_Node_Str");
  }
}
Program: 90529
Project: 90529
Buggy source:
@Override public void processAction(ActionRequest portletReq,ActionResponse portletResp) throws PortletException, IOException {
  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
  new StringWriter();
}

Fixed version (ground truth):
@Override public void processAction(ActionRequest portletReq,ActionResponse portletResp) throws PortletException, IOException {
  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
}
Program: 90530
Project: 90530
Buggy source:
@Override public void render(RenderRequest portletReq,RenderResponse portletResp) throws PortletException, IOException {
  PrintWriter writer=portletResp.getWriter();
  String msg=(String)portletReq.getPortletSession().getAttribute(RESULT_ATTR_PREFIX + V2DISPATCHERTESTS3S_SPEC2_19_FORWARDSERVLETRESOURCE_DISPATCH4,APPLICATION_SCOPE);
  if (msg == null) {
    writer.write("String_Node_Str");
    PortletURL purl=portletResp.createRenderURL();
    TestLink tl=new TestLink(V2DISPATCHERTESTS3S_SPEC2_19_FORWARDSERVLETRESOURCE_DISPATCH4,purl);
    tl.writeTo(writer);
    writer.write("String_Node_Str");
    ResourceURL resurl=portletResp.createResourceURL();
    resurl.setCacheability(PAGE);
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str" + resurl.toString() + "String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
  }
 else {
    portletReq.getPortletSession().removeAttribute(RESULT_ATTR_PREFIX + V2DISPATCHERTESTS3S_SPEC2_19_FORWARDSERVLETRESOURCE_DISPATCH4,APPLICATION_SCOPE);
    writer.write("String_Node_Str" + msg + "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void render(RenderRequest portletReq,RenderResponse portletResp) throws PortletException, IOException {
  PrintWriter writer=portletResp.getWriter();
  String msg=(String)portletReq.getPortletSession().getAttribute(RESULT_ATTR_PREFIX + V2DISPATCHERTESTS3S_SPEC2_19_FORWARDSERVLETRESOURCE_DISPATCH4,APPLICATION_SCOPE);
  if (msg == null) {
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    ResourceURL resurl=portletResp.createResourceURL();
    resurl.setCacheability(PAGE);
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str" + resurl.toString() + "String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
  }
 else {
    portletReq.getPortletSession().removeAttribute(RESULT_ATTR_PREFIX + V2DISPATCHERTESTS3S_SPEC2_19_FORWARDSERVLETRESOURCE_DISPATCH4,APPLICATION_SCOPE);
    writer.write("String_Node_Str" + msg + "String_Node_Str");
  }
}
Program: 90531
Project: 90531
Buggy source:
protected void processTCKReq(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortletRequest portletReq=(PortletRequest)request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  Thread.currentThread().getId();
  portletReq.getAttribute(THREADID_ATTR);
  new StringWriter();
  new JSR286DispatcherTestCaseDetails();
}

Fixed version (ground truth):
protected void processTCKReq(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortletRequest portletReq=(PortletRequest)request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  Thread.currentThread().getId();
  portletReq.getAttribute(THREADID_ATTR);
}
Program: 90532
Project: 90532
Buggy source:
protected void processTCKReq(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortletRequest portletReq=(PortletRequest)request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  Thread.currentThread().getId();
  portletReq.getAttribute(THREADID_ATTR);
  new StringWriter();
  new JSR286DispatcherTestCaseDetails();
}

Fixed version (ground truth):
protected void processTCKReq(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortletRequest portletReq=(PortletRequest)request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  Thread.currentThread().getId();
  portletReq.getAttribute(THREADID_ATTR);
}
Program: 90533
Project: 90533
Buggy source:
protected void processTCKReq(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortletRequest portletReq=(PortletRequest)request.getAttribute("String_Node_Str");
  PortletResponse portletResp=(PortletResponse)request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  Thread.currentThread().getId();
  portletReq.getAttribute(THREADID_ATTR);
  ((MimeResponse)portletResp).getWriter();
  new JSR286DispatcherTestCaseDetails();
}

Fixed version (ground truth):
protected void processTCKReq(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortletResponse portletResp=(PortletResponse)request.getAttribute("String_Node_Str");
  PrintWriter writer=((MimeResponse)portletResp).getWriter();
  PortletURL purl=((MimeResponse)portletResp).createRenderURL();
  TestLink tl=new TestLink(V2DISPATCHERTESTS3S_SPEC2_19_FORWARDSERVLETRENDER_DISPATCH4,purl);
  tl.writeTo(writer);
}
Program: 90534
Project: 90534
Buggy source:
protected void processTCKReq(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortletRequest portletReq=(PortletRequest)request.getAttribute("String_Node_Str");
  PortletResponse portletResp=(PortletResponse)request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  Thread.currentThread().getId();
  portletReq.getAttribute(THREADID_ATTR);
  ((MimeResponse)portletResp).getWriter();
  new JSR286DispatcherTestCaseDetails();
}

Fixed version (ground truth):
protected void processTCKReq(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortletRequest portletReq=(PortletRequest)request.getAttribute("String_Node_Str");
  PortletResponse portletResp=(PortletResponse)request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  Thread.currentThread().getId();
  portletReq.getAttribute(THREADID_ATTR);
  PrintWriter writer=((MimeResponse)portletResp).getWriter();
  PortletURL purl=((MimeResponse)portletResp).createRenderURL();
  TestLink tl=new TestLink(V2DISPATCHERTESTS3S_SPEC2_19_FORWARDSERVLETRESOURCE_DISPATCH4,purl);
  tl.writeTo(writer);
}
Program: 90535
Project: 90535
Buggy source:
protected void processTCKReq(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortletRequest portletReq=(PortletRequest)request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  Thread.currentThread().getId();
  portletReq.getAttribute(THREADID_ATTR);
  new StringWriter();
  new JSR286DispatcherTestCaseDetails();
}

Fixed version (ground truth):
protected void processTCKReq(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortletRequest portletReq=(PortletRequest)request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  Thread.currentThread().getId();
  portletReq.getAttribute(THREADID_ATTR);
}
Program: 90536
Project: 90536
Buggy source:
protected void processTCKReq(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortletRequest portletReq=(PortletRequest)request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  Thread.currentThread().getId();
  portletReq.getAttribute(THREADID_ATTR);
  new StringWriter();
  new JSR286DispatcherTestCaseDetails();
}

Fixed version (ground truth):
protected void processTCKReq(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortletRequest portletReq=(PortletRequest)request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  Thread.currentThread().getId();
  portletReq.getAttribute(THREADID_ATTR);
}
Program: 90537
Project: 90537
Buggy source:
protected void processTCKReq(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortletRequest portletReq=(PortletRequest)request.getAttribute("String_Node_Str");
  PortletResponse portletResp=(PortletResponse)request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  Thread.currentThread().getId();
  portletReq.getAttribute(THREADID_ATTR);
  ((MimeResponse)portletResp).getWriter();
  new JSR286DispatcherTestCaseDetails();
}

Fixed version (ground truth):
protected void processTCKReq(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortletRequest portletReq=(PortletRequest)request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  request.getAttribute("String_Node_Str");
  Thread.currentThread().getId();
  portletReq.getAttribute(THREADID_ATTR);
  new JSR286DispatcherTestCaseDetails();
}
Program: 90538
Project: 90538
Buggy source:
@Override public int doStartTag() throws JspException {
  Object obj=pageContext.getRequest().getAttribute(Constants.PORTLET_RESPONSE);
  if ((obj == null) || !(obj instanceof MimeResponse)) {
    throw new JspException("String_Node_Str");
  }
  MimeResponse resp=(MimeResponse)obj;
  ActionURL aurl=null;
  if (getCopyCurrentRenderParameters() == true) {
    aurl=resp.createActionURL(Copy.ALL);
  }
 else {
    aurl=resp.createActionURL(Copy.NONE);
  }
  rparams=aurl.getRenderParameters();
  aparams=aurl.getActionParameters();
  setUrl(aurl);
  handlePMandWS();
  handleDefaultEscapeXML();
  handleSecureFlag();
  return EVAL_BODY_INCLUDE;
}

Fixed version (ground truth):
@Override public int doStartTag() throws JspException {
  Object obj=pageContext.getRequest().getAttribute(Constants.PORTLET_RESPONSE);
  if ((obj == null) || !(obj instanceof MimeResponse)) {
    throw new JspException("String_Node_Str");
  }
  MimeResponse resp=(MimeResponse)obj;
  ActionURL aurl=null;
  if (isCopyCurrentRenderParameters() == true) {
    aurl=resp.createActionURL(Copy.ALL);
  }
 else {
    aurl=resp.createActionURL(Copy.NONE);
  }
  rparams=aurl.getRenderParameters();
  aparams=aurl.getActionParameters();
  setUrl(aurl);
  handlePMandWS();
  handleDefaultEscapeXML();
  handleSecureFlag();
  return EVAL_BODY_INCLUDE;
}
Program: 90539
Project: 90539
Buggy source:
/** 
 * Sets the escapeXml property.
 * @param escapeXml
 * @return void
 */
public void setEscapeXml(Boolean escapeXml){
  this.escapeXml=escapeXml;
}

Fixed version (ground truth):
/** 
 * Sets the escapeXml property.
 * @param escapeXml
 * @return void
 */
public void setEscapeXml(String escapeXml){
  this.escapeXml=escapeXml;
}
Program: 90540
Project: 90540
Buggy source:
/** 
 * Sets the secure flag on the URl as required
 * @throws JspException
 */
protected void handleSecureFlag() throws JspException {
  BaseURL url=getUrl();
  if (url == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (var != null) {
    pageContext.removeAttribute(var,PageContext.PAGE_SCOPE);
  }
  if (secure != null) {
    try {
      url.setSecure(getSecureBoolean());
    }
 catch (    PortletSecurityException e) {
    }
  }
}

Fixed version (ground truth):
/** 
 * Sets the secure flag on the URl as required
 * @throws JspException
 */
protected void handleSecureFlag() throws JspException {
  BaseURL url=getUrl();
  if (secure != null && !secure.equalsIgnoreCase("String_Node_Str") && !secure.equalsIgnoreCase("String_Node_Str")) {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str").append(secure);
    txt.append("String_Node_Str");
    throw new JspException(txt.toString());
  }
  if (url == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (var != null) {
    pageContext.removeAttribute(var,PageContext.PAGE_SCOPE);
  }
  if (secure != null) {
    try {
      url.setSecure(isSecure());
    }
 catch (    PortletSecurityException e) {
    }
  }
}
Program: 90541
Project: 90541
Buggy source:
@Override public int doEndTag() throws JspException {
  BaseURL url=getUrl();
  if (url == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  setUrlParameters(url);
  setUrlProperties(url);
  HttpServletResponse response=(HttpServletResponse)pageContext.getResponse();
  String urlString=response.encodeURL(url.toString());
  if (escapeXml) {
    urlString=doEscapeXml(urlString);
  }
  if (var == null) {
    try {
      JspWriter writer=pageContext.getOut();
      writer.print(urlString);
    }
 catch (    IOException ioe) {
      throw new JspException("String_Node_Str");
    }
  }
 else {
    pageContext.setAttribute(var,urlString,PageContext.PAGE_SCOPE);
  }
  propertiesMap.clear();
  parametersMap.clear();
  removedParametersList.clear();
  setUrl(null);
  return EVAL_PAGE;
}

Fixed version (ground truth):
@Override public int doEndTag() throws JspException {
  BaseURL url=getUrl();
  if (url == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  setUrlParameters(url);
  setUrlProperties(url);
  HttpServletResponse response=(HttpServletResponse)pageContext.getResponse();
  String urlString=response.encodeURL(url.toString());
  if (Boolean.parseBoolean(escapeXml)) {
    urlString=doEscapeXml(urlString);
  }
  if (var == null) {
    try {
      JspWriter writer=pageContext.getOut();
      writer.print(urlString);
    }
 catch (    IOException ioe) {
      throw new JspException("String_Node_Str");
    }
  }
 else {
    pageContext.setAttribute(var,urlString,PageContext.PAGE_SCOPE);
  }
  propertiesMap.clear();
  parametersMap.clear();
  removedParametersList.clear();
  setUrl(null);
  return EVAL_PAGE;
}
Program: 90542
Project: 90542
Buggy source:
@Override public int doStartTag() throws JspException {
  handleSecureFlag();
  return EVAL_BODY_INCLUDE;
}

Fixed version (ground truth):
@Override public int doStartTag() throws JspException {
  handleSecureFlag();
  if (escapeXml != null && !escapeXml.equalsIgnoreCase("String_Node_Str") && !escapeXml.equalsIgnoreCase("String_Node_Str")) {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str").append(escapeXml);
    txt.append("String_Node_Str");
    throw new JspException(txt.toString());
  }
  return EVAL_BODY_INCLUDE;
}
Program: 90543
Project: 90543
Buggy source:
/** 
 * Returns escapeXml property.
 * @return Boolean
 */
public Boolean getEscapeXml(){
  return escapeXml;
}

Fixed version (ground truth):
/** 
 * Returns escapeXml property.
 * @return Boolean
 */
public String getEscapeXml(){
  return escapeXml;
}
Program: 90544
Project: 90544
Buggy source:
@Override public int doStartTag() throws JspException {
  handleDefaultEscapeXML();
  return super.doStartTag();
}

Fixed version (ground truth):
@Override public int doStartTag() throws JspException {
  handleDefaultEscapeXML();
  if (copyCurrentRenderParameters != null && !copyCurrentRenderParameters.equalsIgnoreCase("String_Node_Str") && !copyCurrentRenderParameters.equalsIgnoreCase("String_Node_Str")) {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str").append(copyCurrentRenderParameters);
    txt.append("String_Node_Str");
    throw new JspException(txt.toString());
  }
  return super.doStartTag();
}
Program: 90545
Project: 90545
Buggy source:
/** 
 * Sets copyCurrentRenderParameters property.
 * @param copyCurrentRenderParameters
 * @return void
 */
public void setCopyCurrentRenderParameters(Boolean copyCurrentRenderParameters){
  this.copyCurrentRenderParameters=copyCurrentRenderParameters;
}

Fixed version (ground truth):
/** 
 * Sets copyCurrentRenderParameters property.
 * @param copyCurrentRenderParameters
 * @return void
 */
public void setCopyCurrentRenderParameters(String copyCurrentRenderParameters){
  this.copyCurrentRenderParameters=copyCurrentRenderParameters;
}
Program: 90546
Project: 90546
Buggy source:
public PortletURLTag286(){
  super();
  this.escapeXml=true;
}

Fixed version (ground truth):
public PortletURLTag286(){
  super();
  setEscapeXml(Boolean.TRUE.toString());
}
Program: 90547
Project: 90547
Buggy source:
protected void handleDefaultEscapeXML(){
  PortletConfig portletConfig=(PortletConfig)pageContext.getRequest().getAttribute(Constants.PORTLET_CONFIG);
  Map<String,String[]> containerRuntimeOptions=portletConfig.getContainerRuntimeOptions();
  if (containerRuntimeOptions != null) {
    String[] result=containerRuntimeOptions.get(Constants.ESCAPE_XML_RUNTIME_OPTION);
    if (result != null) {
      if (result.length > 0) {
        escapeXml=Boolean.parseBoolean(result[0]);
      }
    }
  }
}

Fixed version (ground truth):
protected void handleDefaultEscapeXML(){
  PortletConfig portletConfig=(PortletConfig)pageContext.getRequest().getAttribute(Constants.PORTLET_CONFIG);
  Map<String,String[]> containerRuntimeOptions=portletConfig.getContainerRuntimeOptions();
  if (containerRuntimeOptions != null) {
    String[] result=containerRuntimeOptions.get(Constants.ESCAPE_XML_RUNTIME_OPTION);
    if (result != null) {
      if (result.length > 0) {
        setEscapeXml(result[0]);
      }
    }
  }
}
Program: 90548
Project: 90548
Buggy source:
/** 
 * Returns the copyCurrentRenderParameters property.
 * @return Boolean
 */
public Boolean getCopyCurrentRenderParameters(){
  return copyCurrentRenderParameters;
}

Fixed version (ground truth):
/** 
 * Returns the copyCurrentRenderParameters property.
 * @return Boolean
 */
public String getCopyCurrentRenderParameters(){
  return copyCurrentRenderParameters;
}
Program: 90549
Project: 90549
Buggy source:
@Override public int doEndTag() throws JspException {
  if (copyCurrentRenderParameters) {
    doCopyCurrentRenderParameters();
  }
  return super.doEndTag();
}

Fixed version (ground truth):
@Override public int doEndTag() throws JspException {
  if (Boolean.parseBoolean(copyCurrentRenderParameters)) {
    doCopyCurrentRenderParameters();
  }
  return super.doEndTag();
}
Program: 90550
Project: 90550
Buggy source:
@Override public int doStartTag() throws JspException {
  Object obj=pageContext.getRequest().getAttribute(Constants.PORTLET_RESPONSE);
  if ((obj == null) || !(obj instanceof MimeResponse)) {
    throw new JspException("String_Node_Str");
  }
  MimeResponse resp=(MimeResponse)obj;
  RenderURL rurl=null;
  if (getCopyCurrentRenderParameters() == true) {
    rurl=resp.createRenderURL(Copy.ALL);
  }
 else {
    rurl=resp.createRenderURL(Copy.NONE);
  }
  params=rurl.getRenderParameters();
  setUrl(rurl);
  handlePMandWS();
  handleDefaultEscapeXML();
  handleSecureFlag();
  return EVAL_BODY_INCLUDE;
}

Fixed version (ground truth):
@Override public int doStartTag() throws JspException {
  Object obj=pageContext.getRequest().getAttribute(Constants.PORTLET_RESPONSE);
  if ((obj == null) || !(obj instanceof MimeResponse)) {
    throw new JspException("String_Node_Str");
  }
  MimeResponse resp=(MimeResponse)obj;
  RenderURL rurl=null;
  if (isCopyCurrentRenderParameters() == true) {
    rurl=resp.createRenderURL(Copy.ALL);
  }
 else {
    rurl=resp.createRenderURL(Copy.NONE);
  }
  params=rurl.getRenderParameters();
  setUrl(rurl);
  handlePMandWS();
  handleDefaultEscapeXML();
  handleSecureFlag();
  return EVAL_BODY_INCLUDE;
}
Program: 90553
Project: 90553
Buggy source:
private static void init(ServletContext servletContext){
  try {
    InputStream in=servletContext.getResourceAsStream(ResourceConfigReader.CONFIG_FILE);
    resourceConfig=ResourceConfigReader.getFactory().parse(in);
    resourceConfig.traceConfig();
  }
 catch (  Exception e) {
    throw new DriverConfigurationException(e);
  }
}

Fixed version (ground truth):
private static void init(ServletContext servletContext){
  try {
    InputStream in=servletContext.getResourceAsStream(ResourceConfigReader.CONFIG_FILE);
    resourceConfig=ResourceConfigReader.getFactory().parse(in);
    resourceConfig.initialized();
  }
 catch (  Exception e) {
    throw new DriverConfigurationException(e);
  }
}
Program: 90554
Project: 90554
Buggy source:
public void addResource(PageResourceId id,Type type,String source){
  if (id.getName() != null && id.getScope() != null && type != null && id.getVersion() != null && source != null) {
    resources.put(id,new Source(type,source));
  }
 else {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str");
    txt.append("String_Node_Str").append(id.toString());
    txt.append("String_Node_Str").append((type == null) ? "String_Node_Str" : type.toString());
    txt.append("String_Node_Str").append(source);
    LOG.warn(txt.toString());
  }
  if (isDebug) {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str");
    txt.append("String_Node_Str").append(id.toString());
    txt.append("String_Node_Str").append((type == null) ? "String_Node_Str" : type.toString());
    txt.append("String_Node_Str").append(source);
    LOG.debug(txt.toString());
  }
}

Fixed version (ground truth):
/** 
 * adds a resource
 */
public void addResource(PageResourceId id,Type type,String source){
  if (id.getName() != null && id.getScope() != null && type != null && id.getVersion() != null && source != null) {
    resources.put(id,new Source(type,source));
  }
 else {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str");
    txt.append("String_Node_Str").append(id.toString());
    txt.append("String_Node_Str").append((type == null) ? "String_Node_Str" : type.toString());
    txt.append("String_Node_Str").append(source);
    LOG.warn(txt.toString());
  }
  if (isDebug) {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str");
    txt.append("String_Node_Str").append(id.toString());
    txt.append("String_Node_Str").append((type == null) ? "String_Node_Str" : type.toString());
    txt.append("String_Node_Str").append(source);
    LOG.debug(txt.toString());
  }
}
Program: 90556
Project: 90556
Buggy source:
/** 
 * checks if class name is valid by trying to load it. If the optional argument <code>assignable</code> is provided, the method will check if the class can be assigned.
 * @param clsName Class name string from configuration
 * @param assignable Interface to which the class should be assignable
 * @param msg Error message used when exception is thrown.
 */
protected void checkValidClass(String clsName,Class<?> assignable,String msg){
  StringBuilder txt=new StringBuilder(128);
  txt.append(msg).append("String_Node_Str");
  txt.append(clsName);
  if (!isValidIdentifier(clsName)) {
    txt.append("String_Node_Str");
    LOG.warn(txt.toString());
    throw new IllegalArgumentException(txt.toString());
  }
  Class<?> valClass=null;
  try {
    ClassLoader cl=Thread.currentThread().getContextClassLoader();
    if (cl == null) {
      cl=this.getClass().getClassLoader();
    }
    valClass=cl.loadClass(clsName);
    if (assignable != null && !assignable.isAssignableFrom(valClass)) {
      txt.append("String_Node_Str");
      txt.append(assignable.getCanonicalName());
      throw new Exception();
    }
  }
 catch (  Exception e) {
    LOG.warn(txt.toString());
    throw new IllegalArgumentException(txt.toString(),e);
  }
}

Fixed version (ground truth):
/** 
 * checks if class name is valid by trying to load it. If the optional argument <code>assignable</code> is provided, the method will check if the class can be assigned.
 * @param clsName Class name string from configuration
 * @param assignable Interface to which the class should be assignable
 * @param msg Error message used when exception is thrown.
 */
protected void checkValidClass(String clsName,Class<?> assignable,String msg){
  StringBuilder txt=new StringBuilder(128);
  txt.append(msg).append("String_Node_Str");
  txt.append(clsName);
  if (!isValidIdentifier(clsName)) {
    txt.append("String_Node_Str");
    LOG.warn(txt.toString());
    throw new IllegalArgumentException(txt.toString());
  }
  Class<?> valClass=null;
  try {
    ClassLoader cl=Thread.currentThread().getContextClassLoader();
    if (cl == null) {
      cl=this.getClass().getClassLoader();
    }
    valClass=cl.loadClass(clsName);
    if (assignable != null && !assignable.isAssignableFrom(valClass)) {
      txt.append("String_Node_Str");
      txt.append(assignable.getCanonicalName());
      throw new Exception();
    }
  }
 catch (  Exception e) {
    txt.append("String_Node_Str").append(e.toString());
    if (isDebug) {
      StringWriter sw=new StringWriter();
      PrintWriter pw=new PrintWriter(sw);
      e.printStackTrace(pw);
      pw.flush();
      txt.append("String_Node_Str").append(sw.toString());
    }
    LOG.warn(txt.toString());
    throw new IllegalArgumentException(txt.toString(),e);
  }
}
Program: 90557
Project: 90557
Buggy source:
public EventProviderImpl(PortletWindow portletWindow,PortletRegistryService portletRegistry){
  this.portletWindow=portletWindow;
  this.portletRegistry=portletRegistry;
}

Fixed version (ground truth):
public EventProviderImpl(PortletWindow portletWindow,PortletRegistryService portletRegistry){
  this.portletWindow=portletWindow;
  this.portletRegistry=portletRegistry;
  if (LOG.isTraceEnabled()) {
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str").append(portletWindow.getId().getStringId());
    LOG.debug(txt.toString());
  }
}
Program: 90559
Project: 90559
Buggy source:
private boolean isValueInstanceOfDefinedClass(QName qname,Serializable value){
  PortletApplicationDefinition app=portletWindow.getPortletDefinition().getApplication();
  List<? extends EventDefinition> events=app.getEventDefinitions();
  if (events != null) {
    for (    EventDefinition def : events) {
      if (def.getQName().equals(qname)) {
        return value.getClass().getName().equals(def.getValueType());
      }
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean isValueInstanceOfDefinedClass(QName qname,Serializable value){
  PortletApplicationDefinition app=portletWindow.getPortletDefinition().getApplication();
  List<? extends EventDefinition> events=app.getEventDefinitions();
  if (events != null) {
    for (    EventDefinition def : events) {
      if (def.getQName().equals(qname)) {
        Class<?> declaredPayload=null;
        try {
          ClassLoader cl=Thread.currentThread().getContextClassLoader();
          if (cl == null) {
            cl=this.getClass().getClassLoader();
          }
          declaredPayload=cl.loadClass(def.getValueType());
          if (!declaredPayload.isAssignableFrom(value.getClass())) {
            StringBuilder txt=new StringBuilder(128);
            txt.append("String_Node_Str");
            txt.append("String_Node_Str").append(value.getClass().getCanonicalName());
            txt.append("String_Node_Str").append(declaredPayload.getCanonicalName());
            LOG.warn(txt.toString());
            return false;
          }
        }
 catch (        Exception e) {
          StringBuilder txt=new StringBuilder(128);
          txt.append("String_Node_Str");
          txt.append("String_Node_Str").append(e.toString());
          StringWriter sw=new StringWriter();
          PrintWriter pw=new PrintWriter(sw);
          e.printStackTrace(pw);
          pw.flush();
          txt.append("String_Node_Str").append(sw.toString());
          LOG.warn(txt.toString());
          return false;
        }
        return true;
      }
    }
  }
  return false;
}
Program: 90560
Project: 90560
Buggy source:
public EventProvider getEventProvider(){
  return isClosed() ? null : new EventProviderImpl(getPortletWindow(),PlutoServices.getServices().getPortletRegistryService());
}

Fixed version (ground truth):
public EventProvider getEventProvider(){
  return isClosed() ? null : eventProviderImpl;
}
Program: 90561
Project: 90561
Buggy source:
public PortletStateAwareResponseContextImpl(PortletContainer container,HttpServletRequest containerRequest,HttpServletResponse containerResponse,PortletWindow window,PortletRequestContext requestContext){
  super(container,containerRequest,containerResponse,window,requestContext);
  this.portletURLProvider=new PortletURLProviderImpl(getPortalURL(),PortletURLProvider.TYPE.RENDER,window,getRequestContext());
  if (isDebug) {
    LOGGER.debug("String_Node_Str");
  }
}

Fixed version (ground truth):
public PortletStateAwareResponseContextImpl(PortletContainer container,HttpServletRequest containerRequest,HttpServletResponse containerResponse,PortletWindow window,PortletRequestContext requestContext){
  super(container,containerRequest,containerResponse,window,requestContext);
  this.portletURLProvider=new PortletURLProviderImpl(getPortalURL(),PortletURLProvider.TYPE.RENDER,window,getRequestContext());
  this.eventProviderImpl=new EventProviderImpl(getPortletWindow(),PlutoServices.getServices().getPortletRegistryService());
  if (isDebug) {
    LOGGER.debug("String_Node_Str");
  }
}
Program: 90562
Project: 90562
Buggy source:
/** 
 * Sets the secure flag on the URl as required
 * @throws JspException
 */
protected void handleSecureFlag() throws JspException {
  BaseURL url=getUrl();
  if (url == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (var != null) {
    pageContext.removeAttribute(var,PageContext.PAGE_SCOPE);
  }
  if (secure != null) {
    try {
      url.setSecure(getSecureBoolean());
    }
 catch (    PortletSecurityException e) {
      throw new JspException(e);
    }
  }
}

Fixed version (ground truth):
/** 
 * Sets the secure flag on the URl as required
 * @throws JspException
 */
protected void handleSecureFlag() throws JspException {
  BaseURL url=getUrl();
  if (url == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (var != null) {
    pageContext.removeAttribute(var,PageContext.PAGE_SCOPE);
  }
  if (secure != null) {
    try {
      url.setSecure(getSecureBoolean());
    }
 catch (    PortletSecurityException e) {
    }
  }
}
Program: 90563
Project: 90563
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: 90564
Project: 90564
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: 90565
Project: 90565
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: 90567
Project: 90567
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: 90568
Project: 90568
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: 90569
Project: 90569
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: 90570
Project: 90570
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: 90571
Project: 90571
Buggy source:
@Override public void processEvent(EventRequest portletReq,EventResponse portletResp) throws PortletException, IOException {
  LOGGER.entering(LOG_CLASS,"String_Node_Str");
  portletResp.setRenderParameters(portletReq);
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
  StringWriter writer=new StringWriter();
  JSR286ApiTestCaseDetails tcd=new JSR286ApiTestCaseDetails();
  ClassChecker cc=new ClassChecker(GenericPortlet.class);
  TestResult tr0=tcd.getTestResultFailed(V2PORTLETTESTS_EVENTPORTLET_APIEVENT_PROCESSEVENT);
  try {
    tr0.setTcSuccess(true);
  }
 catch (  Exception e) {
    tr0.appendTcDetail(e.toString());
  }
  tr0.writeTo(writer);
  portletReq.getPortletSession().setAttribute(Constants.RESULT_ATTR_PREFIX + "String_Node_Str",writer.toString(),APPLICATION_SCOPE);
}

Fixed version (ground truth):
@Override public void processEvent(EventRequest portletReq,EventResponse portletResp) throws PortletException, IOException {
  LOGGER.entering(LOG_CLASS,"String_Node_Str");
  portletResp.setRenderParameters(portletReq);
  long tid=Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR,tid);
  StringWriter writer=new StringWriter();
  JSR286ApiTestCaseDetails tcd=new JSR286ApiTestCaseDetails();
  TestResult tr0=tcd.getTestResultFailed(V2PORTLETTESTS_EVENTPORTLET_APIEVENT_PROCESSEVENT);
  try {
    tr0.setTcSuccess(true);
  }
 catch (  Exception e) {
    tr0.appendTcDetail(e.toString());
  }
  tr0.writeTo(writer);
  portletReq.getPortletSession().setAttribute(Constants.RESULT_ATTR_PREFIX + "String_Node_Str",writer.toString(),APPLICATION_SCOPE);
}
Program: 90572
Project: 90572
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: 90573
Project: 90573
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");
  String val=portletReq.getParameter(BUTTON_PARAM_NAME);
  if (val != null && val.equals(V2PORTLETTESTS_EVENT_APIEVENT_GETVALUE2)) {
    portletResp.setEvent(eventQName,null);
  }
 else {
    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");
  String val=portletReq.getParameter(BUTTON_PARAM_NAME);
  if (val != null && val.equals(V2PORTLETTESTS_EVENT_APIEVENT_GETVALUE2)) {
    portletResp.setEvent(eventQName,null);
  }
 else {
    portletResp.setEvent(eventQName,"String_Node_Str");
  }
}