I came across a question today that was closed as a duplicate. One of the closers also answered the question (with 5 upvotes). Is the answer then considered low quality, and should be deleted? Or should it be ignored completely? It seems contradictory to me to close something as a duplicate (it has thus been answered and asked), but post the same answer for the duplicate question.
If you're gonna close the question, don't answer it.
Main Meta's discussion of How should duplicate questions be handled? says:
Should I answer it?
No, not if you think it's a duplicate. If you don't think the answers on the target question are good enough, write an answer there.
If you don't think the question is a duplicate, then by all means do answer it.
A similar question on our Meta asks Is it good form to answer questions that you've voted to close? and, in its only (and excellent) answer, notes that
Voting to close and answering is indeed inconsistent [....] The only reason I can think of to answer and close is to farm reputation for the answer, which is anti-social behavior in itself. Don't do it.
See also, for example, the discussion on this topic which has taken place on stackoverflow Meta:
- Closing a question after answering and being downvoted, whose top answer even suggests the answerer/reviewer remove their answer if they move to close as duplicate: "The point of dupe-closure is it to remove duplication of content on SO. By leaving the answer, you're sending mixed signals."
- Answering a question, then closing it as duplicate, whose top answer notes that "it's bad form to answer a question then immediately close it as a duplicate. If it's a duplicate, just close it. By answering it, you're hoping for a few stray upvotes on your answer, but by closing it you're depriving others of the opportunity to answer as well. That's not a very level playing field."
- Is it OK to give an answer to a duplicate question, before hammering out?, whose answer says "You should just close without leaving an answer. What we want is all the answers in one place. Users shouldn't have to go from page to page looking for the answer to the question. It also comes across as rude and slightly mean. You've answered the question but are preventing others from doing so. If you have more to add then leave an answer on the original."
These questions specifically pertained to people with the ability to single-handedly close a question as duplicate, who would answer and then hammer the question closed; nevertheless, the reasoning is the same - a vote to close as duplicate is still a move intending to see it closed, even if it does not carry the weight of finality.
If you answered and then discovered the dup, remove your answer
Not every duplicate is obviously duplicate. It happens pretty frequently that someone will answer a question, and only after answering it will realize that, yes, that did seem a little too familiar and will then find the duplicate, perhaps after having failed to find it initially.
Policy isn't clear on what you should do then, but personally I would suggest that users remove an answer placed on a question that is closed as duplicate, and (if it would be a positive contribution on the dup target) put the answer on the original question instead.
- This will remove duplicate content—both questions AND answers—from the site.
- This helps to put all the answers in one place—on the canonical question.
- This will avoid the appearance of leaving the answer in place just for the rep.
These benefits align both with the guidance on Main Meta and with the reasoning behind that guidance elaborated upon by the other answers quoted above.
Rubio's answer is OK, but since my addendum to it in comments was well-received, I'm posting it as a new answer.
Answering duplicate questions - a classification
In general, answers on duplicate questions are unlikely to serve much purpose, or even get much attention in the form of votes and views, since people will click through to the dupe target instead.
If you know the question is a duplicate, then there's usually no need to post an answer to it - either it's already been answered elsewhere, or it hasn't and you can post your answer on the original question rather than the duplicate. Answering a duplicate question can even look like a rep grab, posting an easy answer to get upvotes before (or after) the question is closed.
Of course, there's nothing wrong with someone posting an answer if they didn't realise the question was a duplicate. They've presumably put work into their answer and posted it in good faith just like anyone else. They deserve upvotes for that effort too, and shouldn't be expected to delete their answer just because somebody else discovers the question is a duplicate. Up until that discovery, the puzzle looks just like any other and there's no reason not to solve it.
That leaves the edge case of when someone answers and then realises it's a duplicate. What should they do in this case? Vote to close and delete the answer they worked hard on, losing their well-earned rep? Not vote to close because they fear retribution for answering and VTCing, and leave duplicate content around on the site instead?
Basically, intent is important. If someone answers a question they know is a dupe, just for the sake of a rep-grab, feel free to downvote their answer. If someone answers a question in good faith, they should probably be given the benefit of the doubt. Of course, intent is also notoriously hard to judge. It'd be possible for someone to realise a question is a dupe, answer it for rep, and then VTC it, or not VTC it at all. Conversely, it's possible for someone to answer a question in good faith and then later find it in the review queue, accept that it's a dupe, and help to close it.
What can/should mods do with such answers?
This isn't mentioned explicitly in Rubio's answer, but it's touched upon in comments. There are various possibilities for what mods could potentially do where someone's answered and VTCed a dupe.
Answers shouldn't be mod-deleted just for being on duplicate questions. Partly because intent is hard to judge, and someone might have put a lot of work into solving a puzzle and posting their answer in good faith, before finding a dupe and then VTCing in good faith. Partly also because it won't stop the users with actual ill intent - if you start deleting answers from people who've both answered and VTCed, then the people who post those answers just for rep will simply stop VTCing, which could result in duplicates being left open and a net negative effect on the site. A policy of deleting answers from VTCers would impact the wrong people.
(Incidentally, this is a lesson I learned the hard way: on Science Fiction & Fantasy where I'm a mod, we once decided to delete a bunch of answers on duplicate questions. The community pushed back hard and we ended up with a very clear consensus that such deletions aren't appropriate.)
See also Should I delete my answer to a question that's marked as a duplicate? on main meta for a nice network-wide consensus against deleting answers just because they're on duplicate questions.
However, there is a very useful mod tool for these situations: merging questions. Merging is a mod tool which transfers all answers on a duplicate question over to the original dupe target. It should be used with great care, since it's irreversible, but it can be very useful in cases where a duplicate question has garnered good answers. Especially when those answers have already got upvotes: asking people to delete and repost their answers is all well and good, but they're likely to lose rep by doing so, since few people upvote new answers to old already-answered puzzles; whereas merged answers retain all the votes they originally had.
If a question is very clearly a duplicate, and has got good answer(s) which would also fit on the original, then moderators should consider merging those answers over. Less heavy-handed than outright deletion, less likely to lead to drama over destroying people's honest work and hard-earned rep, and the best possible way of preserving good content without leaving answers to moulder away on duplicates.
(Note that I said "consider merging", not "merge". Sometimes a merge might not be appropriate for some reason. It's a judgement call. The default situation, without mod intervention, is to close the question as duplicate and otherwise leave it and its answers alone apart from up/down voting them.)