Program: 92951
Project: 92951
Buggy source:
@SuppressWarnings("String_Node_Str") public void testRegister_Unregister_3(){
  TestProvider1 testProvider1=new TestProvider1(TmfEvent.class);
  TestProvider2 testProvider2=new TestProvider2(TmfEvent.class);
  TestProvider3 testProvider3=new TestProvider3(TmfEvent3.class);
  TmfDataProvider<TmfEvent>[] providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class);
  assertTrue(providers.length == 2);
  if (providers[0] == testProvider1) {
    assertTrue(providers[1] == testProvider2);
  }
 else {
    assertTrue(providers[1] == testProvider1);
    assertTrue(providers[0] == testProvider2);
  }
  TmfDataProvider<TmfEvent3>[] providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class);
  assertTrue(providers3.length == 1);
  assertTrue(providers3[0] == testProvider3);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider1.class);
  assertTrue(providers.length == 1);
  assertTrue(providers[0] == testProvider1);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider2.class);
  assertTrue(providers.length == 1);
  assertTrue(providers[0] == testProvider2);
  providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class,TestProvider3.class);
  assertTrue(providers3.length == 1);
  assertTrue(providers3[0] == testProvider3);
  testProvider1.deregister();
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class);
  assertTrue(providers.length == 1);
  assertTrue(providers[0] == testProvider2);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider1.class);
  assertTrue(providers.length == 0);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider2.class);
  assertTrue(providers.length == 1);
  assertTrue(providers[0] == testProvider2);
  providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class);
  assertTrue(providers3.length == 1);
  assertTrue(providers3[0] == testProvider3);
  providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class,TestProvider3.class);
  assertTrue(providers3.length == 1);
  assertTrue(providers3[0] == testProvider3);
  testProvider2.deregister();
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class);
  assertTrue(providers.length == 0);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider1.class);
  assertTrue(providers.length == 0);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider2.class);
  assertTrue(providers.length == 0);
  providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class);
  assertTrue(providers3.length == 1);
  assertTrue(providers3[0] == testProvider3);
  providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class,TestProvider3.class);
  assertTrue(providers3.length == 1);
  assertTrue(providers3[0] == testProvider3);
  testProvider3.deregister();
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class);
  assertTrue(providers.length == 0);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider1.class);
  assertTrue(providers.length == 0);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider2.class);
  assertTrue(providers.length == 0);
  providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class);
  assertTrue(providers3.length == 0);
  providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class,TestProvider3.class);
  assertTrue(providers3.length == 0);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void testRegister_Unregister_3(){
  TestProvider1 testProvider1=new TestProvider1(TmfEvent.class);
  TestProvider2 testProvider2=new TestProvider2(TmfEvent.class);
  TestProvider3 testProvider3=new TestProvider3(TmfEvent3.class);
  TmfDataProvider<TmfEvent>[] providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class);
  assertTrue(providers.length == 2);
  if (providers[0] == testProvider1) {
    assertTrue(providers[1] == testProvider2);
  }
 else {
    assertTrue(providers[1] == testProvider1);
    assertTrue(providers[0] == testProvider2);
  }
  TmfDataProvider<TmfEvent3>[] providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class);
  assertTrue(providers3.length == 1);
  assertTrue(providers3[0] == testProvider3);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider1.class);
  assertTrue(providers.length == 1);
  assertTrue(providers[0] == testProvider1);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider2.class);
  assertTrue(providers.length == 1);
  assertTrue(providers[0] == testProvider2);
  providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class,TestProvider3.class);
  assertTrue(providers3.length == 1);
  assertTrue(providers3[0] == testProvider3);
  testProvider1.dispose();
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class);
  assertTrue(providers.length == 1);
  assertTrue(providers[0] == testProvider2);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider1.class);
  assertTrue(providers.length == 0);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider2.class);
  assertTrue(providers.length == 1);
  assertTrue(providers[0] == testProvider2);
  providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class);
  assertTrue(providers3.length == 1);
  assertTrue(providers3[0] == testProvider3);
  providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class,TestProvider3.class);
  assertTrue(providers3.length == 1);
  assertTrue(providers3[0] == testProvider3);
  testProvider2.dispose();
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class);
  assertTrue(providers.length == 0);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider1.class);
  assertTrue(providers.length == 0);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider2.class);
  assertTrue(providers.length == 0);
  providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class);
  assertTrue(providers3.length == 1);
  assertTrue(providers3[0] == testProvider3);
  providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class,TestProvider3.class);
  assertTrue(providers3.length == 1);
  assertTrue(providers3[0] == testProvider3);
  testProvider3.dispose();
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class);
  assertTrue(providers.length == 0);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider1.class);
  assertTrue(providers.length == 0);
  providers=(TmfDataProvider<TmfEvent>[])TmfProviderManager.getProviders(TmfEvent.class,TestProvider2.class);
  assertTrue(providers.length == 0);
  providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class);
  assertTrue(providers3.length == 0);
  providers3=(TmfDataProvider<TmfEvent3>[])TmfProviderManager.getProviders(TmfEvent3.class,TestProvider3.class);
  assertTrue(providers3.length == 0);
}