nus-yam/ex-repair huggingface dataset:
Program: 70050
Project: 70050
Buggy source:
public CompatibilityStatus checkCompatibility(){
  compStatus=checkVersion(handle.getExtensionVersion());
  if (compStatus < 0) {
    CompatibilityStatus status=new CompatibilityStatus();
    List errorList=new ArrayList(2);
    status.setStatusType(CompatibilityStatus.CONVERT_COMPATIBILITY_TYPE);
    try {
      handle.setExtensionVersion(CROSSTAB_CURRENT_VERSION);
    }
 catch (    SemanticException e) {
      errorList.add(e);
    }
    if (getHeader() == null) {
      PropertyHandle headerHandle=handle.getPropertyHandle(HEADER_PROP);
      if (headerHandle != null) {
        try {
          headerHandle.setValue(CrosstabExtendedItemFactory.createCrosstabCell(getModuleHandle()));
        }
 catch (        SemanticException e) {
          errorList.add(e);
        }
      }
    }
    if (errorList.size() > 0) {
      status.setErrors(errorList);
    }
    return status;
  }
 else   if (compStatus > 0) {
    return new CompatibilityStatus(null,CompatibilityStatus.NOT_SUPPORTED_TYPE);
  }
  return COMP_OK_STATUS;
}

Fixed version (ground truth):
public CompatibilityStatus checkCompatibility(){
  compStatus=checkVersion(handle.getExtensionVersion());
  if (compStatus < 0) {
    CompatibilityStatus status=new CompatibilityStatus();
    List errorList=new ArrayList(2);
    status.setStatusType(CompatibilityStatus.CONVERT_COMPATIBILITY_TYPE);
    try {
      handle.setExtensionVersion(CROSSTAB_CURRENT_VERSION);
    }
 catch (    SemanticException e) {
      errorList.add(e);
    }
    if (getHeader() == null) {
      PropertyHandle headerHandle=handle.getPropertyHandle(HEADER_PROP);
      if (headerHandle != null) {
        try {
          headerHandle.setValue(CrosstabExtendedItemFactory.createCrosstabCell(getModuleHandle()));
        }
 catch (        SemanticException e) {
          errorList.add(e);
        }
      }
    }
    if (errorList.size() > 0) {
      status.setErrors(errorList);
    }
    return status;
  }
 else   if (compStatus > 0) {
    return new CompatibilityStatus(Collections.EMPTY_LIST,CompatibilityStatus.NOT_SUPPORTED_TYPE);
  }
  return COMP_OK_STATUS;
}
Program: 70051
Project: 70051
Buggy source:
/** 
 * The container may be a TableArea, RowArea, etc. Or just the border of textArea/imageArea. This method draws the border and background of the given container.
 * @param container the ContainerArea specified from layout
 */
protected void startContainer(IContainerArea container){
  if (container.needClip()) {
    startClip(container);
  }
  if (container instanceof RowArea) {
    rowStyleStack.push(container.getBoxStyle());
  }
 else   if (container instanceof CellArea) {
    drawCell(container);
  }
 else {
    drawContainer(container);
  }
  currentX+=getX(container);
  currentY+=getY(container);
}

Fixed version (ground truth):
/** 
 * The container may be a TableArea, RowArea, etc. Or just the border of textArea/imageArea. This method draws the border and background of the given container.
 * @param container the ContainerArea specified from layout
 */
protected void startContainer(IContainerArea container){
  if (container.needClip()) {
    startClip(container);
  }
  if (container instanceof RowArea) {
    rowStyleStack.push(container.getBoxStyle());
  }
 else   if (container instanceof CellArea) {
    drawCell((CellArea)container);
  }
 else {
    drawContainer(container);
  }
  currentX+=getX(container);
  currentY+=getY(container);
}
Program: 70052
Project: 70052
Buggy source:
protected void drawCell(IContainerArea container){
  Color rowbc=null;
  BackgroundImageInfo rowbi=null;
  BoxStyle rowStyle=null;
  if (rowStyleStack.size() > 0) {
    rowStyle=(BoxStyle)rowStyleStack.peek();
    if (rowStyle != null) {
      rowbc=rowStyle.getBackgroundColor();
      rowbi=rowStyle.getBackgroundImage();
    }
  }
  BoxStyle style=container.getBoxStyle();
  Color bc=style.getBackgroundColor();
  BackgroundImageInfo bi=style.getBackgroundImage();
  if (rowbc != null || rowbi != null || bc != null || bi != null) {
    int startX=currentX + getX(container);
    int startY=currentY + getY(container);
    int width=getWidth(container);
    int height=getHeight(container);
    if (rowbc != null) {
      pageGraphic.drawBackgroundColor(rowbc,startX,startY,width,height);
    }
    if (rowbi != null) {
      drawBackgroundImage(rowbi,startX,startY,width,height);
    }
    if (bc != null) {
      pageGraphic.drawBackgroundColor(bc,startX,startY,width,height);
    }
    if (bi != null) {
      drawBackgroundImage(bi,startX,startY,width,height);
    }
  }
}

Fixed version (ground truth):
protected void drawCell(CellArea container){
  drawCellDiagonal(container);
  Color rowbc=null;
  BackgroundImageInfo rowbi=null;
  BoxStyle rowStyle=null;
  if (rowStyleStack.size() > 0) {
    rowStyle=(BoxStyle)rowStyleStack.peek();
    if (rowStyle != null) {
      rowbc=rowStyle.getBackgroundColor();
      rowbi=rowStyle.getBackgroundImage();
    }
  }
  BoxStyle style=container.getBoxStyle();
  Color bc=style.getBackgroundColor();
  BackgroundImageInfo bi=style.getBackgroundImage();
  if (rowbc != null || rowbi != null || bc != null || bi != null) {
    int startX=currentX + getX(container);
    int startY=currentY + getY(container);
    int width=getWidth(container);
    int height=getHeight(container);
    if (rowbc != null) {
      pageGraphic.drawBackgroundColor(rowbc,startX,startY,width,height);
    }
    if (rowbi != null) {
      drawBackgroundImage(rowbi,startX,startY,width,height);
    }
    if (bc != null) {
      pageGraphic.drawBackgroundColor(bc,startX,startY,width,height);
    }
    if (bi != null) {
      drawBackgroundImage(bi,startX,startY,width,height);
    }
  }
}
Program: 70053
Project: 70053
Buggy source:
public CellArea(CellArea cell){
  super(cell);
  rowSpan=cell.rowSpan;
  colSpan=cell.colSpan;
  columnID=cell.columnID;
  rowID=cell.rowID;
}

Fixed version (ground truth):
public CellArea(CellArea cell){
  super(cell);
  rowSpan=cell.rowSpan;
  colSpan=cell.colSpan;
  columnID=cell.columnID;
  rowID=cell.rowID;
  diagonalInfo=cell.diagonalInfo;
}
Program: 70054
Project: 70054
Buggy source:
public void initialize() throws BirtException {
  ICellContent cellContent=(ICellContent)content;
  rowSpan=cellContent.getRowSpan();
  columnID=cellContent.getColumn();
  colSpan=cellContent.getColSpan();
  TableArea table=getTable();
  hasStyle=true;
  width=table.getCellWidth(columnID,columnID + colSpan);
  this.buildProperties(cellContent,context);
  table.resolveBorderConflict(this,true);
  maxAvaWidth=getContentWidth();
  boolean isLastColumn=(columnID + colSpan == table.getColumnCount());
  if (!table.isInInlineStacking && isLastColumn) {
    isInInlineStacking=false;
  }
 else {
    isInInlineStacking=true;
  }
  this.bookmark=content.getBookmark();
  this.action=content.getHyperlinkAction();
  parent.add(this);
}

Fixed version (ground truth):
public void initialize() throws BirtException {
  ICellContent cellContent=(ICellContent)content;
  rowSpan=cellContent.getRowSpan();
  columnID=cellContent.getColumn();
  colSpan=cellContent.getColSpan();
  TableArea table=getTable();
  hasStyle=true;
  width=table.getCellWidth(columnID,columnID + colSpan);
  buildProperties(cellContent,context);
  buildDiagonalInfo();
  table.resolveBorderConflict(this,true);
  maxAvaWidth=getContentWidth();
  boolean isLastColumn=(columnID + colSpan == table.getColumnCount());
  if (!table.isInInlineStacking && isLastColumn) {
    isInInlineStacking=false;
  }
 else {
    isInInlineStacking=true;
  }
  this.bookmark=content.getBookmark();
  this.action=content.getHyperlinkAction();
  parent.add(this);
}
Program: 70055
Project: 70055
Buggy source:
public void layout() throws BirtException {
  init();
  if (PropertyUtil.isInlineElement(image)) {
    assert(parent instanceof InlineStackingArea);
    InlineStackingArea lineParent=(InlineStackingArea)parent;
    if (root.getAllocatedWidth() > parent.getCurrentMaxContentWidth()) {
      if (!lineParent.isEmptyLine()) {
        lineParent.endLine();
        layout();
      }
 else {
        parent.add(root);
        root.finished=true;
        parent.update(root);
        return;
      }
    }
 else {
      parent.add(root);
      root.finished=true;
      parent.update(root);
      return;
    }
  }
 else {
    parent.add(root);
    if (!parent.isInInlineStacking && context.isAutoPageBreak()) {
      int aHeight=root.getAllocatedHeight();
      if (aHeight + parent.getAbsoluteBP() > context.getMaxBP()) {
        parent.autoPageBreak();
      }
    }
    root.finished=true;
    parent.update(root);
  }
}

Fixed version (ground truth):
public void layout() throws BirtException {
  init();
  if (PropertyUtil.isInlineElement(image)) {
    assert(parent instanceof InlineStackingArea);
    InlineStackingArea lineParent=(InlineStackingArea)parent;
    if (root.getAllocatedWidth() > parent.getCurrentMaxContentWidth()) {
      if (!lineParent.isEmptyLine()) {
        lineParent.endLine(false);
        layout();
      }
 else {
        parent.add(root);
        root.finished=true;
        parent.update(root);
        return;
      }
    }
 else {
      parent.add(root);
      root.finished=true;
      parent.update(root);
      return;
    }
  }
 else {
    parent.add(root);
    if (!parent.isInInlineStacking && context.isAutoPageBreak()) {
      int aHeight=root.getAllocatedHeight();
      if (aHeight + parent.getAbsoluteBP() > context.getMaxBP()) {
        parent.autoPageBreak();
      }
    }
    root.finished=true;
    parent.update(root);
  }
}
Program: 70056
Project: 70056
Buggy source:
public void endLine() throws BirtException {
  lineCount++;
  if (getChildrenCount() > 0) {
    close(false);
  }
  if (lineParent != null) {
    lineParent.removeChild(this);
    lineParent.endLine();
    initialize();
  }
}

Fixed version (ground truth):
public void endLine(boolean endParagraph) throws BirtException {
  lineCount++;
  if (getChildrenCount() > 0) {
    close(false);
  }
  if (lineParent != null) {
    lineParent.removeChild(this);
    lineParent.endLine(endParagraph);
    initialize();
  }
}
Program: 70057
Project: 70057
Buggy source:
public abstract void endLine() throws BirtException ;

Fixed version (ground truth):
public abstract void endLine(boolean endParagraph) throws BirtException ;
Program: 70058
Project: 70058
Buggy source:
public void layout() throws BirtException {
  initialize();
  TextAreaLayout inlineText=new TextAreaLayout(this,context,content);
  inlineText.initialize();
  inlineText.layout();
  inlineText.close();
  close();
}

Fixed version (ground truth):
public void layout() throws BirtException {
  initialize();
  if (content instanceof ITextContent && lineParent.getChildrenCount() == 1) {
    lineParent.setTextIndent((ITextContent)content);
  }
  TextAreaLayout inlineText=new TextAreaLayout(this,context,content);
  inlineText.initialize();
  inlineText.layout();
  inlineText.close();
  close();
}
Program: 70059
Project: 70059
Buggy source:
public void endLine() throws BirtException {
  close(false);
  currentIP=0;
}

Fixed version (ground truth):
public void endLine(boolean endParagraph) throws BirtException {
  close(false,endParagraph);
  currentIP=0;
}
Program: 70060
Project: 70060
Buggy source:
public void update(AbstractArea area) throws BirtException {
  int aWidth=area.getAllocatedWidth();
  if (aWidth + currentIP > maxAvaWidth) {
    removeChild(area);
    endLine();
    children.add(area);
  }
  area.setAllocatedPosition(currentIP,currentBP);
  currentIP+=aWidth;
  int height=area.getAllocatedHeight();
  if (height > getHeight()) {
    this.height=height;
  }
}

Fixed version (ground truth):
public void update(AbstractArea area) throws BirtException {
  int aWidth=area.getAllocatedWidth();
  if (aWidth + currentIP > maxAvaWidth) {
    removeChild(area);
    endLine(false);
    children.add(area);
  }
  area.setAllocatedPosition(currentIP,currentBP);
  currentIP+=aWidth;
  int height=area.getAllocatedHeight();
  if (height > getHeight()) {
    this.height=height;
  }
}
Program: 70061
Project: 70061
Buggy source:
public void align(boolean lastLine,LayoutContext context){
  assert(parent instanceof BlockContainerArea);
  CSSValue align=((BlockContainerArea)parent).getTextAlign();
  boolean isRightAligned=BidiAlignmentResolver.isRightAligned(parent.content,align,lastLine);
  if ((isRightAligned || IStyle.CENTER_VALUE.equals(align))) {
    int spacing=width - currentIP;
    Iterator iter=getChildren();
    while (iter.hasNext()) {
      AbstractArea area=(AbstractArea)iter.next();
      if (isRightAligned) {
        if (parent.content.isDirectionRTL()) {
          area.setPosition(spacing + area.getX(),area.getY());
        }
 else {
          area.setPosition(spacing + area.getX() + ignoreRightMostWhiteSpace(),area.getY());
        }
      }
 else       if (IStyle.CENTER_VALUE.equals(align)) {
        area.setPosition(spacing / 2 + area.getX(),area.getY());
      }
    }
  }
 else   if (IStyle.JUSTIFY_VALUE.equals(align) && !lastLine) {
    justify();
  }
  if (context.getBidiProcessing())   reorderVisually();
  verticalAlign();
}

Fixed version (ground truth):
public void align(boolean endParagraph,LayoutContext context){
  assert(parent instanceof BlockContainerArea);
  CSSValue align=((BlockContainerArea)parent).getTextAlign();
  boolean isRightAligned=BidiAlignmentResolver.isRightAligned(parent.content,align,endParagraph);
  if ((isRightAligned || IStyle.CENTER_VALUE.equals(align))) {
    int spacing=width - currentIP;
    Iterator iter=getChildren();
    while (iter.hasNext()) {
      AbstractArea area=(AbstractArea)iter.next();
      if (isRightAligned) {
        if (parent.content.isDirectionRTL()) {
          area.setPosition(spacing + area.getX(),area.getY());
        }
 else {
          area.setPosition(spacing + area.getX() + ignoreRightMostWhiteSpace(),area.getY());
        }
      }
 else       if (IStyle.CENTER_VALUE.equals(align)) {
        area.setPosition(spacing / 2 + area.getX(),area.getY());
      }
    }
  }
 else   if (IStyle.JUSTIFY_VALUE.equals(align) && !endParagraph) {
    justify();
  }
  if (context.getBidiProcessing())   reorderVisually();
  verticalAlign();
}
Program: 70062
Project: 70062
Buggy source:
public void close() throws BirtException {
  close(true);
  finished=true;
}

Fixed version (ground truth):
public void close() throws BirtException {
  close(true,true);
  finished=true;
}
Program: 70063
Project: 70063
Buggy source:
/** 
 * true if succeed to new a line.
 */
public void newLine() throws BirtException {
  parentLM.endLine();
}

Fixed version (ground truth):
/** 
 * true if succeed to new a line.
 */
public void newLine() throws BirtException {
  parentLM.endLine(true);
}
Program: 70064
Project: 70064
Buggy source:
public TextAreaLayout(ContainerArea parent,LayoutContext context,IContent content){
  parentLM=(InlineStackingArea)parent;
  ITextContent textContent=(ITextContent)content;
  String text=textContent.getText();
  if (text != null && text.length() != 0)   transform(textContent);
 else   textContent.setText("String_Node_Str");
  this.textContent=textContent;
  comp=new TextCompositor(textContent,context.getFontManager(),context);
  ContainerArea ancestor=parentLM;
  do {
    if (null == ancestor) {
      comp.setNewLineStatus(true);
      return;
    }
    if (!ancestor.isEmpty()) {
      comp.setNewLineStatus(false);
      return;
    }
    if (ancestor instanceof LineArea) {
      comp.setNewLineStatus(ancestor.isEmpty());
      return;
    }
    ancestor=ancestor.getParent();
  }
 while (true);
}

Fixed version (ground truth):
public TextAreaLayout(ContainerArea parent,LayoutContext context,IContent content){
  parentLM=(InlineStackingArea)parent;
  ITextContent textContent=(ITextContent)content;
  parentLM.setTextIndent(textContent);
  String text=textContent.getText();
  if (text != null && text.length() != 0)   transform(textContent);
 else   textContent.setText("String_Node_Str");
  this.textContent=textContent;
  comp=new TextCompositor(textContent,context.getFontManager(),context);
  ContainerArea ancestor=parentLM;
  do {
    if (null == ancestor) {
      comp.setNewLineStatus(true);
      return;
    }
    if (!ancestor.isEmpty()) {
      comp.setNewLineStatus(false);
      return;
    }
    if (ancestor instanceof LineArea) {
      comp.setNewLineStatus(ancestor.isEmpty());
      return;
    }
    ancestor=ancestor.getParent();
  }
 while (true);
}
Program: 70067
Project: 70067
Buggy source:
/** 
 * This implementation of <code>javaToNative</code> converts plain text represented by a java <code>String</code> to a platform specific representation.
 * @param object a java <code>String</code> containing text
 * @param transferData an empty <code>TransferData</code> object; this object will be filled in on return with the platform specific format of the data
 * @see Transfer#javaToNative
 */
public void javaToNative(Object object,TransferData transferData){
  if (checkText(object) && isSupportedType(transferData)) {
    super.javaToNative(((String)object).getBytes(),transferData);
  }
}

Fixed version (ground truth):
/** 
 * This implementation of <code>javaToNative</code> converts plain text represented by a java <code>String</code> to a platform specific representation.
 * @param object a java <code>String</code> containing text
 * @param transferData an empty <code>TransferData</code> object; this object will be filled in on return with the platform specific format of the data
 * @see Transfer#javaToNative
 */
public void javaToNative(Object object,TransferData transferData){
  if (checkText(object) && isSupportedType(transferData)) {
    try {
      super.javaToNative(((String)object).getBytes("String_Node_Str"),transferData);
    }
 catch (    UnsupportedEncodingException e) {
      super.javaToNative(((String)object).getBytes(),transferData);
    }
  }
}
Program: 70068
Project: 70068
Buggy source:
/** 
 * This implementation of <code>nativeToJava</code> converts a platform specific representation of plain text to a java <code>String</code>.
 * @param transferData the platform specific representation of the data to be converted
 * @return a java <code>String</code> containing text if the conversionwas successful; otherwise null
 * @see Transfer#nativeToJava
 */
public Object nativeToJava(TransferData transferData){
  if (!isSupportedType(transferData)) {
    return null;
  }
  byte[] bytes=(byte[])super.nativeToJava(transferData);
  return new String(bytes);
}

Fixed version (ground truth):
/** 
 * This implementation of <code>nativeToJava</code> converts a platform specific representation of plain text to a java <code>String</code>.
 * @param transferData the platform specific representation of the data to be converted
 * @return a java <code>String</code> containing text if the conversionwas successful; otherwise null
 * @see Transfer#nativeToJava
 */
public Object nativeToJava(TransferData transferData){
  if (!isSupportedType(transferData)) {
    return null;
  }
  byte[] bytes=(byte[])super.nativeToJava(transferData);
  try {
    return new String(bytes,"String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
  }
  return new String(bytes);
}
Program: 70069
Project: 70069
Buggy source:
public boolean isValidExpression(String expression){
  if (context.getDataServiceProvider().checkState(IDataServiceProvider.SHARE_QUERY)) {
    int index=cmbDefinition.indexOf(expression);
    if (index < 0) {
      return false;
    }
    return true;
  }
  return true;
}

Fixed version (ground truth):
public boolean isValidExpression(String expression){
  if (context.getDataServiceProvider().checkState(IDataServiceProvider.SHARE_QUERY)) {
    if (cmbDefinition == null)     return false;
    int index=cmbDefinition.indexOf(expression);
    if (index < 0) {
      return false;
    }
    return true;
  }
  return true;
}
Program: 70070
Project: 70070
Buggy source:
/** 
 * This method is called when the plug-in is stopped
 */
public void stop(BundleContext context) throws Exception {
  bundleContext=null;
  if (syncService != null) {
    syncService.unregister();
    syncService=null;
  }
  ignore.clear();
  if (cellLeftCursor != null) {
    cellLeftCursor.dispose();
  }
  if (cellRightCursor != null) {
    cellRightCursor.dispose();
  }
  Platform.getExtensionRegistry().removeRegistryChangeListener(DNDService.getInstance());
  BaseBorder.cleanWidthCache();
  FormWidgetFactory.getInstance().dispose();
  super.stop(context);
}

Fixed version (ground truth):
/** 
 * This method is called when the plug-in is stopped
 */
public void stop(BundleContext context) throws Exception {
  bundleContext=null;
  if (syncService != null) {
    syncService.unregister();
    syncService=null;
  }
  ignore.clear();
  if (cellLeftCursor != null) {
    cellLeftCursor.dispose();
  }
  if (cellRightCursor != null) {
    cellRightCursor.dispose();
  }
  Platform.getExtensionRegistry().removeRegistryChangeListener(DNDService.getInstance());
  BaseBorder.cleanWidthCache();
  FormWidgetFactory.close();
  super.stop(context);
}
Program: 70072
Project: 70072
Buggy source:
/** 
 * @param subqueryDefinitions
 * @param subQueryName
 * @return
 * @throws DataException 
 */
private static void getSubQueryBindings(SubqueryDefinition[] subqueryDefinitions,String subQueryName,List<IBinding> resultBindingList) throws DataException {
  for (int j=0; j < subqueryDefinitions.length; j++) {
    if (subqueryDefinitions[j].getName() != null && subqueryDefinitions[j].getName().equals(subQueryName)) {
      addQueryBindings(resultBindingList,subqueryDefinitions[j].getBindings().values());
      return;
    }
    getSubQueryBindings(subqueryDefinitions[j],subQueryName,resultBindingList);
    if (resultBindingList.size() > 0) {
      addQueryBindings(resultBindingList,subqueryDefinitions[j].getBindings().values());
      return;
    }
  }
  return;
}

Fixed version (ground truth):
/** 
 * @param subqueryDefinitions
 * @param subQueryName
 * @return
 * @throws DataException 
 */
private static void getSubQueryBindings(SubqueryDefinition[] subqueryDefinitions,String subQueryName,List<IBinding> resultBindingList) throws DataException {
  for (int j=0; j < subqueryDefinitions.length; j++) {
    if (subqueryDefinitions[j].getName() != null && subqueryDefinitions[j].getName().equals(subQueryName)) {
      addQueryBindings(resultBindingList,subqueryDefinitions[j].getBindings());
      return;
    }
    getSubQueryBindings(subqueryDefinitions[j],subQueryName,resultBindingList);
    if (resultBindingList.size() > 0) {
      addQueryBindings(resultBindingList,subqueryDefinitions[j].getBindings());
      return;
    }
  }
  return;
}
Program: 70073
Project: 70073
Buggy source:
/** 
 * @param resultBindingList
 * @param bindingCollection
 * @throws DataException 
 */
protected static void addQueryBindings(List<IBinding> resultBindingList,Collection bindingCollection) throws DataException {
  Iterator bindingIterator=bindingCollection.iterator();
  while (bindingIterator.hasNext()) {
    IBinding binding=(IBinding)(bindingIterator.next());
    if (binding.getAggrFunction() != null)     continue;
    IBaseExpression expr=binding.getExpression();
    if (expr instanceof IScriptExpression && !ExpressionUtil.hasAggregation(((IScriptExpression)expr).getText()) && binding.getAggrFunction() == null) {
      boolean exist=false;
      for (int i=0; i < resultBindingList.size(); i++) {
        if (resultBindingList.get(i) != null && resultBindingList.get(i).getBindingName().equals(binding.getBindingName())) {
          exist=true;
        }
      }
      if (!exist)       resultBindingList.add(binding);
    }
  }
}

Fixed version (ground truth):
/** 
 * @param resultBindingList
 * @param bindingCollection
 * @throws DataException 
 */
protected static void addQueryBindings(List<IBinding> resultBindingList,Map bindings) throws DataException {
  Map<String,Boolean> aggrInfo=PreparedQueryUtil.parseAggregations(bindings);
  Iterator it=bindings.keySet().iterator();
  while (it.hasNext()) {
    String name=(String)it.next();
    if (!aggrInfo.get(name)) {
{
        IBinding binding=(IBinding)(bindings.get(name));
        boolean exist=false;
        for (int i=0; i < resultBindingList.size(); i++) {
          if (resultBindingList.get(i) != null && resultBindingList.get(i).getBindingName().equals(binding.getBindingName())) {
            exist=true;
          }
        }
        if (!exist)         resultBindingList.add(binding);
      }
    }
  }
}
Program: 70074
Project: 70074
Buggy source:
/** 
 * Each binding is parsed to see if it's an aggregation. The parsed result saved in a Map<String, Boolean> map
 * @param input
 * @return 
 * @throws DataException
 */
private static Map<String,Boolean> parseAggregations(Map<String,IBinding> input) throws DataException {
  Map<String,Boolean> result=new HashMap<String,Boolean>();
  for (  Entry<String,IBinding> entry : input.entrySet()) {
    IBinding binding=entry.getValue();
    Set<String> transitions=new HashSet<String>();
    transitions.add(binding.getBindingName());
    parseAggregation(binding,input,result,transitions);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Each binding is parsed to see if it's an aggregation. The parsed result saved in a Map<String, Boolean> map
 * @param input
 * @return 
 * @throws DataException
 */
static Map<String,Boolean> parseAggregations(Map<String,IBinding> input) throws DataException {
  Map<String,Boolean> result=new HashMap<String,Boolean>();
  for (  Entry<String,IBinding> entry : input.entrySet()) {
    IBinding binding=entry.getValue();
    Set<String> transitions=new HashSet<String>();
    transitions.add(binding.getBindingName());
    parseAggregation(binding,input,result,transitions);
  }
  return result;
}
Program: 70075
Project: 70075
Buggy source:
static Loader createLoader(URL url){
  try {
    String file=url.getFile();
    if (file != null && file.endsWith("String_Node_Str")) {
      if ("String_Node_Str".equals(url.getProtocol())) {
        return new FileLoader(url);
      }
      return new UrlLoader(url);
    }
    return new JarLoader(url);
  }
 catch (  IOException ex) {
    logger.log(Level.SEVERE,"String_Node_Str" + url,ex);
    return null;
  }
}

Fixed version (ground truth):
static Loader createLoader(URL url){
  try {
    String file=url.getFile();
    if (file != null && file.endsWith("String_Node_Str")) {
      if ("String_Node_Str".equals(url.getProtocol())) {
        return new FileLoader(url);
      }
      return new UrlLoader(url);
    }
    return new JarLoader(url);
  }
 catch (  IOException ex) {
    logger.log(Level.WARNING,"String_Node_Str" + url,ex);
    return null;
  }
}
Program: 70079
Project: 70079
Buggy source:
private Set<CacheConnection> getOdaConnections(boolean populateToCache){
  if (DataSource.dataEngineLevelConnectionPool.get(this.session) == null) {
    if (populateToCache) {
      DataSource.dataEngineLevelConnectionPool.put(this.session,new HashMap<ConnectionProp,Set<CacheConnection>>());
    }
 else {
      return new HashSet<CacheConnection>();
    }
  }
  Map<ConnectionProp,Set<CacheConnection>> odaConnectionsMap=DataSource.dataEngineLevelConnectionPool.get(this.session);
  ConnectionProp connProp=new ConnectionProp(this.driverName,this.connectionProps,this.appContext);
  if (odaConnectionsMap.get(connProp) == null) {
    odaConnectionsMap.put(connProp,new HashSet<CacheConnection>());
  }
  return odaConnectionsMap.get(connProp);
}

Fixed version (ground truth):
private Set<CacheConnection> getOdaConnections(boolean populateToCache){
synchronized (DataSource.dataEngineLevelConnectionPool) {
    if (DataSource.dataEngineLevelConnectionPool.get(this.session) == null) {
      if (populateToCache) {
        DataSource.dataEngineLevelConnectionPool.put(this.session,new HashMap<ConnectionProp,Set<CacheConnection>>());
      }
 else {
        return new HashSet<CacheConnection>();
      }
    }
    Map<ConnectionProp,Set<CacheConnection>> odaConnectionsMap=DataSource.dataEngineLevelConnectionPool.get(this.session);
    ConnectionProp connProp=new ConnectionProp(this.driverName,this.connectionProps,this.appContext);
    if (odaConnectionsMap.get(connProp) == null) {
      odaConnectionsMap.put(connProp,new HashSet<CacheConnection>());
    }
    return odaConnectionsMap.get(connProp);
  }
}
Program: 70080
Project: 70080
Buggy source:
public void startData(IDataContent data){
  HyperlinkDef url=parseHyperLink(data);
  BookmarkDef bookmark=getBookmark(data);
  if (((StyledElementDesign)data.getGenerateBy()).getMap() != null && ((StyledElementDesign)data.getGenerateBy()).getMap().getRuleCount() > 0 && data.getLabelText() != null) {
    engine.addData(data.getLabelText().trim(),data.getComputedStyle(),url,bookmark);
  }
 else   if (ExcelUtil.getType(data.getValue()) == SheetData.STRING) {
    engine.addData(data.getText(),data.getComputedStyle(),url,bookmark);
  }
 else   if (ExcelUtil.getType(data.getValue()) != Data.NUMBER) {
    engine.addDateTime(data,data.getComputedStyle(),url,bookmark);
  }
 else {
    engine.addData(data.getValue(),data.getComputedStyle(),url,bookmark);
  }
}

Fixed version (ground truth):
public void startData(IDataContent data){
  HyperlinkDef url=parseHyperLink(data);
  BookmarkDef bookmark=getBookmark(data);
  IStyle style=data.getComputedStyle();
  DataFormatValue dataformat=style.getDataFormat();
  MapDesign map=((StyledElementDesign)data.getGenerateBy()).getMap();
  if (map != null && map.getRuleCount() > 0 && data.getLabelText() != null) {
    engine.addData(data.getLabelText().trim(),style,url,bookmark);
  }
 else {
    String locale=null;
    int type=ExcelUtil.getType(data.getValue());
    if (type == SheetData.STRING) {
      if (dataformat != null) {
        locale=dataformat.getStringLocale();
      }
      engine.addData(data.getText(),style,url,bookmark,locale);
    }
 else     if (type == Data.NUMBER) {
      if (dataformat != null) {
        locale=dataformat.getNumberLocale();
      }
      engine.addData(data.getValue(),style,url,bookmark,locale);
    }
 else {
      if (dataformat != null) {
        locale=dataformat.getDateTimeLocale();
      }
      engine.addDateTime(data,style,url,bookmark,locale);
    }
  }
}
Program: 70081
Project: 70081
Buggy source:
public void addDateTime(Object txt,IStyle style,HyperlinkDef link,BookmarkDef bookmark){
  ContainerSizeInfo rule=getCurrentContainer().getSizeInfo();
  StyleEntry entry=engine.getStyle(style,rule);
  Data data=null;
  IDataContent dataContent=(IDataContent)txt;
  Object value=dataContent.getValue();
  Date date=ExcelUtil.getDate(value);
  if (date != null && ((date instanceof Time) || date.getYear() >= 0)) {
    data=createDateData(value,entry,style.getDateTimeFormat());
    data.setHyperlinkDef(link);
    data.setBookmark(bookmark);
    data.setSizeInfo(rule);
    addData(data);
  }
 else {
    addData(dataContent.getText(),style,link,bookmark);
  }
}

Fixed version (ground truth):
public void addDateTime(Object txt,IStyle style,HyperlinkDef link,BookmarkDef bookmark,String dateTimeLocale){
  ContainerSizeInfo rule=getCurrentContainer().getSizeInfo();
  StyleEntry entry=engine.getStyle(style,rule);
  Data data=null;
  IDataContent dataContent=(IDataContent)txt;
  Object value=dataContent.getValue();
  Date date=ExcelUtil.getDate(value);
  if (date != null && ((date instanceof Time) || date.getYear() >= 0)) {
    data=createDateData(value,entry,style.getDateTimeFormat(),dateTimeLocale);
    data.setHyperlinkDef(link);
    data.setBookmark(bookmark);
    data.setSizeInfo(rule);
    addData(data);
  }
 else {
    addData(dataContent.getText(),style,link,bookmark,dateTimeLocale);
  }
}
Program: 70082
Project: 70082
Buggy source:
private Data createDateData(Object txt,StyleEntry entry,String timeFormat){
  timeFormat=ExcelUtil.parse(txt,timeFormat,locale);
  timeFormat=DateTimeUtil.formatDateTime(timeFormat,locale);
  entry.setProperty(StyleConstant.DATE_FORMAT_PROP,timeFormat);
  entry.setProperty(StyleConstant.DATA_TYPE_PROP,Integer.toString(SheetData.DATE));
  return new Data(txt,entry,SheetData.DATE,getCurrentContainer());
}

Fixed version (ground truth):
private Data createDateData(Object txt,StyleEntry entry,String timeFormat,String dlocale){
  ULocale dateLocale=getLocale(dlocale);
  timeFormat=ExcelUtil.parse(txt,timeFormat,dateLocale);
  timeFormat=DateTimeUtil.formatDateTime(timeFormat,dateLocale);
  entry.setProperty(StyleConstant.DATE_FORMAT_PROP,timeFormat);
  entry.setProperty(StyleConstant.DATA_TYPE_PROP,Integer.toString(SheetData.DATE));
  return new Data(txt,entry,SheetData.DATE,getCurrentContainer());
}
Program: 70083
Project: 70083
Buggy source:
public Data createData(Object txt,StyleEntry entry){
  int type=SheetData.STRING;
  if (SheetData.NUMBER == ExcelUtil.getType(txt)) {
    String format=ExcelUtil.getPattern(txt,entry.getProperty(StyleConstant.NUMBER_FORMAT_PROP));
    format=ExcelUtil.formatNumberPattern(format,locale);
    entry.setProperty(StyleConstant.NUMBER_FORMAT_PROP,format);
    type=SheetData.NUMBER;
  }
 else   if (SheetData.DATE == ExcelUtil.getType(txt)) {
    String format=ExcelUtil.getPattern(txt,entry.getProperty(StyleConstant.DATE_FORMAT_PROP));
    entry.setProperty(StyleConstant.DATE_FORMAT_PROP,format);
    type=Data.DATE;
  }
  entry.setProperty(StyleConstant.DATA_TYPE_PROP,Integer.toString(type));
  return new Data(txt,entry,type,getCurrentContainer());
}

Fixed version (ground truth):
private Data createData(Object txt,StyleEntry entry,ULocale dataLocale){
  int type=SheetData.STRING;
  if (SheetData.NUMBER == ExcelUtil.getType(txt)) {
    String format=ExcelUtil.getPattern(txt,entry.getProperty(StyleConstant.NUMBER_FORMAT_PROP));
    format=ExcelUtil.formatNumberPattern(format,dataLocale);
    entry.setProperty(StyleConstant.NUMBER_FORMAT_PROP,format);
    type=SheetData.NUMBER;
  }
 else   if (SheetData.DATE == ExcelUtil.getType(txt)) {
    String format=ExcelUtil.getPattern(txt,entry.getProperty(StyleConstant.DATE_FORMAT_PROP));
    entry.setProperty(StyleConstant.DATE_FORMAT_PROP,format);
    type=Data.DATE;
  }
  entry.setProperty(StyleConstant.DATA_TYPE_PROP,Integer.toString(type));
  return new Data(txt,entry,type,getCurrentContainer());
}
Program: 70084
Project: 70084
Buggy source:
/** 
 * @param option
 * @return
 * @throws BirtException
 */
private CSVDataExtractionImpl createExtraction(OutputStream out,IDataExtractionOption option) throws BirtException {
  CSVDataExtractionImpl extract=new CSVDataExtractionImpl();
  Map allOptions=new HashMap();
  allOptions.putAll(option.getOptions());
  DataExtractionOption deOptions=new DataExtractionOption(allOptions);
  deOptions.setOutputStream(out);
  extract.initilize(null,deOptions);
  return extract;
}

Fixed version (ground truth):
/** 
 * @param option
 * @return
 * @throws BirtException
 */
private CSVDataExtractionImpl createExtraction(OutputStream out,IDataExtractionOption option) throws BirtException {
  CSVDataExtractionImpl extract=new CSVDataExtractionImpl();
  Map allOptions=new HashMap();
  allOptions.putAll(option.getOptions());
  DataExtractionOption deOptions=new DataExtractionOption(allOptions);
  deOptions.setOutputStream(out);
  extract.initialize(null,deOptions);
  return extract;
}
Program: 70085
Project: 70085
Buggy source:
public void testGetImageByEmbeddedImage() throws Exception {
  EmbeddedImage embeddedImage=new EmbeddedImage("String_Node_Str");
  FileInputStream is=new FileInputStream(iconPath + TEST_FILE);
  byte[] data=new byte[is.available()];
  is.read(data);
  embeddedImage.setData(data);
  getReportDesign().handle().addImage(embeddedImage);
  Image image=ImageManager.getInstance().getEmbeddedImage(getReportDesignHandle(),embeddedImage.getName());
  assertNotNull(image);
  if (PlatformUtil.isWindows()) {
    assertTrue(Arrays.equals(image.getImageData().data,localData.data));
  }
  assertEquals(image,ImageManager.getInstance().getEmbeddedImage(getReportDesignHandle(),embeddedImage.getName()));
}

Fixed version (ground truth):
public void testGetImageByEmbeddedImage() throws Exception {
  EmbeddedImage embeddedImage=new EmbeddedImage("String_Node_Str");
  FileInputStream is=new FileInputStream(iconPath + TEST_FILE);
  byte[] data=new byte[is.available()];
  is.read(data);
  embeddedImage.setData(data);
  getReportDesign().handle().addImage(embeddedImage);
  Image image=ImageManager.getInstance().getEmbeddedImage(getReportDesignHandle(),embeddedImage.getName());
  assertNotNull(image);
  if (PlatformUtil.isWindows()) {
    assertTrue(Arrays.equals(image.getImageData().data,localImage.getImageData().data));
  }
  assertEquals(image,ImageManager.getInstance().getEmbeddedImage(getReportDesignHandle(),embeddedImage.getName()));
}
Program: 70086
Project: 70086
Buggy source:
public void testGetImageByURL() throws Exception {
  Image image=ImageManager.getInstance().getImage(TEST_URL);
  assertNotNull(image);
  assertTrue(Arrays.equals(image.getImageData().data,localData.data));
  assertEquals(image,ImageManager.getInstance().getImage(TEST_URL));
}

Fixed version (ground truth):
public void testGetImageByURL() throws Exception {
  Image image=ImageManager.getInstance().getImage(TEST_URL);
  assertNotNull(image);
  assertTrue(Arrays.equals(image.getImageData().data,localImage.getImageData().data));
  assertEquals(image,ImageManager.getInstance().getImage(TEST_URL));
}
Program: 70087
Project: 70087
Buggy source:
public void testGetImageByPath() throws Exception {
  Image image=ImageManager.getInstance().getImage(iconPath + TEST_FILE);
  assertNotNull(image);
  if (PlatformUtil.isWindows()) {
    assertTrue(Arrays.equals(image.getImageData().data,localData.data));
  }
}

Fixed version (ground truth):
public void testGetImageByPath() throws Exception {
  Image image=ImageManager.getInstance().getImage(iconPath + TEST_FILE);
  assertNotNull(image);
  if (PlatformUtil.isWindows()) {
    assertTrue(Arrays.equals(image.getImageData().data,localImage.getImageData().data));
  }
}
Program: 70088
Project: 70088
Buggy source:
protected Dimension getChildSize(IFigure child,int wHint,int hHint){
  updateChild(child,wHint);
  ReportItemConstraint constraint=(ReportItemConstraint)getConstraint(child);
  Dimension preferredDimension;
  if (DesignChoiceConstants.REPORT_LAYOUT_PREFERENCE_FIXED_LAYOUT.equals(layoutPreference) && child instanceof IFixLayoutHelper) {
    preferredDimension=((IFixLayoutHelper)child).getFixPreferredSize(wHint,hHint);
    if (constraint != null) {
      Dimension dimension=constraint.getSize();
      if (dimension.width <= 0) {
        if (constraint.getMeasure() != 0 && DesignChoiceConstants.UNITS_PERCENTAGE.equals(constraint.getUnits())) {
          preferredDimension.width=(int)constraint.getMeasure() * wHint / 100;
        }
      }
    }
    constraint=null;
  }
 else {
    preferredDimension=child.getPreferredSize(wHint,hHint);
  }
  if (constraint != null && !constraint.isFitContiner()) {
    if (constraint.isNone()) {
      return new Dimension(0,0);
    }
    Dimension dimension=constraint.getSize();
    if (dimension.height <= 0) {
      dimension.height=preferredDimension.height;
    }
    if (dimension.width <= 0) {
      if (constraint.getMeasure() != 0 && DesignChoiceConstants.UNITS_PERCENTAGE.equals(constraint.getUnits())) {
        dimension.width=(int)constraint.getMeasure() * wHint / 100;
      }
 else {
        dimension.width=preferredDimension.width;
      }
    }
    return dimension;
  }
 else {
    return preferredDimension;
  }
}

Fixed version (ground truth):
protected Dimension getChildSize(IFigure child,int wHint,int hHint){
  updateChild(child,wHint);
  ReportItemConstraint constraint=(ReportItemConstraint)getConstraint(child);
  Dimension preferredDimension;
  if (DesignChoiceConstants.REPORT_LAYOUT_PREFERENCE_FIXED_LAYOUT.equals(layoutPreference) && child instanceof IFixLayoutHelper) {
    preferredDimension=((IFixLayoutHelper)child).getFixPreferredSize(wHint,hHint);
    if (constraint != null) {
      Dimension dimension=constraint.getSize();
      if (dimension.width <= 0) {
        if (constraint.getMeasure() != 0 && DesignChoiceConstants.UNITS_PERCENTAGE.equals(constraint.getUnits())) {
          int trueWidth=wHint;
{
            trueWidth=getParentClientArea(child);
          }
          preferredDimension.width=(int)constraint.getMeasure() * trueWidth / 100;
        }
      }
    }
    constraint=null;
  }
 else {
    preferredDimension=child.getPreferredSize(wHint,hHint);
  }
  if (constraint != null && !constraint.isFitContiner()) {
    if (constraint.isNone()) {
      return new Dimension(0,0);
    }
    Dimension dimension=constraint.getSize();
    if (dimension.height <= 0) {
      dimension.height=preferredDimension.height;
    }
    if (dimension.width <= 0) {
      if (constraint.getMeasure() != 0 && DesignChoiceConstants.UNITS_PERCENTAGE.equals(constraint.getUnits())) {
        dimension.width=(int)constraint.getMeasure() * wHint / 100;
      }
 else {
        dimension.width=preferredDimension.width;
      }
    }
    return dimension;
  }
 else {
    return preferredDimension;
  }
}
Program: 70089
Project: 70089
Buggy source:
private void updateChild(IFigure child,int wHint){
  ReportItemConstraint constraint=(ReportItemConstraint)getConstraint(child);
  if (DesignChoiceConstants.REPORT_LAYOUT_PREFERENCE_FIXED_LAYOUT.equals(layoutPreference) && child instanceof IFixLayoutHelper) {
    if (constraint != null) {
      Dimension dimension=constraint.getSize();
      if (dimension.width <= 0) {
        if (constraint.getMeasure() != 0 && DesignChoiceConstants.UNITS_PERCENTAGE.equals(constraint.getUnits())) {
          int width=(int)constraint.getMeasure() * wHint / 100;
          if (child instanceof LabelFigure) {
            LabelFigure label=(LabelFigure)child;
            Dimension dim=label.getRecommendSize();
            label.setRecommendSize(new Dimension(width,dim.height));
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void updateChild(IFigure child,int wHint){
  ReportItemConstraint constraint=(ReportItemConstraint)getConstraint(child);
  if (DesignChoiceConstants.REPORT_LAYOUT_PREFERENCE_FIXED_LAYOUT.equals(layoutPreference) && child instanceof IFixLayoutHelper) {
    if (constraint != null) {
      Dimension dimension=constraint.getSize();
      if (dimension.width <= 0) {
        if (constraint.getMeasure() != 0 && DesignChoiceConstants.UNITS_PERCENTAGE.equals(constraint.getUnits())) {
          int trueWidth=wHint;
{
            trueWidth=getParentClientArea(child);
          }
          int width=(int)constraint.getMeasure() * trueWidth / 100;
          if (child instanceof LabelFigure) {
            LabelFigure label=(LabelFigure)child;
            Dimension dim=label.getRecommendSize();
            label.setRecommendSize(new Dimension(width,dim.height));
          }
        }
      }
    }
  }
}
Program: 70091
Project: 70091
Buggy source:
private String[] getMetadataString(String type){
  if ("String_Node_Str".equals(type) || "String_Node_Str".equals(type)) {
    return new String[]{table1,table2};
  }
 else   if ("String_Node_Str".equals(type)) {
    return new String[]{list1,list2};
  }
 else   if ("String_Node_Str".equals(type) || "String_Node_Str".equals(type) || "String_Node_Str".equals(type)) {
    return new String[]{imageMetadata1,imageMetadata2};
  }
 else   if ("String_Node_Str".equals(type)) {
    return new String[]{template1,template2};
  }
 else   if ("String_Node_Str".equals(type) || "String_Node_Str".equals(type) || "String_Node_Str".equals(type)|| "String_Node_Str".equals(type)|| "String_Node_Str".equals(type)|| "String_Node_Str".equals(type)) {
    return new String[]{metadata1,metadata2};
  }
  fail();
  return null;
}

Fixed version (ground truth):
private String[] getMetadataString(String type){
  if ("String_Node_Str".equals(type) || "String_Node_Str".equals(type)) {
    return new String[]{table1,table2};
  }
 else   if ("String_Node_Str".equals(type)) {
    return new String[]{list1,list2};
  }
 else   if ("String_Node_Str".equals(type) || "String_Node_Str".equals(type)) {
    return new String[]{imageMetadata1,imageMetadata2};
  }
 else   if ("String_Node_Str".equals(type)) {
    return new String[]{chartMetadata1,chartMetadata2};
  }
 else   if ("String_Node_Str".equals(type)) {
    return new String[]{template1,template2};
  }
 else   if ("String_Node_Str".equals(type) || "String_Node_Str".equals(type) || "String_Node_Str".equals(type)|| "String_Node_Str".equals(type)|| "String_Node_Str".equals(type)|| "String_Node_Str".equals(type)) {
    return new String[]{metadata1,metadata2};
  }
  fail();
  return null;
}
Program: 70092
Project: 70092
Buggy source:
public void run(){
  transStar(NAME);
  CrosstabReportItemHandle reportHandle=measureViewHandle.getCrosstab();
  AddComputedSummaryDialog computedSummaryDialog=new AddComputedSummaryDialog(UIUtil.getDefaultShell(),reportHandle);
  if (computedSummaryDialog.open() == Dialog.OK) {
    String measureName=computedSummaryDialog.getName();
    String expression=computedSummaryDialog.getExpression();
    String dataType=computedSummaryDialog.getDataType();
    int index=reportHandle.getAllMeasures().indexOf(measureViewHandle) + 1;
    try {
      ComputedMeasureViewHandle computedMeasure=reportHandle.insertComputedMeasure(measureName,index);
      computedMeasure.addHeader();
      LabelHandle labelHandle=DesignElementFactory.getInstance().newLabel(null);
      labelHandle.setText(measureName);
      computedMeasure.getHeader().addContent(labelHandle);
      ExtendedItemHandle crosstabModelHandle=(ExtendedItemHandle)reportHandle.getModelHandle();
      ComputedColumn bindingColumn=StructureFactory.newComputedColumn(crosstabModelHandle,measureName);
      ComputedColumnHandle bindingHandle=crosstabModelHandle.addColumnBinding(bindingColumn,false);
      bindingHandle.setExpression(expression);
      bindingHandle.setDataType(dataType);
      DataItemHandle dataHandle=DesignElementFactory.getInstance().newDataItem(measureName);
      dataHandle.setResultSetColumn(bindingHandle.getName());
      AggregationCellHandle cell=computedMeasure.getCell();
      cell.addContent(dataHandle);
    }
 catch (    SemanticException e) {
      e.printStackTrace();
      rollBack();
    }
  }
  transEnd();
}

Fixed version (ground truth):
public void run(){
  transStar(NAME);
  CrosstabReportItemHandle reportHandle=measureViewHandle.getCrosstab();
  AddComputedSummaryDialog computedSummaryDialog=new AddComputedSummaryDialog(UIUtil.getDefaultShell(),reportHandle);
  if (computedSummaryDialog.open() == Dialog.OK) {
    String measureName=computedSummaryDialog.getName();
    String expression=computedSummaryDialog.getExpression();
    String dataType=computedSummaryDialog.getDataType();
    int index=reportHandle.getAllMeasures().indexOf(measureViewHandle) + 1;
    try {
      ComputedMeasureViewHandle computedMeasure=reportHandle.insertComputedMeasure(measureName,index);
      computedMeasure.addHeader();
      ExtendedItemHandle crosstabModelHandle=(ExtendedItemHandle)reportHandle.getModelHandle();
      ComputedColumn bindingColumn=StructureFactory.newComputedColumn(crosstabModelHandle,measureName);
      ComputedColumnHandle bindingHandle=crosstabModelHandle.addColumnBinding(bindingColumn,false);
      bindingHandle.setExpression(expression);
      bindingHandle.setDataType(dataType);
      DataItemHandle dataHandle=DesignElementFactory.getInstance().newDataItem(measureName);
      dataHandle.setResultSetColumn(bindingHandle.getName());
      AggregationCellHandle cell=computedMeasure.getCell();
      cell.addContent(dataHandle);
    }
 catch (    SemanticException e) {
      e.printStackTrace();
      rollBack();
    }
  }
  transEnd();
}
Program: 70095
Project: 70095
Buggy source:
@Override public void addAction(IAction action){
}

Fixed version (ground truth):
public void addAction(IAction action){
}
Program: 70096
Project: 70096
Buggy source:
@Override public void addAction(IAction action){
}

Fixed version (ground truth):
public void addAction(IAction action){
}