nus-yam/ex-repair huggingface dataset:
Program: 66556
Project: 66556
Buggy source:
/** 
 * Returns the classpath associated with given report file.
 * @param reportFilePath The full path of the report file.
 * @return
 */
public static URL[] getWorkspaceClassPath(String reportFilePath){
  ArrayList<URL> urls=new ArrayList<URL>();
  try {
    IReportClasspathResolver provider=ReportPlugin.getDefault().getReportClasspathResolverService();
    if (provider != null) {
      String[] classpaths=provider.resolveClasspath(reportFilePath);
      if (classpaths != null && classpaths.length != 0) {
        for (int j=0; j < classpaths.length; j++) {
          File file=new File(classpaths[j]);
          try {
            urls.add(file.toURI().toURL());
          }
 catch (          MalformedURLException e) {
            e.printStackTrace();
          }
        }
      }
    }
  }
 catch (  Exception e) {
  }
  return urls.toArray(new URL[urls.size()]);
}

Fixed version (ground truth):
/** 
 * Returns the classpath associated with given report file.
 * @param reportFilePath The full path of the report file.
 * @return
 */
public static URL[] getWorkspaceClassPath(String reportFilePath){
  ArrayList<URL> urls=new ArrayList<URL>();
  try {
    IReportClasspathResolver provider=ReportPlugin.getDefault().getReportClasspathResolverService();
    if (provider != null) {
      String[] classpaths=provider.resolveClasspath(reportFilePath);
      if (classpaths != null && classpaths.length != 0) {
        for (int j=0; j < classpaths.length; j++) {
          File file=new File(classpaths[j]);
          try {
            urls.add(file.toURI().toURL());
          }
 catch (          MalformedURLException e) {
            e.printStackTrace();
          }
        }
      }
    }
  }
 catch (  Throwable t) {
  }
  return urls.toArray(new URL[urls.size()]);
}
Program: 66557
Project: 66557
Buggy source:
/** 
 * @return
 */
private boolean createSelectedDataSourceODAV2(){
  Object dataSourceObj=getSelectedDataSource();
  String driverName=null;
  Class classType=null;
  if (dataSourceObj instanceof ExtensionManifest) {
    driverName=((ExtensionManifest)dataSourceObj).getExtensionID();
    classType=OdaDataSourceHandle.class;
  }
  try {
    DataSourceHandle dsHandle=helper.createDataSource(classType,dataSourceName.getText(),driverName);
    slotHandle.add(dsHandle);
    createSelectedDataSourceTearDown();
    return true;
  }
 catch (  SemanticException e) {
    getActivityStack().rollback();
    ExceptionHandler.handle(e);
    return false;
  }
}

Fixed version (ground truth):
/** 
 * @return
 */
private boolean createSelectedDataSourceODAV2(){
  Object dataSourceObj=getSelectedDataSource();
  String driverName=null;
  Class classType=null;
  if (dataSourceObj instanceof ExtensionManifest) {
    driverName=((ExtensionManifest)dataSourceObj).getExtensionID();
    classType=OdaDataSourceHandle.class;
  }
  try {
    DataSourceHandle dsHandle=helper.createDataSource(classType,dsName,driverName);
    slotHandle.add(dsHandle);
    createSelectedDataSourceTearDown();
    return true;
  }
 catch (  SemanticException e) {
    getActivityStack().rollback();
    ExceptionHandler.handle(e);
    return false;
  }
}
Program: 66558
Project: 66558
Buggy source:
/** 
 * @return
 */
private boolean createNoneODASelectedDataSource(){
  DataSourceHandle dsHandle=null;
  if (helper.SCRIPT_DATA_SOURCE_DISPLAY_NAME.equals(prevSelectedDataSourceType.toString())) {
    String driverName=DataUIConstants.DATA_SOURCE_SCRIPT;
    Class classType=ScriptDataSourceHandle.class;
    dsHandle=helper.createDataSource(classType,dataSourceName.getText(),driverName);
  }
 else {
    dsHandle=helper.createNoneOdaDataSourceHandle(dataSourceName.getText(),prevSelectedDataSourceType);
  }
  if (dsHandle == null)   return false;
  try {
    slotHandle.add(dsHandle);
  }
 catch (  ContentException e) {
    ExceptionHandler.handle(e);
  }
catch (  NameException e) {
    ExceptionHandler.handle(e);
  }
  if (dsHandle instanceof ScriptDataSourceHandle) {
    Utility.setScriptActivityEditor();
  }
  createSelectedDataSourceTearDown();
  return true;
}

Fixed version (ground truth):
/** 
 * @return
 */
private boolean createNoneODASelectedDataSource(){
  DataSourceHandle dsHandle=null;
  if (helper.SCRIPT_DATA_SOURCE_DISPLAY_NAME.equals(prevSelectedDataSourceType.toString())) {
    String driverName=DataUIConstants.DATA_SOURCE_SCRIPT;
    Class classType=ScriptDataSourceHandle.class;
    dsHandle=helper.createDataSource(classType,dsName,driverName);
  }
 else {
    dsHandle=helper.createNoneOdaDataSourceHandle(dsName,prevSelectedDataSourceType);
  }
  if (dsHandle == null)   return false;
  try {
    slotHandle.add(dsHandle);
  }
 catch (  ContentException e) {
    ExceptionHandler.handle(e);
  }
catch (  NameException e) {
    ExceptionHandler.handle(e);
  }
  if (dsHandle instanceof ScriptDataSourceHandle) {
    Utility.setScriptActivityEditor();
  }
  createSelectedDataSourceTearDown();
  return true;
}
Program: 66560
Project: 66560
Buggy source:
public void modifyText(ModifyEvent e){
  if (StringUtil.isBlank(dataSourceName.getText().trim())) {
    setMessage(EMPTY_NAME,ERROR);
  }
 else   if (isDuplicateName()) {
    setMessage(DUPLICATE_NAME,ERROR);
  }
 else   if (containInvalidCharactor(dataSourceName.getText())) {
    String msg=Messages.getFormattedString("String_Node_Str",new Object[]{dataSourceName.getText()});
    setMessage(msg,ERROR);
  }
 else {
    setMessage(Messages.getString("String_Node_Str"));
  }
  setPageComplete(!helper.hasNextPage(getSelectedDataSource()) && getMessageType() != ERROR);
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  dsName=dataSourceName.getText().trim();
  if (StringUtil.isBlank(dataSourceName.getText().trim())) {
    setMessage(EMPTY_NAME,ERROR);
  }
 else   if (isDuplicateName()) {
    setMessage(DUPLICATE_NAME,ERROR);
  }
 else   if (containInvalidCharactor(dataSourceName.getText())) {
    String msg=Messages.getFormattedString("String_Node_Str",new Object[]{dataSourceName.getText()});
    setMessage(msg,ERROR);
  }
 else {
    setMessage(Messages.getString("String_Node_Str"));
  }
  setPageComplete(!helper.hasNextPage(getSelectedDataSource()) && getMessageType() != ERROR);
}
Program: 66561
Project: 66561
Buggy source:
/** 
 * @param dataSourceElement
 * @return
 */
private IWizardPage getNextPageODAV2(IConfigurationElement dataSourceElement){
  useODAV3=false;
  AbstractDataSourceConnectionWizard connectionWizard=null;
  IConfigurationElement[] elements=dataSourceElement.getChildren("String_Node_Str");
  if (elements != null && elements.length > 0) {
    Object wizard=null;
    try {
      wizard=elements[0].createExecutableExtension("String_Node_Str");
    }
 catch (    CoreException e) {
      logger.log(Level.FINE,e.getMessage(),e);
    }
    if (wizard instanceof AbstractDataSourceConnectionWizard) {
      String wizardTitle=Messages.getString("String_Node_Str");
      connectionWizard=((AbstractDataSourceConnectionWizard)wizard);
      connectionWizard.setWindowTitle(wizardTitle);
      connectionWizard.setConfigurationElement(dataSourceElement);
      connectionWizard.addPages();
    }
  }
  dataSourceIsCreated=true;
  if (connectionWizard != null) {
    try {
      connectionWizard.getDataSource().setName(dataSourceName.getText());
      return connectionWizard.getStartingPage();
    }
 catch (    NameException e) {
      dataSourceIsCreated=false;
      ExceptionHandler.handle(e);
    }
  }
  return super.getNextPage();
}

Fixed version (ground truth):
/** 
 * @param dataSourceElement
 * @return
 */
private IWizardPage getNextPageODAV2(IConfigurationElement dataSourceElement){
  useODAV3=false;
  AbstractDataSourceConnectionWizard connectionWizard=null;
  IConfigurationElement[] elements=dataSourceElement.getChildren("String_Node_Str");
  if (elements != null && elements.length > 0) {
    Object wizard=null;
    try {
      wizard=elements[0].createExecutableExtension("String_Node_Str");
    }
 catch (    CoreException e) {
      logger.log(Level.FINE,e.getMessage(),e);
    }
    if (wizard instanceof AbstractDataSourceConnectionWizard) {
      String wizardTitle=Messages.getString("String_Node_Str");
      connectionWizard=((AbstractDataSourceConnectionWizard)wizard);
      connectionWizard.setWindowTitle(wizardTitle);
      connectionWizard.setConfigurationElement(dataSourceElement);
      connectionWizard.addPages();
    }
  }
  dataSourceIsCreated=true;
  if (connectionWizard != null) {
    try {
      connectionWizard.getDataSource().setName(dsName);
      return connectionWizard.getStartingPage();
    }
 catch (    NameException e) {
      dataSourceIsCreated=false;
      ExceptionHandler.handle(e);
    }
  }
  return super.getNextPage();
}
Program: 66562
Project: 66562
Buggy source:
/** 
 * @param dataSourceElementID
 * @return
 */
private IWizardPage getNextPageODAV3(String dataSourceElementID,DesignSessionRequest request){
  useODAV3=true;
  try {
    if (m_designSession == null)     m_designSession=DataSourceDesignSession.startNewDesign(dataSourceElementID,dataSourceName.getText(),null,request);
 else     m_designSession.restartNewDesign(dataSourceElementID,dataSourceName.getText(),null,request);
    m_designSession.setUseProfileSelectionPage(false);
    return m_designSession.getWizardStartingPage();
  }
 catch (  OdaException e) {
    logger.log(Level.FINE,e.getMessage(),e);
  }
  return super.getNextPage();
}

Fixed version (ground truth):
/** 
 * @param dataSourceElementID
 * @return
 */
private IWizardPage getNextPageODAV3(String dataSourceElementID,DesignSessionRequest request){
  useODAV3=true;
  try {
    if (m_designSession == null)     m_designSession=DataSourceDesignSession.startNewDesign(dataSourceElementID,dsName,null,request);
 else     m_designSession.restartNewDesign(dataSourceElementID,dsName,null,request);
    m_designSession.setUseProfileSelectionPage(false);
    return m_designSession.getWizardStartingPage();
  }
 catch (  OdaException e) {
    logger.log(Level.FINE,e.getMessage(),e);
  }
  return super.getNextPage();
}
Program: 66563
Project: 66563
Buggy source:
JarLoader(URL url) throws IOException {
  baseUrl=url;
  jarUrl=new URL("String_Node_Str","String_Node_Str",-1,baseUrl + "String_Node_Str");
  if (baseUrl.getProtocol().equalsIgnoreCase("String_Node_Str")) {
    String filePath=baseUrl.getFile();
    jarFile=new JarFile(filePath);
  }
 else {
    JarURLConnection jarConn=(JarURLConnection)jarUrl.openConnection();
    jarFile=jarConn.getJarFile();
  }
}

Fixed version (ground truth):
JarLoader(URL url) throws IOException {
  baseUrl=url;
  jarUrl=new URL("String_Node_Str","String_Node_Str",-1,baseUrl + "String_Node_Str");
  if (baseUrl.getProtocol().equalsIgnoreCase("String_Node_Str")) {
    String filePath=getFilePath(baseUrl);
    jarFile=new JarFile(filePath);
  }
 else {
    JarURLConnection jarConn=(JarURLConnection)jarUrl.openConnection();
    jarFile=jarConn.getJarFile();
  }
}
Program: 66564
Project: 66564
Buggy source:
FileLoader(URL url){
  baseUrl=url;
  baseDir=new File(url.getFile());
  codeSource=new CodeSource(baseUrl,(CodeSigner[])null);
}

Fixed version (ground truth):
FileLoader(URL url){
  baseUrl=url;
  baseDir=new File(getFilePath(url));
  codeSource=new CodeSource(baseUrl,(CodeSigner[])null);
}
Program: 66566
Project: 66566
Buggy source:
public void open(Map appContext,EngineConfig config) throws BirtException {
  engine=createReportEngine(config);
  task=engine.createDatasetPreviewTask();
  task.setMaxRow(maxRow);
  task.setDataSet(dataSetHandle);
  task.setAppContext(appContext);
  ReportParameterUtil.completeParamDefalutValues(task,dataSetHandle.getModuleHandle());
}

Fixed version (ground truth):
public void open(Map appContext,EngineConfig config) throws BirtException {
  engine=createReportEngine(config);
  if (mode == PreviewType.RESULTSET) {
    task=engine.createDatasetPreviewTask();
  }
 else {
    task=new OutParameterPreviewTask((ReportEngine)engine);
  }
  task.setMaxRow(maxRow);
  task.setDataSet(dataSetHandle);
  task.setAppContext(appContext);
  ReportParameterUtil.completeParamDefalutValues(task,dataSetHandle.getModuleHandle());
}
Program: 66567
Project: 66567
Buggy source:
public DataSetPreviewer(DataSetHandle dataSetHandle,int maxRow,DataSetEditor container){
  this.dataSetHandle=dataSetHandle;
  this.maxRow=maxRow;
}

Fixed version (ground truth):
public DataSetPreviewer(DataSetHandle dataSetHandle,int maxRow,PreviewType mode){
  this.dataSetHandle=dataSetHandle;
  this.maxRow=maxRow;
  this.mode=mode;
}
Program: 66568
Project: 66568
Buggy source:
protected Control createContents(Composite parent){
  Control control=super.createContents(parent);
  getShell().setText(title);
  setTitle(TITLE);
  setMessage(PROMRT_MESSAGE);
  categoryTable.setInput("String_Node_Str");
  handleDefaultSelection();
  getShell().setDefaultButton(null);
  sourceViewer.getTextWidget().setFocus();
  return control;
}

Fixed version (ground truth):
protected Control createContents(Composite parent){
  Control control=super.createContents(parent);
  getShell().setText(title);
  setTitle(TITLE);
  setMessage(PROMRT_MESSAGE);
  categoryTable.setInput("String_Node_Str");
  handleDefaultSelection();
  sourceViewer.getTextWidget().setFocus();
  return control;
}
Program: 66569
Project: 66569
Buggy source:
JarLoader(URL url) throws IOException {
  baseUrl=url;
  jarUrl=new URL("String_Node_Str","String_Node_Str",-1,baseUrl + "String_Node_Str");
  if (baseUrl.getProtocol().equalsIgnoreCase("String_Node_Str")) {
    String filePath=getFilePath(baseUrl);
    jarFile=new JarFile(filePath);
  }
 else {
    JarURLConnection jarConn=(JarURLConnection)jarUrl.openConnection();
    jarFile=jarConn.getJarFile();
  }
}

Fixed version (ground truth):
JarLoader(URL url) throws IOException {
  baseUrl=url;
  jarUrl=new URL("String_Node_Str","String_Node_Str",-1,baseUrl + "String_Node_Str");
  if (baseUrl.getProtocol().equalsIgnoreCase("String_Node_Str")) {
    String filePath=baseUrl.getFile();
    jarFile=new JarFile(filePath);
  }
 else {
    JarURLConnection jarConn=(JarURLConnection)jarUrl.openConnection();
    jarFile=jarConn.getJarFile();
  }
}
Program: 66570
Project: 66570
Buggy source:
FileLoader(URL url){
  baseUrl=url;
  baseDir=new File(getFilePath(url));
  codeSource=new CodeSource(baseUrl,(CodeSigner[])null);
}

Fixed version (ground truth):
FileLoader(URL url){
  baseUrl=url;
  baseDir=new File(url.getFile());
  codeSource=new CodeSource(baseUrl,(CodeSigner[])null);
}
Program: 66571
Project: 66571
Buggy source:
/** 
 * Converts the dimension value to a locale-independent string. The string will be converted into a format like "#.###", there is no group separator and remains at most 3 digits after the decimal separator. e.g: "12,000,000.12345cm" will be converted into "12000000.123"
 * @return The string presentation of this dimension value.
 */
public String toString(){
  String value=StringUtil.doubleToString(measure,MAX_FORMAT_NUMBER);
  return value + units;
}

Fixed version (ground truth):
/** 
 * Converts the dimension value to a locale-independent string. The string will be converted into a format like "#.###", there is no group separator and remains at most 3 digits after the decimal separator. e.g: "12,000,000.12345cm" will be converted into "12000000.123"
 * @return The string presentation of this dimension value.
 */
public String toString(){
  String value=formatter.format(measure);
  return value + units;
}
Program: 66572
Project: 66572
Buggy source:
/** 
 * Parses a dimension string in locale-independent way. The input string must match the following: <ul> <li>null</li> <li>[1-9][0-9]*[.[0-9]*[ ]*[in|cm|mm|pt|pc|em|ex|px|%]] </li> </ul>
 * @param value the dimension string to parse
 * @return a dimension object representing the dimension string.
 * @throws PropertyValueException if the string is not valid
 * @deprecated replaced by {@link StringUtil#parse(String)}
 */
public static DimensionValue parse(String value) throws PropertyValueException {
  return DimensionValueUtil.doParse(value,false,null);
}

Fixed version (ground truth):
/** 
 * Parses a dimension string in locale-independent way. The input string must match the following: <ul> <li>null</li> <li>[1-9][0-9]*[.[0-9]*[ ]*[in|cm|mm|pt|pc|em|ex|px|%]]</li> </ul>
 * @param value the dimension string to parse
 * @return a dimension object representing the dimension string.
 * @throws PropertyValueException if the string is not valid
 * @deprecated replaced by {@link StringUtil#parse(String)}
 */
public static DimensionValue parse(String value) throws PropertyValueException {
  return DimensionValueUtil.doParse(value,false,null);
}
Program: 66573
Project: 66573
Buggy source:
public final IReportItem copy(){
  final ChartReportItemImpl crii=new ChartReportItemImpl(handle);
  crii.bCopied=true;
  if (!ChartCubeUtil.isAxisChart(handle)) {
    crii.cm=cm == null ? null : cm.copyInstance();
  }
  return crii;
}

Fixed version (ground truth):
public final IReportItem copy(){
  final ChartReportItemImpl crii=new ChartReportItemImpl(handle);
  crii.bCopied=true;
  if (!ChartCubeUtil.isAxisChart(handle)) {
    if (cm == null) {
      crii.cm=null;
    }
 else {
synchronized (this) {
        try {
          crii.cm=cm.copyInstance();
        }
 catch (        ConcurrentModificationException e) {
          crii.cm=cm.copyInstance();
        }
catch (        NullPointerException e) {
          crii.cm=cm.copyInstance();
        }
      }
    }
  }
  return crii;
}
Program: 66575
Project: 66575
Buggy source:
protected Control createContents(Composite parent){
  Composite mainComposite=new Composite(parent,SWT.NONE);
  GridLayout twoColLayout=new GridLayout();
  twoColLayout.numColumns=2;
  twoColLayout.marginWidth=10;
  twoColLayout.marginHeight=10;
  mainComposite.setLayout(twoColLayout);
  externalBiDiFormatFrame=BidiGUIUtility.INSTANCE.addBiDiFormatFrame(mainComposite,Messages.getString("String_Node_Str"),new BidiFormat(externalBiDiFormatStr));
  return mainComposite;
}

Fixed version (ground truth):
protected Control createContents(Composite parent){
  Composite mainComposite=new Composite(parent,SWT.NONE);
  GridLayout twoColLayout=new GridLayout();
  twoColLayout.numColumns=2;
  twoColLayout.marginWidth=10;
  twoColLayout.marginHeight=10;
  mainComposite.setLayout(twoColLayout);
  externalBiDiFormatFrame=BidiGUIUtility.INSTANCE.addBiDiFormatFrame(mainComposite,Messages.getString("String_Node_Str"),new BidiFormat(externalBiDiFormatStr));
  Utility.setSystemHelp(getControl(),IHelpConstants.CONEXT_ID_PREFERENCE_JDBC_BIDI);
  return mainComposite;
}
Program: 66579
Project: 66579
Buggy source:
/** 
 * @param meta
 * @throws BirtException
 */
private void addResultSetColumn(DataSetHandle dataSetHandle,IResultMetaData meta) throws BirtException {
  if (meta == null || !(dataSetHandle instanceof OdaDataSetHandle))   return;
  Set computedColumnNameSet=new HashSet();
  Iterator computedIter=dataSetHandle.computedColumnsIterator();
  while (computedIter.hasNext()) {
    ComputedColumnHandle handle=(ComputedColumnHandle)computedIter.next();
    computedColumnNameSet.add(handle.getName());
  }
  List columnList=new ArrayList();
  HashSet orgColumnNameSet=new HashSet();
  HashSet uniqueColumnNameSet=new HashSet();
  for (int i=1; i <= meta.getColumnCount(); i++) {
    OdaResultSetColumn rsColumn=new OdaResultSetColumn();
    String uniqueName;
    if (!computedColumnNameSet.contains(meta.getColumnName(i))) {
      uniqueName=MetaDataPopulator.getUniqueName(orgColumnNameSet,uniqueColumnNameSet,meta.getColumnName(i),i - 1);
      rsColumn.setColumnName(uniqueName);
      if (meta.getColumnType(i) != DataType.ANY_TYPE)       rsColumn.setDataType(DataAdapterUtil.adapterToModelDataType(meta.getColumnType(i)));
      rsColumn.setNativeName(meta.getColumnName(i));
      rsColumn.setPosition(Integer.valueOf(i));
      columnList.add(rsColumn);
      uniqueColumnNameSet.add(uniqueName);
    }
  }
  CompatibilityUtil.addResultSetColumn(dataSetHandle,columnList);
}

Fixed version (ground truth):
/** 
 * @param meta
 * @throws BirtException
 */
private void addResultSetColumn(DataSetHandle dataSetHandle,IResultMetaData meta) throws BirtException {
  if (meta == null || !(dataSetHandle instanceof OdaDataSetHandle))   return;
  Set computedColumnNameSet=new HashSet();
  Iterator computedIter=dataSetHandle.computedColumnsIterator();
  while (computedIter.hasNext()) {
    ComputedColumnHandle handle=(ComputedColumnHandle)computedIter.next();
    computedColumnNameSet.add(handle.getName());
  }
  HashSet orgColumnNameSet=new HashSet();
  HashSet uniqueColumnNameSet=new HashSet();
  PropertyHandle handle=dataSetHandle.getPropertyHandle(DataSetHandle.RESULT_SET_PROP);
  for (int i=1; i <= meta.getColumnCount(); i++) {
    OdaResultSetColumn rsColumn=new OdaResultSetColumn();
    String uniqueName;
    if (!computedColumnNameSet.contains(meta.getColumnName(i))) {
      uniqueName=MetaDataPopulator.getUniqueName(orgColumnNameSet,uniqueColumnNameSet,meta.getColumnName(i),i - 1);
      rsColumn.setColumnName(uniqueName);
      if (meta.getColumnType(i) != DataType.ANY_TYPE)       rsColumn.setDataType(DataAdapterUtil.adapterToModelDataType(meta.getColumnType(i)));
      rsColumn.setNativeName(meta.getColumnName(i));
      rsColumn.setPosition(Integer.valueOf(i));
      handle.addItem(rsColumn);
      uniqueColumnNameSet.add(uniqueName);
    }
  }
}
Program: 66580
Project: 66580
Buggy source:
public SAXParser get(Map<String,?> properties) throws ParserConfigurationException, SAXException {
  Set<String> keys=null;
  if (properties != null)   keys=properties.keySet();
synchronized (this) {
    List<SAXParser> list=parserCache.get(keys);
    if (list != null) {
      int size=list.size();
      if (size > 0) {
        return list.remove(size - 1);
      }
    }
 else     parserCache.put(keys,new ArrayList<SAXParser>());
  }
  return createParser(properties);
}

Fixed version (ground truth):
public SAXParser get(Map<String,?> properties) throws ParserConfigurationException, SAXException {
  Set<String> keys=null;
  if (properties != null) {
    keys=new HashSet<String>(properties.keySet());
  }
synchronized (this) {
    List<SAXParser> list=parserCache.get(keys);
    if (list != null) {
      int size=list.size();
      if (size > 0) {
        return list.remove(size - 1);
      }
    }
 else     parserCache.put(keys,new ArrayList<SAXParser>());
  }
  return createParser(properties);
}
Program: 66581
Project: 66581
Buggy source:
/** 
 * set Dte temporary dir.
 * @param tmpdir
 */
public void setTmpdir(String tmpdir){
  this.tmpDir=tmpdir;
}

Fixed version (ground truth):
/** 
 * set Dte temporary dir.
 * @param tmpdir
 */
public void setTmpdir(String tmpdir){
  this.tmpDir=tmpdir;
  DataEngineThreadLocal.getInstance().getPathManager().setTempPath(getTmpdir());
}
Program: 66582
Project: 66582
Buggy source:
public List<String> getACLs(){
  return this.acls;
}

Fixed version (ground truth):
public Map<String,Integer> getACLs(){
  return this.acls;
}
Program: 66583
Project: 66583
Buggy source:
/** 
 * Read acl collections from doc archive.
 * @param reader
 * @return
 * @throws DataException
 */
private void loadGeneralACL() throws DataException {
  this.acls=new ArrayList<String>();
  if (!engine.getContext().hasInStream("String_Node_Str",null,DataEngineContext.ACL_COLLECTION_STREAM)) {
    return;
  }
  DataInputStream aclCollectionStream=new DataInputStream(engine.getContext().getInputStream("String_Node_Str",null,DataEngineContext.ACL_COLLECTION_STREAM));
  try {
    int count=IOUtil.readInt(aclCollectionStream);
    for (int i=0; i < count; i++)     acls.add(IOUtil.readString(aclCollectionStream));
    aclCollectionStream.close();
  }
 catch (  IOException e) {
    throw new DataException(e.getLocalizedMessage(),e);
  }
}

Fixed version (ground truth):
/** 
 * Read acl collections from doc archive.
 * @param reader
 * @return
 * @throws DataException
 */
private void loadGeneralACL() throws DataException {
  this.acls=new LinkedHashMap<String,Integer>();
  if (!engine.getContext().hasInStream("String_Node_Str",null,DataEngineContext.ACL_COLLECTION_STREAM)) {
    return;
  }
  DataInputStream aclCollectionStream=new DataInputStream(engine.getContext().getInputStream("String_Node_Str",null,DataEngineContext.ACL_COLLECTION_STREAM));
  try {
    int count=IOUtil.readInt(aclCollectionStream);
    for (int i=0; i < count; i++)     acls.put(IOUtil.readString(aclCollectionStream),i);
    aclCollectionStream.close();
  }
 catch (  IOException e) {
    throw new DataException(e.getLocalizedMessage(),e);
  }
}
Program: 66584
Project: 66584
Buggy source:
/** 
 * Write ACL collections to the doc archive.
 * @param writer
 * @param acls
 * @throws DataException
 */
private void saveGeneralACL(){
  try {
    if (engine.getContext().getDocWriter() == null || this.acls.isEmpty())     return;
    DataOutputStream aclCollectionStream=new DataOutputStream(engine.getContext().getOutputStream("String_Node_Str",null,DataEngineContext.ACL_COLLECTION_STREAM));
    IOUtil.writeInt(aclCollectionStream,acls.size());
    for (    String acl : acls) {
      IOUtil.writeString(aclCollectionStream,acl);
    }
    aclCollectionStream.close();
  }
 catch (  Exception e) {
    throw new RuntimeException(e.getLocalizedMessage(),e);
  }
}

Fixed version (ground truth):
/** 
 * Write ACL collections to the doc archive.
 * @param writer
 * @param acls
 * @throws DataException
 */
private void saveGeneralACL(){
  try {
    if (engine.getContext().getDocWriter() == null || this.acls.isEmpty())     return;
    DataOutputStream aclCollectionStream=new DataOutputStream(engine.getContext().getOutputStream("String_Node_Str",null,DataEngineContext.ACL_COLLECTION_STREAM));
    IOUtil.writeInt(aclCollectionStream,acls.size());
    for (    String acl : acls.keySet()) {
      IOUtil.writeString(aclCollectionStream,acl);
    }
    aclCollectionStream.close();
  }
 catch (  Exception e) {
    throw new RuntimeException(e.getLocalizedMessage(),e);
  }
}
Program: 66587
Project: 66587
Buggy source:
public void startPage(IPageContent page){
  pageNumber=page.getPageNumber();
  executionContext.getProgressMonitor().onProgress(IProgressMonitor.START_PAGE,(int)pageNumber);
  try {
    String masterPageName=null;
    Object generateBy=page.getGenerateBy();
    if (generateBy != null && generateBy instanceof MasterPageDesign) {
      masterPageName=((MasterPageDesign)generateBy).getName();
    }
    if (!savedMasterPages.contains(masterPageName)) {
      long pageOffset=writeFullContent(pageWriter,page);
      writeBuffer.reset();
      DataOutputStream indexBuffer=new DataOutputStream(writeBuffer);
      IOUtil.writeString(indexBuffer,masterPageName);
      IOUtil.writeLong(indexBuffer,pageOffset);
      indexStream.write(writeBuffer.toByteArray());
      savedMasterPages.add(masterPageName);
    }
  }
 catch (  IOException ex) {
    logger.log(Level.SEVERE,"String_Node_Str",ex);
    close();
  }
  IArea pageArea=(IArea)page.getExtension(IContent.LAYOUT_EXTENSION);
  if (pageArea != null) {
    pageArea.accept(new BookmarkCollector());
  }
}

Fixed version (ground truth):
public void startPage(IPageContent page){
  pageNumber=page.getPageNumber();
  executionContext.getProgressMonitor().onProgress(IProgressMonitor.START_PAGE,(int)pageNumber);
  IArea pageArea=(IArea)page.getExtension(IContent.LAYOUT_EXTENSION);
  if (pageArea != null) {
    pageArea.accept(new BookmarkCollector());
  }
}
Program: 66588
Project: 66588
Buggy source:
protected void open(){
  try {
    pageWriter=new ReportContentWriterV3(document.getArchive(),ReportDocumentConstants.PAGE_STREAM);
    indexStream=document.getArchive().createRandomAccessStream(ReportDocumentConstants.PAGE_INDEX_STREAM);
  }
 catch (  IOException ex) {
    logger.log(Level.SEVERE,"String_Node_Str",ex);
    close();
  }
}

Fixed version (ground truth):
protected void open(IReportContent report){
  try {
    writer=new ReportContentWriterV3(document.getArchive(),ReportDocumentConstants.CONTENT_STREAM);
    writer.writeReport(report);
    pageWriter=new ReportContentWriterV3(document.getArchive(),ReportDocumentConstants.PAGE_STREAM);
    indexStream=document.getArchive().createRandomAccessStream(ReportDocumentConstants.PAGE_INDEX_STREAM);
  }
 catch (  IOException ex) {
    logger.log(Level.SEVERE,"String_Node_Str",ex);
    close();
  }
}
Program: 66592
Project: 66592
Buggy source:
private String getFontFamily(IStyle c_style,Chunk ch){
  String fontFamily=null;
  if (c_style != null && c_style.getFontFamily() != null) {
    fontFamily=c_style.getFontFamily();
  }
 else {
    FontInfo info=ch.getFontInfo();
    fontFamily=info.getFontName();
  }
  return fontFamily;
}

Fixed version (ground truth):
private String getFontFamily(IStyle c_style,Chunk ch){
  String fontFamily=null;
  if (c_style != null && c_style.getFontFamily() != null) {
    fontFamily=mapGenericFont(c_style.getFontFamily());
  }
 else {
    FontInfo info=ch.getFontInfo();
    fontFamily=info.getFontName();
  }
  return fontFamily;
}
Program: 66593
Project: 66593
Buggy source:
private FontSplitter getFontSplitter(IContent content,String text){
  FontMappingManager fontManager=FontMappingManagerFactory.getInstance().getFontMappingManager("String_Node_Str",Locale.getDefault());
  FontSplitter fontSplitter=new FontSplitter(fontManager,new Chunk(text),(TextContent)content,true,false);
  return fontSplitter;
}

Fixed version (ground truth):
private FontSplitter getFontSplitter(IContent content,String text){
  FontMappingManager fontManager=FontMappingManagerFactory.getInstance().getFontMappingManager("String_Node_Str",Locale.getDefault());
  FontSplitter fontSplitter=new FontSplitter(fontManager,new Chunk(text),(TextContent)content,false,false);
  return fontSplitter;
}
Program: 66594
Project: 66594
Buggy source:
/** 
 * @param aggrName
 * @param groupInstanceIndex
 * @return
 * @throws DataException
 */
public Object getValue(String aggrName,int groupInstanceIndex) throws DataException {
  try {
    if (this.contains(aggrName)) {
      Object value=holders.get(aggrName).get(groupInstanceIndex);
      if (value != null && value instanceof BirtException)       throw (BirtException)value;
      if (qd != null && qd.getBindings().containsKey(aggrName)) {
        IBinding b=(IBinding)qd.getBindings().get(aggrName);
        value=DataTypeUtil.convert(value,b.getDataType());
      }
      return value;
    }
    return null;
  }
 catch (  IOException e) {
    throw new DataException(e.getLocalizedMessage(),e);
  }
catch (  BirtException e) {
    throw new DataException(e.getErrorCode(),e);
  }
}

Fixed version (ground truth):
/** 
 * @param aggrName
 * @param groupInstanceIndex
 * @return
 * @throws DataException
 */
public Object getValue(String aggrName,int groupInstanceIndex) throws DataException {
  try {
    if (this.contains(aggrName)) {
      Object value=holders.get(aggrName).get(groupInstanceIndex);
      if (value != null && value instanceof BirtException)       throw (BirtException)value;
      if (qd != null && qd.getBindings().containsKey(aggrName)) {
        IBinding b=(IBinding)qd.getBindings().get(aggrName);
        value=DataTypeUtil.convert(value,b.getDataType());
      }
      return value;
    }
    return null;
  }
 catch (  IOException e) {
    throw new DataException(e.getLocalizedMessage(),e);
  }
catch (  BirtException e) {
    if (e instanceof DataException)     throw new DataException(e.getErrorCode(),((DataException)e).getArgument());
    throw new DataException(e.getErrorCode(),e);
  }
}
Program: 66595
Project: 66595
Buggy source:
/** 
 * @param obj1
 * @param obj2
 * @return
 */
private static boolean isTwoExpressionEqual(IConditionalExpression obj1,IConditionalExpression obj2){
  if (obj1.getOperator() != obj2.getOperator())   return false;
  return isEqualString(obj1.getGroupName(),obj2.getGroupName()) && isTwoExpressionEqual(obj1.getExpression(),obj2.getExpression()) && isTwoExpressionEqual(obj1.getOperand1(),obj2.getOperand1())&& isTwoExpressionEqual(obj1.getOperand2(),obj2.getOperand2());
}

Fixed version (ground truth):
/** 
 * @param obj1
 * @param obj2
 * @return
 */
private static boolean isTwoExpressionEqual(IConditionalExpression obj1,IConditionalExpression obj2,boolean ignoreDataTypes){
  if (obj1.getOperator() != obj2.getOperator())   return false;
  return isEqualString(obj1.getGroupName(),obj2.getGroupName()) && isTwoExpressionEqual(obj1.getExpression(),obj2.getExpression(),ignoreDataTypes) && isTwoExpressionEqual(obj1.getOperand1(),obj2.getOperand1(),ignoreDataTypes)&& isTwoExpressionEqual(obj1.getOperand2(),obj2.getOperand2(),ignoreDataTypes);
}
Program: 66596
Project: 66596
Buggy source:
/** 
 * @param b1
 * @param b2
 * @return
 * @throws DataException
 */
public static boolean isTwoBindingEqual(IBinding b1,IBinding b2) throws DataException {
  if (!isTwoExpressionEqual(b1.getExpression(),b2.getExpression()))   return false;
  if (!isEqualString(b1.getAggrFunction(),b2.getAggrFunction()))   return false;
  if (b1.getDataType() != b2.getDataType())   return false;
  if (!isTwoExpressionEqual(b1.getFilter(),b2.getFilter()))   return false;
  if (b1.getAggregatOns().size() != b2.getAggregatOns().size())   return false;
  for (int i=0; i < b1.getAggregatOns().size(); i++) {
    if (!isEqualString(b1.getAggregatOns().get(i).toString(),b2.getAggregatOns().get(i).toString()))     return false;
  }
  if (b1.getArguments().size() != b2.getArguments().size())   return false;
  for (int i=0; i < b1.getArguments().size(); i++) {
    if (!isTwoExpressionEqual((IBaseExpression)b1.getArguments().get(i),(IBaseExpression)b2.getArguments().get(i)))     return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param b1
 * @param b2
 * @return
 * @throws DataException
 */
public static boolean isTwoBindingEqual(IBinding b1,IBinding b2) throws DataException {
  if (b1.getDataType() != b2.getDataType())   return false;
  if (!isTwoExpressionEqual(b1.getExpression(),b2.getExpression(),true))   return false;
  if (!isEqualString(b1.getAggrFunction(),b2.getAggrFunction()))   return false;
  if (!isTwoExpressionEqual(b1.getFilter(),b2.getFilter(),true))   return false;
  if (b1.getAggregatOns().size() != b2.getAggregatOns().size())   return false;
  for (int i=0; i < b1.getAggregatOns().size(); i++) {
    if (!isEqualString(b1.getAggregatOns().get(i).toString(),b2.getAggregatOns().get(i).toString()))     return false;
  }
  if (b1.getArguments().size() != b2.getArguments().size())   return false;
  for (int i=0; i < b1.getArguments().size(); i++) {
    if (!isTwoExpressionEqual((IBaseExpression)b1.getArguments().get(i),(IBaseExpression)b2.getArguments().get(i),true))     return false;
  }
  return true;
}
Program: 66597
Project: 66597
Buggy source:
/** 
 * @param inputParamBindings1
 * @param inputParamBindings2
 * @return
 */
private static boolean isInputParameterBindingEquals(Collection inputParamBindings1,Collection inputParamBindings2){
  if (inputParamBindings1 == inputParamBindings2)   return true;
  if (inputParamBindings1 == null || inputParamBindings2 == null)   return false;
  if (inputParamBindings1.size() != inputParamBindings2.size())   return false;
  Iterator it1=inputParamBindings1.iterator();
  Iterator it2=inputParamBindings2.iterator();
  while (it1.hasNext()) {
    IInputParameterBinding binding1=(IInputParameterBinding)it1.next();
    IInputParameterBinding binding2=(IInputParameterBinding)it2.next();
    if (!isTwoExpressionEqual(binding1.getExpr(),binding2.getExpr()))     return false;
    if (!isEqualString(binding1.getName(),binding2.getName()))     return false;
    if (binding1.getPosition() != binding2.getPosition())     return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param inputParamBindings1
 * @param inputParamBindings2
 * @return
 */
private static boolean isInputParameterBindingEquals(Collection inputParamBindings1,Collection inputParamBindings2){
  if (inputParamBindings1 == inputParamBindings2)   return true;
  if (inputParamBindings1 == null || inputParamBindings2 == null)   return false;
  if (inputParamBindings1.size() != inputParamBindings2.size())   return false;
  Iterator it1=inputParamBindings1.iterator();
  Iterator it2=inputParamBindings2.iterator();
  while (it1.hasNext()) {
    IInputParameterBinding binding1=(IInputParameterBinding)it1.next();
    IInputParameterBinding binding2=(IInputParameterBinding)it2.next();
    if (!isTwoExpressionEqual(binding1.getExpr(),binding2.getExpr(),false))     return false;
    if (!isEqualString(binding1.getName(),binding2.getName()))     return false;
    if (binding1.getPosition() != binding2.getPosition())     return false;
  }
  return true;
}
Program: 66598
Project: 66598
Buggy source:
/** 
 * @param se
 * @param se2
 * @return
 */
private static boolean isEqualExpression2(IScriptExpression se,IScriptExpression se2){
  if (se == se2)   return true;
 else   if (se == null || se2 == null)   return false;
  return se.getDataType() == se2.getDataType() && isEqualObject(se.getText(),se2.getText());
}

Fixed version (ground truth):
/** 
 * @param se
 * @param se2
 * @return
 */
private static boolean isEqualExpression2(IScriptExpression se,IScriptExpression se2){
  if (se == se2)   return true;
 else   if (se == null || se2 == null)   return false;
  return (se.getDataType() == se2.getDataType() || (se.getDataType() == DataType.ANY_TYPE && se2.getDataType() == DataType.UNKNOWN_TYPE) || (se.getDataType() == DataType.UNKNOWN_TYPE && se2.getDataType() == DataType.ANY_TYPE)) && isEqualObject(se.getText(),se2.getText());
}
Program: 66599
Project: 66599
Buggy source:
/** 
 * Return difference in number of seconds
 * @param d1
 * @param d2
 * @return
 */
private static long diffSecond(Date d1,Date d2){
  if (d1 == null || d2 == null) {
    throw new java.lang.IllegalArgumentException(Messages.getString("String_Node_Str"));
  }
  long diff=d2.getTime() - d1.getTime();
  if (timeZone != null && timeZone.inDaylightTime(d1))   diff-=timeZone.getDSTSavings();
  if (timeZone != null && timeZone.inDaylightTime(d2))   diff+=timeZone.getDSTSavings();
  return diff / 1000l;
}

Fixed version (ground truth):
/** 
 * Return difference in number of seconds
 * @param d1
 * @param d2
 * @return
 */
private static long diffSecond(Date d1,Date d2){
  if (d1 == null || d2 == null) {
    throw new java.lang.IllegalArgumentException(Messages.getString("String_Node_Str"));
  }
  long diff=d2.getTime() - d1.getTime();
  try {
    if (timeZone != null && timeZone.inDaylightTime(d1))     diff-=timeZone.getDSTSavings();
    if (timeZone != null && timeZone.inDaylightTime(d2))     diff+=timeZone.getDSTSavings();
  }
 catch (  NullPointerException ne) {
    if (timeZone != null) {
      java.util.TimeZone jTimeZone=java.util.TimeZone.getTimeZone(timeZone.getID());
      jTimeZone.setRawOffset(timeZone.getRawOffset());
      if (timeZone != null && jTimeZone.inDaylightTime(d1))       diff-=jTimeZone.getDSTSavings();
      if (timeZone != null && jTimeZone.inDaylightTime(d2))       diff+=jTimeZone.getDSTSavings();
    }
  }
  return diff / 1000l;
}
Program: 66600
Project: 66600
Buggy source:
/** 
 * @param streamManager
 * @param streamPos
 * @param streamScope
 * @return
 * @throws DataException
 */
public static RDGroupUtil loadGroupUtil(String tempDir,StreamManager streamManager,int streamPos,int streamScope) throws DataException {
  RAInputStream stream=streamManager.getInStream(DataEngineContext.GROUP_INFO_STREAM,streamPos,streamScope);
  RAInputStream[] groupStreams=null;
  int gNumber=0;
  try {
    gNumber=IOUtil.readInt(stream);
    groupStreams=new RAInputStream[gNumber];
    long nextOffset=IOUtil.INT_LENGTH;
    for (int i=0; i < gNumber; i++) {
      RAInputStream rain=streamManager.getInStream(DataEngineContext.GROUP_INFO_STREAM,streamPos,streamScope);
      rain.seek(nextOffset);
      groupStreams[i]=rain;
      int asize=IOUtil.readInt(stream);
      nextOffset=nextOffset + IOUtil.INT_LENGTH + 2 * IOUtil.INT_LENGTH * asize;
      stream.seek(nextOffset);
    }
    stream.close();
  }
 catch (  IOException e) {
  }
  return new RDGroupUtil(tempDir,gNumber,groupStreams);
}

Fixed version (ground truth):
/** 
 * @param streamManager
 * @param streamPos
 * @param streamScope
 * @return
 * @throws DataException
 */
public static RDGroupUtil loadGroupUtil(String tempDir,StreamManager streamManager,int streamPos,int streamScope) throws DataException {
  RAInputStream stream=streamManager.getInStream(DataEngineContext.GROUP_INFO_STREAM,streamPos,streamScope);
  RAInputStream[] groupStreams=null;
  int gNumber=0;
  try {
    gNumber=IOUtil.readInt(stream);
    groupStreams=new RAInputStream[gNumber];
    long nextOffset=IOUtil.INT_LENGTH;
    for (int i=0; i < gNumber; i++) {
      RAInputStream rain=streamManager.getInStream(DataEngineContext.GROUP_INFO_STREAM,streamPos,streamScope);
      rain.seek(nextOffset);
      groupStreams[i]=rain;
      int asize=IOUtil.readInt(stream);
      nextOffset=nextOffset + IOUtil.INT_LENGTH + 2 * IOUtil.INT_LENGTH * asize;
      stream.seek(nextOffset);
    }
  }
 catch (  IOException e) {
  }
 finally {
    try {
      stream.close();
    }
 catch (    IOException e) {
    }
  }
  return new RDGroupUtil(tempDir,gNumber,groupStreams);
}
Program: 66601
Project: 66601
Buggy source:
public void close() throws DataException {
  try {
    if (exprResultReader != null) {
      exprResultReader.close();
      exprResultReader=null;
    }
    if (rowExprsRAIs != null) {
      rowExprsRAIs.close();
      rowExprsRAIs=null;
    }
    if (rowLenRAIs != null) {
      rowLenRAIs.close();
      rowLenRAIs=null;
    }
    if (rowInfoRAIs != null) {
      rowInfoRAIs.close();
      rowInfoRAIs=null;
    }
  }
 catch (  IOException e) {
  }
}

Fixed version (ground truth):
public void close() throws DataException {
  try {
    if (exprResultReader != null) {
      exprResultReader.close();
      exprResultReader=null;
    }
    if (rowExprsRAIs != null) {
      rowExprsRAIs.close();
      rowExprsRAIs=null;
    }
    if (rowLenRAIs != null) {
      rowLenRAIs.close();
      rowLenRAIs=null;
    }
    if (rowInfoRAIs != null) {
      rowInfoRAIs.close();
      rowInfoRAIs=null;
    }
    if (dataSetResultSet != null) {
      dataSetResultSet.close();
      dataSetResultSet=null;
    }
    if (rdGroupUtil != null) {
      rdGroupUtil.close();
      rdGroupUtil=null;
    }
  }
 catch (  IOException e) {
  }
}
Program: 66602
Project: 66602
Buggy source:
/** 
 * @param mode
 * @param scope
 * @param reader
 * @param writer
 * @throws BirtException
 */
private DataEngineContext(int mode,Scriptable scope,IDocArchiveReader reader,IDocArchiveWriter writer,ClassLoader classLoader,ScriptContext context) throws BirtException {
  Object[] params={Integer.valueOf(mode),scope,reader,writer,classLoader};
  logger.entering(DataEngineContext.class.getName(),"String_Node_Str",params);
  if (!(mode == MODE_GENERATION || mode == MODE_PRESENTATION || mode == DIRECT_PRESENTATION || mode == MODE_UPDATE))   throw new DataException(ResourceConstants.RD_INVALID_MODE);
  if (writer == null && mode == MODE_GENERATION)   throw new DataException(ResourceConstants.RD_INVALID_ARCHIVE);
  if (reader == null && mode == MODE_PRESENTATION)   throw new DataException(ResourceConstants.RD_INVALID_ARCHIVE);
  if (reader == null && mode == MODE_UPDATE)   throw new DataException(ResourceConstants.RD_INVALID_ARCHIVE);
  this.classLoader=classLoader;
  this.mode=mode;
  this.scope=scope;
  this.reader=reader;
  this.writer=writer;
  this.cacheOption=CACHE_USE_DEFAULT;
  this.scriptContext=context;
  this.currentLocale=ULocale.getDefault();
  this.currentTimeZone=TimeZone.getDefault();
  this.isDteScriptContext=false;
  logger.exiting(DataEngineContext.class.getName(),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @param mode
 * @param scope
 * @param reader
 * @param writer
 * @throws BirtException
 */
private DataEngineContext(int mode,Scriptable scope,IDocArchiveReader reader,IDocArchiveWriter writer,ClassLoader classLoader,ScriptContext context) throws BirtException {
  Object[] params={Integer.valueOf(mode),scope,reader,writer,classLoader};
  logger.entering(DataEngineContext.class.getName(),"String_Node_Str",params);
  if (!(mode == MODE_GENERATION || mode == MODE_PRESENTATION || mode == DIRECT_PRESENTATION || mode == MODE_UPDATE))   throw new DataException(ResourceConstants.RD_INVALID_MODE);
  if (writer == null && mode == MODE_GENERATION)   throw new DataException(ResourceConstants.RD_INVALID_ARCHIVE);
  if (reader == null && mode == MODE_PRESENTATION)   throw new DataException(ResourceConstants.RD_INVALID_ARCHIVE);
  if (reader == null && mode == MODE_UPDATE)   throw new DataException(ResourceConstants.RD_INVALID_ARCHIVE);
  this.classLoader=classLoader;
  this.mode=mode;
  this.scope=scope;
  this.reader=reader;
  this.writer=writer;
  this.cacheOption=CACHE_USE_DEFAULT;
  this.scriptContext=context;
  this.currentLocale=ULocale.getDefault();
  this.currentTimeZone=TimeZone.getDefault();
  logger.exiting(DataEngineContext.class.getName(),"String_Node_Str");
}
Program: 66604
Project: 66604
Buggy source:
/** 
 * Gets a DataEngineContext for use to initialize data engine
 */
public DataEngineContext getDataEngineContext() throws BirtException {
  if (this.context != null)   return this.context;
  this.context=DataEngineContext.newInstance(mode,sContext,docReader,docWriter,appClassLoader);
  this.context.setDteScriptContext(this.isDteScriptContext);
  if (cacheSet)   this.context.setCacheOption(cacheOption,cacheCount);
  return this.context;
}

Fixed version (ground truth):
/** 
 * Gets a DataEngineContext for use to initialize data engine
 */
public DataEngineContext getDataEngineContext() throws BirtException {
  if (this.context != null)   return this.context;
  this.context=DataEngineContext.newInstance(mode,sContext,docReader,docWriter,appClassLoader);
  if (cacheSet)   this.context.setCacheOption(cacheOption,cacheCount);
  return this.context;
}