def METHOD_NAME(args):
	with open(args.classes_subst, 'r') as sources:
		lines = sources.readlines()
	args.classnames = {}
	args.class_substitutions = {}
	for line in lines:
		tokens = line.split()
		oldname = tokens[0]
		newname = tokens[1]
		index = oldname.rfind('.')
		classname = oldname[index+1:]
		subpackage = oldname[len('${fromprefix}')+1:oldname.rfind('.')]
		args.classnames[classname] = subpackage
		newname = newname.replace('${toprefix}', args.to_prefix)
		args.class_substitutions[classname] = newname