Program: 9944
Project: 9944
Buggy source:
private void init() throws Exception {
  ProducerConfiguration configuration=configService.getConfiguration();
  ProducerRegistrationRequirements registrationRequirements=configuration.getRegistrationRequirements();
  getUIFormCheckBoxInput(REG_REQUIRED_FOR_DESCRIPTION).setValue(registrationRequirements.isRegistrationRequiredForFullDescription());
  getUIFormCheckBoxInput(STRICT_MODE).setValue(configuration.isUsingStrictMode());
  boolean registrationRequired=registrationRequirements.isRegistrationRequired();
  getUIFormCheckBoxInput(REQUIRES_REGISTRATION).setValue(registrationRequired);
  if (registrationDetails != null) {
    removeChild(registrationDetails.getClass());
  }
  if (registrationRequired) {
    registrationDetails=new UIWSRPFormInputSet(REGISTRATION_DETAILS);
    UIFormInputBase<String> policyInput=new UIFormStringInput(POLICY_CLASS,POLICY_CLASS,null);
    addUIFormInput(policyInput);
    RegistrationPolicy policy=registrationRequirements.getPolicy();
    String policyClassName=policy.getClass().getName();
    policyInput.setValue(policyClassName);
    if (ProducerRegistrationRequirements.DEFAULT_POLICY_CLASS_NAME.equals(policyClassName)) {
      UIFormInputBase<String> validatorInput=new UIFormStringInput(VALIDATOR_CLASS,VALIDATOR_CLASS,null);
      registrationDetails.addUIFormInput(validatorInput);
      DefaultRegistrationPolicy defaultPolicy=(DefaultRegistrationPolicy)policy;
      validatorInput.setValue(defaultPolicy.getValidator().getClass().getName());
    }
    Map<QName,RegistrationPropertyDescription> regProps=configuration.getRegistrationRequirements().getRegistrationProperties();
    UIGrid uiGrid=registrationDetails.addChild(UIGrid.class,"String_Node_Str",null);
    uiGrid.configure("String_Node_Str",FIELDS,SELECT_ACTIONS);
    uiGrid.getUIPageIterator().setId("String_Node_Str");
    addChild(uiGrid.getUIPageIterator());
    uiGrid.getUIPageIterator().setRendered(false);
    LazyPageList propertyList=createPageList(getPropertyList(regProps));
    uiGrid.getUIPageIterator().setPageList(propertyList);
    addUIFormInput(registrationDetails);
    registrationDetails.setRendered(true);
  }
}

Fixed version (ground truth):
private void init() throws Exception {
  ProducerConfiguration configuration=configService.getConfiguration();
  ProducerRegistrationRequirements registrationRequirements=configuration.getRegistrationRequirements();
  regReqForDesc.setValue(registrationRequirements.isRegistrationRequiredForFullDescription());
  strictMode.setValue(configuration.isUsingStrictMode());
  boolean registrationRequired=registrationRequirements.isRegistrationRequired();
  regRequired.setValue(registrationRequired);
  if (registrationRequired) {
    registrationDetails.setRendered(true);
    RegistrationPolicy policy=registrationRequirements.getPolicy();
    String policyClassName=policy.getClass().getName();
    this.policy.setValue(policyClassName);
    if (ProducerRegistrationRequirements.DEFAULT_POLICY_CLASS_NAME.equals(policyClassName)) {
      DefaultRegistrationPolicy defaultPolicy=(DefaultRegistrationPolicy)policy;
      validator.setValue(defaultPolicy.getValidator().getClass().getName());
      validator.setRendered(true);
    }
 else {
      validator.setRendered(false);
    }
    Map<QName,RegistrationPropertyDescription> regProps=configuration.getRegistrationRequirements().getRegistrationProperties();
    registrationProperties.getUIPageIterator().setPageList(createPageList(getPropertyList(regProps)));
  }
 else {
    registrationDetails.setRendered(false);
  }
}