Simulations are used to study the influence of nonuniform electric field distribution at a heterojunction interface on the effect of bipolar resistive switching in oxide compounds. Computer models show that a conducting channel forms at the edge of a heterojunction area characterized by strong local increase in the electric field intensity. The computations are confirmed by the low temperature properties of metastable phases in heterojunctions based on high temperature superconductors.