Program: 97268
Project: 97268
Buggy source:
@Test public void testInitSearchResults() throws UnsupportedEncodingException {
  MockAtsArtifactProvider provider=new MockAtsArtifactProvider();
  MockDisplayOptionsComponent optionsComp=new MockDisplayOptionsComponent();
  List<Match<ArtifactReadable,AttributeReadable<?>>> resultList=new ArrayList<Match<ArtifactReadable,AttributeReadable<?>>>();
  MockArtifact art=new MockArtifact("String_Node_Str","String_Node_Str");
  MockAttribute attr=new MockAttribute(CoreAttributeTypes.Name,"String_Node_Str");
  Match match=new MockMatch(art,attr);
  resultList.add(match);
  provider.setResultList(resultList);
  AtsSearchPresenterImpl<AtsSearchHeaderComponent,AtsSearchParameters> presenter=new AtsSearchPresenterImpl<AtsSearchHeaderComponent,AtsSearchParameters>(provider,new MockLogger());
  MockAtsSearchHeaderComponent headerComp=new MockAtsSearchHeaderComponent();
  MockSearchResultsListComponent resultsComponent=new MockSearchResultsListComponent();
  presenter.initSearchResults(null,headerComp,resultsComponent,optionsComp);
  Assert.assertEquals(3,headerComp.getPrograms().size());
  String programGuid=GUID.create();
  String buildGuid=String.valueOf(Lib.generateUuid());
  String url="String_Node_Str" + new UrlQuery().put("String_Node_Str",programGuid).put("String_Node_Str",buildGuid).put("String_Node_Str","String_Node_Str").put("String_Node_Str","String_Node_Str").put("String_Node_Str","String_Node_Str").toString();
  presenter.initSearchResults(url,headerComp,resultsComponent,optionsComp);
  Assert.assertEquals(1,resultsComponent.getSearchResults().size());
}

Fixed version (ground truth):
@Test public void testInitSearchResults() throws UnsupportedEncodingException {
  MockAtsArtifactProvider provider=new MockAtsArtifactProvider();
  MockDisplayOptionsComponent optionsComp=new MockDisplayOptionsComponent();
  List<Match<ArtifactReadable,AttributeReadable<?>>> resultList=new ArrayList<Match<ArtifactReadable,AttributeReadable<?>>>();
  MockArtifact art=new MockArtifact("String_Node_Str","String_Node_Str");
  MockAttribute attr=new MockAttribute(CoreAttributeTypes.Name,"String_Node_Str");
  Match match=new MockMatch(art,attr);
  resultList.add(match);
  provider.setResultList(resultList);
  AtsSearchPresenterImpl<AtsSearchHeaderComponent,AtsSearchParameters> presenter=new AtsSearchPresenterImpl<AtsSearchHeaderComponent,AtsSearchParameters>(provider,new MockLogger());
  MockAtsSearchHeaderComponent headerComp=new MockAtsSearchHeaderComponent();
  MockSearchResultsListComponent resultsComponent=new MockSearchResultsListComponent();
  presenter.initSearchResults(null,headerComp,resultsComponent,optionsComp);
  Assert.assertEquals(3,headerComp.getPrograms().size());
  String programGuid=GUID.create();
  String buildGuid="String_Node_Str";
  String url="String_Node_Str" + new UrlQuery().put("String_Node_Str",programGuid).put("String_Node_Str",buildGuid).put("String_Node_Str","String_Node_Str").put("String_Node_Str","String_Node_Str").put("String_Node_Str","String_Node_Str").toString();
  presenter.initSearchResults(url,headerComp,resultsComponent,optionsComp);
  Assert.assertEquals(1,resultsComponent.getSearchResults().size());
}