nus-yam/ex-repair huggingface dataset:
Program: 102326
Project: 102326
Buggy source:
public void run(final IProgressMonitor monitor) throws InvocationTargetException {
  try {
    final JdbcSource src=getSource();
    final RelationalModelProcessor processor=JdbcModelProcessorManager.createRelationalModelProcessor(src,srcPg.getMetadataProcessor());
    processor.setMoveRatherThanCopyAdds(!isUpdatedModel());
    final boolean includeIncompleteFKs=getDatabase().getIncludes().includeIncompleteFKs();
    processor.setIncludeIncompleteFKs(includeIncompleteFKs);
    final IFile modelFile=getFolder().getFile(new Path(getModelName()));
    final ModelResource resrc=ModelerCore.create(modelFile);
    final ModelAnnotation modelAnnotation=resrc.getModelAnnotation();
    modelAnnotation.setPrimaryMetamodelUri(RelationalPackage.eNS_URI);
    modelAnnotation.setModelType(ModelType.PHYSICAL_LITERAL);
    if (resrc instanceof ModelResourceImpl) {
      ((ModelResourceImpl)resrc).setModelType(ModelType.PHYSICAL_LITERAL);
    }
    if (processor instanceof RelationalModelProcessorImpl) {
      JdbcImportWizard.this.drDifferenceReport=((RelationalModelProcessorImpl)processor).generateDifferenceReport(resrc,getDatabase(),src.getImportSettings(),monitor);
    }
    ppProcessorPack=new ProcessorPack(processor,src,modelFile,resrc);
  }
 catch (  final OperationCanceledException err) {
  }
catch (  final Exception err) {
    throw new InvocationTargetException(err);
  }
 finally {
    monitor.done();
  }
}

Fixed version (ground truth):
public void run(final IProgressMonitor monitor) throws InvocationTargetException {
  try {
    final JdbcSource src=getSource();
    final RelationalModelProcessor processor=JdbcModelProcessorManager.createRelationalModelProcessor(srcPg.getMetadataProcessor());
    processor.setMoveRatherThanCopyAdds(!isUpdatedModel());
    final boolean includeIncompleteFKs=getDatabase().getIncludes().includeIncompleteFKs();
    processor.setIncludeIncompleteFKs(includeIncompleteFKs);
    final IFile modelFile=getFolder().getFile(new Path(getModelName()));
    final ModelResource resrc=ModelerCore.create(modelFile);
    final ModelAnnotation modelAnnotation=resrc.getModelAnnotation();
    modelAnnotation.setPrimaryMetamodelUri(RelationalPackage.eNS_URI);
    modelAnnotation.setModelType(ModelType.PHYSICAL_LITERAL);
    if (resrc instanceof ModelResourceImpl) {
      ((ModelResourceImpl)resrc).setModelType(ModelType.PHYSICAL_LITERAL);
    }
    if (processor instanceof RelationalModelProcessorImpl) {
      JdbcImportWizard.this.drDifferenceReport=((RelationalModelProcessorImpl)processor).generateDifferenceReport(resrc,getDatabase(),src.getImportSettings(),monitor);
    }
    ppProcessorPack=new ProcessorPack(processor,src,modelFile,resrc);
  }
 catch (  final OperationCanceledException err) {
  }
catch (  final Exception err) {
    throw new InvocationTargetException(err);
  }
 finally {
    monitor.done();
  }
}
Program: 102328
Project: 102328
Buggy source:
public void run(final IProgressMonitor monitor) throws InvocationTargetException {
  try {
    final JdbcSource src=getSource();
    final RelationalModelProcessor processor=JdbcModelProcessorManager.createRelationalModelProcessor(src);
    processor.setMoveRatherThanCopyAdds(!isUpdatedModel());
    final IFile modelFile=getFolder().getFile(new Path(getModelName()));
    final ModelResource resrc=ModelerCore.create(modelFile);
    final ModelAnnotation modelAnnotation=resrc.getModelAnnotation();
    modelAnnotation.setPrimaryMetamodelUri(RelationalPackage.eNS_URI);
    modelAnnotation.setModelType(ModelType.PHYSICAL_LITERAL);
    if (resrc instanceof ModelResourceImpl) {
      ((ModelResourceImpl)resrc).setModelType(ModelType.PHYSICAL_LITERAL);
    }
    if (processor instanceof RelationalModelProcessorImpl) {
      XsdAsRelationalImportWizard.this.drDifferenceReport=((RelationalModelProcessorImpl)processor).generateDifferenceReport(resrc,getDatabase(),src.getImportSettings(),monitor);
    }
    ppProcessorPack=new ProcessorPack(processor,src,modelFile,resrc);
  }
 catch (  final OperationCanceledException err) {
  }
catch (  final Exception err) {
    throw new InvocationTargetException(err);
  }
 finally {
    monitor.done();
  }
}

Fixed version (ground truth):
public void run(final IProgressMonitor monitor) throws InvocationTargetException {
  try {
    final JdbcSource src=getSource();
    final RelationalModelProcessor processor=JdbcModelProcessorManager.createRelationalModelProcessor();
    processor.setMoveRatherThanCopyAdds(!isUpdatedModel());
    final IFile modelFile=getFolder().getFile(new Path(getModelName()));
    final ModelResource resrc=ModelerCore.create(modelFile);
    final ModelAnnotation modelAnnotation=resrc.getModelAnnotation();
    modelAnnotation.setPrimaryMetamodelUri(RelationalPackage.eNS_URI);
    modelAnnotation.setModelType(ModelType.PHYSICAL_LITERAL);
    if (resrc instanceof ModelResourceImpl) {
      ((ModelResourceImpl)resrc).setModelType(ModelType.PHYSICAL_LITERAL);
    }
    if (processor instanceof RelationalModelProcessorImpl) {
      XsdAsRelationalImportWizard.this.drDifferenceReport=((RelationalModelProcessorImpl)processor).generateDifferenceReport(resrc,getDatabase(),src.getImportSettings(),monitor);
    }
    ppProcessorPack=new ProcessorPack(processor,src,modelFile,resrc);
  }
 catch (  final OperationCanceledException err) {
  }
catch (  final Exception err) {
    throw new InvocationTargetException(err);
  }
 finally {
    monitor.done();
  }
}
Program: 102330
Project: 102330
Buggy source:
public void testCreateRelationalModelProcessorWithTypeMapping(){
  RelationalTypeMapping fakeMapping=new RelationalTypeMapping(){
    @Override public EObject getDatatype(    String jdbcTypeName){
      return null;
    }
    @Override public EObject getDatatype(    int jdbcType){
      return null;
    }
    @Override public SearchabilityType getSearchabilityType(    EObject datatype){
      return null;
    }
  }
;
  final RelationalModelProcessor processor=JdbcModelProcessorManager.createRelationalModelProcessor(null,fakeMapping,"String_Node_Str");
  assertNotNull(processor);
  assertTrue(processor instanceof RelationalModelProcessorImpl);
}

Fixed version (ground truth):
public void testCreateRelationalModelProcessorWithTypeMapping(){
  RelationalTypeMapping fakeMapping=new RelationalTypeMapping(){
    @Override public EObject getDatatype(    String jdbcTypeName){
      return null;
    }
    @Override public EObject getDatatype(    int jdbcType){
      return null;
    }
    @Override public SearchabilityType getSearchabilityType(    EObject datatype){
      return null;
    }
  }
;
  final RelationalModelProcessor processor=JdbcModelProcessorManager.createRelationalModelProcessor(fakeMapping,"String_Node_Str");
  assertNotNull(processor);
  assertTrue(processor instanceof RelationalModelProcessorImpl);
}
Program: 102332
Project: 102332
Buggy source:
public void build(int kind,String builderName,Map args,IProgressMonitor monitor){
}

Fixed version (ground truth):
@Override public void build(int kind,String builderName,Map<String,String> args,IProgressMonitor monitor) throws CoreException {
}
Program: 102333
Project: 102333
Buggy source:
/** 
 * Resets all PVDBs deploy status to needing to be deployed.
 */
private void resetAllDeployedStatuses(){
  try {
    this.statusLock.writeLock().lock();
    for (    Map.Entry<IPath,Set<PreviewVdbStatus>> entry : this.deploymentStatusMap.entrySet()) {
      for (      PreviewVdbStatus status : entry.getValue()) {
        status.setDeploy(true);
      }
    }
  }
  finally {
    this.statusLock.writeLock().unlock();
  }
}

Fixed version (ground truth):
/** 
 * Resets all PVDBs deploy status to needing to be deployed.
 */
private void resetAllDeployedStatuses(){
  try {
    this.statusLock.readLock().lock();
    for (    Map.Entry<IPath,Set<PreviewVdbStatus>> entry : this.deploymentStatusMap.entrySet()) {
      for (      PreviewVdbStatus status : entry.getValue()) {
        status.setDeploy(true);
      }
    }
  }
  finally {
    this.statusLock.readLock().unlock();
  }
}
Program: 102335
Project: 102335
Buggy source:
private PreviewVdbStatus getStatus(IPath pvdbPath){
  Collection<PreviewVdbStatus> statuses=null;
  try {
    this.statusLock.readLock().lock();
    statuses=this.deploymentStatusMap.get(getProjectPath(pvdbPath));
  }
  finally {
    this.statusLock.readLock().unlock();
  }
  for (  PreviewVdbStatus status : statuses) {
    if (status.getPath().equals(pvdbPath))     return status;
  }
  return null;
}

Fixed version (ground truth):
private PreviewVdbStatus getStatus(IPath pvdbPath){
  Collection<PreviewVdbStatus> statuses=null;
  try {
    this.statusLock.readLock().lock();
    statuses=this.deploymentStatusMap.get(getProjectPath(pvdbPath));
    if ((statuses != null) && !statuses.isEmpty()) {
      statuses=new ArrayList<PreviewVdbStatus>(statuses);
    }
  }
  finally {
    this.statusLock.readLock().unlock();
  }
  for (  PreviewVdbStatus status : statuses) {
    if (status.getPath().equals(pvdbPath))     return status;
  }
  return null;
}
Program: 102336
Project: 102336
Buggy source:
public IFile getFile(){
  return this.pvdb;
}

Fixed version (ground truth):
/** 
 * @return the Preview VDB
 */
public IFile getFile(){
  return this.pvdb;
}
Program: 102337
Project: 102337
Buggy source:
public IPath getPath(){
  return this.pvdb.getFullPath();
}

Fixed version (ground truth):
/** 
 * @return the full workspace path of the Preview VDB
 */
public IPath getPath(){
  return this.pvdb.getFullPath();
}
Program: 102338
Project: 102338
Buggy source:
/** 
 * Resets all PVDBs deploy status to needing to be deployed.
 */
private void resetAllDeployedStatuses(){
  try {
    this.statusLock.writeLock().lock();
    for (    Map.Entry<IPath,Collection<PreviewVdbStatus>> entry : this.deploymentStatusMap.entrySet()) {
      for (      PreviewVdbStatus status : entry.getValue()) {
        status.setDeploy(true);
      }
    }
  }
  finally {
    this.statusLock.writeLock().unlock();
  }
}

Fixed version (ground truth):
/** 
 * Resets all PVDBs deploy status to needing to be deployed.
 */
private void resetAllDeployedStatuses(){
  try {
    this.statusLock.writeLock().lock();
    for (    Map.Entry<IPath,Set<PreviewVdbStatus>> entry : this.deploymentStatusMap.entrySet()) {
      for (      PreviewVdbStatus status : entry.getValue()) {
        status.setDeploy(true);
      }
    }
  }
  finally {
    this.statusLock.writeLock().unlock();
  }
}
Program: 102339
Project: 102339
Buggy source:
/** 
 * @param project the project whose Preview VDBs are being requested
 * @param onlyThoseNeedingToBeDeployed <code>true</code> if only Preview VDBs needing to be deployed should be returned
 * @return the project Preview VDBs (never <code>null</code>)
 */
List<IFile> findProjectPvdbs(IProject project,boolean onlyThoseNeedingToBeDeployed){
  List<IFile> pvdbsToDeploy=new ArrayList<IFile>();
  Collection<PreviewVdbStatus> statuses=null;
  try {
    this.statusLock.readLock().lock();
    statuses=this.deploymentStatusMap.get(project.getFullPath());
  }
  finally {
    this.statusLock.readLock().unlock();
  }
  if ((statuses != null) && !statuses.isEmpty()) {
    for (    PreviewVdbStatus status : statuses) {
      if (!onlyThoseNeedingToBeDeployed) {
        pvdbsToDeploy.add(this.context.getPreviewVdb(status.getFile()));
      }
 else {
        IFile pvdbFile=status.getFile();
        if (needsToBeDeployed(pvdbFile)) {
          pvdbsToDeploy.add(this.context.getPreviewVdb(pvdbFile));
        }
      }
    }
  }
  return pvdbsToDeploy;
}

Fixed version (ground truth):
/** 
 * @param project the project whose Preview VDBs are being requested
 * @param onlyThoseNeedingToBeDeployed <code>true</code> if only Preview VDBs needing to be deployed should be returned
 * @return the project Preview VDBs (never <code>null</code>)
 */
List<IFile> findProjectPvdbs(IProject project,boolean onlyThoseNeedingToBeDeployed){
  List<IFile> pvdbsToDeploy=new ArrayList<IFile>();
  Collection<PreviewVdbStatus> statuses=null;
  try {
    this.statusLock.readLock().lock();
    statuses=this.deploymentStatusMap.get(project.getFullPath());
    if ((statuses != null) && !statuses.isEmpty()) {
      statuses=new ArrayList<PreviewVdbStatus>(statuses);
    }
  }
  finally {
    this.statusLock.readLock().unlock();
  }
  if ((statuses != null) && !statuses.isEmpty()) {
    Collection<PreviewVdbStatus> missingPvdbs=new ArrayList<PreviewVdbStatus>();
    for (    PreviewVdbStatus status : statuses) {
      IFile pvdbFile=status.getFile();
      if (pvdbFile.exists()) {
        if (!onlyThoseNeedingToBeDeployed) {
          pvdbsToDeploy.add(this.context.getPreviewVdb(status.getFile()));
        }
 else {
          if (needsToBeDeployed(pvdbFile)) {
            pvdbsToDeploy.add(this.context.getPreviewVdb(pvdbFile));
          }
        }
      }
 else {
        missingPvdbs.add(status);
      }
    }
    if (!missingPvdbs.isEmpty()) {
      Util.log(Messages.DeployStatusCacheError);
      try {
        this.statusLock.writeLock().lock();
        for (        PreviewVdbStatus status : missingPvdbs) {
          statuses.remove(status);
        }
      }
  finally {
        this.statusLock.writeLock().unlock();
      }
    }
  }
  return pvdbsToDeploy;
}
Program: 102340
Project: 102340
Buggy source:
/** 
 * @param pvdb the PVDB being added to the workspace
 */
private void addWorkspacePvdb(IFile pvdb){
  IPath projectPath=pvdb.getProject().getFullPath();
  try {
    this.statusLock.writeLock().lock();
    Collection<PreviewVdbStatus> statuses=this.deploymentStatusMap.get(projectPath);
    if (statuses == null) {
      statuses=new ArrayList<PreviewVdbStatus>();
      this.deploymentStatusMap.put(projectPath,statuses);
    }
    statuses.add(new PreviewVdbStatus(pvdb));
  }
  finally {
    this.statusLock.writeLock().unlock();
  }
}

Fixed version (ground truth):
/** 
 * @param pvdb the PVDB being added to the workspace
 */
private void addWorkspacePvdb(IFile pvdb){
  IPath projectPath=pvdb.getProject().getFullPath();
  try {
    this.statusLock.writeLock().lock();
    Set<PreviewVdbStatus> statuses=this.deploymentStatusMap.get(projectPath);
    if (statuses == null) {
      statuses=new HashSet<PreviewVdbStatus>();
      this.deploymentStatusMap.put(projectPath,statuses);
    }
    statuses.add(new PreviewVdbStatus(pvdb));
  }
  finally {
    this.statusLock.writeLock().unlock();
  }
}
Program: 102341
Project: 102341
Buggy source:
public boolean shouldDeploy(){
  return this.deploy;
}

Fixed version (ground truth):
/** 
 * @return <code>true</code> if the Preview VDB needs to be deployed
 */
public boolean shouldDeploy(){
  return this.deploy;
}
Program: 102342
Project: 102342
Buggy source:
/** 
 * Handler for when a   {@link ModelProjectOpenedJob} has finished.
 * @param job the job being processed
 */
private void handleModelProjectOpened(ModelProjectOpenedJob job){
  IProject project=job.getProject();
  List<IPath> pvdbPaths=new ArrayList<IPath>();
  try {
    findPvdbs(project,pvdbPaths);
    if (!pvdbPaths.isEmpty()) {
      CompositePreviewJob batchJob=new CompositePreviewJob(NLS.bind(Messages.DeleteOrphanedPreviewVdbsJob,project.getName()),this.context,getPreviewServer());
      Collection<PreviewVdbStatus> statuses=null;
      try {
        this.statusLock.readLock().lock();
        statuses=this.deploymentStatusMap.get(project.getFullPath());
      }
  finally {
        this.statusLock.readLock().unlock();
      }
      for (      IPath pvdbPath : pvdbPaths) {
        boolean delete=true;
        for (        PreviewVdbStatus status : statuses) {
          if (status.getPath().equals(pvdbPath)) {
            delete=false;
            break;
          }
        }
        if (delete) {
          IPath path=pvdbPath.removeFirstSegments(1);
          DeletePreviewVdbJob deletePvdbJob=new DeletePreviewVdbJob(project.getFile(path),this.context);
          batchJob.add(deletePvdbJob);
        }
      }
      if (!batchJob.getJobs().isEmpty()) {
        batchJob.schedule();
      }
    }
  }
 catch (  Exception e) {
    Util.log(IStatus.ERROR,e,NLS.bind(Messages.DeleteOrphanedPreviewVdbsJobError,project.getName()));
  }
}

Fixed version (ground truth):
/** 
 * Handler for when a   {@link ModelProjectOpenedJob} has finished.
 * @param job the job being processed
 */
private void handleModelProjectOpened(ModelProjectOpenedJob job){
  IProject project=job.getProject();
  List<IPath> pvdbPaths=new ArrayList<IPath>();
  try {
    findPvdbs(project,pvdbPaths);
    if (!pvdbPaths.isEmpty()) {
      CompositePreviewJob batchJob=new CompositePreviewJob(NLS.bind(Messages.DeleteOrphanedPreviewVdbsJob,project.getName()),this.context,getPreviewServer());
      Collection<PreviewVdbStatus> statuses=null;
      try {
        this.statusLock.readLock().lock();
        statuses=this.deploymentStatusMap.get(project.getFullPath());
        if ((statuses != null) && !statuses.isEmpty()) {
          statuses=new ArrayList<PreviewVdbStatus>(statuses);
        }
      }
  finally {
        this.statusLock.readLock().unlock();
      }
      for (      IPath pvdbPath : pvdbPaths) {
        boolean delete=true;
        for (        PreviewVdbStatus status : statuses) {
          if (status.getPath().equals(pvdbPath)) {
            delete=false;
            break;
          }
        }
        if (delete) {
          IPath path=pvdbPath.removeFirstSegments(1);
          DeletePreviewVdbJob deletePvdbJob=new DeletePreviewVdbJob(project.getFile(path),this.context);
          batchJob.add(deletePvdbJob);
        }
      }
      if (!batchJob.getJobs().isEmpty()) {
        batchJob.schedule();
      }
    }
  }
 catch (  Exception e) {
    Util.log(IStatus.ERROR,e,NLS.bind(Messages.DeleteOrphanedPreviewVdbsJobError,project.getName()));
  }
}
Program: 102343
Project: 102343
Buggy source:
/** 
 * @param job the job being added to the list of jobs to be run (may not be <code>null</code>)
 */
public void add(PreviewVdbJob job){
  assert(job != null);
  this.jobs.add(job);
  if (job instanceof WorkspacePreviewVdbJob) {
    ((WorkspacePreviewVdbJob)job).setStandalone(false);
    this.waitForBuildToFinish=true;
  }
}

Fixed version (ground truth):
/** 
 * @param job the job being added to the list of jobs to be run (may not be <code>null</code>)
 */
public void add(PreviewVdbJob job){
  assert(job != null);
  this.jobs.add(job);
}
Program: 102344
Project: 102344
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
 */
@Override protected IStatus run(IProgressMonitor monitor){
  assert(!this.jobs.isEmpty());
  monitor.beginTask(getName(),getJobs().size());
  try {
    if (this.waitForBuildToFinish) {
      Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD,monitor);
    }
    for (    PreviewVdbJob previewJob : this.jobs) {
      assert(previewJob instanceof Job);
      Job job=(Job)previewJob;
      job.setProgressGroup(monitor,1);
      if (this.listener != null)       job.addJobChangeListener(this.listener);
      job.schedule();
      if (this.runInSequence) {
        job.join();
      }
      if (monitor.isCanceled()) {
        throw new OperationCanceledException();
      }
    }
  }
 catch (  OperationCanceledException e) {
    Util.log(new Status(IStatus.CANCEL,PLUGIN_ID,NLS.bind(Messages.JobCanceled,getName())));
  }
catch (  InterruptedException e) {
    Util.log(e);
  }
 finally {
    monitor.done();
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
 */
@Override protected IStatus run(IProgressMonitor monitor){
  assert(!this.jobs.isEmpty());
  monitor.beginTask(getName(),getJobs().size());
  try {
    for (    PreviewVdbJob previewJob : this.jobs) {
      assert(previewJob instanceof Job);
      Job job=(Job)previewJob;
      job.setProgressGroup(monitor,1);
      if (this.listener != null)       job.addJobChangeListener(this.listener);
      job.schedule();
      if (this.runInSequence) {
        job.join();
      }
      if (monitor.isCanceled()) {
        throw new OperationCanceledException();
      }
    }
  }
 catch (  OperationCanceledException e) {
    Util.log(new Status(IStatus.CANCEL,PLUGIN_ID,NLS.bind(Messages.JobCanceled,getName())));
  }
catch (  InterruptedException e) {
    Util.log(e);
  }
 finally {
    monitor.done();
  }
  return Status.OK_STATUS;
}
Program: 102345
Project: 102345
Buggy source:
/** 
 * <strong>Must be called by constructors.</strong>
 */
private void initialize(){
  IResource resource=(project == null) ? this.model : this.project;
  int size=(project == null) ? 3 : 2;
  this.pvdbFile=getContext().getPreviewVdb(resource);
  ISchedulingRule[] rules=new ISchedulingRule[size];
  rules[0]=getSchedulingRuleFactory().createRule(this.pvdbFile);
  rules[1]=getSchedulingRuleFactory().modifyRule(this.pvdbFile);
  if (size == 3) {
    rules[2]=getSchedulingRuleFactory().modifyRule(this.model);
  }
  setRule(MultiRule.combine(rules));
}

Fixed version (ground truth):
/** 
 * <strong>Must be called by constructors.</strong>
 */
private void initialize(){
  IResource resource=(project == null) ? this.model : this.project;
  int size=(project == null) ? 4 : 3;
  this.pvdbFile=getContext().getPreviewVdb(resource);
  ISchedulingRule[] rules=new ISchedulingRule[size];
  rules[0]=getSchedulingRuleFactory().createRule(this.pvdbFile);
  rules[1]=getSchedulingRuleFactory().modifyRule(this.pvdbFile);
  rules[2]=getSchedulingRuleFactory().buildRule();
  if (size == 4) {
    rules[3]=getSchedulingRuleFactory().modifyRule(this.model);
  }
  setRule(MultiRule.combine(rules));
}
Program: 102346
Project: 102346
Buggy source:
/** 
 * @param changedModel the model whose Preview VDB needs to be updated (never <code>null</code>)
 * @param context the preview context (never <code>null</code>)
 * @param previewServer the server where the preview is being performed (may be <code>null</code>)
 * @throws Exception if unable to construct the Preview VDB path
 */
public UpdatePreviewVdbJob(IFile changedModel,Server previewServer,PreviewContext context) throws Exception {
  super(NLS.bind(Messages.UpdatePreviewVdbJob,changedModel.getFullPath().removeFileExtension()),context);
  this.model=changedModel;
  this.previewServer=previewServer;
  this.pvdbFile=getContext().getPreviewVdb(this.model);
  setRule(getSchedulingRuleFactory().modifyRule(getPreviewVdb()));
}

Fixed version (ground truth):
/** 
 * @param changedModel the model whose Preview VDB needs to be updated (never <code>null</code>)
 * @param context the preview context (never <code>null</code>)
 * @param previewServer the server where the preview is being performed (may be <code>null</code>)
 * @throws Exception if unable to construct the Preview VDB path
 */
public UpdatePreviewVdbJob(IFile changedModel,Server previewServer,PreviewContext context) throws Exception {
  super(NLS.bind(Messages.UpdatePreviewVdbJob,changedModel.getFullPath().removeFileExtension()),context);
  this.model=changedModel;
  this.previewServer=previewServer;
  this.pvdbFile=getContext().getPreviewVdb(this.model);
  ISchedulingRule[] rules=new ISchedulingRule[2];
  rules[0]=getSchedulingRuleFactory().modifyRule(this.pvdbFile);
  rules[1]=getSchedulingRuleFactory().buildRule();
  setRule(MultiRule.combine(rules));
}
Program: 102348
Project: 102348
Buggy source:
/** 
 * Handler for when a   {@link CreatePreviewVdbJob} has finished.
 * @param job the job being processed
 */
private void handlePreviewVdbCreated(CreatePreviewVdbJob job){
  IFile pvdb=job.getPvdb();
  addWorkspacePvdb(pvdb);
}

Fixed version (ground truth):
/** 
 * Handler for when a   {@link CreatePreviewVdbJob} has finished.
 * @param job the job being processed
 */
private void handlePreviewVdbCreated(CreatePreviewVdbJob job){
  IFile pvdb=job.getPreviewVdb();
  addWorkspacePvdb(pvdb);
}
Program: 102349
Project: 102349
Buggy source:
/** 
 * @param job the job being added to the list of jobs to be run (may not be <code>null</code>)
 */
public void add(PreviewVdbJob job){
  assert(job != null);
  this.jobs.add(job);
}

Fixed version (ground truth):
/** 
 * @param job the job being added to the list of jobs to be run (may not be <code>null</code>)
 */
public void add(PreviewVdbJob job){
  assert(job != null);
  this.jobs.add(job);
  if (job instanceof WorkspacePreviewVdbJob) {
    ((WorkspacePreviewVdbJob)job).setStandalone(false);
    this.waitForBuildToFinish=true;
  }
}
Program: 102350
Project: 102350
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
 */
@Override protected IStatus run(IProgressMonitor monitor){
  assert(!this.jobs.isEmpty());
  monitor.beginTask(getName(),getJobs().size());
  try {
    for (    PreviewVdbJob previewJob : this.jobs) {
      assert(previewJob instanceof Job);
      Job job=(Job)previewJob;
      job.setProgressGroup(monitor,1);
      if (this.listener != null)       job.addJobChangeListener(this.listener);
      job.schedule();
      if (this.runInSequence) {
        job.join();
      }
      if (monitor.isCanceled()) {
        throw new OperationCanceledException();
      }
    }
  }
 catch (  OperationCanceledException e) {
    Util.log(new Status(IStatus.CANCEL,PLUGIN_ID,Messages.bind(Messages.JobCanceled,getName())));
  }
catch (  InterruptedException e) {
    Util.log(e);
  }
 finally {
    monitor.done();
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
 */
@Override protected IStatus run(IProgressMonitor monitor){
  assert(!this.jobs.isEmpty());
  monitor.beginTask(getName(),getJobs().size());
  try {
    if (this.waitForBuildToFinish) {
      Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD,monitor);
    }
    for (    PreviewVdbJob previewJob : this.jobs) {
      assert(previewJob instanceof Job);
      Job job=(Job)previewJob;
      job.setProgressGroup(monitor,1);
      if (this.listener != null)       job.addJobChangeListener(this.listener);
      job.schedule();
      if (this.runInSequence) {
        job.join();
      }
      if (monitor.isCanceled()) {
        throw new OperationCanceledException();
      }
    }
  }
 catch (  OperationCanceledException e) {
    Util.log(new Status(IStatus.CANCEL,PLUGIN_ID,NLS.bind(Messages.JobCanceled,getName())));
  }
catch (  InterruptedException e) {
    Util.log(e);
  }
 finally {
    monitor.done();
  }
  return Status.OK_STATUS;
}
Program: 102351
Project: 102351
Buggy source:
/** 
 * @param project the project whose Preview VDB is being created (may not be <code>null</code>)
 * @throws Exception if unable to construct the Preview VDB
 */
public CreatePreviewVdbJob(IProject project,PreviewContext context) throws Exception {
  super(NLS.bind(Messages.CreatePreviewVdbJob,project.getFullPath()),context);
  this.project=project;
  this.model=null;
}

Fixed version (ground truth):
/** 
 * @param project the project whose Preview VDB is being created (may not be <code>null</code>)
 * @throws Exception if unable to construct the Preview VDB
 */
public CreatePreviewVdbJob(IProject project,PreviewContext context) throws Exception {
  super(NLS.bind(Messages.CreatePreviewVdbJob,project.getFullPath()),context);
  this.project=project;
  this.model=null;
  initialize();
}
Program: 102352
Project: 102352
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.teiid.designer.runtime.preview.jobs.WorkspacePreviewVdbJob#runImpl(org.eclipse.core.runtime.IProgressMonitor)
 */
@Override protected IStatus runImpl(IProgressMonitor monitor) throws Exception {
  IResource resource=((this.project == null) ? this.model : this.project);
  this.pvdbFile=getContext().getPreviewVdb(resource);
  if (this.pvdbFile.exists() && !this.pvdbFile.getLocation().toFile().exists()) {
    this.pvdbFile.delete(true,monitor);
  }
  boolean isNew=false;
  if (!this.pvdbFile.exists()) {
    isNew=true;
    this.pvdbFile.create(new ByteArrayInputStream(new byte[0]),false,null);
  }
  this.pvdbFile.setHidden(true);
  try {
    Vdb pvdb=new Vdb(this.pvdbFile,true,monitor);
    if (resource instanceof IFile) {
      if (pvdb.getModelEntries().isEmpty()) {
        pvdb.addModelEntry(this.model.getFullPath(),monitor);
      }
    }
    if (isNew || pvdb.isModified()) {
      pvdb.save(monitor);
    }
  }
 catch (  Exception e) {
    IPath path=((this.project == null) ? this.model.getFullPath() : this.project.getFullPath());
    throw new CoreException(new Status(IStatus.ERROR,PLUGIN_ID,NLS.bind(Messages.CreatePreviewVdbJobError,path),e));
  }
  return new Status(IStatus.OK,PLUGIN_ID,NLS.bind(Messages.CreatePreviewVdbJobSuccessfullyCompleted,this.pvdbFile.getFullPath()));
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.teiid.designer.runtime.preview.jobs.WorkspacePreviewVdbJob#runImpl(org.eclipse.core.runtime.IProgressMonitor)
 */
@Override protected IStatus runImpl(IProgressMonitor monitor) throws Exception {
  IResource resource=((this.project == null) ? this.model : this.project);
  if (this.pvdbFile.exists() && !this.pvdbFile.getLocation().toFile().exists()) {
    this.pvdbFile.delete(true,monitor);
  }
  boolean isNew=false;
  if (!this.pvdbFile.exists()) {
    isNew=true;
    this.pvdbFile.create(new ByteArrayInputStream(new byte[0]),false,null);
  }
  this.pvdbFile.setHidden(true);
  try {
    Vdb pvdb=new Vdb(this.pvdbFile,true,monitor);
    if (resource instanceof IFile) {
      if (pvdb.getModelEntries().isEmpty()) {
        pvdb.addModelEntry(this.model.getFullPath(),monitor);
      }
    }
    if (isNew || pvdb.isModified()) {
      pvdb.save(monitor);
    }
  }
 catch (  Exception e) {
    IPath path=((this.project == null) ? this.model.getFullPath() : this.project.getFullPath());
    throw new CoreException(new Status(IStatus.ERROR,PLUGIN_ID,NLS.bind(Messages.CreatePreviewVdbJobError,path),e));
  }
  return new Status(IStatus.OK,PLUGIN_ID,NLS.bind(Messages.CreatePreviewVdbJobSuccessfullyCompleted,this.pvdbFile.getFullPath()));
}
Program: 102353
Project: 102353
Buggy source:
/** 
 * Deletes the Preview VDB associated with the specified model.
 * @param context the preview context (may not be <code>null</code>)
 * @param deletedModel the model that was just deleted (may not be <code>null</code>)
 * @throws Exception if there is a problem getting the Preview VDB for the deleted model
 */
public DeletePreviewVdbJob(PreviewContext context,IFile deletedModel) throws Exception {
  super(Messages.bind(Messages.DeletePreviewVdbJobForModel,deletedModel.getFullPath()),context);
  this.pvdb=context.getPreviewVdb(deletedModel);
  assert(this.pvdb != null);
}

Fixed version (ground truth):
/** 
 * Deletes the Preview VDB associated with the specified model.
 * @param context the preview context (may not be <code>null</code>)
 * @param deletedModel the model that was just deleted (may not be <code>null</code>)
 * @throws Exception if there is a problem getting the Preview VDB for the deleted model
 */
public DeletePreviewVdbJob(PreviewContext context,IFile deletedModel) throws Exception {
}
Program: 102354
Project: 102354
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.teiid.designer.runtime.preview.jobs.WorkspacePreviewVdbJob#runImpl(org.eclipse.core.runtime.IProgressMonitor)
 */
@Override protected IStatus runImpl(IProgressMonitor monitor) throws Exception {
  try {
    this.pvdb.delete(true,monitor);
    return new Status(IStatus.OK,PLUGIN_ID,Messages.bind(Messages.DeletePreviewVdbJobSuccessfullyCompleted,this.pvdb.getFullPath()));
  }
 catch (  Exception e) {
    return new Status(IStatus.ERROR,PLUGIN_ID,Messages.bind(Messages.DeletePreviewVdbJobError,this.pvdb.getFullPath()),e);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.teiid.designer.runtime.preview.jobs.WorkspacePreviewVdbJob#runImpl(org.eclipse.core.runtime.IProgressMonitor)
 */
@Override protected IStatus runImpl(IProgressMonitor monitor) throws Exception {
  try {
    this.pvdbFile.delete(true,monitor);
    return new Status(IStatus.OK,PLUGIN_ID,NLS.bind(Messages.DeletePreviewVdbJobSuccessfullyCompleted,this.pvdbFile.getFullPath()));
  }
 catch (  Exception e) {
    return new Status(IStatus.ERROR,PLUGIN_ID,NLS.bind(Messages.DeletePreviewVdbJobError,this.pvdbFile.getFullPath()),e);
  }
}
Program: 102355
Project: 102355
Buggy source:
/** 
 * @param project the project just opened (never <code>null</code>)
 * @param context the preview context (never <code>null</code>)
 */
public ModelProjectOpenedJob(IProject project,PreviewContext context) throws Exception {
  super(Messages.bind(Messages.ModelProjectOpenedJob,project),context,null,true);
  assert(project != null);
  assert(ModelerCore.hasModelNature(project));
  this.project=project;
  CreatePreviewVdbJob job=new CreatePreviewVdbJob(project,context);
  add(job);
  process(this.project);
}

Fixed version (ground truth):
/** 
 * @param project the project just opened (never <code>null</code>)
 * @param context the preview context (never <code>null</code>)
 */
public ModelProjectOpenedJob(IProject project,PreviewContext context) throws Exception {
  super(NLS.bind(Messages.ModelProjectOpenedJob,project),context,null,true);
  assert(project != null);
  assert(ModelerCore.hasModelNature(project));
  this.project=project;
  CreatePreviewVdbJob job=new CreatePreviewVdbJob(project,context);
  add(job);
  process(this.project);
}
Program: 102356
Project: 102356
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.teiid.designer.runtime.preview.jobs.WorkspacePreviewVdbJob#runImpl(org.eclipse.core.runtime.IProgressMonitor)
 */
@Override protected IStatus runImpl(IProgressMonitor monitor) throws Exception {
  IStatus error=null;
  IFile pvdbFile=getContext().getPreviewVdb(this.model);
  Vdb pvdb=new Vdb(pvdbFile,true,monitor);
  if (this.previewServer != null) {
    try {
      getContext().ensureConnectionInfoIsValid(pvdb,this.previewServer);
    }
 catch (    Exception e) {
      error=new Status(IStatus.ERROR,PLUGIN_ID,NLS.bind(Messages.UpdatePreviewVdbJobError,this.model.getFullPath()),e);
    }
  }
  try {
    if (!pvdb.isSynchronized()) {
      pvdb.synchronize(monitor);
      pvdb.save(monitor);
    }
 else {
      if (pvdb.isModified()) {
        pvdb.save(monitor);
      }
    }
    return new Status(IStatus.OK,PLUGIN_ID,NLS.bind(Messages.UpdatePreviewVdbJobSuccessfullyCompleted,pvdbFile.getFullPath()));
  }
 catch (  Exception e) {
    IStatus status=new Status(IStatus.ERROR,PLUGIN_ID,NLS.bind(Messages.UpdatePreviewVdbJobError,this.model.getFullPath()),e);
    if (error == null) {
      error=status;
    }
 else {
      IStatus[] statuses=new IStatus[2];
      statuses[0]=error;
      statuses[1]=status;
      error=new MultiStatus(PLUGIN_ID,IStatus.OK,statuses,NLS.bind(Messages.UpdatePreviewVdbJobError,this.model.getFullPath()),null);
    }
  }
  return error;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.teiid.designer.runtime.preview.jobs.WorkspacePreviewVdbJob#runImpl(org.eclipse.core.runtime.IProgressMonitor)
 */
@Override protected IStatus runImpl(IProgressMonitor monitor) throws Exception {
  IStatus error=null;
  Vdb pvdb=new Vdb(this.pvdbFile,true,monitor);
  if (this.previewServer != null) {
    try {
      getContext().ensureConnectionInfoIsValid(pvdb,this.previewServer);
    }
 catch (    Exception e) {
      error=new Status(IStatus.ERROR,PLUGIN_ID,NLS.bind(Messages.UpdatePreviewVdbJobError,this.model.getFullPath()),e);
    }
  }
  try {
    if (!pvdb.isSynchronized()) {
      pvdb.synchronize(monitor);
      pvdb.save(monitor);
    }
 else {
      if (pvdb.isModified()) {
        pvdb.save(monitor);
      }
    }
    return new Status(IStatus.OK,PLUGIN_ID,NLS.bind(Messages.UpdatePreviewVdbJobSuccessfullyCompleted,this.pvdbFile.getFullPath()));
  }
 catch (  Exception e) {
    IStatus status=new Status(IStatus.ERROR,PLUGIN_ID,NLS.bind(Messages.UpdatePreviewVdbJobError,this.model.getFullPath()),e);
    if (error == null) {
      error=status;
    }
 else {
      IStatus[] statuses=new IStatus[2];
      statuses[0]=error;
      statuses[1]=status;
      error=new MultiStatus(PLUGIN_ID,IStatus.OK,statuses,NLS.bind(Messages.UpdatePreviewVdbJobError,this.model.getFullPath()),null);
    }
  }
  return error;
}
Program: 102357
Project: 102357
Buggy source:
/** 
 * @param changedModel the model whose Preview VDB needs to be updated (never <code>null</code>)
 * @param context the preview context (never <code>null</code>)
 * @param previewServer the server where the preview is being performed (may be <code>null</code>)
 * @throws Exception if unable to construct the Preview VDB path
 */
public UpdatePreviewVdbJob(IFile changedModel,Server previewServer,PreviewContext context) throws Exception {
  super(NLS.bind(Messages.UpdatePreviewVdbJob,changedModel.getFullPath().removeFileExtension()),context);
  this.model=changedModel;
  this.previewServer=previewServer;
}

Fixed version (ground truth):
/** 
 * @param changedModel the model whose Preview VDB needs to be updated (never <code>null</code>)
 * @param context the preview context (never <code>null</code>)
 * @param previewServer the server where the preview is being performed (may be <code>null</code>)
 * @throws Exception if unable to construct the Preview VDB path
 */
public UpdatePreviewVdbJob(IFile changedModel,Server previewServer,PreviewContext context) throws Exception {
  super(NLS.bind(Messages.UpdatePreviewVdbJob,changedModel.getFullPath().removeFileExtension()),context);
  this.model=changedModel;
  this.previewServer=previewServer;
  this.pvdbFile=getContext().getPreviewVdb(this.model);
  setRule(getSchedulingRuleFactory().modifyRule(getPreviewVdb()));
}
Program: 102358
Project: 102358
Buggy source:
/** 
 * Returns an actual Model Object (EObject or Resource) for the specified Permission
 * @param perm
 * @return
 */
public Object getPermissionTargetObject(Permission perm){
  String targetName=perm.getTargetName();
  for (  Resource res : resources) {
    if (getTargetName(res).equals(targetName)) {
      return res;
    }
    for (    Object child : getChildren(res)) {
      Object target=getTargetObjectInChildren(child,targetName);
      if (target != null) {
        return target;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns an actual Model Object (EObject or Resource) for the specified Permission
 * @param perm
 * @return
 */
public Object getPermissionTargetObject(Permission perm){
  String targetName=perm.getTargetName();
  for (  Resource res : resources) {
    if (getTargetName(res).equals(targetName)) {
      return res;
    }
    for (    Object child : getChildren(res)) {
      if (getTargetName(child).equals(targetName)) {
        return child;
      }
      Object target=getTargetObjectInChildren(child,targetName);
      if (target != null) {
        return target;
      }
    }
  }
  return null;
}
Program: 102359
Project: 102359
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.teiid.designer.runtime.preview.jobs.WorkspacePreviewVdbJob#runImpl(org.eclipse.core.runtime.IProgressMonitor)
 */
@Override protected IStatus runImpl(IProgressMonitor monitor) throws Exception {
  IResource resource=((this.project == null) ? this.model : this.project);
  this.pvdbFile=getContext().getPreviewVdb(resource);
  if (this.pvdbFile.exists() && !this.pvdbFile.getLocation().toFile().exists()) {
    this.pvdbFile.delete(true,monitor);
  }
  if (!this.pvdbFile.exists()) {
    this.pvdbFile.create(new ByteArrayInputStream(new byte[0]),false,null);
  }
  this.pvdbFile.setHidden(true);
  try {
    Vdb pvdb=new Vdb(this.pvdbFile,true,monitor);
    if (resource instanceof IFile) {
      if (pvdb.getModelEntries().isEmpty()) {
        pvdb.addModelEntry(this.model.getFullPath(),monitor);
      }
    }
    if (pvdb.isModified()) {
      pvdb.save(monitor);
    }
  }
 catch (  Exception e) {
    IPath path=((this.project == null) ? this.model.getFullPath() : this.project.getFullPath());
    throw new CoreException(new Status(IStatus.ERROR,PLUGIN_ID,NLS.bind(Messages.CreatePreviewVdbJobError,path),e));
  }
  return new Status(IStatus.OK,PLUGIN_ID,NLS.bind(Messages.CreatePreviewVdbJobSuccessfullyCompleted,this.pvdbFile.getFullPath()));
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.teiid.designer.runtime.preview.jobs.WorkspacePreviewVdbJob#runImpl(org.eclipse.core.runtime.IProgressMonitor)
 */
@Override protected IStatus runImpl(IProgressMonitor monitor) throws Exception {
  IResource resource=((this.project == null) ? this.model : this.project);
  this.pvdbFile=getContext().getPreviewVdb(resource);
  if (this.pvdbFile.exists() && !this.pvdbFile.getLocation().toFile().exists()) {
    this.pvdbFile.delete(true,monitor);
  }
  boolean isNew=false;
  if (!this.pvdbFile.exists()) {
    isNew=true;
    this.pvdbFile.create(new ByteArrayInputStream(new byte[0]),false,null);
  }
  this.pvdbFile.setHidden(true);
  try {
    Vdb pvdb=new Vdb(this.pvdbFile,true,monitor);
    if (resource instanceof IFile) {
      if (pvdb.getModelEntries().isEmpty()) {
        pvdb.addModelEntry(this.model.getFullPath(),monitor);
      }
    }
    if (isNew || pvdb.isModified()) {
      pvdb.save(monitor);
    }
  }
 catch (  Exception e) {
    IPath path=((this.project == null) ? this.model.getFullPath() : this.project.getFullPath());
    throw new CoreException(new Status(IStatus.ERROR,PLUGIN_ID,NLS.bind(Messages.CreatePreviewVdbJobError,path),e));
  }
  return new Status(IStatus.OK,PLUGIN_ID,NLS.bind(Messages.CreatePreviewVdbJobSuccessfullyCompleted,this.pvdbFile.getFullPath()));
}
Program: 102361
Project: 102361
Buggy source:
/** 
 * @param description (never <code>null</code>)
 */
public final void setDescription(String description){
  if (StringUtilities.isEmpty(description))   description=null;
  final String oldDescription=this.description.get();
  if (StringUtilities.equals(description,oldDescription))   return;
  this.description.set(description);
  vdb.setModified(this,Vdb.ENTRY_DESCRIPTION,oldDescription,description);
}

Fixed version (ground truth):
/** 
 * @param description (never <code>null</code>)
 */
public final void setDescription(String description){
  final String oldDescription=this.description.get();
  if (StringUtilities.equals(description,oldDescription))   return;
  this.description.set(description);
  vdb.setModified(this,Vdb.ENTRY_DESCRIPTION,oldDescription,description);
}
Program: 102362
Project: 102362
Buggy source:
/** 
 * @param translator
 */
public final void setTranslator(String translator){
  if (StringUtilities.isEmpty(translator))   translator=null;
  final String oldTranslator=getTranslator();
  if (StringUtilities.equals(translator,oldTranslator))   return;
  this.translator.set(translator);
  getVdb().setModified(this,Vdb.MODEL_TRANSLATOR,oldTranslator,translator);
}

Fixed version (ground truth):
/** 
 * @param translator
 */
public final void setTranslator(String translator){
  final String oldTranslator=getTranslator();
  if (StringUtilities.equals(translator,oldTranslator))   return;
  this.translator.set(translator);
  getVdb().setModified(this,Vdb.MODEL_TRANSLATOR,oldTranslator,translator);
}
Program: 102363
Project: 102363
Buggy source:
VdbModelEntry(final Vdb vdb,final ModelElement element,final IProgressMonitor monitor){
  super(vdb,element,monitor);
  this.element=element;
  type=ModelType.get(element.getType());
  visible.set(element.isVisible());
  for (  final SourceElement source : element.getSources()) {
    this.source.set(source.getName());
    translator.set(source.getTranslatorName());
    jndiName.set(source.getJndiName());
    break;
  }
  for (  final ProblemElement problem : element.getProblems())   problems.add(new Problem(problem));
  boolean builtIn=false;
  String indexName=null;
  for (  final PropertyElement property : element.getProperties()) {
    final String name=property.getName();
    if (ModelElement.BUILT_IN.equals(name))     builtIn=Boolean.parseBoolean(property.getValue());
 else     if (ModelElement.INDEX_NAME.equals(name))     indexName=property.getValue();
  }
  this.builtIn=builtIn;
  this.indexName=indexName;
}

Fixed version (ground truth):
VdbModelEntry(final Vdb vdb,final ModelElement element,final IProgressMonitor monitor){
  super(vdb,element,monitor);
  this.element=element;
  type=ModelType.get(element.getType());
  visible.set(element.isVisible());
  if (element.getSources() != null && !element.getSources().isEmpty()) {
    for (    final SourceElement source : element.getSources()) {
      this.source.set(source.getName());
      this.translator.set(source.getTranslatorName() == null ? StringUtilities.EMPTY_STRING : source.getTranslatorName());
      this.jndiName.set(source.getJndiName());
      break;
    }
  }
 else {
    this.translator.set(EMPTY_STR);
  }
  for (  final ProblemElement problem : element.getProblems())   problems.add(new Problem(problem));
  boolean builtIn=false;
  String indexName=null;
  for (  final PropertyElement property : element.getProperties()) {
    final String name=property.getName();
    if (ModelElement.BUILT_IN.equals(name))     builtIn=Boolean.parseBoolean(property.getValue());
 else     if (ModelElement.INDEX_NAME.equals(name))     indexName=property.getValue();
  }
  this.builtIn=builtIn;
  this.indexName=indexName;
}
Program: 102364
Project: 102364
Buggy source:
EntryElement(final VdbEntry entry){
  path=entry.getName().toString();
  description=entry.getDescription();
  getProperties().add(new PropertyElement(CHECKSUM,Long.toString(entry.getChecksum())));
}

Fixed version (ground truth):
EntryElement(final VdbEntry entry){
  path=entry.getName().toString();
  if (entry.getDescription() != null && !entry.getDescription().isEmpty()) {
    description=entry.getDescription();
  }
  getProperties().add(new PropertyElement(CHECKSUM,Long.toString(entry.getChecksum())));
}
Program: 102365
Project: 102365
Buggy source:
/** 
 * @see org.eclipse.core.resources.IResource#setDerived(boolean)
 * @since 4.2
 */
public void setDerived(boolean isDerived){
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.eclipse.core.resources.IResource#setDerived(boolean,org.eclipse.core.runtime.IProgressMonitor)
 */
@Override public void setDerived(boolean arg0,IProgressMonitor arg1) throws CoreException {
}
Program: 102366
Project: 102366
Buggy source:
public void setDerived(boolean isDerived){
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.eclipse.core.resources.IResource#setDerived(boolean,org.eclipse.core.runtime.IProgressMonitor)
 */
@Override public void setDerived(boolean arg0,IProgressMonitor arg1) throws CoreException {
}
Program: 102367
Project: 102367
Buggy source:
public void setDerived(boolean isDerived){
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.eclipse.core.resources.IResource#setDerived(boolean,org.eclipse.core.runtime.IProgressMonitor)
 */
@Override public void setDerived(boolean arg0,IProgressMonitor arg1) throws CoreException {
}