Program: 99108
Project: 99108
Buggy source:
public static FbxScene importScene(InputStream inputStream){
  String[] list=null;
  try {
    InputStreamReader isr=new InputStreamReader(inputStream);
    char[] buffer=new char[inputStream.available()];
    isr.read(buffer);
    list=new String(buffer).split("String_Node_Str");
  }
 catch (  IOException e) {
    Log.e("String_Node_Str",e.getMessage());
  }
  String line="String_Node_Str";
  index=0;
  int model_count=0;
  int geometry_count=0;
  int node_attribute_count=0;
  int anim_curve_count=0;
  int anim_curve_node_count=0;
  int deformer_count=0;
  int material_count=0;
  int texture_count=0;
  int video_count=0;
  int startFrame=0, endFrame=0;
  int keyframeLength=0;
  FbxTimeSpan timeSpan=new FbxTimeSpan();
  FbxTimeMode timeMode=null;
  int upAxis=1;
  int upAxisSign=1;
  int frontAxis=1;
  int frontAxisSign=1;
  while (!line.startsWith("String_Node_Str")) {
    line=list[index++].trim();
    if (line.startsWith("String_Node_Str")) {
      timeMode=new FbxTimeMode(getLastCommaAsInt(line));
    }
 else     if (line.startsWith("String_Node_Str")) {
      timeSpan.setStart(getLastCommaAsLong(line));
    }
 else     if (line.startsWith("String_Node_Str")) {
      timeSpan.setStop(getLastCommaAsLong(line));
    }
 else     if (line.startsWith("String_Node_Str")) {
      upAxis=getLastCommaAsInt(line);
    }
 else     if (line.startsWith("String_Node_Str")) {
      upAxisSign=getLastCommaAsInt(line);
    }
 else     if (line.startsWith("String_Node_Str")) {
      frontAxis=getLastCommaAsInt(line);
    }
 else     if (line.startsWith("String_Node_Str")) {
      frontAxisSign=getLastCommaAsInt(line);
    }
  }
  while (!line.startsWith("String_Node_Str")) {
    line=list[index++].trim();
    if (line.startsWith("String_Node_Str")) {
      line=line.split("String_Node_Str")[1];
      String attribute=list[index++];
      int count=Convert.toInt(attribute.split("String_Node_Str")[1].trim());
      if (line.equals("String_Node_Str")) {
        model_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        geometry_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        node_attribute_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        anim_curve_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        anim_curve_node_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        deformer_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        material_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        texture_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        video_count=count;
      }
    }
  }
  HashMap<Long,FbxObject> maps=new HashMap<Long,FbxObject>();
  int current_geometry_count=0;
  int current_node_attribute_count=0;
  int current_node_count=0;
  int current_deformer_count=0;
  int current_anim_curve_node_count=0;
  int current_anim_curve_count=0;
  int current_material_count=0;
  int current_texture_count=0;
  int current_video_count=0;
  while (!line.startsWith("String_Node_Str")) {
    line=list[index++].trim();
    if (current_geometry_count < geometry_count) {
      if (line.startsWith("String_Node_Str")) {
        current_geometry_count+=1;
        Object[] geoItems=getID_NameAndType(line.substring(10));
        long geometry_id=(Long)geoItems[0];
        FbxMesh mesh=new FbxMesh(geometry_id);
        while (true) {
          line=list[index++].trim();
          if (line.startsWith("String_Node_Str")) {
            int count=Convert.toInt(line.substring(11).split("String_Node_Str")[0]);
            mesh.setVertices(readFloatAttribute(list,count));
          }
 else           if (line.startsWith("String_Node_Str")) {
            int count=Convert.toInt(line.substring(21).split("String_Node_Str")[0]);
            mesh.setIndices(readIndicesAttribute(list,count));
          }
 else           if (line.startsWith("String_Node_Str")) {
            int count=Convert.toInt(line.substring(10).split("String_Node_Str")[0]);
            mesh.setNormals(readFloatAttribute(list,count));
          }
 else           if (line.startsWith("String_Node_Str")) {
            int count=Convert.toInt(line.substring(5).split("String_Node_Str")[0]);
            mesh.setUV(readFloatAttribute(list,count));
          }
 else           if (line.startsWith("String_Node_Str")) {
            int count=Convert.toInt(line.substring(10).split("String_Node_Str")[0]);
            mesh.setUVIndices(readUVIndicesAttribute(list,count));
            break;
          }
        }
        maps.put(geometry_id,mesh);
      }
    }
    if (current_node_attribute_count < node_attribute_count) {
      if (line.startsWith("String_Node_Str")) {
        current_node_attribute_count+=1;
        Object[] items=getID_NameAndType(line.substring(15));
        long node_attribute_id=(Long)items[0];
        int attributeType;
        FbxNodeAttribute nodeAttribute=null;
        if (items[2].equals("String_Node_Str")) {
          attributeType=FbxNodeAttribute.Null;
          nodeAttribute=new FbxNodeAttribute(node_attribute_id,attributeType);
        }
 else         if (items[2].equals("String_Node_Str")) {
          attributeType=FbxNodeAttribute.Mesh;
          nodeAttribute=new FbxNodeAttribute(node_attribute_id,attributeType);
        }
 else {
          int skeletonType=0;
          if (line.contains("String_Node_Str")) {
            skeletonType=FbxSkeleton.LimbNode;
          }
 else           if (line.contains("String_Node_Str") || line.contains("String_Node_Str")) {
            skeletonType=FbxSkeleton.Root;
          }
          nodeAttribute=new FbxSkeleton(node_attribute_id,skeletonType);
        }
        maps.put(node_attribute_id,nodeAttribute);
      }
    }
    if (current_node_count < model_count) {
      if (line.startsWith("String_Node_Str")) {
        current_node_count+=1;
        StringBuilder[] item=new StringBuilder[2];
        item[0]=new StringBuilder();
        item[1]=new StringBuilder();
        int inner_index=0;
        boolean begin=false;
        char temp=0;
        for (int i=0; i < line.length(); i++) {
          char c=line.charAt(i);
          if (temp == ':') {
            if (c == ' ') {
              begin=true;
              inner_index=0;
              continue;
            }
 else             if (c == ':') {
              begin=true;
              inner_index=1;
              continue;
            }
          }
          if (c == '"' || c == ',') {
            begin=false;
            if (inner_index == 1) {
              break;
            }
          }
          if (begin) {
            item[inner_index].append(c);
          }
          temp=c;
        }
        long nodeID=Convert.toLong(item[0].toString().trim());
        String nodeName=item[1].toString();
        FbxNode node=new FbxNode(nodeID);
        node.setName(nodeName);
        Vector3 lclT=new Vector3();
        Vector3 lclR=new Vector3();
        Vector3 lclS=new Vector3(1,1,1);
        while (!(line=list[index++]).contains("String_Node_Str")) {
          if (line.contains("String_Node_Str")) {
            lclT=new Vector3(splitCommaToFloatArray(line,3));
          }
 else           if (line.contains("String_Node_Str")) {
            lclR=new Vector3(splitCommaToFloatArray(line,3));
          }
 else           if (line.contains("String_Node_Str")) {
            lclS=new Vector3(splitCommaToFloatArray(line,3));
          }
        }
        node.setLclTranslation(lclT);
        node.setLclRotation(lclR);
        node.setLclScaling(lclS);
        maps.put(nodeID,node);
      }
    }
    if (current_deformer_count < deformer_count) {
      if (line.startsWith("String_Node_Str")) {
        current_deformer_count+=1;
        Object[] items=getID_NameAndType(line.substring(10));
        long deformer_id=(Long)items[0];
        if (items[2].equals("String_Node_Str")) {
          FbxSkin skin=new FbxSkin(deformer_id);
          maps.put(deformer_id,skin);
        }
 else {
          FbxCluster cluster=new FbxCluster(deformer_id);
          while (true) {
            line=list[index++].trim();
            if (line.startsWith("String_Node_Str")) {
              int count=Convert.toInt(line.substring(10).split("String_Node_Str")[0]);
              cluster.setIndices(readIntAttribute(list,count));
            }
 else             if (line.startsWith("String_Node_Str")) {
              int count=Convert.toInt(line.substring(10).split("String_Node_Str")[0]);
              cluster.setWeights(readFloatAttribute(list,count));
            }
 else             if (line.startsWith("String_Node_Str")) {
              int count=Convert.toInt(line.substring(12).split("String_Node_Str")[0]);
              cluster.setTransform(readFloatAttribute(list,count));
            }
 else             if (line.startsWith("String_Node_Str")) {
              int count=Convert.toInt(line.substring(16).split("String_Node_Str")[0]);
              cluster.setTransformLink(readFloatAttribute(list,count));
              break;
            }
          }
          maps.put(deformer_id,cluster);
        }
      }
    }
    if (current_material_count < material_count) {
      if (line.startsWith("String_Node_Str")) {
        current_material_count+=1;
        Object[] items=getID_NameAndType(line.substring(10));
        long material_id=(Long)items[0];
        String material_name=((String)items[1]).substring(10);
        FbxSurfacePhong material=new FbxSurfacePhong(material_id);
        material.setName(material_name);
        while (!line.contains("String_Node_Str")) {
          line=list[index++].trim();
          if (line.startsWith("String_Node_Str")) {
            material.getEmissive().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getAmbient().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getDiffuse().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getNormalMap().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getBump().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getTransparentColor().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getDisplacementColor().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getVectorDisplacementColor().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getSpecular().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getReflection().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setShinniness(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setEmissiveFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setAmbientFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setDiffuseFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setBumpFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setTransparencyFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setDisplacementFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setVectorDisplacementFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setSpecularFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setReflectionFactor(splitCommaToFloat(line));
          }
        }
        maps.put(material_id,material);
      }
    }
    if (current_texture_count < texture_count) {
      if (line.startsWith("String_Node_Str")) {
        current_texture_count+=1;
        String[] t=line.substring(9).split("String_Node_Str");
        long texture_id=Convert.toLong(t[0]);
        String texture_name=t[1].split("String_Node_Str")[1].substring(9);
        FbxFileTexture texture=new FbxFileTexture(texture_id);
        texture.setName(texture_name);
        while (!line.contains("String_Node_Str")) {
          line=list[index++].trim();
        }
        line=list[index++].trim();
        while (!line.contains("String_Node_Str")) {
          line=list[index++].trim();
          String[] tmp=line.split("String_Node_Str");
          if (line.startsWith("String_Node_Str")) {
            String tt=tmp[tmp.length - 1];
            String fileName=tt;
            int indexOfSlash=tt.lastIndexOf("String_Node_Str");
            if (indexOfSlash > -1) {
              fileName=tt.substring(indexOfSlash + 1);
            }
            texture.setFileName(fileName);
          }
 else           if (line.startsWith("String_Node_Str")) {
            String tt=tmp[tmp.length - 1];
            texture.setRelativeFileName(tt);
          }
 else           if (line.startsWith("String_Node_Str")) {
          }
        }
        maps.put(texture_id,texture);
      }
    }
    if (current_video_count < video_count) {
      if (line.startsWith("String_Node_Str")) {
        current_video_count+=1;
      }
    }
    if (current_anim_curve_node_count < anim_curve_node_count) {
      if (line.startsWith("String_Node_Str")) {
        current_anim_curve_node_count+=1;
        long anim_curve_node_id=Convert.toLong(line.substring(20).split("String_Node_Str")[0]);
        FbxAnimCurveNode animCurveNode=new FbxAnimCurveNode(anim_curve_node_id);
        maps.put(anim_curve_node_id,animCurveNode);
      }
    }
    if (current_anim_curve_count < anim_curve_count) {
      if (line.startsWith("String_Node_Str")) {
        current_anim_curve_count+=1;
        long anim_curve_id=Convert.toLong(line.substring(16).split("String_Node_Str")[0]);
        FbxAnimCurve animCurve=new FbxAnimCurve(anim_curve_id);
        long[] times=null;
        float[] values=null;
        while (true) {
          line=list[index++].trim();
          if (line.startsWith("String_Node_Str")) {
            int count=Convert.toInt(line.substring(10).split("String_Node_Str")[0]);
            times=readLongAttribute(list,count);
            if (times.length > 0) {
              int length=(int)((times[times.length - 1] - times[0]) / 1539538600L) + 1;
              if (length > keyframeLength) {
                keyframeLength=length;
                startFrame=(int)(times[0] / 1539538600L);
                endFrame=(int)(times[times.length - 1] / 1539538600L);
              }
            }
          }
 else           if (line.startsWith("String_Node_Str")) {
            int count=Convert.toInt(line.substring(16).split("String_Node_Str")[0]);
            values=readFloatAttribute(list,count);
            break;
          }
        }
        animCurve.set(times,values);
        maps.put(anim_curve_id,animCurve);
      }
    }
  }
  ArrayList<FbxNode> rootnodes=new ArrayList<FbxNode>();
  while (!line.startsWith("String_Node_Str") && index < list.length) {
    line=list[index++].trim();
    if (line.endsWith("String_Node_Str")) {
      line=list[index++].trim();
      String attribute=line.substring(8);
      long root_node_id=Convert.toLong(attribute.substring(0,attribute.length() - 2));
      FbxNode node=(FbxNode)maps.get(root_node_id);
      rootnodes.add(node);
    }
 else     if (line.endsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] attribute=line.substring(8).split("String_Node_Str");
      long node_id=Convert.toLong(attribute[0]);
      long sub_deformer_id=Convert.toLong(attribute[1]);
      FbxNode associateModel=(FbxNode)maps.get(node_id);
      FbxCluster cluster=(FbxCluster)maps.get(sub_deformer_id);
      cluster.setAssociateModel(associateModel);
    }
 else     if (line.startsWith("String_Node_Str")) {
      if (line.split("String_Node_Str")[1].startsWith("String_Node_Str")) {
        line=list[index++].trim();
        String[] attribute=line.substring(8).split("String_Node_Str");
        long child_node_id=Convert.toLong(attribute[0]);
        long parent_node_id=Convert.toLong(attribute[1]);
        FbxNode child_node=(FbxNode)maps.get(child_node_id);
        FbxNode parent_node=(FbxNode)maps.get(parent_node_id);
        parent_node.addChild(child_node);
        child_node.setParent(parent_node);
      }
    }
 else     if (line.startsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] attribute=line.substring(8).split("String_Node_Str");
      long geometry_id=Convert.toLong(attribute[0]);
      long node_id=Convert.toLong(attribute[1]);
      FbxNode node=(FbxNode)maps.get(node_id);
      FbxGeometry geometry=(FbxGeometry)maps.get(geometry_id);
      node.setNodeAttribute(geometry);
    }
 else     if (line.startsWith("String_Node_Str")) {
      String[] tmp0=line.split("String_Node_Str");
      if (tmp0[1].startsWith("String_Node_Str")) {
        line=list[index++].trim();
        String[] attribute=line.substring(8).split("String_Node_Str");
        long anim_curve_node_id=Convert.toLong(attribute[0]);
        long node_id=Convert.toLong(attribute[1]);
        FbxNode node=(FbxNode)maps.get(node_id);
        FbxAnimCurveNode animCurveNode=(FbxAnimCurveNode)maps.get(anim_curve_node_id);
        char type=tmp0[0].charAt(tmp0[0].length() - 1);
        if (type == 'T') {
          node.setLclTranslation(animCurveNode);
        }
 else         if (type == 'R') {
          node.setLclRotation(animCurveNode);
        }
 else {
          node.setLclScaling(animCurveNode);
        }
      }
    }
 else     if (line.startsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] attribute=line.substring(8).split("String_Node_Str");
      long node_attribute_id=Convert.toLong(attribute[0]);
      long node_id=Convert.toLong(attribute[1]);
      FbxNode node=(FbxNode)maps.get(node_id);
      FbxNodeAttribute nodeAttribute=(FbxNodeAttribute)maps.get(node_attribute_id);
      node.setNodeAttribute(nodeAttribute);
    }
 else     if (line.startsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] attribute=line.substring(8).split("String_Node_Str");
      long deformer_id=Convert.toLong(attribute[0]);
      long geometry_id=Convert.toLong(attribute[1]);
      FbxDeformer deformer=(FbxDeformer)maps.get(deformer_id);
      FbxGeometry geometry=(FbxGeometry)maps.get(geometry_id);
      geometry.addDeformer(deformer);
    }
 else     if (line.startsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] first_line=line.substring(8).split("String_Node_Str");
      index+=2;
      line=list[index++].trim();
      String[] second_line=line.substring(8).split("String_Node_Str");
      index+=2;
      line=list[index++].trim();
      String[] third_line=line.substring(8).split("String_Node_Str");
      long anim_curve_node_id=Convert.toLong(first_line[1]);
      long x_id=Convert.toLong(first_line[0]);
      long y_id=Convert.toLong(second_line[0]);
      long z_id=Convert.toLong(third_line[0]);
      FbxAnimCurveNode animCurveNode=(FbxAnimCurveNode)maps.get(anim_curve_node_id);
      FbxAnimCurve animCurveX=(FbxAnimCurve)maps.get(x_id);
      FbxAnimCurve animCurveY=(FbxAnimCurve)maps.get(y_id);
      FbxAnimCurve animCurveZ=(FbxAnimCurve)maps.get(z_id);
      animCurveNode.set(animCurveX,animCurveY,animCurveZ);
    }
 else     if (line.startsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] attribute=line.substring(8).split("String_Node_Str");
      long sub_deformer_id=Convert.toLong(attribute[0]);
      long deformer_id=Convert.toLong(attribute[1]);
      FbxCluster cluster=(FbxCluster)maps.get(sub_deformer_id);
      FbxSkin deformer=(FbxSkin)maps.get(deformer_id);
      deformer.addCluster(cluster);
    }
 else     if (line.startsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] attribute=line.substring(8).split("String_Node_Str");
      long material_id=Convert.toLong(attribute[0]);
      long node_id=Convert.toLong(attribute[1]);
      FbxSurfaceMaterial material=(FbxSurfaceMaterial)maps.get(material_id);
      FbxNode node=(FbxNode)maps.get(node_id);
      node.setMaterial(material);
    }
 else     if (line.startsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] attribute=line.substring(8).split("String_Node_Str");
      long texture_id=Convert.toLong(attribute[0]);
      long material_id=Convert.toLong(attribute[1]);
      String target=attribute[2].trim().split("String_Node_Str")[1];
      FbxTexture texture=(FbxTexture)maps.get(texture_id);
      FbxSurfacePhong material=(FbxSurfacePhong)maps.get(material_id);
      if (target.equalsIgnoreCase("String_Node_Str")) {
        material.setDiffuseTexture(texture);
      }
 else       if (target.equalsIgnoreCase("String_Node_Str")) {
      }
    }
  }
  FbxScene scene=new FbxScene();
  for (  FbxObject fbxObject : maps.values()) {
    if (fbxObject instanceof FbxGeometry) {
      scene.addGeometry((FbxGeometry)fbxObject);
    }
 else     if (fbxObject instanceof FbxNode) {
      scene.addNode((FbxNode)fbxObject);
    }
 else     if (fbxObject instanceof FbxSurfaceMaterial) {
      scene.addMaterial((FbxSurfaceMaterial)fbxObject);
    }
  }
  FbxNode sceneRootNode=scene.getRootnodes();
  for (  FbxNode rootnode : rootnodes) {
    sceneRootNode.addChild(rootnode);
  }
  FbxGlobalSetting globalSetting=scene.globalSetting();
  globalSetting.setTimeMode(timeMode);
  globalSetting.setTimeSpan(timeSpan);
  globalSetting.setFrontAxis(frontAxis);
  globalSetting.setFrontAxisSign(frontAxisSign);
  globalSetting.setUpAxis(upAxis);
  globalSetting.setUpAxisSign(upAxisSign);
  scene.setObjectDefinitions(model_count,geometry_count,node_attribute_count,anim_curve_count,anim_curve_node_count,deformer_count);
  scene.setKeyframe(startFrame,endFrame,keyframeLength);
  list=null;
  return scene;
}

Fixed version (ground truth):
public static FbxScene importScene(InputStream inputStream){
  String[] list=null;
  try {
    InputStreamReader isr=new InputStreamReader(inputStream);
    char[] buffer=new char[inputStream.available()];
    isr.read(buffer);
    list=new String(buffer).split("String_Node_Str");
    isr.close();
    isr=null;
  }
 catch (  IOException e) {
    Log.e("String_Node_Str",e.getMessage());
  }
  String line="String_Node_Str";
  index=0;
  int model_count=0;
  int geometry_count=0;
  int node_attribute_count=0;
  int anim_curve_count=0;
  int anim_curve_node_count=0;
  int deformer_count=0;
  int material_count=0;
  int texture_count=0;
  int video_count=0;
  int startFrame=0, endFrame=0;
  int keyframeLength=0;
  FbxTimeSpan timeSpan=new FbxTimeSpan();
  FbxTimeMode timeMode=null;
  int upAxis=1;
  int upAxisSign=1;
  int frontAxis=1;
  int frontAxisSign=1;
  while (!line.startsWith("String_Node_Str")) {
    line=list[index++].trim();
    if (line.startsWith("String_Node_Str")) {
      timeMode=new FbxTimeMode(getLastCommaAsInt(line));
    }
 else     if (line.startsWith("String_Node_Str")) {
      timeSpan.setStart(getLastCommaAsLong(line));
    }
 else     if (line.startsWith("String_Node_Str")) {
      timeSpan.setStop(getLastCommaAsLong(line));
    }
 else     if (line.startsWith("String_Node_Str")) {
      upAxis=getLastCommaAsInt(line);
    }
 else     if (line.startsWith("String_Node_Str")) {
      upAxisSign=getLastCommaAsInt(line);
    }
 else     if (line.startsWith("String_Node_Str")) {
      frontAxis=getLastCommaAsInt(line);
    }
 else     if (line.startsWith("String_Node_Str")) {
      frontAxisSign=getLastCommaAsInt(line);
    }
  }
  while (!line.startsWith("String_Node_Str")) {
    line=list[index++].trim();
    if (line.startsWith("String_Node_Str")) {
      line=line.split("String_Node_Str")[1];
      String attribute=list[index++];
      int count=Convert.toInt(attribute.split("String_Node_Str")[1].trim());
      if (line.equals("String_Node_Str")) {
        model_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        geometry_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        node_attribute_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        anim_curve_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        anim_curve_node_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        deformer_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        material_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        texture_count=count;
      }
 else       if (line.equals("String_Node_Str")) {
        video_count=count;
      }
    }
  }
  HashMap<Long,FbxObject> maps=new HashMap<Long,FbxObject>();
  int current_geometry_count=0;
  int current_node_attribute_count=0;
  int current_node_count=0;
  int current_deformer_count=0;
  int current_anim_curve_node_count=0;
  int current_anim_curve_count=0;
  int current_material_count=0;
  int current_texture_count=0;
  int current_video_count=0;
  while (!line.startsWith("String_Node_Str")) {
    line=list[index++].trim();
    if (current_geometry_count < geometry_count) {
      if (line.startsWith("String_Node_Str")) {
        current_geometry_count+=1;
        Object[] geoItems=getID_NameAndType(line.substring(10));
        long geometry_id=(Long)geoItems[0];
        FbxMesh mesh=new FbxMesh(geometry_id);
        while (true) {
          line=list[index++].trim();
          if (line.startsWith("String_Node_Str")) {
            int count=Convert.toInt(line.substring(11).split("String_Node_Str")[0]);
            mesh.setVertices(readFloatAttribute(list,count));
          }
 else           if (line.startsWith("String_Node_Str")) {
            int count=Convert.toInt(line.substring(21).split("String_Node_Str")[0]);
            mesh.setIndices(readIndicesAttribute(list,count));
          }
 else           if (line.startsWith("String_Node_Str")) {
            int count=Convert.toInt(line.substring(10).split("String_Node_Str")[0]);
            mesh.setNormals(readFloatAttribute(list,count));
          }
 else           if (line.startsWith("String_Node_Str")) {
            int count=Convert.toInt(line.substring(5).split("String_Node_Str")[0]);
            mesh.setUV(readFloatAttribute(list,count));
          }
 else           if (line.startsWith("String_Node_Str")) {
            int count=Convert.toInt(line.substring(10).split("String_Node_Str")[0]);
            mesh.setUVIndices(readUVIndicesAttribute(list,count));
            break;
          }
        }
        maps.put(geometry_id,mesh);
      }
    }
    if (current_node_attribute_count < node_attribute_count) {
      if (line.startsWith("String_Node_Str")) {
        current_node_attribute_count+=1;
        Object[] items=getID_NameAndType(line.substring(15));
        long node_attribute_id=(Long)items[0];
        int attributeType;
        FbxNodeAttribute nodeAttribute=null;
        if (items[2].equals("String_Node_Str")) {
          attributeType=FbxNodeAttribute.Null;
          nodeAttribute=new FbxNodeAttribute(node_attribute_id,attributeType);
        }
 else         if (items[2].equals("String_Node_Str")) {
          attributeType=FbxNodeAttribute.Mesh;
          nodeAttribute=new FbxNodeAttribute(node_attribute_id,attributeType);
        }
 else {
          int skeletonType=0;
          if (line.contains("String_Node_Str")) {
            skeletonType=FbxSkeleton.LimbNode;
          }
 else           if (line.contains("String_Node_Str") || line.contains("String_Node_Str")) {
            skeletonType=FbxSkeleton.Root;
          }
          nodeAttribute=new FbxSkeleton(node_attribute_id,skeletonType);
        }
        maps.put(node_attribute_id,nodeAttribute);
      }
    }
    if (current_node_count < model_count) {
      if (line.startsWith("String_Node_Str")) {
        current_node_count+=1;
        StringBuilder[] item=new StringBuilder[2];
        item[0]=new StringBuilder();
        item[1]=new StringBuilder();
        int inner_index=0;
        boolean begin=false;
        char temp=0;
        for (int i=0; i < line.length(); i++) {
          char c=line.charAt(i);
          if (temp == ':') {
            if (c == ' ') {
              begin=true;
              inner_index=0;
              continue;
            }
 else             if (c == ':') {
              begin=true;
              inner_index=1;
              continue;
            }
          }
          if (c == '"' || c == ',') {
            begin=false;
            if (inner_index == 1) {
              break;
            }
          }
          if (begin) {
            item[inner_index].append(c);
          }
          temp=c;
        }
        long nodeID=Convert.toLong(item[0].toString().trim());
        String nodeName=item[1].toString();
        FbxNode node=new FbxNode(nodeID);
        node.setName(nodeName);
        Vector3 lclT=new Vector3();
        Vector3 lclR=new Vector3();
        Vector3 lclS=new Vector3(1,1,1);
        while (!(line=list[index++]).contains("String_Node_Str")) {
          if (line.contains("String_Node_Str")) {
            lclT=new Vector3(splitCommaToFloatArray(line,3));
          }
 else           if (line.contains("String_Node_Str")) {
            lclR=new Vector3(splitCommaToFloatArray(line,3));
          }
 else           if (line.contains("String_Node_Str")) {
            lclS=new Vector3(splitCommaToFloatArray(line,3));
          }
        }
        node.setLclTranslation(lclT);
        node.setLclRotation(lclR);
        node.setLclScaling(lclS);
        maps.put(nodeID,node);
      }
    }
    if (current_deformer_count < deformer_count) {
      if (line.startsWith("String_Node_Str")) {
        current_deformer_count+=1;
        Object[] items=getID_NameAndType(line.substring(10));
        long deformer_id=(Long)items[0];
        if (items[2].equals("String_Node_Str")) {
          FbxSkin skin=new FbxSkin(deformer_id);
          maps.put(deformer_id,skin);
        }
 else {
          FbxCluster cluster=new FbxCluster(deformer_id);
          while (true) {
            line=list[index++].trim();
            if (line.startsWith("String_Node_Str")) {
              int count=Convert.toInt(line.substring(10).split("String_Node_Str")[0]);
              cluster.setIndices(readIntAttribute(list,count));
            }
 else             if (line.startsWith("String_Node_Str")) {
              int count=Convert.toInt(line.substring(10).split("String_Node_Str")[0]);
              cluster.setWeights(readFloatAttribute(list,count));
            }
 else             if (line.startsWith("String_Node_Str")) {
              int count=Convert.toInt(line.substring(12).split("String_Node_Str")[0]);
              cluster.setTransform(readFloatAttribute(list,count));
            }
 else             if (line.startsWith("String_Node_Str")) {
              int count=Convert.toInt(line.substring(16).split("String_Node_Str")[0]);
              cluster.setTransformLink(readFloatAttribute(list,count));
              break;
            }
          }
          maps.put(deformer_id,cluster);
        }
      }
    }
    if (current_material_count < material_count) {
      if (line.startsWith("String_Node_Str")) {
        current_material_count+=1;
        Object[] items=getID_NameAndType(line.substring(10));
        long material_id=(Long)items[0];
        String material_name=((String)items[1]).substring(10);
        FbxSurfacePhong material=new FbxSurfacePhong(material_id);
        material.setName(material_name);
        while (!line.contains("String_Node_Str")) {
          line=list[index++].trim();
          if (line.startsWith("String_Node_Str")) {
            material.getEmissive().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getAmbient().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getDiffuse().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getNormalMap().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getBump().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getTransparentColor().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getDisplacementColor().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getVectorDisplacementColor().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getSpecular().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.getReflection().set(new Vector3(splitCommaToFloatArray(line,3)));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setShinniness(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setEmissiveFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setAmbientFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setDiffuseFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setBumpFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setTransparencyFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setDisplacementFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setVectorDisplacementFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setSpecularFactor(splitCommaToFloat(line));
          }
 else           if (line.startsWith("String_Node_Str")) {
            material.setReflectionFactor(splitCommaToFloat(line));
          }
        }
        maps.put(material_id,material);
      }
    }
    if (current_texture_count < texture_count) {
      if (line.startsWith("String_Node_Str")) {
        current_texture_count+=1;
        String[] t=line.substring(9).split("String_Node_Str");
        long texture_id=Convert.toLong(t[0]);
        String texture_name=t[1].split("String_Node_Str")[1].substring(9);
        FbxFileTexture texture=new FbxFileTexture(texture_id);
        texture.setName(texture_name);
        while (!line.contains("String_Node_Str")) {
          line=list[index++].trim();
        }
        line=list[index++].trim();
        while (!line.contains("String_Node_Str")) {
          line=list[index++].trim();
          String[] tmp=line.split("String_Node_Str");
          if (line.startsWith("String_Node_Str")) {
            String tt=tmp[tmp.length - 1];
            String fileName=tt;
            int indexOfSlash=tt.lastIndexOf("String_Node_Str");
            if (indexOfSlash > -1) {
              fileName=tt.substring(indexOfSlash + 1);
            }
            texture.setFileName(fileName);
          }
 else           if (line.startsWith("String_Node_Str")) {
            String tt=tmp[tmp.length - 1];
            texture.setRelativeFileName(tt);
          }
 else           if (line.startsWith("String_Node_Str")) {
          }
        }
        maps.put(texture_id,texture);
      }
    }
    if (current_video_count < video_count) {
      if (line.startsWith("String_Node_Str")) {
        current_video_count+=1;
      }
    }
    if (current_anim_curve_node_count < anim_curve_node_count) {
      if (line.startsWith("String_Node_Str")) {
        current_anim_curve_node_count+=1;
        long anim_curve_node_id=Convert.toLong(line.substring(20).split("String_Node_Str")[0]);
        FbxAnimCurveNode animCurveNode=new FbxAnimCurveNode(anim_curve_node_id);
        maps.put(anim_curve_node_id,animCurveNode);
      }
    }
    if (current_anim_curve_count < anim_curve_count) {
      if (line.startsWith("String_Node_Str")) {
        current_anim_curve_count+=1;
        long anim_curve_id=Convert.toLong(line.substring(16).split("String_Node_Str")[0]);
        FbxAnimCurve animCurve=new FbxAnimCurve(anim_curve_id);
        long[] times=null;
        float[] values=null;
        while (true) {
          line=list[index++].trim();
          if (line.startsWith("String_Node_Str")) {
            int count=Convert.toInt(line.substring(10).split("String_Node_Str")[0]);
            times=readLongAttribute(list,count);
            if (times.length > 0) {
              int length=(int)((times[times.length - 1] - times[0]) / 1539538600L) + 1;
              if (length > keyframeLength) {
                keyframeLength=length;
                startFrame=(int)(times[0] / 1539538600L);
                endFrame=(int)(times[times.length - 1] / 1539538600L);
              }
            }
          }
 else           if (line.startsWith("String_Node_Str")) {
            int count=Convert.toInt(line.substring(16).split("String_Node_Str")[0]);
            values=readFloatAttribute(list,count);
            break;
          }
        }
        animCurve.set(times,values);
        maps.put(anim_curve_id,animCurve);
      }
    }
  }
  ArrayList<FbxNode> rootnodes=new ArrayList<FbxNode>();
  while (!line.startsWith("String_Node_Str") && index < list.length) {
    line=list[index++].trim();
    if (line.endsWith("String_Node_Str")) {
      line=list[index++].trim();
      String attribute=line.substring(8);
      long root_node_id=Convert.toLong(attribute.substring(0,attribute.length() - 2));
      FbxNode node=(FbxNode)maps.get(root_node_id);
      rootnodes.add(node);
    }
 else     if (line.endsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] attribute=line.substring(8).split("String_Node_Str");
      long node_id=Convert.toLong(attribute[0]);
      long sub_deformer_id=Convert.toLong(attribute[1]);
      FbxNode associateModel=(FbxNode)maps.get(node_id);
      FbxCluster cluster=(FbxCluster)maps.get(sub_deformer_id);
      cluster.setAssociateModel(associateModel);
    }
 else     if (line.startsWith("String_Node_Str")) {
      if (line.split("String_Node_Str")[1].startsWith("String_Node_Str")) {
        line=list[index++].trim();
        String[] attribute=line.substring(8).split("String_Node_Str");
        long child_node_id=Convert.toLong(attribute[0]);
        long parent_node_id=Convert.toLong(attribute[1]);
        FbxNode child_node=(FbxNode)maps.get(child_node_id);
        FbxNode parent_node=(FbxNode)maps.get(parent_node_id);
        parent_node.addChild(child_node);
        child_node.setParent(parent_node);
      }
    }
 else     if (line.startsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] attribute=line.substring(8).split("String_Node_Str");
      long geometry_id=Convert.toLong(attribute[0]);
      long node_id=Convert.toLong(attribute[1]);
      FbxNode node=(FbxNode)maps.get(node_id);
      FbxGeometry geometry=(FbxGeometry)maps.get(geometry_id);
      node.setNodeAttribute(geometry);
    }
 else     if (line.startsWith("String_Node_Str")) {
      String[] tmp0=line.split("String_Node_Str");
      if (tmp0[1].startsWith("String_Node_Str")) {
        line=list[index++].trim();
        String[] attribute=line.substring(8).split("String_Node_Str");
        long anim_curve_node_id=Convert.toLong(attribute[0]);
        long node_id=Convert.toLong(attribute[1]);
        FbxNode node=(FbxNode)maps.get(node_id);
        FbxAnimCurveNode animCurveNode=(FbxAnimCurveNode)maps.get(anim_curve_node_id);
        char type=tmp0[0].charAt(tmp0[0].length() - 1);
        if (type == 'T') {
          node.setLclTranslation(animCurveNode);
        }
 else         if (type == 'R') {
          node.setLclRotation(animCurveNode);
        }
 else {
          node.setLclScaling(animCurveNode);
        }
      }
    }
 else     if (line.startsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] attribute=line.substring(8).split("String_Node_Str");
      long node_attribute_id=Convert.toLong(attribute[0]);
      long node_id=Convert.toLong(attribute[1]);
      FbxNode node=(FbxNode)maps.get(node_id);
      FbxNodeAttribute nodeAttribute=(FbxNodeAttribute)maps.get(node_attribute_id);
      node.setNodeAttribute(nodeAttribute);
    }
 else     if (line.startsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] attribute=line.substring(8).split("String_Node_Str");
      long deformer_id=Convert.toLong(attribute[0]);
      long geometry_id=Convert.toLong(attribute[1]);
      FbxDeformer deformer=(FbxDeformer)maps.get(deformer_id);
      FbxGeometry geometry=(FbxGeometry)maps.get(geometry_id);
      geometry.addDeformer(deformer);
    }
 else     if (line.startsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] first_line=line.substring(8).split("String_Node_Str");
      index+=2;
      line=list[index++].trim();
      String[] second_line=line.substring(8).split("String_Node_Str");
      index+=2;
      line=list[index++].trim();
      String[] third_line=line.substring(8).split("String_Node_Str");
      long anim_curve_node_id=Convert.toLong(first_line[1]);
      long x_id=Convert.toLong(first_line[0]);
      long y_id=Convert.toLong(second_line[0]);
      long z_id=Convert.toLong(third_line[0]);
      FbxAnimCurveNode animCurveNode=(FbxAnimCurveNode)maps.get(anim_curve_node_id);
      FbxAnimCurve animCurveX=(FbxAnimCurve)maps.get(x_id);
      FbxAnimCurve animCurveY=(FbxAnimCurve)maps.get(y_id);
      FbxAnimCurve animCurveZ=(FbxAnimCurve)maps.get(z_id);
      animCurveNode.set(animCurveX,animCurveY,animCurveZ);
    }
 else     if (line.startsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] attribute=line.substring(8).split("String_Node_Str");
      long sub_deformer_id=Convert.toLong(attribute[0]);
      long deformer_id=Convert.toLong(attribute[1]);
      FbxCluster cluster=(FbxCluster)maps.get(sub_deformer_id);
      FbxSkin deformer=(FbxSkin)maps.get(deformer_id);
      deformer.addCluster(cluster);
    }
 else     if (line.startsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] attribute=line.substring(8).split("String_Node_Str");
      long material_id=Convert.toLong(attribute[0]);
      long node_id=Convert.toLong(attribute[1]);
      FbxSurfaceMaterial material=(FbxSurfaceMaterial)maps.get(material_id);
      FbxNode node=(FbxNode)maps.get(node_id);
      node.setMaterial(material);
    }
 else     if (line.startsWith("String_Node_Str")) {
      line=list[index++].trim();
      String[] attribute=line.substring(8).split("String_Node_Str");
      long texture_id=Convert.toLong(attribute[0]);
      long material_id=Convert.toLong(attribute[1]);
      String target=attribute[2].trim().split("String_Node_Str")[1];
      FbxTexture texture=(FbxTexture)maps.get(texture_id);
      FbxSurfacePhong material=(FbxSurfacePhong)maps.get(material_id);
      if (target.equalsIgnoreCase("String_Node_Str")) {
        material.setDiffuseTexture(texture);
      }
 else       if (target.equalsIgnoreCase("String_Node_Str")) {
      }
    }
  }
  FbxScene scene=new FbxScene();
  for (  FbxObject fbxObject : maps.values()) {
    if (fbxObject instanceof FbxGeometry) {
      scene.addGeometry((FbxGeometry)fbxObject);
    }
 else     if (fbxObject instanceof FbxNode) {
      scene.addNode((FbxNode)fbxObject);
    }
 else     if (fbxObject instanceof FbxSurfaceMaterial) {
      scene.addMaterial((FbxSurfaceMaterial)fbxObject);
    }
  }
  FbxNode sceneRootNode=scene.getRootnodes();
  for (  FbxNode rootnode : rootnodes) {
    sceneRootNode.addChild(rootnode);
  }
  FbxGlobalSetting globalSetting=scene.globalSetting();
  globalSetting.setTimeMode(timeMode);
  globalSetting.setTimeSpan(timeSpan);
  globalSetting.setFrontAxis(frontAxis);
  globalSetting.setFrontAxisSign(frontAxisSign);
  globalSetting.setUpAxis(upAxis);
  globalSetting.setUpAxisSign(upAxisSign);
  scene.setObjectDefinitions(model_count,geometry_count,node_attribute_count,anim_curve_count,anim_curve_node_count,deformer_count);
  scene.setKeyframe(startFrame,endFrame,keyframeLength);
  list=null;
  return scene;
}