

Here is the table which considers various factors in Project Success.

So, does this mean that the success of a software project is a miracle?

Here are a list of those methodologies, which I believe can help in the long run.
Getting Requirements
When a client tells us their requirement, do you think the client really knows what they really really want? If your answer is yes, well, sorry to say, you may have to re-think your strategies. The client is not sure what they really want. They are unsure what all functionalities they want. It is our duty to get the right requirement specification for the project. this is where the importance of a System Analyst or a Business Analyst comes into play. First of all, we should understand the business process of the client, understand how our project can help them to improve the same. The project planning should start ONLY AFTER the requirements are finalized.
The Process
A well defined process is a single most crucial factor for the successful completion of any project. All of it should be documented and followed from the highest level to the lowest level in the project team. I am not going into the details of various project development process though (but open for detailed discussion)
Risk Management
All project are associated with a certain amount of risk. Sudden surprises can always upset projects that don't plan for handling risks and can end up losing the client. Software projects aren't just about processes and requirements, a committed resolve to do the best on a project is a factor that does play a crucial role too.