nus-yam/ex-repair huggingface dataset:
Program: 95784
Project: 95784
Buggy source:
/** 
 * Removes a container from the hierarchy. This means that the following references will be removed: <br> -Container from the hierarchy Map <br> -The component of the given container from the real map <br> -The reference from the parent container to the given container <br> -The actions mentioned above for all children of this container
 * @param ctner the container that will be deleted
 */
public void removeContainer(JavaFXHierarchyContainer ctner){
  m_lock.lock();
  try {
    Map contMap=getHierarchyMap();
    Map realMap=getRealMap();
    JavaFXComponent fxComp=ctner.getComponent();
    fxComp.removeChangeListener();
    contMap.remove(ctner.getComponent());
    realMap.remove(fxComp.getRealComponent());
    JavaFXHierarchyContainer parent=(JavaFXHierarchyContainer)ctner.getPrnt();
    if (parent != null) {
      JavaFXHierarchyContainer[] parentComp=parent.getChildren();
      int i=0;
      for (      JavaFXHierarchyContainer comp : parentComp) {
        if (comp == ctner) {
          parentComp[i]=null;
          break;
        }
        i++;
      }
    }
    ArrayList<JavaFXHierarchyContainer> children=new ArrayList<JavaFXHierarchyContainer>(Arrays.asList(ctner.getChildren()));
    for (    JavaFXHierarchyContainer child : children) {
      removeContainer(child);
    }
  }
  finally {
    m_lock.unlock();
  }
}

Fixed version (ground truth):
/** 
 * Removes a container from the hierarchy. This means that the following references will be removed: <br> -Container from the hierarchy Map <br> -The component of the given container from the real map <br> -The reference from the parent container to the given container <br> -The actions mentioned above for all children of this container
 * @param ctner the container that will be deleted
 */
public void removeContainer(JavaFXHierarchyContainer ctner){
  m_lock.lock();
  try {
    Map contMap=getHierarchyMap();
    Map realMap=getRealMap();
    JavaFXComponent fxComp=ctner.getComponent();
    fxComp.removeChangeListener();
    contMap.remove(ctner.getComponent());
    realMap.remove(fxComp.getRealComponent());
    JavaFXHierarchyContainer parent=(JavaFXHierarchyContainer)ctner.getPrnt();
    if (parent != null) {
      parent.remove(ctner);
    }
    List<JavaFXHierarchyContainer> children=new ArrayList<>(ctner.getContainerList());
    for (    JavaFXHierarchyContainer child : children) {
      removeContainer(child);
    }
  }
  finally {
    m_lock.unlock();
  }
}
Program: 95785
Project: 95785
Buggy source:
@Override protected List<String> getComponentContext(Object component){
  JavaFXHierarchyContainer parent;
  JavaFXHierarchyContainer comp;
  List<String> context=new ArrayList<String>();
  if (component instanceof JavaFXHierarchyContainer) {
    comp=(JavaFXHierarchyContainer)component;
  }
 else {
    comp=getHierarchyContainer(component);
  }
  parent=(JavaFXHierarchyContainer)comp.getPrnt();
  if (parent != null) {
    JavaFXHierarchyContainer[] comps=parent.getChildren();
    for (int i=0; i < comps.length; i++) {
      JavaFXHierarchyContainer child=comps[i];
      if (!child.equals(comp)) {
        String toAdd=child.getName();
        context.add(toAdd);
      }
    }
  }
  return context;
}

Fixed version (ground truth):
@Override protected List<String> getComponentContext(Object component){
  JavaFXHierarchyContainer parent;
  JavaFXHierarchyContainer comp;
  List<String> context=new ArrayList<String>();
  if (component instanceof JavaFXHierarchyContainer) {
    comp=(JavaFXHierarchyContainer)component;
  }
 else {
    comp=getHierarchyContainer(component);
  }
  parent=(JavaFXHierarchyContainer)comp.getPrnt();
  if (parent != null) {
    List<JavaFXHierarchyContainer> comps=parent.getContainerList();
    for (    JavaFXHierarchyContainer child : comps) {
      if (!child.equals(comp)) {
        String toAdd=child.getName();
        context.add(toAdd);
      }
    }
  }
  return context;
}
Program: 95786
Project: 95786
Buggy source:
/** 
 * Checks for uniqueness of <code>name</code> for the components in <code>parent</code>.<br> If parent is null every name is unique, a null name is NEVER unique. If both parameters are null, false is returned. <br>
 * @param parent the hierarchy container containing the components which are checked.
 * @param name the name to check
 * @param container The component for which the name is being checked.
 * @return true if the name is treated as unique, false otherwise.
 */
protected boolean isUniqueName(JavaFXHierarchyContainer parent,String name,JavaFXHierarchyContainer container){
  if (name == null) {
    return false;
  }
  if (parent == null) {
    return true;
  }
  JavaFXHierarchyContainer[] compIDs=parent.getChildren();
  final int length=compIDs.length;
  for (int index=0; index < length; index++) {
    JavaFXHierarchyContainer childContainer=compIDs[index];
    String childName=childContainer.getName();
    if (name.equals(childName) && childContainer != container) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Checks for uniqueness of <code>name</code> for the components in <code>parent</code>.<br> If parent is null every name is unique, a null name is NEVER unique. If both parameters are null, false is returned. <br>
 * @param parent the hierarchy container containing the components which are checked.
 * @param name the name to check
 * @param container The component for which the name is being checked.
 * @return true if the name is treated as unique, false otherwise.
 */
protected boolean isUniqueName(JavaFXHierarchyContainer parent,String name,JavaFXHierarchyContainer container){
  if (name == null) {
    return false;
  }
  if (parent == null) {
    return true;
  }
  List<JavaFXHierarchyContainer> compIDs=parent.getContainerList();
  for (  JavaFXHierarchyContainer childContainer : compIDs) {
    String childName=childContainer.getName();
    if (name.equals(childName) && childContainer != container) {
      return false;
    }
  }
  return true;
}
Program: 95787
Project: 95787
Buggy source:
@Override public void onChanged(Change<? extends Object> c){
  c.next();
  List<? extends Object> changedObjects=c.getAddedSubList();
  for (  Object o : changedObjects) {
    m_hierarchy.createHierarchyFrom(o);
  }
  changedObjects=c.getRemoved();
  for (  Object o : changedObjects) {
    m_hierarchy.removeComponentFromHierarchy(o);
  }
}

Fixed version (ground truth):
@Override public void onChanged(Change<? extends Object> c){
  c.next();
  List<? extends Object> changedObjects=c.getRemoved();
  for (  Object o : changedObjects) {
    m_hierarchy.removeComponentFromHierarchy(o);
  }
  changedObjects=c.getAddedSubList();
  for (  Object o : changedObjects) {
    m_hierarchy.createHierarchyFrom(o);
  }
}
Program: 95788
Project: 95788
Buggy source:
/** 
 * Checks if this container has the given container as child container
 * @param child the child container
 * @return true if this container has the given container, false if not.
 */
public boolean contains(JavaFXHierarchyContainer child){
  JavaFXHierarchyContainer[] children=getChildren();
  for (  JavaFXHierarchyContainer cont : children) {
    if (cont.equals(child)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks if this container has the given container as child container
 * @param child the child container
 * @return true if this container has the given container, false if not.
 */
public boolean contains(JavaFXHierarchyContainer child){
  List<JavaFXHierarchyContainer> children=getContainerList();
  for (  JavaFXHierarchyContainer cont : children) {
    if (cont.equals(child)) {
      return true;
    }
  }
  return false;
}
Program: 95790
Project: 95790
Buggy source:
/** 
 * Removes a container from the hierarchy. This means that the following references will be removed: <br> -Container from the hierarchy Map <br> -The component of the given container from the real map <br> -The reference from the parent container to the given container <br> -The actions mentioned above for all children of this container
 * @param ctner the container that will be deleted
 */
public void removeContainer(JavaFXHierarchyContainer ctner){
  m_lock.lock();
  try {
    Map contMap=getHierarchyMap();
    Map realMap=getRealMap();
    JavaFXComponent fxComp=ctner.getComponent();
    fxComp.removeChangeListener();
    contMap.remove(ctner.getComponent());
    realMap.remove(fxComp.getRealComponent());
    JavaFXHierarchyContainer parent=(JavaFXHierarchyContainer)ctner.getPrnt();
    if (parent != null) {
      parent.remove(ctner);
    }
    List<JavaFXHierarchyContainer> children=new ArrayList<>(ctner.getContainerList());
    for (    JavaFXHierarchyContainer child : children) {
      removeContainer(child);
    }
  }
  finally {
    m_lock.unlock();
  }
}

Fixed version (ground truth):
/** 
 * Removes a container from the hierarchy. This means that the following references will be removed: <br> -Container from the hierarchy Map <br> -The component of the given container from the real map <br> -The reference from the parent container to the given container <br> -The actions mentioned above for all children of this container
 * @param ctner the container that will be deleted
 */
public void removeContainer(JavaFXHierarchyContainer ctner){
  lock.lock();
  try {
    Map contMap=getHierarchyMap();
    Map realMap=getRealMap();
    JavaFXComponent fxComp=ctner.getComponent();
    fxComp.removeChangeListener();
    contMap.remove(ctner.getComponent());
    realMap.remove(fxComp.getRealComponent());
    JavaFXHierarchyContainer parent=(JavaFXHierarchyContainer)ctner.getPrnt();
    if (parent != null) {
      parent.remove(ctner);
    }
    List<JavaFXHierarchyContainer> children=new ArrayList<>(ctner.getContainerList());
    for (    JavaFXHierarchyContainer child : children) {
      removeContainer(child);
    }
  }
  finally {
    lock.unlock();
  }
}
Program: 95791
Project: 95791
Buggy source:
/** 
 * Returns the lock of the hierarchy
 * @return the lock
 */
public ReentrantLock getLock(){
  return m_lock;
}

Fixed version (ground truth):
/** 
 * Returns the lock of the hierarchy
 * @return the lock
 */
public static ReentrantLock getLock(){
  return lock;
}
Program: 95792
Project: 95792
Buggy source:
/** 
 * Creates the Hierarchy from a given Object
 * @param o the Object
 */
public void createHierarchyFrom(Object o){
  m_lock.lock();
  try {
    Map realMap=getRealMap();
    Object parent=ParentGetter.get(o);
    Object lastParent=parent;
    while (parent != null) {
      if (realMap.containsKey(parent)) {
        lastParent=parent;
        break;
      }
      lastParent=parent;
      parent=ParentGetter.get(parent);
    }
    createHierarchy(lastParent == null ? o : lastParent);
  }
  finally {
    m_lock.unlock();
  }
}

Fixed version (ground truth):
/** 
 * Creates the Hierarchy from a given Object
 * @param o the Object
 */
public void createHierarchyFrom(Object o){
  lock.lock();
  try {
    Map realMap=getRealMap();
    Object parent=ParentGetter.get(o);
    Object lastParent=parent;
    while (parent != null) {
      if (realMap.containsKey(parent)) {
        lastParent=parent;
        break;
      }
      lastParent=parent;
      parent=ParentGetter.get(parent);
    }
    createHierarchy(lastParent == null ? o : lastParent);
  }
  finally {
    lock.unlock();
  }
}
Program: 95798
Project: 95798
Buggy source:
/** 
 * parses command line datadir parameter and set them into job object or sets default value for datadir otherwise <code>INVALID_VALUE</code> is set if the default datadir path is invalid 
 * @param cmd CommandLine
 * @param baseDatadirPath the default dataDir path
 */
private void parseDataDirOptions(CommandLine cmd,String baseDatadirPath){
  if (cmd.hasOption(ClientTestStrings.DATA_DIR)) {
    setDataDir(FileUtils.resolveAgainstBasePath(cmd.getOptionValue(ClientTestStrings.DATA_DIR),baseDatadirPath));
  }
 else {
    setDataDir((!StringUtils.isEmpty(baseDatadirPath)) ? baseDatadirPath : String.valueOf(TestexecConstants.INVALID_VALUE));
  }
}

Fixed version (ground truth):
/** 
 * parses command line datadir parameter and set them into job object or sets default value for datadir otherwise <code>INVALID_VALUE</code> is set if the default datadir path is invalid 
 * @param cmd CommandLine
 */
private void parseDataDirOptions(CommandLine cmd){
  String baseDatadirPath=getDefaultDataDirPath();
  if (cmd.hasOption(ClientTestStrings.DATA_DIR)) {
    setDataDir(FileUtils.resolveAgainstBasePath(cmd.getOptionValue(ClientTestStrings.DATA_DIR),baseDatadirPath));
  }
  if (getDataDir() == null) {
    setDataDir((!StringUtils.isEmpty(baseDatadirPath)) ? baseDatadirPath : String.valueOf(TestexecConstants.INVALID_VALUE));
  }
}
Program: 95801
Project: 95801
Buggy source:
/** 
 * checks if the given path is absolute and otherwise resolves it to the absolute against the base path
 * @param basePath the base path
 * @param path a path given by user
 * @return absolute path (the initial one or the resolved against the base path one)
 */
public static String resolveAgainstBasePath(String path,String basePath){
  File baseDir=new File(basePath);
  File fpath=new File(path);
  if (!fpath.isAbsolute()) {
    fpath=new File(baseDir,path);
  }
  return fpath.toString();
}

Fixed version (ground truth):
/** 
 * checks if the given path is absolute and otherwise resolves it to the absolute against the base path
 * @param basePath the base path
 * @param path a path given by user
 * @return absolute path (the initial one or the resolved against the base path one)
 */
public static String resolveAgainstBasePath(String path,String basePath){
  if (path == null || basePath == null) {
    return null;
  }
  File baseDir=new File(basePath);
  File fpath=new File(path);
  if (!fpath.isAbsolute()) {
    fpath=new File(baseDir,path);
  }
  return fpath.toString();
}
Program: 95807
Project: 95807
Buggy source:
@Override public void onChanged(Change<? extends Stage> change){
  change.next();
  for (  final Stage stage : change.getRemoved()) {
    hierarchy.removeComponentFromHierarchy(stage);
  }
  for (  final Stage stage : change.getAddedSubList()) {
    stage.setOnShown(new EventHandler<WindowEvent>(){
      @Override public void handle(      WindowEvent event){
        hierarchy.createHierarchyFrom(stage);
        stageResizeSync.register(stage);
        stage.setOnShown(null);
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void onChanged(Change<? extends Stage> change){
  change.next();
  for (  final Stage stage : change.getRemoved()) {
    hierarchy.removeComponentFromHierarchy(stage);
  }
  for (  final Stage stage : change.getAddedSubList()) {
    stage.addEventFilter(WindowEvent.WINDOW_SHOWN,new EventHandler<WindowEvent>(){
      @Override public void handle(      WindowEvent event){
        hierarchy.createHierarchyFrom(stage);
        stageResizeSync.register(stage);
        stage.removeEventFilter(WindowEvent.WINDOW_SHOWN,this);
      }
    }
);
  }
}
Program: 95808
Project: 95808
Buggy source:
@Override public void handle(WindowEvent event){
  hierarchy.createHierarchyFrom(stage);
  stageResizeSync.register(stage);
  stage.setOnShown(null);
}

Fixed version (ground truth):
@Override public void handle(WindowEvent event){
  hierarchy.createHierarchyFrom(stage);
  stageResizeSync.register(stage);
  stage.removeEventFilter(WindowEvent.WINDOW_SHOWN,this);
}
Program: 95810
Project: 95810
Buggy source:
/** 
 * @return true if init has been successful
 */
private boolean initPauseTestExecutionState(){
  ICommandService cmdService=(ICommandService)Plugin.getActivePart().getSite().getService(ICommandService.class);
  if (cmdService != null) {
    final Command command=cmdService.getCommand(RCPCommandIDs.PAUSE_TEST_SUITE);
    if (command != null) {
      final Display display=Plugin.getDisplay();
      ITestExecutionEventListener l=new ITestExecutionEventListener(){
        public void endTestExecution(){
          display.syncExec(new Runnable(){
            public void run(){
              State state=command.getState(RegistryToggleState.STATE_ID);
              state.setValue(false);
            }
          }
);
          ClientTest.instance().removeTestExecutionEventListener(this);
        }
        public void stateChanged(        final TestExecutionEvent tee){
          display.syncExec(new Runnable(){
            public void run(){
              State state=command.getState(RegistryToggleState.STATE_ID);
              boolean newToggleStateValue=tee.getState() == org.eclipse.jubula.client.core.businessprocess.TestExecutionEvent.State.TEST_EXEC_PAUSED;
              state.setValue(newToggleStateValue);
            }
          }
);
        }
      }
;
      ClientTest.instance().addTestExecutionEventListener(l);
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @param event the execution event
 * @return true if init has been successful
 */
private boolean initPauseTestExecutionState(ExecutionEvent event){
  ICommandService cmdService=(ICommandService)HandlerUtil.getActiveWorkbenchWindow(event).getService(ICommandService.class);
  if (cmdService != null) {
    final Command command=cmdService.getCommand(RCPCommandIDs.PAUSE_TEST_SUITE);
    if (command != null) {
      final Display display=Plugin.getDisplay();
      ITestExecutionEventListener l=new ITestExecutionEventListener(){
        public void endTestExecution(){
          display.syncExec(new Runnable(){
            public void run(){
              State state=command.getState(RegistryToggleState.STATE_ID);
              state.setValue(false);
            }
          }
);
          ClientTest.instance().removeTestExecutionEventListener(this);
        }
        public void stateChanged(        final TestExecutionEvent tee){
          display.syncExec(new Runnable(){
            public void run(){
              State state=command.getState(RegistryToggleState.STATE_ID);
              boolean newToggleStateValue=tee.getState() == org.eclipse.jubula.client.core.businessprocess.TestExecutionEvent.State.TEST_EXEC_PAUSED;
              state.setValue(newToggleStateValue);
            }
          }
);
        }
      }
;
      ClientTest.instance().addTestExecutionEventListener(l);
      return true;
    }
  }
  return false;
}
Program: 95811
Project: 95811
Buggy source:
/** 
 * init the GUI test execution part
 * @return whether initialisation has been successful
 */
protected boolean initTestExecution(){
  return initTestExecutionRelevantFlag() && initPauseTestExecutionState();
}

Fixed version (ground truth):
/** 
 * init the GUI test execution part
 * @param event the execution event
 * @return whether initialization has been successful
 */
protected boolean initTestExecution(ExecutionEvent event){
  return initTestExecutionRelevantFlag() && initPauseTestExecutionState(event);
}
Program: 95812
Project: 95812
Buggy source:
public void run(){
  if (prepareTestExecution() && initTestExecution()) {
    prepareOk.set(true);
  }
}

Fixed version (ground truth):
public void run(){
  if (prepareTestExecution() && initTestExecution(event)) {
    prepareOk.set(true);
  }
}
Program: 95813
Project: 95813
Buggy source:
/** 
 * {@inheritDoc}
 */
public Object executeImpl(ExecutionEvent event) throws ExecutionException {
  Object testJobToStartObj=null;
  ITestJobPO testJobToStart=null;
  testJobToStartObj=event.getObjectParameterForExecution(TEST_JOB_TO_START);
  if (testJobToStartObj instanceof ITestJobPO) {
    testJobToStart=(ITestJobPO)testJobToStartObj;
    final ITestJobPO finalTestJob=testJobToStart;
    final boolean autoScreenshots=Plugin.getDefault().getPreferenceStore().getBoolean(Constants.AUTO_SCREENSHOT_KEY);
    final String jobName=Messages.UIJobStartTestJob;
    Job startTestJobJob=new Job(jobName){
      protected IStatus run(      IProgressMonitor monitor){
        monitor.beginTask(jobName,IProgressMonitor.UNKNOWN);
        final AtomicBoolean prepareOk=new AtomicBoolean(false);
        Plugin.getDisplay().syncExec(new Runnable(){
          public void run(){
            if (prepareTestExecution() && initTestExecution()) {
              prepareOk.set(true);
            }
          }
        }
);
        if (prepareOk.get()) {
          ClientTest.instance().startTestJob(finalTestJob,WorkingLanguageBP.getInstance().getWorkingLanguage(),autoScreenshots);
        }
        monitor.done();
        return Status.OK_STATUS;
      }
    }
;
    startTestJobJob.setSystem(true);
    JobUtils.executeJob(startTestJobJob,null);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public Object executeImpl(final ExecutionEvent event) throws ExecutionException {
  Object testJobToStartObj=null;
  ITestJobPO testJobToStart=null;
  testJobToStartObj=event.getObjectParameterForExecution(TEST_JOB_TO_START);
  if (testJobToStartObj instanceof ITestJobPO) {
    testJobToStart=(ITestJobPO)testJobToStartObj;
    final ITestJobPO finalTestJob=testJobToStart;
    final boolean autoScreenshots=Plugin.getDefault().getPreferenceStore().getBoolean(Constants.AUTO_SCREENSHOT_KEY);
    final String jobName=Messages.UIJobStartTestJob;
    Job startTestJobJob=new Job(jobName){
      protected IStatus run(      IProgressMonitor monitor){
        monitor.beginTask(jobName,IProgressMonitor.UNKNOWN);
        final AtomicBoolean prepareOk=new AtomicBoolean(false);
        Plugin.getDisplay().syncExec(new Runnable(){
          public void run(){
            if (prepareTestExecution() && initTestExecution(event)) {
              prepareOk.set(true);
            }
          }
        }
);
        if (prepareOk.get()) {
          ClientTest.instance().startTestJob(finalTestJob,WorkingLanguageBP.getInstance().getWorkingLanguage(),autoScreenshots);
        }
        monitor.done();
        return Status.OK_STATUS;
      }
    }
;
    startTestJobJob.setSystem(true);
    JobUtils.executeJob(startTestJobJob,null);
  }
  return null;
}
Program: 95815
Project: 95815
Buggy source:
/** 
 * Checks whether a node is a descendant of a node
 * @param candidate the possible descendant
 * @param node the node
 * @return whether the candidate is a descendant of the other node
 */
private static boolean isDescendant(Node candidate,Node node){
  if (node instanceof Parent) {
    List<Node> children=((Parent)node).getChildrenUnmodifiable();
    if (children.contains(candidate)) {
      return true;
    }
    for (    Node child : children) {
      if (isDescendant(candidate,child)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks whether a node is a descendant of a node
 * @param candidate the possible descendant
 * @param node the node
 * @return whether the candidate is a descendant of the other node
 */
private static boolean isDescendant(Node candidate,Node node){
  if (candidate == null) {
    return false;
  }
 else   if (candidate == node) {
    return true;
  }
  return isDescendant(candidate.getParent(),node);
}
Program: 95816
Project: 95816
Buggy source:
/** 
 * Filters out all parent in a list of matches
 * @param matches the matches
 * @return the filtered list
 */
private static List<Node> filterMatches(List<Node> matches){
  List<Node> filteredMatches=new ArrayList<Node>();
  checkMatches:   for (  Node match : matches) {
    if (match instanceof Parent) {
      for (      Node otherMatch : matches) {
        if (!otherMatch.equals(match)) {
          if (isDescendant(otherMatch,match)) {
            continue checkMatches;
          }
        }
      }
    }
    filteredMatches.add(match);
  }
  return filteredMatches;
}

Fixed version (ground truth):
/** 
 * Filters out all parent in a list of matches
 * @param matches the matches
 * @return the filtered list
 */
private static Node filterMatches(List<Node> matches){
  Node youngesCommonAncestor=findFirstCommonAncestor(matches);
  return topMostDescendant((Parent)youngesCommonAncestor,matches);
}
Program: 95817
Project: 95817
Buggy source:
/** 
 * Returns the node under the given point
 * @param pos the point
 * @return the component
 */
public static Node getComponentByPos(Point2D pos){
  List<? extends Node> comps=getAssignableFrom(Node.class);
  List<Node> matches=new ArrayList<Node>();
  for (  Node n : comps) {
    Set supportetTypes=AUTServerConfiguration.getInstance().getSupportedTypes();
    for (    Object object : supportetTypes) {
      if (((ComponentClass)object).getName().equals(n.getClass().getName()) && NodeBounds.checkIfContains(pos,n)) {
        matches.add(n);
      }
    }
  }
  if (matches.size() == 0) {
    return null;
  }
  if (matches.size() == 1) {
    return matches.get(0);
  }
  matches=filterMatches(matches);
  if (matches.size() == 1) {
    return matches.get(0);
  }
  return guessBestPick(matches);
}

Fixed version (ground truth):
/** 
 * Returns the node under the given point
 * @param pos the point
 * @return the component
 */
public static Node getComponentByPos(Point2D pos){
  List<? extends Node> comps=getAssignableFrom(Node.class);
  List<Node> matches=new ArrayList<Node>();
  for (  Node n : comps) {
    if (n.getScene() == null) {
      continue;
    }
    Set supportetTypes=AUTServerConfiguration.getInstance().getSupportedTypes();
    for (    Object object : supportetTypes) {
      if (((ComponentClass)object).getName().equals(n.getClass().getName()) && NodeBounds.checkIfContains(pos,n)) {
        matches.add(n);
      }
    }
  }
  if (matches.size() == 0) {
    return null;
  }
  if (matches.size() == 1) {
    return matches.get(0);
  }
  return filterMatches(matches);
}
Program: 95818
Project: 95818
Buggy source:
/** 
 * Checks if the given point with coordinates relative to the scene is in the given Node.
 * @param point the Point
 * @param n the Node
 * @return true if the Point is in the Node, false if not.
 */
public static boolean checkIfContains(Point2D point,Node n){
  Point2D nodePos=n.localToScreen(0,0);
  if (nodePos == null) {
    return false;
  }
  BoundingBox box=new BoundingBox(nodePos.getX(),nodePos.getY(),n.getBoundsInParent().getWidth(),n.getBoundsInParent().getHeight());
  return box.contains(point);
}

Fixed version (ground truth):
/** 
 * Must be called from FX Thread. Checks if the given point with coordinates relative to the scene is in the given Node.
 * @param point the Point
 * @param n the Node
 * @return true if the Point is in the Node, false if not.
 */
public static boolean checkIfContains(Point2D point,Node n) throws IllegalStateException {
  EventThreadQueuerJavaFXImpl.checkEventThread();
  if (n.getScene() == null) {
    return false;
  }
  Point2D nodePos=n.localToScreen(0,0);
  if (nodePos == null) {
    return false;
  }
  BoundingBox box=new BoundingBox(nodePos.getX(),nodePos.getY(),n.getBoundsInParent().getWidth(),n.getBoundsInParent().getHeight());
  return box.contains(point);
}
Program: 95819
Project: 95819
Buggy source:
/** 
 * Adds a handler to the stage
 * @param handler the handler
 */
private void addToolkitEventListener(AbstractFXAUTEventHandler handler){
  List<? extends Stage> stages=ComponentHandler.getAssignableFromType(Stage.class);
  for (  final Stage stage : stages) {
    handler.addHandler(stage);
  }
}

Fixed version (ground truth):
/** 
 * Adds a handler to the stage
 * @param handler the handler
 */
private void addToolkitEventListener(AbstractFXAUTEventHandler handler){
  List<? extends Stage> stages=ComponentHandler.getAssignableFromType(Stage.class);
  for (  final Stage stage : stages) {
    handler.addHandler(stage);
  }
  CurrentStages.addStagesListener(handler);
}
Program: 95820
Project: 95820
Buggy source:
/** 
 * removes a handler from the stage
 * @param handler the handler
 */
private void removeToolkitEventListener(AbstractFXAUTEventHandler handler){
  List<? extends Stage> stages=ComponentHandler.getAssignableFromType(Stage.class);
  for (  Stage stage : stages) {
    handler.removeHandler(stage);
  }
}

Fixed version (ground truth):
/** 
 * removes a handler from the stage
 * @param handler the handler
 */
private void removeToolkitEventListener(AbstractFXAUTEventHandler handler){
  List<? extends Stage> stages=ComponentHandler.getAssignableFromType(Stage.class);
  for (  Stage stage : stages) {
    handler.removeHandler(stage);
  }
  CurrentStages.removeStagesListener(handler);
}
Program: 95821
Project: 95821
Buggy source:
@Override protected IMenuItemComponent newMenuItemAdapter(Object component){
  return new MenuItemAdapter((MenuItem)component);
}

Fixed version (ground truth):
@Override protected IMenuItemComponent newMenuItemAdapter(Object component){
  return new MenuItemAdapter<MenuItem>((MenuItem)component);
}
Program: 95822
Project: 95822
Buggy source:
/** 
 * Enables or disables the confirmer. If the confirmer is enabled, the JavaFX Filter is added to the currently focused stage so that the confirmer starts storing events of the configured class of events. If it is disabled, the listener is removed from the AWT event queue.
 * @param enabled <code>true</code> or <code>false</code>.
 */
public void setEnabled(boolean enabled){
  m_enabled=enabled;
  m_eventList.clear();
  if (m_enabled) {
    long[] masks=m_options.getEventMask();
    for (int i=0; i < masks.length; i++) {
      for (      ReadOnlyObjectProperty<? extends Window> w : m_sceneGraphs) {
        if (w.getValue() == null) {
          m_sceneGraphs.remove(w);
          continue;
        }
        w.getValue().addEventFilter(JavaFXEventConverter.awtToFX(masks[i]),this);
      }
    }
  }
 else {
    long[] masks=m_options.getEventMask();
    for (int i=0; i < masks.length; i++) {
      for (      ReadOnlyObjectProperty<? extends Window> w : m_sceneGraphs) {
        if (w.getValue() == null) {
          m_sceneGraphs.remove(w);
          continue;
        }
        w.getValue().removeEventFilter(JavaFXEventConverter.awtToFX(masks[i]),this);
      }
    }
    m_eventList.clear();
  }
}

Fixed version (ground truth):
/** 
 * Enables or disables the confirmer. If the confirmer is enabled, the JavaFX Filter is added to the currently focused stage so that the confirmer starts storing events of the configured class of events. If it is disabled, the listener is removed from the AWT event queue.
 * @param enabled <code>true</code> or <code>false</code>.
 */
public void setEnabled(boolean enabled){
  m_enabled=enabled;
  m_eventList.clear();
  if (m_enabled) {
    final long[] masks=m_options.getEventMask();
    for (int i=0; i < masks.length; i++) {
      for (      final ReadOnlyObjectProperty<? extends Window> w : m_sceneGraphs) {
        if (w.getValue() == null) {
          m_sceneGraphs.remove(w);
          continue;
        }
        final Window win=w.get();
        final long mask=masks[i];
        final RobotEventConfirmerJavaFXImpl me=this;
        EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Void>(){
          @Override public Void call() throws Exception {
            win.addEventFilter(JavaFXEventConverter.awtToFX(mask),new WeakEventHandler<>(me));
            return null;
          }
        }
);
      }
    }
  }
 else {
    long[] masks=m_options.getEventMask();
    for (int i=0; i < masks.length; i++) {
      for (      ReadOnlyObjectProperty<? extends Window> w : m_sceneGraphs) {
        if (w.getValue() == null) {
          m_sceneGraphs.remove(w);
          continue;
        }
        final Window win=w.get();
        final long mask=masks[i];
        final RobotEventConfirmerJavaFXImpl me=this;
        EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Void>(){
          @Override public Void call() throws Exception {
            win.removeEventFilter(JavaFXEventConverter.awtToFX(mask),new WeakEventHandler<>(me));
            return null;
          }
        }
);
      }
    }
  }
}
Program: 95824
Project: 95824
Buggy source:
@Override public void cleanUp(){
  HighlightNode.clean();
}

Fixed version (ground truth):
@Override public void cleanUp(){
  lowlightCurrentNode();
}
Program: 95825
Project: 95825
Buggy source:
/** 
 * Highlights the current Node
 */
public void highlightCurrentNode(){
  if (m_currentNode != null) {
    HighlightNode.drawHighlight(m_currentNode);
  }
}

Fixed version (ground truth):
/** 
 * Highlights the current Node
 */
public void highlightCurrentNode(){
  if (m_currentNode != null) {
    EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Void>(){
      @Override public Void call() throws Exception {
        HighlightNode.drawHighlight(m_currentNode);
        return null;
      }
    }
);
  }
}
Program: 95826
Project: 95826
Buggy source:
/** 
 * Lowlights the current Node
 */
public void lowlightCurrentNode(){
  if (m_currentNode != null) {
    HighlightNode.removeHighlight(m_currentNode);
  }
}

Fixed version (ground truth):
/** 
 * Lowlights the current Node
 */
public void lowlightCurrentNode(){
  if (m_currentNode != null) {
    EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Void>(){
      @Override public Void call() throws Exception {
        HighlightNode.removeHighlight(m_currentNode);
        return null;
      }
    }
);
  }
}
Program: 95828
Project: 95828
Buggy source:
/** 
 * clears the content of client
 * @param alsoProjectIndependent whether also project independent editors should be closed such as the testresultviewer
 */
public static void clearClient(final boolean alsoProjectIndependent){
  final DataEventDispatcher ded=DataEventDispatcher.getInstance();
  TestExecution.getInstance().stopExecution();
  GeneralStorage gs=GeneralStorage.getInstance();
  if (gs != null && Persistor.instance() != null) {
    IProjectPO currProj=gs.getProject();
    if (currProj != null) {
      gs.setProject(null);
    }
    gs.reset();
  }
  Plugin.getDisplay().syncExec(new Runnable(){
    public void run(){
      final ProblemsBP problemsBP=ProblemsBP.getInstance();
      problemsBP.clearOldProblems();
      problemsBP.cleanupProblems();
      TestExecutionContributor.getInstance().getClientTest().resetToTesting();
      ded.fireRecordModeStateChanged(RecordModeState.notRunning);
      ded.fireOMStateChanged(OMState.notRunning);
      ded.fireProjectStateChanged(ProjectState.closed);
      Plugin.closeAllOpenedJubulaEditors(alsoProjectIndependent);
      ded.fireTestresultChanged(TestresultState.Refresh);
      setTreeViewerInputNull(Constants.TESTRE_ID);
      for (      TestCaseBrowser tcb : MultipleTCBTracker.getInstance().getOpenTCBs()) {
        tcb.getTreeViewer().setInput(null);
      }
      setTreeViewerInputNull(Constants.TS_BROWSER_ID);
      setTreeViewerInputNull(Constants.COMPNAMEBROWSER_ID);
      clearAnalyzeResultPage();
    }
  }
);
  ded.fireProjectLoadedListener(new NullProgressMonitor());
}

Fixed version (ground truth):
/** 
 * clears the content of client
 * @param alsoProjectIndependent whether also project independent editors should be closed such as the testresultviewer
 */
public static void clearClient(final boolean alsoProjectIndependent){
  final DataEventDispatcher ded=DataEventDispatcher.getInstance();
  TestExecution.getInstance().stopExecution();
  GeneralStorage gs=GeneralStorage.getInstance();
  if (gs != null && Persistor.instance() != null) {
    IProjectPO currProj=gs.getProject();
    if (currProj != null) {
      gs.setProject(null);
    }
    gs.reset();
  }
  Plugin.getDisplay().syncExec(new Runnable(){
    public void run(){
      final ProblemsBP problemsBP=ProblemsBP.getInstance();
      problemsBP.clearOldProblems();
      problemsBP.cleanupProblems();
      TestExecutionContributor.getInstance().getClientTest().resetToTesting();
      ded.fireRecordModeStateChanged(RecordModeState.notRunning);
      ded.fireOMStateChanged(OMState.notRunning);
      ded.fireProjectStateChanged(ProjectState.closed);
      Plugin.closeAllOpenedJubulaEditors(alsoProjectIndependent);
      ded.fireTestresultChanged(TestresultState.Clear);
      setTreeViewerInputNull(Constants.TESTRE_ID);
      for (      TestCaseBrowser tcb : MultipleTCBTracker.getInstance().getOpenTCBs()) {
        tcb.getTreeViewer().setInput(null);
      }
      setTreeViewerInputNull(Constants.TS_BROWSER_ID);
      setTreeViewerInputNull(Constants.COMPNAMEBROWSER_ID);
      clearAnalyzeResultPage();
    }
  }
);
  ded.fireProjectLoadedListener(new NullProgressMonitor());
}
Program: 95829
Project: 95829
Buggy source:
public void run(){
  final ProblemsBP problemsBP=ProblemsBP.getInstance();
  problemsBP.clearOldProblems();
  problemsBP.cleanupProblems();
  TestExecutionContributor.getInstance().getClientTest().resetToTesting();
  ded.fireRecordModeStateChanged(RecordModeState.notRunning);
  ded.fireOMStateChanged(OMState.notRunning);
  ded.fireProjectStateChanged(ProjectState.closed);
  Plugin.closeAllOpenedJubulaEditors(alsoProjectIndependent);
  ded.fireTestresultChanged(TestresultState.Refresh);
  setTreeViewerInputNull(Constants.TESTRE_ID);
  for (  TestCaseBrowser tcb : MultipleTCBTracker.getInstance().getOpenTCBs()) {
    tcb.getTreeViewer().setInput(null);
  }
  setTreeViewerInputNull(Constants.TS_BROWSER_ID);
  setTreeViewerInputNull(Constants.COMPNAMEBROWSER_ID);
  clearAnalyzeResultPage();
}

Fixed version (ground truth):
public void run(){
  final ProblemsBP problemsBP=ProblemsBP.getInstance();
  problemsBP.clearOldProblems();
  problemsBP.cleanupProblems();
  TestExecutionContributor.getInstance().getClientTest().resetToTesting();
  ded.fireRecordModeStateChanged(RecordModeState.notRunning);
  ded.fireOMStateChanged(OMState.notRunning);
  ded.fireProjectStateChanged(ProjectState.closed);
  Plugin.closeAllOpenedJubulaEditors(alsoProjectIndependent);
  ded.fireTestresultChanged(TestresultState.Clear);
  setTreeViewerInputNull(Constants.TESTRE_ID);
  for (  TestCaseBrowser tcb : MultipleTCBTracker.getInstance().getOpenTCBs()) {
    tcb.getTreeViewer().setInput(null);
  }
  setTreeViewerInputNull(Constants.TS_BROWSER_ID);
  setTreeViewerInputNull(Constants.COMPNAMEBROWSER_ID);
  clearAnalyzeResultPage();
}
Program: 95830
Project: 95830
Buggy source:
/** 
 * Returns the IEditorPart for the given node or null if no editor is opend for the given node
 * @param po the persistent object of the wanted editor
 * @return the IEditorPart or null if no editor found
 */
public static IEditorPart getEditorByPO(IPersistentObject po){
  IEditorReference editorRef=getEditorRefByPO(po);
  if (editorRef != null) {
    return editorRef.getEditor(false);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the IEditorPart for the given node or null if no editor is opened for the given node
 * @param po the persistent object of the wanted editor
 * @return the IEditorPart or null if no editor found
 */
public static IEditorPart getEditorByPO(IPersistentObject po){
  IEditorReference editorRef=getEditorRefByPO(po);
  if (editorRef != null) {
    return editorRef.getEditor(false);
  }
  return null;
}
Program: 95831
Project: 95831
Buggy source:
/** 
 * Returns the IEditorReference for the given node or null if no editor is opend for the given node
 * @param po the persistent object of the wanted editor
 * @return the IEditorReference or null if no editor found
 */
public static IEditorReference getEditorRefByPO(IPersistentObject po){
  for (  IEditorReference editorRef : Plugin.getAllEditors()) {
    PersistableEditorInput pei=null;
    try {
      pei=(PersistableEditorInput)editorRef.getEditorInput().getAdapter(PersistableEditorInput.class);
    }
 catch (    PartInitException e) {
    }
    if (pei != null && pei.getNode().equals(po)) {
      return editorRef;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the IEditorReference for the given node or null if no editor is opened for the given node
 * @param po the persistent object of the wanted editor
 * @return the IEditorReference or null if no editor found
 */
public static IEditorReference getEditorRefByPO(IPersistentObject po){
  for (  IEditorReference editorRef : Plugin.getAllEditors()) {
    PersistableEditorInput pei=null;
    try {
      pei=(PersistableEditorInput)editorRef.getEditorInput().getAdapter(PersistableEditorInput.class);
    }
 catch (    PartInitException e) {
    }
    if (pei != null && pei.getNode().equals(po)) {
      return editorRef;
    }
  }
  return null;
}
Program: 95832
Project: 95832
Buggy source:
/** 
 * {@inheritDoc} 
 */
public boolean testImpl(Object receiver,String property,Object[] args){
  ITestResultSummaryPO summary=(ITestResultSummaryPO)receiver;
  if (property.equals(HAS_MONITORING_DATA_PROP)) {
    return summary.isReportWritten();
  }
  final EntityManager masterSession=GeneralStorage.getInstance().getMasterSession();
  if (property.equals(HAS_TEST_RESULT_DETAILS_PROP)) {
    return TestResultPM.hasTestResultDetails(masterSession,summary.getId());
  }
 else   if (property.equals(HAS_PENDING_ALM_REPORT_PROP)) {
    return hasPendingALMReport(summary,masterSession);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public boolean testImpl(Object receiver,String property,Object[] args){
  final GeneralStorage instance=GeneralStorage.getInstance();
  if (instance != null) {
    final EntityManager masterSession=instance.getMasterSession();
    if (masterSession.isOpen()) {
      ITestResultSummaryPO summary=(ITestResultSummaryPO)receiver;
      if (property.equals(HAS_MONITORING_DATA_PROP)) {
        return summary.isReportWritten();
      }
      if (property.equals(HAS_TEST_RESULT_DETAILS_PROP)) {
        return TestResultPM.hasTestResultDetails(masterSession,summary.getId());
      }
 else       if (property.equals(HAS_PENDING_ALM_REPORT_PROP)) {
        return hasPendingALMReport(summary,masterSession);
      }
    }
  }
  return false;
}
Program: 95834
Project: 95834
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void handleTestresultChanged(TestresultState state){
  if (state == TestresultState.Clear) {
    clear();
  }
 else   if (state == TestresultState.Refresh) {
    loadViewInput();
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void handleTestresultChanged(TestresultState state){
switch (state) {
case Clear:
    clear();
  break;
case Refresh:
loadViewInput();
break;
default :
break;
}
}
Program: 95835
Project: 95835
Buggy source:
/** 
 * Clears the view (table).
 */
public void clear(){
  m_tableViewer.getTable().getDisplay().syncExec(new Runnable(){
    public void run(){
      m_tableViewer.setSelection(StructuredSelection.EMPTY);
      m_tableViewer.setInput(null);
      m_tableViewer.refresh();
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Clears the view (table).
 */
public void clear(){
  m_tableViewer.getControl().getDisplay().syncExec(new Runnable(){
    public void run(){
      m_tableViewer.setSelection(StructuredSelection.EMPTY);
      m_tableViewer.setInput(ArrayUtils.EMPTY_OBJECT_ARRAY);
      m_tableViewer.refresh(true);
    }
  }
);
}
Program: 95836
Project: 95836
Buggy source:
/** 
 * Performs special processing when this page's Restore Defaults button has been pressed. Sets the contents of the nameEntry field to be the default
 */
protected void performDefaults(){
  m_minimize.setSelection(m_store.getDefaultBoolean(Constants.MINIMIZEONSUITESTART_KEY));
  m_treeScroll.setSelection(m_store.getDefaultBoolean(Constants.TREEAUTOSCROLL_KEY));
  m_askStopAUT.setSelection(m_store.getDefaultBoolean(Constants.ASKSTOPAUT_KEY));
  m_showOrigName.setSelection(m_store.getDefaultBoolean(Constants.SHOWORIGINALNAME_KEY));
  m_capInfoCheckbox.setSelection(m_store.getDefaultBoolean(Constants.SHOWCAPINFO_KEY));
  m_showTransientChildrenCheckBox.setSelection(m_store.getDefaultBoolean(Constants.SHOW_TRANSIENT_CHILDREN_KEY));
  m_loadDefaultProjectCheckBox.setSelection(m_store.getDefaultBoolean(Constants.PERFORM_AUTO_PROJECT_LOAD_KEY));
  m_perspChangeValue=m_store.getDefaultInt(Constants.PERSP_CHANGE_KEY);
  m_rememberValue=m_store.getDefaultBoolean(Constants.REMEMBER_KEY);
  setRadioSelection();
  m_dataDirIsWorkspaceValue=m_store.getDefaultBoolean(Constants.DATADIR_WS_KEY);
  setDataDirFields();
  m_dataDirPathTextfield.setText(m_store.getDefaultString(Constants.DATADIR_PATH_KEY));
  validatePage();
}

Fixed version (ground truth):
/** 
 * Performs special processing when this page's Restore Defaults button has been pressed. Sets the contents of the nameEntry field to be the default
 */
protected void performDefaults(){
  m_minimize.setSelection(m_store.getDefaultBoolean(Constants.MINIMIZEONSUITESTART_KEY));
  m_treeScroll.setSelection(m_store.getDefaultBoolean(Constants.TREEAUTOSCROLL_KEY));
  m_askStopAUT.setSelection(m_store.getDefaultBoolean(Constants.ASKSTOPAUT_KEY));
  m_showOrigName.setSelection(m_store.getDefaultBoolean(Constants.SHOWORIGINALNAME_KEY));
  m_capInfoCheckbox.setSelection(m_store.getDefaultBoolean(Constants.SHOWCAPINFO_KEY));
  m_showTransientChildrenCheckBox.setSelection(m_store.getDefaultBoolean(Constants.SHOW_TRANSIENT_CHILDREN_KEY));
  m_compNamesContentAssistTime.setText(m_store.getDefaultString(Constants.MILLIS_TO_OPEN_COMP_NAMES_CONTENT_PROPOSAL));
  m_loadDefaultProjectCheckBox.setSelection(m_store.getDefaultBoolean(Constants.PERFORM_AUTO_PROJECT_LOAD_KEY));
  m_perspChangeValue=m_store.getDefaultInt(Constants.PERSP_CHANGE_KEY);
  m_rememberValue=m_store.getDefaultBoolean(Constants.REMEMBER_KEY);
  setRadioSelection();
  m_dataDirIsWorkspaceValue=m_store.getDefaultBoolean(Constants.DATADIR_WS_KEY);
  setDataDirFields();
  m_dataDirPathTextfield.setText(m_store.getDefaultString(Constants.DATADIR_PATH_KEY));
  validatePage();
}
Program: 95838
Project: 95838
Buggy source:
/** 
 * Opens the proposals for the component name
 */
private void openContentProposals(){
  Display display=Workbench.getInstance().getDisplay();
  Event ctrlEvent=new Event();
  ctrlEvent.type=SWT.KeyDown;
  ctrlEvent.keyCode=SWT.CTRL;
  display.post(ctrlEvent);
  Event spaceEvent=new Event();
  spaceEvent.type=SWT.KeyDown;
  spaceEvent.character=SWT.SPACE;
  display.post(spaceEvent);
  try {
    Thread.sleep(10);
  }
 catch (  InterruptedException ie) {
  }
  ctrlEvent.type=SWT.KeyUp;
  display.post(ctrlEvent);
  spaceEvent.type=SWT.KeyUp;
  display.post(spaceEvent);
}

Fixed version (ground truth):
/** 
 * Opens the proposals for the component name
 */
private void openContentProposals(){
  if (m_contentProposalAdapter.isProposalPopupOpen()) {
    return;
  }
  Event triggerEvent=new Event();
  triggerEvent.character=SWT.SPACE;
  triggerEvent.doit=true;
  triggerEvent.keyCode=SWT.SPACE;
  triggerEvent.stateMask=SWT.MOD1;
  triggerEvent.type=SWT.KeyDown;
  triggerEvent.widget=this;
  notifyListeners(SWT.KeyDown,triggerEvent);
}
Program: 95839
Project: 95839
Buggy source:
/** 
 * Opens the proposals for the component name
 */
private void openContentProposals(){
  if (m_contentProposalAdapter.isProposalPopupOpen()) {
    return;
  }
  Event triggerEvent=new Event();
  triggerEvent.character=SWT.SPACE;
  triggerEvent.doit=true;
  triggerEvent.keyCode=SWT.SPACE;
  triggerEvent.stateMask=SWT.CTRL;
  triggerEvent.type=SWT.KeyDown;
  triggerEvent.widget=this;
  notifyListeners(SWT.KeyDown,triggerEvent);
}

Fixed version (ground truth):
/** 
 * Opens the proposals for the component name
 */
private void openContentProposals(){
  if (!isDisposed()) {
    if (m_contentProposalAdapter.isProposalPopupOpen()) {
      return;
    }
    Event triggerEvent=new Event();
    triggerEvent.character=SWT.SPACE;
    triggerEvent.doit=true;
    triggerEvent.keyCode=SWT.SPACE;
    triggerEvent.stateMask=SWT.CTRL;
    triggerEvent.type=SWT.KeyDown;
    triggerEvent.widget=this;
    notifyListeners(SWT.KeyDown,triggerEvent);
  }
}