public SootMethodAndClass parseSootMethodString(String parseString){
  if (!parseString.startsWith("<") || !parseString.endsWith(">")) {
    throw new IllegalArgumentException("Illegal format of " + parseString + " (should use soot method representation)");
  }
  String name="";
  String className="";
  String returnType="";
  Pattern pattern=Pattern.compile("<(.*?):");
  Matcher matcher=pattern.matcher(parseString);
  if (matcher.find()) {
    className=matcher.group(1);
  }
  pattern=Pattern.compile(": (.*?) ");
  matcher=pattern.matcher(parseString);
  if (matcher.find()) {
    returnType=matcher.group(1);
    parseString=parseString.substring(matcher.end(1));
  }
  pattern=Pattern.compile(" (.*?)\\(");
  matcher=pattern.matcher(parseString);
  if (matcher.find()) {
    name=matcher.group(1);
  }
  List<String> paramList=new ArrayList<String>();
  pattern=Pattern.compile("\\((.*?)\\)");
  matcher=pattern.matcher(parseString);
  if (matcher.find()) {
    String params=matcher.group(1);
    for (    String param : params.split(","))     paramList.add(param.trim());
  }
  return new SootMethodAndClass(name,className,returnType,paramList);
}

public SootMethodAndClass parseSootMethodString ( String parseString ) { if ( ! parseString . startsWith ( "<" ) || ! parseString . endsWith ( ">" ) ) { throw new IllegalArgumentException ( "Illegal format of " + parseString + " (should use soot method representation)" ) ; } String name = "" ; String className = "" ; String returnType = "" ; Pattern pattern = Pattern . compile ( "<(.*?):" ) ; Matcher matcher = pattern . matcher ( parseString ) ; if ( matcher . find ( ) ) { className = matcher . group ( 1 ) ; } pattern = Pattern . compile ( ": (.*?) " ) ; matcher = pattern . matcher ( parseString ) ; if ( matcher . find ( ) ) { returnType = matcher . group ( 1 ) ; parseString = parseString . substring ( matcher . end ( 1 ) ) ; } pattern = Pattern . compile ( " (.*?)\\(" ) ; matcher = pattern . matcher ( parseString ) ; if ( matcher . find ( ) ) { name = matcher . group ( 1 ) ; } List < String > paramList = new ArrayList < String > ( ) ; pattern = Pattern . compile ( "\\((.*?)\\)" ) ; matcher = pattern . matcher ( parseString ) ; if ( matcher . find ( ) ) { String params = matcher . group ( 1 ) ; for ( String param : params . split ( "," ) ) paramList . add ( param . trim ( ) ) ; } return new SootMethodAndClass ( name , className , returnType , paramList ) ; }
parses a string in soot representation , for example : < soot . jimple . infoflow . test . testnomain : java . lang . string function1 ( ) > < soot . jimple . infoflow . test . testnomain : void functioncallonobject ( ) > < soot . jimple . infoflow . test . testnomain : java . lang . string function2 ( java . lang . string , java . lang . string ) >
