nus-yam/ex-repair huggingface dataset:
Program: 74870
Project: 74870
Buggy source:
/** 
 * If miss parameter.
 * @return boolean
 */
public boolean isMissingParameter(){
  boolean missingParameter=false;
  ModuleHandle model=SessionHandleAdapter.getInstance().getReportDesignHandle();
  HashMap params=(HashMap)this.getConfigVars();
  List parameters=model.getFlattenParameters();
  if (parameters != null) {
    for (int i=0; i < parameters.size(); i++) {
      if (parameters.get(i) instanceof ScalarParameterHandle) {
        ScalarParameterHandle parameter=((ScalarParameterHandle)parameters.get(i));
        if (parameter.isHidden()) {
          continue;
        }
        String paramValue=null;
        if (params != null && params.containsKey(parameter.getName())) {
          Object curVal=params.get(parameter.getName());
          if (curVal != null)           paramValue=curVal.toString();
        }
        if (paramValue == null && !parameter.allowNull()) {
          missingParameter=true;
          break;
        }
        if (paramValue != null && paramValue.trim().length() <= 0 && !parameter.allowBlank() && parameter.getDataType().equalsIgnoreCase(DesignChoiceConstants.PARAM_TYPE_STRING)) {
          missingParameter=true;
          break;
        }
      }
    }
  }
  return missingParameter;
}

Fixed version (ground truth):
/** 
 * If miss parameter.
 * @return boolean
 */
public boolean isMissingParameter(){
  boolean missingParameter=false;
  ModuleHandle model=SessionHandleAdapter.getInstance().getReportDesignHandle();
  HashMap params=(HashMap)this.getConfigVars();
  List parameters=model.getFlattenParameters();
  if (parameters != null) {
    for (int i=0; i < parameters.size(); i++) {
      if (parameters.get(i) instanceof ScalarParameterHandle) {
        ScalarParameterHandle parameter=((ScalarParameterHandle)parameters.get(i));
        if (parameter.isHidden() || !parameter.isRequired()) {
          continue;
        }
        if (params == null) {
          missingParameter=true;
          break;
        }
        Object valueObj=params.get(parameter.getName());
        if (valueObj == null) {
          missingParameter=true;
          break;
        }
        if (valueObj instanceof List) {
          List values=(List)valueObj;
          for (int j=0; j < values.size(); j++) {
            Object value=values.get(j);
            if (value == null) {
              missingParameter=true;
              break;
            }
            if (DesignChoiceConstants.PARAM_TYPE_STRING.equalsIgnoreCase(parameter.getDataType()) && ((String)value).length() <= 0) {
              missingParameter=true;
              break;
            }
          }
          if (missingParameter)           break;
        }
 else {
          if (DesignChoiceConstants.PARAM_TYPE_STRING.equalsIgnoreCase(parameter.getDataType()) && ((String)valueObj).length() <= 0) {
            missingParameter=true;
            break;
          }
        }
      }
    }
  }
  return missingParameter;
}
Program: 74871
Project: 74871
Buggy source:
public boolean addArea(IArea area,boolean keepWithPrevious,boolean keepWithNext){
  if (area == null) {
    return true;
  }
  keepWith=keepWith || keepWithNext || pageBreakAvoid;
  if (!keepWith && !keepWithPrevious) {
    clearCache();
  }
  AbstractArea aArea=(AbstractArea)area;
  if (keepWithCache.getHeight() + aArea.getAllocatedHeight() + getCurrentBP() > getMaxAvaHeight()) {
    context.setAutoPageBreak(true);
    return false;
  }
 else {
    if (keepWithPrevious || keepWith) {
      keepWithCache.add(area);
    }
 else {
      addToRoot(aArea);
    }
  }
  keepWith=keepWithNext;
  return true;
}

Fixed version (ground truth):
public boolean addArea(IArea area,boolean keepWithPrevious,boolean keepWithNext){
  if (area == null) {
    return true;
  }
  keepWith=keepWith || keepWithNext || pageBreakAvoid;
  if (!keepWith && !keepWithPrevious) {
    clearCache();
  }
  AbstractArea aArea=(AbstractArea)area;
  if (keepWithCache.getHeight() + aArea.getAllocatedHeight() + getCurrentBP() > getMaxAvaHeight()) {
    context.setAutoPageBreak(true);
    return false;
  }
 else {
    if (keepWithPrevious || keepWith) {
      keepWithCache.add(area);
    }
 else {
      addToRoot(aArea);
    }
  }
  keepWith=keepWithNext;
  if (!keepWith) {
    clearCache();
  }
  return true;
}
Program: 74872
Project: 74872
Buggy source:
/** 
 * Constructs an instance, setting main expression, a unary operator, and its Collection operand
 */
public ConditionalExpression(String expr,int operator,List operand){
  this.expr=new ScriptExpression(expr);
  this.operator=operator;
  this.op1=new CombinedExpression(operand);
  this.op2=null;
}

Fixed version (ground truth):
/** 
 * @param expr
 * @param operator
 * @param operand
 * @param operand2
 */
public ConditionalExpression(String expr,int operator,List operand,String operand2){
  this.expr=new ScriptExpression(expr);
  this.operator=operator;
  this.op1=new CombinedExpression(operand);
  this.op2=newJSExpression(operand2);
}
Program: 74873
Project: 74873
Buggy source:
/** 
 * @param result
 * @param key
 * @throws EngineException 
 */
private void addConditionalExprBindings(TotalExprBinding result,IConditionalExpression key,List bindings,String groupName) throws EngineException {
  try {
    IConditionalExpression ce=key;
    String expr=getExprText(ce.getExpression());
    String oprand1=getExprText(ce.getOperand1());
    String oprand2=getExprText(ce.getOperand2());
    if (!org.eclipse.birt.core.data.ExpressionUtil.hasAggregation(expr) && !org.eclipse.birt.core.data.ExpressionUtil.hasAggregation(oprand1) && !org.eclipse.birt.core.data.ExpressionUtil.hasAggregation(oprand2)) {
      result.addNewExpression(ce);
      return;
    }
    if (groupName != null)     ce.setGroupName(groupName);
    String bindingName=TOTAL_PREFIX + totalColumnSuffix;
    totalColumnSuffix++;
    Binding columnBinding=new Binding(bindingName,ce);
    if (groupName != null) {
      columnBinding.addAggregateOn(groupName);
    }
    List allColumnBindings=new ArrayList();
    allColumnBindings.add(columnBinding);
    result.addColumnBindings(allColumnBindings);
    result.addNewExpression(org.eclipse.birt.core.data.ExpressionUtil.createJSRowExpression(bindingName));
  }
 catch (  DataException e) {
    throw new EngineException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
/** 
 * @param result
 * @param key
 * @throws EngineException 
 */
private void addConditionalExprBindings(TotalExprBinding result,IConditionalExpression key,List bindings,String groupName) throws EngineException {
  try {
    IConditionalExpression ce=key;
    if (hasAggregationInFilter(key)) {
      result.addNewExpression(ce);
      return;
    }
    if (groupName != null)     ce.setGroupName(groupName);
    String bindingName=TOTAL_PREFIX + totalColumnSuffix;
    totalColumnSuffix++;
    Binding columnBinding=new Binding(bindingName,ce);
    if (groupName != null) {
      columnBinding.addAggregateOn(groupName);
    }
    List allColumnBindings=new ArrayList();
    allColumnBindings.add(columnBinding);
    result.addColumnBindings(allColumnBindings);
    result.addNewExpression(org.eclipse.birt.core.data.ExpressionUtil.createJSRowExpression(bindingName));
  }
 catch (  DataException e) {
    throw new EngineException(e.getLocalizedMessage());
  }
}
Program: 74874
Project: 74874
Buggy source:
/** 
 * When a TopN/TopPercent/BottomN/BottomPercent ConditionalExpression is set, transform it to Total.TopN/Total.TopPercent/Total.BottomN/Total.BottomPercent aggregations with "isTrue" operator.
 * @param ce
 * @return
 */
public static IConditionalExpression transformConditionalExpression(IConditionalExpression ce){
  String prefix=null;
switch (ce.getOperator()) {
case IConditionalExpression.OP_TOP_N:
    prefix="String_Node_Str";
  break;
case IConditionalExpression.OP_TOP_PERCENT:
prefix="String_Node_Str";
break;
case IConditionalExpression.OP_BOTTOM_N:
prefix="String_Node_Str";
break;
case IConditionalExpression.OP_BOTTOM_PERCENT:
prefix="String_Node_Str";
break;
}
if (prefix != null) {
ce=new ConditionalExpression(prefix + "String_Node_Str" + ce.getExpression().getText()+ "String_Node_Str"+ ce.getOperand1().getText()+ "String_Node_Str",IConditionalExpression.OP_TRUE);
}
return ce;
}

Fixed version (ground truth):
/** 
 * When a TopN/TopPercent/BottomN/BottomPercent ConditionalExpression is set, transform it to Total.TopN/Total.TopPercent/Total.BottomN/Total.BottomPercent aggregations with "isTrue" operator.
 * @param ce
 * @return
 */
public static IConditionalExpression transformConditionalExpression(IConditionalExpression ce){
  String prefix=null;
switch (ce.getOperator()) {
case IConditionalExpression.OP_TOP_N:
    prefix="String_Node_Str";
  break;
case IConditionalExpression.OP_TOP_PERCENT:
prefix="String_Node_Str";
break;
case IConditionalExpression.OP_BOTTOM_N:
prefix="String_Node_Str";
break;
case IConditionalExpression.OP_BOTTOM_PERCENT:
prefix="String_Node_Str";
break;
}
if (prefix != null) {
ce=new ConditionalExpression(prefix + "String_Node_Str" + ce.getExpression().getText()+ "String_Node_Str"+ ((IScriptExpression)ce.getOperand1()).getText()+ "String_Node_Str",IConditionalExpression.OP_TRUE);
}
return ce;
}
Program: 74875
Project: 74875
Buggy source:
/** 
 * evaluate conditional expression. A conditional expression can have an operator, one LHS expression, and up to two expressions on RHS, i.e., testExpr operator operand1 operand2 or testExpr between 1 20 Now only support comparison between the same data type
 * @param expr the conditional expression to be evaluated
 * @return a boolean value (as an Object)
 */
public Object evaluateCondExpr(IConditionalExpression expr){
  int operator=expr.getOperator();
  IScriptExpression testExpr=expr.getExpression();
  IScriptExpression v1=expr.getOperand1();
  IScriptExpression v2=expr.getOperand2();
  if (testExpr == null)   return Boolean.FALSE;
  Object testExprValue=evaluate(testExpr.getText());
  if (IConditionalExpression.OP_NONE == operator) {
    return testExprValue;
  }
  Object vv1=null;
  Object vv2=null;
  if (v1 != null) {
    vv1=evaluate(v1.getText());
  }
  if (v2 != null) {
    vv2=evaluate(v2.getText());
  }
  try {
    return ScriptEvalUtil.evalConditionalExpr(testExprValue,expr.getOperator(),vv1,vv2);
  }
 catch (  Exception e) {
    log.log(Level.SEVERE,e.getMessage(),e);
    addException(new EngineException(MessageConstants.INVALID_EXPRESSION_ERROR,expr,e));
    return Boolean.FALSE;
  }
}

Fixed version (ground truth):
/** 
 * evaluate conditional expression. A conditional expression can have an operator, one LHS expression, and up to two expressions on RHS, i.e., testExpr operator operand1 operand2 or testExpr between 1 20 Now only support comparison between the same data type
 * @param expr the conditional expression to be evaluated
 * @return a boolean value (as an Object)
 */
public Object evaluateCondExpr(IConditionalExpression expr){
  IScriptExpression testExpr=expr.getExpression();
  if (testExpr == null)   return Boolean.FALSE;
  try {
    return ScriptEvalUtil.evalExpr(expr,scriptContext.getContext(),scriptContext.getScope(),null,0);
  }
 catch (  Exception e) {
    log.log(Level.SEVERE,e.getMessage(),e);
    addException(new EngineException(MessageConstants.INVALID_EXPRESSION_ERROR,expr,e));
    return Boolean.FALSE;
  }
}
Program: 74876
Project: 74876
Buggy source:
/** 
 * @param edge
 * @param target
 * @return
 */
private boolean isLeafLevel(IEdgeDefinition edge,DimLevel target){
  IDimensionDefinition dim=(IDimensionDefinition)edge.getDimensions().get(edge.getDimensions().size() - 1);
  if (dim.getName().equals(target.getDimensionName())) {
    IHierarchyDefinition hier=(IHierarchyDefinition)dim.getHierarchy().get(0);
    ILevelDefinition level=(ILevelDefinition)hier.getLevels().get(hier.getLevels().size() - 1);
    if (target.getLevelName().equals(level.getName()))     return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @param edge
 * @param target
 * @return
 */
private boolean isLeafLevel(IEdgeDefinition edge,DimLevel target){
  if (edge == null)   return false;
  IDimensionDefinition dim=(IDimensionDefinition)edge.getDimensions().get(edge.getDimensions().size() - 1);
  if (dim.getName().equals(target.getDimensionName())) {
    IHierarchyDefinition hier=(IHierarchyDefinition)dim.getHierarchy().get(0);
    ILevelDefinition level=(ILevelDefinition)hier.getLevels().get(hier.getLevels().size() - 1);
    if (target.getLevelName().equals(level.getName()))     return true;
  }
  return false;
}
Program: 74878
Project: 74878
Buggy source:
/** 
 * Constructs an instance, setting main expression, a binary operator, and its two operands The operator parameter contains a String operator defined in Model
 */
public ConditionAdapter(String mainExpr,String operator,String operand1,String operand2){
  super(mainExpr,operatorFromModel(operator),operand1,operand2);
}

Fixed version (ground truth):
/** 
 * @param mainExpr
 * @param operator
 * @param operands
 */
public ConditionAdapter(String mainExpr,String operator,List operands){
  super(mainExpr,org.eclipse.birt.report.data.adapter.api.DataAdapterUtil.adaptModelFilterOperator(operator),operands);
}
Program: 74879
Project: 74879
Buggy source:
public IConditionalExpression createConditionalExpression(String testExpression,String operator,String value1,String value2){
  ConditionalExpression expression=new ConditionalExpression(testExpression,toDteFilterOperator(operator),value1,value2);
  return ExpressionUtil.transformConditionalExpression(expression);
}

Fixed version (ground truth):
public IConditionalExpression createConditionalExpression(String testExpression,String operator,String value1,String value2){
  ConditionalExpression expression=new ConditionalExpression(testExpression,DataAdapterUtil.adaptModelFilterOperator(operator),value1,value2);
  return ExpressionUtil.transformConditionalExpression(expression);
}
Program: 74880
Project: 74880
Buggy source:
/** 
 * Creates a new DtE API IJSExprFilter or IColumnFilter from a model's filter condition. Could return null if no expression nor column operator is defined.
 */
IFilterDefinition newFilter(FilterConditionHandle modelFilter){
  String filterExpr=modelFilter.getExpr();
  if (filterExpr == null || filterExpr.length() == 0)   return null;
  String filterOpr=modelFilter.getOperator();
  if (filterOpr == null || filterOpr.length() == 0)   return new FilterDefinition(new ScriptExpression(filterExpr));
  String column=filterExpr;
  int dteOpr=toDteFilterOperator(filterOpr);
  String operand1=modelFilter.getValue1();
  String operand2=modelFilter.getValue2();
  return new FilterDefinition(new ConditionalExpression(column,dteOpr,operand1,operand2));
}

Fixed version (ground truth):
/** 
 * Creates a new DtE API IJSExprFilter or IColumnFilter from a model's filter condition. Could return null if no expression nor column operator is defined.
 */
IFilterDefinition newFilter(FilterConditionHandle modelFilter){
  String filterExpr=modelFilter.getExpr();
  if (filterExpr == null || filterExpr.length() == 0)   return null;
  String filterOpr=modelFilter.getOperator();
  if (filterOpr == null || filterOpr.length() == 0)   return new FilterDefinition(new ScriptExpression(filterExpr));
  String column=filterExpr;
  int dteOpr=toDteFilterOperator(filterOpr);
  if (dteOpr == IConditionalExpression.OP_IN || dteOpr == IConditionalExpression.OP_NOT_IN) {
    List operands=modelFilter.getValue1List();
    return new FilterDefinition(new ConditionalExpression(column,dteOpr,operands));
  }
 else {
    String operand1=modelFilter.getValue1();
    String operand2=modelFilter.getValue2();
    return new FilterDefinition(new ConditionalExpression(column,dteOpr,operand1,operand2));
  }
}
Program: 74881
Project: 74881
Buggy source:
public static int toDteDataType(String modelDataType){
  if (modelDataType == null)   return DataType.UNKNOWN_TYPE;
  if (modelDataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_ANY))   return DataType.ANY_TYPE;
  if (modelDataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER))   return DataType.INTEGER_TYPE;
  if (modelDataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_STRING))   return DataType.STRING_TYPE;
  if (modelDataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME))   return DataType.DATE_TYPE;
  if (modelDataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_DATE))   return DataType.SQL_DATE_TYPE;
  if (modelDataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_TIME))   return DataType.SQL_TIME_TYPE;
  if (modelDataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL))   return DataType.DECIMAL_TYPE;
  if (modelDataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_FLOAT))   return DataType.DOUBLE_TYPE;
  if (modelDataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_BOOLEAN))   return DataType.BOOLEAN_TYPE;
  return DataType.UNKNOWN_TYPE;
}

Fixed version (ground truth):
public static int toDteDataType(String modelDataType){
  return DataAdapterUtil.adaptModelDataType(modelDataType);
}
Program: 74882
Project: 74882
Buggy source:
public static int toDteFilterOperator(String modelOpr){
}

Fixed version (ground truth):
public static int toDteFilterOperator(String modelOpr){
  return DataAdapterUtil.adaptModelFilterOperator(modelOpr);
}
Program: 74883
Project: 74883
Buggy source:
/** 
 * Sort on table
 * @throws Exception
 */
public void testFilterOnTable() throws Exception {
  QueryDefinition queryDefn=newReportQuery();
  String[] name=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  ScriptExpression[] se=new ScriptExpression[name.length];
  se[0]=new ScriptExpression("String_Node_Str");
  se[1]=new ScriptExpression("String_Node_Str");
  se[2]=new ScriptExpression("String_Node_Str");
  for (int i=0; i < name.length; i++)   queryDefn.addResultSetExpression(name[i],se[i]);
  ScriptExpression filterExpr=new ScriptExpression("String_Node_Str");
  FilterDefinition filterDefn=new FilterDefinition(filterExpr);
  queryDefn.addFilter(filterDefn);
  IResultIterator ri=executeQuery(queryDefn);
  while (ri.next()) {
    String str="String_Node_Str";
    for (int i=0; i < name.length; i++) {
      str+=ri.getValue(name[i]);
      if (i < name.length - 1)       str+="String_Node_Str";
    }
    testPrintln(str);
  }
}

Fixed version (ground truth):
/** 
 * Sort on table
 * @throws Exception
 */
public void testFilterOnTable() throws Exception {
  QueryDefinition queryDefn=newReportQuery();
  String[] name=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  ScriptExpression[] se=new ScriptExpression[name.length];
  se[0]=new ScriptExpression("String_Node_Str");
  se[1]=new ScriptExpression("String_Node_Str");
  se[2]=new ScriptExpression("String_Node_Str");
  for (int i=0; i < name.length; i++)   queryDefn.addResultSetExpression(name[i],se[i]);
  ScriptExpression filterExpr=new ScriptExpression("String_Node_Str");
  FilterDefinition filterDefn=new FilterDefinition(filterExpr);
  queryDefn.addFilter(filterDefn);
  IResultIterator ri=executeQuery(queryDefn);
  while (ri.next()) {
    String str="String_Node_Str";
    for (int i=0; i < name.length; i++) {
      str+=ri.getValue(name[i]);
      if (i < name.length - 1)       str+="String_Node_Str";
    }
    testPrintln(str);
  }
  checkOutputFile();
}
Program: 74884
Project: 74884
Buggy source:
public void refresh(Properties customConnectionProps){
  m_pageHelper.initCustomControl(customConnectionProps);
  enableAllControls(getControl(),isSessionEditable());
}

Fixed version (ground truth):
public void refresh(Properties customConnectionProps){
  m_pageHelper.initCustomControl(customConnectionProps);
  enableAllControls(getControl(),isSessionEditable());
  m_pageHelper.resetTestAndMngButton();
}
Program: 74885
Project: 74885
Buggy source:
/** 
 * Shuts down the Derby database
 */
private void shutDownDatabase(){
  logger.info("String_Node_Str" + dbDir);
  try {
    JDBCDriverManager.getInstance().getConnection(SampleDBConstants.DERBY_DRIVER_CLASS,getDBUrl(true),SampleDBConstants.SAMPLE_DB_SCHEMA,"String_Node_Str");
  }
 catch (  Exception e) {
    logger.info("String_Node_Str" + e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
/** 
 * Shuts down the Derby database
 */
private void shutDownDatabase(){
  logger.info("String_Node_Str" + dbDir);
  try {
    JDBCDriverManager.getInstance().getConnection(SampleDBConstants.DERBY_DRIVER_CLASS,getDBUrl(true),SampleDBConstants.SAMPLE_DB_SCHEMA,"String_Node_Str",null);
  }
 catch (  Exception e) {
    logger.info("String_Node_Str" + e.getLocalizedMessage());
  }
}
Program: 74886
Project: 74886
Buggy source:
public static Connection getConnection(String driverClassName,String connectionString,String userId,String password) throws SQLException {
  try {
    return JDBCDriverManager.getInstance().getConnection(driverClassName,connectionString,userId,password);
  }
 catch (  Exception e) {
    ExceptionHandler.showException(PlatformUI.getWorkbench().getDisplay().getActiveShell(),JdbcPlugin.getResourceString("String_Node_Str"),e.getLocalizedMessage(),e);
    return null;
  }
}

Fixed version (ground truth):
public static Connection getConnection(String driverClassName,String connectionString,String userId,String password) throws SQLException {
  try {
    return JDBCDriverManager.getInstance().getConnection(driverClassName,connectionString,userId,password,null);
  }
 catch (  Exception e) {
    ExceptionHandler.showException(PlatformUI.getWorkbench().getDisplay().getActiveShell(),JdbcPlugin.getResourceString("String_Node_Str"),e.getLocalizedMessage(),e);
    return null;
  }
}
Program: 74887
Project: 74887
Buggy source:
public void initLayout(ITableContent table){
  this.layout=new TableContentLayout(table,EngineIRConstants.FORMAT_TYPE_VIEWER,context);
  this.layoutEvents=new Stack();
}

Fixed version (ground truth):
public void initLayout(ITableContent table){
  this.layout=new TableContentLayout(table,getOutputFormat(),context);
  this.layoutEvents=new Stack();
}
Program: 74888
Project: 74888
Buggy source:
/** 
 * Creates the visibility rule( i.e. the hide)
 * @param handle the DE's handle
 * @return the created visibility rule
 */
protected VisibilityRuleDesign createHide(HideRuleHandle handle){
  VisibilityRuleDesign rule=new VisibilityRuleDesign();
  rule.setExpression(createExpression(handle.getExpression()));
  String format=handle.getFormat();
  if ("String_Node_Str".equalsIgnoreCase(format)) {
    format=EngineIRConstants.FORMAT_TYPE_VIEWER;
  }
  rule.setFormat(format);
  return rule;
}

Fixed version (ground truth):
/** 
 * Creates the visibility rule( i.e. the hide)
 * @param handle the DE's handle
 * @return the created visibility rule
 */
protected VisibilityRuleDesign createHide(HideRuleHandle handle){
  VisibilityRuleDesign rule=new VisibilityRuleDesign();
  rule.setExpression(createExpression(handle.getExpression()));
  String format=handle.getFormat();
  if ("String_Node_Str".equalsIgnoreCase(format)) {
    format="String_Node_Str";
  }
  rule.setFormat(format);
  return rule;
}
Program: 74889
Project: 74889
Buggy source:
protected void handleCreateElement(ReportRequest request){
  final List list=request.getSelectionObject();
  if (list.size() == 1) {
    Display.getCurrent().asyncExec(new Runnable(){
      public void run(){
        StructuredSelection selection=new StructuredSelection(list);
        viewer.setSelection(selection);
      }
    }
);
  }
}

Fixed version (ground truth):
protected void handleCreateElement(ReportRequest request){
  final List list=request.getSelectionObject();
  if (list.size() == 1) {
    Display.getCurrent().asyncExec(new Runnable(){
      public void run(){
        viewer.refresh();
        StructuredSelection selection=new StructuredSelection(list);
        viewer.setSelection(selection);
      }
    }
);
  }
}
Program: 74890
Project: 74890
Buggy source:
public void run(){
  StructuredSelection selection=new StructuredSelection(list);
  viewer.setSelection(selection);
}

Fixed version (ground truth):
public void run(){
  viewer.refresh();
  StructuredSelection selection=new StructuredSelection(list);
  viewer.setSelection(selection);
}
Program: 74891
Project: 74891
Buggy source:
public void performRequest(final ReportRequest request){
  if (ReportRequest.SELECTION.equals(request.getType())) {
    handleSelectionChange(request);
  }
  if (ReportRequest.CREATE_ELEMENT.equals(request.getType())) {
    Display.getCurrent().asyncExec(new Runnable(){
      public void run(){
        handleSelectionChange(request);
      }
    }
);
  }
}

Fixed version (ground truth):
public void performRequest(final ReportRequest request){
  if (ReportRequest.SELECTION.equals(request.getType())) {
    handleSelectionChange(request);
  }
  if (ReportRequest.CREATE_ELEMENT.equals(request.getType())) {
    Display.getCurrent().asyncExec(new Runnable(){
      public void run(){
        getTreeViewer().refresh();
        handleSelectionChange(request);
      }
    }
);
  }
}
Program: 74892
Project: 74892
Buggy source:
public void run(){
  handleSelectionChange(request);
}

Fixed version (ground truth):
public void run(){
  getTreeViewer().refresh();
  handleSelectionChange(request);
}
Program: 74893
Project: 74893
Buggy source:
public final Object getProperty(String propName){
  logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",propName));
  if (propName.equals("String_Node_Str")) {
    return cm.getTitle().getLabel().getCaption().getValue();
  }
 else   if (propName.equals("String_Node_Str")) {
    return new Double(cm.getTitle().getLabel().getCaption().getFont().getRotation());
  }
 else   if (propName.equals("String_Node_Str")) {
    return cm.getLegend().getPosition().getName();
  }
 else   if (propName.equals("String_Node_Str")) {
    return cm.getLegend().getAnchor().getName();
  }
 else   if (propName.equals("String_Node_Str")) {
    return cm.getDimension().getName();
  }
 else   if (propName.equals("String_Node_Str")) {
    return new Boolean((cm instanceof ChartWithAxes) ? ((ChartWithAxes)cm).isTransposed() : false);
  }
 else   if (propName.equals("String_Node_Str") || propName.equals("String_Node_Str")) {
    return cm.getScript();
  }
 else   if (propName.equals("String_Node_Str")) {
    return cm;
  }
  return null;
}

Fixed version (ground truth):
public final Object getProperty(String propName){
  logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",propName));
  if (cm == null) {
    return null;
  }
  if (propName.equals("String_Node_Str")) {
    return cm.getTitle().getLabel().getCaption().getValue();
  }
 else   if (propName.equals("String_Node_Str")) {
    return new Double(cm.getTitle().getLabel().getCaption().getFont().getRotation());
  }
 else   if (propName.equals("String_Node_Str")) {
    return cm.getLegend().getPosition().getName();
  }
 else   if (propName.equals("String_Node_Str")) {
    return cm.getLegend().getAnchor().getName();
  }
 else   if (propName.equals("String_Node_Str")) {
    return cm.getDimension().getName();
  }
 else   if (propName.equals("String_Node_Str")) {
    return new Boolean((cm instanceof ChartWithAxes) ? ((ChartWithAxes)cm).isTransposed() : false);
  }
 else   if (propName.equals("String_Node_Str") || propName.equals("String_Node_Str")) {
    return cm.getScript();
  }
 else   if (propName.equals("String_Node_Str")) {
    return cm;
  }
  return null;
}
Program: 74896
Project: 74896
Buggy source:
/** 
 * Create a cube materializer.
 * @param cubeHandle
 * @return
 * @throws DataException
 * @throws IOException
 * @throws BirtException
 */
private CubeMaterializer createCubeMaterializer(CubeHandle cubeHandle) throws DataException, IOException, BirtException {
  CubeMaterializer cubeMaterializer;
  cubeMaterializer=new CubeMaterializer(this.dataEngine,this.sessionContext.getDataEngineContext().getTmpdir() + this.dataEngine.hashCode(),cubeHandle.getQualifiedName());
  return cubeMaterializer;
}

Fixed version (ground truth):
/** 
 * Create a cube materializer.
 * @param cubeHandle
 * @return
 * @throws DataException
 * @throws IOException
 * @throws BirtException
 */
private CubeMaterializer createCubeMaterializer(CubeHandle cubeHandle,int size) throws DataException, IOException, BirtException {
  CubeMaterializer cubeMaterializer=new CubeMaterializer(this.dataEngine,this.sessionContext.getDataEngineContext().getTmpdir() + this.dataEngine.hashCode(),cubeHandle.getQualifiedName(),size);
  return cubeMaterializer;
}
Program: 74897
Project: 74897
Buggy source:
/** 
 * @param cubeHandle
 * @param appContext
 * @throws BirtException
 */
private void materializeCube(CubeHandle cubeHandle,Map appContext) throws BirtException {
  int mode=this.sessionContext.getDataEngineContext().getMode();
  try {
    CubeMaterializer cubeMaterializer=null;
    if (appContext == null)     appContext=sessionContext.getAppContext();
    if (mode == DataEngineContext.DIRECT_PRESENTATION) {
      cubeMaterializer=createCubeMaterializer(cubeHandle);
      createCube((TabularCubeHandle)cubeHandle,cubeMaterializer,appContext);
      cubeMaterializer.close();
    }
 else     if (mode == DataEngineContext.MODE_GENERATION) {
      cubeMaterializer=createCubeMaterializer(cubeHandle);
      createCube((TabularCubeHandle)cubeHandle,cubeMaterializer,appContext);
      cubeMaterializer.saveCubeToReportDocument(cubeHandle.getQualifiedName(),this.sessionContext.getDocumentWriter(),null);
      cubeMaterializer.close();
    }
  }
 catch (  Exception e) {
    throw new DataException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
/** 
 * @param cubeHandle
 * @param appContext
 * @throws BirtException
 */
private void materializeCube(CubeHandle cubeHandle,Map appContext) throws BirtException {
  int mode=this.sessionContext.getDataEngineContext().getMode();
  try {
    CubeMaterializer cubeMaterializer=null;
    if (appContext == null)     appContext=sessionContext.getAppContext();
    if (mode == DataEngineContext.DIRECT_PRESENTATION) {
      int size=0;
      if (appContext != null) {
        Integer value=DataTypeUtil.toInteger(appContext.get(DataEngine.IN_MEMORY_CUBE_SIZE));
        if (value != null && value.intValue() > 0) {
          size=value.intValue();
        }
      }
      cubeMaterializer=createCubeMaterializer(cubeHandle,size);
      createCube((TabularCubeHandle)cubeHandle,cubeMaterializer,appContext);
      cubeMaterializer.close();
    }
 else     if (mode == DataEngineContext.MODE_GENERATION) {
      cubeMaterializer=createCubeMaterializer(cubeHandle,0);
      createCube((TabularCubeHandle)cubeHandle,cubeMaterializer,appContext);
      cubeMaterializer.saveCubeToReportDocument(cubeHandle.getQualifiedName(),this.sessionContext.getDocumentWriter(),null);
      cubeMaterializer.close();
    }
  }
 catch (  Exception e) {
    throw new DataException(e.getLocalizedMessage());
  }
}
Program: 74898
Project: 74898
Buggy source:
protected void setUp() throws Exception {
  super.setUp();
  String[] pictures=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  String pkg="String_Node_Str";
  for (int i=0; i < pictures.length; i++) {
    String file=pictures[i];
    copyResource(pkg + file,pictureFolder + file);
  }
}

Fixed version (ground truth):
protected void setUp() throws Exception {
  if (isOnWindows()) {
    super.setUp();
    String[] pictures=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
    String pkg="String_Node_Str";
    for (int i=0; i < pictures.length; i++) {
      String file=pictures[i];
      copyResource(pkg + file,pictureFolder + file);
    }
  }
}
Program: 74899
Project: 74899
Buggy source:
protected void tearDown() throws Exception {
  removeFile(new File(pictureFolder));
  super.tearDown();
}

Fixed version (ground truth):
protected void tearDown() throws Exception {
  if (isOnWindows()) {
    removeFile(new File(pictureFolder));
    super.tearDown();
  }
}
Program: 74901
Project: 74901
Buggy source:
public static String getPattern(Object data,String val){
  if (val != null && data instanceof java.util.Date) {
    if (val.indexOf("String_Node_Str") >= 0) {
      return "String_Node_Str";
    }
 else     if (val.startsWith("String_Node_Str")) {
      return "String_Node_Str";
    }
 else     if (!val.startsWith("String_Node_Str") && val.indexOf("String_Node_Str") >= 0) {
      return "String_Node_Str";
    }
    return new DateFormatter(val).getPattern();
  }
 else   if (val == null && data instanceof java.util.Date) {
    return "String_Node_Str";
  }
 else   if (val != null && data instanceof java.lang.Number) {
    return new NumberFormatter(val).getPattern();
  }
 else   if (val == null && data instanceof java.lang.Number) {
    return null;
  }
 else   if (val != null && data instanceof java.lang.String) {
    return new StringFormatter(val).getPattern();
  }
 else   if (val == null && data instanceof java.lang.String) {
    return null;
  }
  return null;
}

Fixed version (ground truth):
public static String getPattern(Object data,String val){
  if (val != null && data instanceof Date) {
    if (val.indexOf("String_Node_Str") >= 0) {
      return "String_Node_Str";
    }
 else     if (val.startsWith("String_Node_Str")) {
      return "String_Node_Str";
    }
 else     if (!val.startsWith("String_Node_Str") && val.indexOf("String_Node_Str") >= 0) {
      return "String_Node_Str";
    }
    return new DateFormatter(val).getPattern();
  }
 else   if (val == null && data instanceof Time) {
    return "String_Node_Str";
  }
 else   if (val == null && data instanceof java.sql.Date) {
    return "String_Node_Str";
  }
 else   if (val == null && data instanceof java.util.Date) {
    return "String_Node_Str";
  }
 else   if (val != null && data instanceof Number) {
    return new NumberFormatter(val).getPattern();
  }
 else   if (val != null && data instanceof String) {
    return new StringFormatter(val).getPattern();
  }
  return null;
}
Program: 74902
Project: 74902
Buggy source:
public void writeText(Object d){
  writer.openTag("String_Node_Str");
  if (d instanceof Data) {
    if (((Data)d).getDatatype().equals(Data.NUMBER)) {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
 else     if (((Data)d).getDatatype().equals(Data.DATE)) {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
 else {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
    writer.text(((Data)d).txt.toString());
  }
 else {
    writer.text(d.toString());
  }
  writer.closeTag("String_Node_Str");
}

Fixed version (ground truth):
public void writeText(Object d){
  writer.openTag("String_Node_Str");
  if (d instanceof Data) {
    if (((Data)d).getDatatype().equals(Data.NUMBER)) {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
 else     if (((Data)d).getDatatype().equals(Data.DATE)) {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
 else {
      writer.attribute("String_Node_Str","String_Node_Str");
    }
    writer.text(((Data)d).txt.toString());
  }
 else {
    writer.attribute("String_Node_Str","String_Node_Str");
    writer.text(d.toString());
  }
  writer.closeTag("String_Node_Str");
}
Program: 74903
Project: 74903
Buggy source:
public Data createData(Object txt,StyleEntry entry){
  if (txt instanceof IDataContent) {
    IDataContent dataContent=(IDataContent)txt;
    Object value=dataContent.getValue();
    if (value instanceof Number) {
      String format=ExcelUtil.getPattern(value,entry.getProperty(StyleConstant.NUMBER_FORMAT_PROP));
      entry.setProperty(StyleConstant.NUMBER_FORMAT_PROP,format);
      entry.setDatatype(Data.NUMBER);
      Data data=new Data(value,entry);
      data.setDatatype(Data.NUMBER);
      return data;
    }
 else     if (value instanceof Date) {
      String format=ExcelUtil.getPattern(value,entry.getProperty(StyleConstant.DATE_FORMAT_PROP));
      entry.setProperty(StyleConstant.DATE_FORMAT_PROP,format);
      entry.setDatatype(Data.DATE);
      Data data=new Data(value,entry);
      data.setDatatype(Data.DATE);
      return data;
    }
    Data data1=new Data(dataContent.getText().trim(),entry);
    data1.setDatatype(Data.STRING);
    return data1;
  }
  Data data1=new Data(txt,entry);
  data1.setDatatype(Data.STRING);
  return data1;
}

Fixed version (ground truth):
public Data createData(Object txt,StyleEntry entry){
  if (txt instanceof IDataContent) {
    IDataContent dataContent=(IDataContent)txt;
    Object value=dataContent.getValue();
    if (value instanceof Number) {
      String format=ExcelUtil.getPattern(value,entry.getProperty(StyleConstant.NUMBER_FORMAT_PROP));
      entry.setProperty(StyleConstant.NUMBER_FORMAT_PROP,format);
      entry.setDatatype(Data.NUMBER);
      Data data=new Data(value,entry);
      data.setDatatype(Data.NUMBER);
      return data;
    }
 else     if (value instanceof Date) {
      String format=ExcelUtil.getPattern(value,entry.getProperty(StyleConstant.DATE_FORMAT_PROP));
      entry.setProperty(StyleConstant.DATE_FORMAT_PROP,format);
      entry.setDatatype(Data.DATE);
      Data data=new Data(ExcelUtil.formatDate(value),entry);
      data.setDatatype(Data.DATE);
      return data;
    }
    Data data1=new Data(dataContent.getText().trim(),entry);
    data1.setDatatype(Data.STRING);
    return data1;
  }
  Data data1=new Data(txt,entry);
  data1.setDatatype(Data.STRING);
  return data1;
}
Program: 74908
Project: 74908
Buggy source:
/** 
 * returns the formated string for the string parameter.  <li>'@' - character or space  <li>'&' - character or empty  <li> '&lt;' - tolower  <li> '>' - toupper  <li>'!' - left to right
 * @param str format string
 */
public String format(String str){
  if (trim && str != null) {
    str=str.trim();
  }
  if (formatPattern.equals("String_Node_Str"))   return str;
  int len=str.length();
  int col=natt + nand;
  int ext=0;
  StringBuffer orig=new StringBuffer(str);
  StringBuffer fstr=new StringBuffer(this.formatPattern);
  StringBuffer ret=new StringBuffer("String_Node_Str");
  int i=0;
  int pos=0;
  int len2=0;
  char fc=' ';
  String sc=null;
  if (!dir) {
    if (len > col) {
      ret.append(handleCase(orig.substring(0,len - col),chcase));
      pos=len - col;
      len=col;
    }
    ext=col - len;
  }
  len2=this.formatPattern.length();
  for (i=0; i < len2; i++) {
    fc=fstr.charAt(i);
switch (fc) {
case ('@'):
case ('&'):
      if (ext > 0 || len == 0) {
        if (fc == '@')         ret.append(' ');
        ext--;
      }
 else {
        sc=orig.substring(pos,pos + 1);
        ret.append(handleCase(sc,chcase));
        pos++;
        len--;
      }
    break;
case ('<'):
case ('>'):
case ('!'):
  break;
default :
ret.append(fc);
break;
}
}
while (--len >= 0) {
sc=orig.substring(pos,pos + 1);
ret.append(handleCase(sc,chcase));
pos++;
}
return ret.toString();
}

Fixed version (ground truth):
/** 
 * returns the formated string for the string parameter.  <li>'@' - character or space  <li>'&' - character or empty  <li> '&lt;' - tolower  <li> '>' - toupper  <li>'!' - left to right
 * @param str format string
 */
public String format(String str){
  if (trim && str != null) {
    str=str.trim();
  }
  if (formatPattern.equals("String_Node_Str"))   return str;
  int len=str.length();
  int col=natt + nand;
  int ext=0;
  StringBuffer orig=new StringBuffer(str);
  StringBuffer fstr=new StringBuffer(this.formatPattern);
  StringBuffer ret=new StringBuffer("String_Node_Str");
  int i=0;
  int pos=0;
  int len2=0;
  char fc=' ';
  String sc=null;
  if (!dir) {
    if (len > col) {
      ret.append(handleCase(orig.substring(0,len - col),chcase));
      pos=len - col;
      len=col;
    }
    ext=col - len;
  }
  len2=this.formatPattern.length();
  for (i=0; i < len2; i++) {
    fc=fstr.charAt(i);
switch (fc) {
case ('@'):
case ('&'):
      if (ext > 0 || len == 0) {
        if (fc == '@')         ret.append(' ');
        ext--;
      }
 else {
        sc=orig.substring(pos,pos + 1);
        ret.append(handleCase(sc,chcase));
        pos++;
        len--;
      }
    break;
case ('<'):
case ('>'):
case ('!'):
case ('^'):
  break;
default :
ret.append(fc);
break;
}
}
while (--len >= 0) {
sc=orig.substring(pos,pos + 1);
ret.append(handleCase(sc,chcase));
pos++;
}
return ret.toString();
}
Program: 74909
Project: 74909
Buggy source:
/** 
 * @param format the format pattern
 */
public void applyPattern(String format){
  init();
  if (format == null) {
    return;
  }
  char c=' ';
  StringBuffer scan=new StringBuffer(format);
  int len=scan.length();
  for (int i=0; i < len; i++) {
    c=scan.charAt(i);
switch (c) {
case ('@'):
      natt++;
    break;
case ('&'):
  nand++;
break;
case ('<'):
case ('>'):
chcase=c;
break;
case ('!'):
dir=true;
break;
}
}
if ("String_Node_Str".equalsIgnoreCase(format)) {
applyPattern("String_Node_Str");
return;
}
if ("String_Node_Str".equalsIgnoreCase(format)) {
applyPattern("String_Node_Str");
return;
}
if ("String_Node_Str".equalsIgnoreCase(format)) {
applyPattern("String_Node_Str");
return;
}
formatPattern=format;
}

Fixed version (ground truth):
/** 
 * @param format the format pattern
 */
public void applyPattern(String format){
  init();
  if (format == null) {
    return;
  }
  char c=' ';
  StringBuffer scan=new StringBuffer(format);
  int len=scan.length();
  for (int i=0; i < len; i++) {
    c=scan.charAt(i);
switch (c) {
case ('@'):
      natt++;
    break;
case ('&'):
  nand++;
break;
case ('<'):
case ('>'):
chcase=c;
break;
case ('!'):
dir=true;
break;
case ('^'):
trim=false;
break;
}
}
if ("String_Node_Str".equalsIgnoreCase(format)) {
applyPattern("String_Node_Str");
return;
}
if ("String_Node_Str".equalsIgnoreCase(format)) {
applyPattern("String_Node_Str");
return;
}
if ("String_Node_Str".equalsIgnoreCase(format)) {
applyPattern("String_Node_Str");
return;
}
formatPattern=format;
}
Program: 74910
Project: 74910
Buggy source:
public void setAppContext(Object context) throws OdaException {
}

Fixed version (ground truth):
public void setAppContext(Object context) throws OdaException {
  if (context instanceof Map)   this.appContext=(Map)context;
}
Program: 74911
Project: 74911
Buggy source:
/** 
 * Look for the Driver from drivers directory if it not in plugin class path
 * @param className
 * @return Driver instance
 * @throws JDBCException
 */
private Driver findDriver(String className) throws JDBCException {
  Class driverClass=null;
  boolean driverInClassPath=false;
  try {
    driverClass=Class.forName(className);
    logger.info("String_Node_Str" + className);
    driverInClassPath=true;
  }
 catch (  ClassNotFoundException e) {
    if (logger.isLoggable(Level.FINE)) {
      logger.info("String_Node_Str" + className + "String_Node_Str");
    }
    driverClass=loadExtraDriver(className,true);
    if (driverClass == null) {
      logger.warning("String_Node_Str" + className);
      throw new JDBCException(ResourceConstants.CANNOT_LOAD_DRIVER,null,className);
    }
  }
  Driver driver=null;
  try {
    driver=(Driver)driverClass.newInstance();
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,"String_Node_Str" + className,e);
    throw new JDBCException(ResourceConstants.CANNOT_INSTANTIATE_DRIVER,null,className);
  }
  return driver;
}

Fixed version (ground truth):
/** 
 * Look for the Driver from drivers directory if it not in plugin class path
 * @param className
 * @return Driver instance
 * @throws OdaException 
 */
private Driver findDriver(String className,String driverClassPath) throws OdaException {
  Class driverClass=null;
  try {
    driverClass=Class.forName(className);
    logger.info("String_Node_Str" + className);
  }
 catch (  ClassNotFoundException e) {
    if (logger.isLoggable(Level.FINE)) {
      logger.info("String_Node_Str" + className + "String_Node_Str");
    }
    driverClass=loadExtraDriver(className,true,driverClassPath);
    if (driverClass == null) {
      logger.warning("String_Node_Str" + className);
      throw new JDBCException(ResourceConstants.CANNOT_LOAD_DRIVER,null,className);
    }
  }
  Driver driver=null;
  try {
    driver=(Driver)driverClass.newInstance();
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,"String_Node_Str" + className,e);
    throw new JDBCException(ResourceConstants.CANNOT_INSTANTIATE_DRIVER,null,className);
  }
  return driver;
}
Program: 74912
Project: 74912
Buggy source:
/** 
 * Deregister the driver by the given class name from DriverManager
 * @param className
 * @return true if deregister the driver successfully
 * @throws OdaException
 */
public boolean deregisterDriver(String className) throws OdaException {
  if (className == null || className.length() == 0)   return false;
  if (isDeregistered(className)) {
    return true;
  }
  Driver driver=findDriver(className);
  if (driver != null) {
    try {
      if (logger.isLoggable(Level.FINER))       logger.finer("String_Node_Str" + className);
      if (registeredDrivers.containsKey(className)) {
        DriverManager.deregisterDriver(new WrappedDriver(driver,className));
        registeredDrivers.remove(className);
      }
      registeredDrivers.put(className,DRIVER_DEREGISTERED);
    }
 catch (    SQLException e) {
      logger.log(Level.WARNING,"String_Node_Str",e);
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Deregister the driver by the given class name from DriverManager
 * @param className
 * @return true if deregister the driver successfully
 * @throws OdaException
 */
public boolean deregisterDriver(String className) throws OdaException {
  if (className == null || className.length() == 0)   return false;
  if (isDeregistered(className)) {
    return true;
  }
  Driver driver=findDriver(className,null);
  if (driver != null) {
    try {
      if (logger.isLoggable(Level.FINER))       logger.finer("String_Node_Str" + className);
      if (registeredDrivers.containsKey(className)) {
        DriverManager.deregisterDriver(new WrappedDriver(driver,className));
        registeredDrivers.remove(className);
      }
      registeredDrivers.put(className,DRIVER_DEREGISTERED);
    }
 catch (    SQLException e) {
      logger.log(Level.WARNING,"String_Node_Str",e);
    }
  }
  return true;
}
Program: 74913
Project: 74913
Buggy source:
/** 
 * Search driver in the "drivers" directory and load it if found
 * @param className
 * @return
 * @throws DriverException
 * @throws OdaException
 */
private Class loadExtraDriver(String className,boolean refreshUrlsWhenFail){
}

Fixed version (ground truth):
/** 
 * Search driver in the "drivers" directory and load it if found
 * @param className
 * @return
 * @throws OdaException 
 * @throws DriverException
 * @throws OdaException
 */
private Class loadExtraDriver(String className,boolean refreshUrlsWhenFail,String driverClassPath) throws OdaException {
}