nus-yam/ex-repair huggingface dataset:
Program: 101194
Project: 101194
Buggy source:
public Collection<SkinConfig> getPortalSkins(String skinName){
  Collection<SkinConfig> test=portalSkins_.values();
  Collection<SkinConfig> result=new ArrayList<SkinConfig>();
  for (  SkinConfig a : test) {
    if (a.getCSSPath().endsWith("String_Node_Str" + skinName))     result.add(a);
  }
  return result;
}

Fixed version (ground truth):
public Collection<SkinConfig> getPortalSkins(String skinName){
  Set<String> keys=portalSkins_.keySet();
  Collection<SkinConfig> portalSkins=new ArrayList<SkinConfig>();
  for (  String key : keys) {
    if (key.endsWith("String_Node_Str" + skinName))     portalSkins.add(portalSkins_.get(key));
  }
  return portalSkins;
}
Program: 101196
Project: 101196
Buggy source:
public void execute(Event<UIPortlet> event) throws Exception {
  UIPortal uiPortal=Util.getUIPortal();
  UIPortalApplication uiApp=uiPortal.getAncestorOfType(UIPortalApplication.class);
  UIMaskWorkspace uiMaskWS=uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
  UIPortlet uiPortlet=event.getSource();
  UIPortletForm uiPortletForm=uiMaskWS.createUIComponent(UIPortletForm.class,null,null);
  uiPortletForm.setValues(uiPortlet);
  uiMaskWS.setWindowSize(800,-1);
  event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWS);
}

Fixed version (ground truth):
public void execute(Event<UIPortlet> event) throws Exception {
  UIPortal uiPortal=Util.getUIPortal();
  UIPortalApplication uiApp=uiPortal.getAncestorOfType(UIPortalApplication.class);
  UIMaskWorkspace uiMaskWS=uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
  uiMaskWS.setUpdated(true);
  UIPortlet uiPortlet=event.getSource();
  UIPortletForm uiPortletForm=uiMaskWS.createUIComponent(UIPortletForm.class,null,null);
  uiPortletForm.setValues(uiPortlet);
  uiMaskWS.setWindowSize(800,-1);
}
Program: 101197
Project: 101197
Buggy source:
public void setUIComponent(UIComponent uicomponent){
  super.setUIComponent(uicomponent);
  this.isShow=(uicomponent != null);
}

Fixed version (ground truth):
public void setUIComponent(UIComponent uicomponent){
  super.setUIComponent(uicomponent);
  setShow(uicomponent != null);
}
Program: 101198
Project: 101198
Buggy source:
public void execute(Event<UIComponent> event) throws Exception {
  UIMaskWorkspace uiMaskWorkspace=null;
  UIComponent uiSource=event.getSource();
  if (uiSource instanceof UIMaskWorkspace) {
    uiMaskWorkspace=(UIMaskWorkspace)uiSource;
  }
 else {
    uiMaskWorkspace=uiSource.getAncestorOfType(UIMaskWorkspace.class);
  }
  if (uiMaskWorkspace == null || !uiMaskWorkspace.isShow())   return;
  uiMaskWorkspace.setUIComponent(null);
  uiMaskWorkspace.setShow(false);
  uiMaskWorkspace.setWindowSize(-1,-1);
  event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
}

Fixed version (ground truth):
public void execute(Event<UIComponent> event) throws Exception {
  UIMaskWorkspace uiMaskWorkspace=null;
  UIComponent uiSource=event.getSource();
  if (uiSource instanceof UIMaskWorkspace) {
    uiMaskWorkspace=(UIMaskWorkspace)uiSource;
  }
 else {
    uiMaskWorkspace=uiSource.getAncestorOfType(UIMaskWorkspace.class);
  }
  if (uiMaskWorkspace == null || !uiMaskWorkspace.isShow())   return;
  uiMaskWorkspace.setUIComponent(null);
  uiMaskWorkspace.setWindowSize(-1,-1);
  event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
}
Program: 101199
Project: 101199
Buggy source:
public void setShow(boolean isShow){
  this.isShow=isShow;
}

Fixed version (ground truth):
public void setShow(boolean bln){
  this.isShow=bln;
  if (bln == false)   isUpdated=false;
}
Program: 101201
Project: 101201
Buggy source:
public void execute(Event<UIIFrameEditMode> event) throws Exception {
  String url=event.getSource().getUIStringInput(FIELD_URL).getValue();
  try {
    new URL(url);
    PortletRequestContext pcontext=(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
    PortletPreferences pref=pcontext.getRequest().getPreferences();
    pref.setValue("String_Node_Str",event.getSource().getUIStringInput(FIELD_URL).getValue());
    pref.store();
    pcontext.setApplicationMode(PortletRequestContext.VIEW_MODE);
  }
 catch (  Exception e) {
    Object[] args={FIELD_URL,"String_Node_Str"};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args));
  }
}

Fixed version (ground truth):
public void execute(Event<UIIFrameEditMode> event) throws Exception {
  String url=event.getSource().getUIStringInput(FIELD_URL).getValue();
  try {
    new URL(url);
    PortletRequestContext pcontext=(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
    PortletPreferences pref=pcontext.getRequest().getPreferences();
    pref.setValue("String_Node_Str",event.getSource().getUIStringInput(FIELD_URL).getValue());
    pref.store();
    pcontext.setApplicationMode(PortletMode.VIEW);
  }
 catch (  Exception e) {
    Object[] args={FIELD_URL,"String_Node_Str"};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args));
  }
}
Program: 101202
Project: 101202
Buggy source:
public UIIFrameEditMode() throws Exception {
  PortletRequestContext pcontext=(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
  PortletPreferences pref=pcontext.getRequest().getPreferences();
  addUIFormInput(new UIFormStringInput(FIELD_URL,FIELD_URL,pref.getValue("String_Node_Str","String_Node_Str")));
}

Fixed version (ground truth):
public UIIFrameEditMode() throws Exception {
  PortletRequestContext pcontext=(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
  PortletPreferences pref=pcontext.getRequest().getPreferences();
  addUIFormInput(new UIFormStringInput(FIELD_URL,FIELD_URL,pref.getValue("String_Node_Str","String_Node_Str")).addValidator(NullFieldValidator.class));
}
Program: 101203
Project: 101203
Buggy source:
public void execute(Event<UIIFrameEditMode> event) throws Exception {
  PortletRequestContext pcontext=(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
  PortletPreferences pref=pcontext.getRequest().getPreferences();
  pref.setValue("String_Node_Str",event.getSource().getUIStringInput(FIELD_URL).getValue());
  pref.store();
  pcontext.setApplicationMode(PortletRequestContext.VIEW_MODE);
}

Fixed version (ground truth):
public void execute(Event<UIIFrameEditMode> event) throws Exception {
  String url=event.getSource().getUIStringInput(FIELD_URL).getValue();
  try {
    new URL(url);
    PortletRequestContext pcontext=(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
    PortletPreferences pref=pcontext.getRequest().getPreferences();
    pref.setValue("String_Node_Str",event.getSource().getUIStringInput(FIELD_URL).getValue());
    pref.store();
    pcontext.setApplicationMode(PortletRequestContext.VIEW_MODE);
  }
 catch (  Exception e) {
    Object[] args={FIELD_URL,"String_Node_Str"};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args));
  }
}
Program: 101204
Project: 101204
Buggy source:
@SuppressWarnings("String_Node_Str") public void decode(Object input,WebuiRequestContext context) throws Exception {
  String val=(String)input;
  if ((val == null || val.length() == 0) && type_ == PASSWORD_TYPE)   return;
  value_=val;
  if (value_ != null && value_.length() == 0)   value_=null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void decode(Object input,WebuiRequestContext context) throws Exception {
  String val=(String)input;
  if (val == null)   return;
  value_=val;
  if (value_ != null && value_.length() == 0)   value_=null;
}
Program: 101205
Project: 101205
Buggy source:
public UIAccountChangePass() throws Exception {
  super();
  addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).setType(UIFormStringInput.PASSWORD_TYPE).addValidator(MandatoryValidator.class));
  addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).setType(UIFormStringInput.PASSWORD_TYPE).addValidator(StringLengthValidator.class,6,30).addValidator(MandatoryValidator.class));
  addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).setType(UIFormStringInput.PASSWORD_TYPE).addValidator(MandatoryValidator.class));
}

Fixed version (ground truth):
public UIAccountChangePass() throws Exception {
  super();
  addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).setType(UIFormStringInput.PASSWORD_TYPE).addValidator(MandatoryValidator.class));
  addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).setType(UIFormStringInput.PASSWORD_TYPE).addValidator(StringLengthValidator.class,6,30).addValidator(MandatoryValidator.class));
  addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).setType(UIFormStringInput.PASSWORD_TYPE).addValidator(StringLengthValidator.class,6,30).addValidator(MandatoryValidator.class));
}
Program: 101206
Project: 101206
Buggy source:
public void init(Writer writer,PortletRequest req,PortletResponse res){
  request_=req;
  response_=res;
  writer_=new HtmlValidator(writer);
  windowId_=req.getWindowID();
  PortletMode mode=req.getPortletMode();
  if (mode.equals(PortletMode.VIEW))   applicationMode_=VIEW_MODE;
 else   if (mode.equals(PortletMode.EDIT))   applicationMode_=EDIT_MODE;
 else   if (mode.equals(PortletMode.HELP))   applicationMode_=HELP_MODE;
 else   applicationMode_=VIEW_MODE;
}

Fixed version (ground truth):
public void init(Writer writer,PortletRequest req,PortletResponse res){
  request_=req;
  response_=res;
  writer_=new HtmlValidator(writer);
}
Program: 101207
Project: 101207
Buggy source:
public PortletRequestContext(WebuiApplication app,Writer writer,PortletRequest req,PortletResponse res){
  super(app);
  init(writer,req,res);
  setSessionId(req.getPortletSession(true).getId());
  urlBuilder=new PortletURLBuilder();
}

Fixed version (ground truth):
public PortletRequestContext(WebuiApplication app,Writer writer,PortletRequest req,PortletResponse res){
  super(app);
  windowId_=req.getWindowID();
  init(writer,req,res);
  setSessionId(req.getPortletSession(true).getId());
  urlBuilder=new PortletURLBuilder();
  PortletMode mode=req.getPortletMode();
  if (mode.equals(PortletMode.VIEW))   applicationMode_=VIEW_MODE;
 else   if (mode.equals(PortletMode.EDIT))   applicationMode_=EDIT_MODE;
 else   if (mode.equals(PortletMode.HELP))   applicationMode_=HELP_MODE;
 else   applicationMode_=VIEW_MODE;
}
Program: 101208
Project: 101208
Buggy source:
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  String s=(String)uiInput.getValue();
  if (s.matches(EMAIL_REGEX))   return;
  throw new MessageException(new ApplicationMessage("String_Node_Str",null));
}

Fixed version (ground truth):
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  String s=(String)uiInput.getValue();
  if (s.matches(EMAIL_REGEX))   return;
  Object[] args={uiInput.getName(),uiInput.getBindingField()};
  throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
}
Program: 101209
Project: 101209
Buggy source:
public void processRender(UIWidget uiWidget,Writer w) throws Exception {
  PortalRequestContext pContext=Util.getPortalRequestContext();
  MVCRequestContext appReqContext=new MVCRequestContext(this,pContext);
  String instanceId=uiWidget.getApplicationInstanceUniqueId();
  String userName=pContext.getRemoteUser();
  int posX=uiWidget.getProperties().getIntValue("String_Node_Str");
  int posY=uiWidget.getProperties().getIntValue("String_Node_Str");
  int zIndex=uiWidget.getProperties().getIntValue("String_Node_Str");
  w.write("String_Node_Str" + userName + "String_Node_Str"+ instanceId+ "String_Node_Str"+ posX+ "String_Node_Str"+ posY+ "String_Node_Str"+ zIndex+ "String_Node_Str");
  String script="String_Node_Str" + instanceId + "String_Node_Str";
  appReqContext.getJavascriptManager().addCustomizedOnLoadScript(script);
}

Fixed version (ground truth):
public void processRender(UIWidget uiWidget,Writer w) throws Exception {
  PortalRequestContext pContext=Util.getPortalRequestContext();
  MVCRequestContext appReqContext=new MVCRequestContext(this,pContext);
  String instanceId=uiWidget.getApplicationInstanceUniqueId();
  String userName=pContext.getRemoteUser();
  String portalName=URLEncoder.encode(Util.getUIPortal().getName(),"String_Node_Str");
  String logOutAction=pContext.getRequestContextPath() + "String_Node_Str" + portalName+ "String_Node_Str";
  int posX=uiWidget.getProperties().getIntValue("String_Node_Str");
  int posY=uiWidget.getProperties().getIntValue("String_Node_Str");
  int zIndex=uiWidget.getProperties().getIntValue("String_Node_Str");
  w.write("String_Node_Str" + userName + "String_Node_Str"+ logOutAction+ "String_Node_Str"+ instanceId+ "String_Node_Str"+ posX+ "String_Node_Str"+ posY+ "String_Node_Str"+ zIndex+ "String_Node_Str");
  String script="String_Node_Str" + instanceId + "String_Node_Str";
  appReqContext.getJavascriptManager().addCustomizedOnLoadScript(script);
}
Program: 101210
Project: 101210
Buggy source:
public ApplicationRegistryControlArea() throws Exception {
  UIPopupWindow addCategoryPopup=addChild(UIPopupWindow.class,null,"String_Node_Str");
  addCategoryPopup.setWindowSize(640,0);
  UICategoryForm uiCategoryForm=createUIComponent(UICategoryForm.class,null,null);
  addCategoryPopup.setUIComponent(uiCategoryForm);
  uiCategoryForm.setValue(null);
}

Fixed version (ground truth):
public ApplicationRegistryControlArea() throws Exception {
}
Program: 101211
Project: 101211
Buggy source:
public boolean isInUse(ApplicationCategory category){
  UIPopupWindow uiPopup=getChild(UIPopupWindow.class);
  UIComponent uiComponent=uiPopup.getUIComponent();
  if (uiComponent != null && uiComponent instanceof UICategoryForm) {
    UICategoryForm uiForm=(UICategoryForm)uiComponent;
    ApplicationCategory existingCategory=uiForm.getCategory();
    return (existingCategory != null && existingCategory.getName().equals(category.getName()));
  }
  return false;
}

Fixed version (ground truth):
public boolean isInUse(ApplicationCategory category){
  UIPortletRegistryPortlet uiParent=getAncestorOfType(UIPortletRegistryPortlet.class);
  UIPopupWindow uiPopup=uiParent.getChild(UIPopupContainer.class).getChild(UIPopupWindow.class);
  UIComponent uiComponent=uiPopup.getUIComponent();
  if (uiComponent != null && uiComponent instanceof UICategoryForm) {
    UICategoryForm uiForm=(UICategoryForm)uiComponent;
    ApplicationCategory existingCategory=uiForm.getCategory();
    return (existingCategory != null && existingCategory.getName().equals(category.getName()));
  }
  return false;
}
Program: 101212
Project: 101212
Buggy source:
public ApplicationRegistryWorkingArea() throws Exception {
  UIPopupWindow addCategoryPopup=addChild(UIPopupWindow.class,null,"String_Node_Str");
  addCategoryPopup.setWindowSize(660,0);
}

Fixed version (ground truth):
public ApplicationRegistryWorkingArea() throws Exception {
}
Program: 101213
Project: 101213
Buggy source:
public void execute(Event<ApplicationRegistryWorkingArea> event) throws Exception {
  String categoryName=event.getRequestContext().getRequestParameter(OBJECTID);
  ApplicationRegistryWorkingArea workingArea=event.getSource();
  workingArea.setSeletcApplication(categoryName);
  Application selectedPortlet=workingArea.getSelectApplication();
  if (selectedPortlet == null)   return;
  ApplicationRegistryService service=workingArea.getApplicationComponent(ApplicationRegistryService.class);
  UIPopupWindow uiPopup=workingArea.getChild(UIPopupWindow.class);
  UIComponent uiComponent=uiPopup.getUIComponent();
  if (uiComponent != null && uiComponent instanceof UIInfoPortletForm) {
    UIInfoPortletForm uiInfoForm=(UIInfoPortletForm)uiComponent;
    Application existingApp=uiInfoForm.getPortlet();
    if (existingApp != null && existingApp.getId().equals(selectedPortlet.getId())) {
      UIApplication uiApp=event.getRequestContext().getUIApplication();
      uiApp.addMessage(new ApplicationMessage("String_Node_Str",new String[]{existingApp.getApplicationName()}));
      return;
    }
  }
  service.remove(selectedPortlet);
  workingArea.getPortlets().remove(selectedPortlet);
  workingArea.setSeletcApplication((Application)null);
}

Fixed version (ground truth):
public void execute(Event<ApplicationRegistryWorkingArea> event) throws Exception {
  String categoryName=event.getRequestContext().getRequestParameter(OBJECTID);
  ApplicationRegistryWorkingArea workingArea=event.getSource();
  workingArea.setSeletcApplication(categoryName);
  Application selectedPortlet=workingArea.getSelectApplication();
  if (selectedPortlet == null)   return;
  ApplicationRegistryService service=workingArea.getApplicationComponent(ApplicationRegistryService.class);
  UIPopupContainer uiPopup=workingArea.getAncestorOfType(UIPortletRegistryPortlet.class).getChild(UIPopupContainer.class);
  UIComponent uiComponent=uiPopup.getChild(UIPopupWindow.class).getUIComponent();
  if (uiComponent != null && uiComponent instanceof UIInfoPortletForm) {
    UIInfoPortletForm uiInfoForm=(UIInfoPortletForm)uiComponent;
    Application existingApp=uiInfoForm.getPortlet();
    if (existingApp != null && existingApp.getId().equals(selectedPortlet.getId())) {
      UIApplication uiApp=event.getRequestContext().getUIApplication();
      uiApp.addMessage(new ApplicationMessage("String_Node_Str",new String[]{existingApp.getApplicationName()}));
      return;
    }
  }
  service.remove(selectedPortlet);
  workingArea.getPortlets().remove(selectedPortlet);
  workingArea.setSeletcApplication((Application)null);
}
Program: 101214
Project: 101214
Buggy source:
public UIPortletRegistryPortlet() throws Exception {
  addChild(ApplicationRegistryWorkingArea.class,null,null);
  ApplicationRegistryControlArea uiControlArea=addChild(ApplicationRegistryControlArea.class,null,null);
  uiControlArea.initApplicationCategories();
}

Fixed version (ground truth):
public UIPortletRegistryPortlet() throws Exception {
  addChild(ApplicationRegistryWorkingArea.class,null,null);
  ApplicationRegistryControlArea uiControlArea=addChild(ApplicationRegistryControlArea.class,null,null);
  uiControlArea.initApplicationCategories();
  UIPopupContainer uiPopup=addChild(UIPopupContainer.class,null,null);
  uiPopup.setId("String_Node_Str");
}
Program: 101215
Project: 101215
Buggy source:
public UIAccountEditInputSet(String name) throws Exception {
  super(name);
  addUIFormInput(new UIFormStringInput(USERNAME,"String_Node_Str",null).setEditable(false).addValidator(MandatoryValidator.class).addValidator(IdentifierValidator.class));
  addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).addValidator(MandatoryValidator.class).addValidator(IdentifierValidator.class));
  addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).addValidator(MandatoryValidator.class).addValidator(IdentifierValidator.class));
  addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).addValidator(MandatoryValidator.class).addValidator(EmailAddressValidator.class));
  UIFormCheckBoxInput<Boolean> uiCheckbox=new UIFormCheckBoxInput<Boolean>(CHANGEPASS,null,false);
  uiCheckbox.setOnChange("String_Node_Str","String_Node_Str");
  addUIFormInput(uiCheckbox);
  UIFormInputBase<String> uiInput=new UIFormStringInput(PASSWORD1X,null,null).setType(UIFormStringInput.PASSWORD_TYPE).addValidator(StringLengthValidator.class,6,30);
  uiInput.setRendered(false);
  addUIFormInput(uiInput);
  uiInput=new UIFormStringInput(PASSWORD2X,null,null).setType(UIFormStringInput.PASSWORD_TYPE).addValidator(MandatoryValidator.class);
  uiInput.setRendered(false);
  addUIFormInput(uiInput);
}

Fixed version (ground truth):
public UIAccountEditInputSet(String name) throws Exception {
  super(name);
  addUIFormInput(new UIFormStringInput(USERNAME,"String_Node_Str",null).setEditable(false).addValidator(MandatoryValidator.class).addValidator(IdentifierValidator.class));
  addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).addValidator(MandatoryValidator.class).addValidator(IdentifierValidator.class));
  addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).addValidator(MandatoryValidator.class).addValidator(IdentifierValidator.class));
  addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).addValidator(MandatoryValidator.class).addValidator(EmailAddressValidator.class));
  UIFormCheckBoxInput<Boolean> uiCheckbox=new UIFormCheckBoxInput<Boolean>(CHANGEPASS,null,false);
  uiCheckbox.setOnChange("String_Node_Str","String_Node_Str");
  addUIFormInput(uiCheckbox);
  UIFormInputBase<String> uiInput=new UIFormStringInput(PASSWORD1X,null,null).setType(UIFormStringInput.PASSWORD_TYPE).addValidator(StringLengthValidator.class,6,30).addValidator(MandatoryValidator.class);
  uiInput.setRendered(false);
  addUIFormInput(uiInput);
  uiInput=new UIFormStringInput(PASSWORD2X,null,null).setType(UIFormStringInput.PASSWORD_TYPE).addValidator(MandatoryValidator.class);
  uiInput.setRendered(false);
  addUIFormInput(uiInput);
}
Program: 101216
Project: 101216
Buggy source:
public void execute(Event<UIPageCreationWizard> event) throws Exception {
  UIPageCreationWizard uiWizard=event.getSource();
  UIPortalApplication uiPortalApp=event.getSource().getAncestorOfType(UIPortalApplication.class);
  uiWizard.saveData();
  uiWizard.updateUIPortal(uiPortalApp,event);
}

Fixed version (ground truth):
public void execute(Event<UIPageCreationWizard> event) throws Exception {
  UIPageCreationWizard uiWizard=event.getSource();
  UIPortalApplication uiPortalApp=event.getSource().getAncestorOfType(UIPortalApplication.class);
  uiPortalApp.setEditting(false);
  uiWizard.saveData();
  uiWizard.updateUIPortal(uiPortalApp,event);
}
Program: 101217
Project: 101217
Buggy source:
public void execute(Event<UIPageWizard> event) throws Exception {
  UIPageWizard uiWizard=event.getSource();
  UIPortalApplication uiPortalApp=event.getSource().getAncestorOfType(UIPortalApplication.class);
  PortalRequestContext pcontext=(PortalRequestContext)event.getRequestContext();
  UIControlWorkspace uiControl=uiPortalApp.findComponentById(UIPortalApplication.UI_CONTROL_WS_ID);
  UIComponentDecorator uiWorkingArea=uiControl.getChildById(UIControlWorkspace.WORKING_AREA_ID);
  uiWorkingArea.setUIComponent(uiWorkingArea.createUIComponent(UIWelcomeComponent.class,null,null));
  pcontext.addUIComponentToUpdateByAjax(uiControl);
  UIPortal uiPortal=Util.getUIPortal();
  uiPortal.setMode(UIPortal.COMPONENT_VIEW_MODE);
  uiPortal.setRenderSibbling(UIPortal.class);
  pcontext.setFullRender(true);
  UIWorkspace uiWorkingWS=uiPortalApp.findComponentById(UIPortalApplication.UI_WORKING_WS_ID);
  pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
}

Fixed version (ground truth):
public void execute(Event<UIPageWizard> event) throws Exception {
  UIPortalApplication uiPortalApp=event.getSource().getAncestorOfType(UIPortalApplication.class);
  uiPortalApp.setEditting(false);
  PortalRequestContext pcontext=(PortalRequestContext)event.getRequestContext();
  UIControlWorkspace uiControl=uiPortalApp.findComponentById(UIPortalApplication.UI_CONTROL_WS_ID);
  UIComponentDecorator uiWorkingArea=uiControl.getChildById(UIControlWorkspace.WORKING_AREA_ID);
  uiWorkingArea.setUIComponent(uiWorkingArea.createUIComponent(UIWelcomeComponent.class,null,null));
  pcontext.addUIComponentToUpdateByAjax(uiControl);
  UIPortal uiPortal=Util.getUIPortal();
  uiPortal.setMode(UIPortal.COMPONENT_VIEW_MODE);
  uiPortal.setRenderSibbling(UIPortal.class);
  pcontext.setFullRender(true);
  UIWorkspace uiWorkingWS=uiPortalApp.findComponentById(UIPortalApplication.UI_WORKING_WS_ID);
  pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
}
Program: 101218
Project: 101218
Buggy source:
public void validate(UIFormInput uiInput) throws Exception {
  String s=(String)uiInput.getValue();
  if (Character.isDigit(s.charAt(0)) || s.charAt(0) == '-') {
    Object[] args={uiInput.getName(),uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
  }
  for (int i=0; i < s.length(); i++) {
    char c=s.charAt(i);
    if (Character.isLetter(c) || Character.isDigit(c) || c == '_' || c == '-') {
      continue;
    }
    Object[] args={uiInput.getName(),uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args));
  }
}

Fixed version (ground truth):
public void validate(UIFormInput uiInput) throws Exception {
  String s=(String)uiInput.getValue();
  if (Character.isDigit(s.charAt(0)) || s.charAt(0) == '-') {
    Object[] args={uiInput.getName(),uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
  }
  for (int i=0; i < s.length(); i++) {
    char c=s.charAt(i);
    if (Character.isLetter(c) || Character.isDigit(c) || c == '_' || c == '-') {
      continue;
    }
    Object[] args={uiInput.getName(),uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
  }
}
Program: 101219
Project: 101219
Buggy source:
public void validate(UIFormInput uiInput) throws Exception {
  String s=(String)uiInput.getValue();
  for (int i=0; i < s.length(); i++) {
    char c=s.charAt(i);
    if (Character.isLetter(c) || Character.isDigit(c) || c == '_' || c == '-' || Character.isSpaceChar(c)) {
      continue;
    }
    Object[] args={uiInput.getName(),uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args));
  }
}

Fixed version (ground truth):
public void validate(UIFormInput uiInput) throws Exception {
  String s=(String)uiInput.getValue();
  for (int i=0; i < s.length(); i++) {
    char c=s.charAt(i);
    if (Character.isLetter(c) || Character.isDigit(c) || c == '_' || c == '-' || Character.isSpaceChar(c)) {
      continue;
    }
    Object[] args={uiInput.getName(),uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
  }
}
Program: 101220
Project: 101220
Buggy source:
public void doFilter(ServletRequest request,ServletResponse response,FilterChain chain) throws IOException, ServletException {
  HttpServletRequest httpRequest=(HttpServletRequest)request;
  String uri=httpRequest.getRequestURI();
  if (cacheResource_) {
    HttpServletResponse httpResponse=(HttpServletResponse)response;
    httpResponse.addHeader("String_Node_Str","String_Node_Str");
    if (uri.endsWith("String_Node_Str")) {
      RootContainer rootContainer=RootContainer.getInstance();
      PortalContainer portalContainer=rootContainer.getPortalContainer("String_Node_Str");
      SkinService skinService=(SkinService)portalContainer.getComponentInstanceOfType(SkinService.class);
      String mergedCSS=skinService.getMergedCSS(uri);
      if (mergedCSS != null) {
        log.info("String_Node_Str" + uri);
        response.getWriter().print(mergedCSS);
        return;
      }
    }
  }
 else {
    if (uri.endsWith("String_Node_Str") || uri.endsWith("String_Node_Str") || uri.endsWith("String_Node_Str")) {
      HttpServletResponse httpResponse=(HttpServletResponse)response;
      httpResponse.setHeader("String_Node_Str","String_Node_Str");
    }
    if (log.isDebugEnabled())     log.debug("String_Node_Str" + uri);
  }
  chain.doFilter(request,response);
}

Fixed version (ground truth):
public void doFilter(ServletRequest request,ServletResponse response,FilterChain chain) throws IOException, ServletException {
  HttpServletRequest httpRequest=(HttpServletRequest)request;
  String uri=URLDecoder.decode(httpRequest.getRequestURI(),"String_Node_Str");
  if (cacheResource_) {
    HttpServletResponse httpResponse=(HttpServletResponse)response;
    httpResponse.addHeader("String_Node_Str","String_Node_Str");
    if (uri.endsWith("String_Node_Str")) {
      RootContainer rootContainer=RootContainer.getInstance();
      PortalContainer portalContainer=rootContainer.getPortalContainer("String_Node_Str");
      SkinService skinService=(SkinService)portalContainer.getComponentInstanceOfType(SkinService.class);
      String mergedCSS=skinService.getMergedCSS(uri);
      if (mergedCSS != null) {
        log.info("String_Node_Str" + uri);
        response.getWriter().print(mergedCSS);
        return;
      }
    }
  }
 else {
    if (uri.endsWith("String_Node_Str") || uri.endsWith("String_Node_Str") || uri.endsWith("String_Node_Str")) {
      HttpServletResponse httpResponse=(HttpServletResponse)response;
      httpResponse.setHeader("String_Node_Str","String_Node_Str");
    }
    if (log.isDebugEnabled())     log.debug("String_Node_Str" + uri);
  }
  chain.doFilter(request,response);
}
Program: 101221
Project: 101221
Buggy source:
private void resolveLabel(ResourceBundle res,PageNode node){
  node.setResolvedLabel(res);
  if (node.getChildren() == null)   return;
  for (  PageNode childNode : node.getChildren()) {
    childNode.setResolvedLabel(res);
  }
}

Fixed version (ground truth):
private void resolveLabel(ResourceBundle res,PageNode node){
  node.setResolvedLabel(res);
  if (node.getChildren() == null)   return;
  for (  PageNode childNode : node.getChildren()) {
    resolveLabel(res,childNode);
  }
}
Program: 101222
Project: 101222
Buggy source:
public void processRender(UIWidget uiWidget,Writer w) throws Exception {
  PortalContainer container=PortalContainer.getInstance();
  UserWidgetStorage service=(UserWidgetStorage)container.getComponentInstanceOfType(UserWidgetStorage.class);
  PortalRequestContext pContext=Util.getPortalRequestContext();
  MVCRequestContext appReqContext=new MVCRequestContext(this,pContext);
  String instanceId=uiWidget.getApplicationInstanceUniqueId();
  int posX=uiWidget.getProperties().getIntValue("String_Node_Str");
  int posY=uiWidget.getProperties().getIntValue("String_Node_Str");
  int zIndex=uiWidget.getProperties().getIntValue("String_Node_Str");
  byte[] bytes=(byte[])service.get(pContext.getRemoteUser(),getApplicationName(),instanceId);
  String content="String_Node_Str";
  if (bytes != null)   content=new String(bytes);
  if (content == null)   content="String_Node_Str";
  content=content.trim();
  w.append("String_Node_Str" + instanceId).append("String_Node_Str").append(String.valueOf(posX)).append("String_Node_Str").append(String.valueOf(posY)).append("String_Node_Str").append(String.valueOf(zIndex)).append("String_Node_Str").append(content).append("String_Node_Str");
  String script="String_Node_Str" + instanceId + "String_Node_Str";
  appReqContext.getJavascriptManager().addCustomizedOnLoadScript(script);
}

Fixed version (ground truth):
public void processRender(UIWidget uiWidget,Writer w) throws Exception {
  PortalContainer container=PortalContainer.getInstance();
  UserWidgetStorage service=(UserWidgetStorage)container.getComponentInstanceOfType(UserWidgetStorage.class);
  PortalRequestContext pContext=Util.getPortalRequestContext();
  MVCRequestContext appReqContext=new MVCRequestContext(this,pContext);
  String instanceId=uiWidget.getApplicationInstanceUniqueId();
  int posX=uiWidget.getProperties().getIntValue("String_Node_Str");
  int posY=uiWidget.getProperties().getIntValue("String_Node_Str");
  int zIndex=uiWidget.getProperties().getIntValue("String_Node_Str");
  String userName=pContext.getRemoteUser();
  byte[] bytes=null;
  if (userName != null && userName.trim().length() > 0) {
    bytes=(byte[])service.get(pContext.getRemoteUser(),getApplicationName(),instanceId);
  }
  String content=null;
  if (bytes != null)   content=new String(bytes);
  if (content == null)   content="String_Node_Str";
  content=content.trim();
  w.append("String_Node_Str" + instanceId).append("String_Node_Str").append(String.valueOf(posX)).append("String_Node_Str").append(String.valueOf(posY)).append("String_Node_Str").append(String.valueOf(zIndex)).append("String_Node_Str").append(content).append("String_Node_Str");
  String script="String_Node_Str" + instanceId + "String_Node_Str";
  appReqContext.getJavascriptManager().addCustomizedOnLoadScript(script);
}
Program: 101224
Project: 101224
Buggy source:
public void setMode(ManagementMode mode,Event<? extends UIComponent> event) throws Exception {
  if (mode == ManagementMode.EDIT) {
    UIPortalManagementEditBar uiEditBar=getChild(UIPortalManagementEditBar.class);
    uiEditBar.createEvent("String_Node_Str",Phase.PROCESS,event.getRequestContext()).broadcast();
    return;
  }
  getChild(UIPortalManagementEditBar.class).setRendered(false);
  getChild(UIPortalManagementControlBar.class).setRendered(false);
  getChild(UIDescription.class).setRendered(true);
  UIWorkspace uiWorkingWS=Util.updateUIApplication(event);
  UIPortalToolPanel uiToolPanel=uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
  uiToolPanel.setShowMaskLayer(false);
  UIPortalBrowser uiPortalBrowser=uiToolPanel.createUIComponent(UIPortalBrowser.class,null,null);
  uiToolPanel.setUIComponent(uiPortalBrowser);
  uiWorkingWS.setRenderedChild(UIPortalToolPanel.class);
}

Fixed version (ground truth):
public void setMode(ManagementMode mode,Event<? extends UIComponent> event) throws Exception {
  if (mode == ManagementMode.EDIT) {
    UIPageBody uiPageBody=Util.getUIPortal().findFirstComponentOfType(UIPageBody.class);
    if (uiPageBody != null) {
      if (uiPageBody.getMaximizedUIComponent() != null) {
        UIPortlet uiMaximizedPortlet=(UIPortlet)uiPageBody.getMaximizedUIComponent();
        uiMaximizedPortlet.setCurrentWindowState(WindowState.NORMAL);
        uiPageBody.setMaximizedUIComponent(null);
      }
    }
    UIPortalManagementEditBar uiEditBar=getChild(UIPortalManagementEditBar.class);
    uiEditBar.createEvent("String_Node_Str",Phase.PROCESS,event.getRequestContext()).broadcast();
    return;
  }
  getChild(UIPortalManagementEditBar.class).setRendered(false);
  getChild(UIPortalManagementControlBar.class).setRendered(false);
  getChild(UIDescription.class).setRendered(true);
  UIWorkspace uiWorkingWS=Util.updateUIApplication(event);
  UIPortalToolPanel uiToolPanel=uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
  uiToolPanel.setShowMaskLayer(false);
  UIPortalBrowser uiPortalBrowser=uiToolPanel.createUIComponent(UIPortalBrowser.class,null,null);
  uiToolPanel.setUIComponent(uiPortalBrowser);
  uiWorkingWS.setRenderedChild(UIPortalToolPanel.class);
}
Program: 101225
Project: 101225
Buggy source:
public void loadNavigations() throws Exception {
  String remoteUser=Util.getPortalRequestContext().getRemoteUser();
  navigations=new ArrayList<PageNavigation>();
  List<PageNavigation> pnavigations=Util.getUIPortal().getNavigations();
  UserACL userACL=getApplicationComponent(UserACL.class);
  for (  PageNavigation nav : pnavigations) {
    if (PortalConfig.PORTAL_TYPE.equals(nav.getOwnerType())) {
      if (userACL.hasPermission(remoteUser,Util.getUIPortal().getEditPermission())) {
        navigations.add(nav.clone());
      }
    }
 else     if (userACL.hasEditPermission(nav,remoteUser)) {
      navigations.add(nav);
    }
  }
  updateUI();
  PageNavigation portalSelectedNav=Util.getUIPortal().getSelectedNavigation();
  if (getPageNavigation(portalSelectedNav.getId()) != null) {
    selectNavigation(portalSelectedNav.getId());
    PageNode portalSelectedNode=Util.getUIPortal().getSelectedNode();
    selectPageNodeByUri(portalSelectedNode.getUri());
    return;
  }
  selectNavigation();
}

Fixed version (ground truth):
public void loadNavigations() throws Exception {
  String remoteUser=Util.getPortalRequestContext().getRemoteUser();
  navigations=new ArrayList<PageNavigation>();
  List<PageNavigation> pnavigations=getExistedNavigation(Util.getUIPortal().getNavigations());
  UserACL userACL=getApplicationComponent(UserACL.class);
  for (  PageNavigation nav : pnavigations) {
    if (PortalConfig.PORTAL_TYPE.equals(nav.getOwnerType())) {
      if (userACL.hasPermission(remoteUser,Util.getUIPortal().getEditPermission())) {
        navigations.add(nav.clone());
      }
    }
 else     if (userACL.hasEditPermission(nav,remoteUser)) {
      navigations.add(nav);
    }
  }
  updateUI();
  PageNavigation portalSelectedNav=Util.getUIPortal().getSelectedNavigation();
  if (getPageNavigation(portalSelectedNav.getId()) != null) {
    selectNavigation(portalSelectedNav.getId());
    PageNode portalSelectedNode=Util.getUIPortal().getSelectedNode();
    selectPageNodeByUri(portalSelectedNode.getUri());
    return;
  }
  selectNavigation();
}
Program: 101226
Project: 101226
Buggy source:
private static Application getApplication(UIPortal uiPortal,String id) throws Exception {
  List<ApplicationCategory> pCategories=getApplicationCategories();
  for (  ApplicationCategory pCategory : pCategories) {
    List<Application> applications=pCategory.getApplications();
    for (    Application application : applications) {
      if (application.getId().equals(id))       return application;
    }
  }
  return null;
}

Fixed version (ground truth):
private Application getApplication(String id) throws Exception {
  List<ApplicationCategory> pCategories=getApplicationCategories();
  for (  ApplicationCategory pCategory : pCategories) {
    List<Application> applications=pCategory.getApplications();
    for (    Application application : applications) {
      if (application.getId().equals(id))       return application;
    }
  }
  return null;
}
Program: 101229
Project: 101229
Buggy source:
public void execute(Event<UIAddNewApplication> event) throws Exception {
  String strUIContainerClass="String_Node_Str";
  String strUIPageClass="String_Node_Str";
  if (UI_COMPONENT_PARENT.getClass().getName().equals(strUIContainerClass)) {
    addApplicationToContainer(event);
  }
 else   if (UI_COMPONENT_PARENT.getClass().getName().equals(strUIPageClass)) {
    addApplicationToPage(event);
  }
}

Fixed version (ground truth):
public void execute(Event<UIAddNewApplication> event) throws Exception {
  if (event.getSource().isInPage()) {
    addApplicationToPage(event);
  }
 else {
    addApplicationToContainer(event);
  }
}
Program: 101230
Project: 101230
Buggy source:
@Override public void execute(Event<UIContainer> event) throws Exception {
  UIPortal uiPortal=Util.getUIPortal();
  UIPortalApplication uiApp=uiPortal.getAncestorOfType(UIPortalApplication.class);
  UIMaskWorkspace uiMaskWorkspace=uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
  UIAddNewApplication uiAddApplication=uiPortal.createUIComponent(UIAddNewApplication.class,null,null);
  String[] applicationTypes={"String_Node_Str"};
  UIAddNewApplication.UI_COMPONENT_PARENT=event.getSource();
  uiAddApplication.getApplicationCategories(event.getRequestContext().getRemoteUser(),applicationTypes);
  uiMaskWorkspace.setWindowSize(700,375);
  uiMaskWorkspace.setUIComponent(uiAddApplication);
  uiMaskWorkspace.setShow(true);
  event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
}

Fixed version (ground truth):
@Override public void execute(Event<UIContainer> event) throws Exception {
  UIPortal uiPortal=Util.getUIPortal();
  UIPortalApplication uiApp=uiPortal.getAncestorOfType(UIPortalApplication.class);
  UIMaskWorkspace uiMaskWorkspace=uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
  UIAddNewApplication uiAddApplication=uiPortal.createUIComponent(UIAddNewApplication.class,null,null);
  String[] applicationTypes={org.exoplatform.web.application.Application.EXO_WIDGET_TYPE};
  uiAddApplication.setInPage(false);
  uiAddApplication.setUiComponentParent(event.getSource());
  uiAddApplication.getApplicationCategories(event.getRequestContext().getRemoteUser(),applicationTypes);
  uiMaskWorkspace.setWindowSize(700,375);
  uiMaskWorkspace.setUIComponent(uiAddApplication);
  uiMaskWorkspace.setShow(true);
  event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
}
Program: 101231
Project: 101231
Buggy source:
@Override public void execute(Event<UIPage> event) throws Exception {
  UIPage uiPage=event.getSource();
  UIPortalApplication uiPortalApp=uiPage.getAncestorOfType(UIPortalApplication.class);
  UIMaskWorkspace uiMaskWorkspace=uiPortalApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
  UIAddNewApplication uiAddApplication=uiPage.createUIComponent(UIAddNewApplication.class,null,null);
  UIAddNewApplication.UI_COMPONENT_PARENT=uiPage;
  uiAddApplication.getApplicationCategories(event.getRequestContext().getRemoteUser(),null);
  uiMaskWorkspace.setWindowSize(700,375);
  uiMaskWorkspace.setUIComponent(uiAddApplication);
  uiMaskWorkspace.setShow(true);
  event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
}

Fixed version (ground truth):
@Override public void execute(Event<UIPage> event) throws Exception {
  UIPage uiPage=event.getSource();
  UIPortalApplication uiPortalApp=uiPage.getAncestorOfType(UIPortalApplication.class);
  UIMaskWorkspace uiMaskWorkspace=uiPortalApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
  UIAddNewApplication uiAddApplication=uiPage.createUIComponent(UIAddNewApplication.class,null,null);
  uiAddApplication.setInPage(true);
  uiAddApplication.setUiComponentParent(uiPage);
  uiAddApplication.getApplicationCategories(event.getRequestContext().getRemoteUser(),null);
  uiMaskWorkspace.setWindowSize(700,375);
  uiMaskWorkspace.setUIComponent(uiAddApplication);
  uiMaskWorkspace.setShow(true);
  event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
}
Program: 101232
Project: 101232
Buggy source:
@SuppressWarnings("String_Node_Str") private RunStats collectAndWriteRunStats(final URI test,final ScriptInstrumenter instrumenter,final NativeObject allCoverageData) throws IOException {
  final RunStats runStats=new RunStats(test);
  runStats.setSortBy(config.getSortBy());
  runStats.setOrder(config.getOrder());
  for (  final ScriptData data : instrumenter.getScriptDataList()) {
    final Map<Integer,Double> coverageData=(Map<Integer,Double>)allCoverageData.get(data.getSourceName());
    final FileStats fileStats=data.generateFileStats(config.getBaseUri(),coverageData);
    runStats.add(fileStats);
  }
  return runStats;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private RunStats collectAndWriteRunStats(final URI test,final ScriptInstrumenter instrumenter,final NativeObject allCoverageData) throws IOException {
  final RunStats runStats=new RunStats(test);
  runStats.setSortBy(config.getSortBy());
  runStats.setOrder(config.getOrder());
  for (  final ScriptData data : instrumenter.getScriptDataList()) {
    final Map<Integer,Double> coverageData=(Map<Integer,Double>)allCoverageData.get(data.getSourceUriAsString());
    final FileStats fileStats=data.generateFileStats(config.getBaseUri(),coverageData);
    runStats.add(fileStats);
  }
  return runStats;
}
Program: 101233
Project: 101233
Buggy source:
public String getParentName(){
  return normalizeFileSeparators(parentName);
}

Fixed version (ground truth):
public String getParentName(){
  return parentName;
}
Program: 101234
Project: 101234
Buggy source:
private String generateId(){
  return Hashing.md5().hashString(fullName).toString();
}

Fixed version (ground truth):
private String generateId(){
  return Hashing.md5().hashString(fileUri.toString()).toString();
}
Program: 101235
Project: 101235
Buggy source:
public String getRelativeName(){
  return normalizeFileSeparators(relativeName);
}

Fixed version (ground truth):
public String getRelativeName(){
  return isSeparateFile() ? ResourceUtil.getRelativePath(fileUri.toString(),baseUri.toString(),"String_Node_Str") : fileUri.toString();
}
Program: 101236
Project: 101236
Buggy source:
FileStats(final URI baseUri,final String fullName,final List<LineCoverageRecord> lineCoverageRecords,final boolean separateFile){
  this.baseUri=baseUri;
  this.fullName=fullName;
  this.separateFile=separateFile;
  this.relativeName=getRelativeName(fullName);
  final File file=new File(relativeName);
  fileName=file.getName();
  parentName=file.getParent();
  this.id=generateId();
  this.lineCoverageRecords=lineCoverageRecords;
}

Fixed version (ground truth):
FileStats(final URI baseUri,final URI fileUri,final List<LineCoverageRecord> lineCoverageRecords,final boolean separateFile){
  this.baseUri=baseUri;
  this.fileUri=fileUri;
  this.separateFile=separateFile;
  parentName=new File(getRelativeName()).getParent();
  this.id=generateId();
  this.lineCoverageRecords=lineCoverageRecords;
}
Program: 101237
Project: 101237
Buggy source:
static FileStats merge(final FileStats s1,final FileStats s2){
  final List<LineCoverageRecord> r1=s1.getLineCoverageRecords();
  final List<LineCoverageRecord> r2=s2.getLineCoverageRecords();
  Preconditions.checkArgument(s1.fullName.equals(s2.fullName),"String_Node_Str",s1,s2);
  Preconditions.checkArgument(r1.size() == r2.size(),"String_Node_Str",s1,s2);
  final List<LineCoverageRecord> mergedRecords=Lists.newLinkedList();
  for (int i=0; i < r1.size(); i++) {
    final LineCoverageRecord l1=r1.get(i);
    final LineCoverageRecord l2=r2.get(i);
    try {
      mergedRecords.add(LineCoverageRecord.merge(l1,l2));
    }
 catch (    final Exception e) {
      throw new RuntimeException("String_Node_Str" + s1.fullName + "String_Node_Str"+ s2.fullName,e);
    }
  }
  return new FileStats(s1.baseUri,s1.fullName,mergedRecords,s1.separateFile);
}

Fixed version (ground truth):
static FileStats merge(final FileStats s1,final FileStats s2){
  final List<LineCoverageRecord> r1=s1.getLineCoverageRecords();
  final List<LineCoverageRecord> r2=s2.getLineCoverageRecords();
  Preconditions.checkArgument(s1.fileUri.equals(s2.fileUri),"String_Node_Str",s1,s2);
  Preconditions.checkArgument(r1.size() == r2.size(),"String_Node_Str",s1,s2);
  final List<LineCoverageRecord> mergedRecords=Lists.newLinkedList();
  for (int i=0; i < r1.size(); i++) {
    final LineCoverageRecord l1=r1.get(i);
    final LineCoverageRecord l2=r2.get(i);
    try {
      mergedRecords.add(LineCoverageRecord.merge(l1,l2));
    }
 catch (    final Exception e) {
      throw new RuntimeException("String_Node_Str" + s1.fileUri + "String_Node_Str"+ s2.fileUri,e);
    }
  }
  return new FileStats(s1.baseUri,s1.fileUri,mergedRecords,s1.separateFile);
}
Program: 101238
Project: 101238
Buggy source:
@Override public String toString(){
  return getFullName();
}

Fixed version (ground truth):
@Override public String toString(){
  return fileUri.toString();
}
Program: 101239
Project: 101239
Buggy source:
public String getFileName(){
  return normalizeFileSeparators(fileName);
}

Fixed version (ground truth):
public String getFileName(){
  return UriUtil.getLastSegmentOrHost(fileUri);
}
Program: 101240
Project: 101240
Buggy source:
public String getFullName(){
  return normalizeFileSeparators(fullName);
}

Fixed version (ground truth):
public String getFullName(){
  return UriUtil.getPath(fileUri);
}