Program: 627
Project: 627
Buggy source:
@Override public void applyParameters(Material program){
  super.applyParameters(program);
  Config config=CoreRegistry.get(Config.class);
  int texId=0;
  DynamicFBOsManager dynamicFBOsManager=CoreRegistry.get(DynamicFBOsManager.class);
  ShadowMapResolutionDependentFBOs shadowMapResolutionDependentFBOs=CoreRegistry.get(ShadowMapResolutionDependentFBOs.class);
  final ResourceUrn sceneOpaqueUrn=DefaultDynamicFBOs.ReadOnlyGBuffer.getName();
switch (config.getRendering().getDebug().getStage()) {
case SHADOW_MAP:
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
  shadowMapResolutionDependentFBOs.bindFboDepthTexture(ShadowMapNode.SHADOW_MAP_URN);
program.setInt("String_Node_Str",texId++,true);
break;
case OPAQUE_COLOR:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(sceneOpaqueUrn);
program.setInt("String_Node_Str",texId++,true);
break;
case OPAQUE_NORMALS:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboNormalsTexture(sceneOpaqueUrn);
program.setInt("String_Node_Str",texId++,true);
break;
case OPAQUE_DEPTH:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboDepthTexture(sceneOpaqueUrn);
program.setInt("String_Node_Str",texId++,true);
break;
case OPAQUE_SUNLIGHT:
case OPAQUE_LIGHT_BUFFER:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboLightBufferTexture(sceneOpaqueUrn);
program.setInt("String_Node_Str",texId++,true);
break;
case TRANSPARENT_COLOR:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(ChunksRefractiveReflectiveNode.REFRACTIVE_REFLECTIVE_URN);
program.setInt("String_Node_Str",texId++,true);
break;
case SSAO:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(AmbientOcclusionPassesNode.SSAO_URN);
program.setInt("String_Node_Str",texId++,true);
break;
case SOBEL:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(OutlineNode.OUTLINE_URN);
program.setInt("String_Node_Str",texId++,true);
break;
case BAKED_OCCLUSION:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(sceneOpaqueUrn);
program.setInt("String_Node_Str",texId++,true);
break;
case RECONSTRUCTED_POSITION:
Camera activeCamera=CoreRegistry.get(WorldRenderer.class).getActiveCamera();
if (activeCamera != null) {
program.setMatrix4("String_Node_Str",activeCamera.getInverseProjectionMatrix(),true);
}
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboDepthTexture(sceneOpaqueUrn);
program.setInt("String_Node_Str",texId++,true);
break;
case BLOOM:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(BloomPassesNode.BLOOM_2_URN);
program.setInt("String_Node_Str",texId++,true);
break;
case HIGH_PASS:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(BloomPassesNode.HIGH_PASS_URN);
program.setInt("String_Node_Str",texId++,true);
break;
case SKY_BAND:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(SkyBandsNode.SKY_BAND_1_URN);
program.setInt("String_Node_Str",texId++,true);
break;
case LIGHT_SHAFTS:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(LightShaftsNode.LIGHT_SHAFTS_URN);
program.setInt("String_Node_Str",texId++,true);
break;
default :
break;
}
program.setInt("String_Node_Str",CoreRegistry.get(Config.class).getRendering().getDebug().getStage().getIndex());
}

Fixed version (ground truth):
@Override public void applyParameters(Material program){
  super.applyParameters(program);
  Config config=CoreRegistry.get(Config.class);
  int texId=0;
  DynamicFBOsManager dynamicFBOsManager=CoreRegistry.get(DynamicFBOsManager.class);
  ShadowMapResolutionDependentFBOs shadowMapResolutionDependentFBOs=CoreRegistry.get(ShadowMapResolutionDependentFBOs.class);
  final ResourceUrn sceneOpaqueUrn=DefaultDynamicFBOs.READ_ONLY_GBUFFER.getName();
switch (config.getRendering().getDebug().getStage()) {
case SHADOW_MAP:
    GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
  shadowMapResolutionDependentFBOs.bindFboDepthTexture(ShadowMapNode.SHADOW_MAP_URN);
program.setInt("String_Node_Str",texId++,true);
break;
case OPAQUE_COLOR:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(sceneOpaqueUrn);
program.setInt("String_Node_Str",texId++,true);
break;
case OPAQUE_NORMALS:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboNormalsTexture(sceneOpaqueUrn);
program.setInt("String_Node_Str",texId++,true);
break;
case OPAQUE_DEPTH:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboDepthTexture(sceneOpaqueUrn);
program.setInt("String_Node_Str",texId++,true);
break;
case OPAQUE_SUNLIGHT:
case OPAQUE_LIGHT_BUFFER:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboLightBufferTexture(sceneOpaqueUrn);
program.setInt("String_Node_Str",texId++,true);
break;
case TRANSPARENT_COLOR:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(ChunksRefractiveReflectiveNode.REFRACTIVE_REFLECTIVE_URN);
program.setInt("String_Node_Str",texId++,true);
break;
case SSAO:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(AmbientOcclusionPassesNode.SSAO_URN);
program.setInt("String_Node_Str",texId++,true);
break;
case SOBEL:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(OutlineNode.OUTLINE_URN);
program.setInt("String_Node_Str",texId++,true);
break;
case BAKED_OCCLUSION:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(sceneOpaqueUrn);
program.setInt("String_Node_Str",texId++,true);
break;
case RECONSTRUCTED_POSITION:
Camera activeCamera=CoreRegistry.get(WorldRenderer.class).getActiveCamera();
if (activeCamera != null) {
program.setMatrix4("String_Node_Str",activeCamera.getInverseProjectionMatrix(),true);
}
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboDepthTexture(sceneOpaqueUrn);
program.setInt("String_Node_Str",texId++,true);
break;
case BLOOM:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(BloomPassesNode.BLOOM_2_URN);
program.setInt("String_Node_Str",texId++,true);
break;
case HIGH_PASS:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(BloomPassesNode.HIGH_PASS_URN);
program.setInt("String_Node_Str",texId++,true);
break;
case SKY_BAND:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(SkyBandsNode.SKY_BAND_1_URN);
program.setInt("String_Node_Str",texId++,true);
break;
case LIGHT_SHAFTS:
GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
dynamicFBOsManager.bindFboColorTexture(LightShaftsNode.LIGHT_SHAFTS_URN);
program.setInt("String_Node_Str",texId++,true);
break;
default :
break;
}
program.setInt("String_Node_Str",CoreRegistry.get(Config.class).getRendering().getDebug().getStage().getIndex());
}