If you don't have any previous experience in Java this may be a tall order.
You will first need to establish the format of the call graph. Then tokenize either using word boundaries, regular expression or a parser generator such as antlr.
Beyond that, the problem is too large for a complete answer on StackOverflow. Try to study these options and ask specific questions the option you choose when you encounter problems.