Program: 628
Project: 628
Buggy source:
@Override public void applyParameters(Material program){
  super.applyParameters(program);
  DynamicFBOsManager dynamicFBOsManager=CoreRegistry.get(DynamicFBOsManager.class);
  ShadowMapResolutionDependentFBOs shadowMapResolutionDependentFBOs=CoreRegistry.get(ShadowMapResolutionDependentFBOs.class);
  FBO sceneOpaque=dynamicFBOsManager.get(DefaultDynamicFBOs.ReadOnlyGBuffer.getName());
  int texId=0;
  if (sceneOpaque != null) {
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
    sceneOpaque.bindDepthTexture();
    program.setInt("String_Node_Str",texId++,true);
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
    sceneOpaque.bindNormalsTexture();
    program.setInt("String_Node_Str",texId++,true);
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
    sceneOpaque.bindLightBufferTexture();
    program.setInt("String_Node_Str",texId++,true);
  }
  if (CoreRegistry.get(Config.class).getRendering().isDynamicShadows()) {
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
    shadowMapResolutionDependentFBOs.bindFboDepthTexture(ShadowMapNode.SHADOW_MAP_URN);
    program.setInt("String_Node_Str",texId++,true);
    Camera lightCamera=CoreRegistry.get(WorldRenderer.class).getLightCamera();
    Camera activeCamera=CoreRegistry.get(WorldRenderer.class).getActiveCamera();
    if (lightCamera != null && activeCamera != null) {
      program.setMatrix4("String_Node_Str",lightCamera.getViewProjectionMatrix(),true);
      program.setMatrix4("String_Node_Str",activeCamera.getInverseViewProjectionMatrix(),true);
      Vector3f activeCameraToLightSpace=new Vector3f();
      activeCameraToLightSpace.sub(activeCamera.getPosition(),lightCamera.getPosition());
      program.setFloat3("String_Node_Str",activeCameraToLightSpace.x,activeCameraToLightSpace.y,activeCameraToLightSpace.z,true);
    }
    if (CoreRegistry.get(Config.class).getRendering().isCloudShadows()) {
      Texture clouds=Assets.getTexture("String_Node_Str").get();
      GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
      glBindTexture(GL11.GL_TEXTURE_2D,clouds.getId());
      program.setInt("String_Node_Str",texId++,true);
    }
  }
}

Fixed version (ground truth):
@Override public void applyParameters(Material program){
  super.applyParameters(program);
  DynamicFBOsManager dynamicFBOsManager=CoreRegistry.get(DynamicFBOsManager.class);
  ShadowMapResolutionDependentFBOs shadowMapResolutionDependentFBOs=CoreRegistry.get(ShadowMapResolutionDependentFBOs.class);
  FBO sceneOpaque=dynamicFBOsManager.get(DefaultDynamicFBOs.READ_ONLY_GBUFFER.getName());
  int texId=0;
  if (sceneOpaque != null) {
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
    sceneOpaque.bindDepthTexture();
    program.setInt("String_Node_Str",texId++,true);
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
    sceneOpaque.bindNormalsTexture();
    program.setInt("String_Node_Str",texId++,true);
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
    sceneOpaque.bindLightBufferTexture();
    program.setInt("String_Node_Str",texId++,true);
  }
  if (CoreRegistry.get(Config.class).getRendering().isDynamicShadows()) {
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
    shadowMapResolutionDependentFBOs.bindFboDepthTexture(ShadowMapNode.SHADOW_MAP_URN);
    program.setInt("String_Node_Str",texId++,true);
    Camera lightCamera=CoreRegistry.get(WorldRenderer.class).getLightCamera();
    Camera activeCamera=CoreRegistry.get(WorldRenderer.class).getActiveCamera();
    if (lightCamera != null && activeCamera != null) {
      program.setMatrix4("String_Node_Str",lightCamera.getViewProjectionMatrix(),true);
      program.setMatrix4("String_Node_Str",activeCamera.getInverseViewProjectionMatrix(),true);
      Vector3f activeCameraToLightSpace=new Vector3f();
      activeCameraToLightSpace.sub(activeCamera.getPosition(),lightCamera.getPosition());
      program.setFloat3("String_Node_Str",activeCameraToLightSpace.x,activeCameraToLightSpace.y,activeCameraToLightSpace.z,true);
    }
    if (CoreRegistry.get(Config.class).getRendering().isCloudShadows()) {
      Texture clouds=Assets.getTexture("String_Node_Str").get();
      GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
      glBindTexture(GL11.GL_TEXTURE_2D,clouds.getId());
      program.setInt("String_Node_Str",texId++,true);
    }
  }
}