nus-yam/ex-repair huggingface dataset:
Program: 78292
Project: 78292
Buggy source:
protected static void insertToCell(TableHandle tableHandle,SlotHandle slot,ResultSetColumnHandle[] columns,boolean isLabel){
  for (int i=0; i < slot.getCount(); i++) {
    SlotHandle cells=((RowHandle)slot.get(i)).getCells();
    for (int j=0; j < cells.getCount(); j++) {
      CellHandle cell=(CellHandle)cells.get(j);
      try {
        if (isLabel) {
          LabelHandle labelItemHandle=SessionHandleAdapter.getInstance().getReportDesignHandle().getElementFactory().newLabel(null);
          labelItemHandle.setText(columns[j].getColumnName());
          cell.addElement(labelItemHandle,cells.getSlotID());
        }
 else {
          DataItemHandle dataHandle=SessionHandleAdapter.getInstance().getReportDesignHandle().getElementFactory().newDataItem(null);
          dataHandle.setResultSetColumn(columns[j].getColumnName());
          cell.addElement(dataHandle,cells.getSlotID());
          ComputedColumn bindingColumn=StructureFactory.createComputedColumn();
          bindingColumn.setDataType(columns[j].getDataType());
          bindingColumn.setExpression(DEUtil.getExpression(columns[j]));
          bindingColumn.setName(columns[j].getColumnName());
          tableHandle.addColumnBinding(bindingColumn,false);
        }
      }
 catch (      Exception e) {
        ExceptionHandler.handle(e);
      }
    }
  }
}

Fixed version (ground truth):
protected static void insertToCell(TableHandle tableHandle,SlotHandle slot,ResultSetColumnHandle[] columns,boolean isLabel){
  for (int i=0; i < slot.getCount(); i++) {
    SlotHandle cells=((RowHandle)slot.get(i)).getCells();
    for (int j=0; j < cells.getCount(); j++) {
      CellHandle cell=(CellHandle)cells.get(j);
      try {
        if (isLabel) {
          LabelHandle labelItemHandle=SessionHandleAdapter.getInstance().getReportDesignHandle().getElementFactory().newLabel(null);
          labelItemHandle.setText(columns[j].getColumnName());
          cell.addElement(labelItemHandle,cells.getSlotID());
        }
 else {
          DataItemHandle dataHandle=SessionHandleAdapter.getInstance().getReportDesignHandle().getElementFactory().newDataItem(null);
          dataHandle.setResultSetColumn(columns[j].getColumnName());
          cell.addElement(dataHandle,cells.getSlotID());
          ComputedColumn bindingColumn=StructureFactory.newComputedColumn(tableHandle,columns[j].getColumnName());
          bindingColumn.setDataType(columns[j].getDataType());
          bindingColumn.setExpression(DEUtil.getExpression(columns[j]));
          tableHandle.addColumnBinding(bindingColumn,false);
        }
      }
 catch (      Exception e) {
        ExceptionHandler.handle(e);
      }
    }
  }
}
Program: 78293
Project: 78293
Buggy source:
protected static DataItemHandle performInsertParameter(ScalarParameterHandle model) throws SemanticException {
  DataItemHandle dataHandle=DesignElementFactory.getInstance().newDataItem(null);
  dataHandle.setValueExpr(DEUtil.getExpression(model));
  return dataHandle;
}

Fixed version (ground truth):
protected static DataItemHandle performInsertParameter(ScalarParameterHandle model) throws SemanticException {
  DataItemHandle dataHandle=DesignElementFactory.getInstance().newDataItem(null);
  ComputedColumn bindingColumn=StructureFactory.newComputedColumn(dataHandle,model.getName());
  bindingColumn.setDataType(model.getDataType());
  bindingColumn.setExpression(DEUtil.getExpression(model));
  dataHandle.addColumnBinding(bindingColumn,false);
  dataHandle.setResultSetColumn(bindingColumn.getColumnName());
  return dataHandle;
}
Program: 78295
Project: 78295
Buggy source:
public void startContent(IContent content){
  List children=root.getChildren();
  if (parent != null) {
    children=parent.getChildren();
  }
  if (children.contains(content)) {
    children.add(content);
  }
  parent=content;
}

Fixed version (ground truth):
public void startContent(IContent content){
  List children=root.getChildren();
  if (parent != null) {
    children=parent.getChildren();
  }
  if (!children.contains(content)) {
    children.add(content);
  }
  parent=content;
}
Program: 78296
Project: 78296
Buggy source:
private void refreshDataSets(){
  String selectedDataSetName=dataSetChooser.getText();
  String[] oldList=dataSetChooser.getItems();
  List avaiableList=SessionHandleAdapter.getInstance().getReportDesignHandle().getVisibleDataSets();
  String[] newList=(String[])avaiableList.toArray(new String[]{});
  if (oldList.length != newList.length) {
    dataSetChooser.setItems(newList);
    if (StringUtil.isBlank(selectedDataSetName)) {
      dataSetChooser.select(0);
      refreshColumns(false);
    }
 else {
      dataSetChooser.setText(selectedDataSetName);
    }
  }
}

Fixed version (ground truth):
private void refreshDataSets(){
  String selectedDataSetName=dataSetChooser.getText();
  String[] oldList=dataSetChooser.getItems();
  String[] newList=ChoiceSetFactory.getDataSets();
  if (oldList.length != newList.length) {
    dataSetChooser.setItems(newList);
    if (StringUtil.isBlank(selectedDataSetName)) {
      dataSetChooser.select(0);
      refreshColumns(false);
    }
 else {
      dataSetChooser.setText(selectedDataSetName);
    }
  }
}
Program: 78297
Project: 78297
Buggy source:
/** 
 * @return
 */
private RDSaveUtil getRdSaveUtil(){
  if (this.rdSaveUtil == null) {
    rdSaveUtil=new RDSaveUtil(context,queryDefn,queryDefn.getQueryResultsID());
  }
  return this.rdSaveUtil;
}

Fixed version (ground truth):
/** 
 * @return
 */
private RDSaveUtil getRdSaveUtil(){
  if (this.rdSaveUtil == null) {
    rdSaveUtil=new RDSaveUtil(context,queryDefn,queryResults.getID());
  }
  return this.rdSaveUtil;
}
Program: 78298
Project: 78298
Buggy source:
/** 
 * @param queryResults
 * @param queryScope
 */
private ResultIterator(IQueryResults queryResults,ExprManager exprManager,Scriptable queryScope){
  this.queryResults=queryResults;
  this.exprManager=exprManager;
  this.queryScope=queryScope;
  queryScope.put("String_Node_Str",queryScope,new JSTempRowObject(exprManager,queryScope));
}

Fixed version (ground truth):
/** 
 * @param queryResults
 * @param queryScope
 */
private ResultIterator(QueryResults queryResults,ExprManager exprManager,Scriptable queryScope){
  this.queryResults=queryResults;
  this.exprManager=exprManager;
  this.queryScope=queryScope;
  queryScope.put("String_Node_Str",queryScope,new JSTempRowObject(exprManager,queryScope));
}
Program: 78299
Project: 78299
Buggy source:
public String getID(){
  return IDUtil.nextQursID();
}

Fixed version (ground truth):
public String getID(){
  if (queryResultID == null)   queryResultID=IDUtil.nextQursID();
  return queryResultID;
}
Program: 78300
Project: 78300
Buggy source:
/** 
 * @param inputStream
 */
public void doSave(OutputStream outputStream){
  try {
    this.groupInformationUtil.saveGroupsToStream(outputStream);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * @param inputStream
 * @throws DataException 
 */
public void doSave(OutputStream outputStream) throws DataException {
  try {
    this.groupInformationUtil.saveGroupsToStream(outputStream);
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e,"String_Node_Str");
  }
}
Program: 78301
Project: 78301
Buggy source:
public IResultMetaData getResultMetaData() throws BirtException {
  return null;
}

Fixed version (ground truth):
public IResultMetaData getResultMetaData() throws BirtException {
  return new ResultMetaData(new ResultClass(new ArrayList()));
}
Program: 78302
Project: 78302
Buggy source:
/** 
 * @param queryDefn
 */
PreparedDummyQuery(IQueryDefinition queryDefn,Scriptable sharedScope){
}

Fixed version (ground truth):
/** 
 * @param context 
 * @param queryDefn
 */
PreparedDummyQuery(DataEngineContext context,IQueryDefinition queryDefn,Scriptable sharedScope){
}
Program: 78303
Project: 78303
Buggy source:
public void close() throws BirtException {
  this.openStatus=ENDED;
}

Fixed version (ground truth):
public void close() throws BirtException {
  this.openStatus=ENDED;
  this.getRdSaveUtil().doSaveFinish();
}
Program: 78304
Project: 78304
Buggy source:
public Object getValue(String name) throws BirtException {
  checkOpened();
  return ExprEvaluateUtil.evaluateRawExpression(this.exprManager.getExpr(name),queryScope);
}

Fixed version (ground truth):
public Object getValue(String name) throws BirtException {
  checkOpened();
  Object value=ExprEvaluateUtil.evaluateRawExpression(this.exprManager.getExpr(name),queryScope);
  this.getRdSaveUtil().doSaveExpr(name,value);
  return value;
}
Program: 78305
Project: 78305
Buggy source:
/** 
 * Deletes the specified file from ODA driver path and viewer dirver path, NOTE just the file name is used.
 * @param filePath
 */
public void deleteJarFromODADir(){
  File source=new File(filePath);
  File odaDir=getDriverLocation();
  File viewDir=getViewerDriverLocation();
  File dest1=null, dest2=null;
  if (odaDir != null) {
    dest1=new File(odaDir.getAbsolutePath() + File.separator + source.getName());
    if (dest1.exists()) {
      if (!dest1.delete()) {
        dest1.deleteOnExit();
      }
    }
  }
  if (viewDir != null) {
    dest2=new File(viewDir.getAbsolutePath() + File.separator + source.getName());
    if (dest2.exists()) {
      if (!dest2.delete()) {
        dest2.deleteOnExit();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Deletes the specified file from ODA driver path and viewer dirver path, NOTE just the file name is used.
 * @param filePath
 */
public void deleteJarFromODADir(){
  File source=new File(filePath);
  File odaDir=getDriverLocation();
  File dest1=null;
  if (odaDir != null) {
    dest1=new File(odaDir.getAbsolutePath() + File.separator + source.getName());
    if (dest1.exists()) {
      if (!dest1.delete()) {
        dest1.deleteOnExit();
      }
    }
  }
}
Program: 78306
Project: 78306
Buggy source:
/** 
 * Copies the specified file to ODA driver path and viewer dirver path.
 * @param filePath
 */
public void copyJarToODADir(){
  File source=new File(filePath);
  File odaDir=getDriverLocation();
  File viewDir=getViewerDriverLocation();
  File dest1=null, dest2=null;
  if (odaDir != null) {
    dest1=new File(odaDir.getAbsolutePath() + File.separator + source.getName());
  }
  if (viewDir != null) {
    dest2=new File(viewDir.getAbsolutePath() + File.separator + source.getName());
  }
  if (source.exists()) {
    FileChannel in=null, out1=null, out2=null;
    try {
      if (dest1 != null) {
        try {
          out1=new FileOutputStream(dest1).getChannel();
        }
 catch (        FileNotFoundException e) {
        }
      }
      if (dest2 != null) {
        try {
          out2=new FileOutputStream(dest2).getChannel();
        }
 catch (        FileNotFoundException e) {
        }
      }
      if (out1 != null) {
        in=new FileInputStream(source).getChannel();
        long size=in.size();
        MappedByteBuffer buf=in.map(FileChannel.MapMode.READ_ONLY,0,size);
        out1.write(buf);
      }
      try {
        if (in != null) {
          in.close();
        }
      }
 catch (      IOException e1) {
      }
      if (out2 != null) {
        in=new FileInputStream(source).getChannel();
        long size=in.size();
        MappedByteBuffer buf=in.map(FileChannel.MapMode.READ_ONLY,0,size);
        out2.write(buf);
      }
    }
 catch (    FileNotFoundException e) {
    }
catch (    IOException e) {
    }
 finally {
      try {
        if (in != null) {
          in.close();
        }
        if (out1 != null) {
          out1.close();
        }
        if (out2 != null) {
          out2.close();
        }
      }
 catch (      IOException e1) {
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Copies the specified file to ODA driver path and viewer dirver path.
 * @param filePath
 */
public void copyJarToODADir(){
  File source=new File(filePath);
  File odaDir=getDriverLocation();
  File dest1=null;
  if (odaDir != null) {
    dest1=new File(odaDir.getAbsolutePath() + File.separator + source.getName());
  }
  if (source.exists()) {
    FileChannel in=null, out1=null;
    try {
      if (dest1 != null) {
        try {
          out1=new FileOutputStream(dest1).getChannel();
        }
 catch (        FileNotFoundException e) {
        }
      }
      if (out1 != null) {
        in=new FileInputStream(source).getChannel();
        long size=in.size();
        MappedByteBuffer buf=in.map(FileChannel.MapMode.READ_ONLY,0,size);
        out1.write(buf);
      }
      try {
        if (in != null) {
          in.close();
        }
      }
 catch (      IOException e1) {
      }
    }
 catch (    FileNotFoundException e) {
    }
catch (    IOException e) {
    }
 finally {
      try {
        if (in != null) {
          in.close();
        }
        if (out1 != null) {
          out1.close();
        }
      }
 catch (      IOException e1) {
      }
    }
  }
}
Program: 78308
Project: 78308
Buggy source:
public void widgetSelected(SelectionEvent e){
  JdbcDriverManagerDialog dlg=new JdbcDriverManagerDialog(getShell());
  manageButton.setEnabled(false);
  testButton.setEnabled(false);
  if (dlg.open() == Window.OK) {
    BusyIndicator.showWhile(getShell() == null ? null : getShell().getDisplay(),new Runnable(){
      public void run(){
        okPressedProcess();
      }
    }
);
  }
  testButton.setEnabled(true);
  manageButton.setEnabled(true);
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  JdbcDriverManagerDialog dlg=new JdbcDriverManagerDialog(getShell());
  manageButton.setEnabled(false);
  testButton.setEnabled(false);
  if (dlg.open() == Window.OK) {
    BusyIndicator.showWhile(getShell() == null ? null : getShell().getDisplay(),new Runnable(){
      public void run(){
        okPressedProcess();
      }
    }
);
  }
  updateTestButton();
  manageButton.setEnabled(true);
}
Program: 78309
Project: 78309
Buggy source:
private String[] getDataSets(){
  ArrayList dataSetList=new ArrayList();
  for (Iterator iter=DEUtil.getDataSets().iterator(); iter.hasNext(); ) {
    DataSetHandle dataSet=(DataSetHandle)iter.next();
    if (!dataSet.paramBindingsIterator().hasNext()) {
      dataSetList.add(dataSet.getQualifiedName());
    }
  }
  return (String[])dataSetList.toArray(new String[dataSetList.size()]);
}

Fixed version (ground truth):
private String[] getDataSets(){
  return (String[])DEUtil.getDataSets().toArray(new String[0]);
}
Program: 78310
Project: 78310
Buggy source:
private void refreshDataSets(){
  String selectedDataSetName=dataSetChooser.getText();
  String[] oldList=dataSetChooser.getItems();
  ArrayList avaiableList=new ArrayList();
  for (Iterator iter=SessionHandleAdapter.getInstance().getReportDesignHandle().getVisibleDataSets().iterator(); iter.hasNext(); ) {
    DataSetHandle dataSet=(DataSetHandle)iter.next();
    if (!dataSet.parametersIterator().hasNext()) {
      avaiableList.add(dataSet.getQualifiedName());
    }
  }
  String[] newList=(String[])avaiableList.toArray(new String[]{});
  if (oldList.length != newList.length) {
    dataSetChooser.setItems(newList);
    if (StringUtil.isBlank(selectedDataSetName)) {
      dataSetChooser.select(0);
      refreshColumns(false);
    }
 else {
      dataSetChooser.setText(selectedDataSetName);
    }
  }
}

Fixed version (ground truth):
private void refreshDataSets(){
  String selectedDataSetName=dataSetChooser.getText();
  String[] oldList=dataSetChooser.getItems();
  List avaiableList=SessionHandleAdapter.getInstance().getReportDesignHandle().getVisibleDataSets();
  String[] newList=(String[])avaiableList.toArray(new String[]{});
  if (oldList.length != newList.length) {
    dataSetChooser.setItems(newList);
    if (StringUtil.isBlank(selectedDataSetName)) {
      dataSetChooser.select(0);
      refreshColumns(false);
    }
 else {
      dataSetChooser.setText(selectedDataSetName);
    }
  }
}
Program: 78311
Project: 78311
Buggy source:
/** 
 * Gets all available themes .
 * @return A String array contains all available themes.
 */
public static String[] getThemes(){
  ArrayList list=new ArrayList();
  list.add(CHOICE_NONE);
  ModuleHandle handle=SessionHandleAdapter.getInstance().getReportDesignHandle();
  Iterator iterator=handle.getAllThemes().iterator();
  if (iterator != null) {
    while (iterator.hasNext()) {
      ReportElementHandle elementHandle=(ReportElementHandle)iterator.next();
      list.add(elementHandle.getQualifiedName());
    }
  }
  return (String[])list.toArray(new String[0]);
}

Fixed version (ground truth):
/** 
 * Gets all available themes .
 * @return A String array contains all available themes.
 */
public static String[] getThemes(){
  ArrayList list=new ArrayList();
  list.add(CHOICE_NONE);
  ModuleHandle handle=SessionHandleAdapter.getInstance().getReportDesignHandle();
  Iterator iterator=handle.getVisibleThemes().iterator();
  if (iterator != null) {
    while (iterator.hasNext()) {
      ReportElementHandle elementHandle=(ReportElementHandle)iterator.next();
      list.add(elementHandle.getQualifiedName());
    }
  }
  return (String[])list.toArray(new String[0]);
}
Program: 78312
Project: 78312
Buggy source:
/** 
 * Saves the design file to temp directory.
 * @param filename the new file name to save
 * @throws IOException if any exception
 */
protected void saveLibraryAs(String filename) throws IOException {
  if (libraryHandle == null)   return;
  String outputPath=PLUGIN_PATH + getClassFolder() + OUTPUT_FOLDER;
  File outputFolder=new File(outputPath);
  if (!outputFolder.exists() && !outputFolder.mkdir()) {
    throw new IOException("String_Node_Str");
  }
  libraryHandle.saveAs(outputPath + filename);
}

Fixed version (ground truth):
/** 
 * Saves the design file to temp directory.
 * @param filename the new file name to save
 * @throws IOException if any exception
 */
protected void saveLibraryAs(String filename) throws IOException {
  if (libraryHandle == null)   return;
  String outputPath=getClassFolder() + OUTPUT_FOLDER;
  File outputFolder=new File(outputPath);
  if (!outputFolder.exists() && !outputFolder.mkdir()) {
    throw new IOException("String_Node_Str");
  }
  libraryHandle.saveAs(outputPath + filename);
}
Program: 78313
Project: 78313
Buggy source:
/** 
 * Locates the folder where the unit test java source file is saved.
 * @return the path name where the test java source file locates.
 */
protected String getClassFolder(){
  String className=this.getClass().getName();
  int lastDotIndex=className.lastIndexOf("String_Node_Str");
  className=className.substring(0,lastDotIndex);
  className=TEST_FOLDER + className.replace('.','/');
  return className;
}

Fixed version (ground truth):
/** 
 * Locates the folder where the unit test java source file is saved.
 * @return the path name where the test java source file locates.
 */
protected String getClassFolder(){
  String pathBase=null;
  ProtectionDomain domain=this.getClass().getProtectionDomain();
  if (domain != null) {
    CodeSource source=domain.getCodeSource();
    if (source != null) {
      URL url=source.getLocation();
      pathBase=url.getPath();
      if (pathBase.endsWith("String_Node_Str"))       pathBase=pathBase.substring(0,pathBase.length() - 4);
      if (pathBase.endsWith("String_Node_Str"))       pathBase=pathBase.substring(0,pathBase.length() - 3);
    }
  }
  pathBase=pathBase + TEST_FOLDER;
  String className=this.getClass().getName();
  int lastDotIndex=className.lastIndexOf("String_Node_Str");
  className=className.substring(0,lastDotIndex);
  className=pathBase + className.replace('.','/');
  return className;
}
Program: 78315
Project: 78315
Buggy source:
public void testAddinLibrary() throws Exception {
  openDesign("String_Node_Str");
  designHandle.includeLibrary(LibFile,"String_Node_Str");
  designHandle.includeLibrary("String_Node_Str","String_Node_Str");
  super.saveAs(outFileName);
  assertTrue(compareTextFile(goldenFileName,outFileName));
  try {
    designHandle.includeLibrary(LibFileError1,"String_Node_Str");
  }
 catch (  SemanticException e) {
    assertNotNull(e);
  }
catch (  DesignFileException e) {
    assertNotNull(e);
  }
catch (  Exception e) {
    assertNotNull(e);
  }
  try {
    designHandle.includeLibrary("String_Node_Str","String_Node_Str");
  }
 catch (  SemanticException e) {
    assertNotNull(e);
  }
catch (  DesignFileException e) {
    assertNotNull(e);
  }
catch (  Exception e) {
    assertNotNull(e);
  }
}

Fixed version (ground truth):
public void testAddinLibrary() throws Exception {
  openDesign("String_Node_Str");
  designHandle.includeLibrary(LibFile,"String_Node_Str");
  designHandle.includeLibrary("String_Node_Str","String_Node_Str");
  saveAs(outFileName);
  assertTrue(compareTextFile(goldenFileName,outFileName));
  try {
    designHandle.includeLibrary(LibFileError1,"String_Node_Str");
  }
 catch (  SemanticException e) {
    assertNotNull(e);
  }
catch (  DesignFileException e) {
    assertNotNull(e);
  }
catch (  Exception e) {
    assertNotNull(e);
  }
  try {
    designHandle.includeLibrary("String_Node_Str","String_Node_Str");
  }
 catch (  SemanticException e) {
    assertNotNull(e);
  }
catch (  DesignFileException e) {
    assertNotNull(e);
  }
catch (  Exception e) {
    assertNotNull(e);
  }
}
Program: 78316
Project: 78316
Buggy source:
/** 
 * Finds the result columns on DataSet and update the bound column with the element that uses this data set. Operations are in persistent transaction. Hence, operations in the method can not undo/redo. Parts of migration work from BIRT 2.1M5 to BIRT 2.1.0 for bound data columns.
 * @param module the libray/report instance
 * @throws SemanticException if values in result set columns are not valid in data bound columns.
 */
public static void updateBoundDataColumns(ModuleHandle module) throws SemanticException {
  ContentIterator contentIter=new ContentIterator(module.getElement());
  if (!contentIter.hasNext())   return;
  CommandStack cmdStack=module.getCommandStack();
  cmdStack.startPersistentTrans(null);
  try {
    while (contentIter.hasNext()) {
      DesignElement element=(DesignElement)contentIter.next();
      if (!(element instanceof ReportItem))       continue;
      ReportItemHandle reportItem=(ReportItemHandle)element.getHandle(module.getModule());
      DataSetHandle dataSet=reportItem.getDataSet();
      if (dataSet == null)       continue;
      setupBoundDataColumns(dataSet,reportItem);
    }
  }
 catch (  SemanticException e) {
    cmdStack.rollback();
    throw e;
  }
  cmdStack.commit();
}

Fixed version (ground truth):
/** 
 * Finds the result columns on DataSet and update the bound column with the element that uses this data set. Operations are in persistent transaction. Hence, operations in the method can not undo/redo. Parts of migration work from BIRT 2.1M5 to BIRT 2.1.0 for bound data columns.
 * @param module the libray/report instance
 * @throws SemanticException if values in result set columns are not valid in data bound columns.
 * @deprecated temporarily since another way to implement this feature.
 */
public static void updateBoundDataColumns(ModuleHandle module) throws SemanticException {
  ContentIterator contentIter=new ContentIterator(module.getElement());
  if (!contentIter.hasNext())   return;
  CommandStack cmdStack=module.getCommandStack();
  cmdStack.startPersistentTrans(null);
  try {
    while (contentIter.hasNext()) {
      DesignElement element=(DesignElement)contentIter.next();
      if (!(element instanceof ReportItem))       continue;
      ReportItemHandle reportItem=(ReportItemHandle)element.getHandle(module.getModule());
      DataSetHandle dataSet=reportItem.getDataSet();
      if (dataSet == null)       continue;
      setupBoundDataColumns(dataSet,reportItem);
    }
  }
 catch (  SemanticException e) {
    cmdStack.rollback();
    throw e;
  }
  cmdStack.commit();
}
Program: 78317
Project: 78317
Buggy source:
public void end() throws SAXException {
  String value=text.toString();
  if (StringUtil.isBlank(value))   return;
  value=ExpressionUtil.toNewExpression(value);
  String newColumnName=setupBoundDataColumn(value,value);
  doEnd(newColumnName);
}

Fixed version (ground truth):
public void end() throws SAXException {
  String value=text.toString();
  if (StringUtil.isBlank(value))   return;
  String newColumnName=setupBoundDataColumn(value,value);
  doEnd(newColumnName);
}
Program: 78319
Project: 78319
Buggy source:
public void startPage(IPageContent page){
  pageNo++;
  if (pageNo > 1 && outputMasterPageContent == false) {
    writer.openTag("String_Node_Str");
    writer.closeTag("String_Node_Str");
  }
  writer.openTag(HTMLTags.TAG_DIV);
  if (pageNo > 1) {
    writer.attribute(HTMLTags.ATTR_STYLE,"String_Node_Str");
  }
  if (page != null) {
    if (outputMasterPageContent) {
      writer.openTag(HTMLTags.TAG_DIV);
      handlePageStyle(page.getPageHeader().getStyleClass(),page.getPageHeader().getStyle());
      contentVisitor.visitList(page.getHeader(),null);
      writer.closeTag(HTMLTags.TAG_DIV);
    }
  }
  writer.openTag(HTMLTags.TAG_DIV);
  if (page != null) {
    IContent pageBody=page.getPageBody();
    IStyle bodyStyle=pageBody.getStyle();
    String bodyStyleName=pageBody.getStyleClass();
    Object genBy=page.getGenerateBy();
    if (genBy instanceof MasterPageDesign) {
      MasterPageDesign masterPage=(MasterPageDesign)genBy;
      StringBuffer styleBuffer=new StringBuffer();
      if (isEmbeddable) {
        AttributeBuilder.buildStyle(styleBuffer,bodyStyle,this);
      }
 else {
        setStyleName(bodyStyleName);
      }
      AttributeBuilder.buildSize(styleBuffer,HTMLTags.ATTR_HEIGHT,masterPage.getPageHeight());
      writer.attribute(HTMLTags.ATTR_STYLE,styleBuffer.toString());
    }
  }
}

Fixed version (ground truth):
public void startPage(IPageContent page){
  pageNo++;
  if (pageNo > 1 && outputMasterPageContent == false) {
    writer.openTag("String_Node_Str");
    writer.closeTag("String_Node_Str");
  }
  writer.openTag(HTMLTags.TAG_DIV);
  if (pageNo > 1) {
    writer.attribute(HTMLTags.ATTR_STYLE,"String_Node_Str");
  }
  if (page != null) {
    if (outputMasterPageContent) {
      writer.openTag(HTMLTags.TAG_DIV);
      handlePageStyle(page.getPageHeader().getStyleClass(),page.getPageHeader().getStyle());
      contentVisitor.visitList(page.getHeader(),null);
      writer.closeTag(HTMLTags.TAG_DIV);
    }
  }
  writer.openTag(HTMLTags.TAG_DIV);
  if (page != null) {
    IContent pageBody=page.getPageBody();
    IStyle bodyStyle=pageBody.getStyle();
    String bodyStyleName=pageBody.getStyleClass();
    Object genBy=page.getGenerateBy();
    if (genBy instanceof MasterPageDesign) {
      MasterPageDesign masterPage=(MasterPageDesign)genBy;
      StringBuffer styleBuffer=new StringBuffer();
      if (isEmbeddable) {
        AttributeBuilder.buildStyle(styleBuffer,bodyStyle,this);
      }
 else {
        setStyleName(bodyStyleName);
      }
      AttributeBuilder.buildSize(styleBuffer,HTMLTags.ATTR_MIN_HEIGHT,masterPage.getPageHeight());
      writer.attribute(HTMLTags.ATTR_STYLE,styleBuffer.toString());
    }
  }
}
Program: 78322
Project: 78322
Buggy source:
/** 
 * Tests to get a style property of a cell element in the table.
 * @throws Exception
 */
public void testGetColumnProperty() throws Exception {
  openDesign(fileName);
  TableHandle table=(TableHandle)designHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",table);
  ColumnHandle column=(ColumnHandle)table.getColumns().get(0);
  column.setRepeatCount(2);
  assertEquals(2,column.getRepeatCount());
  DimensionHandle dh=column.getWidth();
  assertEquals(100,dh.getMeasure(),0);
  assertEquals("String_Node_Str",dh.getUnits());
}

Fixed version (ground truth):
/** 
 * Tests to get a style property of a cell element in the table.
 * @throws Exception
 */
public void testGetColumnProperty() throws Exception {
  openDesign(fileName);
  TableHandle table=(TableHandle)designHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",table);
  ColumnHandle column=(ColumnHandle)table.getColumns().get(0);
  column.setRepeatCount(2);
  assertEquals(2,column.getRepeatCount());
  DimensionHandle dh=column.getWidth();
  assertEquals(100,dh.getMeasure(),0);
  assertEquals("String_Node_Str",dh.getUnits());
  assertFalse(column.suppressDuplicates());
  column.setSuppressDuplicates(true);
  assertTrue(column.suppressDuplicates());
  designHandle.getCommandStack().undo();
  assertFalse(column.suppressDuplicates());
  designHandle.getCommandStack().redo();
  assertTrue(column.suppressDuplicates());
  ElementFactory factory=new ElementFactory(designHandle.getModule());
  GridHandle grid=factory.newGridItem("String_Node_Str",3,3);
  ColumnHandle gridcolumn=(ColumnHandle)grid.getColumns().get(0);
  assertFalse(gridcolumn.suppressDuplicates());
}
Program: 78324
Project: 78324
Buggy source:
public void testDuplicateDesign() throws Exception {
  openDesign(fileName);
  designHandle.includeLibrary(inputLibrary,"String_Node_Str");
  LibraryHandle libAHandle=designHandle.getLibrary("String_Node_Str");
  TextItemHandle text1LibA=(TextItemHandle)libAHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",text1LibA);
  TextItemHandle text1LibAHandle=(TextItemHandle)designHandle.getElementFactory().newElementFrom(text1LibA,"String_Node_Str");
  designHandle.getBody().add(text1LibAHandle);
  text1LibAHandle.setName("String_Node_Str");
  TextItemHandle text4LibA=(TextItemHandle)libAHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",text4LibA);
  try {
    TextItemHandle text4LibAHandle=(TextItemHandle)designHandle.getElementFactory().newElementFrom(text4LibA,"String_Node_Str");
    designHandle.getBody().add(text4LibAHandle);
  }
 catch (  Exception e) {
    assertNotNull(e);
  }
}

Fixed version (ground truth):
public void testDuplicateDesign() throws Exception {
  openDesign(fileName);
  designHandle.includeLibrary(inputLibraryName,"String_Node_Str");
  LibraryHandle libAHandle=designHandle.getLibrary("String_Node_Str");
  TextItemHandle text1LibA=(TextItemHandle)libAHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",text1LibA);
  TextItemHandle text1LibAHandle=(TextItemHandle)designHandle.getElementFactory().newElementFrom(text1LibA,"String_Node_Str");
  designHandle.getBody().add(text1LibAHandle);
  text1LibAHandle.setName("String_Node_Str");
  TextItemHandle text4LibA=(TextItemHandle)libAHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",text4LibA);
  try {
    TextItemHandle text4LibAHandle=(TextItemHandle)designHandle.getElementFactory().newElementFrom(text4LibA,"String_Node_Str");
    designHandle.getBody().add(text4LibAHandle);
  }
 catch (  Exception e) {
    assertNotNull(e);
  }
}
Program: 78325
Project: 78325
Buggy source:
public void testDBRefer() throws Exception {
  openDesign(fileName);
  designHandle.includeLibrary(inputLibrary,"String_Node_Str");
  LibraryHandle libAHandle=designHandle.getLibrary("String_Node_Str");
  DataSourceHandle dataSourceLibA=(DataSourceHandle)libAHandle.findDataSource("String_Node_Str");
  assertNotNull("String_Node_Str",dataSourceLibA);
  DataSetHandle dataSetLibA=(DataSetHandle)libAHandle.findDataSet("String_Node_Str");
  assertNotNull("String_Node_Str",dataSetLibA);
  DataSetHandle dataSetLibAHandle=(DataSetHandle)designHandle.getElementFactory().newOdaDataSet("String_Node_Str");
  designHandle.getDataSets().add(dataSetLibAHandle);
  TableHandle tableHandle=(TableHandle)designHandle.getElementFactory().newTableItem("String_Node_Str");
  designHandle.getBody().add(tableHandle);
  dataSetLibAHandle.setDataSource("String_Node_Str");
  tableHandle.setDataSet(dataSetLibA);
}

Fixed version (ground truth):
public void testDBRefer() throws Exception {
  openDesign(fileName);
  designHandle.includeLibrary(inputLibraryName,"String_Node_Str");
  LibraryHandle libAHandle=designHandle.getLibrary("String_Node_Str");
  DataSourceHandle dataSourceLibA=(DataSourceHandle)libAHandle.findDataSource("String_Node_Str");
  assertNotNull("String_Node_Str",dataSourceLibA);
  DataSetHandle dataSetLibA=(DataSetHandle)libAHandle.findDataSet("String_Node_Str");
  assertNotNull("String_Node_Str",dataSetLibA);
  DataSetHandle dataSetLibAHandle=(DataSetHandle)designHandle.getElementFactory().newOdaDataSet("String_Node_Str");
  designHandle.getDataSets().add(dataSetLibAHandle);
  TableHandle tableHandle=(TableHandle)designHandle.getElementFactory().newTableItem("String_Node_Str");
  designHandle.getBody().add(tableHandle);
  dataSetLibAHandle.setDataSource("String_Node_Str");
  tableHandle.setDataSet(dataSetLibA);
}
Program: 78326
Project: 78326
Buggy source:
/** 
 * Tests to read and set properties on a GroupElement.
 * @throws Exception if errors occur when opens the design file
 */
public void testProperties() throws Exception {
  openDesign("String_Node_Str");
  ListHandle list=(ListHandle)designHandle.findElement("String_Node_Str");
  assertNotNull(list);
  SlotHandle groupSlot=list.getGroups();
  GroupHandle group=(GroupHandle)groupSlot.get(0);
  group.setName("String_Node_Str");
  assertEquals("String_Node_Str",group.getDisplayLabel(DesignElement.FULL_LABEL));
  assertEquals("String_Node_Str",group.getGroupStart());
  group.setName("String_Node_Str");
  assertEquals(null,group.getDisplayLabel(DesignElement.USER_LABEL));
  group.setName("String_Node_Str");
  assertEquals(null,group.getDisplayLabel(DesignElement.USER_LABEL));
  group.setInterval(DesignChoiceConstants.INTERVAL_PREFIX);
  assertEquals(DesignChoiceConstants.INTERVAL_PREFIX,group.getInterval());
  group.setIntervalRange(0.1234);
  assertTrue(0.1234 == group.getIntervalRange());
  group.setKeyExpr("String_Node_Str");
  assertEquals("String_Node_Str",group.getKeyExpr());
  group.setSortDirection(DesignChoiceConstants.SORT_DIRECTION_DESC);
  assertEquals(DesignChoiceConstants.SORT_DIRECTION_DESC,group.getSortDirection());
  group.setOnPrepare("String_Node_Str");
  assertEquals("String_Node_Str",group.getOnPrepare());
}

Fixed version (ground truth):
/** 
 * Tests to read and set properties on a GroupElement.
 * @throws Exception if errors occur when opens the design file
 */
public void testProperties() throws Exception {
  openDesign("String_Node_Str");
  ListHandle list=(ListHandle)designHandle.findElement("String_Node_Str");
  assertNotNull(list);
  SlotHandle groupSlot=list.getGroups();
  GroupHandle group=(GroupHandle)groupSlot.get(0);
  group.setName("String_Node_Str");
  assertEquals("String_Node_Str",group.getDisplayLabel(DesignElement.FULL_LABEL));
  assertEquals("String_Node_Str",group.getGroupStart());
  group.setName("String_Node_Str");
  assertEquals(null,group.getDisplayLabel(DesignElement.USER_LABEL));
  group.setName("String_Node_Str");
  assertEquals(null,group.getDisplayLabel(DesignElement.USER_LABEL));
  assertFalse(group.hideDetail());
  group.setHideDetail(true);
  assertTrue(group.hideDetail());
  designHandle.getCommandStack().undo();
  assertFalse(group.hideDetail());
  designHandle.getCommandStack().redo();
  assertTrue(group.hideDetail());
  ElementFactory factory=new ElementFactory(designHandle.getModule());
  TableGroupHandle tablegroup=factory.newTableGroup();
  assertFalse(tablegroup.hideDetail());
  group.setInterval(DesignChoiceConstants.INTERVAL_PREFIX);
  assertEquals(DesignChoiceConstants.INTERVAL_PREFIX,group.getInterval());
  group.setIntervalRange(0.1234);
  assertTrue(0.1234 == group.getIntervalRange());
  group.setKeyExpr("String_Node_Str");
  assertEquals("String_Node_Str",group.getKeyExpr());
  group.setSortDirection(DesignChoiceConstants.SORT_DIRECTION_DESC);
  assertEquals(DesignChoiceConstants.SORT_DIRECTION_DESC,group.getSortDirection());
  group.setOnPrepare("String_Node_Str");
  assertEquals("String_Node_Str",group.getOnPrepare());
}
Program: 78327
Project: 78327
Buggy source:
public void setEnabled(boolean enabled){
  this.btnApproximate.setSelection(!getFormatSpecifier().isPrecise());
  this.btnApproximate.setEnabled(enabled);
  this.txtDelimiter.setEnabled(enabled);
  this.txtPrefix.setEnabled(enabled);
  this.txtSuffix.setEnabled(enabled);
  this.btnUseNumerator.setEnabled(enabled && btnApproximate.getSelection());
  this.btnUseDenorminator.setEnabled(enabled && btnApproximate.getSelection());
  if (getFormatSpecifier().getNumerator() > 0) {
    this.btnUseNumerator.setSelection(true);
  }
 else {
    this.btnUseDenorminator.setSelection(true);
  }
  this.spnNumerator.setEnabled(enabled && btnApproximate.getSelection() && btnUseNumerator.getSelection());
  this.spnFractionDigits.setEnabled(enabled && btnApproximate.getSelection() && btnUseDenorminator.getSelection());
  super.setEnabled(enabled);
}

Fixed version (ground truth):
public void setEnabled(boolean enabled){
  this.btnApproximate.setSelection(!getFormatSpecifier().isPrecise());
  this.btnApproximate.setEnabled(enabled);
  this.txtDelimiter.setEnabled(enabled);
  this.txtPrefix.setEnabled(enabled);
  this.txtSuffix.setEnabled(enabled);
  this.btnUseNumerator.setEnabled(enabled && btnApproximate.getSelection());
  this.btnUseDenorminator.setEnabled(enabled && btnApproximate.getSelection());
  if (getFormatSpecifier().getNumerator() > 0) {
    this.btnUseNumerator.setSelection(true);
    this.btnUseDenorminator.setSelection(false);
  }
 else {
    this.btnUseNumerator.setSelection(false);
    this.btnUseDenorminator.setSelection(true);
  }
  this.spnNumerator.setEnabled(enabled && btnApproximate.getSelection() && btnUseNumerator.getSelection());
  this.spnFractionDigits.setEnabled(enabled && btnApproximate.getSelection() && btnUseDenorminator.getSelection());
  super.setEnabled(enabled);
}
Program: 78328
Project: 78328
Buggy source:
private void updateUIState(){
  if (cmbDataType.getText().equals("String_Node_Str")) {
    if (this.btnStandard.getSelection()) {
      cpWrapStandardNumber.setEnabled(true);
      cpWrapAdvancedNumber.setEnabled(false);
      cpWrapFractionNumber.setEnabled(false);
    }
 else     if (this.btnAdvanced.getSelection()) {
      cpWrapStandardNumber.setEnabled(false);
      cpWrapAdvancedNumber.setEnabled(true);
      cpWrapFractionNumber.setEnabled(false);
    }
 else     if (this.btnFraction.getSelection()) {
      cpWrapStandardNumber.setEnabled(false);
      cpWrapAdvancedNumber.setEnabled(false);
      cpWrapFractionNumber.setEnabled(true);
    }
 else {
      cpWrapStandardNumber.setEnabled(false);
      cpWrapAdvancedNumber.setEnabled(false);
      cpWrapFractionNumber.setEnabled(false);
    }
  }
 else {
    if (this.btnStandard.getSelection()) {
      cpWrapStandardDate.setEnabled(true);
      cpWrapAdvancedDate.setEnabled(false);
    }
 else     if (this.btnAdvanced.getSelection()) {
      cpWrapStandardDate.setEnabled(false);
      cpWrapAdvancedDate.setEnabled(true);
    }
 else {
      cpWrapStandardDate.setEnabled(false);
      cpWrapAdvancedDate.setEnabled(false);
    }
  }
}

Fixed version (ground truth):
private void updateUIState(){
  if (cmbDataType.getText().equals("String_Node_Str")) {
    if (this.btnStandard.getSelection()) {
      cpWrapStandardNumber.setEnabled(true);
      cpWrapAdvancedNumber.setEnabled(false);
      cpWrapFractionNumber.setEnabled(false);
    }
 else     if (this.btnAdvanced.getSelection()) {
      cpWrapStandardNumber.setEnabled(false);
      cpWrapAdvancedNumber.setEnabled(true);
      cpWrapFractionNumber.setEnabled(false);
    }
 else     if (this.btnFraction.getSelection()) {
      cpWrapStandardNumber.setEnabled(false);
      cpWrapAdvancedNumber.setEnabled(false);
      cpWrapFractionNumber.setEnabled(true);
    }
 else {
      cpWrapStandardNumber.setEnabled(false);
      cpWrapAdvancedNumber.setEnabled(false);
      cpWrapFractionNumber.setEnabled(false);
    }
    cmpFractionNumberDetails.setVisible(true);
    btnFraction.setVisible(true);
  }
 else {
    if (this.btnStandard.getSelection()) {
      cpWrapStandardDate.setEnabled(true);
      cpWrapAdvancedDate.setEnabled(false);
    }
 else     if (this.btnAdvanced.getSelection()) {
      cpWrapStandardDate.setEnabled(false);
      cpWrapAdvancedDate.setEnabled(true);
    }
 else {
      cpWrapStandardDate.setEnabled(false);
      cpWrapAdvancedDate.setEnabled(false);
    }
    cmpFractionNumberDetails.setVisible(false);
    btnFraction.setVisible(false);
  }
}
Program: 78330
Project: 78330
Buggy source:
public void modifyText(ModifyEvent e){
  if (!jdbcUrl.isFocusControl()) {
    return;
  }
  verifyJDBCProperties();
  updateTestButton();
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  if (!jdbcUrl.isFocusControl() && jdbcUrl.getText().trim().length() == 0) {
    return;
  }
  verifyJDBCProperties();
  updateTestButton();
}
Program: 78331
Project: 78331
Buggy source:
protected void createEditPolicies(){
  installEditPolicy(EditPolicy.LAYOUT_ROLE,new ReportFlowLayoutEditPolicy(){
    protected org.eclipse.gef.commands.Command getCreateCommand(    CreateRequest request){
      List list=getHost().getChildren();
      if (list.size() != 0 && !(list.get(0) instanceof EmptyEditPart)) {
        return UnexecutableCommand.INSTANCE;
      }
      CreateCommand command=new CreateCommand(request.getExtendedData()){
        public void execute(){
          super.execute();
          Display.getCurrent().asyncExec(new Runnable(){
            public void run(){
              SetCurrentEditModelCommand c=new SetCurrentEditModelCommand(getNewObject());
              c.execute();
            }
          }
);
        }
      }
;
      Object model=this.getHost().getModel();
      if (model instanceof ReportElementModel) {
        command.setParent(((ReportElementModel)model).getSlotHandle());
      }
 else       if (model instanceof ListBandProxy) {
        command.setParent(((ListBandProxy)model).getSlotHandle());
      }
 else {
        command.setParent(model);
      }
      return command;
    }
  }
);
  installEditPolicy(EditPolicy.CONTAINER_ROLE,new ReportContainerEditPolicy());
}

Fixed version (ground truth):
protected void createEditPolicies(){
  installEditPolicy(EditPolicy.LAYOUT_ROLE,new ReportFlowLayoutEditPolicy(){
    protected org.eclipse.gef.commands.Command getCreateCommand(    CreateRequest request){
      List list=getHost().getChildren();
      Boolean direct=(Boolean)request.getExtendedData().get(DesignerConstants.DIRECT_CREATEITEM);
      if (list.size() != 0 && !(list.get(0) instanceof EmptyEditPart) && (direct == null || !direct.booleanValue())) {
        return UnexecutableCommand.INSTANCE;
      }
      CreateCommand command=new CreateCommand(request.getExtendedData()){
        public void execute(){
          super.execute();
          Display.getCurrent().asyncExec(new Runnable(){
            public void run(){
              SetCurrentEditModelCommand c=new SetCurrentEditModelCommand(getNewObject());
              c.execute();
            }
          }
);
        }
      }
;
      Object model=this.getHost().getModel();
      if (model instanceof ReportElementModel) {
        command.setParent(((ReportElementModel)model).getSlotHandle());
      }
 else       if (model instanceof ListBandProxy) {
        command.setParent(((ListBandProxy)model).getSlotHandle());
      }
 else {
        command.setParent(model);
      }
      return command;
    }
  }
);
  installEditPolicy(EditPolicy.CONTAINER_ROLE,new ReportContainerEditPolicy());
}
Program: 78332
Project: 78332
Buggy source:
protected org.eclipse.gef.commands.Command getCreateCommand(CreateRequest request){
  List list=getHost().getChildren();
  if (list.size() != 0 && !(list.get(0) instanceof EmptyEditPart)) {
    return UnexecutableCommand.INSTANCE;
  }
  CreateCommand command=new CreateCommand(request.getExtendedData()){
    public void execute(){
      super.execute();
      Display.getCurrent().asyncExec(new Runnable(){
        public void run(){
          SetCurrentEditModelCommand c=new SetCurrentEditModelCommand(getNewObject());
          c.execute();
        }
      }
);
    }
  }
;
  Object model=this.getHost().getModel();
  if (model instanceof ReportElementModel) {
    command.setParent(((ReportElementModel)model).getSlotHandle());
  }
 else   if (model instanceof ListBandProxy) {
    command.setParent(((ListBandProxy)model).getSlotHandle());
  }
 else {
    command.setParent(model);
  }
  return command;
}

Fixed version (ground truth):
protected org.eclipse.gef.commands.Command getCreateCommand(CreateRequest request){
  List list=getHost().getChildren();
  Boolean direct=(Boolean)request.getExtendedData().get(DesignerConstants.DIRECT_CREATEITEM);
  if (list.size() != 0 && !(list.get(0) instanceof EmptyEditPart) && (direct == null || !direct.booleanValue())) {
    return UnexecutableCommand.INSTANCE;
  }
  CreateCommand command=new CreateCommand(request.getExtendedData()){
    public void execute(){
      super.execute();
      Display.getCurrent().asyncExec(new Runnable(){
        public void run(){
          SetCurrentEditModelCommand c=new SetCurrentEditModelCommand(getNewObject());
          c.execute();
        }
      }
);
    }
  }
;
  Object model=this.getHost().getModel();
  if (model instanceof ReportElementModel) {
    command.setParent(((ReportElementModel)model).getSlotHandle());
  }
 else   if (model instanceof ListBandProxy) {
    command.setParent(((ListBandProxy)model).getSlotHandle());
  }
 else {
    command.setParent(model);
  }
  return command;
}
Program: 78333
Project: 78333
Buggy source:
protected boolean moveData(Object transfer,Object target){
  if (isSupportPalletType(target,transfer)) {
    AbstractToolHandleExtends pre=BasePaletteFactory.getAbstractToolHandleExtendsFromPaletteName(transfer);
    ReportCreationTool tool=new ReportCreationTool(new ReportElementFactory(transfer),pre);
    final EditDomain domain=UIUtil.getLayoutEditPartViewer().getEditDomain();
    tool.setEditDomain(domain);
    tool.setViewer(UIUtil.getLayoutEditPartViewer());
    tool.performCreation(UIUtil.getCurrentEditPart());
    SetCurrentEditModelCommand command=new SetCurrentEditModelCommand(tool.getNewObjectFromRequest());
    command.execute();
    return true;
  }
  return super.moveData(transfer,target);
}

Fixed version (ground truth):
protected boolean moveData(Object transfer,Object target){
  if (isSupportPalletType(target,transfer)) {
    AbstractToolHandleExtends pre=BasePaletteFactory.getAbstractToolHandleExtendsFromPaletteName(transfer);
    ReportCreationTool tool=new ReportCreationTool(new ReportElementFactory(transfer),pre);
    final EditDomain domain=UIUtil.getLayoutEditPartViewer().getEditDomain();
    tool.setEditDomain(domain);
    tool.setViewer(UIUtil.getLayoutEditPartViewer());
    tool.getTargetRequest().getExtendedData().put(DesignerConstants.DIRECT_CREATEITEM,new Boolean(true));
    tool.performCreation(getLibrartReportEditPart());
    SetCurrentEditModelCommand command=new SetCurrentEditModelCommand(tool.getNewObjectFromRequest());
    command.execute();
    return true;
  }
  return super.moveData(transfer,target);
}
Program: 78334
Project: 78334
Buggy source:
protected org.eclipse.birt.data.engine.odi.IResultIterator executeOdiQuery(IEventHandler eventHandler) throws DataException {
  initialize(dataEngine,dataSetDesign,appContext);
  return new CachedResultSet((BaseQuery)this.odiQuery,resultClass,populator,eventHandler);
}

Fixed version (ground truth):
protected org.eclipse.birt.data.engine.odi.IResultIterator executeOdiQuery(IEventHandler eventHandler) throws DataException {
  JointResultMetadata jrm=getJointResultMetadata(left,right);
  resultClass=jrm.getResultClass();
  populator=JointDataSetPopulatorFactory.getBinaryTreeDataSetPopulator(left.getOdiResult(),right.getOdiResult(),jrm,matcher,joinType);
  return new CachedResultSet((BaseQuery)this.odiQuery,resultClass,populator,eventHandler);
}