nus-yam/ex-repair huggingface dataset:
Program: 101162
Project: 101162
Buggy source:
private void updateUI(){
  WebuiRequestContext contextres=WebuiRequestContext.getCurrentInstance();
  ResourceBundle res=contextres.getApplicationResourceBundle();
  String navValueEnd=res.getString("String_Node_Str");
  if (navigations == null || navigations.size() < 1) {
    getChild(UIDropDownControl.class).setOptions(null);
    getChild(UITree.class).setSibbling(null);
    return;
  }
  List<SelectItemOption<String>> options=new ArrayList<SelectItemOption<String>>();
  for (  PageNavigation navigation : navigations) {
    String label=navigation.getOwnerId() + navValueEnd;
    options.add(new SelectItemOption<String>(navigation.getOwnerType() + "String_Node_Str" + label,navigation.getId()));
  }
  UIDropDownControl uiNavigationSelector=getChild(UIDropDownControl.class);
  uiNavigationSelector.setOptions(options);
  if (options.size() > 0)   uiNavigationSelector.setValue(0);
}

Fixed version (ground truth):
private void updateUI(){
  WebuiRequestContext contextres=WebuiRequestContext.getCurrentInstance();
  ResourceBundle res=contextres.getApplicationResourceBundle();
  String navValueEnd=res.getString("String_Node_Str");
  if (navigations == null || navigations.size() < 1) {
    getChild(UIDropDownControl.class).setOptions(null);
    getChild(UITree.class).setSibbling(null);
    return;
  }
  List<SelectItemOption<String>> options=new ArrayList<SelectItemOption<String>>();
  for (  PageNavigation navigation : navigations) {
    String label=navValueEnd.replace("String_Node_Str",navigation.getOwnerType() + "String_Node_Str" + navigation.getOwnerId());
    options.add(new SelectItemOption<String>(label,navigation.getId()));
  }
  UIDropDownControl uiNavigationSelector=getChild(UIDropDownControl.class);
  uiNavigationSelector.setOptions(options);
  if (options.size() > 0)   uiNavigationSelector.setValue(0);
}
Program: 101163
Project: 101163
Buggy source:
private void processNormalRequest(UIForm uiForm,WebuiRequestContext context) throws Exception {
  List<UIFormInputBase> inputs=new ArrayList<UIFormInputBase>();
  uiForm.findComponentOfType(inputs,UIFormInputBase.class);
  uiForm.setSubmitAction(context.getRequestParameter(UIForm.ACTION));
  for (  UIFormInputBase input : inputs) {
    if (!checkVisible(input))     continue;
    String inputValue=context.getRequestParameter(input.getId());
    if (inputValue == null || inputValue.trim().length() == 0) {
      inputValue=context.getRequestParameter(input.getName());
    }
    input.decode(inputValue,context);
  }
}

Fixed version (ground truth):
private void processNormalRequest(UIForm uiForm,WebuiRequestContext context) throws Exception {
  List<UIFormInputBase> inputs=new ArrayList<UIFormInputBase>();
  uiForm.findComponentOfType(inputs,UIFormInputBase.class);
  uiForm.setSubmitAction(context.getRequestParameter(UIForm.ACTION));
  for (  UIFormInputBase input : inputs) {
    if (input.isValid())     continue;
    String inputValue=context.getRequestParameter(input.getId());
    if (inputValue == null || inputValue.trim().length() == 0) {
      inputValue=context.getRequestParameter(input.getName());
    }
    input.decode(inputValue,context);
  }
}
Program: 101164
Project: 101164
Buggy source:
public boolean isMandatory(){
  List<Validator> validators=this.getValidators();
  if (validators == null)   return false;
  for (  Validator validator : validators)   if (validator instanceof MandatoryValidator)   return true;
  return false;
}

Fixed version (ground truth):
public boolean isMandatory(){
  if (validators == null)   return false;
  for (  Validator validator : validators) {
    if (validator instanceof MandatoryValidator)     return true;
  }
  return false;
}
Program: 101165
Project: 101165
Buggy source:
public void processRender(WebuiRequestContext context) throws Exception {
  Writer w=context.getWriter();
  w.write("String_Node_Str");
  w.write(getName());
  w.write('\'');
  if (type_ == PASSWORD_TYPE)   w.write("String_Node_Str");
 else   w.write("String_Node_Str");
  w.write("String_Node_Str");
  w.write(getId());
  w.write('\'');
  if (value_ != null && value_.length() > 0) {
    w.write("String_Node_Str");
    w.write(encodeValue(value_).toString());
    w.write('\'');
  }
  if (maxLength > 0)   w.write("String_Node_Str" + maxLength + "String_Node_Str");
  if (readonly_)   w.write("String_Node_Str");
  w.write("String_Node_Str");
  if (this.isMandatory())   w.write("String_Node_Str");
}

Fixed version (ground truth):
public void processRender(WebuiRequestContext context) throws Exception {
  Writer w=context.getWriter();
  w.write("String_Node_Str");
  w.write(getName());
  w.write('\'');
  if (type_ == PASSWORD_TYPE)   w.write("String_Node_Str");
 else   w.write("String_Node_Str");
  w.write("String_Node_Str");
  w.write(getId());
  w.write('\'');
  if (value_ != null && value_.length() > 0) {
    w.write("String_Node_Str");
    w.write(encodeValue(value_).toString());
    w.write('\'');
  }
  if (maxLength > 0)   w.write("String_Node_Str" + maxLength + "String_Node_Str");
  if (readonly_)   w.write("String_Node_Str");
  if (!enable_)   w.write("String_Node_Str");
  w.write("String_Node_Str");
  if (this.isMandatory())   w.write("String_Node_Str");
}
Program: 101166
Project: 101166
Buggy source:
@SuppressWarnings("String_Node_Str") public void processDecode(WebuiRequestContext context) throws Exception {
  List<UIComponent> children=uiIterator_.getCurrentPageData();
  for (  UIComponent child : children) {
    List<UIFormInputBase> inputs=new ArrayList<UIFormInputBase>();
    child.findComponentOfType(inputs,UIFormInputBase.class);
    for (    UIFormInputBase input : inputs) {
      String inputValue=context.getRequestParameter(input.getId());
      if (inputValue == null || inputValue.trim().length() == 0) {
        inputValue=context.getRequestParameter(input.getName());
      }
      input.decode(inputValue,context);
    }
    child.processDecode(context);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void processDecode(WebuiRequestContext context) throws Exception {
  List<UIComponent> children=uiIterator_.getCurrentPageData();
  for (  UIComponent child : children) {
    List<UIFormInputBase> inputs=new ArrayList<UIFormInputBase>();
    child.findComponentOfType(inputs,UIFormInputBase.class);
    for (    UIFormInputBase input : inputs) {
      if (!input.isValid())       continue;
      String inputValue=context.getRequestParameter(input.getId());
      if (inputValue == null || inputValue.trim().length() == 0) {
        inputValue=context.getRequestParameter(input.getName());
      }
      input.decode(inputValue,context);
    }
    child.processDecode(context);
  }
}
Program: 101168
Project: 101168
Buggy source:
private void processNormalRequest(UIForm uiForm,WebuiRequestContext context) throws Exception {
  List<UIFormInputBase> inputs=new ArrayList<UIFormInputBase>();
  uiForm.findComponentOfType(inputs,UIFormInputBase.class);
  uiForm.setSubmitAction(context.getRequestParameter(UIForm.ACTION));
  for (  UIFormInputBase input : inputs) {
    if (input.isValid())     continue;
    String inputValue=context.getRequestParameter(input.getId());
    if (inputValue == null || inputValue.trim().length() == 0) {
      inputValue=context.getRequestParameter(input.getName());
    }
    input.decode(inputValue,context);
  }
}

Fixed version (ground truth):
private void processNormalRequest(UIForm uiForm,WebuiRequestContext context) throws Exception {
  List<UIFormInputBase> inputs=new ArrayList<UIFormInputBase>();
  uiForm.findComponentOfType(inputs,UIFormInputBase.class);
  uiForm.setSubmitAction(context.getRequestParameter(UIForm.ACTION));
  for (  UIFormInputBase input : inputs) {
    if (!input.isValid())     continue;
    String inputValue=context.getRequestParameter(input.getId());
    if (inputValue == null || inputValue.trim().length() == 0) {
      inputValue=context.getRequestParameter(input.getName());
    }
    input.decode(inputValue,context);
  }
}
Program: 101170
Project: 101170
Buggy source:
public boolean isEnable(){
  if (showPublicationDate) {
    if (endPublicationDate == null)     enable=true;
 else     if (endPublicationDate.compareTo(Calendar.getInstance().getTime()) < 0)     enable=false;
 else     enable=true;
  }
  return enable;
}

Fixed version (ground truth):
public boolean isEnable(){
  if (enable && showPublicationDate) {
    if (endPublicationDate == null)     return true;
 else     if (endPublicationDate.compareTo(Calendar.getInstance().getTime()) < 0)     return false;
  }
  return enable;
}
Program: 101171
Project: 101171
Buggy source:
public UIWelcomeComponent() throws Exception {
  WebuiRequestContext rcontext=Util.getPortalRequestContext();
  UIPortalApplication uiPortalApplication=(UIPortalApplication)rcontext.getUIApplication();
  UserPortalConfig userPortalConfig=uiPortalApplication.getUserPortalConfig();
  if (userPortalConfig == null)   return;
  Gadgets gadgets=userPortalConfig.getGadgets();
  if (gadgets == null) {
    gadgets=new Gadgets();
    gadgets.setOwnerType(PortalConfig.USER_TYPE);
    gadgets.setOwnerId(rcontext.getRemoteUser());
    gadgets.setChildren(new ArrayList<Container>());
    UserPortalConfigService configService=getApplicationComponent(UserPortalConfigService.class);
    configService.create(gadgets);
  }
  UIGadgets uiGadgets=addChild(UIGadgets.class,null,null);
  PortalDataMapper.toUIGadgets(uiGadgets,gadgets);
}

Fixed version (ground truth):
public UIWelcomeComponent() throws Exception {
  WebuiRequestContext rcontext=Util.getPortalRequestContext();
  UIPortalApplication uiPortalApplication=(UIPortalApplication)rcontext.getUIApplication();
  UserPortalConfig userPortalConfig=uiPortalApplication.getUserPortalConfig();
  if (userPortalConfig == null)   return;
  Gadgets gadgets=userPortalConfig.getGadgets();
  if (gadgets == null) {
    gadgets=new Gadgets();
    gadgets.setOwnerType(PortalConfig.USER_TYPE);
    gadgets.setOwnerId(rcontext.getRemoteUser());
    gadgets.setChildren(new ArrayList<Container>());
    UserPortalConfigService configService=getApplicationComponent(UserPortalConfigService.class);
    configService.create(gadgets);
    userPortalConfig.setGadgets(gadgets);
  }
  UIGadgets uiGadgets=addChild(UIGadgets.class,null,null);
  PortalDataMapper.toUIGadgets(uiGadgets,gadgets);
}
Program: 101172
Project: 101172
Buggy source:
private String renderOption(SelectOption option,String label){
  StringBuffer buf=new StringBuffer();
  buf.append("String_Node_Str");
  buf.append(option.getValue());
  if (option.isSelected())   buf.append("String_Node_Str");
  buf.append("String_Node_Str");
  buf.append(label);
  buf.append("String_Node_Str");
  return buf.toString();
}

Fixed version (ground truth):
private String renderOption(SelectOption option,String label){
  StringBuffer buf=new StringBuffer();
  buf.append("String_Node_Str");
  buf.append(option.getValue());
  buf.append("String_Node_Str");
  if (option.isSelected())   buf.append("String_Node_Str");
  buf.append("String_Node_Str");
  buf.append(label);
  buf.append("String_Node_Str");
  return buf.toString();
}
Program: 101173
Project: 101173
Buggy source:
@SuppressWarnings("String_Node_Str") public void decode(Object input,WebuiRequestContext context) throws Exception {
  String[] values=context.getRequestParameterValues(getId());
  if (values == null) {
    value_=null;
    for (    SelectItem option : options_) {
      if (option instanceof SelectOption)       ((SelectOption)option).setSelected(false);
 else       if (option instanceof SelectOptionGroup) {
        for (        SelectOption opt : ((SelectOptionGroup)option).getOptions()) {
          opt.setSelected(false);
        }
      }
    }
    return;
  }
  int i=0;
  value_=values[0];
  for (  SelectItem item : options_) {
    if (item instanceof SelectOption) {
      if (i > -1 && ((SelectOption)item).getValue().equals(values[i])) {
        ((SelectOption)item).setSelected(true);
        if (values.length == ++i)         i=-1;
      }
 else       ((SelectOption)item).setSelected(false);
    }
 else     if (item instanceof SelectOptionGroup) {
      for (      SelectOption opt : ((SelectOptionGroup)item).getOptions()) {
        if (i > -1 && ((SelectOption)opt).getValue().equals(values[i])) {
          ((SelectOption)opt).setSelected(true);
        }
        if (values.length == ++i)         i=-1;
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void decode(Object input,WebuiRequestContext context) throws Exception {
  String[] values=context.getRequestParameterValues(getId());
  if (values == null) {
    value_=null;
    for (    SelectItem option : options_) {
      if (option instanceof SelectOption)       ((SelectOption)option).setSelected(false);
 else       if (option instanceof SelectOptionGroup) {
        for (        SelectOption opt : ((SelectOptionGroup)option).getOptions()) {
          opt.setSelected(false);
        }
      }
    }
    return;
  }
  int i=0;
  value_=values[0];
  for (  SelectItem item : options_) {
    if (item instanceof SelectOption) {
      if (i > -1 && ((SelectOption)item).getValue().equals(values[i])) {
        ((SelectOption)item).setSelected(true);
        if (values.length == ++i)         i=-1;
      }
 else       ((SelectOption)item).setSelected(false);
    }
 else     if (item instanceof SelectOptionGroup) {
      for (      SelectOption opt : ((SelectOptionGroup)item).getOptions()) {
        if (i > -1 && ((SelectOption)opt).getValue().equals(values[i])) {
          ((SelectOption)opt).setSelected(true);
          if (values.length == ++i)           i=-1;
        }
 else {
          ((SelectOption)opt).setSelected(false);
        }
      }
    }
  }
}
Program: 101174
Project: 101174
Buggy source:
public void validate(UIFormInput uiInput) throws Exception {
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label=uiForm.getLabel(uiInput.getName());
  if (label == null)   label=uiInput.getName();
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  String s=(String)uiInput.getValue();
  if (s.matches(EMAIL_REGEX))   return;
  Object[] args={label,uiInput.getBindingField()};
  throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
}

Fixed version (ground truth):
public void validate(UIFormInput uiInput) throws Exception {
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label;
  try {
    label=uiForm.getLabel(uiInput.getName());
  }
 catch (  Exception e) {
    label=uiInput.getName();
  }
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  String s=(String)uiInput.getValue();
  if (s.matches(EMAIL_REGEX))   return;
  Object[] args={label,uiInput.getBindingField()};
  throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
}
Program: 101175
Project: 101175
Buggy source:
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  if ((uiInput.getValue() != null)) {
    String value=((String)uiInput.getValue()).trim();
    if (value.matches(expression_))     return;
  }
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label=uiForm.getLabel(uiInput.getName());
  if (label == null)   label=uiInput.getName();
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  Object[] args={label};
  throw new MessageException(new ApplicationMessage(key_,args,ApplicationMessage.WARNING));
}

Fixed version (ground truth):
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  if ((uiInput.getValue() != null)) {
    String value=((String)uiInput.getValue()).trim();
    if (value.matches(expression_))     return;
  }
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label;
  try {
    label=uiForm.getLabel(uiInput.getName());
  }
 catch (  Exception e) {
    label=uiInput.getName();
  }
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  Object[] args={label};
  throw new MessageException(new ApplicationMessage(key_,args,ApplicationMessage.WARNING));
}
Program: 101176
Project: 101176
Buggy source:
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label=uiForm.getLabel(uiInput.getName());
  if (label == null)   label=uiInput.getName();
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  String s=(String)uiInput.getValue();
  if (Character.isDigit(s.charAt(0)) || s.charAt(0) == '-') {
    Object[] args={label,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={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
  }
}

Fixed version (ground truth):
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label;
  try {
    label=uiForm.getLabel(uiInput.getName());
  }
 catch (  Exception e) {
    label=uiInput.getName();
  }
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  String s=(String)uiInput.getValue();
  if (Character.isDigit(s.charAt(0)) || s.charAt(0) == '-') {
    Object[] args={label,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={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
  }
}
Program: 101177
Project: 101177
Buggy source:
public void validate(UIFormInput uiInput) throws Exception {
  if ((uiInput.getValue() != null) && ((String)uiInput.getValue()).trim().length() > 0) {
    return;
  }
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label=uiForm.getLabel(uiInput.getName());
  if (label == null)   label=uiInput.getName();
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  Object[] args={label,uiInput.getBindingField()};
  throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
}

Fixed version (ground truth):
public void validate(UIFormInput uiInput) throws Exception {
  if ((uiInput.getValue() != null) && ((String)uiInput.getValue()).trim().length() > 0) {
    return;
  }
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label;
  try {
    label=uiForm.getLabel(uiInput.getName());
  }
 catch (  Exception e) {
    label=uiInput.getName();
  }
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  Object[] args={label,uiInput.getBindingField()};
  throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
}
Program: 101178
Project: 101178
Buggy source:
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label=uiForm.getLabel(uiInput.getName());
  if (label == null)   label=uiInput.getName();
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  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 == '-' || c == '.' || c == '*') {
      continue;
    }
    Object[] args={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args));
  }
}

Fixed version (ground truth):
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label;
  try {
    label=uiForm.getLabel(uiInput.getName());
  }
 catch (  Exception e) {
    label=uiInput.getName();
  }
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  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 == '-' || c == '.' || c == '*') {
      continue;
    }
    Object[] args={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args));
  }
}
Program: 101179
Project: 101179
Buggy source:
public void validate(UIFormInput uiInput) throws Exception {
  if ((uiInput.getValue() != null))   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label=uiForm.getLabel(uiInput.getName());
  if (label == null)   label=uiInput.getName();
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  Object[] args={label,uiInput.getBindingField()};
  throw new MessageException(new ApplicationMessage("String_Node_Str",args));
}

Fixed version (ground truth):
public void validate(UIFormInput uiInput) throws Exception {
  if ((uiInput.getValue() != null))   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label;
  try {
    label=uiForm.getLabel(uiInput.getName());
  }
 catch (  Exception e) {
    label=uiInput.getName();
  }
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  Object[] args={label,uiInput.getBindingField()};
  throw new MessageException(new ApplicationMessage("String_Node_Str",args));
}
Program: 101180
Project: 101180
Buggy source:
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).length() == 0)   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label=uiForm.getLabel(uiInput.getName());
  if (label == null)   label=uiInput.getName();
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  String s=(String)uiInput.getValue();
  for (int i=0; i < s.length(); i++) {
    char c=s.charAt(i);
    if (Character.isDigit(c) || (s.charAt(0) == '-' && i == 0 && s.length() > 1)) {
      continue;
    }
    Object[] args={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args));
  }
}

Fixed version (ground truth):
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).length() == 0)   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label;
  try {
    label=uiForm.getLabel(uiInput.getName());
  }
 catch (  Exception e) {
    label=uiInput.getName();
  }
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  String s=(String)uiInput.getValue();
  for (int i=0; i < s.length(); i++) {
    char c=s.charAt(i);
    if (Character.isDigit(c) || (s.charAt(0) == '-' && i == 0 && s.length() > 1)) {
      continue;
    }
    Object[] args={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args));
  }
}
Program: 101181
Project: 101181
Buggy source:
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label=uiForm.getLabel(uiInput.getName());
  if (label == null)   label=uiInput.getName();
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  String s=(String)uiInput.getValue();
  boolean error=false;
  for (int i=0; i < s.length(); i++) {
    char c=s.charAt(i);
    if (Character.isDigit(c) || (s.charAt(0) == '-' && i == 0)) {
      error=true;
      continue;
    }
    error=false;
    Object[] args={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
  }
  if (error) {
    int num=Integer.parseInt(s);
    if (min_ > num || max_ < num) {
      Object[] args={label,min_.toString(),max_.toString()};
      throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
    }
  }
}

Fixed version (ground truth):
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label;
  try {
    label=uiForm.getLabel(uiInput.getName());
  }
 catch (  Exception e) {
    label=uiInput.getName();
  }
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  String s=(String)uiInput.getValue();
  boolean error=false;
  for (int i=0; i < s.length(); i++) {
    char c=s.charAt(i);
    if (Character.isDigit(c) || (s.charAt(0) == '-' && i == 0)) {
      error=true;
      continue;
    }
    error=false;
    Object[] args={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
  }
  if (error) {
    int num=Integer.parseInt(s);
    if (min_ > num || max_ < num) {
      Object[] args={label,min_.toString(),max_.toString()};
      throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
    }
  }
}
Program: 101182
Project: 101182
Buggy source:
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).length() == 0)   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label=uiForm.getLabel(uiInput.getName());
  if (label == null)   label=uiInput.getName();
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  String s=(String)uiInput.getValue();
  boolean error=false;
  for (int i=0; i < s.length(); i++) {
    char c=s.charAt(i);
    if (Character.isDigit(c) || (s.charAt(0) == '-' && i == 0)) {
      error=true;
      continue;
    }
    error=false;
    Object[] args={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args));
  }
  if (error == true && s.charAt(0) == '-') {
    Object[] args={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args));
  }
}

Fixed version (ground truth):
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).length() == 0)   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label;
  try {
    label=uiForm.getLabel(uiInput.getName());
  }
 catch (  Exception e) {
    label=uiInput.getName();
  }
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  String s=(String)uiInput.getValue();
  boolean error=false;
  for (int i=0; i < s.length(); i++) {
    char c=s.charAt(i);
    if (Character.isDigit(c) || (s.charAt(0) == '-' && i == 0)) {
      error=true;
      continue;
    }
    error=false;
    Object[] args={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args));
  }
  if (error == true && s.charAt(0) == '-') {
    Object[] args={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args));
  }
}
Program: 101183
Project: 101183
Buggy source:
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label=uiForm.getLabel(uiInput.getName());
  if (label == null)   label=uiInput.getName();
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  String s=(String)uiInput.getValue();
  if (Character.isDigit(s.charAt(0)) || s.charAt(0) == '-' || s.charAt(0) == '.' || s.charAt(0) == '_') {
    Object[] args={label,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 == '-' || c == '.') {
      continue;
    }
    Object[] args={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
  }
}

Fixed version (ground truth):
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label;
  try {
    label=uiForm.getLabel(uiInput.getName());
  }
 catch (  Exception e) {
    label=uiInput.getName();
  }
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  String s=(String)uiInput.getValue();
  if (Character.isDigit(s.charAt(0)) || s.charAt(0) == '-' || s.charAt(0) == '.' || s.charAt(0) == '_') {
    Object[] args={label,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 == '-' || c == '.') {
      continue;
    }
    Object[] args={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
  }
}
Program: 101184
Project: 101184
Buggy source:
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label=uiForm.getLabel(uiInput.getName());
  if (label == null)   label=uiInput.getName();
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  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={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
  }
}

Fixed version (ground truth):
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label;
  try {
    label=uiForm.getLabel(uiInput.getName());
  }
 catch (  Exception e) {
    label=uiInput.getName();
  }
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  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={label,uiInput.getBindingField()};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
  }
}
Program: 101185
Project: 101185
Buggy source:
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  if ((uiInput.getValue() != null)) {
    int length=((String)uiInput.getValue()).trim().length();
    if (min_ <= length && max_ >= length)     return;
  }
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label=uiForm.getLabel(uiInput.getName());
  if (label == null)   label=uiInput.getName();
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  Object[] args={label,min_.toString(),max_.toString()};
  throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
}

Fixed version (ground truth):
public void validate(UIFormInput uiInput) throws Exception {
  if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)   return;
  if ((uiInput.getValue() != null)) {
    int length=((String)uiInput.getValue()).trim().length();
    if (min_ <= length && max_ >= length)     return;
  }
  UIComponent uiComponent=(UIComponent)uiInput;
  UIForm uiForm=uiComponent.getAncestorOfType(UIForm.class);
  String label;
  try {
    label=uiForm.getLabel(uiInput.getName());
  }
 catch (  Exception e) {
    label=uiInput.getName();
  }
  label=label.trim();
  if (label.charAt(label.length() - 1) == ':')   label=label.substring(0,label.length() - 1);
  Object[] args={label,min_.toString(),max_.toString()};
  throw new MessageException(new ApplicationMessage("String_Node_Str",args,ApplicationMessage.WARNING));
}
Program: 101186
Project: 101186
Buggy source:
public UIExoStart(InitParams initParams) throws Exception {
  PortalRequestContext context=WebuiRequestContext.getCurrentInstance();
  logged=context.getAccessPath() == PortalRequestContext.PRIVATE_ACCESS;
  List<MenuItemContainer> menu=null;
  if (logged) {
    menu=initParams.getParam("String_Node_Str").getMapGroovyObject(context);
    menus.add(menu);
  }
}

Fixed version (ground truth):
public UIExoStart(InitParams initParams) throws Exception {
  PortalRequestContext context=WebuiRequestContext.getCurrentInstance();
  if (context.getRemoteUser() != null) {
    List<MenuItemContainer> menu=initParams.getParam("String_Node_Str").getMapGroovyObject(context);
    menus.add(menu);
  }
}
Program: 101188
Project: 101188
Buggy source:
private void updateUI(){
  if (navigations == null || navigations.size() < 1) {
    getChild(UIDropDownControl.class).setOptions(null);
    getChild(UITree.class).setSibbling(null);
    return;
  }
  List<SelectItemOption<String>> options=new ArrayList<SelectItemOption<String>>();
  for (  PageNavigation navigation : navigations) {
    String label=navigation.getOwnerId() + "String_Node_Str";
    options.add(new SelectItemOption<String>(navigation.getOwnerType() + "String_Node_Str" + label,navigation.getId()));
  }
  UIDropDownControl uiNavigationSelector=getChild(UIDropDownControl.class);
  uiNavigationSelector.setOptions(options);
  if (options.size() > 0)   uiNavigationSelector.setValue(0);
}

Fixed version (ground truth):
private void updateUI(){
  WebuiRequestContext contextres=WebuiRequestContext.getCurrentInstance();
  ResourceBundle res=contextres.getApplicationResourceBundle();
  String navValueEnd=res.getString("String_Node_Str");
  if (navigations == null || navigations.size() < 1) {
    getChild(UIDropDownControl.class).setOptions(null);
    getChild(UITree.class).setSibbling(null);
    return;
  }
  List<SelectItemOption<String>> options=new ArrayList<SelectItemOption<String>>();
  for (  PageNavigation navigation : navigations) {
    String label=navigation.getOwnerId() + navValueEnd;
    options.add(new SelectItemOption<String>(navigation.getOwnerType() + "String_Node_Str" + label,navigation.getId()));
  }
  UIDropDownControl uiNavigationSelector=getChild(UIDropDownControl.class);
  uiNavigationSelector.setOptions(options);
  if (options.size() > 0)   uiNavigationSelector.setValue(0);
}
Program: 101189
Project: 101189
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).setMaxLength(45).addValidator(MandatoryValidator.class).addValidator(SpecialCharacterValidator.class));
  addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).setMaxLength(45).addValidator(MandatoryValidator.class).addValidator(SpecialCharacterValidator.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).addValidator(StringLengthValidator.class,6,30);
  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(ExpressionValidator.class,"String_Node_Str","String_Node_Str").addValidator(ResourceValidator.class));
  addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).setMaxLength(45).addValidator(MandatoryValidator.class).addValidator(SpecialCharacterValidator.class));
  addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).setMaxLength(45).addValidator(MandatoryValidator.class).addValidator(SpecialCharacterValidator.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).addValidator(StringLengthValidator.class,6,30);
  uiInput.setRendered(false);
  addUIFormInput(uiInput);
}
Program: 101190
Project: 101190
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")).addValidator(PositiveNumberFormatValidator.class));
}

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")));
}
Program: 101191
Project: 101191
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(PortletMode.VIEW);
  }
 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 {
  UIIFrameEditMode uiForm=event.getSource();
  String url=uiForm.getUIStringInput(FIELD_URL).getValue();
  if (url == null || url.length() == 0) {
    UIIFramePortlet uiPortlet=uiForm.getParent();
    Object args[]={uiForm.getLabel(uiForm.getUIStringInput(FIELD_URL).getId())};
    uiPortlet.addMessage(new ApplicationMessage("String_Node_Str",args));
    uiForm.getUIStringInput(FIELD_URL).setValue(uiPortlet.getURL());
    return;
  }
  try {
    PortletRequestContext pcontext=(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
    PortletPreferences pref=pcontext.getRequest().getPreferences();
    new URL(url);
    pref.setValue("String_Node_Str",uiForm.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: 101192
Project: 101192
Buggy source:
public void execute(Event<UIIFrameEditMode> event) throws Exception {
  UIIFrameEditMode uiForm=event.getSource();
  String url=uiForm.getUIStringInput(FIELD_URL).getValue();
  if (url == null || url.length() == 0) {
    UIIFramePortlet uiPortlet=uiForm.getParent();
    Object args[]={uiForm.getLabel(uiForm.getUIStringInput(FIELD_URL).getId())};
    uiPortlet.addMessage(new ApplicationMessage("String_Node_Str",args));
    uiForm.getUIStringInput(FIELD_URL).setValue(uiPortlet.getURL());
    return;
  }
  try {
    PortletRequestContext pcontext=(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
    PortletPreferences pref=pcontext.getRequest().getPreferences();
    new URL(url);
    pref.setValue("String_Node_Str",uiForm.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));
  }
}

Fixed version (ground truth):
public void execute(Event<UIIFrameEditMode> event) throws Exception {
  UIIFrameEditMode uiForm=event.getSource();
  String url=uiForm.getUIStringInput(FIELD_URL).getValue();
  UIIFramePortlet uiPortlet=uiForm.getParent();
  if (url == null || url.length() == 0) {
    Object args[]={uiForm.getLabel(uiForm.getUIStringInput(FIELD_URL).getId())};
    uiPortlet.addMessage(new ApplicationMessage("String_Node_Str",args));
    uiForm.getUIStringInput(FIELD_URL).setValue(uiPortlet.getURL());
    return;
  }
  try {
    PortletRequestContext pcontext=(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
    PortletPreferences pref=pcontext.getRequest().getPreferences();
    new URL(url);
    pref.setValue("String_Node_Str",uiForm.getUIStringInput(FIELD_URL).getValue());
    pref.store();
    pcontext.setApplicationMode(PortletMode.VIEW);
  }
 catch (  Exception e) {
    uiForm.getUIStringInput(FIELD_URL).setValue(uiPortlet.getURL());
    Object[] args={FIELD_URL,"String_Node_Str"};
    throw new MessageException(new ApplicationMessage("String_Node_Str",args));
  }
}
Program: 101193
Project: 101193
Buggy source:
@SuppressWarnings("String_Node_Str") public void execute(WebAppController controller,HttpServletRequest req,HttpServletResponse res) throws Exception {
  res.setHeader("String_Node_Str","String_Node_Str");
  ExoContainer container=PortalContainer.getInstance();
  DownloadService dservice=(DownloadService)container.getComponentInstanceOfType(DownloadService.class);
  DownloadResource dresource=dservice.getDownloadResource(resourceId);
  if (dresource == null) {
    res.setContentType("String_Node_Str");
    res.getWriter().write("String_Node_Str");
    return;
  }
  if (dresource.getDownloadName() != null) {
    String fileName=dresource.getDownloadName();
    fileName=URLEncoder.encode(fileName,"String_Node_Str");
    res.setHeader("String_Node_Str","String_Node_Str" + fileName);
  }
  res.setContentType(dresource.getResourceMimeType());
  InputStream is=dresource.getInputStream();
  byte[] buf=new byte[is.available()];
  is.read(buf);
  res.setContentType(dresource.getResourceMimeType());
  res.getOutputStream().write(buf);
  is.close();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void execute(WebAppController controller,HttpServletRequest req,HttpServletResponse res) throws Exception {
  res.setHeader("String_Node_Str","String_Node_Str");
  ExoContainer container=PortalContainer.getInstance();
  DownloadService dservice=(DownloadService)container.getComponentInstanceOfType(DownloadService.class);
  DownloadResource dresource=dservice.getDownloadResource(resourceId);
  if (dresource == null) {
    res.setContentType("String_Node_Str");
    res.getWriter().write("String_Node_Str");
    return;
  }
  if (dresource.getDownloadName() != null) {
    res.setHeader("String_Node_Str","String_Node_Str" + dresource.getDownloadName() + "String_Node_Str");
  }
  res.setContentType(dresource.getResourceMimeType());
  InputStream is=dresource.getInputStream();
  byte[] buf=new byte[is.available()];
  is.read(buf);
  res.setContentType(dresource.getResourceMimeType());
  res.getOutputStream().write(buf);
  is.close();
}