nus-yam/ex-repair huggingface dataset:
Program: 96991
Project: 96991
Buggy source:
private void readXmlData(){
  TestManagerPlugin.log(Level.INFO,"String_Node_Str");
  IEditorInput coreinput=getEditorInput();
  String xmlText="String_Node_Str";
  if (coreinput instanceof IFileEditorInput) {
    IFileEditorInput input=(IFileEditorInput)getEditorInput();
    thisIFile=input.getFile();
    String name=thisIFile.getName();
    this.setPartName(name);
    if (thisIFile != null) {
      try {
        xmlText=Lib.inputStreamToString(thisIFile.getContents());
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
 else {
      TestManagerPlugin.log(Level.SEVERE,"String_Node_Str");
    }
  }
 else   if (coreinput instanceof TestManagerInput) {
    TestManagerInput input=(TestManagerInput)getEditorInput();
    String name="String_Node_Str";
    this.setPartName(name);
    xmlText=input.getDefaultXML();
  }
  model.setFromXml(xmlText);
}

Fixed version (ground truth):
private void readXmlData(){
  TestManagerPlugin.log(Level.INFO,"String_Node_Str");
  IEditorInput coreinput=getEditorInput();
  String xmlText="String_Node_Str";
  if (coreinput instanceof IFileEditorInput) {
    IFileEditorInput input=(IFileEditorInput)getEditorInput();
    thisIFile=input.getFile();
    try {
      thisIFile.refreshLocal(IResource.DEPTH_ZERO,null);
    }
 catch (    CoreException e) {
      e.printStackTrace();
    }
    String name=thisIFile.getName();
    this.setPartName(name);
    if (thisIFile != null) {
      try {
        xmlText=Lib.inputStreamToString(thisIFile.getContents());
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
 else {
      TestManagerPlugin.log(Level.SEVERE,"String_Node_Str");
    }
  }
 else   if (coreinput instanceof TestManagerInput) {
    TestManagerInput input=(TestManagerInput)getEditorInput();
    String name="String_Node_Str";
    this.setPartName(name);
    xmlText=input.getDefaultXML();
  }
  model.setFromXml(xmlText);
}
Program: 96992
Project: 96992
Buggy source:
@Path("String_Node_Str") @POST @RolesAllowed(DispoRoles.ROLES_ADMINISTRATOR) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response getDispoSetCopy(@Encoded @QueryParam("String_Node_Str") String destinationSet,@Encoded @QueryParam("String_Node_Str") String sourceSet,CopySetParams params){
  Response.Status status;
  final DispoSet destination=dispoApi.getDispoSetById(program,destinationSet);
  final DispoSet source=dispoApi.getDispoSetById(program,sourceSet);
  String reportUrl=dispoApi.copyDispoSet(program,destination,source,params);
  DispoSetData responseSet=new DispoSetData();
  responseSet.setOperationStatus(reportUrl);
  if (Strings.isValid(reportUrl)) {
    status=Status.OK;
  }
 else {
    status=Status.NOT_FOUND;
  }
  return Response.status(status).entity(responseSet).build();
}

Fixed version (ground truth):
@Path("String_Node_Str") @POST @RolesAllowed(DispoRoles.ROLES_ADMINISTRATOR) @Produces(MediaType.APPLICATION_JSON) public Response getDispoSetCopy(@QueryParam("String_Node_Str") String destinationSet,@QueryParam("String_Node_Str") String sourceSet,CopySetParams params){
  Response.Status status;
  final DispoSet destination=dispoApi.getDispoSetById(program,destinationSet);
  final DispoSet source=dispoApi.getDispoSetById(program,sourceSet);
  String reportUrl="String_Node_Str";
  DispoSetData responseSet=new DispoSetData();
  responseSet.setOperationStatus(reportUrl);
  if (Strings.isValid(reportUrl)) {
    status=Status.OK;
  }
 else {
    status=Status.NOT_FOUND;
  }
  return Response.status(status).entity(responseSet).build();
}
Program: 96993
Project: 96993
Buggy source:
public AccountWebPreferences getAccountWebPreferencesData(String value){
  ResultSet<Account> result=accountAdmin.getAccountByGuid(value);
  Account account=result.getExactlyOne();
  AccountWebPreferences preferences=account.getWebPreferences();
  return preferences;
}

Fixed version (ground truth):
public AccountWebPreferences getAccountWebPreferencesData(Long id){
  ResultSet<Account> result=accountAdmin.getAccountById(id);
  Account account=result.getExactlyOne();
  AccountWebPreferences preferences=account.getWebPreferences();
  return preferences;
}
Program: 96994
Project: 96994
Buggy source:
@GET @Path("String_Node_Str") @PermitAll @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML}) public Response getPreferences(@PathParam("String_Node_Str") String id){
  return Response.ok().entity(accountOps.getAccountWebPreferencesData(id)).build();
}

Fixed version (ground truth):
@GET @Path("String_Node_Str") @PermitAll @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML}) public Response getPreferences(@PathParam("String_Node_Str") Long id){
  return Response.ok().entity(accountOps.getAccountWebPreferencesData(id)).build();
}
Program: 96995
Project: 96995
Buggy source:
@Override public ArtifactProxy asCastedObject(Object object) throws OseeCoreException {
  XArtifactProxy proxy=null;
  if (object instanceof Artifact) {
    final Artifact artifact=(Artifact)object;
    proxy=new XArtifactProxy(artifact);
  }
 else   if (object instanceof IOseeBranch) {
    IOseeBranch branch=(Branch)object;
    final Artifact artifact=OseeSystemArtifacts.getDefaultHierarchyRootArtifact(branch);
    proxy=new XArtifactProxy(artifact);
  }
  return proxy;
}

Fixed version (ground truth):
@Override public ArtifactProxy asCastedObject(Object object) throws OseeCoreException {
  XArtifactProxy proxy=null;
  if (object instanceof Artifact) {
    final Artifact artifact=(Artifact)object;
    proxy=new XArtifactProxy(artifact);
  }
 else   if (object instanceof IOseeBranch) {
    IOseeBranch branch=(IOseeBranch)object;
    final Artifact artifact=OseeSystemArtifacts.getDefaultHierarchyRootArtifact(branch);
    proxy=new XArtifactProxy(artifact);
  }
  return proxy;
}
Program: 96996
Project: 96996
Buggy source:
public static void computeXTextSize(XText xText){
  if (Widgets.isAccessible(xText.getStyledText())) {
    int height=xText.getStyledText().getLineCount() * xText.getStyledText().getLineHeight();
    GridData formTextGd=new GridData(SWT.FILL,SWT.FILL,true,true);
    if (xText.isFillVertically() && height < 60) {
      formTextGd.heightHint=60;
    }
 else {
      formTextGd.heightHint=height;
    }
    formTextGd.widthHint=200;
    xText.getStyledText().setLayoutData(formTextGd);
  }
}

Fixed version (ground truth):
public static void computeXTextSize(XText xText){
  if (Widgets.isAccessible(xText.getStyledText())) {
    int lineCount=xText.getStyledText().getLineCount();
    int lineLimit=Integer.valueOf(OseeInfo.getCachedValue(ATTR_FORM_PART_LINE_LIMIT));
    lineCount=lineCount > lineLimit ? lineLimit : lineCount;
    int height=lineCount * xText.getStyledText().getLineHeight();
    GridData formTextGd=new GridData(SWT.FILL,SWT.FILL,true,true);
    if (xText.isFillVertically() && height < 60) {
      formTextGd.heightHint=60;
    }
 else {
      formTextGd.heightHint=height;
    }
    formTextGd.widthHint=200;
    xText.getStyledText().setLayoutData(formTextGd);
  }
}
Program: 96997
Project: 96997
Buggy source:
public static URI computeRedirectUri(URI redirectURI,boolean ignoreBasePath,Message m,ContainerRequestContext context){
  URI finalRedirectURI=null;
  if (redirectURI != null) {
    if (!redirectURI.isAbsolute()) {
      String endpointAddress=HttpUtils.getEndpointAddress(m);
      Object basePathProperty=m.get(Message.BASE_PATH);
      if (ignoreBasePath && basePathProperty != null && !"String_Node_Str".equals(basePathProperty)) {
        int index=endpointAddress.lastIndexOf(basePathProperty.toString());
        if (index != -1) {
          endpointAddress=endpointAddress.substring(0,index);
        }
      }
      UriInfo uriInfo=context.getUriInfo();
      URI requestUrl=uriInfo.getRequestUri();
      String continueURL=requestUrl.toASCIIString();
      finalRedirectURI=UriBuilder.fromUri(endpointAddress).path(redirectURI.toString()).queryParam("String_Node_Str",continueURL).build();
    }
 else {
      finalRedirectURI=redirectURI;
    }
  }
  return finalRedirectURI;
}

Fixed version (ground truth):
public static URI computeRedirectUri(URI redirectURI,boolean ignoreBasePath,Message m,ContainerRequestContext context){
  URI finalRedirectURI=null;
  if (redirectURI != null) {
    if (!redirectURI.isAbsolute()) {
      String endpointAddress=HttpUtils.getEndpointAddress(m);
      Object basePathProperty=m.get(Message.BASE_PATH);
      if (ignoreBasePath && basePathProperty != null && !"String_Node_Str".equals(basePathProperty)) {
        int index=endpointAddress.lastIndexOf(basePathProperty.toString());
        if (index != -1) {
          endpointAddress=endpointAddress.substring(0,index);
        }
      }
      UriInfo uriInfo=context.getUriInfo();
      URI requestUrl=uriInfo.getRequestUri();
      String scheme=requestUrl.getScheme();
      String forwardedServer=getForwarderServer();
      String server;
      if (Strings.isValid(forwardedServer)) {
        server=forwardedServer;
      }
 else {
        int port=requestUrl.getPort();
        server=String.format("String_Node_Str",requestUrl.getHost(),port);
      }
      URI requestUrlWithServer=UriBuilder.fromPath(server).path(requestUrl.getPath()).replaceQuery(requestUrl.getRawQuery()).scheme(scheme).build();
      String continueURL=requestUrlWithServer.toASCIIString();
      finalRedirectURI=UriBuilder.fromPath(server).scheme(scheme).path(redirectURI.toString()).queryParam("String_Node_Str",continueURL).build();
    }
 else {
      finalRedirectURI=redirectURI;
    }
  }
  return finalRedirectURI;
}
Program: 96998
Project: 96998
Buggy source:
@Before public void setUp(){
  extractor=new DoorsArtifactExtractor();
  collector=new RoughArtifactCollector(null);
}

Fixed version (ground truth):
@Before public void setUp() throws UnsupportedEncodingException {
  extractor=new DoorsArtifactExtractor();
  collector=new RoughArtifactCollector(null);
  theArtifact=ArtifactTypeManager.addArtifact(DemoTypes.DemoTestRequirement,DemoBranches.SAW_Bld_1);
  String image=new String("String_Node_Str");
  imageList.add(Lib.stringToInputStream(image));
  theArtifact.setAttributeFromValues(CoreAttributeTypes.ImageContent,imageList);
  theArtifact.setAttributeValues(CoreAttributeTypes.HTMLContent,content);
}
Program: 96999
Project: 96999
Buggy source:
@Test public void testHtmlSourceExtractor() throws Exception {
  extractor.extractFromSource(NullOperationLogger.getSingleton(),doorHtmlExport.toURI(),collector);
  List<RoughArtifact> theOutput=collector.getRoughArtifacts();
  assertEquals("String_Node_Str",ARTIFACT_NAMES.length,theOutput.size());
  for (int index=0; index < ARTIFACT_NAMES.length; index++) {
    String expectedName=ARTIFACT_NAMES[index];
    RoughArtifact artifact=theOutput.get(index);
    String actualName=artifact.getName();
    assertEquals("String_Node_Str",expectedName,actualName);
    RoughArtifactKind expectedType=ARTIFACT_TYPES[index];
    RoughArtifactKind actualType=artifact.getRoughArtifactKind();
    assertEquals("String_Node_Str",expectedType,actualType);
    if (PRIME_ITEM_DIAGRAM.equals(actualName)) {
      checkPrimeItemDiagram(artifact);
    }
 else     if (VOICE_STATUS.equals(actualName)) {
      checkList(artifact);
    }
  }
}

Fixed version (ground truth):
@Test public void testHtmlSourceExtractor() throws Exception {
  extractor.extractFromSource(NullOperationLogger.getSingleton(),doorHtmlExport.toURI(),collector);
  List<RoughArtifact> theOutput=collector.getRoughArtifacts();
  assertEquals("String_Node_Str",ARTIFACT_NAMES.length,theOutput.size());
  for (int index=0; index < ARTIFACT_NAMES.length; index++) {
    String expectedName=ARTIFACT_NAMES[index];
    RoughArtifact artifact=theOutput.get(index);
    String actualName=artifact.getName();
    assertEquals("String_Node_Str",expectedName,actualName);
    RoughArtifactKind expectedType=ARTIFACT_TYPES[index];
    RoughArtifactKind actualType=artifact.getRoughArtifactKind();
    assertEquals("String_Node_Str",expectedType,actualType);
    if (PRIME_ITEM_DIAGRAM.equals(actualName)) {
      checkPrimeItemDiagram(artifact);
      assertTrue(extractor.artifactCreated(theArtifact,artifact));
    }
 else     if (VOICE_STATUS.equals(actualName)) {
      checkList(artifact);
    }
  }
}
Program: 97000
Project: 97000
Buggy source:
private Artifact createArtifact(IProgressMonitor monitor,RoughArtifact roughArtifact,Artifact realParent) throws OseeCoreException {
  Artifact realArtifact=roughToRealArtifact.get(roughArtifact);
  if (realArtifact != null) {
    return realArtifact;
  }
  realArtifact=artifactResolver.resolve(roughArtifact,transaction.getBranch(),realParent,destinationArtifact);
  unmatchedArtifacts.remove(realArtifact);
  for (  RoughArtifact childRoughArtifact : roughArtifact.getDescendants()) {
    Artifact childArtifact=createArtifact(monitor,childRoughArtifact,realArtifact);
    if (areValid(realArtifact,childArtifact)) {
      removeOtherParent(childArtifact,realArtifact);
      if (!childArtifact.hasParent()) {
        realArtifact.addChild(importArtifactOrder,childArtifact);
      }
    }
    if ((extractor != null) && (extractor.artifactCreated(childArtifact))) {
      childArtifact.persist(transaction);
    }
  }
  if (realArtifact != null) {
    realArtifact.persist(transaction);
  }
  return realArtifact;
}

Fixed version (ground truth):
private Artifact createArtifact(IProgressMonitor monitor,RoughArtifact roughArtifact,Artifact realParent) throws OseeCoreException {
  Artifact realArtifact=roughToRealArtifact.get(roughArtifact);
  if (realArtifact != null) {
    return realArtifact;
  }
  realArtifact=artifactResolver.resolve(roughArtifact,transaction.getBranch(),realParent,destinationArtifact);
  unmatchedArtifacts.remove(realArtifact);
  for (  RoughArtifact childRoughArtifact : roughArtifact.getDescendants()) {
    Artifact childArtifact=createArtifact(monitor,childRoughArtifact,realArtifact);
    if (areValid(realArtifact,childArtifact)) {
      removeOtherParent(childArtifact,realArtifact);
      if (!childArtifact.hasParent()) {
        realArtifact.addChild(importArtifactOrder,childArtifact);
      }
    }
    if ((extractor != null) && (extractor.artifactCreated(childArtifact,childRoughArtifact))) {
      childArtifact.persist(transaction);
    }
  }
  if (realArtifact != null) {
    realArtifact.persist(transaction);
  }
  return realArtifact;
}
Program: 97001
Project: 97001
Buggy source:
/** 
 * Called after the rough artifact is converted to a real artifact
 * @param theArtifact The artifact that has been created
 * @return true if theArtifact has been modified
 */
@Override public boolean artifactCreated(Artifact theArtifact){
  return false;
}

Fixed version (ground truth):
/** 
 * Called after the rough artifact is converted to a real artifact
 * @param theArtifact The artifact that has been created
 * @param source The rough artifact source for the created artifact
 * @return true if the artifact has been modified
 */
@Override public boolean artifactCreated(Artifact theArtifact,RoughArtifact source){
  return false;
}
Program: 97002
Project: 97002
Buggy source:
public void handleRequirement(String rowValue,RoughArtifact roughArtifact){
  StringBuffer imageFileList=new StringBuffer("String_Node_Str");
  appendToImageList(rowValue,imageFileList);
  rowValue=normalizeHtml(rowValue);
  String imageFile=imageFileList.toString();
  if (!imageFile.isEmpty()) {
    String theImage;
    int comma=0;
    int imageNumber=0;
    do {
      String replaceName="String_Node_Str";
      comma=imageFile.indexOf(',');
      if (comma == -1) {
        theImage=uriDirectoryName + imageFile;
        replaceName=imageFile;
        imageFile="String_Node_Str";
      }
 else {
        theImage=uriDirectoryName + imageFile.substring(0,comma);
        replaceName=imageFile.substring(0,comma);
        imageFile=imageFile.substring(comma + 1);
      }
      try {
        URI imageURI=new URI(theImage);
        roughArtifact.addAttribute(CoreAttributeTypes.ImageContent.getName(),imageURI);
        rowValue=rowValue.replace(replaceName,IMAGE_BASE_NAME + Integer.toString(imageNumber));
        imageNumber++;
        postProcessGuids.add(roughArtifact.getGuid());
      }
 catch (      URISyntaxException e) {
        if (logger != null) {
          logger.log(e);
        }
      }
    }
 while (comma != -1);
  }
  if (Strings.isValid(rowValue)) {
    roughArtifact.addAttribute(CoreAttributeTypes.HTMLContent,rowValue);
  }
}

Fixed version (ground truth):
public void handleRequirement(String rowValue,RoughArtifact roughArtifact){
  StringBuffer imageFileList=new StringBuffer("String_Node_Str");
  appendToImageList(rowValue,imageFileList);
  rowValue=normalizeHtml(rowValue);
  String imageFile=imageFileList.toString();
  if (!imageFile.isEmpty()) {
    String theImage;
    int comma=0;
    int imageNumber=0;
    do {
      String replaceName="String_Node_Str";
      comma=imageFile.indexOf(',');
      if (comma == -1) {
        theImage=uriDirectoryName + imageFile;
        replaceName=imageFile;
        imageFile="String_Node_Str";
      }
 else {
        theImage=uriDirectoryName + imageFile.substring(0,comma);
        replaceName=imageFile.substring(0,comma);
        imageFile=imageFile.substring(comma + 1);
      }
      try {
        URI imageURI=new URI(theImage);
        roughArtifact.addAttribute(CoreAttributeTypes.ImageContent.getName(),imageURI);
        rowValue=rowValue.replace(replaceName,IMAGE_BASE_NAME + Integer.toString(imageNumber));
        imageNumber++;
        postProcessImages.add(imageURI.toASCIIString());
      }
 catch (      URISyntaxException e) {
        if (logger != null) {
          logger.log(e);
        }
      }
    }
 while (comma != -1);
  }
  if (Strings.isValid(rowValue)) {
    roughArtifact.addAttribute(CoreAttributeTypes.HTMLContent,rowValue);
  }
}
Program: 97003
Project: 97003
Buggy source:
@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) {
      if (logger != null) {
        logger.log(e);
      }
    }
  }
  return toReturn;
}

Fixed version (ground truth):
@Override public boolean artifactCreated(Artifact theArtifact,RoughArtifact source){
  boolean toReturn=false;
  String content="String_Node_Str";
  Collection<URI> imageURIs=source.getURIAttributes();
  if (imageURIs.size() > 0) {
    URI uri=source.getURIAttributes().iterator().next();
    if (uri != null) {
      content=uri.toASCIIString();
    }
    if (postProcessImages.contains(content)) {
      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++;
            toReturn=true;
          }
          theArtifact.addAttribute(CoreAttributeTypes.HTMLContent,htmlVal);
        }
      }
 catch (      OseeCoreException e) {
        if (logger != null) {
          logger.log(e);
        }
      }
    }
  }
  return toReturn;
}
Program: 97004
Project: 97004
Buggy source:
public void doExtraction(OperationLogger logger,URI source,RoughArtifactCollector collector,String documentApplicabilty) throws IOException {
  InputStream htmlStream=null;
  try {
    String fileName="String_Node_Str" + source.getPath();
    uriDirectoryName=fileName.substring(0,fileName.lastIndexOf('/') + 1);
    postProcessGuids.clear();
    this.logger=logger;
    htmlStream=source.toURL().openStream();
    DoorsTableRowCollector rowCollector=new DoorsTableRowCollector(this);
    Document doc=Jsoup.parse(htmlStream,"String_Node_Str","String_Node_Str");
    Element body=doc.body();
    for (    Node cNodes : body.childNodes()) {
      for (      Node subNodes : cNodes.childNodes()) {
        if (subNodes.nodeName().compareTo("String_Node_Str") == 0) {
          for (          Node tableRow : subNodes.childNodes()) {
            if (tableRow instanceof Element) {
              rowCollector.addRawRow(tableRow);
            }
          }
        }
      }
    }
    rowCollector.createArtifacts(collector);
  }
 catch (  Exception ex) {
    logger.log(ex);
  }
 finally {
    Lib.close(htmlStream);
  }
}

Fixed version (ground truth):
public void doExtraction(OperationLogger logger,URI source,RoughArtifactCollector collector,String documentApplicabilty) throws IOException {
  InputStream htmlStream=null;
  try {
    String fileName="String_Node_Str" + source.getPath();
    uriDirectoryName=fileName.substring(0,fileName.lastIndexOf('/') + 1);
    postProcessImages.clear();
    this.logger=logger;
    htmlStream=source.toURL().openStream();
    DoorsTableRowCollector rowCollector=new DoorsTableRowCollector(this);
    Document doc=Jsoup.parse(htmlStream,"String_Node_Str","String_Node_Str");
    Element body=doc.body();
    for (    Node cNodes : body.childNodes()) {
      for (      Node subNodes : cNodes.childNodes()) {
        if (subNodes.nodeName().compareTo("String_Node_Str") == 0) {
          for (          Node tableRow : subNodes.childNodes()) {
            if (tableRow instanceof Element) {
              rowCollector.addRawRow(tableRow);
            }
          }
        }
      }
    }
    rowCollector.createArtifacts(collector);
  }
 catch (  Exception ex) {
    logger.log(ex);
  }
 finally {
    Lib.close(htmlStream);
  }
}
Program: 97005
Project: 97005
Buggy source:
public boolean artifactCreated(Artifact theArtifact);

Fixed version (ground truth):
public boolean artifactCreated(Artifact theArtifact,RoughArtifact source);
Program: 97006
Project: 97006
Buggy source:
@Test public void testHistoricalRelation() throws OseeCoreException {
  ArtifactId[] theArtifacts={null,null};
  int[] transactions=setupHistory(theArtifacts);
  ArtifactId artifact1=theArtifacts[0];
  ArtifactId artifact2=theArtifacts[1];
  QueryBuilder builder=query.fromBranch(CoreBranches.COMMON);
  builder.fromTransaction(transactions[1]);
  builder.andExists(CoreAttributeTypes.GeneralStringData,CoreAttributeTypes.Annotation);
  builder.andIds(artifact2,artifact1);
  builder.includeDeletedAttributes();
  ResultSet<ArtifactReadable> artifacts=builder.getResults();
  verifyHistoricalArtifacts(artifacts,artifact1,artifact2);
  Iterator<ArtifactReadable> iter=artifacts.iterator();
  ArtifactReadable artifactActual=iter.next();
  ArtifactReadable artifact1Actual=iter.next();
  builder=query.fromBranch(CoreBranches.COMMON);
  builder.fromTransaction(transactions[1]);
  builder.andExists(CoreAttributeTypes.GeneralStringData,CoreAttributeTypes.Annotation);
  builder.andIds(artifact1,artifact2);
  builder.includeDeletedArtifacts();
  builder.includeDeletedAttributes();
  builder.andRelatedTo(Default_Hierarchical__Parent,artifact1Actual);
  artifacts=builder.getResults();
  verifyHistoricalArtifacts(artifacts,artifact1,null);
}

Fixed version (ground truth):
@Test public void testHistoricalRelation() throws OseeCoreException {
  ArtifactId[] theArtifacts={null,null};
  int[] transactions=setupHistory(theArtifacts);
  ArtifactId artifact1=theArtifacts[0];
  ArtifactId artifact2=theArtifacts[1];
  QueryBuilder builder=query.fromBranch(CoreBranches.COMMON);
  builder.fromTransaction(transactions[1]);
  builder.andExists(CoreAttributeTypes.GeneralStringData,CoreAttributeTypes.Annotation);
  builder.andIds(artifact2,artifact1);
  builder.includeDeletedAttributes();
  ResultSet<ArtifactReadable> artifacts=builder.getResults();
  verifyHistoricalArtifacts(artifacts,artifact1,artifact2);
  Iterator<ArtifactReadable> iter=artifacts.iterator();
  ArtifactReadable artifact1Actual=iter.next();
  if (!artifact1Actual.equals(artifact2)) {
    artifact1Actual=iter.next();
  }
  builder=query.fromBranch(CoreBranches.COMMON);
  builder.fromTransaction(transactions[1]);
  builder.andExists(CoreAttributeTypes.GeneralStringData,CoreAttributeTypes.Annotation);
  builder.andIds(artifact1,artifact2);
  builder.includeDeletedArtifacts();
  builder.includeDeletedAttributes();
  builder.andRelatedTo(Default_Hierarchical__Parent,artifact1Actual);
  artifacts=builder.getResults();
  verifyHistoricalArtifacts(artifacts,artifact1,null);
}
Program: 97007
Project: 97007
Buggy source:
@Test public void testHistoricalDeletedRelation() throws OseeCoreException {
  ArtifactId[] theArtifacts={null,null};
  int[] transactions=setupHistory(theArtifacts);
  ArtifactId artifact1=theArtifacts[0];
  ArtifactId artifact2=theArtifacts[1];
  QueryBuilder builder=query.fromBranch(CoreBranches.COMMON);
  builder.fromTransaction(transactions[1]);
  builder.andExists(CoreAttributeTypes.GeneralStringData,CoreAttributeTypes.Annotation);
  builder.andIds(artifact2,artifact1);
  builder.includeDeletedAttributes();
  ResultSet<ArtifactReadable> artifacts=builder.getResults();
  verifyHistoricalArtifacts(artifacts,artifact1,artifact2);
  Iterator<ArtifactReadable> iter=artifacts.iterator();
  ArtifactReadable artifactActual=iter.next();
  ArtifactReadable artifact1Actual=iter.next();
  builder=query.fromBranch(CoreBranches.COMMON);
  builder.fromTransaction(transactions[2]);
  builder.andExists(CoreAttributeTypes.GeneralStringData,CoreAttributeTypes.Annotation);
  builder.andIds(artifact1,artifact2);
  builder.includeDeletedArtifacts();
  builder.includeDeletedAttributes();
  builder.andRelatedTo(Default_Hierarchical__Parent,artifact1Actual);
  artifacts=builder.getResults();
  verifyHistoricalArtifacts(artifacts,null,null);
}

Fixed version (ground truth):
@Test public void testHistoricalDeletedRelation() throws OseeCoreException {
  ArtifactId[] theArtifacts={null,null};
  int[] transactions=setupHistory(theArtifacts);
  ArtifactId artifact1=theArtifacts[0];
  ArtifactId artifact2=theArtifacts[1];
  QueryBuilder builder=query.fromBranch(CoreBranches.COMMON);
  builder.fromTransaction(transactions[1]);
  builder.andExists(CoreAttributeTypes.GeneralStringData,CoreAttributeTypes.Annotation);
  builder.andIds(artifact2,artifact1);
  builder.includeDeletedAttributes();
  ResultSet<ArtifactReadable> artifacts=builder.getResults();
  verifyHistoricalArtifacts(artifacts,artifact1,artifact2);
  Iterator<ArtifactReadable> iter=artifacts.iterator();
  ArtifactReadable artifact1Actual=iter.next();
  if (!artifact1Actual.equals(artifact2)) {
    artifact1Actual=iter.next();
  }
  builder=query.fromBranch(CoreBranches.COMMON);
  builder.fromTransaction(transactions[2]);
  builder.andExists(CoreAttributeTypes.GeneralStringData,CoreAttributeTypes.Annotation);
  builder.andIds(artifact1,artifact2);
  builder.includeDeletedArtifacts();
  builder.includeDeletedAttributes();
  builder.andRelatedTo(Default_Hierarchical__Parent,artifact1Actual);
  artifacts=builder.getResults();
  verifyHistoricalArtifacts(artifacts,null,null);
}
Program: 97008
Project: 97008
Buggy source:
@Test public void testHistoricalAllowDeletedRelation() throws OseeCoreException {
  ArtifactId[] theArtifacts={null,null};
  int[] transactions=setupHistory(theArtifacts);
  ArtifactId artifact1=theArtifacts[0];
  ArtifactId artifact2=theArtifacts[1];
  QueryBuilder builder=query.fromBranch(CoreBranches.COMMON);
  builder.fromTransaction(transactions[1]);
  builder.andExists(CoreAttributeTypes.GeneralStringData,CoreAttributeTypes.Annotation);
  builder.andIds(artifact2,artifact1);
  builder.includeDeletedAttributes();
  ResultSet<ArtifactReadable> artifacts=builder.getResults();
  verifyHistoricalArtifacts(artifacts,artifact1,artifact2);
  Iterator<ArtifactReadable> iter=artifacts.iterator();
  ArtifactReadable artifactActual=iter.next();
  ArtifactReadable artifact1Actual=iter.next();
  builder=query.fromBranch(CoreBranches.COMMON);
  builder.fromTransaction(transactions[2]);
  builder.andExists(CoreAttributeTypes.GeneralStringData,CoreAttributeTypes.Annotation);
  builder.andIds(artifact1,artifact2);
  builder.includeDeletedArtifacts();
  builder.includeDeletedAttributes();
  builder.includeDeletedRelations();
  builder.andRelatedTo(Default_Hierarchical__Parent,artifact1Actual);
  artifacts=builder.getResults();
  verifyHistoricalArtifacts(artifacts,artifact1,null);
}

Fixed version (ground truth):
@Test public void testHistoricalAllowDeletedRelation() throws OseeCoreException {
  ArtifactId[] theArtifacts={null,null};
  int[] transactions=setupHistory(theArtifacts);
  ArtifactId artifact1=theArtifacts[0];
  ArtifactId artifact2=theArtifacts[1];
  QueryBuilder builder=query.fromBranch(CoreBranches.COMMON);
  builder.fromTransaction(transactions[1]);
  builder.andExists(CoreAttributeTypes.GeneralStringData,CoreAttributeTypes.Annotation);
  builder.andIds(artifact2,artifact1);
  builder.includeDeletedAttributes();
  ResultSet<ArtifactReadable> artifacts=builder.getResults();
  verifyHistoricalArtifacts(artifacts,artifact1,artifact2);
  Iterator<ArtifactReadable> iter=artifacts.iterator();
  ArtifactReadable artifact1Actual=iter.next();
  if (!artifact1Actual.equals(artifact2)) {
    artifact1Actual=iter.next();
  }
  builder=query.fromBranch(CoreBranches.COMMON);
  builder.fromTransaction(transactions[2]);
  builder.andExists(CoreAttributeTypes.GeneralStringData,CoreAttributeTypes.Annotation);
  builder.andIds(artifact1,artifact2);
  builder.includeDeletedArtifacts();
  builder.includeDeletedAttributes();
  builder.includeDeletedRelations();
  builder.andRelatedTo(Default_Hierarchical__Parent,artifact1Actual);
  artifacts=builder.getResults();
  verifyHistoricalArtifacts(artifacts,artifact1,null);
}
Program: 97009
Project: 97009
Buggy source:
private DispoItemData createNewItemWithCopiedAnnotations(DispoItemData destItem,DispoItem sourceItem,boolean isCoverageCopy,OperationReport report){
  DispoItemData toReturn=null;
  try {
    boolean isSameDiscrepancies=matchAllDiscrepancies(destItem,sourceItem);
    if (isSameDiscrepancies) {
      toReturn=buildNewItem(destItem,sourceItem,isCoverageCopy,report);
    }
 else {
      report.addMessageForItem(destItem.getName(),"String_Node_Str",sourceItem.getGuid());
    }
  }
 catch (  JSONException ex) {
    report.addOtherMessage("String_Node_Str",sourceItem.getName(),ex.getMessage());
  }
  return toReturn;
}

Fixed version (ground truth):
private DispoItemData createNewItemWithCopiedAnnotations(DispoItemData destItem,DispoItem sourceItem,boolean isCoverageCopy,OperationReport report){
  DispoItemData toReturn=null;
  try {
    boolean isSameDiscrepancies=matchAllDiscrepancies(destItem,sourceItem);
    if (isSameDiscrepancies || isCoverageCopy) {
      toReturn=buildNewItem(destItem,sourceItem,isCoverageCopy,report,isSameDiscrepancies);
    }
 else {
      report.addMessageForItem(destItem.getName(),"String_Node_Str",sourceItem.getGuid());
    }
  }
 catch (  JSONException ex) {
    report.addOtherMessage("String_Node_Str",sourceItem.getName(),ex.getMessage());
  }
  return toReturn;
}
Program: 97011
Project: 97011
Buggy source:
private List<DispoItem> createItems(Map<String,DispoItem> exisitingItems,OperationReport report){
  List<DispoItem> toReturn;
  Collection<DispoItemData> values=datIdToItem.values();
  for (  DispoItemData item : values) {
    dataFactory.initDispoItem(item);
    item.setTotalPoints(String.valueOf(item.getAnnotationsList().length() + item.getDiscrepanciesList().length()));
  }
  if (!exisitingItems.isEmpty()) {
    DispoSetCopier copier=new DispoSetCopier(dispoConnector);
    List<DispoItemData> itemsFromImport=new ArrayList<>();
    itemsFromImport.addAll(values);
    Map<String,DispoItemData> nameToItem=new HashMap<>();
    for (    DispoItemData item : itemsFromImport) {
      nameToItem.put(item.getName(),item);
    }
    toReturn=copier.copyAllDispositions(nameToItem,exisitingItems.values(),false,report);
  }
 else {
    toReturn=new ArrayList<>();
    toReturn.addAll(values);
  }
  for (  DispoItem item : toReturn) {
    if (item.getStatus().equalsIgnoreCase("String_Node_Str")) {
      createPlaceHolderAnnotations((DispoItemData)item);
    }
  }
  return toReturn;
}

Fixed version (ground truth):
private List<DispoItem> createItems(Map<String,DispoItem> exisitingItems,OperationReport report){
  List<DispoItem> toReturn;
  Collection<DispoItemData> values=datIdToItem.values();
  for (  DispoItemData item : values) {
    dataFactory.initDispoItem(item);
    item.setTotalPoints(String.valueOf(item.getAnnotationsList().length() + item.getDiscrepanciesList().length()));
  }
  if (!exisitingItems.isEmpty()) {
    DispoSetCopier copier=new DispoSetCopier(dispoConnector);
    List<DispoItemData> itemsFromImport=new ArrayList<>();
    itemsFromImport.addAll(values);
    Map<String,DispoItemData> nameToItem=new HashMap<>();
    for (    DispoItemData item : itemsFromImport) {
      nameToItem.put(item.getName(),item);
    }
    toReturn=copier.copyAllDispositions(nameToItem,exisitingItems.values(),true,report);
  }
 else {
    toReturn=new ArrayList<>();
    toReturn.addAll(values);
  }
  for (  DispoItem item : toReturn) {
    if (item.getStatus().equalsIgnoreCase("String_Node_Str")) {
      createPlaceHolderAnnotations((DispoItemData)item);
    }
  }
  return toReturn;
}
Program: 97013
Project: 97013
Buggy source:
private void createPlaceHolderAnnotations(DispoItemData item){
  JSONObject discrepanciesList=item.getDiscrepanciesList();
  @SuppressWarnings("String_Node_Str") Iterator keys=discrepanciesList.keys();
  while (keys.hasNext()) {
    String key=(String)keys.next();
    try {
      Discrepancy discrepancy=DispoUtil.jsonObjToDiscrepancy(discrepanciesList.getJSONObject(key));
      addBlankAnnotationForForUncoveredLine(item,Integer.toString(discrepancy.getLocation()),discrepancy.getText());
    }
 catch (    JSONException ex) {
      throw new OseeCoreException(ex);
    }
  }
}

Fixed version (ground truth):
private void createPlaceHolderAnnotations(DispoItemData item,OperationReport report){
  DispoConnector connetor=new DispoConnector();
  try {
    List<Integer> uncovered=connetor.getAllUncoveredDiscprepancies(item);
    if (!uncovered.isEmpty()) {
      JSONObject discrepanciesList=item.getDiscrepanciesList();
      @SuppressWarnings("String_Node_Str") Iterator keys=discrepanciesList.keys();
      while (keys.hasNext()) {
        String key=(String)keys.next();
        Discrepancy discrepancy=DispoUtil.jsonObjToDiscrepancy(discrepanciesList.getJSONObject(key));
        if (uncovered.contains(discrepancy.getLocation())) {
          addBlankAnnotationForForUncoveredLine(item,Integer.toString(discrepancy.getLocation()),discrepancy.getText());
        }
      }
    }
  }
 catch (  JSONException ex) {
    report.addMessageForItem(item.getName(),"String_Node_Str",ex.getCause());
  }
}
Program: 97014
Project: 97014
Buggy source:
private List<DispoItem> createItems(Map<String,DispoItem> exisitingItems,OperationReport report){
  List<DispoItem> toReturn;
  Collection<DispoItemData> values=datIdToItem.values();
  for (  DispoItemData item : values) {
    dataFactory.initDispoItem(item);
    item.setTotalPoints(String.valueOf(item.getAnnotationsList().length() + item.getDiscrepanciesList().length()));
  }
  if (!exisitingItems.isEmpty()) {
    DispoSetCopier copier=new DispoSetCopier(dispoConnector);
    List<DispoItemData> itemsFromImport=new ArrayList<>();
    itemsFromImport.addAll(values);
    Map<String,DispoItemData> nameToItem=new HashMap<>();
    for (    DispoItemData item : itemsFromImport) {
      nameToItem.put(item.getName(),item);
    }
    toReturn=copier.copyAllDispositions(nameToItem,exisitingItems.values(),true,report);
  }
 else {
    toReturn=new ArrayList<>();
    toReturn.addAll(values);
  }
  for (  DispoItem item : toReturn) {
    if (item.getStatus().equalsIgnoreCase("String_Node_Str")) {
      createPlaceHolderAnnotations((DispoItemData)item);
    }
  }
  return toReturn;
}

Fixed version (ground truth):
private List<DispoItem> createItems(Map<String,DispoItem> exisitingItems,OperationReport report){
  List<DispoItem> toReturn;
  Collection<DispoItemData> values=datIdToItem.values();
  for (  DispoItemData item : values) {
    dataFactory.initDispoItem(item);
    item.setTotalPoints(String.valueOf(item.getAnnotationsList().length() + item.getDiscrepanciesList().length()));
  }
  if (!exisitingItems.isEmpty()) {
    DispoSetCopier copier=new DispoSetCopier(dispoConnector);
    List<DispoItemData> itemsFromImport=new ArrayList<>();
    itemsFromImport.addAll(values);
    Map<String,DispoItemData> nameToItem=new HashMap<>();
    for (    DispoItemData item : itemsFromImport) {
      nameToItem.put(item.getName(),item);
    }
    toReturn=copier.copyAllDispositions(nameToItem,exisitingItems.values(),true,report);
  }
 else {
    toReturn=new ArrayList<>();
    toReturn.addAll(values);
  }
  for (  DispoItem item : toReturn) {
    if (item.getStatus().equalsIgnoreCase("String_Node_Str")) {
      createPlaceHolderAnnotations((DispoItemData)item,report);
    }
  }
  return toReturn;
}
Program: 97016
Project: 97016
Buggy source:
@Override public void runOperation(VariableMap variableMap,IProgressMonitor monitor) throws Exception {
  List<Artifact> artifacts=variableMap.getArtifacts("String_Node_Str");
  if (artifacts.isEmpty()) {
    throw new OseeArgumentException("String_Node_Str");
  }
  IOseeBranch branch=artifacts.get(0).getBranch();
  init();
  String scriptDir=variableMap.getString(SCRIPT_ROOT_DIR);
  Boolean checked=variableMap.getBoolean(USE_TRACE_IN_OSEE);
  Collection<TraceHandler> traceHandlers=new LinkedList<>();
  for (  String handler : availableTraceHandlers) {
    if (variableMap.getBoolean(handler)) {
      TraceHandler traceHandler=TraceUnitExtensionManager.getInstance().getTraceHandlerByName(handler);
      traceHandlers.add(traceHandler);
    }
  }
  if (!checked) {
    File dir=new File(scriptDir);
    if (dir.exists()) {
      ScriptTraceabilityOperation traceOperation=new ScriptTraceabilityOperation(dir.getParentFile(),branch,false,traceHandlers);
      Operations.executeWorkAndCheckStatus(traceOperation,monitor);
      requirementsToCodeUnits=traceOperation.getRequirementToCodeUnitsMap();
    }
  }
  writeMainSheet(prepareSubsystemRequirements(artifacts));
  writer.endWorkbook();
  IFile iFile=OseeData.getIFile("String_Node_Str" + Lib.getDateTimeString() + "String_Node_Str");
  AIFile.writeToFile(iFile,charBak);
  Program.launch(iFile.getLocation().toOSString());
}

Fixed version (ground truth):
@Override public void runOperation(VariableMap variableMap,IProgressMonitor monitor) throws Exception {
  List<Artifact> artifacts=variableMap.getArtifacts("String_Node_Str");
  if (artifacts.isEmpty()) {
    throw new OseeArgumentException("String_Node_Str");
  }
  IOseeBranch branch=artifacts.get(0).getBranch();
  init();
  String scriptDir=variableMap.getString(SCRIPT_ROOT_DIR);
  Boolean checked=variableMap.getBoolean(USE_TRACE_IN_OSEE);
  Boolean isGitCodeStructure=variableMap.getBoolean(USE_GIT_CODE_STRUCTURE);
  Collection<TraceHandler> traceHandlers=new LinkedList<>();
  for (  String handler : availableTraceHandlers) {
    if (variableMap.getBoolean(handler)) {
      TraceHandler traceHandler=TraceUnitExtensionManager.getInstance().getTraceHandlerByName(handler);
      traceHandlers.add(traceHandler);
    }
  }
  if (!checked) {
    File dir=new File(scriptDir);
    if (dir.exists()) {
      ScriptTraceabilityOperation traceOperation=new ScriptTraceabilityOperation(dir.getParentFile(),branch,false,traceHandlers,isGitCodeStructure);
      Operations.executeWorkAndCheckStatus(traceOperation,monitor);
      requirementsToCodeUnits=traceOperation.getRequirementToCodeUnitsMap();
    }
  }
  writeMainSheet(prepareSubsystemRequirements(artifacts));
  writer.endWorkbook();
  IFile iFile=OseeData.getIFile("String_Node_Str" + Lib.getDateTimeString() + "String_Node_Str");
  AIFile.writeToFile(iFile,charBak);
  Program.launch(iFile.getLocation().toOSString());
}
Program: 97017
Project: 97017
Buggy source:
@Override public String getXWidgetsXml() throws OseeCoreException {
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str");
  sb.append("String_Node_Str" + USE_TRACE_IN_OSEE + "String_Node_Str");
  sb.append("String_Node_Str" + SCRIPT_ROOT_DIR + "String_Node_Str");
  availableTraceHandlers=new LinkedList<>();
  sb.append("String_Node_Str");
  Collection<String> traceHandlerNames=TraceUnitExtensionManager.getInstance().getAllTraceHandlerNames();
  for (  String handler : traceHandlerNames) {
    sb.append(String.format(TRACE_HANDLER_CHECKBOX,handler));
    availableTraceHandlers.add(handler);
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
@Override public String getXWidgetsXml() throws OseeCoreException {
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str");
  sb.append("String_Node_Str" + USE_TRACE_IN_OSEE + "String_Node_Str");
  sb.append("String_Node_Str" + USE_GIT_CODE_STRUCTURE + "String_Node_Str");
  sb.append("String_Node_Str" + SCRIPT_ROOT_DIR + "String_Node_Str");
  availableTraceHandlers=new LinkedList<>();
  sb.append("String_Node_Str");
  Collection<String> traceHandlerNames=TraceUnitExtensionManager.getInstance().getAllTraceHandlerNames();
  for (  String handler : traceHandlerNames) {
    sb.append(String.format(TRACE_HANDLER_CHECKBOX,handler));
    availableTraceHandlers.add(handler);
  }
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  return sb.toString();
}
Program: 97018
Project: 97018
Buggy source:
public ImportTraceabilityPage(IStructuredSelection selection){
  super(PAGE_NAME);
  setTitle("String_Node_Str");
  setDescription("String_Node_Str");
  traceUnitHandlers=new HashMap<>();
  if (selection != null && selection.size() == 1) {
    Object firstElement=selection.getFirstElement();
    if (firstElement instanceof IAdaptable) {
      currentResourceSelection=(IResource)((IAdaptable)firstElement).getAdapter(IResource.class);
    }
  }
}

Fixed version (ground truth):
public ImportTraceabilityPage(IStructuredSelection selection){
  super(PAGE_NAME);
  setTitle("String_Node_Str");
  setDescription("String_Node_Str");
  traceUnitHandlers=new HashMap<>();
  if (selection != null && selection.size() == 1) {
    Object firstElement=selection.getFirstElement();
    if (firstElement instanceof IAdaptable) {
      currentResourceSelection=((IAdaptable)firstElement).getAdapter(IResource.class);
    }
  }
}
Program: 97019
Project: 97019
Buggy source:
@Override public void createControl(Composite parent){
  initializeDialogUnits(parent);
  Composite composite=new Composite(parent,SWT.NULL);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
  composite.setSize(composite.computeSize(SWT.DEFAULT,SWT.DEFAULT));
  composite.setFont(parent.getFont());
  createSourceGroup(composite);
  createParserSelectArea(composite);
  restoreWidgetValues();
  updateWidgetEnablements();
  setPageComplete(determinePageCompletion());
  setControl(composite);
}

Fixed version (ground truth):
@Override public void createControl(Composite parent){
  initializeDialogUnits(parent);
  Composite composite=new Composite(parent,SWT.NULL);
  composite.setLayout(new GridLayout());
  composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
  composite.setSize(composite.computeSize(SWT.DEFAULT,SWT.DEFAULT));
  composite.setFont(parent.getFont());
  createSourceGroup(composite);
  createParserSelectArea(composite);
  createGitStructureCheckbox(composite);
  restoreWidgetValues();
  updateWidgetEnablements();
  setPageComplete(determinePageCompletion());
  setControl(composite);
}
Program: 97020
Project: 97020
Buggy source:
@Override public boolean performFinish(){
  try {
    IOseeBranch branch=mainPage.getSelectedBranch();
    File file=mainPage.getImportFile();
    Collection<TraceHandler> handlers=new LinkedList<>();
    for (    String handlerId : mainPage.getTraceUnitHandlerIds()) {
      handlers.add(TraceUnitExtensionManager.getInstance().getTraceUnitHandlerById(handlerId));
    }
    Operations.executeWorkAndCheckStatus(new ScriptTraceabilityOperation(file,branch,true,handlers));
  }
 catch (  Exception ex) {
    OseeLog.log(Activator.class,OseeLevel.SEVERE_POPUP,"String_Node_Str",ex);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  try {
    IOseeBranch branch=mainPage.getSelectedBranch();
    File file=mainPage.getImportFile();
    boolean isGitBased=mainPage.isGitBased();
    Collection<TraceHandler> handlers=new LinkedList<>();
    for (    String handlerId : mainPage.getTraceUnitHandlerIds()) {
      handlers.add(TraceUnitExtensionManager.getInstance().getTraceUnitHandlerById(handlerId));
    }
    Operations.executeWorkAndCheckStatus(new ScriptTraceabilityOperation(file,branch,true,handlers,isGitBased));
  }
 catch (  Exception ex) {
    OseeLog.log(Activator.class,OseeLevel.SEVERE_POPUP,"String_Node_Str",ex);
  }
  return true;
}
Program: 97022
Project: 97022
Buggy source:
public ScriptTraceabilityOperation(File file,IOseeBranch branch,boolean writeOutResults,Collection<? extends IArtifactType> types,boolean withInheritance,Collection<TraceHandler> traceHandlers) throws IOException {
  this(new RequirementData(branch,types,withInheritance),file,writeOutResults,traceHandlers);
}

Fixed version (ground truth):
public ScriptTraceabilityOperation(File file,IOseeBranch branch,boolean writeOutResults,Collection<? extends IArtifactType> types,boolean withInheritance,Collection<TraceHandler> traceHandlers,boolean isGitBased) throws IOException {
  this(new RequirementData(branch,types,withInheritance),file,writeOutResults,traceHandlers,isGitBased);
}
Program: 97023
Project: 97023
Buggy source:
@Override public void addMenuCommandDefinitions(ArrayList<MenuCmdDef> commands,Artifact artifact){
  commands.add(new MenuCmdDef(CommandGroup.EDIT,SPECIALIZED_EDIT,"String_Node_Str",AtsImage.ACTION));
}

Fixed version (ground truth):
@Override public void addMenuCommandDefinitions(ArrayList<MenuCmdDef> commands,Artifact artifact){
  commands.add(new MenuCmdDef(CommandGroup.EDIT,SPECIALIZED_EDIT,"String_Node_Str",AtsImage.ACTION,OPEN_OPTION,Option_WORKFLOW_EDITOR));
}
Program: 97024
Project: 97024
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (!aArtifact.isHistorical() && !presentationType.matches(GENERALIZED_EDIT,PRODUCE_ATTRIBUTE) && aArtifact.isOfType(AtsArtifactTypes.AtsArtifact)) {
    return PRESENTATION_SUBTYPE_MATCH;
  }
  return NO_MATCH;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  VariableMap options=new VariableMap();
  options.setValues(objects);
  if (!aArtifact.isHistorical() && !presentationType.matches(GENERALIZED_EDIT,PRODUCE_ATTRIBUTE) && aArtifact.isOfType(AtsArtifactTypes.AtsArtifact)) {
    if (Option_WORKFLOW_EDITOR.equals(options.getString(OPEN_OPTION)) && !UserManager.getBooleanSetting(UserManager.DOUBLE_CLICK_SETTING_KEY_EDIT) && !UserManager.getBooleanSetting(UserManager.DOUBLE_CLICK_SETTING_KEY_ART_EDIT)) {
      return SPECIALIZED_MATCH;
    }
 else {
      return PRESENTATION_SUBTYPE_MATCH;
    }
  }
  return NO_MATCH;
}