Program: 72594
Project: 72594
Buggy source:
/** 
 * Return a two dimensional array of arrays of strings that name the model to be exported.
 * @return a two dimension array of arrays of strings that name themodels to be exported.
 * @exception IOException If there is a problem accessing the directory.
 */
public Object[] demos() throws IOException {
  String ptolemyPtIIDir=StringUtilities.getProperty("String_Node_Str");
  String modelsFile=ptolemyPtIIDir + "String_Node_Str";
  FileInputStream fileInputStream=null;
  DataInputStream dataInputStream=null;
  BufferedReader reader=null;
  List<String> demos=new LinkedList<String>();
  try {
    fileInputStream=new FileInputStream(modelsFile);
    dataInputStream=new DataInputStream(fileInputStream);
    reader=new BufferedReader(new InputStreamReader(dataInputStream));
    String line;
    while ((line=reader.readLine()) != null) {
      String prefix="String_Node_Str";
      if (!line.startsWith(prefix)) {
        throw new IOException("String_Node_Str" + modelsFile + "String_Node_Str"+ prefix+ "String_Node_Str"+ line);
      }
      String modelPath=line.substring(prefix.length());
      if (_openModel(modelPath)) {
        demos.add(modelPath);
      }
    }
  }
 catch (  Exception ex) {
    IOException exception=new IOException("String_Node_Str" + modelsFile + "String_Node_Str");
    exception.initCause(ex);
    throw exception;
  }
 finally {
    if (reader != null) {
      reader.close();
    }
  }
  int i=0;
  Object[][] data=new Object[demos.size()][1];
  for (  String demo : demos) {
    data[i++][0]=demo;
  }
  return data;
}

Fixed version (ground truth):
/** 
 * Return a two dimensional array of arrays of strings that name the model to be exported.
 * @return a two dimension array of arrays of strings that name themodels to be exported.
 * @exception IOException If there is a problem accessing the directory.
 */
public Object[] demos() throws IOException {
  String ptolemyPtIIDir=StringUtilities.getProperty("String_Node_Str");
  String modelsFile=ptolemyPtIIDir + "String_Node_Str";
  FileInputStream fileInputStream=null;
  DataInputStream dataInputStream=null;
  BufferedReader reader=null;
  List<String> demos=new LinkedList<String>();
  try {
    fileInputStream=new FileInputStream(modelsFile);
    dataInputStream=new DataInputStream(fileInputStream);
    reader=new BufferedReader(new InputStreamReader(dataInputStream,java.nio.charset.Charset.defaultCharset()));
    String line;
    while ((line=reader.readLine()) != null) {
      String prefix="String_Node_Str";
      if (!line.startsWith(prefix)) {
        throw new IOException("String_Node_Str" + modelsFile + "String_Node_Str"+ prefix+ "String_Node_Str"+ line);
      }
      String modelPath=line.substring(prefix.length());
      if (_openModel(modelPath)) {
        demos.add(modelPath);
      }
    }
  }
 catch (  Exception ex) {
    IOException exception=new IOException("String_Node_Str" + modelsFile + "String_Node_Str");
    exception.initCause(ex);
    throw exception;
  }
 finally {
    if (reader != null) {
      reader.close();
    }
  }
  int i=0;
  Object[][] data=new Object[demos.size()][1];
  for (  String demo : demos) {
    data[i++][0]=demo;
  }
  return data;
}