professor pushing me to get result when nothing is right! Background

My professor assigned me a project as part of a course. The project is part of another student's thesis and has several flaws. I explained the problems of the project to my professor. However, the professor seems to believe that I just don't understand the project and don't know how to code.

The professor now sent the other student on a work trip for seven or eight months, starting in 10 days.

In the meantime, the professor asked me to fix the project and produce the results.

Unfortunately, the project is so flawed that I can't produce results with it. I believe that it's the other student's responsibility to fix the project. S/he also knows the project and it's issues much better than I do.

The professor still doesn't consider my concerns and just pushes me to finish the project. He wants to grade the course based on a publishable paper from this flawed project. (My other classmates already have required information to design a controller, and assigning this flawed project and grading like this is not fair.) Meanwhile, the professor does not even want to talk about a topic for my own thesis. I feel taken advantage of and don't know what to do.

Questions

What can I do to convince the professor that I should no longer waste time on another student's broken project but rather start my own? Would it be okay to refuse to work on this project?
The case as I understand it is:

(1) You are taking a course and the assessment is based on      producing a publishable paper based on a pre-assigned topic. 

(2) The topic assigned to you is not your research interest and appears to be broken, whereas other classmates have been assigned more appropriate topics.

(3) You feel that you are forcibly being roped in to fix someone else's problem.

Point (1) means the professor has the right to set assessments as per his judgement. There's nothing you can challenge here. No, you can't refuse to work on it (unless you forego the grade).

Point (2) is unfortunate, but it's inevitable that some inequality will exist between students. You can voice your objections, as you have already, but it's entirely the prerogative of the professor to act upon them. I would suggest making a calm and composed case mentioning only the perceived differences in difficulty of your project vs other projects. Don't talk about what flaws the project has. It might be a good opportunity for you to try correcting them. Maybe you were assigned this because you have a particular aptitude. Don't fight it before trying everything at your disposal. 

Point (3) is a serious charge amounting to ethical misconduct. If true, this should be reported and escalated to the relevant authority. However, keep in mind that this is your interpretation only, possibly subject to bias. If you choose to act upon this, do think long and hard first, being as objective as possible.