nus-yam/ex-repair huggingface dataset:
Program: 117390
Project: 117390
Buggy source:
@Override public void applyRelationships(OSchemaHelper helper){
  super.applyRelationships(helper);
  helper.setupRelationship(OCLASS_NAME,"String_Node_Str",ExecutionEntityHandler.OCLASS_NAME,"String_Node_Str");
  helper.setupRelationship(OCLASS_NAME,"String_Node_Str",ExecutionEntityHandler.OCLASS_NAME);
  helper.setupRelationship(OCLASS_NAME,"String_Node_Str",ProcessDefinitionEntityHandler.OCLASS_NAME,"String_Node_Str");
  helper.setupRelationship(OCLASS_NAME,"String_Node_Str",CaseDefinitionEntityHandler.OCLASS_NAME,"String_Node_Str");
  helper.setupRelationship(OCLASS_NAME,"String_Node_Str",CaseExecutionEntityHandler.OCLASS_NAME,"String_Node_Str");
  helper.setupRelationship(OCLASS_NAME,"String_Node_Str",TaskEntityHandler.OCLASS_NAME,"String_Node_Str");
}

Fixed version (ground truth):
@Override public void applyRelationships(OSchemaHelper helper){
  super.applyRelationships(helper);
  helper.setupRelationship(OCLASS_NAME,"String_Node_Str",ExecutionEntityHandler.OCLASS_NAME,"String_Node_Str");
  helper.setupRelationship(OCLASS_NAME,"String_Node_Str",ExecutionEntityHandler.OCLASS_NAME);
  helper.setupRelationship(OCLASS_NAME,"String_Node_Str",ProcessDefinitionEntityHandler.OCLASS_NAME,"String_Node_Str");
  helper.setupRelationship(OCLASS_NAME,"String_Node_Str",CaseDefinitionEntityHandler.OCLASS_NAME,"String_Node_Str");
  helper.setupRelationship(OCLASS_NAME,"String_Node_Str",CaseExecutionEntityHandler.OCLASS_NAME,"String_Node_Str");
  helper.setupRelationship(OCLASS_NAME,"String_Node_Str",TaskEntityHandler.OCLASS_NAME,"String_Node_Str");
  helper.setupRelationship(OCLASS_NAME,"String_Node_Str",ByteArrayEntityHandler.OCLASS_NAME,"String_Node_Str");
}
Program: 117391
Project: 117391
Buggy source:
@Override public void applyRelationships(OSchemaHelper helper){
  super.applyRelationships(helper);
  helper.setupRelationship(ByteArrayEntityHandler.OCLASS_NAME,"String_Node_Str",DeploymentEntityHandler.OCLASS_NAME,"String_Node_Str");
}

Fixed version (ground truth):
@Override public void applyRelationships(OSchemaHelper helper){
  super.applyRelationships(helper);
  helper.linkedClass(ByteArrayEntityHandler.OCLASS_NAME,"String_Node_Str",DeploymentEntityHandler.OCLASS_NAME,"String_Node_Str");
}
Program: 117392
Project: 117392
Buggy source:
@Override public void applySchema(OSchemaHelper helper){
  super.applySchema(helper);
  helper.oProperty("String_Node_Str",OType.STRING,10).oProperty("String_Node_Str",OType.BINARY,20).oProperty("String_Node_Str",OType.STRING,30);
}

Fixed version (ground truth):
@Override public void applySchema(OSchemaHelper helper){
  super.applySchema(helper);
  helper.oProperty("String_Node_Str",OType.STRING,10).oProperty("String_Node_Str",OType.BINARY,20).oProperty("String_Node_Str",OType.LINK,30);
}
Program: 117393
Project: 117393
Buggy source:
@Override public void applyRelationships(OSchemaHelper helper){
  super.applyRelationships(helper);
  helper.setupRelationship(CaseDefinitionEntityHandler.OCLASS_NAME,"String_Node_Str",DeploymentEntityHandler.OCLASS_NAME,"String_Node_Str");
}

Fixed version (ground truth):
@Override public void applyRelationships(OSchemaHelper helper){
  super.applyRelationships(helper);
  helper.linkedClass(CaseDefinitionEntityHandler.OCLASS_NAME,"String_Node_Str",DeploymentEntityHandler.OCLASS_NAME,"String_Node_Str");
}
Program: 117394
Project: 117394
Buggy source:
@Override public void applySchema(OSchemaHelper helper){
  super.applySchema(helper);
  helper.oProperty("String_Node_Str",OType.STRING,10).oProperty("String_Node_Str",OType.STRING,0).oProperty("String_Node_Str",OType.STRING,20).oProperty("String_Node_Str",OType.INTEGER,30).oProperty("String_Node_Str",OType.STRING,40).oProperty("String_Node_Str",OType.STRING,50).oProperty("String_Node_Str",OType.STRING,60);
}

Fixed version (ground truth):
@Override public void applySchema(OSchemaHelper helper){
  super.applySchema(helper);
  helper.oProperty("String_Node_Str",OType.STRING,10).oProperty("String_Node_Str",OType.STRING,0).oProperty("String_Node_Str",OType.STRING,20).oProperty("String_Node_Str",OType.INTEGER,30).oProperty("String_Node_Str",OType.LINK,40).oProperty("String_Node_Str",OType.STRING,50).oProperty("String_Node_Str",OType.STRING,60);
}
Program: 117395
Project: 117395
Buggy source:
@Override public void applyRelationships(OSchemaHelper helper){
  super.applyRelationships(helper);
  helper.setupRelationship(ProcessDefinitionEntityHandler.OCLASS_NAME,"String_Node_Str",DeploymentEntityHandler.OCLASS_NAME,"String_Node_Str");
  helper.setupRelationship(ResourceEntityHandler.OCLASS_NAME,"String_Node_Str",DeploymentEntityHandler.OCLASS_NAME,"String_Node_Str");
  helper.setupRelationship(ByteArrayEntityHandler.OCLASS_NAME,"String_Node_Str",DeploymentEntityHandler.OCLASS_NAME,"String_Node_Str");
}

Fixed version (ground truth):
@Override public void applyRelationships(OSchemaHelper helper){
  super.applyRelationships(helper);
  helper.setupRelationship(ProcessDefinitionEntityHandler.OCLASS_NAME,"String_Node_Str",DeploymentEntityHandler.OCLASS_NAME,"String_Node_Str");
  helper.setupRelationship(ResourceEntityHandler.OCLASS_NAME,"String_Node_Str",DeploymentEntityHandler.OCLASS_NAME,"String_Node_Str");
}
Program: 117396
Project: 117396
Buggy source:
@Override public void applyRelationships(OSchemaHelper helper){
  super.applyRelationships(helper);
  helper.setupRelationship(JobEntityHandler.OCLASS_NAME,"String_Node_Str",DeploymentEntityHandler.OCLASS_NAME,"String_Node_Str");
}

Fixed version (ground truth):
@Override public void applyRelationships(OSchemaHelper helper){
  super.applyRelationships(helper);
  helper.linkedClass(JobEntityHandler.OCLASS_NAME,"String_Node_Str",DeploymentEntityHandler.OCLASS_NAME,"String_Node_Str");
}
Program: 117397
Project: 117397
Buggy source:
@Override public void onClick(AjaxRequestTarget target){
  table.visitChildren(OrienteerDataTable.MetaContextItem.class,new IVisitor<OrienteerDataTable.MetaContextItem<ODocument,?>,Void>(){
    @Override public void component(    MetaContextItem<ODocument,?> rowItem,    IVisit<Void> visit){
      rowItem.getModelObject().save();
      visit.dontGoDeeper();
    }
  }
);
  super.onClick(target);
}

Fixed version (ground truth):
@Override public void onClick(AjaxRequestTarget target){
  table.visitChildren(OrienteerDataTable.MetaContextItem.class,new IVisitor<OrienteerDataTable.MetaContextItem<ODocument,?>,Void>(){
    @Override public void component(    MetaContextItem<ODocument,?> rowItem,    IVisit<Void> visit){
      ODocument doc=rowItem.getModelObject();
      if (doc.isDirty())       doc.save();
      visit.dontGoDeeper();
    }
  }
);
  super.onClick(target);
}
Program: 117398
Project: 117398
Buggy source:
@Override public void component(MetaContextItem<ODocument,?> rowItem,IVisit<Void> visit){
  rowItem.getModelObject().save();
  visit.dontGoDeeper();
}

Fixed version (ground truth):
@Override public void component(MetaContextItem<ODocument,?> rowItem,IVisit<Void> visit){
  ODocument doc=rowItem.getModelObject();
  if (doc.isDirty())   doc.save();
  visit.dontGoDeeper();
}
Program: 117399
Project: 117399
Buggy source:
@Override public void onRecordAfterUpdate(ODocument iDocument){
  OrienteerWebApplication app=OrienteerWebApplication.lookupApplication();
  if (app != null) {
    String moduleName=iDocument.field(IOrienteerModule.OMODULE_NAME);
    IOrienteerModule module=app.getModuleByName(moduleName);
    if (module != null) {
      ODatabaseDocument db=iDocument.getDatabase();
      if (!Objects.isEqual(iDocument.getOriginalValue(IOrienteerModule.OMODULE_ACTIVATE),iDocument.field(IOrienteerModule.OMODULE_ACTIVATE))) {
        Object activated=iDocument.field(IOrienteerModule.OMODULE_ACTIVATE);
        if (activated == null || Boolean.TRUE.equals(activated))         module.onInitialize(app,db,iDocument);
 else         module.onDestroy(app,db,iDocument);
      }
      module.onConfigurationChange(app,db,iDocument);
    }
  }
}

Fixed version (ground truth):
@Override public void onRecordAfterUpdate(ODocument iDocument){
  OrienteerWebApplication app=OrienteerWebApplication.lookupApplication();
  if (app != null) {
    String moduleName=iDocument.field(IOrienteerModule.OMODULE_NAME);
    IOrienteerModule module=app.getModuleByName(moduleName);
    if (module != null) {
      ODatabaseDocument db=iDocument.getDatabase();
      Object previousActivate=iDocument.getOriginalValue(IOrienteerModule.OMODULE_ACTIVATE);
      if (previousActivate != null && !previousActivate.equals(iDocument.field(IOrienteerModule.OMODULE_ACTIVATE))) {
        Object activated=iDocument.field(IOrienteerModule.OMODULE_ACTIVATE);
        if (activated == null || Boolean.TRUE.equals(activated))         module.onInitialize(app,db,iDocument);
 else         module.onDestroy(app,db,iDocument);
      }
      module.onConfigurationChange(app,db,iDocument);
    }
  }
}
Program: 117400
Project: 117400
Buggy source:
@Override public void onClick(AjaxRequestTarget target){
  OClass oClass=classModel.getObject();
  Collection<OClass> subClasses=oClass.getSubclasses();
  if (subClasses == null || subClasses.isEmpty()) {
    redirectToCreateODocumentPage(null,oClass);
  }
 else {
    target.appendJavaScript("String_Node_Str");
    modal.show(target);
  }
}

Fixed version (ground truth):
@Override public void onClick(AjaxRequestTarget target){
  OClass oClass=classModel.getObject();
  Collection<OClass> subClasses=oClass.getSubclasses();
  if (subClasses == null || subClasses.isEmpty()) {
    redirectToCreateODocumentPage(null,oClass);
  }
 else {
    modal.show(target);
  }
}
Program: 117401
Project: 117401
Buggy source:
public SelectSubOClassDialogPage(ModalWindow modal,IModel<OClass> model){
  super(modal.getContentId(),model);
  this.modal=modal;
  Form<Object> form=new Form<Object>("String_Node_Str");
  IModel<DisplayMode> displayModeModel=DisplayMode.VIEW.asModel();
  List<IColumn<OClass,String>> columns=new ArrayList<IColumn<OClass,String>>();
  columns.add(new OClassColumn(OClassPrototyper.NAME,displayModeModel));
  columns.add(new OClassMetaColumn(OClassPrototyper.SUPER_CLASSES,displayModeModel));
  columns.add(new AbstractColumn<OClass,String>(new ResourceModel("String_Node_Str")){
    private static final long serialVersionUID=1L;
    @Override public void populateItem(    Item<ICellPopulator<OClass>> cellItem,    String componentId,    final IModel<OClass> rowModel){
      cellItem.add(new AjaxCommand<OClass>(componentId,new ResourceModel("String_Node_Str"),rowModel){
        @Override public void onClick(        AjaxRequestTarget target){
          SelectSubOClassDialogPage.this.modal.close(target);
          onSelect(target,getModelObject());
        }
      }
.setIcon(FAIconType.plus).setBootstrapType(BootstrapType.INFO));
    }
  }
);
  SortableDataProvider<OClass,String> provider=new OClassesDataProvider(new PropertyModel<Collection<OClass>>(this,"String_Node_Str"));
  OrienteerDataTable<OClass,String> table=new OrienteerDataTable<OClass,String>("String_Node_Str",columns,provider,20);
  form.add(table);
  add(form);
}

Fixed version (ground truth):
public SelectSubOClassDialogPage(ModalWindow modal,IModel<OClass> model){
  super(modal.getContentId(),model);
  this.modal=modal;
  Form<Object> form=new Form<Object>("String_Node_Str");
  IModel<DisplayMode> displayModeModel=DisplayMode.VIEW.asModel();
  List<IColumn<OClass,String>> columns=new ArrayList<IColumn<OClass,String>>();
  columns.add(new OClassColumn(OClassPrototyper.NAME,displayModeModel));
  columns.add(new OClassMetaColumn(OClassPrototyper.SUPER_CLASSES,displayModeModel));
  columns.add(new AbstractColumn<OClass,String>(new ResourceModel("String_Node_Str")){
    private static final long serialVersionUID=1L;
    @Override public void populateItem(    Item<ICellPopulator<OClass>> cellItem,    String componentId,    final IModel<OClass> rowModel){
      cellItem.add(new AjaxCommand<OClass>(componentId,new ResourceModel("String_Node_Str"),rowModel){
        @Override public void onClick(        AjaxRequestTarget target){
          SelectSubOClassDialogPage.this.modal.close(target);
          SelectSubOClassDialogPage.this.modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
            @Override public void onClose(            AjaxRequestTarget target){
              onSelect(target,getModelObject());
            }
          }
);
        }
      }
.setIcon(FAIconType.plus).setBootstrapType(BootstrapType.INFO));
    }
  }
);
  SortableDataProvider<OClass,String> provider=new OClassesDataProvider(new PropertyModel<Collection<OClass>>(this,"String_Node_Str"));
  OrienteerDataTable<OClass,String> table=new OrienteerDataTable<OClass,String>("String_Node_Str",columns,provider,20);
  form.add(table);
  add(form);
}
Program: 117402
Project: 117402
Buggy source:
@Override public void onClick(AjaxRequestTarget target){
  SelectSubOClassDialogPage.this.modal.close(target);
  onSelect(target,getModelObject());
}

Fixed version (ground truth):
@Override public void onClick(AjaxRequestTarget target){
  SelectSubOClassDialogPage.this.modal.close(target);
  SelectSubOClassDialogPage.this.modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
    @Override public void onClose(    AjaxRequestTarget target){
      onSelect(target,getModelObject());
    }
  }
);
}
Program: 117403
Project: 117403
Buggy source:
@Override public void populateItem(Item<ICellPopulator<OClass>> cellItem,String componentId,final IModel<OClass> rowModel){
  cellItem.add(new AjaxCommand<OClass>(componentId,new ResourceModel("String_Node_Str"),rowModel){
    @Override public void onClick(    AjaxRequestTarget target){
      SelectSubOClassDialogPage.this.modal.close(target);
      onSelect(target,getModelObject());
    }
  }
.setIcon(FAIconType.plus).setBootstrapType(BootstrapType.INFO));
}

Fixed version (ground truth):
@Override public void populateItem(Item<ICellPopulator<OClass>> cellItem,String componentId,final IModel<OClass> rowModel){
  cellItem.add(new AjaxCommand<OClass>(componentId,new ResourceModel("String_Node_Str"),rowModel){
    @Override public void onClick(    AjaxRequestTarget target){
      SelectSubOClassDialogPage.this.modal.close(target);
      SelectSubOClassDialogPage.this.modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
        @Override public void onClose(        AjaxRequestTarget target){
          onSelect(target,getModelObject());
        }
      }
);
    }
  }
.setIcon(FAIconType.plus).setBootstrapType(BootstrapType.INFO));
}
Program: 117404
Project: 117404
Buggy source:
public OClassConfigurationWidget(String id,IModel<OClass> model,IModel<ODocument> widgetDocumentModel){
  super(id,model,widgetDocumentModel);
  Form<OClass> form=new TransactionlessForm<OClass>("String_Node_Str");
  structureTable=new OrienteerStructureTable<OClass,String>("String_Node_Str",getModel(),OClassMetaPanel.OCLASS_ATTRS){
    @Override protected Component getValueComponent(    String id,    final IModel<String> rowModel){
      return new OClassMetaPanel<Object>(id,getModeModel(),OClassConfigurationWidget.this.getModel(),rowModel);
    }
  }
;
  structureTable.addCommand(new EditSchemaCommand<OClass>(structureTable,getModeModel()));
  structureTable.addCommand(new SaveSchemaCommand<OClass>(structureTable,getModeModel(),getModel()));
  form.add(structureTable);
  add(form);
  addCommand(new BookmarkablePageLinkCommand<OClass>(newCommandId(),"String_Node_Str",BrowseOClassPage.class){
    @Override public PageParameters getPageParameters(){
      return BrowseOClassPage.preparePageParameters(OClassConfigurationWidget.this.getModelObject(),DisplayMode.VIEW);
    }
  }
);
}

Fixed version (ground truth):
public OClassConfigurationWidget(String id,IModel<OClass> model,IModel<ODocument> widgetDocumentModel){
  super(id,model,widgetDocumentModel);
  Form<OClass> form=new TransactionlessForm<OClass>("String_Node_Str");
  structureTable=new OrienteerStructureTable<OClass,String>("String_Node_Str",getModel(),OClassMetaPanel.OCLASS_ATTRS){
    @Override protected Component getValueComponent(    String id,    final IModel<String> rowModel){
      return new OClassMetaPanel<Object>(id,getModeModel(),OClassConfigurationWidget.this.getModel(),rowModel);
    }
  }
;
  structureTable.addCommand(new EditSchemaCommand<OClass>(structureTable,getModeModel()));
  structureTable.addCommand(new SaveSchemaCommand<OClass>(structureTable,getModeModel(),getModel()));
  form.add(structureTable);
  add(form);
  addCommand(new BookmarkablePageLinkCommand<OClass>(newCommandId(),"String_Node_Str",BrowseOClassPage.class){
    @Override public PageParameters getPageParameters(){
      return BrowseOClassPage.preparePageParameters(OClassConfigurationWidget.this.getModelObject(),DisplayMode.VIEW);
    }
    @Override protected void onConfigure(){
      super.onConfigure();
      setVisible(OSchemaUtils.isNotNullOrPrototype(OClassConfigurationWidget.this.getModelObject()));
    }
  }
);
}
Program: 117405
Project: 117405
Buggy source:
protected void installWidgetsSchemaV2(ODatabaseDocument db){
  OSchemaHelper helper=OSchemaHelper.bind(db);
  helper.oClass(AbstractHtmlJsPaneWidget.WIDGET_OCLASS_NAME,OCLASS_WIDGET).oProperty("String_Node_Str",OType.STRING,0).oProperty("String_Node_Str",OType.STRING,10).assignVisualization("String_Node_Str").oProperty("String_Node_Str",OType.STRING,20).assignVisualization("String_Node_Str").oProperty("String_Node_Str",OType.EMBEDDEDLIST,30).linkedType(OType.STRING);
  helper.oClass(ExternalPageWidget.WIDGET_OCLASS_NAME,OCLASS_WIDGET).oProperty("String_Node_Str",OType.STRING,0).oProperty("String_Node_Str",OType.STRING,10);
  helper.oClass(CalculatedDocumentsWidget.WIDGET_OCLASS_NAME,OCLASS_WIDGET).oProperty("String_Node_Str",OType.STRING,0).assignVisualization("String_Node_Str");
}

Fixed version (ground truth):
protected void installWidgetsSchemaV2(ODatabaseDocument db){
  OSchemaHelper helper=OSchemaHelper.bind(db);
  helper.oClass(AbstractHtmlJsPaneWidget.WIDGET_OCLASS_NAME,OCLASS_WIDGET).oProperty("String_Node_Str",OType.STRING,10).assignVisualization("String_Node_Str").oProperty("String_Node_Str",OType.STRING,20).assignVisualization("String_Node_Str").oProperty("String_Node_Str",OType.EMBEDDEDLIST,30).linkedType(OType.STRING);
  if (!helper.getOClass().existsProperty("String_Node_Str"))   helper.oProperty("String_Node_Str",OType.STRING,0);
  helper.oClass(ExternalPageWidget.WIDGET_OCLASS_NAME,OCLASS_WIDGET).oProperty("String_Node_Str",OType.STRING,0).oProperty("String_Node_Str",OType.STRING,10);
  helper.oClass(CalculatedDocumentsWidget.WIDGET_OCLASS_NAME,OCLASS_WIDGET).oProperty("String_Node_Str",OType.STRING,0).assignVisualization("String_Node_Str");
}
Program: 117406
Project: 117406
Buggy source:
@Override public String getCacheKey(MarkupContainer container,Class<?> containerClass){
  if (container.getClass().equals(containerClass)) {
    ODocument pageDoc=pageDocumentModel.getObject();
    return "String_Node_Str" + pageDoc.getIdentity().toString() + "String_Node_Str"+ pageDoc.getVersion();
  }
 else {
    return DEFAULT_MARKUP_CACHKEY_PROVIDER.getCacheKey(container,containerClass);
  }
}

Fixed version (ground truth):
@Override public String getCacheKey(MarkupContainer container,Class<?> containerClass){
  ODocument pageDoc=pageDocumentModel.getObject();
  return DEFAULT_MARKUP_CACHKEY_PROVIDER.getCacheKey(container,containerClass) + "String_Node_Str" + pageDoc.getIdentity().toString()+ "String_Node_Str"+ pageDoc.getVersion();
}
Program: 117407
Project: 117407
Buggy source:
public IResourceStream getMarkupResourceStream(MarkupContainer container,Class<?> containerClass,String wrapTag){
  if (container.getClass().equals(containerClass)) {
    String content=(String)pageDocumentModel.getObject().field(PagesModule.OPROPERTY_CONTENT);
    if (!Strings.isEmpty(wrapTag))     content="String_Node_Str" + wrapTag + "String_Node_Str"+ content+ "String_Node_Str"+ wrapTag+ "String_Node_Str";
    return new StringResourceStream(content,"String_Node_Str");
  }
 else {
    return DEFAULT_MARKUP_PROVIDER.getMarkupResourceStream(container,containerClass);
  }
}

Fixed version (ground truth):
public IResourceStream getMarkupResourceStream(MarkupContainer container,Class<?> containerClass,String wrapTag){
  if (container.getClass().equals(containerClass)) {
    return new OPageResourceStream(pageDocumentModel.getObject(),wrapTag);
  }
 else {
    return DEFAULT_MARKUP_PROVIDER.getMarkupResourceStream(container,containerClass);
  }
}
Program: 117408
Project: 117408
Buggy source:
public SelectDialogPanel(String id,final ModalWindow modal,OClass initialClass,boolean canChangeClass,boolean isMultiValue){
  super(id,Model.of("String_Node_Str"));
  this.modal=modal;
  this.isMultiValue=isMultiValue;
  this.modal.setMinimalHeight(400);
  this.canChangeClass=canChangeClass || initialClass == null;
  this.selectedClassModel=new OClassModel(initialClass != null ? initialClass : getClasses().get(0));
  Form<String> form=new Form<String>("String_Node_Str",getModel());
  queryField=new TextField<String>("String_Node_Str",getModel());
  queryField.setOutputMarkupId(true);
  form.add(queryField);
  form.add(new AjaxButton("String_Node_Str"){
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form<?> form){
      super.onSubmit(target,form);
      target.add(resultsContainer);
    }
  }
);
  form.add(new TabsPanel<OClass>("String_Node_Str",selectedClassModel,new PropertyModel<List<OClass>>(this,"String_Node_Str")){
    @Override public void onTabClick(    AjaxRequestTarget target){
      prepareResults();
      target.add(resultsContainer);
    }
  }
.setVisible(canChangeClass));
  resultsContainer=new WebMarkupContainer("String_Node_Str"){
{
      setOutputMarkupPlaceholderTag(true);
    }
    @Override protected void onConfigure(){
      super.onConfigure();
      setVisible(!Strings.isEmpty(SelectDialogPanel.this.getModelObject()));
    }
  }
;
  prepareResults();
  form.add(resultsContainer);
  add(form);
}

Fixed version (ground truth):
public SelectDialogPanel(String id,final ModalWindow modal,OClass initialClass,boolean canChangeClass,boolean isMultiValue){
  super(id,Model.of("String_Node_Str"));
  this.modal=modal;
  this.isMultiValue=isMultiValue;
  this.modal.setMinimalHeight(400);
  this.canChangeClass=canChangeClass || initialClass == null;
  this.selectedClassModel=new OClassModel(initialClass != null ? initialClass : getClasses().get(0));
  Form<String> form=new Form<String>("String_Node_Str",getModel());
  queryField=new TextField<String>("String_Node_Str",getModel(),String.class);
  queryField.setOutputMarkupId(true);
  form.add(queryField);
  form.add(new AjaxButton("String_Node_Str"){
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form<?> form){
      super.onSubmit(target,form);
      target.add(resultsContainer);
    }
  }
);
  form.add(new TabsPanel<OClass>("String_Node_Str",selectedClassModel,new PropertyModel<List<OClass>>(this,"String_Node_Str")){
    @Override public void onTabClick(    AjaxRequestTarget target){
      prepareResults();
      target.add(resultsContainer);
    }
  }
.setVisible(canChangeClass));
  resultsContainer=new WebMarkupContainer("String_Node_Str"){
{
      setOutputMarkupPlaceholderTag(true);
    }
    @Override protected void onConfigure(){
      super.onConfigure();
      setVisible(!Strings.isEmpty(SelectDialogPanel.this.getModelObject()));
    }
  }
;
  prepareResults();
  form.add(resultsContainer);
  add(form);
}
Program: 117409
Project: 117409
Buggy source:
public DeleteEdgeCommand(ResourceModel labelModel,OrienteerDataTable<ODocument,?> table,IModel<ODocument> documentModel){
  super(labelModel,table);
  this.documentModel=documentModel;
  this.classModel=new OClassModel(GraphModule.EDGE_CLASS_NAME);
}

Fixed version (ground truth):
public DeleteEdgeCommand(OrienteerDataTable<ODocument,?> table,IModel<ODocument> documentModel){
  super(new ResourceModel("String_Node_Str"),table);
  this.documentModel=documentModel;
  this.classModel=new OClassModel(GraphModule.EDGE_CLASS_NAME);
}
Program: 117410
Project: 117410
Buggy source:
@Override protected void performMultiAction(AjaxRequestTarget target,List<ODocument> objects){
  super.performMultiAction(target,objects);
  OrientGraph tx=new OrientGraphFactory(getDatabase().getURL()).getTx();
  tx.commit();
  for (  ODocument doc : objects) {
    ORID id=doc.getIdentity();
    OrientVertex vertex=tx.getVertex(id);
    removeEdges(tx,vertex);
  }
  tx.begin();
  setResponsePage(new ODocumentPage(documentModel.getObject()).setModeObject(DisplayMode.VIEW));
}

Fixed version (ground truth):
@Override protected void performMultiAction(AjaxRequestTarget target,List<ODocument> objects){
  super.performMultiAction(target,objects);
  OrientGraph tx=new OrientGraphFactory(getDatabase().getURL()).getTx();
  tx.commit();
  for (  ODocument doc : objects) {
    ORID id=doc.getIdentity();
    OrientEdge edge=tx.getEdge(id);
    tx.removeEdge(edge);
  }
  tx.begin();
  setResponsePage(new ODocumentPage(documentModel.getObject()).setModeObject(DisplayMode.VIEW));
}
Program: 117411
Project: 117411
Buggy source:
public GraphEdgesWidget(String id,IModel<ODocument> model,IModel<ODocument> widgetDocumentModel){
  super(id,model,widgetDocumentModel);
  IModel<DisplayMode> modeModel=DisplayMode.VIEW.asModel();
  Form<ODocument> form=new Form<ODocument>("String_Node_Str");
  VertexEdgesDataProvider vertexEdgesDataProvider=new VertexEdgesDataProvider(getModel());
  OClass commonParent=vertexEdgesDataProvider.probeOClass(20);
  List<IColumn<ODocument,String>> columns=oClassIntrospector.getColumnsFor(commonParent,true,modeModel);
  OrienteerDataTable<ODocument,String> table=new OrienteerDataTable<ODocument,String>("String_Node_Str",columns,vertexEdgesDataProvider,20);
  table.addCommand(new EditODocumentsCommand(table,modeModel,commonParent));
  table.addCommand(new SaveODocumentsCommand(table,modeModel));
  table.addCommand(new DeleteEdgeCommand(new ResourceModel("String_Node_Str"),table,getModel()));
  form.add(table);
  add(form);
}

Fixed version (ground truth):
public GraphEdgesWidget(String id,IModel<ODocument> model,IModel<ODocument> widgetDocumentModel){
  super(id,model,widgetDocumentModel);
  IModel<DisplayMode> modeModel=DisplayMode.VIEW.asModel();
  Form<ODocument> form=new Form<ODocument>("String_Node_Str");
  VertexEdgesDataProvider vertexEdgesDataProvider=new VertexEdgesDataProvider(getModel());
  OClass commonParent=vertexEdgesDataProvider.probeOClass(20);
  List<IColumn<ODocument,String>> columns=oClassIntrospector.getColumnsFor(commonParent,true,modeModel);
  OrienteerDataTable<ODocument,String> table=new OrienteerDataTable<ODocument,String>("String_Node_Str",columns,vertexEdgesDataProvider,20);
  table.addCommand(new EditODocumentsCommand(table,modeModel,commonParent));
  table.addCommand(new SaveODocumentsCommand(table,modeModel));
  table.addCommand(new DeleteEdgeCommand(table,getModel()));
  form.add(table);
  add(form);
}
Program: 117412
Project: 117412
Buggy source:
public GraphNeighborsWidget(String id,IModel<ODocument> model,IModel<ODocument> widgetDocumentModel){
  super(id,model,widgetDocumentModel);
  IModel<DisplayMode> modeModel=DisplayMode.VIEW.asModel();
  Form<ODocument> form=new Form<ODocument>("String_Node_Str");
  OQueryDataProvider<ODocument> provider=new OQueryDataProvider<ODocument>("String_Node_Str" + getModelObject().getIdentity());
  OClass commonParent=provider.probeOClass(20);
  List<IColumn<ODocument,String>> columns=oClassIntrospector.getColumnsFor(commonParent,true,modeModel);
  OrienteerDataTable<ODocument,String> table=new OrienteerDataTable<ODocument,String>("String_Node_Str",columns,provider,20);
  table.addCommand(new CreateVertexCommand(table,getModel()));
  table.addCommand(new CreateEdgeCommand(table,getModel()));
  table.addCommand(new DeleteEdgeCommand(table,getModel()));
  table.addCommand(new DeleteVertexCommand(table,getModel()));
  table.addCommand(new EditODocumentsCommand(table,modeModel,commonParent));
  table.addCommand(new SaveODocumentsCommand(table,modeModel));
  form.add(table);
  add(form);
}

Fixed version (ground truth):
public GraphNeighborsWidget(String id,IModel<ODocument> model,IModel<ODocument> widgetDocumentModel){
  super(id,model,widgetDocumentModel);
  IModel<DisplayMode> modeModel=DisplayMode.VIEW.asModel();
  Form<ODocument> form=new Form<ODocument>("String_Node_Str");
  OQueryDataProvider<ODocument> provider=new OQueryDataProvider<ODocument>("String_Node_Str" + getModelObject().getIdentity());
  OClass commonParent=provider.probeOClass(20);
  List<IColumn<ODocument,String>> columns=oClassIntrospector.getColumnsFor(commonParent,true,modeModel);
  OrienteerDataTable<ODocument,String> table=new OrienteerDataTable<ODocument,String>("String_Node_Str",columns,provider,20);
  table.addCommand(new CreateVertexCommand(table,getModel()));
  table.addCommand(new CreateEdgeCommand(table,getModel()));
  table.addCommand(new UnlinkVertexCommand(table,getModel()));
  table.addCommand(new DeleteVertexCommand(table,getModel()));
  table.addCommand(new EditODocumentsCommand(table,modeModel,commonParent));
  table.addCommand(new SaveODocumentsCommand(table,modeModel));
  form.add(table);
  add(form);
}
Program: 117413
Project: 117413
Buggy source:
@Override public void onClose(AjaxRequestTarget target){
  target.add(getPage());
}

Fixed version (ground truth):
@Override public void onClose(AjaxRequestTarget target){
  setResponsePage(new ODocumentPage(new ODocumentModel(documentModel.getObject())).setModeObject(DisplayMode.VIEW));
}
Program: 117414
Project: 117414
Buggy source:
private void createVertex(OClass vertexClass,OClass edgeClass){
  OrientGraph tx=null;
  try {
    tx=new OrientGraphFactory(getDatabase().getURL()).getTx();
    OrientVertex newVertex=tx.addVertex(vertexClass.getName(),(String)null);
    OrientVertex vertex=tx.getVertex(documentModel.getObject().getIdentity());
    tx.addEdge(null,vertex,newVertex,edgeClass.getName());
  }
  finally {
    if (tx != null)     tx.shutdown();
  }
}

Fixed version (ground truth):
private void createVertex(OClass vertexClass,OClass edgeClass){
  OrientGraph tx=new OrientGraphFactory(getDatabase().getURL()).getTx();
  OrientVertex newVertex=tx.addVertex(vertexClass.getName(),(String)null);
  OrientVertex vertex=tx.getVertex(documentModel.getObject().getIdentity());
  tx.addEdge(null,vertex,newVertex,edgeClass.getName());
}
Program: 117415
Project: 117415
Buggy source:
@Override protected void initializeContent(final ModalWindow modal){
  modal.setTitle(new ResourceModel("String_Node_Str"));
  modal.setAutoSize(true);
  modal.setMinimalWidth(300);
  SelectSubOClassDialogPage selectVertexClassDialog=new SelectSubOClassDialogPage(modal,new OClassModel(GraphModule.VERTEX_CLASS_NAME)){
    @Override protected void onSelect(    AjaxRequestTarget target,    final OClass selectedOVertexClass){
      modal.setTitle(new ResourceModel("String_Node_Str"));
      OClassModel edgeOClassModel=new OClassModel(GraphModule.EDGE_CLASS_NAME);
      modal.setContent(new SelectSubOClassDialogPage(modal,edgeOClassModel){
        @Override protected void onSelect(        AjaxRequestTarget target,        final OClass selectedOEdgeClass){
          createVertex(selectedOVertexClass,selectedOEdgeClass);
          modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
            private static final long serialVersionUID=1L;
            @Override public void onClose(            AjaxRequestTarget target){
              target.add(getPage());
            }
          }
);
        }
      }
);
      modal.show(target);
    }
  }
;
  modal.setContent(selectVertexClassDialog);
}

Fixed version (ground truth):
@Override protected void initializeContent(final ModalWindow modal){
  modal.setTitle(new ResourceModel("String_Node_Str"));
  modal.setAutoSize(true);
  modal.setMinimalWidth(300);
  SelectSubOClassDialogPage selectVertexClassDialog=new SelectSubOClassDialogPage(modal,new OClassModel(GraphModule.VERTEX_CLASS_NAME)){
    @Override protected void onSelect(    AjaxRequestTarget target,    final OClass selectedOVertexClass){
      modal.setTitle(new ResourceModel("String_Node_Str"));
      OClassModel edgeOClassModel=new OClassModel(GraphModule.EDGE_CLASS_NAME);
      modal.setContent(new SelectSubOClassDialogPage(modal,edgeOClassModel){
        @Override protected void onSelect(        AjaxRequestTarget target,        final OClass selectedOEdgeClass){
          createVertex(selectedOVertexClass,selectedOEdgeClass);
          modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
            private static final long serialVersionUID=1L;
            @Override public void onClose(            AjaxRequestTarget target){
              setResponsePage(new ODocumentPage(new ODocumentModel(documentModel.getObject())).setModeObject(DisplayMode.VIEW));
            }
          }
);
        }
      }
);
      modal.show(target);
    }
  }
;
  modal.setContent(selectVertexClassDialog);
}
Program: 117416
Project: 117416
Buggy source:
@Override protected void onSelect(AjaxRequestTarget target,final OClass selectedOEdgeClass){
  createVertex(selectedOVertexClass,selectedOEdgeClass);
  modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
    private static final long serialVersionUID=1L;
    @Override public void onClose(    AjaxRequestTarget target){
      target.add(getPage());
    }
  }
);
}

Fixed version (ground truth):
@Override protected void onSelect(AjaxRequestTarget target,final OClass selectedOEdgeClass){
  createVertex(selectedOVertexClass,selectedOEdgeClass);
  modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
    private static final long serialVersionUID=1L;
    @Override public void onClose(    AjaxRequestTarget target){
      setResponsePage(new ODocumentPage(new ODocumentModel(documentModel.getObject())).setModeObject(DisplayMode.VIEW));
    }
  }
);
}
Program: 117417
Project: 117417
Buggy source:
@Override public void onClick(AjaxRequestTarget target){
  getData().add(new Pair<V>());
  target.add(EmbeddedMapEditPanel.this);
}

Fixed version (ground truth):
@Override public void onClick(AjaxRequestTarget target){
  getData().add(new Pair<V>());
  target.add(EmbeddedMapEditPanel.this);
  listView.removeAll();
}
Program: 117419
Project: 117419
Buggy source:
@Override protected void populateItem(final ListItem<Pair<V>> item){
  item.add(getKeyEditComponent(item));
  item.add(visualizer.createComponent("String_Node_Str",DisplayMode.EDIT,documentModel,propertyModel,oType,new PropertyModel<V>(item.getModel(),"String_Node_Str")));
  item.add(new AjaxFormCommand<Object>("String_Node_Str","String_Node_Str"){
    @Override public void onClick(    AjaxRequestTarget target){
      getData().remove(item.getIndex());
      target.add(EmbeddedMapEditPanel.this);
    }
  }
.setBootstrapSize(BootstrapSize.EXTRA_SMALL).setBootstrapType(BootstrapType.DANGER).setIcon((String)null));
}

Fixed version (ground truth):
@Override protected void populateItem(final ListItem<Pair<V>> item){
  item.add(getKeyEditComponent(item));
  item.add(visualizer.createComponent("String_Node_Str",DisplayMode.EDIT,documentModel,propertyModel,oType,new PropertyModel<V>(item.getModel(),"String_Node_Str")));
  item.add(new AjaxCommand<Object>("String_Node_Str","String_Node_Str"){
    @Override public void onClick(    AjaxRequestTarget target){
      getData().remove(item.getIndex());
      target.add(EmbeddedMapEditPanel.this);
      listView.removeAll();
    }
  }
.setAutoNotify(false).setBootstrapSize(BootstrapSize.EXTRA_SMALL).setBootstrapType(BootstrapType.DANGER).setIcon((String)null));
}
Program: 117420
Project: 117420
Buggy source:
public List<Pair<V>> getData(){
  if (data == null) {
    this.data=new ArrayList<Pair<V>>();
    Map<String,V> data=getModelObject();
    if (data != null) {
      for (      Map.Entry<String,V> entry : data.entrySet()) {
        this.data.add(new Pair<V>(entry));
      }
    }
  }
  return data;
}

Fixed version (ground truth):
public List<Pair<V>> getData(){
  if (data == null) {
    this.data=new ArrayList<Pair<V>>();
    Map<String,V> data=getConvertedInput();
    if (data == null)     data=getModelObject();
    if (data != null) {
      for (      Map.Entry<String,V> entry : data.entrySet()) {
        this.data.add(new Pair<V>(entry));
      }
    }
  }
  return data;
}
Program: 117421
Project: 117421
Buggy source:
public OrienteerDataTable(String id,List<? extends IColumn<T,S>> columns,ISortableDataProvider<T,S> dataProvider,int rowsPerPage){
  super(id,columns,dataProvider,rowsPerPage);
  addTopToolbar(commandsToolbar=new DataTableCommandsToolbar<T>(this));
  addTopToolbar(headersToolbar=new AjaxFallbackHeadersToolbar<S>(this,dataProvider));
  addBottomToolbar(navigationToolbar=new OrienteerNavigationToolbar(this));
  addBottomToolbar(noRecordsToolbar=new NoRecordsToolbar(this));
  setOutputMarkupPlaceholderTag(true);
}

Fixed version (ground truth):
public OrienteerDataTable(String id,List<? extends IColumn<T,S>> columns,ISortableDataProvider<T,S> dataProvider,int rowsPerPage){
  super(id,columns,dataProvider,rowsPerPage);
  addTopToolbar(commandsToolbar=new DataTableCommandsToolbar<T>(this));
  addTopToolbar(headersToolbar=new AjaxFallbackHeadersToolbar<S>(this,dataProvider));
  addBottomToolbar(navigationToolbar=new OrienteerNavigationToolbar(this));
  addBottomToolbar(noRecordsToolbar=new NoRecordsToolbar(this));
  setOutputMarkupPlaceholderTag(true);
  setItemReuseStrategy(ReuseIfModelsEqualStrategy.getInstance());
}
Program: 117422
Project: 117422
Buggy source:
private void prepareResults(OClass oClass){
  OQueryDataProvider<ODocument> provider=new OQueryDataProvider<ODocument>("String_Node_Str" + oClass.getName() + "String_Node_Str");
  provider.setParameter("String_Node_Str",getModel());
  OrienteerDataTable<ODocument,String> table=new OrienteerDataTable<ODocument,String>("String_Node_Str",oClassIntrospector.getColumnsFor(oClass,true,DisplayMode.VIEW.asModel()),provider,20);
  table.addCommand(new AbstractCheckBoxEnabledCommand<ODocument>(new ResourceModel("String_Node_Str"),table){
{
      setBootstrapType(BootstrapType.SUCCESS);
      setIcon(FAIconType.hand_o_right);
    }
    @Override protected void performMultiAction(    AjaxRequestTarget target,    List<ODocument> objects){
      if (onSelect(target,objects,false))       modal.close(target);
    }
  }
);
  if (isMultiValue) {
    table.addCommand(new AbstractCheckBoxEnabledCommand<ODocument>(new ResourceModel("String_Node_Str"),table){
{
        setBootstrapType(BootstrapType.SUCCESS);
        setIcon(FAIconType.hand_o_right);
      }
      @Override protected void performMultiAction(      AjaxRequestTarget target,      List<ODocument> objects){
        if (onSelect(target,objects,true))         target.focusComponent(queryField);
      }
    }
);
  }
  resultsContainer.addOrReplace(table);
}

Fixed version (ground truth):
private void prepareResults(OClass oClass){
  OQueryDataProvider<ODocument> provider=new OQueryDataProvider<ODocument>("String_Node_Str" + oClass.getName() + "String_Node_Str");
  provider.setParameter("String_Node_Str",getModel());
  OrienteerDataTable<ODocument,String> table=new OrienteerDataTable<ODocument,String>("String_Node_Str",oClassIntrospector.getColumnsFor(oClass,true,DisplayMode.VIEW.asModel()),provider,20);
  table.addCommand(new AbstractCheckBoxEnabledCommand<ODocument>(new ResourceModel("String_Node_Str"),table){
{
      setBootstrapType(BootstrapType.SUCCESS);
      setIcon(FAIconType.hand_o_right);
      setAutoNotify(false);
    }
    @Override protected void performMultiAction(    AjaxRequestTarget target,    List<ODocument> objects){
      if (onSelect(target,objects,false))       modal.close(target);
    }
  }
);
  if (isMultiValue) {
    table.addCommand(new AbstractCheckBoxEnabledCommand<ODocument>(new ResourceModel("String_Node_Str"),table){
{
        setBootstrapType(BootstrapType.SUCCESS);
        setIcon(FAIconType.hand_o_right);
        setAutoNotify(false);
      }
      @Override protected void performMultiAction(      AjaxRequestTarget target,      List<ODocument> objects){
        if (onSelect(target,objects,true))         target.focusComponent(queryField);
      }
    }
);
  }
  resultsContainer.addOrReplace(table);
}
Program: 117424
Project: 117424
Buggy source:
private void convertNameProperty(OrienteerWebApplication app,ODatabaseDocument db,String className){
  boolean wasInTransacton=db.getTransaction().isActive();
  db.commit();
  for (  ODocument doc : db.browseClass(className)) {
    doc.field("String_Node_Str",doc.field("String_Node_Str"));
    doc.field("String_Node_Str",(String)null);
    doc.save();
  }
  OClass oClass=db.getMetadata().getSchema().getClass(className);
  oClass.dropProperty("String_Node_Str");
  OProperty nameProperty=oClass.createProperty("String_Node_Str",OType.EMBEDDEDMAP);
  CustomAttributes.VISUALIZATION_TYPE.setValue(nameProperty,"String_Node_Str");
  for (  ODocument doc : db.browseClass(className)) {
    doc.field("String_Node_Str",CommonUtils.toMap("String_Node_Str",doc.field("String_Node_Str")));
    doc.removeField("String_Node_Str");
    doc.save();
  }
  if (wasInTransacton)   db.begin();
}

Fixed version (ground truth):
private void convertNameProperty(OrienteerWebApplication app,ODatabaseDocument db,String className){
  boolean wasInTransacton=db.getTransaction().isActive();
  db.commit();
  for (  ODocument doc : db.browseClass(className)) {
    Object value=doc.field("String_Node_Str");
    if (value instanceof String) {
      doc.field("String_Node_Str",doc.field("String_Node_Str"));
      doc.field("String_Node_Str",(String)null);
      doc.save();
    }
  }
  OClass oClass=db.getMetadata().getSchema().getClass(className);
  oClass.dropProperty("String_Node_Str");
  OProperty nameProperty=oClass.createProperty("String_Node_Str",OType.EMBEDDEDMAP);
  CustomAttributes.VISUALIZATION_TYPE.setValue(nameProperty,"String_Node_Str");
  for (  ODocument doc : db.browseClass(className)) {
    if (doc.containsField("String_Node_Str")) {
      doc.field("String_Node_Str",CommonUtils.toMap("String_Node_Str",doc.field("String_Node_Str")));
      doc.removeField("String_Node_Str");
      doc.save();
    }
  }
  if (wasInTransacton)   db.begin();
}
Program: 117425
Project: 117425
Buggy source:
@Override public String getDocumentName(ODocument doc){
  if (doc == null)   return Application.get().getResourceSettings().getLocalizer().getString("String_Node_Str",null);
 else {
    OProperty nameProp=getNameProperty(doc.getSchemaClass());
    if (nameProp != null) {
      Object value=doc.field(nameProp.getName());
      if (value == null)       return Application.get().getResourceSettings().getLocalizer().getString("String_Node_Str",null);
      OType type=nameProp.getType();
      Locale locale=OrienteerWebSession.get().getLocale();
switch (type) {
case DATE:
        return OrienteerWebApplication.DATE_CONVERTER.convertToString((Date)value,locale);
case DATETIME:
      return OrienteerWebApplication.DATE_TIME_CONVERTER.convertToString((Date)value,locale);
case LINK:
    return getDocumentName((ODocument)value);
case EMBEDDEDMAP:
  Map<String,String> localizations=(Map<String,String>)value;
if (localizations != null) {
  String localization=localizations.get(locale.getLanguage());
  if (localization == null) {
    localization=localizations.get(Locale.getDefault().getLanguage());
    if (localization == null && localizations.size() > 0) {
      localization=localizations.values().iterator().next();
    }
  }
  if (localization != null) {
    return localization;
  }
}
default :
return value.toString();
}
}
 else {
return doc.toString();
}
}
}

Fixed version (ground truth):
@Override public String getDocumentName(ODocument doc){
  if (doc == null)   return Application.get().getResourceSettings().getLocalizer().getString("String_Node_Str",null);
 else {
    OProperty nameProp=getNameProperty(doc.getSchemaClass());
    if (nameProp != null) {
      Object value=doc.field(nameProp.getName());
      if (value == null)       return Application.get().getResourceSettings().getLocalizer().getString("String_Node_Str",null);
      OType type=nameProp.getType();
      Locale locale=OrienteerWebSession.get().getLocale();
switch (type) {
case DATE:
        return OrienteerWebApplication.DATE_CONVERTER.convertToString((Date)value,locale);
case DATETIME:
      return OrienteerWebApplication.DATE_TIME_CONVERTER.convertToString((Date)value,locale);
case LINK:
    return getDocumentName((ODocument)value);
case EMBEDDEDMAP:
  Map<String,Object> localizations=(Map<String,Object>)value;
Object localized=CommonUtils.localizeByMap(localizations,true,locale.getLanguage(),Locale.getDefault().getLanguage());
if (localized != null) return localized.toString();
default :
return value.toString();
}
}
 else {
return doc.toString();
}
}
}
Program: 117426
Project: 117426
Buggy source:
@Override public void onClick(){
  OrienteerWebSession.get().setPerspecive(getModelObject());
  OrienteerBasePage.this.info(getLocalizer().getString("String_Node_Str",this,new ODocumentPropertyModel<String>(getModel(),"String_Node_Str")));
}

Fixed version (ground truth):
@Override public void onClick(){
  OrienteerWebSession.get().setPerspecive(getModelObject());
  OrienteerBasePage.this.info(getLocalizer().getString("String_Node_Str",this,new ODocumentNameModel(getModel())));
}
Program: 117430
Project: 117430
Buggy source:
public HomePage(){
  ODocument perspective=getPerspective();
  String homeUrl=perspective.field("String_Node_Str");
  throw new RedirectToUrlException(homeUrl);
}

Fixed version (ground truth):
public HomePage(){
  ODocument perspective=getPerspective();
  String homeUrl=perspective.field("String_Node_Str");
  if (Strings.isEmpty(homeUrl))   homeUrl="String_Node_Str";
  if (!OrienteerWebSession.get().isSignedIn()) {
    if (homeUrl.indexOf('?') >= 0)     homeUrl+='&';
 else     homeUrl+='?';
    homeUrl+=FROM_HOME_PARAM + "String_Node_Str";
  }
  throw new RedirectToUrlException(homeUrl);
}
Program: 117431
Project: 117431
Buggy source:
@Override public Statement apply(final Statement base,final FrameworkMethod method,final Object target){
  return new Statement(){
    @Override public void evaluate() throws Throwable {
      Injector injector=injectorProvider.get();
      injector.injectMembers(target);
    }
  }
;
}

Fixed version (ground truth):
@Override public Statement apply(final Statement base,final FrameworkMethod method,final Object target){
  return new Statement(){
    @Override public void evaluate() throws Throwable {
      Injector injector=injectorProvider.get();
      injector.injectMembers(target);
      base.evaluate();
    }
  }
;
}
Program: 117432
Project: 117432
Buggy source:
@Override public void evaluate() throws Throwable {
  Injector injector=injectorProvider.get();
  injector.injectMembers(target);
}

Fixed version (ground truth):
@Override public void evaluate() throws Throwable {
  Injector injector=injectorProvider.get();
  injector.injectMembers(target);
  base.evaluate();
}
Program: 117433
Project: 117433
Buggy source:
@Override protected String load(){
  return OrienteerWebApplication.get().getOClassIntrospector().getDocumentName(documentModel.getObject());
}

Fixed version (ground truth):
@Override protected String load(){
  ODocument doc=documentModel != null ? documentModel.getObject() : null;
  return doc != null ? OrienteerWebApplication.get().getOClassIntrospector().getDocumentName(doc) : null;
}
Program: 117434
Project: 117434
Buggy source:
@Override public void detach(){
  documentModel.detach();
}

Fixed version (ground truth):
@Override public void detach(){
  if (documentModel != null)   documentModel.detach();
}
Program: 117435
Project: 117435
Buggy source:
@Override public Object getDisplayValue(ODocument object){
  return oClassIntrospector.getDocumentName(object);
}

Fixed version (ground truth):
@Override public Object getDisplayValue(ODocument object){
  return getOClassIntrospector().getDocumentName(object);
}
Program: 117436
Project: 117436
Buggy source:
public ODocument getDocument(){
  return getDocumentModel().getObject();
}

Fixed version (ground truth):
public ODocument getDocument(){
  IModel<ODocument> documentModel=getDocumentModel();
  return documentModel != null ? documentModel.getObject() : null;
}