* @param module
   * @return Symbol
   */
  public static Symbol importSymbol(Symbol symbol, Module module) {
    { String name = symbol.symbolName;
      Symbol modulesymbol = Symbol.lookupSymbolInModule(name, module, true);

      if (((Module)(symbol.homeContext)) == null) {
        { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

          stream000.nativeStream.print("Can't import the TRANSIENT symbol `" + name + "' into `" + module + "'");
          throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
        }
      }
      if (!(modulesymbol == symbol)) {
        if (modulesymbol != null) {
          { OutputStringStream stream001 = OutputStringStream.newOutputStringStream();

            stream001.nativeStream.print("Can't import, a symbol with name `" + name + "' already exists in `" + module + "'");
            throw ((StellaException)(StellaException.newStellaException(stream001.theStringReader()).fillInStackTrace()));
          }
        }
        if (symbol != null) {
          Module.selectSymbolOffsetTable(module, Stella.SYMBOL_SYM).insertAt(name, symbol.symbolId);
        }
      }
      return (symbol);
    }
  }