nus-yam/ex-repair huggingface dataset:
Program: 70188
Project: 70188
Buggy source:
public Object calculate(Object value) throws BirtException {
  if (value == null) {
    return new Double(-1);
  }
  Date target=getDate(value);
  if (intervalStart == null) {
    return new Double(Math.floor(DateTimeUtil.diffDay(defaultStart,target) / getDateIntervalRange()));
  }
 else {
    if (DateTimeUtil.diffDay((Date)intervalStart,target) < 0) {
      return new Double(-1);
    }
 else {
      return new Double(Math.floor(DateTimeUtil.diffDay((Date)intervalStart,target) / getDateIntervalRange()));
    }
  }
}

Fixed version (ground truth):
public Object calculate(Object value) throws BirtException {
  if (value == null) {
    return new Double(-1);
  }
  Date target=getDate(value);
  if (intervalStart == null) {
    return new Double(Math.floor(this.dateTimeUtil.diffDay(defaultStart,target) / getDateIntervalRange()));
  }
 else {
    if (this.dateTimeUtil.diffDay((Date)intervalStart,target) < 0) {
      return new Double(-1);
    }
 else {
      return new Double(Math.floor(this.dateTimeUtil.diffDay((Date)intervalStart,target) / getDateIntervalRange()));
    }
  }
}
Program: 70189
Project: 70189
Buggy source:
/** 
 * @param interval
 * @param intervalStart
 * @param intervalRange
 * @return
 * @throws DataException
 */
public static ICalculator getGroupCalculator(int interval,Object intervalStart,double intervalRange,int dataType) throws DataException {
  validateInterval(interval,dataType);
  validateIntervalRange(intervalRange);
  try {
switch (interval) {
case IGroupDefinition.YEAR_INTERVAL:
      return new YearGroupCalculator(intervalStart,intervalRange);
case IGroupDefinition.MONTH_INTERVAL:
    return new MonthGroupCalculator(intervalStart,intervalRange);
case IGroupDefinition.QUARTER_INTERVAL:
  return new QuarterGroupCalculator(intervalStart,intervalRange);
case IGroupDefinition.WEEK_INTERVAL:
return new WeekGroupCalculator(intervalStart,intervalRange);
case IGroupDefinition.DAY_INTERVAL:
return new DayGroupCalculator(intervalStart,intervalRange);
case IGroupDefinition.HOUR_INTERVAL:
return new HourGroupCalculator(intervalStart,intervalRange);
case IGroupDefinition.MINUTE_INTERVAL:
return new MinuteGroupCalculator(intervalStart,intervalRange);
case IGroupDefinition.SECOND_INTERVAL:
return new SecondGroupCalculator(intervalStart,intervalRange);
case IGroupDefinition.NUMERIC_INTERVAL:
return new NumericGroupCalculator(intervalStart,intervalRange);
case IGroupDefinition.STRING_PREFIX_INTERVAL:
return new StringGroupCalculator(intervalStart,intervalRange);
default :
throw new DataException(ResourceConstants.BAD_GROUP_INTERVAL_INVALID);
}
}
 catch (BirtException be) {
throw DataException.wrap(be);
}
}

Fixed version (ground truth):
/** 
 * @param interval
 * @param intervalStart
 * @param intervalRange
 * @return
 * @throws DataException
 */
public static ICalculator getGroupCalculator(int interval,Object intervalStart,double intervalRange,int dataType,ULocale locale) throws DataException {
  validateInterval(interval,dataType);
  validateIntervalRange(intervalRange);
  try {
switch (interval) {
case IGroupDefinition.YEAR_INTERVAL:
      return new YearGroupCalculator(intervalStart,intervalRange,locale);
case IGroupDefinition.MONTH_INTERVAL:
    return new MonthGroupCalculator(intervalStart,intervalRange,locale);
case IGroupDefinition.QUARTER_INTERVAL:
  return new QuarterGroupCalculator(intervalStart,intervalRange,locale);
case IGroupDefinition.WEEK_INTERVAL:
return new WeekGroupCalculator(intervalStart,intervalRange,locale);
case IGroupDefinition.DAY_INTERVAL:
return new DayGroupCalculator(intervalStart,intervalRange,locale);
case IGroupDefinition.HOUR_INTERVAL:
return new HourGroupCalculator(intervalStart,intervalRange,locale);
case IGroupDefinition.MINUTE_INTERVAL:
return new MinuteGroupCalculator(intervalStart,intervalRange,locale);
case IGroupDefinition.SECOND_INTERVAL:
return new SecondGroupCalculator(intervalStart,intervalRange,locale);
case IGroupDefinition.NUMERIC_INTERVAL:
return new NumericGroupCalculator(intervalStart,intervalRange);
case IGroupDefinition.STRING_PREFIX_INTERVAL:
return new StringGroupCalculator(intervalStart,intervalRange);
default :
throw new DataException(ResourceConstants.BAD_GROUP_INTERVAL_INVALID);
}
}
 catch (BirtException be) {
throw DataException.wrap(be);
}
}
Program: 70190
Project: 70190
Buggy source:
/** 
 * @param intervalStart
 * @param intervalRange
 * @throws BirtException
 */
public HourGroupCalculator(Object intervalStart,double intervalRange) throws BirtException {
  super(intervalStart,intervalRange);
}

Fixed version (ground truth):
/** 
 * @param intervalStart
 * @param intervalRange
 * @throws BirtException
 */
public HourGroupCalculator(Object intervalStart,double intervalRange,ULocale locale) throws BirtException {
  super(intervalStart,intervalRange,locale);
}
Program: 70191
Project: 70191
Buggy source:
public Object calculate(Object value) throws BirtException {
  if (value == null) {
    return new Double(-1);
  }
  Date target=getDate(value);
  if (intervalStart == null) {
    return new Double(Math.floor(DateTimeUtil.diffHour(defaultStart,target) / getDateIntervalRange()));
  }
 else {
    if (DateTimeUtil.diffHour((Date)intervalStart,target) < 0) {
      return new Double(-1);
    }
 else {
      return new Double(Math.floor(DateTimeUtil.diffHour((Date)intervalStart,target) / getDateIntervalRange()));
    }
  }
}

Fixed version (ground truth):
public Object calculate(Object value) throws BirtException {
  if (value == null) {
    return new Double(-1);
  }
  Date target=getDate(value);
  if (intervalStart == null) {
    return new Double(Math.floor(this.dateTimeUtil.diffHour(defaultStart,target) / getDateIntervalRange()));
  }
 else {
    if (this.dateTimeUtil.diffHour((Date)intervalStart,target) < 0) {
      return new Double(-1);
    }
 else {
      return new Double(Math.floor(this.dateTimeUtil.diffHour((Date)intervalStart,target) / getDateIntervalRange()));
    }
  }
}
Program: 70192
Project: 70192
Buggy source:
/** 
 * @param intervalStart
 * @param intervalRange
 * @throws BirtException
 */
public MinuteGroupCalculator(Object intervalStart,double intervalRange) throws BirtException {
  super(intervalStart,intervalRange);
}

Fixed version (ground truth):
/** 
 * @param intervalStart
 * @param intervalRange
 * @throws BirtException
 */
public MinuteGroupCalculator(Object intervalStart,double intervalRange,ULocale locale) throws BirtException {
  super(intervalStart,intervalRange,locale);
}
Program: 70193
Project: 70193
Buggy source:
public Object calculate(Object value) throws BirtException {
  if (value == null) {
    return new Double(-1);
  }
  Date target=getDate(value);
  if (intervalStart == null) {
    return new Double(Math.floor(DateTimeUtil.diffMinute(defaultStart,target) / getDateIntervalRange()));
  }
 else {
    if (DateTimeUtil.diffMinute((Date)intervalStart,target) < 0) {
      return new Double(-1);
    }
 else {
      return new Double(Math.floor(DateTimeUtil.diffMinute((Date)intervalStart,target) / getDateIntervalRange()));
    }
  }
}

Fixed version (ground truth):
public Object calculate(Object value) throws BirtException {
  if (value == null) {
    return new Double(-1);
  }
  Date target=getDate(value);
  if (intervalStart == null) {
    return new Double(Math.floor(this.dateTimeUtil.diffMinute(defaultStart,target) / getDateIntervalRange()));
  }
 else {
    if (this.dateTimeUtil.diffMinute((Date)intervalStart,target) < 0) {
      return new Double(-1);
    }
 else {
      return new Double(Math.floor(this.dateTimeUtil.diffMinute((Date)intervalStart,target) / getDateIntervalRange()));
    }
  }
}
Program: 70194
Project: 70194
Buggy source:
/** 
 * @param intervalStart
 * @param intervalRange
 * @throws BirtException
 */
public MonthGroupCalculator(Object intervalStart,double intervalRange) throws BirtException {
  super(intervalStart,intervalRange);
}

Fixed version (ground truth):
/** 
 * @param intervalStart
 * @param intervalRange
 * @throws BirtException
 */
public MonthGroupCalculator(Object intervalStart,double intervalRange,ULocale locale) throws BirtException {
  super(intervalStart,intervalRange,locale);
}
Program: 70195
Project: 70195
Buggy source:
public Object calculate(Object value) throws BirtException {
  if (value == null) {
    return new Double(-1);
  }
  Date target=getDate(value);
  if (intervalStart == null) {
    return new Double(Math.floor(DateTimeUtil.diffMonth(defaultStart,target) / getDateIntervalRange()));
  }
 else {
    if (DateTimeUtil.diffMonth((Date)intervalStart,target) < 0) {
      return new Double(-1);
    }
 else {
      return new Double(Math.floor(DateTimeUtil.diffMonth((Date)intervalStart,target) / getDateIntervalRange()));
    }
  }
}

Fixed version (ground truth):
public Object calculate(Object value) throws BirtException {
  if (value == null) {
    return new Double(-1);
  }
  Date target=getDate(value);
  if (intervalStart == null) {
    return new Double(Math.floor(this.dateTimeUtil.diffMonth(defaultStart,target) / getDateIntervalRange()));
  }
 else {
    if (this.dateTimeUtil.diffMonth((Date)intervalStart,target) < 0) {
      return new Double(-1);
    }
 else {
      return new Double(Math.floor(this.dateTimeUtil.diffMonth((Date)intervalStart,target) / getDateIntervalRange()));
    }
  }
}
Program: 70196
Project: 70196
Buggy source:
/** 
 * @param intervalStart
 * @param intervalRange
 * @throws BirtException
 */
public QuarterGroupCalculator(Object intervalStart,double intervalRange) throws BirtException {
  super(intervalStart,intervalRange);
}

Fixed version (ground truth):
/** 
 * @param intervalStart
 * @param intervalRange
 * @throws BirtException
 */
public QuarterGroupCalculator(Object intervalStart,double intervalRange,ULocale locale) throws BirtException {
  super(intervalStart,intervalRange,locale);
}
Program: 70197
Project: 70197
Buggy source:
public Object calculate(Object value) throws BirtException {
  if (value == null) {
    return new Double(-1);
  }
  Date target=getDate(value);
  if (intervalStart == null) {
    return new Double(Math.floor(DateTimeUtil.diffQuarter(defaultStart,target) / getDateIntervalRange()));
  }
 else {
    if (DateTimeUtil.diffQuarter((Date)intervalStart,target) < 0) {
      return new Double(-1);
    }
 else {
      return new Double(Math.floor(DateTimeUtil.diffQuarter((Date)intervalStart,target) / getDateIntervalRange()));
    }
  }
}

Fixed version (ground truth):
public Object calculate(Object value) throws BirtException {
  if (value == null) {
    return new Double(-1);
  }
  Date target=getDate(value);
  if (intervalStart == null) {
    return new Double(Math.floor(this.dateTimeUtil.diffQuarter(defaultStart,target) / getDateIntervalRange()));
  }
 else {
    if (this.dateTimeUtil.diffQuarter((Date)intervalStart,target) < 0) {
      return new Double(-1);
    }
 else {
      return new Double(Math.floor(this.dateTimeUtil.diffQuarter((Date)intervalStart,target) / getDateIntervalRange()));
    }
  }
}
Program: 70198
Project: 70198
Buggy source:
public Object calculate(Object value) throws BirtException {
  if (value == null) {
    return new Double(-1);
  }
  Date target=getDate(value);
  if (intervalStart == null) {
    return new Double(Math.floor(DateTimeUtil.diffSecond(defaultStart,target) / getDateIntervalRange()));
  }
 else {
    if (DateTimeUtil.diffSecond((Date)intervalStart,target) < 0) {
      return new Double(-1);
    }
 else {
      return new Double(Math.floor(DateTimeUtil.diffSecond((Date)intervalStart,target) / getDateIntervalRange()));
    }
  }
}

Fixed version (ground truth):
public Object calculate(Object value) throws BirtException {
  if (value == null) {
    return new Double(-1);
  }
  Date target=getDate(value);
  if (intervalStart == null) {
    return new Double(Math.floor(this.dateTimeUtil.diffSecond(defaultStart,target) / getDateIntervalRange()));
  }
 else {
    if (this.dateTimeUtil.diffSecond((Date)intervalStart,target) < 0) {
      return new Double(-1);
    }
 else {
      return new Double(Math.floor(this.dateTimeUtil.diffSecond((Date)intervalStart,target) / getDateIntervalRange()));
    }
  }
}
Program: 70199
Project: 70199
Buggy source:
/** 
 * @param intervalStart
 * @param intervalRange
 * @throws BirtException
 */
public SecondGroupCalculator(Object intervalStart,double intervalRange) throws BirtException {
  super(intervalStart,intervalRange);
}

Fixed version (ground truth):
/** 
 * @param intervalStart
 * @param intervalRange
 * @throws BirtException
 */
public SecondGroupCalculator(Object intervalStart,double intervalRange,ULocale locale) throws BirtException {
  super(intervalStart,intervalRange,locale);
}
Program: 70200
Project: 70200
Buggy source:
/** 
 * @param keyLevels
 * @return
 */
protected int[] getKeyLevelIndexs(DimLevel[] keyLevels){
  int[] keyLevelIndexes=new int[keyLevels.length];
  DimLevel[] allLevels=aggrResultSet.getAllLevels();
  for (int i=0; i < keyLevels.length; i++) {
    for (int j=0; j < allLevels.length; j++) {
      if (keyLevels[i].equals(allLevels[j]))       keyLevelIndexes[i]=j;
    }
  }
  return keyLevelIndexes;
}

Fixed version (ground truth):
/** 
 * @param keyLevels
 * @return
 * @throws DataException 
 */
protected int[] getKeyLevelIndexs(DimLevel[] keyLevels) throws DataException {
  int[] keyLevelIndexes=new int[keyLevels.length];
  DimLevel[] allLevels=aggrResultSet.getAllLevels();
  for (int i=0; i < keyLevels.length; i++) {
    keyLevelIndexes[i]=-1;
    for (int j=0; j < allLevels.length; j++) {
      if (keyLevels[i].equals(allLevels[j]))       keyLevelIndexes[i]=j;
    }
    if (keyLevelIndexes[i] == -1) {
      throw new DataException(DataResourceHandle.getInstance().getMessage(ResourceConstants.NONEXISTENT_LEVEL) + keyLevels[i].getLevelName());
    }
  }
  return keyLevelIndexes;
}
Program: 70201
Project: 70201
Buggy source:
/** 
 * Initializes the CSV options based on the data extraction option. If the passed option doesn't contain common options, use default values.
 * @param option options
 */
private void initCsvOptions(IDataExtractionOption options){
  this.outputStream=options.getOutputStream();
  ICSVDataExtractionOption csvOptions;
  if (options instanceof ICSVDataExtractionOption) {
    csvOptions=(ICSVDataExtractionOption)options;
  }
 else {
    csvOptions=new CSVDataExtractionOption(options.getOptions());
  }
  encoding=csvOptions.getEncoding();
  if (encoding == null || "String_Node_Str".equals(encoding.trim())) {
    encoding=null;
  }
 else {
    encoding=encoding.trim();
  }
  if (encoding == null) {
    encoding=DEFAULT_ENCODING;
  }
  sep=csvOptions.getSeparator();
  if (sep == null || "String_Node_Str".equals(sep)) {
    sep=ICSVDataExtractionOption.SEPARATOR_COMMA;
  }
  isExportDataType=csvOptions.isExportDataType();
  selectedColumnNames=(String[])csvOptions.getSelectedColumns();
}

Fixed version (ground truth):
/** 
 * Initializes the CSV options based on the data extraction option. If the passed option doesn't contain common options, use default values.
 * @param option options
 */
private void initCsvOptions(IDataExtractionOption options){
  this.outputStream=options.getOutputStream();
  ICSVDataExtractionOption csvOptions;
  if (options instanceof ICSVDataExtractionOption) {
    csvOptions=(ICSVDataExtractionOption)options;
  }
 else {
    csvOptions=new CSVDataExtractionOption(options.getOptions());
  }
  encoding=csvOptions.getEncoding();
  if (encoding == null || "String_Node_Str".equals(encoding.trim())) {
    encoding=null;
  }
 else {
    encoding=encoding.trim();
  }
  if (encoding == null) {
    encoding=DEFAULT_ENCODING;
  }
  sep=csvOptions.getSeparator();
  if (sep == null || "String_Node_Str".equals(sep)) {
    sep=ICSVDataExtractionOption.SEPARATOR_COMMA;
  }
  isExportDataType=csvOptions.isExportDataType();
  selectedColumnNames=csvOptions.getSelectedColumns();
}
Program: 70202
Project: 70202
Buggy source:
protected void readImageField(DataInputStream in,ImageItemDesign image,short fieldType) throws IOException {
switch (fieldType) {
case FIELD_IMAGE_SOURCE:
    int imageSource=IOUtil.readInt(in);
switch (imageSource) {
case ImageItemDesign.IMAGE_NAME:
    String imageName=IOUtil.readString(in);
  image.setImageName(imageName);
break;
case ImageItemDesign.IMAGE_FILE:
String imageFile=IOUtil.readString(in);
image.setImageFile(imageFile);
break;
case ImageItemDesign.IMAGE_URI:
String imageUri=IOUtil.readString(in);
image.setImageUri(imageUri);
break;
case ImageItemDesign.IMAGE_EXPRESSION:
String imageExpr=IOUtil.readString(in);
String imageFormat=IOUtil.readString(in);
image.setImageExpression(imageExpr,imageFormat);
break;
default :
throw new IOException("String_Node_Str" + imageSource);
}
break;
case FIELD_ALT_TEXT:
Expression<String> altTextKey=readStringConstant(in);
Expression<String> altText=readStringConstant(in);
image.setAltText(altTextKey,altText);
break;
case FIELD_HELP_TEXT:
Expression<String> helpTextKey=readStringConstant(in);
Expression<String> helpText=readStringConstant(in);
image.setHelpText(helpTextKey,helpText);
break;
default :
readReportItemField(in,image,fieldType);
}
}

Fixed version (ground truth):
protected void readImageField(DataInputStream in,ImageItemDesign image,short fieldType) throws IOException {
switch (fieldType) {
case FIELD_IMAGE_SOURCE:
    int imageSource=IOUtil.readInt(in);
switch (imageSource) {
case ImageItemDesign.IMAGE_NAME:
    String imageName=IOUtil.readString(in);
  image.setImageName(imageName);
break;
case ImageItemDesign.IMAGE_FILE:
String imageFile=IOUtil.readString(in);
image.setImageFile(imageFile);
break;
case ImageItemDesign.IMAGE_URI:
String imageUri=IOUtil.readString(in);
image.setImageUri(imageUri);
break;
case ImageItemDesign.IMAGE_EXPRESSION:
String imageExpr=IOUtil.readString(in);
String imageFormat=IOUtil.readString(in);
image.setImageExpression(imageExpr,imageFormat);
break;
default :
throw new IOException("String_Node_Str" + imageSource);
}
break;
case FIELD_ALT_TEXT:
Expression<String> altTextKey=readStringConstant(in);
Expression<String> altText=readStringConstant(in);
image.setAltText(altTextKey,altText);
break;
case FIELD_HELP_TEXT:
Expression<String> helpTextKey=readStringConstant(in);
Expression<String> helpText=readStringConstant(in);
image.setHelpText(helpTextKey,helpText);
break;
case FIELD_FIT_TO_CONTAINER:
Boolean isFitToContainer=IOUtil.readBool(in);
image.setFitToContainer(isFitToContainer);
break;
default :
readReportItemField(in,image,fieldType);
}
}
Program: 70203
Project: 70203
Buggy source:
protected void writeImage(DataOutputStream out,ImageItemDesign image) throws IOException {
  writeReportItem(out,image);
  IOUtil.writeShort(out,FIELD_IMAGE_SOURCE);
  int imageSource=image.getImageSource();
  IOUtil.writeInt(out,imageSource);
switch (imageSource) {
case ImageItemDesign.IMAGE_NAME:
{
      String imageName=image.getImageName();
      DesignElementHandle handle=image.getHandle();
      if (handle instanceof ImageHandle) {
        String designImageName=image.getImageName();
        if (imageName != null && imageName.equals(designImageName)) {
          imageName=null;
        }
      }
      IOUtil.writeString(out,imageName);
    }
  break;
case ImageItemDesign.IMAGE_FILE:
IOUtil.writeString(out,image.getImageUri());
break;
case ImageItemDesign.IMAGE_URI:
IOUtil.writeString(out,image.getImageUri());
break;
case ImageItemDesign.IMAGE_EXPRESSION:
IOUtil.writeString(out,image.getImageExpression());
IOUtil.writeString(out,image.getImageFormat());
break;
}
Expression<String> altText=image.getAltText();
Expression<String> altTextKey=image.getAltTextKey();
Expression<String> helpText=image.getHelpText();
Expression<String> helpTextKey=image.getHelpTextKey();
if (altText != null || altTextKey != null) {
IOUtil.writeShort(out,FIELD_ALT_TEXT);
write(out,altTextKey);
write(out,altText);
}
if (helpText != null || helpText != null) {
IOUtil.writeShort(out,FIELD_HELP_TEXT);
write(out,helpTextKey);
write(out,helpText);
}
}

Fixed version (ground truth):
protected void writeImage(DataOutputStream out,ImageItemDesign image) throws IOException {
  writeReportItem(out,image);
  IOUtil.writeShort(out,FIELD_IMAGE_SOURCE);
  int imageSource=image.getImageSource();
  IOUtil.writeInt(out,imageSource);
switch (imageSource) {
case ImageItemDesign.IMAGE_NAME:
{
      String imageName=image.getImageName();
      DesignElementHandle handle=image.getHandle();
      if (handle instanceof ImageHandle) {
        String designImageName=image.getImageName();
        if (imageName != null && imageName.equals(designImageName)) {
          imageName=null;
        }
      }
      IOUtil.writeString(out,imageName);
    }
  break;
case ImageItemDesign.IMAGE_FILE:
IOUtil.writeString(out,image.getImageUri());
break;
case ImageItemDesign.IMAGE_URI:
IOUtil.writeString(out,image.getImageUri());
break;
case ImageItemDesign.IMAGE_EXPRESSION:
IOUtil.writeString(out,image.getImageExpression());
IOUtil.writeString(out,image.getImageFormat());
break;
}
boolean isFitToContainer=image.isFitToContainer();
if (isFitToContainer) {
IOUtil.writeShort(out,FIELD_FIT_TO_CONTAINER);
IOUtil.writeBool(out,true);
}
Expression<String> altText=image.getAltText();
Expression<String> altTextKey=image.getAltTextKey();
Expression<String> helpText=image.getHelpText();
Expression<String> helpTextKey=image.getHelpTextKey();
if (altText != null || altTextKey != null) {
IOUtil.writeShort(out,FIELD_ALT_TEXT);
write(out,altTextKey);
write(out,altText);
}
if (helpText != null || helpText != null) {
IOUtil.writeShort(out,FIELD_HELP_TEXT);
write(out,helpTextKey);
write(out,helpText);
}
}
Program: 70204
Project: 70204
Buggy source:
public boolean needOutputInMasterPage(IContent headerFooter){
  if (headerFooter != null) {
    Collection list=headerFooter.getChildren();
    Iterator iter=list.iterator();
    while (iter.hasNext()) {
      Object child=iter.next();
      if (child instanceof ITableContent) {
        int columncount=((ITableContent)child).getColumnCount();
        int rowcount=((ITableContent)child).getChildren().size();
        if (columncount > 3 || rowcount > 1) {
          logger.log(Level.WARNING,"String_Node_Str");
          return false;
        }
        if (isEmbededTable((ITableContent)child)) {
          logger.log(Level.WARNING,"String_Node_Str");
          return false;
        }
      }
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean needOutputInMasterPage(IContent headerFooter){
  if (headerFooter != null) {
    Collection list=headerFooter.getChildren();
    Iterator iter=list.iterator();
    while (iter.hasNext()) {
      Object child=iter.next();
      if (child instanceof ITableContent) {
        int columncount=((ITableContent)child).getColumnCount();
        int rowcount=((ITableContent)child).getChildren().size();
        if (columncount > 3 || rowcount > 1) {
          logger.log(Level.WARNING,"String_Node_Str");
          return false;
        }
        if (isEmbededTable((ITableContent)child)) {
          logger.log(Level.WARNING,"String_Node_Str");
          return false;
        }
      }
      if (isHtmlText(child)) {
        logger.log(Level.WARNING,"String_Node_Str");
        return false;
      }
    }
  }
  return true;
}
Program: 70205
Project: 70205
Buggy source:
public SplitResult split(int height,boolean force) throws BirtException {
  SplitResult result=super.split(height,force);
  if (result.getResult() != null) {
    TableArea tableResult=(TableArea)result.getResult();
    int h=tableResult.layout.resolveAll();
    if (h > 0) {
      tableResult.setHeight(tableResult.getHeight() + h);
    }
    tableResult.resolveBottomBorder();
    relayoutChildren();
  }
  return result;
}

Fixed version (ground truth):
public SplitResult split(int height,boolean force) throws BirtException {
  SplitResult result=super.split(height,force);
  if (result.getResult() != null) {
    TableArea tableResult=(TableArea)result.getResult();
    int h=tableResult.layout.resolveAll(tableResult.getLastRow());
    if (h > 0) {
      tableResult.setHeight(tableResult.getHeight() + h);
    }
    tableResult.resolveBottomBorder();
    relayoutChildren();
  }
  return result;
}
Program: 70206
Project: 70206
Buggy source:
public void close() throws BirtException {
  int borderHeight=0;
  if (layout != null) {
    int height=layout.resolveAll();
    if (0 != height) {
      currentBP=currentBP + height;
    }
    borderHeight=layout.resolveBottomBorder();
    layout.remove(this);
  }
  setHeight(currentBP + getOffsetY() + borderHeight);
  updateBackgroundImage();
  if (parent != null) {
    boolean pb=checkPageBreak();
    if (pb) {
      int height=layout.resolveAll();
      if (0 != height) {
        currentBP=currentBP + height;
      }
      borderHeight=layout.resolveBottomBorder();
      layout.remove(this);
    }
    parent.update(this);
  }
  finished=true;
}

Fixed version (ground truth):
public void close() throws BirtException {
  int borderHeight=0;
  if (layout != null) {
    int height=layout.resolveAll(getLastRow());
    if (0 != height) {
      currentBP=currentBP + height;
    }
    borderHeight=layout.resolveBottomBorder();
    layout.remove(this);
  }
  setHeight(currentBP + getOffsetY() + borderHeight);
  updateBackgroundImage();
  if (parent != null) {
    boolean pb=checkPageBreak();
    if (pb) {
      int height=layout.resolveAll(getLastRow());
      if (0 != height) {
        currentBP=currentBP + height;
      }
      borderHeight=layout.resolveBottomBorder();
      layout.remove(this);
    }
    parent.update(this);
  }
  finished=true;
}
Program: 70207
Project: 70207
Buggy source:
/** 
 * When pagination happens, if drop cells should be finished by force, we need to end these cells and vertical align for them.
 */
public int resolveAll(){
  if (rows.size() == 0) {
    return 0;
  }
  RowArea row=(RowArea)rows.getCurrent();
  int originalRowHeight=row.getHeight();
  int height=originalRowHeight;
  for (int i=startCol; i <= endCol; i++) {
    CellArea cell=row.getCell(i);
    if (null == cell) {
      continue;
    }
    if (cell instanceof DummyCell) {
      DummyCell dummyCell=(DummyCell)cell;
      int delta=dummyCell.getDelta();
      height=Math.max(height,dummyCell.getCell().getHeight() - delta);
    }
 else {
      height=Math.max(height,cell.getHeight());
    }
    i=i + cell.getColSpan() - 1;
  }
  int dValue=height - originalRowHeight;
  for (int i=startCol; i <= endCol; i++) {
    CellArea cell=row.getCell(i);
    if (cell == null) {
      continue;
    }
    if (cell instanceof DummyCell) {
      int delta=((DummyCell)cell).getDelta();
      if (cell.getRowSpan() == 1) {
        CellArea refCell=((DummyCell)cell).getCell();
        refCell.setHeight(delta + height);
        verticalAlign(refCell);
      }
 else {
        CellArea refCell=((DummyCell)cell).getCell();
        refCell.setHeight(delta + height);
        verticalAlign(refCell);
      }
    }
 else {
      if (dValue != 0) {
        cell.setHeight(height);
        verticalAlign(cell);
      }
    }
    i=i + cell.getColSpan() - 1;
  }
  row.setHeight(height);
  return dValue;
}

Fixed version (ground truth):
/** 
 * When pagination happens, if drop cells should be finished by force, we need to end these cells and vertical align for them.
 */
public int resolveAll(RowArea row){
  if (rows.size() == 0) {
    return 0;
  }
  int originalRowHeight=row.getHeight();
  int height=originalRowHeight;
  for (int i=startCol; i <= endCol; i++) {
    CellArea cell=row.getCell(i);
    if (null == cell) {
      continue;
    }
    if (cell instanceof DummyCell) {
      DummyCell dummyCell=(DummyCell)cell;
      int delta=dummyCell.getDelta();
      height=Math.max(height,dummyCell.getCell().getHeight() - delta);
    }
 else {
      height=Math.max(height,cell.getHeight());
    }
    i=i + cell.getColSpan() - 1;
  }
  int dValue=height - originalRowHeight;
  for (int i=startCol; i <= endCol; i++) {
    CellArea cell=row.getCell(i);
    if (cell == null) {
      continue;
    }
    if (cell instanceof DummyCell) {
      int delta=((DummyCell)cell).getDelta();
      if (cell.getRowSpan() == 1) {
        CellArea refCell=((DummyCell)cell).getCell();
        refCell.setHeight(delta + height);
        verticalAlign(refCell);
      }
 else {
        CellArea refCell=((DummyCell)cell).getCell();
        refCell.setHeight(delta + height);
        verticalAlign(refCell);
      }
    }
 else {
      if (dValue != 0) {
        cell.setHeight(height);
        verticalAlign(cell);
      }
    }
    i=i + cell.getColSpan() - 1;
  }
  row.setHeight(height);
  return dValue;
}
Program: 70208
Project: 70208
Buggy source:
public void initialize() throws BirtException {
  createRoot();
  Color backgroundColor=PropertyUtil.getColor(pageContent.getStyle().getProperty(StyleConstants.STYLE_BACKGROUND_COLOR));
  ReportDesignHandle designHandle=pageContent.getReportContent().getDesign().getReportDesign();
  IStyle style=pageContent.getStyle();
  String imageUrl=EmitterUtil.getBackgroundImageUrl(style,designHandle);
  if (backgroundColor != null || imageUrl != null) {
    boxStyle=new BoxStyle();
    boxStyle.setBackgroundColor(backgroundColor);
    if (imageUrl != null) {
      boxStyle.setBackgroundImage(createBackgroundImage(imageUrl,pageContent));
    }
  }
  context.setMaxHeight(root.getHeight());
  context.setMaxWidth(root.getWidth());
  context.setMaxBP(root.getHeight());
  layoutHeader();
  layoutFooter();
  updateBodySize();
  context.setMaxHeight(body.getHeight());
  context.setMaxWidth(body.getWidth());
  context.setMaxBP(body.getHeight());
  maxAvaWidth=context.getMaxWidth();
}

Fixed version (ground truth):
public void initialize() throws BirtException {
  createRoot();
  Color backgroundColor=PropertyUtil.getColor(pageContent.getComputedStyle().getProperty(StyleConstants.STYLE_BACKGROUND_COLOR));
  ReportDesignHandle designHandle=pageContent.getReportContent().getDesign().getReportDesign();
  IStyle style=pageContent.getStyle();
  String imageUrl=EmitterUtil.getBackgroundImageUrl(style,designHandle);
  if (backgroundColor != null || imageUrl != null) {
    boxStyle=new BoxStyle();
    boxStyle.setBackgroundColor(backgroundColor);
    if (imageUrl != null) {
      boxStyle.setBackgroundImage(createBackgroundImage(imageUrl,pageContent));
    }
  }
  context.setMaxHeight(root.getHeight());
  context.setMaxWidth(root.getWidth());
  context.setMaxBP(root.getHeight());
  layoutHeader();
  layoutFooter();
  updateBodySize();
  context.setMaxHeight(body.getHeight());
  context.setMaxWidth(body.getWidth());
  context.setMaxBP(body.getHeight());
  maxAvaWidth=context.getMaxWidth();
}
Program: 70209
Project: 70209
Buggy source:
public TextArea getNextArea(int maxLineWidth){
  if (!hasNextArea()) {
    throw new RuntimeException("String_Node_Str");
  }
  TextArea textArea=getNextTextArea(maxLineWidth);
  offset+=textArea.getTextLength();
  if (lineBreakCollapse == LINE_BREAK_COLLAPSE_OCCUPY) {
    lineBreakCollapse=LINE_BREAK_COLLAPSE_FREE;
    return null;
  }
  return textArea;
}

Fixed version (ground truth):
public TextArea getNextArea(int maxLineWidth){
  if (!hasNextArea()) {
    throw new RuntimeException("String_Node_Str");
  }
  TextArea textArea=getNextTextArea(maxLineWidth);
  offset+=textArea.getTextLength();
  if (lineBreakCollapse == LINE_BREAK_COLLAPSE_OCCUPIED) {
    lineBreakCollapse=LINE_BREAK_COLLAPSE_FREE;
    return null;
  }
  return textArea;
}
Program: 70211
Project: 70211
Buggy source:
protected void checkObjectType(){
  IImageContent image=(IImageContent)content;
  String uri=image.getURI();
  String mimeType=image.getMIMEType();
  String extension=image.getExtension();
  if (FlashFile.isFlash(mimeType,uri,extension)) {
    objectType=TYPE_FLASH_OBJECT;
    ObjectContent flash=(ObjectContent)image;
  }
 else {
    objectType=TYPE_IMAGE_OBJECT;
  }
}

Fixed version (ground truth):
protected void checkObjectType(){
  IImageContent image=(IImageContent)content;
  String uri=image.getURI();
  String mimeType=image.getMIMEType();
  String extension=image.getExtension();
  if (FlashFile.isFlash(mimeType,uri,extension)) {
    objectType=TYPE_FLASH_OBJECT;
  }
 else {
    objectType=TYPE_IMAGE_OBJECT;
  }
}
Program: 70212
Project: 70212
Buggy source:
protected void initialize() throws BirtException {
  checkObjectType();
  IImageContent imageContent=(IImageContent)content;
  Image imageObject=null;
  boolean isFlash=FlashFile.isFlash(imageContent.getMIMEType(),imageContent.getURI(),imageContent.getExtension());
  if (!isFlash) {
    imageObject=EmitterUtil.getImage(imageContent);
  }
  if (isOutputSupported(objectType) && (isFlash || imageObject != null)) {
    layout=new ConcreteImageLayout(context,parent,content,imageObject);
  }
 else {
    ITextContent altTextContent=createAltText((IImageContent)content);
    if (null == altTextContent) {
      return;
    }
    layout=new BlockTextArea(parent,context,altTextContent);
    ((BlockTextArea)layout).initialize();
  }
}

Fixed version (ground truth):
protected void initialize() throws BirtException {
  checkObjectType();
  IImageContent imageContent=(IImageContent)content;
  Image imageObject=null;
  if (objectType == TYPE_IMAGE_OBJECT) {
    imageObject=EmitterUtil.getImage(imageContent);
  }
  if (isOutputSupported(objectType) && (objectType == TYPE_FLASH_OBJECT || imageObject != null)) {
    layout=new ConcreteImageLayout(context,parent,content,imageObject);
  }
 else {
    ITextContent altTextContent=createAltText((IImageContent)content);
    if (null == altTextContent) {
      return;
    }
    layout=new BlockTextArea(parent,context,altTextContent);
  }
}
Program: 70214
Project: 70214
Buggy source:
public LegendTextSheet(String title,ChartWizardContext context){
  super(title,context,true);
}

Fixed version (ground truth):
public LegendTextSheet(String title,ChartWizardContext context){
  super(title,context,true);
  isByCategory=getChart().getLegend().getItemType() != LegendItemType.SERIES_LITERAL;
  containsYOG=ChartUtil.containsYOptionalGrouping(getChart());
}
Program: 70216
Project: 70216
Buggy source:
/** 
 * setup the master page object from the base master page handle.
 * @param page page object
 * @param handle page handle
 */
private void setupMasterPage(MasterPageDesign page,MasterPageHandle handle){
  setupStyledElement(page,handle);
  page.setPageType(handle.getPageType());
  DimensionValue effectWidth=handle.getPageWidth();
  DimensionValue effectHeight=handle.getPageHeight();
  DimensionType width=null;
  DimensionType height=null;
  if (effectWidth != null) {
    width=new DimensionType(effectWidth.getMeasure(),effectWidth.getUnits());
  }
  if (effectHeight != null) {
    height=new DimensionType(effectHeight.getMeasure(),effectHeight.getUnits());
  }
  page.setPageSize(width,height);
  page.setOrientation(handle.getOrientation());
  DimensionType top=createDimension(handle.getTopMargin(),true);
  DimensionType left=createDimension(handle.getLeftMargin(),true);
  DimensionType bottom=createDimension(handle.getBottomMargin(),true);
  DimensionType right=createDimension(handle.getRightMargin(),true);
  page.setMargin(top,left,bottom,right);
}

Fixed version (ground truth):
/** 
 * setup the master page object from the base master page handle.
 * @param page page object
 * @param handle page handle
 */
private void setupMasterPage(MasterPageDesign page,MasterPageHandle handle){
  setupStyledElement(page,handle);
  page.setPageType(handle.getPageType());
  DimensionValue effectWidth=handle.getPageWidth();
  DimensionValue effectHeight=handle.getPageHeight();
  DimensionType width=null;
  DimensionType height=null;
  if (effectWidth != null) {
    width=new DimensionType(effectWidth.getMeasure(),effectWidth.getUnits());
  }
 else {
    width=new DimensionType(DEFAULT_MASTERPAGE_WIDTH,DimensionType.UNITS_IN);
  }
  if (effectHeight != null) {
    height=new DimensionType(effectHeight.getMeasure(),effectHeight.getUnits());
  }
 else {
    height=new DimensionType(DEFAULT_MASTERPAGE_HEIGHT,DimensionType.UNITS_IN);
  }
  page.setPageSize(width,height);
  page.setOrientation(handle.getOrientation());
  DimensionType top=createDimension(handle.getTopMargin(),true);
  DimensionType left=createDimension(handle.getLeftMargin(),true);
  DimensionType bottom=createDimension(handle.getBottomMargin(),true);
  DimensionType right=createDimension(handle.getRightMargin(),true);
  page.setMargin(top,left,bottom,right);
}
Program: 70217
Project: 70217
Buggy source:
protected void verticalAlign(){
  Iterator iter=getChildren();
  while (iter.hasNext()) {
    AbstractArea child=(AbstractArea)iter.next();
    CSSValue vAlign=child.getVerticalAlign();
    if (IStyle.TOP_VALUE.equals(vAlign)) {
      continue;
    }
    int spacing=getContentHeight() - child.getAllocatedHeight();
    if (spacing < 0) {
      spacing=0;
    }
    if (vAlign == null || IStyle.BASELINE_VALUE.equals(vAlign)) {
      child.setPosition(child.getX(),child.getY() + getBaseLine() - child.getBaseLine());
    }
 else     if (IStyle.BOTTOM_VALUE.equals(vAlign)) {
      child.setPosition(child.getX(),child.getY() + spacing);
    }
 else     if (IStyle.MIDDLE_VALUE.equals(vAlign)) {
      child.setPosition(child.getX(),child.getY() + spacing / 2);
    }
  }
}

Fixed version (ground truth):
protected void verticalAlign(){
  Iterator iter=getChildren();
  while (iter.hasNext()) {
    AbstractArea child=(AbstractArea)iter.next();
    CSSValue vAlign=child.getVerticalAlign();
    if (IStyle.TOP_VALUE.equals(vAlign)) {
      continue;
    }
    int spacing=getContentHeight() - child.getAllocatedHeight();
    if (spacing < 0) {
      spacing=0;
    }
    if (vAlign == null || IStyle.BASELINE_VALUE.equals(vAlign)) {
      int lineHeight=parent.getLineHeight();
      if (lineHeight > 0) {
        child.setPosition(child.getX(),child.getY() + getBaseLine() - child.getBaseLine() + spacing / 2);
      }
 else {
        child.setPosition(child.getX(),child.getY() + getBaseLine() - child.getBaseLine());
      }
    }
 else     if (IStyle.BOTTOM_VALUE.equals(vAlign)) {
      child.setPosition(child.getX(),child.getY() + spacing);
    }
 else     if (IStyle.MIDDLE_VALUE.equals(vAlign)) {
      child.setPosition(child.getX(),child.getY() + spacing / 2);
    }
  }
}
Program: 70221
Project: 70221
Buggy source:
private IEditorInput createEditorInput(IFileStore fileStore){
  IFile workspaceFile=getWorkspaceFile(fileStore);
  if (workspaceFile != null)   return new FileEditorInput(workspaceFile);
  return new FileStoreEditorInput(fileStore);
}

Fixed version (ground truth):
private IEditorInput createEditorInput(final IFileStore fileStore){
  IFile workspaceFile=getWorkspaceFile(fileStore);
  if (workspaceFile != null)   return new FileEditorInput(workspaceFile);
  IEditorInput iei=null;
  try {
    Class.forName("String_Node_Str");
    iei=new FileStoreEditorInput(fileStore);
  }
 catch (  ClassNotFoundException e) {
    return new IEPInput(){
      public boolean exists(){
        return fileStore.fetchInfo().exists();
      }
      public ImageDescriptor getImageDescriptor(){
        return null;
      }
      public String getName(){
        return fileStore.getName();
      }
      public IPersistableElement getPersistable(){
        return null;
      }
      public String getToolTipText(){
        return fileStore.toString();
      }
      public Object getAdapter(      Class adapter){
        if (IWorkbenchAdapter.class.equals(adapter))         return new IWorkbenchAdapter(){
          public Object[] getChildren(          Object o){
            return null;
          }
          public ImageDescriptor getImageDescriptor(          Object object){
            return null;
          }
          public String getLabel(          Object o){
            return ((FileStoreEditorInput)o).getName();
          }
          public Object getParent(          Object o){
            return null;
          }
        }
;
        return Platform.getAdapterManager().getAdapter(this,adapter);
      }
      public IPath getPath(){
        return new Path(fileStore.toURI().getPath());
      }
    }
;
  }
  return iei;
}
Program: 70222
Project: 70222
Buggy source:
private String getPath(String fileName){
  Bundle bundle=Platform.getBundle(ChartExamplesPlugin.ID);
  Path relativePath=new Path("String_Node_Str" + fileName + JAVA_EXTENSION);
  URL relativeURL=FileLocator.find(bundle,relativePath,null);
  String absolutePath=null;
  try {
    URL absoluteURL=FileLocator.toFileURL(relativeURL);
    String tmp=absoluteURL.getPath();
    absolutePath=tmp.substring(0,tmp.lastIndexOf("String_Node_Str"));
  }
 catch (  IOException io) {
    io.printStackTrace();
  }
  return absolutePath;
}

Fixed version (ground truth):
public IPath getPath(){
  return new Path(fileStore.toURI().getPath());
}
Program: 70223
Project: 70223
Buggy source:
public String getHeaders(){
  return headers;
}

Fixed version (ground truth):
public String getHeaders(){
  if (headers != null) {
    return headers;
  }
 else   if (cellDesign != null && cellDesign.getHeaders() != null) {
    return getConstantValue(cellDesign.getHeaders());
  }
  return null;
}
Program: 70224
Project: 70224
Buggy source:
protected void writeFields(DataOutputStream out) throws IOException {
  super.writeFields(out);
  if (rowSpan != -1) {
    IOUtil.writeShort(out,FIELD_ROW_SPAN);
    IOUtil.writeInt(out,rowSpan);
  }
  if (colSpan != -1) {
    IOUtil.writeShort(out,FIELD_COL_SPAN);
    IOUtil.writeInt(out,colSpan);
  }
  if (column != -1) {
    IOUtil.writeShort(out,FIELD_COLUMN);
    IOUtil.writeInt(out,column);
  }
  if (displayGroupIcon != null) {
    IOUtil.writeShort(out,FIELD_DISPLAY_GROUP_ICON);
    IOUtil.writeBool(out,displayGroupIcon.booleanValue());
  }
  if (drop != null) {
    IOUtil.writeShort(out,FIELD_DROP);
    IOUtil.writeString(out,drop);
  }
}

Fixed version (ground truth):
protected void writeFields(DataOutputStream out) throws IOException {
  super.writeFields(out);
  if (rowSpan != -1) {
    IOUtil.writeShort(out,FIELD_ROW_SPAN);
    IOUtil.writeInt(out,rowSpan);
  }
  if (colSpan != -1) {
    IOUtil.writeShort(out,FIELD_COL_SPAN);
    IOUtil.writeInt(out,colSpan);
  }
  if (column != -1) {
    IOUtil.writeShort(out,FIELD_COLUMN);
    IOUtil.writeInt(out,column);
  }
  if (displayGroupIcon != null) {
    IOUtil.writeShort(out,FIELD_DISPLAY_GROUP_ICON);
    IOUtil.writeBool(out,displayGroupIcon.booleanValue());
  }
  if (drop != null) {
    IOUtil.writeShort(out,FIELD_DROP);
    IOUtil.writeString(out,drop);
  }
  if (headers != null) {
    IOUtil.writeShort(out,FIELD_HEADERS);
    IOUtil.writeString(out,headers);
  }
}
Program: 70225
Project: 70225
Buggy source:
public boolean needSave(){
  if (rowSpan != -1 || colSpan != -1 || column != -1) {
    return true;
  }
  if (displayGroupIcon != null) {
    return true;
  }
  return super.needSave();
}

Fixed version (ground truth):
public boolean needSave(){
  if (rowSpan != -1 || colSpan != -1 || column != -1) {
    return true;
  }
  if (displayGroupIcon != null || headers != null) {
    return true;
  }
  return super.needSave();
}
Program: 70226
Project: 70226
Buggy source:
protected void readField(int version,int filedId,DataInputStream in,ClassLoader loader) throws IOException {
switch (filedId) {
case FIELD_ROW_SPAN:
    rowSpan=IOUtil.readInt(in);
  break;
case FIELD_COL_SPAN:
colSpan=IOUtil.readInt(in);
break;
case FIELD_COLUMN:
column=IOUtil.readInt(in);
break;
case FIELD_START_OF_GROUP:
IOUtil.readBool(in);
break;
case FIELD_DISPLAY_GROUP_ICON:
displayGroupIcon=Boolean.valueOf(IOUtil.readBool(in));
break;
case FIELD_DROP:
drop=IOUtil.readString(in);
break;
default :
super.readField(version,filedId,in,loader);
break;
}
}

Fixed version (ground truth):
protected void readField(int version,int filedId,DataInputStream in,ClassLoader loader) throws IOException {
switch (filedId) {
case FIELD_ROW_SPAN:
    rowSpan=IOUtil.readInt(in);
  break;
case FIELD_COL_SPAN:
colSpan=IOUtil.readInt(in);
break;
case FIELD_COLUMN:
column=IOUtil.readInt(in);
break;
case FIELD_START_OF_GROUP:
IOUtil.readBool(in);
break;
case FIELD_DISPLAY_GROUP_ICON:
displayGroupIcon=Boolean.valueOf(IOUtil.readBool(in));
break;
case FIELD_DROP:
drop=IOUtil.readString(in);
break;
case FIELD_HEADERS:
headers=IOUtil.readString(in);
break;
default :
super.readField(version,filedId,in,loader);
break;
}
}
Program: 70227
Project: 70227
Buggy source:
public String getScope(){
  return scope;
}

Fixed version (ground truth):
public String getScope(){
  if (cellDesign != null) {
    return cellDesign.getScope();
  }
  return null;
}
Program: 70228
Project: 70228
Buggy source:
private void processHeaders(CellDesign cellDesign,ICellContent cellContent){
  String headersExpression=cellDesign.getHeaders();
  if (headersExpression != null) {
    try {
      Object tmp=evaluate(headersExpression);
      if (tmp != null && !tmp.equals("String_Node_Str")) {
        String headers=tmp.toString();
        cellContent.setHeaders(headers);
      }
    }
 catch (    BirtException ex) {
      context.addException(ex);
    }
  }
}

Fixed version (ground truth):
private void processHeaders(CellDesign cellDesign,ICellContent cellContent){
  String headers=evaluate(cellDesign.getHeaders());
  if (headers != null && !headers.equals("String_Node_Str")) {
    cellContent.setHeaders(headers);
  }
}
Program: 70229
Project: 70229
Buggy source:
public IContent execute(){
  CellDesign cellDesign=(CellDesign)getDesign();
  ICellContent cellContent=report.createCellContent();
  setContent(cellContent);
  executeQuery();
  initializeContent(cellDesign,cellContent);
  processAction(cellDesign,cellContent);
  processBookmark(cellDesign,cellContent);
  processScope(cellDesign,cellContent);
  processHeaders(cellDesign,cellContent);
  processStyle(cellDesign,cellContent);
  processVisibility(cellDesign,cellContent);
  if (context.isInFactory()) {
    handleOnCreate(cellContent);
  }
  startTOCEntry(cellContent);
  currentItem=0;
  return content;
}

Fixed version (ground truth):
public IContent execute(){
  CellDesign cellDesign=(CellDesign)getDesign();
  ICellContent cellContent=report.createCellContent();
  setContent(cellContent);
  executeQuery();
  initializeContent(cellDesign,cellContent);
  processAction(cellDesign,cellContent);
  processBookmark(cellDesign,cellContent);
  processHeaders(cellDesign,cellContent);
  processStyle(cellDesign,cellContent);
  processVisibility(cellDesign,cellContent);
  if (context.isInFactory()) {
    handleOnCreate(cellContent);
  }
  startTOCEntry(cellContent);
  currentItem=0;
  return content;
}
Program: 70230
Project: 70230
Buggy source:
public void setHeaders(String headers){
  this.headers=headers;
}

Fixed version (ground truth):
public void setHeaders(Expression<String> headers){
  this.headers=headers;
}
Program: 70231
Project: 70231
Buggy source:
public String getHeaders(){
  return this.headers;
}

Fixed version (ground truth):
public Expression<String> getHeaders(){
  return this.headers;
}