nus-yam/ex-repair huggingface dataset:
Program: 72012
Project: 72012
Buggy source:
private void initFunction(){
  cmbFunction.setItems(getFunctionDisplayNames());
  if (binding == null) {
    cmbFunction.select(0);
    handleFunctionSelectEvent();
    return;
  }
  try {
    String functionString=getFunctionDisplayName(DataAdapterUtil.adaptModelAggregationType(binding.getAggregateFunction()));
    int itemIndex=getItemIndex(getFunctionDisplayNames(),functionString);
    cmbFunction.select(itemIndex);
    handleFunctionSelectEvent();
  }
 catch (  AdapterException e) {
    ExceptionHandler.handle(e);
  }
  for (Iterator iterator=binding.argumentsIterator(); iterator.hasNext(); ) {
    AggregationArgumentHandle arg=(AggregationArgumentHandle)iterator.next();
    if (paramsMap.containsKey(arg.getName())) {
      if (arg.getValue() != null) {
        Control control=paramsMap.get(arg.getName());
        if (control instanceof Text) {
          ((Text)control).setText(arg.getValue());
        }
 else         if (control instanceof Combo) {
          ((Combo)control).setText(arg.getValue());
        }
      }
    }
  }
}

Fixed version (ground truth):
private void initFunction(){
  cmbFunction.setItems(getFunctionDisplayNames());
  if (binding == null) {
    cmbFunction.select(0);
    handleFunctionSelectEvent();
    return;
  }
  try {
    String functionString=getFunctionDisplayName(DataAdapterUtil.adaptModelAggregationType(binding.getAggregateFunction()));
    int itemIndex=getItemIndex(getFunctionDisplayNames(),functionString);
    cmbFunction.select(itemIndex);
    handleFunctionSelectEvent();
  }
 catch (  AdapterException e) {
    ExceptionHandler.handle(e);
  }
  for (Iterator iterator=binding.argumentsIterator(); iterator.hasNext(); ) {
    AggregationArgumentHandle arg=(AggregationArgumentHandle)iterator.next();
    String argName=DataAdapterUtil.adaptArgumentName(arg.getName());
    if (paramsMap.containsKey(argName)) {
      if (arg.getValue() != null) {
        Control control=paramsMap.get(argName);
        if (control instanceof Text) {
          ((Text)control).setText(arg.getValue());
        }
 else         if (control instanceof Combo) {
          ((Combo)control).setText(arg.getValue());
        }
      }
    }
  }
}
Program: 72013
Project: 72013
Buggy source:
public void writeText(Data d){
  writer.openTag("String_Node_Str");
  if (d.getDatatype().equals(Data.NUMBER)) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
 else   if (d.getDatatype().equals(Data.DATE)) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
 else {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  d.formatTxt();
  String txt=d.getText();
  if (CSSConstants.CSS_CAPITALIZE_VALUE.equalsIgnoreCase(d.getStyleEntry().getProperty(StyleConstant.TEXT_TRANSFORM))) {
    txt=capitalize(txt);
  }
 else   if (CSSConstants.CSS_UPPERCASE_VALUE.equalsIgnoreCase(d.getStyleEntry().getProperty(StyleConstant.TEXT_TRANSFORM))) {
    txt=txt.toUpperCase();
  }
 else   if (CSSConstants.CSS_LOWERCASE_VALUE.equalsIgnoreCase(d.getStyleEntry().getProperty(StyleConstant.TEXT_TRANSFORM))) {
    txt=txt.toLowerCase();
  }
  writer.text(txt);
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
public void writeText(Data d){
  writer.openTag("String_Node_Str");
  if (d.getDatatype().equals(Data.NUMBER)) {
    if (d.getText().equals((NAN_STRING))) {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
 else {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
  }
 else   if (d.getDatatype().equals(Data.DATE)) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
 else {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  d.formatTxt();
  String txt=d.getText();
  if (CSSConstants.CSS_CAPITALIZE_VALUE.equalsIgnoreCase(d.getStyleEntry().getProperty(StyleConstant.TEXT_TRANSFORM))) {
    txt=capitalize(txt);
  }
 else   if (CSSConstants.CSS_UPPERCASE_VALUE.equalsIgnoreCase(d.getStyleEntry().getProperty(StyleConstant.TEXT_TRANSFORM))) {
    txt=txt.toUpperCase();
  }
 else   if (CSSConstants.CSS_LOWERCASE_VALUE.equalsIgnoreCase(d.getStyleEntry().getProperty(StyleConstant.TEXT_TRANSFORM))) {
    txt=txt.toLowerCase();
  }
  writer.text(txt);
  writer.closeTag("String_Node_Str");
}
Program: 72014
Project: 72014
Buggy source:
/** 
 * Sets the <code>'class'</code> property and stores the style to styleMap object.
 * @param styleName the style name
 */
protected void setStyleName(String styleName,IContent content){
  StringBuffer classBuffer=new StringBuffer();
  if (styleName != null) {
    if (null != htmlIDNamespace) {
      String htmlStyleName=htmlIDNamespace + styleName;
      if (outputtedStyles.contains(htmlStyleName)) {
        classBuffer.append(htmlStyleName);
      }
    }
 else {
      if (outputtedStyles.contains(styleName)) {
        classBuffer.append(styleName);
      }
    }
  }
  if (hasCsslinks) {
    Object genBy=content.getGenerateBy();
    if (genBy instanceof StyledElementDesign) {
      DesignElementHandle handle=((StyledElementDesign)genBy).getHandle();
      if (handle != null) {
        String name=handle.getStringProperty(ReportItemHandle.STYLE_PROP);
        if (name != null) {
          if (classBuffer.length() != 0) {
            classBuffer.append("String_Node_Str" + name);
          }
 else {
            classBuffer.append(name);
          }
        }
      }
    }
  }
  if (classBuffer.length() != 0) {
    writer.attribute(HTMLTags.ATTR_CLASS,classBuffer.toString());
  }
}

Fixed version (ground truth):
/** 
 * Sets the <code>'class'</code> property and stores the style to styleMap object.
 * @param styleName the style name
 */
protected void setStyleName(String styleName,IContent content){
  StringBuffer classBuffer=new StringBuffer();
  if (styleName != null) {
    if (outputtedStyles.contains(styleName)) {
      if (null != htmlIDNamespace) {
        classBuffer.append(htmlIDNamespace + styleName);
      }
 else {
        classBuffer.append(styleName);
      }
    }
  }
  if (hasCsslinks) {
    Object genBy=content.getGenerateBy();
    if (genBy instanceof StyledElementDesign) {
      DesignElementHandle handle=((StyledElementDesign)genBy).getHandle();
      if (handle != null) {
        String name=handle.getStringProperty(ReportItemHandle.STYLE_PROP);
        if (name != null) {
          if (classBuffer.length() != 0) {
            classBuffer.append("String_Node_Str" + name);
          }
 else {
            classBuffer.append(name);
          }
        }
      }
    }
  }
  if (classBuffer.length() != 0) {
    writer.attribute(HTMLTags.ATTR_CLASS,classBuffer.toString());
  }
}
Program: 72015
Project: 72015
Buggy source:
protected void addColumBinding(IBaseQueryDefinition transfer,ComputedColumnHandle columnBinding) throws BirtException {
  String name=columnBinding.getName();
  String expr=columnBinding.getExpression();
  String type=columnBinding.getDataType();
  String displayName=columnBinding.getDisplayName();
  String aggregateOn=columnBinding.getAggregateOn();
  int dbType=ModelDteApiAdapter.toDteDataType(type);
  IBaseExpression dbExpr=null;
  if (expr != null) {
    dbExpr=new ScriptExpression(expr,dbType);
    if (aggregateOn != null) {
      dbExpr.setGroupName(aggregateOn);
    }
  }
  IBinding binding=new Binding(name,dbExpr);
  binding.setDisplayName(displayName);
  if (aggregateOn != null) {
    binding.addAggregateOn(aggregateOn);
  }
  if (columnBinding.getAggregateFunction() != null) {
    binding.setAggrFunction(DataAdapterUtil.adaptModelAggregationType(columnBinding.getAggregateFunction()));
  }
  String filter=columnBinding.getFilterExpression();
  if (filter != null) {
    binding.setFilter(new ScriptExpression(filter));
  }
  Iterator arguments=columnBinding.argumentsIterator();
  if (arguments != null) {
    while (arguments.hasNext()) {
      AggregationArgumentHandle argumentHandle=(AggregationArgumentHandle)arguments.next();
      String argument=argumentHandle.getValue();
      if (argument != null) {
        binding.addArgument(argumentHandle.getName(),new ScriptExpression(argument));
      }
    }
  }
  binding.setDataType(dbType);
  transfer.addBinding(binding);
}

Fixed version (ground truth):
protected void addColumBinding(IBaseQueryDefinition transfer,ComputedColumnHandle columnBinding) throws BirtException {
  String name=columnBinding.getName();
  String expr=columnBinding.getExpression();
  String type=columnBinding.getDataType();
  String displayName=columnBinding.getDisplayName();
  String aggregateOn=columnBinding.getAggregateOn();
  int dbType=ModelDteApiAdapter.toDteDataType(type);
  IBaseExpression dbExpr=null;
  if (expr != null) {
    dbExpr=new ScriptExpression(expr,dbType);
    if (aggregateOn != null) {
      dbExpr.setGroupName(aggregateOn);
    }
  }
  IBinding binding=new Binding(name,dbExpr);
  binding.setDisplayName(displayName);
  if (aggregateOn != null) {
    binding.addAggregateOn(aggregateOn);
  }
  if (columnBinding.getAggregateFunction() != null) {
    binding.setAggrFunction(DataAdapterUtil.adaptModelAggregationType(columnBinding.getAggregateFunction()));
  }
  String filter=columnBinding.getFilterExpression();
  if (filter != null) {
    binding.setFilter(new ScriptExpression(filter));
  }
  Iterator arguments=columnBinding.argumentsIterator();
  if (arguments != null) {
    while (arguments.hasNext()) {
      AggregationArgumentHandle argumentHandle=(AggregationArgumentHandle)arguments.next();
      String argument=argumentHandle.getValue();
      if (argument != null) {
        binding.addArgument(adaptArgumentName(argumentHandle),new ScriptExpression(argument));
      }
    }
  }
  binding.setDataType(dbType);
  transfer.addBinding(binding);
}
Program: 72016
Project: 72016
Buggy source:
/** 
 * @return the test
 */
public static Test suite(){
  TestSuite test=new TestSuite();
  test.addTestSuite(ContentCommandTest.class);
  test.addTestSuite(ContentExceptionTest.class);
  test.addTestSuite(CustomMsgCommandTest.class);
  test.addTestSuite(CustomMsgExceptionTest.class);
  test.addTestSuite(ExtendsCommandTest.class);
  test.addTestSuite(ExtendsExceptionTest.class);
  test.addTestSuite(NameCommandTest.class);
  test.addTestSuite(NameExceptionTest.class);
  test.addTestSuite(PropertyCommandTest.class);
  test.addTestSuite(PropertyNameExceptionTest.class);
  test.addTestSuite(StyleCommandTest.class);
  test.addTestSuite(StyleExceptionTest.class);
  test.addTestSuite(TemplateCommandTest.class);
  test.addTestSuite(UserPropertyCommandTest.class);
  test.addTestSuite(UserPropertyExceptionTest.class);
  return test;
}

Fixed version (ground truth):
/** 
 * @return the test
 */
public static Test suite(){
  TestSuite test=new TestSuite();
  test.addTestSuite(ContentCommandTest.class);
  test.addTestSuite(ContentExceptionTest.class);
  test.addTestSuite(CustomMsgCommandTest.class);
  test.addTestSuite(CustomMsgExceptionTest.class);
  test.addTestSuite(ExtendsCommandTest.class);
  test.addTestSuite(ExtendsExceptionTest.class);
  test.addTestSuite(NameCommandTest.class);
  test.addTestSuite(NameExceptionTest.class);
  test.addTestSuite(PropertyCommandTest.class);
  test.addTestSuite(PropertyNameExceptionTest.class);
  test.addTestSuite(StyleCommandTest.class);
  test.addTestSuite(StyleExceptionTest.class);
  test.addTestSuite(TemplateCommandTest.class);
  test.addTestSuite(UserPropertyCommandTest.class);
  test.addTestSuite(UserPropertyExceptionTest.class);
  test.addTestSuite(CssCommandTest.class);
  return test;
}
Program: 72021
Project: 72021
Buggy source:
private IInputParameterBinding newInputParamBinding(String paramName,ScriptExpression paramValueExpr){
  if (paramValueExpr == null)   return null;
  return new InputParameterBinding(paramName,paramValueExpr);
}

Fixed version (ground truth):
private IInputParameterBinding newInputParamBinding(String paramName,ScriptExpression paramValueExpr){
  if (paramValueExpr == null || paramValueExpr.getText() == null)   return null;
  return new InputParameterBinding(paramName,paramValueExpr);
}
Program: 72022
Project: 72022
Buggy source:
/** 
 * Contructor
 * @param launch
 * @param vm
 * @param name
 * @param process
 * @param listenPort
 * @param eventPort
 * @param tempFolder
 */
public ScriptDebugTarget(ILaunch launch,ReportVMClient vm,String name,IProcess process,int listenPort,String tempFolder){
  super(null);
  this.launch=launch;
  this.reportVM=vm;
  this.name=name;
  this.process=process;
  this.tempFolder=tempFolder;
  this.listenPort=listenPort;
  launch.addDebugTarget(this);
  vm.addVMListener(this);
  setTerminating(false);
  setTerminated(false);
  thread=new ScriptDebugThread(this);
  threads=new IThread[]{thread};
  DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
  while (!isTerminated()) {
    try {
      vm.connect(listenPort);
      break;
    }
 catch (    VMException e) {
      continue;
    }
  }
}

Fixed version (ground truth):
/** 
 * Contructor
 * @param launch
 * @param vm
 * @param name
 * @param process
 * @param listenPort
 * @param eventPort
 * @param tempFolder
 */
public ScriptDebugTarget(ILaunch launch,ReportVMClient vm,String name,IProcess process,int listenPort,String tempFolder){
  super(null);
  this.launch=launch;
  this.reportVM=vm;
  this.name=name;
  this.process=process;
  this.tempFolder=tempFolder;
  this.listenPort=listenPort;
  launch.addDebugTarget(this);
  vm.addVMListener(this);
  setTerminating(false);
  setTerminated(false);
  thread=new ScriptDebugThread(this);
  threads=new IThread[]{thread};
  DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
  while (!isTerminated()) {
    try {
      vm.connect(listenPort);
      break;
    }
 catch (    VMException e) {
      try {
        Thread.sleep(100);
      }
 catch (      InterruptedException e1) {
      }
      continue;
    }
  }
}
Program: 72023
Project: 72023
Buggy source:
/** 
 * load report item emitters extension definitions
 */
protected void loadEmitterExtensionDefns(){
  IExtension[] exts=getExtensions(EXTENSION_POINT_EMITTERS);
  if (exts == null) {
    return;
  }
  for (int i=0; i < exts.length; i++) {
    String namespace=exts[i].getNamespace();
    IConfigurationElement[] configs=exts[i].getConfigurationElements();
    for (int j=0; j < configs.length; j++) {
      String format=configs[j].getAttribute("String_Node_Str");
      String mimeType=configs[j].getAttribute("String_Node_Str");
      String id=configs[j].getAttribute("String_Node_Str");
      String pagination=configs[j].getAttribute("String_Node_Str");
      if (pagination == null) {
        pagination=PAGE_BREAK_PAGINATION;
      }
      String icon=configs[j].getAttribute("String_Node_Str");
      Boolean outDisplayNone=new Boolean(configs[j].getAttribute("String_Node_Str"));
      String fileExtension=configs[j].getAttribute("String_Node_Str");
      Boolean isHidden=new Boolean(configs[j].getAttribute("String_Node_Str"));
      EmitterInfo emitterInfo=new EmitterInfo(format,id,pagination,mimeType,icon,namespace,fileExtension,outDisplayNone,isHidden,configs[j]);
      emitterExtensions.add(emitterInfo);
      assert(format != null);
      formats.put(format.toLowerCase(),emitterInfo);
      emitters.put(id,emitterInfo);
      logger.log(Level.FINE,"String_Node_Str",new String[]{format,id});
    }
  }
}

Fixed version (ground truth):
/** 
 * load report item emitters extension definitions
 */
protected void loadEmitterExtensionDefns(){
  IExtension[] exts=getExtensions(EXTENSION_POINT_EMITTERS);
  if (exts == null) {
    return;
  }
  for (int i=0; i < exts.length; i++) {
    String namespace=exts[i].getNamespace();
    IConfigurationElement[] configs=exts[i].getConfigurationElements();
    for (int j=0; j < configs.length; j++) {
      String format=configs[j].getAttribute("String_Node_Str");
      String mimeType=configs[j].getAttribute("String_Node_Str");
      String id=configs[j].getAttribute("String_Node_Str");
      String pagination=configs[j].getAttribute("String_Node_Str");
      if (pagination == null) {
        pagination=PAGE_BREAK_PAGINATION;
      }
      String icon=configs[j].getAttribute("String_Node_Str");
      Boolean outDisplayNone=new Boolean(configs[j].getAttribute("String_Node_Str"));
      String fileExtension=configs[j].getAttribute("String_Node_Str");
      Boolean isHidden=new Boolean(configs[j].getAttribute("String_Node_Str"));
      EmitterInfo emitterInfo=new EmitterInfo(format,id,pagination,mimeType,icon,namespace,fileExtension,outDisplayNone,isHidden,configs[j]);
      emitterExtensions.add(emitterInfo);
      assert(format != null);
      formats.put(format.toLowerCase(Locale.ENGLISH),emitterInfo);
      emitters.put(id,emitterInfo);
      logger.log(Level.FINE,"String_Node_Str",new String[]{format,id});
    }
  }
}
Program: 72024
Project: 72024
Buggy source:
public boolean next() throws BirtException {
  checkStarted();
  if (this.columnValueMap == null)   return false;
  currRowIndex++;
  readCurrentRow();
  return this.columnValueMap != null;
}

Fixed version (ground truth):
public boolean next() throws BirtException {
  checkStarted();
  if (this.columnValueMap == null)   return false;
  currRowIndex++;
  readCurrentRow();
  return this.columnValueMap != null && this.columnValueMap.size() > 0;
}
Program: 72025
Project: 72025
Buggy source:
/** 
 * Gets the support list of the given property handle. Note: this method returns all supported elements including invisible ones from UI. To get supported UI element list, check   {@link UIUtil#getUIElementSupportList()}
 * @param propertyHandle
 * @return
 */
public static List<IElementDefn> getElementSupportList(PropertyHandle propertyHandle){
  List<IElementDefn> list=new ArrayList<IElementDefn>();
  IPropertyDefn propertyDefn=propertyHandle.getPropertyDefn();
  if (propertyDefn != null) {
    list.addAll(propertyDefn.getAllowedElements(true));
    list.removeAll(notSupportList);
  }
  List<IElementDefn> availableList=new ArrayList<IElementDefn>();
  for (Iterator<IElementDefn> iterator=list.iterator(); iterator.hasNext(); ) {
    IElementDefn type=iterator.next();
    if (propertyHandle.canContain(type.getName())) {
      availableList.add(type);
    }
  }
  return availableList;
}

Fixed version (ground truth):
/** 
 * Gets the support list of the given property handle. Note: this method returns all supported elements including invisible ones from UI. To get supported UI element list, check  {@link UIUtil#getUIElementSupportList()}
 * @param propertyHandle
 * @return
 */
public static List<IElementDefn> getElementSupportList(PropertyHandle propertyHandle){
  List<IElementDefn> list=new ArrayList<IElementDefn>();
  IPropertyDefn propertyDefn=propertyHandle.getPropertyDefn();
  if (propertyDefn != null) {
    list.addAll(propertyDefn.getAllowedElements(true));
    list.removeAll(notSupportList);
  }
  List<IElementDefn> availableList=new ArrayList<IElementDefn>();
  for (Iterator<IElementDefn> iterator=list.iterator(); iterator.hasNext(); ) {
    IElementDefn type=iterator.next();
    if (propertyHandle.canContain(type.getName())) {
      availableList.add(type);
    }
  }
  return availableList;
}
Program: 72026
Project: 72026
Buggy source:
/** 
 * Get methods with specified comparator
 * @param classInfo
 * @param comp The comparator
 * @return List of methods
 */
public static List getMethods(IClassInfo classInfo,Comparator comp){
  List methods=classInfo.getMethods();
  Collections.sort(methods,comp);
  return methods;
}

Fixed version (ground truth):
/** 
 * Get methods with default comparator
 * @param classInfo
 * @return List of methods
 */
public static List getMethods(IClassInfo classInfo,boolean includeConstructor,Comparator comp){
  List mds=new ArrayList();
  if (includeConstructor) {
    IMethodInfo mi=classInfo.getConstructor();
    if (mi != null) {
      mds.add(mi);
    }
  }
  List methods=classInfo.getMethods();
  Collections.sort(methods,comp);
  mds.addAll(methods);
  return mds;
}
Program: 72027
Project: 72027
Buggy source:
/** 
 * Updates the format Pattern String, and Preview.
 */
private void updatePreview(){
  markDirty(hasLoaded);
  String category=provider.getCategory4UIDisplayName(typeChoicer.getText());
  setCategory(category);
  Date sampleDateTime=defaultDate;
  if (getPreviewText() != null && !getPreviewText().equals(defaultDateTime)) {
    try {
      sampleDateTime=new Date(getPreviewText());
    }
 catch (    Exception e) {
    }
  }
  if (provider.DATETIEM_FORMAT_TYPE_CUSTOM.equals(category)) {
    String pattern=formatCode.getText();
    String fmtStr;
    String text=previewTextBox.getText();
    if (StringUtil.isBlank(text) || defaultDateTime.equals(text)) {
      fmtStr=new DateFormatter(pattern,ULocale.getDefault()).format(sampleDateTime);
    }
 else {
      try {
        fmtStr=new DateFormatter(pattern,ULocale.getDefault()).format(new Date(text));
      }
 catch (      Exception e) {
        fmtStr=PREVIEW_TEXT_INVALID_DATETIME_TO_PREVIEW;
      }
    }
    cusPreviewLabel.setText(validatedFmtStr(fmtStr));
    setPattern(pattern);
  }
 else {
    String pattern=null;
    if (!provider.DATETIEM_FORMAT_TYPE_UNFORMATTED.equals(category)) {
      pattern=FormatDateTimePattern.getPatternForCategory(category);
    }
    String fmtStr=new DateFormatter(pattern).format(sampleDateTime);
    generalPreviewLabel.setText(validatedFmtStr(fmtStr));
    setPattern(pattern);
  }
  return;
}

Fixed version (ground truth):
/** 
 * Updates the format Pattern String, and Preview.
 */
private void updatePreview(){
  markDirty(hasLoaded);
  String category=provider.getCategory4UIDisplayName(typeChoicer.getText());
  setCategory(category);
  boolean invalidPreviewText=false;
  Date sampleDateTime=defaultDate;
  if (getPreviewText() != null && !getPreviewText().equals(defaultDateTime)) {
    try {
      sampleDateTime=new DateFormatter(ENTER_DATE_TIME_GUIDE_FORMAT,ULocale.getDefault()).parse(getPreviewText());
    }
 catch (    Exception e) {
      invalidPreviewText=true;
    }
  }
  if (provider.DATETIEM_FORMAT_TYPE_CUSTOM.equals(category)) {
    String pattern=formatCode.getText();
    String fmtStr;
    if (invalidPreviewText) {
      fmtStr=PREVIEW_TEXT_INVALID_DATETIME_TO_PREVIEW;
    }
 else {
      try {
        fmtStr=new DateFormatter(pattern,ULocale.getDefault()).format(sampleDateTime);
      }
 catch (      Exception e) {
        fmtStr=PREVIEW_TEXT_INVALID_DATETIME_TO_PREVIEW;
      }
    }
    cusPreviewLabel.setText(validatedFmtStr(fmtStr));
    setPattern(pattern);
  }
 else {
    String pattern=null;
    if (!provider.DATETIEM_FORMAT_TYPE_UNFORMATTED.equals(category)) {
      pattern=FormatDateTimePattern.getPatternForCategory(category);
    }
    String fmtStr=new DateFormatter(pattern).format(sampleDateTime);
    generalPreviewLabel.setText(validatedFmtStr(fmtStr));
    setPattern(pattern);
  }
  return;
}
Program: 72028
Project: 72028
Buggy source:
/** 
 * Updates the format Pattern String, and Preview.
 */
private void updatePreview(){
  markDirty(hasLoaded);
  String category=getCategory4UIDisplayName(typeChoicer.getText());
  setCategory(category);
  Date sampleDateTime=defaultDate;
  if (getPreviewText() != null && !getPreviewText().equals(defaultDateTime)) {
    try {
      sampleDateTime=new Date(getPreviewText());
    }
 catch (    Exception e) {
    }
  }
  if (formatAdapter.getCustomCategoryName().equals(category)) {
    String pattern=formatCode.getText();
    String fmtStr;
    String text=previewTextBox.getText();
    if (StringUtil.isBlank(text) || defaultDateTime.equals(text)) {
      fmtStr=new DateFormatter(pattern,ULocale.getDefault()).format(sampleDateTime);
    }
 else {
      try {
        fmtStr=new DateFormatter(pattern).format(DataTypeUtil.toDate(text));
      }
 catch (      Exception e) {
        fmtStr=PREVIEW_TEXT_INVALID_DATETIME_TO_PREVIEW;
      }
    }
    cusPreviewLabel.setText(validatedFmtStr(fmtStr));
    setPattern(pattern);
  }
 else {
    String pattern=null;
    if (!formatAdapter.getUnformattedCategoryDisplayName().equals(category)) {
      pattern=FormatDateTimePattern.getPatternForCategory(category);
      setPattern(pattern);
    }
 else {
      pattern=formatAdapter.getUnformattedCategoryName();
      setPattern(null);
    }
    String fmtStr=new DateFormatter(pattern).format(sampleDateTime);
    generalPreviewLabel.setText(validatedFmtStr(fmtStr));
  }
}

Fixed version (ground truth):
/** 
 * Updates the format Pattern String, and Preview.
 */
private void updatePreview(){
  markDirty(hasLoaded);
  String category=getCategory4UIDisplayName(typeChoicer.getText());
  setCategory(category);
  boolean invalidPreviewText=false;
  Date sampleDateTime=defaultDate;
  if (getPreviewText() != null && !getPreviewText().equals(defaultDateTime)) {
    try {
      sampleDateTime=new DateFormatter(ENTER_DATE_TIME_GUIDE_FORMAT,ULocale.getDefault()).parse(getPreviewText());
    }
 catch (    Exception e) {
      invalidPreviewText=true;
    }
  }
  if (formatAdapter.getCustomCategoryName().equals(category)) {
    String pattern=formatCode.getText();
    String fmtStr;
    if (invalidPreviewText) {
      fmtStr=PREVIEW_TEXT_INVALID_DATETIME_TO_PREVIEW;
    }
 else {
      try {
        fmtStr=new DateFormatter(pattern,ULocale.getDefault()).format(sampleDateTime);
      }
 catch (      Exception e) {
        fmtStr=PREVIEW_TEXT_INVALID_DATETIME_TO_PREVIEW;
      }
    }
    cusPreviewLabel.setText(validatedFmtStr(fmtStr));
    setPattern(pattern);
  }
 else {
    String pattern=null;
    if (!formatAdapter.getUnformattedCategoryDisplayName().equals(category)) {
      pattern=FormatDateTimePattern.getPatternForCategory(category);
      setPattern(pattern);
    }
 else {
      pattern=formatAdapter.getUnformattedCategoryName();
      setPattern(null);
    }
    String fmtStr=new DateFormatter(pattern).format(sampleDateTime);
    generalPreviewLabel.setText(validatedFmtStr(fmtStr));
  }
}
Program: 72029
Project: 72029
Buggy source:
/** 
 * populate all output columns in viewer display. The output columns is retrieved from oda dataset handles's RESULT_SET_PROP and COMPUTED_COLUMNS_PROP.
 * @throws BirtException
 */
public DataSetViewData[] populateAllOutputColumns(DataSetHandle dataSetHandle,DataRequestSession session) throws BirtException {
  IResultMetaData metaData=session.getDataSetMetaData(dataSetHandle,false);
  if (metaData == null)   return new DataSetViewData[0];
  DataSetViewData[] items=new DataSetViewData[metaData.getColumnCount()];
  for (int i=0; i < metaData.getColumnCount(); i++) {
    items[i]=new DataSetViewData();
    items[i].setName(metaData.getColumnName(i + 1));
    items[i].setDataTypeName(metaData.getColumnTypeName(i + 1));
    items[i].setAlias(metaData.getColumnAlias(i + 1));
    items[i].setComputedColumn(metaData.isComputedColumn(i + 1));
    items[i].setPosition(i + 1);
    items[i].setDataType(metaData.getColumnType(i + 1));
  }
  updateModel(dataSetHandle,items);
  return items;
}

Fixed version (ground truth):
/** 
 * populate all output columns in viewer display. The output columns is retrieved from oda dataset handles's RESULT_SET_PROP and COMPUTED_COLUMNS_PROP.
 * @throws BirtException
 */
public DataSetViewData[] populateAllOutputColumns(DataSetHandle dataSetHandle,DataRequestSession session) throws BirtException {
  IResultMetaData metaData=session.getDataSetMetaData(dataSetHandle,false);
  if (metaData == null)   return new DataSetViewData[0];
  DataSetViewData[] items=new DataSetViewData[metaData.getColumnCount()];
  for (int i=0; i < metaData.getColumnCount(); i++) {
    items[i]=new DataSetViewData();
    items[i].setName(metaData.getColumnName(i + 1));
    items[i].setDataTypeName(DataAdapterUtil.adapterToModelDataType(metaData.getColumnType(i + 1)));
    items[i].setAlias(metaData.getColumnAlias(i + 1));
    items[i].setComputedColumn(metaData.isComputedColumn(i + 1));
    items[i].setPosition(i + 1);
    items[i].setDataType(metaData.getColumnType(i + 1));
  }
  updateModel(dataSetHandle,items);
  return items;
}
Program: 72030
Project: 72030
Buggy source:
/** 
 * get Cached metadata
 * @throws BirtException
 */
public DataSetViewData[] populateAllCachedMetaData(DataSetHandle dataSetHandle,DataRequestSession session) throws BirtException {
  IResultMetaData metaData=session.getDataSetMetaData(dataSetHandle,true);
  DataSetViewData[] items=new DataSetViewData[metaData.getColumnCount()];
  for (int i=0; i < metaData.getColumnCount(); i++) {
    items[i]=new DataSetViewData();
    items[i].setName(metaData.getColumnName(i + 1));
    items[i].setDataTypeName(metaData.getColumnTypeName(i + 1));
    items[i].setAlias(metaData.getColumnAlias(i + 1));
    items[i].setComputedColumn(metaData.isComputedColumn(i + 1));
    items[i].setPosition(i + 1);
    items[i].setDataType(metaData.getColumnType(i + 1));
  }
  return items;
}

Fixed version (ground truth):
/** 
 * get Cached metadata
 * @throws BirtException
 */
public DataSetViewData[] populateAllCachedMetaData(DataSetHandle dataSetHandle,DataRequestSession session) throws BirtException {
  IResultMetaData metaData=session.getDataSetMetaData(dataSetHandle,true);
  DataSetViewData[] items=new DataSetViewData[metaData.getColumnCount()];
  for (int i=0; i < metaData.getColumnCount(); i++) {
    items[i]=new DataSetViewData();
    items[i].setName(metaData.getColumnName(i + 1));
    items[i].setDataTypeName(DataAdapterUtil.adapterToModelDataType(metaData.getColumnType(i + 1)));
    items[i].setAlias(metaData.getColumnAlias(i + 1));
    items[i].setComputedColumn(metaData.isComputedColumn(i + 1));
    items[i].setPosition(i + 1);
    items[i].setDataType(metaData.getColumnType(i + 1));
  }
  return items;
}
Program: 72033
Project: 72033
Buggy source:
public void setPagebreakPaginationOnly(boolean pageBreakPaginationOnly){
  this.pageBreakPaginationOnly=pageBreakPaginationOnly;
}

Fixed version (ground truth):
public void setPagebreakPaginationOnly(boolean pageBreakPaginationOnly){
  this.pageBreakPaginationOnly=pageBreakPaginationOnly;
  setAutoPageBreak(!pageBreakPaginationOnly);
}
Program: 72035
Project: 72035
Buggy source:
public TextArea getNextArea(int maxLineWidth){
  if (!hasNextArea()) {
    throw new RuntimeException("String_Node_Str");
  }
  TextArea textArea=getNextTextArea(maxLineWidth);
  offset+=textArea.getTextLength();
  return textArea;
}

Fixed version (ground truth):
public TextArea getNextArea(int maxLineWidth){
  if (!hasNextArea()) {
    throw new RuntimeException("String_Node_Str");
  }
  TextArea textArea=getNextTextArea(maxLineWidth);
  offset+=textArea.getTextLength();
  System.out.print(textArea.getText());
  System.out.print("String_Node_Str" + offset + "String_Node_Str");
  return textArea;
}
Program: 72036
Project: 72036
Buggy source:
private List<JavaClassField> getFields(Class<?> clazz){
  Method[] methods=clazz.getMethods();
  List<JavaClassField> jsFields=new ArrayList<JavaClassField>();
  List<String> setMethodList=new ArrayList<String>();
  String methodName;
  for (int i=0; i < methods.length; i++) {
    methodName=methods[i].getName();
    if (methodName.startsWith("String_Node_Str") && methods[i].getParameterTypes() != null && methods[i].getParameterTypes().length == 1) {
      setMethodList.add(methodName.substring(3));
      continue;
    }
  }
  for (int i=0; i < methods.length; i++) {
    methodName=methods[i].getName();
    if (methods[i].getName().startsWith("String_Node_Str") && methods[i].getParameterTypes() != null && methods[i].getParameterTypes().length == 0) {
      if (setMethodList.contains(methodName.substring(3))) {
        Class<?> type=methods[i].getReturnType();
        JavaClassField field=new JavaClassField(methods[i].getDeclaringClass(),getFieldName(methodName),getSimpleName(type),type.isArray());
        if (!jsFields.contains(field))         jsFields.add(field);
      }
    }
  }
  Field[] fields=clazz.getFields();
  for (int i=0; i < fields.length; i++) {
    jsFields.add(new JavaClassField(fields[i]));
  }
  if (clazz.isArray())   jsFields.add(new JavaClassField(clazz,"String_Node_Str",Integer.TYPE.getName(),false));
  return jsFields;
}

Fixed version (ground truth):
private List<JavaClassField> getFields(Class<?> clazz){
  Method[] methods=clazz.getMethods();
  List<JavaClassField> jsFields=new ArrayList<JavaClassField>();
  List<String> setMethodList=new ArrayList<String>();
  String methodName;
  for (int i=0; i < methods.length; i++) {
    methodName=methods[i].getName();
    if (methodName.startsWith("String_Node_Str") && methods[i].getParameterTypes() != null && methods[i].getParameterTypes().length == 1) {
      setMethodList.add(methodName.substring(3));
      continue;
    }
  }
  for (int i=0; i < methods.length; i++) {
    methodName=methods[i].getName();
    if (methods[i].getName().startsWith("String_Node_Str") && methods[i].getParameterTypes() != null && methods[i].getParameterTypes().length == 0) {
      if (setMethodList.contains(methodName.substring(3))) {
        Class<?> type=methods[i].getReturnType();
        JavaClassField field=new JavaClassField(methods[i].getDeclaringClass(),getFieldName(methodName),getClazzName(type),type.isArray());
        if (!jsFields.contains(field))         jsFields.add(field);
      }
    }
  }
  Field[] fields=clazz.getFields();
  for (int i=0; i < fields.length; i++) {
    jsFields.add(new JavaClassField(fields[i]));
  }
  if (clazz.isArray())   jsFields.add(new JavaClassField(clazz,"String_Node_Str",Integer.TYPE.getName(),false));
  return jsFields;
}
Program: 72037
Project: 72037
Buggy source:
private Object getSimpleName(String name){
  return name.substring(name.lastIndexOf("String_Node_Str") + 1);
}

Fixed version (ground truth):
private String getSimpleName(String name){
  return name.substring(name.lastIndexOf("String_Node_Str") + 1);
}
Program: 72038
Project: 72038
Buggy source:
public String getDisplayText(){
  if (displayText == null) {
    StringBuffer strbuf=new StringBuffer(getName());
    strbuf.append("String_Node_Str");
    if (field != null && field.getType() != null) {
      strbuf.append(getSimpleName(field.getType()));
      strbuf.append("String_Node_Str");
    }
 else     if (type != null) {
      strbuf.append(getSimpleName(this.type.getName()));
      if (isArray) {
        strbuf.append("String_Node_Str");
      }
      strbuf.append("String_Node_Str");
    }
 else     if (typeName != null) {
      strbuf.append(typeName);
      strbuf.append("String_Node_Str");
    }
    if (field == null) {
      strbuf.append(getSimpleName(declareClazz));
    }
 else {
      strbuf.append(getSimpleName(field.getDeclaringClass()));
    }
    displayText=strbuf.toString();
    strbuf=null;
  }
  return displayText;
}

Fixed version (ground truth):
public String getDisplayText(){
  if (displayText == null) {
    StringBuffer strbuf=new StringBuffer(getName());
    strbuf.append("String_Node_Str");
    if (field != null && field.getType() != null) {
      strbuf.append(getSimpleName(field.getType()));
      strbuf.append("String_Node_Str");
    }
 else     if (type != null) {
      strbuf.append(getSimpleName(this.type.getName()));
      if (isArray) {
        strbuf.append("String_Node_Str");
      }
      strbuf.append("String_Node_Str");
    }
 else     if (typeName != null) {
      strbuf.append(getSimpleName(typeName));
      strbuf.append("String_Node_Str");
    }
    if (field == null) {
      strbuf.append(getSimpleName(declareClazz));
    }
 else {
      strbuf.append(getSimpleName(field.getDeclaringClass()));
    }
    displayText=strbuf.toString();
    strbuf=null;
  }
  return displayText;
}
Program: 72039
Project: 72039
Buggy source:
public void formatTxt(){
  if (txt == null) {
    return;
  }
 else   if (datatype.equals(Data.DATE)) {
    txt=ExcelUtil.formatDate(txt);
  }
 else   if (datatype.equals(Data.NUMBER) && txt.toString().length() > 31) {
    txt=ExcelUtil.formatNumber(txt);
  }
}

Fixed version (ground truth):
public void formatTxt(){
  if (txt == null) {
    return;
  }
 else   if (datatype.equals(Data.DATE)) {
    txt=ExcelUtil.formatDate(txt);
  }
 else   if (datatype.equals(Data.NUMBER)) {
    Number number=(Number)txt;
    if (ExcelUtil.isBigNumber(number)) {
      txt=ExcelUtil.formatNumberAsScienceNotation(number);
    }
 else     if (txt.toString().length() > 31) {
      txt=ExcelUtil.formatNumberAsDecimal(number);
    }
  }
}
Program: 72040
Project: 72040
Buggy source:
public static String getType(Object val){
  if (val instanceof Number) {
    if (isNumber(val.toString())) {
      return Data.NUMBER;
    }
 else {
      return Data.STRING;
    }
  }
 else   if (val instanceof Date) {
    return Data.DATE;
  }
 else   if (val instanceof Calendar) {
    return Data.CALENDAR;
  }
 else {
    return Data.STRING;
  }
}

Fixed version (ground truth):
public static String getType(Object val){
  if (val instanceof Number) {
    return Data.NUMBER;
  }
 else   if (val instanceof Date) {
    return Data.DATE;
  }
 else   if (val instanceof Calendar) {
    return Data.CALENDAR;
  }
 else {
    return Data.STRING;
  }
}
Program: 72041
Project: 72041
Buggy source:
public void writeText(Data d){
  writer.openTag("String_Node_Str");
  if (d.getDatatype().equals(Data.NUMBER) && ExcelUtil.isNumber(d.getText())) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
 else   if (d.getDatatype().equals(Data.DATE)) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
 else {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  d.formatTxt();
  String txt=d.getText();
  if (CSSConstants.CSS_CAPITALIZE_VALUE.equalsIgnoreCase(d.getStyleEntry().getProperty(StyleConstant.TEXT_TRANSFORM))) {
    txt=capitalize(txt);
  }
 else   if (CSSConstants.CSS_UPPERCASE_VALUE.equalsIgnoreCase(d.getStyleEntry().getProperty(StyleConstant.TEXT_TRANSFORM))) {
    txt=txt.toUpperCase();
  }
 else   if (CSSConstants.CSS_LOWERCASE_VALUE.equalsIgnoreCase(d.getStyleEntry().getProperty(StyleConstant.TEXT_TRANSFORM))) {
    txt=txt.toLowerCase();
  }
  writer.text(txt);
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
public void writeText(Data d){
  writer.openTag("String_Node_Str");
  if (d.getDatatype().equals(Data.NUMBER)) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
 else   if (d.getDatatype().equals(Data.DATE)) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
 else {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  d.formatTxt();
  String txt=d.getText();
  if (CSSConstants.CSS_CAPITALIZE_VALUE.equalsIgnoreCase(d.getStyleEntry().getProperty(StyleConstant.TEXT_TRANSFORM))) {
    txt=capitalize(txt);
  }
 else   if (CSSConstants.CSS_UPPERCASE_VALUE.equalsIgnoreCase(d.getStyleEntry().getProperty(StyleConstant.TEXT_TRANSFORM))) {
    txt=txt.toUpperCase();
  }
 else   if (CSSConstants.CSS_LOWERCASE_VALUE.equalsIgnoreCase(d.getStyleEntry().getProperty(StyleConstant.TEXT_TRANSFORM))) {
    txt=txt.toLowerCase();
  }
  writer.text(txt);
  writer.closeTag("String_Node_Str");
}
Program: 72042
Project: 72042
Buggy source:
@Override public void prepare() throws BirtException {
  if (!(handle instanceof ExtendedItemHandle)) {
    return;
  }
  CrosstabReportItemHandle crosstab=(CrosstabReportItemHandle)((ExtendedItemHandle)handle).getReportItem();
  if (crosstab == null) {
    return;
  }
  new CrosstabPreparationHandler(crosstab,context).handle();
}

Fixed version (ground truth):
@Override public void prepare() throws BirtException {
  if (!(handle instanceof ExtendedItemHandle)) {
    return;
  }
  CrosstabReportItemHandle crosstab=(CrosstabReportItemHandle)((ExtendedItemHandle)handle).getReportItem();
  if (crosstab == null) {
    return;
  }
  context.evaluate("String_Node_Str");
  new CrosstabPreparationHandler(crosstab,context).handle();
}
Program: 72045
Project: 72045
Buggy source:
public Object getValue(String exprName) throws BirtException {
  checkStarted();
  logger.logp(Level.FINER,ResultIterator.class.getName(),"String_Node_Str","String_Node_Str" + LogUtil.toString(exprName));
  if (this.isFirstRowPepared) {
    if (this.isEmpty())     this.next();
 else     this.prepareCurrentRow();
  }
  if (!this.boundColumnValueMap.containsKey(exprName)) {
    if (this.resultService.getBindingExpr(exprName) != null) {
      return prepareBindingColumn(exprName);
    }
    throw new DataException(ResourceConstants.INVALID_BOUND_COLUMN_NAME,exprName);
  }
  Object exprValue=boundColumnValueMap.get(exprName);
  if (exprValue instanceof BirtException)   throw (BirtException)exprValue;
  if (exprValue instanceof DataExceptionMocker)   throw ((DataExceptionMocker)exprValue).getCause();
  return exprValue;
}

Fixed version (ground truth):
public Object getValue(String exprName) throws BirtException {
  checkStarted();
  logger.logp(Level.FINER,ResultIterator.class.getName(),"String_Node_Str","String_Node_Str" + LogUtil.toString(exprName));
  if (this.isFirstRowPepared) {
    if (this.isEmpty())     this.next();
 else     this.prepareCurrentRow();
  }
  if (!this.boundColumnValueMap.containsKey(exprName)) {
    if (this.resultService.getBindingExpr(exprName) != null) {
      return prepareBindingColumn(exprName);
    }
    throw new DataException(ResourceConstants.INVALID_BOUND_COLUMN_NAME,exprName);
  }
  Object exprValue=boundColumnValueMap.get(exprName);
  if (exprValue instanceof BirtException)   throw (BirtException)exprValue;
  return exprValue;
}
Program: 72046
Project: 72046
Buggy source:
public Object get(String name,Scriptable scope){
  if (ScriptConstants.OUTER_RESULT_KEYWORD.equalsIgnoreCase(name)) {
    if (this.parentHelper == null) {
      return new DataExceptionMocker(new DataException(ResourceConstants.NO_OUTER_RESULTS_EXIST));
    }
 else     return this.parentHelper.getScriptable();
  }
  try {
    return this.currentIterator.getValue(name);
  }
 catch (  BirtException e) {
    return e;
  }
}

Fixed version (ground truth):
public Object get(String name,Scriptable scope){
  if (ScriptConstants.OUTER_RESULT_KEYWORD.equalsIgnoreCase(name)) {
    if (this.parentHelper == null) {
      throw Context.reportRuntimeError(DataResourceHandle.getInstance().getMessage(ResourceConstants.NO_OUTER_RESULTS_EXIST));
    }
 else     return this.parentHelper.getScriptable();
  }
  try {
    return this.currentIterator.getValue(name);
  }
 catch (  BirtException e) {
    return e;
  }
}
Program: 72047
Project: 72047
Buggy source:
public Object evaluate(Context context,Scriptable scope) throws DataException {
  Object temp=this.script.exec(context,scope);
  temp=JavascriptEvalUtil.convertJavascriptValue(temp);
  if (temp instanceof ScriptableObject) {
    if (temp instanceof DataExceptionMocker)     throw DataException.wrap(((DataExceptionMocker)temp).getCause());
    return ((ScriptableObject)temp).getDefaultValue(null);
  }
  return temp;
}

Fixed version (ground truth):
public Object evaluate(Context context,Scriptable scope) throws DataException {
  Object temp=this.script.exec(context,scope);
  temp=JavascriptEvalUtil.convertJavascriptValue(temp);
  if (temp instanceof ScriptableObject) {
    return ((ScriptableObject)temp).getDefaultValue(null);
  }
  return temp;
}
Program: 72048
Project: 72048
Buggy source:
public Object get(String name,Scriptable start){
  if (ScriptConstants.OUTER_RESULT_KEYWORD.equalsIgnoreCase(name)) {
    if (parent == null) {
      return new DataExceptionMocker(new DataException(ResourceConstants.NO_OUTER_RESULTS_EXIST));
    }
 else {
      return parent;
    }
  }
  if (valueCacheMap.containsKey(name))   return valueCacheMap.get(name);
  try {
    IBaseExpression baseExpr=exprManager.getExpr(name);
    Object value=ExprEvaluateUtil.evaluateRawExpression(baseExpr,scope);
    Object obValue=JavascriptEvalUtil.convertToJavascriptValue(value,scope);
    valueCacheMap.put(name,obValue);
    return obValue;
  }
 catch (  BirtException e) {
    return null;
  }
}

Fixed version (ground truth):
public Object get(String name,Scriptable start){
  if (ScriptConstants.OUTER_RESULT_KEYWORD.equalsIgnoreCase(name)) {
    if (parent == null) {
      throw Context.reportRuntimeError(DataResourceHandle.getInstance().getMessage(ResourceConstants.NO_OUTER_RESULTS_EXIST));
    }
 else {
      return parent;
    }
  }
  if (valueCacheMap.containsKey(name))   return valueCacheMap.get(name);
  try {
    IBaseExpression baseExpr=exprManager.getExpr(name);
    Object value=ExprEvaluateUtil.evaluateRawExpression(baseExpr,scope);
    Object obValue=JavascriptEvalUtil.convertToJavascriptValue(value,scope);
    valueCacheMap.put(name,obValue);
    return obValue;
  }
 catch (  BirtException e) {
    return null;
  }
}
Program: 72050
Project: 72050
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");
    return dataSet.getJSDataSetObject();
  }
 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 {
      return new Integer(dataSet.getCurrentRowIndex());
    }
 catch (    DataException e) {
      logger.logp(Level.FINER,JSColumnDefn.class.getName(),"String_Node_Str",e.getMessage(),e);
    }
  }
  try {
    if (dataSet.getCurrentRow() == null)     return null;
    Object value=dataSet.getDataRow().getColumnValue(name);
    return JavascriptEvalUtil.convertToJavascriptValue(value,dataSet.getSharedScope());
  }
 catch (  BirtException e) {
    logger.logp(Level.FINER,JSColumnDefn.class.getName(),"String_Node_Str",e.getMessage(),e);
    return new DataExceptionMocker(e);
  }
}

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");
    return dataSet.getJSDataSetObject();
  }
 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 {
      return new Integer(dataSet.getCurrentRowIndex());
    }
 catch (    DataException e) {
      logger.logp(Level.FINER,JSColumnDefn.class.getName(),"String_Node_Str",e.getMessage(),e);
    }
  }
  try {
    if (dataSet.getCurrentRow() == null)     return null;
    Object value=dataSet.getDataRow().getColumnValue(name);
    return JavascriptEvalUtil.convertToJavascriptValue(value,dataSet.getSharedScope());
  }
 catch (  BirtException e) {
    logger.logp(Level.FINER,JSColumnDefn.class.getName(),"String_Node_Str",e.getMessage(),e);
    throw Context.reportRuntimeError(e.getLocalizedMessage());
  }
}