// Path: src/mujava/util/InheritanceINFO.java
// public class InheritanceINFO {
// 
//   InheritanceINFO direct_parent = null;
//   Vector direct_child = new Vector();
//   String class_name = null;
//   String parent_class_name = null;
// 
//   public InheritanceINFO(String my_name,String parent_name) {
//     class_name = my_name;
//     parent_class_name = parent_name;
//   }
// 
//   public void addChild(InheritanceINFO child){
//     direct_child.add(child);
//   }
// 
//   public void setParent(InheritanceINFO parent){
//     direct_parent = parent;
//   }
// 
//   public String getParentName(){
//     return parent_class_name;
//   }
// 
//   public InheritanceINFO getParent(){
//     return direct_parent;
//   }
//   public Vector getChilds(){
//     return direct_child;
//   }
// 
//   public String getClassName(){
//     return class_name;
//   }
// }


import java.io.*;
import openjava.mop.*;
import openjava.ptree.*;
import mujava.util.InheritanceINFO;
          generateEHC(catchlist.get(i),catchlist.get(i).getParameter().getTypeSpecifier().getName());
        }

      }
    }
  }

  public void generateEHC(CatchBlock p,String e_name){
    InheritanceINFO inf = mujava.MutationSystem.getInheritanceInfo(e_name);
    if(inf==null) return;
    InheritanceINFO parent = inf.getParent();
    if(parent!=null){
      String parent_name = parent.getClassName();
      outputToFile(p,parent_name);
      generateEHC(p,parent_name);
    }
  }

  public void outputToFile(CatchBlock p,String exception_type){
      if (comp_unit==null) return;
      String f_name;
      num++;
      f_name = getSourceName(this);
      String mutant_dir = getMuantID();

      try {
		 PrintWriter out = getPrintWriter(f_name);
		 EHC_Writer writer = new EHC_Writer( mutant_dir,out );
		 writer.setMutant(p,exception_type);
		 comp_unit.accept( writer );
// Path: src/mujava/util/InheritanceINFO.java
// public class InheritanceINFO {
// 
//   InheritanceINFO direct_parent = null;
//   Vector direct_child = new Vector();
//   String class_name = null;
//   String parent_class_name = null;
// 
//   public InheritanceINFO(String my_name,String parent_name) {
//     class_name = my_name;
//     parent_class_name = parent_name;
//   }
// 
//   public void addChild(InheritanceINFO child){
//     direct_child.add(child);
//   }
// 
//   public void setParent(InheritanceINFO parent){
//     direct_parent = parent;
//   }
// 
//   public String getParentName(){
//     return parent_class_name;
//   }
// 
//   public InheritanceINFO getParent(){
//     return direct_parent;
//   }
//   public Vector getChilds(){
//     return direct_child;
//   }
// 
//   public String getClassName(){
//     return class_name;
//   }
// }


// Path: src/mujava/op/exception/EHC.java
import java.io.*;
import openjava.mop.*;
import openjava.ptree.*;
import mujava.util.InheritanceINFO;

          generateEHC(catchlist.get(i),catchlist.get(i).getParameter().getTypeSpecifier().getName());
        }

      }
    }
  }

  public void generateEHC(CatchBlock p,String e_name){
    InheritanceINFO inf = mujava.MutationSystem.getInheritanceInfo(e_name);
    if(inf==null) return;
    InheritanceINFO parent = inf.getParent();
    if(parent!=null){
      String parent_name = parent.getClassName();
      outputToFile(p,parent_name);
      generateEHC(p,parent_name);
    }
  }

  public void outputToFile(CatchBlock p,String exception_type){
      if (comp_unit==null) return;
      String f_name;
      num++;
      f_name = getSourceName(this);
      String mutant_dir = getMuantID();

      try {
		 PrintWriter out = getPrintWriter(f_name);
		 EHC_Writer writer = new EHC_Writer( mutant_dir,out );
		 writer.setMutant(p,exception_type);
		 comp_unit.accept( writer );
		 out.flush();  out.close();