Stability and reconstruction for the determination of boundary terms by a single measurement