nus-yam/ex-repair huggingface dataset:
Program: 78749
Project: 78749
Buggy source:
protected JSMethodRunner getRunner(Scriptable scope,String type,String name){
  if (runner == null) {
    String scopeName=type + "String_Node_Str" + name+ "String_Node_Str";
    runner=new JSMethodRunner(scope,scopeName);
  }
  return runner;
}

Fixed version (ground truth):
protected JSMethodRunner getRunner(Scriptable scope,String type,String name){
  String scopeName=type + "String_Node_Str" + name+ "String_Node_Str";
  runner=new JSMethodRunner(scope,scopeName);
  return runner;
}
Program: 78750
Project: 78750
Buggy source:
public DataExtractionTask(ReportEngine engine,IReportRunnable runnable,ReportDocumentReader reader){
  super(engine,runnable);
  this.reportDocReader=reader;
  executionContext.setReportDocument(reportDocReader);
  executionContext.setFactoryMode(false);
  executionContext.setPresentationMode(true);
  report=new ReportParser().parse(((ReportRunnable)runnable).getReport());
  populateContent();
  executionContext.setReport(report);
  setParameterValues(reportDocReader.getParameterValues());
  IDataEngine dataEngine=executionContext.getDataEngine();
  dataEngine.prepare(report,context);
}

Fixed version (ground truth):
public DataExtractionTask(ReportEngine engine,IReportRunnable runnable,ReportDocumentReader reader){
  super(engine,runnable);
  this.reportDocReader=reader;
  executionContext.setReportDocument(reportDocReader);
  executionContext.setFactoryMode(false);
  executionContext.setPresentationMode(true);
  report=new ReportParser().parse(((ReportRunnable)runnable).getReport());
  executionContext.setReport(report);
  setParameterValues(reportDocReader.getParameterValues());
  IDataEngine dataEngine=executionContext.getDataEngine();
  dataEngine.prepare(report,context);
}
Program: 78751
Project: 78751
Buggy source:
public Map getNamedExpressions(){
  if (namedExpressions == null)   namedExpressions=new HashMap();
  return namedExpressions;
}

Fixed version (ground truth):
/** 
 * return the named expression defined on the report
 * @return
 */
public Map getNamedExpressions(){
  if (namedExpressions == null)   namedExpressions=new HashMap();
  return namedExpressions;
}
Program: 78752
Project: 78752
Buggy source:
int toDteFilterOperator(String modelOpr){
}

Fixed version (ground truth):
public static int toDteFilterOperator(String modelOpr){
}
Program: 78753
Project: 78753
Buggy source:
/** 
 * create one Filter given a filter condition handle
 * @param handle a filter condition handle
 * @return the filter
 */
private IFilterDefinition createFilter(FilterConditionHandle handle){
  String filterExpr=handle.getExpr();
  if (filterExpr == null || filterExpr.length() == 0)   return null;
  String filterOpr=handle.getOperator();
  if (filterOpr == null || filterOpr.length() == 0)   return new FilterDefinition(new ScriptExpression(filterExpr));
  String column=filterExpr;
  int dteOpr=toDteFilterOperator(filterOpr);
  String operand1=handle.getValue1();
  String operand2=handle.getValue2();
  return new FilterDefinition(new ConditionalExpression(column,dteOpr,operand1,operand2));
}

Fixed version (ground truth):
/** 
 * create one Filter given a filter condition handle
 * @param handle a filter condition handle
 * @return the filter
 */
private IFilterDefinition createFilter(FilterConditionHandle handle){
  String filterExpr=handle.getExpr();
  if (filterExpr == null || filterExpr.length() == 0)   return null;
  String filterOpr=handle.getOperator();
  if (filterOpr == null || filterOpr.length() == 0)   return new FilterDefinition(new ScriptExpression(filterExpr));
  String column=filterExpr;
  int dteOpr=ModelDteApiAdapter.toDteFilterOperator(filterOpr);
  String operand1=handle.getValue1();
  String operand2=handle.getValue2();
  return new FilterDefinition(new ConditionalExpression(column,dteOpr,operand1,operand2));
}
Program: 78755
Project: 78755
Buggy source:
/** 
 * @param index
 * @param name
 * @param type
 * @param path
 * @param originalPath
 * @throws OdaException
 */
public ColumnInfo(int index,String name,String type,String path,String originalPath) throws OdaException {
  this.index=index;
  this.name=name;
  this.type=type;
  if (!DataTypes.isValidType(type))   throw new OdaException(Messages.getString("String_Node_Str"));
  this.path=fixTrailingAttr(buildPath(path));
  this.originalPath=originalPath;
  String[] originalPathFrags=originalPath.split("String_Node_Str");
  int lastTwoDotAbbrevationPosition=0;
  int numberOfConcretePathFragsBefore2DotAbb=0;
  for (int i=0; i < originalPathFrags.length; i++) {
    if (originalPathFrags[i].equals("String_Node_Str"))     lastTwoDotAbbrevationPosition=i;
  }
  for (int i=0; i < lastTwoDotAbbrevationPosition; i++) {
    if (!originalPathFrags[i].equals("String_Node_Str"))     numberOfConcretePathFragsBefore2DotAbb++;
  }
  int numberOf2DotAbb=lastTwoDotAbbrevationPosition - numberOfConcretePathFragsBefore2DotAbb + 1;
  backRefNumber=numberOf2DotAbb - numberOfConcretePathFragsBefore2DotAbb;
  if (backRefNumber < 0)   backRefNumber=0;
}

Fixed version (ground truth):
/** 
 * @param index
 * @param name
 * @param type
 * @param path
 * @param originalPath
 * @throws OdaException
 */
public ColumnInfo(int index,String name,String type,String path,String originalPath) throws OdaException {
  this.index=index;
  this.name=name;
  this.type=type;
  if (!DataTypes.isValidType(type))   throw new OdaException(Messages.getString("String_Node_Str"));
  this.path=fixTrailingAttr(buildPath(path));
  this.originalPath=originalPath;
  if (originalPath.matches("String_Node_Str")) {
    String[] originalPathFrags=originalPath.split("String_Node_Str");
    int lastTwoDotAbbrevationPosition=0;
    int numberOfConcretePathFragsBefore2DotAbb=0;
    for (int i=0; i < originalPathFrags.length; i++) {
      if (originalPathFrags[i].equals("String_Node_Str"))       lastTwoDotAbbrevationPosition=i;
    }
    for (int i=0; i < lastTwoDotAbbrevationPosition; i++) {
      if (!originalPathFrags[i].equals("String_Node_Str"))       numberOfConcretePathFragsBefore2DotAbb++;
    }
    int numberOf2DotAbb=lastTwoDotAbbrevationPosition - numberOfConcretePathFragsBefore2DotAbb + 1;
    backRefNumber=numberOf2DotAbb - numberOfConcretePathFragsBefore2DotAbb;
    if (backRefNumber < 0)     backRefNumber=0;
  }
 else {
    backRefNumber=0;
  }
}
Program: 78756
Project: 78756
Buggy source:
/** 
 * This method is used to populate the possible column path expressions List
 * @param rootPath the root path of the table the column in, must be absolute path.
 * @param columnPath the absolute column path.
 * @return
 */
public static List populateColumnPath(String rootPath,String columnPath){
}

Fixed version (ground truth):
/** 
 * This method is used to populate the possible column path expressions List
 * @param rootPath the root path of the table the column in, must be absolute path.
 * @param columnPath the absolute column path.
 * @return
 */
public static String populateColumnPath(String rootPath,String columnPath){
}
Program: 78757
Project: 78757
Buggy source:
protected List getPostTasks(){
  List retValue=new ArrayList();
  retValue.addAll(super.getPostTasks());
  if (container instanceof TableItem || container instanceof TableGroup || container instanceof TableRow) {
    TableItem table=LayoutUtil.getTableContainer(container);
    if (table != null)     retValue.add(new LayoutActivityTask(module,table));
  }
  NotificationEvent event=null;
  if (add && state != UNDONE_STATE || !add && state == UNDONE_STATE)   event=new ContentEvent(container,content,slotID,ContentEvent.ADD);
 else   event=new ContentEvent(container,content,slotID,ContentEvent.REMOVE);
  if (state == DONE_STATE)   event.setSender(sender);
  retValue.add(new NotificationRecordTask(container,event));
  if (add && state != UNDONE_STATE || !add && state == UNDONE_STATE) {
    if (isSelector(content))     retValue.add(new NotificationRecordTask(content,event,container.getRoot()));
    return retValue;
  }
  if (content instanceof Parameter || content instanceof ParameterGroup || content instanceof DataSet) {
    event=new ElementDeletedEvent(container,content);
    if (state == DONE_STATE)     event.setSender(sender);
    retValue.add(new NotificationRecordTask(content,event,container.getRoot()));
  }
  return retValue;
}

Fixed version (ground truth):
protected List getPostTasks(){
  List retValue=new ArrayList();
  retValue.addAll(super.getPostTasks());
  if (container instanceof TableItem || container instanceof TableGroup || container instanceof TableRow) {
    TableItem table=LayoutUtil.getTableContainer(container);
    if (table != null)     retValue.add(new LayoutActivityTask(module,table));
  }
  NotificationEvent event=null;
  if (add && state != UNDONE_STATE || !add && state == UNDONE_STATE)   event=new ContentEvent(container,content,slotID,ContentEvent.ADD);
 else   event=new ContentEvent(container,content,slotID,ContentEvent.REMOVE);
  if (state == DONE_STATE)   event.setSender(sender);
  retValue.add(new NotificationRecordTask(container,event));
  if (add && state != UNDONE_STATE || !add && state == UNDONE_STATE) {
    if (isSelector(content))     retValue.add(new NotificationRecordTask(content,event,container.getRoot()));
    return retValue;
  }
  if (content instanceof Parameter || content instanceof ParameterGroup || content instanceof DataSet|| content instanceof StyleElement) {
    event=new ElementDeletedEvent(container,content);
    if (state == DONE_STATE)     event.setSender(sender);
    retValue.add(new NotificationRecordTask(content,event,container.getRoot()));
  }
  return retValue;
}
Program: 78759
Project: 78759
Buggy source:
private String eval(String expr){
  if (expr == null) {
    return "String_Node_Str";
  }
 else {
    return expr;
  }
}

Fixed version (ground truth):
protected String eval(String expr){
  if (expr == null) {
    return "String_Node_Str";
  }
 else {
    return expr;
  }
}
Program: 78762
Project: 78762
Buggy source:
/** 
 * The constructor.
 * @param handler
 */
public BIRTActionRenderer(IHTMLActionHandler handler,Object context){
  this.handler=handler;
  this.context=context;
}

Fixed version (ground truth):
/** 
 * The constructor.
 * @param handler
 */
public BIRTActionRenderer(IHTMLActionHandler handler,Object context){
  this.handler=handler;
  this.context=((IReportContext)context).getAppContext().get(EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT);
}
Program: 78763
Project: 78763
Buggy source:
public void handleEvent(Event event){
  if (event.widget.equals(txtTitle)) {
    seriesDefn.getDesignTimeSeries().setSeriesIdentifier(txtTitle.getText());
  }
}

Fixed version (ground truth):
public void handleEvent(Event event){
  if (event.widget.equals(txtTitle)) {
    seriesDefn.getDesignTimeSeries().setSeriesIdentifier(txtTitle.getValue(txtTitle.getText()));
  }
}
Program: 78764
Project: 78764
Buggy source:
/** 
 * Gets all the data source binding to report element.
 * @return
 */
public List getDataSources(){
  return getModuleHandle().getAllDataSources();
}

Fixed version (ground truth):
/** 
 * Gets all the data source binding to report element.
 * @return
 */
public List getDataSources(){
  return getModuleHandle().getVisibleDataSources();
}
Program: 78765
Project: 78765
Buggy source:
public static List getDataSets(){
  return SessionHandleAdapter.getInstance().getReportDesignHandle().getAllDataSets();
}

Fixed version (ground truth):
public static List getDataSets(){
  return SessionHandleAdapter.getInstance().getReportDesignHandle().getVisibleDataSets();
}
Program: 78766
Project: 78766
Buggy source:
public static List getDataSources(){
  return SessionHandleAdapter.getInstance().getReportDesignHandle().getAllDataSources();
}

Fixed version (ground truth):
public static List getDataSources(){
  return SessionHandleAdapter.getInstance().getReportDesignHandle().getVisibleDataSources();
}
Program: 78767
Project: 78767
Buggy source:
protected boolean calculateEnabled(){
  return !SessionHandleAdapter.getInstance().getReportDesignHandle().getAllDataSets().isEmpty();
}

Fixed version (ground truth):
protected boolean calculateEnabled(){
  return !SessionHandleAdapter.getInstance().getReportDesignHandle().getVisibleDataSets().isEmpty();
}
Program: 78768
Project: 78768
Buggy source:
private void updateButtons(){
  boolean complete=false;
switch (selectedType) {
case BLOB_TYPE:
    complete=!StringUtil.isBlank(uriEditor.getText());
  previewButton.setEnabled(false);
if (SessionHandleAdapter.getInstance().getReportDesignHandle().getAllDataSets().isEmpty()) {
  bindingButton.setEnabled(false);
}
 else {
  bindingButton.setEnabled(true);
}
break;
case URI_TYPE:
complete=!StringUtil.isBlank(uriEditor.getText());
previewButton.setEnabled(complete);
break;
case EMBEDDED_TYPE:
complete=(embeddedImageList.getSelectionCount() > 0);
break;
}
getOkButton().setEnabled(complete);
}

Fixed version (ground truth):
private void updateButtons(){
  boolean complete=false;
switch (selectedType) {
case BLOB_TYPE:
    complete=!StringUtil.isBlank(uriEditor.getText());
  previewButton.setEnabled(false);
if (SessionHandleAdapter.getInstance().getReportDesignHandle().getVisibleDataSets().isEmpty()) {
  bindingButton.setEnabled(false);
}
 else {
  bindingButton.setEnabled(true);
}
break;
case URI_TYPE:
complete=!StringUtil.isBlank(uriEditor.getText());
previewButton.setEnabled(complete);
break;
case EMBEDDED_TYPE:
complete=(embeddedImageList.getSelectionCount() > 0);
break;
}
getOkButton().setEnabled(complete);
}
Program: 78769
Project: 78769
Buggy source:
private void refreshDataSets(){
  String selectedDataSetName=dataSetChooser.getText();
  String[] oldList=dataSetChooser.getItems();
  ArrayList avaiableList=new ArrayList();
  for (Iterator iter=SessionHandleAdapter.getInstance().getReportDesignHandle().getAllDataSets().iterator(); iter.hasNext(); ) {
    DataSetHandle dataSet=(DataSetHandle)iter.next();
    if (!dataSet.parametersIterator().hasNext()) {
      avaiableList.add(dataSet.getQualifiedName());
    }
  }
  String[] newList=(String[])avaiableList.toArray(new String[]{});
  if (oldList.length != newList.length) {
    dataSetChooser.setItems(newList);
    if (StringUtil.isBlank(selectedDataSetName)) {
      dataSetChooser.select(0);
      refreshColumns(false);
    }
 else {
      dataSetChooser.setText(selectedDataSetName);
    }
  }
}

Fixed version (ground truth):
private void refreshDataSets(){
  String selectedDataSetName=dataSetChooser.getText();
  String[] oldList=dataSetChooser.getItems();
  ArrayList avaiableList=new ArrayList();
  for (Iterator iter=SessionHandleAdapter.getInstance().getReportDesignHandle().getVisibleDataSets().iterator(); iter.hasNext(); ) {
    DataSetHandle dataSet=(DataSetHandle)iter.next();
    if (!dataSet.parametersIterator().hasNext()) {
      avaiableList.add(dataSet.getQualifiedName());
    }
  }
  String[] newList=(String[])avaiableList.toArray(new String[]{});
  if (oldList.length != newList.length) {
    dataSetChooser.setItems(newList);
    if (StringUtil.isBlank(selectedDataSetName)) {
      dataSetChooser.select(0);
      refreshColumns(false);
    }
 else {
      dataSetChooser.setText(selectedDataSetName);
    }
  }
}
Program: 78771
Project: 78771
Buggy source:
/** 
 * Gets all the DataSets available.
 * @return A String array contains all the DataSets.
 */
public static String[] getDataSets(){
  ArrayList list=new ArrayList();
  ModuleHandle handle=SessionHandleAdapter.getInstance().getReportDesignHandle();
  for (Iterator iterator=handle.getAllDataSets().iterator(); iterator.hasNext(); ) {
    DataSetHandle DataSetHandle=(DataSetHandle)iterator.next();
    list.add(DataSetHandle.getQualifiedName());
  }
  return (String[])list.toArray(new String[0]);
}

Fixed version (ground truth):
/** 
 * Gets all the DataSets available.
 * @return A String array contains all the DataSets.
 */
public static String[] getDataSets(){
  ArrayList list=new ArrayList();
  ModuleHandle handle=SessionHandleAdapter.getInstance().getReportDesignHandle();
  for (Iterator iterator=handle.getVisibleDataSets().iterator(); iterator.hasNext(); ) {
    DataSetHandle DataSetHandle=(DataSetHandle)iterator.next();
    list.add(DataSetHandle.getQualifiedName());
  }
  return (String[])list.toArray(new String[0]);
}
Program: 78772
Project: 78772
Buggy source:
/** 
 * Returns all data source handles that this modules and the included modules contain.
 * @return all data source handles that this modules and the includedmodules contain.
 */
public List getAllDataSources(){
  List elementList=module.getNameSpace(Module.DATA_SOURCE_NAME_SPACE).getElements();
  return generateHandleList(elementList);
}

Fixed version (ground truth):
/** 
 * Returns all data source handles that this modules and the included modules contain.
 * @return all data source handles that this modules and the includedmodules contain.
 */
public List getAllDataSources(){
  IModuleNameSpace namescope=module.getModuleNameSpace(Module.DATA_SOURCE_NAME_SPACE);
  List elementList=namescope.getElements();
  return generateHandleList(elementList);
}
Program: 78773
Project: 78773
Buggy source:
/** 
 * Returns all data set handles that this modules and the included modules contain.
 * @return all data set handles that this modules and the included modulescontain.
 */
public List getAllDataSets(){
  List elementList=module.getNameSpace(Module.DATA_SET_NAME_SPACE).getElements();
  return generateHandleList(elementList);
}

Fixed version (ground truth):
/** 
 * Returns all data set handles that this modules and the included modules contain.
 * @return all data set handles that this modules and the included modulescontain.
 */
public List getAllDataSets(){
  IModuleNameSpace namescope=module.getModuleNameSpace(Module.DATA_SET_NAME_SPACE);
  List elementList=namescope.getElements();
  return generateHandleList(elementList);
}
Program: 78774
Project: 78774
Buggy source:
/** 
 * Resolves element with the given element name and name space.
 * @param elementName name of the element
 * @param nameSpace name space
 * @return the resolved element if the name can be resolved, otherwise,return null.
 */
private DesignElement resolveNativeElement(String elementName,int nameSpace){
  ElementRefValue refValue=moduleNameSpaces[nameSpace].resolve(elementName,null);
  return refValue.getElement();
}

Fixed version (ground truth):
/** 
 * Resolves element with the given element name and name space.
 * @param elementName name of the element
 * @param nameSpace name space
 * @return the resolved element if the name can be resolved, otherwise,return null.
 */
private DesignElement resolveNativeElement(String elementName,int nameSpace){
  NameSpace namespace=nameSpaces[nameSpace];
  return namespace.getElement(elementName);
}
Program: 78775
Project: 78775
Buggy source:
/** 
 * Finds a data set by name in this module and the included modules.
 * @param name the name of the data set to find.
 * @return the data set, or null if the data set is not found.
 */
public DesignElement findDataSet(String name){
  return findElementInLibraries(name,DATA_SET_NAME_SPACE);
}

Fixed version (ground truth):
/** 
 * Finds a data set by name in this module and the included modules.
 * @param name the name of the data set to find.
 * @return the data set, or null if the data set is not found.
 */
public DesignElement findDataSet(String name){
  return resolveElement(name,DATA_SET_NAME_SPACE,null);
}
Program: 78776
Project: 78776
Buggy source:
/** 
 * Finds a data source by name in this module and the included modules.
 * @param name the name of the data source to find.
 * @return the data source, or null if the data source is not found.
 */
public DesignElement findDataSource(String name){
  return findElementInLibraries(name,DATA_SOURCE_NAME_SPACE);
}

Fixed version (ground truth):
/** 
 * Finds a data source by name in this module and the included modules.
 * @param name the name of the data source to find.
 * @return the data source, or null if the data source is not found.
 */
public DesignElement findDataSource(String name){
  return resolveElement(name,DATA_SOURCE_NAME_SPACE,null);
}
Program: 78777
Project: 78777
Buggy source:
/** 
 * Resolves an element reference. Look up the name in the name space of the target element type. If the target is found, replace the element name with the cached element.
 * @param module the report design
 * @param defn the definition of the element ref property
 * @param ref the element reference
 */
public void resolve(Module module,PropertyDefn defn,ElementRefValue ref){
  if (ref.isResolved())   return;
  ElementDefn targetDefn=(ElementDefn)defn.getTargetElementType();
  IModuleNameSpace elementResolver=module.getModuleNameSpace(targetDefn.getNameSpaceID());
  String name=ReferenceValueUtil.needTheNamespacePrefix(ref,null,module);
  DesignElement target=null;
  target=elementResolver.resolve(name,defn).getElement();
  if (target != null)   ref.resolve(target);
}

Fixed version (ground truth):
/** 
 * Resolves an element reference. Look up the name in the name space of the target element type. If the target is found, replace the element name with the cached element.
 * @param module the report design
 * @param defn the definition of the element ref property
 * @param ref the element reference
 */
public void resolve(Module module,PropertyDefn defn,ElementRefValue ref){
  if (ref.isResolved())   return;
  ElementDefn targetDefn=(ElementDefn)defn.getTargetElementType();
  IModuleNameSpace elementResolver=module.getModuleNameSpace(targetDefn.getNameSpaceID());
  String name=ReferenceValueUtil.needTheNamespacePrefix(ref,module);
  DesignElement target=null;
  target=elementResolver.resolve(name,defn).getElement();
  if (target != null)   ref.resolve(target);
}
Program: 78778
Project: 78778
Buggy source:
/** 
 * Resolves a structure reference. Look up the name in the report design. If the target is found, replace the structure name with the cached structure.
 * @param module the report design
 * @param defn the definition of the structure ref property
 * @param ref the structure reference
 */
public void resolve(Module module,PropertyDefn defn,StructRefValue ref){
}

Fixed version (ground truth):
/** 
 * Resolves a structure reference. Look up the name in the report design. If the target is found, replace the structure name with the cached structure.
 * @param module the report design
 * @param defn the definition of the structure ref property
 * @param ref the structure reference
 */
public void resolve(Module module,PropertyDefn defn,StructRefValue ref){
  if (ref.isResolved() || module == null)   return;
  StructureDefn targetDefn=(StructureDefn)defn.getStructDefn();
  Structure target=null;
  Module targetModule=null;
  if (ReferencableStructure.LIB_REFERENCE_MEMBER.equals(defn.getName())) {
    String namespace=ref.getLibraryNamespace();
    targetModule=module.getLibraryWithNamespace(namespace);
    if (targetModule != null) {
      target=StructureRefUtil.findStructure(targetModule,targetDefn,ref.getName());
      if (target != null)       ref.resolve(target);
    }
  }
 else {
    StructRefValue retValue=StructureRefUtil.resolve(module,defn,ReferenceValueUtil.needTheNamespacePrefix(ref,module));
    target=retValue.getStructure();
    ref.libraryNamespace=retValue.getLibraryNamespace();
    ref.name=retValue.getName();
    if (target != null)     ref.resolve(target);
  }
}
Program: 78779
Project: 78779
Buggy source:
public static void handleOnRender(TableContent content,IRowData rowData,ExecutionContext context){
  try {
    ReportItemDesign gridDesign=(ReportItemDesign)content.getGenerateBy();
    IGridInstance grid=new GridInstance(content);
    if (handleJS(grid,gridDesign.getOnRender(),context).didRun())     return;
    IGridEventHandler eh=(IGridEventHandler)getInstance((GridHandle)gridDesign.getHandle());
    if (eh != null)     eh.onRender(grid,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
public static void handleOnRender(TableContent content,ExecutionContext context){
  try {
    ReportItemDesign gridDesign=(ReportItemDesign)content.getGenerateBy();
    IGridInstance grid=new GridInstance(content);
    if (handleJS(grid,gridDesign.getOnRender(),context).didRun())     return;
    IGridEventHandler eh=(IGridEventHandler)getInstance((GridHandle)gridDesign.getHandle());
    if (eh != null)     eh.onRender(grid,context.getReportContext());
  }
 catch (  Exception e) {
    log.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 78780
Project: 78780
Buggy source:
/** 
 * Sets the cell's row span. This is the number of table or grid rows occupied by this cell.
 * @param span the row span
 * @throws SemanticException if this property is locked.
 */
public void setRowSpan(int span) throws ScriptException {
  try {
    ((CellHandle)handle).setRowSpan(span);
  }
 catch (  SemanticException e) {
    throw new ScriptException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
/** 
 * Sets the cell's row span. This is the number of table or grid rows occupied by this cell.
 * @param span the row span
 * @throws ScriptException if this property is locked.
 */
public void setRowSpan(int span) throws ScriptException {
  try {
    ((CellHandle)handle).setRowSpan(span);
  }
 catch (  SemanticException e) {
    throw new ScriptException(e.getLocalizedMessage());
  }
}
Program: 78781
Project: 78781
Buggy source:
/** 
 * Sets the cell's column property. The input value gives the column in which the cell starts. Columns are numbered from 1.
 * @param column the column index, starting from 1.
 * @throws SemanticException if this property is locked.
 */
public void setColumn(int column) throws ScriptException {
  try {
    ((CellHandle)handle).setColumn(column);
  }
 catch (  SemanticException e) {
    throw new ScriptException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
/** 
 * Sets the cell's column property. The input value gives the column in which the cell starts. Columns are numbered from 1.
 * @param column the column index, starting from 1.
 * @throws ScriptException if this property is locked.
 */
public void setColumn(int column) throws ScriptException {
  try {
    ((CellHandle)handle).setColumn(column);
  }
 catch (  SemanticException e) {
    throw new ScriptException(e.getLocalizedMessage());
  }
}
Program: 78782
Project: 78782
Buggy source:
/** 
 * Sets the cell's column span. This is the number of table or grid columns occupied by this cell.
 * @param span the column span
 * @throws SemanticException if this property is locked.
 */
public void setColumnSpan(int span) throws ScriptException {
  try {
    ((CellHandle)handle).setColumnSpan(span);
  }
 catch (  SemanticException e) {
    throw new ScriptException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
/** 
 * Sets the cell's column span. This is the number of table or grid columns occupied by this cell.
 * @param span the column span
 * @throws ScriptException if this property is locked.
 */
public void setColumnSpan(int span) throws ScriptException {
  try {
    ((CellHandle)handle).setColumnSpan(span);
  }
 catch (  SemanticException e) {
    throw new ScriptException(e.getLocalizedMessage());
  }
}
Program: 78783
Project: 78783
Buggy source:
/** 
 * Sets the cell's drop property. The input value is defined in <code>DesignChoiceConstants</code> and can be one of: <ul> <li>DROP_TYPE_NONE</li> <li>DROP_TYPE_DETAIL</li> <li>DROP_TYPE_ALL</li> </ul> <p> Note that This property is valid only for cells within a table; but not for cells within a grid.
 * @param drop the string value of the drop property
 * @throws SemanticException if the property is locked or the input value is not one of the above.
 * @see #getDrop()
 */
public void setDrop(String drop) throws ScriptException {
  try {
    ((CellHandle)handle).setDrop(drop);
  }
 catch (  SemanticException e) {
    throw new ScriptException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
/** 
 * Sets the cell's drop property. The input value is defined in <code>DesignChoiceConstants</code> and can be one of: <ul> <li>DROP_TYPE_NONE</li> <li>DROP_TYPE_DETAIL</li> <li>DROP_TYPE_ALL</li> </ul> <p> Note that This property is valid only for cells within a table; but not for cells within a grid.
 * @param drop the string value of the drop property
 * @throws ScriptException if the property is locked or the input value is not one of the above.
 * @see #getDrop()
 */
public void setDrop(String drop) throws ScriptException {
  try {
    ((CellHandle)handle).setDrop(drop);
  }
 catch (  SemanticException e) {
    throw new ScriptException(e.getLocalizedMessage());
  }
}
Program: 78784
Project: 78784
Buggy source:
public void activate(){
  HandleAdapterFactory.getInstance().getLibraryHandleAdapter((LibraryHandle)getModel()).addPropertyChangeListener(this);
  super.activate();
}

Fixed version (ground truth):
public void activate(){
  HandleAdapterFactory.getInstance().getLibraryHandleAdapter(getModel()).addPropertyChangeListener(this);
  super.activate();
}
Program: 78785
Project: 78785
Buggy source:
public void propertyChange(PropertyChangeEvent evt){
  if (evt.getPropertyName().equals(LibraryHandleAdapter.CURRENTMODEL)) {
    refresh();
    Display.getCurrent().asyncExec(new Runnable(){
      public void run(){
        final List mediatorSelection=SessionHandleAdapter.getInstance().getMediator().getCurrentState().getSelectionObject();
        if (mediatorSelection.size() == 1 && mediatorSelection.get(0) instanceof LibraryHandle) {
          return;
        }
        List list=getChildren();
        EditPartViewer viewer=getViewer();
        if (viewer instanceof DeferredGraphicalViewer) {
          ((DeferredGraphicalViewer)viewer).setSelection(new StructuredSelection(list),false);
        }
      }
    }
);
  }
}

Fixed version (ground truth):
public void propertyChange(final PropertyChangeEvent evt){
  if (evt.getPropertyName().equals(LibraryHandleAdapter.CURRENTMODEL)) {
    refresh();
    Display.getCurrent().asyncExec(new Runnable(){
      public void run(){
        Object model=evt.getNewValue();
        Object editpart=getViewer().getEditPartRegistry().get(model);
        if (editpart instanceof EditPart) {
          getViewer().flush();
          getViewer().select((EditPart)editpart);
        }
        if (editpart != null) {
          getViewer().reveal((EditPart)editpart);
        }
      }
    }
);
  }
}
Program: 78786
Project: 78786
Buggy source:
public void run(){
  final List mediatorSelection=SessionHandleAdapter.getInstance().getMediator().getCurrentState().getSelectionObject();
  if (mediatorSelection.size() == 1 && mediatorSelection.get(0) instanceof LibraryHandle) {
    return;
  }
  List list=getChildren();
  EditPartViewer viewer=getViewer();
  if (viewer instanceof DeferredGraphicalViewer) {
    ((DeferredGraphicalViewer)viewer).setSelection(new StructuredSelection(list),false);
  }
}

Fixed version (ground truth):
public void run(){
  Object model=evt.getNewValue();
  Object editpart=getViewer().getEditPartRegistry().get(model);
  if (editpart instanceof EditPart) {
    getViewer().flush();
    getViewer().select((EditPart)editpart);
  }
  if (editpart != null) {
    getViewer().reveal((EditPart)editpart);
  }
}
Program: 78787
Project: 78787
Buggy source:
public void deactivate(){
  HandleAdapterFactory.getInstance().getLibraryHandleAdapter((LibraryHandle)getModel()).removePropertyChangeListener(this);
  super.deactivate();
}

Fixed version (ground truth):
public void deactivate(){
  HandleAdapterFactory.getInstance().getLibraryHandleAdapter(getModel()).removePropertyChangeListener(this);
  super.deactivate();
}
Program: 78788
Project: 78788
Buggy source:
public void visitReportDesign(ReportDesignHandle handle){
  report.setUnit(handle.getDefaultUnits());
  if (handle.getBase() != null && !handle.getBase().equals("String_Node_Str")) {
    report.setBasePath(handle.getBase());
  }
  defaultUnit=report.getUnit();
  setupNamedExpressions(handle.getUserProperties(),report.getNamedExpressions());
  StyleHandle defaultStyle=handle.findStyle("String_Node_Str");
  createReportDefaultStyles(defaultStyle);
  PageSetupDesign pageSetup=new PageSetupDesign();
  SlotHandle pageSlot=handle.getMasterPages();
  for (int i=0; i < pageSlot.getCount(); i++) {
    apply(pageSlot.get(i));
    if (currentElement != null) {
      pageSetup.addMasterPage((MasterPageDesign)currentElement);
    }
  }
  report.setPageSetup(pageSetup);
  SlotHandle bodySlot=handle.getBody();
  for (int i=0; i < bodySlot.getCount(); i++) {
    apply(bodySlot.get(i));
    if (currentElement != null) {
      report.addContent((ReportItemDesign)currentElement);
    }
  }
}

Fixed version (ground truth):
public void visitReportDesign(ReportDesignHandle handle){
  report.setUnit(handle.getDefaultUnits());
  if (handle.getBase() != null && !handle.getBase().equals("String_Node_Str")) {
    report.setBasePath(handle.getBase());
  }
  defaultUnit=report.getUnit();
  setupNamedExpressions(handle,report.getNamedExpressions());
  StyleHandle defaultStyle=handle.findStyle("String_Node_Str");
  createReportDefaultStyles(defaultStyle);
  PageSetupDesign pageSetup=new PageSetupDesign();
  SlotHandle pageSlot=handle.getMasterPages();
  for (int i=0; i < pageSlot.getCount(); i++) {
    apply(pageSlot.get(i));
    if (currentElement != null) {
      pageSetup.addMasterPage((MasterPageDesign)currentElement);
    }
  }
  report.setPageSetup(pageSetup);
  SlotHandle bodySlot=handle.getBody();
  for (int i=0; i < bodySlot.getCount(); i++) {
    apply(bodySlot.get(i));
    if (currentElement != null) {
      report.addContent((ReportItemDesign)currentElement);
    }
  }
}
Program: 78789
Project: 78789
Buggy source:
/** 
 * setup the named expression map
 * @param userProperties user defined named expressions in design file
 * @param namedExpressions the data structure that hold named expressions
 */
private void setupNamedExpressions(List userProperties,Map namedExpressions){
  if (userProperties == null || namedExpressions == null)   return;
  for (int i=0; i < userProperties.size(); i++) {
    UserPropertyDefn userDef=(UserPropertyDefn)userProperties.get(i);
    if (userDef.getTypeCode() == IPropertyType.EXPRESSION_TYPE) {
      String name=userDef.getName();
      String exprString=handle.getStringProperty(name);
      if (exprString != null && !exprString.equals("String_Node_Str")) {
        Expression expression=new Expression(exprString);
        namedExpressions.put(name,expression);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * setup the named expression map
 * @param userProperties user defined named expressions in design file
 * @param namedExpressions the data structure that hold named expressions
 */
private void setupNamedExpressions(DesignElementHandle handle,Map namedExpressions){
  List userProperties=handle.getUserProperties();
  if (userProperties == null || namedExpressions == null)   return;
  for (int i=0; i < userProperties.size(); i++) {
    UserPropertyDefn userDef=(UserPropertyDefn)userProperties.get(i);
    if (userDef.getTypeCode() == IPropertyType.EXPRESSION_TYPE) {
      String name=userDef.getName();
      String exprString=handle.getStringProperty(name);
      if (exprString != null && !exprString.equals("String_Node_Str")) {
        Expression expression=new Expression(exprString);
        namedExpressions.put(name,expression);
      }
    }
  }
}
Program: 78791
Project: 78791
Buggy source:
/** 
 * Get the right border width.
 */
public String getBorderRightWidth(){
  return style.getBorderBottomWidth();
}

Fixed version (ground truth):
/** 
 * Get the right border width.
 */
public String getBorderRightWidth(){
  return style.getBorderRightWidth();
}
Program: 78792
Project: 78792
Buggy source:
/** 
 * @param index
 * @param name
 * @param type
 * @param path
 * @param originalPath
 * @throws OdaException
 */
public ColumnInfo(int index,String name,String type,String path,String originalPath) throws OdaException {
  this.index=index;
  this.name=name;
  this.type=type;
  if (!DataTypes.isValidType(type))   throw new OdaException("String_Node_Str");
  this.path=fixTrailingAttr(buildPath(path));
  this.originalPath=originalPath;
}

Fixed version (ground truth):
/** 
 * @param index
 * @param name
 * @param type
 * @param path
 * @param originalPath
 * @throws OdaException
 */
public ColumnInfo(int index,String name,String type,String path,String originalPath) throws OdaException {
  this.index=index;
  this.name=name;
  this.type=type;
  if (!DataTypes.isValidType(type))   throw new OdaException("String_Node_Str");
  this.path=fixTrailingAttr(buildPath(path));
  this.originalPath=originalPath;
  String[] originalPathFrags=originalPath.split("String_Node_Str");
  int lastTwoDotAbbrevationPosition=0;
  int numberOfConcretePathFragsBefore2DotAbb=0;
  for (int i=0; i < originalPathFrags.length; i++) {
    if (originalPathFrags[i].equals("String_Node_Str"))     lastTwoDotAbbrevationPosition=i;
  }
  for (int i=0; i < lastTwoDotAbbrevationPosition; i++) {
    if (!originalPathFrags[i].equals("String_Node_Str"))     numberOfConcretePathFragsBefore2DotAbb++;
  }
  int numberOf2DotAbb=lastTwoDotAbbrevationPosition - numberOfConcretePathFragsBefore2DotAbb + 1;
  backRefNumber=numberOf2DotAbb - numberOfConcretePathFragsBefore2DotAbb;
  if (backRefNumber < 0)   backRefNumber=0;
}
Program: 78793
Project: 78793
Buggy source:
public void run(){
  XMLReader xr;
  try {
    xr=new SAXParser();
    xr.setContentHandler(this);
    xr.setErrorHandler(this);
    URL url=null;
    Reader file=null;
    try {
      File f=new File(xmlFile);
      url=f.toURL();
      file=new InputStreamReader(url.openStream());
    }
 catch (    IOException e) {
      url=null;
    }
    if (url == null) {
      url=new URL(xmlFile);
    }
    file=new InputStreamReader(url.openStream());
    xr.parse(new InputSource(file));
  }
 catch (  SAXException e) {
    e.printStackTrace();
  }
catch (  MalformedURLException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    this.alive=false;
    spConsumer.wakeup();
  }
}

Fixed version (ground truth):
public void run(){
  XMLReader xr;
  try {
    xr=new SAXParser();
    xr.setContentHandler(this);
    xr.setErrorHandler(this);
    URL url=null;
    Reader file=null;
    try {
      File f=new File(xmlFile);
      url=f.toURL();
      file=new InputStreamReader(url.openStream());
    }
 catch (    IOException e) {
      url=null;
    }
    if (url == null) {
      url=new URL(xmlFile);
    }
    InputStream is=getInputStream(url);
    file=new InputStreamReader(is);
    xr.parse(new InputSource(file));
  }
 catch (  SAXException e) {
    e.printStackTrace();
  }
catch (  MalformedURLException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    this.alive=false;
    spConsumer.wakeup();
  }
}
Program: 78795
Project: 78795
Buggy source:
public Collection getSelectionList(String name){
  usingParameterValues();
  ReportDesignHandle report=(ReportDesignHandle)this.runnable.getDesignHandle();
  ScalarParameterHandle parameter=(ScalarParameterHandle)report.findParameter(name);
  if (parameter == null) {
    return null;
  }
  String selectionType=parameter.getValueType();
  String dataType=parameter.getDataType();
  boolean fixedOrder=parameter.isFixedOrder();
  if (DesignChoiceConstants.PARAM_VALUE_TYPE_DYNAMIC.equals(selectionType)) {
    String dataSetName=parameter.getDataSetName();
    String valueExpr=parameter.getValueExpr();
    String labelExpr=parameter.getLabelExpr();
    int limit=parameter.getListlimit();
    return createDynamicSelectionChoices(dataSetName,labelExpr,valueExpr,dataType,limit,fixedOrder);
  }
 else   if (DesignChoiceConstants.PARAM_VALUE_TYPE_STATIC.equals(selectionType)) {
    Iterator iter=parameter.choiceIterator();
    ArrayList choices=new ArrayList();
    while (iter.hasNext()) {
      SelectionChoiceHandle choice=(SelectionChoiceHandle)iter.next();
      String label=report.getMessage(choice.getLabelKey(),locale);
      if (label != null) {
        label=choice.getLabel();
      }
      Object value=getStringValue(choice.getValue(),dataType);
      choices.add(new SelectionChoice(label,value));
    }
    if (!fixedOrder)     Collections.sort(choices,new SelectionChoiceComparator(true));
    return choices;
  }
  return null;
}

Fixed version (ground truth):
public Collection getSelectionList(String name){
  usingParameterValues();
  ReportDesignHandle report=(ReportDesignHandle)this.runnable.getDesignHandle();
  ScalarParameterHandle parameter=(ScalarParameterHandle)report.findParameter(name);
  if (parameter == null) {
    return Collections.EMPTY_LIST;
  }
  String selectionType=parameter.getValueType();
  String dataType=parameter.getDataType();
  boolean fixedOrder=parameter.isFixedOrder();
  if (DesignChoiceConstants.PARAM_VALUE_TYPE_DYNAMIC.equals(selectionType)) {
    String dataSetName=parameter.getDataSetName();
    String valueExpr=parameter.getValueExpr();
    String labelExpr=parameter.getLabelExpr();
    int limit=parameter.getListlimit();
    return createDynamicSelectionChoices(dataSetName,labelExpr,valueExpr,dataType,limit,fixedOrder);
  }
 else   if (DesignChoiceConstants.PARAM_VALUE_TYPE_STATIC.equals(selectionType)) {
    Iterator iter=parameter.choiceIterator();
    ArrayList choices=new ArrayList();
    while (iter.hasNext()) {
      SelectionChoiceHandle choice=(SelectionChoiceHandle)iter.next();
      String label=report.getMessage(choice.getLabelKey(),locale);
      if (label != null) {
        label=choice.getLabel();
      }
      Object value=getStringValue(choice.getValue(),dataType);
      choices.add(new SelectionChoice(label,value));
    }
    if (!fixedOrder)     Collections.sort(choices,new SelectionChoiceComparator(true));
    return choices;
  }
  return Collections.EMPTY_LIST;
}
Program: 78797
Project: 78797
Buggy source:
protected boolean initDialog(){
  if (inputGroup.getName() != null) {
    nameEditor.setText(inputGroup.getName());
  }
  columnList=DataSetManager.getCurrentInstance().getColumns(dataSetList);
  Iterator itor=columnList.iterator();
  while (itor.hasNext()) {
    keyChooser.add(((DataSetItemModel)itor.next()).getDisplayName());
  }
  String groupKey=inputGroup.getKeyExpr();
  int index=-1;
  if (groupKey != null) {
    for (int i=0; i < columnList.size(); i++) {
      if (groupKey.equals(DEUtil.getExpression(columnList.get(i)))) {
        index=i;
        break;
      }
    }
    if (index != -1) {
      keyChooser.select(index);
    }
 else {
      keyChooser.setText(groupKey);
    }
  }
  index=getIntervalTypeIndex(inputGroup.getInterval());
  intervalType.select(index);
  if (index == 0) {
    intervalRange.setEnabled(false);
  }
 else {
    intervalRange.setSelection(inputGroup.getIntervalRange());
  }
  if (inputGroup instanceof TableGroupHandle) {
    includeHeader.setSelection(inputGroup.hasHeader());
    includeFooter.setSelection(inputGroup.hasFooter());
  }
 else {
    includeHeader.setSelection(false);
    includeFooter.setSelection(false);
  }
  if (DesignChoiceConstants.SORT_DIRECTION_ASC.equals(inputGroup.getSortDirection())) {
    ascending.setSelection(true);
  }
 else {
    descending.setSelection(true);
  }
  List list=new ArrayList(1);
  list.add(inputGroup);
  tocEditor.setText(UIUtil.convertToGUIString(inputGroup.getTocExpression()));
  return true;
}

Fixed version (ground truth):
protected boolean initDialog(){
  if (inputGroup.getName() != null) {
    nameEditor.setText(inputGroup.getName());
  }
  columnList=DataSetManager.getCurrentInstance().getColumns(dataSetList);
  Iterator itor=columnList.iterator();
  while (itor.hasNext()) {
    keyChooser.add(((DataSetItemModel)itor.next()).getDisplayName());
  }
  String groupKey=inputGroup.getKeyExpr();
  int index=-1;
  if (groupKey != null) {
    for (int i=0; i < columnList.size(); i++) {
      if (groupKey.equals(DEUtil.getExpression(columnList.get(i)))) {
        index=i;
        break;
      }
    }
    if (index != -1) {
      keyChooser.select(index);
    }
  }
  index=getIntervalTypeIndex(inputGroup.getInterval());
  intervalType.select(index);
  if (index == 0) {
    intervalRange.setEnabled(false);
  }
 else {
    intervalRange.setSelection(inputGroup.getIntervalRange());
  }
  if (inputGroup instanceof TableGroupHandle) {
    includeHeader.setSelection(inputGroup.hasHeader());
    includeFooter.setSelection(inputGroup.hasFooter());
  }
 else {
    includeHeader.setSelection(false);
    includeFooter.setSelection(false);
  }
  if (DesignChoiceConstants.SORT_DIRECTION_ASC.equals(inputGroup.getSortDirection())) {
    ascending.setSelection(true);
  }
 else {
    descending.setSelection(true);
  }
  List list=new ArrayList(1);
  list.add(inputGroup);
  tocEditor.setText(UIUtil.convertToGUIString(inputGroup.getTocExpression()));
  return true;
}
Program: 78799
Project: 78799
Buggy source:
public void setGenerateBy(Object design){
  super.setGenerateBy(design);
  if (design instanceof MasterPageDesign) {
    MasterPageDesign page=(MasterPageDesign)design;
    orientation=page.getOrientation();
    pageType=page.getPageType();
    pageHeight=page.getPageHeight();
    pageWidth=page.getPageWidth();
    marginTop=page.getTopMargin();
    marginLeft=page.getLeftMargin();
    marginRight=page.getRightMargin();
    marginBottom=page.getBottomMargin();
    if (page instanceof SimpleMasterPageDesign) {
      headerHeight=((SimpleMasterPageDesign)page).getHeaderHeight();
      footerHeight=((SimpleMasterPageDesign)page).getFooterHeight();
    }
    if (headerHeight == null) {
      headerHeight=new DimensionType(0.25f,EngineIRConstants.UNITS_IN);
    }
    if (footerHeight == null) {
      footerHeight=new DimensionType(0.25f,EngineIRConstants.UNITS_IN);
    }
  }
}

Fixed version (ground truth):
public void setGenerateBy(Object design){
  super.setGenerateBy(design);
  if (design instanceof MasterPageDesign) {
    MasterPageDesign page=(MasterPageDesign)design;
    orientation=page.getOrientation();
    pageType=page.getPageType();
    if (EngineIRConstants.PAGE_ORIENTATION_LANDSCAPE.equals(page.getOrientation())) {
      pageHeight=page.getPageWidth();
      pageWidth=page.getPageHeight();
    }
 else {
      pageHeight=page.getPageHeight();
      pageWidth=page.getPageWidth();
    }
    marginTop=page.getTopMargin();
    marginLeft=page.getLeftMargin();
    marginRight=page.getRightMargin();
    marginBottom=page.getBottomMargin();
    if (page instanceof SimpleMasterPageDesign) {
      headerHeight=((SimpleMasterPageDesign)page).getHeaderHeight();
      footerHeight=((SimpleMasterPageDesign)page).getFooterHeight();
    }
    if (headerHeight == null) {
      headerHeight=new DimensionType(0.25f,EngineIRConstants.UNITS_IN);
    }
    if (footerHeight == null) {
      footerHeight=new DimensionType(0.25f,EngineIRConstants.UNITS_IN);
    }
  }
}
Program: 78801
Project: 78801
Buggy source:
public void checkExtends(DesignElement parent) throws ExtendsException {
  super.checkExtends(parent);
  if (provider != null)   provider.checkExtends(parent);
}

Fixed version (ground truth):
public void checkExtends(DesignElement parent) throws ExtendsException {
  super.checkExtends(parent);
  if (provider != null)   provider.checkExtends(parent);
 else {
    OdaDataSet odaParent=(OdaDataSet)parent;
    if (odaParent.extensionID != null && !odaParent.extensionID.equals(extensionID))     throw new ExtendsException(this,parent,ExtendsException.DESIGN_EXCEPTION_WRONG_EXTENSION_TYPE);
    if (extensionID != null && !extensionID.equals(odaParent.extensionID))     throw new ExtendsException(this,parent,ExtendsException.DESIGN_EXCEPTION_WRONG_EXTENSION_TYPE);
  }
}
Program: 78802
Project: 78802
Buggy source:
public void checkExtends(DesignElement parent) throws ExtendsException {
  super.checkExtends(parent);
  if (provider != null)   provider.checkExtends(parent);
}

Fixed version (ground truth):
public void checkExtends(DesignElement parent) throws ExtendsException {
  super.checkExtends(parent);
  if (provider != null)   provider.checkExtends(parent);
 else {
    OdaDataSource odaParent=(OdaDataSource)parent;
    if (odaParent.extensionID != null && !odaParent.extensionID.equals(extensionID))     throw new ExtendsException(this,parent,ExtendsException.DESIGN_EXCEPTION_WRONG_EXTENSION_TYPE);
    if (extensionID != null && !extensionID.equals(odaParent.extensionID))     throw new ExtendsException(this,parent,ExtendsException.DESIGN_EXCEPTION_WRONG_EXTENSION_TYPE);
  }
}