nus-yam/ex-repair huggingface dataset:
Program: 68703
Project: 68703
Buggy source:
private CrosstabCellHandle transferGrandTotal(int srcAxis,CrosstabCellHandle oldGT) throws SemanticException {
  CrosstabCellHandle srcGT=null;
  if (oldGT == null) {
    CrosstabViewHandle srcView=crosstab.getCrosstabView(srcAxis);
    srcGT=srcView != null ? srcView.getGrandTotal() : null;
  }
 else {
    srcGT=oldGT;
  }
  CrosstabCellHandle targetReplaced=null;
  if (srcGT != null) {
    int targetAxis=CrosstabModelUtil.getOppositeAxisType(srcAxis);
    CrosstabViewHandle targetView=crosstab.getCrosstabView(targetAxis);
    if (targetView == null) {
      targetView=crosstab.addCrosstabView(targetAxis);
    }
    targetReplaced=targetView.getGrandTotal();
    if (srcGT.getModelHandle().getContainer() != null) {
      CrosstabCellHandle srcClone=(CrosstabCellHandle)CrosstabUtil.getReportItem(srcGT.getModelHandle().copy().getHandle(crosstab.getModuleHandle().getModule()));
      srcGT.getModelHandle().drop();
      srcGT=srcClone;
    }
    if (targetReplaced != null) {
      CrosstabCellHandle targetClone=(CrosstabCellHandle)CrosstabUtil.getReportItem(targetReplaced.getModelHandle().copy().getHandle(crosstab.getModuleHandle().getModule()));
      targetReplaced.getModelHandle().drop();
      targetReplaced=targetClone;
    }
    PropertyHandle targetPropertyHandle=targetView.getGrandTotalProperty();
    if (targetPropertyHandle.getContentCount() <= 0) {
      targetPropertyHandle.add(srcGT.getModelHandle());
    }
  }
  return targetReplaced;
}

Fixed version (ground truth):
private CrosstabCellHandle transferGrandTotal(int srcAxis,CrosstabCellHandle oldGT,boolean firstMove) throws SemanticException {
  CrosstabCellHandle srcGT=null;
  if (firstMove) {
    CrosstabViewHandle srcView=crosstab.getCrosstabView(srcAxis);
    srcGT=srcView != null ? srcView.getGrandTotal() : null;
  }
 else {
    srcGT=oldGT;
  }
  CrosstabCellHandle targetReplaced=null;
  int targetAxis=CrosstabModelUtil.getOppositeAxisType(srcAxis);
  CrosstabViewHandle targetView=crosstab.getCrosstabView(targetAxis);
  if (firstMove) {
    targetReplaced=targetView == null ? null : targetView.getGrandTotal();
    if (srcGT != null) {
      if (srcGT.getModelHandle().getContainer() != null) {
        CrosstabCellHandle srcClone=(CrosstabCellHandle)CrosstabUtil.getReportItem(srcGT.getModelHandle().copy().getHandle(crosstab.getModuleHandle().getModule()));
        srcGT.getModelHandle().drop();
        srcGT=srcClone;
      }
    }
    if (targetReplaced != null) {
      CrosstabCellHandle targetClone=(CrosstabCellHandle)CrosstabUtil.getReportItem(targetReplaced.getModelHandle().copy().getHandle(crosstab.getModuleHandle().getModule()));
      targetReplaced.getModelHandle().drop();
      targetReplaced=targetClone;
    }
  }
  if (srcGT != null) {
    if (targetView == null) {
      targetView=crosstab.addCrosstabView(targetAxis);
    }
    PropertyHandle targetPropertyHandle=targetView.getGrandTotalProperty();
    if (targetPropertyHandle.getContentCount() <= 0) {
      targetPropertyHandle.add(srcGT.getModelHandle());
    }
  }
  return targetReplaced;
}
Program: 68704
Project: 68704
Buggy source:
/** 
 * Implementation of getConnection() methods. Gets connection from either java.sql.DriverManager,  or from IConnectionFactory defined in the extension
 */
private synchronized Connection doConnect(String driverClass,String url,String jndiNameUrl,Properties connectionProperties,Collection<String> driverClassPath) throws SQLException, OdaException {
  assert(url != null);
  IConnectionFactory factory=getDriverConnectionFactory(driverClass);
  if (factory != null) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str" + driverClass + "String_Node_Str"+ LogUtil.encryptURL(url));
    return factory.getConnection(driverClass,url,connectionProperties);
  }
  Connection jndiDSConnection=getJndiDSConnection(driverClass,jndiNameUrl,connectionProperties);
  if (jndiDSConnection != null)   return jndiDSConnection;
  loadAndRegisterDriver(driverClass,driverClassPath);
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str" + LogUtil.encryptURL(url));
  try {
    return DriverManager.getConnection(url,connectionProperties);
  }
 catch (  Exception e) {
    registerDriver(driverClass,null,true);
    try {
      return DriverManager.getConnection(url,connectionProperties);
    }
 catch (    Exception ex) {
      throw new JDBCException(ResourceConstants.CONN_GET_ERROR,null,truncate(ex.getLocalizedMessage()));
    }
  }
}

Fixed version (ground truth):
/** 
 * Implementation of getConnection() methods. Gets connection from either java.sql.DriverManager,  or from IConnectionFactory defined in the extension
 */
private synchronized Connection doConnect(String driverClass,String url,String jndiNameUrl,Properties connectionProperties,Collection<String> driverClassPath) throws SQLException, OdaException {
  Connection jndiDSConnection=getJndiDSConnection(driverClass,jndiNameUrl,connectionProperties);
  if (jndiDSConnection != null)   return jndiDSConnection;
  IConnectionFactory factory=getDriverConnectionFactory(driverClass);
  if (factory != null) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str" + driverClass + "String_Node_Str"+ LogUtil.encryptURL(url));
    return factory.getConnection(driverClass,url,connectionProperties);
  }
  loadAndRegisterDriver(driverClass,driverClassPath);
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str" + LogUtil.encryptURL(url));
  try {
    return DriverManager.getConnection(url,connectionProperties);
  }
 catch (  Exception e) {
    registerDriver(driverClass,null,true);
    try {
      return DriverManager.getConnection(url,connectionProperties);
    }
 catch (    Exception ex) {
      throw new JDBCException(ResourceConstants.CONN_GET_ERROR,null,truncate(ex.getLocalizedMessage()));
    }
  }
}
Program: 68708
Project: 68708
Buggy source:
/** 
 * @param edgeType
 * @return
 */
private List getEdgeSort(int edgeType){
  List l=this.defn.getSorts();
  List result=new ArrayList();
  for (int i=0; i < l.size(); i++) {
    ICubeSortDefinition sort=(ICubeSortDefinition)l.get(i);
    if (this.defn.getEdge(edgeType) != null && this.defn.getEdge(edgeType).getDimensions().contains(sort.getTargetLevel().getHierarchy().getDimension())) {
      result.add(sort);
    }
  }
  Collections.sort(result,new Comparator(){
    public int compare(    Object arg0,    Object arg1){
      int level1=((ICubeSortDefinition)arg0).getTargetLevel().getHierarchy().getLevels().indexOf(((ICubeSortDefinition)arg0).getTargetLevel());
      int level2=((ICubeSortDefinition)arg1).getTargetLevel().getHierarchy().getLevels().indexOf(((ICubeSortDefinition)arg1).getTargetLevel());
      if (level1 == level2)       return 0;
 else       if (level1 < level2)       return -1;
 else       return 1;
    }
  }
);
  return result;
}

Fixed version (ground truth):
/** 
 * @param edgeType
 * @return
 */
private List getEdgeSort(int edgeType){
  List l=this.defn.getSorts();
  List result=new ArrayList();
  for (int i=0; i < l.size(); i++) {
    ICubeSortDefinition sort=(ICubeSortDefinition)l.get(i);
    if (this.defn.getEdge(edgeType) != null && sort.getTargetLevel() != null && this.defn.getEdge(edgeType).getDimensions().contains(sort.getTargetLevel().getHierarchy().getDimension())) {
      result.add(sort);
    }
  }
  Collections.sort(result,new Comparator(){
    public int compare(    Object arg0,    Object arg1){
      int level1=((ICubeSortDefinition)arg0).getTargetLevel().getHierarchy().getLevels().indexOf(((ICubeSortDefinition)arg0).getTargetLevel());
      int level2=((ICubeSortDefinition)arg1).getTargetLevel().getHierarchy().getLevels().indexOf(((ICubeSortDefinition)arg1).getTargetLevel());
      if (level1 == level2)       return 0;
 else       if (level1 < level2)       return -1;
 else       return 1;
    }
  }
);
  return result;
}
Program: 68709
Project: 68709
Buggy source:
/** 
 * Get dim level from an expression.
 * @param expr
 * @param bindings
 * @return
 * @throws DataException
 */
private static DimLevel getDimLevel(String expr,List bindings) throws DataException {
  String bindingName=OlapExpressionUtil.getBindingName(expr);
  if (bindingName != null) {
    for (int j=0; j < bindings.size(); j++) {
      IBinding binding=(IBinding)bindings.get(j);
      if (binding.getBindingName().equals(bindingName)) {
        if (!(binding.getExpression() instanceof IScriptExpression))         return null;
        return getDimLevel(((IScriptExpression)binding.getExpression()).getText(),bindings);
      }
    }
  }
  if (OlapExpressionUtil.isReferenceToDimLevel(expr) == false)   return null;
 else   return OlapExpressionUtil.getTargetDimLevel(expr);
}

Fixed version (ground truth):
/** 
 * Get dim level from an expression.
 * @param expr
 * @param bindings
 * @return
 * @throws DataException
 */
private static DimLevel getDimLevel(String expr,List bindings) throws DataException {
  String bindingName=OlapExpressionUtil.getBindingName(expr);
  DimLevel dimLevel=getDimLevelByBindingName(bindingName,bindings);
  if (dimLevel != null)   return null;
  if (OlapExpressionUtil.isReferenceToDimLevel(expr) == false)   return null;
 else   return OlapExpressionUtil.getTargetDimLevel(expr);
}
Program: 68710
Project: 68710
Buggy source:
/** 
 * @param levelDefn
 * @param query
 * @return
 * @throws DataException 
 */
public static int getSortDirection(DimLevel level,ICubeQueryDefinition query) throws DataException {
  if (query.getSorts() != null && !query.getSorts().isEmpty()) {
    for (int i=0; i < query.getSorts().size(); i++) {
      ISortDefinition sortDfn=((ISortDefinition)query.getSorts().get(i));
      String expr=sortDfn.getExpression().getText();
      DimLevel info=getDimLevel(expr,query.getBindings());
      if (level.equals(info)) {
        return sortDfn.getSortDirection();
      }
    }
  }
  return IDimensionSortDefn.SORT_UNDEFINED;
}

Fixed version (ground truth):
/** 
 * @param levelDefn
 * @param query
 * @return
 * @throws DataException 
 */
public static int getSortDirection(DimLevel level,ICubeQueryDefinition query) throws DataException {
  if (query.getSorts() != null && !query.getSorts().isEmpty()) {
    for (int i=0; i < query.getSorts().size(); i++) {
      ISortDefinition sortDfn=((ISortDefinition)query.getSorts().get(i));
      DimLevel info=null;
      if (sortDfn.getExpression() == null) {
        String colName=sortDfn.getColumn();
        info=getDimLevelByBindingName(colName,query.getBindings());
        if (level.equals(info)) {
          return sortDfn.getSortDirection();
        }
      }
 else {
        String expr=null;
        expr=sortDfn.getExpression().getText();
        info=getDimLevel(expr,query.getBindings());
        if (level.equals(info)) {
          return sortDfn.getSortDirection();
        }
      }
    }
  }
  return IDimensionSortDefn.SORT_UNDEFINED;
}
Program: 68712
Project: 68712
Buggy source:
private void switchDataSet(String datasetName) throws ChartException {
  if (isCubeMode()) {
    return;
  }
  try {
    tablePreview.clearContents();
    tableViewerColumns.setInput(null);
    if (datasetName == null) {
      datasetName=getDataServiceProvider().getInheritedDataSet();
    }
    if (datasetName != null) {
      switchDataTable();
    }
 else {
      tablePreview.createDummyTable();
    }
    tablePreview.layout();
  }
 catch (  Throwable t) {
    throw new ChartException(ChartEnginePlugin.ID,ChartException.DATA_BINDING,t);
  }
  DataDefinitionTextManager.getInstance().refreshAll();
  fireEvent(tablePreview,EVENT_PREVIEW);
}

Fixed version (ground truth):
private void switchDataSet(String datasetName) throws ChartException {
  if (isCubeMode()) {
    return;
  }
  try {
    tablePreview.clearContents();
    tableViewerColumns.setInput(null);
    if (datasetName == null) {
      datasetName=getDataServiceProvider().getInheritedDataSet();
    }
    tablePreview.createDummyTable();
    tablePreview.layout();
  }
 catch (  Throwable t) {
    throw new ChartException(ChartEnginePlugin.ID,ChartException.DATA_BINDING,t);
  }
  DataDefinitionTextManager.getInstance().refreshAll();
  fireEvent(tablePreview,EVENT_PREVIEW);
}
Program: 68713
Project: 68713
Buggy source:
public static boolean isRightAligned(IContent content,CSSValue align,boolean lastLine){
  return align != null && isRightAligned(content,align.getCssText(),lastLine);
}

Fixed version (ground truth):
public static boolean isRightAligned(IContent content,CSSValue align,boolean lastLine){
  return isRightAligned(content,align != null ? align.getCssText() : null,lastLine);
}
Program: 68714
Project: 68714
Buggy source:
/** 
 * Build size style string say, "width: 10.0mm;". The min-height should be implemented by sepcial way.
 * @param content The <code>StringBuffer</code> to which the result is output.
 * @param name The property name
 * @param value The values of the property
 */
public void buildSize(StringBuffer content,String name,DimensionType value){
  if (value != null) {
    if (HTMLTags.ATTR_MIN_HEIGHT.equals(name)) {
      content.append("String_Node_Str");
      content.append(value.toString());
      content.append("String_Node_Str");
      content.append(value.toString());
      content.append(';');
    }
 else {
      content.append(' ');
      content.append(name);
      content.append("String_Node_Str");
      content.append(value.toString());
      content.append(';');
    }
  }
}

Fixed version (ground truth):
/** 
 * Build size style string say, "width: 10.0mm;". The min-height should be implemented by sepcial way.
 * @param content The <code>StringBuffer</code> to which the result is output.
 * @param name The property name
 * @param value The values of the property
 */
public void buildSize(StringBuffer content,String name,DimensionType value){
  if (value != null) {
    if (HTMLTags.ATTR_MIN_HEIGHT.equals(name)) {
      if (fixedReport) {
        content.append("String_Node_Str");
        content.append(value.toString());
        content.append(';');
      }
 else {
        content.append("String_Node_Str");
        content.append(value.toString());
        content.append("String_Node_Str");
        content.append(value.toString());
        content.append(';');
      }
    }
 else     if (HTMLTags.ATTR_MIN_WIDTH.equals(name)) {
      if (fixedReport) {
        content.append("String_Node_Str");
        content.append(value.toString());
        content.append(';');
      }
 else {
        content.append("String_Node_Str");
        content.append(value.toString());
        content.append("String_Node_Str");
        content.append(value.toString());
        content.append(';');
      }
    }
 else {
      content.append(' ');
      content.append(name);
      content.append("String_Node_Str");
      content.append(value.toString());
      content.append(';');
    }
  }
}
Program: 68715
Project: 68715
Buggy source:
/** 
 * output the report title.
 */
protected void outputReportTitle(IReportContent report){
  String title=report.getTitle();
  if (title == null) {
    if (renderOption != null) {
      HTMLRenderOption htmlOption=new HTMLRenderOption(renderOption);
      title=htmlOption.getHtmlTitle();
    }
  }
  if (title != null) {
    writer.openTag(HTMLTags.TAG_TITLE);
    writer.text(title);
    writer.closeTag(HTMLTags.TAG_TITLE);
  }
}

Fixed version (ground truth):
/** 
 * output the report title.
 */
protected void outputReportTitle(IReportContent report){
  String title=null;
  if (report != null) {
    title=report.getTitle();
  }
  if (title == null) {
    if (renderOption != null) {
      HTMLRenderOption htmlOption=new HTMLRenderOption(renderOption);
      title=htmlOption.getHtmlTitle();
    }
  }
  if (title != null) {
    writer.openTag(HTMLTags.TAG_TITLE);
    writer.text(title);
    writer.closeTag(HTMLTags.TAG_TITLE);
  }
}
Program: 68716
Project: 68716
Buggy source:
public void close() throws BirtException {
  TableArea table=getTableArea();
  table.addRow(this);
  updateBackgroundImage();
  boolean pb=checkPageBreak();
  if (pb) {
    table.addRow(this);
  }
  parent.update(this);
  finished=true;
}

Fixed version (ground truth):
public void close() throws BirtException {
  TableArea table=getTableArea();
  table.addRow(this);
  updateBackgroundImage();
  boolean pb=checkPageBreak();
  if (pb) {
    specifiedHeight=0;
    table.addRow(this);
  }
  parent.update(this);
  finished=true;
}
Program: 68717
Project: 68717
Buggy source:
public SplitResult split(int height,boolean force) throws BirtException {
  SplitResult result=super.split(height,force);
  if (result.getResult() != null) {
    TableArea tableResult=(TableArea)result.getResult();
    unresolvedRow=tableResult.getLastRow();
    int h=tableResult.layout.resolveAll(unresolvedRow);
    if (h > 0) {
      tableResult.setHeight(tableResult.getHeight() + h);
    }
    tableResult.resolveBottomBorder();
    layout.setUnresolvedRow(unresolvedRow);
    if (context.isFixedLayout()) {
      FixedLayoutPageHintGenerator pageHintGenerator=context.getPageHintGenerator();
      if (pageHintGenerator != null) {
        pageHintGenerator.addUnresolvedRowHint(unresolvedRow.getTableArea().getContent().getInstanceID().toUniqueString(),convertRowToHint(unresolvedRow));
      }
    }
  }
  relayoutChildren();
  return result;
}

Fixed version (ground truth):
public SplitResult split(int height,boolean force) throws BirtException {
  SplitResult result=super.split(height,force);
  if (result.getResult() != null) {
    TableArea tableResult=(TableArea)result.getResult();
    unresolvedRow=tableResult.getLastRow();
    int h=tableResult.layout.resolveAll(unresolvedRow);
    if (h > 0) {
      tableResult.setHeight(tableResult.getHeight() + h);
    }
    tableResult.resolveBottomBorder();
    layout.setUnresolvedRow(unresolvedRow);
    if (context.isFixedLayout()) {
      FixedLayoutPageHintGenerator pageHintGenerator=context.getPageHintGenerator();
      if (pageHintGenerator != null && unresolvedRow != null) {
        pageHintGenerator.addUnresolvedRowHint(unresolvedRow.getTableArea().getContent().getInstanceID().toUniqueString(),convertRowToHint(unresolvedRow));
      }
    }
  }
  relayoutChildren();
  return result;
}
Program: 68718
Project: 68718
Buggy source:
protected void saveQuery(){
  if (isQueryModified) {
    updateQuery(ChartUIUtil.getText(getInputControl()));
    setColor();
    if (!getInputControl().isDisposed()) {
      getInputControl().getParent().layout();
    }
    Event e=new Event();
    e.text=query.getDefinition() == null ? "String_Node_Str" : query.getDefinition();
    e.data=e.text;
    e.widget=getInputControl();
    e.type=0;
    fireEvent(e);
    isQueryModified=false;
  }
}

Fixed version (ground truth):
protected void saveQuery(){
  if (isQueryModified) {
    setColor();
    updateQuery(ChartUIUtil.getText(getInputControl()));
    if (!getInputControl().isDisposed()) {
      getInputControl().getParent().layout();
    }
    Event e=new Event();
    e.text=query.getDefinition() == null ? "String_Node_Str" : query.getDefinition();
    e.data=e.text;
    e.widget=getInputControl();
    e.type=0;
    fireEvent(e);
    isQueryModified=false;
  }
}
Program: 68719
Project: 68719
Buggy source:
public void doTestIO(String designName) throws Exception {
  Report report=new ReportParser().parse("String_Node_Str",this.getClass().getResourceAsStream(designName));
  assertTrue(report != null);
  ByteArrayOutputStream out=new ByteArrayOutputStream();
  new EngineIRWriter().write(out,report);
  out.close();
  InputStream in=new ByteArrayInputStream(out.toByteArray());
  EngineIRReader reader=new EngineIRReader();
  Report report2=reader.read(in);
  reader.link(report2,report.getReportDesign());
  ByteArrayOutputStream out1=new ByteArrayOutputStream();
  ByteArrayOutputStream out2=new ByteArrayOutputStream();
  ReportDesignWriter writer=new ReportDesignWriter();
  writer.write(out1,report);
  writer.write(out2,report2);
  String golden=new String(out1.toByteArray());
  String value=new String(out2.toByteArray());
  assertEquals(golden,value);
}

Fixed version (ground truth):
public void doTestIO(String designName,int i) throws Exception {
  Class<?> clz=i == 0 ? this.getClass() : org.eclipse.birt.report.engine.parser.EngineIRParserTest.class;
  InputStream input=clz.getResourceAsStream(designName);
  Report report=new ReportParser().parse("String_Node_Str",input);
  assertTrue(report != null);
  ByteArrayOutputStream out=new ByteArrayOutputStream();
  new EngineIRWriter().write(out,report);
  out.close();
  InputStream in=new ByteArrayInputStream(out.toByteArray());
  EngineIRReader reader=new EngineIRReader();
  Report report2=reader.read(in);
  reader.link(report2,report.getReportDesign());
  ByteArrayOutputStream out1=new ByteArrayOutputStream();
  ByteArrayOutputStream out2=new ByteArrayOutputStream();
  ReportDesignWriter writer=new ReportDesignWriter();
  writer.write(out1,report);
  writer.write(out2,report2);
  String golden=new String(out1.toByteArray());
  String value=new String(out2.toByteArray());
  assertEquals(golden,value);
}
Program: 68720
Project: 68720
Buggy source:
public void testIO() throws Exception {
  String[] designStreams=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (int i=0; i < designStreams.length; i++) {
    doTestIO(designStreams[i]);
  }
}

Fixed version (ground truth):
public void testIO() throws Exception {
  String[] designStreams=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (int i=0; i < designStreams.length; i++) {
    doTestIO(designStreams[i],i);
  }
}
Program: 68721
Project: 68721
Buggy source:
public IExpressionContext getContext(String expressionType,Object contextObj){
  IExpressionContextFactory factory=(IExpressionContextFactory)ElementAdapterManager.getAdapter(this,IExpressionContextFactory.class);
  if (factory != null) {
    IExpressionContext cxt=factory.getContext(expressionType,contextObj);
    if (cxt != null) {
      return cxt;
    }
  }
  IExpressionContext cxt=contexts.get(expressionType);
  if (cxt == null)   return new DefaultExpressionContext(contextObj);
 else   return cxt;
}

Fixed version (ground truth):
public IExpressionContext getContext(String expressionType,Object contextObj){
  IExpressionContextFactory factory=(IExpressionContextFactory)ElementAdapterManager.getAdapter(this,IExpressionContextFactory.class);
  if (factory != null) {
    IExpressionContext cxt=factory.getContext(expressionType,contextObj);
    if (cxt != null) {
      if (cxt instanceof IExpressionFilterSupport) {
        ((IExpressionFilterSupport)cxt).setFilters(filters);
      }
 else {
        return cxt;
      }
    }
  }
  IExpressionContext cxt=contexts.get(expressionType);
  if (cxt == null) {
    DefaultExpressionContext defaultCxt=new DefaultExpressionContext(contextObj);
    defaultCxt.setFilters(filters);
    return defaultCxt;
  }
 else {
    return cxt;
  }
}
Program: 68725
Project: 68725
Buggy source:
private static void addLevelSorting(List<LevelViewHandle> levelViews,Map<LevelHandle,ILevelDefinition> levelMapping,ICubeQueryDefinition cubeQuery,IModelAdapter modelAdapter) throws BirtException {
  List<ILevelDefinition> levels=new ArrayList<ILevelDefinition>();
  List<Object> values=new ArrayList<Object>();
  for (Iterator<LevelViewHandle> itr=levelViews.iterator(); itr.hasNext(); ) {
    LevelViewHandle lv=itr.next();
    Iterator sortItr=lv.sortsIterator();
    if (sortItr != null) {
      while (sortItr.hasNext()) {
        SortElementHandle sortKey=(SortElementHandle)sortItr.next();
        levels.clear();
        values.clear();
        addMembers(levelMapping,levels,values,sortKey.getMember());
        ILevelDefinition[] qualifyLevels=null;
        Object[] qualifyValues=null;
        if (levels.size() > 0) {
          qualifyLevels=levels.toArray(new ILevelDefinition[levels.size()]);
          qualifyValues=values.toArray(new Object[values.size()]);
        }
        ICubeSortDefinition sortDef=getCubeElementFactory().createCubeSortDefinition(modelAdapter.adaptExpression((Expression)sortKey.getExpressionProperty(ISortElementModel.KEY_PROP).getValue()),levelMapping.get(lv.getCubeLevel()),qualifyLevels,qualifyValues,DataAdapterUtil.adaptModelSortDirection(sortKey.getDirection()));
        cubeQuery.addSort(sortDef);
      }
    }
  }
}

Fixed version (ground truth):
private static void addLevelSorting(List<LevelViewHandle> levelViews,Map<LevelHandle,ILevelDefinition> levelMapping,ICubeQueryDefinition cubeQuery,IModelAdapter modelAdapter) throws BirtException {
  List<ILevelDefinition> levels=new ArrayList<ILevelDefinition>();
  List<Object> values=new ArrayList<Object>();
  for (Iterator<LevelViewHandle> itr=levelViews.iterator(); itr.hasNext(); ) {
    LevelViewHandle lv=itr.next();
    Iterator sortItr=lv.sortsIterator();
    if (sortItr != null) {
      while (sortItr.hasNext()) {
        SortElementHandle sortKey=(SortElementHandle)sortItr.next();
        levels.clear();
        values.clear();
        addMembers(levelMapping,levels,values,sortKey.getMember());
        ILevelDefinition[] qualifyLevels=null;
        Object[] qualifyValues=null;
        if (levels.size() > 0) {
          qualifyLevels=levels.toArray(new ILevelDefinition[levels.size()]);
          qualifyValues=values.toArray(new Object[values.size()]);
        }
        ICubeSortDefinition sortDef=getCubeElementFactory().createCubeSortDefinition(modelAdapter.adaptExpression((Expression)sortKey.getExpressionProperty(ISortElementModel.KEY_PROP).getValue(),ExpressionLocation.CUBE),levelMapping.get(lv.getCubeLevel()),qualifyLevels,qualifyValues,DataAdapterUtil.adaptModelSortDirection(sortKey.getDirection()));
        cubeQuery.addSort(sortDef);
      }
    }
  }
}
Program: 68727
Project: 68727
Buggy source:
private static void addFactTableOrMeasureFilter(Iterator<FilterConditionElementHandle> filters,ICubeQueryDefinition cubeQuery,IModelAdapter modelAdapter) throws BirtException {
  if (filters != null) {
    while (filters.hasNext()) {
      FilterConditionElementHandle filterCon=filters.next();
      ConditionalExpression filterCondExpr;
      if (ModuleUtil.isListFilterValue(filterCon)) {
        filterCondExpr=new ConditionalExpression(modelAdapter.adaptExpression((Expression)filterCon.getExpressionProperty(IFilterConditionElementModel.EXPR_PROP).getValue()),DataAdapterUtil.adaptModelFilterOperator(filterCon.getOperator()),filterCon.getValue1ExpressionList().getListValue());
      }
 else {
        Expression value1=null;
        List<Expression> val1list=filterCon.getValue1ExpressionList().getListValue();
        if (val1list != null && val1list.size() > 0) {
          value1=val1list.get(0);
        }
        filterCondExpr=new ConditionalExpression(modelAdapter.adaptExpression((Expression)filterCon.getExpressionProperty(IFilterConditionElementModel.EXPR_PROP).getValue()),DataAdapterUtil.adaptModelFilterOperator(filterCon.getOperator()),modelAdapter.adaptExpression(value1),modelAdapter.adaptExpression((Expression)filterCon.getExpressionProperty(IFilterConditionElementModel.VALUE2_PROP).getValue()));
      }
      ICubeFilterDefinition filterDef=getCubeElementFactory().creatCubeFilterDefinition(filterCondExpr,null,null,null);
      cubeQuery.addFilter(filterDef);
    }
  }
}

Fixed version (ground truth):
private static void addFactTableOrMeasureFilter(Iterator<FilterConditionElementHandle> filters,ICubeQueryDefinition cubeQuery,IModelAdapter modelAdapter) throws BirtException {
  if (filters != null) {
    while (filters.hasNext()) {
      FilterConditionElementHandle filterCon=filters.next();
      ConditionalExpression filterCondExpr;
      if (ModuleUtil.isListFilterValue(filterCon)) {
        filterCondExpr=new ConditionalExpression(modelAdapter.adaptExpression((Expression)filterCon.getExpressionProperty(IFilterConditionElementModel.EXPR_PROP).getValue(),ExpressionLocation.CUBE),DataAdapterUtil.adaptModelFilterOperator(filterCon.getOperator()),filterCon.getValue1ExpressionList().getListValue());
      }
 else {
        Expression value1=null;
        List<Expression> val1list=filterCon.getValue1ExpressionList().getListValue();
        if (val1list != null && val1list.size() > 0) {
          value1=val1list.get(0);
        }
        filterCondExpr=new ConditionalExpression(modelAdapter.adaptExpression((Expression)filterCon.getExpressionProperty(IFilterConditionElementModel.EXPR_PROP).getValue(),ExpressionLocation.CUBE),DataAdapterUtil.adaptModelFilterOperator(filterCon.getOperator()),modelAdapter.adaptExpression(value1,ExpressionLocation.CUBE),modelAdapter.adaptExpression((Expression)filterCon.getExpressionProperty(IFilterConditionElementModel.VALUE2_PROP).getValue(),ExpressionLocation.CUBE));
      }
      ICubeFilterDefinition filterDef=getCubeElementFactory().creatCubeFilterDefinition(filterCondExpr,null,null,null);
      cubeQuery.addFilter(filterDef);
    }
  }
}
Program: 68732
Project: 68732
Buggy source:
public void dispose(){
  unhookModelEventManager(getModel());
  super.dispose();
  jsEditor.dispose();
  jsEditor=null;
}

Fixed version (ground truth):
public void dispose(){
  unhookModelEventManager(getModel());
  if (jsEditor instanceof JSEditor) {
    ((JSEditor)jsEditor).disConnectRoot(getModel());
  }
  super.dispose();
  jsEditor.dispose();
  jsEditor=null;
}
Program: 68735
Project: 68735
Buggy source:
private static void addLevelSorting(List<LevelViewHandle> levelViews,Map<LevelHandle,ILevelDefinition> levelMapping,ICubeQueryDefinition cubeQuery) throws BirtException {
  List<ILevelDefinition> levels=new ArrayList<ILevelDefinition>();
  List<Object> values=new ArrayList<Object>();
  for (Iterator<LevelViewHandle> itr=levelViews.iterator(); itr.hasNext(); ) {
    LevelViewHandle lv=itr.next();
    Iterator sortItr=lv.sortsIterator();
    if (sortItr != null) {
      while (sortItr.hasNext()) {
        SortElementHandle sortKey=(SortElementHandle)sortItr.next();
        levels.clear();
        values.clear();
        addMembers(levelMapping,levels,values,sortKey.getMember());
        ILevelDefinition[] qualifyLevels=null;
        Object[] qualifyValues=null;
        if (levels.size() > 0) {
          qualifyLevels=levels.toArray(new ILevelDefinition[levels.size()]);
          qualifyValues=values.toArray(new Object[values.size()]);
        }
        ICubeSortDefinition sortDef=getCubeElementFactory().createCubeSortDefinition(sortKey.getKey(),levelMapping.get(lv.getCubeLevel()),qualifyLevels,qualifyValues,DataAdapterUtil.adaptModelSortDirection(sortKey.getDirection()));
        cubeQuery.addSort(sortDef);
      }
    }
  }
}

Fixed version (ground truth):
private static void addLevelSorting(List<LevelViewHandle> levelViews,Map<LevelHandle,ILevelDefinition> levelMapping,ICubeQueryDefinition cubeQuery,IModelAdapter modelAdapter) throws BirtException {
  List<ILevelDefinition> levels=new ArrayList<ILevelDefinition>();
  List<Object> values=new ArrayList<Object>();
  for (Iterator<LevelViewHandle> itr=levelViews.iterator(); itr.hasNext(); ) {
    LevelViewHandle lv=itr.next();
    Iterator sortItr=lv.sortsIterator();
    if (sortItr != null) {
      while (sortItr.hasNext()) {
        SortElementHandle sortKey=(SortElementHandle)sortItr.next();
        levels.clear();
        values.clear();
        addMembers(levelMapping,levels,values,sortKey.getMember());
        ILevelDefinition[] qualifyLevels=null;
        Object[] qualifyValues=null;
        if (levels.size() > 0) {
          qualifyLevels=levels.toArray(new ILevelDefinition[levels.size()]);
          qualifyValues=values.toArray(new Object[values.size()]);
        }
        ICubeSortDefinition sortDef=getCubeElementFactory().createCubeSortDefinition(modelAdapter.adaptExpression((Expression)sortKey.getExpressionProperty(ISortElementModel.KEY_PROP).getValue()),levelMapping.get(lv.getCubeLevel()),qualifyLevels,qualifyValues,DataAdapterUtil.adaptModelSortDirection(sortKey.getDirection()));
        cubeQuery.addSort(sortDef);
      }
    }
  }
}
Program: 68737
Project: 68737
Buggy source:
private static void addFactTableOrMeasureFilter(Iterator<FilterConditionElementHandle> filters,ICubeQueryDefinition cubeQuery) throws BirtException {
  if (filters != null) {
    while (filters.hasNext()) {
      FilterConditionElementHandle filterCon=filters.next();
      ConditionalExpression filterCondExpr;
      if (ModuleUtil.isListFilterValue(filterCon)) {
        filterCondExpr=new ConditionalExpression(filterCon.getExpr(),DataAdapterUtil.adaptModelFilterOperator(filterCon.getOperator()),filterCon.getValue1List());
      }
 else {
        filterCondExpr=new ConditionalExpression(filterCon.getExpr(),DataAdapterUtil.adaptModelFilterOperator(filterCon.getOperator()),filterCon.getValue1(),filterCon.getValue2());
      }
      ICubeFilterDefinition filterDef=getCubeElementFactory().creatCubeFilterDefinition(filterCondExpr,null,null,null);
      cubeQuery.addFilter(filterDef);
    }
  }
}

Fixed version (ground truth):
private static void addFactTableOrMeasureFilter(Iterator<FilterConditionElementHandle> filters,ICubeQueryDefinition cubeQuery,IModelAdapter modelAdapter) throws BirtException {
  if (filters != null) {
    while (filters.hasNext()) {
      FilterConditionElementHandle filterCon=filters.next();
      ConditionalExpression filterCondExpr;
      if (ModuleUtil.isListFilterValue(filterCon)) {
        filterCondExpr=new ConditionalExpression(modelAdapter.adaptExpression((Expression)filterCon.getExpressionProperty(IFilterConditionElementModel.EXPR_PROP).getValue()),DataAdapterUtil.adaptModelFilterOperator(filterCon.getOperator()),filterCon.getValue1ExpressionList().getListValue());
      }
 else {
        Expression value1=null;
        List<Expression> val1list=filterCon.getValue1ExpressionList().getListValue();
        if (val1list != null && val1list.size() > 0) {
          value1=val1list.get(0);
        }
        filterCondExpr=new ConditionalExpression(modelAdapter.adaptExpression((Expression)filterCon.getExpressionProperty(IFilterConditionElementModel.EXPR_PROP).getValue()),DataAdapterUtil.adaptModelFilterOperator(filterCon.getOperator()),modelAdapter.adaptExpression(value1),modelAdapter.adaptExpression((Expression)filterCon.getExpressionProperty(IFilterConditionElementModel.VALUE2_PROP).getValue()));
      }
      ICubeFilterDefinition filterDef=getCubeElementFactory().creatCubeFilterDefinition(filterCondExpr,null,null,null);
      cubeQuery.addFilter(filterDef);
    }
  }
}
Program: 68739
Project: 68739
Buggy source:
/** 
 * Test getExternalizedValue method.
 * @throws Exception
 */
public void testGetExternalizedText() throws Exception {
  openDesign("String_Node_Str");
  TableHandle tableHandle=(TableHandle)designHandle.getBody().get(0);
  PropertyHandle propHandle=tableHandle.getPropertyHandle(IStyleModel.MAP_RULES_PROP);
  ThreadResources.setLocale(new ULocale("String_Node_Str"));
  MapRuleHandle structHandle=(MapRuleHandle)propHandle.get(0);
  String value=structHandle.getExternalizedValue(MapRule.DISPLAY_ID_MEMBER,MapRule.DISPLAY_MEMBER);
  assertEquals("String_Node_Str",value);
  ThreadResources.setLocale(new ULocale("String_Node_Str"));
  structHandle=(MapRuleHandle)propHandle.get(0);
  value=structHandle.getExternalizedValue(MapRule.DISPLAY_ID_MEMBER,MapRule.DISPLAY_MEMBER);
  assertEquals("String_Node_Str",value);
}

Fixed version (ground truth):
/** 
 * Test getExternalizedValue method.
 * @throws Exception
 */
public void testGetExternalizedText() throws Exception {
  openDesign("String_Node_Str");
  TableHandle tableHandle=(TableHandle)designHandle.getBody().get(0);
  PropertyHandle propHandle=tableHandle.getPropertyHandle(IStyleModel.MAP_RULES_PROP);
  ModuleOption option=new ModuleOption();
  option.setLocale(new ULocale("String_Node_Str"));
  design.setOptions(option);
  MapRuleHandle structHandle=(MapRuleHandle)propHandle.get(0);
  String value=structHandle.getExternalizedValue(MapRule.DISPLAY_ID_MEMBER,MapRule.DISPLAY_MEMBER);
  assertEquals("String_Node_Str",value);
  option.setLocale(new ULocale("String_Node_Str"));
  structHandle=(MapRuleHandle)propHandle.get(0);
  value=structHandle.getExternalizedValue(MapRule.DISPLAY_ID_MEMBER,MapRule.DISPLAY_MEMBER);
  assertEquals("String_Node_Str",value);
}
Program: 68740
Project: 68740
Buggy source:
public void refresh(){
  button.setImage(provider.getImage(getExpressionType()));
  button.setToolTipText(provider.getTooltipText(getExpressionType()));
}

Fixed version (ground truth):
public void refresh(){
  if (!button.isDisposed()) {
    button.setImage(provider.getImage(getExpressionType()));
    button.setToolTipText(provider.getTooltipText(getExpressionType()));
  }
}
Program: 68741
Project: 68741
Buggy source:
private void writeDocumentProperties(IReportContent reportContent){
  if (reportContent == null) {
    return;
  }
  ReportDesignHandle reportDesign=reportContent.getDesign().getReportDesign();
  writer.openTag("String_Node_Str");
  writer.attribute("String_Node_Str","String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(reportDesign.getStringProperty(IModuleModel.AUTHOR_PROP));
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(reportContent.getTitle());
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(reportDesign.getStringProperty(IModuleModel.DESCRIPTION_PROP));
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(reportDesign.getSubject());
  writer.closeTag("String_Node_Str");
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
private void writeDocumentProperties(IReportContent reportContent){
  if (reportContent == null) {
    return;
  }
  ReportDesignHandle reportDesign=reportContent.getDesign().getReportDesign();
  writer.openTag("String_Node_Str");
  writer.attribute("String_Node_Str","String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(reportDesign.getStringProperty(IModuleModel.AUTHOR_PROP));
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(reportContent.getTitle());
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(reportDesign.getComments());
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(reportDesign.getSubject());
  writer.closeTag("String_Node_Str");
  writer.closeTag("String_Node_Str");
}
Program: 68742
Project: 68742
Buggy source:
public void startPage(IPageContent page) throws IOException, BirtException {
  if (previousPage != null) {
    outputPrePageProperties();
    previousPage=page;
    context.resetWidth();
  }
 else {
    previousPage=page;
    boolean isRtl=false;
    String creator=null;
    String title=null;
    String description=null;
    String subject=null;
    if (reportContent != null) {
      ReportDesignHandle designHandle=reportContent.getDesign().getReportDesign();
      creator=designHandle.getAuthor();
      title=reportContent.getTitle();
      description=designHandle.getDescription();
      subject=designHandle.getSubject();
      IContent rootContent=reportContent.getRoot();
      isRtl=rootContent != null && rootContent.isRTL();
    }
    wordWriter.start(isRtl,creator,title,description,subject);
    drawDocumentBackground();
  }
  computePageProperties(page);
  context.addWidth(contentWidth);
  wordWriter.startPage();
}

Fixed version (ground truth):
public void startPage(IPageContent page) throws IOException, BirtException {
  if (previousPage != null) {
    outputPrePageProperties();
    previousPage=page;
    context.resetWidth();
  }
 else {
    previousPage=page;
    boolean isRtl=false;
    String creator=null;
    String title=null;
    String comments=null;
    String subject=null;
    if (reportContent != null) {
      ReportDesignHandle designHandle=reportContent.getDesign().getReportDesign();
      creator=designHandle.getAuthor();
      title=reportContent.getTitle();
      comments=designHandle.getComments();
      subject=designHandle.getSubject();
      IContent rootContent=reportContent.getRoot();
      isRtl=rootContent != null && rootContent.isRTL();
    }
    wordWriter.start(isRtl,creator,title,comments,subject);
    drawDocumentBackground();
  }
  computePageProperties(page);
  context.addWidth(contentWidth);
  wordWriter.startPage();
}
Program: 68743
Project: 68743
Buggy source:
/** 
 * Creates a document and create a PdfWriter
 * @param rc the report content.
 */
public void start(IReportContent rc){
  ReportDesignHandle designHandle=rc.getDesign().getReportDesign();
  String title=rc.getTitle();
  String author=designHandle.getAuthor();
  String description=designHandle.getStringProperty(IModuleModel.DESCRIPTION_PROP);
  String subject=designHandle.getSubject();
  try {
    pageDevice=createPageDevice(title,author,subject,description,context,rc);
  }
 catch (  Exception e) {
    log(e,Level.SEVERE);
  }
}

Fixed version (ground truth):
/** 
 * Creates a document and create a PdfWriter
 * @param rc the report content.
 */
public void start(IReportContent rc){
  ReportDesignHandle designHandle=rc.getDesign().getReportDesign();
  String title=rc.getTitle();
  String author=designHandle.getAuthor();
  String comments=designHandle.getComments();
  String subject=designHandle.getSubject();
  try {
    pageDevice=createPageDevice(title,author,subject,comments,context,rc);
  }
 catch (  Exception e) {
    log(e,Level.SEVERE);
  }
}
Program: 68744
Project: 68744
Buggy source:
public IPageDevice createPageDevice(String title,String author,String subject,String description,IReportContext context,IReportContent report) throws Exception {
  try {
    return new PPTPageDevice(pptOutput,title,author,description);
  }
 catch (  Exception e) {
    logger.log(Level.SEVERE,e.getMessage());
  }
  return null;
}

Fixed version (ground truth):
public IPageDevice createPageDevice(String title,String author,String subject,String description,IReportContext context,IReportContent report) throws Exception {
  try {
    return new PPTPageDevice(pptOutput,title,author,description,subject);
  }
 catch (  Exception e) {
    logger.log(Level.SEVERE,e.getMessage());
  }
  return null;
}
Program: 68745
Project: 68745
Buggy source:
/** 
 * Creates a PPT Document.
 * @param author 
 * @param title 
 */
public void start(String title,String author,String description){
  if (!imageInfos.isEmpty()) {
    imageInfos.clear();
  }
  if (!fileNamesLists.isEmpty()) {
    fileNamesLists.clear();
  }
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str" + title + "String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str" + author + "String_Node_Str");
  println("String_Node_Str" + description + "String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Creates a PPT Document.
 * @param author 
 * @param title 
 */
public void start(String title,String author,String description,String subject){
  if (!imageInfos.isEmpty()) {
    imageInfos.clear();
  }
  if (!fileNamesLists.isEmpty()) {
    fileNamesLists.clear();
  }
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str" + title + "String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str" + author + "String_Node_Str");
  println("String_Node_Str" + description + "String_Node_Str");
  println("String_Node_Str" + subject + "String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
  println("String_Node_Str");
}
Program: 68746
Project: 68746
Buggy source:
public PPTPageDevice(OutputStream output,String title,String author,String description){
  writer=new PPTWriter(output);
  writer.start(title,author,description);
}

Fixed version (ground truth):
public PPTPageDevice(OutputStream output,String title,String author,String description,String subject){
  writer=new PPTWriter(output);
  writer.start(title,author,description,subject);
}
Program: 68747
Project: 68747
Buggy source:
private void writeDocumentProperties(IReportContent reportContent){
  if (reportContent == null) {
    return;
  }
  ReportDesignHandle reportDesign=reportContent.getDesign().getReportDesign();
  writer.openTag("String_Node_Str");
  writer.attribute("String_Node_Str","String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(reportDesign.getStringProperty(IModuleModel.AUTHOR_PROP));
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(reportDesign.getStringProperty(IModuleModel.TITLE_PROP));
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(reportDesign.getStringProperty(IModuleModel.DESCRIPTION_PROP));
  writer.closeTag("String_Node_Str");
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
private void writeDocumentProperties(IReportContent reportContent){
  if (reportContent == null) {
    return;
  }
  ReportDesignHandle reportDesign=reportContent.getDesign().getReportDesign();
  writer.openTag("String_Node_Str");
  writer.attribute("String_Node_Str","String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(reportDesign.getStringProperty(IModuleModel.AUTHOR_PROP));
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(reportContent.getTitle());
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(reportDesign.getStringProperty(IModuleModel.DESCRIPTION_PROP));
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(reportDesign.getSubject());
  writer.closeTag("String_Node_Str");
  writer.closeTag("String_Node_Str");
}