}
ModuleNameResolver oldExpressionContextModuleNameResolver = moduleTypeInfo.getModuleNameResolver();
String newExpressionString = typeChecker.calculateUpdatedCodeExpression(oldExpression.getExpressionText(), oldExpression.getModuleContext(), oldExpressionContextModuleNameResolver, oldExpression.getQualificationMap(), oldName, newName, category, null);
CodeAnalyser codeAnalyser = new CodeAnalyser(typeChecker, moduleTypeInfo, false, false);
MessageLogger logger = new MessageLogger();
QualificationResults qualificationResults = codeAnalyser.qualifyExpression(newExpressionString, null, oldExpression.getQualificationMap(), logger);
if (qualificationResults == null) {
// failed to parse.
String featureName = functionalAgentMetadata.getFeatureName().getName();
String errorMessage =
"Can not update the metadata for " + featureName + ", example " + (i + 1) + ", since it could not be parsed.\n" +