Program: 95496
Project: 95496
Buggy source:
/** 
 * {@inheritDoc} 
 */
public boolean isTestDataComplete(){
  if (StringUtils.isEmpty(getDataFile())) {
    final int paramListSize=getParameterListSize();
    ITDManager testDataManager=getDataManager();
    List<IParamDescriptionPO> requiredParameters=new ArrayList<IParamDescriptionPO>(getParameterList());
    IParameterInterfacePO refDataCube=getReferencedDataCube();
    for (int i=0; i < testDataManager.getDataSetCount(); i++) {
      for (      IParamDescriptionPO paramDesc : requiredParameters) {
        int column=testDataManager.findColumnForParam(paramDesc.getUniqueId());
        if (refDataCube != null) {
          IParamDescriptionPO dataCubeParam=refDataCube.getParameterForName(paramDesc.getName());
          if (dataCubeParam != null) {
            column=testDataManager.findColumnForParam(dataCubeParam.getUniqueId());
          }
        }
        if (column >= -1) {
          List<INodePO> nodes=null;
          if (this instanceof IExecTestCasePO) {
            IExecTestCasePO exec=(IExecTestCasePO)this;
            nodes=exec.getSpecTestCase().getUnmodifiableNodeList();
            String result=AbstractParamInterfaceBP.getValueForSpecNodeWithParamDesc(paramDesc,exec.getSpecTestCase(),column);
            if (StringUtils.isNotBlank(result)) {
              return true;
            }
          }
        }
        String value=TestDataBP.INSTANCE.getTestData(this,testDataManager,paramDesc,i);
        if (StringUtils.isNotEmpty(value)) {
          ModelParamValueConverter mpvc=new ModelParamValueConverter(value,this,paramDesc);
          List<RefToken> referenceTokens=mpvc.getRefTokens();
          String uiValue=mpvc.getGuiString();
          for (          RefToken token : referenceTokens) {
            if (uiValue.contains(token.getModelString())) {
              return false;
            }
          }
        }
 else {
          if (this instanceof ICapPO) {
            ICapPO cap=(ICapPO)this;
            if (!ParamNameBP.isOptionalParameter(cap,paramDesc.getUniqueId())) {
              return false;
            }
          }
 else {
            return false;
          }
        }
      }
    }
    if ((testDataManager.getDataSetCount() == 0) && (paramListSize > 0)) {
      return false;
    }
    if (getParameterListSize() > testDataManager.getColumnCount()) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public boolean isTestDataComplete(){
  if (StringUtils.isEmpty(getDataFile())) {
    final int paramListSize=getParameterListSize();
    ITDManager testDataManager=getDataManager();
    List<IParamDescriptionPO> requiredParameters=new ArrayList<IParamDescriptionPO>(getParameterList());
    IParameterInterfacePO refDataCube=getReferencedDataCube();
    for (int i=0; i < testDataManager.getDataSetCount(); i++) {
      for (      IParamDescriptionPO paramDesc : requiredParameters) {
        int column=testDataManager.findColumnForParam(paramDesc.getUniqueId());
        if (refDataCube != null) {
          IParamDescriptionPO dataCubeParam=refDataCube.getParameterForName(paramDesc.getName());
          if (dataCubeParam != null) {
            column=testDataManager.findColumnForParam(dataCubeParam.getUniqueId());
          }
        }
        String value=TestDataBP.INSTANCE.getTestData(this,testDataManager,paramDesc,i);
        if (StringUtils.isBlank(value) && column >= -1) {
          if (this instanceof IExecTestCasePO) {
            IExecTestCasePO exec=(IExecTestCasePO)this;
            String result=AbstractParamInterfaceBP.getValueForSpecNodeWithParamDesc(paramDesc,exec.getSpecTestCase());
            if (value == null && StringUtils.isNotBlank(result)) {
              value=result;
            }
            if (StringUtils.isBlank(result)) {
              return false;
            }
          }
        }
        if (StringUtils.isNotEmpty(value)) {
          ModelParamValueConverter mpvc=new ModelParamValueConverter(value,this,paramDesc);
          List<RefToken> referenceTokens=mpvc.getRefTokens();
          String uiValue=mpvc.getGuiString();
          for (          RefToken token : referenceTokens) {
            if (uiValue.contains(token.getModelString())) {
              return false;
            }
          }
        }
 else {
          if (this instanceof ICapPO) {
            ICapPO cap=(ICapPO)this;
            if (!ParamNameBP.isOptionalParameter(cap,paramDesc.getUniqueId())) {
              return false;
            }
          }
 else {
            return false;
          }
        }
      }
    }
    if ((testDataManager.getDataSetCount() == 0) && (paramListSize > 0)) {
      return checkSpecForIncompleteData();
    }
  }
  return true;
}