nus-yam/ex-repair huggingface dataset:
Program: 69765
Project: 69765
Buggy source:
protected ImageArea createImageArea(IImageContent content){
  ImageArea area=new ImageArea();
switch (content.getImageSource()) {
case IImageContent.IMAGE_FILE:
case IImageContent.IMAGE_URL:
    area.setUrl(content.getURI());
  area.setExtension(content.getExtension());
area.setMIMEType(content.getMIMEType());
break;
case IImageContent.IMAGE_NAME:
case IImageContent.IMAGE_EXPRESSION:
area.setData(content.getData());
area.setExtension(content.getExtension());
area.setMIMEType(content.getMIMEType());
break;
}
if (content instanceof ObjectContent) {
ObjectContent object=(ObjectContent)content;
area.setParameters(object.getParamters());
}
return area;
}

Fixed version (ground truth):
protected ImageArea createImageArea(IImageContent content){
  ImageArea area=new ImageArea();
switch (content.getImageSource()) {
case IImageContent.IMAGE_FILE:
case IImageContent.IMAGE_URL:
    area.setUrl(content.getURI());
  area.setExtension(content.getExtension());
area.setMIMEType(content.getMIMEType());
break;
case IImageContent.IMAGE_NAME:
case IImageContent.IMAGE_EXPRESSION:
area.setData(content.getData());
area.setExtension(content.getExtension());
area.setMIMEType(content.getMIMEType());
break;
}
if (content instanceof ObjectContent) {
ObjectContent object=(ObjectContent)content;
area.setParameters(object.getParamters());
}
area.setAction(content.getHyperlinkAction());
return area;
}
Program: 69766
Project: 69766
Buggy source:
protected TemplateArea createTemplateArea(IContent content,FontInfo fontInfo){
  TextStyle textStyle=TextAreaLayout.buildTextStyle(content,fontInfo);
  TemplateArea area=new TemplateArea(null,textStyle);
  return area;
}

Fixed version (ground truth):
protected TemplateArea createTemplateArea(IContent content,FontInfo fontInfo){
  TextStyle textStyle=TextAreaLayout.buildTextStyle(content,fontInfo);
  TemplateArea area=new TemplateArea(null,textStyle);
  area.setAction(content.getHyperlinkAction());
  return area;
}
Program: 69767
Project: 69767
Buggy source:
protected TextArea createTextArea(ITextContent textContent,int offset,int runLevel,FontInfo fontInfo){
  if (textStyle == null || textStyle.getFontInfo() != fontInfo) {
    textStyle=TextAreaLayout.buildTextStyle(textContent,fontInfo);
  }
  TextArea area=new TextArea(textContent.getText(),textStyle);
  area.setOffset(offset);
  area.setRunLevel(runLevel);
  area.setVerticalAlign(textContent.getComputedStyle().getProperty(IStyle.STYLE_VERTICAL_ALIGN));
  return area;
}

Fixed version (ground truth):
protected TextArea createTextArea(ITextContent textContent,int offset,int runLevel,FontInfo fontInfo){
  if (textStyle == null || textStyle.getFontInfo() != fontInfo) {
    textStyle=TextAreaLayout.buildTextStyle(textContent,fontInfo);
  }
  TextArea area=new TextArea(textContent.getText(),textStyle);
  area.setAction(textContent.getHyperlinkAction());
  area.setOffset(offset);
  area.setRunLevel(runLevel);
  area.setVerticalAlign(textContent.getComputedStyle().getProperty(IStyle.STYLE_VERTICAL_ALIGN));
  return area;
}
Program: 69768
Project: 69768
Buggy source:
private void addData(SheetData data){
  XlsContainer container=getCurrentContainer();
  container.setEmpty(false);
  int col=axis.getColumnIndexByCoordinate(data.getSizeInfo().getStartCoordinate());
  int span=axis.getColumnIndexByCoordinate(data.getSizeInfo().getEndCoordinate()) - col;
  applyTopBorderStyle(data);
  outputDataIfBufferIsFull();
  updataRowIndex(data,container);
  addDatatoCache(col,data);
  for (int i=col + 1; i < col + span; i++) {
    BlankData blankData=new BlankData(data);
    addDatatoCache(i,blankData);
  }
  if (container instanceof XlsCell) {
    XlsCell cell=(XlsCell)container;
    data.setRowSpanInDesign(cell.getRowSpan() - 1);
  }
  lastData=data;
}

Fixed version (ground truth):
private void addData(SheetData data){
  XlsContainer container=getCurrentContainer();
  container.setEmpty(false);
  int col=axis.getColumnIndexByCoordinate(data.getSizeInfo().getStartCoordinate());
  int span=axis.getColumnIndexByCoordinate(data.getSizeInfo().getEndCoordinate()) - col;
  applyTopBorderStyle(data);
  outputDataIfBufferIsFull();
  updataRowIndex(data,container);
  addDatatoCache(col,data);
  Data newData=new Data(data);
  for (int i=col + 1; i < col + span; i++) {
    BlankData blankData=new BlankData(newData);
    addDatatoCache(i,blankData);
  }
  if (container instanceof XlsCell) {
    XlsCell cell=(XlsCell)container;
    data.setRowSpanInDesign(cell.getRowSpan() - 1);
  }
  lastData=data;
}
Program: 69769
Project: 69769
Buggy source:
/** 
 * get intrinsic dimension of image in pixels. Now only support png, bmp, jpg, gif.
 * @param in
 * @return
 * @throws IOException
 * @throws MalformedURLException
 * @throws BadElementException
 */
protected Dimension getIntrinsicDimension(IImageContent content,Image image){
  if (image != null) {
    int resolutionX=image.getDpiX();
    int resolutionY=image.getDpiY();
    if (0 == resolutionX || 0 == resolutionY) {
      ReportDesignHandle designHandle=content.getReportContent().getDesign().getReportDesign();
      resolutionX=designHandle.getImageDPI();
      resolutionY=designHandle.getImageDPI();
    }
    if (0 == resolutionX || 0 == resolutionY) {
      resolutionX=context.getDpi();
      resolutionY=context.getDpi();
    }
    if (0 == resolutionX || 0 == resolutionY) {
      resolutionX=96;
      resolutionY=96;
    }
    return new Dimension((int)(image.plainWidth() * 1000 / resolutionX * 72),(int)(image.plainHeight() * 1000 / resolutionY * 72));
  }
  return null;
}

Fixed version (ground truth):
/** 
 * get intrinsic dimension of image in pixels. Now only support png, bmp, jpg, gif.
 * @param in
 * @return
 * @throws IOException
 * @throws MalformedURLException
 * @throws BadElementException
 */
protected Dimension getIntrinsicDimension(IImageContent content,Image image){
  if (image != null) {
    resolutionX=image.getDpiX();
    resolutionY=image.getDpiY();
    if (0 == resolutionX || 0 == resolutionY) {
      ReportDesignHandle designHandle=content.getReportContent().getDesign().getReportDesign();
      resolutionX=designHandle.getImageDPI();
      resolutionY=designHandle.getImageDPI();
    }
    if (0 == resolutionX || 0 == resolutionY) {
      resolutionX=context.getDpi();
      resolutionY=context.getDpi();
    }
    if (0 == resolutionX || 0 == resolutionY) {
      resolutionX=96;
      resolutionY=96;
    }
    return new Dimension((int)(image.plainWidth() * 1000 / resolutionX * 72),(int)(image.plainHeight() * 1000 / resolutionY * 72));
  }
  return null;
}
Program: 69770
Project: 69770
Buggy source:
public void focusLost(FocusEvent e){
  if (e == null || e.widget.equals(getInputControl())) {
    saveQuery();
  }
}

Fixed version (ground truth):
public void focusLost(FocusEvent e){
  if (e == null || e.widget.equals(getInputControl())) {
    if (!ChartUIUtil.getText(getInputControl()).equals(query.getDefinition())) {
      saveQuery();
    }
  }
}
Program: 69771
Project: 69771
Buggy source:
/** 
 * Handle builder dialog action.
 */
protected void handleBuilderAction(){
  try {
    String sExpr=context.getUIServiceProvider().invoke(IUIServiceProvider.COMMAND_EXPRESSION_DATA_BINDINGS,getExpression(getInputControl()),context.getExtendedItem(),sTitle);
    boolean isSuccess=setUIText(getInputControl(),sExpr);
    updateQuery(sExpr);
    if (!isSuccess) {
      Event event=new Event();
      event.type=IChartDataSheet.EVENT_QUERY;
      event.data=queryType;
      context.getDataSheet().notifyListeners(event);
    }
  }
 catch (  ChartException e1) {
    WizardBase.displayException(e1);
  }
}

Fixed version (ground truth):
/** 
 * Handle builder dialog action.
 */
protected void handleBuilderAction(){
  try {
    String oldExpr=getExpression(getInputControl());
    String sExpr=context.getUIServiceProvider().invoke(IUIServiceProvider.COMMAND_EXPRESSION_DATA_BINDINGS,oldExpr,context.getExtendedItem(),sTitle);
    if (!oldExpr.equals(sExpr)) {
      boolean isSuccess=setUIText(getInputControl(),sExpr);
      updateQuery(sExpr);
      if (!isSuccess) {
        Event event=new Event();
        event.type=IChartDataSheet.EVENT_QUERY;
        event.data=queryType;
        context.getDataSheet().notifyListeners(event);
      }
    }
  }
 catch (  ChartException e1) {
    WizardBase.displayException(e1);
  }
}
Program: 69775
Project: 69775
Buggy source:
/** 
 * Locates the cell which controls the column with for given cell
 * @param crosstab
 * @throws SemanticException
 */
public void validateCrosstab() throws SemanticException {
}

Fixed version (ground truth):
/** 
 * Validates the entire crosstab model.
 * @param crosstab
 * @throws SemanticException
 */
public void validateCrosstab() throws SemanticException {
}
Program: 69778
Project: 69778
Buggy source:
public static void notifyCreation(int type,Object model){
  if (modelListener != null) {
    modelListener.onCreated(type,model);
  }
}

Fixed version (ground truth):
/** 
 * Notifies any creation event for crosstab model.
 * @param type see <code>ICrosstabModelListener</code> for the type constants.
 * @param model the model object associated with this event.
 */
public static void notifyCreation(int type,Object model){
  if (modelListener != null) {
    modelListener.onCreated(type,model);
  }
}
Program: 69779
Project: 69779
Buggy source:
/** 
 * Gets the aggregation function for this cell.
 * @param crosstab
 * @param cell
 * @param function
 * @return
 * @throws SemanticException
 */
public static void setAggregationFunction(CrosstabReportItemHandle crosstab,AggregationCellHandle cell,String function) throws SemanticException {
}

Fixed version (ground truth):
/** 
 * Sets the aggregation function for this cell.
 * @param crosstab
 * @param cell
 * @param function
 * @return
 * @throws SemanticException
 */
public static void setAggregationFunction(CrosstabReportItemHandle crosstab,AggregationCellHandle cell,String function) throws SemanticException {
}
Program: 69781
Project: 69781
Buggy source:
/** 
 * Gets the aggregation function for the row/column grand total in the crosstab.
 * @param crosstab
 * @param axisType
 * @param measureView
 * @param function
 * @throws SemanticException
 */
public void setAggregationFunction(int axisType,MeasureViewHandle measureView,String function) throws SemanticException {
  if (crosstab == null || crosstab.getGrandTotal(axisType) == null || measureView == null || crosstab != measureView.getCrosstab())   return;
  CommandStack stack=crosstab.getCommandStack();
  stack.startTrans(Messages.getString("String_Node_Str"));
  try {
    for (int j=0; j < measureView.getAggregationCount(); j++) {
      AggregationCellHandle cell=measureView.getAggregationCell(j);
      if ((axisType == COLUMN_AXIS_TYPE && cell.getAggregationOnColumn() == null) || (axisType == ROW_AXIS_TYPE && cell.getAggregationOnRow() == null)) {
        CrosstabModelUtil.setAggregationFunction(crosstab,cell,function);
      }
    }
  }
 catch (  SemanticException e) {
    stack.rollback();
    throw e;
  }
  stack.commit();
}

Fixed version (ground truth):
/** 
 * Sets the aggregation function for the row/column grand total in the crosstab.
 * @param crosstab
 * @param axisType
 * @param measureView
 * @param function
 * @throws SemanticException
 */
public void setAggregationFunction(int axisType,MeasureViewHandle measureView,String function) throws SemanticException {
  if (crosstab == null || crosstab.getGrandTotal(axisType) == null || measureView == null || crosstab != measureView.getCrosstab())   return;
  CommandStack stack=crosstab.getCommandStack();
  stack.startTrans(Messages.getString("String_Node_Str"));
  try {
    for (int j=0; j < measureView.getAggregationCount(); j++) {
      AggregationCellHandle cell=measureView.getAggregationCell(j);
      if ((axisType == COLUMN_AXIS_TYPE && cell.getAggregationOnColumn() == null) || (axisType == ROW_AXIS_TYPE && cell.getAggregationOnRow() == null)) {
        CrosstabModelUtil.setAggregationFunction(crosstab,cell,function);
      }
    }
  }
 catch (  SemanticException e) {
    stack.rollback();
    throw e;
  }
  stack.commit();
}
Program: 69782
Project: 69782
Buggy source:
/** 
 * Inserts a row/column dimension into the given position. The axis type can be either <code>ICrosstabConstants.ROW_AXIS_TYPE</code> or <code>ICrosstabConstants.COLUMN_AXIS_TYPE</code>. And index is 0-based integer.
 * @param dimensionHandle the OLAP dimension handle to use
 * @param axisType row/column axis type
 * @param index insert position, a 0-based integer
 * @return
 * @throws SemanticException
 */
public DimensionViewHandle insertDimension(DimensionHandle dimensionHandle,int axisType,int index) throws SemanticException {
  if (dimensionHandle != null && crosstab.getDimension(dimensionHandle.getQualifiedName()) != null) {
    crosstab.getLogger().log(Level.SEVERE,MessageConstants.CROSSTAB_EXCEPTION_DUPLICATE_DIMENSION,dimensionHandle.getQualifiedName());
    throw new CrosstabException(crosstab.getModelHandle().getElement(),new String[]{dimensionHandle.getQualifiedName(),crosstab.getModelHandle().getElement().getIdentifier()},MessageConstants.CROSSTAB_EXCEPTION_DUPLICATE_DIMENSION);
  }
  DimensionViewHandle dimensionView=null;
  CommandStack stack=crosstab.getCommandStack();
  stack.startTrans(Messages.getString("String_Node_Str"));
  try {
    CrosstabViewHandle crosstabView=crosstab.getCrosstabView(axisType);
    if (crosstabView == null) {
      crosstabView=crosstab.addCrosstabView(axisType);
    }
    dimensionView=crosstabView.insertDimension(dimensionHandle,index);
  }
 catch (  SemanticException e) {
    stack.rollback();
    throw e;
  }
  stack.commit();
  return dimensionView;
}

Fixed version (ground truth):
/** 
 * Inserts a row/column dimension into the given position. The axis type can be either <code>ICrosstabConstants.ROW_AXIS_TYPE</code> or <code>ICrosstabConstants.COLUMN_AXIS_TYPE</code>. The index is 0-based integer.
 * @param dimensionHandle the OLAP dimension handle to use
 * @param axisType row/column axis type
 * @param index insert position, a 0-based integer
 * @return
 * @throws SemanticException
 */
public DimensionViewHandle insertDimension(DimensionHandle dimensionHandle,int axisType,int index) throws SemanticException {
  if (dimensionHandle != null && crosstab.getDimension(dimensionHandle.getQualifiedName()) != null) {
    crosstab.getLogger().log(Level.SEVERE,MessageConstants.CROSSTAB_EXCEPTION_DUPLICATE_DIMENSION,dimensionHandle.getQualifiedName());
    throw new CrosstabException(crosstab.getModelHandle().getElement(),new String[]{dimensionHandle.getQualifiedName(),crosstab.getModelHandle().getElement().getIdentifier()},MessageConstants.CROSSTAB_EXCEPTION_DUPLICATE_DIMENSION);
  }
  DimensionViewHandle dimensionView=null;
  CommandStack stack=crosstab.getCommandStack();
  stack.startTrans(Messages.getString("String_Node_Str"));
  try {
    CrosstabViewHandle crosstabView=crosstab.getCrosstabView(axisType);
    if (crosstabView == null) {
      crosstabView=crosstab.addCrosstabView(axisType);
    }
    dimensionView=crosstabView.insertDimension(dimensionHandle,index);
  }
 catch (  SemanticException e) {
    stack.rollback();
    throw e;
  }
  stack.commit();
  return dimensionView;
}
Program: 69783
Project: 69783
Buggy source:
/** 
 * @param axisType
 * @param measureList
 * @param functionList
 * @return
 * @throws SemanticException
 */
public CrosstabCellHandle addGrandTotal(int axisType,List<MeasureViewHandle> measureList,List<String> functionList) throws SemanticException {
  if (crosstab == null || !CrosstabModelUtil.isValidAxisType(axisType))   return null;
  CommandStack stack=crosstab.getCommandStack();
  stack.startTrans(Messages.getString("String_Node_Str"));
  CrosstabCellHandle grandTotal=null;
  try {
    CrosstabViewHandle crosstabView=crosstab.getCrosstabView(axisType);
    if (crosstabView == null) {
      crosstabView=crosstab.addCrosstabView(axisType);
    }
    grandTotal=new CrosstabViewTask(crosstabView).addGrandTotal(measureList,functionList,false);
  }
 catch (  SemanticException e) {
    stack.rollback();
    throw e;
  }
  stack.commit();
  return grandTotal;
}

Fixed version (ground truth):
/** 
 * Adds the grandtotal on given axis for the specified measures. Depending on the measure direction, it will automatically decide if need process other measures even if it's not in the given list to resovle crosstab model consistency.
 * @param axisType
 * @param measureList
 * @param functionList
 * @return
 * @throws SemanticException
 */
public CrosstabCellHandle addGrandTotal(int axisType,List<MeasureViewHandle> measureList,List<String> functionList) throws SemanticException {
  if (crosstab == null || !CrosstabModelUtil.isValidAxisType(axisType))   return null;
  CommandStack stack=crosstab.getCommandStack();
  stack.startTrans(Messages.getString("String_Node_Str"));
  CrosstabCellHandle grandTotal=null;
  try {
    CrosstabViewHandle crosstabView=crosstab.getCrosstabView(axisType);
    if (crosstabView == null) {
      crosstabView=crosstab.addCrosstabView(axisType);
    }
    grandTotal=new CrosstabViewTask(crosstabView).addGrandTotal(measureList,functionList,false);
  }
 catch (  SemanticException e) {
    stack.rollback();
    throw e;
  }
  stack.commit();
  return grandTotal;
}
Program: 69784
Project: 69784
Buggy source:
/** 
 * Gets the measure view list that define aggregations for the row/column grand total in the crosstab. Each item in the list is instance of <code>MeasureViewHandle</code>.
 * @param crosstab
 * @param axisType
 * @return
 */
public List<MeasureViewHandle> getAggregationMeasures(int axisType){
  if (crosstab == null || crosstab.getGrandTotal(axisType) == null)   return Collections.emptyList();
  List<MeasureViewHandle> measures=new ArrayList<MeasureViewHandle>();
  for (int i=0; i < crosstab.getMeasureCount(); i++) {
    MeasureViewHandle measureView=crosstab.getMeasure(i);
    if (measures.contains(measureView))     continue;
    if (CrosstabModelUtil.isAggregationOn(measureView,null,axisType))     measures.add(measureView);
  }
  return measures;
}

Fixed version (ground truth):
/** 
 * Gets the measure view list that has defined aggregations for the row/column grand total in the crosstab. Each item in the list is an instance of <code>MeasureViewHandle</code>.
 * @param crosstab
 * @param axisType
 * @return
 */
public List<MeasureViewHandle> getAggregationMeasures(int axisType){
  if (crosstab == null || crosstab.getGrandTotal(axisType) == null)   return Collections.emptyList();
  List<MeasureViewHandle> measures=new ArrayList<MeasureViewHandle>();
  for (int i=0; i < crosstab.getMeasureCount(); i++) {
    MeasureViewHandle measureView=crosstab.getMeasure(i);
    if (measures.contains(measureView))     continue;
    if (CrosstabModelUtil.isAggregationOn(measureView,null,axisType))     measures.add(measureView);
  }
  return measures;
}
Program: 69787
Project: 69787
Buggy source:
/** 
 * Gets the measure view list that define aggregations for the given level view. Each item in the list is instance of <code>MeasureViewHandle</code> .
 * @param levelView
 * @return
 */
public List getAggregationMeasures(){
  if (focus.getAggregationHeader() == null || focus.getCubeLevelName() == null || focus.getCubeLevelName().length() <= 0)   return Collections.EMPTY_LIST;
  if (crosstab == null)   return Collections.EMPTY_LIST;
  int axisType=focus.getAxisType();
  String levelName=focus.getCubeLevelName();
  List measures=new ArrayList();
  for (int i=0; i < crosstab.getMeasureCount(); i++) {
    MeasureViewHandle measureView=crosstab.getMeasure(i);
    if (measures.contains(measureView))     continue;
    if (CrosstabModelUtil.isAggregationOn(measureView,levelName,axisType))     measures.add(measureView);
  }
  return measures;
}

Fixed version (ground truth):
/** 
 * Gets the measure view list that define aggregations for the given level view. Each item in the list is an instance of <code>MeasureViewHandle</code> .
 * @param levelView
 * @return
 */
public List<MeasureViewHandle> getAggregationMeasures(){
  if (focus.getAggregationHeader() == null || focus.getCubeLevelName() == null || focus.getCubeLevelName().length() <= 0)   return Collections.emptyList();
  if (crosstab == null)   return Collections.emptyList();
  int axisType=focus.getAxisType();
  String levelName=focus.getCubeLevelName();
  List<MeasureViewHandle> measures=new ArrayList<MeasureViewHandle>();
  for (int i=0; i < crosstab.getMeasureCount(); i++) {
    MeasureViewHandle measureView=crosstab.getMeasure(i);
    if (measures.contains(measureView))     continue;
    if (CrosstabModelUtil.isAggregationOn(measureView,levelName,axisType))     measures.add(measureView);
  }
  return measures;
}
Program: 69789
Project: 69789
Buggy source:
/** 
 * Constructs the data request session with the provided session context information.
 * @param context
 * @throws BirtException
 */
public DataRequestSessionImpl(DataSessionContext context) throws BirtException {
  if (context == null)   throw new AdapterException(ResourceConstants.CONEXT_NULL_ERROR);
  dataEngine=(DataEngineImpl)DataEngine.newDataEngine(context.getDataEngineContext());
  modelAdaptor=new DataModelAdapter(context);
  sessionContext=context;
  cubeHandleMap=new HashMap();
  if (sessionContext != null) {
    this.setModuleHandleToAppContext();
  }
}

Fixed version (ground truth):
/** 
 * Constructs the data request session with the provided session context information.
 * @param context
 * @throws BirtException
 */
public DataRequestSessionImpl(DataSessionContext context) throws BirtException {
  if (context == null)   throw new AdapterException(ResourceConstants.CONEXT_NULL_ERROR);
  dataEngine=(DataEngineImpl)DataEngine.newDataEngine(context.getDataEngineContext());
  try {
    modelAdaptor=(IModelAdapter)Class.forName("String_Node_Str").getConstructor(context.getClass()).newInstance(context);
  }
 catch (  Throwable e) {
    modelAdaptor=new ModelAdapter(context);
  }
  sessionContext=context;
  cubeHandleMap=new HashMap();
  if (sessionContext != null) {
    this.setModuleHandleToAppContext();
  }
}
Program: 69791
Project: 69791
Buggy source:
/** 
 * Convert DimensionType to a pixel value.
 * @param d DimensionType value
 * @return pixel value
 */
public static int getDimensionPixelValue(DimensionType d,int dpi){
  if (d == null) {
    return 0;
  }
  try {
    String units=d.getUnits();
    if (units.equals(EngineIRConstants.UNITS_PX)) {
      return (int)d.getMeasure();
    }
 else     if (units.equals(EngineIRConstants.UNITS_PT) || units.equals(EngineIRConstants.UNITS_CM) || units.equals(EngineIRConstants.UNITS_MM)|| units.equals(EngineIRConstants.UNITS_PC)|| units.equals(EngineIRConstants.UNITS_IN)) {
      double point=d.convertTo(EngineIRConstants.UNITS_PT);
      if (dpi > 0) {
        return (int)(point / 72 * dpi);
      }
 else {
        return (int)(point / 72 * 96);
      }
    }
 else     if (units.equals(EngineIRConstants.UNITS_PERCENTAGE)) {
      return 0;
    }
  }
 catch (  Exception e) {
    return 0;
  }
  return 0;
}

Fixed version (ground truth):
/** 
 * Convert DimensionType to a pixel value.
 * @param d DimensionType value
 * @return pixel value
 */
public static int getDimensionPixelValue(DimensionType d,int dpi){
  if (d == null) {
    return 0;
  }
  try {
    String units=d.getUnits();
    if (EngineIRConstants.UNITS_PX.equals(units)) {
      return (int)d.getMeasure();
    }
 else     if (EngineIRConstants.UNITS_PT.equals(units) || EngineIRConstants.UNITS_CM.equals(units) || EngineIRConstants.UNITS_MM.equals(units)|| EngineIRConstants.UNITS_PC.equals(units)|| EngineIRConstants.UNITS_IN.equals(units)) {
      double point=d.convertTo(EngineIRConstants.UNITS_PT);
      if (dpi > 0) {
        return (int)(point / 72 * dpi);
      }
 else {
        return (int)(point / 72 * 96);
      }
    }
 else     if (EngineIRConstants.UNITS_PERCENTAGE.equals(units)) {
      return 0;
    }
  }
 catch (  Exception e) {
    return 0;
  }
  return 0;
}
Program: 69792
Project: 69792
Buggy source:
/** 
 * @return The constraint
 */
protected Object getConstraint(){
  ReportItemHandle handle=(ReportItemHandle)getModel();
  ReportItemConstraint constraint=new ReportItemConstraint();
  constraint.setDisplay(handle.getPrivateStyle().getDisplay());
  DimensionHandle value=handle.getWidth();
  constraint.setMeasure(value.getMeasure());
  constraint.setUnits(value.getUnits());
  return constraint;
}

Fixed version (ground truth):
/** 
 * @return The constraint
 */
protected Object getConstraint(){
  ReportItemHandle handle=(ReportItemHandle)getModel();
  ReportItemConstraint constraint=new ReportItemConstraint();
  StyleHandle style=handle.getPrivateStyle();
  constraint.setDisplay(style.getDisplay());
  DimensionHandle value=handle.getWidth();
  constraint.setMeasure(value.getMeasure());
  constraint.setUnits(value.getUnits());
  String vAlign=style.getVerticalAlign();
  if (DesignChoiceConstants.VERTICAL_ALIGN_MIDDLE.equals(vAlign)) {
    constraint.setAlign(ReportFlowLayout.ALIGN_CENTER);
  }
 else   if (DesignChoiceConstants.VERTICAL_ALIGN_BOTTOM.equals(vAlign)) {
    constraint.setAlign(ReportFlowLayout.ALIGN_RIGHTBOTTOM);
  }
 else   if (DesignChoiceConstants.VERTICAL_ALIGN_TOP.equals(vAlign)) {
    constraint.setAlign(ReportFlowLayout.ALIGN_LEFTTOP);
  }
  return constraint;
}
Program: 69793
Project: 69793
Buggy source:
/** 
 * @return The constraint
 */
protected Object getConstraint(){
  ReportItemHandle handle=(ReportItemHandle)getModel();
  ReportItemConstraint constraint=new ReportItemConstraint();
  constraint.setDisplay(handle.getPrivateStyle().getDisplay());
  DimensionHandle value=handle.getWidth();
  constraint.setMeasure(value.getMeasure());
  constraint.setUnits(value.getUnits());
  return constraint;
}

Fixed version (ground truth):
/** 
 * @return The constraint
 */
protected Object getConstraint(){
  ReportItemHandle handle=(ReportItemHandle)getModel();
  ReportItemConstraint constraint=new ReportItemConstraint();
  StyleHandle style=handle.getPrivateStyle();
  constraint.setDisplay(style.getDisplay());
  DimensionHandle value=handle.getWidth();
  constraint.setMeasure(value.getMeasure());
  constraint.setUnits(value.getUnits());
  String vAlign=style.getVerticalAlign();
  if (DesignChoiceConstants.VERTICAL_ALIGN_MIDDLE.equals(vAlign)) {
    constraint.setAlign(ReportFlowLayout.ALIGN_CENTER);
  }
 else   if (DesignChoiceConstants.VERTICAL_ALIGN_BOTTOM.equals(vAlign)) {
    constraint.setAlign(ReportFlowLayout.ALIGN_RIGHTBOTTOM);
  }
 else   if (DesignChoiceConstants.VERTICAL_ALIGN_TOP.equals(vAlign)) {
    constraint.setAlign(ReportFlowLayout.ALIGN_LEFTTOP);
  }
  return constraint;
}
Program: 69794
Project: 69794
Buggy source:
/** 
 * @return The constraint
 */
protected Object getConstraint(){
  ExtendedItemHandle handle=getExtendedItemHandle();
  ReportItemConstraint constraint=new ReportItemConstraint();
  String type=handle.getPrivateStyle().getDisplay();
  if (type == null || DesignChoiceConstants.DISPLAY_NONE.equals(type)) {
    type=DesignChoiceConstants.DISPLAY_BLOCK;
  }
  constraint.setDisplay(type);
  constraint.setMargin(getModelAdapter().getMargin(null));
  DimensionHandle value=handle.getWidth();
  constraint.setMeasure(value.getMeasure());
  constraint.setUnits(value.getUnits());
  return constraint;
}

Fixed version (ground truth):
/** 
 * @return The constraint
 */
protected Object getConstraint(){
  ExtendedItemHandle handle=getExtendedItemHandle();
  ReportItemConstraint constraint=new ReportItemConstraint();
  String type=handle.getPrivateStyle().getDisplay();
  if (type == null || DesignChoiceConstants.DISPLAY_NONE.equals(type)) {
    type=DesignChoiceConstants.DISPLAY_BLOCK;
  }
  constraint.setDisplay(type);
  constraint.setMargin(getModelAdapter().getMargin(null));
  DimensionHandle value=handle.getWidth();
  constraint.setMeasure(value.getMeasure());
  constraint.setUnits(value.getUnits());
  String vAlign=handle.getPrivateStyle().getVerticalAlign();
  if (DesignChoiceConstants.VERTICAL_ALIGN_MIDDLE.equals(vAlign)) {
    constraint.setAlign(ReportFlowLayout.ALIGN_CENTER);
  }
 else   if (DesignChoiceConstants.VERTICAL_ALIGN_BOTTOM.equals(vAlign)) {
    constraint.setAlign(ReportFlowLayout.ALIGN_RIGHTBOTTOM);
  }
 else   if (DesignChoiceConstants.VERTICAL_ALIGN_TOP.equals(vAlign)) {
    constraint.setAlign(ReportFlowLayout.ALIGN_LEFTTOP);
  }
  return constraint;
}
Program: 69797
Project: 69797
Buggy source:
/** 
 * @param dataSet
 * @param inputParamBindings
 * @param columnBindings
 * @param boundColumnName
 * @param requestInfo
 * @return
 * @throws BirtException
 */
private IColumnValueIterator getColumnValueIterator(DataSetHandle dataSet,Iterator inputParamBindings,Iterator columnBindings,String boundColumnName,IRequestInfo requestInfo) throws BirtException {
  ArrayList temp=new ArrayList();
  while (columnBindings != null && columnBindings.hasNext()) {
    IBinding binding=this.modelAdaptor.adaptBinding((ComputedColumnHandle)columnBindings.next());
    if (binding.getAggrFunction() == null)     temp.add(binding);
  }
  IQueryResults queryResults=getQueryResults(dataSet,inputParamBindings,temp.iterator(),boundColumnName);
  return new ColumnValueIterator(queryResults,boundColumnName,requestInfo);
}

Fixed version (ground truth):
/** 
 * @param dataSet
 * @param inputParamBindings
 * @param columnBindings
 * @param boundColumnName
 * @param requestInfo
 * @return
 * @throws BirtException
 */
private IColumnValueIterator getColumnValueIterator(DataSetHandle dataSet,Iterator inputParamBindings,Iterator columnBindings,String boundColumnName,IRequestInfo requestInfo) throws BirtException {
  ArrayList temp=new ArrayList();
  while (columnBindings != null && columnBindings.hasNext()) {
    Object nextBinding=columnBindings.next();
    IBinding binding=this.modelAdaptor.adaptBinding((ComputedColumnHandle)nextBinding);
    if (binding.getAggrFunction() == null)     temp.add(nextBinding);
  }
  IQueryResults queryResults=getQueryResults(dataSet,inputParamBindings,temp.iterator(),boundColumnName);
  return new ColumnValueIterator(queryResults,boundColumnName,requestInfo);
}
Program: 69798
Project: 69798
Buggy source:
public HTMLEmitter(HTMLReportEmitter reportEmitter,HTMLWriter writer,String layoutPreference,boolean enableInlineStyle){
  this.reportEmitter=reportEmitter;
  this.writer=writer;
  this.layoutPreference=layoutPreference;
  this.enableInlineStyle=enableInlineStyle;
}

Fixed version (ground truth):
public HTMLEmitter(HTMLReportEmitter reportEmitter,HTMLWriter writer,String layoutPreference,boolean enableInlineStyle,int browserVersion){
  this.reportEmitter=reportEmitter;
  this.writer=writer;
  this.layoutPreference=layoutPreference;
  this.enableInlineStyle=enableInlineStyle;
  this.browserVersion=browserVersion;
}
Program: 69799
Project: 69799
Buggy source:
/** 
 * Open the tag when implement the inline box.
 */
protected void openInlineBoxTag(){
  writer.openTag(HTMLTags.TAG_DIV);
  writer.attribute(HTMLTags.ATTR_STYLE,"String_Node_Str");
  writer.openTag(HTMLTags.TAG_TABLE);
  writer.openTag(HTMLTags.TAG_TR);
  writer.openTag(HTMLTags.TAG_TD);
}

Fixed version (ground truth):
/** 
 * Open the tag when implement the inline box.
 */
protected void openInlineBoxTag(){
  writer.openTag(HTMLTags.TAG_DIV);
  if (browserVersion == HTMLEmitterUtil.BROWSER_IE7) {
    writer.attribute(HTMLTags.ATTR_STYLE,"String_Node_Str");
  }
 else {
    writer.attribute(HTMLTags.ATTR_STYLE,"String_Node_Str");
  }
  writer.openTag(HTMLTags.TAG_TABLE);
  writer.attribute(HTMLTags.ATTR_STYLE,"String_Node_Str");
  writer.openTag(HTMLTags.TAG_TR);
  writer.openTag(HTMLTags.TAG_TD);
}
Program: 69800
Project: 69800
Buggy source:
public HTMLPerformanceOptimize(HTMLReportEmitter reportEmitter,HTMLWriter writer,String layoutPreference,boolean enableInlineStyle){
  super(reportEmitter,writer,layoutPreference,enableInlineStyle);
}

Fixed version (ground truth):
public HTMLPerformanceOptimize(HTMLReportEmitter reportEmitter,HTMLWriter writer,String layoutPreference,boolean enableInlineStyle,int browserVersion){
  super(reportEmitter,writer,layoutPreference,enableInlineStyle,browserVersion);
}
Program: 69803
Project: 69803
Buggy source:
public HTMLVisionOptimize(HTMLReportEmitter reportEmitter,HTMLWriter writer,String layoutPreference,boolean enableInlineStyle,boolean htmlRtLFlag){
  super(reportEmitter,writer,layoutPreference,enableInlineStyle);
  this.htmlRtLFlag=htmlRtLFlag;
}

Fixed version (ground truth):
public HTMLVisionOptimize(HTMLReportEmitter reportEmitter,HTMLWriter writer,String layoutPreference,boolean enableInlineStyle,boolean htmlRtLFlag,int browserVersion){
  super(reportEmitter,writer,layoutPreference,enableInlineStyle,browserVersion);
  this.htmlRtLFlag=htmlRtLFlag;
}
Program: 69804
Project: 69804
Buggy source:
/** 
 * @param dataSet
 * @param inputParamBindings
 * @param columnBindings
 * @param boundColumnName
 * @param requestInfo
 * @return
 * @throws BirtException
 */
private IColumnValueIterator getColumnValueIterator(DataSetHandle dataSet,Iterator inputParamBindings,Iterator columnBindings,String boundColumnName,IRequestInfo requestInfo) throws BirtException {
  ArrayList temp=new ArrayList();
  while (columnBindings != null && columnBindings.hasNext()) {
    Object nextBinding=columnBindings.next();
    IBinding binding=this.modelAdaptor.adaptBinding((ComputedColumnHandle)nextBinding);
    if (binding.getAggrFunction() == null)     temp.add(nextBinding);
  }
  IQueryResults queryResults=getQueryResults(dataSet,inputParamBindings,temp.iterator(),boundColumnName);
  return new ColumnValueIterator(queryResults,boundColumnName,requestInfo);
}

Fixed version (ground truth):
/** 
 * @param dataSet
 * @param inputParamBindings
 * @param columnBindings
 * @param boundColumnName
 * @param requestInfo
 * @return
 * @throws BirtException
 */
private IColumnValueIterator getColumnValueIterator(DataSetHandle dataSet,Iterator inputParamBindings,Iterator columnBindings,String boundColumnName,IRequestInfo requestInfo) throws BirtException {
  ArrayList temp=new ArrayList();
  while (columnBindings != null && columnBindings.hasNext()) {
    Object nextBinding=columnBindings.next();
    IBinding binding=this.modelAdaptor.adaptBinding((ComputedColumnHandle)nextBinding);
    if (binding.getAggregatOns() == null || binding.getAggregatOns().size() == 0)     temp.add(nextBinding);
  }
  IQueryResults queryResults=getQueryResults(dataSet,inputParamBindings,temp.iterator(),boundColumnName);
  return new ColumnValueIterator(queryResults,boundColumnName,requestInfo);
}
Program: 69806
Project: 69806
Buggy source:
/** 
 * get intrinsic dimension of image in pixels. Now only support png, bmp, jpg, gif.
 * @param in
 * @return
 * @throws IOException
 * @throws MalformedURLException
 * @throws BadElementException
 */
protected Dimension getIntrinsicDimension(IImageContent content,Image image){
  if (image != null) {
    int contentResolution=content.getResolution();
    if (contentResolution != 0) {
      resolutionX=contentResolution;
      resolutionY=contentResolution;
    }
 else {
      resolutionX=image.getDpiX();
      resolutionY=image.getDpiY();
      if (0 == resolutionX || 0 == resolutionY) {
        ReportDesignHandle designHandle=content.getReportContent().getDesign().getReportDesign();
        resolutionX=designHandle.getImageDPI();
        resolutionY=designHandle.getImageDPI();
      }
      if (0 == resolutionX || 0 == resolutionY) {
        resolutionX=context.getDpi();
        resolutionY=context.getDpi();
      }
      if (0 == resolutionX || 0 == resolutionY) {
        resolutionX=96;
        resolutionY=96;
      }
    }
    return new Dimension((int)(image.plainWidth() * 1000 / resolutionX * 72),(int)(image.plainHeight() * 1000 / resolutionY * 72));
  }
  return null;
}

Fixed version (ground truth):
/** 
 * get intrinsic dimension of image in pixels. Now only support png, bmp, jpg, gif.
 * @param in
 * @return
 * @throws IOException
 * @throws MalformedURLException
 * @throws BadElementException
 */
protected Dimension getIntrinsicDimension(IImageContent content,Image image){
  if (image != null) {
    int resolutionX=image.getDpiX();
    int resolutionY=image.getDpiY();
    if (0 == resolutionX || 0 == resolutionY) {
      ReportDesignHandle designHandle=content.getReportContent().getDesign().getReportDesign();
      resolutionX=designHandle.getImageDPI();
      resolutionY=designHandle.getImageDPI();
    }
    if (0 == resolutionX || 0 == resolutionY) {
      resolutionX=context.getDpi();
      resolutionY=context.getDpi();
    }
    if (0 == resolutionX || 0 == resolutionY) {
      resolutionX=96;
      resolutionY=96;
    }
    return new Dimension((int)(image.plainWidth() * 1000 / resolutionX * 72),(int)(image.plainHeight() * 1000 / resolutionY * 72));
  }
  return null;
}
Program: 69807
Project: 69807
Buggy source:
public IBaseResultSet getResultSet(){
  ReportContent reportContent=(ReportContent)report;
  List<IBaseResultSet> resultSet=QueryUtil.getResultSet(reportContent,instanceId);
  return resultSet.get(resultSet.size() - 1);
}

Fixed version (ground truth):
public IBaseResultSet getResultSet(){
  ReportContent reportContent=(ReportContent)report;
  List<IBaseResultSet> resultSets=QueryUtil.getResultSet(reportContent,instanceId);
  if (resultSets == null || resultSets.size() == 0) {
    return null;
  }
  return new BaseResultSetDecorator(resultSets);
}
Program: 69808
Project: 69808
Buggy source:
private void initOptions(){
  ConfigurableOption wrappingText=new ConfigurableOption(IExcelRenderOption.WRAPPING_TEXT);
  wrappingText.setDisplayName(Messages.getString("String_Node_Str"));
  wrappingText.setDataType(IConfigurableOption.DataType.BOOLEAN);
  wrappingText.setDisplayType(IConfigurableOption.DispayType.CHECKBOX);
  wrappingText.setDefaultValue(Boolean.TRUE);
  wrappingText.setToolTip(null);
  wrappingText.setDescription(Messages.getString("String_Node_Str"));
  options=new IConfigurableOption[]{wrappingText};
}

Fixed version (ground truth):
private void initOptions(){
  ConfigurableOption wrappingText=new ConfigurableOption(IExcelRenderOption.WRAPPING_TEXT);
  wrappingText.setDisplayName(Messages.getString("String_Node_Str"));
  wrappingText.setDataType(IConfigurableOption.DataType.BOOLEAN);
  wrappingText.setDisplayType(IConfigurableOption.DisplayType.CHECKBOX);
  wrappingText.setDefaultValue(Boolean.TRUE);
  wrappingText.setToolTip(null);
  wrappingText.setDescription(Messages.getString("String_Node_Str"));
  options=new IConfigurableOption[]{wrappingText};
}
Program: 69812
Project: 69812
Buggy source:
public DispayType getDisplayType(){
  return dispayType;
}

Fixed version (ground truth):
public DisplayType getDisplayType(){
  return displayType;
}
Program: 69813
Project: 69813
Buggy source:
/** 
 * Sets option type.
 * @param dispayType the option type to set.
 */
public void setDisplayType(DispayType dispayType){
  this.dispayType=dispayType;
}

Fixed version (ground truth):
/** 
 * Sets option type.
 * @param displayType the option type to set.
 */
public void setDisplayType(DisplayType displayType){
  this.displayType=displayType;
}
Program: 69814
Project: 69814
Buggy source:
/** 
 * Constructs a configurable option with the all specified params.
 * @param name the option name.
 * @param dataType the data type.
 * @param dispayType the option type.
 * @param defaultValue the default value.
 * @param choices the chioces list.
 * @param displayName the display name.
 * @param description the option description.
 * @param toolTip the tool tip.
 */
public ConfigurableOption(String name,DataType dataType,DispayType dispayType,Object defaultValue,IOptionValue[] choices,String displayName,String description,String toolTip){
  this(name,dataType,dispayType,defaultValue);
  setChoices(choices);
  setDescription(description);
  setDisplayName(displayName);
  setToolTip(toolTip);
}

Fixed version (ground truth):
/** 
 * Constructs a configurable option with the all specified params.
 * @param name the option name.
 * @param dataType the data type.
 * @param displayType the option type.
 * @param defaultValue the default value.
 * @param choices the chioces list.
 * @param displayName the display name.
 * @param description the option description.
 * @param toolTip the tool tip.
 */
public ConfigurableOption(String name,DataType dataType,DisplayType displayType,Object defaultValue,IOptionValue[] choices,String displayName,String description,String toolTip){
  this(name,dataType,displayType,defaultValue);
  setChoices(choices);
  setDescription(description);
  setDisplayName(displayName);
  setToolTip(toolTip);
}
Program: 69815
Project: 69815
Buggy source:
/** 
 * Returns the display type of this option.
 */
DispayType getDisplayType();

Fixed version (ground truth):
/** 
 * Returns the display type of this option.
 */
DisplayType getDisplayType();
Program: 69816
Project: 69816
Buggy source:
/** 
 * @param dataSet
 * @param inputParamBindings
 * @param columnBindings
 * @param boundColumnName
 * @param requestInfo
 * @return
 * @throws BirtException
 */
private IColumnValueIterator getColumnValueIterator(DataSetHandle dataSet,Iterator inputParamBindings,Iterator columnBindings,String boundColumnName,IRequestInfo requestInfo) throws BirtException {
  ArrayList temp=new ArrayList();
  while (columnBindings != null && columnBindings.hasNext()) {
    temp.add(columnBindings.next());
  }
  IQueryResults queryResults=getQueryResults(dataSet,inputParamBindings,temp.iterator(),boundColumnName);
  return new ColumnValueIterator(queryResults,boundColumnName,requestInfo);
}

Fixed version (ground truth):
/** 
 * @param dataSet
 * @param inputParamBindings
 * @param columnBindings
 * @param boundColumnName
 * @param requestInfo
 * @return
 * @throws BirtException
 */
private IColumnValueIterator getColumnValueIterator(DataSetHandle dataSet,Iterator inputParamBindings,Iterator columnBindings,String boundColumnName,IRequestInfo requestInfo) throws BirtException {
  ArrayList temp=new ArrayList();
  while (columnBindings != null && columnBindings.hasNext()) {
    IBinding binding=this.modelAdaptor.adaptBinding((ComputedColumnHandle)columnBindings.next());
    if (binding.getAggrFunction() == null)     temp.add(binding);
  }
  IQueryResults queryResults=getQueryResults(dataSet,inputParamBindings,temp.iterator(),boundColumnName);
  return new ColumnValueIterator(queryResults,boundColumnName,requestInfo);
}
Program: 69817
Project: 69817
Buggy source:
/** 
 * @param dataSet
 * @param inputParamBindings
 * @param columnBindings
 * @param boundColumnName
 * @param requestInfo
 * @return
 * @throws BirtException
 */
private IColumnValueIterator getColumnValueIterator(DataSetHandle dataSet,Iterator inputParamBindings,Iterator columnBindings,String boundColumnName,IRequestInfo requestInfo) throws BirtException {
  ArrayList temp=new ArrayList();
  while (columnBindings != null && columnBindings.hasNext()) {
    Object nextBinding=columnBindings.next();
    IBinding binding=this.modelAdaptor.adaptBinding((ComputedColumnHandle)nextBinding);
    if (binding.getAggregatOns() == null || binding.getAggregatOns().size() == 0)     temp.add(nextBinding);
  }
  IQueryResults queryResults=getQueryResults(dataSet,inputParamBindings,temp.iterator(),boundColumnName);
  return new ColumnValueIterator(queryResults,boundColumnName,requestInfo);
}

Fixed version (ground truth):
/** 
 * @param dataSet
 * @param inputParamBindings
 * @param columnBindings
 * @param boundColumnName
 * @param requestInfo
 * @return
 * @throws BirtException
 */
private IColumnValueIterator getColumnValueIterator(DataSetHandle dataSet,Iterator inputParamBindings,Iterator columnBindings,String boundColumnName,IRequestInfo requestInfo) throws BirtException {
  ArrayList temp=new ArrayList();
  while (columnBindings != null && columnBindings.hasNext()) {
    Object nextBinding=columnBindings.next();
    IBinding binding=this.modelAdaptor.adaptBinding((ComputedColumnHandle)nextBinding);
    if (binding.getAggrFunction() == null || binding.getAggregatOns() == null || binding.getAggregatOns().size() == 0)     temp.add(nextBinding);
  }
  IQueryResults queryResults=getQueryResults(dataSet,inputParamBindings,temp.iterator(),boundColumnName);
  return new ColumnValueIterator(queryResults,boundColumnName,requestInfo);
}
Program: 69818
Project: 69818
Buggy source:
public void add(AbstractArea area){
  super.add(area);
  if (repeatList != null) {
    IContent content=((ContainerArea)area).getContent();
    if (content != null) {
      IElement parent=content.getParent();
      if (parent != null && parent instanceof IBandContent) {
        int type=((IBandContent)parent).getBandType();
        if (type == IBandContent.BAND_HEADER || type == IBandContent.BAND_GROUP_HEADER) {
          if (content instanceof IRowContent) {
            RowDesign rowDesign=(RowDesign)content.getGenerateBy();
            if (rowDesign != null && rowDesign.getRepeatable()) {
              repeatList.add(area);
            }
          }
 else {
            repeatList.add(area);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public void add(AbstractArea area){
  super.add(area);
  if (repeatList != null) {
    IContent content=((ContainerArea)area).getContent();
    if (content != null) {
      IElement parent=content.getParent();
      if (parent != null && parent instanceof IBandContent) {
        int type=((IBandContent)parent).getBandType();
        if (type == IBandContent.BAND_HEADER || type == IBandContent.BAND_GROUP_HEADER) {
          if (content instanceof IRowContent) {
            RowDesign rowDesign=(RowDesign)content.getGenerateBy();
            if (rowDesign == null || rowDesign.getRepeatable()) {
              repeatList.add(area);
            }
          }
 else {
            repeatList.add(area);
          }
        }
      }
    }
  }
}
Program: 69819
Project: 69819
Buggy source:
public synchronized void run(){
  try {
    Map<ConnectionProp,Set<CacheConnection>> odaConnectionsMap=DataSource.dataEngineLevelConnectionPool.remove(session);
    if (odaConnectionsMap == null)     return;
    for (    Set<CacheConnection> set : odaConnectionsMap.values()) {
      for (      CacheConnection conn : set) {
        try {
          conn.odaConn.close();
        }
 catch (        DataException e) {
          e.printStackTrace();
        }
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void run(){
  try {
synchronized (DataSource.dataEngineLevelConnectionPool) {
      Map<ConnectionProp,Set<CacheConnection>> odaConnectionsMap=DataSource.dataEngineLevelConnectionPool.remove(session);
      if (odaConnectionsMap == null)       return;
      for (      Set<CacheConnection> set : odaConnectionsMap.values()) {
        for (        CacheConnection conn : set) {
          try {
            conn.odaConn.close();
          }
 catch (          DataException e) {
            e.printStackTrace();
          }
        }
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}