Program: 189073
Project: 189073
Buggy source:
@BeforeClass public static void setupTests(){
  ModelManager mManager=Factory.getModelManager();
  fSet=mManager.buildFeatureSet().setReference(mManager.buildReference().setName("String_Node_Str").build()).build();
  Set<Feature> testFeatures=new HashSet<Feature>();
  f1=mManager.buildFeature().setStart(1000000).setStop(1000100).build();
  testFeatures.add(f1);
  fSet.add(testFeatures);
  tSet1=mManager.buildTagSet().setName("String_Node_Str").build();
  rSet=mManager.buildReferenceSet().setName("String_Node_Str").setOrganism("String_Node_Str").build();
  aSet=mManager.buildAnalysisSet().setName("String_Node_Str").setDescription("String_Node_Str").build();
  r1=mManager.buildReference().setName("String_Node_Str").build();
  rSet.add(r1);
  group=mManager.buildGroup().setName("String_Node_Str").setDescription("String_Node_Str").build();
  viewerGroup=mManager.buildGroup().setName("String_Node_Str").setDescription("String_Node_Str").build();
  marshmallowUser=mManager.buildUser().setFirstName("String_Node_Str").setLastName("String_Node_Str").setEmailAddress("String_Node_Str").setPassword("String_Node_Str").build();
  titanicUser=mManager.buildUser().setFirstName("String_Node_Str").setLastName("String_Node_Str").setEmailAddress("String_Node_Str").setPassword("String_Node_Str").build();
  group.add(marshmallowUser);
  viewerGroup.add(titanicUser);
  fSet.setPermissions(fSet.getPermissions().toBuilder().setOwner(marshmallowUser).build());
  tSet1.setPermissions(tSet1.getPermissions().toBuilder().setOwner(marshmallowUser).setGroup(group).build());
  rSet.setPermissions(rSet.getPermissions().toBuilder().setGroup(group).build());
  mManager.flush();
  fSet.setPermissions(fSet.getPermissions().toBuilder().setOwner(titanicUser).setRights(new boolean[]{false,false,false,false,false,false}).build());
  mManager.flush();
  fSet.setPermissions(fSet.getPermissions().toBuilder().setOwner(marshmallowUser).setRights(new boolean[]{true,true,true,true,true,true}).build());
  mManager.close();
}

Fixed version (ground truth):
@BeforeClass public static void setupTests(){
  ModelManager mManager=Factory.getModelManager();
  fSet=mManager.buildFeatureSet().setReference(mManager.buildReference().setName("String_Node_Str").build()).build();
  Set<Feature> testFeatures=new HashSet<Feature>();
  f1=mManager.buildFeature().setStart(1000000).setStop(1000100).build();
  testFeatures.add(f1);
  fSet.add(testFeatures);
  tSet1=mManager.buildTagSet().setName("String_Node_Str").build();
  rSet=mManager.buildReferenceSet().setName("String_Node_Str").setOrganism("String_Node_Str").build();
  aSet=mManager.buildAnalysisSet().setName("String_Node_Str").setDescription("String_Node_Str").build();
  r1=mManager.buildReference().setName("String_Node_Str").build();
  rSet.add(r1);
  group=mManager.buildGroup().setName("String_Node_Str").setDescription("String_Node_Str").build();
  viewerGroup=mManager.buildGroup().setName("String_Node_Str").setDescription("String_Node_Str").build();
  marshmallowUser=mManager.buildUser().setFirstName("String_Node_Str").setLastName("String_Node_Str").setEmailAddress("String_Node_Str").setPassword("String_Node_Str").build();
  titanicUser=mManager.buildUser().setFirstName("String_Node_Str").setLastName("String_Node_Str").setEmailAddress("String_Node_Str").setPassword("String_Node_Str").build();
  a1=mManager.buildAnalysis().setParameters(new ArrayList()).setPlugin(new InMemoryFeaturesAllPlugin()).build();
  group.add(marshmallowUser);
  viewerGroup.add(titanicUser);
  fSet.setPermissions(fSet.getPermissions().toBuilder().setOwner(marshmallowUser).build());
  tSet1.setPermissions(tSet1.getPermissions().toBuilder().setOwner(marshmallowUser).setGroup(group).build());
  rSet.setPermissions(rSet.getPermissions().toBuilder().setGroup(group).build());
  mManager.flush();
  fSet.setPermissions(fSet.getPermissions().toBuilder().setOwner(titanicUser).setRights(new boolean[]{false,false,false,false,false,false}).build());
  mManager.flush();
  fSet.setPermissions(fSet.getPermissions().toBuilder().setOwner(marshmallowUser).setRights(new boolean[]{true,true,true,true,true,true}).build());
  mManager.close();
}