private void mergeSymbol(Symbol from, Symbol to) {
    for (Node nodeToMove : from.references.keySet()) {
      if (!nodeToMove.equals(from.getDeclarationNode())) {
        to.defineReferenceAt(nodeToMove);
      }
    }
    removeSymbol(from);
  }
private void mergeSymbol ( Symbol from , Symbol to ) { for ( Node nodeToMove : from . references . keySet ( ) ) { if ( ! nodeToMove . equals ( from . getDeclarationNode ( ) ) ) { to . defineReferenceAt ( nodeToMove ) ; } } removeSymbol ( from ) ; }
Merges 'from' symbol to 'to' symbol by moving all references to point to the 'to' symbol and
removing 'from' symbol.