Program: 143435
Project: 143435
Buggy source:
/** 
 * this is a full recreate ui.
 * @param formController
 * @param dal
 * @return
 * @throws RepositoryException
 */
public final void init(){
  components.clear();
  IDataAdapterList previousDataAdapterList=dataAdapterList;
  dataAdapterList=new DataAdapterList(formController);
  ElementScope elementsScope=initElementScope(formController);
  List<FormElement> formElements=getFormElements();
  int counter=0;
  for (  FormElement fe : formElements) {
    WebComponentSpecification componentSpec=fe.getWebComponentSpec(false);
    if (componentSpec == null) {
      getApplication().reportError("String_Node_Str" + fe + "String_Node_Str"+ formController.getName(),null);
      continue;
    }
    WebFormComponent component=ComponentFactory.createComponent(getApplication(),dataAdapterList,fe,this);
    if (component != null) {
      counter=contributeComponentToElementsScope(elementsScope,counter,fe,componentSpec,component);
    }
  }
  DefaultNavigatorWebComponent nav=(DefaultNavigatorWebComponent)components.get(DefaultNavigator.NAME_PROP_VALUE);
  if (nav != null) {
    nav.newFoundset(null);
  }
  if (formController.getForm().getNavigatorID() == Form.NAVIGATOR_DEFAULT) {
    add(new DefaultNavigatorWebComponent(dataAdapterList));
  }
  if (previousDataAdapterList != null) {
    IRecordInternal record=((DataAdapterList)previousDataAdapterList).getRecord();
    if (record != null) {
      dataAdapterList.setRecord(record,false);
      previousDataAdapterList.setRecord(null,false);
      nav=(DefaultNavigatorWebComponent)components.get(DefaultNavigator.NAME_PROP_VALUE);
      if (nav != null)       nav.newFoundset(record.getParentFoundSet());
    }
  }
}

Fixed version (ground truth):
/** 
 * this is a full recreate ui.
 * @param formController
 * @param dal
 * @return
 * @throws RepositoryException
 */
public void init(){
  components.clear();
  IDataAdapterList previousDataAdapterList=dataAdapterList;
  dataAdapterList=new DataAdapterList(formController);
  ElementScope elementsScope=initElementScope(formController);
  List<FormElement> formElements=getFormElements();
  int counter=0;
  for (  FormElement fe : formElements) {
    WebComponentSpecification componentSpec=fe.getWebComponentSpec(false);
    if (componentSpec == null) {
      getApplication().reportError("String_Node_Str" + fe + "String_Node_Str"+ formController.getName(),null);
      continue;
    }
    WebFormComponent component=ComponentFactory.createComponent(getApplication(),dataAdapterList,fe,this);
    if (component != null) {
      counter=contributeComponentToElementsScope(elementsScope,counter,fe,componentSpec,component);
    }
  }
  DefaultNavigatorWebComponent nav=(DefaultNavigatorWebComponent)components.get(DefaultNavigator.NAME_PROP_VALUE);
  if (nav != null) {
    nav.newFoundset(null);
  }
  if (formController.getForm().getNavigatorID() == Form.NAVIGATOR_DEFAULT) {
    add(new DefaultNavigatorWebComponent(dataAdapterList));
  }
  if (previousDataAdapterList != null) {
    IRecordInternal record=((DataAdapterList)previousDataAdapterList).getRecord();
    if (record != null) {
      dataAdapterList.setRecord(record,false);
      previousDataAdapterList.setRecord(null,false);
      nav=(DefaultNavigatorWebComponent)components.get(DefaultNavigator.NAME_PROP_VALUE);
      if (nav != null)       nav.newFoundset(record.getParentFoundSet());
    }
  }
}