Program: 188342
Project: 188342
Buggy source:
public ShowJob(Job job,Map<String,PluginInfo> pluginsInfo){
  this.job=job;
  this.pluginsInfo=pluginsInfo;
  boolean isIngest=false;
  Facets facets=new Facets(new SimpleFacetParameter(RodaConstants.JOB_REPORT_PLUGIN_STATE),new SimpleFacetParameter(RodaConstants.JOB_REPORT_PLUGIN_NAME));
  Filter filter=new Filter(new SimpleFilterParameter(RodaConstants.JOB_REPORT_JOB_ID,job.getUUID()));
  if (job.getPluginType().equals(PluginType.INGEST)) {
    ingestJobReports=new IngestJobReportList(new Filter(new SimpleFilterParameter(RodaConstants.JOB_REPORT_JOB_ID,job.getId())),facets,messages.reportList(),pluginsInfo,false);
    ListSelectionUtils.bindBrowseOpener(ingestJobReports);
    simpleJobReports=new SimpleJobReportList();
    isIngest=true;
  }
 else {
    simpleJobReports=new SimpleJobReportList(new Filter(new SimpleFilterParameter(RodaConstants.JOB_REPORT_JOB_ID,job.getId())),facets,messages.reportList(),pluginsInfo,false);
    ListSelectionUtils.bindBrowseOpener(simpleJobReports);
    ingestJobReports=new IngestJobReportList();
  }
  ingestJobReportsSearchPanel=new SearchPanel(filter,RodaConstants.JOB_REPORT_SEARCH,true,messages.jobProcessedSearchPlaceHolder(),false,false,false);
  ingestJobReportsSearchPanel.setList(ingestJobReports);
  simpleJobReportsSearchPanel=new SearchPanel(filter,RodaConstants.JOB_REPORT_SEARCH,true,messages.jobProcessedSearchPlaceHolder(),false,false,false);
  simpleJobReportsSearchPanel.setList(simpleJobReports);
  jobReportStatus=new FlowPanel();
  jobReportLastAction=new FlowPanel();
  Map<String,FlowPanel> facetPanels=new HashMap<>();
  facetPanels.put(RodaConstants.JOB_REPORT_PLUGIN_STATE,jobReportStatus);
  facetPanels.put(RodaConstants.JOB_REPORT_PLUGIN_NAME,jobReportLastAction);
  initWidget(uiBinder.createAndBindUi(this));
  simpleJobReportsSearchPanel.setVisible(!isIngest);
  simpleJobReports.setVisible(!isIngest);
  ingestJobReportsSearchPanel.setVisible(isIngest);
  ingestJobReports.setVisible(isIngest);
  buttonProcess.setVisible(isIngest);
  name.setText(job.getName());
  creator.setText(job.getUsername());
  dateStarted.setText(dateTimeFormat.format(job.getStartDate()));
  update();
  SelectedItems<?> selected=job.getSourceObjects();
  selectedListPanel.setVisible(true);
  if (isIngest) {
    FacetUtils.bindFacets(ingestJobReports,facetPanels);
    if (isJobRunning()) {
      ingestJobReports.autoUpdate(PERIOD_MILLIS);
    }
    ingestJobReports.getSelectionModel().addSelectionChangeHandler(new Handler(){
      @Override public void onSelectionChange(      SelectionChangeEvent event){
        Report jobReport=ingestJobReports.getSelectionModel().getSelectedObject();
        if (jobReport != null) {
          HistoryUtils.newHistory(ShowJobReport.RESOLVER,jobReport.getId());
        }
      }
    }
);
    showIngestSourceObjects(selected);
  }
 else {
    FacetUtils.bindFacets(simpleJobReports,facetPanels);
    if (isJobRunning()) {
      simpleJobReports.autoUpdate(PERIOD_MILLIS);
    }
    simpleJobReports.getSelectionModel().addSelectionChangeHandler(new Handler(){
      @Override public void onSelectionChange(      SelectionChangeEvent event){
        Report jobReport=simpleJobReports.getSelectionModel().getSelectedObject();
        if (jobReport != null) {
          HistoryUtils.newHistory(ShowJobReport.RESOLVER,jobReport.getId());
        }
      }
    }
);
    showActionSourceObjects(selected);
  }
  PluginInfo pluginInfo=pluginsInfo.get(job.getPlugin());
  if (pluginInfo != null) {
    plugin.setText(messages.pluginLabel(pluginInfo.getName(),pluginInfo.getVersion()));
    if (pluginInfo.getParameters().isEmpty()) {
      pluginPanel.setVisible(false);
      pluginOptions.setVisible(false);
    }
 else {
      pluginPanel.setVisible(true);
      pluginOptions.setVisible(true);
    }
    for (    PluginParameter parameter : pluginInfo.getParameters()) {
      if (PluginParameterType.BOOLEAN.equals(parameter.getType())) {
        createBooleanLayout(parameter);
      }
 else       if (PluginParameterType.STRING.equals(parameter.getType())) {
        createStringLayout(parameter);
      }
 else       if (PluginParameterType.PLUGIN_SIP_TO_AIP.equals(parameter.getType())) {
        createPluginSipToAipLayout(parameter);
      }
 else       if (PluginParameterType.AIP_ID.equals(parameter.getType())) {
        createSelectAipLayout(parameter);
      }
 else {
        GWT.log("String_Node_Str");
        createStringLayout(parameter);
      }
    }
  }
 else {
    plugin.setText(job.getPlugin());
    pluginPanel.setVisible(false);
    pluginOptions.setVisible(false);
  }
}

Fixed version (ground truth):
public ShowJob(Job job,Map<String,PluginInfo> pluginsInfo){
  this.job=job;
  this.pluginsInfo=pluginsInfo;
  boolean isIngest=false;
  Facets facets=new Facets(new SimpleFacetParameter(RodaConstants.JOB_REPORT_PLUGIN_STATE),new SimpleFacetParameter(RodaConstants.JOB_REPORT_PLUGIN_NAME));
  Filter filter=new Filter(new SimpleFilterParameter(RodaConstants.JOB_REPORT_JOB_ID,job.getUUID()));
  if (job.getPluginType().equals(PluginType.INGEST)) {
    ingestJobReports=new IngestJobReportList(new Filter(new SimpleFilterParameter(RodaConstants.JOB_REPORT_JOB_ID,job.getId())),facets,messages.reportList(),pluginsInfo,false);
    ListSelectionUtils.bindBrowseOpener(ingestJobReports);
    simpleJobReports=new SimpleJobReportList();
    isIngest=true;
  }
 else {
    simpleJobReports=new SimpleJobReportList(new Filter(new SimpleFilterParameter(RodaConstants.JOB_REPORT_JOB_ID,job.getId())),facets,messages.reportList(),pluginsInfo,false);
    ListSelectionUtils.bindBrowseOpener(simpleJobReports);
    ingestJobReports=new IngestJobReportList();
  }
  ingestJobReportsSearchPanel=new SearchPanel(filter,RodaConstants.JOB_REPORT_SEARCH,true,messages.jobProcessedSearchPlaceHolder(),false,false,false);
  ingestJobReportsSearchPanel.setList(ingestJobReports);
  simpleJobReportsSearchPanel=new SearchPanel(filter,RodaConstants.JOB_REPORT_SEARCH,true,messages.jobProcessedSearchPlaceHolder(),false,false,false);
  simpleJobReportsSearchPanel.setList(simpleJobReports);
  jobReportStatus=new FlowPanel();
  jobReportLastAction=new FlowPanel();
  Map<String,FlowPanel> facetPanels=new HashMap<>();
  facetPanels.put(RodaConstants.JOB_REPORT_PLUGIN_STATE,jobReportStatus);
  facetPanels.put(RodaConstants.JOB_REPORT_PLUGIN_NAME,jobReportLastAction);
  initWidget(uiBinder.createAndBindUi(this));
  simpleJobReportsSearchPanel.setVisible(!isIngest);
  simpleJobReports.setVisible(!isIngest);
  ingestJobReportsSearchPanel.setVisible(isIngest);
  ingestJobReports.setVisible(isIngest);
  buttonProcess.setVisible(isIngest);
  name.setText(job.getName());
  creator.setText(job.getUsername());
  dateStarted.setText(dateTimeFormat.format(job.getStartDate()));
  update();
  SelectedItems<?> selected=job.getSourceObjects();
  selectedListPanel.setVisible(true);
  if (isIngest) {
    FacetUtils.bindFacets(ingestJobReports,facetPanels);
    if (isJobRunning()) {
      ingestJobReports.autoUpdate(PERIOD_MILLIS);
    }
    ingestJobReports.getSelectionModel().addSelectionChangeHandler(new Handler(){
      @Override public void onSelectionChange(      SelectionChangeEvent event){
        Report jobReport=ingestJobReports.getSelectionModel().getSelectedObject();
        if (jobReport != null) {
          HistoryUtils.newHistory(ShowJobReport.RESOLVER,jobReport.getId());
        }
      }
    }
);
    showIngestSourceObjects(selected);
  }
 else {
    FacetUtils.bindFacets(simpleJobReports,facetPanels);
    if (isJobRunning()) {
      simpleJobReports.autoUpdate(PERIOD_MILLIS);
    }
    simpleJobReports.getSelectionModel().addSelectionChangeHandler(new Handler(){
      @Override public void onSelectionChange(      SelectionChangeEvent event){
        Report jobReport=simpleJobReports.getSelectionModel().getSelectedObject();
        if (jobReport != null) {
          HistoryUtils.newHistory(ShowJobReport.RESOLVER,jobReport.getId());
        }
      }
    }
);
    showActionSourceObjects(selected);
  }
  PluginInfo pluginInfo=pluginsInfo.get(job.getPlugin());
  if (pluginInfo != null) {
    plugin.setText(messages.pluginLabelWithVersion(pluginInfo.getName(),pluginInfo.getVersion()));
    if (pluginInfo.getParameters().isEmpty()) {
      pluginPanel.setVisible(false);
      pluginOptions.setVisible(false);
    }
 else {
      pluginPanel.setVisible(true);
      pluginOptions.setVisible(true);
    }
    for (    PluginParameter parameter : pluginInfo.getParameters()) {
      if (PluginParameterType.BOOLEAN.equals(parameter.getType())) {
        createBooleanLayout(parameter);
      }
 else       if (PluginParameterType.STRING.equals(parameter.getType())) {
        createStringLayout(parameter);
      }
 else       if (PluginParameterType.PLUGIN_SIP_TO_AIP.equals(parameter.getType())) {
        createPluginSipToAipLayout(parameter);
      }
 else       if (PluginParameterType.AIP_ID.equals(parameter.getType())) {
        createSelectAipLayout(parameter);
      }
 else {
        GWT.log("String_Node_Str");
        createStringLayout(parameter);
      }
    }
  }
 else {
    plugin.setText(job.getPlugin());
    pluginPanel.setVisible(false);
    pluginOptions.setVisible(false);
  }
}