Program: 135716
Project: 135716
Buggy source:
public static void init() throws IDMStoreException {
  logger.info("String_Node_Str");
  int waitingTime=5;
  while (AAAIDMLightModule.getStore() == null) {
    try {
      Thread.sleep(5000);
    }
 catch (    Exception err) {
      logger.error("String_Node_Str",err);
    }
    logger.info("String_Node_Str" + waitingTime + "String_Node_Str");
    waitingTime+=5;
    if (waitingTime >= 30)     break;
  }
  if (AAAIDMLightModule.getStore() == null) {
    logger.info("String_Node_Str");
    return;
  }
 else {
    logger.info("String_Node_Str");
  }
  IIDMStore store=AAAIDMLightModule.getStore();
  Domain defaultDomain=store.readDomain(IIDMStore.DEFAULT_DOMAIN);
  if (defaultDomain != null) {
    logger.info("String_Node_Str");
    return;
  }
  Domain domain=new Domain();
  User adminUser=new User();
  User userUser=new User();
  Role adminRole=new Role();
  Role userRole=new Role();
  domain.setEnabled(true);
  domain.setName(IIDMStore.DEFAULT_DOMAIN);
  domain.setDescription("String_Node_Str");
  domain=store.writeDomain(domain);
  adminUser.setEnabled(true);
  adminUser.setName("String_Node_Str");
  adminUser.setDomainid(domain.getDomainid());
  adminUser.setDescription("String_Node_Str");
  adminUser.setEmail("String_Node_Str");
  adminUser.setPassword("String_Node_Str");
  adminUser=store.writeUser(adminUser);
  userUser.setEnabled(true);
  userUser.setName("String_Node_Str");
  userUser.setDomainid(domain.getDomainid());
  userUser.setDescription("String_Node_Str");
  userUser.setEmail("String_Node_Str");
  userUser.setPassword("String_Node_Str");
  userUser=store.writeUser(userUser);
  adminRole.setName("String_Node_Str");
  adminRole.setDomainid(domain.getDomainid());
  adminRole.setDescription("String_Node_Str");
  adminRole=store.writeRole(adminRole);
  userRole.setName("String_Node_Str");
  userRole.setDomainid(domain.getDomainid());
  userRole.setDescription("String_Node_Str");
  userRole=store.writeRole(userRole);
  Grant grant=new Grant();
  grant.setDomainid(domain.getDomainid());
  grant.setUserid(userUser.getUserid());
  grant.setRoleid(userRole.getRoleid());
  grant=store.writeGrant(grant);
  grant.setDomainid(domain.getDomainid());
  grant.setUserid(adminUser.getUserid());
  grant.setRoleid(userRole.getRoleid());
  grant=store.writeGrant(grant);
  grant.setDomainid(domain.getDomainid());
  grant.setUserid(adminUser.getUserid());
  grant.setRoleid(adminRole.getRoleid());
  grant=store.writeGrant(grant);
}

Fixed version (ground truth):
public static void init() throws IDMStoreException {
  logger.info("String_Node_Str");
  IIDMStore store=AAAIDMLightModule.getStore();
  Domain defaultDomain=store.readDomain(IIDMStore.DEFAULT_DOMAIN);
  if (defaultDomain != null) {
    logger.info("String_Node_Str");
    return;
  }
  Domain domain=new Domain();
  User adminUser=new User();
  User userUser=new User();
  Role adminRole=new Role();
  Role userRole=new Role();
  domain.setEnabled(true);
  domain.setName(IIDMStore.DEFAULT_DOMAIN);
  domain.setDescription("String_Node_Str");
  domain=store.writeDomain(domain);
  adminUser.setEnabled(true);
  adminUser.setName("String_Node_Str");
  adminUser.setDomainid(domain.getDomainid());
  adminUser.setDescription("String_Node_Str");
  adminUser.setEmail("String_Node_Str");
  adminUser.setPassword("String_Node_Str");
  adminUser=store.writeUser(adminUser);
  userUser.setEnabled(true);
  userUser.setName("String_Node_Str");
  userUser.setDomainid(domain.getDomainid());
  userUser.setDescription("String_Node_Str");
  userUser.setEmail("String_Node_Str");
  userUser.setPassword("String_Node_Str");
  userUser=store.writeUser(userUser);
  adminRole.setName("String_Node_Str");
  adminRole.setDomainid(domain.getDomainid());
  adminRole.setDescription("String_Node_Str");
  adminRole=store.writeRole(adminRole);
  userRole.setName("String_Node_Str");
  userRole.setDomainid(domain.getDomainid());
  userRole.setDescription("String_Node_Str");
  userRole=store.writeRole(userRole);
  Grant grant=new Grant();
  grant.setDomainid(domain.getDomainid());
  grant.setUserid(userUser.getUserid());
  grant.setRoleid(userRole.getRoleid());
  grant=store.writeGrant(grant);
  grant.setDomainid(domain.getDomainid());
  grant.setUserid(adminUser.getUserid());
  grant.setRoleid(userRole.getRoleid());
  grant=store.writeGrant(grant);
  grant.setDomainid(domain.getDomainid());
  grant.setUserid(adminUser.getUserid());
  grant.setRoleid(adminRole.getRoleid());
  grant=store.writeGrant(grant);
}