Program: 143790
Project: 143790
Buggy source:
public void propertyChange(PropertyChangeEvent evt){
  String name=evt.getPropertyName();
  if ("String_Node_Str".equals(name)) {
    final IRepository repository=(IRepository)evt.getNewValue();
    Action cmdnewsolution=actions.get("String_Node_Str");
    if (cmdnewsolution != null)     cmdnewsolution.setEnabled(repository != null);
    if (autoOpenSolutionSelectDialog) {
      final Action cmdopensolution=actions.get("String_Node_Str");
      if (cmdopensolution != null) {
        application.invokeLater(new Runnable(){
          public void run(){
            cmdopensolution.setEnabled(repository != null);
            if (repository != null) {
              try {
                if (repository.getRootObjectMetaDatasForType(IRepository.SOLUTIONS).length != 0) {
                  executeCmd((ICmd)cmdopensolution,null);
                }
              }
 catch (              Exception ex) {
                Debug.error(ex);
              }
            }
          }
        }
);
      }
    }
  }
 else   if ("String_Node_Str".equals(name)) {
    Solution solution=(Solution)evt.getNewValue();
    ableFormRelatedBrowseActions(solution != null);
    ableFormRelatedDataEditActions(solution != null);
    undoAction.setEnabled(solution != null);
    redoAction.setEnabled(solution != null);
    Action cmdclose=actions.get("String_Node_Str");
    if (cmdclose != null)     cmdclose.setEnabled(solution != null);
    Action cmdsolutionsettings=actions.get("String_Node_Str");
    if (cmdsolutionsettings != null)     cmdsolutionsettings.setEnabled(solution != null);
    if (solution != null && application.getFlattenedSolution().getForms(false).hasNext()) {
      ableFormRelatedActions(true);
    }
 else {
      ableDesignRelatedActions(application.getModeManager().getMode() == ModeManager.DESIGN_MODE && solution != null);
      ableFormRelatedActions(false);
    }
  }
 else   if ("String_Node_Str".equals(name)) {
    int oldmode=((Integer)evt.getOldValue()).intValue();
    if (oldmode == ModeManager.DESIGN_MODE) {
      ableDesignRelatedActions(false);
      if (undoManager != null)       undoManager.discardAllEdits();
    }
    Action menuselectaction=actions.get("String_Node_Str");
    int mode=((Integer)evt.getNewValue()).intValue();
switch (mode) {
case IModeManager.FIND_MODE:
      break;
case IModeManager.PREVIEW_MODE:
    break;
case ModeManager.DESIGN_MODE:
  ableDesignRelatedActions(true);
if (menuselectaction != null) menuselectaction.setEnabled(false);
break;
case IModeManager.EDIT_MODE:
default :
if (menuselectaction != null) menuselectaction.setEnabled(true);
}
ableFormRelatedFindActions(mode == IModeManager.FIND_MODE);
Action cmdfindmode=actions.get("String_Node_Str");
if (cmdfindmode != null) cmdfindmode.setEnabled(mode == IModeManager.EDIT_MODE);
if (mode == IModeManager.FIND_MODE) {
ableFormRelatedBrowseActions(false);
ableFormRelatedDataEditActions(true);
}
 else {
ableFormRelatedBrowseActions(mode == IModeManager.EDIT_MODE);
}
}
 else if ("String_Node_Str".equals(name)) {
ableFormRelatedActions(evt.getNewValue() != null);
ableDesignRelatedActions(evt.getNewValue() != null);
}
 else if ("String_Node_Str".equals(name)) {
String sUndoRedo=(String)evt.getOldValue();
Boolean bValue=(Boolean)evt.getNewValue();
Action menuUndoRedo=actions.get(sUndoRedo);
if (menuUndoRedo != null) menuUndoRedo.setEnabled(bValue.booleanValue());
}
}

Fixed version (ground truth):
public void propertyChange(PropertyChangeEvent evt){
  String name=evt.getPropertyName();
  if ("String_Node_Str".equals(name)) {
    final IRepository repository=(IRepository)evt.getNewValue();
    Action cmdnewsolution=actions.get("String_Node_Str");
    if (cmdnewsolution != null)     cmdnewsolution.setEnabled(repository != null);
    if (autoOpenSolutionSelectDialog) {
      final Action cmdopensolution=actions.get("String_Node_Str");
      if (cmdopensolution != null) {
        application.invokeLater(new Runnable(){
          public void run(){
            cmdopensolution.setEnabled(repository != null);
            if (repository != null) {
              try {
                if (repository.getRootObjectMetaDatasForType(IRepository.SOLUTIONS).length != 0 && application.getSolution() == null) {
                  executeCmd((ICmd)cmdopensolution,null);
                }
              }
 catch (              Exception ex) {
                Debug.error(ex);
              }
            }
          }
        }
);
      }
    }
  }
 else   if ("String_Node_Str".equals(name)) {
    Solution solution=(Solution)evt.getNewValue();
    ableFormRelatedBrowseActions(solution != null);
    ableFormRelatedDataEditActions(solution != null);
    undoAction.setEnabled(solution != null);
    redoAction.setEnabled(solution != null);
    Action cmdclose=actions.get("String_Node_Str");
    if (cmdclose != null)     cmdclose.setEnabled(solution != null);
    Action cmdsolutionsettings=actions.get("String_Node_Str");
    if (cmdsolutionsettings != null)     cmdsolutionsettings.setEnabled(solution != null);
    if (solution != null && application.getFlattenedSolution().getForms(false).hasNext()) {
      ableFormRelatedActions(true);
    }
 else {
      ableDesignRelatedActions(application.getModeManager().getMode() == ModeManager.DESIGN_MODE && solution != null);
      ableFormRelatedActions(false);
    }
  }
 else   if ("String_Node_Str".equals(name)) {
    int oldmode=((Integer)evt.getOldValue()).intValue();
    if (oldmode == ModeManager.DESIGN_MODE) {
      ableDesignRelatedActions(false);
      if (undoManager != null)       undoManager.discardAllEdits();
    }
    Action menuselectaction=actions.get("String_Node_Str");
    int mode=((Integer)evt.getNewValue()).intValue();
switch (mode) {
case IModeManager.FIND_MODE:
      break;
case IModeManager.PREVIEW_MODE:
    break;
case ModeManager.DESIGN_MODE:
  ableDesignRelatedActions(true);
if (menuselectaction != null) menuselectaction.setEnabled(false);
break;
case IModeManager.EDIT_MODE:
default :
if (menuselectaction != null) menuselectaction.setEnabled(true);
}
ableFormRelatedFindActions(mode == IModeManager.FIND_MODE);
Action cmdfindmode=actions.get("String_Node_Str");
if (cmdfindmode != null) cmdfindmode.setEnabled(mode == IModeManager.EDIT_MODE);
if (mode == IModeManager.FIND_MODE) {
ableFormRelatedBrowseActions(false);
ableFormRelatedDataEditActions(true);
}
 else {
ableFormRelatedBrowseActions(mode == IModeManager.EDIT_MODE);
}
}
 else if ("String_Node_Str".equals(name)) {
ableFormRelatedActions(evt.getNewValue() != null);
ableDesignRelatedActions(evt.getNewValue() != null);
}
 else if ("String_Node_Str".equals(name)) {
String sUndoRedo=(String)evt.getOldValue();
Boolean bValue=(Boolean)evt.getNewValue();
Action menuUndoRedo=actions.get(sUndoRedo);
if (menuUndoRedo != null) menuUndoRedo.setEnabled(bValue.booleanValue());
}
}