nus-yam/ex-repair huggingface dataset:
Program: 95337
Project: 95337
Buggy source:
/** 
 * Inits the PropertyDescriptors
 */
@SuppressWarnings("String_Node_Str") protected void initPropDescriptor(){
  clearPropertyDescriptors();
  JBPropertyDescriptor propDes=null;
  propDes=new JBPropertyDescriptor(new ComponentNameController(),P_ELEMENT_DISPLAY_COMPNAME);
  propDes.setCategory(P_ELEMENT_DISPLAY_COMP);
  propDes.setLabelProvider(new PropertyControllerLabelProvider());
  addPropertyDescriptor(propDes);
  propDes=new JBPropertyDescriptor(new ComponentClassController(),P_ELEMENT_DISPLAY_COMPCLASS);
  propDes.setCategory(P_ELEMENT_DISPLAY_COMP);
  propDes.setLabelProvider(new PropertyControllerLabelProvider());
  addPropertyDescriptor(propDes);
  propDes=new JBPropertyDescriptor(new ComponentSuppClassController(),P_ELEMENT_DISPLAY_COMPSUPPCLASS);
  propDes.setCategory(P_ELEMENT_DISPLAY_COMPADDINFO);
  propDes.setLabelProvider(new PropertyControllerLabelProvider());
  addPropertyDescriptor(propDes);
  initHierarchy();
  initContext();
  initComponentProperties();
}

Fixed version (ground truth):
/** 
 * Inits the PropertyDescriptors
 */
@SuppressWarnings("String_Node_Str") protected void initPropDescriptor(){
  clearPropertyDescriptors();
  PropertyDescriptor propDes=null;
  propDes=new PropertyDescriptor(new ComponentNameController(),P_ELEMENT_DISPLAY_COMPNAME);
  propDes.setCategory(P_ELEMENT_DISPLAY_COMP);
  propDes.setLabelProvider(new PropertyControllerLabelProvider());
  addPropertyDescriptor(propDes);
  propDes=new PropertyDescriptor(new ComponentClassController(),P_ELEMENT_DISPLAY_COMPCLASS);
  propDes.setCategory(P_ELEMENT_DISPLAY_COMP);
  propDes.setLabelProvider(new PropertyControllerLabelProvider());
  addPropertyDescriptor(propDes);
  propDes=new PropertyDescriptor(new ComponentSuppClassController(),P_ELEMENT_DISPLAY_COMPSUPPCLASS);
  propDes.setCategory(P_ELEMENT_DISPLAY_COMPADDINFO);
  propDes.setLabelProvider(new PropertyControllerLabelProvider());
  addPropertyDescriptor(propDes);
  initHierarchy();
  initContext();
  initComponentProperties();
}
Program: 95338
Project: 95338
Buggy source:
/** 
 * Initializes the context
 */
private void initContext(){
  JBPropertyDescriptor propDes=null;
  IComponentIdentifier compId=getNode().getTechnicalName();
  if (compId != null) {
    List context=compId.getNeighbours();
    for (int i=0; i < context.size(); i++) {
      if (i == 0) {
        propDes=new JBPropertyDescriptor(new ComponentContextController(i),P_ELEMENT_DISPLAY_CONTEXT);
      }
 else {
        propDes=new JBPropertyDescriptor(new ComponentContextController(i),StringConstants.EMPTY);
      }
      propDes.setCategory(P_ELEMENT_DISPLAY_COMPADDINFO);
      addPropertyDescriptor(propDes);
    }
  }
}

Fixed version (ground truth):
/** 
 * Initializes the context
 */
private void initContext(){
  PropertyDescriptor propDes=null;
  IComponentIdentifier compId=getNode().getTechnicalName();
  if (compId != null) {
    List context=compId.getNeighbours();
    for (int i=0; i < context.size(); i++) {
      if (i == 0) {
        propDes=new PropertyDescriptor(new ComponentContextController(i),P_ELEMENT_DISPLAY_CONTEXT);
      }
 else {
        propDes=new PropertyDescriptor(new ComponentContextController(i),StringConstants.EMPTY);
      }
      propDes.setCategory(P_ELEMENT_DISPLAY_COMPADDINFO);
      addPropertyDescriptor(propDes);
    }
  }
}
Program: 95339
Project: 95339
Buggy source:
/** 
 * Initializes the hierarchy
 */
private void initHierarchy(){
  JBPropertyDescriptor propDes=null;
  IComponentIdentifier compId=getNode().getTechnicalName();
  if (compId != null) {
    List hierarchy=compId.getHierarchyNames();
    for (int i=0; i < hierarchy.size(); i++) {
      if (i == 0) {
        propDes=new JBPropertyDescriptor(new ComponentHierarchyController(i),P_ELEMENT_DISPLAY_HIERARCHY);
      }
 else {
        propDes=new JBPropertyDescriptor(new ComponentHierarchyController(i),StringConstants.EMPTY);
      }
      propDes.setCategory(P_ELEMENT_DISPLAY_COMPADDINFO);
      addPropertyDescriptor(propDes);
    }
  }
}

Fixed version (ground truth):
/** 
 * Initializes the hierarchy
 */
private void initHierarchy(){
  PropertyDescriptor propDes=null;
  IComponentIdentifier compId=getNode().getTechnicalName();
  if (compId != null) {
    List<?> hierarchy=compId.getHierarchyNames();
    for (int i=0; i < hierarchy.size(); i++) {
      if (i == 0) {
        propDes=new PropertyDescriptor(new ComponentHierarchyController(i),P_ELEMENT_DISPLAY_HIERARCHY);
      }
 else {
        propDes=new PropertyDescriptor(new ComponentHierarchyController(i),StringConstants.EMPTY);
      }
      propDes.setCategory(P_ELEMENT_DISPLAY_COMPADDINFO);
      addPropertyDescriptor(propDes);
    }
  }
}
Program: 95340
Project: 95340
Buggy source:
/** 
 * Refreshes the currently open Project.
 * @return the result of the operation.
 */
public IStatus refreshProject(){
  Plugin.startLongRunning(Messages.RefreshTSBrowserActionProgressMessage);
  try {
    PlatformUI.getWorkbench().getProgressService().run(true,false,new RefreshProjectOperation());
  }
 catch (  InvocationTargetException e) {
    return new Status(IStatus.ERROR,Plugin.PLUGIN_ID,e.getLocalizedMessage());
  }
catch (  InterruptedException e) {
    return Status.CANCEL_STATUS;
  }
 finally {
    Plugin.stopLongRunning();
    DataEventDispatcher.getInstance().fireProjectStateChanged(ProjectState.opened);
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
/** 
 * Refreshes the currently open Project.
 * @return the result of the operation.
 */
public IStatus refreshProject(){
  Plugin.startLongRunning(Messages.RefreshTSBrowserActionProgressMessage);
  ProblemPropagator.INSTANCE.cancelPropagationJobs();
  try {
    PlatformUI.getWorkbench().getProgressService().run(true,false,new RefreshProjectOperation());
  }
 catch (  InvocationTargetException e) {
    return new Status(IStatus.ERROR,Plugin.PLUGIN_ID,e.getLocalizedMessage());
  }
catch (  InterruptedException e) {
    return Status.CANCEL_STATUS;
  }
 finally {
    Plugin.stopLongRunning();
    DataEventDispatcher.getInstance().fireProjectStateChanged(ProjectState.opened);
  }
  return Status.OK_STATUS;
}
Program: 95341
Project: 95341
Buggy source:
@Override protected String getMainClassFromManifest(Map parameters){
  String jarFile=createAbsoluteJarPath(parameters);
  String attr=getAttributeFromManifest("String_Node_Str",jarFile);
  return attr.replace("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Override protected String getMainClassFromManifest(Map parameters){
  String jarFile=createAbsoluteJarPath(parameters);
  String attr=getAttributeFromManifest("String_Node_Str",jarFile);
  if (attr != null) {
    return attr.replace("String_Node_Str","String_Node_Str");
  }
  return null;
}
Program: 95342
Project: 95342
Buggy source:
/** 
 * {@inheritDoc}
 */
public void handleDataChanged(IPersistentObject po,DataState dataState){
  if (po instanceof INodePO) {
    TreeViewer tv=getTreeViewer();
switch (dataState) {
case Added:
      INodePO addedNode=(INodePO)po;
    INodePO editorNode=(INodePO)getEditorHelper().getEditSupport().getWorkVersion();
  if (editorNode.indexOf(addedNode) > -1) {
    getTreeViewer().refresh();
    getTreeViewer().expandAll();
    UINodeBP.setFocusAndSelection(new StructuredSelection(addedNode),tv);
  }
break;
case Deleted:
if (!(po instanceof IProjectPO)) {
getTreeViewer().refresh();
setFocus();
}
break;
case Renamed:
createPartName();
break;
case StructureModified:
if (!handleStructureModified(po)) {
return;
}
break;
case ReuseChanged:
break;
default :
Assert.notReached();
}
getEditorHelper().handleDataChanged(po,dataState);
}
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void handleDataChanged(IPersistentObject po,DataState dataState){
  if (po instanceof INodePO) {
    TreeViewer tv=getTreeViewer();
switch (dataState) {
case Added:
      INodePO addedNode=(INodePO)po;
    INodePO editorNode=(INodePO)getEditorHelper().getEditSupport().getWorkVersion();
  if (editorNode.indexOf(addedNode) > -1) {
    getTreeViewer().refresh();
    getTreeViewer().expandAll();
    UINodeBP.setFocusAndSelection(new StructuredSelection(addedNode),tv);
  }
break;
case Deleted:
if (!(po instanceof IProjectPO)) {
getTreeViewer().refresh();
setFocus();
}
break;
case Renamed:
createPartName();
break;
case StructureModified:
if (!handleStructureModified(po)) {
return;
}
break;
case ReuseChanged:
break;
case Saved:
break;
default :
Assert.notReached();
}
getEditorHelper().handleDataChanged(po,dataState);
}
}
Program: 95343
Project: 95343
Buggy source:
/** 
 * @param root node, where starts the validation
 * @param ts changed test suite
 * @return if editor contains an reusing testcase for given specTestCase
 */
@SuppressWarnings("String_Node_Str") private static boolean containsWorkVersionReuses(INodePO root,ITestSuitePO ts){
  final Iterator it=root.getNodeListIterator();
  final List<INodePO> childList=IteratorUtils.toList(it);
  for (  INodePO child : childList) {
    if (child instanceof IRefTestSuitePO) {
      final IRefTestSuitePO refTs=(IRefTestSuitePO)child;
      if (ts.getGuid().equals(refTs.getTestSuiteGuid())) {
        return true;
      }
      if (containsWorkVersionReuses(refTs,ts)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @param root node, where starts the validation
 * @param ts changed test suite
 * @return if editor contains an reusing testcase for given specTestCase
 */
@SuppressWarnings("String_Node_Str") private static boolean containsWorkVersionReuses(INodePO root,ITestSuitePO ts){
  final Iterator<INodePO> it=root.getNodeListIterator();
  final List<INodePO> childList=IteratorUtils.toList(it);
  for (  INodePO child : childList) {
    if (child instanceof IRefTestSuitePO) {
      final IRefTestSuitePO refTs=(IRefTestSuitePO)child;
      if (ts.getGuid().equals(refTs.getTestSuiteGuid())) {
        return true;
      }
      if (containsWorkVersionReuses(refTs,ts)) {
        return true;
      }
    }
  }
  return false;
}
Program: 95344
Project: 95344
Buggy source:
/** 
 * {@inheritDoc}
 */
public void run(IProgressMonitor monitor){
  monitor.beginTask(Messages.RefreshProjectOperationRefreshing,IProgressMonitor.UNKNOWN);
  ProgressMonitorTracker instance=ProgressMonitorTracker.SINGLETON;
  instance.setProgressMonitor(monitor);
  try {
    IProjectPO referencedProject=ProjectPM.loadReusedProjectInMasterSession(m_selectedProject);
    GeneralStorage.getInstance().getMasterSession().refresh(referencedProject.getSpecObjCont());
    DataEventDispatcher.getInstance().fireDataChangedListener(new DataChangedEvent(referencedProject,DataState.StructureModified,UpdateState.all));
  }
 catch (  ProjectDeletedException e) {
    PMExceptionHandler.handleProjectDeletedException();
  }
catch (  JBException e) {
    ErrorHandlingUtil.createMessageDialog(e,null,null);
  }
 finally {
    instance.setProgressMonitor(null);
    monitor.done();
  }
}

Fixed version (ground truth):
public void run(){
  DataEventDispatcher.getInstance().fireDataChangedListener(new DataChangedEvent(referencedProject,DataState.StructureModified,UpdateState.all));
}
Program: 95345
Project: 95345
Buggy source:
/** 
 * @param paramDesc the {@link IParamDescriptionPO} should be of type {@link ITcParamDescriptionPO}
 * @return the values from the {@link IParamValueSetPO}
 */
private static String[] getValuesFromValueSet(IParamDescriptionPO paramDesc){
  String[] values=new String[0];
  if (paramDesc instanceof ITcParamDescriptionPO) {
    ITcParamDescriptionPO desc=(ITcParamDescriptionPO)paramDesc;
    List<String> collect=desc.getValueSet().getValues().stream().map(IValueCommentPO::getValue).collect(Collectors.toList());
    values=collect.toArray(new String[collect.size()]);
  }
  return values;
}

Fixed version (ground truth):
/** 
 * @param paramDesc the {@link IParamDescriptionPO} should be of type {@link ITcParamDescriptionPO}
 * @return the values from the {@link IParamValueSetPO}
 */
private static Map<String,String> getValuesFromValueSet(IParamDescriptionPO paramDesc){
  if (paramDesc instanceof ITcParamDescriptionPO) {
    ITcParamDescriptionPO desc=(ITcParamDescriptionPO)paramDesc;
    IParamValueSetPO valueSet=desc.getValueSet();
    List<IValueCommentPO> values=valueSet.getValues();
    if (valueSet != null && values != null && values.size() > 0) {
      return values.stream().collect(Collectors.toMap(IValueCommentPO::getValue,IValueCommentPO::getComment));
    }
  }
  return new HashMap<>();
}
Program: 95347
Project: 95347
Buggy source:
/** 
 * @param paramBP the paramBP to set
 */
private void setParamBP(AbstractParamInterfaceBP paramBP){
  m_paramBP=paramBP;
}

Fixed version (ground truth):
/** 
 * @param paramBP the paramBP to set
 */
private void setParamBP(AbstractParamInterfaceBP<?> paramBP){
  m_paramBP=paramBP;
}
Program: 95348
Project: 95348
Buggy source:
/** 
 * @param selection the current selection
 * @return the valid param interface po or <code>null</code> if currentselection does not contain a IParameterInterfacePO
 */
private IParameterInterfacePO getSelectedParamInterfaceObj(IStructuredSelection selection){
  IParameterInterfacePO paramInterfacePO=null;
  Object firstSel=selection.getFirstElement();
  if (firstSel instanceof SearchResultElement) {
    firstSel=((SearchResultElement)firstSel).getObject();
  }
  if (firstSel instanceof IParameterInterfacePO) {
    paramInterfacePO=(IParameterInterfacePO)firstSel;
  }
  return paramInterfacePO;
}

Fixed version (ground truth):
/** 
 * @param selection the current selection
 * @return the valid param interface po or <code>null</code> if currentselection does not contain a IParameterInterfacePO
 */
private IParameterInterfacePO getSelectedParamInterfaceObj(IStructuredSelection selection){
  IParameterInterfacePO paramInterfacePO=null;
  Object firstSel=selection.getFirstElement();
  if (firstSel instanceof SearchResultElement) {
    firstSel=((SearchResultElement<?>)firstSel).getObject();
  }
  if (firstSel instanceof IParameterInterfacePO) {
    paramInterfacePO=(IParameterInterfacePO)firstSel;
  }
  return paramInterfacePO;
}
Program: 95349
Project: 95349
Buggy source:
/** 
 * The constructor
 * @param bp the business process to use for this page
 */
public AbstractDataSetPage(AbstractParamInterfaceBP bp){
  setParamBP(bp);
}

Fixed version (ground truth):
/** 
 * The constructor
 * @param bp the business process to use for this page
 */
public AbstractDataSetPage(AbstractParamInterfaceBP<?> bp){
  setParamBP(bp);
}
Program: 95350
Project: 95350
Buggy source:
/** 
 * @return the paramBP
 */
private AbstractParamInterfaceBP getParamBP(){
  return m_paramBP;
}

Fixed version (ground truth):
/** 
 * @return the paramBP
 */
private AbstractParamInterfaceBP<?> getParamBP(){
  return m_paramBP;
}
Program: 95352
Project: 95352
Buggy source:
@SuppressWarnings("String_Node_Str") public void proposalPopupClosed(ContentProposalAdapter adapter){
  setFocus();
  m_popupOpen=false;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void proposalPopupClosed(ContentProposalAdapter adapter){
  m_popupOpen=false;
}
Program: 95353
Project: 95353
Buggy source:
/** 
 * Activates content assist (if it is supported).
 * @param contentProposalProvider The proposal provider to use for content assist.
 * @param proposalAcceptanceStyle The integer style that indicates how an accepted proposal  affects the control's content. See  {@link ContentProposalAdapter#setProposalAcceptanceStyle(int)}.
 */
private void enableContentProposal(IContentProposalProvider contentProposalProvider,int proposalAcceptanceStyle){
  if (contentProposalProvider != null) {
    ContentProposalAdapter contentProposalAdapter=new ContentProposalAdapter(text,new TextContentAdapter(),contentProposalProvider,ContentAssistUtil.getTriggerKeyStroke(),ContentAssistUtil.getTriggerChars());
    contentProposalAdapter.setFilterStyle(ContentProposalAdapter.FILTER_NONE);
    contentProposalAdapter.setProposalAcceptanceStyle(proposalAcceptanceStyle);
    contentProposalAdapter.addContentProposalListener(new IContentProposalListener2(){
      @SuppressWarnings("String_Node_Str") public void proposalPopupClosed(      ContentProposalAdapter adapter){
        setFocus();
        m_popupOpen=false;
      }
      @SuppressWarnings("String_Node_Str") public void proposalPopupOpened(      ContentProposalAdapter adapter){
        m_popupOpen=true;
      }
    }
);
  }
}

Fixed version (ground truth):
/** 
 * Activates content assist (if it is supported).
 * @param contentProposalProvider The proposal provider to use for content assist.
 * @param proposalAcceptanceStyle The integer style that indicates how an accepted proposal  affects the control's content. See  {@link ContentProposalAdapter#setProposalAcceptanceStyle(int)}.
 */
private void enableContentProposal(IContentProposalProvider contentProposalProvider,int proposalAcceptanceStyle){
  if (contentProposalProvider != null) {
    ContentProposalAdapter contentProposalAdapter=new ContentProposalAdapter(text,new TextContentAdapter(),contentProposalProvider,ContentAssistUtil.getTriggerKeyStroke(),ContentAssistUtil.getTriggerChars());
    contentProposalAdapter.setFilterStyle(ContentProposalAdapter.FILTER_NONE);
    contentProposalAdapter.setProposalAcceptanceStyle(proposalAcceptanceStyle);
    contentProposalAdapter.addContentProposalListener(new IContentProposalListener2(){
      @SuppressWarnings("String_Node_Str") public void proposalPopupClosed(      ContentProposalAdapter adapter){
        m_popupOpen=false;
      }
      @SuppressWarnings("String_Node_Str") public void proposalPopupOpened(      ContentProposalAdapter adapter){
        m_popupOpen=true;
      }
    }
);
  }
}
Program: 95354
Project: 95354
Buggy source:
/** 
 * Handles the CR keys
 */
private void handleCR(){
  if (m_editor.getEditor() instanceof CheckedParamTextContentAssisted) {
    CheckedParamTextContentAssisted ed=(CheckedParamTextContentAssisted)m_editor.getEditor();
    if (ed.isAccepted()) {
      ed.setAccepted(false);
      return;
    }
  }
  final Control editorControl=m_editor.getEditor();
  if (!editorControl.isDisposed()) {
    writeData();
  }
  if (!editorControl.isDisposed()) {
    TableItem rowItem=getRow();
    final int col=getColumn();
    rowItem.setText(col,TextControlBP.getText(editorControl));
    editorControl.dispose();
    final int row=getTable().indexOf(getRow());
    if (getTable().getColumnCount() > (col + 1)) {
      setSelection(row,col + 1);
      getTable().setSelection(row);
      setFocus();
    }
 else     if (getTable().getItemCount() > (row + 1)) {
      setSelection(row + 1,1);
      getTable().setSelection(row + 1);
    }
 else {
      getAddButton().setFocus();
    }
  }
}

Fixed version (ground truth):
/** 
 * Handles the CR keys
 */
private void handleCR(){
  if (m_editor.getEditor() instanceof CheckedParamTextContentAssisted) {
    CheckedParamTextContentAssisted ed=(CheckedParamTextContentAssisted)m_editor.getEditor();
  }
  final Control editorControl=m_editor.getEditor();
  if (!editorControl.isDisposed()) {
    writeData();
  }
  if (!editorControl.isDisposed()) {
    TableItem rowItem=getRow();
    final int col=getColumn();
    rowItem.setText(col,TextControlBP.getText(editorControl));
    editorControl.dispose();
    final int row=getTable().indexOf(getRow());
    if (getTable().getColumnCount() > (col + 1)) {
      setSelection(row,col + 1);
      getTable().setSelection(row);
      setFocus();
    }
 else     if (getTable().getItemCount() > (row + 1)) {
      setSelection(row + 1,1);
      getTable().setSelection(row + 1);
    }
 else {
      getAddButton().setFocus();
    }
  }
}
Program: 95355
Project: 95355
Buggy source:
/** 
 * @param parent parent
 * @param style style
 * @param node current node, associated with parameter for this value
 * @param desc parameter description associated with current edited value
 * @param dataValidator validator for data validation
 * @param proposalProvider The content proposal provider for this textfield, or <code>null</code> if no content assist is available.
 */
@SuppressWarnings("String_Node_Str") public CheckedParamTextContentAssisted(Composite parent,int style,IParameterInterfacePO node,IParamDescriptionPO desc,IParamValueValidator dataValidator,IContentProposalProvider proposalProvider){
  super(parent,style,node,desc,dataValidator);
  m_popupListener=new IContentProposalListener2Implementation();
  ContentProposalAdapter cpa=new ContentProposalAdapter(this,new TextContentAdapter(),proposalProvider,ContentAssistUtil.getTriggerKeyStroke(),ContentAssistUtil.getTriggerChars());
  cpa.setFilterStyle(ContentProposalAdapter.FILTER_NONE);
  cpa.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_INSERT);
  cpa.addContentProposalListener(m_popupListener);
  cpa.addContentProposalListener(new IContentProposalListener(){
    @Override public void proposalAccepted(    IContentProposal proposal){
      m_accepted=true;
    }
  }
);
}

Fixed version (ground truth):
/** 
 * @param parent parent
 * @param style style
 * @param node current node, associated with parameter for this value
 * @param desc parameter description associated with current edited value
 * @param dataValidator validator for data validation
 * @param proposalProvider The content proposal provider for this textfield, or <code>null</code> if no content assist is available.
 */
@SuppressWarnings("String_Node_Str") public CheckedParamTextContentAssisted(Composite parent,int style,IParameterInterfacePO node,IParamDescriptionPO desc,IParamValueValidator dataValidator,IContentProposalProvider proposalProvider){
  super(parent,style,node,desc,dataValidator);
  m_popupListener=new IContentProposalListener2Implementation();
  ContentProposalAdapter cpa=new ContentProposalAdapter(this,new TextContentAdapter(),proposalProvider,ContentAssistUtil.getTriggerKeyStroke(),ContentAssistUtil.getTriggerChars());
  cpa.setFilterStyle(ContentProposalAdapter.FILTER_NONE);
  cpa.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_INSERT);
  cpa.addContentProposalListener(m_popupListener);
}
Program: 95356
Project: 95356
Buggy source:
@Override public Rectangle getHeaderBounds(final int column){
  Rectangle result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Rectangle>(){
    @Override public Rectangle call() throws Exception {
      TableView table=getRealComponent();
      TableColumn<?,?> col;
      if (m_columns.size() > 0) {
        col=m_columns.get(column);
      }
 else {
        col=getRealComponent().getVisibleLeafColumn(column);
      }
      table.scrollToColumn(col);
      return TableUtils.getNodeBoundsofHeader(table,column,true);
    }
  }
);
  return result;
}

Fixed version (ground truth):
@Override public Rectangle getHeaderBounds(final int column){
  Rectangle result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Rectangle>(){
    @Override public Rectangle call() throws Exception {
      TableView table=getRealComponent();
      TableColumn<?,?> col;
      if (m_columns.size() > 0) {
        col=m_columns.get(column);
      }
 else {
        col=getRealComponent().getVisibleLeafColumn(column);
      }
      table.scrollToColumn(col);
      return TableUtils.getNodeBoundsofHeader(table,col,true);
    }
  }
);
  return result;
}
Program: 95357
Project: 95357
Buggy source:
@Override public Rectangle getHeaderBounds(final int column){
  Rectangle result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Rectangle>(){
    @Override public Rectangle call() throws Exception {
      TreeTableView<?> treeTable=getTree();
      TreeTableColumn col;
      if (m_columns.size() > 0) {
        col=m_columns.get(column);
      }
 else {
        col=treeTable.getVisibleLeafColumn(column);
      }
      treeTable.scrollToColumn(col);
      treeTable.layout();
      Rectangle b=TableUtils.getNodeBoundsofHeader(treeTable,column,false);
      Rectangle tableB=NodeBounds.getAbsoluteBounds(treeTable);
      return new Rectangle(Math.abs(tableB.x - b.x),Math.abs(tableB.y - b.y),Rounding.round(b.getWidth()),Rounding.round(b.getHeight()));
    }
  }
);
  return result;
}

Fixed version (ground truth):
@Override public Rectangle getHeaderBounds(final int column){
  Rectangle result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Rectangle>(){
    @Override public Rectangle call() throws Exception {
      TreeTableView<?> treeTable=getTree();
      TreeTableColumn col;
      if (m_columns.size() > 0) {
        col=m_columns.get(column);
      }
 else {
        col=treeTable.getVisibleLeafColumn(column);
      }
      treeTable.scrollToColumn(col);
      treeTable.layout();
      Rectangle b=TableUtils.getNodeBoundsofHeader(treeTable,col,false);
      Rectangle tableB=NodeBounds.getAbsoluteBounds(treeTable);
      return new Rectangle(Math.abs(tableB.x - b.x),Math.abs(tableB.y - b.y),Rounding.round(b.getWidth()),Rounding.round(b.getHeight()));
    }
  }
);
  return result;
}
Program: 95358
Project: 95358
Buggy source:
/** 
 * @param combobox the combobox
 * @return a {@link ListView} which is the list of the {@link ComboBox}
 */
public static ListView<?> getPopUpContent(ComboBox<?> combobox){
  Class<?> clazz=null;
  try {
    clazz=Class.forName(JAVA8_COMBO_LISTVIEWSKIN);
  }
 catch (  ClassNotFoundException e) {
    try {
      clazz=Class.forName(JAVA9_COMBO_LISTVIEWSKIN);
    }
 catch (    ClassNotFoundException e2) {
      throw new RuntimeException(e2);
    }
  }
  try {
    Method method=clazz.getMethod(GET_POPUP_CONTENT);
    Object o=method.invoke(combobox);
    if (o instanceof ListView<?>) {
      return (ListView<?>)o;
    }
  }
 catch (  NoSuchMethodException|SecurityException|IllegalAccessException|IllegalArgumentException|InvocationTargetException e) {
    throw new RuntimeException(e);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param combobox the combobox
 * @return a {@link ListView} which is the list of the {@link ComboBox}
 */
public static ListView<?> getPopUpContent(ComboBox<?> combobox){
  Class<?> clazz=null;
  Object skin=combobox.getSkin();
  try {
    clazz=Class.forName(JAVA8_COMBO_LISTVIEWSKIN);
  }
 catch (  ClassNotFoundException e) {
    try {
      clazz=Class.forName(JAVA9_COMBO_LISTVIEWSKIN);
    }
 catch (    ClassNotFoundException e2) {
      throw new RuntimeException(e2);
    }
  }
  try {
    Method method=clazz.getMethod(GET_POPUP_CONTENT);
    Object o=method.invoke(skin);
    if (o instanceof ListView<?>) {
      return (ListView<?>)o;
    }
  }
 catch (  NoSuchMethodException|SecurityException|IllegalAccessException|IllegalArgumentException|InvocationTargetException e) {
    throw new RuntimeException(e);
  }
  return null;
}
Program: 95359
Project: 95359
Buggy source:
/** 
 * @param table the {@link TableView}
 * @param column the column number
 * @param relative should the calculation be relative or absolute
 * @return the {@link Rectangle} or null if it is not found
 */
public static Rectangle getNodeBoundsofHeader(Parent table,int column,boolean relative){
  Class<?> clazz=null;
  try {
    clazz=Class.forName(JAVA8_TABLE_HEADER_ROW);
  }
 catch (  ClassNotFoundException e) {
    try {
      clazz=Class.forName(JAVA9_TABLE_HEADER_ROW);
    }
 catch (    ClassNotFoundException e2) {
      String message="String_Node_Str" + JAVA8_TABLE_HEADER_ROW + "String_Node_Str"+ JAVA9_TABLE_HEADER_ROW+ "String_Node_Str";
      log.error(message,e2);
      throw new RuntimeException(message,e2);
    }
  }
  try {
    List<?> headerRow=NodeTraverseHelper.getInstancesOf(table,clazz);
    Object colH=null;
    for (    Object tableHeaderRow : headerRow) {
      Method method=clazz.getMethod(GET_COLUMN_HEADER_FOR,Integer.class);
      colH=method.invoke(tableHeaderRow,column);
      if (colH != null) {
        if (relative) {
          return NodeBounds.getRelativeBounds((Node)colH,(Node)tableHeaderRow);
        }
        return NodeBounds.getAbsoluteBounds((Node)colH);
      }
    }
  }
 catch (  IllegalAccessException|IllegalArgumentException|InvocationTargetException|NoSuchMethodException|SecurityException e) {
    log.error("String_Node_Str",e);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param table the {@link TableView}
 * @param column the column number
 * @param relative should the calculation be relative or absolute
 * @return the {@link Rectangle} or null if it is not found
 */
public static Rectangle getNodeBoundsofHeader(Parent table,TableColumnBase<?,?> column,boolean relative){
  Class<?> clazz=null;
  try {
    clazz=Class.forName(JAVA8_TABLE_HEADER_ROW);
  }
 catch (  ClassNotFoundException e) {
    try {
      clazz=Class.forName(JAVA9_TABLE_HEADER_ROW);
    }
 catch (    ClassNotFoundException e2) {
      String message="String_Node_Str" + JAVA8_TABLE_HEADER_ROW + "String_Node_Str"+ JAVA9_TABLE_HEADER_ROW+ "String_Node_Str";
      log.error(message,e2);
      throw new RuntimeException(message,e2);
    }
  }
  try {
    List<?> headerRow=NodeTraverseHelper.getInstancesOf(table,clazz);
    Object colH=null;
    for (    Object tableHeaderRow : headerRow) {
      Method method=clazz.getMethod(GET_COLUMN_HEADER_FOR,TableColumnBase.class);
      colH=method.invoke(tableHeaderRow,column);
      if (colH != null) {
        if (relative) {
          return NodeBounds.getRelativeBounds((Node)colH,(Node)tableHeaderRow);
        }
        return NodeBounds.getAbsoluteBounds((Node)colH);
      }
    }
  }
 catch (  IllegalAccessException|IllegalArgumentException|InvocationTargetException|NoSuchMethodException|SecurityException e) {
    log.error("String_Node_Str",e);
  }
  return null;
}
Program: 95360
Project: 95360
Buggy source:
/** 
 * {@inheritDoc}
 */
public void handleDataChanged(IPersistentObject po,DataState dataState,UpdateState updState){
  if (po instanceof INodePO) {
    INodePO changedNode=(INodePO)po;
    INodePO editorNode=(INodePO)getEditorHelper().getEditSupport().getWorkVersion();
    boolean isVisibleInEditor=editorNode.indexOf(changedNode) > -1;
    isVisibleInEditor|=contains(editorNode,changedNode);
    if (editorNode instanceof ISpecTestCasePO) {
      isVisibleInEditor|=((ISpecTestCasePO)editorNode).getAllEventEventExecTC().contains(po);
    }
switch (dataState) {
case Added:
      if (isVisibleInEditor) {
        handleNodeAdded(changedNode);
      }
    break;
case Deleted:
  if (!(po instanceof IProjectPO)) {
    isVisibleInEditor=true;
    refresh();
  }
break;
case Renamed:
createPartName();
break;
case StructureModified:
if (isVisibleInEditor) {
getEditorHelper().setDirty(true);
}
if (!handleStructureModified(po)) {
return;
}
break;
default :
}
if (isVisibleInEditor) {
runLocalChecks();
}
getEditorHelper().handleDataChanged(po,dataState);
}
 else if (po instanceof IComponentNamePO && updState != UpdateState.onlyInEditor) {
handleCompNameChanged((IComponentNamePO)po,dataState);
}
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void handleDataChanged(IPersistentObject po,DataState dataState,UpdateState updState){
  if (po instanceof INodePO) {
    INodePO changedNode=(INodePO)po;
    INodePO editorNode=(INodePO)getEditorHelper().getEditSupport().getWorkVersion();
    boolean isVisibleInEditor=editorNode.indexOf(changedNode) > -1;
    isVisibleInEditor|=contains(editorNode,changedNode);
    if (editorNode instanceof ISpecTestCasePO) {
      isVisibleInEditor|=((ISpecTestCasePO)editorNode).getAllEventEventExecTC().contains(po);
    }
switch (dataState) {
case Added:
      if (isVisibleInEditor) {
        handleNodeAdded(changedNode);
      }
    break;
case Deleted:
  if (!(po instanceof IProjectPO)) {
    isVisibleInEditor=true;
    refresh();
  }
break;
case Renamed:
createPartName();
break;
case StructureModified:
if (isVisibleInEditor) {
getEditorHelper().setDirty(true);
}
if (!handleStructureModified(po)) {
return;
}
break;
default :
}
if (isVisibleInEditor) {
runLocalChecks();
}
getEditorHelper().handleDataChanged(po,dataState);
}
 else if (po instanceof IComponentNamePO && updState != UpdateState.onlyInEditor) {
handleCompNameChanged((IComponentNamePO)po,dataState);
}
 else if (po instanceof IObjectMappingPO && updState != UpdateState.onlyInEditor) {
IPersistentObject workversion=getEditorHelper().getEditSupport().getWorkVersion();
if (workversion instanceof ITestSuitePO) {
EntityManager session=getEditorHelper().getEditSupport().getSession();
session.refresh(session.find(po.getClass(),po.getId()));
}
runLocalChecks();
}
}
Program: 95361
Project: 95361
Buggy source:
/** 
 * run local completeness checks such as test data completeness
 */
public void runLocalChecks(){
  INodePO node=(INodePO)getEditorHelper().getEditSupport().getWorkVersion();
  CompletenessGuard.checkAll(node,new NullProgressMonitor());
}

Fixed version (ground truth):
/** 
 * run local completeness checks such as test data completeness
 */
public void runLocalChecks(){
  INodePO node=(INodePO)getEditorHelper().getEditSupport().getWorkVersion();
  node.clearProblems();
  for (Iterator<INodePO> childIterator=node.getAllNodeIter(); childIterator.hasNext(); ) {
    INodePO next=childIterator.next();
    next.clearProblems();
  }
  CompletenessGuard.checkAll(node,new NullProgressMonitor());
  m_decoraterUpdateJob.setPriority(Job.DECORATE);
  m_decoraterUpdateJob.schedule(300);
}
Program: 95362
Project: 95362
Buggy source:
/** 
 * assumes the typed data
 */
private void writeData(){
  if (m_currentPart instanceof AbstractJBEditor) {
    m_tcEditor=(AbstractJBEditor)m_currentPart;
  }
  if (m_tcEditor == null) {
    return;
  }
  int column=getColumn();
  final Control editor=m_editor.getEditor();
  if (!TextControlBP.isTextValid(editor)) {
    TextControlBP.setText(m_oldValue,editor);
  }
  final String property=getTableViewer().getColumnProperties()[column].toString();
  String value=TextControlBP.getText(editor);
  if (m_oldValue != null && m_oldValue.equals(value)) {
    return;
  }
  if (value != null && value.equals(StringConstants.EMPTY)) {
    value=null;
  }
  if (LOG.isDebugEnabled()) {
    logDataChange(property,value,m_oldValue,getParamInterfaceObj().getSpecificationUser());
  }
  if (value.length() > IPersistentObject.MAX_STR_LGT_CHAR) {
    value=value.substring(0,IPersistentObject.MAX_STR_LGT_CHAR);
    if (value.getBytes(StandardCharsets.UTF_8).length > IPersistentObject.MAX_STRING_LENGTH) {
      value=m_oldValue;
    }
    TextControlBP.setText(value,editor);
    ErrorHandlingUtil.createMessageDialog(MessageIDs.W_MAX_CHAR,new Object[]{IPersistentObject.MAX_STR_LGT_CHAR},null);
    return;
  }
  writeDataSetData(property,value,m_tcEditor);
}

Fixed version (ground truth):
/** 
 * assumes the typed data
 */
private void writeData(){
  if (m_currentPart instanceof AbstractJBEditor) {
    m_tcEditor=(AbstractJBEditor)m_currentPart;
  }
  if (m_tcEditor == null) {
    return;
  }
  int column=getColumn();
  final Control editor=m_editor.getEditor();
  if (!TextControlBP.isTextValid(editor)) {
    TextControlBP.setText(m_oldValue,editor);
  }
  final String property=getTableViewer().getColumnProperties()[column].toString();
  String value=TextControlBP.getText(editor);
  if (m_oldValue != null && m_oldValue.equals(value)) {
    return;
  }
  if (value != null && value.equals(StringConstants.EMPTY)) {
    value=null;
  }
  if (LOG.isDebugEnabled()) {
    logDataChange(property,value,m_oldValue,getParamInterfaceObj().getSpecificationUser());
  }
  if (value != null && value.length() > IPersistentObject.MAX_STR_LGT_CHAR) {
    value=value.substring(0,IPersistentObject.MAX_STR_LGT_CHAR);
    if (value.getBytes(StandardCharsets.UTF_8).length > IPersistentObject.MAX_STRING_LENGTH) {
      value=m_oldValue;
    }
    TextControlBP.setText(value,editor);
    ErrorHandlingUtil.createMessageDialog(MessageIDs.W_MAX_CHAR,new Object[]{IPersistentObject.MAX_STR_LGT_CHAR},null);
    return;
  }
  writeDataSetData(property,value,m_tcEditor);
}
Program: 95363
Project: 95363
Buggy source:
/** 
 * {@inheritDoc} 
 */
public Object getParent(Object element){
  if (element instanceof INodePO) {
    INodePO node=((INodePO)element);
    INodePO parent=node.getParentNode();
    Long nodeProjId=node.getParentProjectId();
    if (node.isExecObjCont() || node.isSpecObjCont()) {
      return GeneralStorage.getInstance().getProject();
    }
    IProjectPO activeProject=GeneralStorage.getInstance().getProject();
    if (activeProject != null && nodeProjId != null) {
      if (!nodeProjId.equals(activeProject.getId()) && parent.isSpecObjCont()) {
        try {
          String nodeProjGUID=ProjectPM.getGuidOfProjectId(nodeProjId);
          for (          IReusedProjectPO reusedProject : activeProject.getUsedProjects()) {
            if (nodeProjGUID.equals(reusedProject.getProjectGuid())) {
              return reusedProject;
            }
          }
        }
 catch (        JBException e) {
          LOG.warn("String_Node_Str",e);
        }
      }
    }
    return parent;
  }
  if (element instanceof IReusedProjectPO) {
    return GeneralStorage.getInstance().getProject();
  }
  if (element instanceof ITestDataCategoryPO) {
    return ((ITestDataCategoryPO)element).getParent();
  }
  if (element instanceof ITestDataCubePO) {
    return ((ITestDataCubePO)element).getParent();
  }
  if (element instanceof SearchResultElement) {
    return null;
  }
  Assert.notReached(Messages.WrongTypeOfElement + StringConstants.EXCLAMATION_MARK);
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public Object getParent(Object element){
  if (element instanceof INodePO) {
    INodePO node=((INodePO)element);
    INodePO parent=node.getParentNode();
    Long nodeProjId=node.getParentProjectId();
    if (node.isExecObjCont() || node.isSpecObjCont()) {
      return GeneralStorage.getInstance().getProject();
    }
    IProjectPO activeProject=GeneralStorage.getInstance().getProject();
    if (activeProject != null && nodeProjId != null && parent != null) {
      if (!nodeProjId.equals(activeProject.getId()) && parent.isSpecObjCont()) {
        try {
          String nodeProjGUID=ProjectPM.getGuidOfProjectId(nodeProjId);
          for (          IReusedProjectPO reusedProject : activeProject.getUsedProjects()) {
            if (nodeProjGUID.equals(reusedProject.getProjectGuid())) {
              return reusedProject;
            }
          }
        }
 catch (        JBException e) {
          LOG.warn("String_Node_Str",e);
        }
      }
    }
    return parent;
  }
  if (element instanceof IReusedProjectPO) {
    return GeneralStorage.getInstance().getProject();
  }
  if (element instanceof ITestDataCategoryPO) {
    return ((ITestDataCategoryPO)element).getParent();
  }
  if (element instanceof ITestDataCubePO) {
    return ((ITestDataCubePO)element).getParent();
  }
  if (element instanceof SearchResultElement) {
    return null;
  }
  Assert.notReached(Messages.WrongTypeOfElement + StringConstants.EXCLAMATION_MARK);
  return null;
}
Program: 95364
Project: 95364
Buggy source:
@Override public Integer call() throws Exception {
  return getRealComponent().getItems().size();
}

Fixed version (ground truth):
@Override public IMenuItemComponent[] call() throws Exception {
  List<MenuItem> items=getRealComponent().getItems();
  if (items.size() > 0) {
    List<IMenuItemComponent> adapters=new ArrayList<>();
    for (int i=0; i < items.size(); i++) {
      MenuItem item=items.get(i);
      if (item.isVisible()) {
        adapters.add(new MenuItemAdapter<MenuItem>(item));
      }
    }
    return adapters.toArray(new IMenuItemComponent[adapters.size()]);
  }
  return null;
}
Program: 95365
Project: 95365
Buggy source:
@Override public IMenuItemComponent[] getItems(){
  return EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<IMenuItemComponent[]>(){
    @Override public IMenuItemComponent[] call() throws Exception {
      List<MenuItem> items=getRealComponent().getItems();
      if (items.size() > 0) {
        IMenuItemComponent[] itemAdapters=new IMenuItemComponent[items.size()];
        for (int i=0; i < items.size(); i++) {
          itemAdapters[i]=new MenuItemAdapter<MenuItem>(items.get(i));
        }
        return itemAdapters;
      }
      return null;
    }
  }
);
}

Fixed version (ground truth):
@Override public IMenuItemComponent[] getItems(){
  return EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<IMenuItemComponent[]>(){
    @Override public IMenuItemComponent[] call() throws Exception {
      List<MenuItem> items=getRealComponent().getItems();
      if (items.size() > 0) {
        List<IMenuItemComponent> adapters=new ArrayList<>();
        for (int i=0; i < items.size(); i++) {
          MenuItem item=items.get(i);
          if (item.isVisible()) {
            adapters.add(new MenuItemAdapter<MenuItem>(item));
          }
        }
        return adapters.toArray(new IMenuItemComponent[adapters.size()]);
      }
      return null;
    }
  }
);
}
Program: 95366
Project: 95366
Buggy source:
@Override public int getItemCount(){
  return EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Integer>(){
    @Override public Integer call() throws Exception {
      return getRealComponent().getItems().size();
    }
  }
);
}

Fixed version (ground truth):
@Override public int getItemCount(){
  return getItems().length;
}
Program: 95367
Project: 95367
Buggy source:
@Override public Integer call() throws Exception {
  return getRealComponent().getMenus().size();
}

Fixed version (ground truth):
@Override public IMenuItemComponent[] call() throws Exception {
  List<Menu> menus=getRealComponent().getMenus();
  if (menus.size() > 0) {
    List<IMenuItemComponent> adapters=new ArrayList<>();
    for (int i=0; i < menus.size(); i++) {
      Menu item=menus.get(i);
      if (item.isVisible()) {
        adapters.add(new MenuBarItemAdapter(item));
      }
    }
    return adapters.toArray(new IMenuItemComponent[adapters.size()]);
  }
  return null;
}
Program: 95368
Project: 95368
Buggy source:
/** 
 * Returns the adapted Menus of this MenuBar
 * @return the Menus
 */
@Override public IMenuItemComponent[] getItems(){
  return EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<IMenuItemComponent[]>(){
    @Override public IMenuItemComponent[] call() throws Exception {
      List<Menu> menus=getRealComponent().getMenus();
      if (menus.size() > 0) {
        IMenuItemComponent[] itemAdapters=new IMenuItemComponent[menus.size()];
        for (int i=0; i < menus.size(); i++) {
          itemAdapters[i]=new MenuBarItemAdapter(menus.get(i));
        }
        return itemAdapters;
      }
      return null;
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Returns the adapted Menus of this MenuBar
 * @return the Menus
 */
@Override public IMenuItemComponent[] getItems(){
  return EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<IMenuItemComponent[]>(){
    @Override public IMenuItemComponent[] call() throws Exception {
      List<Menu> menus=getRealComponent().getMenus();
      if (menus.size() > 0) {
        List<IMenuItemComponent> adapters=new ArrayList<>();
        for (int i=0; i < menus.size(); i++) {
          Menu item=menus.get(i);
          if (item.isVisible()) {
            adapters.add(new MenuBarItemAdapter(item));
          }
        }
        return adapters.toArray(new IMenuItemComponent[adapters.size()]);
      }
      return null;
    }
  }
);
}
Program: 95369
Project: 95369
Buggy source:
@Override public int getItemCount(){
  return EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Integer>(){
    @Override public Integer call() throws Exception {
      return getRealComponent().getMenus().size();
    }
  }
);
}

Fixed version (ground truth):
@Override public int getItemCount(){
  return getItems().length;
}
Program: 95370
Project: 95370
Buggy source:
@Override public Node call() throws Exception {
  List<? extends MenuBar> bars=ComponentHandler.getAssignableFrom(MenuBar.class);
  MenuBar menuBar=bars.get(0);
  SkinBase<?> menuBarSkin=(SkinBase<?>)menuBar.getSkin();
  Parent buttonBox=(Parent)menuBarSkin.getChildren().get(0);
  return buttonBox.getChildrenUnmodifiable().get(menuBar.getMenus().indexOf(getRealComponent()));
}

Fixed version (ground truth):
@Override public Node call() throws Exception {
  List<? extends MenuBar> bars=ComponentHandler.getAssignableFrom(MenuBar.class);
  MenuBar menuBar=bars.get(0);
  SkinBase<?> menuBarSkin=(SkinBase<?>)menuBar.getSkin();
  Parent buttonBox=(Parent)menuBarSkin.getChildren().get(0);
  IMenuItemComponent[] items=new MenuBarAdapter(menuBar).getItems();
  int index=-1;
  for (int i=0; i < items.length; i++) {
    if (getRealComponent().equals(items[i].getRealComponent())) {
      index=i;
      break;
    }
  }
  return buttonBox.getChildrenUnmodifiable().get(index);
}
Program: 95371
Project: 95371
Buggy source:
@Override protected void clickMenuItem(){
  Node menuButton=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Node>(){
    @Override public Node call() throws Exception {
      List<? extends MenuBar> bars=ComponentHandler.getAssignableFrom(MenuBar.class);
      MenuBar menuBar=bars.get(0);
      SkinBase<?> menuBarSkin=(SkinBase<?>)menuBar.getSkin();
      Parent buttonBox=(Parent)menuBarSkin.getChildren().get(0);
      return buttonBox.getChildrenUnmodifiable().get(menuBar.getMenus().indexOf(getRealComponent()));
    }
  }
);
  getRobot().click(menuButton,null);
}

Fixed version (ground truth):
@Override protected void clickMenuItem(){
  Node menuButton=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Node>(){
    @Override public Node call() throws Exception {
      List<? extends MenuBar> bars=ComponentHandler.getAssignableFrom(MenuBar.class);
      MenuBar menuBar=bars.get(0);
      SkinBase<?> menuBarSkin=(SkinBase<?>)menuBar.getSkin();
      Parent buttonBox=(Parent)menuBarSkin.getChildren().get(0);
      IMenuItemComponent[] items=new MenuBarAdapter(menuBar).getItems();
      int index=-1;
      for (int i=0; i < items.length; i++) {
        if (getRealComponent().equals(items[i].getRealComponent())) {
          index=i;
          break;
        }
      }
      return buttonBox.getChildrenUnmodifiable().get(index);
    }
  }
);
  getRobot().click(menuButton,null);
}