Пример #1
0
 /**
  * Generate PPD mutants
  *
  * @param p
  * @param parent
  */
 public void generateMutant(Parameter p, String parent) {
   String declared_type = p.getTypeSpecifier().getName();
   if (hasHidingVariable(declared_type, parent)) {
     Parameter mutant = (Parameter) p.makeRecursiveCopy();
     mutant.setTypeSpecifier(new TypeName(parent));
     outputToFile(p, mutant);
   }
 }
Пример #2
0
  /**
   * Generate PPD mutants
   *
   * @param p
   * @param parent
   */
  public void generateMutant(Parameter p, InheritanceINFO parent) {
    String declared_type = p.getTypeSpecifier().getName();
    String parent_type = parent.getClassName();
    if (hasHidingVariable(declared_type, parent_type)) {
      Parameter mutant = (Parameter) p.makeRecursiveCopy();
      mutant.setTypeSpecifier(new TypeName(parent.getClassName()));
      outputToFile(p, mutant);
    }

    if (parent.getParent() != null) {
      generateMutant(p, parent.getParent());
    }
  }