Program: 27190
Project: 27190
Buggy source:
private void safeSetMaybeQualifiedString(Node nameNode,String newString){
  if (!newString.contains("String_Node_Str")) {
    safeSetString(nameNode,newString);
    return;
  }
  Node nameParent=nameNode.getParent();
  JSDocInfo jsdoc=nameParent.getJSDocInfo();
switch (nameParent.getToken()) {
case FUNCTION:
case CLASS:
    if (NodeUtil.isStatement(nameParent) && nameParent.getFirstChild() == nameNode) {
      Node statementParent=nameParent.getParent();
      Node placeholder=IR.empty();
      statementParent.replaceChild(nameParent,placeholder);
      Node newStatement=NodeUtil.newQNameDeclaration(compiler,newString,nameParent,jsdoc);
      nameParent.setJSDocInfo(null);
      newStatement.useSourceInfoIfMissingFromForTree(nameParent);
      replaceStringNodeLocationForExportedTopLevelVariable(newStatement,nameNode.getSourcePosition(),nameNode.getLength());
      statementParent.replaceChild(placeholder,newStatement);
      NodeUtil.removeName(nameParent);
      return;
    }
  break;
case VAR:
case LET:
case CONST:
{
  Node rhs=nameNode.hasChildren() ? nameNode.getLastChild().detach() : null;
  Node newStatement=NodeUtil.newQNameDeclaration(compiler,newString,rhs,jsdoc);
  newStatement.useSourceInfoIfMissingFromForTree(nameParent);
  int nameLength=nameNode.getOriginalName() != null ? nameNode.getOriginalName().length() : nameNode.getString().length();
  replaceStringNodeLocationForExportedTopLevelVariable(newStatement,nameNode.getSourcePosition(),nameLength);
  NodeUtil.replaceDeclarationChild(nameNode,newStatement);
  return;
}
case OBJECT_PATTERN:
case ARRAY_PATTERN:
case PARAM_LIST:
throw new RuntimeException("String_Node_Str");
default :
break;
}
Node newQualifiedNameNode=NodeUtil.newQName(compiler,newString);
newQualifiedNameNode.srcrefTree(nameNode);
nameParent.replaceChild(nameNode,newQualifiedNameNode);
compiler.reportChangeToEnclosingScope(newQualifiedNameNode);
}

Fixed version (ground truth):
private void safeSetMaybeQualifiedString(Node nameNode,String newString){
  if (!newString.contains("String_Node_Str")) {
    safeSetString(nameNode,newString);
    return;
  }
  Node nameParent=nameNode.getParent();
  JSDocInfo jsdoc=nameParent.getJSDocInfo();
switch (nameParent.getToken()) {
case FUNCTION:
case CLASS:
    if (NodeUtil.isStatement(nameParent) && nameParent.getFirstChild() == nameNode) {
      Node statementParent=nameParent.getParent();
      Node placeholder=IR.empty();
      statementParent.replaceChild(nameParent,placeholder);
      Node newStatement=NodeUtil.newQNameDeclaration(compiler,newString,nameParent,jsdoc);
      nameParent.setJSDocInfo(null);
      newStatement.useSourceInfoIfMissingFromForTree(nameParent);
      replaceStringNodeLocationForExportedTopLevelVariable(newStatement,nameNode.getSourcePosition(),nameNode.getLength());
      statementParent.replaceChild(placeholder,newStatement);
      NodeUtil.removeName(nameParent);
      return;
    }
  break;
case VAR:
case LET:
case CONST:
{
  Node rhs=nameNode.hasChildren() ? nameNode.getLastChild().detach() : null;
  Node newStatement=NodeUtil.newQNameDeclaration(compiler,newString,rhs,jsdoc);
  newStatement.useSourceInfoIfMissingFromForTree(nameParent);
  int nameLength=nameNode.getOriginalName() != null ? nameNode.getOriginalName().length() : nameNode.getString().length();
  replaceStringNodeLocationForExportedTopLevelVariable(newStatement,nameNode.getSourcePosition(),nameLength);
  NodeUtil.replaceDeclarationChild(nameNode,newStatement);
  return;
}
case OBJECT_PATTERN:
case ARRAY_PATTERN:
case PARAM_LIST:
throw new RuntimeException("String_Node_Str");
default :
break;
}
Node newQualifiedNameNode=NodeUtil.newQName(compiler,newString);
newQualifiedNameNode.srcrefTree(nameNode);
nameParent.replaceChild(nameNode,newQualifiedNameNode);
if (newQualifiedNameNode.getFirstChild() != null) {
newQualifiedNameNode.getFirstChild().makeNonIndexableRecursive();
}
compiler.reportChangeToEnclosingScope(newQualifiedNameNode);
}