nus-yam/ex-repair huggingface dataset:
Program: 65349
Project: 65349
Buggy source:
/** 
 * @see GraphicalEditor#createPartControl(Composite)
 */
public void createPartControl(Composite parent){
}

Fixed version (ground truth):
/** 
 * @see GraphicalEditor#createPartControl(Composite)
 */
public void createPartControl(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout(1,false);
  layout.marginHeight=0;
  layout.marginWidth=0;
  layout.horizontalSpacing=0;
  layout.verticalSpacing=0;
  composite.setLayout(layout);
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  fBreadcrumbComposite=new Composite(composite,SWT.NONE);
  GridData layoutData=new GridData(SWT.FILL,SWT.TOP,true,false);
  fBreadcrumbComposite.setLayoutData(layoutData);
  layout=new GridLayout(1,false);
  layout.marginHeight=0;
  layout.marginWidth=0;
  layout.horizontalSpacing=0;
  layout.verticalSpacing=0;
  layoutData.exclude=true;
  fBreadcrumbComposite.setLayout(layout);
  splitter=new FlyoutPaletteComposite(composite,SWT.NONE,getSite().getPage(),getPaletteViewerProvider(),getPalettePreferences());
  super.createPartControl(splitter);
  splitter.setLayoutData(new GridData(GridData.FILL_BOTH));
  Control ctrl=getGraphicalControl();
  splitter.setGraphicalControl(ctrl);
  if (page != null) {
    splitter.setExternalViewer(page.getPaletteViewer());
    page=null;
  }
  fBreadcrumb=createBreadcrumb();
  fBreadcrumb.setMenuManager(new SchematicContextMenuProvider(getGraphicalViewer(),getActionRegistry()));
  fIsBreadcrumbVisible=isBreadcrumbShown();
  if (fIsBreadcrumbVisible)   showBreadcrumb();
  getPreferenceStore().addPropertyChangeListener(this);
  registerExtensionPreference(IExtensionConstants.ATTRIBUTE_EDITOR_SHOW_IN_DESIGNER_BY_PREFERENCE);
  getSite().getShell().addShellListener(shellActiveListener);
  lastActiveShell=getSite().getShell();
  activateDesignerEditPart();
}
Program: 65353
Project: 65353
Buggy source:
protected void initAccessible(){
  getAccessible().removeAccessibleListener(accessibleListener);
  getAccessible().addAccessibleListener(accessibleListener);
  getAccessible().removeAccessibleControlListener(accessibleControlListener);
  getAccessible().addAccessibleControlListener(accessibleControlListener);
}

Fixed version (ground truth):
protected void initAccessible(){
  getAccessible().removeAccessibleListener(accessibleListener);
  getAccessible().addAccessibleListener(accessibleListener);
  try {
    getAccessible().removeAccessibleControlListener(accessibleControlListener);
  }
 catch (  NullPointerException e) {
  }
  getAccessible().addAccessibleControlListener(accessibleControlListener);
}
Program: 65354
Project: 65354
Buggy source:
public String paintBullet(int ordinal){
  StringBuffer buffer=new StringBuffer();
switch (type) {
case LIST_DISC_VALUE:
    buffer.append(DISC_CHAR);
  break;
case LIST_STYLE_CIRCLE:
buffer.append(CIRCLE_CHAR);
break;
case LIST_STYLE_SQUARE:
buffer.append(SQUARE_CHAR);
break;
case LIST_STYLE_DECIMALLEADINGZERO:
decimalLeadingZeroToText(ordinal,buffer);
break;
case LIST_STYLE_LOWERROMAN:
romanToText(ordinal,buffer,LOWER_ROMAN_CHARSA,LOWER_ROMAN_CHARSB);
break;
case LIST_STYLE_UPPERROMAN:
romanToText(ordinal,buffer,UPPER_ROMAN_CHARSA,UPPER_ROMAN_CHARSB);
break;
case LIST_STYLE_LOWERGREEK:
charListToText(ordinal,buffer,LOWER_GREEK_CHARS,LOWER_GREEK_CHARS_SIZE);
break;
case LIST_STYLE_UPPERLATIN:
case LIST_STYLE_UPPERALPHA:
charListToText(ordinal,buffer,UPPER_ALPHA_CHARS,ALPHA_SIZE);
break;
case LIST_STYLE_LOWERLATIN:
case LIST_STYLE_LOWERALPHA:
charListToText(ordinal,buffer,LOWER_ALPHA_CHARS,ALPHA_SIZE);
break;
case LIST_STYLE_ARMENIAN:
armenianToText(ordinal,buffer);
break;
case LIST_STYLE_GEORGIAN:
georgianToText(ordinal,buffer);
break;
case LIST_STYLE_NONE:
case LIST_STYLE_INHERIT:
default :
buffer.append(EMPTYSTRING);
break;
}
return buffer.toString();
}

Fixed version (ground truth):
public String paintBullet(int ordinal){
  StringBuffer buffer=new StringBuffer();
switch (type) {
case LIST_DISC_VALUE:
    buffer.append(DISC_CHAR);
  break;
case LIST_STYLE_CIRCLE:
buffer.append(CIRCLE_CHAR);
break;
case LIST_STYLE_SQUARE:
buffer.append(SQUARE_CHAR);
break;
case LIST_STYLE_DECIMALLEADINGZERO:
decimalLeadingZeroToText(ordinal,buffer);
break;
case LIST_STYLE_LOWERROMAN:
romanToText(ordinal,buffer,LOWER_ROMAN_CHARSA,LOWER_ROMAN_CHARSB);
break;
case LIST_STYLE_UPPERROMAN:
romanToText(ordinal,buffer,UPPER_ROMAN_CHARSA,UPPER_ROMAN_CHARSB);
break;
case LIST_STYLE_LOWERGREEK:
charListToText(ordinal,buffer,LOWER_GREEK_CHARS,LOWER_GREEK_CHARS_SIZE);
break;
case LIST_STYLE_UPPERLATIN:
case LIST_STYLE_UPPERALPHA:
charListToText(ordinal,buffer,UPPER_ALPHA_CHARS,ALPHA_SIZE);
break;
case LIST_STYLE_LOWERLATIN:
case LIST_STYLE_LOWERALPHA:
charListToText(ordinal,buffer,LOWER_ALPHA_CHARS,ALPHA_SIZE);
break;
case LIST_STYLE_ARMENIAN:
armenianToText(ordinal,buffer);
break;
case LIST_STYLE_GEORGIAN:
georgianToText(ordinal,buffer);
break;
case LIST_STYLE_DECIMAL:
decimalToText(ordinal,buffer);
break;
case LIST_STYLE_NONE:
case LIST_STYLE_INHERIT:
default :
buffer.append(EMPTYSTRING);
break;
}
return buffer.toString();
}
Program: 65356
Project: 65356
Buggy source:
public IBlob getBlob(int index) throws OdaException {
  assertNotNull(rs);
  try {
    java.sql.Blob blob=rs.getBlob(index);
    return new Blob(blob);
  }
 catch (  UnsupportedOperationException e1) {
    try {
      InputStream inputStream=rs.getBinaryStream(index);
      return new Blob(SqlBlobUtil.newBlob(inputStream));
    }
 catch (    SQLException e2) {
      logger.log(Level.WARNING,e2.getLocalizedMessage());
      return null;
    }
  }
catch (  SQLException e) {
    try {
      byte[] bytes=rs.getBytes(index);
      if (bytes == null)       return null;
      return new Blob(SqlBlobUtil.newBlob(new ByteArrayInputStream(bytes)));
    }
 catch (    SQLException e2) {
      try {
        Object value=rs.getObject(index);
        if (value instanceof IBlob)         return (IBlob)value;
      }
 catch (      SQLException ex) {
      }
      logger.log(Level.WARNING,e.getLocalizedMessage());
      return null;
    }
  }
}

Fixed version (ground truth):
public IBlob getBlob(int index) throws OdaException {
  assertNotNull(rs);
  try {
    java.sql.Blob blob=rs.getBlob(index);
    return new Blob(blob);
  }
 catch (  Exception e) {
    Exception e1=null;
    if (e.getClass().getName().equals("String_Node_Str")) {
      Class cls=e.getClass();
      Method meth=null;
      try {
        meth=cls.getMethod("String_Node_Str",null);
        e1=(Exception)meth.invoke(e,null);
      }
 catch (      Exception e2) {
      }
      logger.log(Level.WARNING,e.getLocalizedMessage());
      return null;
    }
 else {
      e1=e;
    }
    if (e1 instanceof UnsupportedOperationException) {
      try {
        InputStream inputStream=rs.getBinaryStream(index);
        return new Blob(SqlBlobUtil.newBlob(inputStream));
      }
 catch (      SQLException e2) {
        logger.log(Level.WARNING,e2.getLocalizedMessage());
        return null;
      }
    }
 else     if (e1 instanceof SQLException) {
      try {
        byte[] bytes=rs.getBytes(index);
        if (bytes == null)         return null;
        return new Blob(SqlBlobUtil.newBlob(new ByteArrayInputStream(bytes)));
      }
 catch (      SQLException e2) {
        try {
          Object value=rs.getObject(index);
          if (value instanceof IBlob)           return (IBlob)value;
        }
 catch (        SQLException ex) {
        }
        logger.log(Level.WARNING,e.getLocalizedMessage());
        return null;
      }
    }
  }
  return null;
}
Program: 65357
Project: 65357
Buggy source:
/** 
 * Finds the DataSetViewData instance according to the given column name
 * @param columnName
 * @param handle
 * @return
 */
private DataSetViewData findDataSetViewData(String columnName,DataSetHandle handle){
  if (columnName == null || columnName.trim().length() == 0) {
    return null;
  }
  try {
    DataSetViewData[] items=DataSetProvider.getCurrentInstance().getColumns(handle,false,true,true);
    for (int i=0; i < items.length; i++) {
      if (columnName.equals(items[i].getName())) {
        return items[i];
      }
    }
  }
 catch (  BirtException e) {
    DataSetExceptionHandler.handle(e);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Finds the DataSetViewData instance according to the given column name
 * @param columnName
 * @param handle
 * @return
 */
private DataSetViewData findDataSetViewData(String columnName,DataSetHandle handle){
  if (columnName == null || columnName.trim().length() == 0) {
    return null;
  }
  try {
    DataSetViewData[] items=DataSetProvider.getCurrentInstance().getColumns(handle,false,true);
    for (int i=0; i < items.length; i++) {
      if (columnName.equals(items[i].getName())) {
        return items[i];
      }
    }
  }
 catch (  BirtException e) {
    DataSetExceptionHandler.handle(e);
  }
  return null;
}
Program: 65358
Project: 65358
Buggy source:
protected IStatus validateSyntax(Object structureOrHandle){
  try {
    if (!isUniqueColumnName())     return getMiscStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
    if (isBlankProperty(txtColumnName.getText()))     return getBlankPropertyStatus(dialogLabels[COLUMN_NAME_INDEX]);
    if (isBlankProperty(cmbDataType.getText()))     return getBlankPropertyStatus(dialogLabels[DATA_TYPE_INDEX]);
    if (isNumeric(txtColumnName.getText())) {
      return getMiscStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
    }
    IAggrFunction aggrFunc=getSelectedFunction();
    if (aggrFunc != null) {
      IParameterDefn[] paramDefns=aggrFunc.getParameterDefn();
      for (int i=0; i < paramDefns.length; i++) {
        if (!paramDefns[i].isOptional() && isBlankProperty(txtParams[i].getText())) {
          return getBlankPropertyStatus(paramDefns[i].getDisplayName());
        }
      }
    }
 else     if (txtParams != null && isBlankProperty(txtParams[0].getText())) {
      return getBlankPropertyStatus(dialogLabels[EXPRESSION_INDEX]);
    }
    if (cmbAggregation != null && cmbAggregation.getText().trim().length() > 0 && !checkExpressionBindingFields()) {
      return getMiscStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
    }
  }
 catch (  BirtException e) {
    DataSetExceptionHandler.handle(e);
  }
  return getOKStatus();
}

Fixed version (ground truth):
protected IStatus validateSyntax(Object structureOrHandle){
  try {
    if (!isUniqueColumnName())     return getMiscStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
    if (isBlankProperty(txtColumnName.getText()))     return getBlankPropertyStatus(dialogLabels[COLUMN_NAME_INDEX]);
    if (isBlankProperty(cmbDataType.getText()))     return getBlankPropertyStatus(dialogLabels[DATA_TYPE_INDEX]);
    if (isNumeric(txtColumnName.getText())) {
      return getMiscStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
    }
    IAggrFunction aggrFunc=getSelectedFunction();
    if (aggrFunc != null) {
      IParameterDefn[] paramDefns=aggrFunc.getParameterDefn();
      for (int i=0; i < paramDefns.length; i++) {
        if (!paramDefns[i].isOptional() && isBlankProperty(txtParams[i].getText())) {
          return getBlankPropertyStatus(paramDefns[i].getDisplayName());
        }
      }
    }
 else     if (txtParams != null && isBlankProperty(txtParams[0].getText())) {
      return getBlankPropertyStatus(dialogLabels[EXPRESSION_INDEX]);
    }
    if (cmbAggregation != null && cmbAggregation.getText().trim().length() > 0 && !checkExpressionBindingFields()) {
      return getMiscStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
    }
  }
 catch (  BirtException e) {
    e.printStackTrace();
  }
  return getOKStatus();
}
Program: 65359
Project: 65359
Buggy source:
/** 
 * @return
 * @throws BirtException 
 */
private final boolean isUniqueColumnName() throws BirtException {
  DataSetViewData[] items=DataSetProvider.getCurrentInstance().getColumns(((DataSetEditor)getContainer()).getHandle(),true,true,true);
  for (int i=0; i < items.length; i++) {
    if (!items[i].getName().equals(columnName)) {
      if (!items[i].isComputedColumn()) {
        if ((items[i].getAlias() != null && items[i].getAlias().equals(txtColumnName.getText())) || (items[i].getName() != null && items[i].getName().equals(txtColumnName.getText()))) {
          return false;
        }
      }
    }
  }
  Iterator iter=computedColumns.iterator();
  if (iter != null) {
    while (iter.hasNext()) {
      ComputedColumnHandle handle=(ComputedColumnHandle)iter.next();
      if (getStructure(getStructureOrHandle()) != handle.getStructure() && handle.getName().equals(txtColumnName.getText())) {
        return false;
      }
    }
  }
  Iterator iter2=((DataSetHandle)getContainer().getModel()).getPropertyHandle(DataSetHandle.COLUMN_HINTS_PROP).iterator();
  while (iter2.hasNext()) {
    ColumnHintHandle hint=(ColumnHintHandle)iter2.next();
    if (!hint.getColumnName().equals(columnName)) {
      if (txtColumnName.getText().equals(hint.getAlias()) || txtColumnName.getText().equals(hint.getColumnName())) {
        return false;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @return
 * @throws BirtException 
 */
private final boolean isUniqueColumnName() throws BirtException {
  DataSetViewData[] items=DataSetProvider.getCurrentInstance().getColumns(((DataSetEditor)getContainer()).getHandle(),true);
  for (int i=0; i < items.length; i++) {
    if (!items[i].getName().equals(columnName)) {
      if (!items[i].isComputedColumn()) {
        if ((items[i].getAlias() != null && items[i].getAlias().equals(txtColumnName.getText())) || (items[i].getName() != null && items[i].getName().equals(txtColumnName.getText()))) {
          return false;
        }
      }
    }
  }
  Iterator iter=computedColumns.iterator();
  if (iter != null) {
    while (iter.hasNext()) {
      ComputedColumnHandle handle=(ComputedColumnHandle)iter.next();
      if (getStructure(getStructureOrHandle()) != handle.getStructure() && handle.getName().equals(txtColumnName.getText())) {
        return false;
      }
    }
  }
  Iterator iter2=((DataSetHandle)getContainer().getModel()).getPropertyHandle(DataSetHandle.COLUMN_HINTS_PROP).iterator();
  while (iter2.hasNext()) {
    ColumnHintHandle hint=(ColumnHintHandle)iter2.next();
    if (!hint.getColumnName().equals(columnName)) {
      if (txtColumnName.getText().equals(hint.getAlias()) || txtColumnName.getText().equals(hint.getColumnName())) {
        return false;
      }
    }
  }
  return true;
}
Program: 65360
Project: 65360
Buggy source:
/** 
 * Refresh columns meta data
 * @throws BirtException 
 */
private void refreshColumnNames() throws BirtException {
  ((DataSetEditor)this.getContainer()).getCurrentItemModel(true,true);
}

Fixed version (ground truth):
/** 
 * Refresh columns meta data
 * @throws BirtException 
 */
private void refreshColumnNames() throws BirtException {
  ((DataSetEditor)this.getContainer()).getCurrentItemModel(true);
}
Program: 65361
Project: 65361
Buggy source:
/** 
 * Update the computed columns after adding a new column and cache the updated DataSetViewData[]
 */
private void updateComputedColumns(ComputedColumn handle){
  try {
    DataSetHandle dataSet=((DataSetEditor)getContainer()).getHandle();
    DataSetViewData[] items=DataSetProvider.getCurrentInstance().getColumns(dataSet,false,true,true);
    int count=items.length;
    DataSetViewData[] newItems=new DataSetViewData[count + 1];
    System.arraycopy(items,0,newItems,0,count);
    newItems[count]=new DataSetViewData();
    newItems[count].setName(handle.getName());
    newItems[count].setDataTypeName(handle.getDataType());
    newItems[count].setAlias(handle.getDisplayName());
    newItems[count].setComputedColumn(true);
    newItems[count].setPosition(count + 1);
    newItems[count].setDataType(DataAdapterUtil.adaptModelDataType(handle.getDataType()));
    DataSetProvider.getCurrentInstance().updateColumnsOfDataSetHandle(dataSet,newItems);
  }
 catch (  BirtException e) {
    DataSetExceptionHandler.handle(e);
  }
}

Fixed version (ground truth):
/** 
 * Update the computed columns after adding a new column and cache the updated DataSetViewData[]
 */
private void updateComputedColumns(ComputedColumn handle){
  try {
    DataSetHandle dataSet=((DataSetEditor)getContainer()).getHandle();
    DataSetViewData[] items=DataSetProvider.getCurrentInstance().getColumns(dataSet,false,true);
    int count=items.length;
    DataSetViewData[] newItems=new DataSetViewData[count + 1];
    System.arraycopy(items,0,newItems,0,count);
    newItems[count]=new DataSetViewData();
    newItems[count].setName(handle.getName());
    newItems[count].setDataTypeName(handle.getDataType());
    newItems[count].setAlias(handle.getDisplayName());
    newItems[count].setComputedColumn(true);
    newItems[count].setPosition(count + 1);
    newItems[count].setDataType(DataAdapterUtil.adaptModelDataType(handle.getDataType()));
    DataSetProvider.getCurrentInstance().updateColumnsOfDataSetHandle(dataSet,newItems);
  }
 catch (  BirtException e) {
    DataSetExceptionHandler.handle(e);
  }
}
Program: 65362
Project: 65362
Buggy source:
/** 
 * Update the computed columns after removing an established one and cache the updated DataSetViewData[]
 */
private void updateColumnsOfDataSetHandle(){
  DataSetHandle dataSet=((DataSetEditor)getContainer()).getHandle();
  DataSetViewData[] items;
  try {
    items=DataSetProvider.getCurrentInstance().getColumns(dataSet,false,true,true);
    int inexistence=0;
    for (int i=0; i < items.length; i++) {
      boolean exist=false;
      if (items[i].isComputedColumn()) {
        Iterator iter=computedColumns.iterator();
        while (iter.hasNext()) {
          ComputedColumn computedColumn=null;
          Object obj=iter.next();
          if (obj instanceof ComputedColumnHandle) {
            computedColumn=(ComputedColumn)((ComputedColumnHandle)obj).getStructure();
          }
          if (computedColumn != null && items[i].getName().equals(computedColumn.getName())) {
            exist=true;
          }
        }
        if (!exist) {
          items[i]=null;
          inexistence++;
        }
      }
    }
    if (inexistence == 0)     return;
    DataSetViewData[] existItems=new DataSetViewData[items.length - inexistence];
    int index=0;
    for (int i=0; i < items.length; i++) {
      if (items[i] != null) {
        existItems[index]=items[i];
        index++;
      }
    }
    DataSetProvider.getCurrentInstance().updateColumnsOfDataSetHandle(dataSet,existItems);
  }
 catch (  BirtException e) {
    DataSetExceptionHandler.handle(e);
  }
}

Fixed version (ground truth):
/** 
 * Update the computed columns after removing an established one and cache the updated DataSetViewData[]
 */
private void updateColumnsOfDataSetHandle(){
  DataSetHandle dataSet=((DataSetEditor)getContainer()).getHandle();
  DataSetViewData[] items;
  try {
    items=DataSetProvider.getCurrentInstance().getColumns(dataSet,false,true);
    int inexistence=0;
    for (int i=0; i < items.length; i++) {
      boolean exist=false;
      if (items[i].isComputedColumn()) {
        Iterator iter=computedColumns.iterator();
        while (iter.hasNext()) {
          ComputedColumn computedColumn=null;
          Object obj=iter.next();
          if (obj instanceof ComputedColumnHandle) {
            computedColumn=(ComputedColumn)((ComputedColumnHandle)obj).getStructure();
          }
          if (computedColumn != null && items[i].getName().equals(computedColumn.getName())) {
            exist=true;
          }
        }
        if (!exist) {
          items[i]=null;
          inexistence++;
        }
      }
    }
    if (inexistence == 0)     return;
    DataSetViewData[] existItems=new DataSetViewData[items.length - inexistence];
    int index=0;
    for (int i=0; i < items.length; i++) {
      if (items[i] != null) {
        existItems[index]=items[i];
        index++;
      }
    }
    DataSetProvider.getCurrentInstance().updateColumnsOfDataSetHandle(dataSet,existItems);
  }
 catch (  BirtException e) {
    DataSetExceptionHandler.handle(e);
  }
}
Program: 65363
Project: 65363
Buggy source:
/** 
 * Gets all columns items from dataset list
 * @param useColumnHint
 * @param suppressErrorMessage
 * @return DataSetItemModel[]
 * @throws BirtException 
 */
public DataSetViewData[] getCurrentItemModel(boolean useColumnHint,boolean suppressErrorMessage) throws BirtException {
  DataSetViewData[] dataSetItem=DataSetProvider.getCurrentInstance().getColumns(ds,itemModelChanged,useColumnHint,suppressErrorMessage);
  itemModelChanged=false;
  linkedParameterChanged=false;
  return dataSetItem;
}

Fixed version (ground truth):
/** 
 * Gets all columns items from dataset list
 * @param useColumnHint
 * @param suppressErrorMessage
 * @return DataSetItemModel[]
 * @throws BirtException 
 */
public DataSetViewData[] getCurrentItemModel(boolean useColumnHint) throws BirtException {
  DataSetViewData[] dataSetItem=DataSetProvider.getCurrentInstance().getColumns(ds,itemModelChanged,useColumnHint);
  itemModelChanged=false;
  linkedParameterChanged=false;
  return dataSetItem;
}
Program: 65364
Project: 65364
Buggy source:
private void initColumnNames(){
  try {
    columns=((DataSetEditor)this.getContainer()).getCurrentItemModel(true,true);
    if (columns != null) {
      columnExpressions=new String[columns.length];
      for (int n=0; n < columns.length; n++) {
        columnExpressions[n]=columns[n].getName();
      }
    }
  }
 catch (  BirtException e) {
    DataSetExceptionHandler.handle(e);
  }
}

Fixed version (ground truth):
private void initColumnNames(){
  try {
    columns=((DataSetEditor)this.getContainer()).getCurrentItemModel(true);
    if (columns != null) {
      columnExpressions=new String[columns.length];
      for (int n=0; n < columns.length; n++) {
        columnExpressions[n]=columns[n].getName();
      }
    }
  }
 catch (  BirtException e) {
    e.printStackTrace();
  }
}
Program: 65365
Project: 65365
Buggy source:
/** 
 * The alias name is unique or not
 * @param newValue
 * @return
 */
protected boolean isUnique(String newValue,DataSetViewData currentItem){
  DataSetViewData[] items=null;
  try {
    if (viewer == null || viewer.getViewer() == null) {
      items=DataSetProvider.getCurrentInstance().getColumns(((DataSetEditor)getContainer()).getHandle(),false,true,true);
    }
 else {
      items=(DataSetViewData[])viewer.getViewer().getInput();
    }
  }
 catch (  BirtException e) {
    DataSetExceptionHandler.handle(e);
  }
  for (int i=0; i < items.length; i++) {
    if (items[i].getName() != null && items[i].getName().equals(currentItem.getName())) {
      continue;
    }
    if ((items[i].getAlias() != null && items[i].getAlias().equals(newValue)) || (items[i].getName() != null && items[i].getName().equals(newValue))) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * The alias name is unique or not
 * @param newValue
 * @return
 */
protected boolean isUnique(String newValue,DataSetViewData currentItem){
  DataSetViewData[] items=null;
  try {
    if (viewer == null || viewer.getViewer() == null) {
      items=DataSetProvider.getCurrentInstance().getColumns(((DataSetEditor)getContainer()).getHandle(),false,true);
    }
 else {
      items=(DataSetViewData[])viewer.getViewer().getInput();
    }
  }
 catch (  BirtException e) {
    DataSetExceptionHandler.handle(e);
  }
  for (int i=0; i < items.length; i++) {
    if (items[i].getName() != null && items[i].getName().equals(currentItem.getName())) {
      continue;
    }
    if ((items[i].getAlias() != null && items[i].getAlias().equals(newValue)) || (items[i].getName() != null && items[i].getName().equals(newValue))) {
      return false;
    }
  }
  return true;
}
Program: 65367
Project: 65367
Buggy source:
/** 
 * validates that the new name/alias from a column hint or a new custom column doesn't conflict with existing column names or aliases
 */
private boolean isValid(){
  boolean validate=true;
  String newColumnNameOrAlias;
  DataSetViewData[] items=null;
  if (viewer == null || viewer.getViewer() == null) {
    try {
      items=DataSetProvider.getCurrentInstance().getColumns(((DataSetEditor)getContainer()).getHandle(),false,true,true);
    }
 catch (    Exception e) {
      DataSetExceptionHandler.handle(e);
    }
  }
 else {
    items=(DataSetViewData[])viewer.getViewer().getInput();
  }
  for (int i=0; items != null && i < items.length && validate; i++) {
    newColumnNameOrAlias=items[i].getAlias();
    if (newColumnNameOrAlias != null && newColumnNameOrAlias.length() > 0) {
      for (int n=0; n < items.length; n++) {
        if (i == n)         continue;
        if ((items[n].getName() != null && items[n].getName().equals(newColumnNameOrAlias)) || (items[n].getAlias() != null && items[n].getAlias().equals(newColumnNameOrAlias))) {
          validate=false;
          getContainer().setMessage(Messages.getFormattedString("String_Node_Str",new Object[]{newColumnNameOrAlias,Integer.valueOf(n + 1)}),IMessageProvider.ERROR);
          break;
        }
      }
    }
  }
  return validate;
}

Fixed version (ground truth):
/** 
 * validates that the new name/alias from a column hint or a new custom column doesn't conflict with existing column names or aliases
 */
private boolean isValid(){
  boolean validate=true;
  String newColumnNameOrAlias;
  DataSetViewData[] items=null;
  if (viewer == null || viewer.getViewer() == null) {
    try {
      items=DataSetProvider.getCurrentInstance().getColumns(((DataSetEditor)getContainer()).getHandle(),false,true);
    }
 catch (    Exception e) {
      DataSetExceptionHandler.handle(e);
    }
  }
 else {
    items=(DataSetViewData[])viewer.getViewer().getInput();
  }
  for (int i=0; items != null && i < items.length && validate; i++) {
    newColumnNameOrAlias=items[i].getAlias();
    if (newColumnNameOrAlias != null && newColumnNameOrAlias.length() > 0) {
      for (int n=0; n < items.length; n++) {
        if (i == n)         continue;
        if ((items[n].getName() != null && items[n].getName().equals(newColumnNameOrAlias)) || (items[n].getAlias() != null && items[n].getAlias().equals(newColumnNameOrAlias))) {
          validate=false;
          getContainer().setMessage(Messages.getFormattedString("String_Node_Str",new Object[]{newColumnNameOrAlias,Integer.valueOf(n + 1)}),IMessageProvider.ERROR);
          break;
        }
      }
    }
  }
  return validate;
}
Program: 65368
Project: 65368
Buggy source:
/** 
 * @param dataSet
 * @param refresh
 * @param useColumnHints Only applicable if the list is refreshed.
 * @return
 * @throws BirtException 
 */
public DataSetViewData[] getColumns(DataSetHandle dataSet,boolean refresh,boolean useColumnHints,boolean suppressErrorMessage) throws BirtException {
  if (dataSet == null) {
    return new DataSetViewData[0];
  }
  DataSetViewData[] columns=null;
  DataRequestSession session=null;
  try {
    columns=htColumns.get(dataSet);
    if (columns == null || refresh) {
      DataSessionContext context=new DataSessionContext(DataSessionContext.MODE_DIRECT_PRESENTATION,dataSet.getModuleHandle());
      session=DataRequestSession.newSession(context);
      columns=this.populateAllOutputColumns(dataSet,session);
      htColumns.put(dataSet,columns);
    }
  }
 catch (  BirtException e) {
    if (!suppressErrorMessage) {
      throw e;
    }
    columns=null;
  }
 finally {
    if (session != null) {
      session.shutdown();
    }
  }
  if (columns == null) {
    columns=new DataSetViewData[]{};
    htColumns.put(dataSet,columns);
  }
  return columns;
}

Fixed version (ground truth):
/** 
 * @param dataSet
 * @param refresh
 * @param useColumnHints Only applicable if the list is refreshed.
 * @return
 * @throws BirtException 
 */
public DataSetViewData[] getColumns(DataSetHandle dataSet,boolean refresh,boolean useColumnHints) throws BirtException {
  if (dataSet == null) {
    return new DataSetViewData[0];
  }
  DataSetViewData[] columns=null;
  DataRequestSession session=null;
  try {
    columns=htColumns.get(dataSet);
    if (columns == null || refresh) {
      DataSessionContext context=new DataSessionContext(DataSessionContext.MODE_DIRECT_PRESENTATION,dataSet.getModuleHandle());
      session=DataRequestSession.newSession(context);
      columns=this.populateAllOutputColumns(dataSet,session);
      htColumns.put(dataSet,columns);
    }
  }
 catch (  BirtException e) {
    columns=new DataSetViewData[]{};
    htColumns.put(dataSet,columns);
    throw e;
  }
 finally {
    if (session != null) {
      session.shutdown();
    }
  }
  if (columns == null) {
    columns=new DataSetViewData[]{};
    htColumns.put(dataSet,columns);
  }
  return columns;
}
Program: 65370
Project: 65370
Buggy source:
/** 
 * Finds the DataSetViewData instance according to the given column name
 * @param columnName
 * @param handle
 * @return
 */
private DataSetViewData findDataSetViewData(String columnName,DataSetHandle handle){
  if (columnName == null || columnName.trim().length() == 0) {
    return null;
  }
  DataSetViewData[] items=DataSetProvider.getCurrentInstance().getColumns(handle,false,true,true);
  for (int i=0; i < items.length; i++) {
    if (columnName.equals(items[i].getName())) {
      return items[i];
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Finds the DataSetViewData instance according to the given column name
 * @param columnName
 * @param handle
 * @return
 */
private DataSetViewData findDataSetViewData(String columnName,DataSetHandle handle){
  if (columnName == null || columnName.trim().length() == 0) {
    return null;
  }
  try {
    DataSetViewData[] items=DataSetProvider.getCurrentInstance().getColumns(handle,false,true,true);
    for (int i=0; i < items.length; i++) {
      if (columnName.equals(items[i].getName())) {
        return items[i];
      }
    }
  }
 catch (  BirtException e) {
    DataSetExceptionHandler.handle(e);
  }
  return null;
}
Program: 65371
Project: 65371
Buggy source:
protected IStatus validateSyntax(Object structureOrHandle){
  if (!isUniqueColumnName())   return getMiscStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
  if (isBlankProperty(txtColumnName.getText()))   return getBlankPropertyStatus(dialogLabels[COLUMN_NAME_INDEX]);
  if (isBlankProperty(cmbDataType.getText()))   return getBlankPropertyStatus(dialogLabels[DATA_TYPE_INDEX]);
  if (isNumeric(txtColumnName.getText())) {
    return getMiscStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
  }
  IAggrFunction aggrFunc=getSelectedFunction();
  if (aggrFunc != null) {
    IParameterDefn[] paramDefns=aggrFunc.getParameterDefn();
    for (int i=0; i < paramDefns.length; i++) {
      if (!paramDefns[i].isOptional() && isBlankProperty(txtParams[i].getText())) {
        return getBlankPropertyStatus(paramDefns[i].getDisplayName());
      }
    }
  }
 else   if (txtParams != null && isBlankProperty(txtParams[0].getText())) {
    return getBlankPropertyStatus(dialogLabels[EXPRESSION_INDEX]);
  }
  try {
    if (cmbAggregation != null && cmbAggregation.getText().trim().length() > 0 && !checkExpressionBindingFields()) {
      return getMiscStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
    }
  }
 catch (  BirtException e) {
  }
  return getOKStatus();
}

Fixed version (ground truth):
protected IStatus validateSyntax(Object structureOrHandle){
  try {
    if (!isUniqueColumnName())     return getMiscStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
    if (isBlankProperty(txtColumnName.getText()))     return getBlankPropertyStatus(dialogLabels[COLUMN_NAME_INDEX]);
    if (isBlankProperty(cmbDataType.getText()))     return getBlankPropertyStatus(dialogLabels[DATA_TYPE_INDEX]);
    if (isNumeric(txtColumnName.getText())) {
      return getMiscStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
    }
    IAggrFunction aggrFunc=getSelectedFunction();
    if (aggrFunc != null) {
      IParameterDefn[] paramDefns=aggrFunc.getParameterDefn();
      for (int i=0; i < paramDefns.length; i++) {
        if (!paramDefns[i].isOptional() && isBlankProperty(txtParams[i].getText())) {
          return getBlankPropertyStatus(paramDefns[i].getDisplayName());
        }
      }
    }
 else     if (txtParams != null && isBlankProperty(txtParams[0].getText())) {
      return getBlankPropertyStatus(dialogLabels[EXPRESSION_INDEX]);
    }
    if (cmbAggregation != null && cmbAggregation.getText().trim().length() > 0 && !checkExpressionBindingFields()) {
      return getMiscStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
    }
  }
 catch (  BirtException e) {
    DataSetExceptionHandler.handle(e);
  }
  return getOKStatus();
}
Program: 65372
Project: 65372
Buggy source:
/** 
 * @return
 */
private final boolean isUniqueColumnName(){
  DataSetViewData[] items=DataSetProvider.getCurrentInstance().getColumns(((DataSetEditor)getContainer()).getHandle(),true,true,true);
  for (int i=0; i < items.length; i++) {
    if (!items[i].getName().equals(columnName)) {
      if (!items[i].isComputedColumn()) {
        if ((items[i].getAlias() != null && items[i].getAlias().equals(txtColumnName.getText())) || (items[i].getName() != null && items[i].getName().equals(txtColumnName.getText()))) {
          return false;
        }
      }
    }
  }
  Iterator iter=computedColumns.iterator();
  if (iter != null) {
    while (iter.hasNext()) {
      ComputedColumnHandle handle=(ComputedColumnHandle)iter.next();
      if (getStructure(getStructureOrHandle()) != handle.getStructure() && handle.getName().equals(txtColumnName.getText())) {
        return false;
      }
    }
  }
  Iterator iter2=((DataSetHandle)getContainer().getModel()).getPropertyHandle(DataSetHandle.COLUMN_HINTS_PROP).iterator();
  while (iter2.hasNext()) {
    ColumnHintHandle hint=(ColumnHintHandle)iter2.next();
    if (!hint.getColumnName().equals(columnName)) {
      if (txtColumnName.getText().equals(hint.getAlias()) || txtColumnName.getText().equals(hint.getColumnName())) {
        return false;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @return
 * @throws BirtException 
 */
private final boolean isUniqueColumnName() throws BirtException {
  DataSetViewData[] items=DataSetProvider.getCurrentInstance().getColumns(((DataSetEditor)getContainer()).getHandle(),true,true,true);
  for (int i=0; i < items.length; i++) {
    if (!items[i].getName().equals(columnName)) {
      if (!items[i].isComputedColumn()) {
        if ((items[i].getAlias() != null && items[i].getAlias().equals(txtColumnName.getText())) || (items[i].getName() != null && items[i].getName().equals(txtColumnName.getText()))) {
          return false;
        }
      }
    }
  }
  Iterator iter=computedColumns.iterator();
  if (iter != null) {
    while (iter.hasNext()) {
      ComputedColumnHandle handle=(ComputedColumnHandle)iter.next();
      if (getStructure(getStructureOrHandle()) != handle.getStructure() && handle.getName().equals(txtColumnName.getText())) {
        return false;
      }
    }
  }
  Iterator iter2=((DataSetHandle)getContainer().getModel()).getPropertyHandle(DataSetHandle.COLUMN_HINTS_PROP).iterator();
  while (iter2.hasNext()) {
    ColumnHintHandle hint=(ColumnHintHandle)iter2.next();
    if (!hint.getColumnName().equals(columnName)) {
      if (txtColumnName.getText().equals(hint.getAlias()) || txtColumnName.getText().equals(hint.getColumnName())) {
        return false;
      }
    }
  }
  return true;
}
Program: 65373
Project: 65373
Buggy source:
/** 
 * Refresh columns meta data
 */
private void refreshColumnNames(){
  ((DataSetEditor)this.getContainer()).getCurrentItemModel(true,true);
}

Fixed version (ground truth):
/** 
 * Refresh columns meta data
 * @throws BirtException 
 */
private void refreshColumnNames() throws BirtException {
  ((DataSetEditor)this.getContainer()).getCurrentItemModel(true,true);
}
Program: 65374
Project: 65374
Buggy source:
/** 
 * Update the computed columns after adding a new column and cache the updated DataSetViewData[]
 */
private void updateComputedColumns(ComputedColumn handle){
  DataSetHandle dataSet=((DataSetEditor)getContainer()).getHandle();
  DataSetViewData[] items=DataSetProvider.getCurrentInstance().getColumns(dataSet,false,true,true);
  int count=items.length;
  DataSetViewData[] newItems=new DataSetViewData[count + 1];
  System.arraycopy(items,0,newItems,0,count);
  newItems[count]=new DataSetViewData();
  newItems[count].setName(handle.getName());
  newItems[count].setDataTypeName(handle.getDataType());
  newItems[count].setAlias(handle.getDisplayName());
  newItems[count].setComputedColumn(true);
  newItems[count].setPosition(count + 1);
  newItems[count].setDataType(DataAdapterUtil.adaptModelDataType(handle.getDataType()));
  DataSetProvider.getCurrentInstance().updateColumnsOfDataSetHandle(dataSet,newItems);
}

Fixed version (ground truth):
/** 
 * Update the computed columns after adding a new column and cache the updated DataSetViewData[]
 */
private void updateComputedColumns(ComputedColumn handle){
  try {
    DataSetHandle dataSet=((DataSetEditor)getContainer()).getHandle();
    DataSetViewData[] items=DataSetProvider.getCurrentInstance().getColumns(dataSet,false,true,true);
    int count=items.length;
    DataSetViewData[] newItems=new DataSetViewData[count + 1];
    System.arraycopy(items,0,newItems,0,count);
    newItems[count]=new DataSetViewData();
    newItems[count].setName(handle.getName());
    newItems[count].setDataTypeName(handle.getDataType());
    newItems[count].setAlias(handle.getDisplayName());
    newItems[count].setComputedColumn(true);
    newItems[count].setPosition(count + 1);
    newItems[count].setDataType(DataAdapterUtil.adaptModelDataType(handle.getDataType()));
    DataSetProvider.getCurrentInstance().updateColumnsOfDataSetHandle(dataSet,newItems);
  }
 catch (  BirtException e) {
    DataSetExceptionHandler.handle(e);
  }
}
Program: 65375
Project: 65375
Buggy source:
public void pageActivated(){
  refreshColumnNames();
  getContainer().setMessage(Messages.getString("String_Node_Str"),IMessageProvider.NONE);
  setPageProperties();
  computedColumns=((DataSetHandle)getContainer().getModel()).getPropertyHandle(DataSetHandle.COMPUTED_COLUMNS_PROP);
  ;
  viewer.getViewer().setInput(computedColumns);
  viewer.getViewer().getTable().select(0);
}

Fixed version (ground truth):
public void pageActivated(){
  try {
    refreshColumnNames();
    getContainer().setMessage(Messages.getString("String_Node_Str"),IMessageProvider.NONE);
    setPageProperties();
    computedColumns=((DataSetHandle)getContainer().getModel()).getPropertyHandle(DataSetHandle.COMPUTED_COLUMNS_PROP);
    ;
    viewer.getViewer().setInput(computedColumns);
    viewer.getViewer().getTable().select(0);
  }
 catch (  BirtException e) {
    DataSetExceptionHandler.handle(e);
  }
}
Program: 65376
Project: 65376
Buggy source:
/** 
 * Update the computed columns after removing an established one and cache the updated DataSetViewData[]
 */
private void updateColumnsOfDataSetHandle(){
  DataSetHandle dataSet=((DataSetEditor)getContainer()).getHandle();
  DataSetViewData[] items=DataSetProvider.getCurrentInstance().getColumns(dataSet,false,true,true);
  int inexistence=0;
  for (int i=0; i < items.length; i++) {
    boolean exist=false;
    if (items[i].isComputedColumn()) {
      Iterator iter=computedColumns.iterator();
      while (iter.hasNext()) {
        ComputedColumn computedColumn=null;
        Object obj=iter.next();
        if (obj instanceof ComputedColumnHandle) {
          computedColumn=(ComputedColumn)((ComputedColumnHandle)obj).getStructure();
        }
        if (computedColumn != null && items[i].getName().equals(computedColumn.getName())) {
          exist=true;
        }
      }
      if (!exist) {
        items[i]=null;
        inexistence++;
      }
    }
  }
  if (inexistence == 0)   return;
  DataSetViewData[] existItems=new DataSetViewData[items.length - inexistence];
  int index=0;
  for (int i=0; i < items.length; i++) {
    if (items[i] != null) {
      existItems[index]=items[i];
      index++;
    }
  }
  DataSetProvider.getCurrentInstance().updateColumnsOfDataSetHandle(dataSet,existItems);
}

Fixed version (ground truth):
/** 
 * Update the computed columns after removing an established one and cache the updated DataSetViewData[]
 */
private void updateColumnsOfDataSetHandle(){
  DataSetHandle dataSet=((DataSetEditor)getContainer()).getHandle();
  DataSetViewData[] items;
  try {
    items=DataSetProvider.getCurrentInstance().getColumns(dataSet,false,true,true);
    int inexistence=0;
    for (int i=0; i < items.length; i++) {
      boolean exist=false;
      if (items[i].isComputedColumn()) {
        Iterator iter=computedColumns.iterator();
        while (iter.hasNext()) {
          ComputedColumn computedColumn=null;
          Object obj=iter.next();
          if (obj instanceof ComputedColumnHandle) {
            computedColumn=(ComputedColumn)((ComputedColumnHandle)obj).getStructure();
          }
          if (computedColumn != null && items[i].getName().equals(computedColumn.getName())) {
            exist=true;
          }
        }
        if (!exist) {
          items[i]=null;
          inexistence++;
        }
      }
    }
    if (inexistence == 0)     return;
    DataSetViewData[] existItems=new DataSetViewData[items.length - inexistence];
    int index=0;
    for (int i=0; i < items.length; i++) {
      if (items[i] != null) {
        existItems[index]=items[i];
        index++;
      }
    }
    DataSetProvider.getCurrentInstance().updateColumnsOfDataSetHandle(dataSet,existItems);
  }
 catch (  BirtException e) {
    DataSetExceptionHandler.handle(e);
  }
}
Program: 65377
Project: 65377
Buggy source:
protected void okPressed(){
  super.okPressed();
  try {
    DataSetUIUtil.updateColumnCache(this.getHandle(),false);
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
    return;
  }
  if (super.rootNode.hasSubNodes()) {
    PropertyNode[] nodes=rootNode.getSubNodes();
    for (int n=0; n < nodes.length; n++) {
      if (nodes[n].getPage() instanceof DataSetParametersPage) {
        if (viewer == null || viewer.getTree() == null)         return;
        DataSetParametersPage page=(DataSetParametersPage)nodes[n].getPage();
        if (!page.canFinish() && !viewer.getTree().isDisposed()) {
          TreeItem firstNode=viewer.getTree().getItems()[n];
          StructuredSelection select=new StructuredSelection(firstNode.getData());
          viewer.setSelection(select);
          String name=((DataSetParametersPage)nodes[n].getPage()).getNoneValuedParameterName();
          this.setMessage(Messages.getFormattedString("String_Node_Str",new Object[]{name}),IMessageProvider.ERROR);
          return;
        }
      }
    }
  }
}

Fixed version (ground truth):
protected void okPressed(){
  super.okPressed();
  try {
    DataSetUIUtil.updateColumnCache(this.getHandle(),false);
  }
 catch (  Exception e) {
    DataSetExceptionHandler.handle(e);
    return;
  }
  if (super.rootNode.hasSubNodes()) {
    PropertyNode[] nodes=rootNode.getSubNodes();
    for (int n=0; n < nodes.length; n++) {
      if (nodes[n].getPage() instanceof DataSetParametersPage) {
        if (viewer == null || viewer.getTree() == null)         return;
        DataSetParametersPage page=(DataSetParametersPage)nodes[n].getPage();
        if (!page.canFinish() && !viewer.getTree().isDisposed()) {
          TreeItem firstNode=viewer.getTree().getItems()[n];
          StructuredSelection select=new StructuredSelection(firstNode.getData());
          viewer.setSelection(select);
          String name=((DataSetParametersPage)nodes[n].getPage()).getNoneValuedParameterName();
          this.setMessage(Messages.getFormattedString("String_Node_Str",new Object[]{name}),IMessageProvider.ERROR);
          return;
        }
      }
    }
  }
}
Program: 65378
Project: 65378
Buggy source:
/** 
 * Gets all columns items from dataset list
 * @param useColumnHint
 * @param suppressErrorMessage
 * @return DataSetItemModel[]
 */
public DataSetViewData[] getCurrentItemModel(boolean useColumnHint,boolean suppressErrorMessage){
  DataSetViewData[] dataSetItem=DataSetProvider.getCurrentInstance().getColumns(ds,itemModelChanged,useColumnHint,suppressErrorMessage);
  itemModelChanged=false;
  linkedParameterChanged=false;
  return dataSetItem;
}

Fixed version (ground truth):
/** 
 * Gets all columns items from dataset list
 * @param useColumnHint
 * @param suppressErrorMessage
 * @return DataSetItemModel[]
 * @throws BirtException 
 */
public DataSetViewData[] getCurrentItemModel(boolean useColumnHint,boolean suppressErrorMessage) throws BirtException {
  DataSetViewData[] dataSetItem=DataSetProvider.getCurrentInstance().getColumns(ds,itemModelChanged,useColumnHint,suppressErrorMessage);
  itemModelChanged=false;
  linkedParameterChanged=false;
  return dataSetItem;
}
Program: 65379
Project: 65379
Buggy source:
public IResultClass loadResultClass(boolean includeInnerID) throws DataException {
  InputStream stream=streamManager.getInStream(DataEngineContext.DATASET_META_STREAM,StreamManager.ROOT_STREAM,StreamManager.BASE_SCOPE);
  BufferedInputStream buffStream=new BufferedInputStream(stream);
  IResultClass resultClass=new ResultClass(buffStream,version,includeInnerID);
  try {
    buffStream.close();
    stream.close();
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_LOAD_ERROR,e,"String_Node_Str");
  }
  return resultClass;
}

Fixed version (ground truth):
public IResultClass loadResultClass(boolean includeInnerID) throws DataException {
  if (!streamManager.hasInStream(DataEngineContext.DATASET_META_STREAM,StreamManager.ROOT_STREAM,StreamManager.BASE_SCOPE))   return null;
  InputStream stream=streamManager.getInStream(DataEngineContext.DATASET_META_STREAM,StreamManager.ROOT_STREAM,StreamManager.BASE_SCOPE);
  BufferedInputStream buffStream=new BufferedInputStream(stream);
  IResultClass resultClass=new ResultClass(buffStream,version,includeInnerID);
  try {
    buffStream.close();
    stream.close();
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_LOAD_ERROR,e,"String_Node_Str");
  }
  return resultClass;
}