<commit_before>import java.util.Collections;
import gov.nih.nci.cma.domain.target.TargetClinicalStg;
import gov.nih.nci.cma.clinical.TARGETClinicalReportBean;
import org.apache.log4j.Logger;

class TARGETClinicalService extends AbstractClinicalService {
	
    boolean transactional = false
    
    private static Logger logger = Logger.getLogger(TARGETClinicalService.class);
		 
    
    /**
     * Extracts a list of unique ids from a list of domin objects
     */
    private List getIdList(List clinObjs) {
      if (clinObjs == null) {
    	logger.warn("getIdList passed null parameter")
    	return Collections.emptyList()
      }
      Set retSet = new HashSet()
      clinObjs.each { c ->
        if (c != null) {
          retSet.add(c.getTargetId())  
        }
        else {
          logger.warn("getIdList got null domain object.")
        }
      }
      return new ArrayList(retSet)
    }
    
    
	 /**
	  * Get Ids for age
	  */
	  public List<String> getIdsForAge(Integer ageLower, Integer ageUpper) {
		List clinList = TargetClinicalStg.findAllByAgeBetween(ageLower, ageUpper)
		return getIdList(clinList)	 		 
	  }
	   	 
	 /**
	  * Get Ids for WBC
	  */
	 public List<String> getIdsForWBC(Integer wbcLower, Integer wbcUppper) {
	   List clinList = TargetClinicalStg.findAllByPbWbcBetween(wbcLower, wbcUpper)
	   return getIdList(clinList)	 		 
	 }
	
	 /**
	  * Get Ids for minimal residual disease day 8
	  */
	 public List<String> getIdsForMrdDay8(Integer mrdDay8Lower, Integer mrdDay8Uppper) {
	   List clinList = TargetClinicalStg.findAllByMrdDay8Between(mrdDay8Lower, mrdDay8Upper)
	   return getIdList(clinList)	 		 
	 }
	 
	 /**
	  * Get Ids for minimal residual disease day 29
	  */
	 public List<String> getIdsForMrdDay29(Integer mrdDay29Lower, Integer mrdDay29Uppper) {
	   List clinList = TargetClinicalStg.findAllByMrdDay29Between(mrdDay29Lower, mrdDay29Upper)
	   return getIdList(clinList)	 		 
	 }
	 
	 /**
	  * Get ids for event<commit_msg>Fixed search by wbc.<commit_after>import java.util.Collections;
import gov.nih.nci.cma.domain.target.TargetClinicalStg;
import gov.nih.nci.cma.clinical.TARGETClinicalReportBean;
import org.apache.log4j.Logger;

class TARGETClinicalService extends AbstractClinicalService {
	
    boolean transactional = false
    
    private static Logger logger = Logger.getLogger(TARGETClinicalService.class);
		 
    
    /**
     * Extracts a list of unique ids from a list of domin objects
     */
    private List getIdList(List clinObjs) {
      if (clinObjs == null) {
    	logger.warn("getIdList passed null parameter")
    	return Collections.emptyList()
      }
      Set retSet = new HashSet()
      clinObjs.each { c ->
        if (c != null) {
          retSet.add(c.getTargetId())  
        }
        else {
          logger.warn("getIdList got null domain object.")
        }
      }
      return new ArrayList(retSet)
    }
    
    
	 /**
	  * Get Ids for age
	  */
	  public List<String> getIdsForAge(Integer ageLower, Integer ageUpper) {
		List clinList = TargetClinicalStg.findAllByAgeBetween(ageLower, ageUpper)
		return getIdList(clinList)	 		 
	  }
	   	 
	 /**
	  * Get Ids for WBC
	  */
	 public List<String> getIdsForWBC(Integer wbcLower, Integer wbcUpper) {
	   List clinList = TargetClinicalStg.findAllByPbWbcBetween(wbcLower, wbcUpper)
	   return getIdList(clinList)	 		 
	 }
	
	 /**
	  * Get Ids for minimal residual disease day 8
	  */
	 public List<String> getIdsForMrdDay8(Integer mrdDay8Lower, Integer mrdDay8Uppper) {
	   List clinList = TargetClinicalStg.findAllByMrdDay8Between(mrdDay8Lower, mrdDay8Upper)
	   return getIdList(clinList)	 		 
	 }
	 
	 /**
	  * Get Ids for minimal residual disease day 29
	  */
	 public List<String> getIdsForMrdDay29(Integer mrdDay29Lower, Integer mrdDay29Uppper) {
	   List clinList = TargetClinicalStg.findAllByMrdDay29Between(mrdDay29Lower, mrdDay29Upper)
	   return getIdList(clinList)	 		 
	 }
	 
	 /**
	  * Get ids for event
{'fraction_non_alphanumeric': 0.0855196770938446, 'fraction_numerical': 0.011099899091826439, 'mean_word_length': 2.9374379344587886, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2133662', 'n_tokens_mistral': 1445, 'n_tokens_neox': 1260, 'n_words': 282}