Program: 146158
Project: 146158
Buggy source:
public void doSave(IProgressMonitor monitor){
  super.doSave(monitor);
  if (this.viewName != null && this.viewName.length() > 0) {
    if (viewName.matches("String_Node_Str")) {
      String concept=viewName.replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
      if (concept != null && concept.length() > 0 && lastDataModelName != null && lastDataModelName.length() > 0) {
        java.util.List<String> toAddViewableList=new ArrayList<String>();
        WSGetBusinessConceptKey wsGetBusinessConceptKey=new WSGetBusinessConceptKey(new WSDataModelPK(lastDataModelName),concept);
        WSConceptKey wsConceptKey=null;
        try {
          wsConceptKey=Util.getPort(getXObject()).getBusinessConceptKey(wsGetBusinessConceptKey);
        }
 catch (        RemoteException e) {
          e.printStackTrace();
        }
catch (        XtentisException e) {
          e.printStackTrace();
        }
        if (wsConceptKey != null) {
          java.util.List<String> viewableList=new ArrayList<String>();
          for (int i=0; i < viewableBEsList.getItemCount(); i++) {
            viewableList.add(viewableBEsList.getItem(i));
          }
          String[] keys=wsConceptKey.getFields();
          for (int i=0; i < keys.length; i++) {
            if ("String_Node_Str".equals(wsConceptKey.getSelector()))             keys[i]="String_Node_Str" + concept + "String_Node_Str"+ keys[i];
 else             keys[i]=wsConceptKey.getSelector() + keys[i];
          }
          String[] ids=wsConceptKey.getFields();
          for (int i=0; i < ids.length; i++) {
            if (!viewableList.contains(ids[i])) {
              toAddViewableList.add(ids[i]);
            }
          }
        }
        if (toAddViewableList.size() > 0) {
          String msg="String_Node_Str";
          for (Iterator iterator=toAddViewableList.iterator(); iterator.hasNext(); ) {
            String toAddItem=(String)iterator.next();
            msg+=(toAddItem + "String_Node_Str");
          }
          msg+="String_Node_Str";
          MessageDialog.openInformation(this.getSite().getShell(),"String_Node_Str",msg);
        }
        IRunnableWithProgress autoFixProcess=new AutoFixProgress(toAddViewableList,viewableBEsList,this.getSite().getShell());
        try {
          new ProgressMonitorDialog(this.getSite().getShell()).run(false,true,autoFixProcess);
        }
 catch (        InvocationTargetException e) {
          e.printStackTrace();
        }
catch (        InterruptedException e) {
          e.printStackTrace();
        }
      }
    }
  }
}

Fixed version (ground truth):
public void doSave(IProgressMonitor monitor){
  super.doSave(monitor);
  if (this.viewName != null && this.viewName.length() > 0) {
    if (viewName.matches("String_Node_Str")) {
      String concept=viewName.replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
      if (concept != null && concept.length() > 0 && lastDataModelName != null && lastDataModelName.length() > 0) {
        java.util.List<String> toAddViewableList=new ArrayList<String>();
        WSGetBusinessConceptKey wsGetBusinessConceptKey=new WSGetBusinessConceptKey(new WSDataModelPK(lastDataModelName),concept);
        WSConceptKey wsConceptKey=null;
        try {
          wsConceptKey=Util.getPort(getXObject()).getBusinessConceptKey(wsGetBusinessConceptKey);
        }
 catch (        RemoteException e) {
          e.printStackTrace();
        }
catch (        XtentisException e) {
          e.printStackTrace();
        }
        if (wsConceptKey != null) {
          java.util.List<String> viewableList=new ArrayList<String>();
          for (int i=0; i < viewableBEsList.getItemCount(); i++) {
            viewableList.add(viewableBEsList.getItem(i));
          }
          String[] keys=wsConceptKey.getFields();
          for (int i=0; i < keys.length; i++) {
            if ("String_Node_Str".equals(wsConceptKey.getSelector()))             keys[i]="String_Node_Str" + concept + "String_Node_Str"+ keys[i];
 else             keys[i]=wsConceptKey.getSelector() + keys[i];
          }
          String[] ids=wsConceptKey.getFields();
          for (int i=0; i < ids.length; i++) {
            String id=ids[i];
            if (id.startsWith("String_Node_Str")) {
              id=id.substring(1);
            }
 else             if (id.startsWith("String_Node_Str")) {
              id=id.substring(2);
            }
            if (!viewableList.contains(id)) {
              toAddViewableList.add(id);
            }
          }
        }
        if (toAddViewableList.size() > 0) {
          String msg="String_Node_Str";
          for (Iterator iterator=toAddViewableList.iterator(); iterator.hasNext(); ) {
            String toAddItem=(String)iterator.next();
            msg+=(toAddItem + "String_Node_Str");
          }
          msg+="String_Node_Str";
          MessageDialog.openInformation(this.getSite().getShell(),"String_Node_Str",msg);
        }
        IRunnableWithProgress autoFixProcess=new AutoFixProgress(toAddViewableList,viewableBEsList,this.getSite().getShell());
        try {
          new ProgressMonitorDialog(this.getSite().getShell()).run(false,true,autoFixProcess);
        }
 catch (        InvocationTargetException e) {
          e.printStackTrace();
        }
catch (        InterruptedException e) {
          e.printStackTrace();
        }
      }
    }
  }
}