nus-yam/ex-repair huggingface dataset:
Program: 68748
Project: 68748
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;
    if (reportContent != null) {
      ReportDesignHandle designHandle=reportContent.getDesign().getReportDesign();
      creator=designHandle.getAuthor();
      title=designHandle.getStringProperty(IModuleModel.TITLE_PROP);
      description=designHandle.getDescription();
      IContent rootContent=reportContent.getRoot();
      isRtl=rootContent != null && rootContent.isRTL();
    }
    wordWriter.start(isRtl,creator,title,description);
    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 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();
}
Program: 68749
Project: 68749
Buggy source:
void start(boolean rtl,String creator,String title,String description) throws IOException ;

Fixed version (ground truth):
void start(boolean rtl,String creator,String title,String description,String subject) throws IOException ;
Program: 68750
Project: 68750
Buggy source:
private void writeCoreProperties(String creator,String title,String description){
  writer.openTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(creator);
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(title);
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(description);
  writer.closeTag("String_Node_Str");
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
private void writeCoreProperties(String creator,String title,String description,String subject){
  writer.openTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(creator);
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(title);
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(description);
  writer.closeTag("String_Node_Str");
  writer.openTag("String_Node_Str");
  writer.text(subject);
  writer.closeTag("String_Node_Str");
  writer.closeTag("String_Node_Str");
}
Program: 68752
Project: 68752
Buggy source:
public void setParent(IElement parent){
  super.setParent(parent);
  ((IContent)parent).setHasChildren(true);
}

Fixed version (ground truth):
public void setParent(IElement parent){
  super.setParent(parent);
  if (parent != null) {
    ((IContent)parent).setHasChildren(true);
  }
}
Program: 68753
Project: 68753
Buggy source:
public void drawTotalPage(String text,int textX,int textY,int width,int height,TextStyle textInfo){
  if (pageDevice.getPDFTemplate() != null) {
    isTotalPage=true;
    drawText(text,textX,textY,width,height,textInfo);
  }
}

Fixed version (ground truth):
public void drawTotalPage(String text,int textX,int textY,int width,int height,TextStyle textInfo,float scale){
  PdfTemplate template=pageDevice.getPDFTemplate(scale);
  if (template != null) {
    PdfContentByte tempCB=this.contentByte;
    this.containerHeight=template.getHeight();
    this.contentByte=template;
    drawText(text,textX,textY,width,height,textInfo);
    this.contentByte=tempCB;
    this.containerHeight=pageHeight;
  }
}
Program: 68754
Project: 68754
Buggy source:
private void createTotalPageTemplate(float x,float y,float width,float height){
  if (pageDevice.getPDFTemplate() == null) {
    pageDevice.setPDFTemplate(contentByte.createTemplate(width,height));
  }
  y=transformY(y,height);
  contentByte.saveState();
  contentByte.addTemplate(pageDevice.getPDFTemplate(),x,y);
  contentByte.restoreState();
}

Fixed version (ground truth):
private void createTotalPageTemplate(float x,float y,float width,float height,float scale){
  PdfTemplate template=null;
  if (pageDevice.hasTemplate(scale)) {
    template=pageDevice.getPDFTemplate(scale);
  }
 else {
    template=contentByte.createTemplate(width,height);
    pageDevice.setPDFTemplate(scale,template);
  }
  y=transformY(y,height);
  contentByte.saveState();
  contentByte.addTemplate(template,x,y);
  contentByte.restoreState();
}
Program: 68756
Project: 68756
Buggy source:
public PDFPage(int pageWidth,int pageHeight,Document document,PdfWriter writer,PDFPageDevice pageDevice){
  super(pageWidth,pageHeight);
  this.writer=writer;
  this.pageDevice=pageDevice;
  try {
    Rectangle pageSize=new Rectangle(this.pageWidth,this.pageHeight);
    document.setPageSize(pageSize);
    if (!document.isOpen())     document.open();
 else     document.newPage();
    this.contentByte=writer.getDirectContent();
  }
 catch (  DocumentException de) {
    logger.log(Level.SEVERE,de.getMessage(),de);
  }
}

Fixed version (ground truth):
public PDFPage(int pageWidth,int pageHeight,Document document,PdfWriter writer,PDFPageDevice pageDevice){
  super(pageWidth,pageHeight);
  this.writer=writer;
  this.pageDevice=pageDevice;
  this.containerHeight=this.pageHeight;
  try {
    Rectangle pageSize=new Rectangle(this.pageWidth,this.pageHeight);
    document.setPageSize(pageSize);
    if (!document.isOpen())     document.open();
 else     document.newPage();
    this.contentByte=writer.getDirectContent();
  }
 catch (  DocumentException de) {
    logger.log(Level.SEVERE,de.getMessage(),de);
  }
}
Program: 68757
Project: 68757
Buggy source:
public PdfTemplate getPDFTemplate(){
  return this.totalPageTemplate;
}

Fixed version (ground truth):
public PdfTemplate getPDFTemplate(Float scale){
  return templateMap.get(scale);
}
Program: 68758
Project: 68758
Buggy source:
public void setPDFTemplate(PdfTemplate totalPageTemplate){
  this.totalPageTemplate=totalPageTemplate;
}

Fixed version (ground truth):
public void setPDFTemplate(Float scale,PdfTemplate totalPageTemplate){
  templateMap.put(scale,totalPageTemplate);
}
Program: 68759
Project: 68759
Buggy source:
public void setTotalPage(ITextArea totalPage){
  super.setTotalPage(totalPage);
  isTotalPage=true;
  drawText(totalPage);
  isTotalPage=false;
}

Fixed version (ground truth):
public void setTotalPage(ITextArea totalPage){
  super.setTotalPage(totalPage);
  isTotalPage=true;
  HashMap<Float,PdfTemplate> map=((PDFPageDevice)pageDevice).getTemplateMap();
  if (!map.isEmpty()) {
    float scaleCache=this.scale;
    Iterator<Float> iter=map.keySet().iterator();
    while (iter.hasNext()) {
      Float s=iter.next();
      PdfTemplate template=map.get(s);
      if (template != null) {
        this.scale=s.floatValue();
        drawText(totalPage);
      }
    }
    this.scale=scaleCache;
  }
  isTotalPage=false;
}
Program: 68760
Project: 68760
Buggy source:
protected void drawTextAt(ITextArea text,int x,int y,int width,int height,TextStyle textInfo){
  if (isTotalPage) {
    currentPage.drawTotalPage(text.getText(),x,y,width,height,textInfo);
  }
 else {
    currentPage.drawText(text.getText(),x,y,width,height,textInfo);
  }
}

Fixed version (ground truth):
protected void drawTextAt(ITextArea text,int x,int y,int width,int height,TextStyle textInfo){
  if (isTotalPage) {
    currentPage.drawTotalPage(text.getText(),x,y,width,height,textInfo,scale);
  }
 else {
    currentPage.drawText(text.getText(),x,y,width,height,textInfo);
  }
}
Program: 68761
Project: 68761
Buggy source:
public void visitAutoText(ITemplateArea templateArea){
  super.visitAutoText(templateArea);
  int x=currentX + getX(templateArea);
  int y=currentY + getY(templateArea);
  createTotalPageTemplate(x,y,getWidth(templateArea),getHeight(templateArea));
}

Fixed version (ground truth):
public void visitAutoText(ITemplateArea templateArea){
  super.visitAutoText(templateArea);
  int x=currentX + getX(templateArea);
  int y=currentY + getY(templateArea);
  createTotalPageTemplate(x,y,getWidth(templateArea),getHeight(templateArea),scale);
}
Program: 68762
Project: 68762
Buggy source:
private void createTotalPageTemplate(int x,int y,int width,int height){
  currentPage.createTotalPageTemplate(x,y,width,height);
}

Fixed version (ground truth):
private void createTotalPageTemplate(int x,int y,int width,int height,float scale){
  currentPage.createTotalPageTemplate(x,y,width,height,scale);
}
Program: 68764
Project: 68764
Buggy source:
/** 
 * output the report title.
 */
protected void outputReportTitle(ReportDesignHandle designHandle){
  String title=null;
  if (designHandle != null) {
    title=designHandle.getStringProperty(IModuleModel.TITLE_PROP);
  }
  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=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: 68765
Project: 68765
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=designHandle.getStringProperty(IModuleModel.TITLE_PROP);
  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 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);
  }
}
Program: 68766
Project: 68766
Buggy source:
/** 
 * localize the text.
 * @param key text key
 * @param text default text
 * @return localized text.
 */
private String localize(IContent content,String key,String text){
  assert(content != null);
  if (content.getGenerateBy() != null) {
    DesignElementHandle element=((ReportItemDesign)content.getGenerateBy()).getHandle();
    if (key != null && element != null) {
      String t=ModuleUtil.getExternalizedValue(element,key,text,ULocale.forLocale(locale));
      if (t != null) {
        return t;
      }
    }
  }
  return text;
}

Fixed version (ground truth):
private String localize(IReportContent content,String key,String text){
  assert(content != null);
  if (content.getDesign() != null) {
    DesignElementHandle element=content.getDesign().getReportDesign();
    if (key != null && element != null) {
      String t=ModuleUtil.getExternalizedValue(element,key,text,ULocale.forLocale(locale));
      if (t != null) {
        return t;
      }
    }
  }
  return text;
}
Program: 68767
Project: 68767
Buggy source:
public ImageOutputStream run() throws IOException {
  return ImageIO.createImageOutputStream(output);
}

Fixed version (ground truth):
public String run(){
  return System.getenv(name);
}
Program: 68768
Project: 68768
Buggy source:
/** 
 * @param keyColumn Name of key column to sorty by
 */
public void setColumn(String keyColumn){
  this.keyColumn=keyColumn;
  this.keyExpr=null;
}

Fixed version (ground truth):
/** 
 * @param keyColumn Name of key column to sort by
 */
public void setColumn(String keyColumn){
  this.keyColumn=keyColumn;
  this.keyExpr=null;
}
Program: 68769
Project: 68769
Buggy source:
/** 
 * @param outputStream
 * @param sorts
 * @throws IOException
 */
public static List loadSorts(InputStream inputStream,int version) throws IOException {
  DataInputStream dis=new DataInputStream(inputStream);
  List sortList=new ArrayList();
  int size=IOUtil.readInt(dis);
  for (int i=0; i < size; i++) {
    String sortKeyColumn=IOUtil.readString(dis);
    IScriptExpression sortKeyExpr=(IScriptExpression)ExprUtil.loadBaseExpr(dis);
    int direction=IOUtil.readInt(dis);
    SortDefinition sortDefn=new SortDefinition();
    if (sortKeyColumn != null)     sortDefn.setColumn(sortKeyColumn);
 else     sortDefn.setExpression(sortKeyExpr.getText());
    sortDefn.setSortDirection(direction);
    if (version >= VersionManager.VERSION_2_3_1)     sortDefn.setSortStrength(IOUtil.readInt(dis));
    if (version >= VersionManager.VERSION_2_5_0_1) {
      String locale=IOUtil.readString(dis);
      if (locale != null)       sortDefn.setSortLocale(new ULocale(locale));
    }
    sortList.add(sortDefn);
  }
  return sortList;
}

Fixed version (ground truth):
/** 
 * @param outputStream
 * @param sorts
 * @throws IOException
 */
public static List loadSorts(InputStream inputStream,int version) throws IOException {
  DataInputStream dis=new DataInputStream(inputStream);
  List sortList=new ArrayList();
  int size=IOUtil.readInt(dis);
  for (int i=0; i < size; i++) {
    String sortKeyColumn=IOUtil.readString(dis);
    IScriptExpression sortKeyExpr=(IScriptExpression)ExprUtil.loadBaseExpr(dis);
    int direction=IOUtil.readInt(dis);
    SortDefinition sortDefn=new SortDefinition();
    if (sortKeyColumn != null)     sortDefn.setColumn(sortKeyColumn);
 else     sortDefn.setExpression(sortKeyExpr);
    sortDefn.setSortDirection(direction);
    if (version >= VersionManager.VERSION_2_3_1)     sortDefn.setSortStrength(IOUtil.readInt(dis));
    if (version >= VersionManager.VERSION_2_5_0_1) {
      String locale=IOUtil.readString(dis);
      if (locale != null)       sortDefn.setSortLocale(new ULocale(locale));
    }
    sortList.add(sortDefn);
  }
  return sortList;
}
Program: 68770
Project: 68770
Buggy source:
public IResultIterator getSecondaryIterator(ScriptContext context,String subQueryName) throws BirtException {
  return new CachedQueryResults(this.session,QuerySharingUtil.getSubQueryID(this.queryResults.getID(),subQueryName,this.rowIndex),this.queryResults.getPreparedQuery()).getResultIterator();
}

Fixed version (ground truth):
public IResultIterator getSecondaryIterator(ScriptContext context,String subQueryName) throws BirtException {
  CachedQueryResults rs=new CachedQueryResults(this.session,QuerySharingUtil.getSubQueryID(this.queryResults.getID(),subQueryName,this.rowIndex),this.queryResults.getPreparedQuery());
  if (!rs.existCachedFile()) {
    throw new DataException(ResourceConstants.NOT_SUPPORT_REPORT_ITEM_SUBQUERY);
  }
  return rs.getResultIterator();
}
Program: 68771
Project: 68771
Buggy source:
/** 
 * @param context
 * @param queryResultID
 * @throws DataException
 */
public CachedQueryResults(DataEngineSession session,String queryResultID,IPreparedQuery preparedQuery) throws DataException {
  this.session=session;
  String tempDir=session.getTempDir();
  Object[] params={tempDir,queryResultID};
  logger.entering(CachedQueryResults.class.getName(),"String_Node_Str",params);
  this.queryResultID=queryResultID;
  this.pQuery=preparedQuery;
  this.resultIterator=new CacheResultIterator(session,tempDir,this);
  logger.exiting(CachedQueryResults.class.getName(),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @param context
 * @param queryResultID
 * @throws DataException
 */
public CachedQueryResults(DataEngineSession session,String queryResultID,IPreparedQuery preparedQuery) throws DataException {
  this.session=session;
  String tempDir=session.getTempDir();
  Object[] params={tempDir,queryResultID};
  logger.entering(CachedQueryResults.class.getName(),"String_Node_Str",params);
  this.queryResultID=queryResultID;
  this.pQuery=preparedQuery;
  this.resultIterator=new CacheResultIterator(session,tempDir,this);
  this.existCachedFile=((CacheResultIterator)this.resultIterator).existCachedFile();
  logger.exiting(CachedQueryResults.class.getName(),"String_Node_Str");
}
Program: 68772
Project: 68772
Buggy source:
public IBinding adaptBinding(ComputedColumnHandle handle){
  try {
    if (handle == null)     return null;
    Binding result=new Binding(handle.getName());
    if (handle.getExpression() != null) {
      ScriptExpression expr=this.adaptExpression((Expression)handle.getExpressionProperty(org.eclipse.birt.report.model.api.elements.structures.ComputedColumn.EXPRESSION_MEMBER).getValue(),handle.getDataType());
      expr.setGroupName(handle.getAggregateOn());
      result.setExpression(expr);
    }
    result.setDisplayName(handle.getDisplayName());
    result.setDataType(org.eclipse.birt.report.data.adapter.api.DataAdapterUtil.adaptModelDataType(handle.getDataType()));
    result.setAggrFunction(org.eclipse.birt.report.data.adapter.api.DataAdapterUtil.adaptModelAggregationType(handle.getAggregateFunction()));
    result.setFilter(handle.getFilterExpression() == null ? null : this.adaptExpression((Expression)handle.getExpressionProperty(org.eclipse.birt.report.model.api.elements.structures.ComputedColumn.FILTER_MEMBER).getValue(),DesignChoiceConstants.COLUMN_DATA_TYPE_BOOLEAN));
    populateArgument(result,handle);
    populateAggregateOns(result,handle);
    return result;
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,e.getMessage(),e);
    return null;
  }
}

Fixed version (ground truth):
public IBinding adaptBinding(ComputedColumnHandle handle){
  try {
    if (handle == null)     return null;
    Binding result=new Binding(handle.getName());
    if (handle.getExpression() != null) {
      ScriptExpression expr=this.adaptExpression((Expression)handle.getExpressionProperty(org.eclipse.birt.report.model.api.elements.structures.ComputedColumn.EXPRESSION_MEMBER).getValue(),handle.getDataType());
      expr.setGroupName(handle.getAggregateOn());
      result.setExpression(expr);
    }
    result.setDisplayName(handle.getExternalizedValue(handle.getDisplayNameID(),handle.getDisplayName(),this.context.getDataEngineContext().getLocale()));
    result.setDataType(org.eclipse.birt.report.data.adapter.api.DataAdapterUtil.adaptModelDataType(handle.getDataType()));
    result.setAggrFunction(org.eclipse.birt.report.data.adapter.api.DataAdapterUtil.adaptModelAggregationType(handle.getAggregateFunction()));
    result.setFilter(handle.getFilterExpression() == null ? null : this.adaptExpression((Expression)handle.getExpressionProperty(org.eclipse.birt.report.model.api.elements.structures.ComputedColumn.FILTER_MEMBER).getValue(),DesignChoiceConstants.COLUMN_DATA_TYPE_BOOLEAN));
    populateArgument(result,handle);
    populateAggregateOns(result,handle);
    return result;
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,e.getMessage(),e);
    return null;
  }
}
Program: 68773
Project: 68773
Buggy source:
protected String getColumnName(Object obj){
  if (obj instanceof ComputedColumnHandle)   return ((ComputedColumnHandle)obj).getName();
 else   if (obj instanceof ResultSetColumnHandle)   return ((ResultSetColumnHandle)obj).getColumnName();
 else   return "String_Node_Str";
}

Fixed version (ground truth):
protected String getColumnName(Object obj){
  if (obj instanceof DataSetViewData) {
    return ((DataSetViewData)obj).getName();
  }
 else   return "String_Node_Str";
}
Program: 68774
Project: 68774
Buggy source:
protected void setColumnList(DesignElementHandle handle){
  if (handle instanceof DataSetHandle) {
    try {
      columnList=DataUtil.getColumnList(dataset);
    }
 catch (    SemanticException e) {
      ExceptionHandler.handle(e);
    }
  }
 else   if (handle instanceof TabularCubeHandle || handle instanceof TabularHierarchyHandle) {
    try {
      if (dataset != null)       columnList=DataUtil.getColumnList(dataset);
 else       columnList=Collections.EMPTY_LIST;
    }
 catch (    SemanticException e) {
      ExceptionHandler.handle(e);
    }
  }
 else {
    columnList=DEUtil.getVisiableColumnBindingsList(handle);
  }
}

Fixed version (ground truth):
protected void setColumnList(DesignElementHandle handle){
  if (handle instanceof DataSetHandle) {
    columnList=Arrays.asList(DataSetProvider.getCurrentInstance().getColumns((DataSetHandle)handle,false));
  }
 else   if (handle instanceof TabularCubeHandle || handle instanceof TabularHierarchyHandle) {
    try {
      if (dataset != null)       columnList=DataUtil.getColumnList(dataset);
 else       columnList=Collections.EMPTY_LIST;
    }
 catch (    SemanticException e) {
      ExceptionHandler.handle(e);
    }
  }
 else {
    columnList=DEUtil.getVisiableColumnBindingsList(handle);
  }
}
Program: 68775
Project: 68775
Buggy source:
/** 
 * @param tag
 * @param condition
 * @param htmlAttr
 * @param uv
 */
private void setURLValueAttributes(HTMLTag tag,TriggerCondition condition,HTMLAttribute htmlAttr,URLValue uv){
  String tooltip=uv.getTooltip();
  setTooltipAttribute(tag,tooltip);
  if (condition == TriggerCondition.ONCLICK_LITERAL) {
    tag.addAttribute(HTMLAttribute.HREF,eval2HTML(uv.getBaseUrl()));
    if (uv.getTarget() != null) {
      tag.addAttribute(HTMLAttribute.TARGET,uv.getTarget());
    }
  }
 else {
    tag.addAttribute(HTMLAttribute.HREF,NO_OP_JAVASCRIPT);
    String value=getJsURLRedirect(uv);
    if (htmlAttr.equals(HTMLAttribute.ONFOCUS)) {
      value="String_Node_Str" + value;
    }
    tag.addAttribute(htmlAttr,value);
  }
}

Fixed version (ground truth):
/** 
 * @param tag
 * @param condition
 * @param htmlAttr
 * @param uv
 */
private void setURLValueAttributes(HTMLTag tag,TriggerCondition condition,HTMLAttribute htmlAttr,URLValue uv){
  String tooltip=uv.getTooltip();
  setTooltipAttribute(tag,tooltip);
  if (condition == TriggerCondition.ONCLICK_LITERAL) {
    tag.addAttribute(HTMLAttribute.HREF,eval2HTML(removeSurroundingQuotes(uv.getBaseUrl())));
    if (uv.getTarget() != null) {
      tag.addAttribute(HTMLAttribute.TARGET,uv.getTarget());
    }
  }
 else {
    tag.addAttribute(HTMLAttribute.HREF,NO_OP_JAVASCRIPT);
    String value=getJsURLRedirect(uv);
    if (htmlAttr.equals(HTMLAttribute.ONFOCUS)) {
      value="String_Node_Str" + value;
    }
    tag.addAttribute(htmlAttr,value);
  }
}
Program: 68776
Project: 68776
Buggy source:
protected String getJsURLRedirect(URLValue uv){
  String sBaseUrl=uv.getBaseUrl() == null ? "String_Node_Str" : uv.getBaseUrl();
  if (sBaseUrl.startsWith("String_Node_Str")) {
    return sBaseUrl;
  }
  if (sBaseUrl.startsWith("String_Node_Str")) {
    return "String_Node_Str" + eval2HTML(sBaseUrl) + "String_Node_Str";
  }
  return "String_Node_Str" + eval2HTML(sBaseUrl) + "String_Node_Str"+ (uv.getTarget() == null ? "String_Node_Str" : uv.getTarget())+ "String_Node_Str";
}

Fixed version (ground truth):
protected String getJsURLRedirect(URLValue uv){
  String sBaseUrl=uv.getBaseUrl() == null ? "String_Node_Str" : uv.getBaseUrl();
  sBaseUrl=removeSurroundingQuotes(sBaseUrl);
  if (sBaseUrl.startsWith("String_Node_Str")) {
    return sBaseUrl;
  }
  if (sBaseUrl.startsWith("String_Node_Str")) {
    return "String_Node_Str" + eval2HTML(sBaseUrl) + "String_Node_Str";
  }
  return "String_Node_Str" + eval2HTML(sBaseUrl) + "String_Node_Str"+ (uv.getTarget() == null ? "String_Node_Str" : uv.getTarget())+ "String_Node_Str";
}
Program: 68778
Project: 68778
Buggy source:
private Expression createUserProperty(DesignElementHandle handle,UserPropertyDefn userDef){
switch (userDef.getTypeCode()) {
case IPropertyType.SCRIPT_TYPE:
case IPropertyType.EXPRESSION_TYPE:
    Object defaultValue=userDef.getDefault();
  if (defaultValue instanceof org.eclipse.birt.report.model.api.Expression) {
    return createExpression((org.eclipse.birt.report.model.api.Expression)defaultValue);
  }
 else {
    return null;
  }
case IPropertyType.NUMBER_TYPE:
case IPropertyType.INTEGER_TYPE:
case IPropertyType.FLOAT_TYPE:
return createConstant(DataType.DOUBLE_TYPE,handle.getStringProperty(userDef.getName()));
case IPropertyType.BOOLEAN_TYPE:
return createConstant(DataType.BOOLEAN_TYPE,handle.getStringProperty(userDef.getName()));
case IPropertyType.DATE_TIME_TYPE:
return createConstant(DataType.DATE_TYPE,handle.getStringProperty(userDef.getName()));
default :
return createConstant(DataType.STRING_TYPE,handle.getStringProperty(userDef.getName()));
}
}

Fixed version (ground truth):
private Expression createUserProperty(DesignElementHandle handle,UserPropertyDefn userDef){
  String propName=userDef.getName();
  String valueExpr=handle.getStringProperty(propName);
switch (userDef.getTypeCode()) {
case IPropertyType.SCRIPT_TYPE:
case IPropertyType.EXPRESSION_TYPE:
    if (valueExpr != null) {
      return createExpression(valueExpr);
    }
 else {
      Object defaultValue=userDef.getDefault();
      if (defaultValue instanceof org.eclipse.birt.report.model.api.Expression) {
        return createExpression((org.eclipse.birt.report.model.api.Expression)defaultValue);
      }
 else {
        return null;
      }
    }
case IPropertyType.NUMBER_TYPE:
case IPropertyType.INTEGER_TYPE:
case IPropertyType.FLOAT_TYPE:
  return createConstant(DataType.DOUBLE_TYPE,valueExpr);
case IPropertyType.BOOLEAN_TYPE:
return createConstant(DataType.BOOLEAN_TYPE,valueExpr);
case IPropertyType.DATE_TIME_TYPE:
return createConstant(DataType.DATE_TYPE,valueExpr);
default :
return createConstant(DataType.STRING_TYPE,valueExpr);
}
}
Program: 68779
Project: 68779
Buggy source:
public List getFilters(){
  return this.source.getFilters();
}

Fixed version (ground truth):
public List getFilters(){
  return this.filters;
}
Program: 68780
Project: 68780
Buggy source:
public DataSetAdapter(IBaseDataSetDesign source){
  this.source=source;
  this.computedColumns=new ArrayList();
  if (this.source.getComputedColumns() != null) {
    this.computedColumns.addAll(this.source.getComputedColumns());
  }
}

Fixed version (ground truth):
public DataSetAdapter(IBaseDataSetDesign source){
  this.source=source;
  this.computedColumns=new ArrayList();
  if (this.source.getComputedColumns() != null) {
    this.computedColumns.addAll(this.source.getComputedColumns());
  }
  this.filters=new ArrayList();
  if (this.source.getFilters() != null) {
    this.filters.addAll(this.source.getFilters());
  }
}
Program: 68781
Project: 68781
Buggy source:
public Object evaluate(ScriptContext scriptContext,ICompiledScript compiledScript) throws BirtException {
  assert(compiledScript instanceof CompiledJavascript);
  try {
    Script script=((CompiledJavascript)compiledScript).getCompiledScript();
    Object value=script.exec(context,getJSScope(scriptContext));
    return jsToJava(value);
  }
 catch (  Throwable e) {
    throw new BirtException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public Object evaluate(ScriptContext scriptContext,ICompiledScript compiledScript) throws BirtException {
  assert(compiledScript instanceof CompiledJavascript);
  String source=((CompiledJavascript)compiledScript).getScriptText();
  try {
    Script script=((CompiledJavascript)compiledScript).getCompiledScript();
    Object value=script.exec(context,getJSScope(scriptContext));
    return jsToJava(value);
  }
 catch (  Throwable e) {
    throw new CoreException(ResourceConstants.JAVASCRIPT_COMMON_ERROR,new Object[]{source,e.getMessage()},e);
  }
}
Program: 68782
Project: 68782
Buggy source:
/** 
 * Returns format code according to format type and current locale
 */
public String getLocalizedFormatCode(){
  if (UNFORMATTED.equals(formatPattern) || DATETIME_UNFORMATTED.equals(formatPattern) || DATE_UNFORMATTED.equals(formatPattern)|| TIME_UNFORMATTED.equals(formatPattern)) {
    return ((SimpleDateFormat)dateFormat).toLocalizedPattern();
  }
  SimpleDateFormat dateFormat=getFormatter();
  return dateFormat.toLocalizedPattern();
}

Fixed version (ground truth):
/** 
 * Returns format code according to format type and current locale
 */
public String getLocalizedFormatCode(){
  if (UNFORMATTED.equals(formatPattern) || DATETIME_UNFORMATTED.equals(formatPattern) || DATE_UNFORMATTED.equals(formatPattern)|| TIME_UNFORMATTED.equals(formatPattern)) {
    return ((SimpleDateFormat)dateFormat).toLocalizedPattern();
  }
  SimpleDateFormat format=getFormatter();
  if (format == null) {
    return ((SimpleDateFormat)dateFormat).toPattern();
  }
 else {
    return format.toLocalizedPattern();
  }
}
Program: 68783
Project: 68783
Buggy source:
/** 
 * Returns format code according to format type and current locale
 */
public String getFormatCode(){
  if (UNFORMATTED.equals(formatPattern) || DATETIME_UNFORMATTED.equals(formatPattern) || DATE_UNFORMATTED.equals(formatPattern)|| TIME_UNFORMATTED.equals(formatPattern)) {
    return ((SimpleDateFormat)dateFormat).toPattern();
  }
  SimpleDateFormat dateFormat=getFormatter();
  return dateFormat.toPattern();
}

Fixed version (ground truth):
/** 
 * Returns format code according to format type and current locale
 */
public String getFormatCode(){
  if (UNFORMATTED.equals(formatPattern) || DATETIME_UNFORMATTED.equals(formatPattern) || DATE_UNFORMATTED.equals(formatPattern)|| TIME_UNFORMATTED.equals(formatPattern)) {
    return ((SimpleDateFormat)dateFormat).toPattern();
  }
  SimpleDateFormat format=getFormatter();
  if (format == null) {
    return ((SimpleDateFormat)dateFormat).toPattern();
  }
 else {
    return format.toPattern();
  }
}
Program: 68784
Project: 68784
Buggy source:
public void addArgument(String name,IBaseExpression expr){
  this.argument.put(name,expr);
}

Fixed version (ground truth):
public void addArgument(String name,IBaseExpression expr){
  if ("String_Node_Str".equals(name)) {
    this.argument.put("String_Node_Str",expr);
  }
 else {
    this.argument.put(name,expr);
  }
}
Program: 68785
Project: 68785
Buggy source:
public void clear() throws IOException {
  bufferPos=0;
  Arrays.fill(buffer,null);
  if (diskList != null)   diskList.clear();
}

Fixed version (ground truth):
public void clear() throws IOException {
  bufferPos=0;
  Arrays.fill(buffer,null);
  if (diskList != null) {
    diskList.clear();
    diskList=null;
  }
}
Program: 68788
Project: 68788
Buggy source:
static IStyle processStyle(IReportContent reportContent,AbstractCrosstabItemHandle handle,IBaseResultSet evaluator,Map styleCache) throws BirtException {
  ReportElementHandle modelHandle=getReportElementHandle(handle);
  if (modelHandle == null || modelHandle.getPrivateStyle() == null || reportContent == null) {
    return null;
  }
  IStyle style=null;
  if (evaluator != null) {
    style=reportContent.createStyle();
    IStyle highlightStyle=reportContent.createStyle();
    setupHighlightStyle(modelHandle,highlightStyle,evaluator);
    if (!highlightStyle.isEmpty()) {
      IStyle newStyle=reportContent.createStyle();
      newStyle.setProperties(style);
      newStyle.setProperties(highlightStyle);
      return newStyle;
    }
  }
  return style;
}

Fixed version (ground truth):
static IStyle processStyle(IReportContent reportContent,AbstractCrosstabItemHandle handle,IBaseResultSet evaluator,Map styleCache) throws BirtException {
  ReportElementHandle modelHandle=getReportElementHandle(handle);
  if (modelHandle == null || reportContent == null || evaluator == null) {
    return null;
  }
  Iterator<HighlightRuleHandle> highlightRules=null;
  if (styleCache != null) {
    Object[] cachedData=(Object[])styleCache.get(modelHandle);
    if (cachedData != null) {
      List<HighlightRuleHandle> rules=(List<HighlightRuleHandle>)cachedData[0];
      if (rules != null) {
        highlightRules=rules.iterator();
      }
    }
 else {
      List<HighlightRuleHandle> rules=null;
      StyleHandle privateStyle=modelHandle.getPrivateStyle();
      if (privateStyle != null) {
        rules=new ArrayList<HighlightRuleHandle>();
        Iterator itr=privateStyle.highlightRulesIterator();
        while (itr != null && itr.hasNext()) {
          rules.add((HighlightRuleHandle)itr.next());
        }
        if (rules.isEmpty()) {
          rules=null;
        }
 else {
          highlightRules=rules.iterator();
        }
      }
      styleCache.put(modelHandle,new Object[]{rules});
    }
  }
 else {
    StyleHandle privateStyle=modelHandle.getPrivateStyle();
    if (privateStyle != null) {
      highlightRules=privateStyle.highlightRulesIterator();
    }
  }
  if (highlightRules == null) {
    return null;
  }
  IStyle highlightStyle=reportContent.createStyle();
  setupHighlightStyle(modelHandle,highlightRules,highlightStyle,evaluator);
  if (!highlightStyle.isEmpty()) {
    return highlightStyle;
  }
  return null;
}
Program: 68789
Project: 68789
Buggy source:
private static void setupHighlightStyle(ReportElementHandle handle,IStyle style,IBaseResultSet evaluator) throws BirtException {
  Iterator itr=handle.getPrivateStyle().highlightRulesIterator();
  while (itr != null && itr.hasNext()) {
    HighlightRuleHandle rule=(HighlightRuleHandle)itr.next();
    ConditionalExpression condExpr=null;
    if (ModuleUtil.isListStyleRuleValue(rule)) {
      condExpr=new ConditionalExpression(rule.getTestExpression(),DataAdapterUtil.adaptModelFilterOperator(rule.getOperator()),rule.getValue1List());
    }
 else {
      condExpr=new ConditionalExpression(rule.getTestExpression(),DataAdapterUtil.adaptModelFilterOperator(rule.getOperator()),rule.getValue1(),rule.getValue2());
    }
    IConditionalExpression expression=ExpressionUtil.transformConditionalExpression(condExpr);
    Object value=evaluator.evaluate(expression);
    if (value instanceof Boolean && ((Boolean)value).booleanValue()) {
      setupRuleStyle(rule,style);
    }
  }
}

Fixed version (ground truth):
private static void setupHighlightStyle(ReportElementHandle handle,Iterator<HighlightRuleHandle> highlightRules,IStyle style,IBaseResultSet evaluator) throws BirtException {
  while (highlightRules.hasNext()) {
    HighlightRuleHandle rule=highlightRules.next();
    ConditionalExpression condExpr=null;
    if (ModuleUtil.isListStyleRuleValue(rule)) {
      condExpr=new ConditionalExpression(rule.getTestExpression(),DataAdapterUtil.adaptModelFilterOperator(rule.getOperator()),rule.getValue1List());
    }
 else {
      condExpr=new ConditionalExpression(rule.getTestExpression(),DataAdapterUtil.adaptModelFilterOperator(rule.getOperator()),rule.getValue1(),rule.getValue2());
    }
    IConditionalExpression expression=ExpressionUtil.transformConditionalExpression(condExpr);
    Object value=evaluator.evaluate(expression);
    if (value instanceof Boolean && ((Boolean)value).booleanValue()) {
      setupRuleStyle(rule,style);
    }
  }
}
Program: 68790
Project: 68790
Buggy source:
public ImageArea(ImageArea area){
  super(area);
  this.url=area.getImageUrl();
  this.data=area.getImageData();
}

Fixed version (ground truth):
public ImageArea(ImageArea area){
  super(area);
  this.url=area.getImageUrl();
  this.data=area.getImageData();
  this.extension=area.extension;
  this.helpText=area.helpText;
  this.mimetype=area.mimetype;
  this.params=area.params;
}
Program: 68791
Project: 68791
Buggy source:
@Override public void stop(BundleContext context) throws Exception {
  if (syncService != null) {
    syncService.unregister();
    syncService=null;
  }
  super.stop(context);
}

Fixed version (ground truth):
@Override public void stop(BundleContext context) throws Exception {
  if (syncService != null) {
    syncService.unregister();
    syncService=null;
  }
  if (reportClasspathService != null) {
    reportClasspathService.unregister();
    reportClasspathService=null;
  }
  super.stop(context);
}
Program: 68792
Project: 68792
Buggy source:
public void start(BundleContext context) throws Exception {
  super.start(context);
  ReportPlugin.getDefault().addIgnoreViewID(LibraryExplorerView.ID);
  Hashtable<String,Object> dict=new Hashtable<String,Object>();
  dict.put(Constants.SERVICE_RANKING,Integer.valueOf(3));
  syncService=context.registerService(IReportResourceSynchronizer.class.getName(),new IDEResourceSynchronizer(),dict);
}

Fixed version (ground truth):
public void start(BundleContext context) throws Exception {
  super.start(context);
  ReportPlugin.getDefault().addIgnoreViewID(LibraryExplorerView.ID);
  Hashtable<String,Object> dict=new Hashtable<String,Object>();
  dict.put(Constants.SERVICE_RANKING,Integer.valueOf(3));
  syncService=context.registerService(IReportResourceSynchronizer.class.getName(),new IDEResourceSynchronizer(),dict);
  reportClasspathService=context.registerService(IReportClasspathResolver.class.getName(),new IDEReportClasspathResolver(),dict);
}
Program: 68794
Project: 68794
Buggy source:
public void setTextIndent(ITextContent content){
  if (currentIP == 0 && !setIndent && content != null) {
    IStyle contentStyle=content.getComputedStyle();
    currentIP=getDimensionValue(contentStyle.getProperty(StyleConstants.STYLE_TEXT_INDENT),maxAvaWidth);
    setIndent=true;
  }
}

Fixed version (ground truth):
public void setTextIndent(ITextContent content){
  if (currentIP == 0 && !setIndent && content != null) {
    IStyle contentStyle=content.getComputedStyle();
    currentIP=PropertyUtil.getDimensionValue(contentStyle.getProperty(StyleConstants.STYLE_TEXT_INDENT),maxAvaWidth);
    setIndent=true;
  }
}
Program: 68795
Project: 68795
Buggy source:
private boolean isInContainer(SheetData data,XlsContainer rowContainer){
  return data.getRowIndex() >= rowContainer.getStartRowId();
}

Fixed version (ground truth):
private boolean isInContainer(SheetData data,XlsContainer rowContainer){
  return data.getRowIndex() > rowContainer.getStartRowId();
}
Program: 68797
Project: 68797
Buggy source:
/** 
 * The used style should be style of area which is writable, and the others are styles of content which is read-only.
 * @param tableRight
 * @param columnRight
 * @param cellRight
 * @param usedStyle
 */
public BorderInfo resolveTableRightBorder(IStyle tableRight,IStyle rowRight,IStyle columnRight,IStyle cellRight){
  return resolveBorder(tableRightBorderCache,new BorderStyleInfo[]{new BorderStyleInfo(cellRight,POSITION_TRAIL),new BorderStyleInfo(columnRight,POSITION_TRAIL),new BorderStyleInfo(rowRight,POSITION_TRAIL),new BorderStyleInfo(tableRight,POSITION_TRAIL)});
}

Fixed version (ground truth):
/** 
 * The used style should be style of area which is writable, and the others are styles of content which is read-only.
 * @param tableRight
 * @param columnRight
 * @param cellRight
 * @param usedStyle
 */
public BorderInfo resolveTableRightBorder(IStyle tableRight,IStyle rowRight,IStyle columnRight,IStyle cellRight){
  return resolveBorder(tableRightBorderCache,new BorderStyleInfo[]{new BorderStyleInfo(cellRight,POSITION_RIGHT),new BorderStyleInfo(columnRight,POSITION_RIGHT),new BorderStyleInfo(rowRight,POSITION_RIGHT),new BorderStyleInfo(tableRight,POSITION_RIGHT)});
}
Program: 68798
Project: 68798
Buggy source:
/** 
 * The used style should be style of area which is writable, and the others are styles of content which is read-only.
 * @param preColumnRight
 * @param columnLeft
 * @param preCellRight
 * @param cellLeft
 * @param usedStyle
 */
public BorderInfo resolveCellLeftBorder(IStyle preColumnRight,IStyle columnLeft,IStyle preCellRight,IStyle cellLeft){
  return resolveBorder(cellLeftBorderCache,new BorderStyleInfo[]{new BorderStyleInfo(preCellRight,POSITION_TRAIL),new BorderStyleInfo(cellLeft,POSITION_LEAD),new BorderStyleInfo(preColumnRight,POSITION_TRAIL),new BorderStyleInfo(columnLeft,POSITION_LEAD)});
}

Fixed version (ground truth):
/** 
 * The used style should be style of area which is writable, and the others are styles of content which is read-only.
 * @param preColumnRight
 * @param columnLeft
 * @param preCellRight
 * @param cellLeft
 * @param usedStyle
 */
public BorderInfo resolveCellLeftBorder(IStyle preColumnRight,IStyle columnLeft,IStyle preCellRight,IStyle cellLeft){
  return resolveBorder(cellLeftBorderCache,new BorderStyleInfo[]{new BorderStyleInfo(preCellRight,POSITION_RIGHT),new BorderStyleInfo(cellLeft,POSITION_LEFT),new BorderStyleInfo(preColumnRight,POSITION_RIGHT),new BorderStyleInfo(columnLeft,POSITION_LEFT)});
}
Program: 68799
Project: 68799
Buggy source:
/** 
 * The used style should be style of area which is writable, and the others are styles of content which is read-only.
 * @param tableLeft
 * @param columnLeft
 * @param cellLeft
 * @param usedStyle
 */
public BorderInfo resolveTableLeftBorder(IStyle tableLeft,IStyle rowLeft,IStyle columnLeft,IStyle cellLeft){
  return resolveBorder(tableLeftBorderCache,new BorderStyleInfo[]{new BorderStyleInfo(cellLeft,POSITION_LEAD),new BorderStyleInfo(columnLeft,POSITION_LEAD),new BorderStyleInfo(rowLeft,POSITION_LEAD),new BorderStyleInfo(tableLeft,POSITION_LEAD)});
}

Fixed version (ground truth):
/** 
 * The used style should be style of area which is writable, and the others are styles of content which is read-only.
 * @param tableLeft
 * @param columnLeft
 * @param cellLeft
 * @param usedStyle
 */
public BorderInfo resolveTableLeftBorder(IStyle tableLeft,IStyle rowLeft,IStyle columnLeft,IStyle cellLeft){
  return resolveBorder(tableLeftBorderCache,new BorderStyleInfo[]{new BorderStyleInfo(cellLeft,POSITION_LEFT),new BorderStyleInfo(columnLeft,POSITION_LEFT),new BorderStyleInfo(rowLeft,POSITION_LEFT),new BorderStyleInfo(tableLeft,POSITION_LEFT)});
}
Program: 68800
Project: 68800
Buggy source:
protected IStyle getLeftCellContentStyle(RowArea lastRow,RowArea currentRow,int columnID){
  CellArea cell=currentRow.getCell(columnID - 1);
  if (cell == null && lastRow != null) {
    cell=lastRow.getCell(columnID - 1);
  }
  if (cell != null) {
    return cell.getContent().getComputedStyle();
  }
  return null;
}

Fixed version (ground truth):
protected IStyle getLeftCellContentStyle(RowArea lastRow,CellArea currentCell){
  RowArea currentRow=(RowArea)currentCell.getParent();
  int columnID=currentCell.getColumnID();
  CellArea cell=null;
  if (isRTL) {
    cell=currentRow.getCell(columnID + 1);
    if (cell == null && lastRow != null) {
      cell=lastRow.getCell(columnID + 1);
    }
    if (cell == null) {
      return currentCell.getContent().getComputedStyle();
    }
  }
 else {
    cell=currentRow.getCell(columnID - 1);
    if (cell == null && lastRow != null) {
      cell=lastRow.getCell(columnID - 1);
    }
  }
  if (cell != null) {
    return cell.getContent().getComputedStyle();
  }
  return null;
}
Program: 68802
Project: 68802
Buggy source:
public TableLayout(ITableContent tableContent,TableLayoutInfo layoutInfo,int startCol,int endCol){
  this.tableContent=tableContent;
  this.layoutInfo=layoutInfo;
  this.startCol=startCol;
  this.endCol=endCol;
  if (tableContent != null) {
    bcr.setRTL(tableContent.isRTL());
  }
}

Fixed version (ground truth):
public TableLayout(ITableContent tableContent,TableLayoutInfo layoutInfo,int startCol,int endCol){
  this.tableContent=tableContent;
  this.layoutInfo=layoutInfo;
  this.startCol=startCol;
  this.endCol=endCol;
  if (tableContent != null) {
    isRTL=tableContent.isRTL();
  }
}
Program: 68803
Project: 68803
Buggy source:
public IConditionalExpression createConditionalExpression(Expression testExpression,String operator,Expression value1,Expression value2){
  String tempV1=null, tempV2=null;
  if (value1 != null) {
    tempV1=value1.getScriptText();
  }
  if (value2 != null) {
    tempV2=value2.getScriptText();
  }
  ConditionalExpression expression=new ConditionalExpression(testExpression.getScriptText(),DataAdapterUtil.adaptModelFilterOperator(operator),tempV1,tempV2);
  return ExpressionUtil.transformConditionalExpression(expression);
}

Fixed version (ground truth):
public IConditionalExpression createConditionalExpression(Expression testExpression,String operator,Expression value1,Expression value2){
  String tempV1=null, tempV2=null;
  if (value1 != null) {
    tempV1=value1.getScriptText();
  }
  if (value2 != null) {
    tempV2=value2.getScriptText();
  }
  if (testExpression instanceof Expression.Script && "String_Node_Str".equals(((Expression.Script)testExpression).getLanguage())) {
    ScriptExpression srciptExpr=null;
    try {
      srciptExpr=getModelAdapter().adaptJSExpression(testExpression.getScriptText(),((Expression.Script)testExpression).getLanguage());
    }
 catch (    Exception e) {
    }
    ConditionalExpression expression=new ConditionalExpression(srciptExpr.getText(),DataAdapterUtil.adaptModelFilterOperator(operator),tempV1,tempV2);
    return ExpressionUtil.transformConditionalExpression(expression);
  }
 else {
    ConditionalExpression expression=new ConditionalExpression(testExpression.getScriptText(),DataAdapterUtil.adaptModelFilterOperator(operator),tempV1,tempV2);
    return ExpressionUtil.transformConditionalExpression(expression);
  }
}
Program: 68804
Project: 68804
Buggy source:
public IConditionalExpression createConditionExpression(Expression testExpression,String operator,List<Expression> valueList){
  ArrayList<String> values=new ArrayList<String>(valueList.size());
  for (  Expression expr : valueList) {
    values.add(expr.getScriptText());
  }
  ConditionalExpression expression=new ConditionalExpression(testExpression.getScriptText(),DataAdapterUtil.adaptModelFilterOperator(operator),values);
  return ExpressionUtil.transformConditionalExpression(expression);
}

Fixed version (ground truth):
public IConditionalExpression createConditionExpression(Expression testExpression,String operator,List<Expression> valueList){
  ArrayList<String> values=new ArrayList<String>(valueList.size());
  for (  Expression expr : valueList) {
    values.add(expr.getScriptText());
  }
  if (testExpression instanceof Expression.Script && "String_Node_Str".equals(((Expression.Script)testExpression).getLanguage())) {
    ScriptExpression srciptExpr=null;
    try {
      srciptExpr=getModelAdapter().adaptJSExpression(testExpression.getScriptText(),((Expression.Script)testExpression).getLanguage());
    }
 catch (    Exception e) {
    }
    ConditionalExpression expression=new ConditionalExpression(srciptExpr.getText(),DataAdapterUtil.adaptModelFilterOperator(operator),values);
    return ExpressionUtil.transformConditionalExpression(expression);
  }
 else {
    ConditionalExpression expression=new ConditionalExpression(testExpression.getScriptText(),DataAdapterUtil.adaptModelFilterOperator(operator),values);
    return ExpressionUtil.transformConditionalExpression(expression);
  }
}
Program: 68805
Project: 68805
Buggy source:
public synchronized static void shutdown(){
  if (launcher != null) {
    launcher.shutdown();
    launcher=null;
  }
  platform=null;
}

Fixed version (ground truth):
public synchronized static void shutdown(){
  if (launcher != null) {
    launcher.shutdown();
    launcher=null;
    platform=null;
  }
}
Program: 68807
Project: 68807
Buggy source:
public static Integer convertFontSize(String size){
  Integer fsize=null;
  try {
    fsize=Math.round(Float.parseFloat(size) / 1000);
  }
 catch (  NumberFormatException e) {
    logger.log(Level.WARNING,e.getMessage(),e);
  }
  return fsize;
}

Fixed version (ground truth):
public static Integer convertFontSize(CSSValue fontSize){
  int size=PropertyUtil.getDimensionValue(fontSize);
  Integer fsize=null;
  try {
    fsize=Math.round(size / 1000);
  }
 catch (  NumberFormatException e) {
    logger.log(Level.WARNING,e.getMessage(),e);
  }
  return fsize;
}