nus-yam/ex-repair huggingface dataset:
Program: 186458
Project: 186458
Buggy source:
/** 
 * Parses a value as a String and returns a Number.<br>
 * @param value the string to parse
 * @param min the minimum allowed value
 * @param max the maximum allowed value
 * @param locale the {@link Locale}
 * @return the converted number
 * @throws ConversionException
 */
protected N parse(String value,final double min,final double max,Locale locale) throws ConversionException {
  if (value == null) {
    return null;
  }
  final NumberFormat format=NumberFormat.getCurrencyInstance(locale);
  final N number=this.parse(format,value,locale);
  if (number == null) {
    return null;
  }
  if (number.doubleValue() < min) {
    throw newConversionException("String_Node_Str" + min,value,locale).setFormat(format);
  }
  if (number.doubleValue() > max) {
    throw newConversionException("String_Node_Str" + max,value,locale).setFormat(format);
  }
  return number;
}

Fixed version (ground truth):
/** 
 * Parses a value as a String and returns a Number.<br>
 * @param value the string to parse
 * @param min the minimum allowed value
 * @param max the maximum allowed value
 * @param locale the {@link Locale}
 * @return the converted number
 * @throws ConversionException if value is unparsable or out of range
 */
protected N parse(String value,final double min,final double max,Locale locale) throws ConversionException {
  if (value == null) {
    return null;
  }
  final NumberFormat format=NumberFormat.getCurrencyInstance(locale);
  final N number=this.parse(format,value,locale);
  if (number == null) {
    return null;
  }
  if (number.doubleValue() < min) {
    throw newConversionException("String_Node_Str" + min,value,locale).setFormat(format);
  }
  if (number.doubleValue() > max) {
    throw newConversionException("String_Node_Str" + max,value,locale).setFormat(format);
  }
  return number;
}
Program: 186459
Project: 186459
Buggy source:
/** 
 * Set whether the menu-item is enabled
 * @param enabled
 */
public void setEnabled(boolean enabled){
  this.enabled=enabled;
}

Fixed version (ground truth):
/** 
 * Set whether the menu-item is enabled
 * @param enabled {@code true} or {@code false}
 */
public void setEnabled(boolean enabled){
  this.enabled=enabled;
}
Program: 186460
Project: 186460
Buggy source:
/** 
 * Set whether a page is opened in a new window
 * @param openInNewWindow
 */
public void setOpenInNewWindow(boolean openInNewWindow){
  this.openInNewWindow=openInNewWindow;
}

Fixed version (ground truth):
/** 
 * Set whether a page is opened in a new window
 * @param openInNewWindow {@code true} or {@code false}
 */
public void setOpenInNewWindow(boolean openInNewWindow){
  this.openInNewWindow=openInNewWindow;
}
Program: 186461
Project: 186461
Buggy source:
/** 
 * Gets a new   {@link IVisitor} that will be used by {@link #onBeforeRespond(Map,AjaxRequestTarget)}
 * @return the new {@code IVisitor}
 */
protected static IVisitor<Component,Object> newBeforeRespondVisitor(final AjaxRequestTarget target){
  return (  Component component,  IVisit<Object> visit) -> {
    for (    IDestroyable behavior : component.getBehaviors(JQueryUIBehavior.class)) {
      behavior.destroy(target);
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Gets a new   {@link IVisitor} that will be used by {@link #onBeforeRespond(Map,AjaxRequestTarget)}
 * @param target the {@link AjaxRequestTarget}
 * @return the new {@code IVisitor}
 */
protected static IVisitor<Component,Object> newBeforeRespondVisitor(final AjaxRequestTarget target){
  return (  Component component,  IVisit<Object> visit) -> {
    for (    IDestroyable behavior : component.getBehaviors(JQueryUIBehavior.class)) {
      behavior.destroy(target);
    }
  }
;
}
Program: 186462
Project: 186462
Buggy source:
/** 
 * Gets a new   {@link JQueryEffectBehavior}
 * @param selector
 * @return the widget behavior
 */
protected JQueryEffectBehavior newEffectBehavior(String selector){
  return new JQueryEffectBehavior(selector,this){
    private static final long serialVersionUID=1L;
    @Override public void onConfigure(    Component component){
      super.onConfigure(component);
      JQueryEffectContainer.this.onConfigure(this);
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Gets a new   {@link JQueryEffectBehavior}
 * @param selector the html selector (ie: '#myId')
 * @return the widget behavior
 */
protected JQueryEffectBehavior newEffectBehavior(String selector){
  return new JQueryEffectBehavior(selector,this){
    private static final long serialVersionUID=1L;
    @Override public void onConfigure(    Component component){
      super.onConfigure(component);
      JQueryEffectContainer.this.onConfigure(this);
    }
  }
;
}
Program: 186463
Project: 186463
Buggy source:
/** 
 * Sets the roles allowed to enable the button
 * @param roles
 */
public void setRoles(String[] roles){
  this.roles=roles.clone();
}

Fixed version (ground truth):
/** 
 * Sets the roles allowed to enable the button
 * @param roles list of roles allowed to enable the button
 */
public void setRoles(String[] roles){
  this.roles=roles.clone();
}
Program: 186464
Project: 186464
Buggy source:
@Override protected void onInitialize(){
  super.onInitialize();
  this.modelBehavior=this.newSchedulerModelBehavior(this.getModel(),this.getSchedulerEventFactory());
  this.add(this.modelBehavior);
  this.editTemplate=this.newEditTemplate();
  if (this.editTemplate != null) {
    this.editTemplateBehavior=new KendoTemplateBehavior(this.editTemplate);
    this.add(this.editTemplateBehavior);
  }
  this.eventTemplate=this.newEventTemplate();
  if (this.eventTemplate != null) {
    this.eventTemplateBehavior=new KendoTemplateBehavior(this.eventTemplate);
    this.add(this.eventTemplateBehavior);
  }
}

Fixed version (ground truth):
@Override protected void onInitialize(){
  super.onInitialize();
  this.modelBehavior=this.newSchedulerModelBehavior(this.getModel(),this.getSchedulerEventFactory());
  this.add(this.modelBehavior);
  this.editTemplate=this.newEditTemplate();
  if (this.editTemplate != null) {
    this.editTemplateBehavior=new KendoTemplateBehavior(this.editTemplate,"String_Node_Str");
    this.add(this.editTemplateBehavior);
  }
  this.eventTemplate=this.newEventTemplate();
  if (this.eventTemplate != null) {
    this.eventTemplateBehavior=new KendoTemplateBehavior(this.eventTemplate,"String_Node_Str");
    this.add(this.eventTemplateBehavior);
  }
}
Program: 186465
Project: 186465
Buggy source:
@Override public void bind(Component component){
  super.bind(component);
  this.token=String.format("String_Node_Str",component.getMarkupId());
}

Fixed version (ground truth):
@Override public void bind(Component component){
  super.bind(component);
  this.token=String.format("String_Node_Str",component.getMarkupId(),this.suffix);
}
Program: 186466
Project: 186466
Buggy source:
/** 
 * Constructor
 * @param template the {@link IJQueryTemplate} that this behavior should render via the resource stream
 */
public KendoTemplateBehavior(IJQueryTemplate template){
  this.template=template;
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param template the {@link IJQueryTemplate} that this behavior should render via the resource stream
 * @param suffix the token suffix
 */
public KendoTemplateBehavior(IJQueryTemplate template,String suffix){
  this.template=template;
  this.suffix=suffix;
}
Program: 186467
Project: 186467
Buggy source:
/** 
 * Constructor
 * @param id the markup-id
 * @param model the {@link IModel}
 * @param toolbar the {@link IWysiwygToolbar}
 */
public WysiwygEditor(String id,IModel<String> model,IWysiwygToolbar toolbar){
  super(id,model);
  this.container=this.newMarkupContainer();
  this.add(this.container);
  if (toolbar != null) {
    toolbar.attachToEditor(this.container);
  }
  this.setEscapeModelStrings(false);
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param id the markup id
 * @param model the {@link IModel}
 * @param toolbar the {@link IWysiwygToolbar}
 */
public WysiwygEditor(String id,IModel<String> model,IWysiwygToolbar toolbar){
  super(id,model);
  this.container=this.newMarkupContainer();
  this.add(this.container);
  if (toolbar != null) {
    toolbar.attachToEditor(this.container);
  }
  this.setEscapeModelStrings(false);
}
Program: 186469
Project: 186469
Buggy source:
/** 
 * Get the label pattern to be used to display the value. Should be overridden with care!<br> <b>Note: </b> the pattern is a javascript string, where lower value is represented by "ui.values[0]", upper value by "ui.values[1]".<br>
 * @return default to '[' + ui.values[0] + ', ' + ui.values[1] + ']'
 */
protected String getLabelPattern(){
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Get the label pattern to be used to display the value. Should be overridden with care!<br> <b>Note: </b> the pattern is a javascript string, where lower value is represented by "ui.values[0]", upper value by "ui.values[1]".<br>
 * @return default to '[' + ui.values[0] + ', ' +  ui.values[1] + ']'
 */
protected String getLabelPattern(){
  return "String_Node_Str";
}
Program: 186470
Project: 186470
Buggy source:
/** 
 * Gets a new   {@link FormComponent} that will be used as an input.<br>Override this method when you need to use a  {@code IValidator} or different input type, e.g. {@code NumberTextField} or {@code PasswordField}.
 * @param id the markup-id
 * @param model the {@link IModel}
 * @return the new {@link FormComponent}
 */
protected FormComponent<T> newTextField(String id,IModel<T> model){
  return new TextField<T>(id,model);
}

Fixed version (ground truth):
/** 
 * Gets a new   {@link FormComponent} that will be used as an input.<br>Override this method when you need to use a  {@code IValidator} or different input type, e.g. {@code NumberTextField} or {@code PasswordField}.
 * @param id the markup id
 * @param model the {@link IModel}
 * @return the new {@link FormComponent}
 */
protected FormComponent<T> newTextField(String id,IModel<T> model){
  return new TextField<T>(id,model);
}
Program: 186471
Project: 186471
Buggy source:
/** 
 * Gets a new   {@link Form}
 * @param id the markup-id
 * @return the new form
 */
private static Form<?> newForm(String id){
  return new Form<Void>(id){
    private static final long serialVersionUID=1L;
    @Override protected boolean wantSubmitOnParentFormSubmit(){
      return false;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Gets a new   {@link Form}
 * @param id the markup id
 * @return the new form
 */
private static Form<?> newForm(String id){
  return new Form<Void>(id){
    private static final long serialVersionUID=1L;
    @Override protected boolean wantSubmitOnParentFormSubmit(){
      return false;
    }
  }
;
}
Program: 186472
Project: 186472
Buggy source:
/** 
 * Gets a new   {@link Component} that will be used as a label in the dialog.<br>Override this method when you need to show formatted label.
 * @param id the markup-id
 * @param model the label {@link IModel}
 * @return the new label component.
 */
protected Component newLabel(String id,IModel<String> model){
  return new Label(id,model);
}

Fixed version (ground truth):
/** 
 * Gets a new   {@link Component} that will be used as a label in the dialog.<br>Override this method when you need to show formatted label.
 * @param id the markup id
 * @param model the label {@link IModel}
 * @return the new label component.
 */
protected Component newLabel(String id,IModel<String> model){
  return new Label(id,model);
}
Program: 186473
Project: 186473
Buggy source:
/** 
 * Gets the   {@link Component} that will be lazy loaded
 * @param id the markup-id
 * @param value the value corresponding to the column's field
 * @return the new {@code Component}
 */
protected abstract Component newLazyComponent(String id,String value);

Fixed version (ground truth):
/** 
 * Gets the   {@link Component} that will be lazy loaded
 * @param id the markup id
 * @param value the value corresponding to the column's field
 * @return the new {@code Component}
 */
protected abstract Component newLazyComponent(String id,String value);
Program: 186474
Project: 186474
Buggy source:
/** 
 * Indicates whether the 'seriesClick' event is enabled.<br> If true, the   {@link #onSeriesClick(AjaxRequestTarget,String,String,String,long)} event will be triggered by clicking an event or a free event slot.<br>
 * @return {@code false} by default
 */
boolean isSeriesClickEventEnabled();

Fixed version (ground truth):
/** 
 * Indicates whether the 'seriesClick' event is enabled.<br> If true, the   {@link #onSeriesClick(AjaxRequestTarget,String,String,String,long)} event will be triggered by clicking an event or a free event slot.
 * @return {@code false} by default
 */
boolean isSeriesClickEventEnabled();
Program: 186475
Project: 186475
Buggy source:
/** 
 * Gets a new   {@link FormComponent} that will be used as an input.<br>Override this method when you need to use a  {@code IValidator} or different input type, e.g. {@code NumberTextField} or {@code PasswordField}.
 * @param id the markup-id
 * @param model the {@link IModel}
 * @return the new {@link FormComponent}
 */
protected FormComponent<T> newTextField(String id,IModel<T> model){
  return new TextField<T>(id,model);
}

Fixed version (ground truth):
/** 
 * Gets a new   {@link FormComponent} that will be used as an input.<br>Override this method when you need to use a  {@code IValidator} or different input type, e.g. {@code NumberTextField} or {@code PasswordField}.
 * @param id the markup id
 * @param model the {@link IModel}
 * @return the new {@link FormComponent}
 */
protected FormComponent<T> newTextField(String id,IModel<T> model){
  return new TextField<T>(id,model);
}
Program: 186476
Project: 186476
Buggy source:
/** 
 * Gets a new   {@link Form}
 * @param id the markup-id
 * @return the new form
 */
private static Form<Void> newForm(String id){
  return new Form<Void>(id){
    private static final long serialVersionUID=1L;
    @Override protected boolean wantSubmitOnParentFormSubmit(){
      return false;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Gets a new   {@link Form}
 * @param id the markup id
 * @return the new form
 */
private static Form<Void> newForm(String id){
  return new Form<Void>(id){
    private static final long serialVersionUID=1L;
    @Override protected boolean wantSubmitOnParentFormSubmit(){
      return false;
    }
  }
;
}
Program: 186477
Project: 186477
Buggy source:
/** 
 * Gets a new   {@link Component} that will be used as a label in the window.<br>Override this method when you need to show formatted label.
 * @param id the markup-id
 * @param model the label {@link IModel}
 * @return the new label component.
 */
protected Component newLabel(String id,IModel<String> model){
  return new Label(id,model);
}

Fixed version (ground truth):
/** 
 * Gets a new   {@link Component} that will be used as a label in the window.<br>Override this method when you need to show formatted label.
 * @param id the markup id
 * @param model the label {@link IModel}
 * @return the new label component.
 */
protected Component newLabel(String id,IModel<String> model){
  return new Label(id,model);
}
Program: 186478
Project: 186478
Buggy source:
/** 
 * Gets a new   {@link KendoFeedbackPanel}
 * @param id the markup-id
 * @return a new {@code KendoFeedbackPanel}
 */
protected KendoFeedbackPanel newFeedbackPanel(String id){
  return new KendoFeedbackPanel(id,this);
}

Fixed version (ground truth):
/** 
 * Gets a new   {@link KendoFeedbackPanel}
 * @param id the markup id
 * @return a new {@code KendoFeedbackPanel}
 */
protected KendoFeedbackPanel newFeedbackPanel(String id){
  return new KendoFeedbackPanel(id,this);
}
Program: 186479
Project: 186479
Buggy source:
/** 
 * Gets a new   {@link Form}
 * @param id the markup-id
 * @return the new form
 */
private static Form<Void> newForm(String id){
  return new Form<Void>(id){
    private static final long serialVersionUID=1L;
    @Override protected boolean wantSubmitOnParentFormSubmit(){
      return false;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Gets a new   {@link Form}
 * @param id the markup id
 * @return the new form
 */
private static Form<Void> newForm(String id){
  return new Form<Void>(id){
    private static final long serialVersionUID=1L;
    @Override protected boolean wantSubmitOnParentFormSubmit(){
      return false;
    }
  }
;
}
Program: 186480
Project: 186480
Buggy source:
@Override public String toScript(){
  return String.format("String_Node_Str",this.getName(),super.toString());
}

Fixed version (ground truth):
@Override public String toScript(){
  return String.format("String_Node_Str",this.getName(),this.build());
}
Program: 186481
Project: 186481
Buggy source:
@Override public void renderHead(Component component,IHeaderResponse response){
  super.renderHead(component,response);
  if (this.datasources != null) {
    for (    IKendoDataSource datasource : this.datasources) {
      this.renderPriorityHeaderItem(JavaScriptHeaderItem.forScript(datasource.toString(),datasource.getToken()),response);
    }
  }
}

Fixed version (ground truth):
@Override public void renderHead(Component component,IHeaderResponse response){
  super.renderHead(component,response);
  if (this.datasources != null) {
    for (    IKendoDataSource datasource : this.datasources) {
      this.renderPriorityHeaderItem(JavaScriptHeaderItem.forScript(datasource.toScript(),datasource.getToken()),response);
    }
  }
}
Program: 186482
Project: 186482
Buggy source:
@Override public String toScript(){
  return String.format("String_Node_Str",this.getName(),this.toString());
}

Fixed version (ground truth):
@Override public String toScript(){
  return String.format("String_Node_Str",this.getName(),this.build());
}
Program: 186483
Project: 186483
Buggy source:
/** 
 * Initializes CSS & JavaScript resource references
 */
private void initReferences(){
  WysiwygLibrarySettings settings=WysiwygLibrarySettings.get();
  if (settings.getBootstrapCombinedNoIconsStyleSheetReference() != null) {
    this.add(settings.getBootstrapCombinedNoIconsStyleSheetReference());
  }
  if (settings.getBootstrapResponsiveStyleSheetReference() != null) {
    this.add(settings.getBootstrapResponsiveStyleSheetReference());
  }
  if (settings.getEditorStyleSheetReference() != null) {
    this.add(settings.getEditorStyleSheetReference());
  }
  if (settings.getBootstrapWysiwygJavaScriptReference() != null) {
    this.add(settings.getBootstrapWysiwygJavaScriptReference());
  }
  if (settings.getBootstrapDropDownJavaScriptReference() != null) {
    this.add(settings.getBootstrapDropDownJavaScriptReference());
  }
  if (settings.getJQueryHotKeysJavaScriptReference() != null) {
    this.add(settings.getJQueryHotKeysJavaScriptReference());
  }
  if (settings.getPrettifyJavaScriptReference() != null) {
    this.add(settings.getPrettifyJavaScriptReference());
  }
}

Fixed version (ground truth):
/** 
 * Initializes CSS & JavaScript resource references
 */
private void initReferences(){
  WysiwygLibrarySettings settings=WysiwygLibrarySettings.get();
  if (settings.getBootstrapCombinedNoIconsStyleSheetReference() != null) {
    this.add(settings.getBootstrapCombinedNoIconsStyleSheetReference());
  }
  if (settings.getBootstrapResponsiveStyleSheetReference() != null) {
    this.add(settings.getBootstrapResponsiveStyleSheetReference());
  }
  if (settings.getEditorStyleSheetReference() != null) {
    this.add(settings.getEditorStyleSheetReference());
  }
  if (settings.getEditorJavaScriptResourceReference() != null) {
    this.add(settings.getEditorJavaScriptResourceReference());
  }
  if (settings.getBootstrapWysiwygJavaScriptReference() != null) {
    this.add(settings.getBootstrapWysiwygJavaScriptReference());
  }
  if (settings.getBootstrapDropDownJavaScriptReference() != null) {
    this.add(settings.getBootstrapDropDownJavaScriptReference());
  }
  if (settings.getJQueryHotKeysJavaScriptReference() != null) {
    this.add(settings.getJQueryHotKeysJavaScriptReference());
  }
  if (settings.getPrettifyJavaScriptReference() != null) {
    this.add(settings.getPrettifyJavaScriptReference());
  }
}
Program: 186484
Project: 186484
Buggy source:
/** 
 * Constructor
 * @param id the markup-id
 * @param model the {@link IModel}
 * @param toolbar the {@link IWysiwygToolbar}
 */
public WysiwygEditor(String id,IModel<String> model,IWysiwygToolbar toolbar){
  super(id,model);
  this.container=new WebMarkupContainer("String_Node_Str");
  this.add(this.container);
  if (toolbar != null) {
    toolbar.attachToEditor(this.container);
  }
  this.setEscapeModelStrings(false);
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param id the markup-id
 * @param model the {@link IModel}
 * @param toolbar the {@link IWysiwygToolbar}
 */
public WysiwygEditor(String id,IModel<String> model,IWysiwygToolbar toolbar){
  super(id,model);
  this.container=new WebMarkupContainer("String_Node_Str"){
    private static final long serialVersionUID=1L;
    @Override protected void onComponentTag(    ComponentTag tag){
      super.onComponentTag(tag);
      if (!WysiwygEditor.this.getForm().isEnabled()) {
        tag.put("String_Node_Str","String_Node_Str");
      }
    }
  }
;
  this.add(this.container);
  if (toolbar != null) {
    toolbar.attachToEditor(this.container);
  }
  this.setEscapeModelStrings(false);
}
Program: 186485
Project: 186485
Buggy source:
/** 
 * Escape JSON quotes (  {@value #QUOTE})
 * @param value the string to escape
 * @return the escaped string
 */
public static String escapeQuotes(String value){
  return String.valueOf(value).replaceAll(QUOTE,"String_Node_Str" + QUOTE);
}

Fixed version (ground truth):
/** 
 * Escape JSON quotes (  {@value #QUOTE})
 * @param value the string to escape
 * @return the escaped string
 */
public static String escapeQuotes(String value){
  return value.replaceAll(QUOTE,"String_Node_Str" + QUOTE);
}
Program: 186486
Project: 186486
Buggy source:
/** 
 * Converts a string to its javascript representation. ie: "myvalue" (with the double quotes)<br/> If the supplied value is null, "null" is returned
 * @param value the object
 * @return the JSON value
 */
public static String asString(String value){
  return String.format("String_Node_Str",QUOTE,Options.escapeQuotes(value),QUOTE);
}

Fixed version (ground truth):
/** 
 * Converts a string to its javascript representation. ie: "myvalue" (with the double quotes)
 * @param value the object
 * @return the JSON value
 */
public static String asString(String value){
  return String.format("String_Node_Str",QUOTE,Options.escapeQuotes(value),QUOTE);
}
Program: 186487
Project: 186487
Buggy source:
public SamplePage(){
  super();
  this.add(new Label("String_Node_Str",this.getResourceString("String_Node_Str")));
  this.add(new Label("String_Node_Str",this.getSource(Source.TEXT)).setEscapeModelStrings(false));
  this.add(new Label("String_Node_Str",this.getSource(Source.JAVA)));
  this.add(new Label("String_Node_Str",this.getSource(Source.HTML)));
  this.add(new JQueryUIBehavior("String_Node_Str","String_Node_Str"));
  this.add(new ListView<DemoLink>("String_Node_Str",Model.ofList(this.getDemoLinks())){
    private static final long serialVersionUID=1L;
    @Override protected void populateItem(    ListItem<DemoLink> item){
      DemoLink object=item.getModelObject();
      Link<SamplePage> link=new BookmarkablePageLink<SamplePage>("String_Node_Str",object.getPage());
      link.add(new Label("String_Node_Str",object.getLabel()).setEscapeModelStrings(false));
      item.add(link);
    }
    @Override public boolean isVisible(){
      return !this.getModelObject().isEmpty();
    }
  }
);
}

Fixed version (ground truth):
public SamplePage(){
  super();
  this.add(new Label("String_Node_Str",this.getResourceString("String_Node_Str")));
  this.add(new Label("String_Node_Str",this.getSource(Source.TEXT)).setEscapeModelStrings(false));
  this.add(new Label("String_Node_Str",this.getSource(Source.JAVA)));
  this.add(new Label("String_Node_Str",this.getSource(Source.HTML)));
  this.add(new JQueryUIBehavior("String_Node_Str","String_Node_Str"));
}
Program: 186488
Project: 186488
Buggy source:
private AjaxButton newForwardButton(){
  return new AjaxButton("String_Node_Str"){
    private static final long serialVersionUID=1L;
    @Override protected String getIcon(){
      return JQueryIcon.CIRCLE_TRIANGLE_E;
    }
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form<?> form){
      NavigationAjaxButton.this.onForward(target,this);
    }
  }
;
}

Fixed version (ground truth):
private final AjaxButton newForwardButton(){
  return new AjaxButton("String_Node_Str"){
    private static final long serialVersionUID=1L;
    @Override protected String getIcon(){
      return JQueryIcon.CIRCLE_TRIANGLE_E;
    }
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form<?> form){
      NavigationAjaxButton.this.onForward(target,this);
    }
  }
;
}
Program: 186489
Project: 186489
Buggy source:
private AjaxButton newBackwardButton(){
  return new AjaxButton("String_Node_Str"){
    private static final long serialVersionUID=1L;
    @Override protected String getIcon(){
      return JQueryIcon.CIRCLE_TRIANGLE_W;
    }
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form<?> form){
      NavigationAjaxButton.this.onBackward(target,this);
    }
  }
;
}

Fixed version (ground truth):
private final AjaxButton newBackwardButton(){
  return new AjaxButton("String_Node_Str"){
    private static final long serialVersionUID=1L;
    @Override protected String getIcon(){
      return JQueryIcon.CIRCLE_TRIANGLE_W;
    }
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form<?> form){
      NavigationAjaxButton.this.onBackward(target,this);
    }
  }
;
}
Program: 186490
Project: 186490
Buggy source:
public void setCategory(Category category){
  this.category=category;
  if (this.category != null) {
    this.setColor(this.category.getColor());
    this.setClassName(this.category.toString());
  }
}

Fixed version (ground truth):
public final void setCategory(Category category){
  this.category=category;
  if (this.category != null) {
    this.setColor(this.category.getColor());
    this.setClassName(this.category.toString());
  }
}
Program: 186491
Project: 186491
Buggy source:
protected int newId(){
  return ++this.id;
}

Fixed version (ground truth):
protected final int newId(){
  return ++this.id;
}
Program: 186492
Project: 186492
Buggy source:
private List<Book> newBookList(){
  return Arrays.asList(new Book("String_Node_Str",25.64f,"String_Node_Str"),new Book("String_Node_Str",31.59f,"String_Node_Str"),new Book("String_Node_Str",29.21f,"String_Node_Str"),new Book("String_Node_Str",30.22f,"String_Node_Str"));
}

Fixed version (ground truth):
private static List<Book> newBookList(){
  return Arrays.asList(new Book("String_Node_Str",25.64f,"String_Node_Str"),new Book("String_Node_Str",31.59f,"String_Node_Str"),new Book("String_Node_Str",29.21f,"String_Node_Str"),new Book("String_Node_Str",30.22f,"String_Node_Str"));
}
Program: 186493
Project: 186493
Buggy source:
public ShoppingDroppablePage(){
  this.books=this.newBookList();
  this.orders=new ArrayList<Book>();
  this.initialize();
}

Fixed version (ground truth):
public ShoppingDroppablePage(){
  this.books=newBookList();
  this.orders=new ArrayList<Book>();
  this.initialize();
}
Program: 186494
Project: 186494
Buggy source:
protected FeedbackMessagesModel newFeedbackMessagesModel(){
  return new FeedbackMessagesModel(this,new ErrorLevelFeedbackMessageFilter(FeedbackMessage.ERROR));
}

Fixed version (ground truth):
protected final FeedbackMessagesModel newFeedbackMessagesModel(){
  return new FeedbackMessagesModel(this,new ErrorLevelFeedbackMessageFilter(FeedbackMessage.ERROR));
}
Program: 186495
Project: 186495
Buggy source:
public Item(String name){
  this.name=name;
}

Fixed version (ground truth):
public Item(String name){
  this.name=Args.notNull(name,"String_Node_Str");
}
Program: 186496
Project: 186496
Buggy source:
@Override public void onAjax(AjaxRequestTarget target,JQueryEvent event){
  if (event instanceof SortableEvent) {
    SortableEvent ev=(SortableEvent)event;
    int hash=ev.getHash();
    int index=ev.getIndex();
    if (event instanceof UpdateEvent) {
      List<T> list=this.getItemList();
      if (list != null) {
        this.onUpdate(target,ListUtils.fromHash(hash,list),index);
      }
    }
    if (event instanceof ReceiveEvent) {
      List<T> list=this.getConnectedList();
      if (list.size() > 0) {
        this.onReceive(target,ListUtils.fromHash(hash,list),index);
      }
    }
    if (event instanceof RemoveEvent) {
      List<T> list=this.getItemList();
      if (list != null) {
        this.onRemove(target,ListUtils.fromHash(hash,list));
      }
    }
  }
}

Fixed version (ground truth):
@Override public void onAjax(AjaxRequestTarget target,JQueryEvent event){
  if (event instanceof SortableEvent) {
    SortableEvent ev=(SortableEvent)event;
    int hash=ev.getHash();
    int index=ev.getIndex();
    if (event instanceof UpdateEvent) {
      List<T> list=this.getItemList();
      if (list != null) {
        this.onUpdate(target,ListUtils.fromHash(hash,list),index);
      }
    }
    if (event instanceof ReceiveEvent) {
      List<T> list=this.getConnectedList();
      if (!list.isEmpty()) {
        this.onReceive(target,ListUtils.fromHash(hash,list),index);
      }
    }
    if (event instanceof RemoveEvent) {
      List<T> list=this.getItemList();
      if (list != null) {
        this.onRemove(target,ListUtils.fromHash(hash,list));
      }
    }
  }
}
Program: 186497
Project: 186497
Buggy source:
@Override protected String getModelValue(){
  return this.renderer.getText(this.getModelObject());
}

Fixed version (ground truth):
@Override protected final String getModelValue(){
  return this.renderer.getText(this.getModelObject());
}
Program: 186498
Project: 186498
Buggy source:
/** 
 * Parses a value as a String and returns a Number.<br/>
 * @param value the string to parse
 * @param min the minimum allowed value
 * @param max the maximum allowed value
 * @param locale the {@link Locale}
 * @return the converted number
 */
protected N parse(String value,final double min,final double max,Locale locale){
  if (value == null) {
    return null;
  }
  final NumberFormat format=NumberFormat.getCurrencyInstance(locale);
  final N number=this.parse(format,value,locale);
  if (number == null) {
    return null;
  }
  if (number.doubleValue() < min) {
    throw newConversionException("String_Node_Str" + min,value,locale).setFormat(format);
  }
  if (number.doubleValue() > max) {
    throw newConversionException("String_Node_Str" + max,value,locale).setFormat(format);
  }
  return number;
}

Fixed version (ground truth):
/** 
 * Parses a value as a String and returns a Number.<br/>
 * @param value the string to parse
 * @param min the minimum allowed value
 * @param max the maximum allowed value
 * @param locale the {@link Locale}
 * @return the converted number
 * @throws ConversionException
 */
protected N parse(String value,final double min,final double max,Locale locale) throws ConversionException {
  if (value == null) {
    return null;
  }
  final NumberFormat format=NumberFormat.getCurrencyInstance(locale);
  final N number=this.parse(format,value,locale);
  if (number == null) {
    return null;
  }
  if (number.doubleValue() < min) {
    throw newConversionException("String_Node_Str" + min,value,locale).setFormat(format);
  }
  if (number.doubleValue() > max) {
    throw newConversionException("String_Node_Str" + max,value,locale).setFormat(format);
  }
  return number;
}
Program: 186499
Project: 186499
Buggy source:
@Override protected String getModelValue(){
  return this.renderer.getText(this.getModelObject());
}

Fixed version (ground truth):
@Override protected final String getModelValue(){
  return this.renderer.getText(this.getModelObject());
}
Program: 186500
Project: 186500
Buggy source:
/** 
 * Sets the label's markupId on which the current slide value will be displayed.<br/> <b>Warning:</b> It cannot be set/changed once the Component has been initialized.
 * @param markupId the label's markupId
 * @return this
 */
public AbstractSlider<T> setLabelId(String markupId){
  this.labelId=markupId;
  return this;
}

Fixed version (ground truth):
/** 
 * Sets the label's markupId on which the current slide value will be displayed.<br/> <b>Warning:</b> It cannot be set/changed once the Component has been initialized.
 * @param markupId the label's markupId
 * @return this
 */
public final AbstractSlider<T> setLabelId(String markupId){
  this.labelId=markupId;
  return this;
}
Program: 186501
Project: 186501
Buggy source:
/** 
 * Initialization
 */
@Override void initialize(){
  super.initialize();
  this.setRange(true);
}

Fixed version (ground truth):
/** 
 * Initialization
 */
@Override final void initialize(){
  super.initialize();
  this.setRange(true);
}
Program: 186502
Project: 186502
Buggy source:
@SuppressWarnings("String_Node_Str") protected void setSort(String property,SortOrder order){
  ISortStateLocator<String> locator=((ISortStateLocator<String>)this.provider);
  locator.getSortState().setPropertySortOrder(property,order);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected void setSort(String property,SortOrder order){
  ISortStateLocator<String> locator=(ISortStateLocator<String>)this.provider;
  locator.getSortState().setPropertySortOrder(property,order);
}
Program: 186503
Project: 186503
Buggy source:
@Override public List<String> getAggregates(){
  return null;
}

Fixed version (ground truth):
@Override public List<String> getAggregates(){
  return Collections.emptyList();
}
Program: 186505
Project: 186505
Buggy source:
/** 
 * Exports a row to the output
 * @param provider the {@link IDataProvider}
 * @param columns the list of {@link IColumn}
 * @param row the row of typed objects
 * @param writer the {@link PrintWriter}
 */
private <T>void exportRow(IDataProvider<T> provider,List<IExportableColumn> columns,T row,PrintWriter writer){
  boolean first=true;
  for (  IExportableColumn column : columns) {
    if (first) {
      first=false;
    }
 else {
      writer.print(this.delimiter);
    }
    Object object=column.newDataModel(provider.model(row)).getObject();
    if (object != null) {
      String value=ConverterUtils.toString(object);
      writer.print(this.quoteValue(value));
    }
  }
  writer.print(CRLF);
}

Fixed version (ground truth):
/** 
 * Exports a row to the output
 * @param provider the {@link IDataProvider}
 * @param columns the list of {@link IColumn}
 * @param row the row of typed objects
 * @param writer the {@link PrintWriter}
 */
private <T>void exportRow(IDataProvider<T> provider,List<IExportableColumn> columns,T row,PrintWriter writer){
  boolean first=true;
  for (  IExportableColumn column : columns) {
    if (first) {
      first=false;
    }
 else {
      writer.print(CSVDataExporter.delimiter);
    }
    Object object=column.newDataModel(provider.model(row)).getObject();
    if (object != null) {
      String value=ConverterUtils.toString(object);
      writer.print(this.quoteValue(value));
    }
  }
  writer.print(CRLF);
}
Program: 186506
Project: 186506
Buggy source:
/** 
 * Writes the headers to the output
 * @param provider the {@link IDataProvider}
 * @param columns the list of {@link IColumn}
 * @param writer the {@link PrintWriter}
 */
private void exportHeaders(List<IExportableColumn> columns,PrintWriter writer){
  boolean first=true;
  for (  IExportableColumn column : columns) {
    if (first) {
      first=false;
    }
 else {
      writer.print(this.delimiter);
    }
    writer.print(this.quoteValue(column.getTitle()));
  }
  writer.print(CRLF);
}

Fixed version (ground truth):
/** 
 * Writes the headers to the output
 * @param provider the {@link IDataProvider}
 * @param columns the list of {@link IColumn}
 * @param writer the {@link PrintWriter}
 */
private void exportHeaders(List<IExportableColumn> columns,PrintWriter writer){
  boolean first=true;
  for (  IExportableColumn column : columns) {
    if (first) {
      first=false;
    }
 else {
      writer.print(CSVDataExporter.delimiter);
    }
    writer.print(this.quoteValue(column.getTitle()));
  }
  writer.print(CRLF);
}
Program: 186507
Project: 186507
Buggy source:
/** 
 * Exports the data provided by the   {@link IDataProvider} to the {@link OutputStream}.
 * @param provider the {@link IDataProvider}
 * @param columns the list of {@link IColumn}
 * @param output the {@link OutputStream}
 * @param first the first row of datacount
 * @param count the number of elements to retrieve
 * @throws IOException
 */
public <T>void exportData(IDataProvider<T> provider,List<IExportableColumn> columns,OutputStream output,long first,long count) throws IOException {
  PrintWriter writer=new PrintWriter(new OutputStreamWriter(output,Charset.forName(this.characterSet)));
  try {
    if (this.isExportHeadersEnabled()) {
      this.exportHeaders(columns,writer);
    }
    Iterator<? extends T> iterator=provider.iterator(first,count);
    while (iterator.hasNext()) {
      this.exportRow(provider,columns,iterator.next(),writer);
    }
  }
  finally {
    writer.close();
  }
}

Fixed version (ground truth):
/** 
 * Exports the data provided by the   {@link IDataProvider} to the {@link OutputStream}.
 * @param provider the {@link IDataProvider}
 * @param columns the list of {@link IColumn}
 * @param output the {@link OutputStream}
 * @param first the first row of datacount
 * @param count the number of elements to retrieve
 * @throws IOException
 */
public <T>void exportData(IDataProvider<T> provider,List<IExportableColumn> columns,OutputStream output,long first,long count) throws IOException {
  PrintWriter writer=new PrintWriter(new OutputStreamWriter(output,Charset.forName(CSVDataExporter.characterSet)));
  try {
    if (this.isExportHeadersEnabled()) {
      this.exportHeaders(columns,writer);
    }
    Iterator<? extends T> iterator=provider.iterator(first,count);
    while (iterator.hasNext()) {
      this.exportRow(provider,columns,iterator.next(),writer);
    }
  }
  finally {
    writer.close();
  }
}
Program: 186508
Project: 186508
Buggy source:
/** 
 * Indicates whether headers will be written to the output
 * @return true or false
 */
public boolean isExportHeadersEnabled();

Fixed version (ground truth):
/** 
 * Indicates whether headers will be written to the output
 * @return true or false
 */
boolean isExportHeadersEnabled();
Program: 186509
Project: 186509
Buggy source:
/** 
 * Gets the content type
 * @return the content type
 */
public String getContentType();

Fixed version (ground truth):
/** 
 * Gets the content type
 * @return the content type
 */
String getContentType();
Program: 186510
Project: 186510
Buggy source:
/** 
 * Exports all data provided by the   {@link IDataProvider} to the {@link OutputStream}.
 * @param provider the {@link IDataProvider}
 * @param columns the list of {@link IColumn}
 * @param output the {@link OutputStream}
 * @throws IOException
 */
public <T>void exportData(IDataProvider<T> provider,List<IExportableColumn> columns,OutputStream output) throws IOException ;

Fixed version (ground truth):
/** 
 * Exports all data provided by the   {@link IDataProvider} to the {@link OutputStream}.
 * @param provider the {@link IDataProvider}
 * @param columns the list of {@link IColumn}
 * @param output the {@link OutputStream}
 * @throws IOException
 */
<T>void exportData(IDataProvider<T> provider,List<IExportableColumn> columns,OutputStream output) throws IOException ;
Program: 186511
Project: 186511
Buggy source:
/** 
 * Refreshes the ProgressBar.<br/> This method needs to be called after the model object changes.<br/> But It is not required to be called when calling forward or backward methods.
 * @param target the {@link AjaxRequestTarget}
 */
public final void refresh(AjaxRequestTarget target){
  String $=String.format("String_Node_Str",JQueryWidget.getSelector(this),ProgressBarBehavior.METHOD);
  target.appendJavaScript(String.format("String_Node_Str",$,this.getModelObject()));
}

Fixed version (ground truth):
/** 
 * Refreshes the ProgressBar.<br/> This method needs to be called after the model object changes.<br/> But It is not required to be called when calling forward or backward methods.
 * @param target the {@link AjaxRequestTarget}
 */
public final void refresh(AjaxRequestTarget target){
  String widget=String.format("String_Node_Str",JQueryWidget.getSelector(this),ProgressBarBehavior.METHOD);
  target.appendJavaScript(String.format("String_Node_Str",widget,this.getModelObject()));
}
Program: 186512
Project: 186512
Buggy source:
@Override public String toString(){
  DateFormat df=new SimpleDateFormat("String_Node_Str");
  df.setTimeZone(UTC);
  return String.format("String_Node_Str",df.format(this.getStart()),df.format(this.getEnd()));
}

Fixed version (ground truth):
@Override public String toString(){
  DateFormat df=new SimpleDateFormat(PATTERN);
  df.setTimeZone(UTC);
  return String.format("String_Node_Str",df.format(this.getStart()),df.format(this.getEnd()));
}
Program: 186513
Project: 186513
Buggy source:
/** 
 * Gets a new   {@link DateFormat} to be used by the {@link TextField}'s   {@link IConverter}
 * @param locale the {@link Locale}
 * @return the {@link DateFormat}
 */
protected DateFormat newDateFormat(Locale locale){
  return new SimpleDateFormat("String_Node_Str",locale);
}

Fixed version (ground truth):
/** 
 * Gets a new   {@link DateFormat} to be used by the {@link TextField}'s   {@link IConverter}
 * @param locale the {@link Locale}
 * @return the {@link DateFormat}
 */
protected DateFormat newDateFormat(Locale locale){
  DateFormat df=new SimpleDateFormat("String_Node_Str",locale);
  df.setTimeZone(DateRange.UTC);
  return df;
}
Program: 186514
Project: 186514
Buggy source:
public RangeDatePickerPage(){
  final Options options=new Options();
  options.set("String_Node_Str",true);
  options.set("String_Node_Str",3);
  final FeedbackPanel feedback=new JQueryFeedbackPanel("String_Node_Str");
  this.add(feedback.setOutputMarkupId(true));
  this.add(new RangeDatePicker("String_Node_Str",new Model<DateRange>(DateRange.today()),options){
    private static final long serialVersionUID=1L;
    @Override public void onValueChanged(    AjaxRequestTarget target,    DateRange range){
      DateFormat df=new SimpleDateFormat("String_Node_Str");
      info(String.format("String_Node_Str",df.format(range.getStart()),df.format(range.getEnd())));
      target.add(feedback);
    }
  }
);
}

Fixed version (ground truth):
public RangeDatePickerPage(){
  final Options options=new Options();
  options.set("String_Node_Str",true);
  options.set("String_Node_Str",3);
  final FeedbackPanel feedback=new JQueryFeedbackPanel("String_Node_Str");
  this.add(feedback.setOutputMarkupId(true));
  this.add(new RangeDatePicker("String_Node_Str",new Model<DateRange>(DateRange.today()),options){
    private static final long serialVersionUID=1L;
    @Override public void onValueChanged(    AjaxRequestTarget target,    DateRange range){
      DateFormat df=new SimpleDateFormat("String_Node_Str");
      df.setTimeZone(DateRange.UTC);
      this.info(String.format("String_Node_Str",df.format(range.getStart()),df.format(range.getEnd())));
      target.add(feedback);
    }
  }
);
}
Program: 186515
Project: 186515
Buggy source:
@Override public void onValueChanged(AjaxRequestTarget target,DateRange range){
  DateFormat df=new SimpleDateFormat("String_Node_Str");
  info(String.format("String_Node_Str",df.format(range.getStart()),df.format(range.getEnd())));
  target.add(feedback);
}

Fixed version (ground truth):
@Override public void onValueChanged(AjaxRequestTarget target,DateRange range){
  DateFormat df=new SimpleDateFormat("String_Node_Str");
  df.setTimeZone(DateRange.UTC);
  this.info(String.format("String_Node_Str",df.format(range.getStart()),df.format(range.getEnd())));
  target.add(feedback);
}
Program: 186516
Project: 186516
Buggy source:
public RangeDatePickerTextFieldPage(){
  Form<Void> form=new Form<Void>("String_Node_Str");
  this.add(form);
  final FeedbackPanel feedback=new JQueryFeedbackPanel("String_Node_Str");
  form.add(feedback.setOutputMarkupId(true));
  final IModel<DateRange> model=new Model<DateRange>(new DateRange(new Date(new Date().getTime() - Duration.ONE_DAY.getMilliseconds() * 3),new Date()));
  final RangeDatePickerTextField datepicker=new RangeDatePickerTextField("String_Node_Str",model);
  form.add(datepicker);
  form.add(new Button("String_Node_Str"){
    private static final long serialVersionUID=1L;
    @Override public void onSubmit(){
      DateRange dateRange=datepicker.getModelObject();
      if (dateRange != null) {
        DateFormat df=new SimpleDateFormat("String_Node_Str");
        info(String.format("String_Node_Str",df.format(dateRange.getStart()),df.format(dateRange.getEnd())));
      }
 else {
        warn("String_Node_Str");
      }
    }
  }
);
}

Fixed version (ground truth):
public RangeDatePickerTextFieldPage(){
  Form<Void> form=new Form<Void>("String_Node_Str");
  this.add(form);
  final FeedbackPanel feedback=new JQueryFeedbackPanel("String_Node_Str");
  form.add(feedback.setOutputMarkupId(true));
  final IModel<DateRange> model=new Model<DateRange>(new DateRange(new Date(new Date().getTime() - Duration.ONE_DAY.getMilliseconds() * 3),new Date()));
  final RangeDatePickerTextField datepicker=new RangeDatePickerTextField("String_Node_Str",model);
  form.add(datepicker);
  form.add(new Button("String_Node_Str"){
    private static final long serialVersionUID=1L;
    @Override public void onSubmit(){
      DateRange range=datepicker.getModelObject();
      if (range != null) {
        DateFormat df=new SimpleDateFormat("String_Node_Str");
        df.setTimeZone(DateRange.UTC);
        this.info(String.format("String_Node_Str",df.format(range.getStart()),df.format(range.getEnd())));
      }
 else {
        warn("String_Node_Str");
      }
    }
  }
);
}
Program: 186517
Project: 186517
Buggy source:
@Override public void onSubmit(){
  DateRange dateRange=datepicker.getModelObject();
  if (dateRange != null) {
    DateFormat df=new SimpleDateFormat("String_Node_Str");
    info(String.format("String_Node_Str",df.format(dateRange.getStart()),df.format(dateRange.getEnd())));
  }
 else {
    warn("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onSubmit(){
  DateRange range=datepicker.getModelObject();
  if (range != null) {
    DateFormat df=new SimpleDateFormat("String_Node_Str");
    df.setTimeZone(DateRange.UTC);
    this.info(String.format("String_Node_Str",df.format(range.getStart()),df.format(range.getEnd())));
  }
 else {
    warn("String_Node_Str");
  }
}
Program: 186518
Project: 186518
Buggy source:
/** 
 * Constructor
 * @param selector the html selector (ie: "#myId")
 * @param options the {@link Options}
 */
public WysiwygBehavior(String selector,Options options){
  super(selector,METHOD,options);
  IPackageResourceGuard packageResourceGuard=Application.get().getResourceSettings().getPackageResourceGuard();
  if (packageResourceGuard instanceof SecurePackageResourceGuard) {
    SecurePackageResourceGuard guard=(SecurePackageResourceGuard)packageResourceGuard;
    if (!guard.getPattern().contains(new SearchPattern("String_Node_Str"))) {
      guard.addPattern("String_Node_Str");
      guard.addPattern("String_Node_Str");
      guard.addPattern("String_Node_Str");
    }
  }
  this.initReferences();
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param selector the html selector (ie: "#myId")
 * @param options the {@link Options}
 */
public WysiwygBehavior(String selector,Options options){
  super(selector,METHOD,options);
  this.initReferences();
}