Program: 147676
Project: 147676
Buggy source:
public static void createItemRecord(final XtentisPort port,final Log log,final Shell ashell,final WSDataClusterPK dataClusterPk){
  if (port == null || dataClusterPk == null) {
    throw new IllegalArgumentException();
  }
  final Shell shell=ashell != null ? ashell : Display.getCurrent().getActiveShell();
  try {
    String xml="String_Node_Str";
    WSDataModelPKArray dataModelPKs=port.getDataModelPKs(new WSRegexDataModelPKs("String_Node_Str"));
    List<WSDataModelPK> dmPKs=dataModelPKs.getWsDataModelPKs();
    List<String> dataModels=new ArrayList<String>();
    if (dmPKs != null) {
      for (      WSDataModelPK pk : dmPKs) {
        if (!"String_Node_Str".equals(pk.getPk())) {
          dataModels.add(pk.getPk());
        }
      }
    }
    final DataContainerDOMViewDialog d=new DataContainerDOMViewDialog(shell,port,Util.parse(xml),dataModels,DOMViewDialog.SOURCE_VIEWER,null);
    d.addListener(new Listener(){
      public void handleEvent(      Event event){
        if (event.button == DOMViewDialog.BUTTON_SAVE) {
          try {
            WSPutItem putItem=new WSPutItem(dataClusterPk,d.getXML(),"String_Node_Str".equals(d.getDataModelName()) ? null : new WSDataModelPK(d.getDataModelName()),false);
            WSPutItemWithReport item=new WSPutItemWithReport(putItem,"String_Node_Str",d.isBeforeVerification());
            if (d.isTriggerProcess()) {
              port.putItemWithReport(item);
            }
 else {
              port.putItem(putItem);
            }
          }
 catch (          Exception e) {
            if (log != null) {
              log.error(e.getMessage(),e);
            }
            MessageDialog.openError(shell,Messages.DataClusterBrowserMainPage_100,Messages.bind(Messages.DataClusterBrowserMainPage_101,Util.formatErrorMessage(e.getLocalizedMessage())));
            return;
          }
        }
        d.close();
      }
    }
);
    d.setBlockOnOpen(true);
    d.open();
  }
 catch (  Exception e) {
    if (log != null) {
      log.error(e.getMessage(),e);
    }
    if (!Util.handleConnectionException(shell,e,null)) {
      MessageDialog.openError(shell,Messages._Error,Messages.bind(Messages.DataClusterBrowserMainPage_103,e.getLocalizedMessage()));
    }
  }
}

Fixed version (ground truth):
public static void createItemRecord(final XtentisPort port,final Shell ashell,final WSDataClusterPK dataClusterPk){
  if (port == null || dataClusterPk == null) {
    throw new IllegalArgumentException();
  }
  final Shell shell=ashell != null ? ashell : Display.getCurrent().getActiveShell();
  try {
    String xml="String_Node_Str";
    WSDataModelPKArray dataModelPKs=port.getDataModelPKs(new WSRegexDataModelPKs("String_Node_Str"));
    List<WSDataModelPK> dmPKs=dataModelPKs.getWsDataModelPKs();
    List<String> dataModels=new ArrayList<String>();
    if (dmPKs != null) {
      for (      WSDataModelPK pk : dmPKs) {
        if (!"String_Node_Str".equals(pk.getPk())) {
          dataModels.add(pk.getPk());
        }
      }
    }
    final DataContainerDOMViewDialog d=new DataContainerDOMViewDialog(shell,port,Util.parse(xml),dataModels,DOMViewDialog.SOURCE_VIEWER,null);
    d.addListener(new Listener(){
      public void handleEvent(      Event event){
        if (event.button == DOMViewDialog.BUTTON_SAVE) {
          try {
            WSPutItem putItem=new WSPutItem(dataClusterPk,d.getXML(),"String_Node_Str".equals(d.getDataModelName()) ? null : new WSDataModelPK(d.getDataModelName()),false);
            WSPutItemWithReport item=new WSPutItemWithReport(putItem,"String_Node_Str",d.isBeforeVerification());
            if (d.isTriggerProcess()) {
              port.putItemWithReport(item);
            }
 else {
              port.putItem(putItem);
            }
          }
 catch (          Exception e) {
            log.error(e.getMessage(),e);
            MessageDialog.openError(shell,Messages.DataClusterBrowserMainPage_100,Messages.bind(Messages.DataClusterBrowserMainPage_101,Util.formatErrorMessage(e.getLocalizedMessage())));
            return;
          }
        }
        d.close();
      }
    }
);
    d.setBlockOnOpen(true);
    d.open();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    if (!Util.handleConnectionException(shell,e,null)) {
      MessageDialog.openError(shell,Messages._Error,Messages.bind(Messages.DataClusterBrowserMainPage_103,e.getLocalizedMessage()));
    }
  }
}