nus-yam/ex-repair huggingface dataset:
Program: 69287
Project: 69287
Buggy source:
/** 
 * Sets default aggregation functions for model
 * @param cm model
 * @since 2.5.1
 */
public static void updateDefaultAggregations(Chart cm){
  for (  SeriesDefinition vsd : getAllOrthogonalSeriesDefinitions(cm)) {
    Series vs=vsd.getDesignTimeSeries();
    if (vs instanceof StockSeries) {
      EList<Query> queries=vs.getDataDefinition();
      while (queries.size() < 4) {
        queries.add(QueryImpl.create("String_Node_Str"));
      }
      setSeriesAggregation(queries.get(0),"String_Node_Str");
      setSeriesAggregation(queries.get(1),"String_Node_Str");
      setSeriesAggregation(queries.get(2),"String_Node_Str");
      setSeriesAggregation(queries.get(3),"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Sets default aggregation functions for model
 * @param cm model
 * @since 2.5.1
 */
public static void updateDefaultAggregations(Chart cm){
  for (  SeriesDefinition vsd : getAllOrthogonalSeriesDefinitions(cm)) {
    Series vs=vsd.getDesignTimeSeries();
    if (vs instanceof StockSeries) {
      EList<Query> queries=vs.getDataDefinition();
      while (queries.size() < 4) {
        queries.add(QueryImpl.create("String_Node_Str"));
      }
      setSeriesAggregation(queries.get(0),"String_Node_Str");
      setSeriesAggregation(queries.get(1),"String_Node_Str");
      setSeriesAggregation(queries.get(2),"String_Node_Str");
      setSeriesAggregation(queries.get(3),"String_Node_Str");
    }
    if (vs instanceof GanttSeries) {
      EList<Query> queries=vs.getDataDefinition();
      while (queries.size() < 3) {
        queries.add(QueryImpl.create("String_Node_Str"));
      }
      setSeriesAggregation(queries.get(0),"String_Node_Str");
      setSeriesAggregation(queries.get(1),"String_Node_Str");
    }
  }
}
Program: 69288
Project: 69288
Buggy source:
public void setProperty(String name,String value) throws OdaException {
  if (name == null)   throw new NullPointerException("String_Node_Str");
  if (name.equals("String_Node_Str")) {
    if (value != null && value.length() > 0) {
      try {
        double secs=Double.parseDouble(value);
        this.callStat.setQueryTimeout((int)secs);
      }
 catch (      SQLException e) {
        logger.log(Level.FINE,"String_Node_Str",e);
      }
    }
  }
 else   if (name.equals(ConnectionProfileProperty.PROFILE_NAME_PROP_KEY) || name.equals(ConnectionProfileProperty.PROFILE_STORE_FILE_PROP_KEY) || name.equals(ConnectionProfileProperty.PROFILE_STORE_FILE_PATH_PROP_KEY)) {
  }
 else {
    OdaException e=new OdaException("String_Node_Str" + name);
    logger.logp(java.util.logging.Level.FINE,CallStatement.class.getName(),"String_Node_Str","String_Node_Str",e);
    throw e;
  }
}

Fixed version (ground truth):
public void setProperty(String name,String value) throws OdaException {
  if (name == null)   throw new NullPointerException("String_Node_Str");
  if (name.equals("String_Node_Str")) {
    if (value != null && value.length() > 0) {
      try {
        double secs=Double.parseDouble(value);
        this.callStat.setQueryTimeout((int)secs);
      }
 catch (      SQLException e) {
        logger.log(Level.FINE,"String_Node_Str",e);
      }
    }
  }
 else   if (name.equals("String_Node_Str")) {
    if (value != null && value.length() > 0) {
      try {
        double fetchSize=Double.parseDouble(value);
        this.callStat.setFetchSize((int)fetchSize);
      }
 catch (      SQLException e) {
        logger.log(Level.FINE,"String_Node_Str",e);
      }
    }
  }
 else   if (name.equals(ConnectionProfileProperty.PROFILE_NAME_PROP_KEY) || name.equals(ConnectionProfileProperty.PROFILE_STORE_FILE_PROP_KEY) || name.equals(ConnectionProfileProperty.PROFILE_STORE_FILE_PATH_PROP_KEY)) {
  }
 else {
    OdaException e=new OdaException("String_Node_Str" + name);
    logger.logp(java.util.logging.Level.FINE,CallStatement.class.getName(),"String_Node_Str","String_Node_Str",e);
  }
}
Program: 69289
Project: 69289
Buggy source:
public void setProperty(String name,String value) throws OdaException {
  if (name == null)   throw new NullPointerException("String_Node_Str");
  if (name.equals("String_Node_Str")) {
    if (value != null && value.length() > 0) {
      try {
        double secs=Double.parseDouble(value);
        this.preStat.setQueryTimeout((int)secs);
      }
 catch (      SQLException e) {
        logger.log(Level.FINE,"String_Node_Str",e);
      }
    }
  }
 else   if (name.equals("String_Node_Str")) {
    if (value != null && value.length() > 0) {
      try {
        double rows=Double.parseDouble(value);
        this.preStat.setFetchSize((int)rows);
      }
 catch (      SQLException e) {
        logger.log(Level.FINE,"String_Node_Str",e);
      }
    }
  }
 else   if (name.equals(ConnectionProfileProperty.PROFILE_NAME_PROP_KEY) || name.equals(ConnectionProfileProperty.PROFILE_STORE_FILE_PROP_KEY) || name.equals(ConnectionProfileProperty.PROFILE_STORE_FILE_PATH_PROP_KEY)) {
  }
 else {
    OdaException e=new OdaException("String_Node_Str" + name);
    addLog("String_Node_Str",e);
    throw e;
  }
}

Fixed version (ground truth):
public void setProperty(String name,String value) throws OdaException {
  if (name == null)   throw new NullPointerException("String_Node_Str");
  if (name.equals("String_Node_Str")) {
    if (value != null && value.length() > 0) {
      try {
        double secs=Double.parseDouble(value);
        this.preStat.setQueryTimeout((int)secs);
      }
 catch (      SQLException e) {
        logger.log(Level.FINE,"String_Node_Str",e);
      }
    }
  }
 else   if (name.equals("String_Node_Str")) {
    if (value != null && value.length() > 0) {
      try {
        double rows=Double.parseDouble(value);
        this.preStat.setFetchSize((int)rows);
      }
 catch (      SQLException e) {
        logger.log(Level.FINE,"String_Node_Str",e);
      }
    }
  }
 else   if (name.equals(ConnectionProfileProperty.PROFILE_NAME_PROP_KEY) || name.equals(ConnectionProfileProperty.PROFILE_STORE_FILE_PROP_KEY) || name.equals(ConnectionProfileProperty.PROFILE_STORE_FILE_PATH_PROP_KEY)) {
  }
 else {
    OdaException e=new OdaException("String_Node_Str" + name);
    logger.logp(java.util.logging.Level.WARNING,Statement.class.getName(),"String_Node_Str","String_Node_Str",e);
  }
}
Program: 69291
Project: 69291
Buggy source:
/** 
 * Returns a delegate of filter handle provider, it wraps actual filter provider for chart consuming data set, cube set, including sharing query, grand total view cases.
 * @return
 */
private AbstractFilterHandleProvider getFilterProviderDelegate(){
  AbstractFilterHandleProvider provider=ChartFilterProviderDelegate.createFilterProvider(input,null);
  return new ChartFilterProviderDelegate(provider);
}

Fixed version (ground truth):
/** 
 * Returns a delegate of filter handle provider, it wraps actual filter provider for chart consuming data set, cube set, including sharing query, grand total view cases.
 * @return
 */
private AbstractFilterHandleProvider getFilterProviderDelegate(){
  AbstractFilterHandleProvider provider=ChartFilterProviderDelegate.createFilterProvider(input,null);
  return provider;
}
Program: 69292
Project: 69292
Buggy source:
public BlankData(SheetData data){
  super(data);
  this.data=data;
}

Fixed version (ground truth):
public BlankData(){
}
Program: 69293
Project: 69293
Buggy source:
private void writeText(int type,Object value,StyleEntry style){
  String txt=ExcelUtil.format(value,type);
  writer.openTag("String_Node_Str");
  if (type == SheetData.NUMBER) {
    if (ExcelUtil.isNaN(value) || ExcelUtil.isBigNumber(value) || ExcelUtil.isInfinity(value)) {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
 else {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
  }
 else   if (type == SheetData.DATE) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
 else {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  if (style != null) {
    if (CSSConstants.CSS_CAPITALIZE_VALUE.equalsIgnoreCase(style.getProperty(StyleConstant.TEXT_TRANSFORM))) {
      txt=capitalize(txt);
    }
 else     if (CSSConstants.CSS_UPPERCASE_VALUE.equalsIgnoreCase(style.getProperty(StyleConstant.TEXT_TRANSFORM))) {
      txt=txt.toUpperCase();
    }
 else     if (CSSConstants.CSS_LOWERCASE_VALUE.equalsIgnoreCase(style.getProperty(StyleConstant.TEXT_TRANSFORM))) {
      txt=txt.toLowerCase();
    }
  }
  writer.text(txt);
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
private void writeText(int type,Object value,StyleEntry style){
  String txt=ExcelUtil.format(value,type);
  writer.openTag("String_Node_Str");
  if (type == SheetData.NUMBER) {
    if (ExcelUtil.isNaN(value) || ExcelUtil.isBigNumber(value) || ExcelUtil.isInfinity(value)) {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
 else {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
  }
 else   if (type == SheetData.DATE) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
 else {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  if (style != null) {
    String textTransform=(String)style.getProperty(StyleConstant.TEXT_TRANSFORM);
    if (CSSConstants.CSS_CAPITALIZE_VALUE.equalsIgnoreCase(textTransform)) {
      txt=capitalize(txt);
    }
 else     if (CSSConstants.CSS_UPPERCASE_VALUE.equalsIgnoreCase(textTransform)) {
      txt=txt.toUpperCase();
    }
 else     if (CSSConstants.CSS_LOWERCASE_VALUE.equalsIgnoreCase(textTransform)) {
      txt=txt.toLowerCase();
    }
  }
  writer.text(txt);
  writer.closeTag("String_Node_Str");
}
Program: 69294
Project: 69294
Buggy source:
private void writeFont(String fontName,String size,String bold,String italic,String strikeThrough,String underline,String color){
  writer.openTag("String_Node_Str");
  if (isValid(fontName)) {
    writer.attribute("String_Node_Str",fontName);
  }
  if (isValid(size)) {
    writer.attribute("String_Node_Str",size);
  }
  if (isValid(bold)) {
    writer.attribute("String_Node_Str",bold);
  }
  if (isValid(italic)) {
    writer.attribute("String_Node_Str",italic);
  }
  if (isValid(strikeThrough)) {
    writer.attribute("String_Node_Str",strikeThrough);
  }
  if (isValid(underline) && !"String_Node_Str".equalsIgnoreCase(underline)) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  if (isValid(color)) {
    writer.attribute("String_Node_Str",color);
  }
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
private void writeFont(String fontName,Integer size,String bold,String italic,String strikeThrough,String underline,String color){
  writer.openTag("String_Node_Str");
  if (isValid(fontName)) {
    writer.attribute("String_Node_Str",fontName);
  }
  if (size != null) {
    writer.attribute("String_Node_Str",size);
  }
  if (isValid(bold)) {
    writer.attribute("String_Node_Str",bold);
  }
  if (isValid(italic)) {
    writer.attribute("String_Node_Str",italic);
  }
  if (isValid(strikeThrough)) {
    writer.attribute("String_Node_Str",strikeThrough);
  }
  if (isValid(underline) && !"String_Node_Str".equalsIgnoreCase(underline)) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  if (isValid(color)) {
    writer.attribute("String_Node_Str",color);
  }
  writer.closeTag("String_Node_Str");
}
Program: 69295
Project: 69295
Buggy source:
private void writeDataFormat(StyleEntry style){
  String typeString=style.getProperty(StyleConstant.DATA_TYPE_PROP);
  if (typeString == null)   return;
  int type=Integer.parseInt(typeString);
  if (type == SheetData.DATE && style.getProperty(StyleConstant.DATE_FORMAT_PROP) != null) {
    writer.openTag("String_Node_Str");
    writer.attribute("String_Node_Str",style.getProperty(StyleConstant.DATE_FORMAT_PROP));
    writer.closeTag("String_Node_Str");
  }
  if (type == Data.NUMBER && style.getProperty(StyleConstant.NUMBER_FORMAT_PROP) != null) {
    writer.openTag("String_Node_Str");
    String numberStyle=style.getProperty(StyleConstant.NUMBER_FORMAT_PROP);
    writer.attribute("String_Node_Str",numberStyle);
    writer.closeTag("String_Node_Str");
  }
}

Fixed version (ground truth):
private void writeDataFormat(StyleEntry style){
  String typeString=(String)style.getProperty(StyleConstant.DATA_TYPE_PROP);
  if (typeString == null)   return;
  int type=Integer.parseInt(typeString);
  if (type == SheetData.DATE && style.getProperty(StyleConstant.DATE_FORMAT_PROP) != null) {
    writer.openTag("String_Node_Str");
    writer.attribute("String_Node_Str",style.getProperty(StyleConstant.DATE_FORMAT_PROP));
    writer.closeTag("String_Node_Str");
  }
  if (type == Data.NUMBER && style.getProperty(StyleConstant.NUMBER_FORMAT_PROP) != null) {
    writer.openTag("String_Node_Str");
    String numberStyle=(String)style.getProperty(StyleConstant.NUMBER_FORMAT_PROP);
    writer.attribute("String_Node_Str",numberStyle);
    writer.closeTag("String_Node_Str");
  }
}
Program: 69298
Project: 69298
Buggy source:
public static StyleEntry createEmptyStyleEntry(){
  StyleEntry entry=new StyleEntry();
  for (int i=0; i < StyleEntry.COUNT; i++) {
    entry.setProperty(i,StyleEntry.NULL);
  }
  return entry;
}

Fixed version (ground truth):
public static StyleEntry createEmptyStyleEntry(){
  StyleEntry entry=new StyleEntry();
  return entry;
}
Program: 69299
Project: 69299
Buggy source:
public static String convertFontSize(String size){
  String fsize=StyleConstant.NULL;
  try {
    fsize=Float.toString(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(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;
}
Program: 69300
Project: 69300
Buggy source:
public void applyContainerBottomStyle(XlsContainer container){
  ContainerSizeInfo rule=container.getSizeInfo();
  StyleEntry entry=container.getStyle();
  int start=rule.getStartCoordinate();
  int col=engine.getAxis().getColumnIndexByCoordinate(start);
  int span=engine.getAxis().getColumnIndexByCoordinate(rule.getEndCoordinate());
  for (int i=col; i < span; i++) {
    SheetData data=engine.getColumnLastData(i);
    if (data == null) {
      continue;
    }
    StyleBuilder.applyBottomBorder(entry,data.style);
  }
}

Fixed version (ground truth):
public void applyContainerBottomStyle(XlsContainer container){
  ContainerSizeInfo rule=container.getSizeInfo();
  StyleEntry entry=container.getStyle();
  int start=rule.getStartCoordinate();
  int col=engine.getAxis().getColumnIndexByCoordinate(start);
  int span=engine.getAxis().getColumnIndexByCoordinate(rule.getEndCoordinate());
  for (int i=col; i < span; i++) {
    SheetData data=engine.getColumnLastData(i);
    if (data == null) {
      continue;
    }
    if (data.style != null) {
      StyleBuilder.applyBottomBorder(entry,data.style);
    }
  }
}
Program: 69301
Project: 69301
Buggy source:
public String getProperty(int id){
  return props[id];
}

Fixed version (ground truth):
public Object getProperty(int id){
  return props[id];
}
Program: 69302
Project: 69302
Buggy source:
public int hashCode(){
  int code=0;
  for (int i=0; i < StyleConstant.COUNT; i++) {
    String value=props[i] == null ? NULL : props[i];
    code+=value.hashCode() * 2 + 1;
    if (Integer.MAX_VALUE == code) {
      break;
    }
  }
  return code;
}

Fixed version (ground truth):
public int hashCode(){
  int code=0;
  for (int i=0; i < StyleConstant.COUNT; i++) {
    int hashCode=props[i] == null ? 0 : props[i].hashCode();
    code+=hashCode * 2 + 1;
    if (Integer.MAX_VALUE == code) {
      break;
    }
  }
  return code;
}
Program: 69303
Project: 69303
Buggy source:
public void setProperty(int id,String value){
  props[id]=value;
}

Fixed version (ground truth):
public void setProperty(int id,Object value){
  props[id]=value;
}
Program: 69304
Project: 69304
Buggy source:
public static boolean isNull(String value){
  return value == null ? true : StyleConstant.NULL.equalsIgnoreCase(value);
}

Fixed version (ground truth):
public static boolean isNull(Object value){
  if (value == null)   return true;
  if (value instanceof String)   return StyleConstant.NULL.equalsIgnoreCase((String)value);
  return false;
}
Program: 69305
Project: 69305
Buggy source:
public StyleEntry(){
  props=new String[StyleConstant.COUNT];
}

Fixed version (ground truth):
public StyleEntry(){
  props=new Object[StyleConstant.COUNT];
}
Program: 69306
Project: 69306
Buggy source:
private void updataRowIndex(SheetData data,XlsContainer container){
  int rowIndex=container.getRowIndex() + 1;
  data.setRowIndex(rowIndex);
  container.setRowIndex(rowIndex);
}

Fixed version (ground truth):
protected void updataRowIndex(SheetData data,XlsContainer container){
  int rowIndex=container.getRowIndex() + 1;
  data.setRowIndex(rowIndex);
  container.setRowIndex(rowIndex);
}
Program: 69307
Project: 69307
Buggy source:
private void addData(SheetData data){
  XlsContainer container=getCurrentContainer();
  container.setEmpty(false);
  int col=axis.getColumnIndexByCoordinate(data.getSizeInfo().getStartCoordinate());
  if (col == -1 || col >= cache.getColumnCount())   return;
  int span=axis.getColumnIndexByCoordinate(data.getSizeInfo().getEndCoordinate()) - col;
  applyTopBorderStyle(data);
  outputDataIfBufferIsFull();
  updataRowIndex(data,container);
  addDatatoCache(col,data);
  for (int i=col + 1; i < col + span; i++) {
    BlankData blankData=new BlankData(data);
    addDatatoCache(i,blankData);
  }
  if (container instanceof XlsCell) {
    XlsCell cell=(XlsCell)container;
    data.setRowSpanInDesign(cell.getRowSpan() - 1);
  }
  lastData=data;
}

Fixed version (ground truth):
protected void addData(SheetData data){
  XlsContainer container=getCurrentContainer();
  container.setEmpty(false);
  int col=axis.getColumnIndexByCoordinate(data.getSizeInfo().getStartCoordinate());
  if (col == -1 || col >= cache.getColumnCount())   return;
  int span=axis.getColumnIndexByCoordinate(data.getSizeInfo().getEndCoordinate()) - col;
  applyTopBorderStyle(data);
  outputDataIfBufferIsFull();
  updataRowIndex(data,container);
  addDatatoCache(col,data);
  for (int i=col + 1; i < col + span; i++) {
    BlankData blankData=new BlankData(data);
    addDatatoCache(i,blankData);
  }
  if (container instanceof XlsCell) {
    XlsCell cell=(XlsCell)container;
    data.setRowSpanInDesign(cell.getRowSpan() - 1);
  }
  lastData=data;
}
Program: 69308
Project: 69308
Buggy source:
public static void applyBottomBorder(StyleEntry cEntry,StyleEntry entry){
  overwriteProp(cEntry,entry,StyleConstant.BORDER_BOTTOM_COLOR_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_BOTTOM_STYLE_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_BOTTOM_WIDTH_PROP);
}

Fixed version (ground truth):
public static void applyBottomBorder(StyleEntry cEntry,StyleEntry entry){
  if (entry == null) {
    return;
  }
  overwriteProp(cEntry,entry,StyleConstant.BORDER_BOTTOM_COLOR_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_BOTTOM_STYLE_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_BOTTOM_WIDTH_PROP);
}
Program: 69309
Project: 69309
Buggy source:
public static void applyRightBorder(StyleEntry cEntry,StyleEntry entry){
  overwriteProp(cEntry,entry,StyleConstant.BORDER_RIGHT_COLOR_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_RIGHT_STYLE_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_RIGHT_WIDTH_PROP);
}

Fixed version (ground truth):
public static void applyRightBorder(StyleEntry cEntry,StyleEntry entry){
  if (entry == null) {
    return;
  }
  overwriteProp(cEntry,entry,StyleConstant.BORDER_RIGHT_COLOR_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_RIGHT_STYLE_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_RIGHT_WIDTH_PROP);
}
Program: 69310
Project: 69310
Buggy source:
public static void applyLeftBorder(StyleEntry cEntry,StyleEntry entry){
  overwriteProp(cEntry,entry,StyleConstant.BORDER_LEFT_COLOR_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_LEFT_STYLE_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_LEFT_WIDTH_PROP);
}

Fixed version (ground truth):
public static void applyLeftBorder(StyleEntry cEntry,StyleEntry entry){
  if (entry == null) {
    return;
  }
  overwriteProp(cEntry,entry,StyleConstant.BORDER_LEFT_COLOR_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_LEFT_STYLE_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_LEFT_WIDTH_PROP);
}
Program: 69311
Project: 69311
Buggy source:
public static void applyTopBorder(StyleEntry cEntry,StyleEntry entry){
  overwriteProp(cEntry,entry,StyleConstant.BORDER_TOP_COLOR_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_TOP_STYLE_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_TOP_WIDTH_PROP);
}

Fixed version (ground truth):
public static void applyTopBorder(StyleEntry cEntry,StyleEntry entry){
  if (entry == null) {
    return;
  }
  overwriteProp(cEntry,entry,StyleConstant.BORDER_TOP_COLOR_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_TOP_STYLE_PROP);
  overwriteProp(cEntry,entry,StyleConstant.BORDER_TOP_WIDTH_PROP);
}
Program: 69312
Project: 69312
Buggy source:
private SheetData createImageData(IImageContent image,StyleEntry entry,XlsContainer container){
  int type=SheetData.IMAGE;
  entry.setProperty(StyleConstant.DATA_TYPE_PROP,Integer.toString(type));
  String uri=image.getURI();
  String mimeType=image.getMIMEType();
  String extension=image.getExtension();
  String altText=image.getAltText();
  if (FlashFile.isFlash(mimeType,uri,extension)) {
    if (null == altText) {
      altText=messageFlashObjectNotSupported;
    }
    return createData(altText,entry);
  }
  try {
    Image imageInfo=EmitterUtil.parseImage(image,image.getImageSource(),image.getURI(),image.getMIMEType(),image.getExtension());
    byte[] data=imageInfo.getData();
    if (data != null) {
      return new ImageData(image,entry,type,imageInfo,container);
    }
 else {
      return createData(image.getAltText(),entry);
    }
  }
 catch (  IOException e) {
    logger.log(Level.WARNING,e.getLocalizedMessage());
    return createData(image.getAltText(),entry);
  }
}

Fixed version (ground truth):
private SheetData createImageData(IImageContent image,StyleEntry entry,XlsContainer container){
  int type=SheetData.IMAGE;
  entry.setProperty(StyleConstant.DATA_TYPE_PROP,Integer.toString(type));
  String uri=image.getURI();
  String mimeType=image.getMIMEType();
  String extension=image.getExtension();
  String altText=image.getAltText();
  if (FlashFile.isFlash(mimeType,uri,extension)) {
    if (null == altText) {
      altText=messageFlashObjectNotSupported;
    }
    return createData(altText,entry);
  }
  try {
    Image imageInfo=EmitterUtil.parseImage(image,image.getImageSource(),image.getURI(),image.getMIMEType(),image.getExtension());
    byte[] data=imageInfo.getData();
    if (data != null) {
      return createData(image,entry,container,type,imageInfo);
    }
 else {
      return createData(image.getAltText(),entry);
    }
  }
 catch (  IOException e) {
    logger.log(Level.WARNING,e.getLocalizedMessage());
    return createData(image.getAltText(),entry);
  }
}
Program: 69313
Project: 69313
Buggy source:
private String getJSMethodName(TriggerCondition tc,ShapedAction sa){
  return "String_Node_Str" + Math.abs(generateUniqueJSKey(sa.getActionForCondition(tc)).hashCode());
}

Fixed version (ground truth):
private String getJSMethodName(TriggerCondition tc,ShapedAction sa){
  int hashCode=generateUniqueJSKey(sa.getActionForCondition(tc)).hashCode();
  if (hashCode != Integer.MIN_VALUE) {
    return "String_Node_Str" + Math.abs(hashCode);
  }
 else {
    return "String_Node_Str" + Integer.MAX_VALUE;
  }
}
Program: 69314
Project: 69314
Buggy source:
public boolean equals(Object object){
  if (object == null)   return false;
  GradientPaint gp=(GradientPaint)object;
  return (gp.getColor1().equals(getColor1()) && gp.getColor2().equals(getColor2()) && (gp.isCyclic() == gp.isCyclic())&& gp.getPoint1().equals(getPoint1())&& gp.getPoint2().equals(getPoint2()));
}

Fixed version (ground truth):
public boolean equals(Object object){
  if (object == null)   return false;
  if (object instanceof GradientPaint) {
    GradientPaint gp=(GradientPaint)object;
    return (gp.getColor1().equals(getColor1()) && gp.getColor2().equals(getColor2()) && (gp.isCyclic() == gp.isCyclic())&& gp.getPoint1().equals(getPoint1())&& gp.getPoint2().equals(getPoint2()));
  }
 else {
    return false;
  }
}
Program: 69317
Project: 69317
Buggy source:
private boolean testWithinLine(Point pStart,Point pEnd,Point p){
  boolean c=(p.x >= pStart.x && p.x <= pEnd.x || p.x <= pStart.x && p.x >= pEnd.x) && (p.y >= pStart.y && p.y <= pEnd.y || p.y <= pStart.y && p.y >= pEnd.y);
  if (c) {
    if (pEnd.x == pStart.x && pEnd.x == p.x) {
      return true;
    }
 else     if ((pEnd.x - pStart.x) * (pEnd.x - p.x) == 0) {
      return false;
    }
    c=(pEnd.y - pStart.y) / (pEnd.x - pStart.x) == (pEnd.y - p.y) / (pEnd.x - p.x);
  }
  return c;
}

Fixed version (ground truth):
private boolean testWithinLine(Point pStart,Point pEnd,Point p){
  boolean c=(p.x >= pStart.x && p.x <= pEnd.x || p.x <= pStart.x && p.x >= pEnd.x) && (p.y >= pStart.y && p.y <= pEnd.y || p.y <= pStart.y && p.y >= pEnd.y);
  if (c) {
    if (pEnd.x == pStart.x && pEnd.x == p.x) {
      return true;
    }
 else     if ((pEnd.x - pStart.x) * (pEnd.x - p.x) == 0) {
      return false;
    }
    c=ChartUtil.mathEqual((pEnd.y - pStart.y) / (pEnd.x - pStart.x),(pEnd.y - p.y) / (pEnd.x - p.x));
  }
  return c;
}
Program: 69318
Project: 69318
Buggy source:
private boolean ccw(Point a,Point b,Point c){
  double dx1=b.x - a.x;
  double dx2=c.x - b.x;
  double dy1=b.y - a.y;
  double dy2=c.y - b.y;
  double gradient1=dy2 * dx1;
  double gradient2=dy1 * dx2;
  if (gradient1 == gradient2) {
    return (dx1 * dx2 >= 0 && dy1 * dy2 >= 0);
  }
 else {
    return (gradient1 > gradient2);
  }
}

Fixed version (ground truth):
private boolean ccw(Point a,Point b,Point c){
  double dx1=b.x - a.x;
  double dx2=c.x - b.x;
  double dy1=b.y - a.y;
  double dy2=c.y - b.y;
  double gradient1=dy2 * dx1;
  double gradient2=dy1 * dx2;
  if (ChartUtil.mathEqual(gradient1,gradient2)) {
    return (dx1 * dx2 >= 0 && dy1 * dy2 >= 0);
  }
 else {
    return (gradient1 > gradient2);
  }
}
Program: 69333
Project: 69333
Buggy source:
/** 
 * Gets cascading parameter values.
 * @param values
 * @param task
 * @return cascading parameter values. each item is<code>IParameterSelectionChoice</code>
 */
private List getCascadingValues(List values,IGetParameterDefinitionTask task){
  CascadingParameterGroupHandle container=(CascadingParameterGroupHandle)handle.getContainer();
  List groupList=new ArrayList();
  List children=group.getChildren();
  Iterator iterator=children.iterator();
  while (iterator.hasNext()) {
    IParameter param=(IParameter)iterator.next();
    if (param == this)     break;
    String value=param.getSelectionValue();
    groupList.add(value);
  }
  Object[] groupKeys=new Object[groupList.size()];
  for (int i=0; i < groupList.size(); i++) {
    groupKeys[i]=groupList.get(i);
  }
  List cascading=(List)task.getSelectionListForCascadingGroup(container.getName(),groupKeys);
  return cascading;
}

Fixed version (ground truth):
/** 
 * Gets cascading parameter values.
 * @param values
 * @param task
 * @return cascading parameter values. each item is<code>IParameterSelectionChoice</code>
 */
private List getCascadingValues(List values,IGetParameterDefinitionTask task){
  CascadingParameterGroupHandle container=(CascadingParameterGroupHandle)handle.getContainer();
  List groupList=new ArrayList();
  List children=group.getChildren();
  Iterator iterator=children.iterator();
  while (iterator.hasNext()) {
    IParameter param=(IParameter)iterator.next();
    if (param == this)     break;
    String value=param.getSelectionValue();
    try {
      groupList.add(param.converToDataType(value));
    }
 catch (    BirtException e) {
    }
  }
  Object[] groupKeys=new Object[groupList.size()];
  for (int i=0; i < groupList.size(); i++) {
    groupKeys[i]=groupList.get(i);
  }
  List cascading=(List)task.getSelectionListForCascadingGroup(container.getName(),groupKeys);
  return cascading;
}
Program: 69334
Project: 69334
Buggy source:
/** 
 * Gets cascading parameter values.
 * @param values
 * @param task
 * @return cascading parameter values. each item is<code>IParameterSelectionChoice</code>
 */
private List getCascadingValues(List values,IGetParameterDefinitionTask task){
  CascadingParameterGroupHandle container=(CascadingParameterGroupHandle)handle.getContainer();
  List groupList=new ArrayList();
  List children=group.getChildren();
  Iterator iterator=children.iterator();
  while (iterator.hasNext()) {
    IParameter param=(IParameter)iterator.next();
    if (param == this)     break;
    String value=param.getSelectionValue();
    groupList.add(value);
  }
  Object[] groupKeys=new Object[groupList.size()];
  for (int i=0; i < groupList.size(); i++) {
    groupKeys[i]=groupList.get(i);
  }
  List cascading=(List)task.getSelectionListForCascadingGroup(container.getName(),groupKeys);
  return cascading;
}

Fixed version (ground truth):
/** 
 * Gets cascading parameter values.
 * @param values
 * @param task
 * @return cascading parameter values. each item is<code>IParameterSelectionChoice</code>
 */
private List getCascadingValues(List values,IGetParameterDefinitionTask task){
  CascadingParameterGroupHandle container=(CascadingParameterGroupHandle)handle.getContainer();
  List groupList=new ArrayList();
  List children=group.getChildren();
  Iterator iterator=children.iterator();
  while (iterator.hasNext()) {
    IParameter param=(IParameter)iterator.next();
    if (param == this)     break;
    String value=param.getSelectionValue();
    try {
      groupList.add(param.converToDataType(value));
    }
 catch (    BirtException e) {
    }
  }
  Object[] groupKeys=new Object[groupList.size()];
  for (int i=0; i < groupList.size(); i++) {
    groupKeys[i]=groupList.get(i);
  }
  List cascading=(List)task.getSelectionListForCascadingGroup(container.getName(),groupKeys);
  return cascading;
}
Program: 69336
Project: 69336
Buggy source:
public String getSplitText(){
  ITextContent textContent=(ITextContent)blockContainer.content;
  String splitText=textContent.getText().substring(textStartPos,textStartPos + textLength);
  return splitText;
}

Fixed version (ground truth):
public String getSplitText(){
  ITextContent textContent=(ITextContent)blockContainer.content;
  if (textStartPos == -1 || textLength == 0) {
    return "String_Node_Str";
  }
 else {
    String splitText=textContent.getText().substring(textStartPos,textStartPos + textLength);
    return splitText;
  }
}
Program: 69337
Project: 69337
Buggy source:
public String getSplitText(){
  ITextContent textContent=(ITextContent)inlineContainer.content;
  String splitText=textContent.getText().substring(textStartPos,textStartPos + textLength);
  return splitText;
}

Fixed version (ground truth):
public String getSplitText(){
  ITextContent textContent=(ITextContent)inlineContainer.content;
  if (textStartPos == -1 || textLength == 0) {
    return "String_Node_Str";
  }
 else {
    String splitText=textContent.getText().substring(textStartPos,textStartPos + textLength);
    return splitText;
  }
}
Program: 69339
Project: 69339
Buggy source:
public NumberFormatter getNumberFormatter(String pattern,String locale){
  String key=pattern + "String_Node_Str" + locale;
  NumberFormatter fmt=numberFormatters.get(key);
  if (fmt == null) {
    fmt=new NumberFormatter(pattern,ulocale == null ? ulocale : new ULocale(locale));
    numberFormatters.put(key,fmt);
  }
  return fmt;
}

Fixed version (ground truth):
public NumberFormatter getNumberFormatter(String pattern,String locale){
  String key=pattern + "String_Node_Str" + locale;
  NumberFormatter fmt=numberFormatters.get(key);
  if (fmt == null) {
    fmt=new NumberFormatter(pattern,locale == null ? ulocale : new ULocale(locale));
    numberFormatters.put(key,fmt);
  }
  return fmt;
}
Program: 69340
Project: 69340
Buggy source:
/** 
 * Gets the SWT image instance for given Image model
 * @return SWT image instance
 */
public Image getImage(){
  String imageSource=getImageHandle().getSource();
  if (DesignChoiceConstants.IMAGE_REF_TYPE_EMBED.equalsIgnoreCase(imageSource)) {
    return ImageManager.getInstance().getEmbeddedImage(getImageHandle().getModuleHandle(),getImageHandle().getImageName());
  }
 else   if (DesignChoiceConstants.IMAGE_REF_TYPE_FILE.equalsIgnoreCase(imageSource)) {
    if (URIUtil.isValidResourcePath(getImageHandle().getURI())) {
      return ImageManager.getInstance().getImage(getHandle().getModuleHandle(),URIUtil.getLocalPath(removeQuoteString(getImageHandle().getURI())));
    }
 else {
      return ImageManager.getInstance().getImage(getHandle().getModuleHandle(),removeQuoteString(getImageHandle().getURI()));
    }
  }
 else   if (DesignChoiceConstants.IMAGE_REF_TYPE_URL.equalsIgnoreCase(imageSource)) {
    return ImageManager.getInstance().getURIImage(getHandle().getModuleHandle(),removeQuoteString(getImageHandle().getURI()));
  }
 else   if (DesignChoiceConstants.IMAGE_REF_TYPE_EXPR.equalsIgnoreCase(imageSource)) {
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Gets the SWT image instance for given Image model
 * @return SWT image instance
 */
public Image getImage(){
  ImageHandle imageHandel=getImageHandle();
  String imageSource=imageHandel.getSource();
  PropertyHandle uriPropertyHandle=imageHandel.getPropertyHandle(IImageItemModel.URI_PROP);
  ExpressionHandle expression=imageHandel.getExpressionProperty(IImageItemModel.URI_PROP);
  String url=imageHandel.getURI();
  if (uriPropertyHandle != null && uriPropertyHandle.isLocal()) {
    if (expression != null && !ExpressionType.CONSTANT.equals(expression.getType())) {
      url=removeQuoteString(url);
    }
  }
  if (DesignChoiceConstants.IMAGE_REF_TYPE_EMBED.equalsIgnoreCase(imageSource)) {
    return ImageManager.getInstance().getEmbeddedImage(imageHandel.getModuleHandle(),imageHandel.getImageName());
  }
 else   if (DesignChoiceConstants.IMAGE_REF_TYPE_FILE.equalsIgnoreCase(imageSource)) {
    if (URIUtil.isValidResourcePath(url)) {
      return ImageManager.getInstance().getImage(imageHandel.getModuleHandle(),URIUtil.getLocalPath(url));
    }
 else {
      return ImageManager.getInstance().getImage(imageHandel.getModuleHandle(),url);
    }
  }
 else   if (DesignChoiceConstants.IMAGE_REF_TYPE_URL.equalsIgnoreCase(imageSource)) {
    return ImageManager.getInstance().getURIImage(imageHandel.getModuleHandle(),url);
  }
 else   if (DesignChoiceConstants.IMAGE_REF_TYPE_EXPR.equalsIgnoreCase(imageSource)) {
  }
  return null;
}
Program: 69341
Project: 69341
Buggy source:
private void initURIEditor(){
  if (getURI() != null && selectedType == URI_TYPE) {
    setURIEditor();
  }
  if (getURI() != null && selectedType == FILE_TYPE) {
    setURIEditor();
  }
  ;
  if (selectedType == BLOB_TYPE) {
    if (inputImage.getValueExpression() != null) {
      uriEditor.setText(inputImage.getValueExpression());
    }
  }
  uriEditor.setFocus();
  clearPreview();
  if (!uriEditor.getText().equals("String_Node_Str") && selectedType != BLOB_TYPE) {
    preview(DEUtil.removeQuote(uriEditor.getText()));
  }
}

Fixed version (ground truth):
private void initURIEditor(){
  if (getURI() != null && selectedType == URI_TYPE) {
    setURIEditor();
  }
  if (getURI() != null && selectedType == FILE_TYPE) {
    setURIEditor();
  }
  ;
  if (selectedType == BLOB_TYPE) {
    if (inputImage.getValueExpression() != null) {
      uriEditor.setText(inputImage.getValueExpression());
    }
  }
  uriEditor.setFocus();
  clearPreview();
  if (!uriEditor.getText().equals("String_Node_Str") && selectedType != BLOB_TYPE) {
    previewTextEditor();
  }
}
Program: 69342
Project: 69342
Buggy source:
public void focusLost(FocusEvent e){
  preview(DEUtil.removeQuote(uriEditor.getText().trim()));
}

Fixed version (ground truth):
public void focusLost(FocusEvent e){
  previewTextEditor();
}
Program: 69343
Project: 69343
Buggy source:
private void buildURIEditor(int type){
  Label uriEditorLabel=new Label(inputArea,SWT.NONE);
  GridData labelGd=new GridData(GridData.FILL_HORIZONTAL);
  labelGd.horizontalSpan=3;
  uriEditorLabel.setLayoutData(labelGd);
  uriEditorLabel.setText(uriEditorLabelMap.get(Integer.valueOf(type)));
  uriEditor=new Text(inputArea,SWT.SINGLE | SWT.BORDER);
  GridData textGd=new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
  uriEditor.setLayoutData(textGd);
  uriEditor.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      updateButtons();
    }
  }
);
  uriEditor.addFocusListener(new FocusListener(){
    public void focusGained(    FocusEvent e){
    }
    public void focusLost(    FocusEvent e){
      preview(DEUtil.removeQuote(uriEditor.getText().trim()));
    }
  }
);
}

Fixed version (ground truth):
private void buildURIEditor(int type){
  Label uriEditorLabel=new Label(inputArea,SWT.NONE);
  GridData labelGd=new GridData(GridData.FILL_HORIZONTAL);
  labelGd.horizontalSpan=3;
  uriEditorLabel.setLayoutData(labelGd);
  uriEditorLabel.setText(uriEditorLabelMap.get(Integer.valueOf(type)));
  uriEditor=new Text(inputArea,SWT.SINGLE | SWT.BORDER);
  GridData textGd=new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
  uriEditor.setLayoutData(textGd);
  uriEditor.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      updateButtons();
    }
  }
);
  uriEditor.addFocusListener(new FocusListener(){
    public void focusGained(    FocusEvent e){
    }
    public void focusLost(    FocusEvent e){
      previewTextEditor();
    }
  }
);
}
Program: 69345
Project: 69345
Buggy source:
protected void setUp() throws Exception {
  super.setUp();
  cells[0]=new CellArea(10,10,40,40);
  cells[1]=new CellArea(50,10,40,40);
  cells[2]=new CellArea(90,10,40,40);
  cells[2].defineBorder(BorderInfo.RIGHT_BORDER,6);
  cells[2].defineBorder(BorderInfo.RIGHT_BORDER,Color.orange);
  cells[3]=new CellArea(10,50,40,80);
  cells[3].defineBorder(BorderInfo.BOTTOM_BORDER,6);
  cells[3].defineBorder(BorderInfo.BOTTOM_BORDER,Color.blue);
  cells[4]=new CellArea(50,50,40,40);
  cells[5]=new CellArea(90,50,40,40);
  cells[5].defineBorder(BorderInfo.RIGHT_BORDER,6);
  cells[5].defineBorder(BorderInfo.RIGHT_BORDER,Color.orange);
  cells[6]=null;
  cells[7]=new CellArea(50,90,40,40);
  cells[7].defineBorder(BorderInfo.BOTTOM_BORDER,4);
  cells[7].defineBorder(BorderInfo.BOTTOM_BORDER,Color.blue);
  cells[8]=new CellArea(90,90,40,40);
  cells[8].defineBorder(BorderInfo.BOTTOM_BORDER,2);
  cells[8].defineBorder(BorderInfo.BOTTOM_BORDER,Color.blue);
  cells[8].defineBorder(BorderInfo.RIGHT_BORDER,6);
  cells[8].defineBorder(BorderInfo.RIGHT_BORDER,Color.orange);
  BufferedOutputStream bufferedOutputStream=new BufferedOutputStream(new FileOutputStream("String_Node_Str"));
  writer=new PostscriptWriter(bufferedOutputStream,"String_Node_Str");
  writer.startRenderer();
  writer.startPage(pageWidth,pageHeight);
  testBorderDraw();
  writer.endPage();
  writer.stopRenderer();
}

Fixed version (ground truth):
protected void setUp() throws Exception {
  super.setUp();
  cells[0]=new CellArea(10,10,40,40);
  cells[1]=new CellArea(50,10,40,40);
  cells[2]=new CellArea(90,10,40,40);
  cells[2].defineBorder(BorderInfo.RIGHT_BORDER,6);
  cells[2].defineBorder(BorderInfo.RIGHT_BORDER,Color.orange);
  cells[3]=new CellArea(10,50,40,80);
  cells[3].defineBorder(BorderInfo.BOTTOM_BORDER,6);
  cells[3].defineBorder(BorderInfo.BOTTOM_BORDER,Color.blue);
  cells[4]=new CellArea(50,50,40,40);
  cells[5]=new CellArea(90,50,40,40);
  cells[5].defineBorder(BorderInfo.RIGHT_BORDER,6);
  cells[5].defineBorder(BorderInfo.RIGHT_BORDER,Color.orange);
  cells[6]=null;
  cells[7]=new CellArea(50,90,40,40);
  cells[7].defineBorder(BorderInfo.BOTTOM_BORDER,4);
  cells[7].defineBorder(BorderInfo.BOTTOM_BORDER,Color.blue);
  cells[8]=new CellArea(90,90,40,40);
  cells[8].defineBorder(BorderInfo.BOTTOM_BORDER,2);
  cells[8].defineBorder(BorderInfo.BOTTOM_BORDER,Color.blue);
  cells[8].defineBorder(BorderInfo.RIGHT_BORDER,6);
  cells[8].defineBorder(BorderInfo.RIGHT_BORDER,Color.orange);
  BufferedOutputStream bufferedOutputStream=new BufferedOutputStream(new FileOutputStream("String_Node_Str"));
  writer=new PostscriptWriter(bufferedOutputStream,"String_Node_Str");
  writer.startRenderer(null,null,null,1,false);
  writer.startPage(pageWidth,pageHeight);
  testBorderDraw();
  writer.endPage();
  writer.stopRenderer();
}
Program: 69347
Project: 69347
Buggy source:
/** 
 * Initializes the pdfEmitter.
 * @param services the emitter svervices object.
 * @throws EngineException 
 */
private void initialize(IEmitterServices services) throws EngineException {
  this.services=services;
  IReportRunnable reportRunnable=services.getReportRunnable();
  if (reportRunnable != null) {
    reportDesign=(ReportDesignHandle)reportRunnable.getDesignHandle();
  }
  this.context=services.getReportContext();
  this.output=EmitterUtil.getOuputStream(services,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Initializes the pdfEmitter.
 * @param services the emitter svervices object.
 * @throws EngineException 
 */
private void initialize(IEmitterServices services) throws EngineException {
  this.services=services;
  renderOption=(RenderOption)services.getRenderOption();
  IReportRunnable reportRunnable=services.getReportRunnable();
  if (reportRunnable != null) {
    reportDesign=(ReportDesignHandle)reportRunnable.getDesignHandle();
  }
  this.context=services.getReportContext();
  this.output=EmitterUtil.getOuputStream(services,"String_Node_Str");
}
Program: 69348
Project: 69348
Buggy source:
public IPageDevice createPageDevice(String title,String author,String subject,String description,IReportContext context,IReportContent report){
  try {
    return new PostscriptPageDevice(output,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){
  try {
    return new PostscriptPageDevice(renderOption,output,title,author,description);
  }
 catch (  Exception e) {
    logger.log(Level.SEVERE,e.getMessage());
  }
  return null;
}
Program: 69349
Project: 69349
Buggy source:
/** 
 * Gets postscript level.
 */
public int getPostscriptLevel(){
  Object value=options.get(PS_LEVEL);
  if (value instanceof Integer) {
    return ((Integer)value).intValue();
  }
  return 1;
}

Fixed version (ground truth):
/** 
 * Gets postscript level.
 */
public int getPostscriptLevel(){
  return getIntOption(PS_LEVEL,1);
}
Program: 69350
Project: 69350
Buggy source:
public void startRenderer(String author,String description) throws IOException {
  out.println("String_Node_Str" + author);
  FileUtil.load("String_Node_Str",out);
}

Fixed version (ground truth):
public void startRenderer(String author,String description,String paperSize,String paperTray,String duplex,int copies,boolean collate) throws IOException {
  if (author != null) {
    out.println("String_Node_Str" + author);
  }
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  setCollate(collate);
  setCopies(copies);
  setPaperSize(paperSize);
  setPaperTray(paperTray);
  setDuplex(duplex);
  FileUtil.load("String_Node_Str",out);
}
Program: 69351
Project: 69351
Buggy source:
public PostscriptPageDevice(OutputStream output,String title,String author,String description) throws Exception {
  BufferedOutputStream bufferedOutputStream=new BufferedOutputStream(output);
  writer=new PostscriptWriter(bufferedOutputStream,title);
  writer.startRenderer(author,description);
}

Fixed version (ground truth):
public PostscriptPageDevice(RenderOption renderOption,OutputStream output,String title,String author,String description) throws Exception {
  BufferedOutputStream bufferedOutputStream=new BufferedOutputStream(output);
  writer=new PostscriptWriter(bufferedOutputStream,title);
  String paperSize=renderOption.getStringOption(PostscriptRenderOption.OPTION_PAPER_SIZE);
  String paperTray=renderOption.getStringOption(PostscriptRenderOption.OPTION_PAPER_TRAY);
  String duplex=renderOption.getStringOption(PostscriptRenderOption.OPTION_DUPLEX);
  int copies=renderOption.getIntOption(PostscriptRenderOption.OPTION_COPIES,1);
  boolean collate=renderOption.getBooleanOption(PostscriptRenderOption.OPTION_COLLATE,false);
  writer.startRenderer(author,description,paperSize,paperTray,duplex,copies,collate);
}
Program: 69352
Project: 69352
Buggy source:
public boolean isEditable(){
  if (((ReportItemHandle)DEUtil.getInputFirstElement(input)).getCube() != null) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isEditable(){
  if (((ReportItemHandle)DEUtil.getInputFirstElement(getInput())).getCube() != null) {
    return true;
  }
  return false;
}
Program: 69354
Project: 69354
Buggy source:
public boolean isEditable(){
  if (input == null) {
    return false;
  }
  boolean editable=super.isEditable();
  if (ChartReportItemUtil.isChildOfMultiViewsHandle(((ReportItemHandle)DEUtil.getInputFirstElement(input)))) {
    return false;
  }
  return editable;
}

Fixed version (ground truth):
public boolean isEditable(){
  if (getInput() == null) {
    return false;
  }
  boolean editable=super.isEditable();
  if (ChartReportItemUtil.isChildOfMultiViewsHandle(((ReportItemHandle)DEUtil.getInputFirstElement(input)))) {
    return false;
  }
  return editable;
}
Program: 69355
Project: 69355
Buggy source:
private Object evaluate(ICompiledScript compiledScript) throws BirtException {
  return scriptContext.evaluate(compiledScript);
}

Fixed version (ground truth):
private Object evaluate(ICompiledScript compiledScript) throws BirtException {
  return getScriptContext().evaluate(compiledScript);
}
Program: 69358
Project: 69358
Buggy source:
private void createNameText(Composite content){
  final Label nameLabel=new Label(content,SWT.CHECK);
  nameLabel.setText(Messages.getString("String_Node_Str"));
  GridData labelData=new GridData();
  labelData.horizontalSpan=1;
  labelData.verticalIndent=15;
  nameLabel.setLayoutData(labelData);
  nameText=new Text(content,SWT.BORDER);
  GridData textGd=new GridData(GridData.FILL_HORIZONTAL);
  textGd.verticalIndent=15;
  textGd.horizontalIndent=10;
  nameText.setLayoutData(textGd);
  nameText.setText(this.fileName == null ? "String_Node_Str" : this.fileName);
  nameText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      fileName=nameText.getText().trim();
      validate();
    }
  }
);
}

Fixed version (ground truth):
private void createNameText(Composite content){
  final Label nameLabel=new Label(content,SWT.CHECK);
  nameLabel.setText(Messages.getString("String_Node_Str"));
  GridData labelData=new GridData();
  labelData.horizontalSpan=1;
  labelData.verticalIndent=5;
  nameLabel.setLayoutData(labelData);
  nameText=new Text(content,SWT.BORDER);
  GridData textGd=new GridData(GridData.FILL_HORIZONTAL);
  textGd.verticalIndent=5;
  textGd.horizontalIndent=10;
  nameText.setLayoutData(textGd);
  nameText.setText(this.fileName == null ? "String_Node_Str" : this.fileName);
  nameText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      fileName=nameText.getText().trim();
      validate();
    }
  }
);
}