nus-yam/ex-repair huggingface dataset:
Program: 76234
Project: 76234
Buggy source:
/** 
 * @param focus
 * @param info
 */
protected void propertyChange(Object focus,Map info){
  if (getViewer() == null) {
    return;
  }
  Object obj=getViewer().getEditPartRegistry().get(focus);
  if (obj instanceof ReportElementEditPart && !((ReportElementEditPart)obj).isDelete()) {
    ((ReportElementEditPart)obj).propertyChange(info);
    return;
  }
  List temp=new ArrayList();
  getEditPartsFormModel(this,focus,temp);
  int size=temp.size();
  for (int i=0; i < size; i++) {
    Object part=temp.get(i);
    if (part instanceof ReportElementEditPart && !((ReportElementEditPart)part).isDelete()) {
      ((ReportElementEditPart)part).propertyChange(info);
    }
  }
}

Fixed version (ground truth):
/** 
 * @param focus
 * @param info
 */
protected void propertyChange(Object focus,Map info){
  if (getViewer() == null) {
    return;
  }
  Object obj=getViewer().getEditPartRegistry().get(focus);
  if (obj instanceof ReportElementEditPart && !((ReportElementEditPart)obj).isDelete()) {
    ((ReportElementEditPart)obj).propertyChange(info);
  }
  List temp=new ArrayList();
  getEditPartsFormModel(this,focus,temp);
  int size=temp.size();
  for (int i=0; i < size; i++) {
    Object part=temp.get(i);
    if (part instanceof ReportElementEditPart && !((ReportElementEditPart)part).isDelete()) {
      ((ReportElementEditPart)part).propertyChange(info);
    }
  }
}
Program: 76235
Project: 76235
Buggy source:
public boolean handleValidate(Object obj){
  CrosstabReportItemHandle crosstab=getCrosstabCellHandle().getCrosstab();
  if (obj instanceof DimensionHandle) {
    if ((getPositionType().equals(ICrosstabCellAdapterFactory.CELL_LEVEL_HANDLE) || getPositionType().equals(ICrosstabCellAdapterFactory.CELL_FIRST_LEVEL_HANDLE)) && CrosstabUtil.canContain(crosstab,(DimensionHandle)obj)) {
      return true;
    }
  }
  if (obj instanceof MeasureHandle) {
    if (getPositionType().equals(ICrosstabCellAdapterFactory.CELL_MEASURE) && CrosstabUtil.canContain(crosstab,(MeasureHandle)obj)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean handleValidate(Object obj){
  if (obj instanceof Object[]) {
    Object[] objects=(Object[])obj;
    int len=objects.length;
    if (len != 1) {
      return false;
    }
    return handleValidate(objects[0]);
  }
  CrosstabReportItemHandle crosstab=getCrosstabCellHandle().getCrosstab();
  if (obj instanceof DimensionHandle) {
    if ((getPositionType().equals(ICrosstabCellAdapterFactory.CELL_LEVEL_HANDLE) || getPositionType().equals(ICrosstabCellAdapterFactory.CELL_FIRST_LEVEL_HANDLE)) && CrosstabUtil.canContain(crosstab,(DimensionHandle)obj)) {
      return true;
    }
  }
  if (obj instanceof MeasureHandle) {
    if (getPositionType().equals(ICrosstabCellAdapterFactory.CELL_MEASURE) && CrosstabUtil.canContain(crosstab,(MeasureHandle)obj)) {
      return true;
    }
  }
  return false;
}
Program: 76236
Project: 76236
Buggy source:
public void testCancel(){
  copyResource(REPORT_DESIGN_RESOURCE,REPORT_DESIGN);
  removeFile(REPORT_DOCUMENT);
  IReportEngine engine=createReportEngine();
  try {
    IReportRunnable report=engine.openReportDesign(REPORT_DESIGN);
    IRunTask task=engine.createRunTask(report);
    task.run(REPORT_DOCUMENT);
    task.close();
    IReportDocument doc=engine.openReportDocument(REPORT_DOCUMENT);
    assertEquals(3,doc.getPageCount());
    doc.close();
    engine.createRunTask(report);
    task.setErrorHandlingOption(IEngineTask.CANCEL_ON_ERROR);
    task.run(REPORT_DOCUMENT);
    task.close();
    doc=engine.openReportDocument(REPORT_DOCUMENT);
    assertTrue(3 > doc.getPageCount());
    doc.close();
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    fail();
  }
  ;
  engine.shutdown();
  removeFile(REPORT_DESIGN);
  removeFile(REPORT_DOCUMENT);
}

Fixed version (ground truth):
public void testCancel(){
  copyResource(REPORT_DESIGN_RESOURCE,REPORT_DESIGN);
  removeFile(REPORT_DOCUMENT);
  IReportEngine engine=createReportEngine();
  try {
    IReportRunnable report=engine.openReportDesign(REPORT_DESIGN);
    IRunTask task=engine.createRunTask(report);
    task.run(REPORT_DOCUMENT);
    task.close();
    IReportDocument doc=engine.openReportDocument(REPORT_DOCUMENT);
    assertEquals(3,doc.getPageCount());
    doc.close();
    task=engine.createRunTask(report);
    task.setErrorHandlingOption(IEngineTask.CANCEL_ON_ERROR);
    task.run(REPORT_DOCUMENT);
    task.close();
    doc=engine.openReportDocument(REPORT_DOCUMENT);
    assertTrue(3 > doc.getPageCount());
    doc.close();
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    fail();
  }
  ;
  engine.shutdown();
  removeFile(REPORT_DESIGN);
  removeFile(REPORT_DOCUMENT);
}
Program: 76237
Project: 76237
Buggy source:
/** 
 */
private void mappingParentColumnBinding(){
  if (baseQueryDefn instanceof ISubqueryDefinition) {
    Map parentBindings=baseQueryDefn.getParentQuery().getResultSetExpressions();
{
      Iterator it=parentBindings.keySet().iterator();
      while (it.hasNext()) {
        Object o=it.next();
        IBaseExpression expr=(IBaseExpression)parentBindings.get(o);
        if (expr instanceof IScriptExpression) {
          if (!ExpressionUtil.hasAggregation(((IScriptExpression)expr).getText())) {
            if (baseQueryDefn.getResultSetExpressions().get(o) == null) {
              baseQueryDefn.getResultSetExpressions().put(o,copyScriptExpr(expr));
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 */
private void mappingParentColumnBinding(){
  IBaseQueryDefinition queryDef=baseQueryDefn;
  while (queryDef instanceof ISubqueryDefinition) {
    queryDef=queryDef.getParentQuery();
    Map parentBindings=queryDef.getResultSetExpressions();
    addParentBindings(parentBindings);
  }
}
Program: 76238
Project: 76238
Buggy source:
/** 
 * create a PDF outline for tocNode, using the pol as the parent PDF outline.
 * @param tocNode		The tocNode whose kids need to build a PDF outline tree
 * @param pol			The parent PDF outline for these kids
 */
public void createTOC(TOCNode tocNode,PdfOutline pol){
  if (null == tocNode.getChildren())   return;
  for (Iterator i=tocNode.getChildren().iterator(); i.hasNext(); ) {
    TOCNode node=(TOCNode)i.next();
    PdfOutline outline=new PdfOutline(pol,PdfAction.gotoLocalPage(node.getBookmark(),false),node.getDisplayString());
    createTOC(node,outline);
  }
}

Fixed version (ground truth):
/** 
 * create a PDF outline for tocNode, using the pol as the parent PDF outline.
 * @param tocNode		The tocNode whose kids need to build a PDF outline tree
 * @param pol			The parent PDF outline for these kids
 */
public void createTOC(TOCNode tocNode,PdfOutline pol){
  if (null == tocNode.getChildren())   return;
  for (Iterator i=tocNode.getChildren().iterator(); i.hasNext(); ) {
    TOCNode node=(TOCNode)i.next();
    PdfOutline outline=new PdfOutline(pol,PdfAction.gotoLocalPage(node.getBookmark(),false),node.getDisplayString());
    IScriptStyle style=node.getTOCStyle();
    if (style instanceof StyleInstance) {
      StyleInstance instance=(StyleInstance)style;
      CSSValue color=instance.getProperty(StyleConstants.STYLE_COLOR);
      if (color != null && !color.equals(CSSValueConstants.BLACK_VALUE)) {
        outline.setColor(PropertyUtil.getColor(color));
      }
      int styleValue=Font.NORMAL;
      CSSValue fontStyle=instance.getProperty(StyleConstants.STYLE_FONT_STYLE);
      if (CSSValueConstants.OBLIQUE_VALUE.equals(fontStyle) || CSSValueConstants.ITALIC_VALUE.equals(fontStyle)) {
        styleValue|=Font.ITALIC;
      }
      if (PropertyUtil.isBoldFont(instance.getProperty(StyleConstants.STYLE_FONT_WEIGHT))) {
        styleValue|=Font.BOLD;
      }
      outline.setStyle(styleValue);
    }
    createTOC(node,outline);
  }
}
Program: 76239
Project: 76239
Buggy source:
private void closeReportDocument(){
  writer.close();
}

Fixed version (ground truth):
private void closeReportDocument(){
  writer.close();
  writer=null;
  archive=null;
  documentName=null;
}
Program: 76240
Project: 76240
Buggy source:
public void contextInitialized(ServletContextEvent event){
}

Fixed version (ground truth):
public void contextInitialized(ServletContextEvent event){
  ParameterAccessor.initParameters(event.getServletContext());
  IViewerReportService instance=new BirtViewerReportService(event.getServletContext());
  BirtReportServiceFactory.init(instance);
}
Program: 76241
Project: 76241
Buggy source:
/** 
 * Constructor.
 * @param servletContext
 * @param config
 */
private ReportEngineService(ServletContext servletContext){
  System.setProperty("String_Node_Str","String_Node_Str");
  if (servletContext == null) {
    return;
  }
  ParameterAccessor.initParameters(servletContext);
  config=new EngineConfig();
  HTMLRenderOption emitterConfig=new HTMLRenderOption();
  emitterConfig.setActionHandler(new HTMLActionHandler());
  imageHandler=new HTMLServerImageHandler();
  emitterConfig.setImageHandler(imageHandler);
  config.getEmitterConfigs().put("String_Node_Str",emitterConfig);
  imageBaseUrl=IBirtConstants.SERVLET_PATH_PREVIEW + "String_Node_Str";
  String logLevel=ParameterAccessor.logLevel;
  Level level=logLevel != null && logLevel.length() > 0 ? Level.parse(logLevel) : Level.OFF;
  config.setLogConfig(ParameterAccessor.logFolder,level);
  String scriptLibDir=ParameterAccessor.scriptLibDir;
  ArrayList jarFileList=new ArrayList();
  if (scriptLibDir != null) {
    File dir=new File(scriptLibDir);
    getAllJarFiles(dir,jarFileList);
  }
  String scriptlibClassPath="String_Node_Str";
  for (int i=0; i < jarFileList.size(); i++)   scriptlibClassPath+=EngineConstants.PROPERTYSEPARATOR + ((File)jarFileList.get(i)).getAbsolutePath();
  if (scriptlibClassPath.startsWith(EngineConstants.PROPERTYSEPARATOR))   scriptlibClassPath=scriptlibClassPath.substring(EngineConstants.PROPERTYSEPARATOR.length());
  System.setProperty(EngineConstants.WEBAPP_CLASSPATH_KEY,scriptlibClassPath);
  config.setEngineHome("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param servletContext
 * @param config
 */
private ReportEngineService(ServletContext servletContext){
  System.setProperty("String_Node_Str","String_Node_Str");
  if (servletContext == null) {
    return;
  }
  ParameterAccessor.initParameters(servletContext);
  config=new EngineConfig();
  HTMLRenderOption emitterConfig=new HTMLRenderOption();
  emitterConfig.setActionHandler(new HTMLActionHandler());
  imageHandler=new HTMLServerImageHandler();
  emitterConfig.setImageHandler(imageHandler);
  config.getEmitterConfigs().put("String_Node_Str",emitterConfig);
  imageBaseUrl=IBirtConstants.SERVLET_PATH_PREVIEW + "String_Node_Str";
  String logLevel=ParameterAccessor.logLevel;
  Level level=logLevel != null && logLevel.length() > 0 ? Level.parse(logLevel) : Level.OFF;
  config.setLogConfig(ParameterAccessor.logFolder,level);
  String scriptLibDir=ParameterAccessor.scriptLibDir;
  ArrayList jarFileList=new ArrayList();
  if (scriptLibDir != null) {
    File dir=new File(scriptLibDir);
    getAllJarFiles(dir,jarFileList);
  }
  String scriptlibClassPath="String_Node_Str";
  for (int i=0; i < jarFileList.size(); i++)   scriptlibClassPath+=EngineConstants.PROPERTYSEPARATOR + ((File)jarFileList.get(i)).getAbsolutePath();
  if (scriptlibClassPath.startsWith(EngineConstants.PROPERTYSEPARATOR))   scriptlibClassPath=scriptlibClassPath.substring(EngineConstants.PROPERTYSEPARATOR.length());
  config.setProperty(EngineConstants.WEBAPP_CLASSPATH_KEY,scriptlibClassPath);
  config.setEngineHome("String_Node_Str");
}
Program: 76242
Project: 76242
Buggy source:
/** 
 * Test getDefaultTOCStyle method.
 * @throws Exception
 */
public void testGetDefaultTOCStyle() throws Exception {
  StyleHandle styleHandle=session.getDefaultTOCStyle("String_Node_Str");
  assertNotNull(styleHandle);
  DimensionHandle dimension=styleHandle.getFontSize();
  assertNotNull(dimension);
  assertEquals("String_Node_Str",dimension.getValue());
  try {
    styleHandle.setCanShrink(false);
    fail();
  }
 catch (  IllegalOperationException e) {
    assertEquals(ReadOnlyActivityStack.MESSAGE,e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Test getDefaultTOCStyle method.
 * @throws Exception
 */
public void testGetDefaultTOCStyle() throws Exception {
  StyleHandle styleHandle=session.getDefaultTOCStyle(TOCHandle.defaultTOCPrefixName + "String_Node_Str");
  assertNotNull(styleHandle);
  DimensionHandle dimension=styleHandle.getFontSize();
  assertNotNull(dimension);
  assertEquals("String_Node_Str",dimension.getValue());
  try {
    styleHandle.setCanShrink(false);
    fail();
  }
 catch (  IllegalOperationException e) {
    assertEquals(ReadOnlyActivityStack.MESSAGE,e.getMessage());
  }
}
Program: 76243
Project: 76243
Buggy source:
/** 
 * Run nested query.
 */
private void runNestedQuery() throws Exception {
  IPreparedQuery preparedQueryCustomer=dataEngine.prepare(queryDefnCustomer);
  IPreparedQuery preparedQueryCall=dataEngine.prepare(queryDefnCall);
  ScriptContext scriptContext=new ScriptContext();
  IQueryResults queryResultsCustomer=preparedQueryCustomer.execute(scriptContext.getScope());
  IResultIterator resultItCustomer=queryResultsCustomer.getResultIterator();
  testPrintln("String_Node_Str");
  while (resultItCustomer.next()) {
    testPrint("String_Node_Str");
    testPrint(evalAsString(bindingNameCustomer[1],resultItCustomer));
    testPrint("String_Node_Str");
    testPrint(evalAsString(bindingNameCustomer[2],resultItCustomer));
    testPrintln("String_Node_Str");
    testPrint("String_Node_Str");
    testPrint(evalAsString(bindingNameCustomer[3],resultItCustomer));
    testPrintln("String_Node_Str");
    scriptContext.enterScope();
    IQueryResults queryResultsCalls=preparedQueryCall.execute(queryResultsCustomer,scriptContext.getScope());
    IResultIterator resultItCalls=queryResultsCalls.getResultIterator();
    while (resultItCalls.next()) {
      for (int i=1; i < expressionsCall.length; i++) {
        testPrint(evalAsString(bindingNameCall[i],resultItCalls));
        testPrint("String_Node_Str");
      }
      testPrintln("String_Node_Str");
    }
    scriptContext.exitScope();
    testPrintln("String_Node_Str");
  }
  scriptContext.exit();
  checkOutputFile();
}

Fixed version (ground truth):
/** 
 * Run nested query.
 */
private void runNestedQuery() throws Exception {
  IPreparedQuery preparedQueryCustomer=dataEngine.prepare(queryDefnCustomer,this.getAppContext());
  IPreparedQuery preparedQueryCall=dataEngine.prepare(queryDefnCall,this.getAppContext());
  ScriptContext scriptContext=new ScriptContext();
  IQueryResults queryResultsCustomer=preparedQueryCustomer.execute(scriptContext.getScope());
  IResultIterator resultItCustomer=queryResultsCustomer.getResultIterator();
  testPrintln("String_Node_Str");
  while (resultItCustomer.next()) {
    testPrint("String_Node_Str");
    testPrint(evalAsString(bindingNameCustomer[1],resultItCustomer));
    testPrint("String_Node_Str");
    testPrint(evalAsString(bindingNameCustomer[2],resultItCustomer));
    testPrintln("String_Node_Str");
    testPrint("String_Node_Str");
    testPrint(evalAsString(bindingNameCustomer[3],resultItCustomer));
    testPrintln("String_Node_Str");
    scriptContext.enterScope();
    IQueryResults queryResultsCalls=preparedQueryCall.execute(queryResultsCustomer,scriptContext.getScope());
    IResultIterator resultItCalls=queryResultsCalls.getResultIterator();
    while (resultItCalls.next()) {
      for (int i=1; i < expressionsCall.length; i++) {
        testPrint(evalAsString(bindingNameCall[i],resultItCalls));
        testPrint("String_Node_Str");
      }
      testPrintln("String_Node_Str");
    }
    scriptContext.exitScope();
    testPrintln("String_Node_Str");
  }
  scriptContext.exit();
  checkOutputFile();
}
Program: 76244
Project: 76244
Buggy source:
public void contextInitialized(ServletContextEvent event){
  ParameterAccessor.initParameters(event.getServletContext());
  IViewerReportService instance=new BirtViewerReportService(event.getServletContext());
  BirtReportServiceFactory.init(instance);
}

Fixed version (ground truth):
public void contextInitialized(ServletContextEvent event){
}
Program: 76245
Project: 76245
Buggy source:
public EditPart createEditPart(EditPart context,Object model){
  if (context instanceof CrosstabCellEditPart) {
    if (model instanceof DataItemHandle) {
      String position=((CrosstabCellEditPart)context).getCrosstabCellAdapter().getPositionType();
      if (ICrosstabCellAdapterFactory.CELL_FIRST_LEVEL_HANDLE.equals(position) || ICrosstabCellAdapterFactory.CELL_MEASURE.equals(position)) {
        FirstLevelHandleDataItemEditPart first=new FirstLevelHandleDataItemEditPart(model);
        first.setManager(createMenuManager(position,context.getViewer()));
        return first;
      }
 else       if (ICrosstabCellAdapterFactory.CELL_LEVEL_HANDLE.equals(position)) {
        return new LevelHandleDataItemEditPart(model);
      }
 else       if (ICrosstabCellAdapterFactory.CELL_MEASURE_HEADER.equals(position)) {
        return new MeasureHandleDataItemEditPart(model);
      }
    }
  }
  if (model instanceof VirtualCrosstabCellAdapter) {
    return new VirtualCellEditPart(model);
  }
  if (model instanceof CrosstabCellAdapter) {
    return new CrosstabCellEditPart(model);
  }
  return null;
}

Fixed version (ground truth):
public EditPart createEditPart(EditPart context,Object model){
  if (context instanceof CrosstabCellEditPart) {
    if (model instanceof DataItemHandle) {
      CrosstabCellAdapter adapter=((CrosstabCellEditPart)context).getCrosstabCellAdapter();
      String position=adapter.getPositionType();
      if ((ICrosstabCellAdapterFactory.CELL_FIRST_LEVEL_HANDLE.equals(position) || ICrosstabCellAdapterFactory.CELL_MEASURE.equals(position)) && adapter.getFirstDataItem() == model) {
        FirstLevelHandleDataItemEditPart first=new FirstLevelHandleDataItemEditPart(model);
        first.setManager(createMenuManager(position,context.getViewer()));
        return first;
      }
 else       if (ICrosstabCellAdapterFactory.CELL_LEVEL_HANDLE.equals(position)) {
        return new LevelHandleDataItemEditPart(model);
      }
 else       if (ICrosstabCellAdapterFactory.CELL_MEASURE_HEADER.equals(position)) {
        return new MeasureHandleDataItemEditPart(model);
      }
    }
  }
  if (model instanceof VirtualCrosstabCellAdapter) {
    return new VirtualCellEditPart(model);
  }
  if (model instanceof CrosstabCellAdapter) {
    return new CrosstabCellEditPart(model);
  }
  return null;
}
Program: 76246
Project: 76246
Buggy source:
public boolean equals(Object obj){
  if (obj == getCrosstabItemHandle()) {
    return true;
  }
  if (obj instanceof CrosstabCellAdapter) {
    return getCrosstabItemHandle() == ((CrosstabCellAdapter)obj).getCrosstabItemHandle() && getPositionType() == ((CrosstabCellAdapter)obj).getPositionType();
  }
  return super.equals(obj);
}

Fixed version (ground truth):
public boolean equals(Object obj){
  return super.equals(obj);
}
Program: 76247
Project: 76247
Buggy source:
public boolean equals(Object obj){
  if (obj == getCrosstabItemHandle()) {
    return true;
  }
  if (obj instanceof CrosstabHandleAdapter) {
    return getCrosstabItemHandle() == ((CrosstabHandleAdapter)obj).getCrosstabItemHandle();
  }
  return super.equals(obj);
}

Fixed version (ground truth):
public boolean equals(Object obj){
  return super.equals(obj);
}
Program: 76249
Project: 76249
Buggy source:
public void testGetErrors(){
  report_design=INPUT + "String_Node_Str";
  copyResource_INPUT("String_Node_Str","String_Node_Str");
  String fileDocument=OUTPUT + "String_Node_Str";
  try {
    runnable=engine.openReportDesign(report_design);
    IRunTask task=engine.createRunTask(runnable);
    task.run(fileDocument);
    if (task != null) {
      assertTrue("String_Node_Str",task.getErrors() != null);
      assertTrue("String_Node_Str",task.getErrors().get(0).getClass().toString().equalsIgnoreCase("String_Node_Str"));
    }
    task.close();
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
public void testGetErrors(){
  report_design=INPUT + "String_Node_Str";
  copyResource_INPUT("String_Node_Str","String_Node_Str");
  String fileDocument=OUTPUT + "String_Node_Str";
  try {
    runnable=engine.openReportDesign(report_design);
    IRunTask task=engine.createRunTask(runnable);
    task.run(fileDocument);
    if (task != null) {
      assertTrue("String_Node_Str",task.getErrors() != null);
      assertTrue(task.getErrors().get(0).getClass().toString().indexOf("String_Node_Str") > 0);
    }
    task.close();
  }
 catch (  Exception e) {
  }
}
Program: 76250
Project: 76250
Buggy source:
private void runReport(String report){
  report_design=INPUT + report + "String_Node_Str";
  copyResource_INPUT(report + "String_Node_Str",report + "String_Node_Str");
  String fileDocument=OUTPUT + report + "String_Node_Str";
  String folderDocument=OUTPUT + "String_Node_Str" + report+ separator;
  try {
    runnable=engine.openReportDesign(report_design);
    IRunTask task=engine.createRunTask(runnable);
    task.run(fileDocument);
    task.run(folderDocument);
    task.close();
    assertTrue("String_Node_Str" + report,new File(fileDocument).exists());
    assertTrue("String_Node_Str" + report,new File(folderDocument).exists());
  }
 catch (  EngineException ee) {
    ee.printStackTrace();
    assertTrue("String_Node_Str" + report + ee.getLocalizedMessage(),false);
  }
}

Fixed version (ground truth):
private void runReport(String report){
  report_design=INPUT + report + "String_Node_Str";
  copyResource_INPUT(report + "String_Node_Str",report + "String_Node_Str");
  String fileDocument=OUTPUT + report + "String_Node_Str";
  String folderDocument=OUTPUT + "String_Node_Str" + report+ separator;
  try {
    runnable=engine.openReportDesign(report_design);
    IRunTask task=engine.createRunTask(runnable);
    task.run(fileDocument);
    task.close();
    task=engine.createRunTask(runnable);
    task.run(folderDocument);
    task.close();
    assertTrue("String_Node_Str" + report,new File(fileDocument).exists());
    assertTrue("String_Node_Str" + report,new File(folderDocument).exists());
  }
 catch (  EngineException ee) {
    ee.printStackTrace();
    assertTrue("String_Node_Str" + report + ee.getLocalizedMessage(),false);
  }
}
Program: 76251
Project: 76251
Buggy source:
protected DragTracker createDragTracker(){
  CrosstabHandleAdapter adapter=((CrosstabTableEditPart)getOwner().getParent()).getCrosstabHandleAdapter();
  if (cursorDirection == PositionConstants.EAST && (adapter.getColumnOprationCell(start) != null || adapter.getColumnOprationCell(end) != null)) {
    return new CrosstabColumnDragTracker(getOwner(),start,end);
  }
  if (cursorDirection == PositionConstants.SOUTH && adapter.getRowOprationCell(start) != null) {
    return new CrosstabRowDragTracker(getOwner(),start,end);
  }
  return new ResizeTracker(getOwner(),cursorDirection){
    protected void showTargetFeedback(){
    }
    protected void eraseTargetFeedback(){
    }
    protected void showSourceFeedback(){
    }
    protected void eraseSourceFeedback(){
    }
  }
;
}

Fixed version (ground truth):
protected DragTracker createDragTracker(){
  CrosstabHandleAdapter adapter=((CrosstabTableEditPart)getOwner().getParent()).getCrosstabHandleAdapter();
  if (cursorDirection == PositionConstants.EAST && (adapter.getColumnOprationCell(start) != null || adapter.getColumnOprationCell(end) != null)) {
    return new CrosstabColumnDragTracker(getOwner(),start,end);
  }
  if (cursorDirection == PositionConstants.SOUTH && adapter.getRowOprationCell(start) != null) {
    return new CrosstabRowDragTracker(getOwner(),start,end);
  }
  return new ResizeTracker(getOwner(),cursorDirection){
    protected void showTargetFeedback(){
    }
    protected void eraseTargetFeedback(){
    }
    protected void showSourceFeedback(){
    }
    protected void eraseSourceFeedback(){
    }
    protected Command getCommand(){
      return UnexecutableCommand.INSTANCE;
    }
  }
;
}
Program: 76255
Project: 76255
Buggy source:
public void setDataSet(String datasetName){
  boolean needClean=false;
  boolean needAddBinding=false;
  try {
    if (datasetName == null) {
      if (getReportDataSet() != null) {
        itemHandle.setDataSet(null);
        needClean=true;
      }
    }
 else {
      DataSetHandle dataset=getReportDesignHandle().findDataSet(datasetName);
      if (itemHandle.getDataSet() != dataset) {
        itemHandle.setDataSet(dataset);
        needClean=true;
        needAddBinding=true;
      }
    }
    if (needClean) {
      itemHandle.getPropertyHandle(ReportItemHandle.PARAM_BINDINGS_PROP).clearValue();
      itemHandle.getPropertyHandle(ExtendedItemHandle.FILTER_PROP).clearValue();
      itemHandle.getColumnBindings().clearValue();
    }
    if (needAddBinding) {
      List columnList=generateComputedColumns(itemHandle);
      if (columnList.size() > 0) {
        for (Iterator iter=columnList.iterator(); iter.hasNext(); ) {
          DEUtil.addColumn(itemHandle,(ComputedColumn)iter.next(),false);
        }
      }
    }
  }
 catch (  SemanticException e) {
    ChartWizard.showException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public void setDataSet(String datasetName){
  boolean needClean=false;
  boolean needAddBinding=false;
  try {
    if (datasetName == null) {
      if (getReportDataSet() != null || getBoundDataSet() != null) {
        itemHandle.setDataSet(null);
        needClean=true;
      }
    }
 else {
      DataSetHandle dataset=getReportDesignHandle().findDataSet(datasetName);
      if (itemHandle.getDataSet() != dataset) {
        itemHandle.setDataSet(dataset);
        needClean=true;
        needAddBinding=true;
      }
    }
    if (needClean) {
      itemHandle.getPropertyHandle(ReportItemHandle.PARAM_BINDINGS_PROP).clearValue();
      itemHandle.getPropertyHandle(ExtendedItemHandle.FILTER_PROP).clearValue();
      itemHandle.getColumnBindings().clearValue();
    }
    if (needAddBinding) {
      List columnList=generateComputedColumns(itemHandle);
      if (columnList.size() > 0) {
        for (Iterator iter=columnList.iterator(); iter.hasNext(); ) {
          DEUtil.addColumn(itemHandle,(ComputedColumn)iter.next(),false);
        }
      }
    }
  }
 catch (  SemanticException e) {
    ChartWizard.showException(e.getLocalizedMessage());
  }
}
Program: 76256
Project: 76256
Buggy source:
protected void init(){
  String currentDataSet=getDataServiceProvider().getBoundDataSet();
  if (currentDataSet != null) {
    cmbDataSet.setItems(getDataServiceProvider().getAllDataSets());
    cmbDataSet.setText((currentDataSet == null) ? BLANK_DATASET : currentDataSet);
    useReportDataSet(false);
    if (currentDataSet != null) {
      switchDataTable();
    }
  }
 else {
    useReportDataSet(true);
    String reportDataSet=getDataServiceProvider().getReportDataSet();
    if (reportDataSet != null) {
      switchDataTable();
    }
  }
  btnFilters.setEnabled(hasDataSet() && getDataServiceProvider().isInvokingSupported());
  btnParameters.setEnabled(hasDataSet() && getDataServiceProvider().isInvokingSupported());
  btnBinding.setEnabled(hasDataSet() && getDataServiceProvider().isInvokingSupported());
  btnFilters.setVisible(getDataServiceProvider().isEclipseModeSupported());
  btnParameters.setVisible(getDataServiceProvider().isEclipseModeSupported());
  btnBinding.setVisible(getDataServiceProvider().isEclipseModeSupported());
}

Fixed version (ground truth):
protected void init(){
  String currentDataSet=getDataServiceProvider().getBoundDataSet();
  if (currentDataSet != null) {
    cmbDataSet.setItems(getDataServiceProvider().getAllDataSets());
    cmbDataSet.setText((currentDataSet == null) ? BLANK_DATASET : currentDataSet);
    useReportDataSet(false);
    if (currentDataSet != null) {
      switchDataTable();
    }
  }
 else {
    useReportDataSet(true);
    String reportDataSet=getDataServiceProvider().getReportDataSet();
    if (reportDataSet != null) {
      switchDataTable();
    }
  }
  btnFilters.setEnabled(hasDataSet() && getDataServiceProvider().isInvokingSupported());
  btnParameters.setEnabled(getDataServiceProvider().getBoundDataSet() != null && getDataServiceProvider().isInvokingSupported());
  btnBinding.setEnabled(hasDataSet() && getDataServiceProvider().isInvokingSupported());
  btnFilters.setVisible(getDataServiceProvider().isEclipseModeSupported());
  btnParameters.setVisible(getDataServiceProvider().isEclipseModeSupported());
  btnBinding.setVisible(getDataServiceProvider().isEclipseModeSupported());
}
Program: 76258
Project: 76258
Buggy source:
/** 
 * Convert Scalar Parameter Definition
 * @param engineParam
 * @param group
 * @return
 */
private static ParameterDefinition convertScalarParameter(IScalarParameterDefn engineParam,ParameterGroupDefinition group){
  Object handle=engineParam.getHandle();
  ScalarParameterHandle scalarParamHandle=null;
  if (handle instanceof ScalarParameterHandle)   scalarParamHandle=(ScalarParameterHandle)handle;
  String name=engineParam.getName();
  long id=scalarParamHandle != null ? scalarParamHandle.getID() : 0L;
  String pattern=scalarParamHandle == null ? "String_Node_Str" : scalarParamHandle.getPattern();
  String displayFormat=engineParam.getDisplayFormat();
  String displayName=engineParam.getDisplayName();
  String helpText=engineParam.getHelpText();
  String promptText=engineParam.getPromptText();
  int dataType=engineParam.getDataType();
  String valueExpr=scalarParamHandle == null ? null : scalarParamHandle.getValueExpr();
  int controlType=engineParam.getControlType();
  boolean hidden=engineParam.isHidden();
  boolean allowNull=engineParam.allowNull();
  boolean allowBlank=engineParam.allowBlank();
  boolean mustMatch=scalarParamHandle == null ? false : scalarParamHandle.isMustMatch();
  boolean concealValue=engineParam.isValueConcealed();
  ParameterDefinition param=new ParameterDefinition(id,name,pattern,displayFormat,displayName,helpText,promptText,dataType,valueExpr,controlType,hidden,allowNull,allowBlank,mustMatch,concealValue,group,null);
  return param;
}

Fixed version (ground truth):
/** 
 * Convert Scalar Parameter Definition
 * @param engineParam
 * @param group
 * @return
 */
private static ParameterDefinition convertScalarParameter(IScalarParameterDefn engineParam,ParameterGroupDefinition group){
  Object handle=engineParam.getHandle();
  ScalarParameterHandle scalarParamHandle=null;
  if (handle instanceof ScalarParameterHandle)   scalarParamHandle=(ScalarParameterHandle)handle;
  String name=engineParam.getName();
  long id=scalarParamHandle != null ? scalarParamHandle.getID() : 0L;
  String pattern=scalarParamHandle == null ? "String_Node_Str" : scalarParamHandle.getPattern();
  String displayFormat=engineParam.getDisplayFormat();
  String displayName=engineParam.getDisplayName();
  String helpText=engineParam.getHelpText();
  String promptText=engineParam.getPromptText();
  int dataType=engineParam.getDataType();
  String valueExpr=scalarParamHandle == null ? null : scalarParamHandle.getValueExpr();
  int controlType=engineParam.getControlType();
  boolean hidden=engineParam.isHidden();
  boolean allowNull=engineParam.allowNull();
  boolean allowBlank=engineParam.allowBlank();
  boolean isRequired=engineParam.isRequired();
  boolean mustMatch=scalarParamHandle == null ? false : scalarParamHandle.isMustMatch();
  boolean concealValue=engineParam.isValueConcealed();
  ParameterDefinition param=new ParameterDefinition(id,name,pattern,displayFormat,displayName,helpText,promptText,dataType,valueExpr,controlType,hidden,allowNull,allowBlank,isRequired,mustMatch,concealValue,group,null);
  return param;
}
Program: 76259
Project: 76259
Buggy source:
public boolean allowBlank(){
  return allowBlank;
}

Fixed version (ground truth):
/** 
 * @deprecated
 * @return
 */
public boolean allowBlank(){
  return allowBlank;
}
Program: 76260
Project: 76260
Buggy source:
public boolean allowNull(){
  return allowNull;
}

Fixed version (ground truth):
/** 
 * @deprecated
 * @return
 */
public boolean allowNull(){
  return allowNull;
}
Program: 76261
Project: 76261
Buggy source:
public ParameterDefinition(long id,String name,String pattern,String displayFormat,String displayName,String helpText,String promptText,int dataType,String valueExpr,int controlType,boolean hidden,boolean allowNull,boolean allowBlank,boolean mustMatch,boolean concealValue,ParameterGroupDefinition group,Collection selectionList){
  this.id=id;
  this.name=name;
  this.pattern=pattern;
  this.displayFormat=displayFormat;
  this.displayName=displayName;
  this.helpText=helpText;
  this.promptText=promptText;
  this.dataType=dataType;
  this.valueExpr=valueExpr;
  this.controlType=controlType;
  this.hidden=hidden;
  this.allowNull=allowNull;
  this.allowBlank=allowBlank;
  this.mustMatch=mustMatch;
  this.concealValue=concealValue;
  this.group=group;
  this.selectionList=selectionList;
}

Fixed version (ground truth):
public ParameterDefinition(long id,String name,String pattern,String displayFormat,String displayName,String helpText,String promptText,int dataType,String valueExpr,int controlType,boolean hidden,boolean allowNull,boolean allowBlank,boolean isRequired,boolean mustMatch,boolean concealValue,ParameterGroupDefinition group,Collection selectionList){
  this.id=id;
  this.name=name;
  this.pattern=pattern;
  this.displayFormat=displayFormat;
  this.displayName=displayName;
  this.helpText=helpText;
  this.promptText=promptText;
  this.dataType=dataType;
  this.valueExpr=valueExpr;
  this.controlType=controlType;
  this.hidden=hidden;
  this.allowNull=allowNull;
  this.allowBlank=allowBlank;
  this.isRequired=isRequired;
  this.mustMatch=mustMatch;
  this.concealValue=concealValue;
  this.group=group;
  this.selectionList=selectionList;
}
Program: 76262
Project: 76262
Buggy source:
/** 
 * Anything before do service.
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
protected void doPreService(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  String format=ParameterAccessor.getFormat(request);
  String openType=ParameterAccessor.getOpenType(request);
  if (IBirtConstants.SERVLET_PATH_DOWNLOAD.equalsIgnoreCase(request.getServletPath())) {
    response.setContentType("String_Node_Str");
    response.setHeader("String_Node_Str","String_Node_Str");
  }
 else {
    if (ParameterAccessor.PARAM_FORMAT_PDF.equalsIgnoreCase(format)) {
      response.setContentType("String_Node_Str");
    }
 else {
      String mimeType=ReportEngineService.getInstance().getMIMEType(format);
      if (mimeType != null && mimeType.length() > 0)       response.setContentType(mimeType);
 else       response.setContentType("String_Node_Str");
    }
    if (!ParameterAccessor.isGetImageOperator(request)) {
      String filename=ParameterAccessor.generateFileName(request);
      response.setHeader("String_Node_Str",openType + "String_Node_Str" + filename+ "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Anything before do service.
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
protected void doPreService(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  String format=ParameterAccessor.getFormat(request);
  String openType=ParameterAccessor.getOpenType(request);
  if (IBirtConstants.SERVLET_PATH_DOWNLOAD.equalsIgnoreCase(request.getServletPath())) {
    response.setContentType("String_Node_Str");
    response.setHeader("String_Node_Str","String_Node_Str");
  }
 else {
    if (ParameterAccessor.PARAM_FORMAT_PDF.equalsIgnoreCase(format)) {
      response.setContentType("String_Node_Str");
    }
 else {
      String mimeType=ReportEngineService.getInstance().getMIMEType(format);
      if (mimeType != null && mimeType.length() > 0)       response.setContentType(mimeType);
 else       response.setContentType("String_Node_Str");
    }
    if (!ParameterAccessor.isGetImageOperator(request)) {
      String filename=ParameterAccessor.generateFileName(request,format);
      response.setHeader("String_Node_Str",openType + "String_Node_Str" + filename+ "String_Node_Str");
    }
  }
}
Program: 76263
Project: 76263
Buggy source:
/** 
 * Anything before do service.
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
protected void doPreService(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  BaseAttributeBean attrBean=(BaseAttributeBean)request.getAttribute(IBirtConstants.ATTRIBUTE_BEAN);
  String format=attrBean.getFormat();
  String openType=ParameterAccessor.getOpenType(request);
  if (ParameterAccessor.PARAM_FORMAT_PDF.equalsIgnoreCase(format)) {
    response.setContentType("String_Node_Str");
  }
 else {
    String mimeType=ReportEngineService.getInstance().getMIMEType(format);
    if (mimeType != null && mimeType.length() > 0)     response.setContentType(mimeType);
 else     response.setContentType("String_Node_Str");
  }
  String filename=ParameterAccessor.generateFileName(request);
  response.setHeader("String_Node_Str",openType + "String_Node_Str" + filename+ "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Anything before do service.
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
protected void doPreService(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  BaseAttributeBean attrBean=(BaseAttributeBean)request.getAttribute(IBirtConstants.ATTRIBUTE_BEAN);
  String format=attrBean.getFormat();
  String openType=ParameterAccessor.getOpenType(request);
  if (ParameterAccessor.PARAM_FORMAT_PDF.equalsIgnoreCase(format)) {
    response.setContentType("String_Node_Str");
  }
 else {
    String mimeType=ReportEngineService.getInstance().getMIMEType(format);
    if (mimeType != null && mimeType.length() > 0)     response.setContentType(mimeType);
 else     response.setContentType("String_Node_Str");
  }
  String filename=ParameterAccessor.generateFileName(request,format);
  response.setHeader("String_Node_Str",openType + "String_Node_Str" + filename+ "String_Node_Str");
}
Program: 76264
Project: 76264
Buggy source:
/** 
 * Generates a file name for the pdf output.
 * @param request
 * @return the file name
 */
public static String generateFileName(HttpServletRequest request){
  String defaultName="String_Node_Str";
  String fileName=defaultName;
  BaseAttributeBean attrBean=(BaseAttributeBean)request.getAttribute(IBirtConstants.ATTRIBUTE_BEAN);
  if (attrBean == null)   return fileName;
  String baseName=attrBean.getReportDesignName();
  if (baseName == null || baseName.length() == 0)   baseName=attrBean.getReportDocumentName();
  if (baseName == null || baseName.trim().length() <= 0)   return fileName;
  int index=baseName.lastIndexOf('/');
  if (index == -1)   index=baseName.lastIndexOf('\\');
  if (index != -1) {
    baseName=baseName.substring(index + 1);
  }
  int dotIndex=baseName.lastIndexOf('.');
  if (dotIndex > 0) {
    fileName=baseName.substring(0,dotIndex);
  }
  for (int i=0; i < fileName.length(); i++) {
    char c=fileName.charAt(i);
    if (c < 0x00 || c >= 0x80) {
      fileName=defaultName;
      break;
    }
  }
  return fileName;
}

Fixed version (ground truth):
/** 
 * Generates a file name for output attachment.
 * @param request
 * @param format
 * @return the file name
 */
public static String generateFileName(HttpServletRequest request,String format){
  String defaultName="String_Node_Str";
  String fileName=defaultName;
  BaseAttributeBean attrBean=(BaseAttributeBean)request.getAttribute(IBirtConstants.ATTRIBUTE_BEAN);
  if (attrBean == null)   return fileName;
  String baseName=attrBean.getReportDesignName();
  if (baseName == null || baseName.length() == 0)   baseName=attrBean.getReportDocumentName();
  if (baseName == null || baseName.trim().length() <= 0)   return fileName;
  int index=baseName.lastIndexOf('/');
  if (index == -1)   index=baseName.lastIndexOf('\\');
  if (index != -1) {
    baseName=baseName.substring(index + 1);
  }
  int dotIndex=baseName.lastIndexOf('.');
  if (dotIndex > 0) {
    fileName=baseName.substring(0,dotIndex);
  }
  for (int i=0; i < fileName.length(); i++) {
    char c=fileName.charAt(i);
    if (c < 0x00 || c >= 0x80) {
      fileName=defaultName;
      break;
    }
  }
  String extensionName=getExtensionName(format);
  if (extensionName != null && extensionName.length() > 0) {
    fileName+="String_Node_Str" + extensionName;
  }
  return fileName;
}
Program: 76265
Project: 76265
Buggy source:
public void copyResource(String src,String tgt){
  InputStream in=getClass().getClassLoader().getResourceAsStream(src);
  assertTrue(in != null);
  try {
    int size=in.available();
    byte[] buffer=new byte[size];
    in.read(buffer);
    OutputStream out=new FileOutputStream(tgt);
    out.write(buffer);
    out.close();
    in.close();
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    fail();
  }
}

Fixed version (ground truth):
public void copyResource(String src,String tgt){
  InputStream in=getClass().getClassLoader().getResourceAsStream(src);
  assertTrue(in != null);
  try {
    FileOutputStream fos=new FileOutputStream(tgt);
    byte[] fileData=new byte[5120];
    int readCount=-1;
    while ((readCount=in.read(fileData)) != -1) {
      fos.write(fileData,0,readCount);
    }
    fos.close();
    in.close();
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    fail();
  }
}
Program: 76268
Project: 76268
Buggy source:
/** 
 * Process exception for non soap request.
 * @param request incoming http request
 * @param response http response
 * @param exception
 * @throws ServletException
 * @throws IOException
 */
protected void __handleNonSoapException(HttpServletRequest request,HttpServletResponse response,Exception exception) throws ServletException, IOException {
  exception.printStackTrace();
  String target="String_Node_Str";
  request.setAttribute("String_Node_Str",exception);
  RequestDispatcher rd=request.getRequestDispatcher(target);
  rd.include(request,response);
}

Fixed version (ground truth):
/** 
 * Process exception for non soap request.
 * @param request incoming http request
 * @param response http response
 * @param exception
 * @throws ServletException
 * @throws IOException
 */
protected void __handleNonSoapException(HttpServletRequest request,HttpServletResponse response,Exception exception) throws ServletException, IOException {
  exception.printStackTrace();
  BirtUtility.appendErrorMessage(response.getOutputStream(),exception);
}
Program: 76269
Project: 76269
Buggy source:
/** 
 * Process exception for non soap request.
 * @param request incoming http request
 * @param response http response
 * @param exception
 * @throws ServletException
 * @throws IOException
 */
protected void __handleNonSoapException(HttpServletRequest request,HttpServletResponse response,Exception exception) throws ServletException, IOException {
  exception.printStackTrace();
  String target="String_Node_Str";
  request.setAttribute("String_Node_Str",exception);
  RequestDispatcher rd=request.getRequestDispatcher(target);
  rd.include(request,response);
}

Fixed version (ground truth):
/** 
 * Process exception for non soap request.
 * @param request incoming http request
 * @param response http response
 * @param exception
 * @throws ServletException
 * @throws IOException
 */
protected void __handleNonSoapException(HttpServletRequest request,HttpServletResponse response,Exception exception) throws ServletException, IOException {
  exception.printStackTrace();
  BirtUtility.appendErrorMessage(response.getOutputStream(),exception);
}
Program: 76270
Project: 76270
Buggy source:
/** 
 * Write message into output stream.
 * @param out
 * @param message
 * @param msgType
 */
public static void writeMessage(OutputStream out,String content,String msgType) throws IOException {
  String fontColor="String_Node_Str";
  if (IBirtConstants.MSG_ERROR.equalsIgnoreCase(msgType))   fontColor="String_Node_Str";
  String message="String_Node_Str" + BirtResources.getMessage("String_Node_Str" + msgType) + "String_Node_Str"+ fontColor+ "String_Node_Str"+ content+ "String_Node_Str";
  out.write(message.getBytes());
  out.flush();
  out.close();
}

Fixed version (ground truth):
/** 
 * Write message into output stream.
 * @param out
 * @param message
 * @param msgType
 */
public static void writeMessage(OutputStream out,String content,String msgType) throws IOException {
  String fontColor="String_Node_Str";
  if (IBirtConstants.MSG_ERROR.equalsIgnoreCase(msgType))   fontColor="String_Node_Str";
  String message="String_Node_Str" + BirtResources.getMessage("String_Node_Str" + msgType) + "String_Node_Str";
  message+="String_Node_Str";
  message+="String_Node_Str" + fontColor + "String_Node_Str"+ content+ "String_Node_Str";
  out.write(message.getBytes());
  out.flush();
  out.close();
}
Program: 76271
Project: 76271
Buggy source:
public IResultSetMetaData getMetaData() throws OdaException {
  logger.logp(java.util.logging.Level.FINE,CallStatement.class.getName(),"String_Node_Str","String_Node_Str");
  java.sql.ResultSetMetaData resultmd=null;
  try {
    assertNotNull(callStat);
    resultmd=callStat.getMetaData();
  }
 catch (  NullPointerException e) {
    resultmd=null;
  }
catch (  SQLException e) {
  }
  IResultSetMetaData pstmtResultMetaData=null;
  if (resultmd != null) {
    pstmtResultMetaData=new ResultSetMetaData(resultmd);
  }
 else {
    IResultSet mdRs=null;
    try {
      mdRs=executeQuery();
    }
 catch (    OdaException e) {
      throw e;
    }
    try {
      if (mdRs != null)       pstmtResultMetaData=mdRs.getMetaData();
 else       pstmtResultMetaData=new SPResultSetMetaData(null);
    }
 catch (    OdaException e) {
    }
  }
  return pstmtResultMetaData;
}

Fixed version (ground truth):
public IResultSetMetaData getMetaData() throws OdaException {
  logger.logp(java.util.logging.Level.FINE,CallStatement.class.getName(),"String_Node_Str","String_Node_Str");
  java.sql.ResultSetMetaData resultmd=null;
  try {
    assertNotNull(callStat);
    resultmd=callStat.getMetaData();
  }
 catch (  NullPointerException e) {
    resultmd=null;
  }
catch (  SQLException e) {
  }
  IResultSetMetaData pstmtResultMetaData=null;
  if (resultmd != null) {
    pstmtResultMetaData=new ResultSetMetaData(resultmd);
  }
 else {
    IResultSet mdRs=null;
    try {
      mdRs=executeQuery();
    }
 catch (    OdaException e) {
      mdRs=null;
    }
    try {
      if (mdRs != null)       pstmtResultMetaData=mdRs.getMetaData();
 else       pstmtResultMetaData=new SPResultSetMetaData(null);
    }
 catch (    OdaException e) {
    }
  }
  return pstmtResultMetaData;
}
Program: 76273
Project: 76273
Buggy source:
public IContent execute(){
  pageReader.context.setPageNumber(pageNumber);
  pageReader.context.setExecutingMasterPage(true);
  IContent content=pageReader.loadPageContent(pageNumber);
  pageReader.initializeContent(content);
  pageReader.initalizeContentVisitor.visit(content,null);
  pageReader.context.setExecutingMasterPage(false);
  Fragment childFrag=fragment.getNextFragment(-1);
  if (childFrag != null) {
    this.child=childFrag.offset;
  }
 else {
    this.child=-1;
  }
  return content;
}

Fixed version (ground truth):
public IContent execute(){
  pageReader.context.setPageNumber(pageNumber);
  pageReader.context.setExecutingMasterPage(true);
  IContent content=pageReader.loadLocalizedPageContent(pageNumber);
  pageReader.initializeContent(content);
  pageReader.initalizeContentVisitor.visit(content,null);
  pageReader.context.setExecutingMasterPage(false);
  Fragment childFrag=fragment.getNextFragment(-1);
  if (childFrag != null) {
    this.child=childFrag.offset;
  }
 else {
    this.child=-1;
  }
  return content;
}