nus-yam/ex-repair huggingface dataset:
Program: 20542
Project: 20542
Buggy source:
@Override protected void onSubmit(final AjaxRequestTarget target,final Form<?> form){
  String value=getAddress();
  if (StringUtils.isBlank(value)) {
    resultListModel.setObject(Collections.<GeocodingResult>emptyList());
  }
 else {
    List<GeocodingResult> results=geocodingService.geocode(value);
    resultListModel.setObject(results);
  }
  self.setVisible(true);
  target.add(self);
  AjaxEventSender.send(this,GeocodingResult.class);
}

Fixed version (ground truth):
@Override protected void onSubmit(final AjaxRequestTarget target,final Form<?> form){
  String value=getAddress();
  if (StringUtils.isBlank(value)) {
    resultListModel.setObject(Collections.<GeocodingResult>emptyList());
  }
 else {
    List<GeocodingResult> results=null;
    try {
      results=geocodingService.geocode(value);
      resultListModel.setObject(results);
    }
 catch (    Exception e) {
      log.error("String_Node_Str" + value + "String_Node_Str"+ e.getMessage(),e);
      resultListModel.setObject(Collections.<GeocodingResult>emptyList());
    }
  }
  self.setVisible(true);
  target.add(self);
  AjaxEventSender.send(this,GeocodingResult.class);
}
Program: 20543
Project: 20543
Buggy source:
public GeocodePanel(){
  AjaxSubmitLink geocodeButton=new AjaxSubmitLink("String_Node_Str"){
    @Override protected void onSubmit(    final AjaxRequestTarget target,    final Form<?> form){
      String value=getAddress();
      if (StringUtils.isBlank(value)) {
        resultListModel.setObject(Collections.<GeocodingResult>emptyList());
      }
 else {
        List<GeocodingResult> results=geocodingService.geocode(value);
        resultListModel.setObject(results);
      }
      self.setVisible(true);
      target.add(self);
      AjaxEventSender.send(this,GeocodingResult.class);
    }
  }
;
  geocodeButton.setDefaultFormProcessing(false);
  getGeocodeButtonParent().add(geocodeButton);
  ResultsPanel resultsPanel;
  add(resultsPanel=new ResultsPanel(resultListModel){
    @Override protected void onSelect(    final AjaxRequestTarget target,    final GeocodingResult result){
      self.onSelect(target,result);
    }
    @Override public boolean isVisible(){
      return resultListModel.getObject() != null;
    }
  }
);
  resultsPanel.setOnCloseCallback(new BasePanel.IOnCloseCallback(){
    @Override public void onClose(    final AjaxRequestTarget target){
      self.setVisible(false);
      target.add(self);
    }
  }
);
}

Fixed version (ground truth):
public GeocodePanel(){
  AjaxSubmitLink geocodeButton=new AjaxSubmitLink("String_Node_Str"){
    @Override protected void onSubmit(    final AjaxRequestTarget target,    final Form<?> form){
      String value=getAddress();
      if (StringUtils.isBlank(value)) {
        resultListModel.setObject(Collections.<GeocodingResult>emptyList());
      }
 else {
        List<GeocodingResult> results=null;
        try {
          results=geocodingService.geocode(value);
          resultListModel.setObject(results);
        }
 catch (        Exception e) {
          log.error("String_Node_Str" + value + "String_Node_Str"+ e.getMessage(),e);
          resultListModel.setObject(Collections.<GeocodingResult>emptyList());
        }
      }
      self.setVisible(true);
      target.add(self);
      AjaxEventSender.send(this,GeocodingResult.class);
    }
  }
;
  geocodeButton.setDefaultFormProcessing(false);
  getGeocodeButtonParent().add(geocodeButton);
  ResultsPanel resultsPanel;
  add(resultsPanel=new ResultsPanel(resultListModel){
    @Override protected void onSelect(    final AjaxRequestTarget target,    final GeocodingResult result){
      self.onSelect(target,result);
    }
    @Override public boolean isVisible(){
      return resultListModel.getObject() != null;
    }
  }
);
  resultsPanel.setOnCloseCallback(new BasePanel.IOnCloseCallback(){
    @Override public void onClose(    final AjaxRequestTarget target){
      self.setVisible(false);
      target.add(self);
    }
  }
);
}
Program: 20545
Project: 20545
Buggy source:
@Override protected void init(){
  super.init();
  getMarkupSettings().setStripWicketTags(false);
  getComponentInstantiationListeners().add(new RenderPerformanceListener());
}

Fixed version (ground truth):
@Override protected void init(){
  super.init();
  getMarkupSettings().setStripWicketTags(false);
  getComponentInstantiationListeners().add(new RenderPerformanceListener());
  mountPage("String_Node_Str",PlayerPage.class);
}
Program: 20546
Project: 20546
Buggy source:
private void init(){
  add(new FormFeedbackPanel());
  add(new MyAjaxSubmitLink("String_Node_Str"){
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form<?> form){
      onBeforeValidation((T)form.getModelObject());
      if (!new BeanValidator(form).isValid(form.getModelObject())) {
        onError(target,form);
      }
 else {
        EntityForm.this.onSubmit(target,(Form<T>)form);
      }
    }
  }
);
}

Fixed version (ground truth):
private void init(){
  add(new FormFeedbackPanel(new ComponentFeedbackMessageFilter(this)));
  add(new MyAjaxSubmitLink("String_Node_Str"){
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form<?> form){
      onBeforeValidation((T)form.getModelObject());
      if (!new BeanValidator(form).isValid(form.getModelObject())) {
        onError(target,form);
      }
 else {
        EntityForm.this.onSubmit(target,(Form<T>)form);
      }
    }
  }
);
}
Program: 20547
Project: 20547
Buggy source:
public FormFeedbackPanel(){
  add(new WebMarkupContainer("String_Node_Str"){
    @Override public boolean isVisible(){
      return !Session.get().getFeedbackMessages().isEmpty();
    }
  }
);
  final FeedbackPanel feedback;
  add(feedback=new FeedbackPanel("String_Node_Str"));
  feedback.setOutputMarkupId(true);
}

Fixed version (ground truth):
public FormFeedbackPanel(final IFeedbackMessageFilter filter){
  add(new WebMarkupContainer("String_Node_Str"){
    @Override public boolean isVisible(){
      return !Session.get().getFeedbackMessages().isEmpty();
    }
  }
);
  final FeedbackPanel feedback;
  add(feedback=new FeedbackPanel("String_Node_Str",filter));
  feedback.setOutputMarkupId(true);
}
Program: 20548
Project: 20548
Buggy source:
@Override @Test public void testRender(){
  wicketTester.startComponentInPage(new FormFeedbackPanel());
  wicketTester.dumpComponentWithPage();
  wicketTester.assertInvisible("String_Node_Str");
}

Fixed version (ground truth):
@Override @Test public void testRender(){
  wicketTester.startComponentInPage(new FormFeedbackPanel(null));
  wicketTester.dumpComponentWithPage();
  wicketTester.assertInvisible("String_Node_Str");
}
Program: 20549
Project: 20549
Buggy source:
@Test public void testRenderError(){
  String message="String_Node_Str";
  wicketTester.getSession().getFeedbackMessages().error(null,message);
  wicketTester.startComponentInPage(new FormFeedbackPanel());
  wicketTester.dumpComponentWithPage();
  wicketTester.assertVisible("String_Node_Str");
  wicketTester.assertContains(message);
}

Fixed version (ground truth):
@Test public void testRenderError(){
  String message="String_Node_Str";
  wicketTester.getSession().getFeedbackMessages().error(null,message);
  wicketTester.startComponentInPage(new FormFeedbackPanel(null));
  wicketTester.dumpComponentWithPage();
  wicketTester.assertVisible("String_Node_Str");
  wicketTester.assertContains(message);
}
Program: 20550
Project: 20550
Buggy source:
/** 
 * This test verifies that the implementation of debugComponentTrees is overridden with a safe version that does not produce error logs and messes with model objects.
 */
@Test public void testDebugComponentTrees(){
  wicketTester.startPage(new EntityFormTestPage());
  wicketTester.clickLink("String_Node_Str");
  wicketTester.dumpPage();
  wicketTester.assertContains(TestEntity.message);
  wicketTester.startPage(new EntityFormTestPage());
  wicketTester.debugComponentTrees();
  wicketTester.clickLink("String_Node_Str");
  wicketTester.dumpPage();
  wicketTester.assertContains(TestEntity.message);
}

Fixed version (ground truth):
/** 
 * This test verifies that the implementation of debugComponentTrees is overridden with a safe version that does not produce error logs and messes with model objects.
 */
@Test public void testDebugComponentTrees(){
  wicketTester.startPage(new EntityFormTestPage());
  wicketTester.clickLink("String_Node_Str");
  wicketTester.dumpPage();
  wicketTester.assertContains(TestEntity.scriptAssertMessage);
  wicketTester.startPage(new EntityFormTestPage());
  wicketTester.debugComponentTrees();
  wicketTester.clickLink("String_Node_Str");
  wicketTester.dumpPage();
  wicketTester.assertContains(TestEntity.scriptAssertMessage);
}
Program: 20551
Project: 20551
Buggy source:
@Test public void testRenderError(){
  wicketTester.startPage(new EntityFormTestPage());
  wicketTester.dumpPage();
  wicketTester.clickLink("String_Node_Str");
  wicketTester.dumpPage();
  wicketTester.assertVisible("String_Node_Str");
  wicketTester.assertErrorMessages(TestEntity.message);
  wicketTester.assertContains(TestEntity.message);
}

Fixed version (ground truth):
/** 
 * Submit empty form. Verify that feedback messages are not duplicated in global feebackpanel and field level feedback panels.
 */
@Test public void testRenderError(){
  wicketTester.startPage(new EntityFormTestPage());
  wicketTester.dumpPage();
  wicketTester.clickLink("String_Node_Str");
  wicketTester.dumpPage();
  wicketTester.assertVisible("String_Node_Str");
  wicketTester.assertErrorMessagesContains(TestEntity.notBlankAssertMessage);
  wicketTester.assertContains(TestEntity.notBlankAssertMessage);
  wicketTester.assertVisible("String_Node_Str");
  wicketTester.assertInvisible("String_Node_Str");
  int matches=StringUtils.countMatches(wicketTester.getLastResponseAsString(),TestEntity.notBlankAssertMessage);
  assertEquals(1,matches);
  wicketTester.debugComponentTrees();
}
Program: 20552
Project: 20552
Buggy source:
public String getDebugComponentTrees(final String filter){
  final StringBuilder s=new StringBuilder();
  for (  final WicketTesterHelper.ComponentData obj : WicketTesterHelper.getComponentData(getLastRenderedPage())) {
    if (obj.path.matches("String_Node_Str" + filter + "String_Node_Str")) {
      s.append("String_Node_Str").append(obj.path).append("String_Node_Str").append(obj.type).append("String_Node_Str").append(obj.value).append("String_Node_Str");
    }
  }
  return s.toString();
}

Fixed version (ground truth):
public String getDebugComponentTrees(final String filter){
  final StringBuilder s=new StringBuilder();
  for (  final WicketTesterHelper.ComponentData obj : RMTWicketTesterHelper.getComponentData(getLastRenderedPage(),false)) {
    if (obj.path.matches("String_Node_Str" + filter + "String_Node_Str")) {
      s.append("String_Node_Str").append(obj.path).append("String_Node_Str").append(obj.type).append("String_Node_Str").append(obj.value).append("String_Node_Str");
    }
  }
  return s.toString();
}
Program: 20553
Project: 20553
Buggy source:
@Override public Object invoke(Object iContent,Object... params) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
  try {
    Roma.context().create();
    List<SchemaEventListener> listeners=Controller.getInstance().getListeners(SchemaEventListener.class);
    boolean result=true;
    for (    SchemaEventListener listener : listeners) {
      result=listener.onBeforeEvent(iContent,this);
      if (!result) {
        log.debug("String_Node_Str" + listener + "String_Node_Str");
        return null;
      }
    }
    Object value=null;
    try {
      value=invokeFinal(iContent,params);
      for (      SchemaEventListener listener : listeners) {
        try {
          listener.onAfterEvent(iContent,this,value);
        }
 catch (        Throwable t) {
          log.error("String_Node_Str" + listener + "String_Node_Str",t);
        }
      }
      return value;
    }
 catch (    IllegalArgumentException e) {
      fireEventException(listeners,iContent,e);
      throw e;
    }
catch (    IllegalAccessException e) {
      fireEventException(listeners,iContent,e);
      throw e;
    }
catch (    InvocationTargetException e) {
      fireEventException(listeners,iContent,e);
      throw e;
    }
  }
  finally {
    Roma.context().destroy();
  }
}

Fixed version (ground truth):
@Override public Object invoke(Object iContent,Object... params) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
  try {
    Roma.context().create();
    List<SchemaEventListener> listeners=Controller.getInstance().getListeners(SchemaEventListener.class);
    boolean result=true;
    for (    SchemaEventListener listener : listeners) {
      result=listener.onBeforeEvent(iContent,this);
      if (!result) {
        log.debug("String_Node_Str" + listener + "String_Node_Str");
        return null;
      }
    }
    Object value=null;
    try {
      if (params != null) {
        Iterator<SchemaParameter> param=getParameterIterator();
        Object newValues[]=new Object[params.length];
        int i=0;
        while (param.hasNext()) {
          SchemaParameter par=param.next();
          newValues[i]=convertValue(params[i],par.getType());
          i++;
        }
        value=invokeFinal(iContent,newValues);
      }
 else {
        value=invokeFinal(iContent,params);
      }
      for (      SchemaEventListener listener : listeners) {
        try {
          listener.onAfterEvent(iContent,this,value);
        }
 catch (        Throwable t) {
          log.error("String_Node_Str" + listener + "String_Node_Str",t);
        }
      }
      return value;
    }
 catch (    IllegalArgumentException e) {
      fireEventException(listeners,iContent,e);
      throw e;
    }
catch (    IllegalAccessException e) {
      fireEventException(listeners,iContent,e);
      throw e;
    }
catch (    InvocationTargetException e) {
      fireEventException(listeners,iContent,e);
      throw e;
    }
  }
  finally {
    Roma.context().destroy();
  }
}
Program: 20554
Project: 20554
Buggy source:
public SchemaEventReflection(SchemaClassDefinition iEntity,String iName,List<SchemaParameter> iOrderedParameters){
  super(iEntity,iName,null);
}

Fixed version (ground truth):
public SchemaEventReflection(SchemaClassDefinition iEntity,String iName,List<SchemaParameter> iOrderedParameters){
  super(iEntity,iName,iOrderedParameters);
}
Program: 20555
Project: 20555
Buggy source:
/** 
 * Destroy the context if the counter is 0 otherwise decrement the counter.
 */
public void destroy(){
  Integer counter=ObjectContext.getInstance().getContextComponent(CTX_CREATED);
  if (counter == 0) {
    List<ContextLifecycleListener> contextListener=Controller.getInstance().getListeners(ContextLifecycleListener.class);
    for (    ContextLifecycleListener listener : contextListener) {
      listener.onContextDestroy();
    }
    ObjectContext.getInstance().setContextComponent(CTX_CREATED,null);
  }
 else   ObjectContext.getInstance().setContextComponent(CTX_CREATED,--counter);
}

Fixed version (ground truth):
/** 
 * Destroy the context if the counter is 0 otherwise decrement the counter.
 */
public void destroy(){
  Integer counter=ObjectContext.getInstance().getContextComponent(CTX_CREATED);
  if (counter == 0) {
    try {
      List<ContextLifecycleListener> contextListener=Controller.getInstance().getListeners(ContextLifecycleListener.class);
      for (      ContextLifecycleListener listener : contextListener) {
        listener.onContextDestroy();
      }
    }
  finally {
      ObjectContext.getInstance().setContextComponent(CTX_CREATED,null);
    }
  }
 else   ObjectContext.getInstance().setContextComponent(CTX_CREATED,--counter);
}
Program: 20556
Project: 20556
Buggy source:
public void validateString(Object pojo,MultiValidationException iMultiException,SchemaField fieldInfo,Object fieldValue,String name,boolean required,Integer annotationMin,Integer annotationMax){
  String stringValue=(String)fieldValue;
  if (required && (stringValue == null || stringValue.length() == 0))   handleValidationException(pojo,iMultiException,name,"String_Node_Str",null);
  if (annotationMin != null && (stringValue == null || stringValue.length() < annotationMin))   handleValidationException(pojo,iMultiException,name,"String_Node_Str",String.valueOf(annotationMin));
  if (annotationMax != null && stringValue != null && stringValue.length() > annotationMax)   handleValidationException(pojo,iMultiException,name,"String_Node_Str",String.valueOf(annotationMax));
}

Fixed version (ground truth):
public void validateString(Object pojo,MultiValidationException iMultiException,SchemaField fieldInfo,Object fieldValue,String name,boolean required,Integer annotationMin,Integer annotationMax){
  String stringValue=(String)fieldValue;
  if (required && (stringValue == null || stringValue.length() == 0))   handleValidationException(pojo,iMultiException,name,"String_Node_Str",null);
  if (annotationMin != null && stringValue != null && stringValue.length() < annotationMin)   handleValidationException(pojo,iMultiException,name,"String_Node_Str",String.valueOf(annotationMin));
  if (annotationMax != null && stringValue != null && stringValue.length() > annotationMax)   handleValidationException(pojo,iMultiException,name,"String_Node_Str",String.valueOf(annotationMax));
}
Program: 20557
Project: 20557
Buggy source:
public void setField(String iFieldName,SchemaField iField){
  if (fields.containsKey(iFieldName)) {
    for (int i=0; i < orderedFields.size(); ++i) {
      if (orderedFields.get(i).getName() != null && orderedFields.get(i).getName().equals(iFieldName)) {
        orderedFields.remove(i);
        break;
      }
    }
  }
  orderedFields.add(iField);
  fields.put(iFieldName,iField);
}

Fixed version (ground truth):
public void setField(String iFieldName,SchemaField iField){
  int pos=-1;
  if (fields.containsKey(iFieldName)) {
    for (int i=0; i < orderedFields.size(); ++i) {
      if (orderedFields.get(i).getName() != null && orderedFields.get(i).getName().equals(iFieldName)) {
        orderedFields.remove(i);
        pos=i;
        break;
      }
    }
  }
  if (pos > -1 && pos < orderedFields.size()) {
    orderedFields.add(pos,iField);
  }
 else {
    orderedFields.add(iField);
  }
  fields.put(iFieldName,iField);
}
Program: 20558
Project: 20558
Buggy source:
public void setAction(String iActionName,SchemaAction iAction){
  if (actions.containsKey(iActionName)) {
    for (int i=0; i < orderedActions.size(); ++i) {
      if (orderedActions.get(i).getName() != null && orderedActions.get(i).getName().equals(iActionName)) {
        orderedActions.remove(i);
        break;
      }
    }
  }
  orderedActions.add(iAction);
  actions.put(iActionName,iAction);
}

Fixed version (ground truth):
public void setAction(String iActionName,SchemaAction iAction){
  int pos=-1;
  if (actions.containsKey(iActionName)) {
    for (int i=0; i < orderedActions.size(); ++i) {
      if (orderedActions.get(i).getName() != null && orderedActions.get(i).getName().equals(iActionName)) {
        orderedActions.remove(i);
        pos=i;
        break;
      }
    }
  }
  if (pos > -1 && pos < orderedActions.size()) {
    orderedActions.add(pos,iAction);
  }
 else {
    orderedActions.add(iAction);
  }
  actions.put(iActionName,iAction);
}
Program: 20559
Project: 20559
Buggy source:
public void configure(){
  SchemaConfiguration classDescriptor=entity.getSchemaClass().getDescriptor();
  XmlFieldAnnotation parentDescriptor=null;
  if (classDescriptor != null && classDescriptor.getType() != null && classDescriptor.getType().getFields() != null) {
    parentDescriptor=classDescriptor.getType().getField(name);
  }
  FeatureLoader.loadFieldFeatures(this,parentDescriptor);
  for (  Aspect aspect : Roma.aspects()) {
    aspect.configField(this);
  }
  if (parentDescriptor != null && parentDescriptor.getEvents() != null) {
    Set<XmlEventAnnotation> events=parentDescriptor.getEvents();
    for (    XmlEventAnnotation xmlConfigEventType : events) {
      SchemaEventReflection eventInfo=(SchemaEventReflection)getEvent(xmlConfigEventType.getName());
      if (eventInfo == null) {
        eventInfo=new SchemaEventReflection(this,xmlConfigEventType.getName(),null);
        setEvent(xmlConfigEventType.getName(),eventInfo);
      }
      eventInfo.configure();
    }
  }
}

Fixed version (ground truth):
public void configure(){
  SchemaConfiguration classDescriptor=entity.getSchemaClass().getDescriptor();
  XmlFieldAnnotation parentDescriptor=null;
  if (classDescriptor != null && classDescriptor.getType() != null && classDescriptor.getType().getFields() != null) {
    parentDescriptor=classDescriptor.getType().getField(name);
  }
  FeatureLoader.loadFieldFeatures(this,parentDescriptor);
  for (  Aspect aspect : Roma.aspects()) {
    aspect.configField(this);
  }
  if (parentDescriptor != null && parentDescriptor.getEvents() != null) {
    Set<XmlEventAnnotation> events=parentDescriptor.getEvents();
    for (    XmlEventAnnotation xmlConfigEventType : events) {
      SchemaEventReflection eventInfo=(SchemaEventReflection)getEvent(xmlConfigEventType.getName());
      if (eventInfo == null) {
        eventInfo=new SchemaEventReflection(this,xmlConfigEventType.getName(),new ArrayList<SchemaParameter>());
        setEvent(xmlConfigEventType.getName(),eventInfo);
      }
      eventInfo.configure();
    }
  }
}
Program: 20560
Project: 20560
Buggy source:
public void configField(SchemaField iField){
  if (checkFeature(iField,ValidationFieldFeatures.MATCH) && checkFeature(iField,ValidationFieldFeatures.ENABLED) && checkFeature(iField,ValidationFieldFeatures.MAX)&& checkFeature(iField,ValidationFieldFeatures.MIN)&& checkFeature(iField,ValidationFieldFeatures.REQUIRED))   iField.setFeature(ValidationFieldFeatures.ENABLED,true);
 else   iField.setFeature(ValidationFieldFeatures.ENABLED,false);
}

Fixed version (ground truth):
public void configField(SchemaField iField){
  if (checkFeature(iField,ValidationFieldFeatures.ENABLED) || checkFeature(iField,ValidationFieldFeatures.REQUIRED) || checkFeature(iField,ValidationFieldFeatures.MAX)|| checkFeature(iField,ValidationFieldFeatures.MIN)|| checkFeature(iField,ValidationFieldFeatures.MATCH))   iField.setFeature(ValidationFieldFeatures.ENABLED,true);
 else   iField.setFeature(ValidationFieldFeatures.ENABLED,false);
}
Program: 20561
Project: 20561
Buggy source:
private void init(Object iObject,String iText){
  message=new StringBuilder();
  obj=iObject;
  if (iText == null)   return;
  String i18NMessage=Roma.component(I18NAspect.class).resolve(obj,iText,I18NType.EXCEPTION);
  if (i18NMessage != null)   message.append(i18NMessage);
 else   message.append(iText);
}

Fixed version (ground truth):
private void init(Object iObject,String iText){
  message=new StringBuilder();
  obj=iObject;
  if (iText == null)   return;
  String i18NMessage;
  if (obj == null) {
    i18NMessage=Roma.component(I18NAspect.class).resolve(iText);
  }
 else {
    i18NMessage=Roma.component(I18NAspect.class).resolve(obj,iText,I18NType.EXCEPTION);
  }
  if (i18NMessage != null)   message.append(i18NMessage);
 else   message.append(iText);
}
Program: 20562
Project: 20562
Buggy source:
public static <T>boolean setFeature(Object iUserObject,String elementName,Feature<T> feature,T value){
  SchemaFeatures features=getSchemaFeature(iUserObject,elementName,feature);
  if (features == null)   return false;
  T oldValue=features.getFeature(feature);
  features.setFeature(feature,value);
  List<SchemaFeaturesChangeListener> listeners=Controller.getInstance().getListeners(SchemaFeaturesChangeListener.class);
  if (listeners != null) switch (feature.getType()) {
case ACTION:
    for (    SchemaFeaturesChangeListener listener : listeners) {
      listener.signalChangeAction(iUserObject,elementName,feature,oldValue,value);
    }
  break;
case FIELD:
for (SchemaFeaturesChangeListener listener : listeners) {
  listener.signalChangeField(iUserObject,elementName,feature,oldValue,value);
}
case EVENT:
case CLASS:
for (SchemaFeaturesChangeListener listener : listeners) {
listener.signalChangeClass(iUserObject,feature,oldValue,value);
}
default :
break;
}
return true;
}

Fixed version (ground truth):
public static <T>boolean setFeature(Object iUserObject,String elementName,Feature<T> feature,T value){
  SchemaFeatures features=getSchemaFeature(iUserObject,elementName,feature);
  if (features == null)   return false;
  T oldValue=features.getFeature(feature);
  features.setFeature(feature,value);
  List<SchemaFeaturesChangeListener> listeners=Controller.getInstance().getListeners(SchemaFeaturesChangeListener.class);
  if (listeners != null) switch (feature.getType()) {
case ACTION:
    for (    SchemaFeaturesChangeListener listener : listeners) {
      listener.signalChangeAction(iUserObject,elementName,feature,oldValue,value);
    }
  break;
case FIELD:
for (SchemaFeaturesChangeListener listener : listeners) {
  listener.signalChangeField(iUserObject,elementName,feature,oldValue,value);
}
break;
case EVENT:
break;
case CLASS:
for (SchemaFeaturesChangeListener listener : listeners) {
listener.signalChangeClass(iUserObject,feature,oldValue,value);
}
default :
break;
}
return true;
}
Program: 20563
Project: 20563
Buggy source:
public String resolve(Object obj,String iText,String customType,Object... iArgs){
  iArgs=rebuildArgs(obj,iArgs);
  if (!iText.startsWith(VARNAME_PREFIX))   return fill(iText,iArgs);
  SchemaClassDefinition scd=getSchemaClassDefinition(obj);
  String str=findWithSchemaClass(scd,CONTEXT_SEPARATOR + iText.substring(1) + CONTEXT_SEPARATOR+ customType);
  if (str == null)   return "String_Node_Str";
  return fill(str,iArgs);
}

Fixed version (ground truth):
public String resolve(Object obj,String iText,String customType,Object... iArgs){
  if (iText == null)   return null;
  iArgs=rebuildArgs(obj,iArgs);
  if (!iText.startsWith(VARNAME_PREFIX))   return fill(iText,iArgs);
  SchemaClassDefinition scd=getSchemaClassDefinition(obj);
  String str=findWithSchemaClass(scd,CONTEXT_SEPARATOR + iText.substring(1) + CONTEXT_SEPARATOR+ customType);
  if (str == null)   return "String_Node_Str";
  return fill(str,iArgs);
}
Program: 20565
Project: 20565
Buggy source:
/** 
 * Makes all the operation needed for the application installation
 * @param obj If admin or users module is added the object must be casted to a realm
 * @return
 */
public abstract boolean install(Object obj);

Fixed version (ground truth):
/** 
 * Makes all the operation needed for the application installation
 * @return
 */
public abstract void install();
Program: 20566
Project: 20566
Buggy source:
@Override public void startup() throws RuntimeException {
}

Fixed version (ground truth):
@Override public void startup() throws RuntimeException {
  if (checkInstall()) {
    install();
  }
}
Program: 20567
Project: 20567
Buggy source:
public boolean isSetterForField(Method method,ParameterizedType owner){
  String fieldName=method.getName();
  if (!fieldName.startsWith(SET_METHOD) || !checkIfFirstCharAfterPrefixIsUpperCase(fieldName,SET_METHOD))   return false;
  if (method.getParameterTypes() != null && method.getParameterTypes().length != 1)   return false;
  fieldName=firstToLower(fieldName.substring(SET_METHOD.length()));
  Class<?> javaFieldClass=SchemaHelper.resolveClassFromType(method.getGenericParameterTypes()[0],owner);
  SchemaFieldReflection fieldInfo=(SchemaFieldReflection)getField(fieldName);
  if (fieldInfo == null) {
    fieldInfo=createField(fieldName,javaFieldClass);
    fieldInfo.setterMethod=method;
  }
 else   if (fieldInfo instanceof SchemaFieldReflection && ((SchemaFieldReflection)fieldInfo).getLanguageType().isAssignableFrom(javaFieldClass)) {
    fieldInfo.setterMethod=method;
  }
  return true;
}

Fixed version (ground truth):
public boolean isSetterForField(Method method,ParameterizedType owner){
  String fieldName=method.getName();
  if (!fieldName.startsWith(SET_METHOD) || !checkIfFirstCharAfterPrefixIsUpperCase(fieldName,SET_METHOD))   return false;
  if (method.getParameterTypes() != null && method.getParameterTypes().length != 1)   return false;
  fieldName=firstToLower(fieldName.substring(SET_METHOD.length()));
  Class<?> javaFieldClass=SchemaHelper.resolveClassFromType(method.getGenericParameterTypes()[0],owner);
  SchemaFieldReflection fieldInfo=(SchemaFieldReflection)getField(fieldName);
  if (fieldInfo == null) {
    fieldInfo=createField(fieldName,javaFieldClass);
    fieldInfo.setterMethod=method;
  }
 else   if (fieldInfo instanceof SchemaFieldReflection && ((SchemaFieldReflection)fieldInfo).getLanguageType().isAssignableFrom(javaFieldClass)) {
    fieldInfo.setterMethod=method;
    fieldInfo.setType(Roma.schema().getSchemaClassIfExist(javaFieldClass));
  }
  return true;
}
Program: 20568
Project: 20568
Buggy source:
@Override protected void setValueFinal(Object iObject,Object iValue) throws IllegalAccessException, InvocationTargetException {
  if (this.setterMethod != null) {
    super.setValue(iObject,iValue);
    return;
  }
  iObject=this.object.getValue(iObject);
  this.delegate.setValue(iObject,iValue);
}

Fixed version (ground truth):
@Override protected void setValueFinal(Object iObject,Object iValue) throws IllegalAccessException, InvocationTargetException {
  if (this.setterMethod != null) {
    super.setValueFinal(iObject,iValue);
    return;
  }
  iObject=this.object.getValue(iObject);
  this.delegate.setValue(iObject,iValue);
}
Program: 20569
Project: 20569
Buggy source:
/** 
 * Method that extracts a file, defined by his name, from a compressed file.
 * @param iCompressedFile - The original compressed file
 * @param iFileName - The name of the file contained in the compressed file to extract
 * @return the file extracted by the compressed file, or null if it doesn't exists
 * @throws IOException
 */
public static File getDecompressedAttachment(File iCompressedFile,String iFileName) throws IOException {
  File attachment=null;
  String sessionId=getSessionId();
  ZipInputStream zis=new ZipInputStream(new FileInputStream(iCompressedFile));
  ZipEntry entry;
  while ((entry=zis.getNextEntry()) != null) {
    if (entry.getName().equals(iFileName)) {
      log.info("String_Node_Str" + entry.getName());
      File file=new File(sessionId + "String_Node_Str" + entry.getName());
      IOUtils.copy(zis,new FileOutputStream(file));
    }
  }
  if (attachment != null)   attachment.deleteOnExit();
  return attachment;
}

Fixed version (ground truth):
/** 
 * Method that extracts a file, defined by his name, from a compressed file.
 * @param iCompressedFile - The original compressed file
 * @param iFileName - The name of the file contained in the compressed file to extract
 * @return the file extracted by the compressed file, or null if it doesn't exists
 * @throws IOException
 */
public static File getDecompressedAttachment(File iCompressedFile,String iFileName) throws IOException {
  File attachment=null;
  String sessionId=getSessionId();
  ZipInputStream zis=new ZipInputStream(new FileInputStream(iCompressedFile));
  ZipEntry entry;
  while ((entry=zis.getNextEntry()) != null) {
    if (entry.getName().equals(iFileName)) {
      log.info("String_Node_Str" + entry.getName());
      attachment=new File(sessionId + "String_Node_Str" + entry.getName());
      IOUtils.copy(zis,new FileOutputStream(attachment));
    }
  }
  if (attachment != null)   attachment.deleteOnExit();
  return attachment;
}
Program: 20571
Project: 20571
Buggy source:
public boolean isEvent(Method method){
  String eventMethodName=method.getName();
  if (!eventMethodName.startsWith(SchemaEvent.ON_METHOD) || !checkIfFirstCharAfterPrefixIsUpperCase(eventMethodName,SchemaEvent.ON_METHOD))   return false;
  eventMethodName=firstToLower(eventMethodName.substring(SchemaEvent.ON_METHOD.length()));
  SchemaField fieldEvent=getFieldComposedEntity(eventMethodName);
  String eventName=lastCapitalWords(eventMethodName);
  eventName=firstToLower(eventName);
  String fieldName;
  if (fieldEvent != null) {
    if (!eventMethodName.equals(eventName)) {
      fieldName=eventMethodName.substring(0,eventMethodName.length() - eventName.length());
      fieldName=firstToLower(fieldName);
      SchemaField field=getFieldComposedEntity(fieldName);
      if (field != null) {
        if (log.isWarnEnabled())         log.warn("String_Node_Str" + method + "String_Node_Str"+ fieldEvent.getEntity().getSchemaClass().getName()+ "String_Node_Str"+ fieldEvent.getName()+ "String_Node_Str"+ eventName+ "String_Node_Str"+ field.getEntity().getSchemaClass().getName()+ "String_Node_Str"+ field.getName()+ "String_Node_Str");
      }
    }
    addEvent(SchemaEvent.DEFAULT_EVENT_NAME,fieldEvent,method);
  }
 else   if (eventMethodName.equals(eventName)) {
    addEvent(eventName,null,method);
  }
 else {
    fieldName=eventMethodName.substring(0,eventMethodName.length() - eventName.length());
    fieldName=firstToLower(fieldName);
    SchemaField field=getFieldComposedEntity(fieldName);
    if (field == null) {
      if (log.isWarnEnabled())       log.warn("String_Node_Str" + getName() + "String_Node_Str"+ eventName+ "String_Node_Str"+ getName()+ "String_Node_Str"+ fieldName+ "String_Node_Str");
      return false;
    }
    addEvent(eventName,field,method);
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Checks if the class method is an event
 * @param method -: the class method to check
 * @return true if is a event, false otherwise.
 */
public boolean isEvent(Method method){
  String eventMethodName=method.getName();
  if (!eventMethodName.startsWith(SchemaEvent.ON_METHOD) || !checkIfFirstCharAfterPrefixIsUpperCase(eventMethodName,SchemaEvent.ON_METHOD))   return false;
  return true;
}
Program: 20573
Project: 20573
Buggy source:
private void expandField(SchemaField iField){
  SchemaClass cl=iField.getType().getSchemaClass();
  Iterator<SchemaField> fields=cl.getFieldIterator();
  while (fields.hasNext()) {
    SchemaField sf=fields.next();
    SchemaFieldDelegate sfd=new SchemaFieldDelegate(iField.getEntity(),iField,sf);
    sfd.configure();
    sfd.setOrder(iField.getEntity().getSchemaClass().getFieldOrder(sfd));
    iField.getEntity().setField(sf.getName(),sfd);
  }
  Iterator<SchemaAction> actions=cl.getActionIterator();
  while (actions.hasNext()) {
    SchemaAction sa=actions.next();
    SchemaActionDelegate sad=new SchemaActionDelegate(iField.getEntity(),iField,sa);
    sad.configure();
    sad.setOrder(iField.getEntity().getSchemaClass().getActionOrder(sad));
    iField.getEntity().setAction(sa.getName(),sad);
  }
  Iterator<SchemaEvent> events=cl.getEventIterator();
  while (events.hasNext()) {
    SchemaEvent se=events.next();
    SchemaEventDelegate sed=new SchemaEventDelegate(iField.getEntity(),iField,se);
    sed.configure();
    iField.getEntity().setEvent(se.getName(),sed);
  }
}

Fixed version (ground truth):
private void expandField(SchemaField iField){
  SchemaClass cl=iField.getType().getSchemaClass();
  Iterator<SchemaField> fields=cl.getFieldIterator();
  while (fields.hasNext()) {
    SchemaField sf=fields.next();
    SchemaField parentField=iField.getEntity().getField(sf.getName());
    if (parentField == null || parentField.getType().getSchemaClass().isAssignableAs(sf.getType().getSchemaClass())) {
      SchemaFieldDelegate sfd=new SchemaFieldDelegate(iField.getEntity(),iField,sf);
      sfd.configure();
      sfd.setOrder(iField.getEntity().getSchemaClass().getFieldOrder(sfd));
      iField.getEntity().setField(sf.getName(),sfd);
    }
  }
  Iterator<SchemaAction> actions=cl.getActionIterator();
  while (actions.hasNext()) {
    SchemaAction sa=actions.next();
    SchemaActionDelegate sad=new SchemaActionDelegate(iField.getEntity(),iField,sa);
    sad.configure();
    sad.setOrder(iField.getEntity().getSchemaClass().getActionOrder(sad));
    iField.getEntity().setAction(sa.getName(),sad);
  }
  Iterator<SchemaEvent> events=cl.getEventIterator();
  while (events.hasNext()) {
    SchemaEvent se=events.next();
    SchemaEventDelegate sed=new SchemaEventDelegate(iField.getEntity(),iField,se);
    sed.configure();
    iField.getEntity().setEvent(se.getName(),sed);
  }
}
Program: 20574
Project: 20574
Buggy source:
private void deleteBacklog(final long selectedBacklog){
}

Fixed version (ground truth):
private void deleteBacklog(final long selectedBacklog){
  dispatcher.execute(new DeleteBacklogAction(selectedBacklog),new AsyncCallback<DeleteBacklogResult>(){
    @Override public void onFailure(    Throwable caught){
    }
    @Override public void onSuccess(    DeleteBacklogResult result){
      BacklogDeletedEvent.fire(BacklogPresenter.this,selectedBacklog);
    }
  }
);
}
Program: 20575
Project: 20575
Buggy source:
@ProxyEvent @Override public void onBacklogDeleted(BacklogDeletedEvent event){
  Window.alert("String_Node_Str" + event.getBacklog().getProjectName() + "String_Node_Str");
}

Fixed version (ground truth):
@ProxyEvent @Override public void onBacklogDeleted(BacklogDeletedEvent event){
  Window.alert("String_Node_Str");
}
Program: 20576
Project: 20576
Buggy source:
/** 
 * Method that is called when a backlog has been created or updated
 */
@ProxyEvent @Override public void onBacklogUpdated(BacklogUpdatedEvent event){
  Backlog backlog=event.getBacklog();
  List<Long> backlogIds=getBacklogIds();
  int backlogIndex=getView().getBacklogList().getSelectedIndex();
  if (backlogIds.contains(backlog.getId())) {
    getView().getBacklogList().removeItem(backlogIndex);
  }
  getView().getBacklogList().insertItem(backlog.getProjectName(),null,backlog.getId().toString(),backlogIndex);
  getView().getBacklogList().setSelectedIndex(backlogIndex);
}

Fixed version (ground truth):
/** 
 * Method that is called when a backlog has been created or updated
 */
@ProxyEvent @Override public void onBacklogUpdated(BacklogUpdatedEvent event){
  Backlog backlog=event.getBacklog();
  List<Long> backlogIds=getBacklogIds();
  int backlogIndex=getView().getBacklogList().getSelectedIndex();
  if (backlogIds.contains(backlog.getId())) {
    getView().getBacklogList().removeItem(backlogIndex);
  }
  getView().getBacklogList().insertItem(backlog.getProjectName(),null,backlog.getId().toString(),backlogIndex);
  getView().getBacklogList().setSelectedIndex(backlogIndex);
  changePlaceFromSelectedBacklog(backlog.getId() + "String_Node_Str");
}
Program: 20577
Project: 20577
Buggy source:
public BacklogDeletedEvent(Backlog backlog){
  this.backlog=backlog;
}

Fixed version (ground truth):
public BacklogDeletedEvent(long backlogId){
  this.backlogId=backlogId;
}
Program: 20578
Project: 20578
Buggy source:
public static void fire(HasHandlers source,Backlog backlog){
  source.fireEvent(new BacklogDeletedEvent(backlog));
}

Fixed version (ground truth):
public static void fire(HasHandlers source,long backlogId){
  source.fireEvent(new BacklogDeletedEvent(backlogId));
}
Program: 20579
Project: 20579
Buggy source:
public List<UserStory> getStories(long backlogId){
  return listByProperty("String_Node_Str",backlogId);
}

Fixed version (ground truth):
/** 
 * Get stories in datastore that are linked to the backlog corresponding to the backlogId
 * @param backlogId
 * @return
 */
public List<UserStory> getStories(long backlogId){
  return listByProperty("String_Node_Str",backlogId);
}
Program: 20580
Project: 20580
Buggy source:
@Override protected void configureHandlers(){
  bindHandler(GetBacklogListAction.class,GetBacklogListHandler.class);
  bindHandler(GetStoryListAction.class,GetStoryListHandler.class);
  bindHandler(UpdateStoryAction.class,UpdateStoryHandler.class);
  bindHandler(UpdateBacklogAction.class,UpdateBacklogHandler.class);
  bindHandler(GetStoryAction.class,GetStoryHandler.class);
  bindHandler(GetBacklogAction.class,GetBacklogHandler.class);
}

Fixed version (ground truth):
@Override protected void configureHandlers(){
  bindHandler(GetBacklogListAction.class,GetBacklogListHandler.class);
  bindHandler(GetStoryListAction.class,GetStoryListHandler.class);
  bindHandler(UpdateStoryAction.class,UpdateStoryHandler.class);
  bindHandler(UpdateBacklogAction.class,UpdateBacklogHandler.class);
  bindHandler(GetStoryAction.class,GetStoryHandler.class);
  bindHandler(GetBacklogAction.class,GetBacklogHandler.class);
  bindHandler(DeleteBacklogAction.class,DeleteBacklogHandler.class);
}
Program: 20581
Project: 20581
Buggy source:
public UserStory retrieve(long backlogId) throws EntityNotFoundException {
  return userStoryDao.get(backlogId);
}

Fixed version (ground truth):
public UserStory retrieve(long storyId) throws EntityNotFoundException {
  return userStoryDao.get(storyId);
}
Program: 20582
Project: 20582
Buggy source:
public List<UserStory> list(long backlogId){
  return userStoryDao.list();
}

Fixed version (ground truth):
public List<UserStory> list(long backlogId){
  return userStoryDao.getStories(backlogId);
}
Program: 20583
Project: 20583
Buggy source:
@Test public void testList(){
  long backlogId=1l;
  List<UserStory> userStoriesMock=Arrays.asList(PojoHelper.userStory("String_Node_Str"),PojoHelper.userStory("String_Node_Str"),PojoHelper.userStory("String_Node_Str"));
  expect(userStoryDaoMock.list()).andReturn(userStoriesMock);
  replay(userStoryDaoMock);
  List<UserStory> result=userStoryService.list(backlogId);
  verify(userStoryDaoMock);
  assertThat(result).isNotNull().isEqualTo(userStoriesMock);
}

Fixed version (ground truth):
@Test public void testList(){
  long backlogId=1l;
  List<UserStory> userStoriesMock=Arrays.asList(PojoHelper.userStory("String_Node_Str"),PojoHelper.userStory("String_Node_Str"),PojoHelper.userStory("String_Node_Str"));
  expect(userStoryDaoMock.getStories(backlogId)).andReturn(userStoriesMock);
  replay(userStoryDaoMock);
  List<UserStory> result=userStoryService.list(backlogId);
  verify(userStoryDaoMock);
  assertThat(result).isNotNull().isEqualTo(userStoriesMock);
}
Program: 20584
Project: 20584
Buggy source:
private synchronized Object getObject(Backend.Identity id){
  Object obj=idToObject.get(id);
  if (obj == null) {
    try {
      obj=objectClass.newInstance();
    }
 catch (    Exception e) {
      throw new RuntimeException("String_Node_Str",e);
    }
    objectToId.put(obj,id);
    idToObject.put(id,new WeakReference<Object>(obj));
  }
  return obj;
}

Fixed version (ground truth):
private synchronized Object getObject(Backend.Identity id){
  WeakReference<Object> objRef=idToObject.get(id);
  Object obj=objRef == null ? null : objRef.get();
  if (obj == null) {
    try {
      obj=objectClass.newInstance();
    }
 catch (    Exception e) {
      throw new RuntimeException("String_Node_Str",e);
    }
    objectToId.put(obj,id);
    idToObject.put(id,new WeakReference<Object>(obj));
  }
  return obj;
}
Program: 20586
Project: 20586
Buggy source:
public static <C>void set(C klass,String field) throws Exception {
  Field fieldID=klass.getClass().getDeclaredField(field);
  String table=klass.getClass().getName().replace('$','_').replace('.','_');
  Type type=fieldID.getType();
  String[] tmpArray=type.toString().split("String_Node_Str");
  String typeDesc=tmpArray[tmpArray.length - 1];
  int awesomeId=(Integer)klass.getClass().getDeclaredMethod("String_Node_Str").invoke(klass);
  Object value=Manager.getField(table,awesomeId,field);
  fieldID.setAccessible(true);
  if (value != null) {
    fieldID.set(klass,value);
  }
}

Fixed version (ground truth):
public static <C>void set(C klass,String field) throws Exception {
  Field fieldID=klass.getClass().getDeclaredField(field);
  String table=klass.getClass().getName();
  Field[] fields=klass.getClass().getDeclaredFields();
  Object id=null;
  for (  Field f : fields) {
    if (f.isAnnotationPresent(ID.class)) {
      f.setAccessible(true);
      id=f.get(klass);
    }
  }
  if (id == null) {
    throw new EntityException("String_Node_Str");
  }
  Object value=Manager.getField(table,(Integer)id,field);
  fieldID.setAccessible(true);
  if (value != null) {
    fieldID.set(klass,value);
  }
 else {
  }
}
Program: 20587
Project: 20587
Buggy source:
@Override public byte[] transform(ClassLoader loader,String className,Class<?> classBeingRedefined,ProtectionDomain protectionDomain,byte[] bytes) throws IllegalClassFormatException {
  try {
    ClassReader creader=new ClassReader(bytes);
  }
  finally {
  }
  return null;
}

Fixed version (ground truth):
@Override public byte[] transform(ClassLoader loader,String className,Class<?> classBeingRedefined,ProtectionDomain protectionDomain,byte[] bytes) throws IllegalClassFormatException {
  try {
  }
  finally {
  }
  return null;
}
Program: 20588
Project: 20588
Buggy source:
/** 
 * @param args
 */
@SuppressWarnings("String_Node_Str") public static void main(String[] args) throws Exception {
  if (args.length > 0) {
    System.out.println(args[0]);
  }
  if (Class.class.getClassLoader() == null && args.length == 0) {
    System.setProperty("String_Node_Str","String_Node_Str");
    VirtualMachineDescriptor vmDescriptor=null;
    for (    VirtualMachineDescriptor descr : VirtualMachine.list()) {
      System.out.println("String_Node_Str" + descr.displayName());
      if (descr.displayName().endsWith(INSTR_JAR_NAME) || descr.displayName().endsWith("String_Node_Str")) {
        vmDescriptor=descr;
        break;
      }
    }
    VirtualMachine vm=VirtualMachine.attach(vmDescriptor);
    String splitter=OS_NAME.equalsIgnoreCase("String_Node_Str") ? "String_Node_Str" : "String_Node_Str";
    String agentPath=null;
    for (    String entry : CLASS_PATH.split(splitter)) {
      System.out.println("String_Node_Str" + entry);
      if (entry.endsWith(INSTR_JAR_NAME)) {
        agentPath=entry;
        break;
      }
    }
    if (agentPath != null) {
      System.out.println("String_Node_Str" + agentPath);
      vm.loadAgent(agentPath);
    }
    vm.detach();
    System.out.println(Main.class.getClassLoader());
    Main main=new Main();
    main.printHello("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * @param args
 */
public static void main(String[] args) throws Exception {
  if (args.length > 0) {
    System.out.println(args[0]);
  }
  if (Class.class.getClassLoader() == null && args.length == 0) {
    System.setProperty("String_Node_Str","String_Node_Str");
    VirtualMachineDescriptor vmDescriptor=null;
    for (    VirtualMachineDescriptor descr : VirtualMachine.list()) {
      System.out.println("String_Node_Str" + descr.displayName());
      if (descr.displayName().endsWith(INSTR_JAR_NAME) || descr.displayName().endsWith("String_Node_Str")) {
        vmDescriptor=descr;
        break;
      }
    }
    VirtualMachine vm=VirtualMachine.attach(vmDescriptor);
    String splitter=OS_NAME.equalsIgnoreCase("String_Node_Str") ? "String_Node_Str" : "String_Node_Str";
    String agentPath=null;
    for (    String entry : CLASS_PATH.split(splitter)) {
      System.out.println("String_Node_Str" + entry);
      if (entry.endsWith(INSTR_JAR_NAME)) {
        agentPath=entry;
        break;
      }
    }
    if (agentPath != null) {
      System.out.println("String_Node_Str" + agentPath);
      vm.loadAgent(agentPath);
    }
    vm.detach();
    System.out.println(Main.class.getClassLoader());
    Main main=new Main();
    main.printHello("String_Node_Str");
  }
}
Program: 20589
Project: 20589
Buggy source:
@Override public FieldVisitor visitField(int access,String name,String desc,String signature,Object value){
  if (name.equals(fName)) {
    isFieldPresent=true;
  }
  System.out.format("String_Node_Str",access,name,desc,signature,value.toString());
  return cv.visitField(access,name,desc,signature,value);
}

Fixed version (ground truth):
@Override public FieldVisitor visitField(int access,String name,String desc,String signature,Object value){
  if (name.equals(fName)) {
  }
  System.out.format("String_Node_Str",access,name,desc,signature,value.toString());
  return cv.visitField(access,name,desc,signature,value);
}
Program: 20590
Project: 20590
Buggy source:
public AddFieldAdapter(ClassVisitor cv,int fAcc,String fName,String fDesc){
  super(cv);
  this.fAcc=fAcc;
  this.fName=fName;
  this.fDesc=fDesc;
}

Fixed version (ground truth):
public AddFieldAdapter(ClassVisitor cv,int fAcc,String fName,String fDesc){
  super(cv);
  this.fAcc=fAcc;
  this.fName=fName;
}