nus-yam/ex-repair huggingface dataset:
Program: 117255
Project: 117255
Buggy source:
@Override public SerializablePredicate<OProperty> getPredicateForTableProperties(){
  return (prop) -> CustomAttribute.DISPLAYABLE.getValue(prop,true);
}

Fixed version (ground truth):
@Override public SerializablePredicate<OProperty> getPredicateForTableProperties(){
  return (prop) -> CustomAttribute.DISPLAYABLE.getValue(prop);
}
Program: 117256
Project: 117256
Buggy source:
@Override public SerializablePredicate<OProperty> getPredicateForListProperties(){
  return (prop) -> !CustomAttribute.HIDDEN.getValue(prop,false);
}

Fixed version (ground truth):
@Override public SerializablePredicate<OProperty> getPredicateForListProperties(){
  return (prop) -> !(Boolean)CustomAttribute.HIDDEN.getValue(prop);
}
Program: 117257
Project: 117257
Buggy source:
public DefaultPageHeader(String id,IModel<String> model){
  super(id,model);
  add(new Label("String_Node_Str",model));
  add(menu=new DefaultPageHeaderMenu("String_Node_Str"));
}

Fixed version (ground truth):
public DefaultPageHeader(String id,IModel<String> model){
  super(id,model);
  add(new Label("String_Node_Str",model));
  add(menu=new DefaultPageHeaderMenu("String_Node_Str"));
  OSecurityHelper.secureComponent(menu,OSecurityHelper.requireOClass(OWidgetsModule.OCLASS_DASHBOARD,OrientPermission.UPDATE));
}
Program: 117258
Project: 117258
Buggy source:
@Override public void sendMail(String to,OMail mail) throws MessagingException, UnsupportedEncodingException {
  final OMailSettings settings=mail.getMailSettings();
  final Session session=createSession(settings);
  final Message message=new MimeMessage(session);
  message.setFrom(createFrom(mail,settings));
  message.setRecipient(Message.RecipientType.TO,new InternetAddress(to));
  message.setSubject(mail.getSubject());
  message.setContent(mail.getText(),"String_Node_Str");
  Transport.send(message);
}

Fixed version (ground truth):
@Override public void sendMail(String to,OMail mail) throws MessagingException, UnsupportedEncodingException {
  mail.reload();
  final OMailSettings settings=mail.getMailSettings();
  final Session session=createSession(settings);
  final Message message=new MimeMessage(session);
  message.setFrom(createFrom(mail,settings));
  message.setRecipient(Message.RecipientType.TO,new InternetAddress(to));
  message.setSubject(mail.getSubject());
  message.setContent(mail.getText(),"String_Node_Str");
  Transport.send(message);
}
Program: 117259
Project: 117259
Buggy source:
@Override public void sendMailAsync(String to,OMail mail,Consumer<Boolean> f){
  new Thread(() -> {
    boolean success=false;
    try {
      sendMail(to,mail);
      success=true;
    }
 catch (    Exception ex) {
      ex.printStackTrace();
    }
 finally {
      if (f != null)       f.accept(success);
    }
  }
).start();
}

Fixed version (ground truth):
@Override public void sendMailAsync(String to,OMail mail,Consumer<Boolean> f){
  OrienteerWebSession session=OrienteerWebSession.get();
  OrienteerWebApplication app=OrienteerWebApplication.get();
  RequestCycle requestCycle=RequestCycle.get();
  new Thread(() -> {
    boolean success=false;
    try {
      ThreadContext.setSession(session);
      ThreadContext.setApplication(app);
      ThreadContext.setRequestCycle(requestCycle);
      sendMail(to,mail);
      success=true;
    }
 catch (    Exception ex) {
      ex.printStackTrace();
    }
 finally {
      if (f != null)       f.accept(success);
    }
  }
).start();
}
Program: 117260
Project: 117260
Buggy source:
@Before public void init(){
  OMailSettings settings=new OMailSettings().setEmail("String_Node_Str").setPassword("String_Node_Str").setSmtpHost("String_Node_Str").setSmtpPort(587).setTlsSsl(true);
  mail=new OMail().setMailSettings(settings).setName("String_Node_Str").setFrom("String_Node_Str").setSubject("String_Node_Str").setText("String_Node_Str");
  to="String_Node_Str";
}

Fixed version (ground truth):
@Before public void init(){
  String email="String_Node_Str";
  String password="String_Node_Str";
  String mailName="String_Node_Str";
  to="String_Node_Str";
  Function<String,OMail> query=(name) -> {
    List<ODocument> docs=OrienteerWebSession.get().getDatabase().query(new OSQLSynchQuery<>("String_Node_Str" + OMail.CLASS_NAME + "String_Node_Str"+ OMail.NAME+ "String_Node_Str",1),name);
    return docs != null && !docs.isEmpty() ? new OMail(docs.get(0)) : null;
  }
;
  Consumer<String> create=(name) -> {
    OMailSettings settings=new OMailSettings().setEmail(email).setPassword(password).setSmtpHost("String_Node_Str").setSmtpPort(587).setTlsSsl(true);
    OMail mail=new OMail().setMailSettings(settings).setName(name).setFrom("String_Node_Str").setSubject("String_Node_Str").setText("String_Node_Str");
    settings.sudoSave();
    mail.sudoSave();
  }
;
  create.accept(mailName);
  mail=query.apply(mailName);
  assertNotNull(mail);
}
Program: 117261
Project: 117261
Buggy source:
@Test @Ignore public void testSendEmail(){
  try {
    mailService.sendMail(to,mail);
  }
 catch (  MessagingException|UnsupportedEncodingException e) {
    throw new IllegalStateException(e);
  }
}

Fixed version (ground truth):
@Test public void testSendEmail(){
  try {
    mailService.sendMail(to,mail);
  }
 catch (  MessagingException|UnsupportedEncodingException e) {
    throw new IllegalStateException(e);
  }
}
Program: 117262
Project: 117262
Buggy source:
@After public void destroy(){
  mail=null;
}

Fixed version (ground truth):
@After public void destroy(){
  new DBClosure<Void>(){
    @Override protected Void execute(    ODatabaseDocument db){
      db.command(new OCommandSQL("String_Node_Str")).execute(mail.getDocument());
      db.command(new OCommandSQL("String_Node_Str")).execute(mail.getMailSettings().getDocument());
      return null;
    }
  }
.execute();
}
Program: 117263
Project: 117263
Buggy source:
@Test @Ignore public void testSendEmailAsyncWithCallback() throws InterruptedException {
}

Fixed version (ground truth):
@Test public void testSendEmailAsyncWithCallback() throws InterruptedException {
}
Program: 117264
Project: 117264
Buggy source:
public static OTaskManager get(){
  OrienteerWebApplication app=OrienteerWebApplication.lookupApplication();
  OTaskManager taskManager=app.getMetaData(TASK_MANAGER_KEY);
  if (taskManager == null) {
synchronized (OTaskManager.class) {
      if (taskManager == null) {
        taskManager=new OTaskManager();
        app.setMetaData(TASK_MANAGER_KEY,taskManager);
      }
    }
  }
  return taskManager;
}

Fixed version (ground truth):
public static OTaskManager get(){
  OrienteerWebApplication app=OrienteerWebApplication.lookupApplication();
  OTaskManager taskManager=app.getMetaData(TASK_MANAGER_KEY);
  if (taskManager == null) {
synchronized (OTaskManager.class) {
      taskManager=app.getMetaData(TASK_MANAGER_KEY);
      if (taskManager == null) {
        taskManager=new OTaskManager();
        app.setMetaData(TASK_MANAGER_KEY,taskManager);
      }
    }
  }
  return taskManager;
}
Program: 117265
Project: 117265
Buggy source:
public <V>void persist(final String field,final V value){
  document.field(field,value);
  if (document.getIdentity().isPersistent()) {
    DBClosure.sudoSave(document);
  }
}

Fixed version (ground truth):
public <V>void persist(final String field,final V value){
  document.field(field,value);
  if (document.getIdentity().isPersistent()) {
    sudoSave();
  }
}
Program: 117267
Project: 117267
Buggy source:
public CreateEdgeCommand(IModel<?> labelModel,OrienteerDataTable<ODocument,?> table,IModel<ODocument> documentIModel){
  super(labelModel,table);
  setBootstrapType(BootstrapType.SUCCESS);
  setIcon(FAIconType.plus);
  setAutoNotify(false);
  this.classModel=new OClassModel(GraphModule.VERTEX_CLASS_NAME);
  this.documentModel=documentIModel;
}

Fixed version (ground truth):
public CreateEdgeCommand(IModel<?> labelModel,OrienteerDataTable<ODocument,?> table,IModel<ODocument> documentIModel){
  super(labelModel,table);
  setBootstrapType(BootstrapType.SUCCESS);
  setIcon(FAIconType.plus);
  setAutoNotify(false);
  this.classModel=new OClassModel(GraphModule.VERTEX_CLASS_NAME);
  this.documentModel=documentIModel;
  setChandingModel(true);
}
Program: 117268
Project: 117268
Buggy source:
@Override protected void initializeContent(final ModalWindow modal){
  modal.setTitle(new ResourceModel("String_Node_Str"));
  modal.setAutoSize(true);
  modal.setMinimalWidth(300);
  SelectSubOClassDialogPage selectEdgeClassDialog=new SelectSubOClassDialogPage(modal,new OClassModel(GraphModule.EDGE_CLASS_NAME)){
    @Override protected void onSelect(    AjaxRequestTarget target,    final OClass selectedOClass){
      modal.setTitle(new ResourceModel("String_Node_Str"));
      OClassModel vertexOClassModel=new OClassModel(GraphModule.VERTEX_CLASS_NAME);
      modal.setContent(new SelectDialogPanel(modal.getContentId(),modal,vertexOClassModel,true){
        @Override protected boolean onSelect(        AjaxRequestTarget target,        List<ODocument> objects,        boolean selectMore){
          createEdge(objects,selectedOClass);
          modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
            private static final long serialVersionUID=1L;
            @Override public void onClose(            AjaxRequestTarget target){
              target.add(getPage());
            }
          }
);
          return true;
        }
      }
);
      modal.show(target);
    }
  }
;
  modal.setContent(selectEdgeClassDialog);
}

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 selectEdgeClassDialog=new SelectSubOClassDialogPage(modal,new OClassModel(GraphModule.EDGE_CLASS_NAME)){
    @Override protected void onSelect(    AjaxRequestTarget target,    OClass selectedOClass){
      modal.setTitle(new ResourceModel("String_Node_Str"));
      final OClassModel selectedEdgeOClassModel=new OClassModel(selectedOClass);
      OClassModel vertexOClassModel=new OClassModel(GraphModule.VERTEX_CLASS_NAME);
      modal.setContent(new SelectDialogPanel(modal.getContentId(),modal,vertexOClassModel,true){
        @Override protected boolean onSelect(        AjaxRequestTarget target,        List<ODocument> objects,        boolean selectMore){
          createEdge(objects,selectedEdgeOClassModel.getObject());
          this.modal.close(target);
          CreateEdgeCommand.this.sendActionPerformed();
          return true;
        }
      }
);
      modal.show(target);
    }
  }
;
  modal.setContent(selectEdgeClassDialog);
}
Program: 117269
Project: 117269
Buggy source:
private void createEdge(List<ODocument> documents,OClass edgeClass){
  OrientGraph tx=null;
  try {
    tx=new OrientGraphFactory(getDatabase().getURL()).getTx();
    for (    ODocument createTo : documents) {
      tx.addEdge(null,tx.getVertex(documentModel.getObject().getIdentity()),tx.getVertex(createTo.getIdentity()),edgeClass.getName());
    }
  }
  finally {
    if (tx != null)     tx.shutdown();
  }
}

Fixed version (ground truth):
private void createEdge(List<ODocument> documents,OClass edgeClass){
  OrientGraph tx=orientGraphProvider.get();
  for (  ODocument createTo : documents) {
    tx.addEdge(null,tx.getVertex(documentModel.getObject().getIdentity()),tx.getVertex(createTo.getIdentity()),edgeClass.getName());
  }
  tx.commit();
  tx.begin();
}
Program: 117270
Project: 117270
Buggy source:
@Override protected boolean onSelect(AjaxRequestTarget target,List<ODocument> objects,boolean selectMore){
  createEdge(objects,selectedOClass);
  modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
    private static final long serialVersionUID=1L;
    @Override public void onClose(    AjaxRequestTarget target){
      target.add(getPage());
    }
  }
);
  return true;
}

Fixed version (ground truth):
@Override protected boolean onSelect(AjaxRequestTarget target,List<ODocument> objects,boolean selectMore){
  createEdge(objects,selectedEdgeOClassModel.getObject());
  this.modal.close(target);
  CreateEdgeCommand.this.sendActionPerformed();
  return true;
}
Program: 117271
Project: 117271
Buggy source:
public CreateVertexCommand(OrienteerDataTable<ODocument,?> table,IModel<ODocument> documentIModel){
  super(new ResourceModel("String_Node_Str"),table);
  setBootstrapType(BootstrapType.PRIMARY);
  setIcon(FAIconType.plus);
  setAutoNotify(false);
  this.classModel=new OClassModel(GraphModule.VERTEX_CLASS_NAME);
  this.documentModel=documentIModel;
}

Fixed version (ground truth):
public CreateVertexCommand(OrienteerDataTable<ODocument,?> table,IModel<ODocument> documentIModel){
  super(new ResourceModel("String_Node_Str"),table);
  setBootstrapType(BootstrapType.PRIMARY);
  setIcon(FAIconType.plus);
  setAutoNotify(false);
  this.classModel=new OClassModel(GraphModule.VERTEX_CLASS_NAME);
  this.documentModel=documentIModel;
  setChandingModel(true);
}
Program: 117272
Project: 117272
Buggy source:
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());
}

Fixed version (ground truth):
private OrientVertex createVertex(OClass vertexClass,OClass edgeClass){
  OrientGraph tx=orientGraphProvider.get();
  OrientVertex newVertex=tx.addVertex(vertexClass.getName(),(String)null);
  OrientVertex vertex=tx.getVertex(documentModel.getObject().getIdentity());
  tx.addEdge(null,vertex,newVertex,edgeClass.getName());
  tx.commit();
  tx.begin();
  return newVertex;
}
Program: 117273
Project: 117273
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){
              setResponsePage(new ODocumentPage(new ODocumentModel(documentModel.getObject())).setModeObject(DisplayMode.VIEW));
            }
          }
);
        }
      }
);
      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,    OClass selectedOVertexClass){
      modal.setTitle(new ResourceModel("String_Node_Str"));
      final IModel<OClass> selectedOVertextClassModel=new OClassModel(selectedOVertexClass);
      OClassModel edgeOClassModel=new OClassModel(GraphModule.EDGE_CLASS_NAME);
      modal.setContent(new SelectSubOClassDialogPage(modal,edgeOClassModel){
        @Override protected void onSelect(        AjaxRequestTarget target,        final OClass selectedOEdgeClass){
          OrientVertex newV=createVertex(selectedOVertextClassModel.getObject(),selectedOEdgeClass);
          setResponsePage(new ODocumentPage(newV.getRecord()).setModeObject(DisplayMode.EDIT));
        }
      }
);
      modal.show(target);
    }
  }
;
  modal.setContent(selectVertexClassDialog);
}
Program: 117274
Project: 117274
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){
      setResponsePage(new ODocumentPage(new ODocumentModel(documentModel.getObject())).setModeObject(DisplayMode.VIEW));
    }
  }
);
}

Fixed version (ground truth):
@Override protected void onSelect(AjaxRequestTarget target,final OClass selectedOEdgeClass){
  OrientVertex newV=createVertex(selectedOVertextClassModel.getObject(),selectedOEdgeClass);
  setResponsePage(new ODocumentPage(newV.getRecord()).setModeObject(DisplayMode.EDIT));
}
Program: 117275
Project: 117275
Buggy source:
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);
}

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);
  setChandingModel(true);
}
Program: 117276
Project: 117276
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();
    OrientEdge edge=tx.getEdge(id);
    tx.removeEdge(edge);
  }
  tx.begin();
  setResponsePage(new ODocumentPage(documentModel.getObject()).setModeObject(DisplayMode.VIEW));
}

Fixed version (ground truth):
@Override protected void performMultiAction(AjaxRequestTarget target,List<ODocument> objects){
  OrientGraph tx=orientGraphProvider.get();
  for (  ODocument doc : objects) {
    ORID id=doc.getIdentity();
    OrientEdge edge=tx.getEdge(id);
    tx.removeEdge(edge);
  }
  tx.commit();
  tx.begin();
  sendActionPerformed();
}
Program: 117277
Project: 117277
Buggy source:
public DeleteVertexCommand(OrienteerDataTable<ODocument,?> table,IModel<ODocument> documentModel){
  super(table);
  this.classModel=new OClassModel(GraphModule.VERTEX_CLASS_NAME);
  this.documentModel=documentModel;
}

Fixed version (ground truth):
public DeleteVertexCommand(OrienteerDataTable<ODocument,?> table,IModel<ODocument> documentModel){
  super(table);
  this.classModel=new OClassModel(GraphModule.VERTEX_CLASS_NAME);
  this.documentModel=documentModel;
  setChandingModel(true);
}
Program: 117278
Project: 117278
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();
    tx.removeVertex(tx.getVertex(id));
  }
  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=orientGraphProvider.get();
  for (  ODocument doc : objects) {
    ORID id=doc.getIdentity();
    tx.removeVertex(tx.getVertex(id));
  }
  tx.commit();
  tx.begin();
  sendActionPerformed();
}
Program: 117279
Project: 117279
Buggy source:
public UnlinkVertexCommand(OrienteerDataTable<ODocument,?> table,IModel<ODocument> documentModel){
  super(new ResourceModel("String_Node_Str"),table);
  setBootstrapType(BootstrapType.WARNING);
  this.documentModel=documentModel;
  this.classModel=new OClassModel(GraphModule.EDGE_CLASS_NAME);
}

Fixed version (ground truth):
public UnlinkVertexCommand(OrienteerDataTable<ODocument,?> table,IModel<ODocument> documentModel){
  super(new ResourceModel("String_Node_Str"),table);
  setBootstrapType(BootstrapType.WARNING);
  this.documentModel=documentModel;
  this.classModel=new OClassModel(GraphModule.EDGE_CLASS_NAME);
  setChandingModel(true);
}
Program: 117280
Project: 117280
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=orientGraphProvider.get();
  for (  ODocument doc : objects) {
    ORID id=doc.getIdentity();
    OrientVertex vertex=tx.getVertex(id);
    removeEdges(tx,vertex);
  }
  tx.commit();
  tx.begin();
  sendActionPerformed();
}
Program: 117281
Project: 117281
Buggy source:
@SuppressWarnings("String_Node_Str") public GraphVerticesWidget(String id,final IModel<ODocument> model,IModel<ODocument> widgetDocumentModel){
  super(id,model,widgetDocumentModel);
  IModel<DisplayMode> modeModel=DisplayMode.VIEW.asModel();
  OProperty nameProperty=oClassIntrospector.getNameProperty(getModelObject().getSchemaClass());
  OEntityColumn entityColumn=new OEntityColumn(nameProperty,true,modeModel);
  Function<ODocument,String> directionLocalizer=new Function<ODocument,String>(){
    @Override public String apply(    ODocument vertex){
      Object fieldIn=model.getObject().field("String_Node_Str");
      String direction=((OIdentifiable)fieldIn).getIdentity().equals(vertex.getIdentity()) ? "String_Node_Str" : "String_Node_Str";
      return getLocalizer().getString("String_Node_Str" + direction,GraphVerticesWidget.this);
    }
  }
;
  ODocumentDescriptionColumn directionColumn=new ODocumentDescriptionColumn(new StringResourceModel("String_Node_Str",this,Model.of()),directionLocalizer);
  OQueryDataProvider<ODocument> provider=new OQueryDataProvider<>("String_Node_Str" + ((OIdentifiable)model.getObject().field("String_Node_Str")).getIdentity() + "String_Node_Str"+ ((OIdentifiable)model.getObject().field("String_Node_Str")).getIdentity()+ "String_Node_Str");
  GenericTablePanel<ODocument> tablePanel=new GenericTablePanel<ODocument>("String_Node_Str",Lists.newArrayList(entityColumn,directionColumn),provider,2);
  OrienteerDataTable<ODocument,String> table=tablePanel.getDataTable();
  add(tablePanel);
  add(DisableIfDocumentNotSavedBehavior.INSTANCE,UpdateOnActionPerformedEventBehavior.INSTANCE_ALL_CONTINUE);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public GraphVerticesWidget(String id,final IModel<ODocument> model,IModel<ODocument> widgetDocumentModel){
  super(id,model,widgetDocumentModel);
  IModel<DisplayMode> modeModel=DisplayMode.VIEW.asModel();
  OProperty nameProperty=oClassIntrospector.getNameProperty(getModelObject().getSchemaClass());
  OEntityColumn entityColumn=new OEntityColumn(nameProperty,true,modeModel);
  ODocumentDescriptionColumn directionColumn=new ODocumentDescriptionColumn(new StringResourceModel("String_Node_Str",this,Model.of()),new DirectionLocalizer());
  OQueryDataProvider<ODocument> provider=new OQueryDataProvider<>("String_Node_Str" + ((OIdentifiable)model.getObject().field("String_Node_Str")).getIdentity() + "String_Node_Str"+ ((OIdentifiable)model.getObject().field("String_Node_Str")).getIdentity()+ "String_Node_Str");
  GenericTablePanel<ODocument> tablePanel=new GenericTablePanel<ODocument>("String_Node_Str",Lists.newArrayList(entityColumn,directionColumn),provider,2);
  OrienteerDataTable<ODocument,String> table=tablePanel.getDataTable();
  add(tablePanel);
  add(DisableIfDocumentNotSavedBehavior.INSTANCE,UpdateOnActionPerformedEventBehavior.INSTANCE_ALL_CONTINUE);
}
Program: 117282
Project: 117282
Buggy source:
@Override public String apply(ODocument vertex){
  Object fieldIn=model.getObject().field("String_Node_Str");
  String direction=((OIdentifiable)fieldIn).getIdentity().equals(vertex.getIdentity()) ? "String_Node_Str" : "String_Node_Str";
  return getLocalizer().getString("String_Node_Str" + direction,GraphVerticesWidget.this);
}

Fixed version (ground truth):
@Override public String apply(ODocument vertex){
  Object fieldIn=getModelObject().field("String_Node_Str");
  String direction=((OIdentifiable)fieldIn).getIdentity().equals(vertex.getIdentity()) ? "String_Node_Str" : "String_Node_Str";
  return getLocalizer().getString("String_Node_Str" + direction,GraphVerticesWidget.this);
}
Program: 117283
Project: 117283
Buggy source:
@Provides @RequestScoped public OrientGraph provideOrientGraph(ODatabaseDocumentTx dbTx){
  return new OrientGraph(dbTx);
}

Fixed version (ground truth):
@Provides @RequestScoped public OrientGraph provideOrientGraph(ODatabaseDocumentTx dbTx){
  return new OrientGraph(dbTx,false);
}
Program: 117284
Project: 117284
Buggy source:
@Override protected void initializeContent(final ModalWindow modal){
  modal.setTitle(new ResourceModel("String_Node_Str"));
  modal.setAutoSize(true);
  modal.setMinimalWidth(300);
  SelectSubOClassDialogPage selectEdgeClassDialog=new SelectSubOClassDialogPage(modal,new OClassModel(GraphModule.EDGE_CLASS_NAME)){
    @Override protected void onSelect(    AjaxRequestTarget target,    OClass selectedOClass){
      modal.setTitle(new ResourceModel("String_Node_Str"));
      final OClassModel selectedEdgeOClassModel=new OClassModel(selectedOClass);
      OClassModel vertexOClassModel=new OClassModel(GraphModule.VERTEX_CLASS_NAME);
      modal.setContent(new SelectDialogPanel(modal.getContentId(),modal,vertexOClassModel,true){
        @Override protected boolean onSelect(        AjaxRequestTarget target,        List<ODocument> objects,        boolean selectMore){
          createEdge(objects,selectedEdgeOClassModel.getObject());
          this.modal.close(target);
          CreateEdgeCommand.this.sendActionPerformed();
          return true;
        }
      }
);
      modal.show(target);
    }
  }
;
  modal.setContent(selectEdgeClassDialog);
}

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 selectEdgeClassDialog=new SelectSubOClassDialogPage(modal,new OClassModel(GraphModule.EDGE_CLASS_NAME)){
    @Override protected void onSelect(    AjaxRequestTarget target,    OClass selectedOClass){
      modal.setWindowClosedCallback(null);
      modal.setTitle(new ResourceModel("String_Node_Str"));
      final OClassModel selectedEdgeOClassModel=new OClassModel(selectedOClass);
      OClassModel vertexOClassModel=new OClassModel(GraphModule.VERTEX_CLASS_NAME);
      modal.setContent(new SelectDialogPanel(modal.getContentId(),modal,vertexOClassModel,true){
        @Override protected boolean onSelect(        AjaxRequestTarget target,        List<ODocument> objects,        boolean selectMore){
          createEdge(objects,selectedEdgeOClassModel.getObject());
          this.modal.close(target);
          CreateEdgeCommand.this.sendActionPerformed();
          return true;
        }
      }
);
      modal.show(target);
    }
  }
;
  modal.setContent(selectEdgeClassDialog);
}
Program: 117285
Project: 117285
Buggy source:
private OClass addClassToSchema(OSchema schema,OArchitectOClass architectOClass){
  String name=architectOClass.getName();
  OClass oClass=schema.getOrCreateClass(name);
  if (architectOClass.isExistsInDb())   removePropertiesFromOClass(oClass,architectOClass.getPropertiesForDelete());
  addSuperClassesToOClass(schema,oClass,architectOClass.getSuperClasses());
  addPropertiesToOClass(schema,oClass,architectOClass.getProperties());
  return oClass;
}

Fixed version (ground truth):
private OClass addClassToSchema(OSchema schema,OArchitectOClass architectOClass){
  String name=architectOClass.getName();
  OClass oClass=schema.getOrCreateClass(name);
  addSuperClassesToOClass(schema,oClass,architectOClass.getSuperClasses());
  addPropertiesToOClass(schema,oClass,architectOClass.getProperties());
  return oClass;
}
Program: 117286
Project: 117286
Buggy source:
@Override protected void respond(AjaxRequestTarget target){
  if (actionActive)   return;
  actionActive=true;
  IRequestParameters params=RequestCycle.get().getRequest().getRequestParameters();
  String json=params.getParameterValue(JSON_VAR).toString("String_Node_Str");
  List<OArchitectOClass> classes;
  classes=JsonUtil.fromJSON(json);
  try {
    addClassesToSchema(classes);
    target.prependJavaScript("String_Node_Str");
  }
 catch (  Exception ex) {
    target.prependJavaScript("String_Node_Str");
  }
  actionActive=false;
}

Fixed version (ground truth):
@Override protected void respond(AjaxRequestTarget target){
  if (actionActive)   return;
  actionActive=true;
  IRequestParameters params=RequestCycle.get().getRequest().getRequestParameters();
  String json=params.getParameterValue(JSON_VAR).toString("String_Node_Str");
  List<OArchitectOClass> classes;
  classes=JsonUtil.fromJSON(json);
  try {
    addClassesToSchema(classes);
    target.prependJavaScript("String_Node_Str" + "String_Node_Str");
  }
 catch (  Exception ex) {
    LOG.error("String_Node_Str",ex);
    target.prependJavaScript("String_Node_Str");
  }
  actionActive=false;
}
Program: 117287
Project: 117287
Buggy source:
@Override protected void respond(AjaxRequestTarget target){
  if (actionActive)   return;
  actionActive=true;
  IRequestParameters params=RequestCycle.get().getRequest().getRequestParameters();
  try {
    ODocument document=model.getObject();
    document.field(OArchitectModule.CONFIG_OPROPERTY,params.getParameterValue(CONFIG_VAR));
    document.save();
    target.appendJavaScript("String_Node_Str");
  }
 catch (  Exception ex) {
    target.appendJavaScript("String_Node_Str");
  }
  actionActive=false;
}

Fixed version (ground truth):
@Override protected void respond(AjaxRequestTarget target){
  if (actionActive)   return;
  actionActive=true;
  IRequestParameters params=RequestCycle.get().getRequest().getRequestParameters();
  try {
    ODocument document=model.getObject();
    document.field(OArchitectModule.CONFIG_OPROPERTY,params.getParameterValue(CONFIG_VAR));
    document.save();
    target.appendJavaScript("String_Node_Str");
  }
 catch (  Exception ex) {
    LOG.error("String_Node_Str",ex);
    target.appendJavaScript("String_Node_Str");
  }
  actionActive=false;
}
Program: 117289
Project: 117289
Buggy source:
private static OArchitectOClass convertOClassFromJson(JSONObject jsonObject){
  OArchitectOClass oClass=new OArchitectOClass(jsonObject.getString(NAME));
  if (!jsonObject.isNull(SUPER_CLASSES)) {
    oClass.setSuperClasses(getSuperClasses(jsonObject.getJSONArray(SUPER_CLASSES)));
  }
  if (!jsonObject.isNull(EXISTS_IN_DB)) {
    String exists=jsonObject.getString(EXISTS_IN_DB);
    oClass.setExistsInDb(exists.equals("String_Node_Str") || exists.equals("String_Node_Str"));
  }
  if (!jsonObject.isNull(PROPERTIES)) {
    oClass.setProperties(getOPropertyListFromJson(jsonObject.getJSONArray(PROPERTIES)));
  }
  if (!jsonObject.isNull(PROPERTIES_FOR_DELETE)) {
    oClass.setPropertiesForDelete(getOPropertyListFromJson(jsonObject.getJSONArray(PROPERTIES_FOR_DELETE)));
  }
  return oClass;
}

Fixed version (ground truth):
private static OArchitectOClass convertOClassFromJson(JSONObject jsonObject){
  OArchitectOClass oClass=new OArchitectOClass(jsonObject.getString(NAME));
  if (!jsonObject.isNull(SUPER_CLASSES)) {
    oClass.setSuperClasses(getSuperClasses(jsonObject.getJSONArray(SUPER_CLASSES)));
  }
  if (!jsonObject.isNull(EXISTS_IN_DB)) {
    String exists=jsonObject.getString(EXISTS_IN_DB);
    oClass.setExistsInDb(exists.equals("String_Node_Str") || exists.equals("String_Node_Str"));
  }
  if (!jsonObject.isNull(PROPERTIES)) {
    oClass.setProperties(getOPropertyListFromJson(jsonObject.getJSONArray(PROPERTIES)));
  }
  return oClass;
}
Program: 117290
Project: 117290
Buggy source:
private static OArchitectOProperty convertOPropertyFromJson(JSONObject jsonObject){
  String name=!jsonObject.isNull(NAME) ? jsonObject.getString(NAME) : null;
  OType type=!jsonObject.isNull(TYPE) ? OType.valueOf(jsonObject.getString(TYPE)) : null;
  OArchitectOProperty property=null;
  if (!Strings.isNullOrEmpty(name) && type != null) {
    property=new OArchitectOProperty(name,type);
    if (!jsonObject.isNull(SUBCLASS_PROPERTY)) {
      String subClassProperty=jsonObject.getString(SUBCLASS_PROPERTY);
      property.setSubClassProperty(subClassProperty.equals("String_Node_Str") || subClassProperty.equals("String_Node_Str"));
    }
    if (!jsonObject.isNull(LINKED_CLASS_NAME)) {
      property.setLinkedClass(jsonObject.getString(LINKED_CLASS_NAME));
    }
    if (!jsonObject.isNull(ORDER)) {
      property.setOrder(jsonObject.getInt(ORDER));
    }
    if (!jsonObject.isNull(INVERSE_PROPERTY)) {
      property.setInverseProperty(convertInverseProperty(jsonObject.getJSONObject(INVERSE_PROPERTY)));
    }
  }
  return property;
}

Fixed version (ground truth):
private static OArchitectOProperty convertOPropertyFromJson(JSONObject jsonObject){
  String name=!jsonObject.isNull(NAME) ? jsonObject.getString(NAME) : null;
  OType type=!jsonObject.isNull(TYPE) ? OType.valueOf(jsonObject.getString(TYPE)) : null;
  OArchitectOProperty property=null;
  if (!Strings.isNullOrEmpty(name) && type != null) {
    property=new OArchitectOProperty(name,type);
    if (!jsonObject.isNull(SUBCLASS_PROPERTY)) {
      String subClassProperty=jsonObject.getString(SUBCLASS_PROPERTY);
      property.setSubClassProperty(subClassProperty.equals("String_Node_Str") || subClassProperty.equals("String_Node_Str"));
    }
    if (!jsonObject.isNull(LINKED_CLASS_NAME)) {
      property.setLinkedClass(jsonObject.getString(LINKED_CLASS_NAME));
    }
    if (!jsonObject.isNull(ORDER)) {
      property.setOrder(jsonObject.getInt(ORDER));
    }
    if (!jsonObject.isNull(INVERSE_PROPERY_ENABLE)) {
      property.setInversePropertyEnable(jsonObject.getBoolean(INVERSE_PROPERY_ENABLE));
      if (!jsonObject.isNull(INVERSE_PROPERTY)) {
        property.setInverseProperty(convertInverseProperty(jsonObject.getJSONObject(INVERSE_PROPERTY)));
      }
    }
  }
  return property;
}
Program: 117291
Project: 117291
Buggy source:
public static OArchitectOProperty toArchitectOProperty(OProperty property){
  OArchitectOProperty architectProperty=new OArchitectOProperty(property.getName(),property.getType());
  if (property.getLinkedClass() != null) {
    architectProperty.setLinkedClass(property.getLinkedClass().getName());
    OProperty inverse=CustomAttribute.PROP_INVERSE.getValue(property);
    if (inverse != null) {
      OArchitectOProperty prop=new OArchitectOProperty(inverse.getName(),inverse.getType());
      prop.setExistsInDb(true);
      architectProperty.setInverseProperty(prop);
    }
  }
  int order=CustomAttribute.ORDER.getValue(property);
  architectProperty.setOrder(order);
  architectProperty.setPageUrl("String_Node_Str" + property.getOwnerClass().getName() + "String_Node_Str"+ property.getName());
  architectProperty.setExistsInDb(true);
  return architectProperty;
}

Fixed version (ground truth):
public static OArchitectOProperty toArchitectOProperty(OProperty property){
  OArchitectOProperty architectProperty=new OArchitectOProperty(property.getName(),property.getType());
  if (property.getLinkedClass() != null) {
    architectProperty.setLinkedClass(property.getLinkedClass().getName());
    OProperty inverse=CustomAttribute.PROP_INVERSE.getValue(property);
    if (inverse != null) {
      OArchitectOProperty prop=new OArchitectOProperty(inverse.getName(),inverse.getType());
      prop.setExistsInDb(true);
      architectProperty.setInversePropertyEnable(true);
      architectProperty.setInverseProperty(prop);
    }
  }
  int order=CustomAttribute.ORDER.getValue(property);
  architectProperty.setOrder(order);
  architectProperty.setPageUrl("String_Node_Str" + property.getOwnerClass().getName() + "String_Node_Str"+ property.getName());
  architectProperty.setExistsInDb(true);
  return architectProperty;
}
Program: 117292
Project: 117292
Buggy source:
private static List<OArchitectOProperty> toOArchitectProperties(Collection<OProperty> properties,List<OClass> superClasses){
  List<OArchitectOProperty> architectProperties=new ArrayList<>(properties.size());
  for (  OProperty property : properties) {
    OArchitectOProperty architectOProperty=OArchitectOProperty.toArchitectOProperty(property);
    architectOProperty.setSubClassProperty(isSubClassProperty(property,superClasses));
    architectProperties.add(architectOProperty);
  }
  return architectProperties;
}

Fixed version (ground truth):
private static List<OArchitectOProperty> toOArchitectProperties(Collection<OProperty> properties,List<OClass> superClasses){
  List<OArchitectOProperty> architectProperties=new ArrayList<>(properties.size());
  ExtendedOPropertiesDataProvider provider=new ExtendedOPropertiesDataProvider(new CollectionModel<>(properties));
  provider.setSort(CustomAttribute.ORDER.getName(),SortOrder.ASCENDING);
  Iterator<? extends OProperty> iterator=provider.iterator(0,provider.size());
  while (iterator.hasNext()) {
    OProperty property=iterator.next();
    OArchitectOProperty architectOProperty=OArchitectOProperty.toArchitectOProperty(property);
    architectOProperty.setSubClassProperty(isSubClassProperty(property,superClasses));
    architectProperties.add(architectOProperty);
  }
  return architectProperties;
}
Program: 117293
Project: 117293
Buggy source:
@Override protected void respond(AjaxRequestTarget target){
  IRequestParameters params=RequestCycle.get().getRequest().getRequestParameters();
  String json=params.getParameterValue(EXISTS_CLASSES_VAR).toString("String_Node_Str");
  manager.setExistsClasses(JsonUtil.fromJSON(json));
  manager.switchModalWindow(target,true);
}

Fixed version (ground truth):
@Override protected void respond(AjaxRequestTarget target){
  IRequestParameters params=RequestCycle.get().getRequest().getRequestParameters();
  String json=params.getParameterValue(EXISTS_CLASSES_VAR).toString("String_Node_Str");
  manager.setExistsClasses(JsonUtil.fromJSON(json));
  manager.showModalWindow(target);
}
Program: 117294
Project: 117294
Buggy source:
private ModalWindow createModalWindow(String id){
  ModalWindow modal=new ModalWindow(id);
  modal.setTitle(new ResourceModel("String_Node_Str"));
  modal.setInitialWidth(670);
  modal.setInitialHeight(510);
  modal.setMinimalWidth(670);
  modal.setMinimalHeight(510);
  return modal;
}

Fixed version (ground truth):
private ModalWindow createModalWindow(String id){
  ModalWindow modal=new ModalWindow(id);
  modal.setOutputMarkupId(true);
  modal.setTitle(new ResourceModel("String_Node_Str"));
  modal.setInitialWidth(670);
  modal.setInitialHeight(510);
  modal.setMinimalWidth(670);
  modal.setMinimalHeight(510);
  return modal;
}
Program: 117295
Project: 117295
Buggy source:
public SchemaOClassesPanel(String id,String jsCallback){
  super(id);
  this.jsCallback=jsCallback;
  modal=createModalWindow("String_Node_Str");
  modal.setContent(createGenericTablePanel(modal.getContentId()));
  add(modal);
}

Fixed version (ground truth):
public SchemaOClassesPanel(String id,String jsCallback){
  super(id);
  this.jsCallback=jsCallback;
  modal=createModalWindow("String_Node_Str");
  modal.setContent(createGenericTablePanel(modal.getContentId()));
  modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
    @Override public void onClose(    AjaxRequestTarget target){
      switchPageScroll(target,false);
    }
  }
);
  add(modal);
}
Program: 117296
Project: 117296
Buggy source:
@Override protected void performMultiAction(AjaxRequestTarget target,List<OClass> classes){
  List<OArchitectOClass> architectOClasses=toOArchitectOClasses(classes);
  String json=JsonUtil.toJSON(architectOClasses);
  if (Strings.isNullOrEmpty(json))   json="String_Node_Str";
  manager.executeCallback(target,json);
  manager.switchModalWindow(target,false);
}

Fixed version (ground truth):
@Override protected void performMultiAction(AjaxRequestTarget target,List<OClass> classes){
  List<OArchitectOClass> architectOClasses=toOArchitectOClasses(classes);
  String json=JsonUtil.toJSON(architectOClasses);
  if (Strings.isNullOrEmpty(json))   json="String_Node_Str";
  manager.executeCallback(target,json);
  manager.closeModalWindow(target);
}
Program: 117297
Project: 117297
Buggy source:
@Override public void onClick(AjaxRequestTarget target){
  manager.executeCallback(target,"String_Node_Str");
  manager.switchModalWindow(target,false);
}

Fixed version (ground truth):
@Override public void onClick(AjaxRequestTarget target){
  manager.executeCallback(target,"String_Node_Str");
  manager.closeModalWindow(target);
}
Program: 117298
Project: 117298
Buggy source:
private void addPropertiesToOClass(OSchema schema,OClass oClass,List<OArchitectOProperty> properties){
  for (  OArchitectOProperty property : properties) {
    if (!property.isSubClassProperty()) {
      OProperty oProperty=oClass.getProperty(property.getName());
      if (oProperty == null) {
        oProperty=oClass.createProperty(property.getName(),property.getType());
      }
 else       if (oProperty.getType() != property.getType()) {
        oProperty.setType(property.getType());
      }
      if (!Strings.isNullOrEmpty(property.getLinkedClass())) {
        OClass linkedClass=schema.getOrCreateClass(property.getLinkedClass());
        oProperty.setLinkedClass(linkedClass);
      }
    }
  }
}

Fixed version (ground truth):
private void addPropertiesToOClass(OSchema schema,OClass oClass,List<OArchitectOProperty> properties){
  for (  OArchitectOProperty property : properties) {
    if (!property.isSubClassProperty()) {
      OProperty oProperty=oClass.getProperty(property.getName());
      if (oProperty == null && !property.isExistsInDb()) {
        oProperty=oClass.createProperty(property.getName(),property.getType());
      }
 else       if (oProperty != null && !property.isExistsInDb() && oProperty.getType() != property.getType()) {
        oProperty.setType(property.getType());
      }
      if (!Strings.isNullOrEmpty(property.getLinkedClass())) {
        OClass linkedClass=schema.getOrCreateClass(property.getLinkedClass());
        oProperty.setLinkedClass(linkedClass);
        OProperty inverseProp=!Strings.isNullOrEmpty(property.getInverseProperty()) ? linkedClass.getProperty(property.getInverseProperty()) : null;
        CustomAttribute.PROP_INVERSE.setValue(oProperty,inverseProp);
      }
    }
  }
}
Program: 117299
Project: 117299
Buggy source:
public GetOClassesBehavior(IOArchitectOClassesManager manager){
  this.manager=manager;
}

Fixed version (ground truth):
public GetOClassesBehavior(IOClassesModalManager manager){
  this.manager=manager;
}
Program: 117300
Project: 117300
Buggy source:
@Override protected void respond(AjaxRequestTarget target){
  IRequestParameters params=RequestCycle.get().getRequest().getRequestParameters();
  String json=params.getParameterValue(EXISTS_CLASSES_VAR).toString("String_Node_Str");
  manager.setExistsClasses(JsonUtil.fromJSON(json));
  manager.showModalWindow(target);
}

Fixed version (ground truth):
@Override protected void respond(AjaxRequestTarget target){
  IRequestParameters params=RequestCycle.get().getRequest().getRequestParameters();
  String json=params.getParameterValue(EXISTS_CLASSES_VAR).toString("String_Node_Str");
  boolean classesList=params.getParameterValue(CLASSES_LIST_VAR).toBoolean(false);
  if (classesList) {
    target.appendJavaScript(String.format("String_Node_Str",getAllClassesAsJson()));
  }
 else {
    manager.setExistsClasses(JsonUtil.fromJSON(json));
    manager.showModalWindow(target);
  }
}
Program: 117301
Project: 117301
Buggy source:
public SchemaOClassesPanel(String id,String jsCallback){
  super(id);
  this.jsCallback=jsCallback;
  modal=createModalWindow("String_Node_Str");
  modal.setContent(createGenericTablePanel(modal.getContentId()));
  add(modal);
}

Fixed version (ground truth):
public SchemaOClassesPanel(String id,String jsCallback){
  super(id);
  this.jsCallback=jsCallback;
  modal=createModalWindow("String_Node_Str");
  modal.setContent(createGenericTablePanel(modal.getContentId()));
  add(modal);
  add(AttributeModifier.append("String_Node_Str","String_Node_Str"));
}
Program: 117302
Project: 117302
Buggy source:
private void addSuperClassesToOClass(OSchema schema,OClass oClass,List<String> superClassNames){
  if (superClassNames != null && !superClassNames.isEmpty()) {
    List<OClass> superClasses=Lists.newArrayList();
    for (    String architectSuperClass : superClassNames) {
      if (!oClass.isSubClassOf(architectSuperClass) && schema.existsClass(architectSuperClass)) {
        OClass superClass=schema.getClass(architectSuperClass);
        superClasses.add(superClass);
      }
    }
    oClass.setSuperClasses(superClasses);
  }
}

Fixed version (ground truth):
private void addSuperClassesToOClass(OSchema schema,OClass oClass,List<String> superClassNames){
  if (superClassNames != null && !superClassNames.isEmpty()) {
    List<OClass> superClasses=Lists.newArrayList();
    for (    String architectSuperClass : superClassNames) {
      if (schema.existsClass(architectSuperClass)) {
        OClass superClass=schema.getClass(architectSuperClass);
        superClasses.add(superClass);
      }
    }
    oClass.setSuperClasses(superClasses);
  }
}
Program: 117303
Project: 117303
Buggy source:
private OClass addClassToSchema(OSchema schema,OArchitectOClass architectOClass){
  String name=architectOClass.getName();
  OClass oClass=schema.getOrCreateClass(name);
  removePropertiesFromOClass(oClass,architectOClass.getPropertiesForDelete());
  addSuperClassesToOClass(schema,oClass,architectOClass.getSuperClassesNames());
  addPropertiesToOClass(schema,oClass,architectOClass.getProperties());
  return oClass;
}

Fixed version (ground truth):
private OClass addClassToSchema(OSchema schema,OArchitectOClass architectOClass){
  String name=architectOClass.getName();
  OClass oClass=schema.getOrCreateClass(name);
  if (architectOClass.isExistsInDatabase())   removePropertiesFromOClass(oClass,architectOClass.getPropertiesForDelete());
  addSuperClassesToOClass(schema,oClass,architectOClass.getSuperClassesNames());
  addPropertiesToOClass(schema,oClass,architectOClass.getProperties());
  return oClass;
}
Program: 117304
Project: 117304
Buggy source:
private static OArchitectOClass convertOClassFromJson(JSONObject jsonObject){
  OArchitectOClass oClass=new OArchitectOClass(jsonObject.getString(NAME));
  if (!jsonObject.isNull(SUPER_CLASSES_NAMES)) {
    oClass.setSuperClassesNames(getSuperClasses(jsonObject.getJSONArray(SUPER_CLASSES_NAMES)));
  }
  if (!jsonObject.isNull(PROPERTIES)) {
    oClass.setProperties(getOPropertyListFromJson(jsonObject.getJSONArray(PROPERTIES)));
  }
  if (!jsonObject.isNull(PROPERTIES_FOR_DELETE)) {
    oClass.setPropertiesForDelete(getOPropertyListFromJson(jsonObject.getJSONArray(PROPERTIES_FOR_DELETE)));
  }
  return oClass;
}

Fixed version (ground truth):
private static OArchitectOClass convertOClassFromJson(JSONObject jsonObject){
  OArchitectOClass oClass=new OArchitectOClass(jsonObject.getString(NAME));
  if (!jsonObject.isNull(SUPER_CLASSES_NAMES)) {
    oClass.setSuperClassesNames(getSuperClasses(jsonObject.getJSONArray(SUPER_CLASSES_NAMES)));
  }
  if (!jsonObject.isNull(EXISTS_IN_DB)) {
    String exists=jsonObject.getString(EXISTS_IN_DB);
    oClass.setExistsInDatabase(exists.equals("String_Node_Str") || exists.equals("String_Node_Str"));
  }
  if (!jsonObject.isNull(PROPERTIES)) {
    oClass.setProperties(getOPropertyListFromJson(jsonObject.getJSONArray(PROPERTIES)));
  }
  if (!jsonObject.isNull(PROPERTIES_FOR_DELETE)) {
    oClass.setPropertiesForDelete(getOPropertyListFromJson(jsonObject.getJSONArray(PROPERTIES_FOR_DELETE)));
  }
  return oClass;
}