  For any positive integer $m$, let $\mathbb{Z}_{m}$ be the set of residue
classes modulo $m$. For $A\subseteq \mathbb{Z}_{m}$ and $\overline{n}\in
\mathbb{Z}_{m}$, let representation function $R_{A}(\overline{n})$ denote the
number of solutions of the equation $\overline{n}=\overline{a}+\overline{a'}$
with ordered pairs $(\overline{a}, \overline{a'})\in A \times A$. In this
paper, we determine all sets $A, B\subseteq \mathbb{Z}_{m}$ with $A\cup
B=\mathbb{Z}_{m}$ and $|A\cap B|=2$ or $m-2$ such that
$R_{A}(\overline{n})=R_{B}(\overline{n})$ for all $\overline{n}\in
\mathbb{Z}_{m}$. We also prove that if $m$ is a positive integer with $4|m$,
then there exist two distinct sets $A, B\subseteq \mathbb{Z}_{m}$ with $A\cup
B=\mathbb{Z}_{m}$ and $|A\cap B|=4$ or $m-4$, $B\neq A+\overline{\frac{m}{2}}$
such that $R_{A}(\overline{n})=R_{B}(\overline{n})$ for all $\overline{n}\in
\mathbb{Z}_{m}$. If $m$ is a positive integer with $2\|m$, $A\cup
B=\mathbb{Z}_{m}$ and $|A\cap B|=4$ or $m-4$, then
$R_{A}(\overline{n})=R_{B}(\overline{n})$ for all $\overline{n}\in
\mathbb{Z}_{m}$ if and only if $B=A+\overline{\frac{m}{2}}$.
