def val_accuracy(show_swap):
kv = kernel_ver()<EOL>pid = os.getpid()<EOL>swap_accuracy = -<NUM_LIT:1><EOL>if kv[:<NUM_LIT:2>] == (<NUM_LIT:2>,<NUM_LIT:4>):<EOL><INDENT>if proc.open('<STR_LIT>').read().find("<STR_LIT>") == -<NUM_LIT:1>:<EOL><INDENT>return <NUM_LIT:1>, swap_accuracy<EOL><DEDENT>return <NUM_LIT:0>, swap_accuracy<EOL><DEDENT>elif kv[:<NUM_LIT:2>] == (<NUM_LIT:2>,<NUM_LIT:6>):<EOL><INDENT>if os.path.exists(proc.path(pid, '<STR_LIT>')):<EOL><INDENT>swap_accuracy = <NUM_LIT:1><EOL>if proc.open(pid, '<STR_LIT>').read().find("<STR_LIT>")!=-<NUM_LIT:1>:<EOL><INDENT>return <NUM_LIT:2>, swap_accuracy<EOL><DEDENT>else:<EOL><INDENT>return <NUM_LIT:1>, swap_accuracy<EOL><DEDENT><DEDENT>if (<NUM_LIT:2>,<NUM_LIT:6>,<NUM_LIT:1>) <= kv <= (<NUM_LIT:2>,<NUM_LIT:6>,<NUM_LIT:9>):<EOL><INDENT>return -<NUM_LIT:1>, swap_accuracy<EOL><DEDENT>return <NUM_LIT:0>, swap_accuracy<EOL><DEDENT>elif kv[<NUM_LIT:0>] > <NUM_LIT:2> and os.path.exists(proc.path(pid, '<STR_LIT>')):<EOL><INDENT>swap_accuracy = <NUM_LIT:1><EOL>if show_swap and proc.open(pid, '<STR_LIT>').read().find("<STR_LIT>")!=-<NUM_LIT:1>:<EOL><INDENT>swap_accuracy = <NUM_LIT:2><EOL><DEDENT>return <NUM_LIT:2>, swap_accuracy<EOL><DEDENT>else:<EOL><INDENT>return <NUM_LIT:1>, swap_accuracy<EOL><DEDENT>
http://wiki.apache.org/spamassassin/TopSharedMemoryBug