Program: 75764
Project: 75764
Buggy source:
/** 
 * Save the model as an applet. <p>For example, if the model is called MyModel, and this phase is called with: <pre> -p wjtp.appletWriter targetPackage:foo.bar </pre> Then we will create the directory $PTII/foo/bar/MyModel and place MyModel.xml, MyModel.htm, MyModelVergil.htm in that directory.
 * @param phaseName The name of the phase, for example <code>wjtp.appletWriter</code>.
 * @param options The options Map.  This method uses the<code>targetPackage</code> option to specify package to generate code in.
 */
protected void internalTransform(String phaseName,Map options){
  System.out.println("String_Node_Str" + phaseName + "String_Node_Str"+ options+ "String_Node_Str");
  _ptIIDirectory=null;
  try {
    _ptIIDirectory=System.getProperty("String_Node_Str");
  }
 catch (  SecurityException security) {
    throw new InternalErrorException(this,security,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  }
  _targetPackage=Options.getString(options,"String_Node_Str");
  int start=_targetPackage.indexOf('.');
  StringBuffer buffer=new StringBuffer("String_Node_Str");
  while (start != -1) {
    buffer.append("String_Node_Str");
    start=_targetPackage.indexOf('.',start + 1);
  }
  _codeBase=buffer.toString();
  System.out.println("String_Node_Str" + _model);
  Director director=_model.getDirector();
  System.out.println("String_Node_Str" + director);
  String directorPackage=director.getClass().getPackage().getName();
  if (!directorPackage.endsWith("String_Node_Str")) {
    System.out.println("String_Node_Str" + "String_Node_Str" + directorPackage);
  }
  String directorPackageDomain=directorPackage.substring(0,directorPackage.lastIndexOf("String_Node_Str"));
  String directorDomain=directorPackageDomain.substring(directorPackageDomain.lastIndexOf("String_Node_Str") + 1);
  _domainJar=StringUtilities.substitute(directorPackageDomain,"String_Node_Str","String_Node_Str") + "String_Node_Str" + directorDomain+ "String_Node_Str";
  _sanitizedModelName=SootUtilities.sanitizeName(_model.getName());
  _modelDirectory=_ptIIDirectory + "String_Node_Str" + StringUtilities.substitute(_targetPackage,"String_Node_Str","String_Node_Str")+ "String_Node_Str"+ _sanitizedModelName+ "String_Node_Str";
  File modelDirectoryFile=new File(_modelDirectory);
  if (modelDirectoryFile.isDirectory()) {
    System.out.println("String_Node_Str" + modelDirectoryFile + "String_Node_Str");
  }
  modelDirectoryFile.mkdirs();
  _substituteMap=new HashMap();
  _substituteMap.put("String_Node_Str",_codeBase);
  _substituteMap.put("String_Node_Str",_domainJar);
  _substituteMap.put("String_Node_Str",_modelDirectory);
  _substituteMap.put("String_Node_Str",_sanitizedModelName);
  _substituteMap.put("String_Node_Str",_ptIIDirectory);
  Iterator keys=_substituteMap.keySet().iterator();
  while (keys.hasNext()) {
    String key=(String)keys.next();
    System.out.println("String_Node_Str" + key + "String_Node_Str"+ (String)_substituteMap.get(key)+ "String_Node_Str");
  }
  String modelFileName=_modelDirectory + _sanitizedModelName + "String_Node_Str";
  try {
    Writer modelFileWriter=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(modelFileName)));
    _model.exportMoML(modelFileWriter);
    modelFileWriter.close();
  }
 catch (  IOException ex) {
    throw new InternalErrorException("String_Node_Str" + modelFileName + "String_Node_Str"+ ex);
  }
  _templateDirectory=StringUtilities.substitute(Options.getString(options,"String_Node_Str"),"String_Node_Str",_ptIIDirectory);
  try {
    substitute(_templateDirectory + "String_Node_Str",_substituteMap,_modelDirectory + "String_Node_Str");
    substitute(_templateDirectory + "String_Node_Str",_substituteMap,_modelDirectory + _sanitizedModelName + "String_Node_Str");
    substitute(_templateDirectory + "String_Node_Str",_substituteMap,_modelDirectory + _sanitizedModelName + "String_Node_Str");
  }
 catch (  IOException ex) {
    throw new InternalErrorException("String_Node_Str" + "String_Node_Str" + ex);
  }
}

Fixed version (ground truth):
/** 
 * Save the model as an applet. <p>For example, if the model is called MyModel, and this phase is called with: <pre> -p wjtp.appletWriter targetPackage:foo.bar </pre> Then we will create the directory $PTII/foo/bar/MyModel and place MyModel.xml, MyModel.htm, MyModelVergil.htm in that directory.
 * @param phaseName The name of the phase, for example <code>wjtp.appletWriter</code>.
 * @param options The options Map.  This method uses the<code>targetPackage</code> option to specify package to generate code in.
 */
protected void internalTransform(String phaseName,Map options){
  System.out.println("String_Node_Str" + phaseName + "String_Node_Str"+ options+ "String_Node_Str");
  _ptIIDirectory=null;
  try {
    _ptIIDirectory=System.getProperty("String_Node_Str");
  }
 catch (  SecurityException security) {
    throw new InternalErrorException(null,security,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  }
  _targetPackage=Options.getString(options,"String_Node_Str");
  int start=_targetPackage.indexOf('.');
  StringBuffer buffer=new StringBuffer("String_Node_Str");
  while (start != -1) {
    buffer.append("String_Node_Str");
    start=_targetPackage.indexOf('.',start + 1);
  }
  _codeBase=buffer.toString();
  System.out.println("String_Node_Str" + _model);
  Director director=_model.getDirector();
  System.out.println("String_Node_Str" + director);
  String directorPackage=director.getClass().getPackage().getName();
  if (!directorPackage.endsWith("String_Node_Str")) {
    System.out.println("String_Node_Str" + "String_Node_Str" + directorPackage);
  }
  String directorPackageDomain=directorPackage.substring(0,directorPackage.lastIndexOf("String_Node_Str"));
  String directorDomain=directorPackageDomain.substring(directorPackageDomain.lastIndexOf("String_Node_Str") + 1);
  _domainJar=StringUtilities.substitute(directorPackageDomain,"String_Node_Str","String_Node_Str") + "String_Node_Str" + directorDomain+ "String_Node_Str";
  _sanitizedModelName=SootUtilities.sanitizeName(_model.getName());
  _modelDirectory=_ptIIDirectory + "String_Node_Str" + StringUtilities.substitute(_targetPackage,"String_Node_Str","String_Node_Str")+ "String_Node_Str"+ _sanitizedModelName+ "String_Node_Str";
  File modelDirectoryFile=new File(_modelDirectory);
  if (modelDirectoryFile.isDirectory()) {
    System.out.println("String_Node_Str" + modelDirectoryFile + "String_Node_Str");
  }
  modelDirectoryFile.mkdirs();
  _substituteMap=new HashMap();
  _substituteMap.put("String_Node_Str",_codeBase);
  _substituteMap.put("String_Node_Str",_domainJar);
  _substituteMap.put("String_Node_Str",_modelDirectory);
  _substituteMap.put("String_Node_Str",_sanitizedModelName);
  _substituteMap.put("String_Node_Str",_ptIIDirectory);
  Iterator keys=_substituteMap.keySet().iterator();
  while (keys.hasNext()) {
    String key=(String)keys.next();
    System.out.println("String_Node_Str" + key + "String_Node_Str"+ (String)_substituteMap.get(key)+ "String_Node_Str");
  }
  String modelFileName=_modelDirectory + _sanitizedModelName + "String_Node_Str";
  try {
    Writer modelFileWriter=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(modelFileName)));
    _model.exportMoML(modelFileWriter);
    modelFileWriter.close();
  }
 catch (  IOException ex) {
    throw new InternalErrorException("String_Node_Str" + modelFileName + "String_Node_Str"+ ex);
  }
  _templateDirectory=StringUtilities.substitute(Options.getString(options,"String_Node_Str"),"String_Node_Str",_ptIIDirectory);
  try {
    substitute(_templateDirectory + "String_Node_Str",_substituteMap,_modelDirectory + "String_Node_Str");
    substitute(_templateDirectory + "String_Node_Str",_substituteMap,_modelDirectory + _sanitizedModelName + "String_Node_Str");
    substitute(_templateDirectory + "String_Node_Str",_substituteMap,_modelDirectory + _sanitizedModelName + "String_Node_Str");
  }
 catch (  IOException ex) {
    throw new InternalErrorException("String_Node_Str" + "String_Node_Str" + ex);
  }
}