nus-yam/ex-repair huggingface dataset:
Program: 96279
Project: 96279
Buggy source:
/** 
 * Creates the specification part of the editor
 * @param parent Composite.
 */
protected void createMainPart(Composite parent){
  setMainTreeViewer(new TreeViewer(parent));
  m_labelDecorator=new SessionBasedLabelDecorator(this,Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  DecoratingLabelProvider lp=new DecoratingLabelProvider(new GeneralLabelProvider(),m_labelDecorator);
  lp.setDecorationContext(new JBEditorDecorationContext());
  getMainTreeViewer().setLabelProvider(lp);
  getMainTreeViewer().setUseHashlookup(true);
  JubulaStateController.getInstance().addSelectionListenerToSelectionService();
  getSite().setSelectionProvider(this);
  firePropertyChange(IWorkbenchPartConstants.PROP_INPUT);
}

Fixed version (ground truth):
/** 
 * Creates the specification part of the editor
 * @param parent Composite.
 */
protected void createMainPart(Composite parent){
  setMainTreeViewer(new TreeViewer(parent));
  DecoratingLabelProvider lp=new DecoratingLabelProvider(new GeneralLabelProvider(),Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  lp.setDecorationContext(new JBEditorDecorationContext());
  getMainTreeViewer().setLabelProvider(lp);
  getMainTreeViewer().setUseHashlookup(true);
  getMainTreeViewer().setComparer(new UIIdentitiyElementComparer());
  JubulaStateController.getInstance().addSelectionListenerToSelectionService();
  getSite().setSelectionProvider(this);
  firePropertyChange(IWorkbenchPartConstants.PROP_INPUT);
}
Program: 96280
Project: 96280
Buggy source:
/** 
 * {@inheritDoc}
 */
public void dispose(){
  try {
    if (m_labelDecorator != null) {
      m_labelDecorator.dispose();
    }
    DataEventDispatcher ded=DataEventDispatcher.getInstance();
    ded.removePropertyChangedListener(this);
    if (getEditorSite() != null && getEditorSite().getPage() != null) {
      GuiEventDispatcher.getInstance().removeEditorDirtyStateListener(this);
    }
    if (getSite() != null) {
      getSite().setSelectionProvider(null);
    }
    if (getEditorSite() != null && getEditorSite().getPage() != null) {
      getEditorSite().getPage().removePartListener(m_partListener);
    }
    if (getEditorHelper() != null) {
      getEditorHelper().dispose();
    }
  }
  finally {
    super.dispose();
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void dispose(){
  try {
    DataEventDispatcher ded=DataEventDispatcher.getInstance();
    ded.removePropertyChangedListener(this);
    if (getEditorSite() != null && getEditorSite().getPage() != null) {
      GuiEventDispatcher.getInstance().removeEditorDirtyStateListener(this);
    }
    if (getSite() != null) {
      getSite().setSelectionProvider(null);
    }
    if (getEditorSite() != null && getEditorSite().getPage() != null) {
      getEditorSite().getPage().removePartListener(m_partListener);
    }
    if (getEditorHelper() != null) {
      getEditorHelper().dispose();
    }
  }
  finally {
    super.dispose();
  }
}
Program: 96281
Project: 96281
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected void createPartControlImpl(Composite parent){
  createMainPart(parent);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  getMainTreeViewer().getControl().setLayoutData(gridData);
  setControl(getMainTreeViewer().getControl());
  getMainTreeViewer().setContentProvider(new CentralTestDataContentProvider());
  m_labelDecorator=new SessionBasedLabelDecorator(this,Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  DecoratingLabelProvider lp=new DecoratingLabelProvider(new CentralTestDataLabelProvider(),m_labelDecorator);
  lp.setDecorationContext(new JBEditorDecorationContext());
  getMainTreeViewer().setLabelProvider(lp);
  getMainTreeViewer().setSorter(new ViewerSorter());
  getMainTreeViewer().setComparer(new PersistentObjectComparer());
  addTreeDoubleClickListener(CommandIDs.NEW_TESTDATACUBE_COMMAND_ID);
  addFocusListener(getMainTreeViewer());
  getEditorHelper().addListeners();
  setActionHandlers();
  setInitialInput();
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addPropertyChangedListener(this,true);
  ded.addParamChangedListener(this,true);
  GuiEventDispatcher.getInstance().addEditorDirtyStateListener(this,true);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
protected void createPartControlImpl(Composite parent){
  createMainPart(parent);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  getMainTreeViewer().getControl().setLayoutData(gridData);
  setControl(getMainTreeViewer().getControl());
  getMainTreeViewer().setContentProvider(new CentralTestDataContentProvider());
  DecoratingLabelProvider lp=new DecoratingLabelProvider(new CentralTestDataLabelProvider(),Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  lp.setDecorationContext(new JBEditorDecorationContext());
  getMainTreeViewer().setLabelProvider(lp);
  getMainTreeViewer().setSorter(new ViewerSorter());
  getMainTreeViewer().setComparer(new PersistentObjectComparer());
  addTreeDoubleClickListener(CommandIDs.NEW_TESTDATACUBE_COMMAND_ID);
  addFocusListener(getMainTreeViewer());
  getEditorHelper().addListeners();
  setActionHandlers();
  setInitialInput();
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addPropertyChangedListener(this,true);
  ded.addParamChangedListener(this,true);
  GuiEventDispatcher.getInstance().addEditorDirtyStateListener(this,true);
}
Program: 96282
Project: 96282
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void dispose(){
  m_labelDecorator.dispose();
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.removeParamChangedListener(this);
  getElementsToRefresh().clear();
  super.dispose();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void dispose(){
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.removeParamChangedListener(this);
  getElementsToRefresh().clear();
  super.dispose();
}
Program: 96283
Project: 96283
Buggy source:
/** 
 * {@inheritDoc}
 * @param parent
 */
public void createPartControlImpl(Composite parent){
  super.createPartControlImpl(parent);
  m_eventHandlerTreeViewer.setContentProvider(new EventHandlerContentProvider());
  m_eventHandlerTreeViewer.getControl().setMenu(createContextMenu());
  ActionListener actionListener=new ActionListener();
  getTreeViewer().addSelectionChangedListener(actionListener);
  m_labelDecorator=new SessionBasedLabelDecorator(this,Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  DecoratingLabelProvider ld=new DecoratingLabelProvider(new GeneralLabelProvider(),m_labelDecorator);
  ld.setDecorationContext(new JBEditorDecorationContext());
  getTreeViewer().setLabelProvider(ld);
  getEventHandlerTreeViewer().addSelectionChangedListener(actionListener);
  if (!Plugin.getDefault().anyDirtyStar()) {
    checkAndRemoveUnusedTestData();
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @param parent
 */
public void createPartControlImpl(Composite parent){
  super.createPartControlImpl(parent);
  m_eventHandlerTreeViewer.setContentProvider(new EventHandlerContentProvider());
  m_eventHandlerTreeViewer.getControl().setMenu(createContextMenu());
  ActionListener actionListener=new ActionListener();
  getTreeViewer().addSelectionChangedListener(actionListener);
  DecoratingLabelProvider ld=new DecoratingLabelProvider(new GeneralLabelProvider(),Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  ld.setDecorationContext(new JBEditorDecorationContext());
  getTreeViewer().setLabelProvider(ld);
  getEventHandlerTreeViewer().addSelectionChangedListener(actionListener);
  if (!Plugin.getDefault().anyDirtyStar()) {
    checkAndRemoveUnusedTestData();
  }
}
Program: 96285
Project: 96285
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void createControl(Composite parent){
  Composite topLevelComposite=new Composite(parent,SWT.NONE);
  setControl(topLevelComposite);
  GridLayout layout=new GridLayout();
  layout.numColumns=1;
  layout.verticalSpacing=2;
  layout.marginWidth=Layout.MARGIN_WIDTH;
  layout.marginHeight=Layout.MARGIN_HEIGHT;
  topLevelComposite.setLayout(layout);
  GridData layoutData=new GridData(GridData.FILL_BOTH);
  layoutData.grabExcessHorizontalSpace=true;
  topLevelComposite.setLayoutData(layoutData);
  final FilteredTree ft=new JBFilteredTree(topLevelComposite,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER,new JBPatternFilter(),true);
  setTreeViewer(ft.getViewer());
  ColumnViewerToolTipSupport.enableFor(getTreeViewer());
  getTreeViewer().addDoubleClickListener(m_doubleClickListener);
  getTreeViewer().setContentProvider(new SearchResultContentProvider());
  getTreeViewer().setLabelProvider(new DecoratingCellLabelProvider(new LabelProvider(),Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator()));
  getTreeViewer().setSorter(new ViewerSorter());
  getSite().setSelectionProvider(getTreeViewer());
  DataEventDispatcher.getInstance().addProjectLoadedListener(this,true);
  Plugin.getHelpSystem().setHelp(parent,ContextHelpIds.JB_SEARCH_RESULT_VIEW);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void createControl(Composite parent){
  Composite topLevelComposite=new Composite(parent,SWT.NONE);
  setControl(topLevelComposite);
  GridLayout layout=new GridLayout();
  layout.numColumns=1;
  layout.verticalSpacing=2;
  layout.marginWidth=Layout.MARGIN_WIDTH;
  layout.marginHeight=Layout.MARGIN_HEIGHT;
  topLevelComposite.setLayout(layout);
  GridData layoutData=new GridData(GridData.FILL_BOTH);
  layoutData.grabExcessHorizontalSpace=true;
  topLevelComposite.setLayoutData(layoutData);
  final FilteredTree ft=new JBFilteredTree(topLevelComposite,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER,new JBPatternFilter(),true);
  setTreeViewer(ft.getViewer());
  ColumnViewerToolTipSupport.enableFor(getTreeViewer());
  getTreeViewer().addDoubleClickListener(m_doubleClickListener);
  getTreeViewer().setContentProvider(new SearchResultContentProvider());
  getTreeViewer().setLabelProvider(new DecoratingLabelProvider(new LabelProvider(),Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator()));
  getTreeViewer().setSorter(new ViewerSorter());
  getSite().setSelectionProvider(getTreeViewer());
  DataEventDispatcher.getInstance().addProjectLoadedListener(this,true);
  Plugin.getHelpSystem().setHelp(parent,ContextHelpIds.JB_SEARCH_RESULT_VIEW);
}
Program: 96286
Project: 96286
Buggy source:
/** 
 * Selects all text in the component.
 */
protected void selectAll(){
  final String totalText=getText();
  getRobot().keyStroke(getRobot().getSystemModifierSpec() + "String_Node_Str");
  if (!totalText.equals(getSelectionText())) {
    getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable(){
      public Object run(){
        getTextComponent().selectAll();
        return null;
      }
    }
);
  }
  String selectionText=getSelectionText();
  if (!totalText.equals(selectionText)) {
    log.warn("String_Node_Str" + "String_Node_Str" + totalText + "String_Node_Str"+ "String_Node_Str"+ selectionText+ "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Selects all text in the component.
 */
protected void selectAll(){
  final String totalText=getText();
  try {
    getRobot().keyStroke(getRobot().getSystemModifierSpec() + "String_Node_Str");
  }
 catch (  StepExecutionException see) {
    log.warn(see);
  }
  if (!totalText.equals(getSelectionText())) {
    getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable(){
      public Object run(){
        getTextComponent().selectAll();
        return null;
      }
    }
);
  }
  String selectionText=getSelectionText();
  if (!totalText.equals(selectionText)) {
    log.warn("String_Node_Str" + "String_Node_Str" + totalText + "String_Node_Str"+ "String_Node_Str"+ selectionText+ "String_Node_Str");
  }
}
Program: 96287
Project: 96287
Buggy source:
/** 
 * @param selectedNode the currently selected guiNode
 * @param workTC the workversion of the current specTC
 * @return the position to add
 */
private Integer getPositionToInsert(ISpecTestCasePO workTC,IExecTestCasePO selectedNode){
  int positionToAdd=workTC.indexOf(selectedNode) + 1;
  if (Plugin.getDefault().getPreferenceStore().getBoolean(Constants.NODE_INSERT_KEY)) {
    positionToAdd=workTC.getUnmodifiableNodeList().size() + 1;
  }
  return positionToAdd;
}

Fixed version (ground truth):
/** 
 * @param workNode the workversion of the current specTC
 * @param selectedNode the currently selected node
 * @return the position to add
 */
public static Integer getPositionToInsert(INodePO workNode,IExecTestCasePO selectedNode){
  int positionToAdd=workNode.indexOf(selectedNode) + 1;
  if (Plugin.getDefault().getPreferenceStore().getBoolean(Constants.NODE_INSERT_KEY)) {
    positionToAdd=workNode.getUnmodifiableNodeList().size() + 1;
  }
  return positionToAdd;
}
Program: 96288
Project: 96288
Buggy source:
public void selectionChanged(IWorkbenchPart part,ISelection selection){
  if (!(selection instanceof IStructuredSelection)) {
    return;
  }
  List<Object> selectedElements=((IStructuredSelection)selection).toList();
  Collections.reverse(selectedElements);
  Iterator iter=selectedElements.iterator();
  List<IExecTestCasePO> addedElements=new ArrayList<IExecTestCasePO>();
  try {
    while (iter.hasNext()) {
      ISpecTestCasePO specTcToInsert=(ISpecTestCasePO)iter.next();
      try {
        addedElements.add(TestCaseBP.addReferencedTestCase(tce.getEditorHelper().getEditSupport(),editorNode,specTcToInsert,index));
      }
 catch (      PMException e) {
        NodeEditorInput inp=(NodeEditorInput)tce.getAdapter(NodeEditorInput.class);
        INodePO inpNode=inp.getNode();
        PMExceptionHandler.handlePMExceptionForMasterSession(e);
        tce.reOpenEditor(inpNode);
      }
    }
    tce.getEditorHelper().getEditSupport().lockWorkVersion();
    tce.getEditorHelper().setDirty(true);
    tce.setSelection(new StructuredSelection(addedElements));
  }
 catch (  PMException e1) {
    PMExceptionHandler.handlePMExceptionForEditor(e1,tce);
  }
}

Fixed version (ground truth):
public void selectionChanged(IWorkbenchPart part,ISelection selection){
  if (!(selection instanceof IStructuredSelection)) {
    return;
  }
  List<Object> selectedElements=((IStructuredSelection)selection).toList();
  Collections.reverse(selectedElements);
  Iterator iter=selectedElements.iterator();
  List<IExecTestCasePO> addedElements=new ArrayList<IExecTestCasePO>();
  try {
    while (iter.hasNext()) {
      ISpecTestCasePO specTcToInsert=(ISpecTestCasePO)iter.next();
      try {
        Integer index=null;
        if (node instanceof IExecTestCasePO) {
          index=AbstractNewTestCaseAction.getPositionToInsert(editorNode,(IExecTestCasePO)node);
        }
        addedElements.add(TestCaseBP.addReferencedTestCase(tce.getEditorHelper().getEditSupport(),editorNode,specTcToInsert,index));
      }
 catch (      PMException e) {
        NodeEditorInput inp=(NodeEditorInput)tce.getAdapter(NodeEditorInput.class);
        INodePO inpNode=inp.getNode();
        PMExceptionHandler.handlePMExceptionForMasterSession(e);
        tce.reOpenEditor(inpNode);
      }
    }
    tce.getEditorHelper().getEditSupport().lockWorkVersion();
    tce.getEditorHelper().setDirty(true);
    tce.setSelection(new StructuredSelection(addedElements));
  }
 catch (  PMException e1) {
    PMExceptionHandler.handlePMExceptionForEditor(e1,tce);
  }
}
Program: 96291
Project: 96291
Buggy source:
/** 
 * Verifies, if value exists in column.
 * @param col The column of the cell.
 * @param colOperator the column header operator
 * @param value The cell text to verify.
 * @param operator The operation used to verify
 * @param searchType Determines where the search begins ("relative" or "absolute")
 * @param exists true if value exists, false otherwise
 * @throws StepExecutionException If the row or the column is invalid, or if the rendered text cannot be extracted.
 */
public void gdVerifyValueInColumn(final String col,final String colOperator,final String value,final String operator,final String searchType,boolean exists) throws StepExecutionException {
  final int implCol=getColumnFromString(col,colOperator);
  Boolean valueExists=(Boolean)getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable(){
    public Object run() throws StepExecutionException {
      final int rowCount=m_table.getRowCount();
      for (int i=getStartingRowIndex(searchType); i < rowCount; ++i) {
        if (MatchUtil.getInstance().match(getCellText(i,implCol),value,operator)) {
          return new Boolean(true);
        }
      }
      String header=m_table.getColumnName(implCol);
      if (MatchUtil.getInstance().match(header,value,operator)) {
        return new Boolean(true);
      }
      return new Boolean(false);
    }
  }
);
  Verifier.equals(exists,valueExists.booleanValue());
}

Fixed version (ground truth):
/** 
 * Verifies, if value exists in column.
 * @param col The column of the cell.
 * @param colOperator the column header operator
 * @param value The cell text to verify.
 * @param operator The operation used to verify
 * @param searchType Determines where the search begins ("relative" or "absolute")
 * @param exists true if value exists, false otherwise
 * @throws StepExecutionException If the row or the column is invalid, or if the rendered text cannot be extracted.
 */
public void gdVerifyValueInColumn(final String col,final String colOperator,final String value,final String operator,final String searchType,boolean exists) throws StepExecutionException {
  final int implCol=getColumnFromString(col,colOperator);
  Boolean valueExists=(Boolean)getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable(){
    public Object run() throws StepExecutionException {
      final int rowCount=m_table.getRowCount();
      for (int i=getStartingRowIndex(searchType); i < rowCount; ++i) {
        if (MatchUtil.getInstance().match(getCellText(i,implCol),value,operator)) {
          return Boolean.TRUE;
        }
      }
      String header=m_table.getColumnName(implCol);
      if (MatchUtil.getInstance().match(header,value,operator)) {
        return Boolean.TRUE;
      }
      return Boolean.FALSE;
    }
  }
);
  Verifier.equals(exists,valueExists.booleanValue());
}
Program: 96292
Project: 96292
Buggy source:
/** 
 * Finds the first row which contains the value <code>value</code> in the given column and selects the cell.
 * @param col the column
 * @param value the value
 * @param regex search using regex
 * @deprecated the same as gdSelectRowByValueWill be removed!
 */
public void gdSelectCellByRowValue(int col,final String value,boolean regex){
  final int implCol=IndexConverter.toImplementationIndex(col);
  Integer implRow;
  if (regex) {
    implRow=(Integer)getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable(){
      public Object run() throws StepExecutionException {
        for (int i=0; i < m_table.getRowCount(); ++i) {
          if (MatchUtil.getInstance().match(m_table.getValueAt(i,implCol).toString(),value,MatchUtil.MATCHES_REGEXP)) {
            return new Integer(i);
          }
        }
        return null;
      }
    }
);
  }
 else {
    implRow=(Integer)getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable(){
      public Object run() throws StepExecutionException {
        for (int i=0; i < m_table.getRowCount(); ++i) {
          if (m_table.getValueAt(i,implCol).toString().equals(value)) {
            return new Integer(i);
          }
        }
        return null;
      }
    }
);
  }
  if (implRow == null) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_FOUND));
  }
  gdSelectCell(IndexConverter.toUserIndex(implRow.intValue()),col,1,CompSystemConstants.EXTEND_SELECTION_NO);
}

Fixed version (ground truth):
/** 
 * Finds the first row which contains the value <code>value</code> in the given column and selects the cell.
 * @param col the column
 * @param value the value
 * @param regex search using regex
 * @deprecated the same as gdSelectRowByValueWill be removed!
 */
public void gdSelectCellByRowValue(int col,final String value,boolean regex){
  final int implCol=IndexConverter.toImplementationIndex(col);
  Integer implRow;
  if (regex) {
    implRow=(Integer)getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable(){
      public Object run() throws StepExecutionException {
        for (int i=0; i < m_table.getRowCount(); ++i) {
          if (MatchUtil.getInstance().match(getCellText(i,implCol),value,MatchUtil.MATCHES_REGEXP)) {
            return new Integer(i);
          }
        }
        return null;
      }
    }
);
  }
 else {
    implRow=(Integer)getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable(){
      public Object run() throws StepExecutionException {
        for (int i=0; i < m_table.getRowCount(); ++i) {
          if (MatchUtil.getInstance().match(getCellText(i,implCol),value,MatchUtil.MATCHES_REGEXP)) {
            return new Integer(i);
          }
        }
        return null;
      }
    }
);
  }
  if (implRow == null) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_FOUND));
  }
  gdSelectCell(IndexConverter.toUserIndex(implRow.intValue()),col,1,CompSystemConstants.EXTEND_SELECTION_NO);
}
Program: 96293
Project: 96293
Buggy source:
/** 
 * Finds the first column which contains the value <code>value</code> in the given row and selects the cell.
 * @param row the row
 * @param value the value
 * @param regex search using regex
 * @param extendSelection Should this selection be part of a multiple selection
 * @param searchType Determines where the search begins ("relative" or "absolute")
 * @param clickCount the number of clicks
 * @deprecated Will be removed with gdSelectCellByColValue with String parameterfor Row/Column
 */
protected void gdSelectCellByColValue(int row,final String value,final String regex,final String extendSelection,final String searchType,int clickCount){
  final int implRow=IndexConverter.toImplementationIndex(row);
  Integer implCol;
  implCol=(Integer)getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable(){
    public Object run() throws StepExecutionException {
      for (int i=getStartingColIndex(searchType); i < m_table.getColumnCount(); ++i) {
        if (MatchUtil.getInstance().match(m_table.getValueAt(implRow,i).toString(),value,regex)) {
          return new Integer(i);
        }
      }
      return null;
    }
  }
);
  if (implCol == null) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_FOUND));
  }
  gdSelectCell(row,IndexConverter.toUserIndex(implCol.intValue()),clickCount,extendSelection);
}

Fixed version (ground truth):
/** 
 * Finds the first column which contains the value <code>value</code> in the given row and selects the cell.
 * @param row the row
 * @param value the value
 * @param regex search using regex
 * @param extendSelection Should this selection be part of a multiple selection
 * @param searchType Determines where the search begins ("relative" or "absolute")
 * @param clickCount the number of clicks
 * @deprecated Will be removed with gdSelectCellByColValue with String parameterfor Row/Column
 */
protected void gdSelectCellByColValue(int row,final String value,final String regex,final String extendSelection,final String searchType,int clickCount){
  final int implRow=IndexConverter.toImplementationIndex(row);
  Integer implCol;
  implCol=(Integer)getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable(){
    public Object run() throws StepExecutionException {
      for (int i=getStartingColIndex(searchType); i < m_table.getColumnCount(); ++i) {
        if (MatchUtil.getInstance().match(getCellText(implRow,i),value,regex)) {
          return new Integer(i);
        }
      }
      return null;
    }
  }
);
  if (implCol == null) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_FOUND));
  }
  gdSelectCell(row,IndexConverter.toUserIndex(implCol.intValue()),clickCount,extendSelection);
}
Program: 96294
Project: 96294
Buggy source:
/** 
 * {@inheritDoc}
 */
public void dispose(){
  ClientTestFactory.getClientTest().removeTestresultSummaryEventListener(this);
  DataEventDispatcher.getInstance().removeTestresultListener(this);
  super.dispose();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void dispose(){
  ClientTestFactory.getClientTest().removeTestresultSummaryEventListener(this);
  DataEventDispatcher.getInstance().removeTestresultListener(this);
  DatabaseStateDispatcher.removeDatabaseStateListener(this);
  super.dispose();
}
Program: 96296
Project: 96296
Buggy source:
/** 
 * @return the displayable Languages
 */
private DisplayableLanguages getDisplayableLanguages(){
  if (getTreeViewer().getSelection() instanceof IStructuredSelection) {
    Object firstSelectedElement=((IStructuredSelection)getTreeViewer().getSelection()).getFirstElement();
    if (firstSelectedElement instanceof INodePO) {
      ITestSuitePO testSuite=GuiNodeBP.getTestSuiteOfNode((INodePO)firstSelectedElement);
      List<Locale> langList=WorkingLanguageBP.getInstance().getLanguages(testSuite.getAut());
      if (langList.size() > 0) {
        return new DisplayableLanguages(langList);
      }
      langList=new ArrayList<Locale>(1);
      langList.add(GeneralStorage.getInstance().getProject().getDefaultLanguage());
      return new DisplayableLanguages(langList);
    }
  }
  return new DisplayableLanguages(new ArrayList<Locale>());
}

Fixed version (ground truth):
/** 
 * @return the displayable Languages
 */
private DisplayableLanguages getDisplayableLanguages(){
  ISelection selection=getTreeViewer().getSelection();
  if (selection instanceof IStructuredSelection) {
    Object firstSelectedElement=((IStructuredSelection)selection).getFirstElement();
    if (firstSelectedElement instanceof INodePO) {
      ITestSuitePO testSuite=GuiNodeBP.getTestSuiteOfNode((INodePO)firstSelectedElement);
      if (testSuite != null) {
        List<Locale> langList=WorkingLanguageBP.getInstance().getLanguages(testSuite.getAut());
        if (langList.size() > 0) {
          return new DisplayableLanguages(langList);
        }
        langList=new ArrayList<Locale>(1);
        langList.add(GeneralStorage.getInstance().getProject().getDefaultLanguage());
        return new DisplayableLanguages(langList);
      }
    }
  }
  return new DisplayableLanguages(new ArrayList<Locale>());
}
Program: 96297
Project: 96297
Buggy source:
/** 
 * {@inheritDoc}
 */
public boolean performDrop(Object data){
  LocalSelectionTransfer transfer=LocalSelectionTransfer.getInstance();
  IStructuredSelection selection=transfer.getSelection();
  Object target=getCurrentTarget();
  if (selection instanceof StructuredSelection) {
    int location=getCurrentLocation();
    if (target == null) {
      target=m_editor.getEditorHelper().getEditSupport().getWorkVersion();
      location=ViewerDropAdapter.LOCATION_ON;
    }
    if (target instanceof INodePO) {
      return TCEditorDndSupport.performDrop(m_editor,selection,(INodePO)target,location);
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public boolean performDrop(Object data){
  LocalSelectionTransfer transfer=LocalSelectionTransfer.getInstance();
  IStructuredSelection selection=transfer.getSelection();
  Object target=getCurrentTarget();
  if (selection instanceof StructuredSelection) {
    int location=getCurrentLocation();
    if (target == null) {
      target=getFallbackTarget(getViewer());
      location=ViewerDropAdapter.LOCATION_AFTER;
    }
    if (target instanceof INodePO) {
      return TCEditorDndSupport.performDrop(m_editor,selection,(INodePO)target,location);
    }
  }
  return false;
}
Program: 96298
Project: 96298
Buggy source:
/** 
 * {@inheritDoc}
 */
public boolean performDrop(Object data){
  LocalSelectionTransfer transfer=LocalSelectionTransfer.getInstance();
  IStructuredSelection selection=transfer.getSelection();
  Object target=getCurrentTarget();
  int location=getCurrentLocation();
  if (target == null) {
    target=m_editor.getEditorHelper().getEditSupport().getWorkVersion();
    location=ViewerDropAdapter.LOCATION_AFTER;
  }
  if (selection instanceof StructuredSelection && target instanceof INodePO) {
    return TJEditorDndSupport.performDrop(m_editor,selection,(INodePO)target,location);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public boolean performDrop(Object data){
  LocalSelectionTransfer transfer=LocalSelectionTransfer.getInstance();
  IStructuredSelection selection=transfer.getSelection();
  Object target=getCurrentTarget();
  int location=getCurrentLocation();
  if (target == null) {
    target=getFallbackTarget(getViewer());
    location=ViewerDropAdapter.LOCATION_AFTER;
  }
  if (selection instanceof StructuredSelection && target instanceof INodePO) {
    return TJEditorDndSupport.performDrop(m_editor,selection,(INodePO)target,location);
  }
  return false;
}
Program: 96299
Project: 96299
Buggy source:
/** 
 * {@inheritDoc}
 */
public boolean performDrop(Object data){
  LocalSelectionTransfer transfer=LocalSelectionTransfer.getInstance();
  Object target=getCurrentTarget();
  int location=getCurrentLocation();
  if (target == null) {
    target=m_editor.getEditorHelper().getEditSupport().getWorkVersion();
    location=ViewerDropAdapter.LOCATION_AFTER;
  }
  if (target instanceof INodePO) {
    INodePO targetGuiNode=(INodePO)target;
    IStructuredSelection toDrop=transfer.getSelection();
    return TSEditorDndSupport.performDrop(m_editor,toDrop,targetGuiNode,location);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public boolean performDrop(Object data){
  LocalSelectionTransfer transfer=LocalSelectionTransfer.getInstance();
  Object target=getCurrentTarget();
  int location=getCurrentLocation();
  if (target == null) {
    target=getFallbackTarget(getViewer());
    location=ViewerDropAdapter.LOCATION_AFTER;
  }
  if (target instanceof INodePO) {
    INodePO targetGuiNode=(INodePO)target;
    IStructuredSelection toDrop=transfer.getSelection();
    return TSEditorDndSupport.performDrop(m_editor,toDrop,targetGuiNode,location);
  }
  return false;
}
Program: 96300
Project: 96300
Buggy source:
/** 
 * Creates the specification part of the editor
 * @param parent Composite.
 */
protected void createMainPart(Composite parent){
  setMainTreeViewer(new TreeViewer(parent));
  m_labelDecorator=new SessionBasedLabelDecorator(this,Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  DecoratingLabelProvider lp=new DecoratingLabelProvider(new GeneralLabelProvider(),m_labelDecorator);
  lp.setDecorationContext(new JBEditorDecorationContext());
  getMainTreeViewer().setLabelProvider(lp);
  getMainTreeViewer().setUseHashlookup(true);
  JubulaStateController.getInstance().addSelectionListenerToSelectionService();
  getSite().setSelectionProvider(this);
  firePropertyChange(IWorkbenchPartConstants.PROP_INPUT);
}

Fixed version (ground truth):
/** 
 * Creates the specification part of the editor
 * @param parent Composite.
 */
protected void createMainPart(Composite parent){
  setMainTreeViewer(new TreeViewer(parent));
  DecoratingLabelProvider lp=new DecoratingLabelProvider(new GeneralLabelProvider(),Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  lp.setDecorationContext(new JBEditorDecorationContext());
  m_labelDecorator=new SessionBasedLabelProviderDecoratorWrapper(this,lp.getLabelDecorator(),lp);
  getMainTreeViewer().setLabelProvider(m_labelDecorator);
  getMainTreeViewer().setUseHashlookup(true);
  JubulaStateController.getInstance().addSelectionListenerToSelectionService();
  getSite().setSelectionProvider(this);
  firePropertyChange(IWorkbenchPartConstants.PROP_INPUT);
}
Program: 96301
Project: 96301
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected void createPartControlImpl(Composite parent){
  createMainPart(parent);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  getMainTreeViewer().getControl().setLayoutData(gridData);
  setControl(getMainTreeViewer().getControl());
  getMainTreeViewer().setContentProvider(new CentralTestDataContentProvider());
  m_labelDecorator=new SessionBasedLabelDecorator(this,Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  DecoratingLabelProvider lp=new DecoratingLabelProvider(new CentralTestDataLabelProvider(),m_labelDecorator);
  lp.setDecorationContext(new JBEditorDecorationContext());
  getMainTreeViewer().setLabelProvider(lp);
  getMainTreeViewer().setSorter(new ViewerSorter());
  getMainTreeViewer().setComparer(new PersistentObjectComparer());
  addTreeDoubleClickListener(CommandIDs.NEW_TESTDATACUBE_COMMAND_ID);
  addFocusListener(getMainTreeViewer());
  getEditorHelper().addListeners();
  setActionHandlers();
  setInitialInput();
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addPropertyChangedListener(this,true);
  ded.addParamChangedListener(this,true);
  GuiEventDispatcher.getInstance().addEditorDirtyStateListener(this,true);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
protected void createPartControlImpl(Composite parent){
  createMainPart(parent);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  getMainTreeViewer().getControl().setLayoutData(gridData);
  setControl(getMainTreeViewer().getControl());
  getMainTreeViewer().setContentProvider(new CentralTestDataContentProvider());
  DecoratingLabelProvider lp=new DecoratingLabelProvider(new CentralTestDataLabelProvider(),Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  lp.setDecorationContext(new JBEditorDecorationContext());
  m_labelDecorator=new SessionBasedLabelProviderDecoratorWrapper(this,lp.getLabelDecorator(),lp);
  getMainTreeViewer().setLabelProvider(lp);
  getMainTreeViewer().setSorter(new ViewerSorter());
  getMainTreeViewer().setComparer(new PersistentObjectComparer());
  addTreeDoubleClickListener(CommandIDs.NEW_TESTDATACUBE_COMMAND_ID);
  addFocusListener(getMainTreeViewer());
  getEditorHelper().addListeners();
  setActionHandlers();
  setInitialInput();
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addPropertyChangedListener(this,true);
  ded.addParamChangedListener(this,true);
  GuiEventDispatcher.getInstance().addEditorDirtyStateListener(this,true);
}
Program: 96302
Project: 96302
Buggy source:
/** 
 * {@inheritDoc}
 * @param parent
 */
public void createPartControlImpl(Composite parent){
  super.createPartControlImpl(parent);
  m_eventHandlerTreeViewer.setContentProvider(new EventHandlerContentProvider());
  m_eventHandlerTreeViewer.getControl().setMenu(createContextMenu());
  ActionListener actionListener=new ActionListener();
  getTreeViewer().addSelectionChangedListener(actionListener);
  m_labelDecorator=new SessionBasedLabelDecorator(this,Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  DecoratingLabelProvider ld=new DecoratingLabelProvider(new GeneralLabelProvider(),m_labelDecorator);
  ld.setDecorationContext(new JBEditorDecorationContext());
  getTreeViewer().setLabelProvider(ld);
  getEventHandlerTreeViewer().addSelectionChangedListener(actionListener);
  if (!Plugin.getDefault().anyDirtyStar()) {
    checkAndRemoveUnusedTestData();
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @param parent
 */
public void createPartControlImpl(Composite parent){
  super.createPartControlImpl(parent);
  m_eventHandlerTreeViewer.setContentProvider(new EventHandlerContentProvider());
  m_eventHandlerTreeViewer.getControl().setMenu(createContextMenu());
  ActionListener actionListener=new ActionListener();
  getTreeViewer().addSelectionChangedListener(actionListener);
  DecoratingLabelProvider ld=new DecoratingLabelProvider(new GeneralLabelProvider(),Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  ld.setDecorationContext(new JBEditorDecorationContext());
  m_labelDecorator=new SessionBasedLabelProviderDecoratorWrapper(this,ld.getLabelDecorator(),ld);
  getTreeViewer().setLabelProvider(ld);
  getEventHandlerTreeViewer().addSelectionChangedListener(actionListener);
  if (!Plugin.getDefault().anyDirtyStar()) {
    checkAndRemoveUnusedTestData();
  }
}
Program: 96304
Project: 96304
Buggy source:
/** 
 * {@inheritDoc}
 * @param parent
 */
public void createPartControlImpl(Composite parent){
  super.createPartControlImpl(parent);
  ActionListener actionListener=new ActionListener();
  getTreeViewer().addSelectionChangedListener(actionListener);
  addTreeListener();
  if (!Plugin.getDefault().anyDirtyStar()) {
    checkAndRemoveUnusedTestData();
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @param parent
 */
public void createPartControlImpl(Composite parent){
  super.createPartControlImpl(parent);
  ActionListener actionListener=new ActionListener();
  getTreeViewer().addSelectionChangedListener(actionListener);
  if (!Plugin.getDefault().anyDirtyStar()) {
    checkAndRemoveUnusedTestData();
  }
}
Program: 96305
Project: 96305
Buggy source:
/** 
 * @return Returns the autGuid.
 */
@Basic @Column(name="String_Node_Str",length=4000) public String getInternalAutGuid(){
  return m_autGuid;
}

Fixed version (ground truth):
/** 
 * @return Returns the autGuid.
 */
@Basic @Column(name="String_Node_Str",length=32) public String getInternalAutGuid(){
  return m_autGuid;
}
Program: 96306
Project: 96306
Buggy source:
/** 
 * @return the projectGuid
 */
@Basic @Column(name="String_Node_Str",length=4000) public String getInternalProjectGuid(){
  return m_projectGuid;
}

Fixed version (ground truth):
/** 
 * @return the projectGuid
 */
@Basic @Column(name="String_Node_Str",length=32) public String getInternalProjectGuid(){
  return m_projectGuid;
}
Program: 96307
Project: 96307
Buggy source:
/** 
 * @return the tsGuid
 */
@Basic @Column(name="String_Node_Str",length=4000) public String getInternalTestsuiteGuid(){
  return m_testsuiteGuid;
}

Fixed version (ground truth):
/** 
 * @return the tsGuid
 */
@Basic @Column(name="String_Node_Str",length=32) public String getInternalTestsuiteGuid(){
  return m_testsuiteGuid;
}
Program: 96308
Project: 96308
Buggy source:
/** 
 * @return the testJobGuid
 */
@Basic @Column(name="String_Node_Str",length=4000) public String getInternalTestJobGuid(){
  return m_testJobGuid;
}

Fixed version (ground truth):
/** 
 * @return the testJobGuid
 */
@Basic @Column(name="String_Node_Str",length=32) public String getInternalTestJobGuid(){
  return m_testJobGuid;
}
Program: 96309
Project: 96309
Buggy source:
/** 
 * @return the autConfGuid
 */
@Basic @Column(name="String_Node_Str",length=4000) public String getInternalAutConfigGuid(){
  return m_autConfigGuid;
}

Fixed version (ground truth):
/** 
 * @return the autConfGuid
 */
@Basic @Column(name="String_Node_Str",length=32) public String getInternalAutConfigGuid(){
  return m_autConfigGuid;
}
Program: 96310
Project: 96310
Buggy source:
/** 
 * @return the value
 */
@Basic public String getValue(){
  return super.getValue();
}

Fixed version (ground truth):
/** 
 * @return the value
 */
@Basic @Column(name="String_Node_Str") public String getValue(){
  return super.getValue();
}
Program: 96311
Project: 96311
Buggy source:
/** 
 * @return the type
 */
@Basic public String getType(){
  return super.getType();
}

Fixed version (ground truth):
/** 
 * @return the type
 */
@Basic @Column(name="String_Node_Str") public String getType(){
  return super.getType();
}
Program: 96312
Project: 96312
Buggy source:
/** 
 * {@inheritDoc}
 */
@Basic public String getCategory(){
  return super.getCategory();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Basic @Column(name="String_Node_Str") public String getCategory(){
  return super.getCategory();
}
Program: 96313
Project: 96313
Buggy source:
/** 
 * Updates the used projects of the model.
 * @param usedProjects The projects that should be used.
 */
void updateProjects(String[] usedProjects) throws PMException {
  Set<IReusedProjectPO> toAdd=new HashSet<IReusedProjectPO>();
  Set<IReusedProjectPO> toRemove=new HashSet<IReusedProjectPO>();
  for (  String displayableProjectId : usedProjects) {
    toAdd.add(m_projectMap.get(displayableProjectId));
  }
  toRemove.addAll(getEditSupport().getWorkProject().getUsedProjects());
  toRemove.removeAll(toAdd);
  toAdd.removeAll(getEditSupport().getWorkProject().getUsedProjects());
  for (  IReusedProjectPO remove : toRemove) {
    getEditSupport().getWorkProject().removeUsedProject(remove);
  }
  boolean isDirty=getEditSupport().getSession().unwrap(JpaEntityManager.class).getUnitOfWork().hasChanges();
  Hibernator.instance().flushSession(getEditSupport().getSession());
  if (isDirty) {
    TimestampBP.refreshTimestamp(getEditSupport().getWorkProject());
  }
  for (  IReusedProjectPO reuse : toAdd) {
    getEditSupport().getWorkProject().addUsedProject(reuse);
  }
}

Fixed version (ground truth):
/** 
 * Updates the used projects of the model.
 * @param usedProjects The projects that should be used.
 */
void updateProjects(String[] usedProjects) throws PMException {
  Set<IReusedProjectPO> toAdd=new HashSet<IReusedProjectPO>();
  Set<IReusedProjectPO> toRemove=new HashSet<IReusedProjectPO>();
  for (  String displayableProjectId : usedProjects) {
    toAdd.add(m_projectMap.get(displayableProjectId));
  }
  toRemove.addAll(getEditSupport().getWorkProject().getUsedProjects());
  toRemove.removeAll(toAdd);
  toAdd.removeAll(getEditSupport().getWorkProject().getUsedProjects());
  for (  IReusedProjectPO remove : toRemove) {
    getEditSupport().getWorkProject().removeUsedProject(remove);
  }
  boolean isDirty=getEditSupport().getSession().unwrap(JpaEntityManager.class).getUnitOfWork().hasChanges();
  Hibernator.instance().flushSession(getEditSupport().getSession());
  if (isDirty) {
    TimestampBP.refreshTimestamp(getEditSupport().getWorkProject());
  }
  for (  IReusedProjectPO reuse : toAdd) {
    getEditSupport().getWorkProject().addUsedProject(reuse);
    reuse.setParentProjectId(getProject().getId());
  }
}
Program: 96314
Project: 96314
Buggy source:
/** 
 * {@inheritDoc}
 * @throws ExceptionInInitializerError
 * @throws InvocationTargetException
 * @throws NoSuchMethodException
 */
protected void startTasks() throws ExceptionInInitializerError, InvocationTargetException, NoSuchMethodException {
  startToolkitThread();
  addToolKitEventListenerToAUT();
  AUTServer.getInstance().invokeAUT();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @throws ExceptionInInitializerError
 * @throws InvocationTargetException
 * @throws NoSuchMethodException
 */
protected void startTasks() throws ExceptionInInitializerError, InvocationTargetException, NoSuchMethodException {
  String edtNameRegEx=EnvironmentUtils.getProcessEnvironment().getProperty(EDT_NAME_REGEX_KEY);
  if (edtNameRegEx == null) {
    edtNameRegEx=System.getProperty(EDT_NAME_REGEX_KEY);
  }
  if (edtNameRegEx != null) {
    try {
      Pattern.compile(edtNameRegEx);
    }
 catch (    PatternSyntaxException pse) {
      throw new InvocationTargetException(pse,"String_Node_Str" + EDT_NAME_REGEX_KEY + "String_Node_Str");
    }
    final String accessibleEdtNameRegEx=edtNameRegEx;
    Thread addListenersThread=new Thread("String_Node_Str"){
      public void run(){
        boolean isThreadFound=false;
        ThreadGroup rootThreadGroup=Thread.currentThread().getThreadGroup();
        while (rootThreadGroup.getParent() != null) {
          rootThreadGroup=rootThreadGroup.getParent();
        }
        while (!isThreadFound) {
          Thread[] activeThreads=getActiveThreads();
          for (int i=0; i < activeThreads.length; i++) {
            if (activeThreads[i].getName().matches(accessibleEdtNameRegEx)) {
              isThreadFound=true;
              break;
            }
          }
          try {
            Thread.sleep(1000);
          }
 catch (          InterruptedException e) {
          }
        }
        addToolKitEventListenerToAUT();
      }
    }
;
    addListenersThread.setDaemon(true);
    addListenersThread.start();
  }
 else {
    startToolkitThread();
    addToolKitEventListenerToAUT();
  }
  AUTServer.getInstance().invokeAUT();
}
Program: 96315
Project: 96315
Buggy source:
/** 
 * {@inheritDoc} 
 */
public Object getParent(Object element){
  if (element instanceof INodePO) {
    return ((INodePO)element).getParentNode();
  }
  if (element instanceof ITestSuiteContPO || element instanceof ITestJobContPO || element instanceof IReusedProjectPO) {
    return GeneralStorage.getInstance().getProject();
  }
  if (element instanceof ITestDataCubeContPO || element instanceof ITestDataCubePO || 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 parent=((INodePO)element).getParentNode();
    IProjectPO activeProject=GeneralStorage.getInstance().getProject();
    if (parent instanceof IProjectPO && !parent.equals(activeProject)) {
      String parentGuid=parent.getGuid();
      if (activeProject != null && parentGuid != null) {
        for (        IReusedProjectPO reusedProject : activeProject.getUsedProjects()) {
          if (parentGuid.equals(reusedProject.getProjectGuid())) {
            return reusedProject;
          }
        }
      }
    }
    return parent;
  }
  if (element instanceof ITestSuiteContPO || element instanceof ITestJobContPO || element instanceof IReusedProjectPO) {
    return GeneralStorage.getInstance().getProject();
  }
  if (element instanceof ITestDataCubeContPO || element instanceof ITestDataCubePO || element instanceof SearchResultElement) {
    return null;
  }
  Assert.notReached(Messages.WrongTypeOfElement + StringConstants.EXCLAMATION_MARK);
  return null;
}
Program: 96318
Project: 96318
Buggy source:
/** 
 * adds Drag and Drop support for the trees.
 * @param operations The DnD operation types to support.
 * @param transfers The DnD transfer types to support.
 */
protected void addDragAndDropSupport(int operations,Transfer[] transfers){
  getMainTreeViewer().addDragSupport(operations,transfers,new TreeViewerContainerDragSourceListener(getTreeViewer()));
  getMainTreeViewer().addDropSupport(operations,transfers,new TCEditorDropTargetListener(this));
}

Fixed version (ground truth):
/** 
 * adds Drag and Drop support for the trees.
 * @param operations The DnD operation types to support.
 * @param transfers The DnD transfer types to support.
 */
protected void addDragAndDropSupport(int operations,Transfer[] transfers){
  getMainTreeViewer().addDragSupport(operations,transfers,new TreeViewerContainerDragSourceListener(getTreeViewer()));
  getMainTreeViewer().addDropSupport(operations,transfers,getViewerDropAdapter());
}
Program: 96319
Project: 96319
Buggy source:
/** 
 * {@inheritDoc}
 */
public String getRenderedText(final Object node) throws StepExecutionException {
  return (String)getQueuer().invokeAndWait("String_Node_Str",new IRunnable(){
    public Object run(){
      int row=getRowForTreeNode(node);
      JTree tree=(JTree)getTree();
      Component cellRendererComponent=tree.getCellRenderer().getTreeCellRendererComponent(tree,node,false,tree.isExpanded(row),m_model.isLeaf(node),row,false);
      return AbstractSwingImplClass.getRenderedText(cellRendererComponent);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public String getRenderedText(final Object node) throws StepExecutionException {
  return (String)getQueuer().invokeAndWait("String_Node_Str",new IRunnable(){
    public Object run(){
      int row=getRowForTreeNode(node);
      JTree tree=(JTree)getTree();
      Component cellRendererComponent=tree.getCellRenderer().getTreeCellRendererComponent(tree,node,false,tree.isExpanded(row),m_model.isLeaf(node),row,false);
      return AbstractSwingImplClass.resolveRenderedText(cellRendererComponent);
    }
  }
);
}