public static String fixDesc(String description,Map<String,MappedClass> oldNamestoClasses){
  if (description == null || description.length() == 0 || isPrimitive(description)) {
    return description;
  }
  if (description.contains("L") && description.contains(";")) {
    if (description.startsWith("(") || (description.startsWith("L") || description.startsWith("[")) && description.endsWith(";")) {
      String regex="(?<=[L])[^;]*(?=;)";
      Pattern p=Pattern.compile(regex);
      Matcher m=p.matcher(Pattern.quote(description));
      for (int i=0; i < m.groupCount(); i++) {
        String found=m.group(i);
        description=description.replace(found,fixDesc(found,oldNamestoClasses));
      }
      return description;
    }
  }
 else {
    MappedClass mc=oldNamestoClasses.get(description);
    if (mc == null) {
      return description;
    }
    return mc.getNewName();
  }
  return description;
}

public static String fixDesc ( String description , Map < String , MappedClass > oldNamestoClasses ) { if ( description == null || description . length ( ) == 0 || isPrimitive ( description ) ) { return description ; } if ( description . contains ( "L" ) && description . contains ( ";" ) ) { if ( description . startsWith ( "(" ) || ( description . startsWith ( "L" ) || description . startsWith ( "[" ) ) && description . endsWith ( ";" ) ) { String regex = "(?<=[L])[^;]*(?=;)" ; Pattern p = Pattern . compile ( regex ) ; Matcher m = p . matcher ( Pattern . quote ( description ) ) ; for ( int i = 0 ; i < m . groupCount ( ) ; i ++ ) { String found = m . group ( i ) ; description = description . replace ( found , fixDesc ( found , oldNamestoClasses ) ) ; } return description ; } } else { MappedClass mc = oldNamestoClasses . get ( description ) ; if ( mc == null ) { return description ; } return mc . getNewName ( ) ; } return description ; }
given an obfuscated description , finds the new values for class names and updates the description .
