Program: 45275
Project: 45275
Buggy source:
private void doCreateHive(PolicyFileHiveFactory factory){
  factory.setAlias("String_Node_Str","String_Node_Str");
  factory.setAlias("String_Node_Str","String_Node_Str");
  factory.setAlias("String_Node_Str","String_Node_Str");
  factory.setAlias("String_Node_Str","String_Node_Str");
  Hive hive=factory.createHive();
  assertTrue(hive.containsPrincipal(new EverybodyPrincipal()));
  assertTrue(hive.containsPrincipal(new SimplePrincipal("String_Node_Str")));
  assertTrue(hive.containsPrincipal(new SimplePrincipal("String_Node_Str")));
  assertTrue(hive.containsPrincipal(new SimplePrincipal("String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPrincipal(new SimplePrincipal("String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str")));
  assertFalse(hive.containsPermission(new FaultyPermission()));
  assertTrue(hive.containsPrincipal(new SimplePrincipal("String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPrincipal(new SimplePrincipal("String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str")));
}

Fixed version (ground truth):
private void doCreateHive(PolicyFileHiveFactory factory){
  factory.setAlias("String_Node_Str","String_Node_Str");
  factory.setAlias("String_Node_Str","String_Node_Str");
  factory.setAlias("String_Node_Str","String_Node_Str");
  factory.setAlias("String_Node_Str","String_Node_Str");
  Hive hive=factory.createHive();
  assertTrue(hive.containsPrincipal(new EverybodyPrincipal()));
  assertTrue(hive.containsPrincipal(new SimplePrincipal("String_Node_Str")));
  assertTrue(hive.containsPrincipal(new SimplePrincipal("String_Node_Str")));
  assertTrue(hive.containsPrincipal(new SimplePrincipal("String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertFalse(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPrincipal(new SimplePrincipal("String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str")));
  assertFalse(hive.containsPermission(new FaultyPermission()));
  assertTrue(hive.containsPrincipal(new SimplePrincipal("String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPrincipal(new SimplePrincipal("String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str","String_Node_Str")));
  assertTrue(hive.containsPrincipal(new SimplePrincipal("String_Node_Str")));
  assertTrue(hive.containsPermission(new TestPermission("String_Node_Str")));
}