nus-yam/ex-repair huggingface dataset:
Program: 79149
Project: 79149
Buggy source:
public void layout(IFigure container){
  if (data != null && data.columnWidths != null && data.columnWidths.length == getColumnCount() && data.rowHeights != null && data.rowHeights.length == getRowCount() && !needlayout || !owner.isActive()) {
    return;
  }
  helper=new TableBorderHelper(owner);
  helper.updateCellBorderInsets();
  data=new WorkingData();
  data.columnWidths=new TableLayoutData.ColumnData[getColumnCount()];
  data.rowHeights=new TableLayoutData.RowData[getRowCount()];
  init(data.columnWidths,data.rowHeights);
  List children=container.getChildren();
  initMinSize(children);
  initMergeMinsize(children);
  caleLayoutData(container);
  layoutTable(container);
  resetRowMinSize(data.rowHeights);
  initRowMinSize(children);
  initRowMergeMinsize(children);
  caleRowData();
  layoutTable(container);
  setConstraint(container,data);
  needlayout=false;
  final List list=((StructuredSelection)getOwner().getViewer().getSelection()).toList();
  boolean hasCell=false;
  for (int i=0; i < list.size(); i++) {
    if (list.get(i) instanceof TableCellEditPart || list.get(i) instanceof TableEditPart) {
      hasCell=true;
      break;
    }
  }
  if (hasCell) {
    Platform.run(new SafeRunnable(){
      public void run(){
        if (getOwner().getViewer().getControl().isVisible()) {
          if (getOwner().getViewer() instanceof DeferredGraphicalViewer)           ((DeferredGraphicalViewer)getOwner().getViewer()).setSelection(new StructuredSelection(list),false);
        }
      }
    }
);
  }
}

Fixed version (ground truth):
public void layout(IFigure container){
  if (data != null && data.columnWidths != null && data.columnWidths.length == getColumnCount() && data.rowHeights != null && data.rowHeights.length == getRowCount() && !needlayout || !owner.isActive()) {
    return;
  }
  helper=new TableBorderHelper(owner);
  helper.updateCellBorderInsets();
  data=new WorkingData();
  data.columnWidths=new TableLayoutData.ColumnData[getColumnCount()];
  data.rowHeights=new TableLayoutData.RowData[getRowCount()];
  init(data.columnWidths,data.rowHeights);
  List children=container.getChildren();
  initMinSize(children);
  initMergeMinsize(children);
  caleLayoutData(container);
  layoutTable(container);
  resetRowMinSize(data.rowHeights);
  initRowMinSize(children);
  initRowMergeMinsize(children);
  caleRowData();
  layoutTable(container);
  setConstraint(container,data);
  needlayout=false;
  reselect();
}
Program: 79150
Project: 79150
Buggy source:
private void updateButtons(){
  add.setEnabled(valueList.getSelectionCount() != 0 || valueEditor.getText().trim().length() != 0);
  addAll.setEnabled(valueList.getItemCount() != 0);
  remove.setEnabled(selectedList.getSelectionCount() != 0);
  removeAll.setEnabled(selectedList.getItemCount() != 0);
  getOkButton().setEnabled(selectedList.getItemCount() != 0);
}

Fixed version (ground truth):
private void updateButtons(){
  add.setEnabled(valueList.getSelectionCount() != 0 || (valueEditor.getText().trim().length() != 0 && selectedList.indexOf(valueEditor.getText().trim()) == -1));
  addAll.setEnabled(valueList.getItemCount() != 0);
  remove.setEnabled(selectedList.getSelectionCount() != 0);
  removeAll.setEnabled(selectedList.getItemCount() != 0);
  getOkButton().setEnabled(selectedList.getItemCount() != 0);
}
Program: 79151
Project: 79151
Buggy source:
private void filteValues(){
  valueList.removeAll();
  valueList.deselectAll();
  for (Iterator itor=resultList.iterator(); itor.hasNext(); ) {
    String value=(String)itor.next();
    try {
      if (selectedList.indexOf(value) == -1 && value.startsWith(valueEditor.getText()) || value.matches(valueEditor.getText())) {
        valueList.add(value);
      }
    }
 catch (    PatternSyntaxException e) {
    }
  }
  updateButtons();
}

Fixed version (ground truth):
private void filteValues(){
  valueList.removeAll();
  valueList.deselectAll();
  for (Iterator itor=resultList.iterator(); itor.hasNext(); ) {
    String value=(String)itor.next();
    try {
      if (selectedList.indexOf(value) == -1 && (value.startsWith(valueEditor.getText().trim()) || value.matches(valueEditor.getText().trim()))) {
        valueList.add(value);
      }
    }
 catch (    PatternSyntaxException e) {
    }
  }
  updateButtons();
}
Program: 79152
Project: 79152
Buggy source:
private void paintStretched(Graphics g){
  Image image=getImage();
  Rectangle area=getClientArea();
  g.drawImage(image,new Rectangle(image.getBounds()),area);
}

Fixed version (ground truth):
private void paintStretched(Graphics g){
  Image image=getImage();
  Rectangle area=getClientArea();
  if (area.height > 0 && area.width > 0) {
    g.drawImage(image,new Rectangle(image.getBounds()),area);
  }
}
Program: 79153
Project: 79153
Buggy source:
public ReportElementHandle getItemDesign(){
}

Fixed version (ground truth):
public ReportElementHandle getItemDesign(){
  if (reportItems.empty()) {
    return null;
  }
  return (ReportElementHandle)reportItems.peek();
}
Program: 79154
Project: 79154
Buggy source:
public String getType(){
  return element.getDefn().getName();
}

Fixed version (ground truth):
public String getType(){
  if (element == null) {
    return "String_Node_Str";
  }
  return element.getDefn().getName();
}
Program: 79155
Project: 79155
Buggy source:
public String getElementInfo(){
  return element.getName();
}

Fixed version (ground truth):
public String getElementInfo(){
  if (element == null) {
    return "String_Node_Str";
  }
  return element.getName();
}
Program: 79156
Project: 79156
Buggy source:
/** 
 * creates the appropriate platform object based on the platform type  If not running from Eclipse, this functions must be called before calling other functions.
 */
synchronized static public void initialize(IPlatformContext context){
  if (platform == null) {
    if (runningEclipse()) {
      platform=new EclipsePlatform();
      platformType=ECLIPSE_PLATFORM;
    }
 else {
      if (context == null)       context=new PlatformFileContext();
      platform=new ServerPlatform(context);
      platformType=SERVER_PLATFORM;
    }
  }
}

Fixed version (ground truth):
/** 
 * creates the appropriate platform object based on the platform type  If not running from Eclipse, this functions must be called before calling other functions.
 */
synchronized static public void initialize(IPlatformContext context){
  if (platform == null) {
    if (runningEclipse()) {
      log.log(Level.FINE,"String_Node_Str");
      platform=new EclipsePlatform();
      platformType=ECLIPSE_PLATFORM;
    }
 else {
      log.log(Level.FINE,"String_Node_Str");
      if (context == null)       context=new PlatformFileContext();
      platform=new ServerPlatform(context);
      platformType=SERVER_PLATFORM;
    }
  }
}
Program: 79157
Project: 79157
Buggy source:
public List getFolderList(String homeFolder,String subFolder){
  List folderList=new ArrayList();
  String folderString=homeFolder;
  if ((subFolder != null) && (subFolder.length() > 0))   folderString+=directorySeparator + subFolder;
  Set files=context.getResourcePaths(folderString);
  if ((files != null) && (files.size() > 0)) {
    for (Iterator it=files.iterator(); it.hasNext(); ) {
      Object obj=it.next();
      if (!(obj instanceof String))       continue;
      String pluginPath=(String)obj;
      if (hasChildren(pluginPath)) {
        folderList.add(pluginPath);
      }
    }
  }
  return folderList;
}

Fixed version (ground truth):
public List getFolderList(String homeFolder,String subFolder){
  List folderList=new ArrayList();
  String folderString=homeFolder;
  if ((subFolder != null) && (subFolder.length() > 0)) {
    if (folderString.endsWith(directorySeparator)) {
      folderString+=directorySeparator;
    }
    folderString+=subFolder;
  }
  Set files=context.getResourcePaths(folderString);
  if ((files != null) && (files.size() > 0)) {
    for (Iterator it=files.iterator(); it.hasNext(); ) {
      Object obj=it.next();
      if (!(obj instanceof String))       continue;
      String pluginPath=(String)obj;
      if (hasChildren(pluginPath)) {
        folderList.add(pluginPath);
      }
    }
  }
  return folderList;
}
Program: 79158
Project: 79158
Buggy source:
public URL getURL(String folder,String fileName){
  URL url=null;
  try {
    url=new URL(urlLeadingString + folder + fileName);
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
  }
  return url;
}

Fixed version (ground truth):
public URL getURL(String folder,String fileName){
  URL url=null;
  try {
    String realPath=context.getRealPath(folder + fileName);
    if (realPath == null) {
      url=context.getResource(folder + fileName);
      log.log(Level.FINE,"String_Node_Str",new Object[]{folder,fileName,realPath});
    }
 else {
      url=new File(realPath).toURL();
      log.log(Level.FINE,"String_Node_Str",new Object[]{folder,fileName,realPath});
    }
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
  }
  return url;
}
Program: 79159
Project: 79159
Buggy source:
/** 
 * Testcase for test setCategoryProvider() method
 */
public void testSetCategoryProvider(){
  BaseAttributePage page=new BaseAttributePage(new Shell(),SWT.NULL);
  page.setCategoryProvider(null);
  assertEquals(0,page.categoryList.getItemCount());
  final String[] labels=new String[]{"String_Node_Str","String_Node_Str"};
  page.setCategoryProvider(new ICategoryProvider(){
    public String[] getCategoryLabels(){
      return labels;
    }
    public void createCategoryPanes(    Composite parent,    List input){
    }
    public void setCategoryInput(    Composite parent,    List input){
    }
    public Control getCategoryPane(    String category){
      return null;
    }
  }
);
  assertEquals(labels.length,page.categoryList.getItemCount());
  assertEquals(0,page.categoryList.getSelectionIndex());
}

Fixed version (ground truth):
/** 
 * Testcase for test setCategoryProvider() method
 */
public void testSetCategoryProvider(){
  BaseAttributePage page=new BaseAttributePage(new Shell(),SWT.NULL);
  page.setCategoryProvider(null);
  assertEquals(0,page.categoryList.getItemCount());
  final String[] labels=new String[]{"String_Node_Str","String_Node_Str"};
  page.setCategoryProvider(new ICategoryProvider(){
    public String[] getCategoryLabels(){
      return labels;
    }
    public void createCategoryPanes(    Composite parent,    List input){
    }
    public void setCategoryInput(    Composite parent,    List input){
    }
    public Control getCategoryPane(    String category){
      return null;
    }
    public String getCategoryByIndex(    int index){
      return null;
    }
  }
);
  assertEquals(labels.length,page.categoryList.getItemCount());
  assertEquals(0,page.categoryList.getSelectionIndex());
}
Program: 79161
Project: 79161
Buggy source:
/** 
 * Adds input and output parameter hints to odaStatement
 */
private void addParameterHints() throws DataException {
  if (paramHints == null)   return;
  Iterator list=paramHints.iterator();
  while (list.hasNext()) {
    IParameterDefinition paramDef=(IParameterDefinition)list.next();
    ParameterHint parameterHint=new ParameterHint(paramDef.getName(),paramDef.isInputMode(),paramDef.isOutputMode());
    parameterHint.setPosition(paramDef.getPosition());
    Class dataTypeClass=DataType.getClass(paramDef.getType());
    if (dataTypeClass == DataType.AnyType.class || dataTypeClass == Boolean.class || dataTypeClass == Blob.class) {
      dataTypeClass=null;
    }
    parameterHint.setDataType(dataTypeClass);
    parameterHint.setIsInputOptional(paramDef.isInputOptional());
    parameterHint.setDefaultInputValue(paramDef.getDefaultInputValue());
    parameterHint.setIsNullable(paramDef.isNullable());
    odaStatement.addParameterHint(parameterHint);
    if (parameterHint.isInputMode()) {
      Object inputValue=convertToValue(paramDef.getDefaultInputValue(),paramDef.getType());
      this.setInputParamValue(parameterHint.getName(),inputValue);
    }
  }
  this.setInputParameterBinding();
}

Fixed version (ground truth):
/** 
 * Adds input and output parameter hints to odaStatement
 */
private void addParameterHints() throws DataException {
  if (paramHints == null)   return;
  Iterator list=paramHints.iterator();
  while (list.hasNext()) {
    IParameterDefinition paramDef=(IParameterDefinition)list.next();
    ParameterHint parameterHint=new ParameterHint(paramDef.getName(),paramDef.isInputMode(),paramDef.isOutputMode());
    parameterHint.setPosition(paramDef.getPosition());
    Class dataTypeClass=DataType.getClass(paramDef.getType());
    if (dataTypeClass == DataType.AnyType.class || dataTypeClass == Boolean.class || dataTypeClass == Blob.class) {
      dataTypeClass=null;
    }
    parameterHint.setDataType(dataTypeClass);
    parameterHint.setIsInputOptional(paramDef.isInputOptional());
    parameterHint.setDefaultInputValue(paramDef.getDefaultInputValue());
    parameterHint.setIsNullable(paramDef.isNullable());
    odaStatement.addParameterHint(parameterHint);
    if (parameterHint.isInputMode() && paramDef.getDefaultInputValue() != null) {
      Object inputValue=convertToValue(paramDef.getDefaultInputValue(),paramDef.getType());
      this.setInputParamValue(parameterHint.getName(),inputValue);
    }
  }
  this.setInputParameterBinding();
}
Program: 79163
Project: 79163
Buggy source:
/** 
 * Initializes the Jdbc related information , used  by this page ( such as the Jdbc Connection , Catalog Name etc )
 * @param curDataSourceHandle
 */
protected void resetJdbcInfo(OdaDataSourceHandle curDataSourceHandle){
  if (metaDataProvider != null) {
    metaDataProvider.closeConnection();
    metaDataProvider=new JdbcMetaDataProvider(null);
    jdbcConnection=connectMetadataProvider(metaDataProvider,curDataSourceHandle);
    tableList=null;
    schemaList=null;
  }
  try {
    if (jdbcConnection != null) {
      isSchemaSupported=metaDataProvider.isSchemaSupported();
    }
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
  }
}

Fixed version (ground truth):
/** 
 * Initializes the Jdbc related information , used  by this page ( such as the Jdbc Connection , Catalog Name etc )
 * @param curDataSourceHandle
 */
protected void resetJdbcInfo(OdaDataSourceHandle curDataSourceHandle){
  if (metaDataProvider != null) {
    metaDataProvider.closeConnection();
    metaDataProvider=new JdbcMetaDataProvider(null);
    jdbcConnection=connectMetadataProvider(metaDataProvider,curDataSourceHandle);
    tableList=null;
    schemaList=null;
    schemaCombo.removeAll();
  }
  try {
    if (jdbcConnection != null) {
      isSchemaSupported=metaDataProvider.isSchemaSupported();
    }
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
  }
}
Program: 79164
Project: 79164
Buggy source:
/** 
 * @param schemaRs: The ResultSet containing the List of schema
 * @return A List of schema names
 */
private ArrayList createSchemaList(ResultSet schemaRs){
  if (schemaRs == null) {
    return null;
  }
  ArrayList schemas=new ArrayList();
  try {
    while (schemaRs.next()) {
      schemas.add(schemaRs.getString("String_Node_Str"));
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  return schemas;
}

Fixed version (ground truth):
/** 
 * @param schemaRs: The ResultSet containing the List of schema
 * @return A List of schema names
 */
private ArrayList createSchemaList(ResultSet schemaRs){
  if (schemaRs == null) {
    return null;
  }
  ArrayList schemas=new ArrayList();
  try {
    ResultSet rs=null;
    while (schemaRs.next()) {
      rs=metaDataProvider.getAlltables(metaDataProvider.getCatalog(),schemaRs.getString("String_Node_Str"),"String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"});
      boolean hasNonSystemTable=false;
      if (rs != null) {
        while (rs.next()) {
          if (!"String_Node_Str".equalsIgnoreCase(rs.getString("String_Node_Str"))) {
            hasNonSystemTable=true;
            break;
          }
        }
      }
      if (hasNonSystemTable) {
        schemas.add(schemaRs.getString("String_Node_Str"));
      }
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  return schemas;
}
Program: 79165
Project: 79165
Buggy source:
/** 
 * @param schemaRs: The ResultSet containing the List of schema
 * @return A List of schema names
 */
private ArrayList createSchemaList(ResultSet schemaRs){
  if (schemaRs == null) {
    return null;
  }
  ArrayList schemas=new ArrayList();
  try {
    ResultSet rs=null;
    while (schemaRs.next()) {
      rs=metaDataProvider.getAlltables(metaDataProvider.getCatalog(),schemaRs.getString("String_Node_Str"),"String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"});
      boolean hasNonSystemTable=false;
      if (rs != null) {
        while (rs.next()) {
          if (!"String_Node_Str".equalsIgnoreCase(rs.getString("String_Node_Str"))) {
            hasNonSystemTable=true;
            break;
          }
        }
      }
      if (hasNonSystemTable) {
        schemas.add(schemaRs.getString("String_Node_Str"));
      }
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  return schemas;
}

Fixed version (ground truth):
/** 
 * @param schemaRs: The ResultSet containing the List of schema
 * @return A List of schema names
 */
private ArrayList createSchemaList(ResultSet schemaRs){
  if (schemaRs == null) {
    return null;
  }
  ArrayList schemas=new ArrayList();
  ArrayList allSchemas=new ArrayList();
  try {
    while (schemaRs.next()) {
      allSchemas.add(schemaRs.getString("String_Node_Str"));
    }
    ResultSet rs=null;
    Iterator it=allSchemas.iterator();
    while (it.hasNext()) {
      String schema=it.next().toString();
      rs=metaDataProvider.getAlltables(metaDataProvider.getCatalog(),schema,"String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"});
      boolean hasNonSystemTable=false;
      if (rs != null) {
        while (rs.next()) {
          if (!"String_Node_Str".equalsIgnoreCase(rs.getString("String_Node_Str"))) {
            hasNonSystemTable=true;
            break;
          }
        }
      }
      if (hasNonSystemTable) {
        schemas.add(schema);
      }
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  return schemas;
}
Program: 79166
Project: 79166
Buggy source:
private void refreshPage(){
  OdaDataSourceHandle curDataSourceHandle=(OdaDataSourceHandle)((OdaDataSetHandle)getContainer().getModel()).getDataSource();
  if (curDataSourceHandle != prevDataSourceHandle) {
    RemoveAllAvailableDbObjects();
    resetJdbcInfo(curDataSourceHandle);
    setRootElement();
    sourceViewerConfiguration.getContentAssistProcessor().setDataSourceHandle(curDataSourceHandle);
    prevDataSourceHandle=curDataSourceHandle;
    populateAvailableDbObjects();
  }
}

Fixed version (ground truth):
private void refreshPage(){
  OdaDataSourceHandle curDataSourceHandle=(OdaDataSourceHandle)((OdaDataSetHandle)getContainer().getModel()).getDataSource();
  if (curDataSourceHandle != prevDataSourceHandle) {
    RemoveAllAvailableDbObjects();
    resetJdbcInfo(curDataSourceHandle);
    enableSchemaComponent(isSchemaSupported);
    setRootElement();
    sourceViewerConfiguration.getContentAssistProcessor().setDataSourceHandle(curDataSourceHandle);
    prevDataSourceHandle=curDataSourceHandle;
    populateAvailableDbObjects();
  }
}
Program: 79168
Project: 79168
Buggy source:
public int compare(Object o1,Object o2){
  String name1;
  String name2;
  if (o1 instanceof DesignElementHandle && o2 instanceof DesignElementHandle) {
    name1=((DesignElementHandle)o1).getDisplayLabel();
    name2=((DesignElementHandle)o2).getDisplayLabel();
    if (name1 == null) {
      name1=((DesignElementHandle)o1).getName();
    }
    if (name2 == null) {
      name2=((DesignElementHandle)o2).getName();
    }
  }
 else {
    name1=o1.toString();
    name2=o2.toString();
  }
  if (name1 == null) {
    name1="String_Node_Str";
  }
  if (name2 == null) {
    name2="String_Node_Str";
  }
  if (ascending) {
    return Collator.getInstance().compare(name1,name2);
  }
 else {
    return Collator.getInstance().compare(name2,name1);
  }
}

Fixed version (ground truth):
public int compare(Object o1,Object o2){
  String name1;
  String name2;
  if (o1 instanceof DesignElementHandle && o2 instanceof DesignElementHandle) {
    name1=((DesignElementHandle)o1).getDisplayLabel();
    name2=((DesignElementHandle)o2).getDisplayLabel();
    if (name1 == null) {
      name1=((DesignElementHandle)o1).getName();
    }
    if (name2 == null) {
      name2=((DesignElementHandle)o2).getName();
    }
  }
  if (o1 instanceof IChoice && o2 instanceof IChoice) {
    name1=((IChoice)o1).getDisplayName();
    name2=((IChoice)o2).getDisplayName();
    if (name1 == null) {
      name1=((IChoice)o1).getName();
    }
    if (name2 == null) {
      name2=((IChoice)o2).getName();
    }
  }
 else {
    name1=o1.toString();
    name2=o2.toString();
  }
  if (name1 == null) {
    name1="String_Node_Str";
  }
  if (name2 == null) {
    name2="String_Node_Str";
  }
  if (ascending) {
    return Collator.getInstance().compare(name1,name2);
  }
 else {
    return Collator.getInstance().compare(name2,name1);
  }
}
Program: 79169
Project: 79169
Buggy source:
/** 
 * Returns all font names for current system. NOTES: Java 1.4 only support true type fonts.
 * @return font names.
 */
public static String[] getSystemFontNames(){
  GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
  return ge.getAvailableFontFamilyNames();
}

Fixed version (ground truth):
/** 
 * Returns all font names for current system. NOTES: Java 1.4 only support true type fonts.
 * @param comparator Sort comparator.
 * @return font names.
 */
public static String[] getSystemFontNames(Comparator comparator){
  GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
  String[] fontNames=ge.getAvailableFontFamilyNames();
  if (comparator != null) {
    Arrays.sort(fontNames,comparator);
  }
  return fontNames;
}
Program: 79170
Project: 79170
Buggy source:
/** 
 * Gets a named property
 */
public Object get(String name,Scriptable start){
  logger.entering(JSRowObject.class.getName(),"String_Node_Str",name);
  if (name.equals(DATA_SET)) {
    if (logger.isLoggable(Level.FINER))     logger.exiting(JSRowObject.class.getName(),"String_Node_Str",dataSet.getScriptable());
    return dataSet.getScriptable();
  }
 else   if (name.equals(COLUMN_MD)) {
    if (logger.isLoggable(Level.FINER))     logger.exiting(JSRowObject.class.getName(),"String_Node_Str",getColumnMetadataScriptable());
    return getColumnMetadataScriptable();
  }
 else   if (name.equals(ROW_POSITION)) {
    try {
      if (logger.isLoggable(Level.FINER))       logger.exiting(JSRowObject.class.getName(),"String_Node_Str",new Integer(resultSet.getCurrentResultIndex()));
      return new Integer(resultSet.getCurrentResultIndex());
    }
 catch (    DataException e) {
      logger.logp(Level.FINER,JSColumnDefn.class.getName(),"String_Node_Str",e.getMessage(),e);
    }
  }
  try {
    IResultObject obj=this.getResultObject();
    if (obj != null) {
      if (logger.isLoggable(Level.FINER))       logger.exiting(JSRowObject.class.getName(),"String_Node_Str",obj.getFieldValue(name));
      return obj.getFieldValue(name);
    }
  }
 catch (  DataException e) {
    logger.logp(Level.FINER,JSColumnDefn.class.getName(),"String_Node_Str",e.getMessage(),e);
  }
  if (logger.isLoggable(Level.FINER))   logger.exiting(JSRowObject.class.getName(),"String_Node_Str",super.get(name,start));
  return super.get(name,start);
}

Fixed version (ground truth):
/** 
 * Gets a named property
 */
public Object get(String name,Scriptable start){
  logger.entering(JSRowObject.class.getName(),"String_Node_Str",name);
  if (name.equals(DATA_SET)) {
    if (logger.isLoggable(Level.FINER))     logger.exiting(JSRowObject.class.getName(),"String_Node_Str",dataSet.getScriptable());
    return dataSet.getScriptable();
  }
 else   if (name.equals(COLUMN_MD)) {
    if (logger.isLoggable(Level.FINER))     logger.exiting(JSRowObject.class.getName(),"String_Node_Str",getColumnMetadataScriptable());
    return getColumnMetadataScriptable();
  }
 else   if (name.equals(ROW_POSITION)) {
    try {
      if (logger.isLoggable(Level.FINER))       logger.exiting(JSRowObject.class.getName(),"String_Node_Str",new Integer(resultSet.getCurrentResultIndex()));
      return new Integer(resultSet.getCurrentResultIndex());
    }
 catch (    DataException e) {
      logger.logp(Level.FINER,JSColumnDefn.class.getName(),"String_Node_Str",e.getMessage(),e);
    }
  }
  try {
    IResultObject obj=this.getResultObject();
    if (obj != null) {
      if (logger.isLoggable(Level.FINER))       logger.exiting(JSRowObject.class.getName(),"String_Node_Str",obj.getFieldValue(name));
      return obj.getFieldValue(name);
    }
  }
 catch (  DataException e) {
    logger.logp(Level.FINER,JSColumnDefn.class.getName(),"String_Node_Str",e.getMessage(),e);
    return new DataExceptionMocker(e);
  }
  if (logger.isLoggable(Level.FINER))   logger.exiting(JSRowObject.class.getName(),"String_Node_Str",super.get(name,start));
  return super.get(name,start);
}
Program: 79171
Project: 79171
Buggy source:
private static Object evaluateJSScript(Context cx,Scriptable scope,String scriptText,String source,int lineNo) throws DataException {
  Object result=null;
  try {
    Script compiledScript=ScriptUtil.getCompiledScript(scriptText,source,lineNo);
    result=compiledScript.exec(cx,scope);
    if (result instanceof Undefined) {
      return null;
    }
  }
 catch (  RhinoException e) {
    RethrowJSEvalException(e,scriptText,source,lineNo);
  }
  return convertNativeObjToJavaObj(result);
}

Fixed version (ground truth):
private static Object evaluateJSScript(Context cx,Scriptable scope,String scriptText,String source,int lineNo) throws DataException {
  Object result=null;
  try {
    Script compiledScript=ScriptUtil.getCompiledScript(scriptText,source,lineNo);
    result=compiledScript.exec(cx,scope);
    if (result instanceof DataExceptionMocker) {
      throw ((DataExceptionMocker)result).getCause();
    }
    if (result instanceof Undefined) {
      return null;
    }
  }
 catch (  RhinoException e) {
    RethrowJSEvalException(e,scriptText,source,lineNo);
  }
  return convertNativeObjToJavaObj(result);
}
Program: 79173
Project: 79173
Buggy source:
/** 
 * Removes structure from structure list.
 * @param structRef reference to the item to remove
 */
private void doRemoveItem(MemberRef structRef){
  ActivityStack stack=design.getActivityStack();
  String label=ModelMessages.getMessage(MessageConstants.REMOVE_ITEM_MESSAGE);
  stack.startTrans(label);
  List list=getOrMakePropertyList(structRef);
  Structure struct=structRef.getStructure(design,element);
  if (struct.isReferencable())   adjustReferenceClients((ReferencableStructure)struct);
  PropertyListRecord record=new PropertyListRecord(element,structRef,list);
  getActivityStack().execute(record);
  stack.commit();
}

Fixed version (ground truth):
/** 
 * Removes structure from structure list.
 * @param structRef reference to the item to remove
 */
private void doRemoveItem(MemberRef structRef){
}
Program: 79174
Project: 79174
Buggy source:
public static void checkHyperlinkTextDecoration(IStyle style,StringBuffer content){
  String linethrough=null;
  String overline=null;
  if (style != null) {
    linethrough=style.getTextLineThrough();
    overline=style.getTextOverline();
  }
  content.append("String_Node_Str");
  if (overline != null && "String_Node_Str".equalsIgnoreCase(overline)) {
    addPropValue(content,overline);
  }
  if (linethrough != null && !"String_Node_Str".equalsIgnoreCase(linethrough)) {
    addPropValue(content,linethrough);
  }
  content.append("String_Node_Str");
}

Fixed version (ground truth):
public static void checkHyperlinkTextDecoration(IStyle style,StringBuffer content){
  if (style != null) {
    buildTextDecoration(content,style.getTextLineThrough(),style.getTextUnderline(),style.getTextOverline());
  }
}
Program: 79176
Project: 79176
Buggy source:
public static void checkHyperlinkTextDecoration(IStyle style,StringBuffer content){
  String linethrough=style.getTextLineThrough();
  String overline=style.getTextOverline();
  content.append("String_Node_Str");
  if (overline != null && "String_Node_Str".equalsIgnoreCase(overline)) {
    addPropValue(content,overline);
  }
  if (linethrough != null && !"String_Node_Str".equalsIgnoreCase(linethrough)) {
    addPropValue(content,linethrough);
  }
  content.append("String_Node_Str");
}

Fixed version (ground truth):
public static void checkHyperlinkTextDecoration(IStyle style,StringBuffer content){
  String linethrough=null;
  String overline=null;
  if (style != null) {
    linethrough=style.getTextLineThrough();
    overline=style.getTextOverline();
  }
  content.append("String_Node_Str");
  if (overline != null && "String_Node_Str".equalsIgnoreCase(overline)) {
    addPropValue(content,overline);
  }
  if (linethrough != null && !"String_Node_Str".equalsIgnoreCase(linethrough)) {
    addPropValue(content,linethrough);
  }
  content.append("String_Node_Str");
}
Program: 79177
Project: 79177
Buggy source:
/** 
 * @param p the scalar parameter
 * @param expr the default value expression 
 */
private Object evaluateDefault(ScalarParameterDefn p,String expr){
  Object value=null;
  int type=p.getDataType();
  if (expr != null) {
    value=executionContext.evaluate(expr);
    if (value == null && expr != null && expr.length() > 0)     value=expr;
    try {
switch (type) {
case IScalarParameterDefn.TYPE_BOOLEAN:
        value=DataTypeUtil.toBoolean(value);
      break;
case IScalarParameterDefn.TYPE_DATE_TIME:
    value=DataTypeUtil.toDate(value);
  break;
case IScalarParameterDefn.TYPE_DECIMAL:
value=DataTypeUtil.toBigDecimal(value);
break;
case IScalarParameterDefn.TYPE_FLOAT:
value=DataTypeUtil.toDouble(value);
break;
case IScalarParameterDefn.TYPE_STRING:
value=DataTypeUtil.toString(value);
break;
default :
value=null;
break;
}
}
 catch (BirtException e) {
log.log(Level.SEVERE,e.getLocalizedMessage(),e);
value=null;
}
}
return value;
}

Fixed version (ground truth):
/** 
 * @param p the scalar parameter
 * @param expr the default value expression 
 */
private Object evaluateDefault(ScalarParameterDefn p,String expr){
  executionContext.pushReportItem(p.getHandle());
  Object value=null;
  int type=p.getDataType();
  if (expr != null) {
    value=executionContext.evaluate(expr);
    if (value == null && expr != null && expr.length() > 0)     value=expr;
    try {
switch (type) {
case IScalarParameterDefn.TYPE_BOOLEAN:
        value=DataTypeUtil.toBoolean(value);
      break;
case IScalarParameterDefn.TYPE_DATE_TIME:
    value=DataTypeUtil.toDate(value);
  break;
case IScalarParameterDefn.TYPE_DECIMAL:
value=DataTypeUtil.toBigDecimal(value);
break;
case IScalarParameterDefn.TYPE_FLOAT:
value=DataTypeUtil.toDouble(value);
break;
case IScalarParameterDefn.TYPE_STRING:
value=DataTypeUtil.toString(value);
break;
default :
value=null;
break;
}
}
 catch (BirtException e) {
log.log(Level.SEVERE,e.getLocalizedMessage(),e);
value=null;
}
}
executionContext.popReportItem();
return value;
}
Program: 79178
Project: 79178
Buggy source:
/** 
 * @param params a collection of parameter definitions
 */
protected HashMap evaluateDefaults(Collection params){
  HashMap values=new HashMap();
  if (params != null) {
    Iterator iter=params.iterator();
    while (iter.hasNext()) {
      IParameterDefnBase pBase=(IParameterDefnBase)iter.next();
      if (pBase instanceof ScalarParameterDefn) {
        Object val=evaluateDefault((ScalarParameterDefn)pBase,((ScalarParameterDefn)pBase).getDefaultValueExpr());
        values.put(pBase.getName(),val);
      }
 else       if (pBase instanceof ParameterGroupDefn) {
        Iterator iter2=((ParameterGroupDefn)pBase).getContents().iterator();
        while (iter2.hasNext()) {
          IParameterDefnBase p=(IParameterDefnBase)iter2.next();
          if (p instanceof ScalarParameterDefn) {
            Object val=evaluateDefault((ScalarParameterDefn)p,((ScalarParameterDefn)p).getDefaultValueExpr());
            values.put(pBase.getName(),val);
          }
        }
      }
    }
  }
  return values;
}

Fixed version (ground truth):
/** 
 * @param params a collection of parameter definitions
 */
protected HashMap evaluateDefaults(Collection params){
  HashMap values=new HashMap();
  if (params != null) {
    Iterator iter=params.iterator();
    while (iter.hasNext()) {
      IParameterDefnBase pBase=(IParameterDefnBase)iter.next();
      if (pBase instanceof ScalarParameterDefn) {
        Object val=evaluateDefault((ScalarParameterDefn)pBase,((ScalarParameterDefn)pBase).getDefaultValueExpr());
        values.put(pBase.getName(),val);
      }
 else       if (pBase instanceof ParameterGroupDefn) {
        executionContext.pushReportItem(((ParameterGroupDefn)pBase).getHandle());
        Iterator iter2=((ParameterGroupDefn)pBase).getContents().iterator();
        while (iter2.hasNext()) {
          IParameterDefnBase p=(IParameterDefnBase)iter2.next();
          if (p instanceof ScalarParameterDefn) {
            Object val=evaluateDefault((ScalarParameterDefn)p,((ScalarParameterDefn)p).getDefaultValueExpr());
            values.put(pBase.getName(),val);
          }
        }
        executionContext.popReportItem();
      }
    }
  }
  return values;
}
Program: 79179
Project: 79179
Buggy source:
public ReportItemHandle getItemDesign(){
}

Fixed version (ground truth):
public ReportElementHandle getItemDesign(){
}
Program: 79180
Project: 79180
Buggy source:
/** 
 * pushes a report item design handle onto report items stack, and set it as current item (the <code>this</code> object).
 * @param handle the report item design handle
 */
public void pushReportItem(ReportItemHandle handle){
  reportItems.push(handle);
  scriptContext.registerBean("String_Node_Str",handle);
}

Fixed version (ground truth):
/** 
 * pushes a report item design handle onto report items stack, and set it as current item (the <code>this</code> object).
 * @param handle the report item design handle
 */
public void pushReportItem(ReportElementHandle handle){
  reportItems.push(handle);
  scriptContext.registerBean("String_Node_Str",handle);
}
Program: 79181
Project: 79181
Buggy source:
/** 
 * @return the read-only report item handle
 */
public ReportItemHandle getItemDesign();

Fixed version (ground truth):
/** 
 * @return the read-only report item handle
 */
public ReportElementHandle getItemDesign();
Program: 79183
Project: 79183
Buggy source:
public void visitParameterGroup(ParameterGroupHandle handle){
  ParameterGroupDefn paramGroup=new ParameterGroupDefn();
  paramGroup.setParameterType(IParameterDefnBase.PARAMETER_GROUP);
  paramGroup.setName(handle.getName());
  paramGroup.setDisplayName(handle.getDisplayName());
  paramGroup.setDisplayNameKey(handle.getDisplayNameKey());
  paramGroup.setHelpText(handle.getHelpText());
  paramGroup.setHelpTextKey(handle.getHelpTextKey());
  SlotHandle parameters=handle.getParameters();
  List properties=handle.getUserProperties();
  for (int i=0; i < properties.size(); i++) {
    UserPropertyDefn p=(UserPropertyDefn)properties.get(i);
    paramGroup.addUserProperty(p.getName(),handle.getProperty(p.getName()));
  }
  int size=parameters.getCount();
  for (int n=0; n < size; n++) {
    apply(parameters.get(n));
    paramGroup.addParameter((IParameterDefnBase)currentElement);
  }
  currentElement=paramGroup;
}

Fixed version (ground truth):
public void visitParameterGroup(ParameterGroupHandle handle){
  ParameterGroupDefn paramGroup=new ParameterGroupDefn();
  paramGroup.setHandle(handle);
  paramGroup.setParameterType(IParameterDefnBase.PARAMETER_GROUP);
  paramGroup.setName(handle.getName());
  paramGroup.setDisplayName(handle.getDisplayName());
  paramGroup.setDisplayNameKey(handle.getDisplayNameKey());
  paramGroup.setHelpText(handle.getHelpText());
  paramGroup.setHelpTextKey(handle.getHelpTextKey());
  SlotHandle parameters=handle.getParameters();
  List properties=handle.getUserProperties();
  for (int i=0; i < properties.size(); i++) {
    UserPropertyDefn p=(UserPropertyDefn)properties.get(i);
    paramGroup.addUserProperty(p.getName(),handle.getProperty(p.getName()));
  }
  int size=parameters.getCount();
  for (int n=0; n < size; n++) {
    apply(parameters.get(n));
    paramGroup.addParameter((IParameterDefnBase)currentElement);
  }
  currentElement=paramGroup;
}
Program: 79185
Project: 79185
Buggy source:
private static Object evaluateJSScript(Context cx,Scriptable scope,String scriptText,String source,int lineNo) throws DataException {
  Object result=null;
  try {
    result=cx.evaluateString(scope,scriptText,source,lineNo,null);
    if (result instanceof Undefined) {
      return null;
    }
  }
 catch (  RhinoException e) {
    RethrowJSEvalException(e,scriptText,source,lineNo);
  }
  return convertNativeObjToJavaObj(result);
}

Fixed version (ground truth):
private static Object evaluateJSScript(Context cx,Scriptable scope,String scriptText,String source,int lineNo) throws DataException {
  Object result=null;
  try {
    Script compiledScript=ScriptUtil.getCompiledScript(scriptText,source,lineNo);
    result=compiledScript.exec(cx,scope);
    if (result instanceof Undefined) {
      return null;
    }
  }
 catch (  RhinoException e) {
    RethrowJSEvalException(e,scriptText,source,lineNo);
  }
  return convertNativeObjToJavaObj(result);
}
Program: 79186
Project: 79186
Buggy source:
private void addSelected(){
  String[] selected=valueList.getSelection();
  if (selected.length == 0) {
    selected=new String[]{valueEditor.getText()};
  }
  for (int i=0; i < selected.length; i++) {
    if (selectedList.indexOf(selected[i]) == -1) {
      selectedList.add(selected[i]);
    }
  }
  filteValues();
}

Fixed version (ground truth):
private void addSelected(){
  String[] selected=valueList.getSelection();
  int selectedIndex=valueList.getSelectionIndex();
  int oldListSize=valueList.getItemCount();
  if (selected.length == 0) {
    selected=new String[]{valueEditor.getText()};
  }
  for (int i=0; i < selected.length; i++) {
    if (selectedList.indexOf(selected[i]) == -1) {
      selectedList.add(selected[i]);
    }
  }
  filteValues();
  if (selected.length == 1) {
    int nextSelected=((selectedIndex + 1) < oldListSize) ? selectedIndex : (selectedIndex - 1);
    valueList.select(nextSelected);
  }
 else   if ((selected.length > 1) && (valueList.getItemCount() > 0)) {
    valueList.select(0);
  }
  updateButtons();
}
Program: 79187
Project: 79187
Buggy source:
protected void populateAvailableDbObjects(){
  RemoveAllAvailableDbObjects();
  initJdbcInfo();
  setRootElement();
  setRefreshInfo();
  if (isSchemaSupported) {
    getAvailableSchema();
    populateTableList();
  }
 else {
    populateTableList();
  }
  if (rootNode != null) {
    selectNode(rootNode);
  }
}

Fixed version (ground truth):
protected void populateAvailableDbObjects(){
  RemoveAllAvailableDbObjects();
  setRootElement();
  setRefreshInfo();
  if (isSchemaSupported) {
    getAvailableSchema();
    if (schemaCombo.getItemCount() < 1) {
      schemaCombo.add(JdbcPlugin.getResourceString("String_Node_Str"));
      schemaCombo.select(0);
      Iterator it=schemaList.iterator();
      while (it.hasNext())       schemaCombo.add(it.next().toString());
    }
    populateTableList();
  }
 else {
    populateTableList();
  }
  if (rootNode != null) {
    selectNode(rootNode);
  }
}
Program: 79190
Project: 79190
Buggy source:
public Control createPageControl(Composite parent){
  Splitter splitter=new Splitter(parent,SWT.NONE);
  splitter.setOrientation(SWT.HORIZONTAL);
  splitter.setLayoutData(new GridData(GridData.FILL_BOTH));
  createTableSelectionComposite(splitter);
  initialize();
  populateAvailableDbObjects();
  createTextualQueryComposite(splitter);
  splitter.setWeights(new int[]{35,65});
  return splitter;
}

Fixed version (ground truth):
public Control createPageControl(Composite parent){
  Splitter splitter=new Splitter(parent,SWT.NONE);
  splitter.setOrientation(SWT.HORIZONTAL);
  splitter.setLayoutData(new GridData(GridData.FILL_BOTH));
  initialize();
  initJdbcInfo();
  createTableSelectionComposite(splitter);
  populateAvailableDbObjects();
  createTextualQueryComposite(splitter);
  splitter.setWeights(new int[]{35,65});
  return splitter;
}
Program: 79191
Project: 79191
Buggy source:
/** 
 * Gets a property value given its definition. This version does the property search as defined by the given derived component. That is, it gets the "effective" property value. The definition can be for a system or user-defined property. <p> The search won't search up the containment hierarchy. Meanwhile, it won't the inheritance hierarchy if the non-style property is not inheritable. <p> Part of: Property value system.
 * @param design the report design
 * @param prop definition of the property to get
 * @return The property value, or null if no value is set.
 */
public Object getPropertyFromElement(ReportDesign design,ElementPropertyDefn prop){
  Object value=null;
  value=getPropertyFromSelf(design,prop);
  if (value != null)   return value;
  if (prop.canInherit()) {
    value=getPropertyFromParent(design,prop);
    if (value != null)     return value;
  }
  if (prop.isStyleProperty()) {
    String selector=((ElementDefn)getDefn()).getSelector();
    value=getPropertyFromSelector(design,prop,selector);
    if (value != null)     return value;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Gets a property value given its definition. This version does the property search as defined by the given derived component. That is, it gets the "effective" property value. The definition can be for a system or user-defined property. <p> The search won't search up the containment hierarchy. Meanwhile, it won't the inheritance hierarchy if the non-style property is not inheritable. <p> Part of: Property value system.
 * @param design the report design
 * @param prop definition of the property to get
 * @return The property value, or null if no value is set.
 */
public Object getPropertyFromElement(ReportDesign design,ElementPropertyDefn prop){
  Object value=null;
  value=getPropertyFromSelf(design,prop);
  if (value != null)   return value;
  if (isInheritableProperty(prop)) {
    value=getPropertyFromParent(design,prop);
    if (value != null)     return value;
  }
  if (prop.isStyleProperty()) {
    String selector=((ElementDefn)getDefn()).getSelector();
    value=getPropertyFromSelector(design,prop,selector);
    if (value != null)     return value;
  }
  return null;
}
Program: 79192
Project: 79192
Buggy source:
public MemberHandle getMember(String memberName){
  StructPropertyDefn memberDefn=(StructPropertyDefn)getDefn().getMember(memberName);
  if (memberDefn == null)   return null;
  return new NameMemberHandle(this,memberDefn);
}

Fixed version (ground truth):
public MemberHandle getMember(String memberName){
  StructPropertyDefn memberDefn=(StructPropertyDefn)getDefn().getMember(memberName);
  if (memberDefn == null)   return null;
  if (DesignSchemaConstants.NAME_ATTRIB.equalsIgnoreCase(memberName))   return new NameMemberHandle(this,memberDefn);
 else   return new MemberHandle(this,memberDefn);
}
Program: 79193
Project: 79193
Buggy source:
private void removeSelected(){
  String[] selected=selectedList.getSelection();
  for (int i=0; i < selected.length; i++) {
    selectedList.remove(selected[i]);
  }
  updateButtons();
}

Fixed version (ground truth):
private void removeSelected(){
  String[] selected=selectedList.getSelection();
  for (int i=0; i < selected.length; i++) {
    selectedList.remove(selected[i]);
  }
  filteValues();
}
Program: 79194
Project: 79194
Buggy source:
private void addSelected(){
  String[] selected=valueList.getSelection();
  if (selected.length == 0) {
    selected=new String[]{valueEditor.getText()};
  }
  for (int i=0; i < selected.length; i++) {
    if (selectedList.indexOf(selected[i]) == -1) {
      selectedList.add(selected[i]);
    }
  }
  updateButtons();
}

Fixed version (ground truth):
private void addSelected(){
  String[] selected=valueList.getSelection();
  if (selected.length == 0) {
    selected=new String[]{valueEditor.getText()};
  }
  for (int i=0; i < selected.length; i++) {
    if (selectedList.indexOf(selected[i]) == -1) {
      selectedList.add(selected[i]);
    }
  }
  filteValues();
}
Program: 79195
Project: 79195
Buggy source:
private void removeAll(){
  selectedList.removeAll();
  updateButtons();
}

Fixed version (ground truth):
private void removeAll(){
  selectedList.removeAll();
  filteValues();
}
Program: 79196
Project: 79196
Buggy source:
private void addAll(){
  String[] values=valueList.getItems();
  for (int i=0; i < values.length; i++) {
    if (selectedList.indexOf(values[i]) == -1) {
      selectedList.add(values[i]);
    }
  }
  updateButtons();
}

Fixed version (ground truth):
private void addAll(){
  String[] values=valueList.getItems();
  for (int i=0; i < values.length; i++) {
    if (selectedList.indexOf(values[i]) == -1) {
      selectedList.add(values[i]);
    }
  }
  filteValues();
}
Program: 79197
Project: 79197
Buggy source:
private void filteValues(){
  valueList.removeAll();
  valueList.deselectAll();
  for (Iterator itor=resultList.iterator(); itor.hasNext(); ) {
    String value=(String)itor.next();
    try {
      if (value.startsWith(valueEditor.getText()) || value.matches(valueEditor.getText())) {
        valueList.add(value);
      }
    }
 catch (    PatternSyntaxException e) {
    }
  }
  updateButtons();
}

Fixed version (ground truth):
private void filteValues(){
  valueList.removeAll();
  valueList.deselectAll();
  for (Iterator itor=resultList.iterator(); itor.hasNext(); ) {
    String value=(String)itor.next();
    try {
      if (selectedList.indexOf(value) == -1 && value.startsWith(valueEditor.getText()) || value.matches(valueEditor.getText())) {
        valueList.add(value);
      }
    }
 catch (    PatternSyntaxException e) {
    }
  }
  updateButtons();
}
Program: 79198
Project: 79198
Buggy source:
/** 
 * load report item query extension definitions 
 */
protected void loadQueryExtensionDefns(){
  IExtensionRegistry registry=Platform.getExtensionRegistry();
  IExtensionPoint extPoint=registry.getExtensionPoint(EXTENSION_POINT_QUERY);
  if (extPoint == null)   return;
  IExtension[] exts=extPoint.getExtensions();
  for (int i=0; i < exts.length; i++) {
    IConfigurationElement[] configs=exts[i].getConfigurationElements();
    for (int j=0; j < configs.length; j++) {
      String itemName=configs[j].getAttribute("String_Node_Str");
      queryExtensions.put(itemName,configs[i]);
    }
  }
}

Fixed version (ground truth):
/** 
 * load report item query extension definitions 
 */
protected void loadQueryExtensionDefns(){
  IExtensionRegistry registry=Platform.getExtensionRegistry();
  IExtensionPoint extPoint=registry.getExtensionPoint(EXTENSION_POINT_QUERY);
  if (extPoint == null)   return;
  IExtension[] exts=extPoint.getExtensions();
  for (int i=0; i < exts.length; i++) {
    IConfigurationElement[] configs=exts[i].getConfigurationElements();
    for (int j=0; j < configs.length; j++) {
      String itemName=configs[j].getAttribute("String_Node_Str");
      queryExtensions.put(itemName,configs[j]);
    }
  }
}
Program: 79199
Project: 79199
Buggy source:
/** 
 * load report item presentation extension definitions 
 */
protected void loadPresentationExtensionDefns(){
  IExtensionRegistry registry=Platform.getExtensionRegistry();
  IExtensionPoint extPoint=registry.getExtensionPoint(EXTENSION_POINT_PRESENTATION);
  if (extPoint == null)   return;
  IExtension[] exts=extPoint.getExtensions();
  for (int i=0; i < exts.length; i++) {
    IConfigurationElement[] configs=exts[i].getConfigurationElements();
    for (int j=0; j < configs.length; j++) {
      String itemName=configs[j].getAttribute("String_Node_Str");
      presentationExtensions.put(itemName,configs[i]);
    }
  }
}

Fixed version (ground truth):
/** 
 * load report item presentation extension definitions 
 */
protected void loadPresentationExtensionDefns(){
  IExtensionRegistry registry=Platform.getExtensionRegistry();
  IExtensionPoint extPoint=registry.getExtensionPoint(EXTENSION_POINT_PRESENTATION);
  if (extPoint == null)   return;
  IExtension[] exts=extPoint.getExtensions();
  for (int i=0; i < exts.length; i++) {
    IConfigurationElement[] configs=exts[i].getConfigurationElements();
    for (int j=0; j < configs.length; j++) {
      String itemName=configs[j].getAttribute("String_Node_Str");
      presentationExtensions.put(itemName,configs[j]);
    }
  }
}