I was involved in flagging both of those posts, so I'll offer some explanation and opinion, too.
First, just some plain facts for consideration of their applicability:
- I found these via the "Late answers" moderator tool, and was drawn to them due to the fact that they were posted so close to one another, and started off with the same wording.
- I am not the one who flagged them as duplicate content; I flagged as Spam
- I noted that the site that was linked (a bitbucket project) belonged to the poster, as evidenced by the name of the user and the link contained in their profile.
- I noted no other contributions from this brand new account.
Now for my opinions and the conclusions I drew; correction of which I welcome.
The first thing that drew my attention to these posts was that they started off with the same wording and were posted within minutes of each other, to old questions. This suggests to me a very non-organic method of using the site.
Next, when I read the posts, it seemed to me that they were not necessarily written as direct answers to the question; They seemed to be worded more generally, and the sample code was introduced as "Example usage", not, "Here's some possible code that might solve your specific problem".
So, although the answers were long and detailed, they did not seem to me to be directed specifically at the questions they responded to.
I also noted before flagging that they were the only two answers you had provided, in basically just a day of being a member. Your user name and profile website confirmed the content was yours, although you were also clear about that in the content itself.
Taken all together, it seemed that this account had only been created to promote this bitbucket project, and that the user had simply searched for some key words to find posts they could post a pre-written answer to. That is why I flagged them as Spam.
That said, I think you have also done the one thing that most strongly indicates against spam: You have taken ownership of your content, and inquired about it, here. As a result, I think the reversal of the deletions is appropriate, and I welcome your continued contributions on SO. Not that you need me to welcome your contributions - but I'm just saying! I would offer some gentle advice for the future, though.
First, try to contribute organically. That is; naturally. Rather than seeking content specifically related to something 'product-wise' you can offer, look more for content related to your more broad areas of expertise. You will come across cases where mentioning your product (open-source or not) is appropriate. When you do, be sure you tailor-design an answer for the person's question. When you do that, no one could mistake them for being spam.
Maybe take a few minutes each day browsing tags that are of interest to you, and post some answers here or there. Had I seen exactly what I saw, plus a dozen other answers that made no mention of your project, I wouldn't have dreamed of flagging as Spam.
Finally, keep this in mind; Things actually worked out well. If my spam flags are any indicator of overall rates, almost all posts/accounts deleted as Spam never even bother returning here to find that fact out; they have just driven by, posted their spam, and left, looking for other places to spam. You came here and took ownership and asked, and as a result, your content has been reinstated and both you and we have learned some nuances to take into account in the future.
Beyond that, I encourage what Sinan Ünür answered and what he tried to do with your post.