Program: 136073
Project: 136073
Buggy source:
/** 
 */
public void validatePage(boolean switchToErrorPage){
  if (getManagedForm() == null) {
    return;
  }
  IMessageManager mm=getManagedForm().getMessageManager();
  mm.setAutoUpdate(false);
  mm.removeAllMessages();
  setComplete(true);
  getLookupHelper().resetModelNames(this);
  try {
    int dfidDepth=Integer.parseInt(dfidDepthText.getText());
    if (dfidDepth <= 0) {
      mm.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR,dfidDepthText);
      setComplete(false);
      expandSection(SEC_LAUNCHING_SETUP);
    }
  }
 catch (  NumberFormatException e) {
    mm.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR,dfidDepthText);
    setComplete(false);
    expandSection(SEC_LAUNCHING_SETUP);
  }
  try {
    int simuDepth=Integer.parseInt(simuDepthText.getText());
    if (simuDepth <= 0) {
      mm.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR,simuDepthText);
      setComplete(false);
      expandSection(SEC_LAUNCHING_SETUP);
    }
  }
 catch (  NumberFormatException e) {
    mm.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR,simuDepthText);
    setComplete(false);
    expandSection(SEC_LAUNCHING_SETUP);
  }
  if (!EMPTY_STRING.equals(simuArilText.getText())) {
    try {
      long simuAril=Long.parseLong(simuArilText.getText());
      if (simuAril <= 0) {
        mm.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR,simuArilText);
        setComplete(false);
      }
    }
 catch (    NumberFormatException e) {
      mm.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR,simuArilText);
      setComplete(false);
      expandSection(SEC_LAUNCHING_SETUP);
    }
  }
  if (!EMPTY_STRING.equals(simuSeedText.getText())) {
    try {
      Long.parseLong(simuSeedText.getText());
    }
 catch (    NumberFormatException e) {
      mm.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR,simuSeedText);
      expandSection(SEC_LAUNCHING_SETUP);
      setComplete(false);
    }
  }
  DataBindingManager dm=getDataBindingManager();
  TypedSet modelValuesSet=TypedSet.parseSet(FormHelper.trimTrailingSpaces(modelValuesSource.getDocument().get()));
  if (modelValuesSet.getValueCount() > 0) {
    List values=modelValuesSet.getValuesAsList();
    validateUsage(MODEL_PARAMETER_MODEL_VALUES,values,"String_Node_Str","String_Node_Str","String_Node_Str",true);
    validateId(MODEL_PARAMETER_MODEL_VALUES,values,"String_Node_Str","String_Node_Str");
    Control widget=UIHelper.getWidget(dm.getAttributeControl(MODEL_PARAMETER_MODEL_VALUES));
    for (int j=0; j < values.size(); j++) {
      String value=(String)values.get(j);
      if (SemanticHelper.isConfigFileKeyword(value)) {
        mm.addMessage(value,"String_Node_Str" + value + "String_Node_Str",null,IMessageProvider.ERROR,widget);
      }
    }
  }
  List definitions=(List)definitionsTable.getInput();
  for (int i=0; i < definitions.size(); i++) {
    Assignment definition=(Assignment)definitions.get(i);
    List values=Arrays.asList(definition.getParams());
    validateUsage(MODEL_PARAMETER_DEFINITIONS,values,"String_Node_Str","String_Node_Str","String_Node_Str",false);
    validateId(MODEL_PARAMETER_DEFINITIONS,values,"String_Node_Str","String_Node_Str");
  }
  Control widget=UIHelper.getWidget(dm.getAttributeControl(MODEL_PARAMETER_DEFINITIONS));
  for (int j=0; j < definitions.size(); j++) {
    Assignment definition=(Assignment)definitions.get(j);
    String label=definition.getLabel();
    if (SemanticHelper.isConfigFileKeyword(label)) {
      mm.addMessage(label,"String_Node_Str" + label + "String_Node_Str",null,IMessageProvider.ERROR,widget);
    }
  }
  mm.setAutoUpdate(true);
  super.validatePage(switchToErrorPage);
}

Fixed version (ground truth):
/** 
 */
public void validatePage(boolean switchToErrorPage){
  if (getManagedForm() == null) {
    return;
  }
  IMessageManager mm=getManagedForm().getMessageManager();
  mm.setAutoUpdate(false);
  mm.removeAllMessages();
  setComplete(true);
  getLookupHelper().resetModelNames(this);
  try {
    int dfidDepth=Integer.parseInt(dfidDepthText.getText());
    if (dfidDepth <= 0) {
      mm.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR,dfidDepthText);
      setComplete(false);
      expandSection(SEC_LAUNCHING_SETUP);
    }
  }
 catch (  NumberFormatException e) {
    mm.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR,dfidDepthText);
    setComplete(false);
    expandSection(SEC_LAUNCHING_SETUP);
  }
  try {
    int simuDepth=Integer.parseInt(simuDepthText.getText());
    if (simuDepth <= 0) {
      mm.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR,simuDepthText);
      setComplete(false);
      expandSection(SEC_LAUNCHING_SETUP);
    }
  }
 catch (  NumberFormatException e) {
    mm.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR,simuDepthText);
    setComplete(false);
    expandSection(SEC_LAUNCHING_SETUP);
  }
  if (!EMPTY_STRING.equals(simuArilText.getText())) {
    try {
      long simuAril=Long.parseLong(simuArilText.getText());
      if (simuAril <= 0) {
        mm.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR,simuArilText);
        setComplete(false);
      }
    }
 catch (    NumberFormatException e) {
      mm.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR,simuArilText);
      setComplete(false);
      expandSection(SEC_LAUNCHING_SETUP);
    }
  }
  if (!EMPTY_STRING.equals(simuSeedText.getText())) {
    try {
      Long.parseLong(simuSeedText.getText());
    }
 catch (    NumberFormatException e) {
      mm.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR,simuSeedText);
      expandSection(SEC_LAUNCHING_SETUP);
      setComplete(false);
    }
  }
  DataBindingManager dm=getDataBindingManager();
  TypedSet modelValuesSet=TypedSet.parseSet(FormHelper.trimTrailingSpaces(modelValuesSource.getDocument().get()));
  if (modelValuesSet.getValueCount() > 0) {
    List values=modelValuesSet.getValuesAsList();
    validateUsage(MODEL_PARAMETER_MODEL_VALUES,values,"String_Node_Str","String_Node_Str","String_Node_Str",true);
    validateId(MODEL_PARAMETER_MODEL_VALUES,values,"String_Node_Str","String_Node_Str");
    Control widget=UIHelper.getWidget(dm.getAttributeControl(MODEL_PARAMETER_MODEL_VALUES));
    for (int j=0; j < values.size(); j++) {
      String value=(String)values.get(j);
      if (SemanticHelper.isConfigFileKeyword(value)) {
        mm.addMessage(value,"String_Node_Str" + value + "String_Node_Str",null,IMessageProvider.ERROR,widget);
      }
    }
  }
  SpecObj specObj=ToolboxHandle.getCurrentSpec().getValidRootModule();
  OpDefNode[] opDefNodes=specObj.getExternalModuleTable().getRootModule().getOpDefs();
  Hashtable nodeTable=new Hashtable(opDefNodes.length);
  for (int j=0; j < opDefNodes.length; j++) {
    String key=opDefNodes[j].getName().toString();
    nodeTable.put(key,opDefNodes[j]);
  }
  Control widget=UIHelper.getWidget(dm.getAttributeControl(MODEL_PARAMETER_DEFINITIONS));
  List definitions=(List)definitionsTable.getInput();
  for (int i=0; i < definitions.size(); i++) {
    Assignment definition=(Assignment)definitions.get(i);
    List values=Arrays.asList(definition.getParams());
    validateUsage(MODEL_PARAMETER_DEFINITIONS,values,"String_Node_Str","String_Node_Str","String_Node_Str",false);
    validateId(MODEL_PARAMETER_DEFINITIONS,values,"String_Node_Str","String_Node_Str");
    if (!nodeTable.containsKey(definition.getLabel())) {
      mm.addMessage(definition.getLabel(),"String_Node_Str" + definition.getLabel().substring(definition.getLabel().lastIndexOf("String_Node_Str") + 1) + "String_Node_Str"+ "String_Node_Str",null,IMessageProvider.ERROR,widget);
    }
 else {
      OpDefNode opDefNode=(OpDefNode)nodeTable.get(definition.getLabel());
      if (opDefNode.getSource().getNumberOfArgs() != definition.getParams().length) {
        mm.addMessage(definition.getLabel(),"String_Node_Str" + opDefNode.getSource().getName() + "String_Node_Str",null,IMessageProvider.ERROR,widget);
      }
    }
  }
  for (int j=0; j < definitions.size(); j++) {
    Assignment definition=(Assignment)definitions.get(j);
    String label=definition.getLabel();
    if (SemanticHelper.isConfigFileKeyword(label)) {
      mm.addMessage(label,"String_Node_Str" + label + "String_Node_Str",null,IMessageProvider.ERROR,widget);
    }
  }
  mm.setAutoUpdate(true);
  super.validatePage(switchToErrorPage);
}