mainThread.addMethod(mainMethod);
mainThread.addRunMethod(mainMethod);
mainThread.setIsMainThread();
// get all the successors, add to threadMethods
int methodNum = 0;
while(methodNum < mainThread.methodCount())
{
Iterator succMethodsIt = pecg.getSuccsOf(mainThread.getMethod(methodNum)).iterator();
while(succMethodsIt.hasNext())
{
SootMethod method = (SootMethod) succMethodsIt.next();