$f(z) = \frac{z^2e^z}{2z+i}$, and the contour is the square with vertices at $1+i, -1+i, -1-i,$ and $1-i.$
The issue I'm having with this integral is that the singular point $z = -\frac{i}{2}$ is included in the domain, so $f(z)$ is not analytic everywhere inside and on $C$.
Regardless, using the $f(z(t))z'(t)$ method appears impractical here since $z(t)$ is four line segments and integrating all four would prove time consuming, so I'm trusting there's an easier method.
I decided to try the following, letting $f_1(z)= \frac{z^2e^z}{2}$: $\int_C f(z) = \int_C \frac{\frac{z^2e^z}{2}}{(z-(-\frac{i}{2}))^(0+1)} = 2\pi i f_1(-\frac{i}{2}) = \frac{\pi i}{4e^\frac{i}{2}}$
Again, that requires $f(z)$ to be analytic everywhere in the domain, and if it was, the integral would equal zero since the square is a simply connected domain and $C$ is a closed contour.
So I am obviously confused. Any advice would be greatly appreciated.