Program: 94243
Project: 94243
Buggy source:
public void init(){
  requestedRestart=false;
  requestedEnd=false;
  paused=false;
  if (shapeRenderer == null)   shapeRenderer=new ShapeRenderer();
  drawCommands=new ArrayList<ArrayList<Object>>();
  lastFrameBuffer=new RenderBuffer(null);
  environment=new Environment();
  environment.set(new ColorAttribute(ColorAttribute.AmbientLight,0,0,0,1));
  environment.set(new PointLightsAttribute());
  environment.set(new SpotLightsAttribute());
  environment.set(new DirectionalLightsAttribute());
  screenShaders=new ArrayList<ScreenShader>();
  defaultMaterial=new Material("String_Node_Str");
  defaultMaterial.set(new ColorAttribute(ColorAttribute.AmbientLight,1,1,1,1));
  defaultMaterial.set(new ColorAttribute(ColorAttribute.Diffuse,1,1,1,1));
  defaultMaterial.set(new BlendingAttribute());
  defaultMaterial.set(new BDXColorAttribute(BDXColorAttribute.Tint,0,0,0));
  defaultMesh=new Mesh(new ModelBuilder().createBox(1.0f,1.0f,1.0f,defaultMaterial,Usage.Position | Usage.Normal | Usage.TextureCoordinates),this);
  meshes=new HashMap<String,Mesh>();
  textures=new HashMap<String,Texture>();
  materials=new HashMap<String,Material>();
  modelToFrame=new HashMap<>();
  materials.put(defaultMaterial.id,defaultMaterial);
  BroadphaseInterface broadphase=new DbvtBroadphase();
  DefaultCollisionConfiguration collisionConfiguration=new DefaultCollisionConfiguration();
  SequentialImpulseConstraintSolver solver=new SequentialImpulseConstraintSolver();
  CollisionDispatcher dispatcher=new CollisionDispatcher(collisionConfiguration);
  toBeAdded=new ArrayList<GameObject>();
  toBeRemoved=new ArrayList<GameObject>();
  objects=new LinkedListNamed<GameObject>();
  lights=new LinkedListNamed<Light>();
  templates=new HashMap<String,GameObject>();
  json=new JsonReader().parse(scene);
  name=json.get("String_Node_Str").asString();
  world=new DiscreteDynamicsWorld(dispatcher,broadphase,solver,collisionConfiguration);
  world.setDebugDrawer(new Bullet.DebugDrawer(json.get("String_Node_Str").asBoolean()));
  gravity(new Vector3f(0,0,-json.get("String_Node_Str").asFloat()));
  float[] ac=json.get("String_Node_Str").asFloatArray();
  ambientLight(new Color(ac[0],ac[1],ac[2],1));
  if (!clearColorDefaultSet) {
    float[] cc=json.get("String_Node_Str").asFloatArray();
    Bdx.display.clearColor(new Color(cc[0],cc[1],cc[2],0));
    clearColorDefaultSet=true;
  }
  if (json.get("String_Node_Str").asBoolean()) {
    Bdx.profiler.init();
  }
  float[] fc=json.get("String_Node_Str").asFloatArray();
  fogColor=new Color(fc[0],fc[1],fc[2],1);
  fog(json.get("String_Node_Str").asBoolean());
  fogRange(json.get("String_Node_Str").asFloat(),json.get("String_Node_Str").asFloat());
  for (  JsonValue mat : json.get("String_Node_Str")) {
    String texName=mat.get("String_Node_Str").asString();
    boolean hasAlpha=mat.get("String_Node_Str").asString().equals("String_Node_Str");
    float opacity=hasAlpha ? mat.get("String_Node_Str").asFloat() : 1;
    Material material=new Material(mat.name);
    float[] c=mat.get("String_Node_Str").asFloatArray();
    material.set(ColorAttribute.createDiffuse(c[0],c[1],c[2],opacity));
    float[] s=mat.get("String_Node_Str").asFloatArray();
    material.set(ColorAttribute.createSpecular(s[0],s[1],s[2],1));
    material.set(FloatAttribute.createShininess(mat.get("String_Node_Str").asFloat()));
    material.set(new BDXColorAttribute(BDXColorAttribute.Tint,0,0,0));
    IntAttribute shadeless=(IntAttribute)new BDXIntAttribute();
    if (mat.get("String_Node_Str").asBoolean())     shadeless.value=1;
    material.set(shadeless);
    float emitStrength=mat.get("String_Node_Str").asFloat();
    material.set(new BDXColorAttribute(BDXColorAttribute.Emit,emitStrength,emitStrength,emitStrength));
    if (mat.get("String_Node_Str").asBoolean())     material.set(new IntAttribute(IntAttribute.CullFace,GL20.GL_BACK));
 else     material.set(new IntAttribute(IntAttribute.CullFace,GL20.GL_NONE));
    if (texName != null) {
      Texture texture=textures.get(texName);
      if (texture == null) {
        texture=new Texture(Gdx.files.internal("String_Node_Str" + texName));
        textures.put(texName,texture);
      }
      texture.setWrap(TextureWrap.Repeat,TextureWrap.Repeat);
      material.texture(texture);
    }
    if (hasAlpha) {
      BlendingAttribute ba=new BlendingAttribute(GL20.GL_SRC_ALPHA,GL20.GL_ONE_MINUS_SRC_ALPHA);
      ba.opacity=opacity;
      material.set(ba);
      material.set(FloatAttribute.createAlphaTest(0.01f));
    }
 else {
      BlendingAttribute ba=new BlendingAttribute();
      ba.blended=false;
      material.set(ba);
    }
    materials.put(mat.name,material);
  }
  for (  JsonValue model : json.get("String_Node_Str")) {
    meshes.put(model.name,new Mesh(createModel(model),this,model.name));
  }
  HashMap<String,JsonValue> fonts=new HashMap<>();
  for (  JsonValue fontj : json.get("String_Node_Str")) {
    String font=fontj.asString();
    fonts.put(font,new JsonReader().parse(Gdx.files.internal("String_Node_Str" + font + "String_Node_Str")));
  }
  FAnim.loadActions(json.get("String_Node_Str"));
  for (  JsonValue gobj : json.get("String_Node_Str")) {
    GameObject g=instantiator.newObject(gobj);
    g.json=gobj;
    g.name=gobj.name;
    g.scene=this;
    g.props=new HashMap<String,JsonValue>();
    for (    JsonValue prop : gobj.get("String_Node_Str")) {
      g.props.put(prop.name,prop);
    }
    String meshName=gobj.get("String_Node_Str").asString();
    if (meshName != null) {
      g.visibleNoChildren(gobj.get("String_Node_Str").asBoolean());
      g.mesh(meshName);
    }
 else {
      g.visibleNoChildren(false);
      g.mesh(defaultMesh);
    }
    com.badlogic.gdx.graphics.Mesh mesh=g.modelInstance.model.meshes.first();
    float[] trans=gobj.get("String_Node_Str").asFloatArray();
    JsonValue origin=json.get("String_Node_Str").get(meshName);
    JsonValue dimensions=json.get("String_Node_Str").get(meshName);
    g.origin=origin == null ? new Vector3f() : new Vector3f(origin.asFloatArray());
    g.dimensionsNoScale=dimensions == null ? new Vector3f(1,1,1) : new Vector3f(dimensions.asFloatArray());
    JsonValue physics=gobj.get("String_Node_Str");
    g.currBodyType=GameObject.BodyType.valueOf(physics.get("String_Node_Str").asString());
    g.currBoundsType=GameObject.BoundsType.valueOf(physics.get("String_Node_Str").asString());
    g.body=Bullet.makeBody(mesh,trans,g.origin,g.currBodyType,g.currBoundsType,physics);
    g.body.setUserPointer(g);
    g.scale(getGLMatrixScale(trans));
    String type=gobj.get("String_Node_Str").asString();
    if (type.equals("String_Node_Str")) {
      Text t=(Text)g;
      t.font=fonts.get(gobj.get("String_Node_Str").asString());
      t.text(gobj.get("String_Node_Str").asString());
      t.capacity=t.text().length();
    }
 else     if (type.equals("String_Node_Str")) {
      JsonValue settings=gobj.get("String_Node_Str");
      Light l=(Light)g;
      if (settings.getString("String_Node_Str").equals("String_Node_Str"))       l.type=Light.Type.POINT;
 else       if (settings.getString("String_Node_Str").equals("String_Node_Str"))       l.type=Light.Type.SUN;
 else       if (settings.getString("String_Node_Str").equals("String_Node_Str"))       l.type=Light.Type.SPOT;
      l.energy(settings.getFloat("String_Node_Str"));
      float[] c=settings.get("String_Node_Str").asFloatArray();
      l.color(new Color(c[0],c[1],c[2],c[3]));
      if (l.type.equals(Light.Type.SPOT)) {
        l.spotSize(settings.getFloat("String_Node_Str"));
      }
    }
 else     if (type.equals("String_Node_Str")) {
      Camera c=(Camera)g;
      float[] projection=gobj.get("String_Node_Str").get("String_Node_Str").asFloatArray();
      Vector2f resolution=new Vector2f(json.get("String_Node_Str").asFloatArray());
      if (gobj.get("String_Node_Str").get("String_Node_Str").asString().equals("String_Node_Str")) {
        c.initData(Camera.Type.PERSPECTIVE);
        c.size(resolution);
        c.resolution(resolution);
        c.projection(new Matrix4f(projection));
        c.fov(c.fov());
      }
 else {
        c.initData(Camera.Type.ORTHOGRAPHIC);
        c.size(resolution);
        c.resolution(resolution);
        c.zoom(2 / projection[0]);
      }
      Matrix4 pm=new Matrix4(projection);
      pm.inv();
      Vector3 vec=new Vector3(0,0,-1);
      vec.prj(pm);
      c.near(-vec.z);
      vec.set(0,0,1);
      vec.prj(pm);
      c.far(-vec.z);
    }
    templates.put(g.name,g);
  }
  hookParentChild();
  cameras=new ArrayListNamed<Camera>();
  addInstances();
  camera=(Camera)objects.get(json.get("String_Node_Str").asStringArray()[0]);
  String frameType=json.get("String_Node_Str").asString();
  Viewport.Type viewportType;
  if (frameType.equals("String_Node_Str")) {
    viewportType=Viewport.Type.LETTERBOX;
  }
 else   if (frameType.equals("String_Node_Str")) {
    viewportType=Viewport.Type.EXTEND;
  }
 else {
    viewportType=Viewport.Type.SCALE;
  }
  viewport=new Viewport(this,viewportType);
  for (  GameObject g : sortByPriority(new ArrayList<GameObject>(objects))) {
    initGameObject(g);
  }
  valid=true;
}

Fixed version (ground truth):
public void init(){
  requestedRestart=false;
  requestedEnd=false;
  paused=false;
  if (shapeRenderer == null)   shapeRenderer=new ShapeRenderer();
  drawCommands=new ArrayList<ArrayList<Object>>();
  lastFrameBuffer=new RenderBuffer(null);
  environment=new Environment();
  environment.set(new ColorAttribute(ColorAttribute.AmbientLight,0,0,0,1));
  environment.set(new PointLightsAttribute());
  environment.set(new SpotLightsAttribute());
  environment.set(new DirectionalLightsAttribute());
  screenShaders=new ArrayList<ScreenShader>();
  defaultMaterial=new Material("String_Node_Str");
  defaultMaterial.set(new ColorAttribute(ColorAttribute.AmbientLight,1,1,1,1));
  defaultMaterial.set(new ColorAttribute(ColorAttribute.Diffuse,1,1,1,1));
  defaultMaterial.set(new BlendingAttribute());
  defaultMaterial.set(new BDXColorAttribute(BDXColorAttribute.Tint,0,0,0));
  defaultMesh=new Mesh(new ModelBuilder().createBox(1.0f,1.0f,1.0f,defaultMaterial,Usage.Position | Usage.Normal | Usage.TextureCoordinates),this);
  meshes=new HashMap<String,Mesh>();
  textures=new HashMap<String,Texture>();
  materials=new HashMap<String,Material>();
  modelToFrame=new HashMap<>();
  materials.put(defaultMaterial.id,defaultMaterial);
  BroadphaseInterface broadphase=new DbvtBroadphase();
  DefaultCollisionConfiguration collisionConfiguration=new DefaultCollisionConfiguration();
  SequentialImpulseConstraintSolver solver=new SequentialImpulseConstraintSolver();
  CollisionDispatcher dispatcher=new CollisionDispatcher(collisionConfiguration);
  toBeAdded=new ArrayList<GameObject>();
  toBeRemoved=new ArrayList<GameObject>();
  objects=new LinkedListNamed<GameObject>();
  lights=new LinkedListNamed<Light>();
  templates=new HashMap<String,GameObject>();
  json=new JsonReader().parse(scene);
  name=json.get("String_Node_Str").asString();
  world=new DiscreteDynamicsWorld(dispatcher,broadphase,solver,collisionConfiguration);
  world.setDebugDrawer(new Bullet.DebugDrawer(json.get("String_Node_Str").asBoolean()));
  gravity(new Vector3f(0,0,-json.get("String_Node_Str").asFloat()));
  float[] ac=json.get("String_Node_Str").asFloatArray();
  ambientLight(new Color(ac[0],ac[1],ac[2],1));
  if (!clearColorDefaultSet) {
    float[] cc=json.get("String_Node_Str").asFloatArray();
    Bdx.display.clearColor(new Color(cc[0],cc[1],cc[2],0));
    clearColorDefaultSet=true;
  }
  if (json.get("String_Node_Str").asBoolean()) {
    Bdx.profiler.init();
  }
  float[] fc=json.get("String_Node_Str").asFloatArray();
  fogColor=new Color(fc[0],fc[1],fc[2],1);
  fog(json.get("String_Node_Str").asBoolean());
  fogRange(json.get("String_Node_Str").asFloat(),json.get("String_Node_Str").asFloat());
  for (  JsonValue mat : json.get("String_Node_Str")) {
    String texName=mat.get("String_Node_Str").asString();
    boolean hasAlpha=mat.get("String_Node_Str").asString().equals("String_Node_Str");
    float opacity=hasAlpha ? mat.get("String_Node_Str").asFloat() : 1;
    Material material=new Material(mat.name);
    float[] c=mat.get("String_Node_Str").asFloatArray();
    material.set(ColorAttribute.createDiffuse(c[0],c[1],c[2],opacity));
    float[] s=mat.get("String_Node_Str").asFloatArray();
    material.set(ColorAttribute.createSpecular(s[0],s[1],s[2],1));
    material.set(FloatAttribute.createShininess(mat.get("String_Node_Str").asFloat()));
    material.set(new BDXColorAttribute(BDXColorAttribute.Tint,0,0,0));
    IntAttribute shadeless=(IntAttribute)new BDXIntAttribute();
    if (mat.get("String_Node_Str").asBoolean())     shadeless.value=1;
    material.set(shadeless);
    float emitStrength=mat.get("String_Node_Str").asFloat();
    material.set(new BDXColorAttribute(BDXColorAttribute.Emit,emitStrength,emitStrength,emitStrength));
    if (mat.get("String_Node_Str").asBoolean())     material.set(new IntAttribute(IntAttribute.CullFace,GL20.GL_BACK));
 else     material.set(new IntAttribute(IntAttribute.CullFace,GL20.GL_NONE));
    if (texName != null) {
      Texture texture=textures.get(texName);
      if (texture == null) {
        texture=new Texture(Gdx.files.internal("String_Node_Str" + texName));
        textures.put(texName,texture);
      }
      texture.setWrap(TextureWrap.Repeat,TextureWrap.Repeat);
      material.texture(texture);
    }
    if (hasAlpha) {
      BlendingAttribute ba=new BlendingAttribute(GL20.GL_SRC_ALPHA,GL20.GL_ONE_MINUS_SRC_ALPHA);
      ba.opacity=opacity;
      material.set(ba);
      material.set(FloatAttribute.createAlphaTest(0.01f));
    }
 else {
      BlendingAttribute ba=new BlendingAttribute();
      ba.blended=false;
      material.set(ba);
    }
    materials.put(mat.name,material);
  }
  for (  JsonValue model : json.get("String_Node_Str")) {
    meshes.put(model.name,new Mesh(createModel(model),this,model.name));
  }
  HashMap<String,JsonValue> fonts=new HashMap<>();
  for (  JsonValue fontj : json.get("String_Node_Str")) {
    String font=fontj.asString();
    fonts.put(font,new JsonReader().parse(Gdx.files.internal("String_Node_Str" + font + "String_Node_Str")));
  }
  FAnim.loadActions(json.get("String_Node_Str"));
  for (  JsonValue gobj : json.get("String_Node_Str")) {
    GameObject g=instantiator.newObject(gobj);
    g.json=gobj;
    g.name=gobj.name;
    g.scene=this;
    g.props=new HashMap<String,JsonValue>();
    for (    JsonValue prop : gobj.get("String_Node_Str")) {
      g.props.put(prop.name,prop);
    }
    String meshName=gobj.get("String_Node_Str").asString();
    if (meshName != null) {
      g.visibleNoChildren(gobj.get("String_Node_Str").asBoolean());
      g.mesh(meshName);
    }
 else {
      g.visibleNoChildren(false);
      g.mesh(defaultMesh);
    }
    com.badlogic.gdx.graphics.Mesh mesh=g.modelInstance.model.meshes.first();
    float[] trans=gobj.get("String_Node_Str").asFloatArray();
    JsonValue origin=json.get("String_Node_Str").get(meshName);
    JsonValue dimensions=json.get("String_Node_Str").get(meshName);
    g.origin=origin == null ? new Vector3f() : new Vector3f(origin.asFloatArray());
    g.dimensionsNoScale=dimensions == null ? new Vector3f(1,1,1) : new Vector3f(dimensions.asFloatArray());
    JsonValue physics=gobj.get("String_Node_Str");
    g.currBodyType=GameObject.BodyType.valueOf(physics.get("String_Node_Str").asString());
    g.currBoundsType=GameObject.BoundsType.valueOf(physics.get("String_Node_Str").asString());
    g.body=Bullet.makeBody(mesh,trans,g.origin,g.currBodyType,g.currBoundsType,physics);
    g.body.setUserPointer(g);
    g.scale(getGLMatrixScale(trans));
    String type=gobj.get("String_Node_Str").asString();
    if (type.equals("String_Node_Str")) {
      Text t=(Text)g;
      t.font=fonts.get(gobj.get("String_Node_Str").asString());
      t.text(gobj.get("String_Node_Str").asString());
      t.capacity=t.text().length();
    }
 else     if (type.equals("String_Node_Str")) {
      JsonValue settings=gobj.get("String_Node_Str");
      Light l=(Light)g;
      if (settings.getString("String_Node_Str").equals("String_Node_Str"))       l.type=Light.Type.SUN;
 else       if (settings.getString("String_Node_Str").equals("String_Node_Str"))       l.type=Light.Type.SPOT;
 else       l.type=Light.Type.POINT;
      l.energy(settings.getFloat("String_Node_Str"));
      float[] c=settings.get("String_Node_Str").asFloatArray();
      l.color(new Color(c[0],c[1],c[2],c[3]));
      if (l.type.equals(Light.Type.SPOT)) {
        l.spotSize(settings.getFloat("String_Node_Str"));
      }
    }
 else     if (type.equals("String_Node_Str")) {
      Camera c=(Camera)g;
      float[] projection=gobj.get("String_Node_Str").get("String_Node_Str").asFloatArray();
      Vector2f resolution=new Vector2f(json.get("String_Node_Str").asFloatArray());
      if (gobj.get("String_Node_Str").get("String_Node_Str").asString().equals("String_Node_Str")) {
        c.initData(Camera.Type.PERSPECTIVE);
        c.size(resolution);
        c.resolution(resolution);
        c.projection(new Matrix4f(projection));
        c.fov(c.fov());
      }
 else {
        c.initData(Camera.Type.ORTHOGRAPHIC);
        c.size(resolution);
        c.resolution(resolution);
        c.zoom(2 / projection[0]);
      }
      Matrix4 pm=new Matrix4(projection);
      pm.inv();
      Vector3 vec=new Vector3(0,0,-1);
      vec.prj(pm);
      c.near(-vec.z);
      vec.set(0,0,1);
      vec.prj(pm);
      c.far(-vec.z);
    }
    templates.put(g.name,g);
  }
  hookParentChild();
  cameras=new ArrayListNamed<Camera>();
  addInstances();
  camera=(Camera)objects.get(json.get("String_Node_Str").asStringArray()[0]);
  String frameType=json.get("String_Node_Str").asString();
  Viewport.Type viewportType;
  if (frameType.equals("String_Node_Str")) {
    viewportType=Viewport.Type.LETTERBOX;
  }
 else   if (frameType.equals("String_Node_Str")) {
    viewportType=Viewport.Type.EXTEND;
  }
 else {
    viewportType=Viewport.Type.SCALE;
  }
  viewport=new Viewport(this,viewportType);
  for (  GameObject g : sortByPriority(new ArrayList<GameObject>(objects))) {
    initGameObject(g);
  }
  valid=true;
}