nus-yam/ex-repair huggingface dataset:
Program: 77030
Project: 77030
Buggy source:
protected void start(){
  if (pageContent == null) {
    MasterPageDesign pageDesign=getMasterPage(report);
    pageNumber=pageNumber + 1;
    context.setPageNumber(pageNumber);
    pageContent=reportExecutor.createPage(pageNumber,pageDesign);
    if (emitter != null) {
      emitter.startPage(pageContent);
    }
  }
}

Fixed version (ground truth):
protected void start(){
  if (pageContent == null) {
    MasterPageDesign pageDesign=getMasterPage(report);
    pageNumber=pageNumber + 1;
    context.setPageNumber(pageNumber);
    pageContent=reportExecutor.createPage(pageNumber,pageDesign);
    if (emitter != null) {
      emitter.startPage(pageContent);
    }
  }
  isOutput=true;
}
Program: 77031
Project: 77031
Buggy source:
public void layout(IContent content,IContentEmitter output){
  IReportItemExecutor executor=new DOMReportItemExecutor(content);
  layout(executor,output);
  executor.close();
}

Fixed version (ground truth):
public void layout(ILayoutManager parent,IContent content,IContentEmitter output){
  IReportItemExecutor executor=new DOMReportItemExecutor(content);
  layout(parent,executor,output);
  executor.close();
}
Program: 77032
Project: 77032
Buggy source:
protected void repeatHeader(){
  if (!isFirstLayout) {
    ITableContent table=(ITableContent)content;
    if (table.isHeaderRepeat()) {
      IBandContent header=table.getHeader();
      if (header != null) {
        boolean pageBreak=context.allowPageBreak();
        boolean skipPageHint=context.getSkipPageHint();
        context.setAllowPageBreak(pageBreak);
        context.setSkipPageHint(true);
        engine.layout(header,emitter);
        context.setAllowPageBreak(pageBreak);
        context.setSkipPageHint(skipPageHint);
      }
    }
  }
  isFirstLayout=false;
}

Fixed version (ground truth):
protected void repeatHeader(){
  if (!isFirstLayout) {
    ITableContent table=(ITableContent)content;
    if (table.isHeaderRepeat()) {
      IBandContent header=table.getHeader();
      if (header != null) {
        boolean pageBreak=context.allowPageBreak();
        boolean skipPageHint=context.getSkipPageHint();
        context.setAllowPageBreak(pageBreak);
        context.setSkipPageHint(true);
        engine.layout(this,header,emitter);
        context.setAllowPageBreak(pageBreak);
        context.setSkipPageHint(skipPageHint);
      }
    }
  }
  isFirstLayout=false;
}
Program: 77033
Project: 77033
Buggy source:
public void layout(IContent content,IContentEmitter output){
  IReportItemExecutor executor=new DOMReportItemExecutor(content);
  layout(executor,output);
  executor.close();
}

Fixed version (ground truth):
public void layout(ILayoutManager parent,IContent content,IContentEmitter output){
  IReportItemExecutor executor=new DOMReportItemExecutor(content);
  layout(parent,executor,output);
  executor.close();
}
Program: 77034
Project: 77034
Buggy source:
/** 
 * Returns the interval range of this group.
 * @param intervalRange the interval range value as a double
 * @throws SemanticException if the property is locked.
 */
public void setIntervalRange(double intervalRange) throws SemanticException {
  setFloatProperty(GroupElement.INTERVAL_RANGE_PROP,intervalRange);
}

Fixed version (ground truth):
/** 
 * Sets the interval range of group.
 * @param intervalRange the interval range value as a string.value is locale dependent.
 * @throws SemanticException if the property is locked.
 */
public void setIntervalRange(String intervalRange) throws SemanticException {
  setStringProperty(GroupElement.INTERVAL_RANGE_PROP,intervalRange);
}
Program: 77036
Project: 77036
Buggy source:
private void convertSampleData(Axis axis,AxisType axisType){
  if ((axis.getAssociatedAxes() != null) && (axis.getAssociatedAxes().size() != 0)) {
    BaseSampleData bsd=(BaseSampleData)getChartModel().getSampleData().getBaseSampleData().get(0);
    bsd.setDataSetRepresentation(ChartUIUtil.getConvertedSampleDataRepresentation(axisType,bsd.getDataSetRepresentation()));
  }
 else {
    int iEndIndex=axis.getSeriesDefinitions().size();
    int iOSDSize=getChartModel().getSampleData().getOrthogonalSampleData().size();
    for (int i=0; i < iOSDSize; i++) {
      OrthogonalSampleData osd=(OrthogonalSampleData)getChartModel().getSampleData().getOrthogonalSampleData().get(i);
      if (osd.getSeriesDefinitionIndex() >= 0 && osd.getSeriesDefinitionIndex() <= iEndIndex) {
        osd.setDataSetRepresentation(ChartUIUtil.getConvertedSampleDataRepresentation(axisType,osd.getDataSetRepresentation()));
      }
    }
  }
}

Fixed version (ground truth):
private void convertSampleData(Axis axis,AxisType axisType){
  if ((axis.getAssociatedAxes() != null) && (axis.getAssociatedAxes().size() != 0)) {
    BaseSampleData bsd=(BaseSampleData)getChartModel().getSampleData().getBaseSampleData().get(0);
    bsd.setDataSetRepresentation(ChartUIUtil.getConvertedSampleDataRepresentation(axisType,bsd.getDataSetRepresentation()));
  }
 else {
    int iStartIndex=getFirstSeriesDefinitionIndexForAxis(axis);
    int iEndIndex=iStartIndex + axis.getSeriesDefinitions().size();
    int iOSDSize=getChartModel().getSampleData().getOrthogonalSampleData().size();
    for (int i=0; i < iOSDSize; i++) {
      OrthogonalSampleData osd=(OrthogonalSampleData)getChartModel().getSampleData().getOrthogonalSampleData().get(i);
      if (osd.getSeriesDefinitionIndex() >= iStartIndex && osd.getSeriesDefinitionIndex() < iEndIndex) {
        osd.setDataSetRepresentation(ChartUIUtil.getConvertedSampleDataRepresentation(axisType,osd.getDataSetRepresentation()));
      }
    }
  }
}
Program: 77037
Project: 77037
Buggy source:
private void convertSampleData(Axis axis,AxisType axisType){
  if ((axis.getAssociatedAxes() != null) && (axis.getAssociatedAxes().size() != 0)) {
    BaseSampleData bsd=(BaseSampleData)chartModel.getSampleData().getBaseSampleData().get(0);
    bsd.setDataSetRepresentation(ChartUIUtil.getConvertedSampleDataRepresentation(axisType,bsd.getDataSetRepresentation()));
  }
 else {
    int iEndIndex=axis.getSeriesDefinitions().size();
    int iOSDSize=chartModel.getSampleData().getOrthogonalSampleData().size();
    for (int i=0; i < iOSDSize; i++) {
      OrthogonalSampleData osd=(OrthogonalSampleData)chartModel.getSampleData().getOrthogonalSampleData().get(i);
      if (osd.getSeriesDefinitionIndex() >= 0 && osd.getSeriesDefinitionIndex() <= iEndIndex) {
        osd.setDataSetRepresentation(ChartUIUtil.getConvertedSampleDataRepresentation(axisType,osd.getDataSetRepresentation()));
      }
    }
  }
}

Fixed version (ground truth):
private void convertSampleData(Axis axis,AxisType axisType){
  if ((axis.getAssociatedAxes() != null) && (axis.getAssociatedAxes().size() != 0)) {
    BaseSampleData bsd=(BaseSampleData)chartModel.getSampleData().getBaseSampleData().get(0);
    bsd.setDataSetRepresentation(ChartUIUtil.getConvertedSampleDataRepresentation(axisType,bsd.getDataSetRepresentation()));
  }
 else {
    int iStartIndex=getFirstSeriesDefinitionIndexForAxis(axis);
    int iEndIndex=iStartIndex + axis.getSeriesDefinitions().size();
    int iOSDSize=chartModel.getSampleData().getOrthogonalSampleData().size();
    for (int i=0; i < iOSDSize; i++) {
      OrthogonalSampleData osd=(OrthogonalSampleData)chartModel.getSampleData().getOrthogonalSampleData().get(i);
      if (osd.getSeriesDefinitionIndex() >= iStartIndex && osd.getSeriesDefinitionIndex() < iEndIndex) {
        osd.setDataSetRepresentation(ChartUIUtil.getConvertedSampleDataRepresentation(axisType,osd.getDataSetRepresentation()));
      }
    }
  }
}
Program: 77038
Project: 77038
Buggy source:
protected void addNewSeriesDefinition(){
  SeriesDefinition sdTmp=SeriesDefinitionImpl.create();
  sdTmp.getSeriesPalette().update(-seriesDefns.size());
  sdTmp.getSeries().add(EcoreUtil.copy(((SeriesDefinition)seriesDefns.get(0)).getDesignTimeSeries()));
  sdTmp.setQuery((Query)EcoreUtil.copy(((SeriesDefinition)seriesDefns.get(0)).getQuery()));
  cleanDataDefinition(sdTmp);
  sdTmp.eAdapters().addAll(((SeriesDefinition)seriesDefns.get(0)).eAdapters());
  int firstIndex=getFirstIndexOfSameAxis();
  EList list=getChart().getSampleData().getOrthogonalSampleData();
  OrthogonalSampleData sdOrthogonal=(OrthogonalSampleData)EcoreUtil.copy((EObject)list.get(firstIndex));
  sdOrthogonal.setSeriesDefinitionIndex(list.size());
  sdOrthogonal.eAdapters().addAll(getChart().getSampleData().eAdapters());
  boolean isNotificaionIgnored=ChartAdapter.isNotificationIgnored();
  ChartAdapter.ignoreNotifications(true);
  list.add(sdOrthogonal);
  ChartAdapter.ignoreNotifications(isNotificaionIgnored);
  seriesDefns.add(sdTmp);
}

Fixed version (ground truth):
protected void addNewSeriesDefinition(){
  SeriesDefinition sdTmp=SeriesDefinitionImpl.create();
  sdTmp.getSeriesPalette().update(-seriesDefns.size());
  sdTmp.getSeries().add(EcoreUtil.copy(((SeriesDefinition)seriesDefns.get(0)).getDesignTimeSeries()));
  sdTmp.setQuery((Query)EcoreUtil.copy(((SeriesDefinition)seriesDefns.get(0)).getQuery()));
  cleanDataDefinition(sdTmp);
  sdTmp.eAdapters().addAll(((SeriesDefinition)seriesDefns.get(0)).eAdapters());
  int firstIndex=getFirstIndexOfSameAxis();
  EList list=getChart().getSampleData().getOrthogonalSampleData();
  OrthogonalSampleData sdOrthogonal=(OrthogonalSampleData)EcoreUtil.copy((EObject)list.get(firstIndex));
  sdOrthogonal.setSeriesDefinitionIndex(ChartUIUtil.getLastSeriesIndexWithinAxis(getChart(),axisIndex) + 1);
  sdOrthogonal.eAdapters().addAll(getChart().getSampleData().eAdapters());
  boolean isNotificaionIgnored=ChartAdapter.isNotificationIgnored();
  ChartAdapter.ignoreNotifications(true);
  int sdIndex=sdOrthogonal.getSeriesDefinitionIndex();
  ArrayList al=new ArrayList();
  if (sdIndex >= list.size()) {
    list.add(sdOrthogonal);
  }
 else {
    for (int i=sdIndex; i < list.size(); i++) {
      al.add(list.get(i));
    }
    list.set(sdIndex,sdOrthogonal);
    for (int i=0; i < al.size() - 1; i++) {
      list.set(i + 1 + sdIndex,al.get(i));
    }
    list.add(al.get(al.size() - 1));
  }
  ChartAdapter.ignoreNotifications(isNotificaionIgnored);
  seriesDefns.add(sdTmp);
}
Program: 77039
Project: 77039
Buggy source:
public Object getValue(String exprName) throws BirtException {
  checkStarted();
  logger.logp(Level.FINE,ResultIterator.class.getName(),"String_Node_Str","String_Node_Str" + LogUtil.toString(exprName));
  if (this.resultService.getBindingExpr(exprName) == null && this.resultService.getAutoBindingExpr(exprName) == null)   throw new DataException(ResourceConstants.INVALID_BOUND_COLUMN_NAME,exprName);
  if (this.isFirstRowPepared == false)   this.prepareCurrentRow();
  Object exprValue=boundColumnValueMap.get(exprName);
  if (exprValue instanceof BirtException)   throw (BirtException)exprValue;
  return exprValue;
}

Fixed version (ground truth):
public Object getValue(String exprName) throws BirtException {
  checkStarted();
  logger.logp(Level.FINER,ResultIterator.class.getName(),"String_Node_Str","String_Node_Str" + LogUtil.toString(exprName));
  if (this.resultService.getBindingExpr(exprName) == null && this.resultService.getAutoBindingExpr(exprName) == null)   throw new DataException(ResourceConstants.INVALID_BOUND_COLUMN_NAME,exprName);
  if (this.isFirstRowPepared == false)   this.prepareCurrentRow();
  Object exprValue=boundColumnValueMap.get(exprName);
  if (exprValue instanceof BirtException)   throw (BirtException)exprValue;
  return exprValue;
}
Program: 77040
Project: 77040
Buggy source:
public void dispose(){
  if (this.library != null) {
    this.library.close();
    this.library=null;
  }
  ResourceEntry[] children=getChildren();
  for (int i=0; i < children.length; i++) {
    children[i].dispose();
  }
}

Fixed version (ground truth):
public void dispose(){
  if (this.library != null) {
    this.library.close();
    this.library=null;
  }
  if (this.childrenList != null) {
    for (Iterator iterator=this.childrenList.iterator(); iterator.hasNext(); ) {
      ResourceEntry entry=(ResourceEntry)iterator.next();
      entry.dispose();
    }
  }
}
Program: 77041
Project: 77041
Buggy source:
public void run(){
  FileDialog dialog=new FileDialog(UIUtil.getDefaultShell(),SWT.OPEN);
  dialog.setFilterExtensions(new String[]{"String_Node_Str"});
  String filename;
  try {
    filename=dialog.open();
  }
 catch (  Throwable e) {
    return;
  }
  if (filename != null) {
    if (!(new File(filename).exists())) {
      ExceptionHandler.openErrorMessageBox(Messages.getString("String_Node_Str"),Messages.getFormattedString("String_Node_Str",new String[]{filename}));
      return;
    }
    if (!(filename.endsWith("String_Node_Str"))) {
      ExceptionHandler.openErrorMessageBox(Messages.getString("String_Node_Str"),Messages.getFormattedString("String_Node_Str",new String[]{filename,"String_Node_Str"}));
      return;
    }
    try {
      filename=copyToResourceFolder(filename);
      if (filename != null) {
        ModuleHandle moduleHandle=SessionHandleAdapter.getInstance().getReportDesignHandle();
        UIUtil.includeLibrary(moduleHandle,filename);
      }
    }
 catch (    Exception e) {
      ExceptionHandler.handle(e);
    }
  }
}

Fixed version (ground truth):
public void run(){
  ResourceFileFolderSelectionDialog dialog=new ResourceFileFolderSelectionDialog(true,new String[]{"String_Node_Str"});
  if (dialog.open() == Window.OK) {
    try {
      String filename=dialog.getPath();
      ModuleHandle moduleHandle=SessionHandleAdapter.getInstance().getReportDesignHandle();
      UIUtil.includeLibrary(moduleHandle,filename);
    }
 catch (    Exception e) {
      ExceptionHandler.handle(e);
    }
  }
}
Program: 77042
Project: 77042
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:
    IOUtil.writeString(out,image.getImageName());
  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;
}
String altText=image.getAltText();
String altTextKey=image.getAltTextKey();
String helpText=image.getHelpText();
String helpTextKey=image.getHelpTextKey();
if (altText != null || altTextKey != null) {
IOUtil.writeShort(out,FIELD_ALT_TEXT);
IOUtil.writeString(out,altTextKey);
IOUtil.writeString(out,altText);
}
if (helpText != null || helpText != null) {
IOUtil.writeShort(out,FIELD_HELP_TEXT);
IOUtil.writeString(out,helpTextKey);
IOUtil.writeString(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;
}
String altText=image.getAltText();
String altTextKey=image.getAltTextKey();
String helpText=image.getHelpText();
String helpTextKey=image.getHelpTextKey();
if (altText != null || altTextKey != null) {
IOUtil.writeShort(out,FIELD_ALT_TEXT);
IOUtil.writeString(out,altTextKey);
IOUtil.writeString(out,altText);
}
if (helpText != null || helpText != null) {
IOUtil.writeShort(out,FIELD_HELP_TEXT);
IOUtil.writeString(out,helpTextKey);
IOUtil.writeString(out,helpText);
}
}
Program: 77043
Project: 77043
Buggy source:
/** 
 * Parse the attribute of "extensionId" for extendable element.
 * @param attrs the SAX attributes object
 * @param extensionNameRequired whether extension name is required
 */
private void parseODADataSourceExtensionID(Attributes attrs,boolean extensionNameRequired){
  String extensionID=getAttrib(attrs,DesignSchemaConstants.EXTENSION_ID_ATTRIB);
  if (StringUtil.isBlank(extensionID)) {
    if (!extensionNameRequired)     return;
    SemanticError e=new SemanticError(element,SemanticError.DESIGN_EXCEPTION_MISSING_EXTENSION);
    RecoverableError.dealMissingInvalidExtension(handler,e);
    return;
  }
  if (handler.versionNumber < VersionUtil.VERSION_3_0_0) {
    if (OBSOLETE_FLAT_FILE_ID.equalsIgnoreCase(extensionID))     extensionID=NEW_FLAT_FILE_ID;
  }
 else {
    try {
      ExtensionManifest extension=ManifestExplorer.getInstance().getExtensionManifest(extensionID);
      if (extension != null && extension.isDeprecated()) {
        extensionID=extension.getRelatedDataSourceId();
      }
    }
 catch (    OdaException e) {
    }
catch (    IllegalArgumentException e) {
    }
  }
  setProperty(IOdaExtendableElementModel.EXTENSION_ID_PROP,extensionID);
  provider=((OdaDataSource)element).getProvider();
  if (provider == null)   return;
  if (provider instanceof OdaDummyProvider) {
    SemanticError e=new SemanticError(element,new String[]{extensionID},SemanticError.DESIGN_EXCEPTION_EXTENSION_NOT_FOUND);
    RecoverableError.dealMissingInvalidExtension(handler,e);
    isValidExtensionId=false;
  }
}

Fixed version (ground truth):
/** 
 * Parse the attribute of "extensionId" for extendable element.
 * @param attrs the SAX attributes object
 * @param extensionNameRequired whether extension name is required
 */
private void parseODADataSourceExtensionID(Attributes attrs,boolean extensionNameRequired){
  String extensionID=getAttrib(attrs,DesignSchemaConstants.EXTENSION_ID_ATTRIB);
  if (StringUtil.isBlank(extensionID)) {
    if (!extensionNameRequired)     return;
    SemanticError e=new SemanticError(element,SemanticError.DESIGN_EXCEPTION_MISSING_EXTENSION);
    RecoverableError.dealMissingInvalidExtension(handler,e);
    return;
  }
  if (handler.versionNumber < VersionUtil.VERSION_3_0_0) {
    if (OBSOLETE_FLAT_FILE_ID.equalsIgnoreCase(extensionID))     extensionID=NEW_FLAT_FILE_ID;
  }
 else {
    String oldOdaXmlName="String_Node_Str";
    String newOdaXmlName="String_Node_Str";
    if (oldOdaXmlName.equals(extensionID)) {
      extensionID=newOdaXmlName;
    }
  }
  setProperty(IOdaExtendableElementModel.EXTENSION_ID_PROP,extensionID);
  provider=((OdaDataSource)element).getProvider();
  if (provider == null)   return;
  if (provider instanceof OdaDummyProvider) {
    SemanticError e=new SemanticError(element,new String[]{extensionID},SemanticError.DESIGN_EXCEPTION_EXTENSION_NOT_FOUND);
    RecoverableError.dealMissingInvalidExtension(handler,e);
    isValidExtensionId=false;
  }
}
Program: 77044
Project: 77044
Buggy source:
/** 
 * Parse the attribute of "extensionId" for extendable element.
 * @param attrs the SAX attributes object
 * @param extensionNameRequired whether extension name is required
 */
private void parseODADataSetExtensionID(Attributes attrs,boolean extensionNameRequired){
  String extensionID=getAttrib(attrs,DesignSchemaConstants.EXTENSION_ID_ATTRIB);
  if (StringUtil.isBlank(extensionID)) {
    if (!extensionNameRequired)     return;
    SemanticError e=new SemanticError(element,SemanticError.DESIGN_EXCEPTION_MISSING_EXTENSION);
    RecoverableError.dealMissingInvalidExtension(handler,e);
    return;
  }
  if (handler.versionNumber < VersionUtil.VERSION_3_0_0) {
    if (OBSOLETE_FLAT_FILE_ID.equalsIgnoreCase(extensionID))     extensionID=NEW_FLAT_FILE_ID;
  }
  setProperty(IOdaExtendableElementModel.EXTENSION_ID_PROP,extensionID);
  provider=((OdaDataSet)element).getProvider();
  if (provider == null)   return;
  if (provider instanceof OdaDummyProvider) {
    SemanticError e=new SemanticError(element,new String[]{extensionID},SemanticError.DESIGN_EXCEPTION_EXTENSION_NOT_FOUND);
    RecoverableError.dealMissingInvalidExtension(handler,e);
    isValidExtensionId=false;
  }
}

Fixed version (ground truth):
/** 
 * Parse the attribute of "extensionId" for extendable element.
 * @param attrs the SAX attributes object
 * @param extensionNameRequired whether extension name is required
 */
private void parseODADataSetExtensionID(Attributes attrs,boolean extensionNameRequired){
  String extensionID=getAttrib(attrs,DesignSchemaConstants.EXTENSION_ID_ATTRIB);
  if (StringUtil.isBlank(extensionID)) {
    if (!extensionNameRequired)     return;
    SemanticError e=new SemanticError(element,SemanticError.DESIGN_EXCEPTION_MISSING_EXTENSION);
    RecoverableError.dealMissingInvalidExtension(handler,e);
    return;
  }
  if (handler.versionNumber < VersionUtil.VERSION_3_0_0) {
    if (OBSOLETE_FLAT_FILE_ID.equalsIgnoreCase(extensionID))     extensionID=NEW_FLAT_FILE_ID;
  }
 else {
    String oldOdaXmlName="String_Node_Str";
    String newOdaXmlName="String_Node_Str";
    if (oldOdaXmlName.equals(extensionID)) {
      extensionID=newOdaXmlName;
    }
  }
  setProperty(IOdaExtendableElementModel.EXTENSION_ID_PROP,extensionID);
  provider=((OdaDataSet)element).getProvider();
  if (provider == null)   return;
  if (provider instanceof OdaDummyProvider) {
    SemanticError e=new SemanticError(element,new String[]{extensionID},SemanticError.DESIGN_EXCEPTION_EXTENSION_NOT_FOUND);
    RecoverableError.dealMissingInvalidExtension(handler,e);
    isValidExtensionId=false;
  }
}
Program: 77045
Project: 77045
Buggy source:
/** 
 * Parse the attribute of "extensionId" for extendable element.
 * @param attrs the SAX attributes object
 * @param extensionNameRequired whether extension name is required
 */
private void parseODADataSourceExtensionID(Attributes attrs,boolean extensionNameRequired){
  String extensionID=getAttrib(attrs,DesignSchemaConstants.EXTENSION_ID_ATTRIB);
  if (StringUtil.isBlank(extensionID)) {
    if (!extensionNameRequired)     return;
    SemanticError e=new SemanticError(element,SemanticError.DESIGN_EXCEPTION_MISSING_EXTENSION);
    RecoverableError.dealMissingInvalidExtension(handler,e);
    return;
  }
  if (handler.versionNumber < VersionUtil.VERSION_3_0_0) {
    if (OBSOLETE_FLAT_FILE_ID.equalsIgnoreCase(extensionID))     extensionID=NEW_FLAT_FILE_ID;
  }
  setProperty(IOdaExtendableElementModel.EXTENSION_ID_PROP,extensionID);
  provider=((OdaDataSource)element).getProvider();
  if (provider == null)   return;
  if (provider instanceof OdaDummyProvider) {
    SemanticError e=new SemanticError(element,new String[]{extensionID},SemanticError.DESIGN_EXCEPTION_EXTENSION_NOT_FOUND);
    RecoverableError.dealMissingInvalidExtension(handler,e);
    isValidExtensionId=false;
  }
}

Fixed version (ground truth):
/** 
 * Parse the attribute of "extensionId" for extendable element.
 * @param attrs the SAX attributes object
 * @param extensionNameRequired whether extension name is required
 */
private void parseODADataSourceExtensionID(Attributes attrs,boolean extensionNameRequired){
  String extensionID=getAttrib(attrs,DesignSchemaConstants.EXTENSION_ID_ATTRIB);
  if (StringUtil.isBlank(extensionID)) {
    if (!extensionNameRequired)     return;
    SemanticError e=new SemanticError(element,SemanticError.DESIGN_EXCEPTION_MISSING_EXTENSION);
    RecoverableError.dealMissingInvalidExtension(handler,e);
    return;
  }
  if (handler.versionNumber < VersionUtil.VERSION_3_0_0) {
    if (OBSOLETE_FLAT_FILE_ID.equalsIgnoreCase(extensionID))     extensionID=NEW_FLAT_FILE_ID;
  }
 else {
    try {
      ExtensionManifest extension=ManifestExplorer.getInstance().getExtensionManifest(extensionID);
      if (extension != null && extension.isDeprecated()) {
        extensionID=extension.getRelatedDataSourceId();
      }
    }
 catch (    OdaException e) {
    }
catch (    IllegalArgumentException e) {
    }
  }
  setProperty(IOdaExtendableElementModel.EXTENSION_ID_PROP,extensionID);
  provider=((OdaDataSource)element).getProvider();
  if (provider == null)   return;
  if (provider instanceof OdaDummyProvider) {
    SemanticError e=new SemanticError(element,new String[]{extensionID},SemanticError.DESIGN_EXCEPTION_EXTENSION_NOT_FOUND);
    RecoverableError.dealMissingInvalidExtension(handler,e);
    isValidExtensionId=false;
  }
}
Program: 77047
Project: 77047
Buggy source:
protected void handlePageBreakAfter(){
  if (IStyle.ALWAYS_VALUE.equals(content.getStyle().getProperty(IStyle.STYLE_PAGE_BREAK_AFTER))) {
    listingExecutor.clearSoftBreak();
  }
}

Fixed version (ground truth):
protected void handlePageBreakAfter(){
}
Program: 77048
Project: 77048
Buggy source:
protected void handlePageBreakBefore(){
  if (IStyle.ALWAYS_VALUE.equals(content.getStyle().getProperty(IStyle.STYLE_PAGE_BREAK_BEFORE))) {
    listingExecutor.clearSoftBreak();
  }
}

Fixed version (ground truth):
protected void handlePageBreakBefore(){
}
Program: 77049
Project: 77049
Buggy source:
public IContent execute(){
  ListBandDesign bandDesign=(ListBandDesign)getDesign();
  IListBandContent bandContent=report.createListBandContent();
  setContent(bandContent);
  restoreResultSet();
  initializeContent(bandDesign,bandContent);
  int type=bandDesign.getBandType();
  if ((type == BandDesign.BAND_DETAIL || type == BandDesign.GROUP_HEADER) && listExecutor.needSoftBreakBefore()) {
    IStyle style=content.getStyle();
    if (style != null) {
      CSSValue pageBreak=style.getProperty(IStyle.STYLE_PAGE_BREAK_BEFORE);
      if (pageBreak == null || IStyle.AUTO_VALUE.equals(pageBreak)) {
        style.setProperty(IStyle.STYLE_PAGE_BREAK_BEFORE,IStyle.SOFT_VALUE);
        listExecutor.clearSoftBreak();
      }
    }
  }
  startTOCEntry(bandContent);
  if (emitter != null) {
    emitter.startListBand(bandContent);
  }
  currentItem=0;
  return bandContent;
}

Fixed version (ground truth):
public IContent execute(){
  ListBandDesign bandDesign=(ListBandDesign)getDesign();
  IListBandContent bandContent=report.createListBandContent();
  setContent(bandContent);
  restoreResultSet();
  initializeContent(bandDesign,bandContent);
  int type=bandDesign.getBandType();
  if ((type == BandDesign.BAND_DETAIL || type == BandDesign.GROUP_HEADER) && listExecutor.needSoftBreakBefore()) {
    IStyle style=content.getStyle();
    if (style != null) {
      CSSValue pageBreak=style.getProperty(IStyle.STYLE_PAGE_BREAK_BEFORE);
      if (pageBreak == null || IStyle.AUTO_VALUE.equals(pageBreak)) {
        style.setProperty(IStyle.STYLE_PAGE_BREAK_BEFORE,IStyle.SOFT_VALUE);
      }
    }
  }
  startTOCEntry(bandContent);
  if (emitter != null) {
    emitter.startListBand(bandContent);
  }
  currentItem=0;
  return bandContent;
}
Program: 77050
Project: 77050
Buggy source:
public void close(){
  IListContent listContent=(IListContent)getContent();
  if (emitter != null) {
    emitter.endList(listContent);
  }
  finishTOCEntry();
  closeQuery();
}

Fixed version (ground truth):
public void close(){
  super.close();
  IListContent listContent=(IListContent)getContent();
  if (emitter != null) {
    emitter.endList(listContent);
  }
  finishTOCEntry();
  closeQuery();
}
Program: 77051
Project: 77051
Buggy source:
protected void initializeContent(ReportElementDesign design,IContent content){
  super.initializeContent(design,content);
  if (isPageBreakIntervalValid((ListingDesign)design)) {
    pageBreakInterval=((ListingDesign)design).getPageBreakInterval();
  }
}

Fixed version (ground truth):
protected void initializeContent(ReportElementDesign design,IContent content){
  super.initializeContent(design,content);
  if (isPageBreakIntervalValid((ListingDesign)design)) {
    pageBreakInterval=((ListingDesign)design).getPageBreakInterval();
    context.addPageBreakListener(this);
  }
}
Program: 77052
Project: 77052
Buggy source:
public IContent execute(){
  TableBandDesign bandDesign=(TableBandDesign)getDesign();
  ITableBandContent bandContent=report.createTableBandContent();
  setContent(bandContent);
  restoreResultSet();
  initializeContent(bandDesign,bandContent);
  int type=bandDesign.getBandType();
  if ((type == TableBandDesign.BAND_DETAIL || type == TableBandDesign.GROUP_HEADER) && tableExecutor.needSoftBreakBefore()) {
    IStyle style=content.getStyle();
    if (style != null) {
      CSSValue pageBreak=style.getProperty(IStyle.STYLE_PAGE_BREAK_BEFORE);
      if (pageBreak == null || IStyle.AUTO_VALUE.equals(pageBreak)) {
        style.setProperty(IStyle.STYLE_PAGE_BREAK_BEFORE,IStyle.SOFT_VALUE);
        tableExecutor.clearSoftBreak();
      }
    }
  }
  startTOCEntry(bandContent);
  if (emitter != null) {
    emitter.startTableBand(bandContent);
  }
  currentRow=0;
  return content;
}

Fixed version (ground truth):
public IContent execute(){
  TableBandDesign bandDesign=(TableBandDesign)getDesign();
  ITableBandContent bandContent=report.createTableBandContent();
  setContent(bandContent);
  restoreResultSet();
  initializeContent(bandDesign,bandContent);
  int type=bandDesign.getBandType();
  if ((type == TableBandDesign.BAND_DETAIL || type == TableBandDesign.GROUP_HEADER) && tableExecutor.needSoftBreakBefore()) {
    IStyle style=content.getStyle();
    if (style != null) {
      CSSValue pageBreak=style.getProperty(IStyle.STYLE_PAGE_BREAK_BEFORE);
      if (pageBreak == null || IStyle.AUTO_VALUE.equals(pageBreak)) {
        style.setProperty(IStyle.STYLE_PAGE_BREAK_BEFORE,IStyle.SOFT_VALUE);
      }
    }
  }
  startTOCEntry(bandContent);
  if (emitter != null) {
    emitter.startTableBand(bandContent);
  }
  currentRow=0;
  return content;
}
Program: 77053
Project: 77053
Buggy source:
public void close(){
  ITableContent tableContent=(ITableContent)getContent();
  if (emitter != null) {
    emitter.endTable(tableContent);
  }
  finishTOCEntry();
  closeQuery();
}

Fixed version (ground truth):
public void close(){
  super.close();
  ITableContent tableContent=(ITableContent)getContent();
  if (emitter != null) {
    emitter.endTable(tableContent);
  }
  finishTOCEntry();
  closeQuery();
}
Program: 77054
Project: 77054
Buggy source:
public ReportDocumentBuilder(ExecutionContext context,ReportDocumentWriter document){
  this.executionContext=context;
  this.document=document;
  OnPageBreakLayoutPageHandle onPageBreakHandler=new OnPageBreakLayoutPageHandle(context);
  outputEmitters=new CompositeContentEmitter();
  outputEmitters.addEmitter(new PageEmitter());
  outputEmitters.addEmitter(onPageBreakHandler.getEmitter());
  layoutPageHandler=new CompositeLayoutPageHandler();
  layoutPageHandler.addPageHandler(new LayoutPageHandler());
  layoutPageHandler.addPageHandler(onPageBreakHandler);
  contentEmitter=new ContentEmitter();
}

Fixed version (ground truth):
public ReportDocumentBuilder(ExecutionContext context,ReportDocumentWriter document){
  this.executionContext=context;
  this.document=document;
  OnPageBreakLayoutPageHandle onPageBreakHandler=new OnPageBreakLayoutPageHandle(context);
  outputEmitters=new CompositeContentEmitter();
  outputEmitters.addEmitter(new PageEmitter());
  outputEmitters.addEmitter(onPageBreakHandler.getEmitter());
  layoutPageHandler=new CompositeLayoutPageHandler();
  layoutPageHandler.addPageHandler(new LayoutPageHandler());
  layoutPageHandler.addPageHandler(onPageBreakHandler);
  layoutPageHandler.addPageHandler(new ContextPageBreakHandler(executionContext));
  contentEmitter=new ContentEmitter();
}
Program: 77055
Project: 77055
Buggy source:
/** 
 * Build size style string say, "width: 10.0mm;".
 * @param content The <code>StringBuffer</code> to which the result is output.
 * @param name The property name
 * @param value The values of the property
 */
public static void buildSize(StringBuffer content,String name,DimensionType value){
  if (value != null) {
    if (HTMLTags.ATTR_MIN_HEIGHT.equals(name)) {
      addPropName(content,HTMLTags.ATTR_HEIGHT);
      addPropValue(content,"String_Node_Str");
      content.append(';');
      addPropName(content,HTMLTags.ATTR_HEIGHT);
      addPropValue(content,value.toString());
      content.append(';');
      addPropName(content,HTMLTags.ATTR_MIN_HEIGHT);
      addPropValue(content,value.toString());
      content.append(';');
    }
 else {
      addPropName(content,name);
      addPropValue(content,value.toString());
      content.append(';');
    }
  }
}

Fixed version (ground truth):
/** 
 * Build size style string say, "width: 10.0mm;".
 * @param content The <code>StringBuffer</code> to which the result is output.
 * @param name The property name
 * @param value The values of the property
 */
public static void buildSize(StringBuffer content,String name,DimensionType value){
  if (value != null) {
    if (HTMLTags.ATTR_MIN_HEIGHT.equals(name)) {
      addPropName(content,HTMLTags.ATTR_MIN_HEIGHT);
      addPropValue(content,"String_Node_Str");
      content.append(';');
      addPropName(content,HTMLTags.ATTR_HEIGHT);
      addPropValue(content,value.toString());
      content.append(';');
      addPropName(content,HTMLTags.ATTR_MIN_HEIGHT);
      addPropValue(content,value.toString());
      content.append(';');
    }
 else {
      addPropName(content,name);
      addPropValue(content,value.toString());
      content.append(';');
    }
  }
}
Program: 77056
Project: 77056
Buggy source:
public DataSetID(String dataSetName){
  this.dataSetName=dataSetName;
}

Fixed version (ground truth):
/** 
 * create a dataset id of a normal query.
 * @param dataSetName can't be null.
 */
public DataSetID(String dataSetName){
  if (null == dataSetName) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.dataSetName=dataSetName;
}
Program: 77057
Project: 77057
Buggy source:
/** 
 * Get the foreground color.
 * @param handle The handle of design element.
 * @return fore ground color
 */
public int getForegroundColor(DesignElementHandle handle){
  Object obj=handle.getProperty(StyleHandle.COLOR_PROP);
  if (obj == null) {
    return 0x0;
  }
  if (obj instanceof String) {
    return ColorUtil.parseColor((String)obj);
  }
  return ((Integer)obj).intValue();
}

Fixed version (ground truth):
/** 
 * Get the foreground color.
 * @param handle The handle of design element.
 * @return fore ground color
 */
public int getForegroundColor(DesignElementHandle handle){
  Object obj=handle.getProperty(StyleHandle.COLOR_PROP);
  int color=handle.getPropertyHandle(StyleHandle.COLOR_PROP).getIntValue();
  if (obj == null) {
    return 0x0;
  }
  return color;
}
Program: 77058
Project: 77058
Buggy source:
/** 
 * Get the background color.
 * @param handle The handle of design element.
 * @return back ground color
 */
public int getBackgroundColor(DesignElementHandle handle){
  Object obj=handle.getProperty(StyleHandle.BACKGROUND_COLOR_PROP);
  if (obj == null) {
    return 0xFFFFFF;
  }
  if (obj instanceof String) {
    return ColorUtil.parseColor((String)obj);
  }
  return ((Integer)obj).intValue();
}

Fixed version (ground truth):
/** 
 * Get the background color.
 * @param handle The handle of design element.
 * @return back ground color
 */
public int getBackgroundColor(DesignElementHandle handle){
  Object obj=handle.getProperty(StyleHandle.BACKGROUND_COLOR_PROP);
  int color=handle.getPropertyHandle(StyleHandle.BACKGROUND_COLOR_PROP).getIntValue();
  if (obj == null) {
    return 0xFFFFFF;
  }
  return color;
}
Program: 77059
Project: 77059
Buggy source:
/** 
 * Convenient method to return the specified border color directly.
 * @return
 */
public int getTopBorderColor(){
  return ColorUtil.parseColor(topColor);
}

Fixed version (ground truth):
/** 
 * Convenient method to return the specified border color directly.
 * @return
 */
public int getTopBorderColor(){
  return topColor;
}
Program: 77060
Project: 77060
Buggy source:
/** 
 * Convenient method to return the specified border color directly.
 * @return
 */
public int getBottomBorderColor(){
  return ColorUtil.parseColor(bottomColor);
}

Fixed version (ground truth):
/** 
 * Convenient method to return the specified border color directly.
 * @return
 */
public int getBottomBorderColor(){
  return bottomColor;
}
Program: 77061
Project: 77061
Buggy source:
/** 
 * Convenient method to return the specified border color directly.
 * @return
 */
public int getRightBorderColor(){
  return ColorUtil.parseColor(rightColor);
}

Fixed version (ground truth):
/** 
 * Convenient method to return the specified border color directly.
 * @return
 */
public int getRightBorderColor(){
  return rightColor;
}
Program: 77062
Project: 77062
Buggy source:
/** 
 * Convenient method to return the specified border color directly.
 * @return
 */
public int getLeftBorderColor(){
  return ColorUtil.parseColor(leftColor);
}

Fixed version (ground truth):
/** 
 * Convenient method to return the specified border color directly.
 * @return
 */
public int getLeftBorderColor(){
  return leftColor;
}
Program: 77063
Project: 77063
Buggy source:
/** 
 * @param figure
 * @param g
 * @param side
 * @param style
 * @param width the border width array, arranged by {top, bottom, left, right};
 * @param color
 * @param insets
 */
protected void drawBorder(IFigure figure,Graphics g,int side,int style,int[] width,String color,Insets insets){
  Rectangle r=figure.getBounds().getCopy().crop(insets);
  if (style != 0) {
    g.setForegroundColor(ColorManager.getColor(ColorUtil.parseColor(color)));
    if (style == -2) {
      BorderUtil.drawDoubleLine(g,side,width,r);
    }
 else {
      BorderUtil.drawSingleLine(g,side,style,width,r);
    }
  }
 else {
    g.setForegroundColor(ReportColorConstants.ShadowLineColor);
    BorderUtil.drawDefaultLine(g,side,r);
  }
  g.restoreState();
}

Fixed version (ground truth):
/** 
 * @param figure
 * @param g
 * @param side
 * @param style
 * @param width the border width array, arranged by {top, bottom, left, right};
 * @param color
 * @param insets
 */
protected void drawBorder(IFigure figure,Graphics g,int side,int style,int[] width,int color,Insets insets){
  Rectangle r=figure.getBounds().getCopy().crop(insets);
  if (style != 0) {
    g.setForegroundColor(ColorManager.getColor(color));
    if (style == -2) {
      BorderUtil.drawDoubleLine(g,side,width,r);
    }
 else {
      BorderUtil.drawSingleLine(g,side,style,width,r);
    }
  }
 else {
    g.setForegroundColor(ReportColorConstants.ShadowLineColor);
    BorderUtil.drawDefaultLine(g,side,r);
  }
  g.restoreState();
}
Program: 77064
Project: 77064
Buggy source:
public void setBackgroundColor(Object obj){
  if (obj != null) {
    if (obj instanceof String) {
      backgroundColor=ColorUtil.parseColor((String)obj);
    }
 else {
      backgroundColor=((Integer)obj).intValue();
    }
  }
}

Fixed version (ground truth):
public void setBackgroundColor(int color){
  if (color != 0) {
    backgroundColor=color;
  }
}
Program: 77065
Project: 77065
Buggy source:
/** 
 * Draw border of the section
 * @param figure
 * @param g
 * @param in
 * @param side
 * @param style
 * @param width
 * @param color
 */
private void drawBorder(IFigure figure,Graphics g,Insets in,int side,int style,int[] width,String color){
  Rectangle r=figure.getBounds().getCropped(in);
  if (style != 0) {
    g.setForegroundColor(ColorManager.getColor(ColorUtil.parseColor(color)));
    if (style == -2) {
      BorderUtil.drawDoubleLine(g,side,width,r);
    }
 else {
      BorderUtil.drawSingleLine(g,side,style,width,r);
    }
  }
 else {
    g.setForegroundColor(ReportColorConstants.ShadowLineColor);
    BorderUtil.drawDefaultLine(g,side,r);
  }
  g.restoreState();
}

Fixed version (ground truth):
/** 
 * Draw border of the section
 * @param figure
 * @param g
 * @param in
 * @param side
 * @param style
 * @param width
 * @param color
 */
private void drawBorder(IFigure figure,Graphics g,Insets in,int side,int style,int[] width,int color){
  Rectangle r=figure.getBounds().getCropped(in);
  if (style != 0) {
    g.setForegroundColor(ColorManager.getColor(color));
    if (style == -2) {
      BorderUtil.drawDoubleLine(g,side,width,r);
    }
 else {
      BorderUtil.drawSingleLine(g,side,style,width,r);
    }
  }
 else {
    g.setForegroundColor(ReportColorConstants.ShadowLineColor);
    BorderUtil.drawDefaultLine(g,side,r);
  }
  g.restoreState();
}
Program: 77066
Project: 77066
Buggy source:
public void refreshFigure(){
  int color=getBackgroundColor((MasterPageHandle)getModel());
  getFigure().setBackgroundColor(ColorManager.getColor(color));
  Dimension size=getMasterPageSize((MasterPageHandle)getModel());
  Rectangle bounds=new Rectangle(0,0,size.width - 1,size.height - 1);
  ((AbstractPageFlowLayout)getFigure().getLayoutManager()).setInitSize(bounds);
  ReportDesignMarginBorder reportDesignMarginBorder=new ReportDesignMarginBorder(getMasterPageInsets((MasterPageHandle)getModel()));
  reportDesignMarginBorder.setBackgroundColor(((MasterPageHandle)getModel()).getProperty(StyleHandle.BACKGROUND_COLOR_PROP));
  getFigure().setBorder(reportDesignMarginBorder);
  refreshBackground((MasterPageHandle)getModel());
}

Fixed version (ground truth):
public void refreshFigure(){
  int color=getBackgroundColor((MasterPageHandle)getModel());
  getFigure().setBackgroundColor(ColorManager.getColor(color));
  Dimension size=getMasterPageSize((MasterPageHandle)getModel());
  Rectangle bounds=new Rectangle(0,0,size.width - 1,size.height - 1);
  ((AbstractPageFlowLayout)getFigure().getLayoutManager()).setInitSize(bounds);
  ReportDesignMarginBorder reportDesignMarginBorder=new ReportDesignMarginBorder(getMasterPageInsets((MasterPageHandle)getModel()));
  reportDesignMarginBorder.setBackgroundColor(((MasterPageHandle)getModel()).getPropertyHandle(StyleHandle.BACKGROUND_COLOR_PROP).getIntValue());
  getFigure().setBorder(reportDesignMarginBorder);
  refreshBackground((MasterPageHandle)getModel());
}
Program: 77067
Project: 77067
Buggy source:
public void refreshFigure(){
  SlotHandle slotHandle=((ModuleHandle)getModel()).getMasterPages();
  Iterator iter=slotHandle.iterator();
  SimpleMasterPageHandle masterPageHandle=(SimpleMasterPageHandle)iter.next();
  Dimension size=getMasterPageSize(masterPageHandle);
  Rectangle bounds=new Rectangle(0,0,size.width - 1,size.height - 1);
  ReportRootFigure figure=(ReportRootFigure)getFigure();
  figure.setShowMargin(showMargin);
  if (!showMargin) {
    Insets mg=getMasterPageInsets(masterPageHandle);
    bounds.width-=mg.getWidth();
    bounds.height-=mg.getHeight();
  }
  ((AbstractPageFlowLayout)getFigure().getLayoutManager()).setInitSize(bounds);
  ReportDesignMarginBorder reportDesignMarginBorder=new ReportDesignMarginBorder(getMasterPageInsets(masterPageHandle));
  reportDesignMarginBorder.setBackgroundColor(masterPageHandle.getProperty(StyleHandle.BACKGROUND_COLOR_PROP));
  getFigure().setBorder(reportDesignMarginBorder);
  int color=getBackgroundColor(masterPageHandle);
  getFigure().setBackgroundColor(ColorManager.getColor(color));
  refreshBackground(masterPageHandle);
}

Fixed version (ground truth):
public void refreshFigure(){
  SlotHandle slotHandle=((ModuleHandle)getModel()).getMasterPages();
  Iterator iter=slotHandle.iterator();
  SimpleMasterPageHandle masterPageHandle=(SimpleMasterPageHandle)iter.next();
  Dimension size=getMasterPageSize(masterPageHandle);
  Rectangle bounds=new Rectangle(0,0,size.width - 1,size.height - 1);
  ReportRootFigure figure=(ReportRootFigure)getFigure();
  figure.setShowMargin(showMargin);
  if (!showMargin) {
    Insets mg=getMasterPageInsets(masterPageHandle);
    bounds.width-=mg.getWidth();
    bounds.height-=mg.getHeight();
  }
  ((AbstractPageFlowLayout)getFigure().getLayoutManager()).setInitSize(bounds);
  ReportDesignMarginBorder reportDesignMarginBorder=new ReportDesignMarginBorder(getMasterPageInsets(masterPageHandle));
  reportDesignMarginBorder.setBackgroundColor(masterPageHandle.getPropertyHandle(StyleHandle.BACKGROUND_COLOR_PROP).getIntValue());
  getFigure().setBorder(reportDesignMarginBorder);
  int color=getBackgroundColor(masterPageHandle);
  getFigure().setBackgroundColor(ColorManager.getColor(color));
  refreshBackground(masterPageHandle);
}
Program: 77068
Project: 77068
Buggy source:
public static Test suite(){
  return new TestSuite(LibraryImportTest.class);
}

Fixed version (ground truth):
/** 
 * @return 
 */
public static Test suite(){
  return new TestSuite(LibraryImportTest.class);
}
Program: 77070
Project: 77070
Buggy source:
public LibraryImportTest(String name){
  super(name);
}

Fixed version (ground truth):
/** 
 * @param name
 */
public LibraryImportTest(String name){
  super(name);
}
Program: 77071
Project: 77071
Buggy source:
public static Test suite(){
  return new TestSuite(LibraryIncludeLibraryTest.class);
}

Fixed version (ground truth):
/** 
 * @return
 */
public static Test suite(){
  return new TestSuite(LibraryIncludeLibraryTest.class);
}
Program: 77072
Project: 77072
Buggy source:
public LibraryIncludeLibraryTest(String name){
  super(name);
}

Fixed version (ground truth):
/** 
 * @param name
 */
public LibraryIncludeLibraryTest(String name){
  super(name);
}
Program: 77073
Project: 77073
Buggy source:
public void testIncludeLibrary() throws Exception {
  openLibrary(inputLibraryName2);
  libraryHandle.includeLibrary(inputLibraryName1,"String_Node_Str");
  LibraryHandle libHandle=libraryHandle.getLibrary("String_Node_Str");
  TableHandle tableLibHandle=(TableHandle)libHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",tableLibHandle);
  DataSourceHandle dataSourceLibHandle=(DataSourceHandle)libHandle.findDataSource("String_Node_Str");
  assertNotNull("String_Node_Str",dataSourceLibHandle);
  DataSetHandle dataSetLibHandle=(DataSetHandle)libHandle.findDataSet("String_Node_Str");
  assertNotNull("String_Node_Str",dataSetLibHandle);
  TableHandle tableHandle=(TableHandle)libraryHandle.getElementFactory().newElementFrom(tableLibHandle,"String_Node_Str");
  DataSourceHandle dataSourceHandle=(DataSourceHandle)libraryHandle.getElementFactory().newOdaDataSource("String_Node_Str");
  DataSetHandle dataSetHandle=(DataSetHandle)libraryHandle.getElementFactory().newOdaDataSet("String_Node_Str");
  libraryHandle.getDataSources().add(dataSourceHandle);
  libraryHandle.getDataSets().add(dataSetHandle);
  assertNotNull(libraryHandle);
  super.saveLibraryAs(outputFileName);
  assertTrue(compareTextFile(goldenFileName,outputFileName));
}

Fixed version (ground truth):
/** 
 * @throws Exception
 */
public void testIncludeLibrary() throws Exception {
  openLibrary(inputLibraryName2);
  libraryHandle.includeLibrary(inputLibraryName1,"String_Node_Str");
  LibraryHandle libHandle=libraryHandle.getLibrary("String_Node_Str");
  TableHandle tableLibHandle=(TableHandle)libHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",tableLibHandle);
  DataSourceHandle dataSourceLibHandle=libHandle.findDataSource("String_Node_Str");
  assertNotNull("String_Node_Str",dataSourceLibHandle);
  DataSetHandle dataSetLibHandle=libHandle.findDataSet("String_Node_Str");
  assertNotNull("String_Node_Str",dataSetLibHandle);
  TableHandle tableHandle=(TableHandle)libraryHandle.getElementFactory().newElementFrom(tableLibHandle,"String_Node_Str");
  DataSourceHandle dataSourceHandle=libraryHandle.getElementFactory().newOdaDataSource("String_Node_Str");
  DataSetHandle dataSetHandle=libraryHandle.getElementFactory().newOdaDataSet("String_Node_Str");
  libraryHandle.getDataSources().add(dataSourceHandle);
  libraryHandle.getDataSets().add(dataSetHandle);
  assertNotNull(libraryHandle);
  super.saveLibraryAs(outputFileName);
  assertTrue(compareTextFile(goldenFileName,outputFileName));
}
Program: 77074
Project: 77074
Buggy source:
/** 
 * The constructor initializes a tiny image that provides a graphics context capable of performing computations in the absence of a visual component
 * @param _ids
 * @param _la
 */
public SwtTextMetrics(IDisplayServer _ids,Label _la){
  gc=new GC(((SwtDisplayServer)_ids).getDevice());
  ids=_ids;
  la=_la;
  reuse(la);
}

Fixed version (ground truth):
/** 
 * The constructor initializes a tiny image that provides a graphics context capable of performing computations in the absence of a visual component
 * @param _ids
 * @param _la
 */
public SwtTextMetrics(final IDisplayServer _ids,Label _la){
  final Display display=(Display)((SwtDisplayServer)_ids).getDevice();
  display.syncExec(new Runnable(){
    public void run(){
      gc=new GC(display);
    }
  }
);
  ids=_ids;
  la=_la;
  reuse(la);
}