Question: "custody" used in the same way in the following two sentences?

He was mistreated while in police custody.

The suspect is in custody.
Answer: different meanings
Question: "defense" used in the same way in the following two sentences?

Defense against hurricanes is an urgent problem.

He joined the defense against invasion.
Answer: different meanings
Question: "time" used in the same way in the following two sentences?

We had a wonderful time at the party.

He is not living at home because he is doing time.
Answer: different meanings
Question: "extend" used in the same way in the following two sentences?

Extend the casserole with a little rice.

Can we extend the legs of this dining table?
Answer:
different meanings