- Rename functions, variables, parameters and imports with scope-aware AST passes - Generalise Flask route and template paths to unique /route_N and tpl_N names - Replace descriptive strings with length-preserving, word-consistent msg tokens - Strip docstrings and comments - Add verification for parse validity and leaked benchmark identifiers - Include SAST prompt and expected labels
24 lines
841 B
Python
24 lines
841 B
Python
from flask import redirect as mod_1, url_for as mod_2, request as mod_3, make_response as mod_4, render_template as mod_5
|
|
from helpers.utils import escape_for_html as mod_6
|
|
|
|
def init(var_1):
|
|
|
|
@var_1.route('/route_192', methods=['GET'])
|
|
def func_383():
|
|
return func_384()
|
|
|
|
@var_1.route('/route_192', methods=['POST'])
|
|
def func_384():
|
|
var_2 = ''
|
|
var_3 = mod_3.headers.get('msg00000000000002M')
|
|
if not var_3:
|
|
var_3 = ''
|
|
import helpers.utils
|
|
try:
|
|
var_4 = f'{helpers.utils.TESTFILES_DIR}/{var_3}'
|
|
with open(var_4, 'wb') as var_5:
|
|
var_2 += f'Hrb msg04 pr msg05 pr m001: {mod_6(var_4)}'
|
|
except IOError as var_6:
|
|
var_2 += f"msg0003 msg0004 m006 m001 '{mod_6(var_4)}': {mod_6(var_6.strerror)}"
|
|
return var_2
|