Buggy code:
public class Glsl100ShaderGenerator extends ShaderGenerator { private static final String INDENTCHAR = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" ; private ShaderNodeVariable inPosTmp ; public Glsl100ShaderGenerator ( AssetManager assetManager ) { } @ Override protected void generateUniforms ( StringBuilder source , ShaderGenerationInfo info , ShaderType type ) { } protected void generateUniforms ( StringBuilder source , List < ShaderNodeVariable > uniforms ) { } @ Override protected void generateAttributes ( StringBuilder source , ShaderGenerationInfo info ) { } @ Override protected void generateVaryings ( StringBuilder source , ShaderGenerationInfo info , ShaderType type ) { } @ Override protected void generateDeclarativeSection ( StringBuilder source , ShaderNode shaderNode , String nodeSource , ShaderGenerationInfo info ) { } @ Override protected void generateStartOfMainSection ( StringBuilder source , ShaderGenerationInfo info , ShaderType type ) { } @ Override protected void generateEndOfMainSection ( StringBuilder source , ShaderGenerationInfo info , ShaderType type ) { } protected void appendOutput ( StringBuilder source , String globalOutputName , ShaderNodeVariable var ) { } @ Override protected void generateNodeMainSection ( StringBuilder source , ShaderNode shaderNode , String nodeSource , ShaderGenerationInfo info ) { } protected void declareVariable ( StringBuilder source , ShaderNodeVariable var , boolean appendNameSpace ) { } protected void declareVariable ( StringBuilder source , ShaderNodeVariable var ) { } protected void declareVariable ( StringBuilder source , ShaderNodeVariable var , String value ) { } protected void declareVariable ( StringBuilder source , ShaderNodeVariable var , boolean appendNameSpace , String modifier ) { } protected void declareVariable ( StringBuilder source , ShaderNodeVariable var , String value , boolean appendNameSpace , String modifier ) { } protected void startCondition ( String condition , StringBuilder source ) { } protected void endCondition ( String condition , StringBuilder source ) { } protected void map ( VariableMapping mapping , StringBuilder source ) { } protected String replaceVariableName ( String nodeSource , ShaderNodeVariable var ) { } protected boolean isVarying ( ShaderGenerationInfo info , ShaderNodeVariable v ) { } protected void comment ( StringBuilder source , ShaderNode shaderNode , String comment ) { } protected String getAppendableNameSpace ( ShaderNodeVariable var ) { } protected String updateDefinesName ( String nodeSource , ShaderNode shaderNode ) { } protected String replace ( String nodeSource , ShaderNodeVariable var , String newName ) { <START_BUG> nodeSource = nodeSource . replaceAll ( ( ( "(\\W)" + ( var . getName ( ) ) ) + "(\\W)" ) , ( ( "$1" + newName ) + "$2" ) ) ; <END_BUG> return nodeSource ; } protected boolean isWorldOrMaterialParam ( ShaderNodeVariable var ) { } @ Override protected String getLanguageAndVersion ( ShaderType type ) { } protected void appendIndent ( StringBuilder source ) { } protected void declareAttribute ( StringBuilder source , ShaderNodeVariable var ) { } protected void declareVarying ( StringBuilder source , ShaderNodeVariable var , boolean input ) { } protected void unIndent ( ) { } protected void indent ( ) { } private void fixInPositionType ( ShaderNodeVariable var ) { } protected void declareGlobalPosition ( ShaderGenerationInfo info , StringBuilder source ) { } }

Fix:
nodeSource = nodeSource . replaceAll ( ( ( "(?<=\\W)" + ( var . getName ( ) ) ) + "(?=\\W)" ) , newName ) ;