nus-yam/ex-repair huggingface dataset:
Program: 97246
Project: 97246
Buggy source:
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;
}

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[] split=currState.split("String_Node_Str");
    if (split.length >= 2) {
      String assignees=split[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: 97249
Project: 97249
Buggy source:
@Override public void saveTestUnitNames(SkynetTransaction transaction) throws OseeCoreException {
  getTestUnitProvider().save(transaction);
}

Fixed version (ground truth):
@Override public void saveTestUnitNames(SkynetTransaction transaction) throws OseeCoreException {
  getTestUnitProvider(coveragePackage,readOnlyTestUnitNames).save(transaction);
}
Program: 97250
Project: 97250
Buggy source:
public void reloadItem(CoverageEventType eventType,CoverageItem currentCoverageItem,CoverageChange change,CoverageOptionManager coverageOptionManager) throws OseeCoreException {
  Artifact artifact=getArtifact(false);
  if (artifact == null) {
    return;
  }
  if (eventType == CoverageEventType.Modified) {
    for (    String value : artifact.getAttributesToStringList(CoverageAttributeTypes.Item)) {
      CoverageItem dbChangedItem=CoverageItem.createCoverageItem(coverageUnit,value,coverageOptionManager,getTestUnitProvider());
      if (currentCoverageItem.getGuid().equals(dbChangedItem.getGuid())) {
        currentCoverageItem.copy(currentCoverageItem,dbChangedItem);
      }
    }
  }
 else   if (eventType == CoverageEventType.Deleted) {
    coverageUnit.removeCoverageItem(currentCoverageItem);
  }
 else   if (eventType == CoverageEventType.Added) {
  }
}

Fixed version (ground truth):
public void reloadItem(CoverageEventType eventType,CoverageItem currentCoverageItem,CoverageChange change,CoverageOptionManager coverageOptionManager) throws OseeCoreException {
  Artifact artifact=getArtifact(false);
  if (artifact == null) {
    return;
  }
  if (eventType == CoverageEventType.Modified) {
    for (    String value : artifact.getAttributesToStringList(CoverageAttributeTypes.Item)) {
      CoverageItem dbChangedItem=CoverageItem.createCoverageItem(coverageUnit,value,coverageOptionManager,getTestUnitProvider(coveragePackage,readOnlyTestUnitNames));
      if (currentCoverageItem.getGuid().equals(dbChangedItem.getGuid())) {
        currentCoverageItem.copy(currentCoverageItem,dbChangedItem);
      }
    }
  }
 else   if (eventType == CoverageEventType.Deleted) {
    coverageUnit.removeCoverageItem(currentCoverageItem);
  }
 else   if (eventType == CoverageEventType.Added) {
  }
}
Program: 97251
Project: 97251
Buggy source:
private ITestUnitProvider getTestUnitProvider(){
  ITestUnitProvider testUnitProvider=testUnitProviderMap.get(coveragePackage);
  if (testUnitProvider == null) {
    ArtifactTestUnitStore store=new ArtifactTestUnitStore(coveragePackage,readOnlyTestUnitNames);
    testUnitProvider=new TestUnitCache(store);
    testUnitProviderMap.put(coveragePackage,testUnitProvider);
  }
  return testUnitProvider;
}

Fixed version (ground truth):
public static ITestUnitProvider getTestUnitProvider(Artifact coveragePkg,Artifact readOnly){
  ITestUnitProvider testUnitProvider=testUnitProviderMap.get(coveragePkg);
  if (testUnitProvider == null) {
    ArtifactTestUnitStore store=new ArtifactTestUnitStore(coveragePkg,readOnly);
    testUnitProvider=new TestUnitCache(store);
    testUnitProviderMap.put(coveragePkg,testUnitProvider);
  }
  return testUnitProvider;
}
Program: 97252
Project: 97252
Buggy source:
@Test public void testRangeCompressor(){
  List<Integer> locationPoints=new ArrayList<Integer>();
  locationPoints.add(83);
  locationPoints.add(84);
  String result=LocationRangesCompressor.compress(locationPoints);
  Assert.assertEquals("String_Node_Str",result);
  locationPoints.add(1);
  locationPoints.add(3);
  locationPoints.add(4);
  locationPoints.add(21);
  locationPoints.add(2);
  result=LocationRangesCompressor.compress(locationPoints);
  Assert.assertEquals("String_Node_Str",result);
}

Fixed version (ground truth):
@Test public void testRangeCompressor(){
  List<Integer> locationPoints=new ArrayList<Integer>();
  locationPoints.add(83);
  locationPoints.add(84);
  String result=LocationRangesCompressor.compress(locationPoints);
  Assert.assertEquals("String_Node_Str",result);
  locationPoints.add(1);
  locationPoints.add(3);
  locationPoints.add(4);
  locationPoints.add(21);
  locationPoints.add(2);
  result=LocationRangesCompressor.compress(locationPoints);
  Assert.assertEquals("String_Node_Str",result);
  locationPoints.add(89);
  result=LocationRangesCompressor.compress(locationPoints);
  Assert.assertEquals("String_Node_Str",result);
  locationPoints.add(92);
  locationPoints.add(93);
  locationPoints.add(5);
  result=LocationRangesCompressor.compress(locationPoints);
  Assert.assertEquals("String_Node_Str",result);
  List<Integer> locationPointsZero=new ArrayList<Integer>();
  locationPointsZero.add(0);
  result=LocationRangesCompressor.compress(locationPointsZero);
  Assert.assertEquals("String_Node_Str",result);
}
Program: 97254
Project: 97254
Buggy source:
@Override public Collection<VCastSourceFile> getAllSourceFiles() throws OseeCoreException {
  Collection<VCastSourceFile> toReturn=new ArrayList<VCastSourceFile>();
  IOseeStatement stmt=getStatement();
  try {
    stmt.runPreparedQuery("String_Node_Str");
    while (stmt.next()) {
      Integer id=stmt.getInt("String_Node_Str");
      Integer unit_index=stmt.getInt("String_Node_Str");
      String path=stmt.getString("String_Node_Str");
      String display_name=stmt.getString("String_Node_Str");
      Integer checksum=stmt.getInt("String_Node_Str");
      String display_path=stmt.getString("String_Node_Str");
      toReturn.add(new VCastSourceFile(id,path,display_name,checksum,display_path,unit_index));
    }
  }
  finally {
    stmt.close();
  }
  return toReturn;
}

Fixed version (ground truth):
@Override public Collection<VCastSourceFile> getAllSourceFiles() throws OseeCoreException {
  Collection<VCastSourceFile> toReturn=new ArrayList<VCastSourceFile>();
  IOseeStatement stmt=getStatement();
  try {
    stmt.runPreparedQuery("String_Node_Str");
    while (stmt.next()) {
      Integer id=stmt.getInt("String_Node_Str");
      String path=stmt.getString("String_Node_Str");
      String display_name=stmt.getString("String_Node_Str");
      Integer checksum=stmt.getInt("String_Node_Str");
      String display_path=stmt.getString("String_Node_Str");
      toReturn.add(new VCastSourceFile(id,path,display_name,checksum,display_path));
    }
  }
  finally {
    stmt.close();
  }
  return toReturn;
}
Program: 97255
Project: 97255
Buggy source:
public VCastSourceFile(int id,String path,String displayName,int checksum,String displayPath,int unitIndex){
  this.id=id;
  this.path=path;
  this.displayName=displayName;
  this.checksum=checksum;
  this.displayPath=displayPath;
  this.unit_index=unitIndex;
}

Fixed version (ground truth):
public VCastSourceFile(int id,String path,String displayName,int checksum,String displayPath){
  this.id=id;
  this.path=path;
  this.displayName=displayName;
  this.checksum=checksum;
  this.displayPath=displayPath;
}
Program: 97257
Project: 97257
Buggy source:
@SuppressWarnings("String_Node_Str") private <T,O extends Object>T runPreparedQueryFetchObject(IOseeStatement chStmt,T defaultValue,String query,O... data) throws OseeCoreException {
  Conditions.checkNotNull(defaultValue,"String_Node_Str");
  try {
    chStmt.runPreparedQuery(1,query,data);
    if (chStmt.next()) {
      Object toReturn=null;
      Class<?> classValue=defaultValue.getClass();
      if (classValue.isAssignableFrom(Integer.class)) {
        toReturn=chStmt.getInt(1);
      }
 else       if (classValue.isAssignableFrom(String.class)) {
        toReturn=chStmt.getString(1);
      }
 else       if (classValue.isAssignableFrom(Long.class)) {
        toReturn=chStmt.getLong(1);
      }
 else {
        toReturn=chStmt.getObject(1);
      }
      return (T)toReturn;
    }
    return defaultValue;
  }
  finally {
    chStmt.close();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private <T,O extends Object>T runPreparedQueryFetchObject(IOseeStatement chStmt,T defaultValue,String query,O... data) throws OseeCoreException {
  Conditions.checkNotNull(defaultValue,"String_Node_Str");
  try {
    chStmt.runPreparedQuery(1,query,data);
    if (chStmt.next()) {
      Object toReturn=null;
      Class<?> classValue=defaultValue.getClass();
      if (classValue.isAssignableFrom(Integer.class)) {
        toReturn=chStmt.getInt(1);
      }
 else       if (classValue.isAssignableFrom(String.class)) {
        toReturn=chStmt.getString(1);
      }
 else       if (classValue.isAssignableFrom(Long.class)) {
        toReturn=chStmt.getLong(1);
      }
 else       if (classValue.isAssignableFrom(Boolean.class)) {
        String value=chStmt.getObject(1).toString();
        toReturn=Boolean.parseBoolean(value);
      }
 else {
        toReturn=chStmt.getObject(1);
      }
      return (T)toReturn;
    }
    return defaultValue;
  }
  finally {
    chStmt.close();
  }
}
Program: 97258
Project: 97258
Buggy source:
@Override public VCastSourceFile getSourceFile(VCastInstrumentedFile instrumentedFile) throws OseeCoreException {
  VCastSourceFile toReturn=null;
  IOseeStatement stmt=getStatement();
  try {
    stmt.runPreparedQuery("String_Node_Str",instrumentedFile.getSourceFileId());
    if (stmt.next()) {
      Integer id=stmt.getInt("String_Node_Str");
      String path=stmt.getString("String_Node_Str");
      String display_name=stmt.getString("String_Node_Str");
      Integer checksum=stmt.getInt("String_Node_Str");
      String display_path=stmt.getString("String_Node_Str");
      toReturn=new VCastSourceFile(id,path,display_name,checksum,display_path);
    }
  }
  finally {
    stmt.close();
  }
  return toReturn;
}

Fixed version (ground truth):
@Override public VCastSourceFile getSourceFile(VCastInstrumentedFile instrumentedFile) throws OseeCoreException {
  VCastSourceFile toReturn=null;
  IOseeStatement stmt=getStatement();
  try {
    stmt.runPreparedQuery("String_Node_Str",instrumentedFile.getSourceFileId());
    if (stmt.next()) {
      Integer id=stmt.getInt("String_Node_Str");
      Integer unit_index=stmt.getInt("String_Node_Str");
      String path=stmt.getString("String_Node_Str");
      String display_name=stmt.getString("String_Node_Str");
      Integer checksum=stmt.getInt("String_Node_Str");
      String display_path=stmt.getString("String_Node_Str");
      toReturn=new VCastSourceFile(id,path,display_name,checksum,display_path,unit_index);
    }
  }
  finally {
    stmt.close();
  }
  return toReturn;
}
Program: 97259
Project: 97259
Buggy source:
@Override public Collection<VCastSourceFile> getAllSourceFiles() throws OseeCoreException {
  Collection<VCastSourceFile> toReturn=new ArrayList<VCastSourceFile>();
  IOseeStatement stmt=getStatement();
  try {
    stmt.runPreparedQuery("String_Node_Str");
    while (stmt.next()) {
      Integer id=stmt.getInt("String_Node_Str");
      String path=stmt.getString("String_Node_Str");
      String display_name=stmt.getString("String_Node_Str");
      Integer checksum=stmt.getInt("String_Node_Str");
      String display_path=stmt.getString("String_Node_Str");
      toReturn.add(new VCastSourceFile(id,path,display_name,checksum,display_path));
    }
  }
  finally {
    stmt.close();
  }
  return toReturn;
}

Fixed version (ground truth):
@Override public Collection<VCastSourceFile> getAllSourceFiles() throws OseeCoreException {
  Collection<VCastSourceFile> toReturn=new ArrayList<VCastSourceFile>();
  IOseeStatement stmt=getStatement();
  try {
    stmt.runPreparedQuery("String_Node_Str");
    while (stmt.next()) {
      Integer id=stmt.getInt("String_Node_Str");
      Integer unit_index=stmt.getInt("String_Node_Str");
      String path=stmt.getString("String_Node_Str");
      String display_name=stmt.getString("String_Node_Str");
      Integer checksum=stmt.getInt("String_Node_Str");
      String display_path=stmt.getString("String_Node_Str");
      toReturn.add(new VCastSourceFile(id,path,display_name,checksum,display_path,unit_index));
    }
  }
  finally {
    stmt.close();
  }
  return toReturn;
}
Program: 97260
Project: 97260
Buggy source:
public VCastSourceFile(int id,String path,String displayName,int checksum,String displayPath){
  this.id=id;
  this.path=path;
  this.displayName=displayName;
  this.checksum=checksum;
  this.displayPath=displayPath;
}

Fixed version (ground truth):
public VCastSourceFile(int id,String path,String displayName,int checksum,String displayPath,int unitIndex){
  this.id=id;
  this.path=path;
  this.displayName=displayName;
  this.checksum=checksum;
  this.displayPath=displayPath;
  this.unit_index=unitIndex;
}
Program: 97262
Project: 97262
Buggy source:
/** 
 * Creates a new Branch based on the most recent transaction on the parent branch.
 */
public static Branch createWorkingBranchFromTx(TransactionRecord parentTransactionId,String childBranchName,Artifact associatedArtifact) throws OseeCoreException {
  String creationComment=String.format("String_Node_Str",parentTransactionId.getBranch().getName(),parentTransactionId.getId());
  final String truncatedName=Strings.truncate(childBranchName,195,true);
  CreateBranchHttpRequestOperation operation=new CreateBranchHttpRequestOperation(BranchType.WORKING,parentTransactionId,truncatedName,-1,associatedArtifact,creationComment,-1,-1);
  operation.setTxCopyBranchType(true);
  Operations.executeWorkAndCheckStatus(operation);
  return operation.getNewBranch();
}

Fixed version (ground truth):
/** 
 * Creates a new Branch based on the most recent transaction on the parent branch.
 */
public static Branch createWorkingBranchFromTx(TransactionRecord parentTransactionId,String childBranchName,Artifact associatedArtifact) throws OseeCoreException {
  String creationComment=String.format("String_Node_Str",parentTransactionId.getBranch().getName(),parentTransactionId.getId());
  final String truncatedName=Strings.truncate(childBranchName,195,true);
  CreateBranchHttpRequestOperation operation=new CreateBranchHttpRequestOperation(BranchType.WORKING,parentTransactionId,truncatedName,Lib.generateUuid(),associatedArtifact,creationComment,-1,-1);
  operation.setTxCopyBranchType(true);
  Operations.executeWorkAndCheckStatus(operation);
  return operation.getNewBranch();
}
Program: 97263
Project: 97263
Buggy source:
public static Branch createPortBranchFromTx(TransactionRecord parentTransactionId,String childBranchName,Artifact associatedArtifact) throws OseeCoreException {
  String creationComment=String.format("String_Node_Str",parentTransactionId.getBranch().getName(),parentTransactionId.getId());
  final String truncatedName=Strings.truncate(childBranchName,195,true);
  CreateBranchHttpRequestOperation operation=new CreateBranchHttpRequestOperation(BranchType.PORT,parentTransactionId,truncatedName,-1,associatedArtifact,creationComment,-1,-1);
  operation.setTxCopyBranchType(true);
  Operations.executeWorkAndCheckStatus(operation);
  return operation.getNewBranch();
}

Fixed version (ground truth):
public static Branch createPortBranchFromTx(TransactionRecord parentTransactionId,String childBranchName,Artifact associatedArtifact) throws OseeCoreException {
  String creationComment=String.format("String_Node_Str",parentTransactionId.getBranch().getName(),parentTransactionId.getId());
  final String truncatedName=Strings.truncate(childBranchName,195,true);
  CreateBranchHttpRequestOperation operation=new CreateBranchHttpRequestOperation(BranchType.PORT,parentTransactionId,truncatedName,Lib.generateUuid(),associatedArtifact,creationComment,-1,-1);
  operation.setTxCopyBranchType(true);
  Operations.executeWorkAndCheckStatus(operation);
  return operation.getNewBranch();
}
Program: 97266
Project: 97266
Buggy source:
/** 
 * Perform a branch query based on a JSON input
 * @param branchQueryJson JSON of {@link org.eclipse.osee.orcs.rest.model.search.branch.BranchQueryOptions BranchQueryOptions} class
 * @return JSON representation of the branch query results
 */
@Path("String_Node_Str") @POST @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public Response searchBranches(String branchQueryJson){
  BranchQueryOptions options=plainG.fromJson(branchQueryJson,BranchQueryOptions.class);
  List<BranchReadable> results=getResultsFromOptions(options);
  return Response.ok(plainG.toJson(results)).build();
}

Fixed version (ground truth):
/** 
 * Perform a branch query based on a JSON input
 * @param branchQueryJson JSON of {@link org.eclipse.osee.orcs.rest.model.search.branch.BranchQueryOptions BranchQueryOptions} class
 * @return JSON representation of the branch query results
 */
@POST @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public Response searchBranches(String branchQueryJson){
  BranchQueryOptions options=plainG.fromJson(branchQueryJson,BranchQueryOptions.class);
  List<BranchReadable> results=getResultsFromOptions(options);
  return Response.ok(plainG.toJson(results)).build();
}
Program: 97267
Project: 97267
Buggy source:
@Check public void checkAttributeValidity(XAttributeType attribute){
  String min=attribute.getMin();
  int minOccurrences=0;
  if (!Strings.isEmpty(min)) {
    minOccurrences=Integer.parseInt(min);
    if (minOccurrences > 0 && Strings.isEmpty(attribute.getDefaultValue())) {
      error("String_Node_Str",attribute,OseeDslPackage.Literals.XATTRIBUTE_TYPE__DEFAULT_VALUE);
    }
  }
  if (minOccurrences < 0) {
    error("String_Node_Str",attribute,OseeDslPackage.Literals.XATTRIBUTE_TYPE__MIN);
  }
  String max=attribute.getMax();
  int maxOccurrences=0;
  if (!Strings.isEmpty(max)) {
    maxOccurrences=Integer.parseInt(max);
  }
  if (minOccurrences > maxOccurrences) {
    error("String_Node_Str",attribute,OseeDslPackage.Literals.XATTRIBUTE_TYPE__MAX);
  }
}

Fixed version (ground truth):
@Check public void checkAttributeValidity(XAttributeType attribute){
  String min=attribute.getMin();
  int minOccurrences=0;
  if (!Strings.isEmpty(min)) {
    minOccurrences=Integer.parseInt(min);
    if (minOccurrences > 0 && Strings.isEmpty(attribute.getDefaultValue())) {
      error("String_Node_Str",attribute,OseeDslPackage.Literals.XATTRIBUTE_TYPE__DEFAULT_VALUE);
    }
  }
  if (minOccurrences < 0) {
    error("String_Node_Str",attribute,OseeDslPackage.Literals.XATTRIBUTE_TYPE__MIN);
  }
  String max=attribute.getMax();
  int maxOccurrences=0;
  if (!Strings.isEmpty(max)) {
    if (org.eclipse.osee.framework.jdk.core.util.Strings.isNumeric(max)) {
      maxOccurrences=Integer.parseInt(max);
    }
 else     if (max.equals(UNLIMITED)) {
      maxOccurrences=Integer.MAX_VALUE;
    }
  }
  if (minOccurrences > maxOccurrences) {
    error("String_Node_Str",attribute,OseeDslPackage.Literals.XATTRIBUTE_TYPE__MAX);
  }
}
Program: 97269
Project: 97269
Buggy source:
@Override public long getBaselineBranchUuid(String buildArtGuid) throws OseeCoreException {
  return buildArtGuid.hashCode();
}

Fixed version (ground truth):
@Override public long getBaselineBranchUuid(String buildArtGuid) throws OseeCoreException {
  return 12345;
}
Program: 97270
Project: 97270
Buggy source:
@Test public void testTxCommitSuccess(){
  Iterable<Artifact> writeables=Arrays.asList(artifact1);
  when(txData.getAllWriteables()).thenReturn(writeables);
  txDataManager.txCommitSuccess(txData);
  verify(txData).setTxState(TxState.COMMITTED);
}

Fixed version (ground truth):
@Test public void testTxCommitSuccess(){
  Iterable<Artifact> writeables=Arrays.asList(artifact1);
  List<Relation> empty=Collections.emptyList();
  when(txData.getGraph()).thenReturn(graph);
  when(txData.getAllWriteables()).thenReturn(writeables);
  when(graph.getAdjacencies(artifact1)).thenReturn(adjacencies);
  when(adjacencies.getDirties()).thenReturn(empty);
  txDataManager.txCommitSuccess(txData);
  verify(txData).setTxState(TxState.COMMITTED);
}
Program: 97271
Project: 97271
Buggy source:
@Override public List<AttributeData> getAttributeData(){
  return attrs;
}

Fixed version (ground truth):
@Override public Iterable<AttributeData> getAttributeData(){
  return attrs;
}
Program: 97272
Project: 97272
Buggy source:
@Override public List<ArtifactData> getArtifactData(){
  return arts;
}

Fixed version (ground truth):
@Override public Iterable<ArtifactData> getArtifactData(){
  return arts;
}
Program: 97273
Project: 97273
Buggy source:
@Override public List<RelationData> getRelationData(){
  return rels;
}

Fixed version (ground truth):
@Override public Iterable<RelationData> getRelationData(){
  return rels;
}
Program: 97274
Project: 97274
Buggy source:
public void txCommitSuccess(TxData txData){
  for (  Artifact writeable : txData.getAllWriteables()) {
    writeable.setNotDirty();
  }
  txData.setTxState(TxState.COMMITTED);
}

Fixed version (ground truth):
public void txCommitSuccess(TxData txData){
  GraphData graph=txData.getGraph();
  for (  Artifact writeable : txData.getAllWriteables()) {
    writeable.setNotDirty();
    RelationNodeAdjacencies adjacencies=graph.getAdjacencies(writeable);
    for (    Relation relation : adjacencies.getDirties()) {
      relation.clearDirty();
    }
  }
  txData.setTxState(TxState.COMMITTED);
}
Program: 97275
Project: 97275
Buggy source:
@Override protected void doGet(HttpServletRequest request,HttpServletResponse response) throws IOException {
  try {
    int remotePort=getSessionPort(request);
    response.setContentType("String_Node_Str");
    String url=null;
    if (remotePort > -1) {
      url=String.format("String_Node_Str",request.getRemoteAddr(),remotePort,getLoopbackPostfix(request));
    }
 else {
      url=String.format("String_Node_Str",getNormalizedAddress(request.getLocalAddr()),request.getLocalPort(),OseeServerContext.ARTIFACT_CONTEXT,request.getQueryString());
    }
    response.sendRedirect(url);
  }
 catch (  Exception ex) {
    response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,String.format("String_Node_Str",request.getQueryString()));
  }
 finally {
    response.flushBuffer();
  }
}

Fixed version (ground truth):
@Override protected void doGet(HttpServletRequest request,HttpServletResponse response) throws IOException {
  try {
    ISession session=getSessionFromRequest(request);
    String url=null;
    if (session != null) {
      url=String.format("String_Node_Str",getRemoteHostUrl(session),getLoopbackPostfix(request));
    }
 else {
      url=String.format("String_Node_Str",getNormalizedAddress(request.getLocalAddr()),request.getLocalPort(),OseeServerContext.ARTIFACT_CONTEXT,request.getQueryString());
    }
    response.setContentType("String_Node_Str");
    response.sendRedirect(url);
  }
 catch (  Exception ex) {
    response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,String.format("String_Node_Str",request.getQueryString()));
  }
 finally {
    response.flushBuffer();
  }
}
Program: 97276
Project: 97276
Buggy source:
@Ignore("String_Node_Str") @Test public void testSendingAndReceivingUsingVM() throws InterruptedException {
synchronized (subscribeCallback) {
    connection.subscribe(VM_TOPIC,messageListener,subscribeCallback);
    subscribeCallback.wait(500);
  }
  assertEquals(false,subscribeCallback.failed());
  assertEquals(1,subscribeCallback.getTotalReceived());
  Thread sending=new Thread(new Runnable(){
    @Override public void run(){
      for (int index=0; index < MESSAGE_COUNT; index++) {
        TestMessage message=new TestMessage();
        message.setMessage("String_Node_Str" + index);
        try {
          connection.send(VM_TOPIC,message,sendCallback);
        }
 catch (        OseeCoreException ex) {
          fail(ex.getMessage());
        }
      }
    }
  }
);
synchronized (messageListener) {
    sending.start();
    messageListener.wait(500);
  }
  verify(sendCallback,times(MESSAGE_COUNT)).success();
  verify(sendCallback,times(0)).fail(any(Throwable.class));
  assertEquals(MESSAGE_COUNT,messageListener.getTotalReceived());
  List<Data> data=messageListener.getData();
  assertEquals(MESSAGE_COUNT,data.size());
  for (int index=0; index < MESSAGE_COUNT; index++) {
    TestMessage message=data.get(index).getMessage();
    assertEquals("String_Node_Str" + index,message.getMessage());
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Test public void testSendingAndReceivingUsingVM() throws InterruptedException {
synchronized (subscribeCallback) {
    connection.subscribe(VM_TOPIC,messageListener,subscribeCallback);
    subscribeCallback.wait(500);
  }
  assertEquals(false,subscribeCallback.failed());
  assertEquals(1,subscribeCallback.getTotalReceived());
  Thread sending=new Thread(new Runnable(){
    @Override public void run(){
      for (int index=0; index < MESSAGE_COUNT; index++) {
        TestMessage message=new TestMessage();
        message.setMessage("String_Node_Str" + index);
        try {
          connection.send(VM_TOPIC,message,sendCallback);
        }
 catch (        OseeCoreException ex) {
          fail(ex.getMessage());
        }
      }
    }
  }
);
synchronized (messageListener) {
    sending.start();
    messageListener.wait(3000);
  }
  verify(sendCallback,times(MESSAGE_COUNT)).success();
  verify(sendCallback,times(0)).fail(any(Throwable.class));
  assertEquals(MESSAGE_COUNT,messageListener.getTotalReceived());
  List<Data> data=messageListener.getData();
  assertEquals(MESSAGE_COUNT,data.size());
  for (int index=0; index < MESSAGE_COUNT; index++) {
    TestMessage message=data.get(index).getMessage();
    assertEquals("String_Node_Str" + index,message.getMessage());
  }
}
Program: 97277
Project: 97277
Buggy source:
void start(){
}

Fixed version (ground truth):
public void start(){
}
Program: 97278
Project: 97278
Buggy source:
public AttributeLoadProcessor(Log logger,AttributeObjectFactory factory){
  super(factory);
}

Fixed version (ground truth):
public AttributeLoadProcessor(Log logger,AttributeObjectFactory factory){
  super(factory);
  this.logger=logger;
}
Program: 97279
Project: 97279
Buggy source:
@Override protected AttributeData createData(Object conditions,AttributeObjectFactory factory,IOseeStatement chStmt,Options options) throws OseeCoreException {
  AttributeData toReturn=null;
  long branchId=chStmt.getLong("String_Node_Str");
  int artId=chStmt.getInt("String_Node_Str");
  int attrId=chStmt.getInt("String_Node_Str");
  long gammaId=chStmt.getInt("String_Node_Str");
  ModificationType modType=ModificationType.getMod(chStmt.getInt("String_Node_Str"));
  boolean historical=OptionsUtil.isHistorical(options);
  CreateConditions condition=asConditions(conditions);
  if (!condition.isSame(branchId,artId,attrId)) {
    condition.saveConditions(branchId,artId,attrId,gammaId,modType);
    int txId=chStmt.getInt("String_Node_Str");
    VersionData version=factory.createVersion(branchId,txId,gammaId,historical);
    if (historical) {
      version.setStripeId(chStmt.getInt("String_Node_Str"));
    }
    long typeId=chStmt.getLong("String_Node_Str");
    String value=chStmt.getString("String_Node_Str");
    String uri=chStmt.getString("String_Node_Str");
    if (typeId == 167) {
      System.err.println(String.format("String_Node_Str",artId,typeId,value));
      System.out.println("String_Node_Str");
    }
    toReturn=factory.createAttributeData(version,attrId,typeId,modType,artId,value,uri);
  }
 else {
    if (!historical) {
      logger.warn("String_Node_Str",attrId,artId,branchId,condition.previousGammaId,gammaId,condition.previousModType,modType);
    }
  }
  return toReturn;
}

Fixed version (ground truth):
@Override protected AttributeData createData(Object conditions,AttributeObjectFactory factory,IOseeStatement chStmt,Options options) throws OseeCoreException {
  AttributeData toReturn=null;
  long branchId=chStmt.getLong("String_Node_Str");
  int artId=chStmt.getInt("String_Node_Str");
  int attrId=chStmt.getInt("String_Node_Str");
  long gammaId=chStmt.getInt("String_Node_Str");
  ModificationType modType=ModificationType.getMod(chStmt.getInt("String_Node_Str"));
  boolean historical=OptionsUtil.isHistorical(options);
  CreateConditions condition=asConditions(conditions);
  if (!condition.isSame(branchId,artId,attrId)) {
    condition.saveConditions(branchId,artId,attrId,gammaId,modType);
    int txId=chStmt.getInt("String_Node_Str");
    VersionData version=factory.createVersion(branchId,txId,gammaId,historical);
    if (historical) {
      version.setStripeId(chStmt.getInt("String_Node_Str"));
    }
    long typeId=chStmt.getLong("String_Node_Str");
    String value=chStmt.getString("String_Node_Str");
    String uri=chStmt.getString("String_Node_Str");
    toReturn=factory.createAttributeData(version,attrId,typeId,modType,artId,value,uri);
  }
 else {
    if (!historical) {
      logger.warn("String_Node_Str",attrId,artId,branchId,condition.previousGammaId,gammaId,condition.previousModType,modType);
    }
  }
  return toReturn;
}
Program: 97280
Project: 97280
Buggy source:
public static BranchCreationRequest createBranchCreateRequest(int index){
  BranchType branchType=BranchType.values()[Math.abs(index % BranchType.values().length)];
  String branchName="String_Node_Str" + index;
  int parentBranchId=index;
  int associatedArtifactId=index * 3;
  int sourceTransactionId=index * 7;
  String branchGuid=GUID.create();
  long branchUuid=0;
  int authorId=index * 7;
  String creationComment="String_Node_Str" + index;
  int mergeFromAddressingQueryId=-1;
  int destinationBranchId=-1;
  return new BranchCreationRequest(branchType,sourceTransactionId,parentBranchId,branchGuid,branchName,branchUuid,associatedArtifactId,authorId,creationComment,mergeFromAddressingQueryId,destinationBranchId);
}

Fixed version (ground truth):
public static BranchCreationRequest createBranchCreateRequest(int index){
  BranchType branchType=BranchType.values()[Math.abs(index % BranchType.values().length)];
  String branchName="String_Node_Str" + index;
  int parentBranchId=index;
  int associatedArtifactId=index * 3;
  int sourceTransactionId=index * 7;
  String branchGuid=GUID.create();
  long branchUuid=Lib.generateUuid();
  int authorId=index * 7;
  String creationComment="String_Node_Str" + index;
  int mergeFromAddressingQueryId=-1;
  int destinationBranchId=-1;
  return new BranchCreationRequest(branchType,sourceTransactionId,parentBranchId,branchGuid,branchName,branchUuid,associatedArtifactId,authorId,creationComment,mergeFromAddressingQueryId,destinationBranchId);
}
Program: 97281
Project: 97281
Buggy source:
private static MergeBranch createMergeBranch(final Branch sourceBranch,final Branch destBranch,final ArrayList<Integer> expectedArtIds) throws OseeCoreException {
  Timestamp insertTime=GlobalTime.GreenwichMeanTimestamp();
  int mergeAddressingQueryId=ArtifactLoader.getNewQueryId();
  List<Object[]> datas=new LinkedList<Object[]>();
  for (  int artId : expectedArtIds) {
    datas.add(new Object[]{mergeAddressingQueryId,insertTime,artId,sourceBranch.getId(),SQL3DataType.INTEGER});
  }
  MergeBranch mergeBranch=null;
  try {
    ArtifactLoader.insertIntoArtifactJoin(datas);
    int parentTxId=sourceBranch.getBaseTransaction().getId();
    String creationComment=String.format("String_Node_Str",sourceBranch.getName(),parentTxId,destBranch.getName());
    String branchName="String_Node_Str" + sourceBranch.getShortName() + "String_Node_Str"+ destBranch.getShortName();
    mergeBranch=(MergeBranch)createBranch(BranchType.MERGE,sourceBranch.getBaseTransaction(),branchName,null,0,UserManager.getUser(),creationComment,mergeAddressingQueryId,destBranch.getId());
    mergeBranch.setSourceBranch(sourceBranch);
    mergeBranch.setDestinationBranch(destBranch);
  }
  finally {
    ArtifactLoader.clearQuery(mergeAddressingQueryId);
  }
  return mergeBranch;
}

Fixed version (ground truth):
private static MergeBranch createMergeBranch(final Branch sourceBranch,final Branch destBranch,final ArrayList<Integer> expectedArtIds) throws OseeCoreException {
  Timestamp insertTime=GlobalTime.GreenwichMeanTimestamp();
  int mergeAddressingQueryId=ArtifactLoader.getNewQueryId();
  List<Object[]> datas=new LinkedList<Object[]>();
  for (  int artId : expectedArtIds) {
    datas.add(new Object[]{mergeAddressingQueryId,insertTime,artId,sourceBranch.getId(),SQL3DataType.INTEGER});
  }
  MergeBranch mergeBranch=null;
  try {
    ArtifactLoader.insertIntoArtifactJoin(datas);
    int parentTxId=sourceBranch.getBaseTransaction().getId();
    String creationComment=String.format("String_Node_Str",sourceBranch.getName(),parentTxId,destBranch.getName());
    String branchName="String_Node_Str" + sourceBranch.getShortName() + "String_Node_Str"+ destBranch.getShortName();
    mergeBranch=(MergeBranch)createBranch(BranchType.MERGE,sourceBranch.getBaseTransaction(),branchName,null,Lib.generateUuid(),UserManager.getUser(),creationComment,mergeAddressingQueryId,destBranch.getId());
    mergeBranch.setSourceBranch(sourceBranch);
    mergeBranch.setDestinationBranch(destBranch);
  }
  finally {
    ArtifactLoader.clearQuery(mergeAddressingQueryId);
  }
  return mergeBranch;
}
Program: 97282
Project: 97282
Buggy source:
private void refreshStateCombo() throws OseeStateException {
  if (stateCombo != null) {
    List<String> names=RelatedToStateColumn.getValidInWorkStates((TeamWorkFlowArtifact)taskableStateMachineArtifact);
    stateCombo.setDataStrings(names.toArray(new String[names.size()]));
  }
}

Fixed version (ground truth):
private void refreshStateCombo() throws OseeStateException {
  if (stateCombo != null && taskableStateMachineArtifact != null) {
    List<String> names=RelatedToStateColumn.getValidInWorkStates((TeamWorkFlowArtifact)taskableStateMachineArtifact);
    stateCombo.setDataStrings(names.toArray(new String[names.size()]));
  }
}
Program: 97283
Project: 97283
Buggy source:
@Override public Response toResponse(Throwable throwable){
  boolean isError=false;
  String logMessage;
  OseeWebApplicationException exception;
  if (throwable instanceof OseeWebApplicationException) {
    logMessage=OSEE_APPLICATION_EXCEPTION_TYPE;
    exception=((OseeWebApplicationException)throwable);
  }
 else   if (throwable instanceof WebApplicationException) {
    logMessage=APPLICATION_EXCEPTION_TYPE;
    WebApplicationException webAppException=((WebApplicationException)throwable);
    Response response=webAppException.getResponse();
    int statusCode=response.getStatus();
    String message=webAppException.getMessage();
    exception=new OseeWebApplicationException(throwable,Status.fromStatusCode(statusCode),message);
  }
 else {
    isError=true;
    logMessage=INTERNAL_SERVER_ERROR_TYPE;
    exception=new OseeWebApplicationException(throwable,Status.INTERNAL_SERVER_ERROR);
  }
  ErrorResponse errorResponse=exception.getErrorResponse();
  if (isError) {
    logger.error(throwable,"String_Node_Str",logMessage,errorResponse);
  }
 else {
    logger.info(throwable,"String_Node_Str",logMessage,errorResponse);
  }
  return exception.getResponse();
}

Fixed version (ground truth):
@Override public Response toResponse(Throwable throwable){
  boolean isError=false;
  String logMessage;
  OseeWebApplicationException exception;
  if (throwable instanceof OseeWebApplicationException) {
    logMessage=OSEE_APPLICATION_EXCEPTION_TYPE;
    exception=((OseeWebApplicationException)throwable);
  }
 else   if (throwable instanceof WebApplicationException) {
    logMessage=APPLICATION_EXCEPTION_TYPE;
    WebApplicationException webAppException=((WebApplicationException)throwable);
    Response response=webAppException.getResponse();
    int statusCode=response.getStatus();
    String message=webAppException.getMessage();
    javax.ws.rs.core.Response.StatusType status=Status.fromStatusCode(statusCode);
    if (status == null) {
      status=newStatusType(statusCode,Family.SERVER_ERROR,SEE_HTTP_STATUS_CODES);
    }
    exception=new OseeWebApplicationException(throwable,status,message);
  }
 else {
    isError=true;
    logMessage=INTERNAL_SERVER_ERROR_TYPE;
    exception=new OseeWebApplicationException(throwable,Status.INTERNAL_SERVER_ERROR);
  }
  ErrorResponse errorResponse=exception.getErrorResponse();
  if (isError) {
    logger.error(throwable,"String_Node_Str",logMessage,errorResponse);
  }
 else {
    logger.info(throwable,"String_Node_Str",logMessage,errorResponse);
  }
  return exception.getResponse();
}
Program: 97284
Project: 97284
Buggy source:
private static ErrorResponse newErrorResponse(Throwable throwable,Status errorStatus,String errorMsg){
  ErrorResponse response=new ErrorResponse();
  String exceptionMsg=throwable != null ? Lib.exceptionToString(throwable) : EXCEPTION_NOT_AVAILABLE;
  response.setException(exceptionMsg);
  String errorMsgToSet=errorMsg;
  if (errorMsgToSet == null) {
    errorMsgToSet=throwable != null ? throwable.getLocalizedMessage() : DEFAULT_ERROR_MESSAGE;
  }
  response.setErrorMessage(errorMsgToSet);
  Status status=errorStatus != null ? errorStatus : Status.INTERNAL_SERVER_ERROR;
  response.setErrorCode(status.getStatusCode());
  response.setErrorReason(status.getReasonPhrase());
  response.setErrorType(status.getFamily().toString());
  return response;
}

Fixed version (ground truth):
private static ErrorResponse newErrorResponse(Throwable throwable,StatusType errorStatus,String errorMsg){
  ErrorResponse response=new ErrorResponse();
  String exceptionMsg=throwable != null ? Lib.exceptionToString(throwable) : EXCEPTION_NOT_AVAILABLE;
  response.setException(exceptionMsg);
  String errorMsgToSet=errorMsg;
  if (errorMsgToSet == null) {
    errorMsgToSet=throwable != null ? throwable.getLocalizedMessage() : DEFAULT_ERROR_MESSAGE;
  }
  response.setErrorMessage(errorMsgToSet);
  StatusType status=errorStatus != null ? errorStatus : Status.INTERNAL_SERVER_ERROR;
  response.setErrorCode(status.getStatusCode());
  response.setErrorReason(status.getReasonPhrase());
  response.setErrorType(status.getFamily().toString());
  return response;
}
Program: 97285
Project: 97285
Buggy source:
public OseeWebApplicationException(Throwable cause,Status status,String message,Object... args){
  super(cause,status);
  this.errorStatus=status;
  if (message != null) {
    this.errorMessage=formatMessage(message,args);
  }
 else {
    this.errorMessage=null;
  }
  this.errorResponse=newErrorResponse(getCause(),errorStatus,errorMessage);
}

Fixed version (ground truth):
public OseeWebApplicationException(Throwable cause,StatusType status,String message,Object... args){
  super(cause,status.getStatusCode());
  this.errorStatus=status;
  if (message != null) {
    this.errorMessage=formatMessage(message,args);
  }
 else {
    this.errorMessage=null;
  }
  this.errorResponse=newErrorResponse(getCause(),errorStatus,errorMessage);
}
Program: 97286
Project: 97286
Buggy source:
public Status getErrorStatus(){
  return errorStatus;
}

Fixed version (ground truth):
public StatusType getErrorStatus(){
  return errorStatus;
}
Program: 97287
Project: 97287
Buggy source:
@Override protected void doWork(IProgressMonitor monitor) throws Exception {
  File[] files;
  if (sourceFile.isDirectory()) {
    files=sourceFile.listFiles(extractor.getFileFilter());
  }
 else {
    files=new File[]{sourceFile};
  }
  double workPercentage=1.0 / files.length;
  extractArtifacts(monitor,workPercentage,files,collector,collector.getParentRoughArtifact());
}

Fixed version (ground truth):
@Override protected void doWork(IProgressMonitor monitor) throws Exception {
  File[] files;
  files=new File[]{sourceFile};
  double workPercentage=1.0 / files.length;
  extractArtifacts(monitor,workPercentage,files,collector,collector.getParentRoughArtifact());
}
Program: 97288
Project: 97288
Buggy source:
public List<String> getGuids(){
  return Artifacts.toGuids(editor.getLoadedArtifacts());
}

Fixed version (ground truth):
public List<String> getGuids(){
  if (editor.isReloadTabShown() && (iWorldEditorProvider instanceof WorldEditorReloadProvider)) {
    WorldEditorReloadProvider provider=(WorldEditorReloadProvider)iWorldEditorProvider;
    return provider.getValidGuids();
  }
 else {
    return Artifacts.toGuids(editor.getLoadedArtifacts());
  }
}
Program: 97289
Project: 97289
Buggy source:
@Override protected void createFormContent(IManagedForm managedForm){
  super.createFormContent(managedForm);
  this.managedForm=managedForm;
  try {
    updateTitleBar();
    bodyComp=managedForm.getForm().getBody();
    bodyComp.setLayout(new GridLayout(1,false));
    bodyComp.setLayoutData(new GridData(SWT.LEFT,SWT.LEFT,true,false));
    Button reloadButton=new Button(bodyComp,SWT.PUSH);
    reloadButton.setText("String_Node_Str");
    reloadButton.setImage(ImageManager.getImage(FrameworkImage.REFRESH));
    final FormPage page=this;
    reloadButton.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        loadEditor(page);
      }
    }
);
    FormsUtil.addHeadingGradient(editor.getToolkit(),managedForm.getForm(),true);
  }
 catch (  Exception ex) {
    handleException(ex);
  }
}

Fixed version (ground truth):
@Override protected void createFormContent(IManagedForm managedForm){
  super.createFormContent(managedForm);
  this.managedForm=managedForm;
  try {
    updateTitleBar();
    bodyComp=managedForm.getForm().getBody();
    bodyComp.setLayout(new GridLayout(1,false));
    bodyComp.setLayoutData(new GridData(SWT.LEFT,SWT.LEFT,true,false));
    if (provider.getValidGuids().isEmpty()) {
      managedForm.getToolkit().createLabel(bodyComp,"String_Node_Str");
    }
 else {
      Button reloadButton=new Button(bodyComp,SWT.PUSH);
      reloadButton.setText("String_Node_Str");
      reloadButton.setImage(ImageManager.getImage(FrameworkImage.REFRESH));
      final FormPage page=this;
      reloadButton.addSelectionListener(new SelectionAdapter(){
        @Override public void widgetSelected(        SelectionEvent e){
          loadEditor(page);
        }
      }
);
    }
    FormsUtil.addHeadingGradient(editor.getToolkit(),managedForm.getForm(),true);
  }
 catch (  Exception ex) {
    handleException(ex);
  }
}
Program: 97291
Project: 97291
Buggy source:
public void searchAndLoad(){
  List<String> validGuids=getValidGuids();
  if (validGuids.isEmpty()) {
    AWorkbench.popup("String_Node_Str");
  }
 else {
    artifacts=ArtifactQuery.getArtifactListFromIds(new ArrayList<String>(validGuids),AtsUtil.getAtsBranch());
    AtsBulkLoad.bulkLoadArtifacts(artifacts);
  }
  reload=false;
}

Fixed version (ground truth):
public boolean searchAndLoad(){
  List<String> validGuids=getValidGuids();
  if (validGuids.isEmpty()) {
    AWorkbench.popup("String_Node_Str");
  }
 else {
    artifacts=ArtifactQuery.getArtifactListFromIds(new ArrayList<String>(validGuids),AtsUtil.getAtsBranch());
    AtsBulkLoad.bulkLoadArtifacts(artifacts);
  }
  reload=false;
  return artifacts.size() > 0;
}
Program: 97292
Project: 97292
Buggy source:
private void loadEditor(final FormPage page){
  LoadAndRefreshJob loadAndRefresh=new LoadAndRefreshJob(provider.getName());
  Jobs.startJob(loadAndRefresh,false,new JobChangeAdapter(){
    @Override public void done(    IJobChangeEvent event){
      Displays.ensureInDisplayThread(new Runnable(){
        @Override public void run(){
          editor.addPages();
          editor.removePage(0);
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
private void loadEditor(final FormPage page){
  final LoadAndRefreshJob loadAndRefresh=new LoadAndRefreshJob(provider.getName());
  Jobs.startJob(loadAndRefresh,false,new JobChangeAdapter(){
    @Override public void done(    IJobChangeEvent event){
      Displays.ensureInDisplayThread(new Runnable(){
        @Override public void run(){
          if (loadAndRefresh.isSuccess()) {
            editor.addPages();
            editor.removePage(0);
          }
        }
      }
);
    }
  }
);
}
Program: 97293
Project: 97293
Buggy source:
@Override protected IStatus run(IProgressMonitor monitor){
  if (provider.getValidGuids().isEmpty()) {
    AWorkbench.popup("String_Node_Str");
  }
 else {
    provider.searchAndLoad();
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
@Override protected IStatus run(IProgressMonitor monitor){
  if (provider.getValidGuids().isEmpty()) {
    AWorkbench.popup("String_Node_Str");
    success=false;
  }
 else {
    success=provider.searchAndLoad();
  }
  return Status.OK_STATUS;
}
Program: 97294
Project: 97294
Buggy source:
@Override public void done(IJobChangeEvent event){
  Displays.ensureInDisplayThread(new Runnable(){
    @Override public void run(){
      editor.addPages();
      editor.removePage(0);
    }
  }
);
}

Fixed version (ground truth):
@Override public void done(IJobChangeEvent event){
  Displays.ensureInDisplayThread(new Runnable(){
    @Override public void run(){
      if (loadAndRefresh.isSuccess()) {
        editor.addPages();
        editor.removePage(0);
      }
    }
  }
);
}
Program: 97295
Project: 97295
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);
    }
  }
  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))) {
      childArtifact.persist(transaction);
    }
  }
  if (realArtifact != null) {
    realArtifact.persist(transaction);
  }
  return realArtifact;
}
Program: 97296
Project: 97296
Buggy source:
/** 
 * Called after the rough artifact is converted to a real artifact
 * @param theArtifact The artifact that has been created
 */
public void artifactCreated(Artifact theArtifact){
}

Fixed version (ground truth):
/** 
 * 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;
}