nus-yam/ex-repair huggingface dataset:
Program: 56370
Project: 56370
Buggy source:
public static Pipeline createPipelineAggregated(Pipeline pipeline){
  AbstractProject firstProject=getProject(pipeline.getStages().get(0).getTasks().get(0));
  List<Stage> stages=new ArrayList<Stage>();
  for (  Stage stage : pipeline.getStages()) {
    List<Task> tasks=new ArrayList<Task>();
    AbstractBuild versionBuild=getHighestBuild(stage.getTasks(),firstProject);
    String version=null;
    if (versionBuild != null) {
      version=versionBuild.getDisplayName();
    }
    for (    Task task : stage.getTasks()) {
      AbstractProject taskProject=getProject(task);
      AbstractBuild currentBuild=match(taskProject.getBuilds(),versionBuild);
      if (currentBuild != null) {
        Status status=resolveStatus(taskProject,currentBuild);
        String link=status.isIdle() ? task.getLink() : currentBuild.getUrl();
        tasks.add(new Task(task.getId(),task.getName(),String.valueOf(currentBuild.getNumber()),status,link,task.isManual(),getTestResult(currentBuild)));
      }
 else {
        tasks.add(new Task(task.getId(),task.getName(),null,StatusFactory.idle(),task.getLink(),task.isManual(),null));
      }
    }
    stages.add(new Stage(stage.getName(),tasks,version));
  }
  return new Pipeline(pipeline.getName(),null,null,null,null,stages,true);
}

Fixed version (ground truth):
public static Pipeline createPipelineAggregated(Pipeline pipeline){
  AbstractProject firstProject=getProject(pipeline.getStages().get(0).getTasks().get(0));
  List<Stage> stages=new ArrayList<Stage>();
  for (  Stage stage : pipeline.getStages()) {
    List<Task> tasks=new ArrayList<Task>();
    AbstractBuild versionBuild=getHighestBuild(stage.getTasks(),firstProject);
    String version=null;
    if (versionBuild != null) {
      version=versionBuild.getDisplayName();
    }
    for (    Task task : stage.getTasks()) {
      AbstractProject<?,?> taskProject=getProject(task);
      AbstractBuild currentBuild=match(taskProject.getBuilds(),versionBuild);
      if (currentBuild != null) {
        Status status=resolveStatus(taskProject,currentBuild);
        String link=status.isIdle() ? task.getLink() : currentBuild.getUrl();
        tasks.add(new Task(task.getId(),task.getName(),String.valueOf(currentBuild.getNumber()),status,link,task.isManual(),getTestResult(currentBuild)));
      }
 else {
        tasks.add(new Task(task.getId(),task.getName(),null,StatusFactory.idle(),task.getLink(),task.isManual(),null));
      }
    }
    stages.add(new Stage(stage.getName(),tasks,version));
  }
  return new Pipeline(pipeline.getName(),null,null,null,null,stages,true);
}
Program: 56371
Project: 56371
Buggy source:
@DataBoundConstructor public DeliveryPipelineView(String name,int noOfColumns,List<ComponentSpec> componentSpecs,int noOfPipelines,boolean showAggregatedPipeline){
  super(name);
  this.componentSpecs=componentSpecs;
  this.noOfColumns=noOfColumns;
  this.noOfPipelines=noOfPipelines;
  this.showAggregatedPipeline=showAggregatedPipeline;
}

Fixed version (ground truth):
@DataBoundConstructor public DeliveryPipelineView(String name,List<ComponentSpec> componentSpecs){
  super(name);
  this.componentSpecs=componentSpecs;
}
Program: 56372
Project: 56372
Buggy source:
@Override public int hashCode(){
  return Objects.hash(super.hashCode(),stages);
}

Fixed version (ground truth):
@Override public int hashCode(){
  return Objects.hash(super.hashCode(),version,stages);
}
Program: 56373
Project: 56373
Buggy source:
public static Pipeline createPipelineAggregated(Pipeline pipeline){
  AbstractProject firstProject=getProject(pipeline.getStages().get(0).getTasks().get(0));
  List<Stage> stages=new ArrayList<>();
  for (  Stage stage : pipeline.getStages()) {
    AbstractProject project=getProject(stage.getTasks().get(0));
    List<Task> tasks=new ArrayList<>();
    AbstractBuild versionBuild=getFirstUpstreamBuild(project,firstProject);
    String version=null;
    if (versionBuild != null) {
      version=versionBuild.getDisplayName();
    }
    for (    Task task : stage.getTasks()) {
      AbstractProject taskProject=getProject(task);
      AbstractBuild currentBuild=match(taskProject.getBuilds(),versionBuild);
      if (currentBuild != null) {
        Status status=resolveStatus(taskProject,currentBuild);
        String link=status.isIdle() ? task.getLink() : currentBuild.getUrl();
        tasks.add(new Task(task.getId(),task.getName(),String.valueOf(currentBuild.getNumber()),status,link,task.isManual(),getTestResult(currentBuild)));
      }
 else {
        tasks.add(new Task(task.getId(),task.getName(),null,StatusFactory.idle(),task.getLink(),task.isManual(),null));
      }
    }
    stages.add(new Stage(stage.getName(),tasks,version));
  }
  return new Pipeline(pipeline.getName(),null,null,null,stages,true);
}

Fixed version (ground truth):
public static Pipeline createPipelineAggregated(Pipeline pipeline){
  AbstractProject firstProject=getProject(pipeline.getStages().get(0).getTasks().get(0));
  List<Stage> stages=new ArrayList<>();
  for (  Stage stage : pipeline.getStages()) {
    AbstractProject project=getProject(stage.getTasks().get(0));
    List<Task> tasks=new ArrayList<>();
    AbstractBuild versionBuild=getHighestBuild(stage.getTasks(),firstProject);
    String version=null;
    if (versionBuild != null) {
      version=versionBuild.getDisplayName();
    }
    for (    Task task : stage.getTasks()) {
      AbstractProject taskProject=getProject(task);
      AbstractBuild currentBuild=match(taskProject.getBuilds(),versionBuild);
      if (currentBuild != null) {
        Status status=resolveStatus(taskProject,currentBuild);
        String link=status.isIdle() ? task.getLink() : currentBuild.getUrl();
        tasks.add(new Task(task.getId(),task.getName(),String.valueOf(currentBuild.getNumber()),status,link,task.isManual(),getTestResult(currentBuild)));
      }
 else {
        tasks.add(new Task(task.getId(),task.getName(),null,StatusFactory.idle(),task.getLink(),task.isManual(),null));
      }
    }
    stages.add(new Stage(stage.getName(),tasks,version));
  }
  return new Pipeline(pipeline.getName(),null,null,null,stages,true);
}
Program: 56374
Project: 56374
Buggy source:
@Override public Collection<TopLevelItem> getItems(){
  List<TopLevelItem> result=new ArrayList<>();
  for (  ComponentSpec componentSpec : componentSpecs) {
    AbstractProject project=ProjectUtil.getProject(componentSpec.getFirstJob());
    List<AbstractProject<?,?>> projects=ProjectUtil.getAllDownstreamProjects(project);
    for (    AbstractProject<?,?> abstractProject : projects) {
      result.add(getItem(abstractProject.getName()));
    }
  }
  return result;
}

Fixed version (ground truth):
@Override public Collection<TopLevelItem> getItems(){
  List<TopLevelItem> result=new ArrayList<>();
  for (  ComponentSpec componentSpec : componentSpecs) {
    AbstractProject project=ProjectUtil.getProject(componentSpec.getFirstJob());
    Collection<AbstractProject<?,?>> projects=ProjectUtil.getAllDownstreamProjects(project).values();
    for (    AbstractProject<?,?> abstractProject : projects) {
      result.add(getItem(abstractProject.getName()));
    }
  }
  return result;
}
Program: 56375
Project: 56375
Buggy source:
/** 
 * Populates and return pipelines for the supplied pipeline prototype with the current status.
 * @param pipeline      the pipeline prototype
 * @param noOfPipelines number of pipeline instances
 */
public static List<Pipeline> createPipelineLatest(Pipeline pipeline,int noOfPipelines){
  Task firstTask=pipeline.getStages().get(0).getTasks().get(0);
  AbstractProject firstProject=getProject(firstTask);
  List<Pipeline> result=new ArrayList<>();
  Iterator it=firstProject.getBuilds().iterator();
  for (int i=0; i < noOfPipelines && it.hasNext(); i++) {
    AbstractBuild firstBuild=(AbstractBuild)it.next();
    String timestamp=PipelineUtils.formatTimestamp(firstBuild.getTimeInMillis());
    List<Stage> stages=new ArrayList<>();
    for (    Stage stage : pipeline.getStages()) {
      List<Task> tasks=new ArrayList<>();
      for (      Task task : stage.getTasks()) {
        AbstractProject taskProject=getProject(task);
        AbstractBuild currentBuild=match(taskProject.getBuilds(),firstBuild);
        Status status=resolveStatus(taskProject,currentBuild);
        String link=currentBuild == null || status.isIdle() || status.isQueued() ? task.getLink() : currentBuild.getUrl();
        String buildId=currentBuild == null || status.isIdle() || status.isQueued() ? null : String.valueOf(currentBuild.getNumber());
        tasks.add(new Task(task.getId(),task.getName(),buildId,status,link,task.isManual(),getTestResult(currentBuild)));
      }
      stages.add(new Stage(stage.getName(),tasks));
    }
    result.add(new Pipeline(pipeline.getName(),firstBuild.getDisplayName(),timestamp,getTriggeredBy(firstBuild),stages,false));
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Populates and return pipelines for the supplied pipeline prototype with the current status.
 * @param pipeline      the pipeline prototype
 * @param noOfPipelines number of pipeline instances
 */
public static List<Pipeline> createPipelineLatest(Pipeline pipeline,int noOfPipelines){
  Task firstTask=pipeline.getStages().get(0).getTasks().get(0);
  AbstractProject firstProject=getProject(firstTask);
  List<Pipeline> result=new ArrayList<>();
  Iterator it=firstProject.getBuilds().iterator();
  for (int i=0; i < noOfPipelines && it.hasNext(); i++) {
    AbstractBuild firstBuild=(AbstractBuild)it.next();
    String timestamp=PipelineUtils.formatTimestamp(firstBuild.getTimeInMillis());
    List<Stage> stages=new ArrayList<>();
    for (    Stage stage : pipeline.getStages()) {
      List<Task> tasks=new ArrayList<>();
      for (      Task task : stage.getTasks()) {
        AbstractProject taskProject=getProject(task);
        AbstractBuild currentBuild=match(taskProject.getBuilds(),firstBuild);
        tasks.add(getTask(task,currentBuild));
      }
      stages.add(new Stage(stage.getName(),tasks));
    }
    result.add(new Pipeline(pipeline.getName(),firstBuild.getDisplayName(),timestamp,getTriggeredBy(firstBuild),stages,false));
  }
  return result;
}
Program: 56376
Project: 56376
Buggy source:
/** 
 * Created a pipeline prototype for the supplied first project
 */
public static Pipeline extractPipeline(String name,AbstractProject<?,?> firstProject){
  Map<String,Stage> stages=newLinkedHashMap();
  for (  AbstractProject project : ProjectUtil.getAllDownstreamProjects(firstProject)) {
    PipelineProperty property=(PipelineProperty)project.getProperty(PipelineProperty.class);
    String taskName=property != null && !isNullOrEmpty(property.getTaskName()) ? property.getTaskName() : project.getDisplayName();
    Status status=project.isDisabled() ? disabled() : idle();
    Task task=new Task(project.getName(),taskName,null,status,project.getUrl(),false,null);
    String stageName=property != null && !isNullOrEmpty(property.getStageName()) ? property.getStageName() : project.getDisplayName();
    Stage stage=stages.get(stageName);
    if (stage == null)     stage=new Stage(stageName,Collections.<Task>emptyList());
    stages.put(stageName,new Stage(stage.getName(),newArrayList(concat(stage.getTasks(),singleton(task)))));
  }
  return new Pipeline(name,null,null,null,newArrayList(stages.values()),false);
}

Fixed version (ground truth):
/** 
 * Created a pipeline prototype for the supplied first project
 */
public static Pipeline extractPipeline(String name,AbstractProject<?,?> firstProject){
  Map<String,Stage> stages=newLinkedHashMap();
  for (  AbstractProject project : ProjectUtil.getAllDownstreamProjects(firstProject).values()) {
    Task task=getPrototypeTask(project);
    PipelineProperty property=(PipelineProperty)project.getProperty(PipelineProperty.class);
    String stageName=property != null && !isNullOrEmpty(property.getStageName()) ? property.getStageName() : project.getDisplayName();
    Stage stage=stages.get(stageName);
    if (stage == null)     stage=new Stage(stageName,Collections.<Task>emptyList());
    stages.put(stageName,new Stage(stage.getName(),newArrayList(concat(stage.getTasks(),singleton(task)))));
  }
  return new Pipeline(name,null,null,null,newArrayList(stages.values()),false);
}
Program: 56377
Project: 56377
Buggy source:
public static List<AbstractProject<?,?>> getAllDownstreamProjects(AbstractProject first){
  List<AbstractProject<?,?>> projects=new ArrayList<>();
  projects.add(first);
  for (  AbstractProject project : getDownstreamProjects(first))   projects.addAll(getAllDownstreamProjects(project));
  return projects;
}

Fixed version (ground truth):
public static Map<String,AbstractProject<?,?>> getAllDownstreamProjects(AbstractProject first){
  Map<String,AbstractProject<?,?>> projects=newLinkedHashMap();
  projects.put(first.getName(),first);
  for (  AbstractProject project : getDownstreamProjects(first))   projects.putAll(getAllDownstreamProjects(project));
  return projects;
}
Program: 56378
Project: 56378
Buggy source:
@Override public Collection<TopLevelItem> getItems(){
  return emptySet();
}

Fixed version (ground truth):
@Override public Collection<TopLevelItem> getItems(){
  return Jenkins.getInstance().getItems();
}
Program: 56379
Project: 56379
Buggy source:
@Override public boolean contains(TopLevelItem item){
  return false;
}

Fixed version (ground truth):
@Override public boolean contains(TopLevelItem item){
  return getItems().contains(item);
}
Program: 56380
Project: 56380
Buggy source:
public Pipeline createPipelineAggregated(Pipeline pipeline){
  AbstractProject firstProject=getProject(pipeline.getStages().get(0).getTasks().get(0));
  List<Stage> stages=new ArrayList<>();
  for (  Stage stage : pipeline.getStages()) {
    AbstractProject project=getProject(stage.getTasks().get(0));
    List<Task> tasks=new ArrayList<>();
    AbstractBuild versionBuild=getFirstUpstreamBuild(project,firstProject);
    String version=null;
    if (versionBuild != null) {
      version=versionBuild.getDisplayName();
    }
    for (    Task task : stage.getTasks()) {
      AbstractProject taskProject=getProject(task);
      AbstractBuild currentBuild=match(taskProject.getBuilds(),versionBuild);
      if (currentBuild != null) {
        Status status=resolveStatus(taskProject,currentBuild);
        if (!status.isIdle()) {
          tasks.add(new Task(task.getId(),task.getName(),status,Jenkins.getInstance().getRootUrl() + currentBuild.getUrl(),getTestResult(currentBuild)));
        }
 else {
          tasks.add(new Task(task.getId(),task.getName(),status,task.getLink(),getTestResult(currentBuild)));
        }
      }
 else {
        tasks.add(new Task(task.getId(),task.getName(),StatusFactory.idle(),task.getLink(),null));
      }
    }
    stages.add(new Stage(stage.getName(),tasks,version));
  }
  return new Pipeline(pipeline.getName(),null,null,stages,true);
}

Fixed version (ground truth):
public Pipeline createPipelineAggregated(Pipeline pipeline){
  AbstractProject firstProject=getProject(pipeline.getStages().get(0).getTasks().get(0));
  List<Stage> stages=new ArrayList<>();
  for (  Stage stage : pipeline.getStages()) {
    AbstractProject project=getProject(stage.getTasks().get(0));
    List<Task> tasks=new ArrayList<>();
    AbstractBuild versionBuild=getFirstUpstreamBuild(project,firstProject);
    String version=null;
    if (versionBuild != null) {
      version=versionBuild.getDisplayName();
    }
    for (    Task task : stage.getTasks()) {
      AbstractProject taskProject=getProject(task);
      AbstractBuild currentBuild=match(taskProject.getBuilds(),versionBuild);
      if (currentBuild != null) {
        Status status=resolveStatus(taskProject,currentBuild);
        if (!status.isIdle()) {
          tasks.add(new Task(task.getId(),task.getName(),status,currentBuild.getUrl(),getTestResult(currentBuild)));
        }
 else {
          tasks.add(new Task(task.getId(),task.getName(),status,task.getLink(),getTestResult(currentBuild)));
        }
      }
 else {
        tasks.add(new Task(task.getId(),task.getName(),StatusFactory.idle(),task.getLink(),null));
      }
    }
    stages.add(new Stage(stage.getName(),tasks,version));
  }
  return new Pipeline(pipeline.getName(),null,null,stages,true);
}
Program: 56381
Project: 56381
Buggy source:
/** 
 * Created a pipeline prototype for the supplied first project
 */
public Pipeline extractPipeline(String name,AbstractProject<?,?> firstProject){
  Map<String,Stage> stages=newLinkedHashMap();
  for (  AbstractProject project : getAllDownstreamProjects(firstProject).values()) {
    PipelineProperty property=(PipelineProperty)project.getProperty(PipelineProperty.class);
    String taskName=property != null && property.getTaskName() != null && !property.getTaskName().equals("String_Node_Str") ? property.getTaskName() : project.getDisplayName();
    Status status=project.isDisabled() ? disabled() : idle();
    Task task=new Task(project.getName(),taskName,status,getUrl(project),null);
    String stageName=property != null && property.getStageName() != null && !property.getStageName().equals("String_Node_Str") ? property.getStageName() : project.getDisplayName();
    Stage stage=stages.get(stageName);
    if (stage == null)     stage=new Stage(stageName,Collections.<Task>emptyList());
    stages.put(stageName,new Stage(stage.getName(),newArrayList(concat(stage.getTasks(),singleton(task)))));
  }
  return new Pipeline(name,null,null,newArrayList(stages.values()),false);
}

Fixed version (ground truth):
/** 
 * Created a pipeline prototype for the supplied first project
 */
public Pipeline extractPipeline(String name,AbstractProject<?,?> firstProject){
  Map<String,Stage> stages=newLinkedHashMap();
  for (  AbstractProject project : getAllDownstreamProjects(firstProject).values()) {
    PipelineProperty property=(PipelineProperty)project.getProperty(PipelineProperty.class);
    String taskName=property != null && property.getTaskName() != null && !property.getTaskName().equals("String_Node_Str") ? property.getTaskName() : project.getDisplayName();
    Status status=project.isDisabled() ? disabled() : idle();
    Task task=new Task(project.getName(),taskName,status,getJobUrl(project),null);
    String stageName=property != null && property.getStageName() != null && !property.getStageName().equals("String_Node_Str") ? property.getStageName() : project.getDisplayName();
    Stage stage=stages.get(stageName);
    if (stage == null)     stage=new Stage(stageName,Collections.<Task>emptyList());
    stages.put(stageName,new Stage(stage.getName(),newArrayList(concat(stage.getTasks(),singleton(task)))));
  }
  return new Pipeline(name,null,null,newArrayList(stages.values()),false);
}
Program: 56382
Project: 56382
Buggy source:
/** 
 * Populates and return pipelines for the supplied pipeline prototype with the current status.
 * @param pipeline      the pipeline prototype
 * @param noOfPipelines number of pipeline instances
 */
public List<Pipeline> createPipelineLatest(Pipeline pipeline,int noOfPipelines){
  Task firstTask=pipeline.getStages().get(0).getTasks().get(0);
  AbstractProject firstProject=getProject(firstTask);
  List<Pipeline> result=new ArrayList<>();
  Iterator it=firstProject.getBuilds().iterator();
  for (int i=0; i < noOfPipelines && it.hasNext(); i++) {
    AbstractBuild firstBuild=(AbstractBuild)it.next();
    List<Stage> stages=new ArrayList<>();
    for (    Stage stage : pipeline.getStages()) {
      List<Task> tasks=new ArrayList<>();
      for (      Task task : stage.getTasks()) {
        AbstractProject taskProject=getProject(task);
        AbstractBuild currentBuild=match(taskProject.getBuilds(),firstBuild);
        Status status=resolveStatus(taskProject,currentBuild);
        if (status.isIdle()) {
          tasks.add(new Task(task.getId(),task.getName(),status,task.getLink(),getTestResult(currentBuild)));
        }
 else {
          tasks.add(new Task(task.getId(),task.getName(),status,Jenkins.getInstance().getRootUrl() + currentBuild.getUrl(),getTestResult(currentBuild)));
        }
      }
      stages.add(new Stage(stage.getName(),tasks));
    }
    result.add(new Pipeline(pipeline.getName(),firstBuild.getDisplayName(),getTriggeredBy(firstBuild),stages,false));
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Populates and return pipelines for the supplied pipeline prototype with the current status.
 * @param pipeline      the pipeline prototype
 * @param noOfPipelines number of pipeline instances
 */
public List<Pipeline> createPipelineLatest(Pipeline pipeline,int noOfPipelines){
  Task firstTask=pipeline.getStages().get(0).getTasks().get(0);
  AbstractProject firstProject=getProject(firstTask);
  List<Pipeline> result=new ArrayList<>();
  Iterator it=firstProject.getBuilds().iterator();
  for (int i=0; i < noOfPipelines && it.hasNext(); i++) {
    AbstractBuild firstBuild=(AbstractBuild)it.next();
    List<Stage> stages=new ArrayList<>();
    for (    Stage stage : pipeline.getStages()) {
      List<Task> tasks=new ArrayList<>();
      for (      Task task : stage.getTasks()) {
        AbstractProject taskProject=getProject(task);
        AbstractBuild currentBuild=match(taskProject.getBuilds(),firstBuild);
        Status status=resolveStatus(taskProject,currentBuild);
        if (status.isIdle()) {
          tasks.add(new Task(task.getId(),task.getName(),status,task.getLink(),getTestResult(currentBuild)));
        }
 else {
          tasks.add(new Task(task.getId(),task.getName(),status,currentBuild.getUrl(),getTestResult(currentBuild)));
        }
      }
      stages.add(new Stage(stage.getName(),tasks));
    }
    result.add(new Pipeline(pipeline.getName(),firstBuild.getDisplayName(),getTriggeredBy(firstBuild),stages,false));
  }
  return result;
}
Program: 56383
Project: 56383
Buggy source:
/** 
 * Returns the build for a projects that has been triggered by the supplied upstream project.
 */
private AbstractBuild match(RunList runList,AbstractBuild firstJob){
  for (  Object aRunList : runList) {
    AbstractBuild currentBuild=(AbstractBuild)aRunList;
    if (firstJob.equals(getFirstUpstreamBuild(currentBuild))) {
      return currentBuild;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the build for a projects that has been triggered by the supplied upstream project.
 */
private AbstractBuild match(RunList runList,AbstractBuild firstJob){
  if (firstJob != null) {
    for (    Object aRunList : runList) {
      AbstractBuild currentBuild=(AbstractBuild)aRunList;
      if (firstJob.equals(getFirstUpstreamBuild(currentBuild))) {
        return currentBuild;
      }
    }
  }
  return null;
}
Program: 56384
Project: 56384
Buggy source:
public Pipeline createPipelineAggregated(Pipeline pipeline){
  List<Stage> stages=new ArrayList<>();
  for (  Stage stage : pipeline.getStages()) {
    List<Task> tasks=new ArrayList<>();
    AbstractBuild firstTask=getJenkinsJob(stage.getTasks().get(0)).getLastBuild();
    AbstractBuild versionBuild=getFirstUpstreamBuild(firstTask);
    String version=versionBuild.getDisplayName();
    for (    Task task : stage.getTasks()) {
      AbstractProject job=getJenkinsJob(task);
      AbstractBuild currentBuild=match(job.getBuilds(),versionBuild);
      if (currentBuild != null) {
        tasks.add(new Task(task.getId(),task.getName(),resolveStatus(job,currentBuild),Jenkins.getInstance().getRootUrl() + currentBuild.getUrl(),getTestResult(currentBuild)));
      }
 else {
        tasks.add(new Task(task.getId(),task.getName(),StatusFactory.idle(),task.getLink(),null));
      }
    }
    stages.add(new Stage(stage.getName(),tasks,version));
  }
  return new Pipeline(pipeline.getName(),null,null,stages);
}

Fixed version (ground truth):
public Pipeline createPipelineAggregated(Pipeline pipeline){
  List<Stage> stages=new ArrayList<>();
  for (  Stage stage : pipeline.getStages()) {
    List<Task> tasks=new ArrayList<>();
    AbstractBuild firstTask=getJenkinsJob(stage.getTasks().get(0)).getLastBuild();
    AbstractBuild versionBuild=getFirstUpstreamBuild(firstTask);
    String version=null;
    if (versionBuild != null) {
      version=versionBuild.getDisplayName();
    }
    for (    Task task : stage.getTasks()) {
      AbstractProject job=getJenkinsJob(task);
      AbstractBuild currentBuild=match(job.getBuilds(),versionBuild);
      if (currentBuild != null) {
        tasks.add(new Task(task.getId(),task.getName(),resolveStatus(job,currentBuild),Jenkins.getInstance().getRootUrl() + currentBuild.getUrl(),getTestResult(currentBuild)));
      }
 else {
        tasks.add(new Task(task.getId(),task.getName(),StatusFactory.idle(),task.getLink(),null));
      }
    }
    stages.add(new Stage(stage.getName(),tasks,version));
  }
  return new Pipeline(pipeline.getName(),null,null,stages);
}
Program: 56385
Project: 56385
Buggy source:
public Pipeline createPipelineAggregated(Pipeline pipeline){
  List<Stage> stages=new ArrayList<>();
  for (  Stage stage : pipeline.getStages()) {
    String version=null;
    AbstractBuild versionBuild=null;
    List<Task> tasks=new ArrayList<>();
    for (    Task task : stage.getTasks()) {
      AbstractProject job=getJenkinsJob(task);
      AbstractBuild currentBuild=job.getLastBuild();
      AbstractBuild firstBuild=getFirstUpstreamBuild(currentBuild);
      if (firstBuild != null && version == null) {
        version=firstBuild.getDisplayName();
        versionBuild=firstBuild;
      }
      if (firstBuild != null && firstBuild.equals(versionBuild)) {
        tasks.add(new Task(task.getId(),task.getName(),resolveStatus(job,currentBuild),task.getLink(),getTestResult(currentBuild)));
      }
 else {
        tasks.add(new Task(task.getId(),task.getName(),StatusFactory.idle(),task.getLink(),null));
      }
    }
    stages.add(new Stage(stage.getName(),tasks,version));
  }
  return new Pipeline(pipeline.getName(),null,null,stages);
}

Fixed version (ground truth):
public Pipeline createPipelineAggregated(Pipeline pipeline){
  List<Stage> stages=new ArrayList<>();
  for (  Stage stage : pipeline.getStages()) {
    List<Task> tasks=new ArrayList<>();
    AbstractBuild firstTask=getJenkinsJob(stage.getTasks().get(0)).getLastBuild();
    AbstractBuild versionBuild=getFirstUpstreamBuild(firstTask);
    String version=versionBuild.getDisplayName();
    for (    Task task : stage.getTasks()) {
      AbstractProject job=getJenkinsJob(task);
      AbstractBuild currentBuild=match(job.getBuilds(),versionBuild);
      if (currentBuild != null) {
        tasks.add(new Task(task.getId(),task.getName(),resolveStatus(job,currentBuild),Jenkins.getInstance().getRootUrl() + currentBuild.getUrl(),getTestResult(currentBuild)));
      }
 else {
        tasks.add(new Task(task.getId(),task.getName(),StatusFactory.idle(),task.getLink(),null));
      }
    }
    stages.add(new Stage(stage.getName(),tasks,version));
  }
  return new Pipeline(pipeline.getName(),null,null,stages);
}
Program: 56386
Project: 56386
Buggy source:
@DataBoundConstructor public AggregatedPipelineView(String name,List<Component> components){
  super(name,components);
}

Fixed version (ground truth):
@DataBoundConstructor public AggregatedPipelineView(String name,int noOfColumns,List<Component> components){
  super(name,noOfColumns,components);
}
Program: 56387
Project: 56387
Buggy source:
@DataBoundConstructor public MultiPipelineView(String name,List<Component> components){
  super(name);
  this.components=components;
}

Fixed version (ground truth):
@DataBoundConstructor public MultiPipelineView(String name,int noOfColumns,List<Component> components){
  super(name);
  this.components=components;
  this.noOfColumns=noOfColumns;
}
Program: 56388
Project: 56388
Buggy source:
/** 
 * Opens up for testing and mocking, since Jenkins has getDownstreamProjects() final 
 */
List<AbstractProject<?,?>> getDownstreamProjects(AbstractProject project){
  return project.getDownstreamProjects();
}

Fixed version (ground truth):
/** 
 * Opens up for testing and mocking, since Jenkins has getDownstreamProjects() final
 */
List<AbstractProject<?,?>> getDownstreamProjects(AbstractProject project){
  return project.getDownstreamProjects();
}
Program: 56389
Project: 56389
Buggy source:
public Pipeline createPipelineLatest(Pipeline pipeline){
  AbstractBuild prevBuild=null;
  List<AbstractBuild> builds=new ArrayList<>();
  List<Stage> stages=new ArrayList<>();
  for (  Stage stage : pipeline.getStages()) {
    List<Task> tasks=new ArrayList<>();
    for (    Task task : stage.getTasks()) {
      AbstractProject job=Jenkins.getInstance().getItem(task.getId().toString(),Jenkins.getInstance(),AbstractProject.class);
      AbstractBuild build=job.getLastBuild();
      if (stages.isEmpty() || build != null && build.equals(getDownstreamBuild(job,prevBuild))) {
        Status status=resolveStatus(build);
        tasks.add(new Task(task.getId(),task.getName(),status));
      }
 else {
        tasks.add(new Task(task.getId(),task.getName(),StatusFactory.idle()));
      }
      prevBuild=build;
    }
    stages.add(new Stage(stage.getName(),tasks));
  }
  return new Pipeline(pipeline.getName(),stages);
}

Fixed version (ground truth):
public Pipeline createPipelineLatest(Pipeline pipeline){
  List<Stage> stages=new ArrayList<>();
  AbstractBuild firstBuild=null;
  for (  Stage stage : pipeline.getStages()) {
    List<Task> tasks=new ArrayList<>();
    for (    Task task : stage.getTasks()) {
      AbstractProject job=Jenkins.getInstance().getItem(task.getId().toString(),Jenkins.getInstance(),AbstractProject.class);
      AbstractBuild build=job.getLastBuild();
      if (firstBuild == null) {
        firstBuild=build;
      }
      if (build != null && firstBuild.equals(getFirstUpstreamBuild(build))) {
        Status status=resolveStatus(build);
        tasks.add(new Task(task.getId(),task.getName(),status));
      }
 else {
        tasks.add(new Task(task.getId(),task.getName(),StatusFactory.idle()));
      }
    }
    stages.add(new Stage(stage.getName(),tasks));
  }
  return new Pipeline(pipeline.getName(),stages);
}
Program: 56390
Project: 56390
Buggy source:
public static Pipeline extractPipeline(String name,AbstractProject<?,?> firstJob){
  Map<String,Stage> stages=newLinkedHashMap();
  for (  AbstractProject job : getAllDownstreamJobs(firstJob)) {
    PipelineProperty property=(PipelineProperty)job.getProperty(PipelineProperty.class);
    String taskName=property != null && !property.getTaskName().equals("String_Node_Str") ? property.getTaskName() : job.getDisplayName();
    Task task=new Task(taskName,StatusFactory.idle());
    String stageName=property != null && !property.getStageName().equals("String_Node_Str") ? property.getStageName() : job.getDisplayName();
    Stage stage=stages.get(stageName);
    if (stage == null)     stage=new Stage(stageName,Collections.<Task>emptyList());
    stages.put(stageName,new Stage(stage.getName(),newArrayList(concat(stage.getTasks(),singleton(task)))));
  }
  return new Pipeline(name,newArrayList(stages.values()));
}

Fixed version (ground truth):
public static Pipeline extractPipeline(String name,AbstractProject<?,?> firstJob){
  Map<String,Stage> stages=newLinkedHashMap();
  for (  AbstractProject job : getAllDownstreamJobs(firstJob)) {
    PipelineProperty property=(PipelineProperty)job.getProperty(PipelineProperty.class);
    String taskName=property != null && !property.getTaskName().equals("String_Node_Str") ? property.getTaskName() : job.getDisplayName();
    Task task=new Task(job.getName(),taskName,StatusFactory.idle());
    String stageName=property != null && !property.getStageName().equals("String_Node_Str") ? property.getStageName() : job.getDisplayName();
    Stage stage=stages.get(stageName);
    if (stage == null)     stage=new Stage(stageName,Collections.<Task>emptyList());
    stages.put(stageName,new Stage(stage.getName(),newArrayList(concat(stage.getTasks(),singleton(task)))));
  }
  return new Pipeline(name,newArrayList(stages.values()));
}
Program: 56391
Project: 56391
Buggy source:
public boolean isUpdated(long traktId,long lastUpdated){
  Cursor show=null;
  try {
    show=resolver.query(Shows.SHOWS,new String[]{ShowColumns.LAST_UPDATED},ShowColumns.TRAKT_ID + "String_Node_Str",new String[]{String.valueOf(traktId)},null);
    if (show.moveToFirst()) {
      final long showLastUpdated=Cursors.getLong(show,ShowColumns.LAST_UPDATED);
      final long currentTime=System.currentTimeMillis();
      if (showLastUpdated > currentTime + DateUtils.DAY_IN_MILLIS) {
        Timber.e(new IllegalArgumentException("String_Node_Str" + TimeUtils.getIsoTime(showLastUpdated) + "String_Node_Str"+ TimeUtils.getIsoTime(currentTime)),"String_Node_Str");
        return true;
      }
      return lastUpdated > showLastUpdated;
    }
    return false;
  }
  finally {
    if (show != null)     show.close();
  }
}

Fixed version (ground truth):
public boolean isUpdated(long traktId,long lastUpdated){
  Cursor show=null;
  try {
    show=resolver.query(Shows.SHOWS,new String[]{ShowColumns.LAST_UPDATED},ShowColumns.TRAKT_ID + "String_Node_Str",new String[]{String.valueOf(traktId)},null);
    if (show.moveToFirst()) {
      final long showLastUpdated=Cursors.getLong(show,ShowColumns.LAST_UPDATED);
      return lastUpdated > showLastUpdated;
    }
    return false;
  }
  finally {
    if (show != null)     show.close();
  }
}
Program: 56395
Project: 56395
Buggy source:
private void resume(){
  Timber.d("String_Node_Str",running);
  if (!running) {
    running=true;
    MainHandler.removeCallbacks(resumeRunnable);
    MainHandler.removeCallbacks(stopRunnable);
    onResume();
  }
}

Fixed version (ground truth):
private void resume(){
  if (!resumed) {
    resumed=true;
    onResume();
  }
}
Program: 56396
Project: 56396
Buggy source:
@Override public void onQueueFailed(){
  Timber.d("String_Node_Str",getClass().getSimpleName());
  pause();
  MainHandler.postDelayed(resumeRunnable,FAILURE_DELAY);
  dispatchQueueFailed();
}

Fixed version (ground truth):
@Override public void onQueueFailed(){
  Timber.d("String_Node_Str",getClass().getSimpleName());
  pause();
  MainHandler.postDelayed(new Runnable(){
    @Override public void run(){
      executor.unhalt();
    }
  }
,FAILURE_DELAY);
  dispatchQueueFailed();
}
Program: 56397
Project: 56397
Buggy source:
private void start(){
  Timber.d("String_Node_Str");
  executor.start();
  onStart();
}

Fixed version (ground truth):
private void start(){
  Timber.d("String_Node_Str",started);
  if (!started) {
    started=true;
    executor.start();
  }
}
Program: 56398
Project: 56398
Buggy source:
private void dispatchQueueEmpty(){
  for (  JobHandlerListener listener : listeners) {
    listener.onQueueEmpty();
  }
}

Fixed version (ground truth):
private void dispatchQueueEmpty(){
synchronized (listeners) {
    for (int i=listeners.size() - 1; i >= 0; i--) {
      JobHandlerListener listener=listeners.get(i);
      listener.onQueueEmpty();
    }
  }
}
Program: 56399
Project: 56399
Buggy source:
private void pause(){
  Timber.d("String_Node_Str",running);
  if (running) {
    running=false;
    MainHandler.removeCallbacks(resumeRunnable);
    MainHandler.removeCallbacks(stopRunnable);
    onPause();
  }
}

Fixed version (ground truth):
private void pause(){
  if (resumed) {
    resumed=false;
    onPause();
  }
}
Program: 56400
Project: 56400
Buggy source:
public void registerListener(JobHandlerListener listener){
  listeners.add(listener);
  MainHandler.removeCallbacks(resumeRunnable);
  MainHandler.removeCallbacks(stopRunnable);
  if (listeners.size() == 1) {
    start();
  }
  Timber.d("String_Node_Str",listeners.size());
}

Fixed version (ground truth):
public void registerListener(JobHandlerListener listener){
synchronized (listeners) {
    listeners.add(listener);
    MainHandler.removeCallbacks(stopRunnable);
    start();
    Timber.d("String_Node_Str",listeners.size());
  }
}
Program: 56401
Project: 56401
Buggy source:
public JobHandler(int withFlags,int withoutFlags,int threadCount){
  Injector.obtain().inject(this);
  executor=new JobExecutor(jobManager,executorListener,threadCount,withFlags,withoutFlags);
  executor.start();
}

Fixed version (ground truth):
public JobHandler(int withFlags,int withoutFlags,int threadCount){
  Injector.obtain().inject(this);
  executor=new JobExecutor(jobManager,executorListener,threadCount,withFlags,withoutFlags);
}
Program: 56402
Project: 56402
Buggy source:
private void dispatchQueueFailed(){
  for (  JobHandlerListener listener : listeners) {
    listener.onQueueFailed();
  }
}

Fixed version (ground truth):
private void dispatchQueueFailed(){
synchronized (listeners) {
    for (int i=listeners.size() - 1; i >= 0; i--) {
      JobHandlerListener listener=listeners.get(i);
      listener.onQueueFailed();
    }
  }
}
Program: 56403
Project: 56403
Buggy source:
public void unregisterListener(JobHandlerListener listener){
  listeners.remove(listener);
  if (listeners.isEmpty()) {
    Timber.d("String_Node_Str");
    MainHandler.postDelayed(stopRunnable,STOP_DELAY);
  }
 else {
    Timber.d("String_Node_Str",listeners.size());
  }
}

Fixed version (ground truth):
public void unregisterListener(JobHandlerListener listener){
synchronized (listeners) {
    listeners.remove(listener);
    if (listeners.isEmpty()) {
      Timber.d("String_Node_Str");
      MainHandler.postDelayed(stopRunnable,STOP_DELAY);
    }
 else {
      Timber.d("String_Node_Str",listeners.size());
    }
  }
}
Program: 56404
Project: 56404
Buggy source:
private void stop(){
  Timber.d("String_Node_Str");
  executor.stop();
  pause();
  onStop();
}

Fixed version (ground truth):
private void stop(){
  Timber.d("String_Node_Str");
  if (started) {
    started=false;
    executor.stop();
    onStop();
  }
}
Program: 56405
Project: 56405
Buggy source:
@Override public void onQueueFailed(){
  Timber.d("String_Node_Str",params.getJobId());
  service.jobFinished(params,true);
  MainHandler.post(new Runnable(){
    @Override public void run(){
      jobHandler.unregisterListener(listener);
    }
  }
);
}

Fixed version (ground truth):
@Override public void onQueueFailed(){
  Timber.d("String_Node_Str",params.getJobId());
  service.jobFinished(params,true);
  jobHandler.unregisterListener(listener);
}
Program: 56406
Project: 56406
Buggy source:
@Override public void run(){
  jobHandler.unregisterListener(listener);
}

Fixed version (ground truth):
@Override public void run(){
  Timber.d("String_Node_Str",params.getJobId());
  service.jobFinished(params,false);
}
Program: 56407
Project: 56407
Buggy source:
@Override public void onQueueEmpty(){
  Timber.d("String_Node_Str",params.getJobId());
  service.jobFinished(params,false);
  MainHandler.post(new Runnable(){
    @Override public void run(){
      jobHandler.unregisterListener(listener);
    }
  }
);
}

Fixed version (ground truth):
@Override public void onQueueEmpty(){
  Timber.d("String_Node_Str",params.getJobId());
  service.jobFinished(params,false);
  jobHandler.unregisterListener(listener);
}
Program: 56408
Project: 56408
Buggy source:
@Override public void onQueueFailed(){
  Timber.d("String_Node_Str",params.getJobId());
  service.jobFinished(params,true);
  MainHandler.post(new Runnable(){
    @Override public void run(){
      jobHandler.unregisterListener(listener);
    }
  }
);
}

Fixed version (ground truth):
@Override public void onQueueFailed(){
  Timber.d("String_Node_Str",params.getJobId());
  service.jobFinished(params,true);
  jobHandler.unregisterListener(listener);
}
Program: 56409
Project: 56409
Buggy source:
@Override public void run(){
  jobHandler.unregisterListener(listener);
}

Fixed version (ground truth):
@Override public void run(){
  Timber.d("String_Node_Str",params.getJobId());
  service.jobFinished(params,false);
}
Program: 56410
Project: 56410
Buggy source:
@Override public void onQueueEmpty(){
  Timber.d("String_Node_Str",params.getJobId());
  service.jobFinished(params,false);
  MainHandler.post(new Runnable(){
    @Override public void run(){
      jobHandler.unregisterListener(listener);
    }
  }
);
}

Fixed version (ground truth):
@Override public void onQueueEmpty(){
  Timber.d("String_Node_Str",params.getJobId());
  service.jobFinished(params,false);
  jobHandler.unregisterListener(listener);
}
Program: 56411
Project: 56411
Buggy source:
public BaseUrlRequestHandler(Context context){
  this.context=context;
  Injector.obtain().inject(this);
  settings=PreferenceManager.getDefaultSharedPreferences(context);
}

Fixed version (ground truth):
public BaseUrlRequestHandler(Context context,ConfigurationService configurationService){
  this.context=context;
  this.configurationService=configurationService;
  settings=PreferenceManager.getDefaultSharedPreferences(context);
}
Program: 56412
Project: 56412
Buggy source:
public EpisodeRequestHandler(Context context,ImageDownloader downloader){
  super(context,downloader);
}

Fixed version (ground truth):
public EpisodeRequestHandler(Context context,ConfigurationService configurationService,ImageDownloader downloader,TvEpisodesService tvEpisodesService,ShowDatabaseHelper showHelper,EpisodeDatabaseHelper episodeHelper){
  super(context,configurationService,downloader);
  this.tvEpisodesService=tvEpisodesService;
  this.showHelper=showHelper;
  this.episodeHelper=episodeHelper;
}
Program: 56413
Project: 56413
Buggy source:
public static String retainImages(Context context,long id,Images images){
  ContentValues values=new ContentValues();
  values.put(EpisodeColumns.IMAGES_LAST_UPDATE,System.currentTimeMillis());
  Image screenshot=selectBest(images.stills);
  String path=null;
  if (screenshot != null) {
    final String screenshotPath=ImageUri.create(ImageType.BACKDROP,screenshot.file_path);
    values.put(EpisodeColumns.SCREENSHOT,screenshotPath);
    path=screenshotPath;
  }
 else {
    values.putNull(EpisodeColumns.SCREENSHOT);
  }
  context.getContentResolver().update(Episodes.withId(id),values,null,null);
  return path;
}

Fixed version (ground truth):
public static void retainImages(Context context,long id,Images images){
  ContentValues values=new ContentValues();
  values.put(EpisodeColumns.IMAGES_LAST_UPDATE,System.currentTimeMillis());
  Image screenshot=selectBest(images.stills);
  if (screenshot != null) {
    final String screenshotPath=ImageUri.create(ImageType.BACKDROP,screenshot.file_path);
    values.put(EpisodeColumns.SCREENSHOT,screenshotPath);
  }
 else {
    values.putNull(EpisodeColumns.SCREENSHOT);
  }
  context.getContentResolver().update(Episodes.withId(id),values,null,null);
}
Program: 56414
Project: 56414
Buggy source:
@Override protected String getCachedPath(ImageType imageType,long id){
  Cursor c=null;
  try {
    c=context.getContentResolver().query(Episodes.withId(id),new String[]{EpisodeColumns.IMAGES_LAST_UPDATE,EpisodeColumns.SCREENSHOT},null,null,null);
    c.moveToFirst();
    long lastUpdate=Cursors.getLong(c,EpisodeColumns.IMAGES_LAST_UPDATE);
    final boolean needsUpdate=lastUpdate + DateUtils.WEEK_IN_MILLIS < System.currentTimeMillis();
    if (imageType == ImageType.STILL) {
      String path=Cursors.getString(c,EpisodeColumns.SCREENSHOT);
      if (!needsUpdate && !TextUtils.isEmpty(path)) {
        return path;
      }
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + imageType.toString());
    }
  }
  finally {
    Closeables.closeQuietly(c);
  }
  return null;
}

Fixed version (ground truth):
@Override protected String getCachedPath(ImageType imageType,long id){
  Cursor c=null;
  try {
    c=context.getContentResolver().query(Episodes.withId(id),new String[]{EpisodeColumns.IMAGES_LAST_UPDATE,EpisodeColumns.SCREENSHOT},null,null,null);
    c.moveToFirst();
    if (imageType == ImageType.STILL) {
      return Cursors.getString(c,EpisodeColumns.SCREENSHOT);
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + imageType.toString());
    }
  }
  finally {
    Closeables.closeQuietly(c);
  }
}
Program: 56415
Project: 56415
Buggy source:
@Provides @Singleton Picasso providePicasso(Context context){
  final File cacheDir=createCacheDir(context);
  final long cacheSize=calculateDiskCacheSize(cacheDir);
  OkHttpClient okClient=defaultOkHttpClient(cacheDir,cacheSize);
  Downloader downloader=new OkHttp3Downloader(okClient);
  ImageDownloader imageDownloader=new ImageDownloader(okClient);
  Picasso.Builder builder=new Picasso.Builder(context).requestTransformer(new ImageRequestTransformer(context)).addRequestHandler(new ImageRequestHandler(context,downloader)).addRequestHandler(new ShowRequestHandler(context,imageDownloader)).addRequestHandler(new SeasonRequestHandler(context,imageDownloader)).addRequestHandler(new EpisodeRequestHandler(context,imageDownloader)).addRequestHandler(new MovieRequestHandler(context,imageDownloader)).addRequestHandler(new PersonRequestHandler(context,imageDownloader)).downloader(downloader);
  if (BuildConfig.DEBUG) {
    builder.listener(new Picasso.Listener(){
      @Override public void onImageLoadFailed(      Picasso picasso,      Uri uri,      Exception exception){
        Timber.d(exception);
      }
    }
);
  }
  return builder.build();
}

Fixed version (ground truth):
@Provides @Singleton Picasso providePicasso(Context context,Downloader downloader,ImageRequestHandler imageRequestHandler,ShowRequestHandler showRequestHandler,SeasonRequestHandler seasonRequestHandler,EpisodeRequestHandler episodeRequestHandler,MovieRequestHandler movieRequestHandler,PersonRequestHandler personRequestHandler){
  Picasso.Builder builder=new Picasso.Builder(context).requestTransformer(new ImageRequestTransformer(context)).addRequestHandler(imageRequestHandler).addRequestHandler(showRequestHandler).addRequestHandler(seasonRequestHandler).addRequestHandler(episodeRequestHandler).addRequestHandler(movieRequestHandler).addRequestHandler(personRequestHandler).downloader(downloader);
  if (BuildConfig.DEBUG) {
    builder.listener(new Picasso.Listener(){
      @Override public void onImageLoadFailed(      Picasso picasso,      Uri uri,      Exception exception){
        Timber.d(exception);
      }
    }
);
  }
  return builder.build();
}
Program: 56416
Project: 56416
Buggy source:
public ImageRequestHandler(Context context,Downloader downloader){
  super(context);
  this.downloader=downloader;
}

Fixed version (ground truth):
public ImageRequestHandler(Context context,ConfigurationService configurationService,Downloader downloader){
  super(context,configurationService);
  this.downloader=downloader;
}
Program: 56417
Project: 56417
Buggy source:
@Override public void perform(){
  if (TraktTimestamps.shouldPurge(getContext())) {
    queue(new PurgeDatabase());
  }
  queue(new SyncConfiguration());
  queue(new SyncUserSettings());
  queue(new StartSyncUpdatedShows());
  queue(new StartSyncUpdatedMovies());
  queue(new SyncUserActivity());
  if (TraktTimestamps.suggestionsNeedsUpdate(getContext())) {
    TraktTimestamps.updateSuggestions(getContext());
    queue(new SyncTrendingShows());
    queue(new SyncTrendingMovies());
    queue(new SyncShowRecommendations());
    queue(new SyncMovieRecommendations());
    queue(new SyncAnticipatedShows());
    queue(new SyncAnticipatedMovies());
  }
  if (TraktTimestamps.hiddenNeedsUpdate(getContext())) {
    TraktTimestamps.updateHidden(getContext());
    queue(new SyncHiddenItems());
  }
  final long currentTime=System.currentTimeMillis();
  SharedPreferences settings=PreferenceManager.getDefaultSharedPreferences(getContext());
  settings.edit().putLong(Settings.LAST_FULL_SYNC,currentTime).apply();
}

Fixed version (ground truth):
@Override public void perform(){
  queue(new SyncConfiguration());
  queue(new SyncUserSettings());
  queue(new StartSyncUpdatedShows());
  queue(new StartSyncUpdatedMovies());
  queue(new SyncUserActivity());
  if (TraktTimestamps.suggestionsNeedsUpdate(getContext())) {
    TraktTimestamps.updateSuggestions(getContext());
    queue(new SyncTrendingShows());
    queue(new SyncTrendingMovies());
    queue(new SyncShowRecommendations());
    queue(new SyncMovieRecommendations());
    queue(new SyncAnticipatedShows());
    queue(new SyncAnticipatedMovies());
  }
  if (TraktTimestamps.hiddenNeedsUpdate(getContext())) {
    TraktTimestamps.updateHidden(getContext());
    queue(new SyncHiddenItems());
  }
  final long currentTime=System.currentTimeMillis();
  SharedPreferences settings=PreferenceManager.getDefaultSharedPreferences(getContext());
  settings.edit().putLong(Settings.LAST_FULL_SYNC,currentTime).apply();
}