Program: 148650
Project: 148650
Buggy source:
protected void refreshData(){
  try {
    if (conceptCombo.isDisposed())     return;
    XtentisPort port=Util.getPort(getXObject());
    WSDataCluster cluster=null;
    if (getXObject().getWsObject() == null) {
      cluster=port.getDataCluster(new WSGetDataCluster((WSDataClusterPK)getXObject().getWsKey()));
      getXObject().setWsObject(cluster);
    }
 else {
      cluster=(WSDataCluster)getXObject().getWsObject();
    }
    WSUniverse currentUniverse=port.getCurrentUniverse(new WSGetCurrentUniverse());
    String currentUniverseName="String_Node_Str";
    if (currentUniverse != null)     currentUniverseName=currentUniverse.getName();
    if (currentUniverseName != null && currentUniverseName.equals("String_Node_Str"))     currentUniverseName="String_Node_Str";
    String[] concepts;
    String query="String_Node_Str" + cluster.getName() + "String_Node_Str";
    WSStringArray array=port.runQuery(new WSRunQuery(null,new WSDataClusterPK(cluster.getName()),query,null));
    long count=Long.valueOf(array.getStrings()[0]);
    if (count > 100000) {
      DataModelSelectDialog dialog=new DataModelSelectDialog(getSite().getShell());
      dialog.setBlockOnOpen(true);
      dialog.open();
      if (dialog.getReturnCode() == Window.OK) {
        String xpath=dialog.getXpath();
        WSDataModel dm=Util.getPort(this.getXObject()).getDataModel(new WSGetDataModel(new WSDataModelPK(xpath)));
        if (dm == null)         return;
        concepts=new String[Util.getConcepts(Util.getXSDSchema(dm.getXsdSchema())).size()];
        Util.getConcepts(Util.getXSDSchema(dm.getXsdSchema())).toArray(concepts);
        TreeObject object=null;
        for (int i=0; i < this.getXObject().getServerRoot().getChildren().length; i++) {
          object=this.getXObject().getServerRoot().getChildren()[i];
          if (object.getType() == TreeObject.DATA_MODEL)           break;
        }
        String revision="String_Node_Str";
        if (object != null)         revision=object.getDisplayName().substring(object.getDisplayName().indexOf("String_Node_Str") + 1,object.getDisplayName().indexOf("String_Node_Str"));
        for (int i=0; i < concepts.length; i++) {
          String concept=concepts[i];
          if (revision == null || revision.equals("String_Node_Str"))           revision="String_Node_Str";
          concepts[i]=concept + "String_Node_Str" + "String_Node_Str"+ revision+ "String_Node_Str";
        }
        conceptCombo.removeAll();
        conceptCombo.add("String_Node_Str");
        for (int i=0; i < concepts.length; i++)         conceptCombo.add(concepts[i]);
      }
    }
 else {
      WSConceptRevisionMapMapEntry[] wsConceptRevisionMapMapEntries=port.getConceptsInDataClusterWithRevisions(new WSGetConceptsInDataClusterWithRevisions(new WSDataClusterPK(cluster.getName()),new WSUniversePK(currentUniverseName))).getMapEntry();
      long afterTime1=System.currentTimeMillis();
      concepts=new String[wsConceptRevisionMapMapEntries.length];
      for (int i=0; i < wsConceptRevisionMapMapEntries.length; i++) {
        WSConceptRevisionMapMapEntry entry=wsConceptRevisionMapMapEntries[i];
        String concept=entry.getConcept();
        String revision=entry.getRevision();
        if (revision == null || revision.equals("String_Node_Str"))         revision="String_Node_Str";
        concepts[i]=concept + "String_Node_Str" + "String_Node_Str"+ revision+ "String_Node_Str";
      }
      conceptCombo.removeAll();
      conceptCombo.add("String_Node_Str");
      for (int i=0; i < concepts.length; i++) {
        conceptCombo.add(concepts[i]);
      }
    }
    conceptCombo.select(0);
    searchText.setFocus();
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(this.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
protected void refreshData(){
  try {
    if (conceptCombo.isDisposed())     return;
    XtentisPort port=Util.getPort(getXObject());
    WSDataCluster cluster=null;
    if (getXObject().getWsObject() == null) {
      cluster=port.getDataCluster(new WSGetDataCluster((WSDataClusterPK)getXObject().getWsKey()));
      getXObject().setWsObject(cluster);
    }
 else {
      cluster=(WSDataCluster)getXObject().getWsObject();
    }
    WSUniverse currentUniverse=port.getCurrentUniverse(new WSGetCurrentUniverse());
    String currentUniverseName="String_Node_Str";
    if (currentUniverse != null)     currentUniverseName=currentUniverse.getName();
    if (currentUniverseName != null && currentUniverseName.equals("String_Node_Str"))     currentUniverseName="String_Node_Str";
    String[] concepts;
    String clusterName=URLEncoder.encode(cluster.getName(),"String_Node_Str");
    String query="String_Node_Str" + clusterName + "String_Node_Str";
    WSStringArray array=port.runQuery(new WSRunQuery(null,new WSDataClusterPK(clusterName),query,null));
    long count=Long.valueOf(array.getStrings()[0]);
    if (count > 100000) {
      DataModelSelectDialog dialog=new DataModelSelectDialog(getSite().getShell());
      dialog.setBlockOnOpen(true);
      dialog.open();
      if (dialog.getReturnCode() == Window.OK) {
        String xpath=dialog.getXpath();
        WSDataModel dm=Util.getPort(this.getXObject()).getDataModel(new WSGetDataModel(new WSDataModelPK(xpath)));
        if (dm == null)         return;
        concepts=new String[Util.getConcepts(Util.getXSDSchema(dm.getXsdSchema())).size()];
        Util.getConcepts(Util.getXSDSchema(dm.getXsdSchema())).toArray(concepts);
        TreeObject object=null;
        for (int i=0; i < this.getXObject().getServerRoot().getChildren().length; i++) {
          object=this.getXObject().getServerRoot().getChildren()[i];
          if (object.getType() == TreeObject.DATA_MODEL)           break;
        }
        String revision="String_Node_Str";
        if (object != null)         revision=object.getDisplayName().substring(object.getDisplayName().indexOf("String_Node_Str") + 1,object.getDisplayName().indexOf("String_Node_Str"));
        for (int i=0; i < concepts.length; i++) {
          String concept=concepts[i];
          if (revision == null || revision.equals("String_Node_Str"))           revision="String_Node_Str";
          concepts[i]=concept + "String_Node_Str" + "String_Node_Str"+ revision+ "String_Node_Str";
        }
        conceptCombo.removeAll();
        conceptCombo.add("String_Node_Str");
        for (int i=0; i < concepts.length; i++)         conceptCombo.add(concepts[i]);
      }
    }
 else {
      WSConceptRevisionMapMapEntry[] wsConceptRevisionMapMapEntries=port.getConceptsInDataClusterWithRevisions(new WSGetConceptsInDataClusterWithRevisions(new WSDataClusterPK(clusterName),new WSUniversePK(currentUniverseName))).getMapEntry();
      long afterTime1=System.currentTimeMillis();
      concepts=new String[wsConceptRevisionMapMapEntries.length];
      for (int i=0; i < wsConceptRevisionMapMapEntries.length; i++) {
        WSConceptRevisionMapMapEntry entry=wsConceptRevisionMapMapEntries[i];
        String concept=entry.getConcept();
        String revision=entry.getRevision();
        if (revision == null || revision.equals("String_Node_Str"))         revision="String_Node_Str";
        concepts[i]=concept + "String_Node_Str" + "String_Node_Str"+ revision+ "String_Node_Str";
      }
      conceptCombo.removeAll();
      conceptCombo.add("String_Node_Str");
      for (int i=0; i < concepts.length; i++) {
        conceptCombo.add(concepts[i]);
      }
    }
    conceptCombo.select(0);
    searchText.setFocus();
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(this.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}