Program: 73208
Project: 73208
Buggy source:
/** 
 * Read in a .fmu file and parse the modelDescription.xml file.
 * @param fmuFileName the .fmu file
 * @return An object that represents the structure of themodelDescriptionFile.xml file.
 * @exception IOException If the file cannot be unzipped or themodelDescription.xml file contained by the fmuFileName zip file cannot be parsed.
 */
public static FMIModelDescription parseFMUFile(String fmuFileName) throws IOException {
  List<File> files=null;
  try {
    files=_unzip(fmuFileName);
  }
 catch (  IOException ex) {
    throw new IOException("String_Node_Str" + fmuFileName + "String_Node_Str",ex);
  }
  File modelDescriptionFile=null;
  for (  File file : files) {
    if (file.getName().endsWith("String_Node_Str")) {
      modelDescriptionFile=file;
      break;
    }
  }
  if (modelDescriptionFile == null) {
    throw new IOException("String_Node_Str" + "String_Node_Str" + fmuFileName + "String_Node_Str");
  }
  Document document=null;
  try {
    DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
    DocumentBuilder db=dbf.newDocumentBuilder();
    document=db.parse(modelDescriptionFile.getCanonicalPath());
  }
 catch (  Exception ex) {
    throw new IOException("String_Node_Str" + modelDescriptionFile + "String_Node_Str",ex);
  }
  Element root=document.getDocumentElement();
  FMIModelDescription fmiModelDescription=new FMIModelDescription();
  fmiModelDescription.files=files;
  if (root.hasAttribute("String_Node_Str")) {
    fmiModelDescription.fmiVersion=root.getAttribute("String_Node_Str");
  }
  if (root.hasAttribute("String_Node_Str")) {
    fmiModelDescription.modelIdentifier=root.getAttribute("String_Node_Str");
  }
  if (root.hasAttribute("String_Node_Str")) {
    fmiModelDescription.modelName=root.getAttribute("String_Node_Str");
  }
  if (root.hasAttribute("String_Node_Str")) {
    fmiModelDescription.guid=root.getAttribute("String_Node_Str");
  }
  NodeList types=document.getElementsByTagName("String_Node_Str");
  for (int i=0; i < types.getLength(); i++) {
    Element element=(Element)types.item(i);
    String elementTypeName=element.getAttribute("String_Node_Str");
    NodeList children=element.getChildNodes();
    for (i=0; i < children.getLength(); i++) {
      Node child=element.getChildNodes().item(i);
      if (child instanceof Element) {
        Element childElement=(Element)child;
        String childTypeName=childElement.getNodeName();
        fmiModelDescription.typeDefinitions.put(elementTypeName,childTypeName);
      }
    }
  }
  String sharedLibrary=FMUFile.fmuSharedLibrary(fmiModelDescription);
  try {
    fmiModelDescription.nativeLibrary=NativeLibrary.getInstance(sharedLibrary);
  }
 catch (  Throwable throwable) {
    List<String> binariesFiles=new LinkedList<String>();
    for (    File file : fmiModelDescription.files) {
      if (file.toString().indexOf("String_Node_Str") != -1) {
        binariesFiles.add(file.toString() + "String_Node_Str");
      }
    }
    String message="String_Node_Str" + sharedLibrary + "String_Node_Str"+ "String_Node_Str"+ fmuFileName+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ binariesFiles;
    System.out.println(message + "String_Node_Str" + throwable);
    throw new IOException(message,throwable);
  }
  NodeList scalarVariables=document.getElementsByTagName("String_Node_Str");
  for (int i=0; i < scalarVariables.getLength(); i++) {
    Element element=(Element)scalarVariables.item(i);
    fmiModelDescription.modelVariables.add(new FMIScalarVariable(fmiModelDescription,element));
  }
  return fmiModelDescription;
}

Fixed version (ground truth):
/** 
 * Read in a .fmu file and parse the modelDescription.xml file.
 * @param fmuFileName the .fmu file
 * @return An object that represents the structure of themodelDescriptionFile.xml file.
 * @exception IOException If the file cannot be unzipped or themodelDescription.xml file contained by the fmuFileName zip file cannot be parsed.
 */
public static FMIModelDescription parseFMUFile(String fmuFileName) throws IOException {
  List<File> files=null;
  try {
    files=_unzip(fmuFileName);
  }
 catch (  IOException ex) {
    throw new IOException("String_Node_Str" + fmuFileName + "String_Node_Str",ex);
  }
  File modelDescriptionFile=null;
  for (  File file : files) {
    if (file.getName().endsWith("String_Node_Str")) {
      modelDescriptionFile=file;
      break;
    }
  }
  if (modelDescriptionFile == null) {
    throw new IOException("String_Node_Str" + "String_Node_Str" + fmuFileName + "String_Node_Str");
  }
  Document document=null;
  try {
    DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
    DocumentBuilder db=dbf.newDocumentBuilder();
    document=db.parse(modelDescriptionFile.getCanonicalPath());
  }
 catch (  Exception ex) {
    throw new IOException("String_Node_Str" + modelDescriptionFile + "String_Node_Str",ex);
  }
  Element root=document.getDocumentElement();
  FMIModelDescription fmiModelDescription=new FMIModelDescription();
  fmiModelDescription.files=files;
  if (root.hasAttribute("String_Node_Str")) {
    fmiModelDescription.fmiVersion=root.getAttribute("String_Node_Str");
  }
  if (root.hasAttribute("String_Node_Str")) {
    fmiModelDescription.modelIdentifier=root.getAttribute("String_Node_Str");
  }
  if (root.hasAttribute("String_Node_Str")) {
    fmiModelDescription.modelName=root.getAttribute("String_Node_Str");
  }
  if (root.hasAttribute("String_Node_Str")) {
    fmiModelDescription.guid=root.getAttribute("String_Node_Str");
  }
  NodeList types=document.getElementsByTagName("String_Node_Str");
  int length=types.getLength();
  for (int i=0; i < length; i++) {
    Element element=(Element)types.item(i);
    String elementTypeName=element.getAttribute("String_Node_Str");
    NodeList children=element.getChildNodes();
    for (int j=0; j < children.getLength(); j++) {
      Node child=element.getChildNodes().item(j);
      if (child instanceof Element) {
        Element childElement=(Element)child;
        String childTypeName=childElement.getNodeName();
        fmiModelDescription.typeDefinitions.put(elementTypeName,childTypeName);
      }
    }
  }
  String sharedLibrary=FMUFile.fmuSharedLibrary(fmiModelDescription);
  try {
    fmiModelDescription.nativeLibrary=NativeLibrary.getInstance(sharedLibrary);
  }
 catch (  Throwable throwable) {
    List<String> binariesFiles=new LinkedList<String>();
    for (    File file : fmiModelDescription.files) {
      if (file.toString().indexOf("String_Node_Str") != -1) {
        binariesFiles.add(file.toString() + "String_Node_Str");
      }
    }
    String message="String_Node_Str" + sharedLibrary + "String_Node_Str"+ "String_Node_Str"+ fmuFileName+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ binariesFiles;
    System.out.println(message + "String_Node_Str" + throwable);
    throw new IOException(message,throwable);
  }
  NodeList scalarVariables=document.getElementsByTagName("String_Node_Str");
  for (int i=0; i < scalarVariables.getLength(); i++) {
    Element element=(Element)scalarVariables.item(i);
    fmiModelDescription.modelVariables.add(new FMIScalarVariable(fmiModelDescription,element));
  }
  return fmiModelDescription;
}