nus-yam/ex-repair huggingface dataset:
Program: 56903
Project: 56903
Buggy source:
/** 
 * <p>Check whether the input needs to be wrapped on a div containing the "form-group" class.</p> This method return true in the following cases: <ul> <li>The direct parent of the component passed as argument is an instance of   {@link FormGroup}</li> </ul> In any other case, this method will return false.
 * @param component
 * @return 
 */
protected boolean hasToRenderFormGroup(UIComponent component){
  return component.getParent() instanceof FormGroup;
}

Fixed version (ground truth):
/** 
 * <p>Check whether the input needs to be wrapped on a div containing the "form-group" class.</p> This method return true in the following cases: <ul> <li>The direct parent of the component passed as argument is an instance of   {@link FormGroup}</li> </ul> In any other case, this method will return false.
 * @param component
 * @return 
 */
protected boolean hasToRenderFormGroup(UIComponent component){
  return !(component.getParent() instanceof FormGroup);
}
Program: 56904
Project: 56904
Buggy source:
/** 
 * Internal method to do translations
 * @param formatString
 * @param mapping
 * @return
 */
private static String translateFormat(String formatString,Map<String,String> mapping,String escapeStart,String escapeEnd,String targetEscapeStart,String targetEscapeEnd){
  int beginIndex=0;
  int i=0;
  char lastChar=0;
  char currentChar=0;
  String resultString="String_Node_Str";
  char esc1=escapeStart.charAt(0);
  char esc2=escapeEnd.charAt(0);
  for (; i < formatString.length(); i++) {
    currentChar=formatString.charAt(i);
    if (i > 0 && lastChar != currentChar) {
      resultString+=mapSubformat(formatString,mapping,beginIndex,i,escapeStart,escapeEnd,targetEscapeStart,targetEscapeEnd);
      beginIndex=i;
    }
    lastChar=currentChar;
    if (currentChar == esc1) {
      i++;
      while (i < formatString.length() && formatString.charAt(i) != esc2) {
        i++;
      }
      resultString+=targetEscapeStart;
      resultString+=formatString.substring(beginIndex + 1,i);
      resultString+=targetEscapeEnd;
      i++;
      if (i < formatString.length()) {
        lastChar=formatString.charAt(i);
      }
      beginIndex=i;
    }
  }
  return resultString + mapSubformat(formatString,mapping,beginIndex,i,escapeStart,escapeEnd,targetEscapeStart,targetEscapeEnd);
}

Fixed version (ground truth):
/** 
 * Internal method to do translations
 * @param formatString
 * @param mapping
 * @return
 */
private static String translateFormat(String formatString,Map<String,String> mapping,String escapeStart,String escapeEnd,String targetEscapeStart,String targetEscapeEnd){
  int beginIndex=0;
  int i=0;
  char lastChar=0;
  char currentChar=0;
  String resultString="String_Node_Str";
  char esc1=escapeStart.charAt(0);
  char esc2=escapeEnd.charAt(0);
  for (; i < formatString.length(); i++) {
    currentChar=formatString.charAt(i);
    if (i > 0 && lastChar != currentChar) {
      resultString+=mapSubformat(formatString,mapping,beginIndex,i,escapeStart,escapeEnd,targetEscapeStart,targetEscapeEnd);
      beginIndex=i;
    }
    lastChar=currentChar;
    if (currentChar == esc1) {
      i++;
      while (i < formatString.length() && formatString.charAt(i) != esc2) {
        i++;
      }
      resultString+=targetEscapeStart;
      resultString+=formatString.substring(beginIndex + 1,i);
      resultString+=targetEscapeEnd;
      i++;
      if (i < formatString.length()) {
        lastChar=formatString.charAt(i);
      }
      beginIndex=i;
    }
  }
  if (beginIndex < formatString.length() && i <= formatString.length()) {
    return resultString + mapSubformat(formatString,mapping,beginIndex,i,escapeStart,escapeEnd,targetEscapeStart,targetEscapeEnd);
  }
 else {
    return resultString;
  }
}
Program: 56905
Project: 56905
Buggy source:
@Override public Object getConvertedValue(FacesContext context,Object submittedValue) throws ConverterException {
  if (submittedValue == null) {
    return null;
  }
  String val=(String)submittedValue;
  if (val.trim().length() == 0) {
    return null;
  }
  Converter converter=this.getConverter();
  if (converter != null) {
    return converter.getAsObject(context,this,val);
  }
  Locale sloc=BsfUtils.selectLocale(context.getViewRoot().getLocale(),this.getLocale(),this);
  String componentFormat=BsfUtils.selectDateTimeFormat(sloc,this.getFormat(),this.isShowDate(),this.isShowTime());
  String sdf=BsfUtils.selectDateFormat(sloc,componentFormat);
  sdf=LocaleUtils.momentToJavaFormat(sdf);
  Calendar cal=Calendar.getInstance(sloc);
  SimpleDateFormat format=new SimpleDateFormat(sdf,sloc);
  format.setTimeZone(cal.getTimeZone());
  try {
    cal.setTime(format.parse(val));
    return cal.getTime();
  }
 catch (  ParseException e) {
    try {
      cal.setTime(LocaleUtils.autoParseDateFormat(val));
      return cal.getTime();
    }
 catch (    Exception pe) {
      e.printStackTrace();
      this.setValid(false);
      throw new ConverterException(BsfUtils.getMessage("String_Node_Str",val,sdf,BsfUtils.getLabel(context,this)));
    }
  }
}

Fixed version (ground truth):
/** 
 * Converts the date from the moment.js format to a java.util.Date.
 */
@Override public Object getConvertedValue(FacesContext context,Object submittedValue) throws ConverterException {
  if (submittedValue == null) {
    return null;
  }
  String val=(String)submittedValue;
  if (val.trim().length() == 0) {
    return null;
  }
  Converter converter=this.getConverter();
  if (converter != null) {
    return converter.getAsObject(context,this,val);
  }
  Locale sloc=BsfUtils.selectLocale(context.getViewRoot().getLocale(),this.getLocale(),this);
  String momentJSFormat=BsfUtils.selectMomentJSDateTimeFormat(sloc,this.getFormat(),this.isShowDate(),this.isShowTime());
  String javaFormat=LocaleUtils.momentToJavaFormat(momentJSFormat);
  Calendar cal=Calendar.getInstance(sloc);
  SimpleDateFormat format=new SimpleDateFormat(javaFormat,sloc);
  format.setTimeZone(cal.getTimeZone());
  try {
    cal.setTime(format.parse(val));
    return cal.getTime();
  }
 catch (  ParseException e) {
    try {
      cal.setTime(LocaleUtils.autoParseDateFormat(val));
      return cal.getTime();
    }
 catch (    Exception pe) {
      e.printStackTrace();
      this.setValid(false);
      throw new ConverterException(BsfUtils.getMessage("String_Node_Str",val,javaFormat,BsfUtils.getLabel(context,this)));
    }
  }
}
Program: 56907
Project: 56907
Buggy source:
public static String getInternalDateAsString(Object dt,String format,Locale locale){
  if (dt == null) {
    return null;
  }
  if (dt instanceof String) {
    return (String)dt;
  }
 else   if (dt instanceof Date) {
    return TestSingleton.getInstance().formatDate((Date)dt,format);
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
public static String getInternalDateAsString(Object dt,String javaFormatString,Locale locale){
  if (dt == null) {
    return null;
  }
  if (dt instanceof String) {
    return (String)dt;
  }
 else   if (dt instanceof Date) {
    SimpleDateFormat dtFormat=new SimpleDateFormat(javaFormatString,locale);
    String result=dtFormat.format((Date)dt);
    return result;
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}
Program: 56908
Project: 56908
Buggy source:
@Override public void decode(FacesContext context,UIComponent component){
  DateTimePicker dtp=(DateTimePicker)component;
  String clientId=dtp.getClientId();
  String subVal=context.getExternalContext().getRequestParameterMap().get(dtp.getClientId());
  if (dtp.isDisabled() || dtp.isReadonly()) {
    return;
  }
  if (subVal != null) {
    dtp.setSubmittedValue(subVal);
    dtp.setValid(true);
  }
  String fieldId=dtp.getFieldId();
  if (null == fieldId) {
    fieldId=clientId + "String_Node_Str";
  }
  new AJAXRenderer().decode(context,dtp,fieldId);
  new AJAXRenderer().decode(context,dtp,clientId);
}

Fixed version (ground truth):
@Override public void decode(FacesContext context,UIComponent component){
  DateTimePicker dtp=(DateTimePicker)component;
  String clientId=dtp.getClientId();
  String subVal=context.getExternalContext().getRequestParameterMap().get(dtp.getClientId());
  if (dtp.isDisabled() || dtp.isReadonly()) {
    return;
  }
  if (subVal != null) {
    dtp.setSubmittedValue(subVal);
    dtp.setValid(true);
  }
  String fieldId=dtp.getFieldId();
  if (null == fieldId) {
    fieldId=clientId + "String_Node_Str";
  }
  new AJAXRenderer().decode(context,dtp,fieldId);
}
Program: 56909
Project: 56909
Buggy source:
/** 
 * Get value displayable
 * @param ctx
 * @param dtp
 * @return
 */
public static String getValueAsString(Object value,FacesContext ctx,DateTimePicker dtp){
  if (value == null) {
    return null;
  }
  Locale sloc=BsfUtils.selectLocale(ctx.getViewRoot().getLocale(),dtp.getLocale(),dtp);
  String sdf=BsfUtils.selectDateFormat(sloc,dtp.getFormat());
  sdf=LocaleUtils.momentToJavaFormat(sdf);
  return getDateAsString(ctx,dtp,value,sdf,sloc);
}

Fixed version (ground truth):
/** 
 * Yields the value which is displayed in the input field of the date picker.
 * @param ctx
 * @param dtp
 * @return
 */
public static String getValueAsString(Object value,FacesContext ctx,DateTimePicker dtp){
  if (value == null) {
    return null;
  }
  Locale sloc=BsfUtils.selectLocale(ctx.getViewRoot().getLocale(),dtp.getLocale(),dtp);
  String javaFormatString=BsfUtils.selectJavaDateTimeFormatFromMomentJSFormatOrDefault(sloc,dtp.getFormat(),dtp.isShowDate(),dtp.isShowTime());
  return getDateAsString(ctx,dtp,value,javaFormatString,sloc);
}
Program: 56910
Project: 56910
Buggy source:
/** 
 * Get date in string format
 * @param value
 * @param format
 * @param locale
 * @return
 */
public static String getDateAsString(FacesContext fc,DateTimePicker dtp,Object value,String format,Locale locale){
  if (value == null) {
    return null;
  }
  Converter converter=dtp.getConverter();
  return converter == null ? getInternalDateAsString(value,format,locale) : converter.getAsString(fc,dtp,value);
}

Fixed version (ground truth):
/** 
 * Get date in string format
 * @param value
 * @param format
 * @param locale
 * @return
 */
public static String getDateAsString(FacesContext fc,DateTimePicker dtp,Object value,String javaFormatString,Locale locale){
  if (value == null) {
    return null;
  }
  Converter converter=dtp.getConverter();
  return converter == null ? getInternalDateAsString(value,javaFormatString,locale) : converter.getAsString(fc,dtp,value);
}
Program: 56911
Project: 56911
Buggy source:
/** 
 * Append the new mapping
 * @param formatString
 * @param mapping
 * @param beginIndex
 * @param currentIndex
 * @param resultString
 * @return
 */
private static String mapSubformat(String formatString,Map<String,String> mapping,int beginIndex,int currentIndex,String escapeStart,String escapeEnd){
  String subformat=formatString.substring(beginIndex,currentIndex);
  if (subformat.equals(escapeStart) || subformat.equals(escapeEnd)) {
    return escapeStart + "String_Node_Str" + escapeEnd;
  }
  if (mapping.containsKey(subformat)) {
    String result=mapping.get(subformat);
    if (result == null || result.length() == 0) {
      return escapeStart + "String_Node_Str" + subformat+ "String_Node_Str"+ escapeEnd;
    }
    return result;
  }
  return subformat;
}

Fixed version (ground truth):
/** 
 * Append the new mapping
 * @param formatString
 * @param mapping
 * @param beginIndex
 * @param currentIndex
 * @param resultString
 * @return
 */
private static String mapSubformat(String formatString,Map<String,String> mapping,int beginIndex,int currentIndex,String escapeStart,String escapeEnd,String targetEscapeStart,String targetEscapeEnd){
  String subformat=formatString.substring(beginIndex,currentIndex);
  if (subformat.equals(escapeStart) || subformat.equals(escapeEnd)) {
    return targetEscapeStart + "String_Node_Str" + targetEscapeEnd;
  }
  if (mapping.containsKey(subformat)) {
    String result=mapping.get(subformat);
    if (result == null || result.length() == 0) {
      return targetEscapeStart + "String_Node_Str" + subformat+ "String_Node_Str"+ targetEscapeEnd;
    }
    return result;
  }
  return subformat;
}
Program: 56912
Project: 56912
Buggy source:
/** 
 * Internal method to do translations
 * @param formatString
 * @param mapping
 * @return
 */
private static String translateFormat(String formatString,Map<String,String> mapping,String escapeStart,String escapeEnd,String targetEscapeStart,String targetEscapeEnd){
  int beginIndex=0;
  int i=0;
  char lastChar=0;
  char currentChar=0;
  String resultString="String_Node_Str";
  char esc1=escapeStart.charAt(0);
  char esc2=escapeEnd.charAt(0);
  for (; i < formatString.length(); i++) {
    currentChar=formatString.charAt(i);
    if (i > 0 && lastChar != currentChar) {
      resultString+=mapSubformat(formatString,mapping,beginIndex,i,targetEscapeStart,targetEscapeEnd);
      beginIndex=i;
    }
    lastChar=currentChar;
    if (currentChar == esc1) {
      i++;
      while (i < formatString.length() && formatString.charAt(i) != esc2) {
        i++;
      }
      resultString+=targetEscapeStart;
      resultString+=formatString.substring(beginIndex + 1,i);
      resultString+=targetEscapeEnd;
      i++;
      if (i < formatString.length()) {
        lastChar=formatString.charAt(i);
      }
      beginIndex=i;
    }
  }
  return resultString + mapSubformat(formatString,mapping,beginIndex,i,escapeStart,escapeEnd);
}

Fixed version (ground truth):
/** 
 * Internal method to do translations
 * @param formatString
 * @param mapping
 * @return
 */
private static String translateFormat(String formatString,Map<String,String> mapping,String escapeStart,String escapeEnd,String targetEscapeStart,String targetEscapeEnd){
  int beginIndex=0;
  int i=0;
  char lastChar=0;
  char currentChar=0;
  String resultString="String_Node_Str";
  char esc1=escapeStart.charAt(0);
  char esc2=escapeEnd.charAt(0);
  for (; i < formatString.length(); i++) {
    currentChar=formatString.charAt(i);
    if (i > 0 && lastChar != currentChar) {
      resultString+=mapSubformat(formatString,mapping,beginIndex,i,escapeStart,escapeEnd,targetEscapeStart,targetEscapeEnd);
      beginIndex=i;
    }
    lastChar=currentChar;
    if (currentChar == esc1) {
      i++;
      while (i < formatString.length() && formatString.charAt(i) != esc2) {
        i++;
      }
      resultString+=targetEscapeStart;
      resultString+=formatString.substring(beginIndex + 1,i);
      resultString+=targetEscapeEnd;
      i++;
      if (i < formatString.length()) {
        lastChar=formatString.charAt(i);
      }
      beginIndex=i;
    }
  }
  return resultString + mapSubformat(formatString,mapping,beginIndex,i,escapeStart,escapeEnd,targetEscapeStart,targetEscapeEnd);
}
Program: 56913
Project: 56913
Buggy source:
/** 
 * Integer value to specify how many columns to span on small screens (≥768p pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getColSm(){
  return (String)getStateHelper().eval(PropertyKeys.colSm,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Integer value to specify how many columns to span on small screens (≥768p pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file.
 */
public String getColSm(){
  return (String)getStateHelper().eval(PropertyKeys.colSm,"String_Node_Str");
}
Program: 56914
Project: 56914
Buggy source:
/** 
 * Alternative spelling to col-lg. Integer value to specify how many columns to span on large screens (≥1200 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getLargeScreen(){
  return (String)getStateHelper().eval(PropertyKeys.largeScreen,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Alternative spelling to col-lg. Integer value to specify how many columns to span on large screens (≥1200 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file.
 */
public String getLargeScreen(){
  return (String)getStateHelper().eval(PropertyKeys.largeScreen,"String_Node_Str");
}
Program: 56915
Project: 56915
Buggy source:
/** 
 * If set to false, this feature completely disables the search functionality of the datatable (i.e. both the UI and the JavaScript API). <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isSearching(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.searching,true);
}

Fixed version (ground truth):
/** 
 * If set to false, this feature completely disables the search functionality of the datatable (i.e. both the UI and the JavaScript API). <P>
 * @return Returns the value of the attribute, or true, if it hasn't been set by the JSF file.
 */
public boolean isSearching(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.searching,true);
}
Program: 56916
Project: 56916
Buggy source:
/** 
 * Boolean value to specify if the button is disabled. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isDisabled(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.disabled,false);
}

Fixed version (ground truth):
/** 
 * Boolean value to specify if the button is disabled. <P>
 * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file.
 */
public boolean isDisabled(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.disabled,false);
}
Program: 56917
Project: 56917
Buggy source:
/** 
 * Integer value to specify how many columns to span on large screens (≥1200 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getColLg(){
  return (String)getStateHelper().eval(PropertyKeys.colLg,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Integer value to specify how many columns to span on large screens (≥1200 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file.
 */
public String getColLg(){
  return (String)getStateHelper().eval(PropertyKeys.colLg,"String_Node_Str");
}
Program: 56918
Project: 56918
Buggy source:
/** 
 * If set, this will have the container match the height of the rows shown in the table if that height is smaller than that given height by the scroll-size. Default: true. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isScrollCollapse(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.scrollCollapse,true);
}

Fixed version (ground truth):
/** 
 * If set, this will have the container match the height of the rows shown in the table if that height is smaller than that given height by the scroll-size. Default: true. <P>
 * @return Returns the value of the attribute, or true, if it hasn't been set by the JSF file.
 */
public boolean isScrollCollapse(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.scrollCollapse,true);
}
Program: 56919
Project: 56919
Buggy source:
/** 
 * Alternative spelling to col-sm. Integer value to specify how many columns to span on small screens (≥768p pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getSmallScreen(){
  return (String)getStateHelper().eval(PropertyKeys.smallScreen,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Alternative spelling to col-sm. Integer value to specify how many columns to span on small screens (≥768p pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file.
 */
public String getSmallScreen(){
  return (String)getStateHelper().eval(PropertyKeys.smallScreen,"String_Node_Str");
}
Program: 56920
Project: 56920
Buggy source:
/** 
 * Activates the fixed header plugin of the dataTable. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isFixedHeader(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.fixedHeader,false);
}

Fixed version (ground truth):
/** 
 * Activates the fixed header plugin of the dataTable. <P>
 * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file.
 */
public boolean isFixedHeader(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.fixedHeader,false);
}
Program: 56921
Project: 56921
Buggy source:
/** 
 * Activates the pagination of the dataTable. Default value is 'true'. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isPaginated(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.paginated,true);
}

Fixed version (ground truth):
/** 
 * Activates the pagination of the dataTable. Default value is 'true'. <P>
 * @return Returns the value of the attribute, or true, if it hasn't been set by the JSF file.
 */
public boolean isPaginated(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.paginated,true);
}
Program: 56922
Project: 56922
Buggy source:
/** 
 * If set, this will surround the table by a border. Defaults to true. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isBorder(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.border,true);
}

Fixed version (ground truth):
/** 
 * If set, this will surround the table by a border. Defaults to true. <P>
 * @return Returns the value of the attribute, or true, if it hasn't been set by the JSF file.
 */
public boolean isBorder(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.border,true);
}
Program: 56923
Project: 56923
Buggy source:
/** 
 * The tooltip is shown and hidden with a delay. This value is the delay in milliseconds. Defaults to 0 (no delay). <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public int getTooltipDelay(){
  return (int)(Integer)getStateHelper().eval(PropertyKeys.tooltipDelay,0);
}

Fixed version (ground truth):
/** 
 * The tooltip is shown and hidden with a delay. This value is the delay in milliseconds. Defaults to 0 (no delay). <P>
 * @return Returns the value of the attribute, or 0, if it hasn't been set by the JSF file.
 */
public int getTooltipDelay(){
  return (int)(Integer)getStateHelper().eval(PropertyKeys.tooltipDelay,0);
}
Program: 56924
Project: 56924
Buggy source:
/** 
 * If set, this will show the row in alternating background colors (typically shades of gray). Defaults to true. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isStriped(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.striped,true);
}

Fixed version (ground truth):
/** 
 * If set, this will show the row in alternating background colors (typically shades of gray). Defaults to true. <P>
 * @return Returns the value of the attribute, or true, if it hasn't been set by the JSF file.
 */
public boolean isStriped(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.striped,true);
}
Program: 56925
Project: 56925
Buggy source:
/** 
 * The tooltip is hidden with a delay. This value is the delay in milliseconds. Defaults to 0 (no delay). <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public int getTooltipDelayHide(){
  return (int)(Integer)getStateHelper().eval(PropertyKeys.tooltipDelayHide,0);
}

Fixed version (ground truth):
/** 
 * The tooltip is hidden with a delay. This value is the delay in milliseconds. Defaults to 0 (no delay). <P>
 * @return Returns the value of the attribute, or 0, if it hasn't been set by the JSF file.
 */
public int getTooltipDelayHide(){
  return (int)(Integer)getStateHelper().eval(PropertyKeys.tooltipDelayHide,0);
}
Program: 56926
Project: 56926
Buggy source:
/** 
 * Alternative spelling to col-md. Integer value to specify how many columns to span on medium screens (≥992 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getMediumScreen(){
  return (String)getStateHelper().eval(PropertyKeys.mediumScreen,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Alternative spelling to col-md. Integer value to specify how many columns to span on medium screens (≥992 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file.
 */
public String getMediumScreen(){
  return (String)getStateHelper().eval(PropertyKeys.mediumScreen,"String_Node_Str");
}
Program: 56927
Project: 56927
Buggy source:
/** 
 * Sets the default page length for paginated dataTable. The default value is 10. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public int getPageLength(){
  return (int)(Integer)getStateHelper().eval(PropertyKeys.pageLength,10);
}

Fixed version (ground truth):
/** 
 * Sets the default page length for paginated dataTable. The default value is 10. <P>
 * @return Returns the value of the attribute, or 10, if it hasn't been set by the JSF file.
 */
public int getPageLength(){
  return (int)(Integer)getStateHelper().eval(PropertyKeys.pageLength,10);
}
Program: 56928
Project: 56928
Buggy source:
/** 
 * If true, &lt;b:inputText /&gt; fields will be generated at the bottom of each column which allow you to perform per-column filtering. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isMultiColumnSearch(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.multiColumnSearch,false);
}

Fixed version (ground truth):
/** 
 * If true, &lt;b:inputText /&gt; fields will be generated at the bottom of each column which allow you to perform per-column filtering. <P>
 * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file.
 */
public boolean isMultiColumnSearch(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.multiColumnSearch,false);
}
Program: 56929
Project: 56929
Buggy source:
/** 
 * Stores the state of the datatable on the client, so that after a page reload the same filters are active, the same page is shown etc. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isSaveState(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.saveState,true);
}

Fixed version (ground truth):
/** 
 * Stores the state of the datatable on the client, so that after a page reload the same filters are active, the same page is shown etc. <P>
 * @return Returns the value of the attribute, or true, if it hasn't been set by the JSF file.
 */
public boolean isSaveState(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.saveState,true);
}
Program: 56930
Project: 56930
Buggy source:
/** 
 * Enable the row highlight css. Default: true. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isRowHighlight(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.rowHighlight,true);
}

Fixed version (ground truth):
/** 
 * Enable the row highlight css. Default: true. <P>
 * @return Returns the value of the attribute, or true, if it hasn't been set by the JSF file.
 */
public boolean isRowHighlight(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.rowHighlight,true);
}
Program: 56931
Project: 56931
Buggy source:
/** 
 * Integer value to specify how many columns to span on tiny screens (≤ 767 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getColXs(){
  return (String)getStateHelper().eval(PropertyKeys.colXs,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Integer value to specify how many columns to span on tiny screens (≤ 767 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file.
 */
public String getColXs(){
  return (String)getStateHelper().eval(PropertyKeys.colXs,"String_Node_Str");
}
Program: 56932
Project: 56932
Buggy source:
/** 
 * Sets the default page length for paginated dataTable. The default value is [10, 25, 50, 100]. The brackets are optional. Read https://www.datatables.net/examples/advanced_init/length_menu.html for details. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getPageLengthMenu(){
  return (String)getStateHelper().eval(PropertyKeys.pageLengthMenu,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Sets the default page length for paginated dataTable. The default value is [10, 25, 50, 100]. The brackets are optional. Read https://www.datatables.net/examples/advanced_init/length_menu.html for details. <P>
 * @return Returns the value of the attribute, or "[ 10, 25, 50, 100 ]", if it hasn't been set by the JSF file.
 */
public String getPageLengthMenu(){
  return (String)getStateHelper().eval(PropertyKeys.pageLengthMenu,"String_Node_Str");
}
Program: 56933
Project: 56933
Buggy source:
/** 
 * The tooltip is shown with a delay. This value is the delay in milliseconds. Defaults to 0 (no delay). <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public int getTooltipDelayShow(){
  return (int)(Integer)getStateHelper().eval(PropertyKeys.tooltipDelayShow,0);
}

Fixed version (ground truth):
/** 
 * The tooltip is shown with a delay. This value is the delay in milliseconds. Defaults to 0 (no delay). <P>
 * @return Returns the value of the attribute, or 0, if it hasn't been set by the JSF file.
 */
public int getTooltipDelayShow(){
  return (int)(Integer)getStateHelper().eval(PropertyKeys.tooltipDelayShow,0);
}
Program: 56934
Project: 56934
Buggy source:
/** 
 * Integer value to specify how many columns to span on medium screens (≥992 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getColMd(){
  return (String)getStateHelper().eval(PropertyKeys.colMd,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Integer value to specify how many columns to span on medium screens (≥992 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file.
 */
public String getColMd(){
  return (String)getStateHelper().eval(PropertyKeys.colMd,"String_Node_Str");
}
Program: 56935
Project: 56935
Buggy source:
/** 
 * Set this property to "single" if you want to prevent multiple selections. Default is "multiple". <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getSelectionMode(){
  return (String)getStateHelper().eval(PropertyKeys.selectionMode,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Set this property to "single" if you want to prevent multiple selections. Default is "multiple". <P>
 * @return Returns the value of the attribute, or "multiple", if it hasn't been set by the JSF file.
 */
public String getSelectionMode(){
  return (String)getStateHelper().eval(PropertyKeys.selectionMode,"String_Node_Str");
}
Program: 56936
Project: 56936
Buggy source:
/** 
 * Activates AJAX. The default value is false (no AJAX). <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isAjax(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.ajax,false);
}

Fixed version (ground truth):
/** 
 * Activates AJAX. The default value is false (no AJAX). <P>
 * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file.
 */
public boolean isAjax(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.ajax,false);
}
Program: 56937
Project: 56937
Buggy source:
/** 
 * Activates the responsive plugin of the dataTable <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isResponsive(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.responsive,false);
}

Fixed version (ground truth):
/** 
 * Activates the responsive plugin of the dataTable <P>
 * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file.
 */
public boolean isResponsive(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.responsive,false);
}
Program: 56938
Project: 56938
Buggy source:
/** 
 * Where is the tooltip div generated? That's primarily a technical value that can be used to fix rendering errors in special cases. Also see data-container in the documentation of Bootstrap. The default value is body. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getTooltipContainer(){
  return (String)getStateHelper().eval(PropertyKeys.tooltipContainer,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Where is the tooltip div generated? That's primarily a technical value that can be used to fix rendering errors in special cases. Also see data-container in the documentation of Bootstrap. The default value is body. <P>
 * @return Returns the value of the attribute, or "body", if it hasn't been set by the JSF file.
 */
public String getTooltipContainer(){
  return (String)getStateHelper().eval(PropertyKeys.tooltipContainer,"String_Node_Str");
}
Program: 56939
Project: 56939
Buggy source:
/** 
 * Flag indicating that, if this component is activated by the user, notifications should be delivered to interested listeners and actions immediately (that is, during Apply Request Values phase) rather than waiting until Invoke Application phase. Default is false. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isImmediate(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.immediate,false);
}

Fixed version (ground truth):
/** 
 * Flag indicating that, if this component is activated by the user, notifications should be delivered to interested listeners and actions immediately (that is, during Apply Request Values phase) rather than waiting until Invoke Application phase. Default is false. <P>
 * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file.
 */
public boolean isImmediate(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.immediate,false);
}
Program: 56940
Project: 56940
Buggy source:
/** 
 * If set, the table can scroll horizontally. Defaults to false. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isScrollX(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.scrollX,false);
}

Fixed version (ground truth):
/** 
 * If set, the table can scroll horizontally. Defaults to false. <P>
 * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file.
 */
public boolean isScrollX(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.scrollX,false);
}
Program: 56941
Project: 56941
Buggy source:
/** 
 * Allows the user to select rows. Defaults to false. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isSelect(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.select,false);
}

Fixed version (ground truth):
/** 
 * Allows the user to select rows. Defaults to false. <P>
 * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file.
 */
public boolean isSelect(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.select,false);
}
Program: 56942
Project: 56942
Buggy source:
/** 
 * Alternative spelling to col-xs. Integer value to specify how many columns to span on tiny screens (≤ 767 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getTinyScreen(){
  return (String)getStateHelper().eval(PropertyKeys.tinyScreen,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Alternative spelling to col-xs. Integer value to specify how many columns to span on tiny screens (≤ 767 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P>
 * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file.
 */
public String getTinyScreen(){
  return (String)getStateHelper().eval(PropertyKeys.tinyScreen,"String_Node_Str");
}
Program: 56943
Project: 56943
Buggy source:
/** 
 * If you use the "visible" attribute, the value of this attribute is added. Legal values: block, inline, inline-block. Default: block. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getDisplay(){
  return (String)getStateHelper().eval(PropertyKeys.display,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * If you use the "visible" attribute, the value of this attribute is added. Legal values: block, inline, inline-block. Default: block. <P>
 * @return Returns the value of the attribute, or "block", if it hasn't been set by the JSF file.
 */
public String getDisplay(){
  return (String)getStateHelper().eval(PropertyKeys.display,"String_Node_Str");
}
Program: 56944
Project: 56944
Buggy source:
/** 
 * Show or hide the calendar icon next to the input field. Legal values: 'true' and 'false'. Default value: 'true'. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isShowIcon(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.showIcon,false);
}

Fixed version (ground truth):
/** 
 * Show or hide the calendar icon next to the input field. Legal values: 'true' and 'false'. Default value: 'true'. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public boolean isShowIcon(){
  return (boolean)(Boolean)getStateHelper().eval(PropertyKeys.showIcon,true);
}
Program: 56948
Project: 56948
Buggy source:
@Override public void decode(FacesContext context,UIComponent component){
  DateTimePicker dtp=(DateTimePicker)component;
  String clientId=dtp.getClientId();
  String subVal=context.getExternalContext().getRequestParameterMap().get(dtp.getClientId());
  if (dtp.isDisabled() || dtp.isReadonly()) {
    return;
  }
  if (subVal != null) {
    dtp.setSubmittedValue(subVal);
    dtp.setValid(true);
  }
  new AJAXRenderer().decode(context,dtp,clientId + "String_Node_Str");
  new AJAXRenderer().decode(context,dtp,clientId);
}

Fixed version (ground truth):
@Override public void decode(FacesContext context,UIComponent component){
  DateTimePicker dtp=(DateTimePicker)component;
  String clientId=dtp.getClientId();
  String subVal=context.getExternalContext().getRequestParameterMap().get(dtp.getClientId());
  if (dtp.isDisabled() || dtp.isReadonly()) {
    return;
  }
  if (subVal != null) {
    dtp.setSubmittedValue(subVal);
    dtp.setValid(true);
  }
  String fieldId=dtp.getFieldId();
  if (null == fieldId) {
    fieldId=clientId + "String_Node_Str";
  }
  new AJAXRenderer().decode(context,dtp,fieldId);
  new AJAXRenderer().decode(context,dtp,clientId);
}
Program: 56951
Project: 56951
Buggy source:
public static final void datePicker(ResponseWriter rw,String cId,String dpId,String opts,String region) throws IOException {
  startInlineF(rw,cId);
  StringBuilder sb=new StringBuilder(150);
  String sel=DP_SEL_INPUT.replace(WID,dpId);
  if (region != null)   sb.append(DP_REGION.replace(SEL,sel).replace("String_Node_Str",region));
  if (!cId.equals(dpId)) {
    sel=DP_SEL_DIV.replace(WID,dpId);
    sb.append(DP_START.replace(SEL,sel)).append(opts);
    sb.append(DP_SELECT.replace(CID,cId));
  }
 else {
    sb.append(DP_START.replace(SEL,sel)).append(opts);
  }
  sb.append(END_F);
  rw.write(sb.toString());
  endInlineF(rw);
}

Fixed version (ground truth):
public static final void datePicker(ResponseWriter rw,String cId,String dpId,String opts,String region) throws IOException {
  startInlineF(rw,cId);
  StringBuilder sb=new StringBuilder(150);
  String sel=DP_SEL_INPUT.replace(WID,dpId);
  if (region != null)   sb.append(DP_REGION.replace(SEL,sel).replace("String_Node_Str",region));
  if (!cId.equals(dpId)) {
    sel=DP_SEL_DIV.replace(WID,dpId);
    sb.append(DP_START.replace(SEL,sel)).append(opts);
    if (sb.length() > 0 && sb.charAt(sb.length() - 1) != ',') {
      sb.append(',');
    }
    sb.append(DP_SELECT.replace(CID,cId));
  }
 else {
    sb.append(DP_START.replace(SEL,sel)).append(opts);
  }
  sb.append(END_F);
  rw.write(sb.toString());
  endInlineF(rw);
}
Program: 56953
Project: 56953
Buggy source:
/** 
 * Value of the item. Must be omitted if you use the traditional JSF approach using <f:selectItem /> or <f:selectItems />. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getItemValue(){
  return (String)getStateHelper().eval(PropertyKeys.itemValue);
}

Fixed version (ground truth):
/** 
 * Value of the item. Must be omitted if you use the traditional JSF approach using &lt;f:selectItem /&gt; or &lt;f:selectItems /&gt;. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getItemValue(){
  return (String)getStateHelper().eval(PropertyKeys.itemValue);
}
Program: 56954
Project: 56954
Buggy source:
/** 
 * Value of the item. Must be omitted if you use the traditional JSF approach using <f:selectItem /> or <f:selectItems />. <P> Usually this method is called internally by the JSF engine.
 */
public void setItemValue(String _itemValue){
  getStateHelper().put(PropertyKeys.itemValue,_itemValue);
}

Fixed version (ground truth):
/** 
 * Value of the item. Must be omitted if you use the traditional JSF approach using &lt;f:selectItem /&gt; or &lt;f:selectItems /&gt;. <P> Usually this method is called internally by the JSF engine.
 */
public void setItemValue(String _itemValue){
  getStateHelper().put(PropertyKeys.itemValue,_itemValue);
}
Program: 56955
Project: 56955
Buggy source:
/** 
 * The caption of the radio button. Alternatively you can use arbitrary captions by embedding them as child elements of the b:radiobutton. As a third alternative, you can follow the traditional JSF approach using <f:selectItem /> or <f:selectItems />. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getItemLabel(){
  return (String)getStateHelper().eval(PropertyKeys.itemLabel);
}

Fixed version (ground truth):
/** 
 * The caption of the radio button. Alternatively you can use arbitrary captions by embedding them as child elements of the b:radiobutton. As a third alternative, you can follow the traditional JSF approach using &lt;f:f:selectItem /&gt; or &lt;f:selectItems /&gt;. <P>
 * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file.
 */
public String getItemLabel(){
  return (String)getStateHelper().eval(PropertyKeys.itemLabel);
}
Program: 56956
Project: 56956
Buggy source:
/** 
 * The caption of the radio button. Alternatively you can use arbitrary captions by embedding them as child elements of the b:radiobutton. As a third alternative, you can follow the traditional JSF approach using <f:selectItem /> or <f:selectItems />. <P> Usually this method is called internally by the JSF engine.
 */
public void setItemLabel(String _itemLabel){
  getStateHelper().put(PropertyKeys.itemLabel,_itemLabel);
}

Fixed version (ground truth):
/** 
 * The caption of the radio button. Alternatively you can use arbitrary captions by embedding them as child elements of the b:radiobutton. As a third alternative, you can follow the traditional JSF approach using &lt;f:f:selectItem /&gt; or &lt;f:selectItems /&gt;. <P> Usually this method is called internally by the JSF engine.
 */
public void setItemLabel(String _itemLabel){
  getStateHelper().put(PropertyKeys.itemLabel,_itemLabel);
}
Program: 56959
Project: 56959
Buggy source:
public List<UIComponent> resolve(UIComponent component,List<UIComponent> parentComponents,String currentId,String originalExpression,String[] parameters){
  if (null == parameters || parameters.length != 1) {
    throw new FacesException("String_Node_Str" + originalExpression);
  }
  String propertyName="String_Node_Str" + parameters[0] + "String_Node_Str";
  List<UIComponent> result=findPropertyRecursively(component,propertyName);
  return result;
}

Fixed version (ground truth):
public List<UIComponent> resolve(UIComponent component,List<UIComponent> parentComponents,String currentId,String originalExpression,String[] parameters){
  if (null == parameters || parameters.length != 1) {
    throw new FacesException("String_Node_Str" + originalExpression);
  }
  String propertyName="String_Node_Str" + parameters[0] + "String_Node_Str";
  List<UIComponent> result=null;
  for (  UIComponent p : parentComponents) {
    List<UIComponent> r=findPropertyRecursively(p,propertyName);
    if (result == null) {
      result=r;
    }
 else     if (r != null) {
      result.addAll(r);
    }
  }
  return result;
}
Program: 56960
Project: 56960
Buggy source:
public List<UIComponent> resolve(UIComponent component,List<UIComponent> parentComponents,String currentId,String originalExpression,String[] parameters){
  if (null == parameters || parameters.length != 1) {
    throw new FacesException("String_Node_Str" + originalExpression);
  }
  List<UIComponent> result=findStyleClassRecursively(component,parameters[0]);
  return result;
}

Fixed version (ground truth):
public List<UIComponent> resolve(UIComponent component,List<UIComponent> parentComponents,String currentId,String originalExpression,String[] parameters){
  if (null == parameters || parameters.length != 1) {
    throw new FacesException("String_Node_Str" + originalExpression);
  }
  List<UIComponent> result=null;
  for (  UIComponent p : parentComponents) {
    List<UIComponent> r=findStyleClassRecursively(p,parameters[0]);
    if (result == null) {
      result=r;
    }
 else     if (r != null) {
      result.addAll(r);
    }
  }
  return result;
}