public void resetLocations() {
        if (uniforms != null) {
            // NOTE: Shader sources will be reset separately from the shader itself.
            for (Uniform uniform : uniforms.values()) {
                uniform.reset(); // fixes issue with re-initialization
            }
        }
        if (bufferBlocks != null) {
            for (ShaderBufferBlock shaderBufferBlock : bufferBlocks.values()) {
                shaderBufferBlock.reset();
            }
        }
        if (attribs != null) {
            for (Entry<Attribute> entry : attribs) {
                entry.getValue().location = ShaderVariable.LOC_UNKNOWN;
            }
        }
    }
Usually called when the shader itself changes or during any
time when the variable locations need to be refreshed.
jme3-core/src/main/java/com/jme3/shader/Shader.java