nus-yam/ex-repair huggingface dataset:
Program: 65881
Project: 65881
Buggy source:
private static IEdgeDefinition loadEdge(DataInputStream dis) throws DataException, IOException {
  if (!IOUtil.readBool(dis)) {
    return null;
  }
  String name=IOUtil.readString(dis);
  EdgeDefinition ed=new EdgeDefinition(name);
  int count=IOUtil.readInt(dis);
  for (int i=0; i < count; i++) {
    IDimensionDefinition dd=loadDimensionDefinition(dis);
    IDimensionDefinition dd1=ed.createDimension(dd.getName());
    copy(dd,dd1);
  }
  count=IOUtil.readInt(dis);
  for (int i=0; i < count; i++) {
    IEdgeDrillFilter edf=loadEdgeDrillFilter(dis);
    IEdgeDrillFilter edf1=ed.createDrillFilter(edf.getName());
    copy(edf,edf1);
  }
  IMirroredDefinition md=loadMirroredDefn(dis);
  if (md != null) {
    ed.creatMirrorDefinition(md.getMirrorStartingLevel(),md.isBreakHierarchy());
  }
  return ed;
}

Fixed version (ground truth):
private static IEdgeDefinition loadEdge(DataInputStream dis,int version) throws DataException, IOException {
  if (!IOUtil.readBool(dis)) {
    return null;
  }
  String name=IOUtil.readString(dis);
  EdgeDefinition ed=new EdgeDefinition(name);
  int count=IOUtil.readInt(dis);
  for (int i=0; i < count; i++) {
    IDimensionDefinition dd=loadDimensionDefinition(dis);
    IDimensionDefinition dd1=ed.createDimension(dd.getName());
    copy(dd,dd1);
  }
  count=IOUtil.readInt(dis);
  for (int i=0; i < count; i++) {
    IEdgeDrillFilter edf=loadEdgeDrillFilter(dis,version);
    IEdgeDrillFilter edf1=ed.createDrillFilter(edf.getName());
    copy(edf,edf1);
  }
  IMirroredDefinition md=loadMirroredDefn(dis);
  if (md != null) {
    ed.creatMirrorDefinition(md.getMirrorStartingLevel(),md.isBreakHierarchy());
  }
  return ed;
}
Program: 65882
Project: 65882
Buggy source:
public int getVersion(String queryResultId) throws DataException {
  if (queryResultId != null && !queryResultId.trim().isEmpty()) {
    Integer version=this.getQueryIdVersionMap().get(queryResultId);
    if (version != null)     return version;
  }
  return this.getVersion();
}

Fixed version (ground truth):
public int getVersion(String queryResultId) throws DataException {
  if (queryResultId != null && queryResultId.trim().length() > 0) {
    Integer version=this.getQueryIdVersionMap().get(queryResultId);
    if (version != null)     return version;
  }
  return this.getVersion();
}
Program: 65883
Project: 65883
Buggy source:
void setVersion(int version,String queryResultId) throws DataException {
  if (queryResultId == null || queryResultId.trim().isEmpty()) {
    this.setVersion(version);
    return;
  }
  Map<String,Integer> idVersionMap=this.getQueryIdVersionMap();
  idVersionMap.put(queryResultId,version);
  this.dataEngineContext.dropStream(null,null,DataEngineContext.QUERY_ID_BASED_VERSIONING_STREAM);
  OutputStream versionOs=this.dataEngineContext.getOutputStream(null,null,DataEngineContext.QUERY_ID_BASED_VERSIONING_STREAM);
  DataOutputStream versionDos=new DataOutputStream(versionOs);
  try {
    IOUtil.writeMap(versionDos,idVersionMap);
    versionDos.close();
    versionOs.close();
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}

Fixed version (ground truth):
void setVersion(int version,String queryResultId) throws DataException {
  if (queryResultId == null || queryResultId.trim().length() == 0) {
    this.setVersion(version);
    return;
  }
  Map<String,Integer> idVersionMap=this.getQueryIdVersionMap();
  idVersionMap.put(queryResultId,version);
  this.dataEngineContext.dropStream(null,null,DataEngineContext.QUERY_ID_BASED_VERSIONING_STREAM);
  OutputStream versionOs=this.dataEngineContext.getOutputStream(null,null,DataEngineContext.QUERY_ID_BASED_VERSIONING_STREAM);
  DataOutputStream versionDos=new DataOutputStream(versionOs);
  try {
    IOUtil.writeMap(versionDos,idVersionMap);
    versionDos.close();
    versionOs.close();
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}
Program: 65884
Project: 65884
Buggy source:
public RDAggrUtil(StreamManager manager,IBaseQueryDefinition qd) throws DataException {
  this.qd=qd;
  try {
    aggrIndexStream=manager.getInStream(DataEngineContext.AGGR_INDEX_STREAM,StreamManager.ROOT_STREAM,StreamManager.SELF_SCOPE);
    int aggrSize=IOUtil.readInt(aggrIndexStream);
    DataInputStream aggrIndexDis=new DataInputStream(aggrIndexStream);
    valueStream=new DataInputStream(new WrapperedRAInputStream(manager.getInStream(DataEngineContext.AGGR_VALUE_STREAM,StreamManager.ROOT_STREAM,StreamManager.SELF_SCOPE),0,-1));
    for (int i=0; i < aggrSize; i++) {
      RDAggrValueHolder holder=new RDAggrValueHolder(valueStream);
      holders.put(holder.getName(),holder);
      valueStream.close();
      if (i < aggrSize - 1) {
        long offset=IOUtil.readLong(aggrIndexDis);
        if (manager.getVersion() >= VersionManager.VERSION_2_5_2_1) {
          valueStream=new DataInputStream(new WrapperedRAInputStream(manager.getInStream(DataEngineContext.AGGR_VALUE_STREAM,StreamManager.ROOT_STREAM,StreamManager.SELF_SCOPE),offset,-1));
        }
 else {
          valueStream=new DataInputStream(new WrapperedRAInputStream(manager.getInStream(DataEngineContext.AGGR_VALUE_STREAM,StreamManager.ROOT_STREAM,StreamManager.SELF_SCOPE),offset + 1,-1));
        }
      }
    }
  }
 catch (  IOException e) {
    throw new DataException(e.getLocalizedMessage(),e);
  }
}

Fixed version (ground truth):
public RDAggrUtil(StreamManager manager,IBaseQueryDefinition qd) throws DataException {
  this.qd=qd;
  try {
    aggrIndexStream=manager.getInStream(DataEngineContext.AGGR_INDEX_STREAM,StreamManager.ROOT_STREAM,StreamManager.SELF_SCOPE);
    int aggrSize=IOUtil.readInt(aggrIndexStream);
    DataInputStream aggrIndexDis=new DataInputStream(aggrIndexStream);
    valueStream=new DataInputStream(new WrapperedRAInputStream(manager.getInStream(DataEngineContext.AGGR_VALUE_STREAM,StreamManager.ROOT_STREAM,StreamManager.SELF_SCOPE),0,-1));
    for (int i=0; i < aggrSize; i++) {
      RDAggrValueHolder holder=new RDAggrValueHolder(valueStream);
      holders.put(holder.getName(),holder);
      if (i < aggrSize - 1) {
        long offset=IOUtil.readLong(aggrIndexDis);
        if (manager.getVersion() >= VersionManager.VERSION_2_5_2_1) {
          valueStream=new DataInputStream(new WrapperedRAInputStream(manager.getInStream(DataEngineContext.AGGR_VALUE_STREAM,StreamManager.ROOT_STREAM,StreamManager.SELF_SCOPE),offset,-1));
        }
 else {
          valueStream=new DataInputStream(new WrapperedRAInputStream(manager.getInStream(DataEngineContext.AGGR_VALUE_STREAM,StreamManager.ROOT_STREAM,StreamManager.SELF_SCOPE),offset + 1,-1));
        }
      }
    }
  }
 catch (  IOException e) {
    throw new DataException(e.getLocalizedMessage(),e);
  }
}
Program: 65885
Project: 65885
Buggy source:
public void close() throws DataException {
  try {
    if (valueStream != null) {
      valueStream.close();
    }
    if (aggrIndexStream != null) {
      aggrIndexStream.close();
    }
  }
 catch (  IOException ex) {
  }
}

Fixed version (ground truth):
public void close() throws DataException {
  try {
    if (!this.holders.isEmpty()) {
      Collection<RDAggrValueHolder> values=this.holders.values();
      Iterator<RDAggrValueHolder> iter=values.iterator();
      while (iter.hasNext()) {
        iter.next().close();
      }
    }
    if (aggrIndexStream != null) {
      aggrIndexStream.close();
    }
  }
 catch (  IOException ex) {
  }
}
Program: 65886
Project: 65886
Buggy source:
public DataExtractionTaskV1(ReportEngine engine,IReportDocument reader) throws EngineException {
  super(engine,IEngineTask.TASK_DATAEXTRACTION);
  IReportRunnable runnable=getOnPreparedRunnable(reader);
  setReportRunnable(runnable);
  ReportDocumentReader reportDocReaderImpl=(ReportDocumentReader)reader;
  Report reportIR=reportDocReaderImpl.getReportIR(executionContext.getReportDesign());
  executionContext.setReport(reportIR);
  this.report=executionContext.getReport();
  this.reportDocReader=reader;
  executionContext.setReportDocument(reportDocReader);
  executionContext.setFactoryMode(false);
  executionContext.setPresentationMode(true);
  ClassLoader classLoader=executionContext.getApplicationClassLoader();
  setParameters(reportDocReaderImpl.loadParameters(classLoader));
  usingParameterValues();
  executionContext.registerGlobalBeans(reportDocReaderImpl.loadVariables(classLoader));
}

Fixed version (ground truth):
public DataExtractionTaskV1(ReportEngine engine,IReportDocument reader) throws EngineException {
  super(engine,IEngineTask.TASK_DATAEXTRACTION);
  IReportRunnable runnable=getOnPreparedRunnable(reader);
  setReportRunnable(runnable);
  ReportDocumentReader reportDocReaderImpl=(ReportDocumentReader)reader;
  Report reportIR=reportDocReaderImpl.getReportIR(executionContext.getReportDesign());
  executionContext.setReport(reportIR);
  this.report=executionContext.getReport();
  this.reportDocReader=reader;
  executionContext.setReportDocument(reportDocReader);
  executionContext.setFactoryMode(false);
  executionContext.setPresentationMode(true);
  ClassLoader classLoader=executionContext.getApplicationClassLoader();
  setParameters(reportDocReaderImpl.loadParameters(classLoader));
  usingParameterValues();
  executionContext.registerGlobalBeans(reportDocReaderImpl.loadVariables(classLoader));
  loadReportVariable();
}
Program: 65887
Project: 65887
Buggy source:
public Binding(String name,IBaseExpression expr){
  this.name=name;
  this.expr=expr;
  this.aggregateOn=new ArrayList();
  this.argument=new LinkedHashMap();
  this.orderedArgument=new ArrayList();
  if (expr != null)   this.dataType=expr.getDataType();
 else   this.dataType=DataType.ANY_TYPE;
  this.exportable=true;
}

Fixed version (ground truth):
public Binding(String name,IBaseExpression expr){
  this.name=name;
  this.expr=expr;
  this.aggregateOn=new ArrayList<String>();
  this.argument=new LinkedHashMap<String,IBaseExpression>();
  this.orderedArgument=new ArrayList<IBaseExpression>();
  if (expr != null)   this.dataType=expr.getDataType();
 else   this.dataType=DataType.ANY_TYPE;
  this.exportable=true;
}
Program: 65889
Project: 65889
Buggy source:
/** 
 * @param outputStream
 * @param filterList
 * @throws DataException
 */
static void saveFilterDefn(OutputStream outputStream,List filterList) throws DataException {
  DataOutputStream dos=new DataOutputStream(outputStream);
  int size=filterList == null ? 0 : filterList.size();
  try {
    IOUtil.writeInt(dos,size);
    for (int i=0; i < size; i++) {
      IFilterDefinition filterDefn=(IFilterDefinition)filterList.get(i);
      ExprUtil.saveBaseExpr(dos,filterDefn.getExpression());
      IOUtil.writeBool(dos,filterDefn.updateAggregation());
    }
    dos.flush();
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}

Fixed version (ground truth):
/** 
 * @param outputStream
 * @param filterList
 * @throws DataException
 */
static void saveFilterDefn(OutputStream outputStream,List filterList,int version) throws DataException {
  DataOutputStream dos=new DataOutputStream(outputStream);
  int size=filterList == null ? 0 : filterList.size();
  try {
    IOUtil.writeInt(dos,size);
    for (int i=0; i < size; i++) {
      IFilterDefinition filterDefn=(IFilterDefinition)filterList.get(i);
      ExprUtil.saveBaseExpr(dos,filterDefn.getExpression());
      if (version >= VersionManager.VERSION_2_6_3_1)       IOUtil.writeBool(dos,filterDefn.updateAggregation());
    }
    dos.flush();
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}
Program: 65890
Project: 65890
Buggy source:
/** 
 * @param outputStream
 * @param filterList
 * @throws DataException
 */
static void saveGroupDefn(OutputStream outputStream,List groupList,int version) throws DataException {
  DataOutputStream dos=new DataOutputStream(outputStream);
  int size=groupList == null ? 0 : groupList.size();
  try {
    IOUtil.writeInt(dos,size);
    for (int i=0; i < size; i++) {
      IGroupDefinition groupDefn=(IGroupDefinition)groupList.get(i);
      IOUtil.writeString(dos,groupDefn.getName());
      IOUtil.writeString(dos,groupDefn.getKeyColumn());
      IOUtil.writeString(dos,groupDefn.getKeyExpression());
      IOUtil.writeInt(dos,groupDefn.getInterval());
      IOUtil.writeDouble(dos,groupDefn.getIntervalRange());
      IOUtil.writeInt(dos,groupDefn.getSortDirection());
      FilterDefnUtil.saveFilterDefn(dos,groupDefn.getFilters());
      QueryDefnIOUtil.saveSorts(dos,groupDefn.getSorts(),version);
      QueryDefnIOUtil.saveSubQuery(dos,groupDefn.getSubqueries(),version);
    }
    dos.flush();
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}

Fixed version (ground truth):
/** 
 * @param outputStream
 * @param filterList
 * @throws DataException
 */
static void saveGroupDefn(OutputStream outputStream,List groupList,int version) throws DataException {
  DataOutputStream dos=new DataOutputStream(outputStream);
  int size=groupList == null ? 0 : groupList.size();
  try {
    IOUtil.writeInt(dos,size);
    for (int i=0; i < size; i++) {
      IGroupDefinition groupDefn=(IGroupDefinition)groupList.get(i);
      IOUtil.writeString(dos,groupDefn.getName());
      IOUtil.writeString(dos,groupDefn.getKeyColumn());
      IOUtil.writeString(dos,groupDefn.getKeyExpression());
      IOUtil.writeInt(dos,groupDefn.getInterval());
      IOUtil.writeDouble(dos,groupDefn.getIntervalRange());
      IOUtil.writeInt(dos,groupDefn.getSortDirection());
      FilterDefnUtil.saveFilterDefn(dos,groupDefn.getFilters(),version);
      QueryDefnIOUtil.saveSorts(dos,groupDefn.getSorts(),version);
      QueryDefnIOUtil.saveSubQuery(dos,groupDefn.getSubqueries(),version);
    }
    dos.flush();
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}
Program: 65891
Project: 65891
Buggy source:
/** 
 * @param outputStream
 * @param queryDefn
 * @throws DataException
 * @throws IOException
 */
static void saveBaseQueryDefn(OutputStream outputStream,IBaseQueryDefinition queryDefn,int version) throws DataException {
  try {
    saveBinding(outputStream,queryDefn.getBindings(),version);
    FilterDefnUtil.saveFilterDefn(outputStream,queryDefn.getFilters());
    GroupDefnUtil.saveGroupDefn(outputStream,queryDefn.getGroups(),version);
    saveSorts(outputStream,queryDefn.getSorts(),version);
    IOUtil.writeInt(outputStream,queryDefn.getMaxRows());
    IOUtil.writeBool(outputStream,queryDefn.usesDetails());
    if (version >= VersionManager.VERSION_2_5_2_1)     IOUtil.writeBool(outputStream,queryDefn.cacheQueryResults());
    saveSubQuery(outputStream,queryDefn.getSubqueries(),version);
    saveQueryExecutionHints(outputStream,queryDefn.getQueryExecutionHints(),version);
    saveSummaryTableInfo(outputStream,queryDefn,version);
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}

Fixed version (ground truth):
/** 
 * @param outputStream
 * @param queryDefn
 * @throws DataException
 * @throws IOException
 */
static void saveBaseQueryDefn(OutputStream outputStream,IBaseQueryDefinition queryDefn,int version) throws DataException {
  try {
    saveBinding(outputStream,queryDefn.getBindings(),version);
    FilterDefnUtil.saveFilterDefn(outputStream,queryDefn.getFilters(),version);
    GroupDefnUtil.saveGroupDefn(outputStream,queryDefn.getGroups(),version);
    saveSorts(outputStream,queryDefn.getSorts(),version);
    IOUtil.writeInt(outputStream,queryDefn.getMaxRows());
    IOUtil.writeBool(outputStream,queryDefn.usesDetails());
    if (version >= VersionManager.VERSION_2_5_2_1)     IOUtil.writeBool(outputStream,queryDefn.cacheQueryResults());
    saveSubQuery(outputStream,queryDefn.getSubqueries(),version);
    saveQueryExecutionHints(outputStream,queryDefn.getQueryExecutionHints(),version);
    saveSummaryTableInfo(outputStream,queryDefn,version);
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}
Program: 65892
Project: 65892
Buggy source:
public void onValidate(int type,Object model){
  if (type == ICrosstabModelListener.MEASURE_DETAIL && model instanceof AggregationCellHandle) {
    AggregationCellHandle cellHandle=(AggregationCellHandle)model;
    if (cellHandle.getContents().size() == 1 && cellHandle.getContents().get(0) instanceof DataItemHandle) {
      MeasureViewHandle measureView=(MeasureViewHandle)cellHandle.getContainer();
      DataItemHandle dataItem=(DataItemHandle)cellHandle.getContents().get(0);
      CrosstabAdaptUtil.formatDataItem(measureView.getCubeMeasure(),dataItem);
      ActionHandle actionHandle=measureView.getCubeMeasure().getActionHandle();
      if (actionHandle != null) {
        try {
          dataItem.setAction((Action)actionHandle.getStructure().copy());
        }
 catch (        SemanticException e) {
          ExceptionUtil.handle(e);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void onValidate(int type,Object model){
  if (type == ICrosstabModelListener.MEASURE_DETAIL && model instanceof AggregationCellHandle) {
    AggregationCellHandle cellHandle=(AggregationCellHandle)model;
    if (cellHandle.getContents().size() == 1 && cellHandle.getContents().get(0) instanceof DataItemHandle) {
      MeasureViewHandle measureView=(MeasureViewHandle)cellHandle.getContainer();
      DataItemHandle dataItem=(DataItemHandle)cellHandle.getContents().get(0);
      CrosstabAdaptUtil.formatDataItem(measureView.getCubeMeasure(),dataItem);
      if (measureView.getCubeMeasure() == null) {
        return;
      }
      ActionHandle actionHandle=measureView.getCubeMeasure().getActionHandle();
      if (actionHandle != null) {
        try {
          dataItem.setAction((Action)actionHandle.getStructure().copy());
        }
 catch (        SemanticException e) {
          ExceptionUtil.handle(e);
        }
      }
    }
  }
}
Program: 65895
Project: 65895
Buggy source:
public void end() throws SAXException {
  super.end();
  if (handler.versionNumber < VersionUtil.VERSION_3_2_13) {
    ((ModuleNameHelper)handler.module.getNameHelper()).addCachedLevel(getElement());
  }
}

Fixed version (ground truth):
public void end() throws SAXException {
  super.end();
  if (handler.versionNumber < VersionUtil.VERSION_3_2_13) {
    ((ModuleNameHelper)handler.module.getNameHelper()).addCachedLevel(getElement());
  }
  if (handler.versionNumber < VersionUtil.VERSION_3_2_23 && getElement().getProperty(handler.module,ILevelModel.DATE_TIME_LEVEL_TYPE) != null) {
    boolean isFound=false;
    ElementPropertyDefn attributesPropertyDefn=getElement().getPropertyDefn(ILevelModel.ATTRIBUTES_PROP);
    List attrs=(List)getElement().getProperty(handler.module,attributesPropertyDefn);
    if (attrs != null) {
      for (int i=0; i < attrs.size(); i++) {
        LevelAttribute attr=(LevelAttribute)attrs.get(i);
        if (LevelAttribute.DATE_TIME_ATTRIBUTE_NAME.equals(attr.getName())) {
          isFound=true;
          break;
        }
      }
    }
    if (!isFound) {
      Structure struct=null;
      if (getElement() instanceof TabularLevel) {
        LevelAttribute attribute=new LevelAttribute();
        attribute.setName(LevelAttribute.DATE_TIME_ATTRIBUTE_NAME);
        attribute.setDataType(getDataType((TabularLevel)this.getElement()));
        struct=attribute;
      }
 else       if (getElement() instanceof OdaLevel) {
        OdaLevelAttribute attribute=new OdaLevelAttribute();
        attribute.setName(LevelAttribute.DATE_TIME_ATTRIBUTE_NAME);
        attribute.setDataType(DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME);
        struct=attribute;
      }
      if (attributesPropertyDefn != null && struct != null) {
        ArrayList list=new ArrayList();
        list.add(struct);
        getElement().setProperty(attributesPropertyDefn,list);
      }
    }
  }
}
Program: 65896
Project: 65896
Buggy source:
/** 
 * Sets the default theme
 * @param elementHandle
 */
public static void setDefaultTheme(DesignElementHandle elementHandle){
  if (elementHandle instanceof ReportItemHandle && hasDefaultLibrary(elementHandle.getModuleHandle())) {
    ReportItemHandle reportItemHandle=(ReportItemHandle)elementHandle;
    PropertyHandle propertyHandle=reportItemHandle.getPropertyHandle(ReportItemHandle.THEME_PROP);
    List list=propertyHandle.getReferenceableElementList();
    String preFileName=getDefultLibraryFileName();
    for (int i=0; i < list.size(); i++) {
      ReportItemThemeHandle itemHandle=(ReportItemThemeHandle)list.get(i);
      if (itemHandle.getQualifiedName().startsWith(preFileName)) {
        try {
          if (propertyHandle.getValue() != null)           propertyHandle.setValue(itemHandle.getQualifiedName());
          break;
        }
 catch (        SemanticException e) {
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Sets the default theme
 * @param elementHandle
 */
public static void setDefaultTheme(DesignElementHandle elementHandle){
  if (elementHandle instanceof ReportItemHandle && hasDefaultLibrary(elementHandle.getModuleHandle())) {
    ReportItemHandle reportItemHandle=(ReportItemHandle)elementHandle;
    PropertyHandle propertyHandle=reportItemHandle.getPropertyHandle(ReportItemHandle.THEME_PROP);
    List list=propertyHandle.getReferenceableElementList();
    String preFileName=getDefultLibraryFileName();
    for (int i=0; i < list.size(); i++) {
      ReportItemThemeHandle itemHandle=(ReportItemThemeHandle)list.get(i);
      if (itemHandle.getQualifiedName().startsWith(preFileName)) {
        try {
          if (propertyHandle.getValue() == null)           propertyHandle.setValue(itemHandle.getQualifiedName());
          break;
        }
 catch (        SemanticException e) {
        }
      }
    }
  }
}
Program: 65898
Project: 65898
Buggy source:
public DriverClassLoader(Collection<String> driverClassPath) throws OdaException {
  super(new URL[0],DriverClassLoader.class.getClassLoader());
  logger.entering(DriverClassLoader.class.getName(),"String_Node_Str");
  this.driverClassPath=driverClassPath;
  refreshURLs();
}

Fixed version (ground truth):
public DriverClassLoader(Collection<String> driverClassPath,ClassLoader parent) throws OdaException {
  super(new URL[0],parent != null ? parent : DriverClassLoader.class.getClassLoader());
  logger.entering(DriverClassLoader.class.getName(),"String_Node_Str");
  this.driverClassPath=driverClassPath;
  refreshURLs();
}
Program: 65899
Project: 65899
Buggy source:
public Object[] getChildren(Object parent){
  Object[] children=super.getChildren(parent);
  if (CURRENT_CUBE.equals(parent)) {
    ExpressionFilter ft=new ExpressionFilter(){
      public boolean select(      Object parentElement,      Object element){
        if (CURRENT_CUBE.equals(parentElement) && element instanceof PropertyHandle) {
          if (((PropertyHandle)element).getPropertyDefn().getName().equals(ICubeModel.MEASURE_GROUPS_PROP)) {
            return true;
          }
          return false;
        }
        return true;
      }
    }
;
    children=ft.filter(parent,children);
  }
  return children;
}

Fixed version (ground truth):
public Object[] getChildren(Object parent){
  Object[] children=super.getChildren(parent);
  if (CURRENT_CUBE.equals(parent)) {
    ExpressionFilter ft=new ExpressionFilter(){
      public boolean select(      Object parentElement,      Object element){
        if (CURRENT_CUBE.equals(parentElement) && element instanceof PropertyHandle) {
          if (((PropertyHandle)element).getPropertyDefn().getName().equals(ICubeModel.MEASURE_GROUPS_PROP)) {
            return true;
          }
          return false;
        }
        return true;
      }
    }
;
    children=ft.filter(parent,children);
  }
 else   if (parent instanceof MeasureGroupHandle) {
    ExpressionFilter ft=new ExpressionFilter(){
      public boolean select(      Object parentElement,      Object element){
        if (!isDerivedMeasure()) {
          return true;
        }
        if (!(elementHandle instanceof MeasureHandle)) {
          return true;
        }
        CubeHandle cubeHandle=(CubeHandle)((MeasureGroupHandle)parentElement).getContainer();
        List<MeasureHandle> measureHnadles=new ArrayList<MeasureHandle>();
        try {
          measureHnadles=CubeMeasureUtil.getIndependentReferences(cubeHandle,elementHandle.getName());
        }
 catch (        BirtException e) {
          return true;
        }
        if (measureHnadles.contains(element)) {
          return true;
        }
        return false;
      }
    }
;
    children=ft.filter(parent,children);
  }
  return children;
}
Program: 65900
Project: 65900
Buggy source:
public boolean select(Object parentElement,Object element){
  if (CURRENT_CUBE.equals(parentElement) && element instanceof PropertyHandle) {
    if (((PropertyHandle)element).getPropertyDefn().getName().equals(ICubeModel.MEASURE_GROUPS_PROP)) {
      return true;
    }
    return false;
  }
  return true;
}

Fixed version (ground truth):
public boolean select(Object parentElement,Object element){
  if (!isDerivedMeasure()) {
    return true;
  }
  if (!(elementHandle instanceof MeasureHandle)) {
    return true;
  }
  CubeHandle cubeHandle=(CubeHandle)((MeasureGroupHandle)parentElement).getContainer();
  List<MeasureHandle> measureHnadles=new ArrayList<MeasureHandle>();
  try {
    measureHnadles=CubeMeasureUtil.getIndependentReferences(cubeHandle,elementHandle.getName());
  }
 catch (  BirtException e) {
    return true;
  }
  if (measureHnadles.contains(element)) {
    return true;
  }
  return false;
}
Program: 65902
Project: 65902
Buggy source:
public long getTotalPage() throws EngineException {
  checkRunningErrors();
  LogicalPageSequence visiblePages=loadVisiblePages();
  if (visiblePages != null) {
    return visiblePages.getTotalVisiblePageCount();
  }
  return reportDocument.getPageCount();
}

Fixed version (ground truth):
public long getTotalPage() throws EngineException {
  LogicalPageSequence visiblePages=loadVisiblePages();
  if (visiblePages != null) {
    return visiblePages.getTotalVisiblePageCount();
  }
  return reportDocument.getPageCount();
}
Program: 65903
Project: 65903
Buggy source:
public RunStatusReader(IReportDocument document){
  try {
    IDocArchiveReader reader=document.getArchive();
    runStatusStream=reader.getStream(ReportDocumentConstants.RUN_STATUS_STREAM);
  }
 catch (  IOException e) {
    logger.log(Level.WARNING,"String_Node_Str");
    close();
  }
}

Fixed version (ground truth):
public RunStatusReader(IReportDocument document){
  try {
    IDocArchiveReader reader=document.getArchive();
    boolean existStream=reader.exists(ReportDocumentConstants.RUN_STATUS_STREAM);
    if (existStream) {
      runStatusStream=reader.getStream(ReportDocumentConstants.RUN_STATUS_STREAM);
    }
  }
 catch (  IOException e) {
    logger.log(Level.WARNING,"String_Node_Str");
    close();
  }
}
Program: 65904
Project: 65904
Buggy source:
public String getStuats(){
  if (runStatusStream == null) {
    return null;
  }
  try {
    DataInputStream in=new DataInputStream(runStatusStream);
    int errorSize=IOUtil.readInt(in);
    StringBuilder message=new StringBuilder();
    for (int i=0; i < errorSize; i++) {
      message.append(IOUtil.readString(in)).append(System.getProperty("String_Node_Str"));
    }
    return message.toString();
  }
 catch (  IOException e) {
    logger.log(Level.WARNING,"String_Node_Str");
  }
  return null;
}

Fixed version (ground truth):
public String getStuats(){
  if (runStatusStream == null) {
    return null;
  }
  try {
    DataInputStream in=new DataInputStream(runStatusStream);
    int errorSize=IOUtil.readInt(in);
    if (errorSize > 0) {
      StringBuilder message=new StringBuilder();
      for (int i=0; i < errorSize; i++) {
        message.append(IOUtil.readString(in)).append("String_Node_Str");
      }
      return message.toString();
    }
  }
 catch (  IOException e) {
    logger.log(Level.WARNING,"String_Node_Str");
  }
  return null;
}
Program: 65906
Project: 65906
Buggy source:
private Series getConvertedSeries(Series series,int seriesIndex){
  if (series.getClass().getName().equals(SeriesImpl.class.getName())) {
    return series;
  }
  PieSeries pieseries=(PieSeries)ChartCacheManager.getInstance().findSeries(PieSeriesImpl.class.getName(),seriesIndex);
  if (pieseries == null) {
    pieseries=(PieSeries)getSeries(false);
  }
  ChartUIUtil.copyGeneralSeriesAttributes(series,pieseries);
  return pieseries;
}

Fixed version (ground truth):
protected Series getConvertedSeries(Series series,int seriesIndex){
  if (series.getClass().getName().equals(SeriesImpl.class.getName())) {
    return series;
  }
  PieSeries pieseries=(PieSeries)ChartCacheManager.getInstance().findSeries(PieSeriesImpl.class.getName(),seriesIndex);
  if (pieseries == null) {
    pieseries=(PieSeries)getSeries(false);
  }
  ChartUIUtil.copyGeneralSeriesAttributes(series,pieseries);
  return pieseries;
}
Program: 65907
Project: 65907
Buggy source:
/** 
 * This method is called upon plug-in activation.
 * @param context bundle context
 * @exception Exception
 */
public void start(BundleContext context) throws Exception {
  super.start(context);
  bundleContext=context;
  plugin.getPluginPreferences().setDefault(WebViewer.MASTER_PAGE_CONTENT,true);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXROW,DEFAULT_MAX_ROWS);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXCUBEROWLEVEL,DEFAULT_MAX_CUBEROWLEVELS);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXCUBECOLUMNLEVEL,DEFAULT_MAX_CUBECOLUMNLEVELS);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXINMEMORYCUBESIZE,DEFAULT_MAX_IN_MEMORY_CUBE_SIZE);
  plugin.getPluginPreferences().setDefault(WebViewer.USER_LOCALE,ULocale.getDefault().getDisplayName());
  plugin.getPluginPreferences().setDefault(WebViewer.USER_TIME_ZONE,TimeZone.getDefault().getID());
  plugin.getPluginPreferences().setDefault(WebViewer.BIDI_ORIENTATION,WebViewer.BIDI_ORIENTATION_AUTO);
  if (plugin.getStateLocation() != null)   System.setProperty(BIRT_VIEWER_WORKING_PATH,plugin.getStateLocation().toOSString());
  String rootPath=getFilePath("String_Node_Str");
  if (rootPath != null)   System.setProperty(BIRT_VIEWER_ROOT_PATH,rootPath);
  System.setProperty(BIRT_IS_DESIGNER,"String_Node_Str");
  WebViewer.getCurrentWebApp();
}

Fixed version (ground truth):
/** 
 * This method is called upon plug-in activation.
 * @param context bundle context
 * @exception Exception
 */
public void start(BundleContext context) throws Exception {
  super.start(context);
  bundleContext=context;
  plugin.getPluginPreferences().setDefault(WebViewer.MASTER_PAGE_CONTENT,true);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXROW,DEFAULT_MAX_ROWS);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXCUBEROWLEVEL,DEFAULT_MAX_CUBEROWLEVELS);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXCUBECOLUMNLEVEL,DEFAULT_MAX_CUBECOLUMNLEVELS);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXINMEMORYCUBESIZE,DEFAULT_MAX_IN_MEMORY_CUBE_SIZE);
  plugin.getPluginPreferences().setDefault(WebViewer.USER_LOCALE,ULocale.getDefault().getLanguage() + "String_Node_Str" + ULocale.getDefault().getCountry());
  plugin.getPluginPreferences().setDefault(WebViewer.USER_TIME_ZONE,TimeZone.getDefault().getID());
  plugin.getPluginPreferences().setDefault(WebViewer.BIDI_ORIENTATION,WebViewer.BIDI_ORIENTATION_AUTO);
  if (plugin.getStateLocation() != null)   System.setProperty(BIRT_VIEWER_WORKING_PATH,plugin.getStateLocation().toOSString());
  String rootPath=getFilePath("String_Node_Str");
  if (rootPath != null)   System.setProperty(BIRT_VIEWER_ROOT_PATH,rootPath);
  System.setProperty(BIRT_IS_DESIGNER,"String_Node_Str");
  WebViewer.getCurrentWebApp();
}
Program: 65908
Project: 65908
Buggy source:
public long getTotalPage() throws EngineException {
  LogicalPageSequence visiblePages=loadVisiblePages();
  if (visiblePages != null) {
    return visiblePages.getTotalVisiblePageCount();
  }
  return reportDocument.getPageCount();
}

Fixed version (ground truth):
public long getTotalPage() throws EngineException {
  checkRunningErrors();
  LogicalPageSequence visiblePages=loadVisiblePages();
  if (visiblePages != null) {
    return visiblePages.getTotalVisiblePageCount();
  }
  return reportDocument.getPageCount();
}
Program: 65911
Project: 65911
Buggy source:
private boolean isTitleEnabled(){
  if (btnAutoTitle != null) {
    return !getContext().getUIFactory().isSetInvisible(getChart().getTitle()) && !isAutoTitle();
  }
 else {
    return getChart().getTitle().isSetVisible() && getChart().getTitle().isVisible() && getChart().getTitle().getLabel().getCaption().getValue() != null && !isAutoTitle();
  }
}

Fixed version (ground truth):
private boolean isTitleEnabled(){
  return !getContext().getUIFactory().isSetInvisible(getChart().getTitle()) && getChart().getTitle().getLabel().getCaption().getValue() != null && !isAutoTitle();
}
Program: 65912
Project: 65912
Buggy source:
public void handleEvent(Event event){
  if (event.widget.equals(txtTitle)) {
    if (txtTitle.getText() == null || txtTitle.getText().trim().length() == 0) {
      getChart().getTitle().getLabel().getCaption().setValue(null);
    }
 else {
      getChart().getTitle().getLabel().getCaption().setValue(txtTitle.getText());
    }
  }
 else   if (event.widget.equals(fdcFont)) {
    if (event.type == FontDefinitionComposite.FONT_CHANTED_EVENT) {
      getChart().getTitle().getLabel().getCaption().setFont((FontDefinition)((Object[])event.data)[0]);
      getChart().getTitle().getLabel().getCaption().setColor((ColorDefinition)((Object[])event.data)[1]);
    }
  }
}

Fixed version (ground truth):
public void handleEvent(Event event){
  if (event.widget.equals(txtTitle)) {
    getChart().getTitle().getLabel().getCaption().setValue(txtTitle.getText());
  }
 else   if (event.widget.equals(fdcFont)) {
    if (event.type == FontDefinitionComposite.FONT_CHANTED_EVENT) {
      getChart().getTitle().getLabel().getCaption().setFont((FontDefinition)((Object[])event.data)[0]);
      getChart().getTitle().getLabel().getCaption().setColor((ColorDefinition)((Object[])event.data)[1]);
    }
  }
}
Program: 65919
Project: 65919
Buggy source:
public Chart getModel(String sSubType,Orientation orientation,String sDimension,Chart currentChart){
  ChartWithAxes newChart=null;
  if (currentChart != null) {
    newChart=(ChartWithAxes)getConvertedChart(currentChart,sSubType,orientation,sDimension);
    if (newChart != null) {
      return newChart;
    }
  }
  newChart=ChartWithAxesImpl.createDefault();
  newChart.setType(TYPE_LITERAL);
  newChart.setSubType(sSubType);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",orientation,orientation == null);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",getDimensionFor(sDimension),sDimension == null);
  Axis xAxis=newChart.getAxes().get(0);
  SeriesDefinition sdX=SeriesDefinitionImpl.createDefault();
  Series categorySeries=SeriesImpl.createDefault();
  sdX.getSeries().add(categorySeries);
  xAxis.getSeriesDefinitions().add(sdX);
  Axis yAxis=xAxis.getAssociatedAxes().get(0);
  SeriesDefinition sdY=SeriesDefinitionImpl.createDefault();
  Series valueSeries=DifferenceSeriesImpl.createDefault();
  sdY.getSeries().add(valueSeries);
  yAxis.getSeriesDefinitions().add(sdY);
  addSampleData(newChart);
  return newChart;
}

Fixed version (ground truth):
public Chart getModel(String sSubType,Orientation orientation,String sDimension,Chart currentChart){
  ChartWithAxes newChart=null;
  if (currentChart != null) {
    newChart=(ChartWithAxes)getConvertedChart(currentChart,sSubType,orientation,sDimension);
    if (newChart != null) {
      return newChart;
    }
  }
  newChart=ChartWithAxesImpl.createDefault();
  newChart.setType(TYPE_LITERAL);
  newChart.setSubType(sSubType);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",orientation,orientation == null);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",getDimensionFor(sDimension),sDimension == null);
  try {
    ChartElementUtil.setDefaultValue(newChart.getAxes().get(0),"String_Node_Str",true);
  }
 catch (  ChartException e) {
  }
  Axis xAxis=newChart.getAxes().get(0);
  SeriesDefinition sdX=SeriesDefinitionImpl.createDefault();
  Series categorySeries=SeriesImpl.createDefault();
  sdX.getSeries().add(categorySeries);
  xAxis.getSeriesDefinitions().add(sdX);
  Axis yAxis=xAxis.getAssociatedAxes().get(0);
  SeriesDefinition sdY=SeriesDefinitionImpl.createDefault();
  Series valueSeries=DifferenceSeriesImpl.createDefault();
  sdY.getSeries().add(valueSeries);
  yAxis.getSeriesDefinitions().add(sdY);
  addSampleData(newChart);
  return newChart;
}
Program: 65921
Project: 65921
Buggy source:
public Chart getModel(String sSubType,Orientation orientation,String sDimension,Chart currentChart){
  ChartWithAxes newChart=null;
  if (currentChart != null) {
    newChart=(ChartWithAxes)getConvertedChart(currentChart,sSubType,orientation,sDimension);
    if (newChart != null) {
      return newChart;
    }
  }
  newChart=ChartWithAxesImpl.createDefault();
  newChart.setType(TYPE_LITERAL);
  newChart.setSubType(sSubType);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",getDimensionFor(sDimension),sDimension == null);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",orientation,orientation == null);
  Axis xAxis=newChart.getAxes().get(0);
  xAxis.getLabel().setVisible(false);
  SeriesDefinition sdX=SeriesDefinitionImpl.createDefault();
  Series categorySeries=SeriesImpl.createDefault();
  sdX.getSeries().add(categorySeries);
  xAxis.getSeriesDefinitions().add(sdX);
  Axis yAxis=xAxis.getAssociatedAxes().get(0);
  SeriesDefinition sdY=SeriesDefinitionImpl.createDefault();
  Series valueSeries=GanttSeriesImpl.createDefault();
  sdY.getSeries().add(valueSeries);
  yAxis.getSeriesDefinitions().add(sdY);
  addSampleData(newChart);
  return newChart;
}

Fixed version (ground truth):
public Chart getModel(String sSubType,Orientation orientation,String sDimension,Chart currentChart){
  ChartWithAxes newChart=null;
  if (currentChart != null) {
    newChart=(ChartWithAxes)getConvertedChart(currentChart,sSubType,orientation,sDimension);
    if (newChart != null) {
      return newChart;
    }
  }
  newChart=ChartWithAxesImpl.createDefault();
  newChart.setType(TYPE_LITERAL);
  newChart.setSubType(sSubType);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",getDimensionFor(sDimension),sDimension == null);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",orientation,orientation == null);
  try {
    ChartElementUtil.setDefaultValue(newChart.getAxes().get(0),"String_Node_Str",true);
  }
 catch (  ChartException e) {
  }
  Axis xAxis=newChart.getAxes().get(0);
  xAxis.getLabel().setVisible(false);
  SeriesDefinition sdX=SeriesDefinitionImpl.createDefault();
  Series categorySeries=SeriesImpl.createDefault();
  sdX.getSeries().add(categorySeries);
  xAxis.getSeriesDefinitions().add(sdX);
  Axis yAxis=xAxis.getAssociatedAxes().get(0);
  SeriesDefinition sdY=SeriesDefinitionImpl.createDefault();
  Series valueSeries=GanttSeriesImpl.createDefault();
  sdY.getSeries().add(valueSeries);
  yAxis.getSeriesDefinitions().add(sdY);
  addSampleData(newChart);
  return newChart;
}
Program: 65925
Project: 65925
Buggy source:
public Chart getModel(String sSubType,Orientation orientation,String sDimension,Chart currentChart){
  ChartWithAxes newChart=null;
  if (currentChart != null) {
    newChart=(ChartWithAxes)getConvertedChart(currentChart,sSubType,orientation,sDimension);
    if (newChart != null) {
      return newChart;
    }
  }
  newChart=ChartWithAxesImpl.createDefault();
  newChart.setType(TYPE_LITERAL);
  newChart.setSubType(sSubType);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",orientation,orientation == null);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",getDimensionFor(sDimension),sDimension == null);
  Axis xAxis=newChart.getAxes().get(0);
  SeriesDefinition sdX=SeriesDefinitionImpl.createDefault();
  Series categorySeries=SeriesImpl.createDefault();
  sdX.getSeries().add(categorySeries);
  xAxis.getSeriesDefinitions().add(sdX);
  Axis yAxis=xAxis.getAssociatedAxes().get(0);
  SeriesDefinition sdY=SeriesDefinitionImpl.createDefault();
  Series valueSeries=StockSeriesImpl.createDefault();
  if (BAR_STICK_SUBTYPE_LITERAL.equals(sSubType)) {
    ((StockSeries)valueSeries).setShowAsBarStick(true);
  }
  sdY.getSeries().add(valueSeries);
  yAxis.getSeriesDefinitions().add(sdY);
  addSampleData(newChart);
  return newChart;
}

Fixed version (ground truth):
public Chart getModel(String sSubType,Orientation orientation,String sDimension,Chart currentChart){
  ChartWithAxes newChart=null;
  if (currentChart != null) {
    newChart=(ChartWithAxes)getConvertedChart(currentChart,sSubType,orientation,sDimension);
    if (newChart != null) {
      return newChart;
    }
  }
  newChart=ChartWithAxesImpl.createDefault();
  newChart.setType(TYPE_LITERAL);
  newChart.setSubType(sSubType);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",orientation,orientation == null);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",getDimensionFor(sDimension),sDimension == null);
  try {
    ChartElementUtil.setDefaultValue(newChart.getAxes().get(0),"String_Node_Str",true);
  }
 catch (  ChartException e) {
  }
  Axis xAxis=newChart.getAxes().get(0);
  SeriesDefinition sdX=SeriesDefinitionImpl.createDefault();
  Series categorySeries=SeriesImpl.createDefault();
  sdX.getSeries().add(categorySeries);
  xAxis.getSeriesDefinitions().add(sdX);
  Axis yAxis=xAxis.getAssociatedAxes().get(0);
  SeriesDefinition sdY=SeriesDefinitionImpl.createDefault();
  Series valueSeries=StockSeriesImpl.createDefault();
  if (BAR_STICK_SUBTYPE_LITERAL.equals(sSubType)) {
    ((StockSeries)valueSeries).setShowAsBarStick(true);
  }
  sdY.getSeries().add(valueSeries);
  yAxis.getSeriesDefinitions().add(sdY);
  addSampleData(newChart);
  return newChart;
}
Program: 65926
Project: 65926
Buggy source:
@Override public void addListener(int eventType,Listener listener){
  super.addListener(eventType,listener);
  button.addListener(eventType,this);
}

Fixed version (ground truth):
@Override public void addListener(int eventType,Listener listener){
  super.addListener(eventType,listener);
  if (button != null) {
    button.addListener(eventType,this);
  }
}
Program: 65927
Project: 65927
Buggy source:
@Override public void addListener(int eventType,Listener listener){
  super.addListener(eventType,listener);
  spinner.addListener(eventType,this);
}

Fixed version (ground truth):
@Override public void addListener(int eventType,Listener listener){
  super.addListener(eventType,listener);
  if (spinner != null) {
    spinner.addListener(eventType,this);
  }
}
Program: 65929
Project: 65929
Buggy source:
protected void populateLists(){
  NameSet nameSet=LiteralHelper.legendBehaviorTypeSet;
  if (isBehaviorSupported()) {
    cmbLegendBehavior.setItems(nameSet.getDisplayNames());
    cmbLegendBehavior.setItemData(nameSet.getNames());
    cmbLegendBehavior.setSelection(getChart().getInteractivity().getLegendBehavior().getName());
  }
 else {
    cmbLegendBehavior.setItems(new String[]{nameSet.getDisplayNames()[0]});
    cmbLegendBehavior.setItemData(new String[]{nameSet.getNames()[0]});
    cmbLegendBehavior.select(0);
  }
}

Fixed version (ground truth):
protected void populateLists(){
  NameSet nameSet=LiteralHelper.legendBehaviorTypeSet;
  if (isBehaviorSupported()) {
    cmbLegendBehavior.setItems(nameSet.getDisplayNames());
    cmbLegendBehavior.setItemData(nameSet.getNames());
    cmbLegendBehavior.setSelection(getChart().getInteractivity().getLegendBehavior().getName());
  }
 else {
    cmbLegendBehavior.setItems(new String[]{nameSet.getDisplayNames()[0]});
    cmbLegendBehavior.setItemData(new String[]{nameSet.getNames()[0]});
    cmbLegendBehavior.setSelection(getChart().getInteractivity().getLegendBehavior().getName());
  }
}
Program: 65930
Project: 65930
Buggy source:
/** 
 * @param name
 * @param factTableJointColumnNames
 * @param DimJointColumnNames
 * @param dimensions
 * @param factTable
 * @param measureColumns
 * @param stopSign
 * @throws IOException
 * @throws BirtException
 */
public void createCube(String name,String[][] factTableJointColumnNames,String[][] DimJointColumnNames,IDimension[] dimensions,IDatasetIterator factTable,String[] measureColumns,String[] measureAggrFunctionNames,long cacheSize,StopSign stopSign) throws IOException, BirtException {
  if (dimensions.length == 0) {
    throw new DataException(ResourceConstants.MISSING_DIMENSION_IN_CUBE,name);
  }
  Cube cube=new Cube(name,documentManager);
  cube.create(factTableJointColumnNames,DimJointColumnNames,dimensions,factTable,measureColumns,measureAggrFunctionNames,cacheSize,stopSign);
  cube.close();
  documentManager.flush();
}

Fixed version (ground truth):
/** 
 * @param name
 * @param factTableJointColumnNames
 * @param DimJointColumnNames
 * @param dimensions
 * @param factTable
 * @param measureColumns
 * @param stopSign
 * @throws IOException
 * @throws BirtException
 */
public void createCube(String name,String[][] factTableJointColumnNames,String[][] DimJointColumnNames,IDimension[] dimensions,IDatasetIterator factTable,String[] measureColumns,Map calculatedMeasure,String[] measureAggrFunctionNames,long cacheSize,StopSign stopSign) throws IOException, BirtException {
  if (dimensions.length == 0) {
    throw new DataException(ResourceConstants.MISSING_DIMENSION_IN_CUBE,name);
  }
  Cube cube=new Cube(name,documentManager);
  cube.create(factTableJointColumnNames,DimJointColumnNames,dimensions,factTable,measureColumns,calculatedMeasure,measureAggrFunctionNames,cacheSize,stopSign);
  cube.close();
  documentManager.flush();
}
Program: 65931
Project: 65931
Buggy source:
/** 
 * @param factTableJointColumnNames
 * @param DimJointColumnNames
 * @param dimension
 * @param iterator
 * @param measureColumnName
 * @param stopSign
 * @throws IOException
 * @throws BirtException
 */
public void create(String[][] factTableJointColumnNames,String[][] DimJointColumnNames,IDimension[] dimension,IDatasetIterator iterator,String[] measureColumnName,long cacheSize,StopSign stopSign) throws IOException, BirtException {
  this.create(factTableJointColumnNames,DimJointColumnNames,dimension,iterator,measureColumnName,null,cacheSize,stopSign);
}

Fixed version (ground truth):
/** 
 * @param factTableJointColumnNames
 * @param DimJointColumnNames
 * @param dimension
 * @param iterator
 * @param measureColumnName
 * @param stopSign
 * @throws IOException
 * @throws BirtException
 */
public void create(String[][] factTableJointColumnNames,String[][] DimJointColumnNames,IDimension[] dimension,IDatasetIterator iterator,String[] measureColumnName,long cacheSize,StopSign stopSign) throws IOException, BirtException {
  this.create(factTableJointColumnNames,DimJointColumnNames,dimension,iterator,measureColumnName,null,null,cacheSize,stopSign);
}