I am employed as a student in a theoretical computer science research group and part of my job was to assist my supervisor with a scientific paper he has been working on. Concretely, my job was to implement the software that was used to conduct the experimental part of the research paper and also to gather and put together a dataset in order to empirically test the theoretical framework developed by my supervisor using real-world data.
Before the first submission attempt, I was mentioned in the list of the co-authors. However, the paper was not accepted on the grounds that the empirical results only weakly reflected the theoretical claims.
My supervisor thought that the rejection was due to a bug in the code I've developed and afterwards he removed me both from the list of co-authors and from the project. I am very sure that the code didn't contain any bugs.
Afterwards, my supervisor contacted a fellow student who was already working on a different topic, and asked for his permission to use the data from this different topic in order to test the theory.
The second submission attempt of the research paper was successful and the paper was accepted. My fellow student appeared in the list of co-authors but I didn't.
The version of the paper that finally got accepted differed from the first one that got rejected, in that it contained only an extra experiment, using the data from my fellow student. However, the initial empirical experiments that I put together were still there. They have not been removed, nor modified.
Regarding this situation I have a series of questions:
Is it normal to feel that I have been treated unfairly? I feel that the only reason why I have been removed from the list of co-authors is because the dataset I have compiled simply didn't confirm the expected theoretical results and me getting fired was simply a way for my supervisor to vent his frustration about being rejected.
Is it legal to publish a paper that uses data and software that some other person developed and not mention this person as a co-author (or at least as a reference)? Are there any laws or rules of conduct regarding such situations?
I'm aware that a variation of this question may have already been answered before:
What to do when principal investigator publishes your work without putting you down as a coauthor?
My research work stolen and published as his own by the co-author without my consent
My work was published and my name was nowhere to be found: how should I handle this?
Most of the answers suggested that I should try to approach and discuss this problem in private with my supervisor or with some other member of the research group. I have tried doing exactly this and both my supervisor and 2 other senior members simply refused to discuss this issue with me. The only response I've got was: "what's done is done, let us focus on the future now".
What can I do, or what would be ethical to do in this situation?