nus-yam/ex-repair huggingface dataset:
Program: 68170
Project: 68170
Buggy source:
private void initControls(){
  FillLayout flMain=new FillLayout();
  flMain.marginHeight=0;
  flMain.marginWidth=0;
  setLayout(flMain);
  cmpContent=new Composite(this,SWT.BORDER);
  GridLayout glContentInner=new GridLayout();
  glContentInner.verticalSpacing=0;
  glContentInner.horizontalSpacing=0;
  glContentInner.marginHeight=0;
  glContentInner.marginWidth=0;
  glContentInner.numColumns=2;
  cmpContent.setLayout(glContentInner);
  final int iSize=17;
  cnvSelection=createChoice(cmpContent,null);
  GridData gdCNVSelection=new GridData(GridData.FILL_BOTH);
  gdCNVSelection.heightHint=iSize;
  cnvSelection.setLayoutData(gdCNVSelection);
  cnvSelection.setValue(iCurrentValue);
  cnvSelection.addListener(SWT.KeyDown,canvasListener);
  cnvSelection.addListener(SWT.Traverse,canvasListener);
  cnvSelection.addListener(SWT.FocusIn,canvasListener);
  cnvSelection.addListener(SWT.FocusOut,canvasListener);
  cnvSelection.addListener(SWT.MouseDown,canvasListener);
  btnDown=new Button(cmpContent,SWT.ARROW | SWT.DOWN);
  GridData gdBDown=new GridData(GridData.FILL);
  gdBDown.verticalAlignment=GridData.BEGINNING;
  gdBDown.widthHint=iSize - 1;
  gdBDown.heightHint=iSize;
  btnDown.setLayoutData(gdBDown);
  btnDown.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event event){
      toggleDropDown();
    }
  }
);
  layout();
  initAccessible();
}

Fixed version (ground truth):
private void initControls(){
  FillLayout flMain=new FillLayout();
  flMain.marginHeight=0;
  flMain.marginWidth=0;
  setLayout(flMain);
  cmpContent=new Composite(this,SWT.BORDER);
  GridLayout glContentInner=new GridLayout();
  glContentInner.verticalSpacing=0;
  glContentInner.horizontalSpacing=0;
  glContentInner.marginHeight=0;
  glContentInner.marginWidth=0;
  glContentInner.numColumns=2;
  cmpContent.setLayout(glContentInner);
  final int iSize=itemHeight;
  cnvSelection=createChoice(cmpContent,null);
  GridData gdCNVSelection=new GridData(GridData.FILL_BOTH);
  gdCNVSelection.heightHint=iSize;
  cnvSelection.setLayoutData(gdCNVSelection);
  cnvSelection.setValue(iCurrentValue);
  cnvSelection.addListener(SWT.KeyDown,canvasListener);
  cnvSelection.addListener(SWT.Traverse,canvasListener);
  cnvSelection.addListener(SWT.FocusIn,canvasListener);
  cnvSelection.addListener(SWT.FocusOut,canvasListener);
  cnvSelection.addListener(SWT.MouseDown,canvasListener);
  btnDown=new Button(cmpContent,SWT.ARROW | SWT.DOWN);
  GridData gdBDown=new GridData(GridData.FILL);
  gdBDown.verticalAlignment=GridData.BEGINNING;
  gdBDown.widthHint=iSize - 1;
  gdBDown.heightHint=iSize;
  btnDown.setLayoutData(gdBDown);
  btnDown.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event event){
      toggleDropDown();
    }
  }
);
  layout();
  initAccessible();
}
Program: 68171
Project: 68171
Buggy source:
public TextCombo(Composite parent,int style){
  super(parent,style);
  addDisposeListener(new DisposeListener(){
    public void widgetDisposed(    DisposeEvent e){
      fontBold.dispose();
      choiceMarkerMap.clear();
    }
  }
);
}

Fixed version (ground truth):
public TextCombo(Composite parent,int style){
  super(parent,style);
  if (Display.getCurrent().getHighContrast()) {
    GC gc=new GC(this);
    itemHeight=gc.getFontMetrics().getHeight() + 2;
  }
  addDisposeListener(new DisposeListener(){
    public void widgetDisposed(    DisposeEvent e){
      fontBold.dispose();
      choiceMarkerMap.clear();
    }
  }
);
}
Program: 68173
Project: 68173
Buggy source:
/** 
 * Returns the fill from palette. If the index is less than the palette colors size, simply return the fill. If else, first return brighter fill, then darker fill. The color fetching logic is like this: In the first round, use the color from palette directly. In the second round, use the brighter color of respective one in the first round. In the third round, use the darker color of respective one in the first round. In the forth round, use the brighter color of respective one in the second round. In the fifth round, use the darker color of respective one in the third round. ...
 * @param elPalette
 * @param index
 * @since 2.5
 * @return fill from palette
 */
public static Fill getPaletteFill(EList<Fill> elPalette,int index){
  final int iPaletteSize=elPalette.size();
  Fill fill=elPalette.get(index % iPaletteSize);
  if (index < iPaletteSize) {
    return goFactory.copyOf(elPalette.get(index % iPaletteSize));
  }
  int d=index / iPaletteSize;
  if (d % 2 != 0) {
    Fill brighterFill=getBrighterFill(fill);
    while (d / 2 > 0) {
      d-=2;
      brighterFill=getBrighterFill(brighterFill);
    }
    return brighterFill;
  }
  Fill darkerFill=getDarkerFill(fill);
  while ((d - 1) / 2 > 0) {
    d-=2;
    darkerFill=getDarkerFill(darkerFill);
  }
  return darkerFill;
}

Fixed version (ground truth):
/** 
 * Returns the fill from palette. If the index is less than the palette colors size, simply return the fill. If else, first return brighter fill, then darker fill. The color fetching logic is like this: In the first round, use the color from palette directly. In the second round, use the brighter color of respective one in the first round. In the third round, use the darker color of respective one in the first round. In the forth round, use the brighter color of respective one in the second round. In the fifth round, use the darker color of respective one in the third round. ...
 * @param elPalette
 * @param index
 * @since 2.5
 * @return fill from palette
 */
public static Fill getPaletteFill(EList<Fill> elPalette,int index){
  final int iPaletteSize=elPalette.size();
  Fill fill=elPalette.get(index % iPaletteSize);
  if (index < iPaletteSize) {
    return goFactory.copyOf(fill);
  }
  if (fill instanceof ColorDefinition) {
    return tunePaletteColor((ColorDefinition)fill,iPaletteSize,index);
  }
  int d=index / iPaletteSize;
  if (d % 2 != 0) {
    Fill brighterFill=getBrighterFill(fill);
    while (d / 2 > 0) {
      d-=2;
      brighterFill=getBrighterFill(brighterFill);
    }
    return brighterFill;
  }
  Fill darkerFill=getDarkerFill(fill);
  while ((d - 1) / 2 > 0) {
    d-=2;
    darkerFill=getDarkerFill(darkerFill);
  }
  return darkerFill;
}
Program: 68174
Project: 68174
Buggy source:
public boolean performOk(){
  for (int i=0; i < bindingName.size(); i++) {
    try {
      String value=null;
      Text propertyText=(Text)propertyTextList.get(i);
      if (!propertyText.isDisposed() && propertyText.getText() != null && propertyText.getText().trim().length() > 0) {
        value=propertyText.getText().trim();
      }
      Expression expr=new Expression(value,(String)propertyText.getData(DataUIConstants.EXPR_TYPE));
      if (ds instanceof DesignElementHandle) {
        ((DesignElementHandle)ds).setPropertyBinding((String)bindingName.get(i),expr);
      }
    }
 catch (    Exception e) {
      logger.log(Level.FINE,e.getMessage(),e);
      ExceptionHandler.handle(e);
      return true;
    }
  }
  return super.performOk();
}

Fixed version (ground truth):
public boolean performOk(){
  for (int i=0; i < propList.size(); i++) {
    try {
      String value=null;
      Text propertyText=(Text)propertyTextList.get(i);
      if (!propertyText.isDisposed() && propertyText.getText() != null && propertyText.getText().trim().length() > 0) {
        value=propertyText.getText().trim();
      }
      Expression expr=new Expression(value,(String)propertyText.getData(DataUIConstants.EXPR_TYPE));
      if (ds instanceof DesignElementHandle) {
        if (propList.get(i) instanceof String[]) {
          ((DesignElementHandle)ds).setPropertyBinding(((String[])propList.get(i))[0],expr);
        }
 else         if (propList.get(i) instanceof IPropertyDefn) {
          ((DesignElementHandle)ds).setPropertyBinding(((IPropertyDefn)propList.get(i)).getName(),expr);
        }
      }
    }
 catch (    Exception e) {
      logger.log(Level.FINE,e.getMessage(),e);
      ExceptionHandler.handle(e);
      return true;
    }
  }
  return super.performOk();
}
Program: 68175
Project: 68175
Buggy source:
private void createExpressionButton(Composite composite,final Text property,String propName){
  ExpressionButton exprButton=ExpressionButtonUtil.createExpressionButton(composite,property,new ExpressionProvider(handle),handle,true,SWT.PUSH);
  if (ODAPASSWORD.equals(propName) || PASSWORD.equals(propName)) {
    exprButton.setExpressionButtonProvider(new ExprButtonProvider(true,property));
  }
  Expression expr=handle.getPropertyBindingExpression(propName);
  property.setData(ExpressionButtonUtil.EXPR_TYPE,expr == null || expr.getType() == null ? UIUtil.getDefaultScriptType() : (String)expr.getType());
  property.setText((expr == null || expr.getStringExpression() == null) ? "String_Node_Str" : expr.getStringExpression());
  exprButton.refresh();
}

Fixed version (ground truth):
private void createExpressionButton(Composite composite,final Text property,String propName,boolean isEncryptable){
  ExpressionButton exprButton=ExpressionButtonUtil.createExpressionButton(composite,property,new ExpressionProvider(handle),handle,true,SWT.PUSH);
  if (isEncryptable) {
    exprButton.setExpressionButtonProvider(new ExprButtonProvider(true,property));
  }
  Expression expr=handle.getPropertyBindingExpression(propName);
  property.setData(ExpressionButtonUtil.EXPR_TYPE,expr == null || expr.getType() == null ? UIUtil.getDefaultScriptType() : (String)expr.getType());
  property.setText((expr == null || expr.getStringExpression() == null) ? "String_Node_Str" : expr.getStringExpression());
  exprButton.refresh();
}
Program: 68178
Project: 68178
Buggy source:
public boolean needRefreshed(NotificationEvent event){
  if (event instanceof PropertyEvent) {
    String propertyName=((PropertyEvent)event).getPropertyName();
    if (ReportItemHandle.BOUND_DATA_COLUMNS_PROP.equals(propertyName)) {
      getDataSetColumns(contentInput.get(0));
    }
    if (ListingHandle.FILTER_PROP.equals(propertyName)) {
      return true;
    }
    if (ReportItemHandle.PARAM_BINDINGS_PROP.equals(propertyName)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean needRefreshed(NotificationEvent event){
  if (event instanceof PropertyEvent) {
    String propertyName=((PropertyEvent)event).getPropertyName();
    if (ReportItemHandle.BOUND_DATA_COLUMNS_PROP.equals(propertyName)) {
      getDataSetColumns(contentInput.get(0));
    }
    return true;
  }
  return false;
}
Program: 68179
Project: 68179
Buggy source:
public boolean needRefreshed(NotificationEvent event){
  if (event instanceof PropertyEvent) {
    String propertyName=((PropertyEvent)event).getPropertyName();
    if (ListingHandle.SORT_PROP.equals(propertyName))     return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean needRefreshed(NotificationEvent event){
  if (event instanceof PropertyEvent) {
    return true;
  }
  return false;
}
Program: 68180
Project: 68180
Buggy source:
private void writeText(int type,Object value,StyleEntry style){
  String txt=ExcelUtil.format(value,type);
  writer.openTag("String_Node_Str");
  if (type == SheetData.NUMBER) {
    if (ExcelUtil.isNaN(value) || ExcelUtil.isBigNumber(value) || ExcelUtil.isInfinity(value)) {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
 else {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
  }
 else   if (type == SheetData.DATE) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
 else {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  if (style != null) {
    String textTransform=(String)style.getProperty(StyleConstant.TEXT_TRANSFORM);
    if (CSSConstants.CSS_CAPITALIZE_VALUE.equalsIgnoreCase(textTransform)) {
      txt=capitalize(txt);
    }
 else     if (CSSConstants.CSS_UPPERCASE_VALUE.equalsIgnoreCase(textTransform)) {
      txt=txt.toUpperCase();
    }
 else     if (CSSConstants.CSS_LOWERCASE_VALUE.equalsIgnoreCase(textTransform)) {
      txt=txt.toLowerCase();
    }
  }
  writer.text(txt);
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
private void writeText(int type,Object value,StyleEntry style){
  String txt=ExcelUtil.format(value,type);
  writer.openTag("String_Node_Str");
  if (type == SheetData.NUMBER) {
    if (ExcelUtil.isNaN(value) || ExcelUtil.isBigNumber(value) || ExcelUtil.isInfinity(value)) {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
 else {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
  }
 else   if (type == SheetData.DATE) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
 else {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  if (style != null) {
    String textTransform=(String)style.getProperty(StyleConstant.TEXT_TRANSFORM);
    if (CSSConstants.CSS_CAPITALIZE_VALUE.equalsIgnoreCase(textTransform)) {
      txt=capitalize(txt);
    }
 else     if (CSSConstants.CSS_UPPERCASE_VALUE.equalsIgnoreCase(textTransform)) {
      txt=txt.toUpperCase();
    }
 else     if (CSSConstants.CSS_LOWERCASE_VALUE.equalsIgnoreCase(textTransform)) {
      txt=txt.toLowerCase();
    }
  }
  writer.text(ExcelUtil.truncateCellText(txt));
  writer.closeTag("String_Node_Str");
}
Program: 68181
Project: 68181
Buggy source:
public Word getNextWord(){
  start=end;
  if (start == text.length())   return null;
  keepWithNext();
  keepWithLast();
  return new Word(text,start,end);
}

Fixed version (ground truth):
public Word getNextWord(){
  start=end;
  end=breakIterator.next();
  if (end != BreakIterator.DONE) {
    return new Word(text,start,end);
  }
  return null;
}
Program: 68182
Project: 68182
Buggy source:
public WordRecognizerWrapper(String text,Locale locale){
  this.text=text;
  wr=new ICUWordRecognizer(text,locale);
}

Fixed version (ground truth):
public WordRecognizerWrapper(String text,Locale locale){
  this.text=text;
  breakIterator=BreakIterator.getLineInstance(locale);
  breakIterator.setText(text);
}
Program: 68183
Project: 68183
Buggy source:
public boolean hasWord(){
  return end != text.length();
}

Fixed version (ground truth):
public boolean hasWord(){
  return end != BreakIterator.DONE && end < text.length();
}
Program: 68184
Project: 68184
Buggy source:
public void startList(IListContent list){
  adjustInline();
  styles.push(list.getComputedStyle());
  writeBookmark(list);
  Object listToc=list.getTOC();
  if (listToc != null) {
    tableTocs.add(new TocInfo(listToc.toString(),tocLevel));
  }
  increaseTOCLevel(list);
  if (context.isLastTable()) {
    wordWriter.insertHiddenParagraph();
  }
  wordWriter.startTable(list.getComputedStyle(),context.getCurrentWidth());
}

Fixed version (ground truth):
public void startList(IListContent list){
  adjustInline();
  styles.push(list.getComputedStyle());
  writeBookmark(list);
  Object listToc=list.getTOC();
  if (listToc != null) {
    tableTocs.add(new TocInfo(listToc.toString(),tocLevel));
  }
  increaseTOCLevel(list);
  if (context.isLastTable()) {
    wordWriter.insertHiddenParagraph();
  }
  int width=WordUtil.convertTo(list.getWidth(),context.getCurrentWidth(),reportDpi);
  width=Math.min(width,context.getCurrentWidth());
  wordWriter.startTable(list.getComputedStyle(),width);
}
Program: 68185
Project: 68185
Buggy source:
private IDialogHelper createHyperLinkPart(Composite parent){
  Object[] helperProviders=ElementAdapterManager.getAdapters(input,IDialogHelperProvider.class);
  if (helperProviders != null) {
    for (int i=0; i < helperProviders.length; i++) {
      IDialogHelperProvider helperProvider=(IDialogHelperProvider)helperProviders[i];
      if (helperProvider != null) {
        final IDialogHelper hyperLinkHelper=helperProvider.createHelper(this,BuilderConstants.HYPERLINK_HELPER_KEY);
        if (hyperLinkHelper != null) {
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_LABEL,Messages.getString("String_Node_Str"));
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_BUTTON_TEXT,Messages.getString("String_Node_Str"));
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_REPORT_ITEM_HANDLE,input);
          hyperLinkHelper.createContent(parent);
          hyperLinkHelper.addListener(SWT.Modify,new Listener(){
            public void handleEvent(            Event event){
              hyperLinkHelper.update(false);
            }
          }
);
          hyperLinkHelper.update(true);
          return hyperLinkHelper;
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
private IDialogHelper createHyperLinkPart(Composite parent){
  Object[] helperProviders=ElementAdapterManager.getAdapters(input,IDialogHelperProvider.class);
  if (helperProviders != null) {
    for (int i=0; i < helperProviders.length; i++) {
      IDialogHelperProvider helperProvider=(IDialogHelperProvider)helperProviders[i];
      if (helperProvider != null) {
        final IDialogHelper hyperLinkHelper=helperProvider.createHelper(this,BuilderConstants.HYPERLINK_HELPER_KEY);
        if (hyperLinkHelper != null) {
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_LABEL,Messages.getString("String_Node_Str"));
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_BUTTON_TEXT,Messages.getString("String_Node_Str"));
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_REPORT_ITEM_HANDLE,input);
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_REPORT_ITEM_PROVIDER,new LinkToCubeExpressionProvider(input));
          hyperLinkHelper.createContent(parent);
          hyperLinkHelper.addListener(SWT.Modify,new Listener(){
            public void handleEvent(            Event event){
              hyperLinkHelper.update(false);
            }
          }
);
          hyperLinkHelper.update(true);
          return hyperLinkHelper;
        }
      }
    }
  }
  return null;
}
Program: 68186
Project: 68186
Buggy source:
private void initDialog(){
  nameText.setText(hierarchy.getContainer().getName());
  if (!isNew) {
    if (((DimensionHandle)hierarchy.getContainer()).isTimeType()) {
      dateButton.setSelection(true);
      handleButtonSelection(dateButton);
    }
 else {
      regularButton.setSelection(true);
      handleButtonSelection(regularButton);
    }
  }
 else {
    dateButton.setSelection(true);
    handleButtonSelection(dateButton);
  }
  if (!isNew) {
    WidgetUtil.setExcludeGridData(regularButton,true);
    WidgetUtil.setExcludeGridData(dateButton,true);
  }
  if (!isNew && !((DimensionHandle)hierarchy.getContainer()).isTimeType())   levelViewer.getTree().setVisible(false);
  levelViewer.setInput(getDateTypeNames(getLevelTypesByDateType()));
  levelViewer.expandAll();
  TreeItem topNode=levelViewer.getTree().getItem(0);
  do {
    if (levelList.contains(topNode.getData()))     topNode.setChecked(true);
    topNode=topNode.getItem(0);
  }
 while (topNode.getItemCount() > 0);
  if (levelList.contains(topNode.getData()))   topNode.setChecked(true);
  checkOKButtonStatus();
}

Fixed version (ground truth):
private void initDialog(){
  nameText.setText(hierarchy.getContainer().getName());
  if (!isNew) {
    if (((DimensionHandle)hierarchy.getContainer()).isTimeType()) {
      dateButton.setSelection(true);
      handleButtonSelection(dateButton);
    }
 else {
      regularButton.setSelection(true);
      handleButtonSelection(regularButton);
    }
  }
 else {
    dateButton.setSelection(true);
    handleButtonSelection(dateButton);
  }
  if (!isNew) {
    WidgetUtil.setExcludeGridData(regularButton,true);
    WidgetUtil.setExcludeGridData(dateButton,true);
  }
  if (!isNew && !((DimensionHandle)hierarchy.getContainer()).isTimeType())   levelViewer.getTree().setVisible(false);
  levelViewer.setInput(getDateTypeNames(getLevelTypesByDateType()));
  levelViewer.expandAll();
  if (levelViewer.getTree().getItemCount() > 0) {
    TreeItem topNode=levelViewer.getTree().getItem(0);
    do {
      if (levelList.contains(topNode.getData()))       topNode.setChecked(true);
      topNode=topNode.getItem(0);
    }
 while (topNode.getItemCount() > 0);
    if (levelList.contains(topNode.getData()))     topNode.setChecked(true);
  }
  checkOKButtonStatus();
}
Program: 68187
Project: 68187
Buggy source:
public Object[] getElements(Object inputElement){
  return new Object[]{getDateTypeNames(getLevelTypesByDateType()).get(0)};
}

Fixed version (ground truth):
public Object[] getElements(Object inputElement){
  if (getLevelTypesByDateType() != null && getLevelTypesByDateType().length > 0)   return new Object[]{getDateTypeNames(getLevelTypesByDateType()).get(0)};
  return new Object[0];
}
Program: 68188
Project: 68188
Buggy source:
private IDialogHelper createHyperLinkPart(Composite parent){
  Object[] helperProviders=ElementAdapterManager.getAdapters(input,IDialogHelperProvider.class);
  if (helperProviders != null) {
    for (int i=0; i < helperProviders.length; i++) {
      IDialogHelperProvider helperProvider=(IDialogHelperProvider)helperProviders[i];
      if (helperProvider != null) {
        final IDialogHelper hyperLinkHelper=helperProvider.createHelper(this,BuilderConstants.HYPERLINK_HELPER_KEY);
        if (hyperLinkHelper != null) {
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_LABEL,Messages.getString("String_Node_Str"));
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_BUTTON_TEXT,Messages.getString("String_Node_Str"));
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_REPORT_ITEM_HANDLE,input);
          hyperLinkHelper.createContent(parent);
          hyperLinkHelper.addListener(SWT.Modify,new Listener(){
            public void handleEvent(            Event event){
              hyperLinkHelper.update(false);
            }
          }
);
          hyperLinkHelper.update(true);
          return hyperLinkHelper;
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
private IDialogHelper createHyperLinkPart(Composite parent){
  Object[] helperProviders=ElementAdapterManager.getAdapters(input,IDialogHelperProvider.class);
  if (helperProviders != null) {
    for (int i=0; i < helperProviders.length; i++) {
      IDialogHelperProvider helperProvider=(IDialogHelperProvider)helperProviders[i];
      if (helperProvider != null) {
        final IDialogHelper hyperLinkHelper=helperProvider.createHelper(this,BuilderConstants.HYPERLINK_HELPER_KEY);
        if (hyperLinkHelper != null) {
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_LABEL,Messages.getString("String_Node_Str"));
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_BUTTON_TEXT,Messages.getString("String_Node_Str"));
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_REPORT_ITEM_HANDLE,input);
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_REPORT_ITEM_PROVIDER,new LinkToCubeExpressionProvider(input));
          hyperLinkHelper.createContent(parent);
          hyperLinkHelper.addListener(SWT.Modify,new Listener(){
            public void handleEvent(            Event event){
              hyperLinkHelper.update(false);
            }
          }
);
          hyperLinkHelper.update(true);
          return hyperLinkHelper;
        }
      }
    }
  }
  return null;
}
Program: 68189
Project: 68189
Buggy source:
private IDialogHelper createHyperLinkPart(Composite parent){
  Object[] helperProviders=ElementAdapterManager.getAdapters(input,IDialogHelperProvider.class);
  if (helperProviders != null) {
    for (int i=0; i < helperProviders.length; i++) {
      IDialogHelperProvider helperProvider=(IDialogHelperProvider)helperProviders[i];
      if (helperProvider != null) {
        final IDialogHelper hyperLinkHelper=helperProvider.createHelper(this,BuilderConstants.HYPERLINK_HELPER_KEY);
        if (hyperLinkHelper != null) {
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_LABEL,Messages.getString("String_Node_Str"));
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_BUTTON_TEXT,Messages.getString("String_Node_Str"));
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_REPORT_ITEM_HANDLE,input);
          hyperLinkHelper.createContent(parent);
          hyperLinkHelper.addListener(SWT.Modify,new Listener(){
            public void handleEvent(            Event event){
              hyperLinkHelper.update(false);
            }
          }
);
          hyperLinkHelper.update(true);
          return hyperLinkHelper;
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
private IDialogHelper createHyperLinkPart(Composite parent){
  Object[] helperProviders=ElementAdapterManager.getAdapters(input,IDialogHelperProvider.class);
  if (helperProviders != null) {
    for (int i=0; i < helperProviders.length; i++) {
      IDialogHelperProvider helperProvider=(IDialogHelperProvider)helperProviders[i];
      if (helperProvider != null) {
        final IDialogHelper hyperLinkHelper=helperProvider.createHelper(this,BuilderConstants.HYPERLINK_HELPER_KEY);
        if (hyperLinkHelper != null) {
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_LABEL,Messages.getString("String_Node_Str"));
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_BUTTON_TEXT,Messages.getString("String_Node_Str"));
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_REPORT_ITEM_HANDLE,input);
          hyperLinkHelper.setProperty(BuilderConstants.HYPERLINK_REPORT_ITEM_PROVIDER,new LinkToCubeExpressionProvider(input));
          hyperLinkHelper.createContent(parent);
          hyperLinkHelper.addListener(SWT.Modify,new Listener(){
            public void handleEvent(            Event event){
              hyperLinkHelper.update(false);
            }
          }
);
          hyperLinkHelper.update(true);
          return hyperLinkHelper;
        }
      }
    }
  }
  return null;
}
Program: 68190
Project: 68190
Buggy source:
public boolean isValidExpression(String expression){
  if (context.getDataServiceProvider().checkState(IDataServiceProvider.SHARE_QUERY) || context.getDataServiceProvider().checkState(IDataServiceProvider.INHERIT_COLUMNS_GROUPS)) {
    if (cmbDefinition == null)     return false;
    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) || context.getDataServiceProvider().checkState(IDataServiceProvider.INHERIT_COLUMNS_GROUPS)) {
    if (cmbDefinition == null)     return false;
    int index=cmbDefinition.indexOf(expression);
    if (index < 0) {
      return false;
    }
    return true;
  }
  if (cmbDefinition != null && context.getDataServiceProvider().checkState(IDataServiceProvider.HAS_CUBE)) {
    String[] items=cmbDefinition.getItems();
    for (    String s : items) {
      if (s.indexOf(expression) > 0) {
        return true;
      }
    }
    return false;
  }
  return true;
}
Program: 68191
Project: 68191
Buggy source:
public void dragEnter(DropTargetEvent event){
  event.detail=DND.DROP_COPY;
}

Fixed version (ground truth):
public void dragEnter(DropTargetEvent event){
  event.detail=DND.DROP_COPY;
  Object object=null;
  Transfer[] transferAgents=((DropTarget)event.widget).getTransfer();
  for (int i=0; i < transferAgents.length; i++) {
    Transfer transfer=transferAgents[i];
    if (transfer != null && transfer instanceof SimpleTextTransfer) {
      object=SimpleTextTransfer.getInstance().nativeToJava(event.currentDataType);
      break;
    }
  }
  if (object != null && !DataDefinitionTextManager.getInstance().isValidExpression(txtDataDefn,object.toString())) {
    event.detail=DND.DROP_NONE;
  }
}
Program: 68192
Project: 68192
Buggy source:
public void shutdown(){
  logger.entering("String_Node_Str","String_Node_Str");
  if (dataSources == null) {
    logger.fine("String_Node_Str");
    return;
  }
  Collection col=dataSources.values();
  Iterator it=col.iterator();
  while (it.hasNext()) {
    DataSourceRuntime ds=(DataSourceRuntime)it.next();
    try {
      closeDataSource(ds);
    }
 catch (    DataException e) {
      if (logger.isLoggable(Level.FINE))       logger.log(Level.FINE,"String_Node_Str" + ds + "String_Node_Str",e);
    }
  }
  this.dataSourceManager.close();
  releaseValidationContexts();
  if (shutdownListenerList != null) {
    for (int i=0; i < shutdownListenerList.size(); i++) {
      ((IShutdownListener)shutdownListenerList.get(i)).dataEngineShutdown();
    }
    shutdownListenerList.clear();
  }
  logger.logp(Level.FINE,DataEngineImpl.class.getName(),"String_Node_Str","String_Node_Str");
  dataSetDesigns=null;
  dataSources=null;
  clearTempFile();
  logger.exiting(DataEngineImpl.class.getName(),"String_Node_Str");
}

Fixed version (ground truth):
public void shutdown(){
  logger.entering("String_Node_Str","String_Node_Str");
  if (dataSources == null) {
    logger.fine("String_Node_Str");
    return;
  }
  Collection col=dataSources.values();
  Iterator it=col.iterator();
  while (it.hasNext()) {
    DataSourceRuntime ds=(DataSourceRuntime)it.next();
    try {
      closeDataSource(ds);
    }
 catch (    DataException e) {
      if (logger.isLoggable(Level.FINE))       logger.log(Level.FINE,"String_Node_Str" + ds + "String_Node_Str",e);
    }
  }
  this.dataSourceManager.close();
  releaseValidationContexts();
  if (shutdownListenerList != null) {
    for (int i=0; i < shutdownListenerList.size(); i++) {
      ((IShutdownListener)shutdownListenerList.get(i)).dataEngineShutdown();
    }
    shutdownListenerList.clear();
  }
  logger.logp(Level.FINE,DataEngineImpl.class.getName(),"String_Node_Str","String_Node_Str");
  dataSetDesigns=null;
  dataSources=null;
  clearTempFile();
  if (this.getContext().getDocWriter() != null) {
    RAOutputStream outputStream;
    try {
      if (this.getContext().getDocWriter().exists(DataEngineContext.QUERY_STARTING_ID)) {
        outputStream=this.getContext().getDocWriter().getOutputStream(DataEngineContext.QUERY_STARTING_ID);
      }
 else {
        outputStream=this.getContext().getDocWriter().createOutputStream(DataEngineContext.QUERY_STARTING_ID);
      }
      outputStream.writeInt(this.getSession().getQueryResultIDUtil().getCurrentQueryId());
      outputStream.close();
    }
 catch (    IOException e) {
    }
  }
  logger.exiting(DataEngineImpl.class.getName(),"String_Node_Str");
}
Program: 68194
Project: 68194
Buggy source:
/** 
 * No instance
 */
public QueryResultIDUtil(){
}

Fixed version (ground truth):
public QueryResultIDUtil(int startingID){
  this.currentId=startingID;
}
Program: 68195
Project: 68195
Buggy source:
public void endTable(ITableContent table){
  engine.endTable();
}

Fixed version (ground truth):
public void endTable(ITableContent table){
  engine.endTable(table);
}
Program: 68196
Project: 68196
Buggy source:
public void endList(IListContent list){
  engine.endTable();
}

Fixed version (ground truth):
public void endList(IListContent list){
  engine.endTable(list);
}
Program: 68197
Project: 68197
Buggy source:
public void endTable(){
  if (!tables.isEmpty()) {
    tables.pop();
    endContainer();
  }
}

Fixed version (ground truth):
public void endTable(IContent content){
  if (!tables.isEmpty()) {
    tables.pop();
    endContainer();
  }
}
Program: 68199
Project: 68199
Buggy source:
public Object invoke(Command command,Object... inData) throws ChartException {
  return null;
}

Fixed version (ground truth):
public Object invoke(Command command,Object... inData) throws ChartException {
  Object outData=null;
switch (command) {
case EXPRESS_BUTTON_CREATE:
    final Control control=(Control)inData[1];
  IExpressionButton ceb=new IExpressionButton(){
    public void setExpression(    String expr){
      ChartUIUtil.setText(control,expr);
    }
    public void setEnabled(    boolean bEnabled){
      control.setEnabled(bEnabled);
    }
    public boolean isEnabled(){
      return control.isEnabled();
    }
    public String getExpression(){
      return ChartUIUtil.getText(control);
    }
    public String getDisplayExpression(){
      return getExpression();
    }
    public void addListener(    Listener listener){
    }
    public void setAccessor(    EAttributeAccessor<String> accessor){
    }
    public String getExpressionType(){
      return null;
    }
    public boolean isCube(){
      return false;
    }
    public void setBindingName(    String bindingName,    boolean bNotifyEvents){
    }
    public void setExpression(    String expr,    boolean bNotifyEvents){
    }
    public void setAssitField(    IAssistField assistField){
    }
    public void setPredefinedQuery(    Object[] predefinedQuery){
    }
  }
;
outData=ceb;
break;
}
return outData;
}
Program: 68200
Project: 68200
Buggy source:
public List<String> getAllValueDefinitions(){
  return null;
}

Fixed version (ground truth):
public List<String> getAllValueDefinitions(){
  return new ArrayList<String>(2);
}
Program: 68201
Project: 68201
Buggy source:
protected void writeText(int type,String txt,IContent content,InlineFlag inlineFlag,IStyle computedStyle,IStyle inlineStyle){
  HyperlinkInfo hyper=getHyperlink(content);
  int paragraphWidth=(int)WordUtil.twipToPt(context.getCurrentWidth());
  if (content instanceof TextContent) {
    TextFlag textFlag=TextFlag.START;
    String fontFamily=null;
    if ("String_Node_Str".equals(txt) || txt == null || WordUtil.isField(content)) {
      wordWriter.writeContent(type,txt,computedStyle,inlineStyle,fontFamily,hyper,inlineFlag,textFlag,paragraphWidth);
    }
 else {
      FontSplitter fontSplitter=getFontSplitter(content);
      while (fontSplitter.hasMore()) {
        Chunk ch=fontSplitter.getNext();
        int offset=ch.getOffset();
        int length=ch.getLength();
        fontFamily=getFontFamily(computedStyle,ch);
        wordWriter.writeContent(type,txt.substring(offset,offset + length),computedStyle,inlineStyle,fontFamily,hyper,inlineFlag,textFlag,paragraphWidth);
        textFlag=fontSplitter.hasMore() ? TextFlag.MIDDLE : TextFlag.END;
      }
    }
    if (inlineFlag == InlineFlag.BLOCK) {
      wordWriter.writeContent(type,null,computedStyle,inlineStyle,fontFamily,hyper,inlineFlag,TextFlag.END,paragraphWidth);
    }
  }
 else {
    wordWriter.writeContent(type,txt,computedStyle,inlineStyle,computedStyle.getFontFamily(),hyper,inlineFlag,TextFlag.WHOLE,paragraphWidth);
  }
}

Fixed version (ground truth):
protected void writeText(int type,String txt,IContent content,InlineFlag inlineFlag,IStyle computedStyle,IStyle inlineStyle){
  HyperlinkInfo hyper=getHyperlink(content);
  int paragraphWidth=(int)WordUtil.twipToPt(context.getCurrentWidth());
  if (content instanceof TextContent) {
    TextFlag textFlag=TextFlag.START;
    String fontFamily=null;
    if ("String_Node_Str".equals(txt) || txt == null || WordUtil.isField(content)) {
      wordWriter.writeContent(type,txt,computedStyle,inlineStyle,fontFamily,hyper,inlineFlag,textFlag,paragraphWidth);
    }
 else {
      FontSplitter fontSplitter=getFontSplitter(content);
      while (fontSplitter.hasMore()) {
        Chunk ch=fontSplitter.getNext();
        int offset=ch.getOffset();
        int length=ch.getLength();
        fontFamily=getFontFamily(computedStyle,ch);
        String string=null;
        if (ch == Chunk.HARD_LINE_BREAK) {
          string=ch.getText();
        }
 else {
          string=txt.substring(offset,offset + length);
        }
        wordWriter.writeContent(type,string,computedStyle,inlineStyle,fontFamily,hyper,inlineFlag,textFlag,paragraphWidth);
        textFlag=fontSplitter.hasMore() ? TextFlag.MIDDLE : TextFlag.END;
      }
    }
    if (inlineFlag == InlineFlag.BLOCK) {
      wordWriter.writeContent(type,null,computedStyle,inlineStyle,fontFamily,hyper,inlineFlag,TextFlag.END,paragraphWidth);
    }
  }
 else {
    wordWriter.writeContent(type,txt,computedStyle,inlineStyle,computedStyle.getFontFamily(),hyper,inlineFlag,TextFlag.WHOLE,paragraphWidth);
  }
}
Program: 68202
Project: 68202
Buggy source:
static String getTypeName(String typeDisplayName){
  String name=dataTypes[0].getName();
  for (int i=0; i < dataTypes.length; i++) {
    if (dataTypes[i].getDisplayName().equals(typeDisplayName))     return dataTypes[i].getName();
  }
  return name;
}

Fixed version (ground truth):
public static String getTypeName(String typeDisplayName){
  String name=dataTypes[0].getName();
  for (int i=0; i < dataTypes.length; i++) {
    if (dataTypes[i].getDisplayName().equals(typeDisplayName))     return dataTypes[i].getName();
  }
  return name;
}
Program: 68203
Project: 68203
Buggy source:
static String getTypeDisplayName(String typeName){
  for (int i=0; i < dataTypes.length; i++) {
    if (dataTypes[i].getName().equals(typeName))     return dataTypes[i].getDisplayName();
  }
  return typeName;
}

Fixed version (ground truth):
public static String getTypeDisplayName(String typeName){
  for (int i=0; i < dataTypes.length; i++) {
    if (dataTypes[i].getName().equals(typeName))     return dataTypes[i].getDisplayName();
  }
  return typeName;
}
Program: 68204
Project: 68204
Buggy source:
public void endListBand(IListBandContent listBand){
  adjustInline();
  context.endCell();
  wordWriter.endTableCell(true);
  wordWriter.endTableRow();
}

Fixed version (ground truth):
public void endListBand(IListBandContent listBand){
  adjustInline();
  wordWriter.endTableCell(context.needEmptyP());
  context.endCell();
  wordWriter.endTableRow();
}
Program: 68206
Project: 68206
Buggy source:
public static int[] resizeTableColumn(int tableWidth,int[] tblColumns,int count,int totalAssigned){
  int remainWidth=tableWidth - totalAssigned;
  int average=0;
  if (remainWidth > 0) {
    if (count > 0) {
      average=remainWidth / count;
      for (int i=0; i < tblColumns.length; i++) {
        if (tblColumns[i] == -1) {
          tblColumns[i]=average;
        }
      }
    }
 else {
      average=remainWidth / tblColumns.length;
      for (int i=0; i < tblColumns.length; i++) {
        tblColumns[i]+=average;
      }
    }
  }
 else   if (remainWidth <= 0 && count > 0) {
    for (int i=0; i < tblColumns.length; i++) {
      if (tblColumns[i] == -1) {
        tblColumns[i]=0;
      }
    }
  }
  return tblColumns;
}

Fixed version (ground truth):
public static int[] resizeTableColumn(int tableWidth,int[] tblColumns,int count,int totalAssigned){
  int remainWidth=tableWidth - totalAssigned;
  int average=0;
  if (remainWidth > 0) {
    if (count > 0) {
      average=remainWidth / count;
      for (int i=0; i < tblColumns.length; i++) {
        if (tblColumns[i] == -1) {
          tblColumns[i]=average;
        }
      }
    }
 else     if (tblColumns.length > 0) {
      average=remainWidth / tblColumns.length;
      for (int i=0; i < tblColumns.length; i++) {
        tblColumns[i]+=average;
      }
    }
  }
 else   if (remainWidth <= 0 && count > 0) {
    for (int i=0; i < tblColumns.length; i++) {
      if (tblColumns[i] == -1) {
        tblColumns[i]=0;
      }
    }
  }
  return tblColumns;
}
Program: 68207
Project: 68207
Buggy source:
/** 
 * Create parameter page control, if the datasetHandle is ODA, add the "linked with report parameter" cell.
 * @param parent
 * @return
 */
protected Control createParameterPageControl(Composite parent){
  DataSetHandle dataSetHandle=(DataSetHandle)getContainer().getModel();
  isOdaDataSetHandle=ParameterPageUtil.isOdaDataSetHandle(dataSetHandle);
  isJointOrDerivedDataSetHandle=ParameterPageUtil.isJointOrDerivedDataSetHandle(dataSetHandle);
  viewer=new PropertyHandleTableViewer(parent,true,true,true,!isJointOrDerivedDataSetHandle);
  createTableColumns();
  setContentProvider();
  setLabelProvider(dataSetHandle);
  adjustParameterOnPosition(parameters);
  if (ParameterPageUtil.isJointOrDerivedDataSetHandle(dataSetHandle)) {
    viewer.getViewer().setInput(dataSetHandle);
  }
 else {
    viewer.getViewer().setInput(parameters);
  }
  setToolTips();
  if (!isJointOrDerivedDataSetHandle) {
    addRefreshMenu();
    addListeners();
  }
  dataSetHandle.addListener(this);
  return viewer.getControl();
}

Fixed version (ground truth):
/** 
 * Create parameter page control, if the datasetHandle is ODA, add the "linked with report parameter" cell.
 * @param parent
 * @return
 */
protected Control createParameterPageControl(Composite parent){
  DataSetHandle dataSetHandle=(DataSetHandle)getContainer().getModel();
  isOdaDataSetHandle=ParameterPageUtil.isOdaDataSetHandle(dataSetHandle);
  isJointOrDerivedDataSetHandle=ParameterPageUtil.isJointOrDerivedDataSetHandle(dataSetHandle);
  viewer=new PropertyHandleTableViewer(parent,!isJointOrDerivedDataSetHandle,true,true,!isJointOrDerivedDataSetHandle);
  createTableColumns();
  setContentProvider();
  setLabelProvider(dataSetHandle);
  adjustParameterOnPosition(parameters);
  if (ParameterPageUtil.isJointOrDerivedDataSetHandle(dataSetHandle)) {
    viewer.getViewer().setInput(dataSetHandle);
  }
 else {
    viewer.getViewer().setInput(parameters);
  }
  setToolTips();
  if (!isJointOrDerivedDataSetHandle) {
    addRefreshMenu();
    addListeners();
  }
  dataSetHandle.addListener(this);
  return viewer.getControl();
}
Program: 68208
Project: 68208
Buggy source:
protected void updateButtons(){
  int[] indices=getViewer().getTable().getSelectionIndices();
  getUpButton().setEnabled(getUpButton().isVisible() && viewer.getTable().getItemCount() > 1 && indices.length == 1 && indices[0] != 0);
  getDownButton().setEnabled(getDownButton().isVisible() && viewer.getTable().getItemCount() > 1 && indices.length == 1 && indices[0] != viewer.getTable().getItemCount() - 1);
  getEditButton().setEnabled(getEditButton().isVisible() && indices.length == 1);
  getRemoveButton().setEnabled(getRemoveButton().isVisible() && indices.length > 0);
  getRemoveMenuItem().setEnabled(indices.length > 0);
  getRemoveAllMenuItem().setEnabled(viewer.getTable().getItemCount() > 0);
}

Fixed version (ground truth):
protected void updateButtons(){
  int[] indices=getViewer().getTable().getSelectionIndices();
  getUpButton().setEnabled(getUpButton().isVisible() && viewer.getTable().getItemCount() > 1 && indices.length == 1 && indices[0] != 0);
  getDownButton().setEnabled(getDownButton().isVisible() && viewer.getTable().getItemCount() > 1 && indices.length == 1 && indices[0] != viewer.getTable().getItemCount() - 1);
  getEditButton().setEnabled(getEditButton().isVisible() && indices.length == 1);
  getRemoveButton().setEnabled(getRemoveButton().isVisible() && indices.length > 0);
  if (getRemoveMenuItem() != null) {
    getRemoveMenuItem().setEnabled(indices.length > 0);
    getRemoveAllMenuItem().setEnabled(viewer.getTable().getItemCount() > 0);
  }
}
Program: 68209
Project: 68209
Buggy source:
public void widgetSelected(SelectionEvent e){
  try {
    PropertyHandle handle=(PropertyHandle)viewer.getInput();
    handle.clearValue();
    viewer.refresh();
    updateButtons();
  }
 catch (  SemanticException e1) {
    ExceptionHandler.handle(e1);
  }
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  try {
    if (viewer.getInput() instanceof PropertyHandle) {
      PropertyHandle handle=(PropertyHandle)viewer.getInput();
      handle.clearValue();
      viewer.refresh();
      updateButtons();
    }
  }
 catch (  SemanticException e1) {
    ExceptionHandler.handle(e1);
  }
}
Program: 68210
Project: 68210
Buggy source:
private void createMenuComposite(){
  menu=new Menu(viewer.getTable());
  menu.addMenuListener(new MenuAdapter(){
    public void menuShown(    MenuEvent e){
      viewer.cancelEditing();
    }
  }
);
  itmRemove=new MenuItem(menu,SWT.NONE);
  itmRemove.setText(Messages.getString("String_Node_Str"));
  itmRemove.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      doRemove();
    }
  }
);
  itmRemoveAll=new MenuItem(menu,SWT.NONE);
  itmRemoveAll.setText(Messages.getString("String_Node_Str"));
  itmRemoveAll.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      try {
        PropertyHandle handle=(PropertyHandle)viewer.getInput();
        handle.clearValue();
        viewer.refresh();
        updateButtons();
      }
 catch (      SemanticException e1) {
        ExceptionHandler.handle(e1);
      }
    }
  }
);
  viewer.getTable().setMenu(menu);
}

Fixed version (ground truth):
private void createMenuComposite(){
  menu=new Menu(viewer.getTable());
  menu.addMenuListener(new MenuAdapter(){
    public void menuShown(    MenuEvent e){
      viewer.cancelEditing();
    }
  }
);
  itmRemove=new MenuItem(menu,SWT.NONE);
  itmRemove.setText(Messages.getString("String_Node_Str"));
  itmRemove.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      doRemove();
    }
  }
);
  itmRemoveAll=new MenuItem(menu,SWT.NONE);
  itmRemoveAll.setText(Messages.getString("String_Node_Str"));
  itmRemoveAll.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      try {
        if (viewer.getInput() instanceof PropertyHandle) {
          PropertyHandle handle=(PropertyHandle)viewer.getInput();
          handle.clearValue();
          viewer.refresh();
          updateButtons();
        }
      }
 catch (      SemanticException e1) {
        ExceptionHandler.handle(e1);
      }
    }
  }
);
  viewer.getTable().setMenu(menu);
}
Program: 68211
Project: 68211
Buggy source:
public IQueryResults executeQuery(IQueryDefinition queryDefn,Iterator paramBindingIt,Iterator filterIt,Iterator bindingIt) throws BirtException {
  return new QueryExecutionHelper(this.dataEngine,this.modelAdaptor,this.sessionContext).executeQuery(queryDefn,paramBindingIt,filterIt,bindingIt,this.sessionContext.getTopScope());
}

Fixed version (ground truth):
public IQueryResults executeQuery(IQueryDefinition queryDefn,Iterator paramBindingIt,Iterator filterIt,Iterator bindingIt) throws BirtException {
  return new QueryExecutionHelper(this.dataEngine,this.modelAdaptor,this.sessionContext,this).executeQuery(queryDefn,paramBindingIt,filterIt,bindingIt,this.sessionContext.getTopScope());
}
Program: 68212
Project: 68212
Buggy source:
public IResultMetaData refreshMetaData(DataSetHandle dataSetHandle,boolean holdEvent) throws BirtException {
  return new DataSetMetaDataHelper(this.dataEngine,this.modelAdaptor,this.sessionContext).refreshMetaData(dataSetHandle,holdEvent);
}

Fixed version (ground truth):
public IResultMetaData refreshMetaData(DataSetHandle dataSetHandle,boolean holdEvent) throws BirtException {
  return new DataSetMetaDataHelper(this.dataEngine,this.modelAdaptor,this.sessionContext,this).refreshMetaData(dataSetHandle,holdEvent);
}
Program: 68213
Project: 68213
Buggy source:
public IResultMetaData getDataSetMetaData(DataSetHandle dataSetHandle,boolean useCache) throws BirtException {
  return new DataSetMetaDataHelper(this.dataEngine,this.modelAdaptor,this.sessionContext).getDataSetMetaData(dataSetHandle,useCache);
}

Fixed version (ground truth):
public IResultMetaData getDataSetMetaData(DataSetHandle dataSetHandle,boolean useCache) throws BirtException {
  return new DataSetMetaDataHelper(this.dataEngine,this.modelAdaptor,this.sessionContext,this).getDataSetMetaData(dataSetHandle,useCache);
}
Program: 68214
Project: 68214
Buggy source:
/** 
 * @param dataEngine
 * @param modelAdaptor
 * @param moduleHandle
 */
DataSetMetaDataHelper(DataEngine dataEngine,IModelAdapter modelAdaptor,DataSessionContext sessionContext){
  this.dataEngine=dataEngine;
  this.modelAdaptor=modelAdaptor;
  this.sessionContext=sessionContext;
}

Fixed version (ground truth):
/** 
 * @param dataEngine
 * @param modelAdaptor
 * @param moduleHandle
 */
DataSetMetaDataHelper(DataEngine dataEngine,IModelAdapter modelAdaptor,DataSessionContext sessionContext,DataRequestSession session){
  this.dataEngine=dataEngine;
  this.modelAdaptor=modelAdaptor;
  this.sessionContext=sessionContext;
  this.session=session;
}