nus-yam/ex-repair huggingface dataset:
Program: 124292
Project: 124292
Buggy source:
public boolean finish(){
  BusyIndicator.showWhile(Display.getDefault(),new Runnable(){
    public void run(){
      for (Iterator<File> iter=newJarFiles.values().iterator(); iter.hasNext(); ) {
        File file=iter.next();
        try {
          CorePlugin.getDefault().getLibrariesService().deployLibrary(file.toURL());
        }
 catch (        Exception e) {
          ExceptionHandler.process(e);
        }
      }
      try {
        CorePlugin.getDefault().getProxyRepositoryFactory().save(getSelectedRoutine());
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
      }
      CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
    }
  }
);
  return true;
}

Fixed version (ground truth):
public boolean finish(){
  BusyIndicator.showWhile(Display.getDefault(),new Runnable(){
    public void run(){
      for (Iterator<File> iter=newJarFiles.values().iterator(); iter.hasNext(); ) {
        File file=iter.next();
        try {
          CorePlugin.getDefault().getLibrariesService().deployLibrary(file.toURL());
        }
 catch (        Exception e) {
          ExceptionHandler.process(e);
        }
      }
      try {
        CorePlugin.getDefault().getProxyRepositoryFactory().save(getSelectedRoutine());
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
      }
      CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();
      CorePlugin.getDefault().getRunProcessService().updateLibraries(new HashSet<String>(),null);
    }
  }
);
  return true;
}
Program: 124293
Project: 124293
Buggy source:
public void loadXmlFile(boolean loadScreenshots){
  this.loadScreenshots=loadScreenshots;
  init();
  Hashtable<String,Node> nodesHashtable=new Hashtable<String,Node>();
  setActivate(false);
  ProcessType processType=getProcessType();
  if (processType.getParameters() != null) {
    routinesDependencies=new ArrayList<RoutinesParameterType>(processType.getParameters().getRoutinesParameter());
  }
  loadProjectParameters(processType);
  try {
    loadNodes(processType,nodesHashtable);
  }
 catch (  PersistenceException e) {
    return;
  }
  repositoryId=processType.getRepositoryContextId();
  loadConnections(processType,nodesHashtable);
  loadRejectConnector(nodesHashtable);
  loadContexts(processType);
  loadNotes(processType);
  loadSubjobs(processType);
  initExternalComponents();
  setActivate(true);
  checkStartNodes();
  checkNodeTableParameters();
  XmiResourceManager resourceManager=new XmiResourceManager();
  if (this.loadScreenshots) {
    if (property.eResource() != null) {
      resourceManager.loadScreenshots(property,processType);
    }
  }
  this.updateManager.retrieveRefInformation();
}

Fixed version (ground truth):
public void loadXmlFile(boolean loadScreenshots){
  this.loadScreenshots=loadScreenshots;
  init();
  Hashtable<String,Node> nodesHashtable=new Hashtable<String,Node>();
  setActivate(false);
  ProcessType processType=getProcessType();
  if (processType.getParameters() != null) {
    routinesDependencies=new ArrayList<RoutinesParameterType>(processType.getParameters().getRoutinesParameter());
  }
  loadProjectParameters(processType);
  try {
    loadNodes(processType,nodesHashtable);
  }
 catch (  PersistenceException e) {
    return;
  }
  repositoryId=processType.getRepositoryContextId();
  loadConnections(processType,nodesHashtable);
  loadRejectConnector(nodesHashtable);
  loadContexts(processType);
  loadNotes(processType);
  loadSubjobs(processType);
  initExternalComponents();
  setActivate(true);
  checkStartNodes();
  checkNodeTableParameters();
  XmiResourceManager resourceManager=new XmiResourceManager();
  if (this.loadScreenshots) {
    if (property.eResource() != null) {
      resourceManager.loadScreenshots(property,processType);
    }
  }
  this.updateManager.retrieveRefInformation();
  checkRoutineDependencies();
}
Program: 124294
Project: 124294
Buggy source:
public static boolean isExpressionEditable(TreeNode treeNode){
  List children=treeNode.getChildren();
  boolean haschild=false;
  for (int i=0; i < children.size(); i++) {
    TreeNode child=(TreeNode)children.get(i);
    if (NodeType.ATTRIBUT != child.getNodeType() && NodeType.NAME_SPACE != child.getNodeType()) {
      haschild=true;
      break;
    }
  }
  return !haschild;
}

Fixed version (ground truth):
public static boolean isExpressionEditable(TreeNode treeNode){
  List children=treeNode.getChildren();
  boolean haschild=false;
  boolean isNameSpace=false;
  if (children.size() > 0) {
    for (int i=0; i < children.size(); i++) {
      TreeNode child=(TreeNode)children.get(i);
      if (NodeType.ATTRIBUT != child.getNodeType() && NodeType.NAME_SPACE != child.getNodeType()) {
        haschild=true;
        break;
      }
    }
  }
 else   if (NodeType.NAME_SPACE.equals(treeNode.getNodeType())) {
    isNameSpace=true;
  }
  return !haschild && !isNameSpace;
}
Program: 124300
Project: 124300
Buggy source:
@Override protected boolean calculateEnabled(){
  if (getSelectedObjects().isEmpty()) {
    return false;
  }
  if (getSelectedObjects().get(0) instanceof TreeNodeEditPart) {
    TreeNodeEditPart nodePart=(TreeNodeEditPart)getSelectedObjects().get(0);
    TreeNode model=(TreeNode)nodePart.getModel();
    if (model.eContainer() instanceof TreeNode && XmlMapUtil.DOCUMENT.equals(((TreeNode)model.eContainer()).getType())) {
      if (model.getChildren().isEmpty()) {
        return true;
      }
      return false;
    }
    if (NodeType.ATTRIBUT.equals(model.getNodeType()) || NodeType.NAME_SPACE.equals(model.getNodeType()) || !(model.eContainer() instanceof TreeNode)) {
      return false;
    }
    if (model.isLoop()) {
      return false;
    }
  }
 else {
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override protected boolean calculateEnabled(){
  if (getSelectedObjects().isEmpty()) {
    return false;
  }
  if (getSelectedObjects().get(0) instanceof TreeNodeEditPart) {
    TreeNodeEditPart nodePart=(TreeNodeEditPart)getSelectedObjects().get(0);
    TreeNode model=(TreeNode)nodePart.getModel();
    if (model.eContainer() instanceof TreeNode && XmlMapUtil.DOCUMENT.equals(((TreeNode)model.eContainer()).getType())) {
      if (XmlMapUtil.isExpressionEditable(model)) {
        return true;
      }
      return false;
    }
    if (NodeType.ATTRIBUT.equals(model.getNodeType()) || NodeType.NAME_SPACE.equals(model.getNodeType()) || !(model.eContainer() instanceof TreeNode)) {
      return false;
    }
    if (model.isLoop()) {
      return false;
    }
  }
 else {
    return false;
  }
  return true;
}
Program: 124309
Project: 124309
Buggy source:
public boolean performCancel(){
  selectedItems=null;
  repositoryUtil.clearAllData();
  return true;
}

Fixed version (ground truth):
public boolean performCancel(){
  selectedItems=null;
  repositoryUtil.clearAllData();
  if (sourceFile != null) {
    try {
      sourceFile.close();
    }
 catch (    IOException e) {
    }
  }
  return true;
}
Program: 124314
Project: 124314
Buggy source:
@Override public void run(){
  if (selectedNode != null) {
    InputDialog dialog=new InputDialog(null,"String_Node_Str","String_Node_Str",selectedNode.getDefaultValue(),null);
    if (dialog.open() == Window.OK) {
      selectedNode.setDefaultValue(dialog.getValue());
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (selectedNode != null) {
    NameSpaceDialog nsDialog=new NameSpaceDialog(null);
    nsDialog.setCurrentNode(selectedNode);
    nsDialog.setParentNode((TreeNode)selectedNode.eContainer());
    int status=nsDialog.open();
    if (status == nsDialog.OK) {
      String defaultValue=nsDialog.getNSValue();
      if (defaultValue != null) {
        defaultValue=defaultValue.trim();
      }
      String prefix=nsDialog.getPrefix().trim();
      selectedNode.setDefaultValue(defaultValue);
      if (prefix == null || "String_Node_Str".equals(prefix)) {
        prefix=XmlMapUtil.DEFAULT_NAME_SPACE_PREFIX;
      }
      selectedNode.setName(prefix);
      XmlMapData externalEmfData=(XmlMapData)mapperManager.getCopyOfMapData();
      XmlMapUtil.updateXPathAndExpression(externalEmfData,selectedNode,prefix,XmlMapUtil.getXPathLength(selectedNode.getXpath()),true);
    }
  }
}
Program: 124315
Project: 124315
Buggy source:
@Override protected boolean calculateEnabled(){
  if (getSelectedObjects().isEmpty()) {
    return false;
  }
 else {
    boolean enable=true;
    for (    Object obj : getSelectedObjects()) {
      if (obj instanceof TreeNodeEditPart) {
        TreeNodeEditPart nodePart=(TreeNodeEditPart)obj;
        this.selectedNode=(TreeNode)nodePart.getModel();
        int xPathLength=XmlMapUtil.getXPathLength(selectedNode.getXpath());
        if (xPathLength <= 2) {
          enable=false;
        }
      }
 else {
        enable=false;
      }
    }
    return enable;
  }
}

Fixed version (ground truth):
@Override protected boolean calculateEnabled(){
  if (getSelectedObjects().isEmpty()) {
    return false;
  }
 else {
    boolean enable=true;
    for (    Object obj : getSelectedObjects()) {
      if (obj instanceof TreeNodeEditPart) {
        TreeNodeEditPart nodePart=(TreeNodeEditPart)obj;
        this.selectedNode=(TreeNode)nodePart.getModel();
        if (NodeType.NAME_SPACE.equals(selectedNode.getNodeType())) {
          return false;
        }
        int xPathLength=XmlMapUtil.getXPathLength(selectedNode.getXpath());
        if (xPathLength <= 2) {
          enable=false;
        }
      }
 else {
        enable=false;
      }
    }
    return enable;
  }
}
Program: 124316
Project: 124316
Buggy source:
public String isValid(String newText){
  String xpath=XmlMapUtil.getXPath(((TreeNode)selectedNode.eContainer()).getXpath(),newText,selectedNode.getNodeType());
  EList<TreeNode> children=((TreeNode)selectedNode.eContainer()).getChildren();
  boolean exist=false;
  for (  TreeNode child : children) {
    if (child.getNodeType().equals(selectedNode.getNodeType())) {
      if (child.getXpath() != null && child.getXpath().equals(xpath) && !child.equals(selectedNode)) {
        exist=true;
        break;
      }
    }
  }
  if (exist) {
    if (selectedNode.getNodeType().equals(NodeType.ATTRIBUT)) {
      return "String_Node_Str" + newText + "String_Node_Str";
    }
 else     if (selectedNode.getNodeType().equals(NodeType.ELEMENT)) {
      return "String_Node_Str" + newText + "String_Node_Str";
    }
 else     if (selectedNode.getNodeType().equals(NodeType.NAME_SPACE)) {
      return "String_Node_Str" + newText + "String_Node_Str";
    }
  }
  return null;
}

Fixed version (ground truth):
public String isValid(String newText){
  String xpath=XmlMapUtil.getXPath(((TreeNode)selectedNode.eContainer()).getXpath(),newText,selectedNode.getNodeType());
  EList<TreeNode> children=((TreeNode)selectedNode.eContainer()).getChildren();
  boolean exist=false;
  for (  TreeNode child : children) {
    if (child.getNodeType().equals(selectedNode.getNodeType())) {
      if (child.getXpath() != null && child.getXpath().equals(xpath) && !child.equals(selectedNode)) {
        exist=true;
        break;
      }
    }
  }
  if (exist) {
    if (selectedNode.getNodeType().equals(NodeType.ATTRIBUT)) {
      return "String_Node_Str" + newText + "String_Node_Str";
    }
 else     if (selectedNode.getNodeType().equals(NodeType.ELEMENT)) {
      return "String_Node_Str" + newText + "String_Node_Str";
    }
  }
  return null;
}
Program: 124318
Project: 124318
Buggy source:
public void run(IIntroSite site,Properties params){
  PlatformUI.getWorkbench().getIntroManager().closeIntro(PlatformUI.getWorkbench().getIntroManager().getIntro());
  setRepositoryNode(params);
  doRun();
}

Fixed version (ground truth):
public void run(IIntroSite site,Properties params){
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
  if (factory.isUserReadOnlyOnCurrentProject()) {
    MessageDialog.openWarning(null,"String_Node_Str","String_Node_Str");
  }
 else {
    PlatformUI.getWorkbench().getIntroManager().closeIntro(PlatformUI.getWorkbench().getIntroManager().getIntro());
    setRepositoryNode(params);
    doRun();
  }
}
Program: 124319
Project: 124319
Buggy source:
public void run(IIntroSite site,Properties params){
  PlatformUI.getWorkbench().getIntroManager().closeIntro(PlatformUI.getWorkbench().getIntroManager().getIntro());
  selectRootObject(params);
  doRun();
}

Fixed version (ground truth):
public void run(IIntroSite site,Properties params){
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
  if (factory.isUserReadOnlyOnCurrentProject()) {
    MessageDialog.openWarning(null,"String_Node_Str","String_Node_Str");
  }
 else {
    PlatformUI.getWorkbench().getIntroManager().closeIntro(PlatformUI.getWorkbench().getIntroManager().getIntro());
    selectRootObject(params);
    doRun();
  }
}
Program: 124321
Project: 124321
Buggy source:
@Override protected boolean calculateEnabled(){
  if (getSelectedObjects().isEmpty()) {
    return false;
  }
  if (getSelectedObjects().get(0) instanceof TreeNodeEditPart) {
    TreeNodeEditPart nodePart=(TreeNodeEditPart)getSelectedObjects().get(0);
    TreeNode model=(TreeNode)nodePart.getModel();
    if (model.eContainer() instanceof TreeNode && XmlMapUtil.DOCUMENT.equals(((TreeNode)model.eContainer()).getType())) {
      return false;
    }
    if (NodeType.ATTRIBUT.equals(model.getNodeType()) || NodeType.NAME_SPACE.equals(model.getNodeType()) || !(model.eContainer() instanceof TreeNode)) {
      return false;
    }
    if (model.isLoop()) {
      return false;
    }
  }
 else {
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override protected boolean calculateEnabled(){
  if (getSelectedObjects().isEmpty()) {
    return false;
  }
  if (getSelectedObjects().get(0) instanceof TreeNodeEditPart) {
    TreeNodeEditPart nodePart=(TreeNodeEditPart)getSelectedObjects().get(0);
    TreeNode model=(TreeNode)nodePart.getModel();
    if (model.eContainer() instanceof TreeNode && XmlMapUtil.DOCUMENT.equals(((TreeNode)model.eContainer()).getType())) {
      if (model.getChildren().isEmpty()) {
        return true;
      }
      return false;
    }
    if (NodeType.ATTRIBUT.equals(model.getNodeType()) || NodeType.NAME_SPACE.equals(model.getNodeType()) || !(model.eContainer() instanceof TreeNode)) {
      return false;
    }
    if (model.isLoop()) {
      return false;
    }
  }
 else {
    return false;
  }
  return true;
}
Program: 124323
Project: 124323
Buggy source:
/** 
 * Deal with the bug 4402: the content <quotes_encoded>&quot;hello world&quot;</quotes_encoded>. In this case, "characters" will be called three time. first: " second: hello world third: "
 */
public void characters(char ch[],int start,int length) throws SAXException {
  if (isLooping) {
    String text=new String(ch,start,length);
    if (text.length() > 0) {
      if (outputText && indexOfColumn >= 0 && false == currentRowHaveValue[indexOfColumn]) {
        if (currentRow[indexOfColumn] == null) {
          currentRow[indexOfColumn]=text;
        }
 else {
          currentRow[indexOfColumn]+=text;
        }
      }
      if (this.entry.hasFunctions()) {
        Map<String,Object> map=new HashMap<String,Object>();
        map.put("String_Node_Str",loopPath);
        map.put("String_Node_Str",currentPath);
        map.put("String_Node_Str",text);
        listArgs.add(map);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Deal with the bug 4402: the content <quotes_encoded>&quot;hello world&quot;</quotes_encoded>. In this case, "characters" will be called three time. first: " second: hello world third: "
 */
public void characters(char ch[],int start,int length) throws SAXException {
  if (isLooping) {
    String text=new String(ch,start,length);
    if (text.length() > 0) {
      if (outputText) {
        for (        int indexOfColumn : indexOfColumns) {
          if (indexOfColumn >= 0 && !currentRowHaveValue[indexOfColumn]) {
            if (currentRow[indexOfColumn] == null) {
              currentRow[indexOfColumn]=text;
            }
 else {
              currentRow[indexOfColumn]+=text;
            }
          }
        }
      }
      if (this.entry.hasFunctions()) {
        Map<String,Object> map=new HashMap<String,Object>();
        map.put("String_Node_Str",loopPath);
        map.put("String_Node_Str",currentPath);
        map.put("String_Node_Str",text);
        listArgs.add(map);
      }
    }
  }
}
Program: 124326
Project: 124326
Buggy source:
@Override public Status process() throws EventDeliveryException {
  Status result=Status.READY;
  Channel channel=getChannel();
  Transaction transaction=channel.getTransaction();
  Event event=null;
  String eventTopic=topic;
  String eventKey=null;
  try {
    transaction.begin();
    event=channel.take();
    if (event != null) {
      if (metaDataExtractor != null) {
        eventTopic=metaDataExtractor.extractTopic(EventHelper.dumpEvent(event),context);
        eventKey=metaDataExtractor.extractKey(EventHelper.dumpEvent(event),context);
      }
      logger.debug("String_Node_Str" + EventHelper.dumpEvent(event));
      KeyedMessage<String,String> data=new KeyedMessage<String,String>(eventTopic,eventKey,EventHelper.dumpEvent(event));
      producer.send(data);
    }
 else {
      result=Status.BACKOFF;
    }
    transaction.commit();
  }
 catch (  Exception ex) {
    transaction.rollback();
    String errorMsg="String_Node_Str" + event;
    logger.error(errorMsg);
    throw new EventDeliveryException(errorMsg,ex);
  }
 finally {
    transaction.close();
  }
  return result;
}

Fixed version (ground truth):
@Override public Status process() throws EventDeliveryException {
  Status result=Status.READY;
  Channel channel=getChannel();
  Transaction transaction=channel.getTransaction();
  Event event=null;
  String eventTopic=topic;
  String eventKey=null;
  try {
    transaction.begin();
    event=channel.take();
    if (event != null) {
      String eventBody=new String(event.getBody());
      if (metaDataExtractor != null) {
        eventTopic=metaDataExtractor.extractTopic(eventBody,context);
        eventKey=metaDataExtractor.extractKey(eventBody,context);
      }
      logger.debug("String_Node_Str" + eventBody);
      KeyedMessage<String,String> data=new KeyedMessage<String,String>(eventTopic,eventKey,eventBody);
      producer.send(data);
    }
 else {
      result=Status.BACKOFF;
    }
    transaction.commit();
  }
 catch (  Exception ex) {
    transaction.rollback();
    String errorMsg="String_Node_Str" + event;
    logger.error(errorMsg);
    throw new EventDeliveryException(errorMsg,ex);
  }
 finally {
    transaction.close();
  }
  return result;
}
Program: 124328
Project: 124328
Buggy source:
public boolean equals(Object other){
  if (other == null)   return false;
  if (other instanceof Keyword) {
    Keyword otherK=(Keyword)other;
    return ((name.equals(otherK.name)) && (namespace.equals(otherK.namespace)));
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean equals(Object other){
  if (other == null)   return false;
  if (other instanceof Keyword) {
    Keyword otherK=(Keyword)other;
    return ((name.equals(otherK.name)) && ((namespace == null && otherK.namespace == null) || (namespace.equals(otherK.namespace))));
  }
 else {
    return false;
  }
}
Program: 124329
Project: 124329
Buggy source:
public boolean equals(Object other){
  if (other == null)   return false;
  if (other instanceof Symbol) {
    Symbol otherS=(Symbol)other;
    return ((name.equals(otherS.name)) && (namespace.equals(otherS.namespace)));
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean equals(Object other){
  if (other == null)   return false;
  if (other instanceof Symbol) {
    Symbol otherS=(Symbol)other;
    return ((name.equals(otherS.name)) && ((this.namespace == null && otherS.namespace == null) || (namespace.equals(otherS.namespace))));
  }
 else {
    return false;
  }
}
Program: 124330
Project: 124330
Buggy source:
@Test public void testGetNamespace() throws Exception {
}

Fixed version (ground truth):
@Test public void testGetNamespace() throws Exception {
  assertEquals(Keyword.of("String_Node_Str").getNamespace(),null);
  assertEquals(Keyword.of("String_Node_Str","String_Node_Str").getNamespace(),"String_Node_Str");
}
Program: 124331
Project: 124331
Buggy source:
@Test public void testGetName() throws Exception {
}

Fixed version (ground truth):
@Test public void testGetName() throws Exception {
  assertEquals(Keyword.of("String_Node_Str").getName(),"String_Node_Str");
}
Program: 124332
Project: 124332
Buggy source:
@Test public void testEquals() throws Exception {
}

Fixed version (ground truth):
@Test public void testEquals() throws Exception {
  assertEquals(Keyword.of("String_Node_Str"),Keyword.of("String_Node_Str"));
  assertEquals(Keyword.of("String_Node_Str","String_Node_Str"),Keyword.of("String_Node_Str","String_Node_Str"));
  assertNotEquals(Keyword.of("String_Node_Str"),Keyword.of("String_Node_Str"));
  assertNotEquals(Keyword.of("String_Node_Str"),null);
}
Program: 124333
Project: 124333
Buggy source:
/** 
 * Retrieves the CSRF token from the server session.
 * @param request {@link HttpServletRequest} to retrieve the current session from.
 * @param response {@link HttpServletResponse} to send additional information.
 * @return the Spring Security {@link CsrfToken}
 */
@GET @Path("String_Node_Str") CsrfToken getCsrfToken(@Context HttpServletRequest request,@Context HttpServletResponse response);

Fixed version (ground truth):
/** 
 * @param request {@link HttpServletRequest} to retrieve the current session from.
 * @param response {@link HttpServletResponse} to send additional information.
 * @return the Spring Security {@link CsrfToken} from the server session.
 */
@GET @Path("String_Node_Str") CsrfToken getCsrfToken(@Context HttpServletRequest request,@Context HttpServletResponse response);
Program: 124334
Project: 124334
Buggy source:
@Override public int getModificationCounter(){
  return 0;
}

Fixed version (ground truth):
@Override @GeneratedValue(strategy=GenerationType.TABLE) public int getModificationCounter(){
  return 0;
}
Program: 124335
Project: 124335
Buggy source:
/** 
 * @return the unique identifier of this {@link AccessControl}. Has to be unique for all   {@link AccessControl} in a{@link AccessControlSchema}.
 */
public String getId(){
  return this.id;
}

Fixed version (ground truth):
/** 
 * @return the unique identifier of {@link AbstractAccessControl}. Has to be unique for all  {@link AbstractAccessControl} in a {@link AccessControlSchema}.
 */
public String getId();
Program: 124336
Project: 124336
Buggy source:
/** 
 * @param id is the {@link AccessControl#getId() ID} of the requested {@link AccessControl}.
 * @return the requested {@link AccessControl} or {@code null} if not found.
 */
AccessControl getAccessControl(String id);

Fixed version (ground truth):
/** 
 * @param id is the {@link AbstractAccessControl#getId() ID} of the requested {@link AbstractAccessControl}.
 * @return the requested {@link AccessControl} or {@code null} if not found.
 */
AccessControl getAccessControl(String id);
Program: 124337
Project: 124337
Buggy source:
/** 
 * This method collects the   {@link AccessControl}s contained in the   {@link AccessControl}{@link AccessControl#getId() identified} by the given <code>groupId</code>.
 * @param id is the {@link AccessControl#getId() ID} of the {@link AccessControl} (typically an{@link AccessControlGroup}) to collect.
 * @param permissions is the {@link Set} where to {@link Set#add(Object) add} the collected {@link AccessControl}s. This will include the   {@link AccessControl} {@link AccessControl#getId() identified} by the given<code>groupId</code>.
 * @return {@code true} if the given <code>groupId</code> has been found, {@code false} otherwise.
 */
boolean collectAccessControls(String id,Set<AccessControl> permissions);

Fixed version (ground truth):
/** 
 * This method collects the   {@link AbstractAccessControl}s contained in the   {@link AbstractAccessControl}{@link AbstractAccessControl#getId() identified} by the given <code>groupId</code>.
 * @param id is the {@link AbstractAccessControl#getId() ID} of the {@link AbstractAccessControl} (typically an{@link AccessControlGroup}) to collect.
 * @param permissions is the {@link Set} where to {@link Set#add(Object) add} the collected{@link AbstractAccessControl}s. This will include the   {@link AbstractAccessControl}{@link AbstractAccessControl#getId() identified} by the given <code>groupId</code>.
 * @return {@code true} if the given <code>groupId</code> has been found, {@code false} otherwise.
 */
boolean collectAccessControls(String id,Set<AccessControl> permissions);
Program: 124338
Project: 124338
Buggy source:
/** 
 * This method collects the   {@link AccessControl#getId() IDs} of all {@link AccessControlPermission}s (or more precisely of all   {@link AccessControl}s) contained in the   {@link AccessControl} {@link AccessControl#getId() identified} by the given <code>groupId</code>.
 * @see #collectAccessControls(String,Set)
 * @param id is the {@link AccessControl#getId() ID} of the {@link AccessControl} (typically an{@link AccessControlGroup}) to collect.
 * @param permissions is the {@link Set} where to {@link Set#add(Object) add} the collected{@link AccessControl#getId() IDs}. This will include the given <code>groupId</code>.
 * @return {@code true} if the given <code>groupId</code> has been found, {@code false} otherwise.
 */
boolean collectAccessControlIds(String id,Set<String> permissions);

Fixed version (ground truth):
/** 
 * This method collects the   {@link AbstractAccessControl#getId() IDs} of all {@link AccessControlPermission}s (or more precisely of all   {@link AbstractAccessControl}s) contained in the   {@link AbstractAccessControl}{@link AbstractAccessControl#getId() identified} by the given <code>groupId</code>.
 * @see #collectAccessControls(String,Set)
 * @param id is the {@link AbstractAccessControl#getId() ID} of the {@link AbstractAccessControl} (typically an{@link AccessControlGroup}) to collect.
 * @param permissions is the {@link Set} where to {@link Set#add(Object) add} the collected{@link AbstractAccessControl#getId() IDs}. This will include the given <code>groupId</code>.
 * @return {@code true} if the given <code>groupId</code> has been found, {@code false} otherwise.
 */
boolean collectAccessControlIds(String id,Set<String> permissions);
Program: 124339
Project: 124339
Buggy source:
/** 
 * @param principal is the {@link Principal} (user).
 * @return the {@link Collection} of {@link AccessControl#getId() IDs} with the groups of the given {@link Principal}.
 */
Collection<String> getAccessControlIds(P principal);

Fixed version (ground truth):
/** 
 * @param principal is the {@link Principal} (user).
 * @return the {@link Collection} of {@link AbstractAccessControl#getId() IDs} with the groups of the given {@link Principal}.
 */
Collection<String> getAccessControlIds(P principal);
Program: 124340
Project: 124340
Buggy source:
/** 
 * Suggests to use   {@link #doSetUp()} method before each tests.
 */
@Before public final void setUp(){
  if (!INITIALIZED) {
    INITIALIZED=true;
  }
  doSetUp(INITIALIZED);
}

Fixed version (ground truth):
/** 
 * Suggests to use   {@link #doSetUp()} method before each tests.
 */
@Before public final void setUp(){
  doSetUp(INITIALIZED);
  if (!INITIALIZED) {
    INITIALIZED=true;
  }
}
Program: 124341
Project: 124341
Buggy source:
/** 
 * Exception handling depending on technical Exception or not.
 * @param exception the exception thrown
 * @return the response build from error status
 */
protected Response handleGenericError(Throwable exception){
  NlsRuntimeException userError=TechnicalErrorUserException.getOrCreateUserException(exception);
  if (userError.isTechnical()) {
    LOG.error("String_Node_Str",exception);
  }
 else {
    LOG.warn("String_Node_Str",exception.getMessage());
  }
  return createResponse(userError);
}

Fixed version (ground truth):
/** 
 * Exception handling depending on technical Exception or not.
 * @param exception the exception thrown
 * @return the response build from error status
 */
protected Response handleGenericError(Throwable exception){
  NlsRuntimeException userError=TechnicalErrorUserException.getOrCreateUserException(exception);
  if (userError.isTechnical()) {
    LOG.error("String_Node_Str",userError);
  }
 else {
    LOG.warn("String_Node_Str",exception.getMessage());
  }
  return createResponse(userError);
}
Program: 124342
Project: 124342
Buggy source:
/** 
 * @param exposeInternalErrorDetails - {@code true} if internal exception details shall be exposed to clients(useful for debugging and testing),  {@code false} if such details are hidden to prevent <ahref="https://www.owasp.org/index.php/Top_10_2013-A6-Sensitive_Data_Exposure">Sensitive Data Exposure</a> (default, has to be used in production environment).
 */
public void setExposeInternalErrorDetails(boolean exposeInternalErrorDetails){
  this.exposeInternalErrorDetails=exposeInternalErrorDetails;
  if (exposeInternalErrorDetails) {
    String message="String_Node_Str";
    LOG.warn(message);
    System.err.println(message);
  }
}

Fixed version (ground truth):
/** 
 * @param exposeInternalErrorDetails - {@code true} if internal exception details shall be exposed to clients (usefulfor debugging and testing),  {@code false} if such details are hidden to prevent<a href="https://www.owasp.org/index.php/Top_10_2013-A6-Sensitive_Data_Exposure">Sensitive Data Exposure</a> (default, has to be used in production environment).
 */
public void setExposeInternalErrorDetails(boolean exposeInternalErrorDetails){
  this.exposeInternalErrorDetails=exposeInternalErrorDetails;
  if (exposeInternalErrorDetails) {
    String message="String_Node_Str";
    LOG.warn(message);
    System.err.println(message);
  }
}
Program: 124343
Project: 124343
Buggy source:
/** 
 * Checks that the given   {@link AccessControlGroup} has no cyclic {@link AccessControlGroup#getInherits() inheritancegraph}.
 * @param group is the {@link AccessControlGroup} to check.
 * @param visitedGroups is where the {@link AccessControlGroup} are collected to detect cycles.
 */
protected void checkForCyclicDependencies(AccessControlGroup group,Set<AccessControlGroup> visitedGroups){
  boolean added=visitedGroups.add(group);
  if (!added) {
    throw new IllegalStateException("String_Node_Str" + group);
  }
  for (  AccessControlGroup inheritedGroup : group.getInherits()) {
    checkForCyclicDependencies(inheritedGroup,visitedGroups);
  }
}

Fixed version (ground truth):
/** 
 * Checks that the given   {@link AccessControlGroup} has no cyclic {@link AccessControlGroup#getInherits() inheritancegraph}.
 * @param group is the {@link AccessControlGroup} to check.
 * @param nodeCycle the {@link NodeCycle} used to detect cycles.
 */
protected void checkForCyclicDependencies(AccessControlGroup group,NodeCycle<AccessControlGroup> nodeCycle){
  for (  AccessControlGroup inheritedGroup : group.getInherits()) {
    List<AccessControlGroup> inverseCycle=nodeCycle.getInverseCycle();
    if (inverseCycle.contains(inheritedGroup)) {
      throw new NodeCycleException(nodeCycle);
    }
    inverseCycle.add(inheritedGroup);
    checkForCyclicDependencies(inheritedGroup,nodeCycle);
    AccessControlGroup removed=inverseCycle.remove(inverseCycle.size() - 1);
    assert(removed == inheritedGroup);
  }
}
Program: 124344
Project: 124344
Buggy source:
/** 
 * Performs the required initialization of this class.
 * @param config is the {@link AccessControlSchema}.
 */
protected void initialize(AccessControlSchema config){
  LOG.debug("String_Node_Str");
  List<AccessControlGroup> groups=config.getGroups();
  if (groups.size() == 0) {
    throw new IllegalStateException("String_Node_Str");
  }
  Set<AccessControlGroup> toplevelGroups=new HashSet<>(groups);
  for (  AccessControlGroup group : groups) {
    collectAccessControls(group,toplevelGroups);
    checkForCyclicDependencies(group,new HashSet<AccessControlGroup>());
  }
}

Fixed version (ground truth):
/** 
 * Performs the required initialization of this class.
 * @param config is the {@link AccessControlSchema}.
 */
protected void initialize(AccessControlSchema config){
  LOG.debug("String_Node_Str");
  List<AccessControlGroup> groups=config.getGroups();
  if (groups.size() == 0) {
    throw new IllegalStateException("String_Node_Str");
  }
  Set<AccessControlGroup> toplevelGroups=new HashSet<>(groups);
  for (  AccessControlGroup group : groups) {
    collectAccessControls(group,toplevelGroups);
    NodeCycle<AccessControlGroup> nodeCycle=new NodeCycle<>(group);
    checkForCyclicDependencies(group,nodeCycle);
  }
}
Program: 124345
Project: 124345
Buggy source:
/** 
 * Tests that   {@link AccessControlProviderImpl} properly detects cyclic inheritance of {@link AccessControlGroup}s.
 */
@Test public void testProviderCyclic(){
  try {
    createProvider(SCHEMA_XML_CYCLIC);
    fail("String_Node_Str");
  }
 catch (  IllegalStateException e) {
    assertThat(e.getMessage()).startsWith("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Tests that   {@link AccessControlProviderImpl} properly detects cyclic inheritance of {@link AccessControlGroup}s.
 */
@Test public void testProviderCyclic(){
  try {
    createProvider(SCHEMA_XML_CYCLIC);
    fail("String_Node_Str");
  }
 catch (  NodeCycleException e) {
    assertThat(e).hasMessageContaining("String_Node_Str");
  }
}
Program: 124347
Project: 124347
Buggy source:
/** 
 * Provides login credentials and permissions and resets database. The database is migrated to Version 0002 in order to have a common basis for test.
 */
@Before public void setUp(){
  TestUtil.login("String_Node_Str",PermissionConstants.SAVE_ORDER_POSITION,PermissionConstants.SAVE_ORDER,PermissionConstants.FIND_TABLE,PermissionConstants.FIND_ORDER,PermissionConstants.SAVE_TABLE);
  this.dbTestHelper.setMigrationVersion("String_Node_Str");
  this.dbTestHelper.resetDatabase();
}

Fixed version (ground truth):
/** 
 * Provides login credentials and permissions and resets database. The database is migrated to Version 0002 in order to have a common basis for test.
 */
@Before public void setUp(){
  TestUtil.login("String_Node_Str",PermissionConstants.SAVE_ORDER_POSITION,PermissionConstants.SAVE_ORDER,PermissionConstants.FIND_TABLE,PermissionConstants.FIND_ORDER,PermissionConstants.SAVE_TABLE,PermissionConstants.FIND_OFFER);
  this.dbTestHelper.setMigrationVersion("String_Node_Str");
  this.dbTestHelper.resetDatabase();
}
Program: 124348
Project: 124348
Buggy source:
/** 
 * This test method tests if a table is releasable without and with an open order attached to it.
 */
@Test public void testIsTableReleasable(){
  Long tableNumber=101L;
  Long offerId=2L;
  TableEto table=this.tablemanagement.findTable(tableNumber);
  assertThat(table.getState()).isEqualTo(TableState.OCCUPIED);
  assertThat(this.tablemanagement.isTableReleasable(table)).isTrue();
  OrderEto newOrder=new OrderEtoBuilder().tableId(table.getId()).createNew();
  OrderEto order=this.salesmanagement.saveOrder(newOrder);
  long orderId=order.getId();
  OrderPositionEto orderPosition=new OrderPositionEtoBuilder().orderId(orderId).offerId(offerId).createNew();
  assertThat(this.tablemanagement.isTableReleasable(table)).isFalse();
  assertThat(table.getState()).isEqualTo(TableState.OCCUPIED);
}

Fixed version (ground truth):
/** 
 * This test method tests if a table is releasable without and with an open order attached to it.
 */
@Test public void testIsTableReleasable(){
  Long tableNumber=101L;
  Long offerId=2L;
  TableEto table=this.tablemanagement.findTable(tableNumber);
  assertThat(table.getState()).isEqualTo(TableState.OCCUPIED);
  assertThat(this.tablemanagement.isTableReleasable(table)).isTrue();
  OrderEto newOrder=new OrderEtoBuilder().tableId(table.getId()).createNew();
  OrderEto order=this.salesmanagement.saveOrder(newOrder);
  long orderId=order.getId();
  OrderPositionEto newOrderPosition=new OrderPositionEtoBuilder().orderId(orderId).offerId(offerId).createNew();
  OrderPositionEto orderPosition=this.salesmanagement.saveOrderPosition(newOrderPosition);
  assertThat(order).isNotNull();
  assertThat(orderPosition).isNotNull();
  assertThat(this.tablemanagement.isTableReleasable(table)).isFalse();
  assertThat(table.getState()).isEqualTo(TableState.OCCUPIED);
}
Program: 124349
Project: 124349
Buggy source:
@Test public void findOrders(){
  PaginatedListTo<OrderCto> orders=this.helper.getService().findOrders(new MyUriInfo(null,null));
  assertThat(orders).isNotNull();
  assertThat(orders).isNotNull();
}

Fixed version (ground truth):
@Test public void findOrders(){
  PaginatedListTo<OrderCto> orders=this.helper.getService().findOrders(null);
  assertThat(orders).isNotNull();
  assertThat(orders).isNotNull();
}
Program: 124350
Project: 124350
Buggy source:
@Override @Id @GeneratedValue(strategy=GenerationType.SEQUENCE) public Long getId(){
  return this.id;
}

Fixed version (ground truth):
@Override @Id @GeneratedValue(strategy=GenerationType.AUTO) public Long getId(){
  return this.id;
}
Program: 124351
Project: 124351
Buggy source:
private void stopBatch(ConfigurableApplicationContext ctx,String jobName) throws Exception {
  int returnCode=0;
  try {
    findBeans(ctx);
    Set<Long> runningJobExecutionIDs=operator.getRunningExecutions(jobName);
    if (runningJobExecutionIDs.isEmpty()) {
      throw new JobExecutionNotRunningException("String_Node_Str" + jobName + "String_Node_Str");
    }
    LOG.info("String_Node_Str",runningJobExecutionIDs.size());
    for (    Long id : runningJobExecutionIDs) {
      operator.stop(id);
    }
  }
 catch (  Exception e) {
    returnCode=1;
    throw e;
  }
 finally {
    final int returnCodeResult=returnCode;
    SpringApplication.exit(ctx,new ExitCodeGenerator(){
      @Override public int getExitCode(){
        return returnCodeResult;
      }
    }
);
  }
}

Fixed version (ground truth):
private void stopBatch(ConfigurableApplicationContext ctx,String jobName) throws Exception {
  int returnCode=0;
  try {
    findBeans(ctx);
    Set<Long> runningJobExecutionIDs=operator.getRunningExecutions(jobName);
    if (runningJobExecutionIDs.isEmpty()) {
      throw new JobExecutionNotRunningException("String_Node_Str" + jobName + "String_Node_Str");
    }
    LOG.debug("String_Node_Str" + "String_Node_Str",runningJobExecutionIDs.size());
    int stoppedCount=0;
    for (    Long id : runningJobExecutionIDs) {
      try {
        operator.stop(id);
        stoppedCount++;
      }
 catch (      JobExecutionNotRunningException e) {
      }
    }
    LOG.info("String_Node_Str",stoppedCount);
  }
 catch (  Exception e) {
    returnCode=1;
    throw e;
  }
 finally {
    final int returnCodeResult=returnCode;
    SpringApplication.exit(ctx,new ExitCodeGenerator(){
      @Override public int getExitCode(){
        return returnCodeResult;
      }
    }
);
  }
}
Program: 124352
Project: 124352
Buggy source:
protected void findBeans(ConfigurableApplicationContext ctx){
  launcher=ctx.getBean(JobLauncher.class);
  locator=ctx.getBean(JobLocator.class);
  operator=ctx.getBean(JobOperator.class);
  try {
    parametersConverter=ctx.getBean(JobParametersConverter.class);
  }
 catch (  NoSuchBeanDefinitionException e) {
    parametersConverter=new DefaultJobParametersConverter();
  }
}

Fixed version (ground truth):
private void findBeans(ConfigurableApplicationContext ctx){
  launcher=ctx.getBean(JobLauncher.class);
  locator=ctx.getBean(JobLocator.class);
  operator=ctx.getBean(JobOperator.class);
  try {
    parametersConverter=ctx.getBean(JobParametersConverter.class);
  }
 catch (  NoSuchBeanDefinitionException e) {
    parametersConverter=new DefaultJobParametersConverter();
  }
}
Program: 124353
Project: 124353
Buggy source:
/** 
 * Delegates to   {@link Offermanagement#findProductByRevision}.
 * @param id ID of the {@link ProductEto}
 * @param revision revision of the {@link ProductEto}
 * @return the {@link ProductEto}
 */
@GET @Path("String_Node_Str") public ProductEto findProductByRevision(@PathParam("String_Node_Str") Long id,@PathParam("String_Node_Str") Long revision){
  if (revision != null) {
    return this.offerManagement.findProductByRevision(id,revision);
  }
 else {
    return this.offerManagement.findProduct(id);
  }
}

Fixed version (ground truth):
/** 
 * Delegates to   {@link Offermanagement#findProductByRevision}.
 * @param id ID of the {@link ProductEto}
 * @param revision revision of the {@link ProductEto}
 * @return the {@link ProductEto}
 */
@GET @Path("String_Node_Str") public ProductEto findProductByRevision(@PathParam("String_Node_Str") long id,@PathParam("String_Node_Str") Long revision){
  if (revision != null) {
    return this.offerManagement.findProductByRevision(id,revision);
  }
 else {
    return this.offerManagement.findProduct(id);
  }
}
Program: 124354
Project: 124354
Buggy source:
/** 
 * Delegates to   {@link Offermanagement#deleteOffer}.
 * @param id ID of the {@link OfferEto} to delete
 */
@DELETE @Path("String_Node_Str") public void deleteOffer(@PathParam("String_Node_Str") Long id){
  this.offerManagement.deleteOffer(id);
}

Fixed version (ground truth):
/** 
 * Delegates to   {@link Offermanagement#deleteOffer}.
 * @param id ID of the {@link OfferEto} to delete
 */
@DELETE @Path("String_Node_Str") public void deleteOffer(@PathParam("String_Node_Str") long id){
  this.offerManagement.deleteOffer(id);
}
Program: 124355
Project: 124355
Buggy source:
/** 
 * Delegates to   {@link Offermanagement#findOffer}.
 * @param id the ID of the {@link OfferEto}
 * @return the {@link OfferEto}
 */
@GET @Path("String_Node_Str") public OfferEto getOffer(@PathParam("String_Node_Str") Long id){
  return this.offerManagement.findOffer(id);
}

Fixed version (ground truth):
/** 
 * Delegates to   {@link Offermanagement#findOffer}.
 * @param id the ID of the {@link OfferEto}
 * @return the {@link OfferEto}
 */
@GET @Path("String_Node_Str") public OfferEto getOffer(@PathParam("String_Node_Str") long id){
  return this.offerManagement.findOffer(id);
}
Program: 124356
Project: 124356
Buggy source:
/** 
 * Delegates to   {@link Offermanagement#findProduct}.
 * @param id ID of the {@link ProductEto}
 * @return the {@link ProductEto}
 */
@GET @Path("String_Node_Str") public ProductEto findProduct(@PathParam("String_Node_Str") Long id){
  return this.offerManagement.findProduct(id);
}

Fixed version (ground truth):
/** 
 * Delegates to   {@link Offermanagement#findProduct}.
 * @param id ID of the {@link ProductEto}
 * @return the {@link ProductEto}
 */
@GET @Path("String_Node_Str") public ProductEto findProduct(@PathParam("String_Node_Str") long id){
  return this.offerManagement.findProduct(id);
}
Program: 124357
Project: 124357
Buggy source:
@SuppressWarnings("String_Node_Str") @Consumes("String_Node_Str") @POST @Path("String_Node_Str") public void updateProductPicture(@PathParam("String_Node_Str") Long productId,@Multipart(value="String_Node_Str",type=MediaType.APPLICATION_JSON) BinaryObjectEto binaryObjectEto,@Multipart(value="String_Node_Str",type=MediaType.APPLICATION_OCTET_STREAM) InputStream picture) throws SerialException, SQLException, IOException {
  Blob blob=new SerialBlob(IOUtils.readBytesFromStream(picture));
  this.offerManagement.updateProductPicture(productId,blob,binaryObjectEto);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Consumes("String_Node_Str") @POST @Path("String_Node_Str") public void updateProductPicture(@PathParam("String_Node_Str") long productId,@Multipart(value="String_Node_Str",type=MediaType.APPLICATION_JSON) BinaryObjectEto binaryObjectEto,@Multipart(value="String_Node_Str",type=MediaType.APPLICATION_OCTET_STREAM) InputStream picture) throws SerialException, SQLException, IOException {
  Blob blob=new SerialBlob(IOUtils.readBytesFromStream(picture));
  this.offerManagement.updateProductPicture(productId,blob,binaryObjectEto);
}
Program: 124358
Project: 124358
Buggy source:
/** 
 * Delegates to   {@link Offermanagement#isProductInUseByOffer}.
 * @param id ID of the {@link ProductEto}
 * @return true, if there are no offers, that use the given ProductEto. false otherwise.
 */
@GET @Path("String_Node_Str") public boolean isProductInUseByOffer(@PathParam("String_Node_Str") Long id){
  return this.offerManagement.isProductInUseByOffer(findProduct(id));
}

Fixed version (ground truth):
/** 
 * Delegates to   {@link Offermanagement#isProductInUseByOffer}.
 * @param id ID of the {@link ProductEto}
 * @return true, if there are no offers, that use the given ProductEto. false otherwise.
 */
@GET @Path("String_Node_Str") public boolean isProductInUseByOffer(@PathParam("String_Node_Str") long id){
  return this.offerManagement.isProductInUseByOffer(findProduct(id));
}
Program: 124359
Project: 124359
Buggy source:
/** 
 * Delegates to   {@link Offermanagement#deleteProduct}.
 * @param id ID of the ProductEto to delete
 */
@DELETE @Path("String_Node_Str") public void deleteProduct(@PathParam("String_Node_Str") Long id){
  this.offerManagement.deleteProduct(id);
}

Fixed version (ground truth):
/** 
 * Delegates to   {@link Offermanagement#deleteProduct}.
 * @param id ID of the ProductEto to delete
 */
@DELETE @Path("String_Node_Str") public void deleteProduct(@PathParam("String_Node_Str") long id){
  this.offerManagement.deleteProduct(id);
}
Program: 124360
Project: 124360
Buggy source:
/** 
 * This method will return a   {@link BillCto bill} identified the given id.
 * @param id is the {@link BillEto#getId() id} of the Bill to fetch.
 * @return the {@link BillCto bill} for the given id.
 */
BillCto findBill(Long id);

Fixed version (ground truth):
/** 
 * This method will return a   {@link BillCto bill} identified the given id.
 * @param id is the {@link BillEto#getId() id} of the Bill to fetch.
 * @return the {@link BillCto bill} for the given id.
 */
BillCto findBill(long id);
Program: 124361
Project: 124361
Buggy source:
/** 
 * This method returns an   {@link OrderEto order}.
 * @param orderId identifier of the searched {@link OrderEto order}
 * @return the {@link OrderEto order} with the given identifier. Will be {@code null} if the {@link OrderEto order} does not exist.
 */
OrderEto findOrder(Long orderId);

Fixed version (ground truth):
/** 
 * This method returns an   {@link OrderEto order}.
 * @param orderId identifier of the searched {@link OrderEto order}
 * @return the {@link OrderEto order} with the given identifier. Will be {@code null} if the {@link OrderEto order}does not exist.
 */
OrderEto findOrder(long orderId);
Program: 124362
Project: 124362
Buggy source:
/** 
 * This method returns a the   {@link io.oasp.gastronomy.restaurant.salesmanagement.common.api.datatype.OrderState#OPEN open} {@link OrderEto order} for the specified table.
 * @param tableId the {@link io.oasp.gastronomy.restaurant.tablemanagement.common.api.Table#getId() table ID} therequested order shall be  {@link OrderEto#getTableId() associated} with.
 * @return the {@link OrderEto order} {@link OrderEto#getTableId() associated} with the given <code>tableId</code> in{@link io.oasp.gastronomy.restaurant.salesmanagement.common.api.datatype.OrderState#OPEN open}{@link OrderEto#getState() state} or {@code null} if no such {@link OrderEto order} exists.
 */
OrderEto findOpenOrderForTable(Long tableId);

Fixed version (ground truth):
/** 
 * This method returns a the   {@link io.oasp.gastronomy.restaurant.salesmanagement.common.api.datatype.OrderState#OPEN open} {@link OrderEto order} for the specified table.
 * @param tableId the {@link io.oasp.gastronomy.restaurant.tablemanagement.common.api.Table#getId() table ID} therequested order shall be  {@link OrderEto#getTableId() associated} with.
 * @return the {@link OrderEto order} {@link OrderEto#getTableId() associated} with the given <code>tableId</code> in{@link io.oasp.gastronomy.restaurant.salesmanagement.common.api.datatype.OrderState#OPEN open}{@link OrderEto#getState() state} or {@code null} if no such {@link OrderEto order} exists.
 */
OrderEto findOpenOrderForTable(long tableId);