nus-yam/ex-repair huggingface dataset:
Program: 72241
Project: 72241
Buggy source:
public boolean supportDataType(int dataType){
  for (int i=0; i < supportedDataTypes.length; i++) {
    if (supportedDataTypes[i] == DataType.ANY_TYPE || supportedDataTypes[i] == dataType) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean supportDataType(int dataType){
  if (dataType == DataType.ANY_TYPE || dataType == DataType.UNKNOWN_TYPE)   return true;
  for (int i=0; i < supportedDataTypes.length; i++) {
    if (supportedDataTypes[i] == dataType) {
      return true;
    }
  }
  return false;
}
Program: 72242
Project: 72242
Buggy source:
/** 
 * @param name
 * @param displayName
 * @param isOptional
 * @param isDataField
 * @param supportedDataTypes
 * @param description
 */
public ParameterDefn(String name,String displayName,boolean isOptional,boolean isDataField,int[] supportedDataTypes,String description){
  this.name=name;
  this.isOptional=isOptional;
  this.isDataField=isDataField;
  this.displayName=displayName;
  this.supportedDataTypes=supportedDataTypes;
  this.description=description;
}

Fixed version (ground truth):
/** 
 * @param name
 * @param displayName
 * @param isOptional
 * @param isDataField
 * @param supportedDataTypes
 * @param description
 */
public ParameterDefn(String name,String displayName,boolean isOptional,boolean isDataField,int[] supportedDataTypes,String description){
}
Program: 72243
Project: 72243
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE_DATE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72244
Project: 72244
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,true,true,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,true,true,SupportedDataTypes.ANY,"String_Node_Str")};
}
Program: 72245
Project: 72245
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),false,false,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),false,false,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72246
Project: 72246
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.ANY,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72247
Project: 72247
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE_DATE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72248
Project: 72248
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.ANY,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72249
Project: 72249
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),true,false,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),true,false,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),true,false,SupportedDataTypes.CALCULATABLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),true,false,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72250
Project: 72250
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.ANY,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72251
Project: 72251
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE_DATE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),false,false,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),false,false,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72252
Project: 72252
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),true,false,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),true,false,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72253
Project: 72253
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,true,true,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,true,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72254
Project: 72254
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),true,false,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),true,false,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72255
Project: 72255
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72256
Project: 72256
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72257
Project: 72257
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72258
Project: 72258
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72259
Project: 72259
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),false,false,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),false,false,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72260
Project: 72260
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.ANY,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),false,false,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),false,false,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72261
Project: 72261
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72262
Project: 72262
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72263
Project: 72263
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),true,false,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),true,false,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72264
Project: 72264
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),true,false,SupportedDataTypes.INTEGER_DOUBLE,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),true,false,SupportedDataTypes.CALCULATABLE,"String_Node_Str")};
}
Program: 72265
Project: 72265
Buggy source:
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.ANY,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),true,false,SupportedDataTypes.ANY,"String_Node_Str")};
}

Fixed version (ground truth):
public IParameterDefn[] getParameterDefn(){
  return new IParameterDefn[]{new ParameterDefn(Constants.EXPRESSION_NAME,Constants.EXPRESSION_DISPLAY_NAME,false,true,SupportedDataTypes.CALCULATABLE,"String_Node_Str"),new ParameterDefn("String_Node_Str",Messages.getString("String_Node_Str"),true,false,SupportedDataTypes.ANY,"String_Node_Str")};
}
Program: 72266
Project: 72266
Buggy source:
/** 
 * @throws BirtException
 */
public void testDefineDataSource() throws BirtException {
  ScriptExpression expr;
  IQueryDefinition queryDefn;
  expr=new ScriptExpression("String_Node_Str");
  queryDefn=getScriptQueryDefn(expr);
  try {
    IPreparedQuery preparedQuery=myDataEngine.prepare(queryDefn);
    IQueryResults queryResults=preparedQuery.execute(null);
    queryResults.getResultIterator();
  }
 catch (  Exception e) {
    fail(e.getMessage());
  }
  expr=new ScriptExpression("String_Node_Str");
  queryDefn=getJDBCQueryDefn(expr);
  try {
    IPreparedQuery preparedQuery=myDataEngine.prepare(queryDefn);
    IQueryResults queryResults=preparedQuery.execute(null);
    queryResults.getResultIterator();
  }
 catch (  Exception e) {
    fail(e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * @throws BirtException
 */
public void testDefineDataSource() throws BirtException {
  ScriptExpression expr;
  IQueryDefinition queryDefn;
  expr=new ScriptExpression("String_Node_Str");
  queryDefn=getScriptQueryDefn(expr);
  try {
    IPreparedQuery preparedQuery=myDataEngine.prepare(queryDefn);
    IQueryResults queryResults=preparedQuery.execute(null);
    IResultIterator it=queryResults.getResultIterator();
    it.close();
    queryResults.close();
  }
 catch (  Exception e) {
    fail(e.getMessage());
  }
  expr=new ScriptExpression("String_Node_Str");
  queryDefn=getJDBCQueryDefn(expr);
  try {
    IPreparedQuery preparedQuery=myDataEngine.prepare(queryDefn);
    IQueryResults queryResults=preparedQuery.execute(null);
    IResultIterator it=queryResults.getResultIterator();
    it.close();
    queryResults.close();
  }
 catch (  Exception e) {
    fail(e.getMessage());
  }
}
Program: 72267
Project: 72267
Buggy source:
/** 
 * @param appContext
 * @throws DataException
 */
private void configureDataSetCache(Scriptable outerScope,IQueryDefinition querySpec,Map appContext,Scriptable scope) throws DataException {
  if (querySpec == null)   return;
  String queryResultID=querySpec.getQueryResultsID();
  if (queryResultID != null)   return;
  if (dataSetDesign == null)   return;
  if (!getDataSetCacheManager().needsToCache(dataSetDesign,appContext))   return;
  Collection parameterHints=null;
  IBaseDataSourceDesign dataSourceDesign=null;
  DataSourceRuntime dsRuntime=this.dataEngine.getDataSourceRuntime(dataSetDesign.getDataSourceName());
  if (dsRuntime != null) {
    dataSourceDesign=dsRuntime.getDesign();
    DataSetRuntime dataSet=DataSetRuntime.newInstance(dataSetDesign,null);
    parameterHints=new ParameterUtil(outerScope,dataSet,this.queryDefn,scope).resolveDataSetParameters(true);
  }
  getDataSetCacheManager().setDataSourceAndDataSet(dataSourceDesign,dataSetDesign,parameterHints,this.appContext);
}

Fixed version (ground truth):
/** 
 * @param appContext
 * @throws DataException
 */
private void configureDataSetCache(Scriptable outerScope,IQueryDefinition querySpec,Map appContext,Scriptable scope) throws DataException {
  if (querySpec == null)   return;
  String queryResultID=querySpec.getQueryResultsID();
  if (queryResultID != null)   return;
  if (dataSetDesign == null)   return;
  Collection parameterHints=null;
  IBaseDataSourceDesign dataSourceDesign=null;
  DataSourceRuntime dsRuntime=this.dataEngine.getDataSourceRuntime(dataSetDesign.getDataSourceName());
  if (dsRuntime != null) {
    dataSourceDesign=dsRuntime.getDesign();
    DataSetRuntime dataSet=DataSetRuntime.newInstance(dataSetDesign,null);
    parameterHints=new ParameterUtil(outerScope,dataSet,this.queryDefn,scope).resolveDataSetParameters(true);
  }
  getDataSetCacheManager().setDataSourceAndDataSet(dataSourceDesign,dataSetDesign,parameterHints,this.appContext);
}
Program: 72268
Project: 72268
Buggy source:
/** 
 * Update data set parameter name from latest data element attributes.
 * @param dataAttrs the latest data element attributes
 * @param setParam the data set parameter
 * @param params the iterator of data set parameters
 * @param retList list contain data set parameter
 */
private void updateROMDataSetParameterName(DataElementAttributes dataAttrs,OdaDataSetParameter setParam,List retList){
  if (dataAttrs == null)   return;
  String nativeName=dataAttrs.getName();
  String name=setParam.getName();
  if (StringUtil.isBlank(name)) {
    setParam.setName(nativeName);
  }
  setParam.setNativeName(nativeName);
}

Fixed version (ground truth):
/** 
 * Update data set parameter name from latest data element attributes.
 * @param dataAttrs the latest data element attributes
 * @param setParam the data set parameter
 * @param params the iterator of data set parameters
 * @param retList list contain data set parameter
 */
private void updateROMDataSetParameterName(DataElementAttributes dataAttrs,OdaDataSetParameter setParam,List retList){
  if (dataAttrs == null)   return;
  String nativeName=dataAttrs.getName();
  String name=setParam.getName();
  if (StringUtil.isBlank(name) || !name.equalsIgnoreCase(nativeName)) {
    setParam.setName(nativeName);
  }
  setParam.setNativeName(nativeName);
}
Program: 72269
Project: 72269
Buggy source:
/** 
 * Tests the 'bidiTextDirection' style in TOC.
 * @throws Exception
 */
public void testTOC() throws Exception {
  openDesign(IN_FILE_NAME);
  LabelHandle label=designHandle.getElementFactory().newLabel(null);
  Object defaultDir=design.getProperty(design,ORIENTATION);
  testPropertyFromSelector(label,false,true);
  designHandle.getBody().add(label);
  testPropertyFromSelector(label,designHandle.isDirectionRTL(),true);
  label.setTocExpression("String_Node_Str");
  TOCHandle tocHandle=label.getTOC();
  CommandStack stack=designHandle.getCommandStack();
  stack.startTrans(null);
  StyleHandle style=designHandle.getElementFactory().newStyle("String_Node_Str");
  style.setTextDirection(LTR);
  designHandle.getStyles().add(style);
  tocHandle.setStyleName(style.getName());
  stack.commit();
  assertEquals(style.getTextDirection(),tocHandle.getTextDirection());
  stack.undo();
  designHandle.getStyles().add(style);
  tocHandle.setStyleName(style.getName());
  assertEquals(style.getTextDirection(),tocHandle.getTextDirection());
  stack.undo();
}

Fixed version (ground truth):
/** 
 * Tests the 'bidiTextDirection' style in TOC.
 * @throws Exception
 */
public void testTOC() throws Exception {
  openDesign(IN_FILE_NAME);
  LabelHandle label=designHandle.getElementFactory().newLabel(null);
  String defaultDir=designHandle.getStringProperty(ORIENTATION);
  testPropertyFromSelector(label,false,true);
  designHandle.getBody().add(label);
  testPropertyFromSelector(label,designHandle.isDirectionRTL(),true);
  label.setTocExpression("String_Node_Str");
  TOCHandle tocHandle=label.getTOC();
  CommandStack stack=designHandle.getCommandStack();
  stack.startTrans(null);
  StyleHandle style=designHandle.getElementFactory().newStyle("String_Node_Str");
  style.setTextDirection(LTR);
  designHandle.getStyles().add(style);
  tocHandle.setStyleName(style.getName());
  stack.commit();
  assertEquals(style.getTextDirection(),tocHandle.getTextDirection());
  stack.undo();
  designHandle.getStyles().add(style);
  tocHandle.setStyleName(style.getName());
  assertEquals(style.getTextDirection(),tocHandle.getTextDirection());
  stack.undo();
}
Program: 72270
Project: 72270
Buggy source:
/** 
 * Test highlight writer.
 * @throws Exception any exception during reading/writting the design file.
 */
public void testWriteHighlightRules() throws Exception {
  openDesign(IN_FILE_NAME_1);
  StyleHandle styleHandle=designHandle.findStyle("String_Node_Str");
  Iterator highlightHandles=styleHandle.highlightRulesIterator();
  assertNotNull(highlightHandles);
  HighlightRuleHandle highlightHandle=(HighlightRuleHandle)highlightHandles.next();
  try {
    highlightHandle.setTextDirection("String_Node_Str");
    fail();
  }
 catch (  PropertyValueException e) {
    assertEquals(e.getErrorCode(),PropertyValueException.DESIGN_EXCEPTION_CHOICE_NOT_FOUND);
  }
  highlightHandle.setTextDirection(LTR);
  highlightHandle=(HighlightRuleHandle)highlightHandles.next();
  assertNotNull(highlightHandle);
  highlightHandle.setTextDirection(RTL);
  assertEquals(RTL,highlightHandle.getTextDirection());
  save();
}

Fixed version (ground truth):
/** 
 * Test highlight writer.
 * @throws Exception any exception during reading/writting the design file.
 */
public void testWriteHighlightRules() throws Exception {
  openDesign(IN_FILE_NAME_1);
  StyleHandle styleHandle=designHandle.findStyle("String_Node_Str");
  Iterator highlightHandles=styleHandle.highlightRulesIterator();
  assertNotNull(highlightHandles);
  HighlightRuleHandle highlightHandle=(HighlightRuleHandle)highlightHandles.next();
  try {
    highlightHandle.setTextDirection("String_Node_Str");
    fail();
  }
 catch (  PropertyValueException e) {
    assertEquals(e.getErrorCode(),PropertyValueException.DESIGN_EXCEPTION_CHOICE_NOT_FOUND);
  }
  highlightHandle.setTextDirection(LTR);
  highlightHandle=(HighlightRuleHandle)highlightHandles.next();
  assertNotNull(highlightHandle);
  highlightHandle.setTextDirection(RTL);
  assertEquals(RTL,highlightHandle.getTextDirection());
  save();
  assertTrue(compareFile(GOLDEN_FILE_NAME_1));
}
Program: 72271
Project: 72271
Buggy source:
public void init(IEditorSite site,IEditorInput input) throws PartInitException {
  super.init(site,input);
  try {
    reportXMLEditor=new StructuredTextEditor(){
      @Override public void doSave(      IProgressMonitor progressMonitor){
        super.doSave(progressMonitor);
        clearDirtyFlag();
      }
    }
;
    reportXMLEditor.init(site,input);
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
@Override public void init(IEditorSite site,IEditorInput input) throws PartInitException {
  IReportProvider provider=getProvider();
  if (provider != null) {
    setDocumentProvider(provider.getReportDocumentProvider(input));
  }
  super.init(site,input);
}
Program: 72272
Project: 72272
Buggy source:
public IParameterMetaData getParameterMetaData() throws OdaException {
  assertNotNull(callStat);
  if (this.cachedParameterMetaData != null)   return this.cachedParameterMetaData;
  int[] positionArray=paramUtil.getParameterPositions();
  List paramMetaList1=this.getCallableParamMetaData();
  List paramMetaList2=new ArrayList();
  int containsReturnValue=0;
  if (paramMetaList1.size() > 0 && paramUtil.containsReturnValue()) {
    if (((ParameterDefn)paramMetaList1.get(0)).getParamInOutType() == 5) {
      paramMetaList2.add(((ParameterDefn)paramMetaList1.get(0)));
      containsReturnValue++;
    }
  }
  for (int i=0; i < positionArray.length; i++) {
    int index=positionArray[i];
    if (paramMetaList1.size() >= index)     paramMetaList2.add(paramMetaList1.get(index - 1 + containsReturnValue));
 else     throw new OdaException(ResourceConstants.PREPARESTATEMENT_PARAMETER_METADATA_CANNOT_GET);
  }
  cachedParameterMetaData=new SPParameterMetaData(paramMetaList2);
  return cachedParameterMetaData;
}

Fixed version (ground truth):
public IParameterMetaData getParameterMetaData() throws OdaException {
  assertNotNull(callStat);
  if (this.cachedParameterMetaData != null)   return this.cachedParameterMetaData;
  int[] positionArray=paramUtil.getParameterPositions();
  List paramMetaList1=this.getCallableParamMetaData();
  List paramMetaList2=new ArrayList();
  int containsReturnValue=0;
  if (paramMetaList1.size() > 0) {
    if (((ParameterDefn)paramMetaList1.get(0)).getParamInOutType() == 5) {
      if (paramUtil.containsReturnValue())       paramMetaList2.add(((ParameterDefn)paramMetaList1.get(0)));
      containsReturnValue++;
    }
  }
  for (int i=0; i < positionArray.length; i++) {
    int index=positionArray[i];
    if (paramMetaList1.size() >= index)     paramMetaList2.add(paramMetaList1.get(index - 1 + containsReturnValue));
 else     throw new OdaException(ResourceConstants.PREPARESTATEMENT_PARAMETER_METADATA_CANNOT_GET);
  }
  cachedParameterMetaData=new SPParameterMetaData(paramMetaList2);
  return cachedParameterMetaData;
}
Program: 72273
Project: 72273
Buggy source:
public void documentChanged(DocumentEvent event){
  if (isTextListenerEnable) {
    markDirty();
  }
}

Fixed version (ground truth):
public void documentChanged(DocumentEvent event){
  if (isTextListenerEnable) {
    markDirty();
  }
  String text=getEditorText();
  boolean butEnabled=editorUIEnabled && text != null && text.length() > 0;
  butReset.setEnabled(butEnabled);
  butValidate.setEnabled(butEnabled);
}
Program: 72275
Project: 72275
Buggy source:
/** 
 * Creates a new DtE API Computed Column from a model computed column. Could return null if no expression is defined.
 * @throws EngineException
 */
IComputedColumn newComputedColumn(ComputedColumnHandle modelCmptdColumn) throws EngineException {
  if (modelCmptdColumn.getExpression() == null && modelCmptdColumn.getAggregateFunction() == null) {
    throw new EngineException(MessageConstants.MISSING_COMPUTED_COLUMN_EXPRESSION_EXCEPTION,modelCmptdColumn.getName());
  }
  List argumentList=new ArrayList();
  Iterator argumentIter=modelCmptdColumn.argumentsIterator();
  while (argumentIter.hasNext()) {
    argumentList.add(new ScriptExpression(((AggregationArgumentHandle)argumentIter.next()).getValue()));
  }
  return new ComputedColumn(modelCmptdColumn.getName(),modelCmptdColumn.getExpression(),toDteDataType(modelCmptdColumn.getDataType()),modelCmptdColumn.getAggregateFunction(),modelCmptdColumn.getFilterExpression() == null ? null : new ScriptExpression(modelCmptdColumn.getFilterExpression()),argumentList);
}

Fixed version (ground truth):
/** 
 * Creates a new DtE API Computed Column from a model computed column. Could return null if no expression is defined.
 * @throws EngineException
 */
IComputedColumn newComputedColumn(ComputedColumnHandle modelCmptdColumn) throws EngineException {
  if (modelCmptdColumn.getExpression() == null && modelCmptdColumn.getAggregateFunction() == null) {
    throw new EngineException(MessageConstants.MISSING_COMPUTED_COLUMN_EXPRESSION_EXCEPTION,modelCmptdColumn.getName());
  }
  Map argumentList=new HashMap();
  Iterator argumentIter=modelCmptdColumn.argumentsIterator();
  while (argumentIter.hasNext()) {
    AggregationArgumentHandle handle=(AggregationArgumentHandle)argumentIter.next();
    argumentList.put(handle.getName(),new ScriptExpression(handle.getValue()));
  }
  List orderedArgument=new ArrayList();
  try {
    if (modelCmptdColumn.getAggregateFunction() != null) {
      IAggrFunction info=AggregationManager.getInstance().getAggregation(modelCmptdColumn.getAggregateFunction());
      if (info != null) {
        IParameterDefn[] parameters=info.getParameterDefn();
        if (parameters != null) {
          for (int i=0; i < parameters.length; i++) {
            IParameterDefn pInfo=parameters[i];
            if (argumentList.get(pInfo.getName()) != null) {
              orderedArgument.add(argumentList.get(pInfo.getName()));
            }
          }
        }
      }
    }
  }
 catch (  DataException e) {
    throw new EngineException(e.getLocalizedMessage(),e);
  }
  return new ComputedColumn(modelCmptdColumn.getName(),modelCmptdColumn.getExpression(),toDteDataType(modelCmptdColumn.getDataType()),modelCmptdColumn.getAggregateFunction(),modelCmptdColumn.getFilterExpression() == null ? null : new ScriptExpression(modelCmptdColumn.getFilterExpression()),orderedArgument);
}
Program: 72277
Project: 72277
Buggy source:
private void simulateItalic(PdfContentByte cb,float x,float y){
  float alpha=(float)Math.tan(0f * Math.PI / 180);
  float beta=EmitterUtil.getItalicHorizontalCoefficient();
  cb.setTextMatrix(1,alpha,beta,1,x,y);
}

Fixed version (ground truth):
private void simulateItalic(PdfContentByte cb,float x,float y){
  float beta=EmitterUtil.ITALIC_HORIZONTAL_COEFFICIENT;
  cb.setTextMatrix(1,0,beta,1,x,y);
}
Program: 72278
Project: 72278
Buggy source:
public void drawString(String str,float x,float y,FontInfo fontInfo,float letterSpacing,float wordSpacing,Color color,boolean linethrough,boolean overline,boolean underline,CSSValue align){
  y=transformY(y);
  String text=str;
  if (fontInfo != null) {
    BaseFont baseFont=fontInfo.getBaseFont();
    String fontName=baseFont.getPostscriptFontName();
    text=applyFont(fontName,fontInfo.getFontStyle(),fontInfo.getFontSize(),text);
  }
  color=color == null ? Color.black : color;
  outputColor(color);
  out.print(x + "String_Node_Str" + y+ "String_Node_Str");
  out.print(wordSpacing + "String_Node_Str" + letterSpacing+ "String_Node_Str");
  out.println(text + "String_Node_Str");
}

Fixed version (ground truth):
public void drawString(String str,float x,float y,FontInfo fontInfo,float letterSpacing,float wordSpacing,Color color,boolean linethrough,boolean overline,boolean underline,CSSValue align){
  y=transformY(y);
  String text=str;
  String drawCommand="String_Node_Str";
  boolean needSimulateItalic=false;
  if (fontInfo != null) {
    float fontSize=fontInfo.getFontSize();
    int fontStyle=fontInfo.getFontStyle();
    if (fontInfo.getSimulation()) {
      if (fontStyle == Font.BOLD || fontStyle == Font.BOLDITALIC) {
        float offset=(float)(fontSize * Math.log10(fontSize) / 100);
        drawCommand=offset + "String_Node_Str";
      }
      if (fontStyle == Font.ITALIC || fontStyle == Font.BOLDITALIC) {
        needSimulateItalic=true;
      }
    }
    BaseFont baseFont=fontInfo.getBaseFont();
    String fontName=baseFont.getPostscriptFontName();
    text=applyFont(fontName,fontStyle,fontSize,text);
  }
  color=color == null ? Color.black : color;
  outputColor(color);
  out.print(x + "String_Node_Str" + y+ "String_Node_Str");
  out.print(wordSpacing + "String_Node_Str" + letterSpacing+ "String_Node_Str");
  out.println(text + "String_Node_Str" + needSimulateItalic+ "String_Node_Str"+ drawCommand);
}
Program: 72279
Project: 72279
Buggy source:
/** 
 * @param parent
 * @return
 */
public static ClassLoader getCustomScriptClassLoader(ClassLoader parent){
  String classPath=System.getProperty("String_Node_Str");
  if (classPath == null || classPath.length() == 0)   return parent;
  String[] classPathArray=classPath.split(File.pathSeparator,-1);
  int count=classPathArray.length;
  URL[] urls=new URL[count];
  for (int i=0; i < count; i++) {
    File file=new File(classPathArray[i]);
    try {
      urls[i]=file.toURL();
    }
 catch (    MalformedURLException e) {
      urls[i]=null;
    }
  }
  return new URLClassLoader(urls,parent);
}

Fixed version (ground truth):
/** 
 * @param parent
 * @return
 */
public static ClassLoader getCustomScriptClassLoader(ClassLoader parent){
  List<URL> urls=getClassPathURLs();
  if (urls.size() == 0)   return parent;
  return new URLClassLoader(urls.toArray(new URL[0]),parent);
}
Program: 72280
Project: 72280
Buggy source:
public IQueryResults executeQuery(IQueryDefinition queryDefn,Iterator paramBindingIt,Iterator filterIt,Iterator bindingIt) throws BirtException {
  return new QueryExecutionHelper(this.dataEngine,this.modelAdaptor,this.sessionContext).executeQuery(queryDefn,paramBindingIt,filterIt,bindingIt);
}

Fixed version (ground truth):
public IQueryResults executeQuery(IQueryDefinition queryDefn,Iterator paramBindingIt,Iterator filterIt,Iterator bindingIt) throws BirtException {
  return new QueryExecutionHelper(this.dataEngine,this.modelAdaptor,this.sessionContext).executeQuery(queryDefn,paramBindingIt,filterIt,bindingIt,this.sessionContext.getTopScope());
}
Program: 72281
Project: 72281
Buggy source:
IQueryResults executeQuery(IQueryDefinition queryDefn,Iterator paramBindingIt,Iterator filterIt,Iterator bindingIt,boolean keepDataSetFilter,boolean disAllowAggregation) throws BirtException {
  defineDataSourceDataSet(queryDefn,keepDataSetFilter,disAllowAggregation);
  populateQueryDefn(queryDefn,paramBindingIt,filterIt,bindingIt,disAllowAggregation);
  return dataEngine.prepare(queryDefn,sessionContext.getAppContext()).execute(null);
}

Fixed version (ground truth):
IQueryResults executeQuery(IQueryDefinition queryDefn,Iterator paramBindingIt,Iterator filterIt,Iterator bindingIt,boolean keepDataSetFilter,boolean disAllowAggregation,Scriptable scope) throws BirtException {
  defineDataSourceDataSet(queryDefn,keepDataSetFilter,disAllowAggregation);
  populateQueryDefn(queryDefn,paramBindingIt,filterIt,bindingIt,disAllowAggregation);
  return dataEngine.prepare(queryDefn,sessionContext.getAppContext()).execute(scope);
}
Program: 72282
Project: 72282
Buggy source:
private int getActualPageBodySize(PageArea page,int direction){
  int pref=0;
  IContainerArea body=page.getBody();
  if (body == null) {
    return 0;
  }
  Iterator iter=page.getBody().getChildren();
  while (iter.hasNext()) {
    AbstractArea area=(AbstractArea)iter.next();
    if (direction == BODY_HEIGHT) {
      pref=Math.max(pref,area.getAllocatedHeight());
    }
 else {
      pref=Math.max(pref,area.getAllocatedWidth());
    }
  }
  return pref;
}

Fixed version (ground truth):
private int getActualPageBodySize(PageArea page,int direction){
  int pref=0;
  IContainerArea body=page.getBody();
  if (body == null) {
    return 0;
  }
  Iterator iter=page.getBody().getChildren();
  while (iter.hasNext()) {
    AbstractArea area=(AbstractArea)iter.next();
    if (direction == BODY_HEIGHT) {
      pref=Math.max(pref,area.getAllocatedY() + area.getAllocatedHeight());
    }
 else {
      pref=Math.max(pref,area.getAllocatedY() + area.getAllocatedWidth());
    }
  }
  return pref;
}
Program: 72283
Project: 72283
Buggy source:
public void render() throws Exception {
  setupRenderOption();
  IContentEmitter emitter=createContentEmitter();
  String format=executionContext.getOutputFormat();
  IReportExecutor executor=new ReportletExecutor(executionContext,offset);
  executor=new SuppressDuplciateReportExecutor(executor);
  executor=new LocalizedReportExecutor(executionContext,executor);
  executionContext.setExecutor(executor);
  initializeContentEmitter(emitter,executor);
  IReportLayoutEngine layoutEngine=createReportLayoutEngine(pagination,renderOptions);
  layoutEngine.setLocale(executionContext.getLocale());
  if (ExtensionManager.PAPER_SIZE_PAGINATION.equals(pagination)) {
    OnPageBreakLayoutPageHandle handle=new OnPageBreakLayoutPageHandle(executionContext);
    layoutEngine.setPageHandler(handle);
    CompositeContentEmitter outputEmitters=new CompositeContentEmitter(format);
    outputEmitters.addEmitter(emitter);
    outputEmitters.addEmitter(handle.getEmitter());
    emitter=outputEmitters;
  }
  startRender();
  IReportContent report=executor.execute();
  emitter.start(report);
  layoutEngine.layout(executor,report,emitter,false);
  layoutEngine.close();
  emitter.end(report);
  closeRender();
  executor.close();
  pageCount=layoutEngine.getPageCount();
}

Fixed version (ground truth):
public void render() throws Exception {
  setupRenderOption();
  IContentEmitter emitter=createContentEmitter();
  String format=executionContext.getOutputFormat();
  IReportExecutor executor=new ReportletExecutor(executionContext,offset);
  executor=new SuppressDuplciateReportExecutor(executor);
  executor=new LocalizedReportExecutor(executionContext,executor);
  executionContext.setExecutor(executor);
  initializeContentEmitter(emitter,executor);
  IReportLayoutEngine layoutEngine=createReportLayoutEngine(pagination,renderOptions);
  layoutEngine.setLocale(executionContext.getLocale());
  if (ExtensionManager.PAPER_SIZE_PAGINATION.equals(pagination)) {
    OnPageBreakLayoutPageHandle handle=new OnPageBreakLayoutPageHandle(executionContext);
    layoutEngine.setPageHandler(handle);
    CompositeContentEmitter outputEmitters=new CompositeContentEmitter(format);
    outputEmitters.addEmitter(new PDFLayoutEmitter(emitter,renderOptions,executionContext.getLocale(),totalPage));
    outputEmitters.addEmitter(handle.getEmitter());
    emitter=outputEmitters;
  }
  startRender();
  IReportContent report=executor.execute();
  emitter.start(report);
  layoutEngine.layout(executor,report,emitter,false);
  layoutEngine.close();
  emitter.end(report);
  closeRender();
  executor.close();
  pageCount=layoutEngine.getPageCount();
}
Program: 72284
Project: 72284
Buggy source:
public void writeAlignment(String horizontal,String vertical,String direction,boolean wrapText){
  writer.openTag("String_Node_Str");
  if (isValid(horizontal)) {
    writer.attribute("String_Node_Str",horizontal);
  }
  if (isValid(vertical)) {
    writer.attribute("String_Node_Str",vertical);
  }
  if (isValid(direction)) {
    if (BIRTConstants.BIRT_RTL_VALUE.equals(direction))     writer.attribute("String_Node_Str","String_Node_Str");
 else     writer.attribute("String_Node_Str","String_Node_Str");
  }
  if (wrapText) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
public void writeAlignment(String horizontal,String vertical,String direction,boolean wrapText){
  writer.openTag("String_Node_Str");
  if (isValid(horizontal)) {
    writer.attribute("String_Node_Str",horizontal);
  }
  if (isValid(vertical)) {
    writer.attribute("String_Node_Str",vertical);
  }
  if (isValid(direction)) {
    if (CSSConstants.CSS_RTL_VALUE.equals(direction))     writer.attribute("String_Node_Str","String_Node_Str");
 else     writer.attribute("String_Node_Str","String_Node_Str");
  }
  if (wrapText) {
    writer.attribute("String_Node_Str","String_Node_Str");
  }
  writer.closeTag("String_Node_Str");
}
Program: 72285
Project: 72285
Buggy source:
protected void initialize(){
  createRoot();
  maxAvaWidth=parent.getCurrentMaxContentWidth();
  maxAvaHeight=parent.getCurrentMaxContentHeight();
  root.setWidth(parent.getCurrentMaxContentWidth());
  lineHeight=((BlockStackingLayout)parent).getLineHeight();
  if (parent.content != null) {
    if (BIRTConstants.BIRT_RTL_VALUE.equals(parent.content.getComputedStyle().getDirection()))     baseLevel=Bidi.DIRECTION_RIGHT_TO_LEFT;
  }
}

Fixed version (ground truth):
protected void initialize(){
  createRoot();
  maxAvaWidth=parent.getCurrentMaxContentWidth();
  maxAvaHeight=parent.getCurrentMaxContentHeight();
  root.setWidth(parent.getCurrentMaxContentWidth());
  lineHeight=((BlockStackingLayout)parent).getLineHeight();
  if (parent.content != null) {
    if (CSSConstants.CSS_RTL_VALUE.equals(parent.content.getComputedStyle().getDirection()))     baseLevel=Bidi.DIRECTION_RIGHT_TO_LEFT;
  }
}
Program: 72286
Project: 72286
Buggy source:
public ChunkGenerator(FontMappingManager fontManager,ITextContent textContent,boolean bidiProcessing,boolean fontSubstitution){
  this.fontManager=fontManager;
  this.textContent=textContent;
  this.text=textContent.getText();
  this.bidiProcessing=bidiProcessing;
  this.fontSubstitution=fontSubstitution;
  if (text == null || text.length() == 0)   return;
  if (bidiProcessing) {
    if (BIRTConstants.BIRT_RTL_VALUE.equals(textContent.getComputedStyle().getDirection())) {
      bidiSplitter=new BidiSplitter(new Chunk(text,0,Bidi.DIRECTION_RIGHT_TO_LEFT,Bidi.DIRECTION_RIGHT_TO_LEFT));
    }
 else {
      bidiSplitter=new BidiSplitter(new Chunk(text,0,Bidi.DIRECTION_LEFT_TO_RIGHT,Bidi.DIRECTION_LEFT_TO_RIGHT));
    }
  }
  if (null == bidiSplitter) {
    fontSplitter=new FontSplitter(fontManager,new Chunk(text),textContent,fontSubstitution);
  }
 else {
    if (bidiSplitter.hasMore()) {
      fontSplitter=new FontSplitter(fontManager,bidiSplitter.getNext(),textContent,fontSubstitution);
    }
  }
}

Fixed version (ground truth):
public ChunkGenerator(FontMappingManager fontManager,ITextContent textContent,boolean bidiProcessing,boolean fontSubstitution){
  this.fontManager=fontManager;
  this.textContent=textContent;
  this.text=textContent.getText();
  this.bidiProcessing=bidiProcessing;
  this.fontSubstitution=fontSubstitution;
  if (text == null || text.length() == 0)   return;
  if (bidiProcessing) {
    if (CSSConstants.CSS_RTL_VALUE.equals(textContent.getComputedStyle().getDirection())) {
      bidiSplitter=new BidiSplitter(new Chunk(text,0,Bidi.DIRECTION_RIGHT_TO_LEFT,Bidi.DIRECTION_RIGHT_TO_LEFT));
    }
 else {
      bidiSplitter=new BidiSplitter(new Chunk(text,0,Bidi.DIRECTION_LEFT_TO_RIGHT,Bidi.DIRECTION_LEFT_TO_RIGHT));
    }
  }
  if (null == bidiSplitter) {
    fontSplitter=new FontSplitter(fontManager,new Chunk(text),textContent,fontSubstitution);
  }
 else {
    if (bidiSplitter.hasMore()) {
      fontSplitter=new FontSplitter(fontManager,bidiSplitter.getNext(),textContent,fontSubstitution);
    }
  }
}
Program: 72287
Project: 72287
Buggy source:
private int getActualPageBodyHeight(PageArea page){
  int prefHeight=0;
  Iterator iter=page.getBody().getChildren();
  while (iter.hasNext()) {
    AbstractArea area=(AbstractArea)iter.next();
    prefHeight=Math.max(prefHeight,area.getAllocatedHeight());
  }
  return prefHeight;
}

Fixed version (ground truth):
private int getActualPageBodyHeight(PageArea page){
  return getActualPageBodySize(page,BODY_HEIGHT);
}
Program: 72288
Project: 72288
Buggy source:
/** 
 * Creates a page in given output format.
 * @param page	a layout page.
 */
protected void addPage(PageArea page){
  newPage(page);
  currentX=0;
  currentY=0;
  startContainer(page.getRoot());
  visitContainer(page.getHeader());
  visitContainer(page.getFooter());
  startContainer(page.getBody());
  enterBody();
  visitChildren(page.getBody());
  exitBody();
  endContainer(page.getBody());
  endContainer(page.getRoot());
  endContainer(page);
}

Fixed version (ground truth):
/** 
 * Creates a page in given output format.
 * @param page	a layout page.
 */
protected void addPage(PageArea page){
  newPage(page);
  currentX=0;
  currentY=0;
  IContainerArea pageRoot=page.getRoot();
  if (pageRoot != null) {
    startContainer(page.getRoot());
    IContainerArea pageHeader=page.getHeader();
    if (pageHeader != null) {
      visitContainer(pageHeader);
    }
    IContainerArea pageFooter=page.getFooter();
    if (pageFooter != null) {
      visitContainer(pageFooter);
    }
    IContainerArea pageBody=page.getBody();
    if (pageBody != null) {
      startContainer(pageBody);
      enterBody();
      visitChildren(pageBody);
      exitBody();
      endContainer(pageBody);
    }
    endContainer(page.getRoot());
  }
  endContainer(page);
}
Program: 72290
Project: 72290
Buggy source:
private int getActualPageBodyWidth(PageArea page){
  int prefWidth=0;
  Iterator iter=page.getBody().getChildren();
  while (iter.hasNext()) {
    AbstractArea area=(AbstractArea)iter.next();
    prefWidth=Math.max(prefWidth,area.getAllocatedWidth());
  }
  return prefWidth;
}

Fixed version (ground truth):
private int getActualPageBodyWidth(PageArea page){
  return getActualPageBodySize(page,BODY_WIDTH);
}
Program: 72291
Project: 72291
Buggy source:
/** 
 * Initializes the Jdbc related information , used  by this page ( such as the Jdbc Connection , Catalog Name etc )
 */
protected void initialJdbcInfo(){
  createMetaDataProvider();
  jdbcConnection=connectMetadataProvider(metaDataProvider,this.getDataSetDesign().getDataSourceDesign());
  this.odaConnectionProvider.connect();
  try {
    if (jdbcConnection != null) {
      isSchemaSupported=metaDataProvider.isSchemaSupported();
    }
  }
 catch (  Exception e) {
    ExceptionHandler.showException(this.getShell(),JdbcPlugin.getResourceString("String_Node_Str"),e.getLocalizedMessage(),e);
  }
}

Fixed version (ground truth):
/** 
 * Initializes the Jdbc related information , used  by this page ( such as the Jdbc Connection , Catalog Name etc )
 */
protected void initialJdbcInfo(){
  createMetaDataProvider();
  jdbcConnection=connectMetadataProvider(metaDataProvider,this.getDataSetDesign().getDataSourceDesign());
  if (jdbcConnection != null) {
    try {
      isSchemaSupported=metaDataProvider.isSchemaSupported();
      this.odaConnectionProvider.connect();
    }
 catch (    Exception e) {
      logger.log(Level.WARNING,e.getMessage(),e);
    }
  }
}