nus-yam/ex-repair huggingface dataset:
Program: 97297
Project: 97297
Buggy source:
@Override public void artifactCreated(Artifact theArtifact){
  String artifactGuid=theArtifact.getGuid();
  if (postProcessGuids.contains(artifactGuid)) {
    try {
      List<Integer> Ids=theArtifact.getAttributeIds(CoreAttributeTypes.ImageContent);
      List<String> HTML=theArtifact.getAttributeValues(CoreAttributeTypes.HTMLContent);
      theArtifact.deleteAttributes(CoreAttributeTypes.HTMLContent);
      for (      String htmlVal : HTML) {
        int iCount=0;
        for (        Integer imageNumber : Ids) {
          htmlVal=htmlVal.replaceAll(IMAGE_BASE_NAME + Integer.toString(iCount),imageNumber.toString());
          iCount++;
        }
        theArtifact.addAttribute(CoreAttributeTypes.HTMLContent,htmlVal);
      }
    }
 catch (    OseeCoreException e) {
    }
  }
}

Fixed version (ground truth):
@Override public boolean artifactCreated(Artifact theArtifact){
  String artifactGuid=theArtifact.getGuid();
  boolean toReturn=false;
  if (postProcessGuids.contains(artifactGuid)) {
    try {
      List<Integer> Ids=theArtifact.getAttributeIds(CoreAttributeTypes.ImageContent);
      List<String> HTML=theArtifact.getAttributeValues(CoreAttributeTypes.HTMLContent);
      for (      String htmlVal : HTML) {
        int iCount=0;
        for (        Integer imageNumber : Ids) {
          htmlVal=htmlVal.replaceAll(IMAGE_BASE_NAME + Integer.toString(iCount),imageNumber.toString());
          iCount++;
        }
        if (iCount > 0 || toReturn) {
          theArtifact.deleteAttributes(CoreAttributeTypes.HTMLContent);
          theArtifact.addAttribute(CoreAttributeTypes.HTMLContent,htmlVal);
          toReturn=true;
        }
      }
    }
 catch (    OseeCoreException e) {
    }
  }
  return toReturn;
}
Program: 97298
Project: 97298
Buggy source:
public void artifactCreated(Artifact theArtifact);

Fixed version (ground truth):
public boolean artifactCreated(Artifact theArtifact);
Program: 97299
Project: 97299
Buggy source:
private String getAssigneesStr(IAtsWorkItem workItem,ArtifactReadable action){
  String results="String_Node_Str";
  if (isShowHeaderFull()) {
    results=workItem.getStateMgr().getAssigneesStr();
  }
 else {
    results=action.getSoleAttributeAsString(AtsAttributeTypes.CurrentState);
  }
  return results;
}

Fixed version (ground truth):
private String getAssigneesStr(IAtsWorkItem workItem,ArtifactReadable action){
  String results="String_Node_Str";
  if (isShowHeaderFull()) {
    results=workItem.getStateMgr().getAssigneesStr();
  }
 else {
    String currState=action.getSoleAttributeAsString(AtsAttributeTypes.CurrentState);
    String assignees=currState.split("String_Node_Str")[1];
    assignees=assignees.replaceAll("String_Node_Str","String_Node_Str");
    assignees=assignees.replaceAll("String_Node_Str","String_Node_Str");
    assignees=assignees.replaceAll("String_Node_Str","String_Node_Str");
    results=assignees;
  }
  return results;
}
Program: 97300
Project: 97300
Buggy source:
@Test public void testGetArtifactListFromType() throws OseeCoreException {
  List<Artifact> artifacts=ArtifactQuery.getArtifactListFromType(SoftwareRequirement,DemoBranches.SAW_Bld_1,DeletionFlag.INCLUDE_DELETED);
  Assert.assertFalse("String_Node_Str",artifacts.isEmpty());
  boolean pass=true;
  for (  Artifact artifact : artifacts) {
    if (!artifact.isOfType(SoftwareRequirement)) {
      pass=false;
      break;
    }
  }
  Assert.assertTrue("String_Node_Str",pass);
}

Fixed version (ground truth):
@Test public void testGetArtifactListFromType() throws OseeCoreException {
  Set<Artifact> searchedArtifacts=new LinkedHashSet<Artifact>();
  List<Branch> branches=BranchManager.getBranches(new BranchFilter(BranchType.BASELINE));
  for (  IOseeBranch branch : branches) {
    List<Artifact> results=ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.SoftwareRequirement,branch,DeletionFlag.INCLUDE_DELETED);
    searchedArtifacts.addAll(results);
  }
  Assert.assertTrue("String_Node_Str",searchedArtifacts.size() > 0);
  String firstGuid="String_Node_Str";
  Boolean pass=false;
  for (  Artifact a : searchedArtifacts) {
    if ("String_Node_Str" == firstGuid) {
      firstGuid=a.getBranchGuid();
    }
 else {
      if (firstGuid != a.getBranchGuid()) {
        pass=true;
        break;
      }
    }
  }
  Assert.assertTrue("String_Node_Str",pass);
}
Program: 97301
Project: 97301
Buggy source:
/** 
 * This will not clean sub-folders
 */
@Override public void cleanOldBatchFolders(){
  File[] files=BATCHES.listFiles();
  for (  File file : files) {
    if (file.isDirectory()) {
      File delete=new File(file,DELETE_MARKER);
      boolean deleteFolder=delete.exists();
      if (deleteFolder) {
        File[] toDelete=file.listFiles();
        for (        File f : toDelete) {
          f.delete();
        }
        file.delete();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * This will not clean sub-folders
 */
@Override public void cleanOldBatchFolders(){
  if (BATCHES.exists()) {
    File[] files=BATCHES.listFiles();
    if (files != null) {
      for (      File file : files) {
        if (file.isDirectory()) {
          File delete=new File(file,DELETE_MARKER);
          boolean deleteFolder=delete.exists();
          if (deleteFolder) {
            File[] toDelete=file.listFiles();
            for (            File f : toDelete) {
              f.delete();
            }
            file.delete();
          }
        }
      }
    }
  }
}
Program: 97302
Project: 97302
Buggy source:
/** 
 * ds component method
 */
public void start(){
  folder=oteServerFolder.getCacheFolder();
  if (!folder.exists()) {
    if (!folder.mkdirs()) {
      throw new RuntimeException("String_Node_Str" + folder.getAbsolutePath());
    }
  }
  if (!folder.isDirectory()) {
    throw new IllegalStateException("String_Node_Str" + folder.getAbsolutePath());
  }
  clean();
}

Fixed version (ground truth):
/** 
 * ds component method
 */
public void start(){
  folder=oteServerFolder.getCacheFolder();
  if (!folder.exists()) {
    if (!folder.mkdirs()) {
      OseeLog.log(getClass(),Level.SEVERE,"String_Node_Str" + folder.getAbsolutePath());
    }
  }
  if (!folder.isDirectory()) {
    OseeLog.log(getClass(),Level.SEVERE,"String_Node_Str" + folder.getAbsolutePath());
  }
  clean();
}
Program: 97303
Project: 97303
Buggy source:
private void clean(){
  File[] bundleFolders=folder.listFiles();
  for (  File bundleFolder : bundleFolders) {
    if (bundleFolder.isDirectory()) {
      File[] jars=bundleFolder.listFiles(new FileFilter(){
        @Override public boolean accept(        File file){
          return file.getAbsolutePath().endsWith("String_Node_Str");
        }
      }
);
      if (jars.length == 0) {
        if (bundleFolder.listFiles().length == 0) {
          bundleFolder.delete();
        }
      }
 else {
        for (        File jar : jars) {
          File dateFile=new File(jar.getAbsolutePath() + "String_Node_Str");
          if (dateFile.exists()) {
            if (isDateFileOld(dateFile)) {
              if (jar.exists()) {
                jar.delete();
              }
              dateFile.delete();
            }
          }
 else {
            jar.delete();
          }
        }
      }
    }
 else {
      bundleFolder.delete();
    }
  }
}

Fixed version (ground truth):
private void clean(){
  if (folder.exists()) {
    File[] bundleFolders=folder.listFiles();
    if (bundleFolders != null) {
      for (      File bundleFolder : bundleFolders) {
        if (bundleFolder.isDirectory()) {
          File[] jars=bundleFolder.listFiles(new FileFilter(){
            @Override public boolean accept(            File file){
              return file.getAbsolutePath().endsWith("String_Node_Str");
            }
          }
);
          if (jars.length == 0) {
            if (bundleFolder.listFiles().length == 0) {
              bundleFolder.delete();
            }
          }
 else {
            for (            File jar : jars) {
              File dateFile=new File(jar.getAbsolutePath() + "String_Node_Str");
              if (dateFile.exists()) {
                if (isDateFileOld(dateFile)) {
                  if (jar.exists()) {
                    jar.delete();
                  }
                  dateFile.delete();
                }
              }
 else {
                jar.delete();
              }
            }
          }
        }
 else {
          bundleFolder.delete();
        }
      }
    }
  }
}
Program: 97304
Project: 97304
Buggy source:
@Override public int process(int value) throws IOException {
  isStartOfParagraph=false;
  isBreak=false;
  if ((char)value == '<') {
    partOfTag=true;
    buffer.append((char)value);
  }
  while ((partOfTag || isCarriageReturn || isStartOfParagraph != true && collect != true && isBreak != true) && available() > 0) {
    value=readFromOriginalBuffer();
    if ((char)value == '<') {
      partOfTag=true;
    }
    if (partOfTag) {
      buffer.append((char)value);
    }
    if (value == '\r' || value == '\n') {
      this.isCarriageReturn=true;
    }
 else {
      this.isCarriageReturn=false;
    }
    if ((char)value == '>') {
      partOfTag=false;
      String tag=buffer.toString();
      if (tag.equals(START_WORDML_TEXT)) {
        collect=true;
      }
 else       if (tag.equals(END_WORDML_TEXT)) {
        collect=false;
      }
 else       if (tag.startsWith(START_PARAGRAPH)) {
        isStartOfParagraph=true;
      }
 else       if (tag.startsWith(STOP_PARAGRAPH)) {
        isStartOfParagraph=false;
      }
 else       if (tag.startsWith(LINE_BREAK)) {
        isBreak=true;
      }
 else       if (tag.startsWith(TAB)) {
        isBreak=true;
      }
      buffer.delete(0,buffer.length());
      value=' ';
      if (isStartOfParagraph != true && isBreak != true && available() > 0) {
        value=readFromOriginalBuffer();
        if ((char)value == '<') {
          partOfTag=true;
          buffer.append((char)value);
        }
      }
    }
  }
  if (available() <= 0) {
    value=-1;
  }
  return value;
}

Fixed version (ground truth):
@Override public int process(int value) throws IOException {
  isStartOfParagraph=false;
  isBreak=false;
  if ((char)value == '<') {
    partOfTag=true;
    buffer.append((char)value);
  }
  while ((partOfTag || isCarriageReturn || isStartOfParagraph != true && collect != true && isBreak != true) && available() > 0) {
    value=readFromOriginalBuffer();
    if ((char)value == '<') {
      partOfTag=true;
    }
    if (partOfTag) {
      buffer.append((char)value);
    }
    if (value == '\r' || value == '\n') {
      this.isCarriageReturn=true;
    }
 else {
      this.isCarriageReturn=false;
    }
    if ((char)value == '>') {
      partOfTag=false;
      String tag=buffer.toString();
      if (tag.matches(START_WORDML_TEXT_REGEX)) {
        collect=true;
      }
 else       if (tag.equals(END_WORDML_TEXT)) {
        collect=false;
      }
 else       if (tag.matches(START_PARAGRAPH_REGEX)) {
        isStartOfParagraph=true;
      }
 else       if (tag.startsWith(STOP_PARAGRAPH)) {
        isStartOfParagraph=false;
      }
 else       if (tag.startsWith(LINE_BREAK)) {
        isBreak=true;
      }
 else       if (tag.matches(TAB_REGEX)) {
        isBreak=true;
      }
      buffer.delete(0,buffer.length());
      value=' ';
      if (isStartOfParagraph != true && isBreak != true && available() > 0) {
        value=readFromOriginalBuffer();
        if ((char)value == '<') {
          partOfTag=true;
          buffer.append((char)value);
        }
      }
    }
  }
  if (available() <= 0) {
    value=-1;
  }
  return value;
}
Program: 97305
Project: 97305
Buggy source:
@SuppressWarnings("String_Node_Str") public ResultSet<Artifact> getResults() throws OseeCoreException {
  SearchResult result=proxied.getSearchResult();
  SearchParameters searchParameters=result.getSearchParameters();
  IOseeBranch branch=TokenFactory.createBranch(searchParameters.getBranchUuid(),"String_Node_Str");
  TransactionRecord tx=null;
  if (searchParameters.getFromTx() > 0) {
    tx=TransactionManager.getTransactionId(searchParameters.getFromTx());
  }
  DeletionFlag deletionFlag=searchParameters.isIncludeDeleted() ? DeletionFlag.INCLUDE_DELETED : DeletionFlag.EXCLUDE_DELETED;
  List<Artifact> loadedArtifacts=ArtifactLoader.loadArtifacts(result.getIds(),branch,LoadLevel.ALL,INCLUDE_CACHE,deletionFlag,tx);
  return ResultSets.newResultSet(loadedArtifacts);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public ResultSet<Artifact> getResults() throws OseeCoreException {
  SearchResult result=proxied.getSearchResult();
  SearchParameters searchParameters=result.getSearchParameters();
  IOseeBranch branch=TokenFactory.createBranch(searchParameters.getBranchUuid(),"String_Node_Str");
  TransactionRecord tx=null;
  if (searchParameters.getFromTx() > 0) {
    tx=TransactionManager.getTransactionId(searchParameters.getFromTx());
  }
  DeletionFlag deletionFlag=searchParameters.isIncludeDeleted() ? DeletionFlag.INCLUDE_DELETED : DeletionFlag.EXCLUDE_DELETED;
  List<Integer> ids=result.getIds();
  ResultSet<Artifact> toReturn;
  if (ids != null && !ids.isEmpty()) {
    List<Artifact> loadedArtifacts=ArtifactLoader.loadArtifacts(ids,branch,LoadLevel.ALL,INCLUDE_CACHE,deletionFlag,tx);
    toReturn=ResultSets.newResultSet(loadedArtifacts);
  }
 else {
    toReturn=ResultSets.emptyResultSet();
  }
  return toReturn;
}
Program: 97306
Project: 97306
Buggy source:
private List<Artifact> loadArtifactsFromServerIds(LoadType reload) throws OseeCoreException {
  List<Integer> ids=createOrcsQuery().getSearchResult().getIds();
  List<Artifact> artifacts=ArtifactLoader.loadArtifacts(ids,branch,loadLevel,reload,allowDeleted,transactionId);
  return artifacts;
}

Fixed version (ground truth):
private List<Artifact> loadArtifactsFromServerIds(LoadType reload) throws OseeCoreException {
  List<Integer> ids=createOrcsQuery().getSearchResult().getIds();
  List<Artifact> artifacts;
  if (ids != null && !ids.isEmpty()) {
    artifacts=ArtifactLoader.loadArtifacts(ids,branch,loadLevel,reload,allowDeleted,transactionId);
  }
 else {
    artifacts=Collections.emptyList();
  }
  return artifacts;
}
Program: 97307
Project: 97307
Buggy source:
@Override @XmlElementWrapper(name="String_Node_Str") @XmlElement(name="String_Node_Str") public List<Integer> getIds(){
  return ids;
}

Fixed version (ground truth):
@Override @XmlElementWrapper(name="String_Node_Str") @XmlElement(name="String_Node_Str") public List<Integer> getIds(){
  if (ids == null) {
    ids=new LinkedList<Integer>();
  }
  return ids;
}
Program: 97309
Project: 97309
Buggy source:
@Override public QueryBuilder excludeDeleted(){
  includeDeleted(false);
  return this;
}

Fixed version (ground truth):
@Override public QueryBuilder excludeDeleted(){
  includeDeletedArtifacts(false);
  return this;
}
Program: 97311
Project: 97311
Buggy source:
@Override public void modifyText(ModifyEvent e){
  if (sText != null) {
    debug("String_Node_Str");
    text=sText.getText();
    validate();
    notifyXModifiedListeners();
  }
}

Fixed version (ground truth):
@Override public void modifyText(ModifyEvent e){
  if (Widgets.isAccessible(sText)) {
    text=sText.getText();
    notifyXModifiedListeners();
  }
}
Program: 97312
Project: 97312
Buggy source:
@Override public Connection getConnection(IDatabaseInfo dbInfo) throws Exception {
  Class.forName(JDBC_DRIVER);
  if (firstTime.compareAndSet(true,false)) {
    Pair<String,Integer> addressAndPort=OseeProperties.getOseeDbEmbeddedServerAddress();
    if (addressAndPort != null) {
      int webPort=OseeProperties.getOseeDbEmbeddedWebServerPort();
      if (webPort < 0) {
        webPort=PortUtil.getInstance().getValidPort();
      }
      HyperSqlDbServer.startServer(addressAndPort.getFirst(),addressAndPort.getSecond(),webPort,dbInfo);
    }
  }
  Properties props=dbInfo.getConnectionProperties();
  StringBuilder builder=new StringBuilder();
  builder.append(dbInfo.getConnectionUrl());
  HyperSqlServerUtil.appendProperties(builder,props);
  String url=builder.toString();
  return DriverManager.getConnection(url,props);
}

Fixed version (ground truth):
@Override public Connection getConnection(IDatabaseInfo dbInfo) throws Exception {
  Class.forName(JDBC_DRIVER);
  if (firstTime.compareAndSet(true,false)) {
    Pair<String,Integer> addressAndPort=OseeProperties.getOseeDbEmbeddedServerAddress();
    if (addressAndPort != null) {
      int webPort=OseeProperties.getOseeDbEmbeddedWebServerPort();
      if (webPort < 0) {
        webPort=PortUtil.getInstance().getValidPort();
      }
      HyperSqlDbServer.startServer(addressAndPort.getFirst(),addressAndPort.getSecond(),webPort,dbInfo);
    }
  }
  Properties props=dbInfo.getConnectionProperties();
  StringBuilder builder=new StringBuilder();
  builder.append(dbInfo.getConnectionUrl());
  HyperSqlServerMgr.appendProperties(builder,props);
  String url=builder.toString();
  return DriverManager.getConnection(url,props);
}
Program: 97313
Project: 97313
Buggy source:
private boolean isConnectionAvailable() throws InterruptedException {
  boolean knowIfServerUp=false;
  int numTimes=CHECK_ALIVE_NUMBER_OF_TIMES;
  while (!knowIfServerUp && numTimes > 0) {
    try {
      numTimes--;
      nwServer.testForConnection();
      knowIfServerUp=true;
    }
 catch (    Exception e) {
      OseeLog.log(HyperSqlDbServer.class,Level.SEVERE,"String_Node_Str",e);
      Thread.sleep(3000);
    }
  }
  return knowIfServerUp;
}

Fixed version (ground truth):
private static boolean isConnectionAvailable(String dbId) throws InterruptedException {
  boolean knowIfServerUp=false;
  int numTimes=CHECK_ALIVE_NUMBER_OF_TIMES;
  while (!knowIfServerUp && numTimes > 0) {
    try {
      numTimes--;
      nwServer.testForConnection(dbId);
      knowIfServerUp=true;
    }
 catch (    Exception e) {
      OseeLog.log(HyperSqlDbServer.class,Level.SEVERE,"String_Node_Str",e);
      Thread.sleep(3000);
    }
  }
  return knowIfServerUp;
}
Program: 97314
Project: 97314
Buggy source:
public static void startServer(String host,int port,int webPort,IDatabaseInfo dbInfo) throws Exception {
  instance.startServerInternal(host,port,webPort,dbInfo);
}

Fixed version (ground truth):
public static String startServer(String host,int port,int webPort,IDatabaseInfo dbInfo) throws Exception {
  OseeLog.logf(HyperSqlDbServer.class,Level.INFO,"String_Node_Str",host,port,host,webPort);
  String dbId="String_Node_Str";
  try {
    dbId=nwServer.createServerInstance(InetAddress.getByName(host),port,webPort,dbInfo);
    if (isConnectionAvailable(dbId)) {
      nwServer.printInfo(dbId);
    }
 else {
      OseeLog.log(HyperSqlDbServer.class,Level.INFO,"String_Node_Str");
      OseeLog.log(HyperSqlDbServer.class,Level.INFO,"String_Node_Str");
    }
  }
 catch (  Exception ex) {
    OseeLog.log(HyperSqlDbServer.class,Level.SEVERE,ex);
  }
  return dbId;
}
Program: 97315
Project: 97315
Buggy source:
public static void stopServer(){
  instance.shutdown();
}

Fixed version (ground truth):
public static void stopServer(String dbId){
  shutdown(dbId);
}
Program: 97316
Project: 97316
Buggy source:
private HyperSqlDbServer(){
  this.nwServer=null;
}

Fixed version (ground truth):
private HyperSqlDbServer(){
}
Program: 97317
Project: 97317
Buggy source:
public static boolean stopServerWithWait(){
  instance.shutdown();
  return instance.isShutdown();
}

Fixed version (ground truth):
public static boolean stopServerWithWait(String dbId){
  shutdown(dbId);
  return isShutdown(dbId);
}
Program: 97318
Project: 97318
Buggy source:
private void shutdown(){
  OseeLog.log(HyperSqlDbServer.class,Level.INFO,"String_Node_Str");
  nwServer.shutdown();
  OseeLog.log(HyperSqlDbServer.class,Level.INFO,"String_Node_Str");
}

Fixed version (ground truth):
private static void shutdown(String dbId){
  OseeLog.log(HyperSqlDbServer.class,Level.INFO,"String_Node_Str");
  nwServer.shutdown(dbId);
  OseeLog.log(HyperSqlDbServer.class,Level.INFO,"String_Node_Str");
}
Program: 97319
Project: 97319
Buggy source:
private boolean isShutdown(){
  boolean isDead=false;
  int numTimes=CHECK_ALIVE_NUMBER_OF_TIMES;
  while (!isDead && numTimes > 0) {
    try {
      numTimes--;
      nwServer.testNotRunning();
      isDead=true;
    }
 catch (    Exception e) {
      isDead=false;
      try {
        Thread.sleep(3000);
      }
 catch (      InterruptedException ex) {
      }
    }
  }
  return isDead;
}

Fixed version (ground truth):
private static boolean isShutdown(String dbId){
  boolean isDead=false;
  int numTimes=CHECK_ALIVE_NUMBER_OF_TIMES;
  while (!isDead && numTimes > 0) {
    try {
      numTimes--;
      nwServer.testNotRunning(dbId);
      isDead=true;
    }
 catch (    Exception e) {
      isDead=false;
      try {
        Thread.sleep(3000);
      }
 catch (      InterruptedException ex) {
      }
    }
  }
  return isDead;
}
Program: 97320
Project: 97320
Buggy source:
public void cleanup(){
  if (registration != null) {
    registration.unregister();
  }
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  boolean isDead=HyperSqlDbServer.stopServerWithWait();
  if (isDead) {
    if (tempFolder != null) {
      Lib.deleteDir(tempFolder);
    }
  }
 else {
    Runtime.getRuntime().addShutdownHook(new Thread(){
      @Override public void run(){
        if (tempFolder != null) {
          Lib.deleteDir(tempFolder);
        }
      }
    }
);
  }
}

Fixed version (ground truth):
public void cleanup(){
  if (registration != null) {
    registration.unregister();
  }
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  boolean isDead=HyperSqlDbServer.stopServerWithWait(dbId);
  if (isDead) {
    if (tempFolder != null) {
      Lib.deleteDir(tempFolder);
    }
  }
  if (tempFolder.exists()) {
    Runtime.getRuntime().addShutdownHook(new Thread(){
      @Override public void run(){
        if ((tempFolder != null) && tempFolder.exists()) {
          Lib.deleteDir(tempFolder);
        }
      }
    }
);
  }
}
Program: 97321
Project: 97321
Buggy source:
@Override public void run(){
  if (tempFolder != null) {
    Lib.deleteDir(tempFolder);
  }
}

Fixed version (ground truth):
@Override public void run(){
  if ((tempFolder != null) && tempFolder.exists()) {
    Lib.deleteDir(tempFolder);
  }
}
Program: 97322
Project: 97322
Buggy source:
public void initialize() throws Exception {
  Bundle bundle=FrameworkUtil.getBundle(OseeDatabase.class);
  Assert.assertNotNull("String_Node_Str",bundle);
  int state=bundle.getState();
  if (state != Bundle.STARTING || state != Bundle.ACTIVE) {
    bundle.start();
  }
  tempFolder=createTempFolder();
  Assert.assertNotNull("String_Node_Str",tempFolder);
  addResource(tempFolder,bundle,"String_Node_Str");
  addResource(tempFolder,bundle,"String_Node_Str");
  checkExist(tempFolder,"String_Node_Str");
  checkExist(tempFolder,"String_Node_Str");
  String dbPath=getDbHomePath(tempFolder,"String_Node_Str");
  int port=PortUtil.getInstance().getConsecutiveValidPorts(2);
  IDatabaseInfo databaseInfo=new DbInfo(connectionId,port,dbPath);
  TestDbProvider provider=new TestDbProvider(databaseInfo);
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str",tempFolder.getAbsolutePath());
  registerProvider(provider);
  IOseeDatabaseService dbService=OsgiUtil.getService(IOseeDatabaseService.class);
  Assert.assertNotNull(dbService);
  HyperSqlDbServer.startServer("String_Node_Str",port,port + 1,databaseInfo);
  OseeConnection connection=dbService.getConnection();
  try {
    Assert.assertNotNull(connection);
  }
  finally {
    connection.close();
  }
}

Fixed version (ground truth):
public void initialize() throws Exception {
  Bundle bundle=FrameworkUtil.getBundle(OseeDatabase.class);
  Assert.assertNotNull("String_Node_Str",bundle);
  int state=bundle.getState();
  if (state != Bundle.STARTING || state != Bundle.ACTIVE) {
    bundle.start();
  }
  tempFolder=createTempFolder();
  Assert.assertNotNull("String_Node_Str",tempFolder);
  addResource(tempFolder,bundle,"String_Node_Str");
  addResource(tempFolder,bundle,"String_Node_Str");
  checkExist(tempFolder,"String_Node_Str");
  checkExist(tempFolder,"String_Node_Str");
  String dbPath=getDbHomePath(tempFolder,"String_Node_Str");
  int port=PortUtil.getInstance().getConsecutiveValidPorts(2);
  IDatabaseInfo databaseInfo=new DbInfo(connectionId,port,dbPath);
  TestDbProvider provider=new TestDbProvider(databaseInfo);
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str",tempFolder.getAbsolutePath());
  registerProvider(provider);
  IOseeDatabaseService dbService=OsgiUtil.getService(IOseeDatabaseService.class);
  Assert.assertNotNull(dbService);
  dbId=HyperSqlDbServer.startServer("String_Node_Str",port,port + 1,databaseInfo);
  OseeConnection connection=dbService.getConnection();
  try {
    Assert.assertNotNull(connection);
  }
  finally {
    connection.close();
  }
}
Program: 97323
Project: 97323
Buggy source:
@Override public boolean isEnabledWithException(IStructuredSelection structuredSelection) throws OseeCoreException {
  List<? extends IOseeBranch> branches=Handlers.getBranchesFromStructuredSelection(structuredSelection);
  return !branches.isEmpty() && AccessControlManager.isOseeAdmin();
}

Fixed version (ground truth):
@Override public boolean isEnabledWithException(IStructuredSelection structuredSelection) throws OseeCoreException {
  List<? extends IOseeBranch> branches=Handlers.getBranchesFromStructuredSelection(structuredSelection);
  return !branches.isEmpty() && (AccessControlManager.isOseeAdmin() || canEnableBranches(branches));
}
Program: 97324
Project: 97324
Buggy source:
@Test public void test_branchToFileName_notAllowedCharsInName() throws OseeCoreException {
  branch.setName("String_Node_Str");
  String branchShortName=RenderingUtil.toFileName(branch);
  Assert.assertEquals("String_Node_Str","String_Node_Str",branchShortName);
}

Fixed version (ground truth):
@Test public void test_branchToFileName_notAllowedCharsInName() throws OseeCoreException {
  String branchShortName="String_Node_Str";
  branch.setName("String_Node_Str");
  branchShortName=RenderingUtil.toFileName(branch);
  Assert.assertEquals("String_Node_Str","String_Node_Str",branchShortName);
  branch.setName("String_Node_Str");
  branchShortName=RenderingUtil.toFileName(branch);
  Assert.assertEquals("String_Node_Str","String_Node_Str",branchShortName);
  branch.setName("String_Node_Str");
  branchShortName=RenderingUtil.toFileName(branch);
  Assert.assertEquals("String_Node_Str","String_Node_Str",branchShortName);
  branch.setName("String_Node_Str");
  branchShortName=RenderingUtil.toFileName(branch);
  Assert.assertEquals("String_Node_Str","String_Node_Str",branchShortName);
  branch.setName("String_Node_Str");
  branchShortName=RenderingUtil.toFileName(branch);
  Assert.assertEquals("String_Node_Str","String_Node_Str",branchShortName);
  branch.setName("String_Node_Str");
  branchShortName=RenderingUtil.toFileName(branch);
  Assert.assertEquals("String_Node_Str","String_Node_Str",branchShortName);
  branch.setName("String_Node_Str");
  branchShortName=RenderingUtil.toFileName(branch);
  Assert.assertEquals("String_Node_Str","String_Node_Str",branchShortName);
  branch.setName("String_Node_Str");
  branchShortName=RenderingUtil.toFileName(branch);
  Assert.assertEquals("String_Node_Str","String_Node_Str",branchShortName);
  branch.setName("String_Node_Str");
  branchShortName=RenderingUtil.toFileName(branch);
  Assert.assertEquals("String_Node_Str","String_Node_Str",branchShortName);
  branch.setName("String_Node_Str");
  branchShortName=RenderingUtil.toFileName(branch);
  Assert.assertEquals("String_Node_Str","String_Node_Str",branchShortName);
}
Program: 97325
Project: 97325
Buggy source:
@Override public void asTestPointUpdate(final TestPointUpdate testPointUpdate){
  executor.submit(new StatusBoardRecieveEvent<TestPointUpdate>(testPointUpdate){
    @Override public void run(){
      checkServiceStatusDataValid(testPointUpdate);
      final ScriptTask task=scriptManager.getScriptTask(testPointUpdate.getClassName());
      if (task != null) {
        task.getScriptModel().getOutputModel().setPassedTestPoints(testPointUpdate.getPass());
        task.getScriptModel().getOutputModel().setFailedTestPoints(testPointUpdate.getFail());
        scriptManager.updateScriptTableViewerTimed(task);
      }
 else {
        OseeLog.log(TestManagerPlugin.class,Level.WARNING,"String_Node_Str");
      }
    }
  }
);
  logExecutorSize();
}

Fixed version (ground truth):
@Override public void asTestPointUpdate(final TestPointUpdate testPointUpdate){
  executor.submit(new StatusBoardRecieveEvent<TestPointUpdate>(testPointUpdate){
    @Override public void run(){
      checkServiceStatusDataValid(testPointUpdate);
      final ScriptTask task=scriptManager.getScriptTask(testPointUpdate.getClassName());
      if (task != null) {
        task.getScriptModel().getOutputModel().setAborted(false);
        task.getScriptModel().getOutputModel().setPassedTestPoints(testPointUpdate.getPass());
        task.getScriptModel().getOutputModel().setFailedTestPoints(testPointUpdate.getFail());
        scriptManager.updateScriptTableViewerTimed(task);
      }
 else {
        OseeLog.log(TestManagerPlugin.class,Level.WARNING,"String_Node_Str");
      }
    }
  }
);
  logExecutorSize();
}
Program: 97326
Project: 97326
Buggy source:
/** 
 * @return Returns the passFail.
 */
public String getPassFail(){
  int passTP=scriptModel.getOutputModel().getPassedTestPoints();
  int failTP=scriptModel.getOutputModel().getFailedTestPoints();
  if (scriptModel.getOutputModel().isAborted()) {
    return "String_Node_Str";
  }
 else   if (passTP > 0 || failTP > 0) {
    if (failTP == 0) {
      return "String_Node_Str" + passTP + "String_Node_Str";
    }
 else {
      return "String_Node_Str" + failTP + "String_Node_Str"+ (passTP + failTP)+ "String_Node_Str";
    }
  }
 else   if (status == ScriptStatusEnum.RUNNING) {
    return "String_Node_Str";
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * @return Returns the passFail.
 */
public String getPassFail(){
  int passTP=scriptModel.getOutputModel().getPassedTestPoints();
  int failTP=scriptModel.getOutputModel().getFailedTestPoints();
  if (status == ScriptStatusEnum.RUNNING && scriptModel.getOutputModel().isAborted()) {
    return "String_Node_Str";
  }
  if (scriptModel.getOutputModel().isAborted()) {
    return "String_Node_Str";
  }
 else   if (passTP > 0 || failTP > 0) {
    if (failTP == 0) {
      return "String_Node_Str" + passTP + "String_Node_Str";
    }
 else {
      return "String_Node_Str" + failTP + "String_Node_Str"+ (passTP + failTP)+ "String_Node_Str";
    }
  }
 else   if (status == ScriptStatusEnum.RUNNING) {
    return "String_Node_Str";
  }
  return "String_Node_Str";
}
Program: 97327
Project: 97327
Buggy source:
private void writeRequirementStatusLines(Artifact requirement) throws OseeCoreException, IOException {
  statusLines.clear();
  testPocs.clear();
  requirementPocs.clear();
  sumFormula.delete(0,99999);
  String[] statusLine=new String[100];
  processRpcrStatuses(requirement,statusLine);
  statusLine[Index.Category.ordinal()]=requirement.getSoleAttributeValue(CoreAttributeTypes.Category,"String_Node_Str");
  if (requirement.isOfType(CoreArtifactTypes.IndirectSoftwareRequirement)) {
    statusLine[Index.Category.ordinal()]="String_Node_Str";
  }
  statusLine[Index.TEST_POC.ordinal()]=AtsObjects.toString("String_Node_Str",testPocs);
  statusLine[Index.PARTITION.ordinal()]=requirement.getAttributesToString(CoreAttributeTypes.Partition);
  statusLine[Index.SUBSYSTEM.ordinal()]=requirement.getSoleAttributeValue(CoreAttributeTypes.Subsystem,"String_Node_Str");
  statusLine[Index.REQUIREMENT_NAME.ordinal()]=requirement.getName();
  statusLine[Index.QUALIFICATION_METHOD.ordinal()]=requirement.getAttributesToStringSorted(CoreAttributeTypes.QualificationMethod);
  statusLine[Index.REQUIREMENT_POC.ordinal()]=Collections.toString("String_Node_Str",requirementPocs);
  Collection<RequirementStatus> reqStats=reqTaskMap.getValues(requirement.getName());
  statusLine[Index.SW_ENHANCEMENT.ordinal()]=reqStats.isEmpty() ? "String_Node_Str" : reqStats.iterator().next().getSwEnhancement();
  processTestScriptsAndProcedures(requirement,statusLine);
  for (  String[] line : statusLines) {
    excelWriter.writeRow((Object[])line);
  }
}

Fixed version (ground truth):
private void writeRequirementStatusLines(Artifact requirement) throws OseeCoreException, IOException {
  statusLines.clear();
  testPocs.clear();
  requirementPocs.clear();
  sumFormula.delete(0,99999);
  String[] statusLine=new String[MAX_EXCEL_COLUMNS];
  processRpcrStatuses(requirement,statusLine);
  statusLine[Index.Category.ordinal()]=requirement.getSoleAttributeValue(CoreAttributeTypes.Category,"String_Node_Str");
  if (requirement.isOfType(CoreArtifactTypes.IndirectSoftwareRequirement)) {
    statusLine[Index.Category.ordinal()]="String_Node_Str";
  }
  statusLine[Index.TEST_POC.ordinal()]=AtsObjects.toString("String_Node_Str",testPocs);
  statusLine[Index.PARTITION.ordinal()]=requirement.getAttributesToString(CoreAttributeTypes.Partition);
  statusLine[Index.SUBSYSTEM.ordinal()]=requirement.getSoleAttributeValue(CoreAttributeTypes.Subsystem,"String_Node_Str");
  statusLine[Index.REQUIREMENT_NAME.ordinal()]=requirement.getName();
  statusLine[Index.QUALIFICATION_METHOD.ordinal()]=requirement.getAttributesToStringSorted(CoreAttributeTypes.QualificationMethod);
  statusLine[Index.REQUIREMENT_POC.ordinal()]=Collections.toString("String_Node_Str",requirementPocs);
  Collection<RequirementStatus> reqStats=reqTaskMap.getValues(requirement.getName());
  statusLine[Index.SW_ENHANCEMENT.ordinal()]=reqStats.isEmpty() ? "String_Node_Str" : reqStats.iterator().next().getSwEnhancement();
  processTestScriptsAndProcedures(requirement,statusLine);
  for (  String[] line : statusLines) {
    excelWriter.writeRow((Object[])line);
  }
}
Program: 97328
Project: 97328
Buggy source:
@Override public void runWithException() throws OseeCoreException {
  ArrayList<String> artifactNames=new ArrayList<String>();
  Map<String,String> selectedToStateName=new HashMap<String,String>();
  artifactNames.add("String_Node_Str" + sma.getArtifactTypeName() + "String_Node_Str");
  for (  IAtsStateDefinition stateDefinition : AtsClientService.get().getWorkDefinitionAdmin().getStatesOrderedByDefaultToState(sma.getWorkDefinition())) {
    String displayName="String_Node_Str" + stateDefinition.getName() + "String_Node_Str";
    artifactNames.add(displayName);
    selectedToStateName.put(displayName,stateDefinition.getName());
  }
  if (emulate) {
    boolean result=performEmulate();
    if (!result) {
      return;
    }
  }
 else {
    boolean result=performUi(artifactNames);
    if (!result) {
      return;
    }
  }
  String state="String_Node_Str";
  if (!selectedState.startsWith(sma.getName() + "String_Node_Str")) {
    state=selectedToStateName.get(selectedState);
  }
  sma.getNotes().addNote(noteType,state,noteText,AtsClientService.get().getUserAdmin().getCurrentUser());
  dirtiable.onDirtied();
}

Fixed version (ground truth):
@Override public void runWithException() throws OseeCoreException {
  ArrayList<String> artifactNames=new ArrayList<String>();
  Map<String,String> selectedToStateName=new HashMap<String,String>();
  artifactNames.add("String_Node_Str" + sma.getArtifactTypeName() + "String_Node_Str");
  for (  IAtsStateDefinition stateDefinition : AtsClientService.get().getWorkDefinitionAdmin().getStatesOrderedByOrdinal(sma.getWorkDefinition())) {
    String displayName="String_Node_Str" + stateDefinition.getName() + "String_Node_Str";
    artifactNames.add(displayName);
    selectedToStateName.put(displayName,stateDefinition.getName());
  }
  if (emulate) {
    boolean result=performEmulate();
    if (!result) {
      return;
    }
  }
 else {
    boolean result=performUi(artifactNames);
    if (!result) {
      return;
    }
  }
  String state="String_Node_Str";
  if (!selectedState.startsWith(sma.getName() + "String_Node_Str")) {
    state=selectedToStateName.get(selectedState);
  }
  sma.getNotes().addNote(noteType,state,noteText,AtsClientService.get().getUserAdmin().getCurrentUser());
  dirtiable.onDirtied();
}
Program: 97329
Project: 97329
Buggy source:
public static StateXWidgetPage getCurrentAtsWorkPage(AbstractWorkflowArtifact awa){
  for (  StateXWidgetPage statePage : getStatePagesOrderedByDefaultToState(awa)) {
    if (awa.getStateMgr().getCurrentStateName().equals(statePage.getName())) {
      return statePage;
    }
  }
  return null;
}

Fixed version (ground truth):
public static StateXWidgetPage getCurrentAtsWorkPage(AbstractWorkflowArtifact awa){
  for (  StateXWidgetPage statePage : getStatePagesOrderedByOrdinal(awa)) {
    if (awa.getStateMgr().getCurrentStateName().equals(statePage.getName())) {
      return statePage;
    }
  }
  return null;
}
Program: 97330
Project: 97330
Buggy source:
private void getChildrenFromWrappedPercentDefinition(WrappedPercentWeight weightDef,List<Object> items){
  for (  IAtsStateDefinition stateDef : AtsClientService.get().getWorkDefinitionAdmin().getStatesOrderedByDefaultToState(weightDef.getWorkDef())) {
    items.add(String.format("String_Node_Str",stateDef.getName(),stateDef.getStateWeight()));
  }
}

Fixed version (ground truth):
private void getChildrenFromWrappedPercentDefinition(WrappedPercentWeight weightDef,List<Object> items){
  for (  IAtsStateDefinition stateDef : AtsClientService.get().getWorkDefinitionAdmin().getStatesOrderedByOrdinal(weightDef.getWorkDef())) {
    items.add(String.format("String_Node_Str",stateDef.getName(),stateDef.getStateWeight()));
  }
}
Program: 97332
Project: 97332
Buggy source:
@Test public void testMultipleRebaselineRequests() throws Exception {
  ConflictResolverOperation resolverOperation=new ConflictResolverOperation("String_Node_Str",MergeManagerTest.class.getCanonicalName()){
    @Override protected void doWork(    IProgressMonitor monitor) throws Exception {
      assertTrue("String_Node_Str",wasExecuted());
    }
  }
;
  UpdateBranchOperation update=new UpdateBranchOperation(workingBranch,resolverOperation);
  Operations.executeAsJob(update,true);
  Thread.sleep(1000);
  List<MergeBranch> mergeBranches=BranchManager.getMergeBranches(workingBranch);
  Branch branchForUpdate=mergeBranches.get(0).getDestinationBranch();
  assertTrue("String_Node_Str",mergeBranches.size() == 1);
  assertTrue("String_Node_Str",workingBranch.getBranchState().isRebaselineInProgress());
  UpdateBranchOperation update2=new UpdateBranchOperation(workingBranch,resolverOperation);
  Operations.executeAsJob(update2,true);
  Thread.sleep(1000);
  List<MergeBranch> mergeBranchesSecondAttempt=BranchManager.getMergeBranches(workingBranch);
  Branch branchForUpdateSecondAttempt=mergeBranchesSecondAttempt.get(0).getDestinationBranch();
  assertTrue("String_Node_Str",workingBranch.getBranchState().isRebaselineInProgress());
  assertTrue("String_Node_Str",mergeBranches.size() == 1);
  assertTrue("String_Node_Str",branchForUpdate.equals(branchForUpdateSecondAttempt));
  RebaselineInProgressHandler.cancelCurrentUpdate(workingBranch,true);
}

Fixed version (ground truth):
@Test public void testMultipleRebaselineRequests() throws Exception {
  ConflictResolverOperation resolverOperation=new ConflictResolverOperation("String_Node_Str",MergeManagerTest.class.getCanonicalName()){
    @Override protected void doWork(    IProgressMonitor monitor) throws Exception {
      assertTrue("String_Node_Str",wasExecuted());
    }
  }
;
  UpdateBranchOperation update=new UpdateBranchOperation(workingBranch,resolverOperation);
  Operations.executeWorkAndCheckStatus(update);
  List<MergeBranch> mergeBranches=BranchManager.getMergeBranches(workingBranch);
  Branch branchForUpdate=mergeBranches.get(0).getDestinationBranch();
  assertTrue("String_Node_Str",mergeBranches.size() == 1);
  assertTrue("String_Node_Str",workingBranch.getBranchState().isRebaselineInProgress());
  UpdateBranchOperation update2=new UpdateBranchOperation(workingBranch,resolverOperation);
  Operations.executeWorkAndCheckStatus(update2);
  List<MergeBranch> mergeBranchesSecondAttempt=BranchManager.getMergeBranches(workingBranch);
  Branch branchForUpdateSecondAttempt=mergeBranchesSecondAttempt.get(0).getDestinationBranch();
  assertTrue("String_Node_Str",workingBranch.getBranchState().isRebaselineInProgress());
  assertTrue("String_Node_Str",mergeBranches.size() == 1);
  assertTrue("String_Node_Str",branchForUpdate.equals(branchForUpdateSecondAttempt));
  RebaselineInProgressHandler.cancelCurrentUpdate(workingBranch,true);
}
Program: 97337
Project: 97337
Buggy source:
@Test public void testNameAttributeEqualSearch() throws OseeCoreException {
  QueryBuilder builder=queryFactory.fromBranch(CoreBranches.COMMON).and(CoreAttributeTypes.Name,Operator.EQUAL,"String_Node_Str");
  ResultSet<ArtifactReadable> resultSet=builder.getResults();
  assertEquals(1,resultSet.size());
  assertEquals(1,builder.getCount());
  Map<Integer,ArtifactReadable> lookup=createLookup(resultSet);
  ArtifactReadable art7=lookup.get(7);
  assertEquals(art7.getSoleAttributeAsString(CoreAttributeTypes.Name),"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testNameAttributeEqualSearch() throws OseeCoreException {
  QueryBuilder builder=queryFactory.fromBranch(CoreBranches.COMMON).and(CoreAttributeTypes.Name,Operator.EQUAL,"String_Node_Str");
  ResultSet<ArtifactReadable> resultSet=builder.getResults();
  assertEquals(1,resultSet.size());
  assertEquals(1,builder.getCount());
  ArtifactReadable art7=resultSet.getExactlyOne();
  assertEquals(art7.getSoleAttributeAsString(CoreAttributeTypes.Name),"String_Node_Str");
}
Program: 97338
Project: 97338
Buggy source:
@Test public void testBooleanAttributeSearch() throws OseeCoreException {
  QueryBuilder builder=queryFactory.fromBranch(CoreBranches.COMMON).and(CoreAttributeTypes.DefaultGroup,Operator.EQUAL,"String_Node_Str");
  ResultSet<ArtifactReadable> resultSet=builder.getResults();
  assertEquals(1,resultSet.size());
  assertEquals(1,builder.getCount());
  Map<Integer,ArtifactReadable> lookup=createLookup(resultSet);
  ArtifactReadable art8=lookup.get(8);
  assertEquals(art8.getSoleAttributeAsString(CoreAttributeTypes.Name),"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testBooleanAttributeSearch() throws OseeCoreException {
  QueryBuilder builder=queryFactory.fromBranch(CoreBranches.COMMON).and(CoreAttributeTypes.DefaultGroup,Operator.EQUAL,"String_Node_Str");
  ResultSet<ArtifactReadable> resultSet=builder.getResults();
  assertEquals(1,resultSet.size());
  assertEquals(1,builder.getCount());
  ArtifactReadable art8=resultSet.getExactlyOne();
  assertEquals(art8.getSoleAttributeAsString(CoreAttributeTypes.Name),"String_Node_Str");
}
Program: 97339
Project: 97339
Buggy source:
@Before public void setup(){
  ApplicationContext context=null;
  factory=orcsApi.getQueryFactory(context);
}

Fixed version (ground truth):
@Before public void setup(){
  ApplicationContext context=null;
  factory=orcsApi.getQueryFactory(context);
  branchApi=orcsApi.getBranchOps(context);
  txFactory=orcsApi.getTransactionFactory(context);
}
Program: 97340
Project: 97340
Buggy source:
/** 
 * @param destOffset offset in this memory resource in which the copy will begin
 */
public void copyData(int destOffset,ByteBuffer src,int length) throws MessageSystemException {
  if (length + destOffset > byteArray.get().length) {
    throw new MessageSystemException("String_Node_Str",Level.INFO);
  }
  if (src.hasArray()) {
    System.arraycopy(src.array(),src.arrayOffset(),byteArray.get(),destOffset,length);
  }
 else {
synchronized (src) {
      src.mark();
      src.get(byteArray.get(),destOffset,length);
      src.reset();
    }
  }
  Arrays.fill(byteArray.get(),destOffset + length,byteArray.get().length,(byte)0);
  _dataHasChanged=true;
}

Fixed version (ground truth):
/** 
 * @param destOffset offset in this memory resource in which the copy will begin
 */
public void copyData(int destOffset,ByteBuffer src,int length) throws MessageSystemException {
  if (length + destOffset > byteArray.get().length) {
    throw new MessageSystemException("String_Node_Str",Level.INFO);
  }
  if (src.hasArray()) {
    System.arraycopy(src.array(),src.arrayOffset() + src.position(),byteArray.get(),destOffset,length);
  }
 else {
synchronized (src) {
      src.mark();
      src.get(byteArray.get(),destOffset,length);
      src.reset();
    }
  }
  Arrays.fill(byteArray.get(),destOffset + length,byteArray.get().length,(byte)0);
  _dataHasChanged=true;
}
Program: 97341
Project: 97341
Buggy source:
public void toWordML(Producer producer,IOseeBranch branch,RelationOrderData relationOrderData){
  try {
    WordMLProducer writer=(WordMLProducer)producer;
    writer.startTable();
    writer.addWordMl("String_Node_Str");
    if (!relationOrderData.hasEntries()) {
      writer.addTableRow(NO_DATA_TAG);
    }
 else {
      writer.addTableRow("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
      for (      Entry<Pair<String,String>,Pair<String,List<String>>> entry : relationOrderData.getOrderedEntrySet()) {
        String relationTypeName=entry.getKey().getFirst();
        String relationSide=entry.getKey().getSecond();
        String sorterGuid=entry.getValue().getFirst();
        List<String> guidList=entry.getValue().getSecond();
        List<String> mlLinks=guidResolver.resolveAsOseeLinks(branch,guidList);
        RelationType relationType=relationCache.getUniqueByName(relationTypeName);
        RelationSide side=RelationSide.fromString(relationSide);
        try {
          writeTableRow(writer,relationType,side,resolveSorter(sorterGuid),mlLinks);
        }
 catch (        Exception ex) {
          OseeLog.log(Activator.class,Level.SEVERE,ex);
        }
      }
    }
    writer.endTable();
  }
 catch (  Exception ex) {
    OseeLog.log(Activator.class,Level.SEVERE,ex);
  }
}

Fixed version (ground truth):
public void toWordML(Producer producer,IOseeBranch branch,RelationOrderData relationOrderData){
  WordMLProducer writer=(WordMLProducer)producer;
  try {
    writer.startTable();
    writer.addWordMl("String_Node_Str");
    if (!relationOrderData.hasEntries()) {
      writer.addTableRow(NO_DATA_TAG);
    }
 else {
      writer.addTableRow("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
      for (      Entry<Pair<String,String>,Pair<String,List<String>>> entry : relationOrderData.getOrderedEntrySet()) {
        String relationTypeName=entry.getKey().getFirst();
        String relationSide=entry.getKey().getSecond();
        String sorterGuid=entry.getValue().getFirst();
        List<String> guidList=entry.getValue().getSecond();
        List<String> mlLinks=guidResolver.resolveAsOseeLinks(branch,guidList);
        RelationType relationType=relationCache.getUniqueByName(relationTypeName);
        RelationSide side=RelationSide.fromString(relationSide);
        try {
          writeTableRow(writer,relationType,side,resolveSorter(sorterGuid),mlLinks);
        }
 catch (        Exception ex) {
          OseeLog.log(Activator.class,Level.SEVERE,ex);
        }
      }
    }
  }
 catch (  Exception ex) {
    OseeLog.log(Activator.class,Level.SEVERE,ex);
  }
 finally {
    try {
      writer.endTable();
    }
 catch (    Exception ex) {
      OseeLog.log(Activator.class,Level.SEVERE,ex);
    }
  }
}