nus-yam/ex-repair huggingface dataset:
Program: 77839
Project: 77839
Buggy source:
protected void prepareResponse() throws ReportServiceException, RemoteException {
  TOC toc=new TOC();
  List children=__node.getChildren();
  if (children != null && children.size() > 0) {
    TOC[] childTOCNodes=new TOC[children.size()];
    for (int i=0; i < children.size(); i++) {
      ToC child=(ToC)children.get(i);
      childTOCNodes[i]=new TOC();
      childTOCNodes[i].setId(child.getID());
      childTOCNodes[i].setDisplayName(ParameterAccessor.htmlEncode(child.getDisplayName()));
      childTOCNodes[i].setBookmark(child.getBookmark());
      childTOCNodes[i].setIsLeaf(new Boolean(child.getChildren() == null || child.getChildren().size() <= 0));
    }
    toc.setChild(childTOCNodes);
  }
  Data data=new Data();
  data.setTOC(toc);
  UpdateData updateData=new UpdateData();
  updateData.setTarget("String_Node_Str");
  updateData.setData(data);
  Update update=new Update();
  update.setUpdateData(updateData);
  response.setUpdate(new Update[]{update});
}

Fixed version (ground truth):
protected void prepareResponse() throws ReportServiceException, RemoteException {
  TOC toc=new TOC();
  List children=__node.getChildren();
  if (children != null && children.size() > 0) {
    TOC[] childTOCNodes=new TOC[children.size()];
    for (int i=0; i < children.size(); i++) {
      ToC child=(ToC)children.get(i);
      childTOCNodes[i]=new TOC();
      childTOCNodes[i].setId(child.getID());
      childTOCNodes[i].setDisplayName(child.getDisplayName());
      childTOCNodes[i].setBookmark(child.getBookmark());
      childTOCNodes[i].setIsLeaf(new Boolean(child.getChildren() == null || child.getChildren().size() <= 0));
    }
    toc.setChild(childTOCNodes);
  }
  Data data=new Data();
  data.setTOC(toc);
  UpdateData updateData=new UpdateData();
  updateData.setTarget("String_Node_Str");
  updateData.setData(data);
  Update update=new Update();
  update.setUpdateData(updateData);
  response.setUpdate(new Update[]{update});
}
Program: 77840
Project: 77840
Buggy source:
public void startElement(String uri,String name,String qName,Attributes atts){
  if (this.stopCurrentThread)   throw new ThreadStopException();
  String elementName=getElementName(uri,qName,name);
  String parentPath=pathHolder.getPath();
  if (this.currentElementRecoder.get(parentPath + UtilConstants.XPATH_SLASH + elementName) == null) {
    this.currentElementRecoder.put(parentPath + UtilConstants.XPATH_SLASH + elementName,new Integer(1));
  }
 else {
    this.currentElementRecoder.put(parentPath + UtilConstants.XPATH_SLASH + elementName,new Integer(((Integer)this.currentElementRecoder.get(parentPath + UtilConstants.XPATH_SLASH + elementName)).intValue() + 1));
  }
  pathHolder.push(elementName + "String_Node_Str" + ((Integer)this.currentElementRecoder.get(parentPath + UtilConstants.XPATH_SLASH + elementName)).intValue()+ "String_Node_Str");
  spConsumer.detectNewRow(pathHolder.getPath(),true);
  for (int i=0; i < atts.getLength(); i++) {
    spConsumer.manipulateData(getAttributePath(atts,i),atts.getValue(i));
  }
}

Fixed version (ground truth):
public void startElement(String uri,String name,String qName,Attributes atts){
  if (this.stopCurrentThread)   throw new ThreadStopException();
  String elementName=getElementName(uri,qName,name);
  String parentPath=pathHolder.getPath();
  if (this.currentElementRecoder.get(parentPath + UtilConstants.XPATH_SLASH + elementName) == null) {
    this.currentElementRecoder.put(parentPath + UtilConstants.XPATH_SLASH + elementName,new Integer(1));
  }
 else {
    this.currentElementRecoder.put(parentPath + UtilConstants.XPATH_SLASH + elementName,new Integer(((Integer)this.currentElementRecoder.get(parentPath + UtilConstants.XPATH_SLASH + elementName)).intValue() + 1));
  }
  pathHolder.push(elementName + "String_Node_Str" + ((Integer)this.currentElementRecoder.get(parentPath + UtilConstants.XPATH_SLASH + elementName)).intValue()+ "String_Node_Str");
  spConsumer.detectNewRow(pathHolder.getPath(),true);
  for (int i=0; i < atts.getLength(); i++) {
    spConsumer.manipulateData(getAttributePath(atts,i),atts.getValue(i));
    spConsumer.detectNewRow(getAttributePath(atts,i),true);
  }
}
Program: 77841
Project: 77841
Buggy source:
public void manipulateData(String path,String value){
  String treamedPath=path.replaceAll("String_Node_Str","String_Node_Str").trim();
  this.insertNode(treamedPath);
}

Fixed version (ground truth):
public void manipulateData(String path,String value){
}
Program: 77842
Project: 77842
Buggy source:
/** 
 * Boolean -> BigDecimal true 	-> 1 others 	-> 0  Date -> BigDecimal Date.getTime(); String -> BigDecimal new BigDecimal(String);
 * @param source
 * @return
 * @throws BirtException
 */
public static BigDecimal toBigDecimal(Object source) throws BirtException {
  if (source == null)   return null;
  if (source instanceof Integer) {
    String str=((Integer)source).toString();
    return new BigDecimal(str);
  }
 else   if (source instanceof BigDecimal) {
    return (BigDecimal)source;
  }
 else   if (source instanceof Boolean) {
    if (true == ((Boolean)source).booleanValue())     return new BigDecimal(1d);
    return new BigDecimal(0d);
  }
 else   if (source instanceof Date) {
    long longValue=((Date)source).getTime();
    return new BigDecimal(longValue);
  }
 else   if (source instanceof Double) {
    double doubleValue=((Double)source).doubleValue();
    return new BigDecimal(doubleValue);
  }
 else   if (source instanceof String) {
    try {
      return new BigDecimal((String)source);
    }
 catch (    NumberFormatException e) {
      throw new BirtException(pluginId,ResourceConstants.CONVERT_FAILS,new Object[]{source.toString(),"String_Node_Str"},resourceBundle);
    }
  }
 else {
    throw new BirtException(pluginId,ResourceConstants.CONVERT_FAILS,new Object[]{source.toString(),"String_Node_Str"},resourceBundle);
  }
}

Fixed version (ground truth):
/** 
 * Boolean -> BigDecimal true 	-> 1 others 	-> 0  Date -> BigDecimal Date.getTime(); String -> BigDecimal new BigDecimal(String);
 * @param source
 * @return
 * @throws BirtException
 */
public static BigDecimal toBigDecimal(Object source) throws BirtException {
  if (source == null)   return null;
  if (source instanceof Integer) {
    String str=((Integer)source).toString();
    return new BigDecimal(str);
  }
 else   if (source instanceof BigDecimal) {
    return (BigDecimal)source;
  }
 else   if (source instanceof Boolean) {
    if (true == ((Boolean)source).booleanValue())     return new BigDecimal(1d);
    return new BigDecimal(0d);
  }
 else   if (source instanceof Date) {
    long longValue=((Date)source).getTime();
    return new BigDecimal(longValue);
  }
 else   if (source instanceof Double) {
    Double d2=(Double)source;
    if (d2.isNaN() || d2.isInfinite()) {
      throw new BirtException(pluginId,ResourceConstants.CONVERT_FAILS,new Object[]{d2.isNaN() ? "String_Node_Str" : "String_Node_Str","String_Node_Str"},resourceBundle);
    }
    return new BigDecimal(d2.doubleValue());
  }
 else   if (source instanceof String) {
    try {
      return new BigDecimal((String)source);
    }
 catch (    NumberFormatException e) {
      throw new BirtException(pluginId,ResourceConstants.CONVERT_FAILS,new Object[]{source.toString(),"String_Node_Str"},resourceBundle);
    }
  }
 else {
    throw new BirtException(pluginId,ResourceConstants.CONVERT_FAILS,new Object[]{source.toString(),"String_Node_Str"},resourceBundle);
  }
}
Program: 77843
Project: 77843
Buggy source:
/** 
 * put sqlText to char array
 * @param sqlTxt
 * @param escaper
 * @return
 * @throws OdaException
 */
private char[] getParameterDefinitionChars(String sqlTxt,char escaper) throws OdaException {
  char[] temp=sqlTxt.toCharArray();
  int startPoint=-1;
  int endPoint=-1;
  boolean validBracket=true;
  for (int i=temp.length - 1; i >= 0; i--) {
    if (i > 0 && temp[i - 1] == escaper)     continue;
    if (validBracket) {
      if (')' == temp[i] && endPoint == -1) {
        endPoint=i;
      }
      if ('(' == temp[i]) {
        startPoint=i;
        break;
      }
    }
    if ('"' == temp[i]) {
      validBracket=!validBracket;
    }
  }
  if (startPoint >= endPoint || startPoint == -1)   throw new OdaException("String_Node_Str");
  return sqlTxt.substring(startPoint,endPoint).toCharArray();
}

Fixed version (ground truth):
/** 
 * put sqlText to char array
 * @param sqlTxt
 * @param escaper
 * @return
 * @throws OdaException
 */
private char[] getParameterDefinitionChars(String sqlTxt,char escaper) throws OdaException {
  char[] temp=sqlTxt.toCharArray();
  int startPoint=-1;
  int endPoint=-1;
  boolean validBracket=true;
  for (int i=temp.length - 1; i >= 0; i--) {
    if (i > 0 && temp[i - 1] == escaper)     continue;
    if (validBracket) {
      if (')' == temp[i] && endPoint == -1) {
        endPoint=i;
      }
      if ('(' == temp[i]) {
        startPoint=i;
        break;
      }
    }
    if ('"' == temp[i]) {
      validBracket=!validBracket;
    }
  }
  if (startPoint == -1 && endPoint == -1)   return new char[0];
 else   if (startPoint >= endPoint || startPoint == -1)   throw new OdaException("String_Node_Str");
  return sqlTxt.substring(startPoint,endPoint).toCharArray();
}
Program: 77844
Project: 77844
Buggy source:
/** 
 * Indicate whether a new row should started according to the given xPath expression. A new row would only started when the given xPath matches the root path of certain table.
 * @param path
 */
public void detectNewRow(String path);

Fixed version (ground truth):
/** 
 * Indicate whether a new row should started according to the given xPath expression. A new row would only started when the given xPath matches the root path of certain table.
 * @param path
 * @param start
 */
public void detectNewRow(String path,boolean start);
Program: 77845
Project: 77845
Buggy source:
/** 
 * @param index
 * @param name
 * @param type
 * @param path
 * @param originalPath
 * @throws OdaException
 */
public ColumnInfo(int index,String name,String type,String rootPath,String relativePath,String originalPath) throws OdaException {
  this.index=index;
  this.name=name;
  this.type=type;
  if (!DataTypes.isValidType(type))   throw new OdaException(Messages.getString("String_Node_Str"));
  this.path=fixTrailingAttr(SaxParserUtil.processParentAxis(combineColumnPath(rootPath,relativePath)));
  this.originalPath=originalPath;
  generateBackRefNumber(rootPath,originalPath);
}

Fixed version (ground truth):
/** 
 * @param index
 * @param name
 * @param type
 * @param path
 * @param originalPath
 * @throws OdaException
 */
public ColumnInfo(int index,String name,String type,String rootPath,String relativePath,String originalPath) throws OdaException {
  this.index=index;
  this.name=name;
  this.type=type;
  if (!DataTypes.isValidType(type))   throw new OdaException(Messages.getString("String_Node_Str"));
  this.path=fixTrailingAttr(SaxParserUtil.processParentAxis(combineColumnPath(rootPath,relativePath)));
  this.originalPath=originalPath;
  this.initBackAndForwardRefNumbers();
}
Program: 77846
Project: 77846
Buggy source:
/** 
 * @param originalPath
 */
private void generateBackRefNumber(String rootPath,String originalPath){
  if (this.originalPath.matches("String_Node_Str")) {
    String[] originalPathFrags=originalPath.split(UtilConstants.XPATH_SLASH);
    int lastTwoDotAbbrevationPosition=0;
    int numberOfConcretePathFragsBefore2DotAbb=0;
    for (int i=0; i < originalPathFrags.length; i++) {
      if (originalPathFrags[i].equals("String_Node_Str"))       lastTwoDotAbbrevationPosition=i;
    }
    for (int i=0; i < lastTwoDotAbbrevationPosition; i++) {
      if (!originalPathFrags[i].equals("String_Node_Str"))       numberOfConcretePathFragsBefore2DotAbb++;
    }
    int numberOf2DotAbb=lastTwoDotAbbrevationPosition - numberOfConcretePathFragsBefore2DotAbb + 1;
    backRefNumber=numberOf2DotAbb - numberOfConcretePathFragsBefore2DotAbb;
    if (backRefNumber < 0) {
      backRefNumber=0;
      return;
    }
  }
 else {
    backRefNumber=0;
  }
}

Fixed version (ground truth):
/** 
 * @param originalPath
 */
private void generateBackRefNumber(String originalPath){
  if (this.originalPath.matches("String_Node_Str")) {
    String[] originalPathFrags=originalPath.split(UtilConstants.XPATH_SLASH);
    int lastTwoDotAbbrevationPosition=0;
    int numberOfConcretePathFragsBefore2DotAbb=0;
    for (int i=0; i < originalPathFrags.length; i++) {
      if (originalPathFrags[i].equals("String_Node_Str"))       lastTwoDotAbbrevationPosition=i;
    }
    for (int i=0; i < lastTwoDotAbbrevationPosition; i++) {
      if (!originalPathFrags[i].equals("String_Node_Str"))       numberOfConcretePathFragsBefore2DotAbb++;
    }
    int numberOf2DotAbb=lastTwoDotAbbrevationPosition - numberOfConcretePathFragsBefore2DotAbb + 1;
    backRefNumber=numberOf2DotAbb - numberOfConcretePathFragsBefore2DotAbb;
    if (backRefNumber < 0) {
      backRefNumber=0;
      return;
    }
  }
 else {
    backRefNumber=0;
  }
}
Program: 77847
Project: 77847
Buggy source:
public void startElement(String uri,String name,String qName,Attributes atts){
  if (this.stopCurrentThread)   throw new ThreadStopException();
  String elementName=getElementName(uri,qName,name);
  String parentPath=pathHolder.getPath();
  if (this.currentElementRecoder.get(parentPath + UtilConstants.XPATH_SLASH + elementName) == null) {
    this.currentElementRecoder.put(parentPath + UtilConstants.XPATH_SLASH + elementName,new Integer(1));
  }
 else {
    this.currentElementRecoder.put(parentPath + UtilConstants.XPATH_SLASH + elementName,new Integer(((Integer)this.currentElementRecoder.get(parentPath + UtilConstants.XPATH_SLASH + elementName)).intValue() + 1));
  }
  pathHolder.push(elementName + "String_Node_Str" + ((Integer)this.currentElementRecoder.get(parentPath + UtilConstants.XPATH_SLASH + elementName)).intValue()+ "String_Node_Str");
  for (int i=0; i < atts.getLength(); i++) {
    spConsumer.manipulateData(getAttributePath(atts,i),atts.getValue(i));
    spConsumer.detectNewRow(getAttributePath(atts,i));
  }
}

Fixed version (ground truth):
public void startElement(String uri,String name,String qName,Attributes atts){
  if (this.stopCurrentThread)   throw new ThreadStopException();
  String elementName=getElementName(uri,qName,name);
  String parentPath=pathHolder.getPath();
  if (this.currentElementRecoder.get(parentPath + UtilConstants.XPATH_SLASH + elementName) == null) {
    this.currentElementRecoder.put(parentPath + UtilConstants.XPATH_SLASH + elementName,new Integer(1));
  }
 else {
    this.currentElementRecoder.put(parentPath + UtilConstants.XPATH_SLASH + elementName,new Integer(((Integer)this.currentElementRecoder.get(parentPath + UtilConstants.XPATH_SLASH + elementName)).intValue() + 1));
  }
  pathHolder.push(elementName + "String_Node_Str" + ((Integer)this.currentElementRecoder.get(parentPath + UtilConstants.XPATH_SLASH + elementName)).intValue()+ "String_Node_Str");
  spConsumer.detectNewRow(pathHolder.getPath(),true);
  for (int i=0; i < atts.getLength(); i++) {
    spConsumer.manipulateData(getAttributePath(atts,i),atts.getValue(i));
  }
}
Program: 77848
Project: 77848
Buggy source:
public void endElement(String uri,String localName,String qName) throws SAXException {
  spConsumer.manipulateData(pathHolder.getPath(),this.currentCacheValue.trim());
  this.currentCacheValue="String_Node_Str";
  spConsumer.detectNewRow(pathHolder.getPath());
  String path=pathHolder.getPath();
  Object[] keys=this.currentElementRecoder.keySet().toArray();
  for (int i=0; i < keys.length && path != "String_Node_Str"; i++) {
    if (keys[i].toString().startsWith(path) && (!keys[i].toString().equals(path))) {
      this.currentElementRecoder.remove(keys[i]);
    }
  }
  pathHolder.pop();
}

Fixed version (ground truth):
public void endElement(String uri,String localName,String qName) throws SAXException {
  spConsumer.manipulateData(pathHolder.getPath(),this.currentCacheValue.trim());
  this.currentCacheValue="String_Node_Str";
  spConsumer.detectNewRow(pathHolder.getPath(),false);
  String path=pathHolder.getPath();
  Object[] keys=this.currentElementRecoder.keySet().toArray();
  for (int i=0; i < keys.length && path != "String_Node_Str"; i++) {
    if (keys[i].toString().startsWith(path) && (!keys[i].toString().equals(path))) {
      this.currentElementRecoder.remove(keys[i]);
    }
  }
  pathHolder.pop();
}
Program: 77849
Project: 77849
Buggy source:
/** 
 * The method would not be used in this implementation of ISaxParserConsumer.
 */
public void detectNewRow(String path){
}

Fixed version (ground truth):
/** 
 * The method would not be used in this implementation of ISaxParserConsumer.
 */
public void detectNewRow(String path,boolean start){
}
Program: 77850
Project: 77850
Buggy source:
/** 
 * Return a dataSetRow expression text according to given row name.
 * @param rowName
 * @return
 */
public static String createDataSetRowExpression(String rowName){
  return DATASET_ROW_INDICATOR + "String_Node_Str" + (rowName == null ? null : rowName.trim())+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Return a dataSetRow expression text according to given row name.
 * @param rowName
 * @return
 */
public static String createDataSetRowExpression(String rowName){
  return DATASET_ROW_INDICATOR + "String_Node_Str" + (rowName == null ? "String_Node_Str" : rowName.trim())+ "String_Node_Str";
}
Program: 77851
Project: 77851
Buggy source:
/** 
 * Creates the page menu
 * @return the page menu
 */
protected IMenuManager createPageMenu(){
  MenuManager newMenu=new MenuManager(Messages.getString("String_Node_Str"),"String_Node_Str");
  newMenu.add(new Separator(PAGE_SET_GROUP));
  newMenu.add(new Separator(PAGE_SET_GROUP_END));
  newMenu.add(getAction(GEFActionConstants.ZOOM_IN));
  newMenu.add(getAction(GEFActionConstants.ZOOM_OUT));
  newMenu.add(new Separator());
  return newMenu;
}

Fixed version (ground truth):
/** 
 * Creates the page menu
 * @return the page menu
 */
protected IMenuManager createPageMenu(){
  MenuManager newMenu=new MenuManager(Messages.getString("String_Node_Str"),"String_Node_Str");
  newMenu.add(new Separator(PAGE_SET_GROUP));
  newMenu.add(new Separator(PAGE_SET_GROUP_END));
  newMenu.add(new Separator());
  return newMenu;
}
Program: 77852
Project: 77852
Buggy source:
/** 
 * Compile the filter expression. If the filter contains the indirect nested row reference, this is, it refers to the row object in computed columns, then replace the field of expression and recompile the filter expression
 * @param filterState
 * @param computedColumns
 * @throws DataException
 */
public void compileFilter(List filterState,IComputedColumnsState computedColumns);

Fixed version (ground truth):
/** 
 * Compile the filter expression. If the filter contains the indirect nested row reference, this is, it refers to the row object in computed columns, then replace the field of expression and recompile the filter expression
 * @param filterState
 * @param computedColumns
 * @throws DataException
 */
public void compileFilter(List filterState,IComputedColumnsState computedColumns) throws DataException ;
Program: 77853
Project: 77853
Buggy source:
public void compileFilter(List filters,IComputedColumnsState computedColumns){
}

Fixed version (ground truth):
public void compileFilter(List filters,IComputedColumnsState computedColumns) throws DataException {
  IBaseExpression baseExpression=null;
  String expression="String_Node_Str";
  IScriptExpression operator=null;
  FilterExpressionParser parser=new FilterExpressionParser(metaData,computedColumns);
  parser.setDataSetMode(this.isDataSetMode);
  parser.setResultSetPopulator(this.rsPopulator);
  for (int i=0; i < filters.size(); i++) {
    try {
      baseExpression=((FilterDefinition)filters.get(i)).getExpression();
      if (baseExpression instanceof IConditionalExpression) {
        IConditionalExpression condition=(IConditionalExpression)baseExpression;
        operator=condition.getExpression();
        if (operator != null) {
          expression=operator.getText();
          operator.setHandle(parser.compileFilterExpression(expression));
        }
        operator=condition.getOperand1();
        if (operator != null) {
          expression=operator.getText();
          operator.setHandle(parser.compileFilterExpression(expression));
        }
        operator=condition.getOperand2();
        if (operator != null) {
          expression=operator.getText();
          operator.setHandle(parser.compileFilterExpression(expression));
        }
      }
 else       if (baseExpression instanceof IScriptExpression) {
        operator=(IScriptExpression)baseExpression;
        if (baseExpression != null && operator != null) {
          expression=operator.getText();
          baseExpression.setHandle(parser.compileFilterExpression(expression));
        }
      }
 else {
        throw new DataException(ResourceConstants.INVALID_EXPRESSION_IN_FILTER);
      }
    }
 catch (    DataException e) {
      DataException dataException=new DataException(ResourceConstants.INVALID_EXPRESSION_IN_FILTER,e,new Object[]{expression});
      throw dataException;
    }
  }
}
Program: 77854
Project: 77854
Buggy source:
/** 
 * @param key
 * @param checkBox
 */
protected void checkBoxChange(Button checkBox,String key){
  dirtyProperties.put(key,new Boolean(checkBox.getSelection()));
  if (CHECKBOX_ALLOW_BLANK.equals(key) || CHECKBOX_ALLOW_NULL.equals(key)) {
    if (isStatic()) {
      refreshValueTable();
    }
    updateMessageLine();
  }
}

Fixed version (ground truth):
/** 
 * @param key
 * @param checkBox
 */
protected void checkBoxChange(Button checkBox,String key){
  dirtyProperties.put(key,new Boolean(checkBox.getSelection()));
  if (CHECKBOX_ALLOW_BLANK.equals(key) || CHECKBOX_ALLOW_NULL.equals(key)) {
    if (isStatic()) {
      makeUniqueAndValid();
      refreshValueTable();
    }
    updateMessageLine();
  }
}
Program: 77855
Project: 77855
Buggy source:
/** 
 * Check if the specified value is valid
 * @param value the value to check
 * @return Returns the error message if the input value is invalid,or nullif it is valid
 */
private String isValidValue(String value){
  if (canBeNull()) {
    if (value == null || value.length() == 0) {
      return null;
    }
  }
 else {
    if (value == null || value.length() == 0) {
      return ERROR_MSG_CANNOT_BE_NULL;
    }
  }
  if (canBeBlank()) {
    if (StringUtil.isBlank(value)) {
      return null;
    }
  }
 else {
    if (StringUtil.isBlank(value)) {
      return ERROR_MSG_CANNOT_BE_BLANK;
    }
  }
  try {
    if (DesignChoiceConstants.PARAM_TYPE_BOOLEAN.equals(getSelectedDataType())) {
      DataTypeUtil.toBoolean(value);
    }
 else     if (DesignChoiceConstants.PARAM_TYPE_DECIMAL.equals(getSelectedDataType())) {
      DataTypeUtil.toBigDecimal(value);
    }
 else     if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equals(getSelectedDataType())) {
      DataTypeUtil.toDate(value,ULocale.US);
    }
 else     if (DesignChoiceConstants.PARAM_TYPE_FLOAT.equals(getSelectedDataType())) {
      DataTypeUtil.toDouble(value);
    }
  }
 catch (  BirtException e) {
    return ERROR_MSG_MISMATCH_DATA_TYPE;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Check if the specified value is valid
 * @param value the value to check
 * @return Returns the error message if the input value is invalid,or nullif it is valid
 */
private String isValidValue(String value){
  if (canBeNull()) {
    if (value == null || value.length() == 0) {
      return null;
    }
  }
 else {
    if (value == null || value.length() == 0) {
      return ERROR_MSG_CANNOT_BE_NULL;
    }
  }
  if (canBeBlank()) {
    if (StringUtil.isBlank(value)) {
      return null;
    }
  }
 else {
    if (StringUtil.isBlank(value)) {
      return ERROR_MSG_CANNOT_BE_BLANK;
    }
  }
  try {
    getValue(value);
  }
 catch (  BirtException e) {
    return ERROR_MSG_MISMATCH_DATA_TYPE;
  }
  return null;
}
Program: 77856
Project: 77856
Buggy source:
private boolean containValue(SelectionChoice selectedChoice,String newValue,String property){
  for (Iterator iter=choiceList.iterator(); iter.hasNext(); ) {
    SelectionChoice choice=(SelectionChoice)iter.next();
    if (!choice.equals(selectedChoice)) {
      String value=null;
      if (COLUMN_VALUE.equals(property)) {
        value=choice.getValue();
      }
 else       if (COLUMN_DISPLAY_TEXT.equals(property)) {
        value=choice.getLabel();
        if (value == null) {
          value=choice.getValue();
        }
        if (value == null) {
          value=LABEL_NULL;
        }
      }
      if (!(value == null ^ newValue == null)) {
        if (newValue == null) {
          return true;
        }
        if (DesignChoiceConstants.PARAM_TYPE_DECIMAL.equals(getSelectedDataType())) {
          try {
            if (DataTypeUtil.toBigDecimal(value).compareTo(DataTypeUtil.toBigDecimal(newValue)) == 0) {
              return true;
            }
          }
 catch (          BirtException e) {
          }
        }
 else         if (DesignChoiceConstants.PARAM_TYPE_FLOAT.equals(getSelectedDataType())) {
          try {
            if (DataTypeUtil.toDouble(value).compareTo(DataTypeUtil.toDouble(newValue)) == 0) {
              return true;
            }
          }
 catch (          BirtException e) {
          }
        }
 else {
          if (value.equals(newValue)) {
            return true;
          }
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean containValue(SelectionChoice selectedChoice,String newValue,String property){
  for (Iterator iter=choiceList.iterator(); iter.hasNext(); ) {
    SelectionChoice choice=(SelectionChoice)iter.next();
    if (choice != selectedChoice) {
      String value=null;
      if (COLUMN_VALUE.equals(property)) {
        value=choice.getValue();
      }
 else       if (COLUMN_DISPLAY_TEXT.equals(property)) {
        value=choice.getLabel();
        if (value == null) {
          value=choice.getValue();
        }
        if (value == null) {
          value=LABEL_NULL;
        }
      }
      if (isEqual(value,newValue)) {
        return true;
      }
    }
  }
  return false;
}
Program: 77857
Project: 77857
Buggy source:
public String getColumnText(Object element,int columnIndex){
  SelectionChoice choice=((SelectionChoice)element);
  final int valueIndex=valueTable.getColumnProperties().length - 2;
  String text=null;
  if (valueTable.getColumnProperties().length == 4 && columnIndex == 1) {
    if (isDefaultChoice(choice)) {
      text=FLAG_DEFAULT;
    }
  }
 else   if (columnIndex == valueIndex) {
    if (choice == dummyChoice) {
      text=INPUT_PROPMT;
    }
 else {
      text=choice.getValue();
    }
  }
 else   if (columnIndex == valueIndex + 1) {
    text=choice.getLabel();
    if (text == null) {
      text=format(choice.getValue());
    }
  }
  if (text == null) {
    text="String_Node_Str";
  }
  return text;
}

Fixed version (ground truth):
public String getColumnText(Object element,int columnIndex){
  SelectionChoice choice=((SelectionChoice)element);
  final int valueIndex=valueTable.getColumnProperties().length - 2;
  String text=null;
  if (valueTable.getColumnProperties().length == 4 && columnIndex == 1) {
    if (isDefaultChoice(choice)) {
      text=FLAG_DEFAULT;
    }
  }
 else   if (columnIndex == valueIndex) {
    if (choice == dummyChoice) {
      text=INPUT_PROPMT;
    }
 else {
      text=choice.getValue();
    }
  }
 else   if (columnIndex == valueIndex + 1) {
    if (choice != dummyChoice) {
      text=choice.getLabel();
      if (text == null) {
        text=format(choice.getValue());
      }
    }
  }
  if (text == null) {
    text="String_Node_Str";
  }
  return text;
}
Program: 77858
Project: 77858
Buggy source:
private boolean isDefaultChoice(SelectionChoice choice){
  String choiceValue=choice.getValue();
  String defaultValue=convertToStandardFormat(this.defaultValue);
  return (choice != dummyChoice && ((canBeNull() && choiceValue == null && defaultValue == null) || (choiceValue != null && choiceValue.equals(defaultValue))));
}

Fixed version (ground truth):
private boolean isDefaultChoice(SelectionChoice choice){
  String choiceValue=choice.getValue();
  String defaultValue=convertToStandardFormat(this.defaultValue);
  if (choice != dummyChoice) {
    if (canBeNull() && choiceValue == null && defaultValue == null) {
      return true;
    }
    return choiceValue != null && isEqual(choiceValue,defaultValue);
  }
  return false;
}
Program: 77859
Project: 77859
Buggy source:
public Object getValue(Object element,String property){
  SelectionChoice choice=((SelectionChoice)element);
  if (choice == dummyChoice) {
    return "String_Node_Str";
  }
  String value=null;
  if (COLUMN_VALUE.equals(property)) {
    value=choice.getValue();
  }
 else   if (COLUMN_DISPLAY_TEXT.equals(property)) {
    value=choice.getLabel();
  }
  if (value == null) {
    value="String_Node_Str";
  }
  return value;
}

Fixed version (ground truth):
private Object getValue(String value) throws BirtException {
  if (DesignChoiceConstants.PARAM_TYPE_BOOLEAN.equals(getSelectedDataType())) {
    return DataTypeUtil.toBoolean(value);
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DECIMAL.equals(getSelectedDataType())) {
    return DataTypeUtil.toBigDecimal(value);
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equals(getSelectedDataType())) {
    return DataTypeUtil.toDate(value,ULocale.US);
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_FLOAT.equals(getSelectedDataType())) {
    return DataTypeUtil.toDouble(value);
  }
  return value;
}
Program: 77860
Project: 77860
Buggy source:
/** 
 * @param computedCols
 * @return
 */
private List getRealComputedColumn(List computedCols){
  if (computedCols == null)   return null;
  List list=new ArrayList();
  for (int i=0; i < computedCols.size(); i++) {
    IComputedColumn cc=(IComputedColumn)computedCols.get(0);
    if (cc.getName().matches("String_Node_Str") || cc.getName().matches("String_Node_Str") || cc.getName().matches("String_Node_Str"))     continue;
 else     list.add(cc);
  }
  return list;
}

Fixed version (ground truth):
/** 
 * @param computedCols
 * @return
 */
private List getRealComputedColumn(List computedCols){
  if (computedCols == null)   return null;
  List list=new ArrayList();
  for (int i=0; i < computedCols.size(); i++) {
    IComputedColumn cc=(IComputedColumn)computedCols.get(i);
    if (cc.getName().matches("String_Node_Str") || cc.getName().matches("String_Node_Str") || cc.getName().matches("String_Node_Str"))     continue;
 else     list.add(cc);
  }
  return list;
}
Program: 77861
Project: 77861
Buggy source:
/** 
 * This method returnt <code>true</code> in following condition: <p> 1. The multi selected elements are same type. <p> 2. And the multi selected elements have extends. <p> 3. If any of the given elements has local properties. <p>
 * @return <code>true</code> if the conditions is met.
 */
public final boolean hasLocalPropertiesForExtendedElements(){
  if (!isSameType())   return false;
  if (!isExtendedElements())   return false;
  List elements=getElements();
  for (Iterator iter=elements.iterator(); iter.hasNext(); ) {
    DesignElementHandle elementHandle=(DesignElementHandle)iter.next();
    Iterator propIter=elementHandle.getPropertyIterator();
    while (propIter.hasNext()) {
      PropertyHandle propertyHandle=(PropertyHandle)propIter.next();
      String name=propertyHandle.getDefn().getName();
      if (IDesignElementModel.EXTENDS_PROP.equals(name))       continue;
      if (elementHandle.getElement().getLocalProperty(elementHandle.getModule(),name) != null)       return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * This method returnt <code>true</code> in following condition: <p> 1. The multi selected elements are same type. <p> 2. And the multi selected elements have extends. <p> 3. If any of the given elements has local properties. <p>
 * @return <code>true</code> if the conditions is met.
 */
public final boolean hasLocalPropertiesForExtendedElements(){
  if (!isSameType())   return false;
  if (!allExtendedElements())   return false;
  List elements=getElements();
  for (Iterator iter=elements.iterator(); iter.hasNext(); ) {
    DesignElementHandle elementHandle=(DesignElementHandle)iter.next();
    Iterator propIter=elementHandle.getPropertyIterator();
    while (propIter.hasNext()) {
      PropertyHandle propertyHandle=(PropertyHandle)propIter.next();
      String name=propertyHandle.getDefn().getName();
      if ((IDesignElementModel.NAME_PROP.equals(name)) || (IDesignElementModel.EXTENDS_PROP.equals(name)))       continue;
      if (elementHandle.getElement().getLocalProperty(elementHandle.getModule(),name) != null)       return true;
    }
  }
  return false;
}
Program: 77862
Project: 77862
Buggy source:
public boolean isExtendedElements(){
  if (elements.isEmpty())   return false;
  for (Iterator iter=elements.iterator(); iter.hasNext(); ) {
    Object next=iter.next();
    if (!(next instanceof DesignElementHandle))     return false;
    if (((DesignElementHandle)next).getExtends() == null)     return false;
  }
  return true;
}

Fixed version (ground truth):
public boolean isExtendedElements(){
  if (elements.isEmpty())   return false;
  for (Iterator iter=elements.iterator(); iter.hasNext(); ) {
    Object next=iter.next();
    if (!(next instanceof DesignElementHandle))     return false;
    DesignElementHandle designHandle=(DesignElementHandle)next;
    if (designHandle.getExtends() == null)     return false;
  }
  return true;
}
Program: 77863
Project: 77863
Buggy source:
/** 
 * Removes the parameter binding for the parameter with the given parameter name. The parameter binding is defined in clients of the data set in which this handle exists.
 * @param paramName name of the parameter
 * @throws PropertyValueException if error occurs when removing parameter binding.
 */
private void removeParamBindingsFor(String paramName) throws PropertyValueException {
  if (paramName == null)   return;
  Iterator iter=getElementHandle().clientsIterator();
  while (iter.hasNext()) {
    DesignElementHandle client=(DesignElementHandle)iter.next();
    PropertyHandle paramBindingsPropHandle=client.getPropertyHandle(ReportItem.PARAM_BINDINGS_PROP);
    removeParamBindingFor(paramBindingsPropHandle,paramName);
    PropertyHandle actionPropHandle=client.getPropertyHandle(ImageItem.ACTION_PROP);
    if (actionPropHandle != null) {
      Action action=(Action)actionPropHandle.getValue();
      ActionHandle actionHandle=(ActionHandle)action.getHandle(actionPropHandle);
      MemberHandle paramBindingsMemberHandle=actionHandle.getMember(Action.PARAM_BINDINGS_MEMBER);
      removeParamBindingFor(paramBindingsMemberHandle,paramName);
    }
  }
  PropertyHandle paramBindingsPropHandle=getElementHandle().getPropertyHandle(PARAM_BINDINGS_PROP);
  removeParamBindingFor(paramBindingsPropHandle,paramName);
}

Fixed version (ground truth):
/** 
 * Removes the parameter binding for the parameter with the given parameter name. The parameter binding is defined in clients of the data set in which this handle exists.
 * @param paramName name of the parameter
 * @throws PropertyValueException if error occurs when removing parameter binding.
 */
private void removeParamBindingsFor(String paramName) throws PropertyValueException {
  if (paramName == null)   return;
  Iterator iter=getElementHandle().clientsIterator();
  while (iter.hasNext()) {
    DesignElementHandle client=(DesignElementHandle)iter.next();
    PropertyHandle paramBindingsPropHandle=client.getPropertyHandle(ReportItem.PARAM_BINDINGS_PROP);
    removeParamBindingFor(paramBindingsPropHandle,paramName);
    PropertyHandle actionPropHandle=client.getPropertyHandle(ImageItem.ACTION_PROP);
    if (actionPropHandle != null) {
      Action action=(Action)actionPropHandle.getValue();
      if (action != null) {
        ActionHandle actionHandle=(ActionHandle)action.getHandle(actionPropHandle);
        MemberHandle paramBindingsMemberHandle=actionHandle.getMember(Action.PARAM_BINDINGS_MEMBER);
        removeParamBindingFor(paramBindingsMemberHandle,paramName);
      }
    }
  }
  PropertyHandle paramBindingsPropHandle=getElementHandle().getPropertyHandle(PARAM_BINDINGS_PROP);
  removeParamBindingFor(paramBindingsPropHandle,paramName);
}
Program: 77864
Project: 77864
Buggy source:
/** 
 * Return a dataSetRow expression text according to given row name.
 * @param rowName
 * @return
 */
public static String createDataSetRowExpression(String rowName){
  return DATASET_ROW_INDICATOR + "String_Node_Str" + rowName == null ? null : rowName.trim() + "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Return a dataSetRow expression text according to given row name.
 * @param rowName
 * @return
 */
public static String createDataSetRowExpression(String rowName){
  return DATASET_ROW_INDICATOR + "String_Node_Str" + (rowName == null ? null : rowName.trim())+ "String_Node_Str";
}
Program: 77865
Project: 77865
Buggy source:
/** 
 * TODO Remove it The expression of ComputedColumn with given index.
 * @param index
 * @return
 */
public ScriptExpression getExpression(int index);

Fixed version (ground truth):
/** 
 * TODO Remove it The expression of ComputedColumn with given index.
 * @param index
 * @return
 */
public IBaseExpression getExpression(int index);
Program: 77866
Project: 77866
Buggy source:
/** 
 * Populate the Group filter expression list and its corresponding group level list that being used in IExpressionProcessor.calculate() method.
 * @return
 */
private void populateGroupFilteringExpressions(List expressionList,List groupLevels){
  for (int i=0; i < this.populator.getQuery().getGrouping().length; i++) {
    List groupFilters=this.populator.getQuery().getGrouping()[i].getFilters();
    if (groupFilters == null)     continue;
    for (int j=0; j < groupFilters.size(); j++) {
      expressionList.add(((IFilterDefinition)groupFilters.get(j)).getExpression());
      groupLevels.add(new Integer(i + 1));
    }
  }
}

Fixed version (ground truth):
/** 
 * Populate the Group filter expression list and its corresponding group level list that being used in IExpressionProcessor.calculate() method.
 * @return
 */
private void populateGroupFilteringExpressions(List expressionList,List groupLevels){
  for (int i=0; i < this.populator.getQuery().getGrouping().length; i++) {
    List groupFilters=this.populator.getQuery().getGrouping()[i].getFilters();
    String name=this.populator.getQuery().getGrouping()[i].getName();
    if (groupFilters == null)     continue;
    for (int j=0; j < groupFilters.size(); j++) {
      IBaseExpression expr=((IFilterDefinition)groupFilters.get(j)).getExpression();
      expr.setGroupName(name);
      expressionList.add(expr);
      groupLevels.add(new Integer(i + 1));
    }
  }
}
Program: 77867
Project: 77867
Buggy source:
/** 
 * @param expressionList
 * @param groupLevels
 */
void populateGroupSortExpressions(List expressionList,List groupLevels){
  for (int i=0; i < this.populator.getQuery().getGrouping().length; i++) {
    List groupSorts=this.populator.getQuery().getGrouping()[i].getSorts();
    if (groupSorts == null)     continue;
    for (int j=0; j < groupSorts.size(); j++) {
      expressionList.add(((ISortDefinition)groupSorts.get(j)).getExpression());
      groupLevels.add(new Integer(i + 1));
    }
  }
}

Fixed version (ground truth):
/** 
 * @param expressionList
 * @param groupLevels
 */
void populateGroupSortExpressions(List expressionList,List groupLevels){
  for (int i=0; i < this.populator.getQuery().getGrouping().length; i++) {
    List groupSorts=this.populator.getQuery().getGrouping()[i].getSorts();
    String name=this.populator.getQuery().getGrouping()[i].getName();
    if (groupSorts == null)     continue;
    for (int j=0; j < groupSorts.size(); j++) {
      IBaseExpression expr=((ISortDefinition)groupSorts.get(j)).getExpression();
      expr.setGroupName(name);
      expressionList.add(expr);
      groupLevels.add(new Integer(i + 1));
    }
  }
}
Program: 77868
Project: 77868
Buggy source:
/** 
 * Set the value for the cached data set information.
 * @param metadata a structure value include output column information , input/output parameter definitions.
 * @return <code>CachedMetaDataHandle</code> to the input<code>metadata</code>, return <code>null</code> if <code>metadata</code> is <code>null</code>.
 * @throws SemanticException the input data is not valid.
 */
public CachedMetaDataHandle setCachedMetaData(CachedMetaData metadata) throws SemanticException {
  setProperty(SimpleDataSet.CACHED_METADATA_PROP,metadata);
  if (metadata == null)   return null;
  return (CachedMetaDataHandle)metadata.getHandle(getPropertyHandle(SimpleDataSet.CACHED_METADATA_PROP));
}

Fixed version (ground truth):
/** 
 * Set the value for the cached data set information.
 * @param metadata a structure value include output column information , input/output parameter definitions.
 * @return <code>CachedMetaDataHandle</code> to the input<code>metadata</code>, return <code>null</code> if <code>metadata</code> is <code>null</code>.
 * @throws SemanticException the input data is not valid.
 */
public CachedMetaDataHandle setCachedMetaData(CachedMetaData metadata) throws SemanticException {
  setProperty(CACHED_METADATA_PROP,metadata);
  if (metadata == null)   return null;
  return (CachedMetaDataHandle)metadata.getHandle(getPropertyHandle(CACHED_METADATA_PROP));
}
Program: 77869
Project: 77869
Buggy source:
/** 
 * @param inputStream
 * @param cacheProvider
 * @throws DataException
 */
RDGroupUtil(InputStream inputStream) throws DataException {
  this(inputStream,null);
}

Fixed version (ground truth):
/** 
 * @param inputStream
 * @param cacheProvider
 * @throws DataException
 */
public RDGroupUtil(InputStream inputStream) throws DataException {
  this(inputStream,null);
}
Program: 77870
Project: 77870
Buggy source:
protected IViewerReportDesignHandle getDesignHandle(HttpServletRequest request){
  IViewerReportDesignHandle design=null;
  IReportRunnable reportRunnable=null;
  IReportDocument reportDocumentInstance=ReportEngineService.getInstance().openReportDocument(this.reportDesignName,this.reportDocumentName);
  if (reportDocumentInstance != null) {
    reportRunnable=reportDocumentInstance.getReportRunnable();
    if (IBirtConstants.SERVLET_PATH_FRAMESET.equalsIgnoreCase(request.getServletPath())) {
      this.parameterMap=reportDocumentInstance.getParameterValues();
    }
    reportDocumentInstance.close();
  }
  if (reportRunnable == null) {
    try {
      File file=new File(this.reportDesignName);
      if (file.exists()) {
        reportRunnable=ReportEngineService.getInstance().openReportDesign(this.reportDesignName);
      }
 else {
        this.reportDesignName=ParameterAccessor.getParameter(request,ParameterAccessor.PARAM_REPORT);
        InputStream is=request.getSession().getServletContext().getResourceAsStream(this.reportDesignName);
        reportRunnable=ReportEngineService.getInstance().openReportDesign(is);
      }
    }
 catch (    EngineException e) {
      this.exception=e;
    }
  }
  if (reportRunnable != null) {
    design=new BirtViewerReportDesignHandle(IViewerReportDesignHandle.RPT_RUNNABLE_OBJECT,reportRunnable);
  }
 else {
    design=new BirtViewerReportDesignHandle(null,reportDesignName);
  }
  return design;
}

Fixed version (ground truth):
protected IViewerReportDesignHandle getDesignHandle(HttpServletRequest request){
  IViewerReportDesignHandle design=null;
  IReportRunnable reportRunnable=null;
  IReportDocument reportDocumentInstance=ReportEngineService.getInstance().openReportDocument(this.reportDesignName,this.reportDocumentName);
  if (reportDocumentInstance != null) {
    reportRunnable=reportDocumentInstance.getReportRunnable();
    if (IBirtConstants.SERVLET_PATH_FRAMESET.equalsIgnoreCase(request.getServletPath())) {
      this.parameterMap=reportDocumentInstance.getParameterValues();
    }
    reportDocumentInstance.close();
  }
  if (reportRunnable == null) {
    try {
      File file=new File(this.reportDesignName);
      if (file.exists()) {
        reportRunnable=ReportEngineService.getInstance().openReportDesign(this.reportDesignName);
      }
 else       if (!ParameterAccessor.isWorkingFolderAccessOnly()) {
        this.reportDesignName=ParameterAccessor.getParameter(request,ParameterAccessor.PARAM_REPORT);
        InputStream is=request.getSession().getServletContext().getResourceAsStream(this.reportDesignName);
        reportRunnable=ReportEngineService.getInstance().openReportDesign(is);
      }
    }
 catch (    EngineException e) {
      this.exception=e;
    }
  }
  if (reportRunnable != null) {
    design=new BirtViewerReportDesignHandle(IViewerReportDesignHandle.RPT_RUNNABLE_OBJECT,reportRunnable);
  }
 else {
    design=new BirtViewerReportDesignHandle(null,reportDesignName);
  }
  return design;
}
Program: 77871
Project: 77871
Buggy source:
/** 
 * This is used for PRESENTATION, the data in report document as the CachedResultSet.
 * @return
 * @throws DataException
 */
ExprResultSet loadExprResultSet() throws DataException {
  if (streamManager.isSecondRD() == true && streamManager.isSubquery() == true)   return new ExprResultSet2(streamManager,loadGroupUtil(StreamManager.ROOT_STREAM,StreamManager.SELF_SCOPE),version,streamManager.isSecondRD());
  return new ExprResultSet(streamManager,loadGroupUtil(StreamManager.ROOT_STREAM,StreamManager.SELF_SCOPE),version,streamManager.isSecondRD());
}

Fixed version (ground truth):
/** 
 * This is used for PRESENTATION, the data in report document as the CachedResultSet.
 * @return
 * @throws DataException
 */
ExprResultSet loadExprResultSet() throws DataException {
  if (streamManager.isSecondRD() == true && streamManager.isSubquery() == true)   return new ExprResultSet2(streamManager,version,streamManager.isSecondRD());
  return new ExprResultSet(streamManager,loadGroupUtil(StreamManager.ROOT_STREAM,StreamManager.SELF_SCOPE),version,streamManager.isSecondRD());
}
Program: 77873
Project: 77873
Buggy source:
/** 
 * @param streamForResultClass
 * @param streamForDataSet
 * @param streamForGroupInfo
 * @param streamForRowIndexInfo
 */
public StreamWrapper(OutputStream streamForResultClass,OutputStream streamForDataSet,OutputStream streamForGroupInfo,OutputStream streamForRowIndexInfo){
  this.streamForResultClass=streamForResultClass;
  this.streamForDataSet=streamForDataSet;
  this.streamForGroupInfo=streamForGroupInfo;
  this.streamForRowIndexInfo=streamForRowIndexInfo;
}

Fixed version (ground truth):
/** 
 * @param streamForResultClass
 * @param streamForDataSet
 * @param streamForGroupInfo
 * @param streamForRowIndexInfo
 */
public StreamWrapper(OutputStream streamForResultClass,OutputStream streamForDataSet,OutputStream streamForGroupInfo,OutputStream streamForRowIndexInfo,OutputStream streamForParentIndex){
  this.streamForResultClass=streamForResultClass;
  this.streamForDataSet=streamForDataSet;
  this.streamForGroupInfo=streamForGroupInfo;
  this.streamForRowIndexInfo=streamForRowIndexInfo;
  this.streamForParentIndex=streamForParentIndex;
}
Program: 77875
Project: 77875
Buggy source:
public static void setSystemHelp(Control control,String contextId){
  control.setFocus();
  PlatformUI.getWorkbench().getHelpSystem().setHelp(control,contextId);
}

Fixed version (ground truth):
/** 
 * @param control
 * @param contextId
 */
public static void setSystemHelp(Control control,String contextId){
  PlatformUI.getWorkbench().getHelpSystem().setHelp(control,contextId);
}
Program: 77876
Project: 77876
Buggy source:
/** 
 * Override build method.
 */
protected void build(){
  addChild(new DocumentFragment());
  addChild(new DialogContainerFragment(new ExceptionDialogFragment()));
  addChild(new DialogContainerFragment(new ParameterDialogFragment()));
}

Fixed version (ground truth):
/** 
 * Override build method.
 */
protected void build(){
  addChild(new ParameterFragment());
}
Program: 77877
Project: 77877
Buggy source:
/** 
 * Return a dataSetRow expression text according to given row name.
 * @param rowName
 * @return
 */
public static String createDataSetRowExpression(String rowName){
  return DATASET_ROW_INDICATOR + "String_Node_Str" + rowName+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Return a dataSetRow expression text according to given row name.
 * @param rowName
 * @return
 */
public static String createDataSetRowExpression(String rowName){
  return DATASET_ROW_INDICATOR + "String_Node_Str" + rowName == null ? null : rowName.trim() + "String_Node_Str";
}