Program: 631
Project: 631
Buggy source:
@Override public void applyParameters(Material program){
  super.applyParameters(program);
  CameraTargetSystem cameraTargetSystem=CoreRegistry.get(CameraTargetSystem.class);
  DynamicFBOsManager dynamicFBOsManager=CoreRegistry.get(DynamicFBOsManager.class);
  int texId=0;
  GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
  dynamicFBOsManager.bindFboColorTexture(ToneMappingNode.TONE_MAPPED_URN);
  program.setInt("String_Node_Str",texId++,true);
  if (CoreRegistry.get(Config.class).getRendering().getBlurIntensity() != 0) {
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
    dynamicFBOsManager.get(BlurPassesNode.BLUR_1_URN).bindTexture();
    program.setInt("String_Node_Str",texId++,true);
    if (cameraTargetSystem != null) {
      program.setFloat("String_Node_Str",cameraTargetSystem.getFocalDistance(),true);
    }
  }
  Texture colorGradingLut=Assets.getTexture("String_Node_Str").get();
  if (colorGradingLut != null) {
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
    glBindTexture(GL12.GL_TEXTURE_3D,colorGradingLut.getId());
    program.setInt("String_Node_Str",texId++,true);
  }
  FBO sceneCombined=dynamicFBOsManager.get(DefaultDynamicFBOs.ReadOnlyGBuffer.getName());
  if (sceneCombined != null) {
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
    sceneCombined.bindDepthTexture();
    program.setInt("String_Node_Str",texId++,true);
    ResourceUrn noiseTextureUri=TextureUtil.getTextureUriForWhiteNoise(1024,0x1234,0,512);
    Texture filmGrainNoiseTexture=Assets.getTexture(noiseTextureUri).get();
    if (CoreRegistry.get(Config.class).getRendering().isFilmGrain()) {
      GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
      glBindTexture(GL11.GL_TEXTURE_2D,filmGrainNoiseTexture.getId());
      program.setInt("String_Node_Str",texId++,true);
      program.setFloat("String_Node_Str",filmGrainIntensity,true);
      program.setFloat("String_Node_Str",rand.nextFloat(),true);
      program.setFloat2("String_Node_Str",filmGrainNoiseTexture.getWidth(),filmGrainNoiseTexture.getHeight(),true);
      program.setFloat2("String_Node_Str",sceneCombined.width(),sceneCombined.height(),true);
    }
  }
  Camera activeCamera=CoreRegistry.get(WorldRenderer.class).getActiveCamera();
  if (activeCamera != null && CoreRegistry.get(Config.class).getRendering().isMotionBlur()) {
    program.setMatrix4("String_Node_Str",activeCamera.getInverseViewProjectionMatrix(),true);
    program.setMatrix4("String_Node_Str",activeCamera.getPrevViewProjectionMatrix(),true);
  }
}

Fixed version (ground truth):
@Override public void applyParameters(Material program){
  super.applyParameters(program);
  CameraTargetSystem cameraTargetSystem=CoreRegistry.get(CameraTargetSystem.class);
  DynamicFBOsManager dynamicFBOsManager=CoreRegistry.get(DynamicFBOsManager.class);
  int texId=0;
  GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
  dynamicFBOsManager.bindFboColorTexture(ToneMappingNode.TONE_MAPPED_URN);
  program.setInt("String_Node_Str",texId++,true);
  if (CoreRegistry.get(Config.class).getRendering().getBlurIntensity() != 0) {
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
    dynamicFBOsManager.get(BlurPassesNode.BLUR_1_URN).bindTexture();
    program.setInt("String_Node_Str",texId++,true);
    if (cameraTargetSystem != null) {
      program.setFloat("String_Node_Str",cameraTargetSystem.getFocalDistance(),true);
    }
  }
  Texture colorGradingLut=Assets.getTexture("String_Node_Str").get();
  if (colorGradingLut != null) {
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
    glBindTexture(GL12.GL_TEXTURE_3D,colorGradingLut.getId());
    program.setInt("String_Node_Str",texId++,true);
  }
  FBO sceneCombined=dynamicFBOsManager.get(DefaultDynamicFBOs.READ_ONLY_GBUFFER.getName());
  if (sceneCombined != null) {
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
    sceneCombined.bindDepthTexture();
    program.setInt("String_Node_Str",texId++,true);
    ResourceUrn noiseTextureUri=TextureUtil.getTextureUriForWhiteNoise(1024,0x1234,0,512);
    Texture filmGrainNoiseTexture=Assets.getTexture(noiseTextureUri).get();
    if (CoreRegistry.get(Config.class).getRendering().isFilmGrain()) {
      GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
      glBindTexture(GL11.GL_TEXTURE_2D,filmGrainNoiseTexture.getId());
      program.setInt("String_Node_Str",texId++,true);
      program.setFloat("String_Node_Str",filmGrainIntensity,true);
      program.setFloat("String_Node_Str",rand.nextFloat(),true);
      program.setFloat2("String_Node_Str",filmGrainNoiseTexture.getWidth(),filmGrainNoiseTexture.getHeight(),true);
      program.setFloat2("String_Node_Str",sceneCombined.width(),sceneCombined.height(),true);
    }
  }
  Camera activeCamera=CoreRegistry.get(WorldRenderer.class).getActiveCamera();
  if (activeCamera != null && CoreRegistry.get(Config.class).getRendering().isMotionBlur()) {
    program.setMatrix4("String_Node_Str",activeCamera.getInverseViewProjectionMatrix(),true);
    program.setMatrix4("String_Node_Str",activeCamera.getPrevViewProjectionMatrix(),true);
  }
}