nus-yam/ex-repair huggingface dataset:
Program: 78335
Project: 78335
Buggy source:
/** 
 * Initialize the instance.
 * @param dataEngine
 * @param dataSetDesign
 * @param appContext
 * @throws DataException
 */
private void initialize(DataEngineImpl dataEngine,IBaseDataSetDesign dataSetDesign,Map appContext) throws DataException {
  dataSet=(IJointDataSetDesign)dataSetDesign;
  ResultIterator left=getSortedResultIterator(dataEngine,dataSet.getLeftDataSetDesignName(),appContext,dataSet.getJoinConditions(),true);
  ResultIterator right=getSortedResultIterator(dataEngine,dataSet.getRightDataSetDesignName(),appContext,dataSet.getJoinConditions(),false);
  IJoinConditionMatcher matcher=new JoinConditionMatcher(left.getOdiResult(),right.getOdiResult(),left.getScope(),right.getScope(),dataSet.getJoinConditions());
  JointResultMetadata meta=getJointResultMetadata(left,right);
  resultClass=meta.getResultClass();
  populator=JointDataSetPopulatorFactory.getBinaryTreeDataSetPopulator(left.getOdiResult(),right.getOdiResult(),meta,matcher,dataSet.getJoinType());
}

Fixed version (ground truth):
/** 
 * Initialize the instance.
 * @param dataEngine
 * @param dataSetDesign
 * @param appContext
 * @throws DataException
 */
private void initialize(DataEngineImpl dataEngine,IBaseDataSetDesign dataSetDesign,Map appContext) throws DataException {
  dataSet=(IJointDataSetDesign)dataSetDesign;
  ResultIterator left=getSortedResultIterator(dataEngine,dataSet.getLeftDataSetDesignName(),appContext,dataSet.getJoinConditions(),true);
  ResultIterator right=getSortedResultIterator(dataEngine,dataSet.getRightDataSetDesignName(),appContext,dataSet.getJoinConditions(),false);
  this.left=left;
  this.right=right;
  this.joinType=dataSet.getJoinType();
  this.matcher=new JoinConditionMatcher(left.getOdiResult(),right.getOdiResult(),left.getScope(),right.getScope(),dataSet.getJoinConditions());
  JointResultMetadata meta=getJointResultMetadata(left,right);
  resultClass=meta.getResultClass();
}
Program: 78336
Project: 78336
Buggy source:
/** 
 * Constructor.
 * @param dataEngine
 * @param queryDefn
 * @param dataSetDesign
 * @param appContext
 * @throws DataException
 */
PreparedJointDataSourceQuery(DataEngineImpl dataEngine,IQueryDefinition queryDefn,IBaseDataSetDesign dataSetDesign,Map appContext) throws DataException {
  super(dataEngine,queryDefn,dataSetDesign,appContext);
  this.dataEngine=dataEngine;
  this.dataSetDesign=dataSetDesign;
  this.appContext=appContext;
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param dataEngine
 * @param queryDefn
 * @param dataSetDesign
 * @param appContext
 * @throws DataException
 */
PreparedJointDataSourceQuery(DataEngineImpl dataEngine,IQueryDefinition queryDefn,IBaseDataSetDesign dataSetDesign,Map appContext) throws DataException {
  super(dataEngine,queryDefn,dataSetDesign,appContext);
  this.dataEngine=dataEngine;
  this.dataSetDesign=dataSetDesign;
  this.appContext=appContext;
  initialize(dataEngine,dataSetDesign,appContext);
}
Program: 78337
Project: 78337
Buggy source:
/** 
 * Creates a ODA DesignerState object with the given OdaDataSource.
 * @param sourceHandle the ODA DataSource.
 * @return the oda DesignerState object.
 */
public DesignerState newOdaDesignerState(OdaDataSourceHandle sourceHandle){
  OdaDesignerStateHandle designerState=sourceHandle.getDesignerStateHandle();
  return DesignerStateAdapter.createOdaDesignState(designerState);
}

Fixed version (ground truth):
/** 
 * Creates a ODA DesignerState object with the given OdaDataSource.
 * @param sourceHandle the ODA DataSource.
 * @return the oda DesignerState object.
 */
public DesignerState newOdaDesignerState(OdaDataSourceHandle sourceHandle){
  OdaDesignerStateHandle designerState=sourceHandle.getDesignerState();
  return DesignerStateAdapter.createOdaDesignState(designerState);
}
Program: 78338
Project: 78338
Buggy source:
/** 
 * Creates a ROM DesignerState object with the given ODA DataSet design.
 * @param designerState the ODA designer state.
 * @param sourceHandle the ODA DataSource.
 * @throws SemanticException if ROM Designer state value is locked.
 */
public void updateROMDesignerState(DesignerState designerState,OdaDataSourceHandle sourceHandle) throws SemanticException {
  if (designerState == null || sourceHandle == null)   return;
  DesignerStateAdapter.updateROMDesignerState(designerState,sourceHandle.getDesignerStateHandle());
}

Fixed version (ground truth):
/** 
 * Creates a ROM DesignerState object with the given ODA DataSet design.
 * @param designerState the ODA designer state.
 * @param sourceHandle the ODA DataSource.
 * @throws SemanticException if ROM Designer state value is locked.
 */
public void updateROMDesignerState(DesignerState designerState,OdaDataSourceHandle sourceHandle) throws SemanticException {
  if (designerState == null || sourceHandle == null)   return;
  DesignerStateAdapter.updateROMDesignerState(designerState,sourceHandle);
}
Program: 78340
Project: 78340
Buggy source:
/** 
 * Drops the given library from the design and break all the parent/child relationships. All child element will be localized in the module.
 * @param library the given library to drop
 * @throws SemanticException if errors occured when drop the library.It may be because that the library is not found in the design or that some elements can not be localized properly.
 */
public void dropLibraryAndBreakExtends(LibraryHandle library) throws SemanticException {
  LibraryCommand command=new LibraryCommand(module);
  command.dropLibraryAndBreakExtends((Library)library.getElement());
}

Fixed version (ground truth):
/** 
 * Drops the given library from the design and break all the parent/child relationships. All child element will be localized in the module.
 * @param library the given library to drop
 * @throws SemanticException if errors occured when drop the library.It may be because that the library is not found in the design or that some elements can not be localized properly.
 */
public void dropLibraryAndBreakExtends(LibraryHandle library) throws SemanticException {
  if (library == null)   return;
  LibraryCommand command=new LibraryCommand(module);
  command.dropLibraryAndBreakExtends((Library)library.getElement());
}
Program: 78341
Project: 78341
Buggy source:
/** 
 * Drops the given library from the included libraries of this design file.
 * @param library the library to drop
 * @throws SemanticException if error is encountered when handling <code>IncludeLibrary</code> structure list. Or it maybe because that the given library is not found in the design. Or that the library has descedents in the current module
 */
public void dropLibrary(LibraryHandle library) throws SemanticException {
  LibraryCommand command=new LibraryCommand(module);
  command.dropLibrary((Library)library.getElement());
}

Fixed version (ground truth):
/** 
 * Drops the given library from the included libraries of this design file.
 * @param library the library to drop
 * @throws SemanticException if error is encountered when handling <code>IncludeLibrary</code> structure list. Or it maybe because that the given library is not found in the design. Or that the library has descedents in the current module
 */
public void dropLibrary(LibraryHandle library) throws SemanticException {
  if (library == null)   return;
  LibraryCommand command=new LibraryCommand(module);
  command.dropLibrary((Library)library.getElement());
}
Program: 78342
Project: 78342
Buggy source:
/** 
 * Shifts the library to new position. This method might affect the style reference, because the library order is changed.
 * @param library the library to shift
 * @param toPosn the new position
 * @throws SemanticException if error is encountered when shifting
 */
public void shiftLibrary(LibraryHandle library,int toPosn) throws SemanticException {
  ShiftLibraryCommand command=new ShiftLibraryCommand(module);
  command.shiftLibrary((Library)library.getElement(),toPosn);
}

Fixed version (ground truth):
/** 
 * Shifts the library to new position. This method might affect the style reference, because the library order is changed.
 * @param library the library to shift
 * @param toPosn the new position
 * @throws SemanticException if error is encountered when shifting
 */
public void shiftLibrary(LibraryHandle library,int toPosn) throws SemanticException {
  if (library == null)   return;
  ShiftLibraryCommand command=new ShiftLibraryCommand(module);
  command.shiftLibrary((Library)library.getElement(),toPosn);
}
Program: 78344
Project: 78344
Buggy source:
/** 
 * Drops the given library.
 * @param library the library to drop
 * @param inForce <code>true</code> if drop the library even the module has element reference to this library. <code>false</code> if do not drop library when the module has element reference to this library.
 * @throws SemanticException if failed to remove <code>IncludeLibrary</code> strcutre
 */
public void dropLibrary(Library library) throws SemanticException {
  if (!module.getLibraries().contains(library)) {
    throw new LibraryException(library,LibraryException.DESIGN_EXCEPTION_LIBRARY_NOT_FOUND);
  }
  dealAllElementDecendents(library,SIMPLE_ACTION);
  doDropLibrary(library);
}

Fixed version (ground truth):
/** 
 * Drops the given library.
 * @param library the library to drop
 * @param inForce <code>true</code> if drop the library even the module has element reference to this library. <code>false</code> if do not drop library when the module has element reference to this library.
 * @throws SemanticException if failed to remove <code>IncludeLibrary</code> strcutre
 */
public void dropLibrary(Library library) throws SemanticException {
  if (!module.getLibraries().contains(library)) {
    throw new LibraryException(library,new String[]{library.getNamespace()},LibraryException.DESIGN_EXCEPTION_LIBRARY_NOT_FOUND);
  }
  dealAllElementDecendents(library,SIMPLE_ACTION);
  doDropLibrary(library);
}
Program: 78345
Project: 78345
Buggy source:
/** 
 * This constructor supports shape definition via an elliptical arc
 * @param oSource
 * @param boEllipse
 * @param dStart
 * @param dExtent
 * @param iArcType
 * @param ac
 */
ShapedAction(Object oSource,Bounds boEllipse,double dStart,double dExtent,int iArcType,Action ac){
  this(oSource,boEllipse,dStart,dExtent,iArcType,ac,null);
}

Fixed version (ground truth):
/** 
 * This constructor supports shape definition via an elliptical arc
 * @param oSource
 * @param boEllipse
 * @param dStart
 * @param dExtent
 * @param iArcType
 * @param ac
 */
ShapedAction(StructureSource oSource,Bounds boEllipse,double dStart,double dExtent,int iArcType,Action ac){
  this(oSource,boEllipse,dStart,dExtent,iArcType,ac,null);
}
Program: 78346
Project: 78346
Buggy source:
/** 
 * Returns the source object associated with current ShapedAction.
 * @return
 */
public final Object getSource(){
  return _oSource;
}

Fixed version (ground truth):
/** 
 * Returns the source object associated with current ShapedAction.
 * @return
 */
public final StructureSource getSource(){
  return _oSource;
}
Program: 78349
Project: 78349
Buggy source:
/** 
 * Set the base factory for this clss. This methdo should be called before any other operation.
 * @param base The real factory class used to create the ODA provider.
 */
public synchronized static void initeTheFactory(ODABaseProviderFactory base){
  if (baseFactory != null)   return;
  baseFactory=base;
}

Fixed version (ground truth):
/** 
 * Set the base factory for this clss. This methdo should be called before any other operation.
 * @param base The real factory class used to create the ODA provider.
 */
public synchronized static void initeTheFactory(IODAProviderFactory base){
  if (baseFactory != null)   return;
  baseFactory=base;
}
Program: 78350
Project: 78350
Buggy source:
public IChoiceSet getAllowedChoices(){
  return null;
}

Fixed version (ground truth):
public IChoiceSet getAllowedChoices(){
  return getChoices();
}
Program: 78351
Project: 78351
Buggy source:
public IChoiceSet getChoices(){
  PropertyChoice[] propertyChoices=property.getChoices();
  ChoiceSet choiceSet=null;
  if (propertyChoices != null && propertyChoices.length > 0) {
    choiceSet=new ChoiceSet();
    IChoice[] choices=new ODAChoice[propertyChoices.length];
    for (int i=0; i < propertyChoices.length; i++) {
      choices[i]=new ODAChoice(propertyChoices[i]);
    }
    choiceSet.setChoices(choices);
  }
  return choiceSet;
}

Fixed version (ground truth):
public IChoiceSet getChoices(){
  PropertyChoice[] propertyChoices=property.getChoices();
  ChoiceSet choiceSet=new ChoiceSet();
  if (propertyChoices != null && propertyChoices.length > 0) {
    IChoice[] choices=new ODAChoice[propertyChoices.length];
    for (int i=0; i < propertyChoices.length; i++) {
      choices[i]=new ODAChoice(propertyChoices[i]);
    }
    choiceSet.setChoices(choices);
  }
  return choiceSet;
}
Program: 78352
Project: 78352
Buggy source:
/** 
 * Return whether there are multipass filters in the query.
 * @param fetchEventsList
 * @return
 * @throws DataException
 */
public static boolean hasMultiPassFilters(Object[] fetchEventsList) throws DataException {
  for (int i=0; i < fetchEventsList.length; i++) {
    if (fetchEventsList[i] instanceof FilterByRow) {
      List list=((FilterByRow)fetchEventsList[i]).getFilterList(FilterByRow.ALL_FILTER);
      if (list == null)       return false;
      for (int j=0; j < list.size(); j++) {
        if (FilterUtil.isFilterNeedMultiPass((IFilterDefinition)(list.get(j))))         return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Return whether there are multipass filters in the query.
 * @param fetchEventsList
 * @return
 * @throws DataException
 */
public static boolean hasMultiPassFilters(Object[] fetchEventsList) throws DataException {
  for (int i=0; i < fetchEventsList.length; i++) {
    if (fetchEventsList[i] instanceof FilterByRow) {
      if (((FilterByRow)fetchEventsList[i]).isFilterSetExist(FilterByRow.GROUP_FILTER))       return true;
      List list=((FilterByRow)fetchEventsList[i]).getFilterList(FilterByRow.ALL_ROW_FILTER);
      if (list == null)       return false;
      for (int j=0; j < list.size(); j++) {
        if (FilterUtil.isFilterNeedMultiPass((IFilterDefinition)(list.get(j))))         return true;
      }
    }
  }
  return false;
}
Program: 78353
Project: 78353
Buggy source:
/** 
 * Populate the result set. In this method we would firstly prepare the data needed to be used in population process, then call doPopulate method to carry out the actual population job.
 * @param odaResultSet
 * @throws DataException
 */
public void populateResultSet(OdiResultSetWrapper odaResultSet) throws DataException {
  Object[] fetchEventsList=ResultSetPopulatorUtil.getFetchEventListFromQuery(this);
  boolean allowGroupFiltering=!ResultSetPopulatorUtil.hasAggregationsInComputedColumns(fetchEventsList,this);
  boolean needMultipassRowProcessing=(!allowGroupFiltering) || FilterUtil.hasMultiPassFilters(fetchEventsList);
  RowProcessorFactory.getRowProcessor(this,needMultipassRowProcessing).pass(odaResultSet);
  if (query.getGrouping() != null)   groupProcessorManager.doGroupFilteringAndSorting(this.smartCache,exprProcessor,allowGroupFiltering);
}

Fixed version (ground truth):
/** 
 * Populate the result set. In this method we would firstly prepare the data needed to be used in population process, then call doPopulate method to carry out the actual population job.
 * @param odaResultSet
 * @throws DataException
 */
public void populateResultSet(OdiResultSetWrapper odaResultSet) throws DataException {
  Object[] fetchEventsList=ResultSetPopulatorUtil.getFetchEventListFromQuery(this);
  boolean hasAggregationInCC=!ResultSetPopulatorUtil.hasAggregationsInComputedColumns(fetchEventsList,this);
  boolean needMultipassRowProcessing=(!hasAggregationInCC) || FilterUtil.hasMultiPassFilters(fetchEventsList);
  RowProcessorFactory.getRowProcessor(this,needMultipassRowProcessing).pass(odaResultSet);
  if (query.getGrouping() != null)   groupProcessorManager.doGroupFilteringAndSorting(this.smartCache,exprProcessor);
}
Program: 78354
Project: 78354
Buggy source:
/** 
 * Do group filtering job.
 * @param cx
 * @throws DataException
 */
public void doGroupFiltering(Context cx,boolean canDoGroupFiltering) throws DataException {
  List groupLevels=new ArrayList();
  List expressionList=new ArrayList();
  populateGroupFilteringExpressions(expressionList,groupLevels);
  if (expressionList.size() > 0) {
    if (!canDoGroupFiltering)     throw new DataException(ResourceConstants.GROUP_FILTERING_IS_NOT_ALLOWED_IN_GIVEN_QUERY);
    this.groupProcessor.calculateExpressionList(expressionList,groupLevels,IExpressionProcessor.FILTER_ON_GROUP_EXPR);
    ArrayList[] groupBoundaryInfos=this.groupProcessor.getGroupCalculationUtil().getGroupInformationUtil().getGroupBoundaryInfos();
    populateFiltersInGroupBoundaryInfoSets(cx,groupBoundaryInfos);
    groupBoundaryInfos=this.groupProcessor.getGroupCalculationUtil().filterGroupBoundaryInfos(groupBoundaryInfos);
    OrderingInfo odInfo=this.groupProcessor.getGroupCalculationUtil().getGroupInformationUtil().getOrderingInfo(groupBoundaryInfos);
    this.populator.reSetSmartCacheUsingOrderingInfo(odInfo);
  }
}

Fixed version (ground truth):
/** 
 * Do group filtering job.
 * @param cx
 * @throws DataException
 */
public void doGroupFiltering(Context cx) throws DataException {
  List groupLevels=new ArrayList();
  List expressionList=new ArrayList();
  populateGroupFilteringExpressions(expressionList,groupLevels);
  if (expressionList.size() > 0) {
    this.groupProcessor.calculateExpressionList(expressionList,groupLevels,IExpressionProcessor.FILTER_ON_GROUP_EXPR);
    ArrayList[] groupBoundaryInfos=this.groupProcessor.getGroupCalculationUtil().getGroupInformationUtil().getGroupBoundaryInfos();
    populateFiltersInGroupBoundaryInfoSets(cx,groupBoundaryInfos);
    groupBoundaryInfos=this.groupProcessor.getGroupCalculationUtil().filterGroupBoundaryInfos(groupBoundaryInfos);
    OrderingInfo odInfo=this.groupProcessor.getGroupCalculationUtil().getGroupInformationUtil().getOrderingInfo(groupBoundaryInfos);
    this.populator.reSetSmartCacheUsingOrderingInfo(odInfo);
  }
}
Program: 78355
Project: 78355
Buggy source:
/** 
 * Do group filtering and Sorting job.
 * @throws DataException
 */
public void doGroupFilteringAndSorting(ResultSetCache rsCache,IExpressionProcessor exprProc,boolean doGroupFiltering) throws DataException {
  this.populator.setCache(rsCache);
  this.exprProcessor=exprProc;
  exprProcessor.setResultIterator(this.populator.getResultIterator());
  Context cx=Context.enter();
  try {
    new GroupInstanceFilter(this).doGroupFiltering(cx,doGroupFiltering);
    new GroupInstanceSorter(this).doGroupSorting(cx);
  }
  finally {
    Context.exit();
  }
}

Fixed version (ground truth):
/** 
 * Do group filtering and Sorting job.
 * @throws DataException
 */
public void doGroupFilteringAndSorting(ResultSetCache rsCache,IExpressionProcessor exprProc) throws DataException {
  this.populator.setCache(rsCache);
  this.exprProcessor=exprProc;
  exprProcessor.setResultIterator(this.populator.getResultIterator());
  Context cx=Context.enter();
  try {
    new GroupInstanceFilter(this).doGroupFiltering(cx);
    new GroupInstanceSorter(this).doGroupSorting(cx);
  }
  finally {
    Context.exit();
  }
}
Program: 78356
Project: 78356
Buggy source:
public void init(IEditorSite site,IEditorInput input) throws PartInitException {
  super.init(site,input);
  site.setSelectionProvider(new FormEditorSelectionProvider(this));
  IReportProvider provider=getProvider();
  if (provider != null && provider.getInputPath(input) != null) {
    setPartName(provider.getInputPath(input).lastSegment());
    firePropertyChange(IWorkbenchPartConstants.PROP_PART_NAME);
  }
 else {
    setPartName(input.getName());
    firePropertyChange(IWorkbenchPartConstants.PROP_PART_NAME);
  }
}

Fixed version (ground truth):
public void init(IEditorSite site,IEditorInput input) throws PartInitException {
  super.init(site,input);
  site.setSelectionProvider(new FormEditorSelectionProvider(this));
  IReportProvider provider=getProvider();
  if (provider != null && provider.getInputPath(input) != null) {
    setPartName(provider.getInputPath(input).lastSegment());
    firePropertyChange(IWorkbenchPartConstants.PROP_PART_NAME);
  }
 else {
    setPartName(input.getName());
    firePropertyChange(IWorkbenchPartConstants.PROP_PART_NAME);
  }
  SessionHandleAdapter.getInstance().getMediator().addGlobalColleague(this);
}
Program: 78357
Project: 78357
Buggy source:
public void dispose(){
  DataSetManager.removeInstance(this.getEditorInput());
  if (fPalettePage != null) {
    fPalettePage.dispose();
  }
  if (outlinePage != null) {
    outlinePage.dispose();
  }
  if (dataPage != null) {
    dataPage.dispose();
  }
  super.dispose();
}

Fixed version (ground truth):
public void dispose(){
  DataSetManager.removeInstance(this.getEditorInput());
  if (fPalettePage != null) {
    fPalettePage.dispose();
  }
  if (outlinePage != null) {
    outlinePage.dispose();
  }
  if (dataPage != null) {
    dataPage.dispose();
  }
  SessionHandleAdapter.getInstance().getMediator().removeGlobalColleague(this);
  super.dispose();
}
Program: 78358
Project: 78358
Buggy source:
/** 
 * Set Engine context.
 * @param servletContext
 * @param request
 */
synchronized public void setEngineContext(ServletContext servletContext){
  if (engine == null) {
    IPlatformContext platformContext=new PlatformServletContext(servletContext);
    config.setPlatformContext(platformContext);
    try {
      Platform.startup(platformContext);
    }
 catch (    BirtException e) {
      e.printStackTrace();
    }
    IReportEngineFactory factory=(IReportEngineFactory)Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
    engine=factory.createReportEngine(config);
  }
}

Fixed version (ground truth):
/** 
 * Set Engine context.
 * @param servletContext
 * @param request
 */
synchronized public void setEngineContext(ServletContext servletContext,HttpServletRequest request){
  if (engine == null) {
    IPlatformContext platformContext=new PlatformServletContext(servletContext);
    config.setPlatformContext(platformContext);
    try {
      Platform.startup(platformContext);
    }
 catch (    BirtException e) {
      e.printStackTrace();
    }
    IReportEngineFactory factory=(IReportEngineFactory)Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
    engine=factory.createReportEngine(config);
    contextPath=request.getContextPath();
  }
}
Program: 78359
Project: 78359
Buggy source:
/** 
 * Process http request with POST method. Four different servlet paths are expected: "/frameset", "/navigation", "/toolbar", and "/run".
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  String requestType=request.getHeader(ParameterAccessor.HEADER_REQUEST_TYPE);
  if (ParameterAccessor.HEADER_REQUEST_TYPE_SOAP.equalsIgnoreCase(requestType)) {
    ReportEngineService.getInstance().setEngineContext(getServletContext());
    BirtContext context=new BirtContext(request);
    if ("String_Node_Str".equalsIgnoreCase(request.getServletPath())) {
      if (context.getBean().getException() != null) {
        context.finalize();
        displayException(request,response,context.getBean().getException());
      }
 else {
        try {
          engine.service(request,response);
        }
 catch (        BirtException e) {
          displayException(request,response,e);
        }
 finally {
          context.finalize();
        }
      }
    }
 else {
      super.doPost(request,response);
      context.finalize();
    }
  }
 else {
    doGet(request,response);
  }
}

Fixed version (ground truth):
/** 
 * Process http request with POST method. Four different servlet paths are expected: "/frameset", "/navigation", "/toolbar", and "/run".
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  String requestType=request.getHeader(ParameterAccessor.HEADER_REQUEST_TYPE);
  if (ParameterAccessor.HEADER_REQUEST_TYPE_SOAP.equalsIgnoreCase(requestType)) {
    ReportEngineService.getInstance().setEngineContext(getServletContext(),request);
    BirtContext context=new BirtContext(request);
    if ("String_Node_Str".equalsIgnoreCase(request.getServletPath())) {
      if (context.getBean().getException() != null) {
        context.finalize();
        displayException(request,response,context.getBean().getException());
      }
 else {
        try {
          engine.service(request,response);
        }
 catch (        BirtException e) {
          displayException(request,response,e);
        }
 finally {
          context.finalize();
        }
      }
    }
 else {
      super.doPost(request,response);
      context.finalize();
    }
  }
 else {
    doGet(request,response);
  }
}
Program: 78360
Project: 78360
Buggy source:
/** 
 * Process http request with GET method
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  ReportEngineService.getInstance().setEngineContext(getServletContext());
  BirtContext context=new BirtContext(request);
  if (context.getBean().getException() != null) {
    context.finalize();
    displayException(request,response,context.getBean().getException());
  }
 else {
    try {
      if (SERVLET_PATH_FRAMESET.equalsIgnoreCase(request.getServletPath())) {
        viewer.service(request,response);
      }
 else       if (SERVLET_PATH_PREVIEW.equalsIgnoreCase(request.getServletPath())) {
        preview.service(request,response);
      }
 else       if (SERVLET_PATH_RUN.equalsIgnoreCase(request.getServletPath())) {
        engine.service(request,response);
      }
 else       if (SERVLET_PATH_PARAMETER.equalsIgnoreCase(request.getServletPath())) {
        parameter.service(request,response);
      }
    }
 catch (    BirtException e) {
      displayException(request,response,e);
    }
 finally {
      context.finalize();
    }
  }
}

Fixed version (ground truth):
/** 
 * Process http request with GET method
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  ReportEngineService.getInstance().setEngineContext(getServletContext(),request);
  BirtContext context=new BirtContext(request);
  if (context.getBean().getException() != null) {
    context.finalize();
    displayException(request,response,context.getBean().getException());
  }
 else {
    try {
      if (SERVLET_PATH_FRAMESET.equalsIgnoreCase(request.getServletPath())) {
        viewer.service(request,response);
      }
 else       if (SERVLET_PATH_PREVIEW.equalsIgnoreCase(request.getServletPath())) {
        preview.service(request,response);
      }
 else       if (SERVLET_PATH_RUN.equalsIgnoreCase(request.getServletPath())) {
        engine.service(request,response);
      }
 else       if (SERVLET_PATH_PARAMETER.equalsIgnoreCase(request.getServletPath())) {
        parameter.service(request,response);
      }
    }
 catch (    BirtException e) {
      displayException(request,response,e);
    }
 finally {
      context.finalize();
    }
  }
}
Program: 78361
Project: 78361
Buggy source:
public CellComputedStyle(ICellContent elt){
  super(elt);
  IRowContent row=(IRowContent)elt.getParent();
  if (row != null) {
    IElement parentElt=row.getParent();
    if (parentElt instanceof ITableBandContent) {
      parentElt=parentElt.getParent();
    }
    ITableContent table=(ITableContent)parentElt;
    if (table != null) {
      int columnId=elt.getColumn();
      if (columnId >= 0 && columnId < table.getColumnCount()) {
        IColumn column=table.getColumn(columnId);
        if (column.getStyleClass() != null) {
          cell=new StyledCell(elt);
        }
      }
    }
  }
  if (cell == null) {
    cell=elt;
  }
}

Fixed version (ground truth):
public CellComputedStyle(ICellContent elt){
  super(elt);
  IRowContent row=(IRowContent)elt.getParent();
  if (row != null) {
    IElement parentElt=row.getParent();
    rowStyle=row.getStyle();
    if (parentElt instanceof ITableBandContent) {
      parentElt=parentElt.getParent();
    }
    ITableContent table=(ITableContent)parentElt;
    if (table != null) {
      int columnId=elt.getColumn();
      if (columnId >= 0 && columnId < table.getColumnCount()) {
        IColumn column=table.getColumn(columnId);
        String styleClass=column.getStyleClass();
        if (styleClass != null) {
          columnStyle=elt.getReportContent().findStyle(styleClass);
          cell=new StyledCell(elt);
        }
      }
    }
  }
  if (cell == null) {
    cell=elt;
    columnStyle=null;
  }
}
Program: 78362
Project: 78362
Buggy source:
protected Value resolveProperty(int index){
  CSSStylableElement parent=(CSSStylableElement)cell.getParent();
  IStyle pcs=null;
  if (parent != null) {
    pcs=parent.getComputedStyle();
  }
  IStyle s=cell.getStyle();
  Value sv=s == null ? null : (Value)s.getProperty(index);
  Value cv=engine.resolveStyle(elt,index,sv,pcs);
  return cv;
}

Fixed version (ground truth):
protected Value resolveProperty(int index){
  CSSStylableElement parent=(CSSStylableElement)cell.getParent();
  IStyle pcs=null;
  if (parent != null) {
    pcs=parent.getComputedStyle();
  }
  IStyle s=cell.getStyle();
  Value sv=s == null ? null : (Value)s.getProperty(index);
  if (sv == null && columnStyle != null && isBackgroundProperties(index) && rowStyle != null && rowStyle.getProperty(index) == null) {
    sv=(Value)columnStyle.getProperty(index);
  }
  Value cv=engine.resolveStyle(elt,index,sv,pcs);
  return cv;
}
Program: 78365
Project: 78365
Buggy source:
/** 
 * Initialize the instance.
 * @param dataEngine
 * @param dataSetDesign
 * @param appContext
 * @throws DataException
 */
private void initialize(DataEngineImpl dataEngine,IBaseDataSetDesign dataSetDesign,Map appContext) throws DataException {
  dataSet=(IJointDataSetDesign)dataSetDesign;
  ResultIterator left=getSortedResultIterator(dataEngine,dataSet.getLeftDataSetDesignName(),appContext,dataSet.getJoinConditions(),true);
  ResultIterator right=getSortedResultIterator(dataEngine,dataSet.getRightDataSetDesignName(),appContext,dataSet.getJoinConditions(),false);
  IJoinConditionMatcher matcher=new JoinConditionMatcher(left.getOdiResult(),right.getOdiResult(),left.getScope(),right.getScope(),dataSet.getJoinConditions());
  JointResultMetadata meta=getJointResultMetadata(left,right);
  resultClass=getPreparedResultClass(meta.getResultClass());
  populator=JointDataSetPopulatorFactory.getBinaryTreeDataSetPopulator(left.getOdiResult(),right.getOdiResult(),meta,matcher,dataSet.getJoinType());
}

Fixed version (ground truth):
/** 
 * Initialize the instance.
 * @param dataEngine
 * @param dataSetDesign
 * @param appContext
 * @throws DataException
 */
private void initialize(DataEngineImpl dataEngine,IBaseDataSetDesign dataSetDesign,Map appContext) throws DataException {
  dataSet=(IJointDataSetDesign)dataSetDesign;
  ResultIterator left=getSortedResultIterator(dataEngine,dataSet.getLeftDataSetDesignName(),appContext,dataSet.getJoinConditions(),true);
  ResultIterator right=getSortedResultIterator(dataEngine,dataSet.getRightDataSetDesignName(),appContext,dataSet.getJoinConditions(),false);
  IJoinConditionMatcher matcher=new JoinConditionMatcher(left.getOdiResult(),right.getOdiResult(),left.getScope(),right.getScope(),dataSet.getJoinConditions());
  JointResultMetadata meta=getJointResultMetadata(left,right);
  resultClass=meta.getResultClass();
  populator=JointDataSetPopulatorFactory.getBinaryTreeDataSetPopulator(left.getOdiResult(),right.getOdiResult(),meta,matcher,dataSet.getJoinType());
}
Program: 78366
Project: 78366
Buggy source:
/** 
 * Create an instance of IResultObject.
 * @param primary
 * @param secondary
 * @return
 * @throws DataException
 */
private IResultObject createResultObject(IResultObject primary,IResultObject secondary) throws DataException {
  Object[] fields=new Object[meta.getResultClass().getFieldCount()];
  for (int i=1; i <= fields.length; i++) {
    IResultObject ri=null;
    if (meta.isFromLeftResultSet(i)) {
      if (joinType != IJointDataSetDesign.RIGHT_OUTER_JOIN)       ri=primary;
 else       ri=secondary;
    }
 else {
      if (joinType != IJointDataSetDesign.RIGHT_OUTER_JOIN)       ri=secondary;
 else       ri=primary;
    }
    fields[i - 1]=ri == null ? null : ri.getFieldValue(meta.getSourceIndex(i));
  }
  return new ResultObject(meta.getResultClass(),fields);
}

Fixed version (ground truth):
/** 
 * Create an instance of IResultObject.
 * @param primary
 * @param secondary
 * @return
 * @throws DataException
 */
private IResultObject createResultObject(IResultObject primary,IResultObject secondary) throws DataException {
  Object[] fields=new Object[meta.getResultClass().getFieldCount()];
  for (int i=1; i <= fields.length; i++) {
    IResultObject ri=null;
    if (meta.getColumnSource(i) == JointResultMetadata.COLUMN_TYPE_LEFT) {
      if (joinType != IJointDataSetDesign.RIGHT_OUTER_JOIN)       ri=primary;
 else       ri=secondary;
    }
 else     if (meta.getColumnSource(i) == JointResultMetadata.COLUMN_TYPE_RIGHT) {
      if (joinType != IJointDataSetDesign.RIGHT_OUTER_JOIN)       ri=secondary;
 else       ri=primary;
    }
    fields[i - 1]=ri == null ? null : ri.getFieldValue(meta.getSourceIndex(i));
  }
  return new ResultObject(meta.getResultClass(),fields);
}
Program: 78367
Project: 78367
Buggy source:
/** 
 * Constructor 
 * @param resultClass
 * @param isFromLeftResultSet
 * @param index
 */
public JointResultMetadata(IResultClass resultClass,boolean[] isFromLeftResultSet,int[] index){
  this.resultClass=resultClass;
  this.isFromLeftResultSet=isFromLeftResultSet;
  this.columnIndex=index;
}

Fixed version (ground truth):
/** 
 * Constructor 
 * @param resultClass
 * @param isFromLeftResultSet
 * @param index
 */
public JointResultMetadata(IResultClass resultClass,int[] columnSource,int[] index){
  this.resultClass=resultClass;
  this.columnSource=columnSource;
  this.columnIndex=index;
}
Program: 78369
Project: 78369
Buggy source:
public DesignElementHandle createElement(Object extendedData){
  ExtendedItemHandle handle=DesignElementFactory.getInstance().newExtendedItem(getNewName(extendedData),getElementType());
  if (getBuilder() != null) {
    if (!editElement(handle)) {
      return null;
    }
  }
  return handle;
}

Fixed version (ground truth):
public DesignElementHandle createElement(Object extendedData){
  ExtendedItemHandle handle=DesignElementFactory.getInstance().newExtendedItem(getNewName(extendedData),getElementType());
  return handle;
}
Program: 78370
Project: 78370
Buggy source:
protected boolean performInsert(Object model,SlotHandle slotHandle,String type,String position,Map extendData) throws Exception {
  DesignElementHandle elementHandle=createElement(slotHandle,type);
  if (extendData != null) {
    extendData.put(IRequestConstants.REQUEST_KEY_RESULT,elementHandle);
  }
  if (elementHandle == null) {
    return false;
  }
  if (position == InsertAction.CURRENT) {
    slotHandle.add(elementHandle);
  }
 else {
    int pos=DNDUtil.calculateNextPosition(model,DNDUtil.handleValidateTargetCanContain(model,elementHandle,true));
    if (pos > 0 && position == InsertAction.ABOVE) {
      pos--;
    }
    if (pos == -1) {
      slotHandle.add(elementHandle);
    }
 else {
      slotHandle.add(elementHandle,pos);
    }
  }
  return true;
}

Fixed version (ground truth):
protected boolean performInsert(Object model,SlotHandle slotHandle,String type,String position,Map extendData) throws Exception {
  DesignElementHandle elementHandle=createElement(slotHandle,type);
  if (extendData != null) {
    extendData.put(IRequestConstants.REQUEST_KEY_RESULT,elementHandle);
  }
  if (elementHandle == null) {
    return false;
  }
  if (position == InsertAction.CURRENT) {
    slotHandle.add(elementHandle);
  }
 else {
    int pos=DNDUtil.calculateNextPosition(model,DNDUtil.handleValidateTargetCanContain(model,elementHandle,true));
    if (pos > 0 && position == InsertAction.ABOVE) {
      pos--;
    }
    if (pos == -1) {
      slotHandle.add(elementHandle);
    }
 else {
      slotHandle.add(elementHandle,pos);
    }
  }
  if (elementHandle instanceof ExtendedItemHandle) {
    if (!ElementProcessorFactory.createProcessor(elementHandle).editElement(elementHandle)) {
      return false;
    }
  }
  return true;
}
Program: 78371
Project: 78371
Buggy source:
/** 
 * Testcase for test setCategoryProvider() method
 */
public void testSetCategoryProvider(){
  BaseAttributePage page=new BaseAttributePage(new Shell(),SWT.NULL);
  page.setCategoryProvider(null);
  assertEquals(0,page.categoryList.getItemCount());
  final String[] labels=new String[]{"String_Node_Str","String_Node_Str"};
  page.setCategoryProvider(new ICategoryProvider(){
    public String[] getCategoryLabels(){
      return labels;
    }
    public void createCategoryPanes(    Composite parent,    List input){
    }
    public void setCategoryInput(    Composite parent,    List input){
    }
    public Control getCategoryPane(    String category){
      return null;
    }
    public String getCategoryByIndex(    int index){
      return null;
    }
  }
);
  assertEquals(labels.length,page.categoryList.getItemCount());
  assertEquals(0,page.categoryList.getSelectionIndex());
}

Fixed version (ground truth):
/** 
 * Testcase for test setCategoryProvider() method
 */
public void testSetCategoryProvider(){
}
Program: 78372
Project: 78372
Buggy source:
/** 
 * Execute the report design which includes: <br> 1. Read the input design and create the task. <br> 2. Set report render options (including format, locale, output file name etc). <br> 3. Run the task.
 */
protected int runAndRenderReport(){
  try {
    IReportRunnable runnable=engine.openReportDesign(source);
    HashMap inputValues=evaluateParameterValues(runnable);
    IRunAndRenderTask task=engine.createRunAndRenderTask(runnable);
    task.setParameterValues(inputValues);
    IRenderOption options;
    if (format.equalsIgnoreCase("String_Node_Str")) {
      options=new FORenderOption();
    }
 else     if (format.equalsIgnoreCase("String_Node_Str")) {
      options=new FORenderOption();
    }
 else {
      options=new HTMLRenderOption();
      if ("String_Node_Str".equals(htmlType))       ((HTMLRenderOption)options).setEmbeddable(true);
    }
    options.setOutputFormat(format);
    options.setOutputFileName(targetFile);
    options.getOutputSetting().put(HTMLRenderOption.URL_ENCODING,encoding);
    task.setRenderOption(options);
    if (format.equalsIgnoreCase("String_Node_Str")) {
      HTMLRenderContext renderContext=new HTMLRenderContext();
      renderContext.setImageDirectory("String_Node_Str");
      HashMap appContext=new HashMap();
      appContext.put(EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT,renderContext);
      task.setAppContext(appContext);
    }
    task.setLocale(getLocale(locale));
    task.run();
    return 0;
  }
 catch (  EngineException e) {
    logger.log(Level.SEVERE,e.getMessage(),e);
    return -1;
  }
}

Fixed version (ground truth):
/** 
 * Execute the report design which includes: <br> 1. Read the input design and create the task. <br> 2. Set report render options (including format, locale, output file name etc). <br> 3. Run the task.
 */
protected int runAndRenderReport(){
  try {
    IReportRunnable runnable=engine.openReportDesign(source);
    HashMap inputValues=evaluateParameterValues(runnable);
    IRunAndRenderTask task=engine.createRunAndRenderTask(runnable);
    task.setParameterValues(inputValues);
    IRenderOption options;
    if (format.equalsIgnoreCase("String_Node_Str")) {
      options=new HTMLRenderOption();
      if ("String_Node_Str".equals(htmlType))       ((HTMLRenderOption)options).setEmbeddable(true);
    }
 else {
      options=new RenderOptionBase();
    }
    options.setOutputFormat(format);
    options.setOutputFileName(targetFile);
    options.getOutputSetting().put(HTMLRenderOption.URL_ENCODING,encoding);
    task.setRenderOption(options);
    if (format.equalsIgnoreCase("String_Node_Str")) {
      HTMLRenderContext renderContext=new HTMLRenderContext();
      renderContext.setImageDirectory("String_Node_Str");
      HashMap appContext=new HashMap();
      appContext.put(EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT,renderContext);
      task.setAppContext(appContext);
    }
    task.setLocale(getLocale(locale));
    task.run();
    return 0;
  }
 catch (  EngineException e) {
    logger.log(Level.SEVERE,e.getMessage(),e);
    return -1;
  }
}
Program: 78373
Project: 78373
Buggy source:
public void setRenderOption(IRenderOption options){
  if (options != null) {
    String format=options.getOutputFormat();
    if (format == null || format.length() == 0) {
      options.setOutputFormat("String_Node_Str");
    }
    if ("String_Node_Str".equalsIgnoreCase(format)) {
      if (options instanceof FORenderOption) {
        FORenderOption foOptions=(FORenderOption)options;
        if (foOptions.getTailoredForFOP()) {
          options.setOutputFormat("String_Node_Str");
        }
      }
    }
  }
  renderOptions=options;
  executionContext.setRenderOption(renderOptions);
}

Fixed version (ground truth):
public void setRenderOption(IRenderOption options){
  if (options != null) {
    String format=options.getOutputFormat();
    if (format == null || format.length() == 0) {
      options.setOutputFormat("String_Node_Str");
    }
  }
  renderOptions=options;
  executionContext.setRenderOption(renderOptions);
}
Program: 78374
Project: 78374
Buggy source:
/** 
 * Create an IJointDataSetDesign instance.
 * @param handle
 * @param context2
 * @return
 * @throws BirtException
 */
private IJointDataSetDesign newJointDataSet(JointDataSetHandle handle,ExecutionContext context2) throws BirtException {
  Iterator it=handle.joinConditionsIterator();
  List joinConditions=new ArrayList();
  JoinConditionHandle jc=null;
  while (it.hasNext()) {
    jc=(JoinConditionHandle)it.next();
    joinConditions.add(new JoinConditionExpression(new ScriptExpression(jc.getLeftExpression()),new ScriptExpression(jc.getRightExpression()),toDteJoinOperator(jc.getOperator())));
  }
  IBaseDataSetDesign leftDataSet=new BaseDataSetDesign(jc.getLeftDataSet());
  IBaseDataSetDesign rightDataSet=new BaseDataSetDesign(jc.getRightDataSet());
  int joinType=toDteJoinType(jc.getJoinType());
  IBaseDataSetEventHandler eventHandler=new DataSetScriptExecutor(handle,context);
  JointDataSetDesign dteDataSet=new JointDataSetDesign(handle.getName(),leftDataSet,rightDataSet,joinType,joinConditions);
  dteDataSet.setEventHandler(eventHandler);
  adaptBaseDataSet(handle,dteDataSet);
  return dteDataSet;
}

Fixed version (ground truth):
/** 
 * Create an IJointDataSetDesign instance.
 * @param handle
 * @param context2
 * @return
 * @throws BirtException
 */
private IJointDataSetDesign newJointDataSet(JointDataSetHandle handle,ExecutionContext context2) throws BirtException {
  Iterator it=handle.joinConditionsIterator();
  List joinConditions=new ArrayList();
  JoinConditionHandle jc=null;
  while (it.hasNext()) {
    jc=(JoinConditionHandle)it.next();
    joinConditions.add(new JoinConditionExpression(new ScriptExpression(jc.getLeftExpression()),new ScriptExpression(jc.getRightExpression()),toDteJoinOperator(jc.getOperator())));
  }
  IBaseDataSetDesign leftDataSet=null;
  IBaseDataSetDesign rightDataSet=null;
  List dataSets=handle.getModuleHandle().getAllDataSets();
  for (int i=0; i < dataSets.size(); i++) {
    DataSetHandle dsHandle=(DataSetHandle)dataSets.get(i);
    if (dsHandle.getName() != null) {
      if (dsHandle.getName().equals(jc.getLeftDataSet())) {
        leftDataSet=createDataSetDesign(dsHandle);
      }
      if (dsHandle.getName().equals(jc.getRightDataSet())) {
        rightDataSet=createDataSetDesign(dsHandle);
      }
    }
  }
  int joinType=toDteJoinType(jc.getJoinType());
  IBaseDataSetEventHandler eventHandler=new DataSetScriptExecutor(handle,context);
  JointDataSetDesign dteDataSet=new JointDataSetDesign(handle.getName(),leftDataSet,rightDataSet,joinType,joinConditions);
  dteDataSet.setEventHandler(eventHandler);
  adaptBaseDataSet(handle,dteDataSet);
  return dteDataSet;
}
Program: 78375
Project: 78375
Buggy source:
protected Element createText(String text){
  Element elem=dom.createElement("String_Node_Str");
  elem.appendChild(dom.createTextNode(text));
  elem.setAttribute("String_Node_Str",getFont().getFamily());
  elem.setAttribute("String_Node_Str",Integer.toString(getFont().getSize()));
  String style=getRenderingStyle(RenderingHints.KEY_TEXT_ANTIALIASING);
  if (color != null) {
    String alpha=alphaToString(color);
    if (alpha != null)     style+="String_Node_Str" + alpha + "String_Node_Str";
    style+="String_Node_Str" + serializeToString(color) + "String_Node_Str";
  }
  elem.setAttribute("String_Node_Str",style);
  if (transforms.getType() != AffineTransform.TYPE_IDENTITY) {
    double[] matrix=new double[6];
    transforms.getMatrix(matrix);
    elem.setAttribute("String_Node_Str","String_Node_Str" + matrix[0] + "String_Node_Str"+ matrix[1]+ "String_Node_Str"+ matrix[2]+ "String_Node_Str"+ matrix[3]+ "String_Node_Str"+ matrix[4]+ "String_Node_Str"+ matrix[5]+ "String_Node_Str");
  }
  return elem;
}

Fixed version (ground truth):
protected Element createText(String text){
  Element elem=dom.createElement("String_Node_Str");
  elem.appendChild(dom.createTextNode(text));
switch (getFont().getStyle()) {
case Font.BOLD:
    elem.setAttribute("String_Node_Str","String_Node_Str");
  break;
case Font.ITALIC:
elem.setAttribute("String_Node_Str","String_Node_Str");
break;
case (Font.BOLD + Font.ITALIC):
elem.setAttribute("String_Node_Str","String_Node_Str");
elem.setAttribute("String_Node_Str","String_Node_Str");
break;
}
String textDecorator=null;
Map attributes=getFont().getAttributes();
if (attributes.get(TextAttribute.UNDERLINE) == TextAttribute.UNDERLINE_ON) {
textDecorator="String_Node_Str";
}
if (attributes.get(TextAttribute.STRIKETHROUGH) == TextAttribute.STRIKETHROUGH_ON) {
if (textDecorator == null) textDecorator="String_Node_Str";
 else textDecorator+="String_Node_Str";
}
if (textDecorator != null) elem.setAttribute("String_Node_Str",textDecorator);
elem.setAttribute("String_Node_Str",getFont().getFamily());
elem.setAttribute("String_Node_Str",Integer.toString(getFont().getSize()));
String style=getRenderingStyle(RenderingHints.KEY_TEXT_ANTIALIASING);
if (color != null) {
String alpha=alphaToString(color);
if (alpha != null) style+="String_Node_Str" + alpha + "String_Node_Str";
style+="String_Node_Str" + serializeToString(color) + "String_Node_Str";
}
elem.setAttribute("String_Node_Str",style);
if (transforms.getType() != AffineTransform.TYPE_IDENTITY) {
double[] matrix=new double[6];
transforms.getMatrix(matrix);
elem.setAttribute("String_Node_Str","String_Node_Str" + matrix[0] + "String_Node_Str"+ matrix[1]+ "String_Node_Str"+ matrix[2]+ "String_Node_Str"+ matrix[3]+ "String_Node_Str"+ matrix[4]+ "String_Node_Str"+ matrix[5]+ "String_Node_Str");
}
return elem;
}
Program: 78376
Project: 78376
Buggy source:
/** 
 * Returns the value of an element reference property. Returns a handle to the referenced element, or <code>null</code> if the reference is unresolved or unset.
 * @param propName the name of the property.
 * @return a corresponding DesignElement handle to the referenced element
 */
public DesignElementHandle getElementProperty(String propName){
  DesignElement target=getElement().getReferenceProperty(module,propName);
  if (target == null)   return null;
  return target.getHandle(module);
}

Fixed version (ground truth):
/** 
 * Returns the value of an element reference property. Returns a handle to the referenced element, or <code>null</code> if the reference is unresolved or unset.
 * @param propName the name of the property.
 * @return a corresponding DesignElement handle to the referenced element
 */
public DesignElementHandle getElementProperty(String propName){
  DesignElement target=getElement().getReferenceProperty(module,propName);
  if (target == null)   return null;
  return target.getHandle(target.getRoot());
}