A unified formulation of spontaneous (shot-noise) and super-radiant emissions in electron devices is presented. We consider an electron beam with an arbitrary temporal current modulation propagating through the interaction region of the electronic device. The total electromagnetic field is presented as a stochastic process and expanded in terms of transverse eigenmodes of the medium (free space or waveguide), in which the field is excited and propagates. Using the waveguide excitation equations, formulated in the frequency domain, an analytical expression for the power spectral density of the electromagnetic radiation is derived. The spectrum of the excited radiation is shown to be composed of two terms, which are the spontaneous and super-radiant emissions. For a continuous, unmodulated beam, the shot noise produces only incoherent spontaneous emission of a power proportional to the flux eI(0) (DC current) of the particles in the electron beam. When the beam is modulated or prebunched, a partially coherent super-radiant emission is also produced with power proportional to the current spectrum /I(omega)/(2). Based on a three-dimensional model, a numerical particle simulation code was developed. A set of coupled-mode excitation equations in the frequency domain are solved self-consistently with the equations of particles motion. The simulation considers random distributions of density and energy in the electron beam and takes into account the statistical and spectral features of the excited radiation. At present, the code can simulate free-electron lasers (FELs) operation in various modes: spontaneous and self-amplified spontaneous emission, super-radiance and stimulated emission, in the linear and nonlinear Compton or Raman regimes. We employed the code to demonstrate spontaneous and super-radiant emission excited when a prebunched electron beam passes through a wiggler of an FEL.