Examples of ChanceAtFault


Examples of org.cishell.testing.convertertester.core.tester2.reportgen.faultanalysis.ChanceAtFault

 
  private ChanceAtFault[] removeDuplicateConverters(List cafs) {
    List newCafs = new ArrayList();
    List newCafConvs = new ArrayList();
    for (int ii = 0; ii < cafs.size(); ii++) {
      ChanceAtFault caf  = (ChanceAtFault) cafs.get(ii);
      if (! newCafConvs.contains(caf.getConverter())) {
        newCafs.add(caf);
        newCafConvs.add(caf.getConverter());
      }
    }
   
    return (ChanceAtFault[]) newCafs.toArray(new ChanceAtFault[0]);
  }
View Full Code Here

Examples of org.cishell.testing.convertertester.core.tester2.reportgen.faultanalysis.ChanceAtFault

        //set potential culprits to be intersection of
        //new potential culprits and old.
        List newPCs = new ArrayList();

        for (int ii = 0; ii < this.pcs.size(); ii++) {
          ChanceAtFault pc = (ChanceAtFault) this.pcs.get(ii);

          for (int jj = 0; jj < otherPCs.length; jj++) {
            ChanceAtFault otherPC = otherPCs[jj];

            if (pc.getConverter() == otherPC.getConverter()
                && otherPC.getChanceAtFault() > 0.0f) {

              ChanceAtFault newPC = new ChanceAtFault(pc
                  .getFailedFilePass(), pc.getConverter(), pc
                  .getChanceAtFault()
                  + otherPC.getChanceAtFault());

              newPCs.add(pc);

              break;
            }
          }
        }

        this.pcs = newPCs;

      } else {
        //add all chance at faults > 0.0f to potential culprit list
        List newPCs = new ArrayList();
        for (int ii = 0; ii < otherPCs.length; ii++) {
          ChanceAtFault pc = (ChanceAtFault) otherPCs[ii];
         
          if (pc.getChanceAtFault() > 0.0f) {
            newPCs.add(pc);
          }
        }
       
        this.pcs = newPCs;
View Full Code Here

Examples of org.cishell.testing.convertertester.core.tester2.reportgen.faultanalysis.ChanceAtFault

   
    public ChanceAtFault[] getCulprits() {
      //normalize chance at faults
      float totalChanceAtFaults = 0.0f;
      for (int ii = 0; ii <  pcs.size(); ii++) {
        ChanceAtFault pc = (ChanceAtFault) pcs.get(ii);
       
        totalChanceAtFaults += pc.getChanceAtFault();
      }
     
      ChanceAtFault[] uniqueCafs =
        removeDuplicateConverters(this.pcs);
     
      List uniqueNormalizedCafs = new ArrayList();
      for (int ii = 0; ii < uniqueCafs.length; ii++) {
        ChanceAtFault pc = uniqueCafs[ii];
       
        ChanceAtFault normPC = new ChanceAtFault(
            pc.getFailedFilePass(),
            pc.getConverter(),
            pc.getChanceAtFault() / totalChanceAtFaults);
       
        uniqueNormalizedCafs.add(normPC);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.