We present results of experimental and theoretical investigations of electron transport through stub-shaped waveguides or electron stub tuners (ESTs) in the ballistic regime. Measurements of the conductance G as a function of voltages, applied to different gates V_i (i=bottom, top, and side) of the device, show oscillations in the region of the first quantized plateau which we attribute to reflection resonances. The oscillations are rather regular and almost periodic when the height h of the EST cavity is small compared to its width. When h is increased, the oscillations become less regular and broad depressions in G appear. A theoretical analysis, which accounts for the electrostatic potential formed by the gates in the cavity region, and a numerical computation of the transmission probabilities successfully explains the experimental observations. An important finding for real devices, defined by surface Schottky gates, is that the resonance nima result from size quantization along the transport direction of the EST.