diff --git "a/Output.txt" "b/Output.txt" new file mode 100644--- /dev/null +++ "b/Output.txt" @@ -0,0 +1,9025 @@ +NL: if self._leftover is true, +ref: if self . _leftover : +Output: if self. _ leftover : +bleu_metric: 41.11336169005197 +---------- +NL: if instance is not None, +ref: if instance is not None : +Output: if instance is not none : +bleu_metric: 59.46035575013605 +---------- +NL: strip value of the first and last element. +ref: value = value [ 1 : - 1 ] +Output: strip = [ 1 : - 1 ] [ 1 : ] +bleu_metric: 47.85543921093738 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: if self.verbosity is greater or equal than integer 1, +ref: if self . verbosity >= 1 : +Output: if self. verbosity > = 1 : +bleu_metric: 100.0 +---------- +NL: second contains: string 'InternalHigh and ULONG_PTR, third: '_offset_union' and _OFFSET_UNION, forth 'hEvent' and HANDLE. call the function POINTER with argument OVERLAPPED, substitute the result for LPOVERLAPPED. +ref: LPOVERLAPPED = POINTER ( OVERLAPPED ) +Output: luptu match = force _ bytes ( options [ 2 : ] ) +bleu_metric: 13.217947626377288 +---------- +NL: define the method validate with arguments self and value. +ref: def validate ( self , value ) : +Output: def validate ( self, value ) : +bleu_metric: 100.0 +---------- +NL: call the method self.can_read.release. +ref: self . can_read . release ( ) +Output: self. can _ read. release ( ) +bleu_metric: 51.93071778680676 +---------- +NL: substitute has_header for __contains__. +ref: __contains__ = has_header +Output: _ _ contains _ _ = has _ header _ _ contains _ _ _ _ _ _ _ _ _ _ _ +bleu_metric: 5.291907393644997 +---------- +NL: called with an argument result of the method self.latest_post_date. if value under the 'ttl' key of the self.feed dictionary is not None, +ref: if self . feed [ 'ttl' ] is not None : +Output: if self. feed ['ttl'] is not none : +bleu_metric: 82.42367502646054 +---------- +NL: define the method render with 2 arguments: self and context. +ref: def render ( self , context ) : +Output: def render ( self, context ) : +bleu_metric: 100.0 +---------- +NL: import module datetime. +ref: import datetime +Output: import datetime +bleu_metric: 100.0 +---------- +NL: if size is not empty, +ref: if size : +Output: if size : : : : : : : : +bleu_metric: 24.08856270485351 +---------- +NL: raise an TypeError exception with an argument string "Non-integer base36 conversion input.". +ref: raise TypeError ( "Non-integer base36 conversion input." ) +Output: raise typeerror ( " non - integer base36 input. " ) +bleu_metric: 42.42430706745843 +---------- +NL: define the method size with arguments self and name. +ref: def size ( self , name ) : +Output: def size ( self, name ) : +bleu_metric: 100.0 +---------- +NL: split ip_str into parts by ':', substitute the result for new_ip. +ref: new_ip = ip_str . split ( ':' ) +Output: new _ ip = ip _ str. split (':') +bleu_metric: 52.66403878479265 +---------- +NL: from decimal import Decimal and DecimalException into default name space. +ref: from decimal import Decimal , DecimalException +Output: from decimal import decimal, decimalexception +bleu_metric: 36.79832735299481 +---------- +NL: if AttributeError exception is caught, +ref: except AttributeError : +Output: except attributeerror : : : +bleu_metric: 31.239399369202552 +---------- +NL: from django.core import signing into default name space. +ref: from django . core import signing +Output: from django. core import signing +bleu_metric: 100.0 +---------- +NL: __Y is a raw string '(?P\d{4})'. +ref: __Y = r'(?P\d{4})' +Output: _ _ y = r'(? p < year > \ d { 4 } ) ' +bleu_metric: 70.9823225418781 +---------- +NL: remove value under key key of self dictionary, if it doesnt exists return default, substitute the result for value. +ref: value = dict . pop ( self , key , default ) +Output: value = self. dict. pop ( key, default ) +bleu_metric: 58.4706532697313 +---------- +NL: call the function constant_time_compare with 2 arguments: sig and return value of the self.signature method with an argument value, if it evaluates to true, +ref: if constant_time_compare ( sig , self . signature ( value ) ) : +Output: if constant _ time _ compare ( sig, self. signature ( value ) ) : +bleu_metric: 66.76160043354594 +---------- +NL: return tempdir. +ref: return tempdir +Output: return tempdir +bleu_metric: 100.0 +---------- +NL: raise an TemplateSyntaxError exception with an argument string "'templatetag' statement takes one argument". +ref: raise TemplateSyntaxError ( "'templatetag' statement takes one argument" ) +Output: raise templatesyntaxerror ( "'templatetag'statement takes one argument " ) +bleu_metric: 75.1272426711902 +---------- +NL: substitute pattern.regex.pattern for p_pattern. +ref: p_pattern = pattern . regex . pattern +Output: p _ pattern = pattern. regex. pattern +bleu_metric: 63.89431042462724 +---------- +NL: if command.verbosity is greater than integer 1, +ref: if command . verbosity > 1 : +Output: if command. verbosity > 1 : +bleu_metric: 100.0 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: split instructions by ',' character, substitute the result for styles. +ref: styles = instructions . split ( ',' ) +Output: styles = instructions. split ( ',') +bleu_metric: 100.0 +---------- +NL: if s is an instance of an object Promise. +ref: if isinstance ( s , Promise ) : +Output: if isinstance ( s, promise ) : +bleu_metric: 65.80370064762462 +---------- +NL: key for 'grouper' and val converted into a list for 'list', for every key and val in result of the function groupby, called with 2 arguments: obj_list and lambda function with an argument obj and return value as a result of the function, self.resolve_expression called with 2 arguments obj and context. return an empty string, +ref: return '' +Output: return''. join ( value, self ). resolve _ expression ( value, none ) +bleu_metric: 12.021577610863723 +---------- +NL: if value under the 'outlog' key of options dictionary is true, +ref: if options [ 'outlog' ] : +Output: if options ['outlog'] : +bleu_metric: 100.0 +---------- +NL: raise an TemplateSyntaxError exception with an argument string "Only 'silent' flag is allowed after cycle's name, not '%s'.", +ref: raise TemplateSyntaxError ( "Only 'silent' flag is allowed after cycle's name, not '%s'." % args [ - 1 ] ) +Output: raise templatesyntaxerror ( " only'silent'prefix is allowed :'name,'% s '. " % ( e. +bleu_metric: 27.62604147813235 +---------- +NL: 'App label of an application to synchronize the state.' as arguments. call the method parser.add_argument with string 'migration_name', nargs set to charcter '?', help containing string, +ref: parser . add_argument ( 'migration_name' , nargs = '?' , help = 'Database state will be brought to the state after that migration.' ) +Output: parser. add _ argument ('migration _ name ', nargs ='django to print the self. get _ name, help +bleu_metric: 19.509849075130752 +---------- +NL: concatenate package_name, string '.' and module_name, substitute it for full_module_name. +ref: full_module_name = package_name + '.' + module_name +Output: full _ module _ name = package _ name + '.'+ module _ name +bleu_metric: 27.499775953224148 +---------- +NL: call the function sql_all with 3 arguments: app_config, self.style and connection, substitute the result for statements. +ref: statements = sql_all ( app_config , self . style , connection ) +Output: statements = sql _ all ( app _ config, self. style, connection ) +bleu_metric: 49.852287898736826 +---------- +NL: substitute name for handler.name. +ref: handler . name = name +Output: handler. name = name +bleu_metric: 100.0 +---------- +NL: return new_value. +ref: return new_value +Output: return new _ value +bleu_metric: 35.93041119630843 +---------- +NL: get the bit attribute of current object, substitute it for current. +ref: current = getattr ( current , bit ) +Output: current = getattr ( current, bit ) +bleu_metric: 100.0 +---------- +NL: remove the 'use_natural_primary_keys' key from the options dictionary and substitute it for self.use_natural_foreign_keys, +ref: self . use_natural_foreign_keys = options . pop ( 'use_natural_foreign_keys' , False ) or self . use_natural_keys +Output: self. use _ natural _ foreign _ keys = options. pop ('use _ natural _ primary _ keys ', false ) +bleu_metric: 25.001526111779533 +---------- +NL: do nothing. +ref: pass +Output: pass +bleu_metric: 100.0 +---------- +NL: if AttributeError exception is caught, +ref: except AttributeError : +Output: except attributeerror : : : +bleu_metric: 31.239399369202552 +---------- +NL: define the function with_metaclass with 2 arguments meta and unpacked list bases. +ref: def with_metaclass ( meta , * bases ) : +Output: def with _ metaclass ( meta, * bases ) : +bleu_metric: 66.52049901111008 +---------- +NL: call the method commands.update, with an argument dictionary containing entries: app_config_name for name, for every name in return value of the function find_commands, called with an argument path. +ref: commands . update ( { name : app_config . name for name in find_commands ( path ) } ) +Output: commands. update ( { name : find _ commandsg _ name, path ) _ commands ( app _ config, label +bleu_metric: 32.598893462577884 +---------- +NL: define the method attach with 4 arguments: self, filename set to None, content set to None and mimetype set to None. +ref: def attach ( self , filename = None , content = None , mimetype = None ) : +Output: def attach ( self, filename = none, content = none, mimetype = none ) : +bleu_metric: 54.0785378808267 +---------- +NL: define the function load_command_class with arguments: app_name and name. +ref: def load_command_class ( app_name , name ) : +Output: def load _ command _ class ( app _ name, name ) : +bleu_metric: 32.37722713145643 +---------- +NL: call the function quote with 2 arguments: url and safe as bytes string '!*\'();:@&=+$,/?#[]~', substitute the result for url. +ref: url = quote ( url , safe = b'!*\'();:@&=+$,/?#[]~' ) +Output: url = quote ( url, safe = b'* \ \ ( ), @ & = { 0 } ) +bleu_metric: 36.89047631304972 +---------- +NL: for every ldir in dirs, +ref: for ldir in dirs : +Output: for ssir in dirs : +bleu_metric: 64.34588841607616 +---------- +NL: _fields_ is a list containing 2 tuples: first tuple contains: string '_offset' and _OFFSET, second contains: string 'Pointer' and PVOID. +ref: _fields_ = [ ( '_offset' , _OFFSET ) , ( 'Pointer' , PVOID ) ] +Output: _ fields _ = [ ('_ offset ', _ offset ) ] +bleu_metric: 24.50622048489904 +---------- +NL: call the method self.render, return the result. +ref: return self . render ( ) +Output: return self. render ( ) +bleu_metric: 100.0 +---------- +NL: substitute CheckboxFieldRenderer for renderer. +ref: renderer = CheckboxFieldRenderer +Output: renderer = checkboxfieldrenderer +bleu_metric: 36.304072644520666 +---------- +NL: call the function force_text with 3 arguments: field_name, encoding and errors as a string 'replace', substitute the result for field_name. +ref: field_name = force_text ( field_name , encoding , errors = 'replace' ) +Output: field _ name = force _ text ( field _ name, encoding, errors ='replace') +bleu_metric: 48.05212179017457 +---------- +NL: queryset set to qs and unpacked dictionary kwargs. define the method initial_form_count with an argument self. +ref: def initial_form_count ( self ) : +Output: def initial _ form _ count ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: skip this loop iteration, +ref: continue +Output: continue +bleu_metric: 100.0 +---------- +NL: define the method __init__ with 3 arguments: self, language and deactivate set to boolean False. +ref: def __init__ ( self , language , deactivate = False ) : +Output: def _ _ init _ _ ( self, language, deactivate = false ) : +bleu_metric: 47.631009147745075 +---------- +NL: raise an TemplateSyntaxError exception with an argument string "Invalid arguments provided to simple_tag". +ref: raise TemplateSyntaxError ( "Invalid arguments provided to simple_tag" ) +Output: raise templatesyntaxerror ( " invalid arguments provided to simple _ tag " ) +bleu_metric: 27.22589423069702 +---------- +NL: substitute val for the value under the cache_key key of the _format_cache dictionary. +ref: _format_cache [ cache_key ] = val +Output: _ format _ cache [ cache _ key ] = val +bleu_metric: 22.416933501922287 +---------- +NL: from django.utils.encoding import python_2_unicode_compatible into default name space. +ref: from django . utils . encoding import python_2_unicode_compatible +Output: from django. utils. encoding import python _ 2 _ unicode _ compatible +bleu_metric: 47.58733096412523 +---------- +NL: substitute URLInput for widget. +ref: widget = URLInput +Output: widget = urlinput +bleu_metric: 70.71067811865474 +---------- +NL: define the method __init__ with 2 arguments: self and data set to None. +ref: def __init__ ( self , data = None ) : +Output: def _ _ init _ _ ( self, data = none ) : +bleu_metric: 39.3755531055134 +---------- +NL: signal is a string 'signals' +ref: signals = 'signals' +Output: signal ='signals ' +bleu_metric: 80.91067115702212 +---------- +NL: convert ret to a boolean, return it. +ref: return bool ( ret ) +Output: return bool ( ret ) +bleu_metric: 100.0 +---------- +NL: from django.core.exceptions import ImproperlyConfigured into default name space. +ref: from django . core . exceptions import ImproperlyConfigured +Output: from django. core. exceptions import improperlyconfigured +bleu_metric: 76.1894894736741 +---------- +NL: foreground is a dictionary created with elements: x appended to a string '3' for value under the key x of color_names dictionary, +ref: foreground = dict ( ( color_names [ x ] , '3%s' % x ) for x in range ( 8 ) ) +Output: else : color _ names [ x ] = {'3': x'3': x } +bleu_metric: 11.364947265262986 +---------- +NL: return a string "", where '%s' are replaced with self.object._meta.app_label, +ref: return "" % ( self . object . _meta . app_label , self . object . _meta . object_name , self . object . pk ) +Output: return " < deserializedobject : % s. % s ( pk = % s ) > " % ( self. object. _ +bleu_metric: 39.89855718581563 +---------- +NL: call the method parser.add_argument with 6 arguments: string '--extension', string '-e', dest set to string 'extensions', +ref: parser . add_argument ( '--extension' , '-e' , dest = 'extensions' , action = 'append' , default = [ 'py' ] , help = 'The file extension(s) to render (default: "py"). ' 'Separate multiple extensions with commas, or use ' '-e multiple times.' ) +Output: parser. add _ argument ('- - extension ','- e ', dest ='extensions ', help ='interactive ' +bleu_metric: 15.425318683162303 +---------- +NL: decorator function register.filter with an argument is_safe set to boolean False. +ref: @ register . filter ( is_safe = False ) +Output: @ register. filter ( is _ safe = false ) +bleu_metric: 49.13270548144421 +---------- +NL: if response.streaming is True, +ref: if response . streaming : +Output: if response. streaming : : : : : : : : : : : : : : : : : : : +bleu_metric: 20.185159816886607 +---------- +NL: call the function force_text with an argument text, split by it word_split_re, substitute it for words. +ref: words = word_split_re . split ( force_text ( text ) ) +Output: words = force _ text ( text ). split ( word _ split _ re ) +bleu_metric: 22.32308651732177 +---------- +NL: "%r is not a valid date" formated with date and third element of the result of the function sys.exc_info. define the function parse_http_date_safe an argument date. +ref: def parse_http_date_safe ( date ) : +Output: def parse _ http _ date _ safe ( date ) : +bleu_metric: 36.36227046500071 +---------- +NL: from xml.sax import handler into default name space. +ref: from xml . sax import handler +Output: from xml. lazy import handler +bleu_metric: 48.8923022434901 +---------- +NL: and RemovedInDjango19Warning. get the value under the ' use_natural_foreign_keys' key of the options dictionary, substitute the result for use_natural_foreign_keys. +ref: use_natural_foreign_keys = options . get ( 'use_natural_foreign_keys' ) or use_natural_keys +Output: use _ natural _ foreign _ keys = options. get ('use _ natural _ foreign _ keys') +bleu_metric: 26.512298021756177 +---------- +NL: return an instance of a class RegexURLResolver created with arguments: raw string '^/' and a list containing an element ns_resolver. +ref: return RegexURLResolver ( r'^/' , [ ns_resolver ] ) +Output: return regexurlresolver ( r'^ / ', [ ns _ resolver ] ) +bleu_metric: 57.49089871602278 +---------- +NL: call the function timedelta with an argument integer 0, return the result. +ref: return timedelta ( 0 ) +Output: return timedelta ( 0 ) +bleu_metric: 100.0 +---------- +NL: call the method self.loaddata with an argument fixture_labels. +ref: self . loaddata ( fixture_labels ) +Output: self. loaddata ( fixture _ labels ) +bleu_metric: 45.18010018049224 +---------- +NL: define the method __setitem__ with 3 arguments: self, key and value. +ref: def __setitem__ ( self , key , value ) : +Output: def _ _ setitem _ _ ( self, key, value ) : +bleu_metric: 59.687741756344955 +---------- +NL: do nothing. +ref: pass +Output: pass +bleu_metric: 100.0 +---------- +NL: if UnicodeDecodeError exception is caught, +ref: except UnicodeDecodeError : +Output: except unicodedecodeerror : : : +bleu_metric: 31.239399369202552 +---------- +NL: call the method opts.model, substitute the result for self.instance. +ref: self . instance = opts . model ( ) +Output: self. instance = opts. model ( ) +bleu_metric: 100.0 +---------- +NL: substitute its __name__ field for function name, if it doesnt exists substitute func.__name__ for function_name. call the function generic_tag_compiler, params set to params, varargs set to varargs, varkw set to varkw, defaults set to defaults, +ref: compile_func = partial ( generic_tag_compiler , params = params , varargs = varargs , varkw = varkw , defaults = defaults , name = function_name , takes_context = takes_context , node_class = SimpleNode ) +Output: _ tag _ language = generic _ tag _ language ( params, varargs = varkw, * * kwargs ) +bleu_metric: 12.279367874382976 +---------- +NL: raise CommandError with an argument string 'Unknown app in excludes: %s', where '%s' is replaced with exclude. +ref: raise CommandError ( 'Unknown app in excludes: %s' % exclude ) +Output: raise commanderror ('unknown app : % s'% exclude ) +bleu_metric: 50.22959905162326 +---------- +NL: if data is true, substitute it for self.data, if not self.data is an empty dictionary. +ref: self . data = data or { } +Output: self. data = data or { } +bleu_metric: 100.0 +---------- +NL: from __future__ import unicode_literals into default name space. +ref: from __future__ import unicode_literals +Output: from _ _ future _ _ import unicode _ literals +bleu_metric: 13.950796967929133 +---------- +NL: if form.cleaned_data is true and value under the field key of form.cleaned_data dictionary is not None, +ref: if ( form . cleaned_data and form . cleaned_data [ field ] is not None and form . cleaned_data [ unique_for ] is not None ) : +Output: if form. cleaned _ data and form. cleaned _ data [ field ] is not none : +bleu_metric: 22.702767898678314 +---------- +NL: call the method self.make_key with key and version set to version as arguments, substitute it for key. +ref: key = self . make_key ( key , version = version ) +Output: key = self. make _ key ( key, version = version ) +bleu_metric: 67.39047062564734 +---------- +NL: primary_keys is an empty list. +ref: primary_keys = [ ] +Output: primary _ keys = [ ] +bleu_metric: 51.697315395717055 +---------- +NL: call the method self._populate. +ref: self . _populate ( ) +Output: self. _ populate ( ) +bleu_metric: 41.11336169005197 +---------- +NL: called with an argument commit, return the result. save.alters_data is boolean True. +ref: save . alters_data = True +Output: save. alters _ data = true +bleu_metric: 26.26909894424158 +---------- +NL: if value is not contained in result, +ref: if value is not result : +Output: if value is not result : +bleu_metric: 100.0 +---------- +NL: if command.use_argparse is true, +ref: if command . use_argparse : +Output: if command. use _ argparse : +bleu_metric: 35.49481056010052 +---------- +NL: and third element of the function sys.exc_info result. return attr. +ref: return attr +Output: return attr +bleu_metric: 100.0 +---------- +NL: if num is greater than self._max_entries, +ref: if num > self . _max_entries : +Output: if num > self. _ max _ entries : +bleu_metric: 46.92470064105599 +---------- +NL: called with an argument value, return the result. call the function allow_lazy with 2 arguments: strip_entities, six.text_type, substitute the result for strip_entities. +ref: strip_entities = allow_lazy ( strip_entities , six . text_type ) +Output: strip _ entities = allow _ lazy ( strip _ entities, six. text _ type ) +bleu_metric: 15.316824552082009 +---------- +NL: call the method self.strptime with arguments value and format, return the result. +ref: return self . strptime ( value , format ) +Output: return self. strptime ( value, format ) +bleu_metric: 100.0 +---------- +NL: dest as a string 'use_default_ignore_patterns', default set to boolean True, and help as a string "Don't ignore the common glob-style patterns 'CVS', '.*', '*~' and '*.pyc'.". call the method parser.add_argument with 5 arguments: string '--no-wrap', action as a string 'store_true', dest as a string 'no_wrap', +ref: parser . add_argument ( '--no-wrap' , action = 'store_true' , dest = 'no_wrap' , default = False , help = "Don't break long message lines into several lines." ) +Output: parser. add _ argument ('- - noinput ', action ='store _ true ', dest ='interactive ', +bleu_metric: 21.50302229226304 +---------- +NL: from django.core.management.sql import sql_delete into default name space. +ref: from django . core . management . sql import sql_delete +Output: from django. core. management. sql import sql _ delete +bleu_metric: 73.61703354503865 +---------- +NL: call the method self._deleted_form_indexes.append with an argument i. +ref: self . _deleted_form_indexes . append ( i ) +Output: self. _ deleted _ form _ indexes. append ( i ) +bleu_metric: 44.28500142691474 +---------- +NL: if last element of args is not equal to a string "silent", +ref: if args [ - 1 ] != "silent" : +Output: if args [ - 1 ]! = " silent " : +bleu_metric: 100.0 +---------- +NL: self._unget_history is an empty list. +ref: self . _unget_history = [ ] +Output: self. _ unget _ history = [ ] +bleu_metric: 40.3527863746399 +---------- +NL: otherwise if file_name is not an instance of six.string_types and call to the function is_iterable with an argument file_name, +ref: elif not isinstance ( file_name , six . string_types ) and is_iterable ( file_name ) : +Output: elif not isinstance ( file _ name, six. string _ types ) and is _ file _ name ( file _ name ) : +bleu_metric: 22.50265947708922 +---------- +NL: form is an instance of ManagementForm class, created with 3 arguments: auto_id as self.auto_id, prefix as self.prefix, +ref: form = ManagementForm ( auto_id = self . auto_id , prefix = self . prefix , initial = { TOTAL_FORM_COUNT : self . total_form_count ( ) , INITIAL_FORM_COUNT : self . initial_form_count ( ) , MIN_NUM_FORM_COUNT : self . min_num , MAX_NUM_FORM_COUNT : self . max_num } ) +Output: form = managementform ( auto _ id = self. auto _ id, prefix = self. prefix, prefix = self. prefix, prefix ) +bleu_metric: 16.29560360918255 +---------- +NL: if receiver is an instance of types.FunctionType type, +ref: if isinstance ( receiver , types . FunctionType ) : +Output: if isinstance ( receiver, types. functiontype ) : +bleu_metric: 67.10275993197631 +---------- +NL: define the method __text_cast with an argument self. +ref: def __text_cast ( self ) : +Output: def _ _ text _ cast ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: call the delete method with key and version set to version as arguments. +ref: self . delete ( key , version = version ) +Output: delete ( key, version = version ) +bleu_metric: 80.07374029168082 +---------- +NL: from __future__ import unicode_literals into default name space. +ref: from __future__ import unicode_literals +Output: from _ _ future _ _ import unicode _ literals +bleu_metric: 13.950796967929133 +---------- +NL: define the function urlizetrunc with 3 arguments value, limit and autoescape set to None. +ref: def urlizetrunc ( value , limit , autoescape = None ) : +Output: def urlizetrc ( value, limit, autoescape = none ) : +bleu_metric: 62.981299923942416 +---------- +NL: return boolean False. +ref: return False +Output: return false +bleu_metric: 75.98356856515926 +---------- +NL: if self.can_delete is true, +ref: if self . can_delete : +Output: if self. can _ delete : +bleu_metric: 35.49481056010052 +---------- +NL: call the method parser.parse with an argument tuple with an element string 'else' and end_tag, substitute the result for nodelist_true. +ref: nodelist_loop = parser . parse ( ( 'else' , end_tag ) ) +Output: nodelist _ true = parser. parse ('else ', end _ tag ) +bleu_metric: 48.902285358301995 +---------- +NL: from django.utils.safestring import mark_safe into default name space. +ref: from django . utils . safestring import mark_safe +Output: from django. utils. safestring import mark _ safe +bleu_metric: 67.86502681586725 +---------- +NL: define the function stringformat with 2 arguments value and arg. +ref: def stringformat ( value , arg ) : +Output: def stringformat ( value, arg ) : +bleu_metric: 100.0 +---------- +NL: get the value under the 'filename' key of the params dictionary, if the key exists substitute it for guessed_filename, +ref: guessed_filename = params . get ( 'filename' ) or used_name +Output: guessed _ filename = params. get ('filename ', none ) +bleu_metric: 52.66403878479265 +---------- +NL: return self.text. +ref: return self . text +Output: return self. text +bleu_metric: 100.0 +---------- +NL: import module os. +ref: import os +Output: import os +bleu_metric: 100.0 +---------- +NL: call the function lazy_number with 5 arguments: ungettext, six.text_type, singular set to singular, plural set to plural, +ref: return lazy_number ( ungettext , six . text_type , singular = singular , plural = plural , number = number ) +Output: lazy _ number = lazygettext, six. text _ type, singular = plural, plural = plural, plural _ number = false, allow _ +bleu_metric: 26.234189765541814 +---------- +NL: open_tags is an empty list. +ref: open_tags = [ ] +Output: open _ tags = [ ] +bleu_metric: 51.697315395717055 +---------- +NL: if name is None, +ref: if name is None : +Output: if name is none : +bleu_metric: 48.8923022434901 +---------- +NL: convert elements of defaultdict to list, substitute it for self.blocks. +ref: self . blocks = defaultdict ( list ) +Output: self. blocks = list ( defaultdict ) +bleu_metric: 49.393827371153705 +---------- +NL: return None. +ref: return None +Output: return none +bleu_metric: 75.98356856515926 +---------- +NL: clean is a lambda function with self and x as arguments, return value is length of x. +ref: clean = lambda self , x : len ( x ) +Output: clean = lambda self, x : len ( x ) +bleu_metric: 100.0 +---------- +NL: call the method apps.get_model with 2 arguments: string 'auth' and string 'Permission'. +ref: apps . get_model ( 'auth' , 'Permission' ) +Output: apps. get _ model ('auth ','permission') +bleu_metric: 49.35578819979933 +---------- +NL: template_with_clear is a string '%(clear)s '. +ref: template_with_clear = '%(clear)s ' +Output: template _ with _ clear ='% ( clear ) s < label = " % ( clear _ checkbox _ label ) s < / label > +bleu_metric: 50.24131605232307 +---------- +NL: define the method invalid_block_tag with 4 arguments: self, token, command and parse_until as None. +ref: def invalid_block_tag ( self , token , command , parse_until = None ) : +Output: def invalid _ block _ tag ( self, token, command, parse _ until = none ) : +bleu_metric: 39.08022752187269 +---------- +NL: if ImportError exception is caught, +ref: except ImportError : +Output: except importerror : : : : +bleu_metric: 26.26909894424158 +---------- +NL: called with an argument this_value_expr, result of the method parser.compile_filter called with an argument max_value_expr, return value of the method parser.compile_filter called with an argument max_width and asvar as asvar. register.tag decorator function with an argument 'with', +ref: @ register . tag ( 'with' ) +Output: @ property +bleu_metric: 4.913221953988765 +---------- +NL: define the function pretty_name with an argument name. +ref: def pretty_name ( name ) : +Output: def pretty _ name ( name ) : +bleu_metric: 53.7284965911771 +---------- +NL: while length of line is grater than max_width, +ref: while len ( line ) > max_width : +Output: while len ( line ) > max _ width : +bleu_metric: 57.06745777055999 +---------- +NL: do nothing. +ref: pass +Output: pass +bleu_metric: 100.0 +---------- +NL: substitute data for data_value if data is not None, otherwise data_value is an empty list. +ref: data_value = data if data is not None else '' +Output: data _ value = data if data is not none else [ ] +bleu_metric: 42.61082723917017 +---------- +NL: _ with an argument string "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", and string 'invalid'. call the re.compile function with an argument raw string '^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$', +ref: ipv4_re = re . compile ( r'^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$' ) +Output: _ value = re. compile ( r'^ ( ( ( 0 - 4 - 4 - d ) - d ] ) ( \. +bleu_metric: 9.050517761563642 +---------- +NL: set response to None. +ref: response = None +Output: setattr ( response, none ) +bleu_metric: 18.5750579991336 +---------- +NL: call the function _get_foreign_key with 3 arguments: parent_model, model and fk_name=fk_name, substitute the result for fk. +ref: fk = _get_foreign_key ( parent_model , model , fk_name = fk_name ) +Output: fk = _ get _ foreign _ key ( parent _ model, model, fk _ name = fk _ name ) +bleu_metric: 13.471766853689124 +---------- +NL: call the method unlink on self with self.name as the argument. +ref: self . unlink ( self . name ) +Output: self. unlink ( self. name ) +bleu_metric: 100.0 +---------- +NL: call the method stream.read with an argument max_header_size, substitute the result for chunk. +ref: chunk = stream . read ( max_header_size ) +Output: chunk = stream. read ( max _ header _ size ) +bleu_metric: 47.85543921093738 +---------- +NL: for every label in app_labels, +ref: for label in app_labels : +Output: for label in app _ labels : +bleu_metric: 35.49481056010052 +---------- +NL: call the method fixture.close. +ref: fixture . close ( ) +Output: fixture. close ( ) +bleu_metric: 100.0 +---------- +NL: if lengths of val1 and val2 are not equal, +ref: if len ( val1 ) != len ( val2 ) : +Output: if len ( val1 )! = val2 : +bleu_metric: 56.29001206548859 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: join elements of output into a string, separated with newline character, +ref: return mark_safe ( '\n' . join ( output ) ) +Output: return'\ n '. join ( output ) +bleu_metric: 66.02284862546423 +---------- +NL: default_validators is an list containing validators.validate_ipv4_address. +ref: default_validators = [ validators . validate_ipv4_address ] +Output: default _ validators = [ validators. validate _ ipv4 _ address ] +bleu_metric: 28.295596283263514 +---------- +NL: pad the rest of the field with bytes string '=', use the result as an argument for the call to the method base64.urlsafe_b64decode, return the result. if LookupError or BinasciiError, renamed to e, exceptions are caught. +ref: except ( LookupError , BinasciiError ) as e : +Output: except ( lookuperror, binascii ) : +bleu_metric: 17.50903198284251 +---------- +NL: from functools import wraps into default name space. +ref: from functools import wraps +Output: from functools import wraps +bleu_metric: 100.0 +---------- +NL: substitute self.urlconf_name for self.urlconf_module. +ref: self . _urlconf_module = self . urlconf_name +Output: self. urlconf _ module = self. urlconf _ name +bleu_metric: 25.21193618434983 +---------- +NL: do nothing. +ref: pass +Output: pass +bleu_metric: 100.0 +---------- +NL: decrement remaining by length of emitting. +ref: remaining -= len ( emitting ) +Output: remaining - = len ( emitting ) +bleu_metric: 100.0 +---------- +NL: memo is an empty dictionary. +ref: memo = { } +Output: memo = { } +bleu_metric: 100.0 +---------- +NL: get the value under the 'indent' key of the options dictionary, substitute the result for indent. +ref: indent = options . get ( 'indent' ) +Output: indent = options. get ('indent') +bleu_metric: 100.0 +---------- +NL: define the method __init__ with arguments self and regex. +ref: def __init__ ( self , regex ) : +Output: def _ _ init _ _ ( self, regex ) : +bleu_metric: 52.96074933406222 +---------- +NL: help is an empty string. +ref: help = '' +Output: help ='' +bleu_metric: 100.0 +---------- +NL: divide self.data.day by 10, substitute reminder of the result for last. +ref: last = self . data . day % 10 +Output: last = self. data. day / 10 +bleu_metric: 78.25422900366436 +---------- +NL: for every location in format_locations, +ref: for location in format_locations : +Output: for location in format _ locations : +bleu_metric: 35.49481056010052 +---------- +NL: raise an ValueError exception with an argument string "Unable to convert %r" formated with value. +ref: raise ValueError ( "Unable to convert %r" % value ) +Output: raise valueerror ( " unable to convert % r " % value ) +bleu_metric: 63.92575075163924 +---------- +NL: define the method recipients with argument self. +ref: def recipients ( self ) : +Output: def recipients ( self ) : +bleu_metric: 100.0 +---------- +NL: call the function six.reraise with 3 arguments: UnreadablePostError, UnreadablePostError instantiated with unpacked list e.args, +ref: six . reraise ( UnreadablePostError , UnreadablePostError ( * e . args ) , sys . exc_info ( ) [ 2 ] ) +Output: six. reraise ( unreadableposterror, unreadableposterror ( * e. args, * * kwar +bleu_metric: 21.169115261564997 +---------- +NL: for every fname in filelist, +ref: for fname in filelist : +Output: for fname in filelist : +bleu_metric: 100.0 +---------- +NL: get the LANG_INFO dictionary value under the generic_lang_code key, return the result. +ref: return LANG_INFO [ generic_lang_code ] +Output: return lang _ info [ generic _ lang _ code ] +bleu_metric: 15.537125692760354 +---------- +NL: return an instance of metaclass class, created with 3 arguments: string 'temporary_class', None and an empty dictionary. +ref: return metaclass ( 'temporary_class' , None , { } ) +Output: return metaclass ('temporary _ class ', none, { } ) +bleu_metric: 49.35578819979933 +---------- +NL: for every k and v in items of dictionary kwargs, respectively, +ref: for ( k , v ) in kwargs . items ( ) : +Output: for k, v in dict. items ( ) : +bleu_metric: 51.239972047888116 +---------- +NL: if value under 'plain' key of the options dictionary is true, +ref: if options [ 'plain' ] : +Output: if options ['plain'] : +bleu_metric: 100.0 +---------- +NL: define the funtion get_internal_wsgi_application. +ref: def get_internal_wsgi_application ( ) : +Output: def get _ internal _ wsgi _ application ( ) : +bleu_metric: 30.26643726685863 +---------- +NL: for every lineno and line is enumerated result of the method content.splitlines, called with an argument boolean True, +ref: for lineno , line in enumerate ( content . splitlines ( True ) ) : +Output: for lineno, line in enumerate ( content. splitlines ( true ) ) : +bleu_metric: 82.82477531331041 +---------- +NL: define the function contains with 2 arguments source and inst. +ref: def contains ( source , inst ) : +Output: def contains ( source, inst ) : +bleu_metric: 100.0 +---------- +NL: and a result of the method __repr__ called from instance of base class of the MultiValueDict class. define the method __getitem__ with 2 arguments: self and key. +ref: def __getitem__ ( self , key ) : +Output: def _ _ getitem _ _ ( self, key ) : +bleu_metric: 52.96074933406222 +---------- +NL: if pathext is None, +ref: if pathext is None : +Output: if pathext is none : +bleu_metric: 48.8923022434901 +---------- +NL: covert to lowercase language elements from (p+1)-th index to the end, append it to the previous result, return it. if not, +ref: else : +Output: else : : +bleu_metric: 56.23413251903491 +---------- +NL: __all__ is a tuple containing 2 initial elements: strigs 'WSGIServer' and 'WSGIRequestHandler'. +ref: __all__ = ( 'WSGIServer' , 'WSGIRequestHandler' ) +Output: _ _ all _ _ = ( stsgiserver ', wsgirequesthandler') +bleu_metric: 22.229849552064014 +---------- +NL: if Exception exception is caught, +ref: except Exception : +Output: except exception : : : : : : : : : : : : : : : +bleu_metric: 9.629943614188138 +---------- +NL: call the method extend with an argument error_list on the return value of the method error_dict.setdefault called with 2 arguments: NON_FIELD_ERRORS and an empty list. +ref: error_dict . setdefault ( NON_FIELD_ERRORS , [ ] ) . extend ( self . error_list ) +Output: error _ dict. setdefault ( non _ field _ errors, [ ] ) +bleu_metric: 28.791691437093753 +---------- +NL: open file old_file_name in read bytes mode, with file descriptor as f, +ref: with open ( old_file_name , 'rb' ) as old_file : +Output: with open ( old _ file _ name,'rb') as f : +bleu_metric: 43.343660127583234 +---------- +NL: dest as a string 'no_obsolete', default as boolean False and help as a string "Remove obsolete message strings.". call the method parser.add_argument with 5 arguments: string '--keep-pot', action as a string 'store_true', +ref: parser . add_argument ( '--keep-pot' , action = 'store_true' , dest = 'keep_pot' , default = False , help = "Keep .pot file after making messages. Useful when debugging." ) +Output: parser. add _ argument ('- - keep ', action ='store _ false ', dest ='interactive ', default = +bleu_metric: 27.196643918569052 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: append idstring to the '.' character, substitute it for idstring. +ref: idstring = '.' + idstring +Output: idstring = '.'+ idstring +bleu_metric: 100.0 +---------- +NL: call the method self.filter with 3 arguments: name, func and unpacked dictionary flags, return the result. +ref: return self . filter ( name , func , ** flags ) +Output: return self. filter ( name, func, * * flags ) +bleu_metric: 100.0 +---------- +NL: if len_values is smaller than integer 1, +ref: if len_values < 1 : +Output: if len _ values < 1 : +bleu_metric: 46.71379777282 +---------- +NL: do nothing. +ref: pass +Output: pass +bleu_metric: 100.0 +---------- +NL: position the file pointer at the start of the self.file file. +ref: self . file . seek ( 0 ) +Output: self. file. seek ( 0 ) +bleu_metric: 100.0 +---------- +NL: if link is not None, +ref: if link is not None : +Output: if link is not none : +bleu_metric: 59.46035575013605 +---------- +NL: if StopUpload, renamed to e, exception is caught, +ref: except StopUpload as e : +Output: except stopupload as e : : +bleu_metric: 41.11336169005197 +---------- +NL: self.parse_name, assign the result to _, ser_fmt and cmp_fmt, respectively. get the value under the cmp_fmt key of the self.compression_formats dictionary, assign it to open_method and mode. +ref: open_method , mode = self . compression_formats [ cmp_fmt ] +Output: open _ method, mode = self. compression _ formats. get ( cmp _ fmt ) +bleu_metric: 24.515235346013313 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: from django.forms import Form into default name space. +ref: from django . forms import Form +Output: from django. forms import form +bleu_metric: 80.91067115702212 +---------- +NL: if first element of text is contained in 'xX'. +ref: if text [ 0 ] in 'xX' : +Output: if text [ 0 ] in ','output': +bleu_metric: 61.626070997295855 +---------- +NL: outer_html is a string '{content}'. +ref: outer_html = '{content}' +Output: inner _ html ='< ul { id _ attr } > { content } < / ul > ' +bleu_metric: 64.3604545490784 +---------- +NL: define the method _get_size_from_underlying_file with argument self. +ref: def _get_size_from_underlying_file ( self ) : +Output: def _ get _ size _ from _ underlying _ file ( self ) : +bleu_metric: 29.282980137146968 +---------- +NL: from django.utils.six.moves.urllib.parse import urlparse into default name space. +ref: from django . utils . six . moves . urllib . parse import urlparse +Output: from django. utils. six. moves. urllib. parse import urlparse +bleu_metric: 100.0 +---------- +NL: substitute stream for self._stream. +ref: self . _stream = stream +Output: self. _ stream = stream +bleu_metric: 36.55552228545124 +---------- +NL: instantiate class Header with 3 arguments: value, string 'utf-8', maxlinelen set to sys.maxsize, call the encode method on it, +ref: value = str ( Header ( value , 'utf-8' , maxlinelen = sys . maxsize ) . encode ( ) ) +Output: return header ( value,'utf - 8 ', maxline = sys. maxsize ( ). encode ( ) ) +bleu_metric: 64.04353183528193 +---------- +NL: call the method parser.expression with an argument bp, substitute it for self.seconds. +ref: self . second = parser . expression ( bp ) +Output: self. seconds = parser. expression ( bp ) +bleu_metric: 76.91605673134586 +---------- +NL: call the method match.group with an arugument name, substitute the result for toktext. +ref: toktext = match . group ( name ) +Output: to atext = match. group ( self. arg, none ) +bleu_metric: 36.41410562218426 +---------- +NL: 'determine whether string is singular or plural.', where '%s' is replaced with number. if not, +ref: else : +Output: else : +bleu_metric: 100.0 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: call the __init__ method from the base class of the JsonResponse class, called with arguments: content set to data, +ref: super ( JsonResponse , self ) . __init__ ( content = data , ** kwargs ) +Output: super ( jsonresponse, self ). _ _ init _ _ ( content = data, * * kwargs ) +bleu_metric: 57.703623574782 +---------- +NL: substitute arg converted into an integer for length. +ref: length = int ( arg ) +Output: length = int ( arg ) +bleu_metric: 100.0 +---------- +NL: call the method self.configure_logger with 3 arguments: name, value under name key of loggers dictionary and boolean True. +ref: self . configure_logger ( name , loggers [ name ] , True ) +Output: self. configure _ logger ( name, loggers [ name ], true ) +bleu_metric: 55.60336961016132 +---------- +NL: if start is greater than upto, +ref: if start > upto : +Output: if start > upto : : +bleu_metric: 74.00828044922852 +---------- +NL: define compile_messages method with self class instance and locations as a arguments. +ref: def compile_messages ( self , locations ) : +Output: def compile _ messages ( self, locations ) : +bleu_metric: 63.15552371794036 +---------- +NL: add app_config to excluded_apps set. +ref: excluded_apps . add ( app_config ) +Output: excluded _ apps. add ( app _ config ) +bleu_metric: 25.21193618434983 +---------- +NL: call the method self.represent_scalar with 2 arguments: string 'tag:yaml.org,2002:str' and data converted into a string, return the result. +ref: return self . represent_scalar ( 'tag:yaml.org,2002:str' , str ( data ) ) +Output: return self. represent _ paletter ('tag : yaml. doesn, str ( str ), str ) +bleu_metric: 38.40300380449626 +---------- +NL: known_models is an empty list. +ref: known_models = [ ] +Output: known _ models = [ ] +bleu_metric: 51.697315395717055 +---------- +NL: with '%s' substituted for name_str, as argument. run_syncdb is boolean False. +ref: run_syncdb = False +Output: run _ syncdb = false +bleu_metric: 27.301208627090666 +---------- +NL: derive the class PyLibMCCache from BaseMemcachedCache base class. +ref: class PyLibMCCache ( BaseMemcachedCache ) : +Output: class pylibmccache ( basememcachedcache ) : +bleu_metric: 21.606281467072083 +---------- +NL: import module re. +ref: import re +Output: import re +bleu_metric: 100.0 +---------- +NL: with all occurrences of '%s' replaced with app_name and model._meta.object_name, respectively. try, +ref: try : +Output: try : +bleu_metric: 100.0 +---------- +NL: substitute the results in a list for T. join elements of T in a bytes string, append first r elements of result of the call to the function F with an argument l to it, +ref: return b'' . join ( T ) + F ( l ) [ : r ] +Output: return b'\ n '. join ( b'\ n '. join ( f. join ( f ) ) ) +bleu_metric: 19.230188007838596 +---------- +NL: called with an argument lang_code is true, return lang_code. +ref: return lang_code +Output: return lang _ code +bleu_metric: 35.93041119630843 +---------- +NL: otherwise if level converted into a string equals level, +ref: elif str ( level ) == level : +Output: elif str ( level ) = = level : +bleu_metric: 100.0 +---------- +NL: self._raw_ipv6 is boolean False. +ref: self . _raw_ipv6 = False +Output: self. _ raw _ ipv6 = false +bleu_metric: 22.679164443904003 +---------- +NL: default_validators is a list with an element, return value of the validators.URLValidator method. +ref: default_validators = [ validators . URLValidator ( ) ] +Output: default _ validators = [ validators. urlvalidator ( ) ] +bleu_metric: 48.442732379638635 +---------- +NL: if value under the 'unique_id' key of the item dictionary is not None, +ref: if item [ 'unique_id' ] is not None : +Output: if item ['unique _ id'] is not none : +bleu_metric: 44.803042738802716 +---------- +NL: call the method formats.time_format with 2 arguments: value and arg, return the result. +ref: return formats . time_format ( value , arg ) +Output: return formats. date _ format ( value, arg ) +bleu_metric: 57.835698664651424 +---------- +NL: import module warnings. +ref: import warnings +Output: import warnings +bleu_metric: 100.0 +---------- +NL: derive the class ReferenceLocalTimezone from the tzinfo base class. +ref: class ReferenceLocalTimezone ( tzinfo ) : +Output: class referenceslocaltimezone ( tzinfo ) : +bleu_metric: 53.137468984124524 +---------- +NL: call the method self.clean with value as argument, substitute the result for cleaned. +ref: cleaned = self . clean ( value ) +Output: cleaned = self. clean ( value ) +bleu_metric: 100.0 +---------- +NL: from django.utils import six into default name space. +ref: from django . utils import six +Output: from django. utils import six +bleu_metric: 100.0 +---------- +NL: color_names is a tuple with 8 elements: strings 'black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan' and 'white'. +ref: color_names = ( 'black' , 'red' , 'green' , 'yellow' , 'blue' , 'magenta' , 'cyan' , 'white' ) +Output: color _ names = ('flush ','c ','latin ','white ','white ','white ', ' +bleu_metric: 29.369065387462108 +---------- +NL: if language_code is not contained in self._regex_dict, +ref: if language_code not in self . _regex_dict : +Output: if language _ code not in self. _ regex _ dict : +bleu_metric: 29.256127307315065 +---------- +NL: if the key doesnt exists substitute boolean False for self.ignore. define the method _make_parser with an argument self. +ref: def _make_parser ( self ) : +Output: def _ make _ parser ( self ) : +bleu_metric: 47.987820666906636 +---------- +NL: from django.core.exceptions import ValidationError into default name space. +ref: from django . core . exceptions import ValidationError +Output: from django. core. exceptions import validationerror +bleu_metric: 76.1894894736741 +---------- +NL: return instance. +ref: return instance +Output: return instance +bleu_metric: 100.0 +---------- +NL: if CONTEXT_SEPARATOR is contained in result, +ref: if CONTEXT_SEPARATOR in result : +Output: if context _ separator in result : +bleu_metric: 46.71379777282 +---------- +NL: substitute object for Iterator. +ref: Iterator = object +Output: iterator = object +bleu_metric: 70.71067811865474 +---------- +NL: if indent is true, +ref: if indent : +Output: if indent : : : : : : +bleu_metric: 29.847458960098226 +---------- +NL: define the method Z with an argument self. +ref: def Z ( self ) : +Output: def z ( self ) : +bleu_metric: 70.71067811865474 +---------- +NL: substitute current_app for self.current_app. +ref: self . current_app = current_app +Output: self. current _ app = current _ app +bleu_metric: 19.96019880774733 +---------- +NL: substitute second element of args for name. +ref: name = args [ 1 ] +Output: name = args [ 1 ] +bleu_metric: 100.0 +---------- +NL: html_class_attr is an empty string. +ref: html_class_attr = '' +Output: html _ class _ attr ='' +bleu_metric: 39.2814650900513 +---------- +NL: and lambda function with 2 arguments: self and other, resulting boolean False if self is lesser than other or self is equal to other, tuple with 2 elements: string '__le__', and lambda function with 2 arguments: self and other, resulting boolean True if self is lesser than other or self is equal to other, tuple with 2 elements: string '__ge__', and lambda function with 2 arguments: self and other, resulting boolean False if self is lesser than other, for '__lt__', list with 3 tuples: tuple with 2 elements: string '__ge__', and lambda function with 2 arguments: self and other, resulting boolean False if self is lesser than or equal to other, or self is equal to other, tuple with 2 elements: string '__lt__', and lambda function with 2 arguments: self and other, resulting boolean True if self is lesser than or equal to other, or self is not equal to other, tuple with 2 elements: string '__gt__', and lambda function with 2 arguments: self and other, resulting boolean False if self is lesser than or equal to other, for '__le__', list with 3 tuples: tuple with 2 elements: string '__lt__', and lambda function with 2 arguments: self and other, resulting boolean False if self is greater than other or self is equal to other, tuple with 2 elements: string '__ge__', and lambda function with 2 arguments: self and other, resulting boolean True if self is greater than other or self is equal to other, tuple with 2 elements: string '__le__', and lambda function with 2 arguments: self and other, resulting boolean False if self is greater than other, for '__gt__', and list with 3 tuples: tuple with 2 elements: string '__le__', and lambda function with 2 arguments: self and other, resulting boolean True if self is not greater than or is not equal to other, or self is equal to other, tuple with 2 elements: string '__gt__', and lambda function with 2 arguments: self and other, resulting boolean True if self is greater than or not equal to other, or self is not equal to other, tuple with 2 elements: string '__lt__', and lambda function with 2 arguments: self and other, resulting boolean False if self is greater than or equal to other, for '__ge__', convert cls to a dictionary, convert the result into a set and convert convert into a set, roots is a set of differences of the two previous sets. +ref: roots = set ( dir ( cls ) ) & set ( convert ) +Output: def _ _ init _ _ ( self ) : _ _ ( self ) : +bleu_metric: 9.50724412002623 +---------- +NL: from module __future__ import unicode_literals to default name space. +ref: from __future__ import unicode_literals +Output: from module _ _ future _ _ import unicode _ literals +bleu_metric: 12.605968092174912 +---------- +NL: import module sys. +ref: import sys +Output: import sys +bleu_metric: 100.0 +---------- +NL: define the function static with an argument request. +ref: def static ( request ) : +Output: def static ( request ) : +bleu_metric: 100.0 +---------- +NL: from django.utils import six into default name space. +ref: from django . utils import six +Output: from django. utils import six +bleu_metric: 100.0 +---------- +NL: derive the class DummyCache from the base class BaseCache. +ref: class DummyCache ( BaseCache ) : +Output: class dummycache ( basecache ) : +bleu_metric: 28.751742289713444 +---------- +NL: if attribute 'winerror' of object e is not equal to integer 32 and if 'errno' attribute is not equal to integer 13, +ref: if getattr ( e , 'winerror' , 0 ) != 32 and getattr ( e , 'errno' , 0 ) != 13 : +Output: if getattr ( e,'moderror ', an'errno')! = 13 : +bleu_metric: 34.97959219499332 +---------- +NL: from django.conf import settings into default name space. +ref: from django . conf import settings +Output: from django. conf import settings +bleu_metric: 100.0 +---------- +NL: want_unicode is boolean True. +ref: want_unicode = True +Output: want _ unicode = true +bleu_metric: 27.301208627090666 +---------- +NL: call the method self.copy_plural_forms with arguments: msgs and locale, substitute it for msgs. +ref: msgs = self . copy_plural_forms ( msgs , locale ) +Output: msgs = self. copy _ plural _ forms ( msgs, locale ) +bleu_metric: 53.070741098514354 +---------- +NL: call the function getattr with request, string 'LANGUAGE_CODE' and function get_language as arguments, +ref: cache_key += '.%s' % getattr ( request , 'LANGUAGE_CODE' , get_language ( ) ) +Output: language = getattr ( request,'language _ code ', get _ language ) +bleu_metric: 24.95750429986946 +---------- +NL: convert timeout into an integer, return it. +ref: return int ( timeout ) +Output: return int ( timeout ) +bleu_metric: 100.0 +---------- +NL: dest set to string 'load_initial_data', default set to boolean True, and help as a string 'Tells Django not to load any initial data after database synchronization.' call the method parser.add_argument with 3 arguments: string '--database', default set to DEFAULT_DB_ALIAS, +ref: parser . add_argument ( '--database' , default = DEFAULT_DB_ALIAS , help = 'Nominates a database to synchronize. Defaults to the "default" database.' ) +Output: parser. add _ argument ('- - database ', action ='store _ false ', dest ='database ', default = +bleu_metric: 31.820807491660812 +---------- +NL: self._fname is None. +ref: self . _fname = None +Output: self. _ fname = none +bleu_metric: 31.239399369202552 +---------- +NL: with new_class.__name__, '%(opt)s' is replaced with opt and '%(value)s' is replaced with value. raise an TypeError exception with an argument msg. +ref: raise TypeError ( msg ) +Output: raise typeerror ( msg ) +bleu_metric: 54.467618616059134 +---------- +NL: substitute the result for value under the 'To' key of msg dictionary. if self.cc is true, +ref: if self . cc : +Output: if self. cc : +bleu_metric: 100.0 +---------- +NL: for every k and v in return value of the ret.items function, +ref: for k , v in ret . items ( ) : +Output: for k, v in ret. items ( ) : +bleu_metric: 100.0 +---------- +NL: call the function mark_safe with an argument, elements of bits joined into a string, return the result. +ref: return mark_safe ( '' . join ( bits ) ) +Output: return mark _ safe ( bits ). join ( bits ) +bleu_metric: 41.60751652217845 +---------- +NL: call the method DjangoSafeDumper.add_representer with arguments decimal.Decimal and DjangoSafeDumper.represent_decimal. +ref: DjangoSafeDumper . add_representer ( decimal . Decimal , DjangoSafeDumper . represent_decimal ) +Output: djangosafedumper. add _ representer ( decimal. decimal, djangosafeder. represent _ decimal ) +bleu_metric: 17.694975149532556 +---------- +NL: slice the rawdata from i-th to the j-th element, replace with it '%r' in the string "bad end tag: %r", use it to call the method self.error. +ref: self . error ( "bad end tag: %r" % ( rawdata [ i : j ] , ) ) +Output: self. error = self. error [ i : - end tag : % r ] +bleu_metric: 28.31373628618124 +---------- +NL: define the method __exit__ with 4 arguments: self, exc_type, exc_value and traceback. +ref: def __exit__ ( self , exc_type , exc_value , traceback ) : +Output: def _ _ exit _ _ ( self, exc _ type, exc _ value, traceback ) : +bleu_metric: 28.479942163807365 +---------- +NL: for every k and v in return value of the extra_params.items method, join all results into a string separated by a string ', ', substitute it for field_desc. append string ')' to field_desc. +ref: field_desc += ')' +Output: field _ desc ='% s'% ( field _ params. items ( ) for k, v in self. get _ name ) +bleu_metric: 6.53559376048866 +---------- +NL: ctx is an hashlib object, for calculating hash function with md5 algorithm. +ref: ctx = hashlib . md5 ( ) +Output: ctx = hashlib ( hash4 ) +bleu_metric: 37.040566269530984 +---------- +NL: as long as current_chunk is not an empty string, +ref: while current_chunk != b'' : +Output: while current _ chunk : +bleu_metric: 18.94765350842885 +---------- +NL: if i is equal to integer 0, value under the 'first' key of the loop_dict dictionary is boolean True, otherwise it is False. +ref: loop_dict [ 'first' ] = ( i == 0 ) +Output: loop _ dict ['first'] = = 0 +bleu_metric: 47.01515527404618 +---------- +NL: method, substitute the result for file_name. get the value under the 'content-type' of the meta_data dictionary, if it exists assign it to content_type, content_type_extra, +ref: content_type , content_type_extra = meta_data . get ( 'content-type' , ( '' , { } ) ) +Output: content _ type, content _ type _ extra = content _ type. get ('content - type ', none ) +bleu_metric: 38.44730536773526 +---------- +NL: define the method pop with 3 arguments: self, k and unpacked list args. +ref: def pop ( self , k , * args ) : +Output: def pop ( self, k, * args ) : +bleu_metric: 100.0 +---------- +NL: called with with an argument lambda function which returns result of the force_text function called with an argument text. define the method add_truncation_text with 3 arguments: self, text and truncate set to None. +ref: def add_truncation_text ( self , text , truncate = None ) : +Output: def add _ truncate _ text ( self, text, truncate = none ) : +bleu_metric: 47.631009147745075 +---------- +NL: default set to DEFAULT_DB_ALIAS, help containing string 'Nominates a database to synchronize. Defaults to the "default" database.' as arguments. call the method parser.add_argument with string '--fake', action containing string 'store_true', dest set to string 'fake', +ref: parser . add_argument ( '--fake' , action = 'store_true' , dest = 'fake' , default = False , help = 'Mark migrations as run without actually running them' ) +Output: parser. add _ argument ('- - fake ', action ='store _ false ', dest ='interactive ', default = +bleu_metric: 38.184544452721504 +---------- +NL: chars is a string 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'. +ref: chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)' +Output: chars ='actiondefghijklmv7jklmnodeghijklmnodeghijklmnodeghijklmghi +bleu_metric: 1.224840593629011 +---------- +NL: substitute length of digittuple for digits. +ref: digits = len ( digittuple ) +Output: digits = len ( digittuple ) +bleu_metric: 100.0 +---------- +NL: __version__ is a string "0.1". +ref: __version__ = "0.1" +Output: _ _ version _ _ = " 0. 1 " +bleu_metric: 55.936849159330734 +---------- +NL: substitute max_expr for self.max_expr. +ref: self . max_expr = max_expr +Output: self. max _ expr = max _ expr +bleu_metric: 19.96019880774733 +---------- +NL: derive the class DeserializationError from the Exception base class. +ref: class DeserializationError ( Exception ) : +Output: class deserializationerror ( exception ) : +bleu_metric: 33.16700344765874 +---------- +NL: if autoescape is true, +ref: if autoescape : +Output: if autoescape : +bleu_metric: 100.0 +---------- +NL: define function force_bytes with s, encoding set to 'utf-8', strings_only set to False and errors set to 'strict' as arguments. +ref: def force_bytes ( s , encoding = 'utf-8' , strings_only = False , errors = 'strict' ) : +Output: def force _ bytes ( s, encoding ='utf - 8 ', strings _ only = false, errors ='strict') : +bleu_metric: 64.15716165879255 +---------- +NL: if VariableDoesNotExist exception is caught, +ref: except VariableDoesNotExist : +Output: except variabledoesnotexist : +bleu_metric: 24.002491458061357 +---------- +NL: call the method re.compile with 2 arguments: raw string """^(?: (?P (?P\d{1,3}(?:\.\d{1,3}){3}) |""" +ref: naiveip_re = re . compile ( r"""^(?: (?P (?P\d{1,3}(?:\.\d{1,3}){3}) | # IPv4 address (?P\[[a-fA-F0-9:]+\]) | # IPv6 address (?P[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*) # FQDN ):)?(?P\d+)$""" , re . X ) +Output: _ re = re. compile ( r " ^ ( ( (? : \ \ d { 1, 3 } ) ) { 0 } +bleu_metric: 1.1213206062676317 +---------- +NL: get the value under the self.name key of the self.form.initial dictionary, if it exists, substitute it for data, +ref: data = self . form . initial . get ( self . name , self . field . initial ) +Output: data = self. form. initial. get ( self. name, self. data ) +bleu_metric: 78.66181989145915 +---------- +NL: call the function signals.request_finished.connect with argument cache.close. +ref: signals . request_finished . connect ( cache . close ) +Output: signals. request _ finished. connect ( cache. close ) +bleu_metric: 64.50001140844255 +---------- +NL: return None. +ref: return None +Output: return none +bleu_metric: 75.98356856515926 +---------- +NL: return iterator object based on the self.file collection object. +ref: return iter ( self . file ) +Output: return iter ( self. file ) +bleu_metric: 100.0 +---------- +NL: substitute settings.MEDIA_URL for prefix. +ref: prefix = settings . MEDIA_URL +Output: prefix = settings. media _ url +bleu_metric: 51.697315395717055 +---------- +NL: join tmpdir and sting 'symlink' into a file path name, substitute it for symlink_path. +ref: symlink_path = os . path . join ( tmpdir , 'symlink' ) +Output: symlink _ path = os. path. join ( tmpinkr, symlinkink ', symlinkinks ) +bleu_metric: 42.794691107478805 +---------- +NL: define the method render with 2 arguments: self and context. +ref: def render ( self , context ) : +Output: def render ( self, context ) : +bleu_metric: 100.0 +---------- +NL: get the value under the 'use_natural_primary_keys' key of the options dictionary, substitute the result for use_natural_primary_keys. +ref: use_natural_primary_keys = options . get ( 'use_natural_primary_keys' ) +Output: use _ natural _ primary _ keys = options. get ('use _ natural _ primary _ keys') +bleu_metric: 29.456425448249245 +---------- +NL: define the method inner with 2 arguments: self and unpacked list args. +ref: def inner ( self , * args ) : +Output: def inner ( self, * args ) : +bleu_metric: 100.0 +---------- +NL: if '::' is not contained in ip_str and number of occurrences of ':' in ip_str is not equal to integer 7, +ref: if '::' not in ip_str and ip_str . count ( ':' ) != 7 : +Output: if':'not in ip _ str and ip _ str and len (':')! = 7 : +bleu_metric: 53.39293213731362 +---------- +NL: call the method parser.add_argument with 4 arguments: string 'args', metavar set to string 'app_label', nargs set to character'*', +ref: parser . add_argument ( 'args' , metavar = 'app_label' , nargs = '*' , help = 'Specify the app label(s) to create migrations for.' ) +Output: parser. add _ argument ('args ', metavar ='* ', nargs ='* ', help = ' +bleu_metric: 43.763965416048975 +---------- +NL: if django_po file path exists, +ref: if os . path . exists ( django_po ) : +Output: if not django _ po. exists ( ) : +bleu_metric: 31.7023313852343 +---------- +NL: call the function datetime.now, substitute the result to now. +ref: now = datetime . now ( ) +Output: now = datetime. now ( ) +bleu_metric: 100.0 +---------- +NL: called with an argument kw, only if v is not None, substitute the result for kw. substitute tzinfo for value under the 'tzinfo' key of the kw dictionary. +ref: kw [ 'tzinfo' ] = tzinfo +Output: kw ['tzinfo'] = tzinfo +bleu_metric: 100.0 +---------- +NL: raise an ValidationError with 2 arguments: dictionary self.error_messages value under the key 'list', +ref: raise ValidationError ( self . error_messages [ 'list' ] , code = 'list' ) +Output: raise validationerror ( self. error _ messages ['list'], code ='list') +bleu_metric: 68.48075777090853 +---------- +NL: derive the class AdminEmailHandler from logging.Handler base class. +ref: class AdminEmailHandler ( logging . Handler ) : +Output: class adima mailhandler ( logging. handler ) : +bleu_metric: 31.74567515536576 +---------- +NL: call the function select_template with 2 arguments: template_name, dirs, substitute the result for t. +ref: t = select_template ( template_name , dirs ) +Output: t = select _ template ( template _ name, dirs ) +bleu_metric: 31.61487584488943 +---------- +NL: if value is contained in self.empty_values and self.required is true, +ref: if value in self . empty_values and self . required : +Output: if value in self. empty _ values and self. required : +bleu_metric: 64.75445426291286 +---------- +NL: if TypeError exception is caught, +ref: except TypeError : +Output: except typeerror : : : +bleu_metric: 31.239399369202552 +---------- +NL: from io import BytesIO into default name space. +ref: from io import BytesIO +Output: from io import bytesio +bleu_metric: 52.08154731870476 +---------- +NL: define lambda function that returns self.file.tell field, use it as an argument for property function, put the result in tell. +ref: tell = property ( lambda self : self . file . tell ) +Output: tell = property ( lambda self : self. file. tell ) +bleu_metric: 100.0 +---------- +NL: skip this loop iteration. +ref: continue +Output: continue +bleu_metric: 100.0 +---------- +NL: call the method parser.delete_first_token. +ref: parser . delete_first_token ( ) +Output: parser. delete _ first _ token ( ) +bleu_metric: 27.901593935858266 +---------- +NL: 'EmailField', 'FileField', 'ImageField', 'URLField', 'BooleanField', 'NullBooleanField', 'ChoiceField', 'MultipleChoiceField', 'ComboField', 'MultiValueField', 'FloatField', 'DecimalField', 'SplitDateTimeField', 'IPAddressField', 'GenericIPAddressField', 'FilePathField', 'SlugField', 'TypedChoiceField', 'TypedMultipleChoiceField'. derive the class Field from the base class object. +ref: class Field ( object ) : +Output: class command ( value ) : +bleu_metric: 38.260294162784476 +---------- +NL: import fcntl. +ref: import fcntl +Output: import fcntl +bleu_metric: 100.0 +---------- +NL: if can_fail is true, +ref: if can_fail : +Output: if can _ fail : +bleu_metric: 31.239399369202552 +---------- +NL: if template_source_loaders is None, +ref: if template_source_loaders is None : +Output: if template _ source _ loaders is none : +bleu_metric: 18.850319022747346 +---------- +NL: substitute pattern._callback for callback. +ref: callback = pattern . _callback +Output: callback = pattern. _ callback +bleu_metric: 61.47881529512643 +---------- +NL: serialize set to boolean False, substitute the return value for db_name. call the method call_command with 3 arguments, string 'loaddata', unpacked list fixture_labels and unpacked dictionary containing 1 element: verbosity for 'verbosity'. +ref: call_command ( 'loaddata' , * fixture_labels , ** { 'verbosity' : verbosity } ) +Output: call _ command ('loaddata ', * * options ) +bleu_metric: 31.032238364799902 +---------- +NL: if value is None, +ref: if value is None : +Output: if value is none : +bleu_metric: 48.8923022434901 +---------- +NL: convert value to an integer, return it. +ref: return int ( value ) +Output: return int ( value ) +bleu_metric: 100.0 +---------- +NL: otherwise if '=' is contained in part, +ref: elif '=' in part : +Output: elif'='in part : +bleu_metric: 100.0 +---------- +NL: compare_to is an list with elements generated by calling the var.resolve method with 2 arguments: context and boolean True, +ref: compare_to = [ var . resolve ( context , True ) for var in self . _varlist ] +Output: compare _ to = [ var. resolve ( context, true ) for var in self. match ] +bleu_metric: 60.52665103345164 +---------- +NL: define the method to_python with arguments self and value. +ref: def to_python ( self , value ) : +Output: def to _ python ( self, value ) : +bleu_metric: 63.15552371794036 +---------- +NL: return the result. otherwise if value is an instance of decimal.Decimal, float or six.integer_types, +ref: elif isinstance ( value , ( decimal . Decimal , float ) + six . integer_types ) : +Output: elif isinstance ( value, decimal. decimal, float, six. integer _ types ) : +bleu_metric: 37.29661124266712 +---------- +NL: contextlib.contextmanager decorator, +ref: @ contextlib . contextmanager +Output: @ contextlib. contextmanager +bleu_metric: 100.0 +---------- +NL: if event.path ends with string '.mo', +ref: if event . path . endswith ( '.mo' ) : +Output: if event. path. endswith ( '. mo') : +bleu_metric: 100.0 +---------- +NL: if node.must_be_first is true and nodelist is true, +ref: if node . must_be_first and nodelist : +Output: if node. must _ be _ first and nodelist : +bleu_metric: 38.677062763523445 +---------- +NL: return boolean False. +ref: return False +Output: return false +bleu_metric: 75.98356856515926 +---------- +NL: and substitute the result for self.prefix. substitute auto_id for self.auto_id. +ref: self . auto_id = auto_id +Output: self. auto _ id = auto _ id +bleu_metric: 19.96019880774733 +---------- +NL: define the method rss_attributes with an argument self. +ref: def rss_attributes ( self ) : +Output: def rss _ attributes ( self ) : +bleu_metric: 53.7284965911771 +---------- +NL: call the function ungettext_lazy with 3 arguments: string 'Ensure this value has at most %(limit_value)d character (it has %(show_value)d), +ref: message = ungettext_lazy ( 'Ensure this value has at most %(limit_value)d character (it has %(show_value)d).' , 'Ensure this value has at most %(limit_value)d characters (it has %(show_value)d).' , 'limit_value' ) +Output: code = ungettext _ lazy ('ensure this value has at % ( limit _ value ) d % ( it hasattr ( show _ +bleu_metric: 6.0725158960512085 +---------- +NL: if PY3 field of module six is boolean True, +ref: if six . PY3 : +Output: if six. py3 : +bleu_metric: 48.8923022434901 +---------- +NL: for every k and v in result of the function six.iteritems,called with an argument self, +ref: return '{%s}' % ', ' . join ( '%r: %r' % ( k , v ) for k , v in six . iteritems ( self ) ) +Output: for k, v in six. iteritems ( self ) : +bleu_metric: 10.92152404168232 +---------- +NL: do nothing. +ref: pass +Output: pass +bleu_metric: 100.0 +---------- +NL: define the function b64_hmac with arguments salt, value and key. +ref: def base64_hmac ( salt , value , key ) : +Output: def b64 _ hmac ( salt, value, key ) : +bleu_metric: 69.30977286178778 +---------- +NL: delete _active.value. +ref: del _active . value +Output: del _ active. value +bleu_metric: 38.60973950960897 +---------- +NL: for every basedir in basedirs, +ref: for basedir in basedirs : +Output: for basedir in basedirs : +bleu_metric: 100.0 +---------- +NL: substitute the result for value under the field key of the self._errors dictionary. if not, +ref: else : +Output: else : +bleu_metric: 100.0 +---------- +NL: substitute result of the self.path function with argument name for full_path. +ref: full_path = self . path ( name ) +Output: full _ path = self. path ( name ) +bleu_metric: 71.02992180127423 +---------- +NL: if self.form.is_bound is false, +ref: if not self . form . is_bound : +Output: if not self. form. is _ bound : +bleu_metric: 57.06745777055999 +---------- +NL: delete value under the key key of dictionary at last element of self.dicts. +ref: del self . dicts [ - 1 ] [ key ] +Output: del self. dicts [ - 1 ] +bleu_metric: 66.68075193187639 +---------- +NL: call the method self.reader_leaves. +ref: self . reader_leaves ( ) +Output: self. reader _ leaves ( ) +bleu_metric: 35.49481056010052 +---------- +NL: call the re.compile function with 2 arguments: raw string "^(?:[a-z0-9\.\-]*)://(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+", +ref: regex = re . compile ( r'^(?:[a-z0-9\.\-]*)://' r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}(?= self . initial_form_count ( ) and i >= self . min_num : +Output: if i > = self. initial _ form _ count ( ) and not form. has _ changed ( ) : +bleu_metric: 31.011575752288344 +---------- +NL: get the integer representation of the first element of bs, return it. +ref: return ord ( bs [ 0 ] ) +Output: return b [ 0 ]. get ( ) +bleu_metric: 29.98221389342337 +---------- +NL: call the function is_ignored, with arguments: file_path and self.ignore_patterns, if it evaluates to true, +ref: if is_ignored ( file_path , self . ignore_patterns ) : +Output: if is _ ignored ( file _ path, self. ignore _ patterns ) : +bleu_metric: 20.706193828327603 +---------- +NL: if app_config.models_module is None or app_config is contained in excluded_apps, +ref: if app_config . models_module is None or app_config in excluded_apps : +Output: if app _ config. models _ module is none or app _ config in excluded _ apps : +bleu_metric: 10.273327819011904 +---------- +NL: return code. +ref: return code +Output: return code +bleu_metric: 100.0 +---------- +NL: chunks is a tuple containing 6 initial tuples: +ref: chunks = ( ( 60 * 60 * 24 * 365 , ungettext_lazy ( '%d year' , '%d years' ) ) , ( 60 * 60 * 24 * 30 , ungettext_lazy ( '%d month' , '%d months' ) ) , ( 60 * 60 * 24 * 7 , ungettext_lazy ( '%d week' , '%d weeks' ) ) , ( 60 * 60 * 24 , ungettext_lazy ( '%d day' , '%d days' ) ) , ( 60 * 60 , ungettext_lazy ( '%d hour' , '%d hours' ) ) , ( 60 , ungettext_lazy ( '%d minute' , '%d minutes' ) ) ) +Output: chunks = ( self, other, ) +bleu_metric: 1.2824192123437234e-05 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: substitute e for message. +ref: message = e +Output: message = e +bleu_metric: 100.0 +---------- +NL: can_delete for 'can_delete', min_num for 'min_num', max_num for 'max_num', absolute_max for 'absolute_max', validate_min for 'validate_min' for validate_max for 'validate_max'. create a class class which name is generated by converting 'FormSet' into a string and appending it to form.__name__, +ref: return type ( form . __name__ + str ( 'FormSet' ) , ( formset , ) , attrs ) +Output: self. _ _ name _ _ = ('formset ', max _ false = none ) +bleu_metric: 10.078082742188652 +---------- +NL: substitute value for rest. +ref: rest = value +Output: rest = value +bleu_metric: 100.0 +---------- +NL: raise an SuspiciousFileOperation exception with string "Attempted access to '%s' denied." as argument, replace '%s' with name. +ref: raise SuspiciousFileOperation ( "Attempted access to '%s' denied." % name ) +Output: raise suspiciousfileoperation ( " tried access to'% s'an. " % name ) +bleu_metric: 53.73493768619188 +---------- +NL: substitute SplitHiddenDateTimeWidget for hidden_widget. +ref: hidden_widget = SplitHiddenDateTimeWidget +Output: hidden _ widget = splithiddatetimewidget +bleu_metric: 18.30054742374001 +---------- +NL: for every node in compiled_parent.nodelist, +ref: for node in compiled_parent . nodelist : +Output: for node in compiled _ parent. nodelist : +bleu_metric: 46.92470064105599 +---------- +NL: if template_name is an instance of list or tuple types, +ref: if isinstance ( template_name , ( list , tuple ) ) : +Output: if isinstance ( template _ name, ( list, tuple ) ) : +bleu_metric: 67.39047062564734 +---------- +NL: define the get_str_from_wsgi function with environ, key and default as arguments. +ref: def get_str_from_wsgi ( environ , key , default ) : +Output: def get _ str _ from _ wsgi ( environ, key, default ) : +bleu_metric: 52.41705759002533 +---------- +NL: call the model.check method with unpacked dictionary kwargs for every model in return value of function apps.get_models, +ref: errors = [ model . check ( ** kwargs ) for model in apps . get_models ( ) if app_configs is None or model . _meta . app_config in app_configs ] +Output: model. check ( * * kwargs ) ( apps. get _ models ( model. check ( * * kwargs ) ) +bleu_metric: 26.863028662078126 +---------- +NL: define the method initial_form_count with an argument self. +ref: def initial_form_count ( self ) : +Output: def initial _ form _ count ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: define the method j with an argument self. +ref: def j ( self ) : +Output: def j ( self ) : +bleu_metric: 100.0 +---------- +NL: do nothing. +ref: pass +Output: pass +bleu_metric: 100.0 +---------- +NL: if format is not contained in _serializers, +ref: if format not in _serializers : +Output: if format not in _ serializers : +bleu_metric: 51.334504804017044 +---------- +NL: if length of tzinfo is greater than integer 3, convert elements of tzinfo from indexes 1 to 3 to an integer, +ref: offset_mins = int ( tzinfo [ - 2 : ] ) if len ( tzinfo ) > 3 else 0 +Output: tzinfo = int ( len ( tzinfo ) > 3 : 3 ) +bleu_metric: 34.22543411685356 +---------- +NL: return boolean False. +ref: return False +Output: return false +bleu_metric: 75.98356856515926 +---------- +NL: if content_type is false, +ref: if not content_type : +Output: if not content _ type : +bleu_metric: 30.739407647563223 +---------- +NL: with an argument curr, sort the result and join it in a list separated with blank spaces, print it to the standard output. otherwise if first element of cwords is contanied in subcommands and is not equal to string 'help', +ref: elif cwords [ 0 ] in subcommands and cwords [ 0 ] != 'help' : +Output: elif cwords [ 0 ] in subcommand! ='help': +bleu_metric: 55.996214927630014 +---------- +NL: return ip_str. +ref: return ip_str +Output: return ip _ str +bleu_metric: 35.93041119630843 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: derive the class HttpResponseForbidden from the HttpResponse base class. +ref: class HttpResponseForbidden ( HttpResponse ) : +Output: class httprespon hmorbidden ( httpresponse ) : +bleu_metric: 25.725069574826758 +---------- +NL: return. +ref: return +Output: return +bleu_metric: 100.0 +---------- +NL: append self to nodes. +ref: nodes . append ( self ) +Output: nodes. append ( self ) +bleu_metric: 100.0 +---------- +NL: save_as_new set to boolean False, prefix set to None, queryset set to None and unpacked dictionary kwargs. if instance is None, +ref: if instance is None : +Output: if instance is none : +bleu_metric: 48.8923022434901 +---------- +NL: split ip_str by ':', if last element of the result is not equal to hextet. +ref: if not ip_str . split ( ':' ) [ - 1 ] == hextet : +Output: if ip _ str. split (':')! = hextet +bleu_metric: 37.278620798646614 +---------- +NL: for every app_dir in app_dirs, +ref: for app_dir in app_dirs : +Output: for app _ dir in app _ dirs : +bleu_metric: 18.850319022747346 +---------- +NL: WARNING is integer 30. +ref: WARNING = 30 +Output: warning = 20 +bleu_metric: 53.7284965911771 +---------- +NL: call the method os.chdir with an argument our_home_dir. +ref: os . chdir ( our_home_dir ) +Output: os. chdir ( our _ home _ dir ) +bleu_metric: 36.46285861936466 +---------- +NL: call the method self.as_tuple with an argument value under 'mailhost' key of config dictionary, +ref: config [ 'mailhost' ] = self . as_tuple ( config [ 'mailhost' ] ) +Output: config ['mailhost'] = self. as _ tuple ( config ['mailhost'] ) +bleu_metric: 77.39321540474097 +---------- +NL: call the method copy.deepcopy with an argument self.widgets, substitute the result for obj.widgets. +ref: obj . widgets = copy . deepcopy ( self . widgets ) +Output: obj. widgets = copy. deepcopy ( self. widgets ) +bleu_metric: 100.0 +---------- +NL: and fileobj set to buf. read data from buf file stream, yield the result. +ref: yield buf . read ( ) +Output: yield buf. read ( ) +bleu_metric: 100.0 +---------- +NL: if self.regex is not an instance of six.string_types, +ref: if isinstance ( self . _regex , six . string_types ) : +Output: if isinstance ( self. regex, six. string _ types ) : +bleu_metric: 45.93073632354733 +---------- +NL: if timezone has an attribute 'normalize', +ref: if hasattr ( timezone , 'normalize' ) : +Output: if hasattr ( timezone,'normalize') : +bleu_metric: 100.0 +---------- +NL: from django.utils import termcolors into default name space. +ref: from django . utils import termcolors +Output: from django. utils import termcolors +bleu_metric: 100.0 +---------- +NL: if ssl.SSLError or smtplib.SMTPServerDisconnected exception occurred, +ref: except ( ssl . SSLError , smtplib . SMTPServerDisconnected ) : +Output: except ( ssl. sserror, smtplib. smtpverver ) : +bleu_metric: 43.78245806066047 +---------- +NL: replace '%s' in string 'ignoring file %s in %s\n' with filename and dirpath, write it to self.stdout. +ref: self . stdout . write ( 'ignoring file %s in %s\n' % ( filename , dirpath ) ) +Output: self. stdout. write ('ignoring file % s in % s \ n'% filename, dirpath ) +bleu_metric: 82.89896537302563 +---------- +NL: call the function module_to_dict with an argument global_settings, substitute it for default_settings. +ref: default_settings = module_to_dict ( global_settings ) +Output: default _ settings = module _ to _ dict ( global _ settings ) +bleu_metric: 12.300686288463773 +---------- +NL: call the method self.importer with an argument used. +ref: self . importer ( used ) +Output: self. importer ( used ) +bleu_metric: 100.0 +---------- +NL: define the function decorating_function with an argument user_function. +ref: def decorating_function ( user_function ) : +Output: def decorating _ function ( user _ function ) : +bleu_metric: 23.462350320527996 +---------- +NL: do nothing. +ref: pass +Output: pass +bleu_metric: 100.0 +---------- +NL: and code set to string 'list. substitute self.to_field_name, if true, for key, or if not, substitute string 'pk' for key. +ref: key = self . to_field_name or 'pk' +Output: key = self. to _ field _ name if key else'pk ' +bleu_metric: 35.864179742032526 +---------- +NL: for value under the key key of the cache dictionary. increment stats dictionary value under the MISSES key by integer 1. +ref: stats [ MISSES ] += 1 +Output: cache [ misses ] + = 1 +bleu_metric: 54.10822690539396 +---------- +NL: return boolean False. +ref: return False +Output: return false +bleu_metric: 75.98356856515926 +---------- +NL: from django.utils import six into default name space. +ref: from django . utils import six +Output: from django. utils import six +bleu_metric: 100.0 +---------- +NL: if self.is_reversed is true, +ref: if self . is_reversed : +Output: if self. is _ reversed : +bleu_metric: 35.49481056010052 +---------- +NL: call the method text.splitlines with an argument boolean True, for every line in the result, +ref: for line in text . splitlines ( True ) : +Output: for line in text. splitlines ( true ) : +bleu_metric: 73.48889200874657 +---------- +NL: return value. +ref: return value +Output: return value +bleu_metric: 100.0 +---------- +NL: return self.forms element at the index index. +ref: return self . forms [ index ] +Output: return self. forms [ index ] +bleu_metric: 100.0 +---------- +NL: if path is an instance of six.string_types, +ref: if isinstance ( path , six . string_types ) : +Output: if isinstance ( path, six. string _ types ) : +bleu_metric: 61.626070997295855 +---------- +NL: all_models is an empty list. +ref: all_models = [ ] +Output: all _ models = [ ] +bleu_metric: 51.697315395717055 +---------- +NL: call the method self.add_truncation_text with 2 arguments: an empty string and truncate, substitute it for truncate_text. +ref: truncate_text = self . add_truncation_text ( '' , truncate ) +Output: truncate _ text = self. add _ truncation _ text ('', truncate ) +bleu_metric: 43.931603696853834 +---------- +NL: help is a string "Prints the SQL statements for the named migration." +ref: help = "Prints the SQL statements for the named migration." +Output: help = " prints the sql statements for the named migration. " +bleu_metric: 66.06328636027614 +---------- +NL: initial is an empty list. +ref: initial = [ ] +Output: initial = [ ] +bleu_metric: 100.0 +---------- +NL: replace every occurrence of arg is value for an empty string, substitute the result for value. +ref: value = value . replace ( arg , '' ) +Output: value = b''. replace ( arg,'' ) +bleu_metric: 67.29864884660303 +---------- +NL: call the httpd_cls function with 4 arguments: server_address, WSGIRequestHandler and ipv6 set to ipv6, substitute the result for httpd. +ref: httpd = httpd_cls ( server_address , WSGIRequestHandler , ipv6 = ipv6 ) +Output: httpd = httpd _ cls ( server _ address, wsgirequesthandler, ipv6 = ipv6 ) +bleu_metric: 38.053710786825434 +---------- +NL: _urllib_request_moved_attributes is an list with 33 elements, all of them are the results of the call to the function MovedAttribute with 3 different string arguments. +ref: _urllib_request_moved_attributes = [ MovedAttribute ( "urlopen" , "urllib2" , "urllib.request" ) , MovedAttribute ( "install_opener" , "urllib2" , "urllib.request" ) , MovedAttribute ( "build_opener" , "urllib2" , "urllib.request" ) , MovedAttribute ( "pathname2url" , "urllib" , "urllib.request" ) , MovedAttribute ( "url2pathname" , "urllib" , "urllib.request" ) , MovedAttribute ( "getproxies" , "urllib" , "urllib.request" ) , MovedAttribute ( "Request" , "urllib2" , "urllib.request" ) , MovedAttribute ( "OpenerDirector" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPDefaultErrorHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPRedirectHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPCookieProcessor" , "urllib2" , "urllib.request" ) , MovedAttribute ( "ProxyHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "BaseHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPPasswordMgr" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPPasswordMgrWithDefaultRealm" , "urllib2" , "urllib.request" ) , MovedAttribute ( "AbstractBasicAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPBasicAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "ProxyBasicAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "AbstractDigestAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPDigestAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "ProxyDigestAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPSHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "FileHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "FTPHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "CacheFTPHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "UnknownHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPErrorProcessor" , "urllib2" , "urllib.request" ) , MovedAttribute ( "urlretrieve" , "urllib" , "urllib.request" ) , MovedAttribute ( "urlcleanup" , "urllib" , "urllib.request" ) , MovedAttribute ( "URLopener" , "urllib" , "urllib.request" ) , MovedAttribute ( "FancyURLopener" , "urllib" , "urllib.request" ) , MovedAttribute ( "proxy_bypass" , "urllib" , "urllib.request" ) , ] +Output: _ urllib _ request _ moved _ attributes = [ movedattribute ( " url. ", " urllib ", +bleu_metric: 2.960747116151514e-11 +---------- +NL: define the method empty_form with an argument self. +ref: def empty_form ( self ) : +Output: def empty _ form ( self ) : +bleu_metric: 53.7284965911771 +---------- +NL: define the method handle with 3 arguments: self, unpacked list args and unpacked dictionary options. +ref: def handle ( self , * args , ** options ) : +Output: def handle ( self, * args, * * options ) : +bleu_metric: 100.0 +---------- +NL: substitute first args for other_dict. +ref: other_dict = args [ 0 ] +Output: other _ dict = first + args +bleu_metric: 20.556680845025983 +---------- +NL: get the value under the 'filename' key of the params dictionary, if it is true, +ref: if params . get ( 'filename' ) : +Output: if params ['filename'] : +bleu_metric: 28.422022424918996 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: raise an TemplateSyntaxError exception with an argument string "'%s' is not a valid tag library: %s", +ref: raise TemplateSyntaxError ( "'%s' is not a valid tag library: %s" % ( taglib , e ) ) +Output: raise templatesyntaxerror ( "'% s'is not a valid tag library : % s " % ( taglib, e ) +bleu_metric: 80.33426736579753 +---------- +NL: _translations dictionary value, under the language key is an instance of DjangoTranslation class, created with an argument language. +ref: _translations [ language ] = DjangoTranslation ( language ) +Output: _ translations [ language ] = djangotranslation ( language ) +bleu_metric: 53.107253497886994 +---------- +NL: substitute i-th element of subject for c. +ref: c = subject [ i ] +Output: c = subject [ i ] +bleu_metric: 100.0 +---------- +NL: substitute the list of results for values. return an instance of a class IfChangedNode, created with 3 arguments: nodelist_true, nodelist_false and unpacked list values. +ref: return IfChangedNode ( nodelist_true , nodelist_false , * values ) +Output: return ifchangednode ( nodelist _ true, nodelist _ false, * values ) +bleu_metric: 33.34477432809602 +---------- +NL: from django.core.management.base import BaseCommand and CommandError into default name space. +ref: from django . core . management . base import BaseCommand , CommandError +Output: from django. core. management. base import basecommand, commanderror +bleu_metric: 63.81812949054447 +---------- +NL: _version is a string "0.91". +ref: _version = "0.91" +Output: _ version = " 0.sy " +bleu_metric: 45.18010018049224 +---------- +NL: finally perform, +ref: finally : +Output: finally : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: join tempdir and guessed_filename into a file path, substitute it for guessed_path. +ref: guessed_path = path . join ( tempdir , guessed_filename ) +Output: guessed _ path = os. path. join ( tempdir, guessed _ filename ) +bleu_metric: 37.15770152515523 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: reverse order of parts, join them into a string, separated with '.', substitute the result for value. +ref: value = '.' . join ( reversed ( parts ) ) +Output: value = '. '. join ( reversed ( parts ) ) +bleu_metric: 100.0 +---------- +NL: define the method __init__ with an argument self. +ref: def __init__ ( self ) : +Output: def _ _ init _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: derive the class RssUserland091Feed from the RssFeed base class. +ref: class RssUserland091Feed ( RssFeed ) : +Output: class rssen0end1feed ( rssfeed ) : +bleu_metric: 28.751742289713444 +---------- +NL: join dirpath and filename into a path separated by '/', append it to new_filenames. +ref: new_filenames . append ( os . path . join ( dirpath , filename ) ) +Output: new _ filenames. append ( os. path. join ( dirpath, filename ) ) +bleu_metric: 82.77932960330119 +---------- +NL: usage set to return value of the method self.usage called with an argument subcommand, version set to return value of the method self.get_version. call the method parser.add_option with 8 arguments: string '-v', string '--verbosity', action set to string 'store', +ref: parser . add_option ( '-v' , '--verbosity' , action = 'store' , dest = 'verbosity' , default = '1' , type = 'choice' , choices = [ '0' , '1' , '2' , '3' ] , help = 'Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output' ) +Output: parser. add _ argument ('- v ', action ='store _ false ', dest ='interactive ', default = default _ +bleu_metric: 7.044998545388448 +---------- +NL: substitute settings.ROOT_URLCONF for urlconf. +ref: urlconf = settings . ROOT_URLCONF +Output: urlconf = settings. root _ urlconf +bleu_metric: 51.697315395717055 +---------- +NL: return a list containing an empty string and a list containing an empty list. +ref: return [ '' ] , [ [ ] ] +Output: return ['' ], [ ] +bleu_metric: 68.50518162018632 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: skip this loop iteration. +ref: continue +Output: continue +bleu_metric: 100.0 +---------- +NL: define the function dec with an argument func. +ref: def dec ( func ) : +Output: def dec ( func ) : +bleu_metric: 100.0 +---------- +NL: if old_attr is None, +ref: if old_attr is None : +Output: if old _ attr is none : +bleu_metric: 23.9802967618271 +---------- +NL: call the function forbid_multi_line_headers with 3 arguments: name, val and self.encoding, substitute the result for name and val, respectively. +ref: name , val = forbid_multi_line_headers ( name , val , self . encoding ) +Output: name, val = forbid _ multi _ line _ headers ( name, val, self. encoding ) +bleu_metric: 57.58522372341493 +---------- +NL: derive the class Input from the Widget base class. +ref: class Input ( Widget ) : +Output: class input ( widget ) : +bleu_metric: 38.260294162784476 +---------- +NL: call the method handler.startElement with 2 arguments: string "channel" and result of the method self.root_attributes. +ref: handler . startElement ( "channel" , self . root_attributes ( ) ) +Output: handler. startelement ( " channel ", self. root _ attributes ( ) ) +bleu_metric: 56.325794000904196 +---------- +NL: opts is a tuple created out of elements s, for every s in styles is s is in the keys of the opt_dict dictionary. +ref: opts = tuple ( s for s in styles if s in opt_dict . keys ( ) ) +Output: opts = ( s. get ( s ) for s in opt _ dict ) +bleu_metric: 19.442436308512338 +---------- +NL: call the function warnings.warn with 2 arguments: "django.utils.tzinfo.FixedOffset will be removed in Django 1.9. " +ref: warnings . warn ( "django.utils.tzinfo.FixedOffset will be removed in Django 1.9. " "Use django.utils.timezone.get_fixed_timezone instead." , RemovedInDjango19Warning ) +Output: warnings. warn ( " django. utils. tzinfo. fixedoffset will be removed in django 1. 9. ", +bleu_metric: 36.08824961464127 +---------- +NL: self.fixture_object_count is integer 0. +ref: self . fixture_object_count = 0 +Output: self. fixture _ object _ count = 0 +bleu_metric: 23.356898886410004 +---------- +NL: add self.form.required_css_class to extra_classes set. +ref: extra_classes . add ( self . form . required_css_class ) +Output: extra _ classes. add ( self. form. required _ css _ class ) +bleu_metric: 42.51768826212766 +---------- +NL: from django.utils import six into default name space. +ref: from django . utils import six +Output: from django. utils import six +bleu_metric: 100.0 +---------- +NL: divide num_entries by self._cull_frequency, convert the result to an integer, call the random.sample function with filelist and previous result as arguments, substitute the result for filelist. +ref: filelist = random . sample ( filelist , int ( num_entries / self . _cull_frequency ) ) +Output: filelist = int ( filelist, file. date ( filem _ entries = int ( self. _ cull _ frequency ) ) ) +bleu_metric: 16.80593690472034 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: into a file path, substitute it for new_path. if new_path file path exists, +ref: if path . exists ( new_path ) : +Output: if os. path. exists ( new _ path ) : +bleu_metric: 36.61926362999429 +---------- +NL: derive the class Lexer form the base class object. +ref: class Lexer ( object ) : +Output: class lexer ( object ) : +bleu_metric: 70.71067811865474 +---------- +NL: substitute value under the NON_FIELD_ERRORS key of opts.error_messages dictionary for error_messages. +ref: error_messages = opts . error_messages [ NON_FIELD_ERRORS ] +Output: error _ messages = opts. error _ messages [ non _ field _ errors ] +bleu_metric: 16.61742929957894 +---------- +NL: substitute table for self._table. +ref: self . _table = table +Output: self. _ table = table table +bleu_metric: 30.739407647563223 +---------- +NL: call the function _trans.to_locale with an argument language, return the result. +ref: return _trans . to_locale ( language ) +Output: return _ trans. to _ locale ( language ) +bleu_metric: 34.48444257953326 +---------- +NL: call the method tempfile.mkdtemp with 2 arguments: prefix set to prefix, suffix set to string '_extract', substitute the result for tempdir. +ref: tempdir = tempfile . mkdtemp ( prefix = prefix , suffix = '_extract' ) +Output: tempdir = tempfile. mkt ( prefix, suffix ='_ extract') +bleu_metric: 49.24126861431604 +---------- +NL: create a tuple out a tuple with an element integer 2037 and a list tt elements without the first element, substitute the result for tt. +ref: tt = ( 2037 , ) + tt [ 1 : ] +Output: tt = ( 3006, [ : - tt ] ) +bleu_metric: 22.91212954762419 +---------- +NL: if Exception, renamed to e, exception is caught, +ref: except Exception as e : +Output: except exception as e : : +bleu_metric: 41.11336169005197 +---------- +NL: define the method __iter__ with an argument self. +ref: def __iter__ ( self ) : +Output: def _ _ iter _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: call the function os.chmod with arguments full_path and self.file_permissions_mode. +ref: os . chmod ( full_path , self . file_permissions_mode ) +Output: os. chmod ( full _ path, self. file _ permissions _ mode ) +bleu_metric: 29.550432371218754 +---------- +NL: for every fname in return value of the glob.glob1 function called with 2 arguments: self._dir and , +ref: filelist = [ os . path . join ( self . _dir , fname ) for fname in glob . glob1 ( self . _dir , '*%s' % self . cache_suffix ) ] +Output: for fname in glob. glob1 ( self. _ dir, none ) : +bleu_metric: 14.714364493952854 +---------- +NL: for every log in existing, +ref: for log in existing : +Output: for log in existing : : : : +bleu_metric: 56.23413251903491 +---------- +NL: for every app_label in app_labels, +ref: for app_label in app_labels : +Output: for app _ label in app _ labels : +bleu_metric: 18.850319022747346 +---------- +NL: call the fastcgi_help function with an argument string "Invalid combination of host, port, socket.", return it. +ref: return fastcgi_help ( "Invalid combination of host, port, socket." ) +Output: return fastcgi _ help ( " invalid * of host, port, socket. " ) +bleu_metric: 58.75766810867468 +---------- +NL: if not evaluate the method self.form.error_class and return the result. define the method as_widget with 4 arguments: self, widget set to None, attrs set to None, only_initial set to boolean False. +ref: def as_widget ( self , widget = None , attrs = None , only_initial = False ) : +Output: def as _ widget ( self, widget = none, attrs = none, only _ initial = false ) : +bleu_metric: 31.24325727595954 +---------- +NL: return nothing. +ref: return +Output: return +bleu_metric: 100.0 +---------- +NL: SINGLE_BRACE_END is a string '}'. +ref: SINGLE_BRACE_END = '}' +Output: single _ brace _ end ='} ' +bleu_metric: 46.17366309441026 +---------- +NL: use the result as an argument for function call of force_bytes, use the result as an argument for calling the method hashlib.md5, put the result in url. substitute the '%s' in string 'views.decorators.cache.cache_header.%s.%s' with key_prefix and result of the function call, +ref: cache_key = 'views.decorators.cache.cache_header.%s.%s' % ( key_prefix , url . hexdigest ( ) ) +Output: @ options. cache. cache _ header. % s. % s ( key _ prefix, self. name, key ) +bleu_metric: 27.459491062188988 +---------- +NL: substitute the result for value under the 'clear_checkbox_name' key of the substitutions dictionary. call the function conditional_escape with an argument checkbox_id, +ref: substitutions [ 'clear_checkbox_id' ] = conditional_escape ( checkbox_id ) +Output: options = conditional _ escape ( checkbox _ id ) +bleu_metric: 15.553014371537452 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: if self.interactive is true, +ref: if self . interactive : +Output: if self. interactive : +bleu_metric: 100.0 +---------- +NL: call the function safe_join with 2 arguments template_dir and template_name, yield the result. +ref: yield safe_join ( template_dir , template_name ) +Output: yield safe _ join ( template _ dir, template _ name ) +bleu_metric: 13.834368456410944 +---------- +NL: if delta is smaller than integer 0. +ref: if delta < 0 : +Output: if delta < 0 : +bleu_metric: 100.0 +---------- +NL: define the method error with arguments self and message. +ref: def error ( self , message ) : +Output: def error ( self, message ) : +bleu_metric: 100.0 +---------- +NL: return template_name. +ref: return template_name +Output: return template _ name +bleu_metric: 35.93041119630843 +---------- +NL: define the method update_watch with sender defaulting to None and dictionary pair of elements kwargs. +ref: def update_watch ( sender = None , ** kwargs ) : +Output: def update _ watch ( sender = none, * * kwargs ) : +bleu_metric: 54.23782837718303 +---------- +NL: It looks like this project was generated using Django 1.5 or earlier. You should ensure your tests are all running & behaving as expected. See https://docs.djangoproject.com/en/dev/releases/1.6/#new-test-runner for more information.", obj set to None and id set to a string '1_6.W001', put the result into a list and return it. if not, +ref: else : +Output: else : else : +bleu_metric: 50.813274815461476 +---------- +NL: call the method self.var2.resolve with 2 arguments: context and boolean True, substitute the result for val2. +ref: val2 = self . var2 . resolve ( context , True ) +Output: val1 = self. var2. resolve ( context, true ) +bleu_metric: 72.72454093000141 +---------- +NL: derive the class NullBooleanSelect from the Select base class. +ref: class NullBooleanSelect ( Select ) : +Output: class nullbooleanselect ( select ) : +bleu_metric: 28.751742289713444 +---------- +NL: if value is not an instance of bytes or six.text_type classes, +ref: if not isinstance ( value , ( bytes , six . text_type ) ) : +Output: if not isinstance ( value, bytes, six. text _ type ) : +bleu_metric: 57.3057404379869 +---------- +NL: call the method parser.add_argument with 5 arguments: string '--noinput', action set to string 'store_false', +ref: parser . add_argument ( '--noinput' , action = 'store_false' , dest = 'interactive' , default = True , help = 'Tells Django to NOT prompt the user for input of any kind.' ) +Output: parser. add _ argument ('- - noinput ', action ='store _ false ', help ='interactive ', default +bleu_metric: 32.11617044280778 +---------- +NL: return default. +ref: return default +Output: return default +bleu_metric: 100.0 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: msguniq_options is an list with elements: string '--to-code=utf-8'. +ref: msguniq_options = [ '--to-code=utf-8' ] +Output: msguniq _ options = ['- - to - code = utf - 8'] +bleu_metric: 82.77932960330119 +---------- +NL: if self.locale_paths is true, +ref: if self . locale_paths : +Output: if self. locale _ paths : +bleu_metric: 35.49481056010052 +---------- +NL: call the get_complete_version with an argument version, store the result in version. +ref: version = get_complete_version ( version ) +Output: version = get _ complete _ version ( version ) version +bleu_metric: 25.21193618434983 +---------- +NL: called with 3 arguments: raw string '[^a-zA-Z0-9]', empty string and result of the method table_name.title. strip_prefix is a lambda function with an argument s, return value is s without the first element if s starts with string 'u'', +ref: strip_prefix = lambda s : s [ 1 : ] if s . startswith ( "u'" ) else s +Output: strip _ prefix = lambda s : ['u'] if s : self. strip _ prefix ( ) is not none else s : ' +bleu_metric: 21.814199626901996 +---------- +NL: ns is a string "http://www.w3.org/2005/Atom". +ref: ns = "http://www.w3.org/2005/Atom" +Output: ns = " http : / / w3. interactive / one / atom " +bleu_metric: 44.75989819100752 +---------- +NL: in not, +ref: else : +Output: else : : : +bleu_metric: 42.728700639623405 +---------- +NL: join app_config.path and string 'fixtures' into a valid file path, substitute it for app_dir. +ref: app_dir = os . path . join ( app_config . path , 'fixtures' ) +Output: app _ dir = os. path. join ( app _ config. path,'fixtures') +bleu_metric: 62.55340042200862 +---------- +NL: from gzip import GzipFile into default name space. +ref: from gzip import GzipFile +Output: from gzip import gzipfile +bleu_metric: 52.08154731870476 +---------- +NL: self.active_writers is an integer 0. +ref: self . active_writers = 0 +Output: self. active _ writers = 0 +bleu_metric: 30.739407647563223 +---------- +NL: raise an ValueError exception with an argument string "Negative base36 conversion input.". +ref: raise ValueError ( "Negative base36 conversion input." ) +Output: raise valueerror ( " - base36 input input. " ) +bleu_metric: 41.64017982897543 +---------- +NL: define the method __eq__ with an argument self. +ref: def __eq__ ( self , other ) : +Output: def _ _ eq _ _ ( self ) : +bleu_metric: 26.202510071732632 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: find the first subgroup of the matched string from the match object, convert it to lowercase, substitute it for tag and self.lasttag. +ref: self . lasttag = tag = match . group ( 1 ) . lower ( ) +Output: tag, self. lasttag = match. group ( 1 ). lower ( ) +bleu_metric: 83.94327083733336 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: substitute settings.SECRET_KEY for secret. +ref: secret = settings . SECRET_KEY +Output: secret = settings. secret _ key +bleu_metric: 51.697315395717055 +---------- +NL: remove the elements from the 'name' and 'dictionary' keys of the options dictionary, substitute them for project_name and target, respectively. +ref: project_name , target = options . pop ( 'name' ) , options . pop ( 'directory' ) +Output: project _ name, target = options. get ('name ', { } ) +bleu_metric: 33.37648814072918 +---------- +NL: call the function logging.getLogger with string 'django.request' as the argument, assign the return object handle to logger. +ref: logger = logging . getLogger ( 'django.request' ) +Output: logger = logging. getlogger ('django. request') +bleu_metric: 72.46037029655587 +---------- +NL: call the function tempfile.mkdtemp, substitute the result for tmpdir. +ref: tmpdir = tempfile . mkdtemp ( ) +Output: tmpdir = tempfile. mktp ( ) +bleu_metric: 59.69491792019645 +---------- +NL: define the function handle_m2m with an argument value, +ref: def handle_m2m ( value ) : +Output: def handle _ m2m ( value ) : +bleu_metric: 53.7284965911771 +---------- +NL: if ImportError, renamed to e, is caught, +ref: except ImportError as e : +Output: except importerror as e : except : +bleu_metric: 35.49481056010052 +---------- +NL: write string " No optimizations possible." to self.stdout stream. +ref: self . stdout . write ( " No optimizations possible." ) +Output: self. stdout. write ( " no forms false. " ) +bleu_metric: 64.75445426291286 +---------- +NL: use the result as an argument for the call to the add_move function. call the function MovedModule with 2 arguments: strings "_thread" and "thread", +ref: add_move ( MovedModule ( "_thread" , "thread" ) ) +Output: movedmodule ( " _ thread ", " thread " ). add _ thread ( thread, " thread +bleu_metric: 31.420504922717058 +---------- +NL: get the value under the key 'locale' of the options dictionary, substitute it for locale. +ref: locale = options . get ( 'locale' ) +Output: locale = options. get ('locale') +bleu_metric: 100.0 +---------- +NL: get the value under the key key of the self.cookies dictionary, call the cookie_date function with an argument: +ref: self . cookies [ key ] [ 'expires' ] = cookie_date ( time . time ( ) + max_age ) +Output: self. cookies [ key ] = cookie _ date ('enter a list not a to. get ( value ) ) +bleu_metric: 28.598266033267304 +---------- +NL: if f is an instance of models.FileField, +ref: if isinstance ( f , models . FileField ) : +Output: if isinstance ( f, models. filefield ) : +bleu_metric: 67.10275993197631 +---------- +NL: call the function os.unlink with an argument work_file. +ref: os . unlink ( work_file ) +Output: os. unlink ( work _ file ) +bleu_metric: 45.18010018049224 +---------- +NL: call the function re.compile with an argument raw string "^\s*blocktrans(\s+.*context\s+((?:"[^"]*?")|(?:'[^']*?')))?(?:\s+|$)", +ref: block_re = re . compile ( r"""^\s*blocktrans(\s+.*context\s+((?:"[^"]*?")|(?:'[^']*?')))?(?:\s+|$)""" ) +Output: _ _ re = re. compile ( r " ^ \ s * blocktrans ( ( ( ( (? : [ ^'] * +bleu_metric: 15.503586236663747 +---------- +NL: import module time as _time. +ref: import time as _time +Output: import time as _ time +bleu_metric: 50.813274815461476 +---------- +NL: raise an CommandError exception with an argument string "Django doesn't know which syntax to use for your SQL statements,\n" +ref: raise CommandError ( "Django doesn't know which syntax to use for your SQL statements,\n" + "because you haven't properly specified the ENGINE setting for the database.\n" + "see: https://docs.djangoproject.com/en/dev/ref/settings/#databases" ) +Output: raise commanderror ( " django doesn't tell be syntax to use your sql statements, \ n " " \ n " ) +bleu_metric: 7.2362868522331425 +---------- +NL: if self.verbosity is greater than integer 0, +ref: if self . verbosity > 0 : +Output: if self. verbosity > 0 : +bleu_metric: 100.0 +---------- +NL: define the method delete with 3 arguments: self, key, and version set to None. +ref: def delete ( self , key , version = None ) : +Output: def delete ( self, key, version = none ) : +bleu_metric: 78.25422900366436 +---------- +NL: if representative is None, +ref: if representative is None : +Output: if representative is none : +bleu_metric: 48.8923022434901 +---------- +NL: substitute language for self.language. +ref: self . language = language +Output: self. language = language +bleu_metric: 100.0 +---------- +NL: substitute callable for callable. +ref: callable = callable +Output: callable = callable +bleu_metric: 100.0 +---------- +NL: substitute _iteritems for iteritems. +ref: iteritems = _iteritems +Output: iteritems = _ iteritems +bleu_metric: 47.28708045015878 +---------- +NL: skip this loop iteration. +ref: continue +Output: continue +bleu_metric: 100.0 +---------- +NL: syear is a string "%04d" formated with dt.year. +ref: syear = "%04d" % ( dt . year , ) +Output: sy escaped = " % 02d " % dt. year +bleu_metric: 26.015411146845064 +---------- +NL: call the method re.match with 2 arguments: naiveip_re and value under the 'addrport' key of the options dictionary, substitute the result for m. +ref: m = re . match ( naiveip_re , options [ 'addrport' ] ) +Output: m = re. match ( options. match ('addrport ', options ) ) +bleu_metric: 43.5949382480739 +---------- +NL: if template is an instance of list or tuple types, +ref: if isinstance ( template , ( list , tuple ) ) : +Output: if isinstance ( template, ( list, tuple ) ) : +bleu_metric: 100.0 +---------- +NL: define the method __exit__ with self, exc_type, exc_value and tb as arguments. +ref: def __exit__ ( self , exc_type , exc_value , tb ) : +Output: def _ _ exit _ _ ( self, exc _ type, exc _ value, tb ) : +bleu_metric: 28.479942163807365 +---------- +NL: yield string "from __future__ import unicode_literals" as the result. +ref: yield "from __future__ import unicode_literals" +Output: yield " from _ _ future _ _ import unicode _ literals " +bleu_metric: 20.333448190047886 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: if timeout is None, +ref: if timeout is None : +Output: if timeout is none : +bleu_metric: 48.8923022434901 +---------- +NL: define the method end_serialization with an argument self. +ref: def end_serialization ( self ) : +Output: def end _ serialization ( self ) : +bleu_metric: 53.7284965911771 +---------- +NL: if att_name equals string 'id' and extra_params equals a dictionary with 1 entry: boolean True for 'primary_key', +ref: if att_name == 'id' and extra_params == { 'primary_key' : True } : +Output: if att _ name = ='id'and extra _ params = {'primary _ key': true } +bleu_metric: 32.141105530539434 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: call the method parser.add_argument with 4 arguments: string '--plain', action set to string 'store_true', dest as a string 'plain', +ref: parser . add_argument ( '--plain' , action = 'store_true' , dest = 'plain' , help = 'Tells Django to use plain Python, not IPython or bpython.' ) +Output: parser. add _ argument ('- - plain ', action ='store _ true ', dest ='interactive ', default = +bleu_metric: 34.44992856244685 +---------- +NL: derive the class DisallowedRedirect from the SuspiciousOperation base class. +ref: class DisallowedRedirect ( SuspiciousOperation ) : +Output: class disallowedredirect ( suspiciousoperation ) : +bleu_metric: 28.751742289713444 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: raise an CommandError with an argument string "You must supply at least one app label when using --empty.". +ref: raise CommandError ( "You must supply at least one app label when using --empty." ) +Output: raise commanderror ( " you must provide at at least one app label is warnings - - empty. " ) +bleu_metric: 49.589842324123026 +---------- +NL: i is integer 0. +ref: i = 0 +Output: i = 0 +bleu_metric: 100.0 +---------- +NL: substitute the result for value under the 'input' key of the substitutions dictionary. if value is true and value has an attribute 'url', +ref: if value and hasattr ( value , "url" ) : +Output: if value and hasattr ( value,'url') : +bleu_metric: 100.0 +---------- +NL: call the method self.validate_key with argument key. +ref: self . validate_key ( key ) +Output: self. validate _ key ( key ) +bleu_metric: 45.18010018049224 +---------- +NL: if i is greater or equal to integer 0, +ref: if i >= 0 : +Output: if i > = 0 : +bleu_metric: 100.0 +---------- +NL: otherwise if, if value under the 'unique' key of the dictionary contained under the column_name key of the dictionary indexes is true, +ref: elif indexes [ column_name ] [ 'unique' ] : +Output: elif indexes [ column _ name ] ['unique'] : +bleu_metric: 64.75445426291286 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: if to is not an six.string_types instance raise an error with message string '"to" argument must be a list or tuple'. +ref: assert not isinstance ( to , six . string_types ) , '"to" argument must be a list or tuple' +Output: assert not isinstance ( to, six. string _ types ),'" to " argument must be a list or tuple ' +bleu_metric: 81.96189957582153 +---------- +NL: substitute module.WSGIServer for WSGIServer. +ref: WSGIServer = module . WSGIServer +Output: wsgiserver = module. wsgiserver +bleu_metric: 50.813274815461476 +---------- +NL: define the method _createdir with argument self. +ref: def _createdir ( self ) : +Output: def _ createdir ( self ) : +bleu_metric: 61.04735835807844 +---------- +NL: if message_context is true, +ref: if message_context : +Output: if message _ context : +bleu_metric: 31.239399369202552 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: sites is an empty list. +ref: sites = [ ] +Output: sites = [ ] +bleu_metric: 100.0 +---------- +NL: define the method set with 5 arguments, self, key, value, timeout set to DEFAULT_TIMEOUT and version set to None. +ref: def set ( self , key , value , timeout = DEFAULT_TIMEOUT , version = None ) : +Output: def set ( self, key, value, timeout = default _ timeout, version = none ) : +bleu_metric: 63.83964846132485 +---------- +NL: define the method setlistdefault with 3 arguments: self, key and default_list set to None. +ref: def setlistdefault ( self , key , default_list = None ) : +Output: def setlistdefault ( self, key, default _ list = none ) : +bleu_metric: 54.23782837718303 +---------- +NL: substitute self.choices for self.widgetchoices. +ref: self . widget . choices = self . choices +Output: self. widgetchoice = self. choices +bleu_metric: 44.683107184405756 +---------- +NL: and generic_lang_code. call the function re.compile with an argument string '\s*\n\s*', substitute the result for trim_whitespace_re. +ref: trim_whitespace_re = re . compile ( '\s*\n\s*' ) +Output: trim _ whitespace _ re = re. compile ( r'\ s * \ n \ s *') +bleu_metric: 65.99790945055582 +---------- +NL: input_type is a string 'text'. +ref: input_type = 'text' +Output: input _ type ='text'' text ' +bleu_metric: 41.722614486115056 +---------- +NL: define the method __getinitargs__ with an argument self. +ref: def __getinitargs__ ( self ) : +Output: def _ _ getinitargs _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: raise an exception, +ref: raise +Output: raise +bleu_metric: 100.0 +---------- +NL: call the method self.get_full_path, append the result to string '//', substitute it for location. +ref: location = '//%s' % self . get_full_path ( ) +Output: location ='/ /'+ self. get _ full _ path ( ) +bleu_metric: 37.42031646082125 +---------- +NL: call the method msgs.decode with an argument string 'utf-8', substitute it for msgs. +ref: msgs = msgs . decode ( 'utf-8' ) +Output: msgs = msgs. decode ('utf - 8') msgs +bleu_metric: 91.93227152249185 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: from django.utils import six into default name space. +ref: from django . utils import six +Output: from django. utils import six +bleu_metric: 100.0 +---------- +NL: raise an ValueError exception with an argument string 'Unable to configure handler %r: %s' formated with name and e. +ref: raise ValueError ( 'Unable to configure handler ' '%r: %s' % ( name , e ) ) +Output: raise valueerror ('unable to configure handler'''% r : % s'% ( name, e ) ) +bleu_metric: 77.95149903947967 +---------- +NL: with self.mutex perform, +ref: with self . mutex : +Output: with self. mutex : +bleu_metric: 100.0 +---------- +NL: from django.middleware.csrf import get_token into default name space. +ref: from django . middleware . csrf import get_token +Output: from django. middleware. csrf import get _ token +bleu_metric: 67.86502681586725 +---------- +NL: if OSError, renamed to e, exception is caught, +ref: except OSError as e : +Output: except oserror as e : except : +bleu_metric: 35.49481056010052 +---------- +NL: call the method self.make_bytes with an argument value, substitute the result for value. +ref: value = self . make_bytes ( value ) +Output: value = self. make _ bytes ( value ) +bleu_metric: 53.107253497886994 +---------- +NL: substitute self.model._default_manager for queryset. +ref: queryset = self . model . _default_manager +Output: queryset = self. model. _ default _ manager +bleu_metric: 57.06745777055999 +---------- +NL: if settings.USE_TZ is true and value is not None and call to the function timezone.is_naive with an argument value, evaluates to true, +ref: if settings . USE_TZ and value is not None and timezone . is_naive ( value ) : +Output: if settings. use _ tz and value is not none and value is not timezone. is _ naive ( value ) : +bleu_metric: 34.233757203961886 +---------- +NL: with the call to the transaction.atomic method with using set to connection.alias, savepoint set to connection.features.can_rollback_ddl as arguments, +ref: with transaction . atomic ( using = connection . alias , savepoint = connection . features . can_rollback_ddl ) : +Output: with transaction. atomic ( using = connection. features. can _ rollback _ ddl ) : +bleu_metric: 57.45475632754964 +---------- +NL: if serializers is None, +ref: if serializers is None : +Output: if serializers is none : +bleu_metric: 48.8923022434901 +---------- +NL: return self.find_template_cache dictionary value under the key key. +ref: return self . template_cache [ key ] +Output: return self. find _ template _ cache [ key ] +bleu_metric: 38.677062763523445 +---------- +NL: define the method flatten with an argument self. +ref: def flatten ( self ) : +Output: def flatten ( self ) : +bleu_metric: 100.0 +---------- +NL: define the function is_valid_ipv6_address with an argument ip_str. +ref: def is_valid_ipv6_address ( ip_str ) : +Output: def is _ valid _ ipv6 _ address ( ip _ str ) : +bleu_metric: 16.943571815930884 +---------- +NL: do nothing. +ref: pass +Output: pass +bleu_metric: 100.0 +---------- +NL: url is None. +ref: url = None +Output: url = none +bleu_metric: 70.71067811865474 +---------- +NL: self._request_middleware is None. +ref: self . _request_middleware = None +Output: self. _ request _ middleware = none +bleu_metric: 22.679164443904003 +---------- +NL: import module importlib. +ref: import importlib +Output: importlib +bleu_metric: 36.787944117144235 +---------- +NL: call the params.get method wit string 'VERSION' and integer 1 as arguments, substitute the result for self.version. +ref: self . version = params . get ( 'VERSION' , 1 ) +Output: self. version = params. get ('version ', 1 ) +bleu_metric: 81.53551038173114 +---------- +NL: if index is not an instance of six.integer_types or tuple type, +ref: if not isinstance ( index , ( slice , ) + six . integer_types ) : +Output: if not isinstance ( index, six. integer _ types, tuple ) : +bleu_metric: 44.23426557618721 +---------- +NL: decorator function register.filter with an argument is_safe set to boolean False. +ref: @ register . filter ( is_safe = False ) +Output: @ register. filter ( is _ safe = false ) +bleu_metric: 49.13270548144421 +---------- +NL: members is a list with elements member for every member in the result of the function self._archive.getmembers, +ref: members = [ member for member in self . _archive . getmembers ( ) if member . name != 'pax_global_header' ] +Output: members = [ : ] for member in members ( self. _ archive. getmeme ( ) for member in self. _ archive. getme +bleu_metric: 24.60137257692754 +---------- +NL: return obj. +ref: return obj +Output: return obj +bleu_metric: 100.0 +---------- +NL: call the urlsplit with an argument url, convert the result into a list and return it. +ref: return list ( urlsplit ( url ) ) +Output: return list ( urlsplit ( url ) ) +bleu_metric: 100.0 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: raise an AttributeError with an argument string "%s could not be imported ", formated with self.name. +ref: raise AttributeError ( "%s could not be imported " % self . name ) +Output: raise attributeerror ( " % s could not be import " % self. name ) +bleu_metric: 68.61115512829524 +---------- +NL: if self.verbosity is greater than integer 1, +ref: if self . verbosity > 1 : +Output: if self. verbosity > 1 : +bleu_metric: 100.0 +---------- +NL: define the method validate with arguments self and value. +ref: def validate ( self , value ) : +Output: def validate ( self, value ) : +bleu_metric: 100.0 +---------- +NL: call the method self._cache.set with key, value, self.get_backend_timeout(timeout) as arguments. +ref: self . _cache . set ( key , value , self . get_backend_timeout ( timeout ) ) +Output: self. _ cache. set ( key, value, self. get _ backend _ timeout ( timeout ) ) +bleu_metric: 55.13251122859945 +---------- +NL: from django.utils.six.moves import zip into default name space. +ref: from django . utils . six . moves import zip +Output: from django. utils. six. moves import zip +bleu_metric: 100.0 +---------- +NL: call the method self._setup. +ref: self . _setup ( ) +Output: self. _ setup ( ) +bleu_metric: 41.11336169005197 +---------- +NL: builtins is an empty list. +ref: builtins = [ ] +Output: builtins = [ ] +bleu_metric: 100.0 +---------- +NL: if ValueError exception is caught, +ref: except ValueError : +Output: except valueerror : : : +bleu_metric: 31.239399369202552 +---------- +NL: substitute the value under the 'outlog' key of options dictionary for value under the 'out_log' key of daemon_kwargs dictionary. +ref: daemon_kwargs [ 'out_log' ] = options [ 'outlog' ] +Output: daemon _ kwargs ['out _ log'] = options ['out domain'] +bleu_metric: 38.63958857674753 +---------- +NL: return nothing. +ref: return +Output: return +bleu_metric: 100.0 +---------- +NL: MIN_NUM_FORM_COUNT is a string 'MIN_NUM_FORMS'. +ref: MIN_NUM_FORM_COUNT = 'MIN_NUM_FORMS' +Output: min _ num _ form _ count ='min _ num _ forms'_ _ _ _ _ +bleu_metric: 8.638804535733371 +---------- +NL: validate_comma_separated_integer_list is a instance of a RegexValidator class, created with 3 arguments: comma_separated_int_list_re, +ref: validate_comma_separated_integer_list = RegexValidator ( comma_separated_int_list_re , _ ( 'Enter only digits separated by commas.' ) , 'invalid' ) +Output: validate _ compile _ integer _ list = regexvalidator ( compile _ split _ list _ re, re. compile ( +bleu_metric: 6.860606269625843 +---------- +NL: substitute set of the results for self.value. define the method is_checked with an argument self. +ref: def is_checked ( self ) : +Output: def is _ checked ( self ) : +bleu_metric: 53.7284965911771 +---------- +NL: return the value under the INITIAL_FORM_COUNT key of the self.management_form.cleaned_data dictionary. +ref: return self . management_form . cleaned_data [ INITIAL_FORM_COUNT ] +Output: return self. management _ form. cleaned _ data [ initial _ form _ count ] +bleu_metric: 16.19557012853241 +---------- +NL: do nothing. +ref: pass +Output: pass +bleu_metric: 100.0 +---------- +NL: for every closable in self._closable_objects, +ref: for closable in self . _closable_objects : +Output: for closable in self. _ closable _ objects : +bleu_metric: 46.92470064105599 +---------- +NL: define the __init__ method with 3 arguments: self, unpacked list args and unpacked dictionary **kwargs. +ref: def __init__ ( self , * args , ** kwargs ) : +Output: def _ _ init _ _ ( self, * args, * * kwargs ) : +bleu_metric: 66.76160043354594 +---------- +NL: from django.forms.fields import Field and FileField into default name space. +ref: from django . forms . fields import Field , FileField +Output: from django. forms. fields import field, filefield +bleu_metric: 63.24187063259779 +---------- +NL: call the method self.file.close. +ref: self . file . close ( ) +Output: self. file. close ( ) +bleu_metric: 100.0 +---------- +NL: call the method viewname.split, with an argument ':', substitute the result for parts. +ref: parts = viewname . split ( ':' ) +Output: parts = viewname. split (':') +bleu_metric: 100.0 +---------- +NL: is smaller than self.min_num, raise an ValidationError with 2 arguments: return value of the function ungettext with 3 arguments: +ref: raise ValidationError ( ungettext ( "Please submit %d or more forms." , "Please submit %d or more forms." , self . min_num ) % self . min_num , code = 'too_few_forms' ) +Output: raise validationerror ( ungettext ('ascii ', params ='min'), params = {'invalid ' +bleu_metric: 9.092165044282591 +---------- +NL: define the method get_json_data with 2 arguments self and escape_html set to boolean False. +ref: def get_json_data ( self , escape_html = False ) : +Output: def get _ json _ data ( self, escape _ html = false ) : +bleu_metric: 20.706193828327603 +---------- +NL: bitwise shift integer 1 to the left by 31 spaces, substitute integer 1 from the result, convert the result to a integer, substitute it for MAXSIZE. +ref: MAXSIZE = int ( ( 1 << 31 ) - 1 ) +Output: maxsize = int ( 1 < - 1 ) +bleu_metric: 37.789696900533 +---------- +NL: yield and empty string as the result. +ref: yield '' +Output: yield'' +bleu_metric: 100.0 +---------- +NL: substitute self for result.parent. +ref: result . parent = self +Output: result. parent = self +bleu_metric: 100.0 +---------- +NL: replace every occurrence of string '\r\n' in message with '\n', replace every occurrence of string '\r', +ref: eol_message = message . replace ( str ( '\r\n' ) , str ( '\n' ) ) . replace ( str ( '\r' ) , str ( '\n' ) ) +Output: _ b ='\ r '. replace ( message,'\ r \ n ','\ r'). replace ('\ r ' +bleu_metric: 32.66542301219 +---------- +NL: bitwise shift integer 1 to the left by 31 spaces, return the result. +ref: return 1 << 31 +Output: return ( 1 < - 1 ) +bleu_metric: 22.679164443904003 +---------- +NL: self.namespace and self.regex.pattern, respectively. return it. define the method _populate with an argument self. +ref: def _populate ( self ) : +Output: def _ populate ( self ) : +bleu_metric: 61.04735835807844 +---------- +NL: if token.contents is false, +ref: if not token . contents : +Output: if not token. contents : +bleu_metric: 100.0 +---------- +NL: from django.core import checks into default name space. +ref: from django . core import checks +Output: from django. core import checks +bleu_metric: 100.0 +---------- +NL: if length of parts is greater than integer 1 and last element of parts is contained in self.compression_formats, +ref: if len ( parts ) > 1 and parts [ - 1 ] in self . compression_formats : +Output: if len ( parts ) > 1 and parts [ - 1 ] in self. compression _ formats : +bleu_metric: 78.84044396805875 +---------- +NL: substitute newline character for newline. +ref: newline = "\n" +Output: newline = b'\ n ' +bleu_metric: 66.06328636027614 +---------- +NL: define the method widget_attrs with arguments self and widget. +ref: def widget_attrs ( self , widget ) : +Output: def widget _ attrs ( self, widget ) : +bleu_metric: 63.15552371794036 +---------- +NL: join into a file path: path and string '%s.pot', where '%s' is replaced with self.domain converted into a string, substitute the result for pot_path. +ref: pot_path = os . path . join ( path , '%s.pot' % str ( self . domain ) ) +Output: pot _ path = os. path. join ( os. path. join ( self. domain ) ) +bleu_metric: 50.13497888717426 +---------- +NL: call the method error.items, for every field and error_list in the result, +ref: for field , error_list in error . items ( ) : +Output: for field, error _ list in error. items ( ) : +bleu_metric: 64.75445426291286 +---------- +NL: define the method _set_regex with arguments self and regex. +ref: def _set_regex ( self , regex ) : +Output: def _ set _ regex ( self, regex ) : +bleu_metric: 57.608442016038964 +---------- +NL: if dirname is true and dirname directory doesnt exists, +ref: if dirname and not os . path . exists ( dirname ) : +Output: if dirname and not os. path. exists ( dirname ) : +bleu_metric: 100.0 +---------- +NL: output_transaction is boolean True. +ref: output_transaction = True +Output: output _ transaction = true +bleu_metric: 27.301208627090666 +---------- +NL: call the function ngettext with 3 arguments: singular, plural and number, use the result as an argument for the call to the force_text, +ref: return force_text ( ngettext ( singular , plural , number ) ) +Output: return force _ text ( singular, plural, number ) +bleu_metric: 56.26421743110435 +---------- +NL: define the method add_prefix with 2 arguments: self and field_name. +ref: def add_prefix ( self , field_name ) : +Output: def add _ prefix ( self, field _ name ) : +bleu_metric: 26.58483576665877 +---------- +NL: return boolean False. +ref: return False +Output: return false +bleu_metric: 75.98356856515926 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: join tmpdir and sting 'original' into a file path name, substitute it for original_path. +ref: original_path = os . path . join ( tmpdir , 'original' ) +Output: original _ path = os. path. join ( tmpdir, " original " ) +bleu_metric: 81.72460049207133 +---------- +NL: if index is negative inter 3, if is_reversed, substitute it for in_index, if not, in_index is negative integer 2. +ref: in_index = - 3 if is_reversed else - 2 +Output: in _ index = index < 64 if is _ reversed else 2 +bleu_metric: 12.011055432195764 +---------- +NL: call the method lexer_class with an arguments template_string and origin, substitute the result for lexer. +ref: lexer = lexer_class ( template_string , origin ) +Output: lexer = lexer _ class ( template _ string, origin ) +bleu_metric: 31.61487584488943 +---------- +NL: call the method self.error_class, substitute the result for self._non_form_errors. +ref: self . _non_form_errors = self . error_class ( ) +Output: self. _ non _ form _ errors = self. error _ class ( ) +bleu_metric: 21.67183006379162 +---------- +NL: "test management command has changed in Django 1.8. Please create an add_arguments class method to achieve this." if test_runner_class has an attribute 'add_arguments', +ref: if hasattr ( test_runner_class , 'add_arguments' ) : +Output: if hasattr ( test _ runner _ class, " add _ arguments ", false ) : _ +bleu_metric: 16.679551613797315 +---------- +NL: and placed into 2 character spaces, and '%02d' is replaced with reminder of the division of absolute offset by integer 60, and placed into 2 character spaces. define the method __repr__ with an argument self. +ref: def __repr__ ( self ) : +Output: def _ _ repr _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: if var ends with '.', +ref: if var . endswith ( '.' ) : +Output: if var. endswith ( '.') : +bleu_metric: 100.0 +---------- +NL: import module json. +ref: import json +Output: import json +bleu_metric: 100.0 +---------- +NL: split x by character '=' and append first element of the result to the prev_opts list. for every opt in options, if first element of opt is not contained in prev_opts, append opt to the list, substitute it for options. +ref: options = [ opt for opt in options if opt [ 0 ] not in prev_opts ] +Output: options = [ opt [ 0 ] for opt in prev _ opts ] +bleu_metric: 39.38895060484148 +---------- +NL: call the function sys.getfilesystemencoding if it evaluates to true, substitute its result for fs_encoding, +ref: fs_encoding = sys . getfilesystemencoding ( ) or sys . getdefaultencoding ( ) +Output: fs _ encoding = sys. getfilescount if syfigurncoting if fs. getfigurncoder ( ) +bleu_metric: 21.409092659758038 +---------- +NL: if message is an instance of ValidationError class, +ref: if isinstance ( message , ValidationError ) : +Output: if isinstance ( message, validationerror ) : +bleu_metric: 58.8837385313777 +---------- +NL: define the method __init__, with 3 arguments: self, stream_or_string and unpacked dictionary options. +ref: def __init__ ( self , stream_or_string , ** options ) : +Output: def _ _ init _ _ ( self, stream _ or _ string, * * options ) : +bleu_metric: 38.30597817747975 +---------- +NL: call the function _import_module with an argument self.mod, return the result. +ref: return _import_module ( self . mod ) +Output: return _ import _ module ( self. mod ) +bleu_metric: 53.31675363405771 +---------- +NL: skip this loop iteration. +ref: continue +Output: continue +bleu_metric: 100.0 +---------- +NL: if slots is an instance of str, +ref: if isinstance ( slots , str ) : +Output: if isinstance ( slots, str ) : +bleu_metric: 100.0 +---------- +NL: set self.__starttag_text to None. +ref: self . __starttag_text = None +Output: self. _ _ starttag _ text = none +bleu_metric: 19.96019880774733 +---------- +NL: convert byte to its integer representation, return all of the results for every byte in buf. +ref: return ( ord ( byte ) for byte in buf ) +Output: for byte in buf. get ( bytes ) : +bleu_metric: 32.55666272944305 +---------- +NL: raise an UnrecognizedArchiveFormat exception with an argument string "File object not a recognized archive format.". +ref: raise UnrecognizedArchiveFormat ( "File object not a recognized archive format." ) +Output: raise unrecozedarchiveformat ( " file object not a archive format. " ) +bleu_metric: 43.67171019433796 +---------- +NL: call the method self.options.update with dictionary as an argument, containing 1 element: boolean False for 'use_decimal'. +ref: self . options . update ( { 'use_decimal' : False } ) +Output: self. options. update ( {'use _ decimal': false } ) +bleu_metric: 56.325794000904196 +---------- +NL: define the method validate with arguments self and value. +ref: def validate ( self , value ) : +Output: def validate ( self, value ) : +bleu_metric: 100.0 +---------- +NL: fail_message is a string 'created'. +ref: fail_message = 'created' +Output: fail _ message ='created ' +bleu_metric: 58.739490946992134 +---------- +NL: states is a dictionary with 2 arguments: appended list with an element instance of a class Tok, created with 3 arguments: "punct", +ref: states = { 'div' : both_before + [ Tok ( "punct" , literals ( "/= /" ) , next = 'reg' ) , ] + both_after , 'reg' : both_before + [ Tok ( "regex" , r""" / # opening slash # First character is.. ( [^*\\/[] # anything but * \ / or [ | \\. # or an escape sequence | \[ # or a class, which has ( [^\]\\] # anything but \ or ] | \\. # or an escape sequence )* # many times \] ) # Following characters are same, except for excluding a star ( [^\\/[] # anything but \ / or [ | \\. # or an escape sequence | \[ # or a class, which has ( [^\]\\] # anything but \ or ] | \\. # or an escape sequence )* # many times \] )* # many times / # closing slash [a-zA-Z0-9]* # trailing flags """ , next = 'div' ) , ] + both_after , } +Output: states = { } [ : tok ], to _ python ('punct ", false, attrs ) : [ { } ] +bleu_metric: 0.00796471460876642 +---------- +NL: for every item in values, +ref: for item in values : +Output: for item in values : +bleu_metric: 100.0 +---------- +NL: define the method utcoffset with 2 arguments: self and dt. +ref: def utcoffset ( self , dt ) : +Output: def utcoffset ( self, dt ) : +bleu_metric: 100.0 +---------- +NL: leave_locale_alone is boolean False. +ref: leave_locale_alone = False +Output: leave _ locale _ alone = false +bleu_metric: 18.5750579991336 +---------- +NL: from __future__ import unicode_literals into default name space. +ref: from __future__ import unicode_literals +Output: from _ _ future _ _ import unicode _ literals +bleu_metric: 13.950796967929133 +---------- +NL: define the method __str__ with an argument self. +ref: def __str__ ( self ) : +Output: def _ _ str _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: slice the rawdata string from the k-th to the endpos-th index, remove the whitespaces from the start and the end of the string, substitute it for end. +ref: end = rawdata [ k : endpos ] . strip ( ) +Output: end = rawdata [ k : endpos ]. strip ( ) +bleu_metric: 100.0 +---------- +NL: call the method zipfile.ZipFile.read with 2 arguments: self and first element of the result of the self.namelist method. +ref: return zipfile . ZipFile . read ( self , self . namelist ( ) [ 0 ] ) +Output: zipfile. zipfile. read ( self, self. namelist [ 0 ] ) +bleu_metric: 57.21602207264831 +---------- +NL: define the method render with 2 arguments self and context. +ref: def render ( self , context ) : +Output: def render ( self, context ) : +bleu_metric: 100.0 +---------- +NL: query a string 'Please enter either "yes" or "no": ' and store the result in confirm. +ref: confirm = input ( 'Please enter either "yes" or "no": ' ) +Output: confirm ='please enter'or " yes " or " no " : ' +bleu_metric: 51.700314623087706 +---------- +NL: in encoded, replace all the occurrences of unicode character "\\054" with ',' character and "\\073" with ';' characters. +ref: encoded = encoded . replace ( ";" , "\\073" ) . replace ( "," , "\\054" ) +Output: return unicode ( " \ \ 34 ", " \ \ 92 ", " \ \ 92 " ). replace ('\ doc +bleu_metric: 42.532229886402426 +---------- +NL: substitute self.is_localized for widget.is_localized. +ref: widget . is_localized = self . is_localized +Output: widget. is _ localized = self. is _ localized +bleu_metric: 25.21193618434983 +---------- +NL: substitute deconstruct for klass.deconstruct. +ref: klass . deconstruct = deconstruct +Output: klass. deconstruct = deconstruct +bleu_metric: 100.0 +---------- +NL: if extend is true, +ref: if extend : +Output: if extend : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : +bleu_metric: 5.783214009218945 +---------- +NL: get the value under the 'database' key of the options dictionary, use it as the key to get the value from the connections dictionary, substitute the result for connection. +ref: connection = connections [ options [ 'database' ] ] +Output: connection = connections [ options ['database'] ] +bleu_metric: 100.0 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: call the method warnings.warn with an argument string "No fixture named '%s' found." where '%s' is replaced with fixture_name. +ref: warnings . warn ( "No fixture named '%s' found." % fixture_name ) +Output: warnings. warn ( " no fixture named'% s'found. " % fixture _ name ) +bleu_metric: 65.5435348124928 +---------- +NL: call the method self.data.replace with 2 arguments: month as integer 1 and day as integer 1, on the result call the method, +ref: jan1_weekday = self . data . replace ( month = 1 , day = 1 ) . weekday ( ) + 1 +Output: obj = self. data. replace ( month, day = 1 ). replace ( 1 ) +bleu_metric: 57.34089478741392 +---------- +NL: if self.lookups is not None, +ref: if self . lookups is not None : +Output: if self. lookups is not none : +bleu_metric: 70.71067811865474 +---------- +NL: join migrations_directory and string "__init__.py" into a file path, substitute it for init_path. +ref: init_path = os . path . join ( migrations_directory , "__init__.py" ) +Output: init _ path = os. path. join ( migrations _ directory, " _ _ init _ _. py " ) +bleu_metric: 42.16383984557386 +---------- +NL: return value. +ref: return value +Output: return value +bleu_metric: 100.0 +---------- +NL: call the method timezone.normalize with an argument value, substitute the result for value. +ref: value = timezone . normalize ( value ) +Output: value = timezone. normalize ( value ) +bleu_metric: 100.0 +---------- +NL: property decorator, +ref: @ property +Output: @ property +bleu_metric: 100.0 +---------- +NL: substitute self.subject for subject. +ref: subject = self . subject +Output: subject = self. subject +bleu_metric: 100.0 +---------- +NL: return string '0'. +ref: return '0' +Output: return'0 ' +bleu_metric: 100.0 +---------- +NL: call the method __init__ with an argument display_name, from the base class of the LoaderOrigin class. +ref: super ( LoaderOrigin , self ) . __init__ ( display_name ) +Output: super ( loaderorigin, self ). _ _ init _ _ ( display _ name ) +bleu_metric: 24.94174717700826 +---------- +NL: if pos is greater than or equal to last, +ref: if pos >= last : +Output: if pos > = last : +bleu_metric: 100.0 +---------- +NL: from django.conf import settings into default name space. +ref: from django . conf import settings +Output: from django. conf import settings +bleu_metric: 100.0 +---------- +NL: define the function normalize with an argument pattern. +ref: def normalize ( pattern ) : +Output: def normalize ( pattern ) : +bleu_metric: 100.0 +---------- +NL: import module opera. +ref: import operator +Output: import operator +bleu_metric: 100.0 +---------- +NL: finally perform, +ref: finally : +Output: finally : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: define the method tzname with 2 arguments: self and dt. +ref: def tzname ( self , dt ) : +Output: def tzname ( self, dt ) : +bleu_metric: 100.0 +---------- +NL: if self.allow_files is true, +ref: if self . allow_files : +Output: if self. allow _ files : +bleu_metric: 35.49481056010052 +---------- +NL: if custom_sql is empty, +ref: if custom_sql : +Output: if not custom _ sql : : +bleu_metric: 22.679164443904003 +---------- +NL: msg is an instance of a class SafeMIMEMultipart, created with the arguments: _subtype set to self.alternative_subtype and encoding set to encoding. +ref: msg = SafeMIMEMultipart ( _subtype = self . alternative_subtype , encoding = encoding ) +Output: msg = safemimemultipart ( _ subtype, encoding = encoding ) +bleu_metric: 38.2946284994623 +---------- +NL: if field is contained in self.cleaned_data, +ref: if field in self . cleaned_data : +Output: if field in self. cleaned _ data : +bleu_metric: 51.93071778680676 +---------- +NL: if args and kwargs are both true, +ref: if args and kwargs : +Output: if args and kwargs : +bleu_metric: 100.0 +---------- +NL: call the function import_library with an argument module, append the result to builtins. +ref: builtins . append ( import_library ( module ) ) +Output: builtins. append ( import _ library ( module ) ) +bleu_metric: 57.835698664651424 +---------- +NL: call the function self.compress with empty list as an argument, return the result. +ref: return self . compress ( [ ] ) +Output: return self. compress ( [ ] ) +bleu_metric: 100.0 +---------- +NL: define the method parse_endtag with self class instance and i as the arguments. +ref: def parse_endtag ( self , i ) : +Output: def parse _ endtag ( self, i ) : +bleu_metric: 63.15552371794036 +---------- +NL: import module types. +ref: import types +Output: import types +bleu_metric: 100.0 +---------- +NL: define the method M with an argument self. +ref: def M ( self ) : +Output: def m ( self ) : +bleu_metric: 70.71067811865474 +---------- +NL: substitute Field.creation_counter for self.creation_counter. +ref: self . creation_counter = Field . creation_counter +Output: self. creation _ counter = field. creation _ counter +bleu_metric: 17.03318603763928 +---------- +NL: attrs is a dictionary with model for 'model'. +ref: attrs = { 'model' : model } +Output: attrs = {'model': model } +bleu_metric: 100.0 +---------- +NL: if ImportError, AttributeError, renamed to e, exceptions are caught, +ref: except ( ImportError , AttributeError ) as e : +Output: except importerror, attributeerror as e : +bleu_metric: 29.446564457869812 +---------- +NL: define the method __getitem__ with 2 arguments: self and key. +ref: def __getitem__ ( self , key ) : +Output: def _ _ getitem _ _ ( self, key ) : +bleu_metric: 52.96074933406222 +---------- +NL: if character '=' is contained in x, +ref: if "=" in x : +Output: if'='in x : +bleu_metric: 100.0 +---------- +NL: define the method tell with an argument self. +ref: def tell ( self ) : +Output: def tell ( self ) : +bleu_metric: 100.0 +---------- +NL: raise an AttributeError with an argument string "This QueryDict instance is immutable". +ref: raise AttributeError ( "This QueryDict instance is immutable" ) +Output: raise attributeerror ( " this querydict instance is immutable " ) +bleu_metric: 45.23975813466131 +---------- +NL: python_2_unicode_compatible decorator, +ref: @ python_2_unicode_compatible +Output: @ python _ 2 _ unicode _ compatible +bleu_metric: 18.575057999133595 +---------- +NL: find index of the occurrence of string ':_(' in p, if its greater or equal to integer 0, +ref: if p . find ( ':_(' ) >= 0 : +Output: find = b': _ (') if p. find (':') > 0 : +bleu_metric: 57.261417629807056 +---------- +NL: flags is a integer 0. +ref: flags = 0 +Output: flags = 0 +bleu_metric: 100.0 +---------- +NL: target_app_labels_only is boolean False. +ref: target_app_labels_only = False +Output: target _ app _ labels _ only = false +bleu_metric: 14.113991930789776 +---------- +NL: derive the class IfChangedNode from Node base class. +ref: class IfChangedNode ( Node ) : +Output: class ifchangednode ( node ) : +bleu_metric: 28.751742289713444 +---------- +NL: call the method Image.open with an argument file, on the result call the verify method +ref: Image . open ( file ) . verify ( ) +Output: obj = image. open ( file ). fail ( ) +bleu_metric: 53.16967153331754 +---------- +NL: if self.selected_fields is None or field.attname is contained in self.selected_fields +ref: if self . selected_fields is None or field . attname in self . selected_fields : +Output: if self. selected _ fields is none or field. attname in self. selected _ fields : +bleu_metric: 42.97641362823879 +---------- +NL: call the method self.split_leading_dir with an argument name, substitute the first element of result for name. +ref: name = self . split_leading_dir ( name ) [ 1 ] +Output: name = self. split _ leading _ dir ( name ) [ 0 ] +bleu_metric: 38.989389329183524 +---------- +NL: from django.utils import six into default name space. +ref: from django . utils import six +Output: from django. utils import six +bleu_metric: 100.0 +---------- +NL: if AttributeError exception is caught, +ref: except AttributeError : +Output: except attributeerror : : : +bleu_metric: 31.239399369202552 +---------- +NL: return arg. +ref: return arg +Output: return arg +bleu_metric: 100.0 +---------- +NL: call the function _trans.get_language_from_path with an argument path, return the result. +ref: return _trans . get_language_from_path ( path ) +Output: return _ trans. get _ language _ from _ path ( path ) +bleu_metric: 24.90328638846773 +---------- +NL: if value under the key 'ATOMIC_REQUESTS of db.settings_dic dictionary is True and db.alias is not present in the non_atomic_requests, +ref: if ( db . settings_dict [ 'ATOMIC_REQUESTS' ] and db . alias not in non_atomic_requests ) : +Output: if db. settings _ dic. get ('atomic _ request') and db. alias not in non _ atomic _ request : +bleu_metric: 25.88729698035332 +---------- +NL: derive the class InlineForeignKeyField from the Field base class. +ref: class InlineForeignKeyField ( Field ) : +Output: class inlineforrenkeyfield ( field ) : +bleu_metric: 24.924249970265265 +---------- +NL: call the function is_aware with an argument o, if it evaluates to true, +ref: if is_aware ( o ) : +Output: if is _ aware ( o ) : +bleu_metric: 53.7284965911771 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: self.years is list containing 10 successive integers from this_year. +ref: self . years = range ( this_year , this_year + 10 ) +Output: self. years = [ this _ year ] +bleu_metric: 27.203261921057177 +---------- +NL: for every refto and refs in return value of references.items method. +ref: for refto , refs in references . items ( ) : +Output: for refto, refs in references. items ( ) : +bleu_metric: 100.0 +---------- +NL: from django.core.exceptions import AppRegistryNotReady into default name space. +ref: from django . core . exceptions import AppRegistryNotReady +Output: from django. core. exceptions import appregistrynotready +bleu_metric: 59.33643406390795 +---------- +NL: substitute settings.FORMAT_MODULE_PATH for settings.FORMAT_MODULE_PATH. +ref: format_module_path = settings . FORMAT_MODULE_PATH +Output: settings. format _ module _ path = settings. format _ module _ path +bleu_metric: 15.310245441182444 +---------- +NL: if ch is contained in string '*?+', +ref: if ch in '*?+' : +Output: if ch in'*? +': +bleu_metric: 100.0 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: if sent is true, +ref: if sent : +Output: if sent : : : : : : : : : : : : : : : : : : : : : : : : : : +bleu_metric: 8.830895300928166 +---------- +NL: call the function http_cookies.SimpleCookie, on the return value call the value_encode method, with the argument character ';', +ref: _cookie_encodes_correctly = http_cookies . SimpleCookie ( ) . value_encode ( ';' ) == ( ';' , '"\\073"' ) +Output: http _ cookies. simplecookie ( value _ encode (';'). value ( ) ) +bleu_metric: 17.614601893912106 +---------- +NL: call the method parser.parse with an argument tuple with an element string 'endfor', substitute the result for nodelist_empty. +ref: nodelist_empty = parser . parse ( ( 'endfor' , ) ) +Output: nodelist _ empty = parser. parse ('endfor ', ) +bleu_metric: 66.31592303984166 +---------- +NL: if KeyError or AttributeError, renamed to exc, exceptions are caught, +ref: except ( KeyError , AttributeError ) as exc : +Output: except ( keyerror, attributeerror ) as exc : +bleu_metric: 43.78784374856904 +---------- +NL: derive the class ObjectDoesNotExist from the Exception base class. +ref: class ObjectDoesNotExist ( Exception ) : +Output: class objectdoesnotexist ( exception ) : +bleu_metric: 24.924249970265265 +---------- +NL: decorator function register.filter with an argument is_safe set to boolean False. +ref: @ register . filter ( is_safe = False ) +Output: @ register. filter ( is _ safe = false ) +bleu_metric: 49.13270548144421 +---------- +NL: return iri. +ref: return iri +Output: return iri +bleu_metric: 100.0 +---------- +NL: convert key and default to strings, get the value under the key string key of the environ dictionary, if it does not exists use the, +ref: value = environ . get ( str ( key ) , str ( default ) ) +Output: if environ. get ( key, default ) : +bleu_metric: 24.181521090264724 +---------- +NL: define the method __init__ with 2 arguments: self and lexer. +ref: def __init__ ( self , lexer ) : +Output: def _ _ init _ _ ( self, lexer ) : +bleu_metric: 52.96074933406222 +---------- +NL: call the method self.data.timetuple, use the result as an argument for the call to the function time.mktime, +ref: return int ( time . mktime ( self . data . timetuple ( ) ) ) +Output: return time. mktime ( self. data. timetuple ( ) ) +bleu_metric: 74.20016786832132 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: safe_data is an empty dictionary. +ref: safe_data = { } +Output: safe _ data = { } +bleu_metric: 51.697315395717055 +---------- +NL: import module stat. +ref: import stat +Output: import stat +bleu_metric: 100.0 +---------- +NL: define the method write_items with 2 arguments: self and handler. +ref: def write_items ( self , handler ) : +Output: def write _ items ( self, handler ) : +bleu_metric: 63.15552371794036 +---------- +NL: call the function allow_lazy with 2 arguments: wrap and six.text_type, substitute the result for wrap. +ref: wrap = allow_lazy ( wrap , six . text_type ) +Output: wrap = allow _ lazy ( wrap, six. text _ type ) +bleu_metric: 37.23909894939823 +---------- +NL: from __future__ import unicode_literals into default name space. +ref: from __future__ import unicode_literals +Output: from _ _ future _ _ import unicode _ literals +bleu_metric: 13.950796967929133 +---------- +NL: for every path in paths, +ref: for path in paths : +Output: for path in paths : +bleu_metric: 100.0 +---------- +NL: call the method self.main_help_text append new line to it, write it to sys.stdout. +ref: sys . stdout . write ( self . main_help_text ( ) + '\n' ) +Output: sys. stdout. write ( self. main _ help _ text ( ) +'\ n') +bleu_metric: 69.07573115737006 +---------- +NL: define the method __init__ with an argument self. +ref: def __init__ ( self ) : +Output: def _ _ init _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: import module sys. +ref: import sys +Output: import sys +bleu_metric: 100.0 +---------- +NL: define the function ngettext with 4 arguments: context, singular, plural and number. +ref: def npgettext ( context , singular , plural , number ) : +Output: def ngettext ( context, singular, plural, number ) : +bleu_metric: 85.5526185871245 +---------- +NL: define the method with reload with an argument self. +ref: def __init__ ( self ) : +Output: def reload ( self ) : +bleu_metric: 70.71067811865474 +---------- +NL: from django.utils.module_loading import import_string into default name space. +ref: from django . utils . module_loading import import_string +Output: from django. utils. module _ loading import import _ string +bleu_metric: 39.553325358771794 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: skip this loop iteration, +ref: continue +Output: continue +bleu_metric: 100.0 +---------- +NL: import module warnings. +ref: import warnings +Output: import warnings +bleu_metric: 100.0 +---------- +NL: if exp is not None and exp is lesser than return value of the function time.time, +ref: if exp is not None and exp < time . time ( ) : +Output: if exp is not none and exp < time. time ( ) : +bleu_metric: 81.53551038173114 +---------- +NL: if t is not None, +ref: if t is not None : +Output: if t is not none : +bleu_metric: 59.46035575013605 +---------- +NL: call the method time_str.decode with an argument string 'utf-8', substitute the result for time_str. +ref: time_str = time_str . decode ( 'utf-8' ) +Output: time _ str = time _ str. decode ('utf - 8') +bleu_metric: 58.56596027429395 +---------- +NL: append string "Field renamed because of name conflict." to field_notes. +ref: field_notes . append ( 'Field renamed because of name conflict.' ) +Output: field _ notes. append ( " field renamed because of name conflicts. " ) +bleu_metric: 47.18372009351201 +---------- +NL: call the method __setitem__ from the base class of the QueryDict class, with arguments key and value. +ref: super ( QueryDict , self ) . __setitem__ ( key , value ) +Output: super ( querydict, self ). _ _ setitem _ _ ( key, value ) +bleu_metric: 47.02773871923361 +---------- +NL: define the method write_message with arguments self and message. +ref: def write_message ( self , message ) : +Output: def write _ message ( self, message ) : +bleu_metric: 63.15552371794036 +---------- +NL: define the method list with an argument self. +ref: def extract ( self ) : +Output: def list ( self ) : +bleu_metric: 70.71067811865474 +---------- +NL: join elements of output into a string with newline as separator, use it as an argument for the call to the function mark_safe, return it. +ref: return mark_safe ( '\n' . join ( output ) ) +Output: return mark _ safe ('\ n '. join ( output ) ) +bleu_metric: 75.41859578343534 +---------- +NL: call the __init__ method of the base class of the class LocaleRegexURLResolver, with arguments: None, urlconf_name, default_kwargs, app_name and namespace. +ref: super ( LocaleRegexURLResolver , self ) . __init__ ( None , urlconf_name , default_kwargs , app_name , namespace ) +Output: super ( localeregexurlresolver, self ). _ _ init _ _ name, app _ name, namespace +bleu_metric: 20.14311148867193 +---------- +NL: var_obj is None. +ref: var_obj = None +Output: var _ obj = none +bleu_metric: 27.301208627090666 +---------- +NL: call the method middleware.process_template_response with 2 arguments: request and response, substitute the result for response. +ref: response = middleware . process_template_response ( request , response ) +Output: response = middleware. process _ template _ response ( request, response ) +bleu_metric: 53.070741098514354 +---------- +NL: substitute i incremented by 1 for value under the 'counter' key of the loop_dict dictionary. +ref: loop_dict [ 'counter' ] = i + 1 +Output: loop _ dict ['counter'] = i + 1 +bleu_metric: 73.61703354503865 +---------- +NL: return size. +ref: return size +Output: return size +bleu_metric: 100.0 +---------- +NL: or string 'ANICON' is in os.environ, substitute the evaluated boolean for supported_platform. if sys.stdout has an attribute named 'isatty' and call to the sys.stdout.isatty returns boolean True, substitute True for is_a_tty. +ref: is_a_tty = hasattr ( sys . stdout , 'isatty' ) and sys . stdout . isatty ( ) +Output: is _ a _ tty = sys. stdout,'isatty'and sys. stdout. isaosity +bleu_metric: 48.37532025693559 +---------- +NL: "Use django.utils.timezone.get_fixed_timezone instead." and RemovedInDjango19Warning. if offset is an instance of timedelta class, +ref: if isinstance ( offset , timedelta ) : +Output: if isinstance ( offset, timedelta ) : +bleu_metric: 100.0 +---------- +NL: call the method self._assert_mutable. +ref: self . _assert_mutable ( ) +Output: self. _ assert _ mutable ( ) +bleu_metric: 31.239399369202552 +---------- +NL: convert first element of values into a integer, return the result and ch. +ref: return int ( values [ 0 ] ) , ch +Output: return int ( values [ 0 ] ) +bleu_metric: 78.75585852725084 +---------- +NL: import module codecs. +ref: import codecs +Output: import codecs +bleu_metric: 100.0 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: register.tag decorator, +ref: @ register . tag +Output: @ register. tag +bleu_metric: 100.0 +---------- +NL: call the method result.setFormatter with an argument formatter. +ref: result . setFormatter ( formatter ) +Output: result. setformat ( formatter ) +bleu_metric: 51.54486831107658 +---------- +NL: get the id of the self object, use it as a key to obtain the value from the memo dictionary, substitute self with it. +ref: memo [ id ( self ) ] = result +Output: memo [ id ( self ) ] = result +bleu_metric: 100.0 +---------- +NL: call the method other.__cast, substitute the result for other. +ref: other = other . __cast ( ) +Output: other = other. _ _ cast ( ) +bleu_metric: 46.92470064105599 +---------- +NL: if other is an instance of Promise class, +ref: if isinstance ( other , Promise ) : +Output: if isinstance ( other, promise ) : +bleu_metric: 65.80370064762462 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: call the method self._cull. +ref: self . _cull ( ) +Output: self. _ cull ( ) +bleu_metric: 41.11336169005197 +---------- +NL: e.args is a tuple, containing 1 element: string "Problem installing fixtures: %s", where '%s' is replaced with e. +ref: e . args = ( "Problem installing fixtures: %s" % e , ) +Output: e. args = ( " problem installing fixtures : % s " % e ) +bleu_metric: 70.9615571067635 +---------- +NL: call the function os.makedirs with argument directory. +ref: os . makedirs ( directory ) +Output: os. makedirs ( directory ) +bleu_metric: 100.0 +---------- +NL: raise an OverflowError exception with an argument string 'dklen too big'. +ref: raise OverflowError ( 'dklen too big' ) +Output: raise overflowerror ('dklen too large') +bleu_metric: 43.72805827465167 +---------- +NL: call the function clean_ipv6_address with arguments value and self.unpack_ipv4, return the result. +ref: return clean_ipv6_address ( value , self . unpack_ipv4 ) +Output: return clean _ ipv6 _ address ( value, self. unpack _ ipv4 ) +bleu_metric: 32.63598326609893 +---------- +NL: from importlib import import_module into default name space. +ref: from importlib import import_module +Output: from importlib import import _ module +bleu_metric: 41.11336169005197 +---------- +NL: dest is 'use_base_manager', default is boolean False and help is a string '(use multiple --exclude to exclude multiple apps/models).'. call the method parser.add_argument with 3 arguments: string '--pks', dest set to string 'primary_keys', +ref: parser . add_argument ( '--pks' , dest = 'primary_keys' , help = "Only dump objects with given primary keys. " "Accepts a comma separated list of keys. " "This option will only work when you specify one model." ) +Output: parser. add _ argument ('- - pks ', action ='store _ false ', dest ='interactive ', default _ +bleu_metric: 16.42112420910563 +---------- +NL: if header_end equals integer negative 1, +ref: if header_end == - 1 : +Output: if header _ end = = 1 : +bleu_metric: 32.46679154750989 +---------- +NL: define the function b with an argument s. +ref: def b ( s ) : +Output: def b ( s ) : +bleu_metric: 100.0 +---------- +NL: g is an instance of a class generator.BytesGenerator called with fp and mangle_from_ set to False. +ref: g = generator . BytesGenerator ( fp , mangle_from_ = False ) +Output: g = generator. bytesgenerator ( fp, mangle _ from _ = false ) +bleu_metric: 32.22538601891173 +---------- +NL: import module unicodedata. +ref: import unicodedata +Output: import unicodedata +bleu_metric: 100.0 +---------- +NL: if t.token_type equals TOKEN_BLOCK, +ref: if t . token_type == TOKEN_BLOCK : +Output: if t. token _ type = = token _ block : +bleu_metric: 24.022110864391532 +---------- +NL: call the method self.namelist, if the length of the result is not integer 1, +ref: if len ( self . namelist ( ) ) != 1 : +Output: if len ( self. namelist ( ) )! = 1 : +bleu_metric: 100.0 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: for every medium in extend, +ref: for medium in extend : +Output: for port in extend : +bleu_metric: 64.34588841607616 +---------- +NL: if url is true, +ref: if url : +Output: if url : +bleu_metric: 100.0 +---------- +NL: from collections import defaultdict into default name space. +ref: from collections import defaultdict +Output: from collections import defaultdict +bleu_metric: 100.0 +---------- +NL: call the function datetime.datetime with 3 arguments, now.year, now.month and now.day, substitute the result for now. +ref: now = datetime . datetime ( now . year , now . month , now . day ) +Output: now = datetime. datetime ( now. year, now. month, now. day ) +bleu_metric: 100.0 +---------- +NL: while i is lesser than length of subject and i-th element of subject is not equal to c, +ref: while i < len ( subject ) and subject [ i ] != c : +Output: while i < len ( subject ) and subject [ i ]! = c : +bleu_metric: 100.0 +---------- +NL: self._changed_data is an empty list. +ref: self . _changed_data = [ ] +Output: self. _ changed _ data = [ ] +bleu_metric: 40.3527863746399 +---------- +NL: call the function parse_boundary_stream with 2 arguments: sub_stream and integer 1024, yield the result as the return value of the generator. +ref: yield parse_boundary_stream ( sub_stream , 1024 ) +Output: yield parse _ boundary _ stream ( sub _ stream, 1024 ) +bleu_metric: 26.760322756637912 +---------- +NL: call the method value.replace with an argument tzinfo as timezone, return the result. +ref: return value . replace ( tzinfo = timezone ) +Output: return value. replace ( tzinfo as timezone ) +bleu_metric: 70.16879391277371 +---------- +NL: define the method __init__ with 4 arguments: self, cyclevars, variable_name set to None and silent set to boolean False. +ref: def __init__ ( self , cyclevars , variable_name = None , silent = False ) : +Output: def _ _ init _ _ ( self, cyclevars, variable _ name = none, silent = false ) : +bleu_metric: 30.70898761263382 +---------- +NL: if six.PY3 is true, +ref: if six . PY3 : +Output: if six. py3 : : : : +bleu_metric: 31.239399369202552 +---------- +NL: get_format called with an argument string 'DATE_INPUT_FORMATS', substitute the result for format. call the method value.strftime with an argument format, return the result. +ref: return value . strftime ( format ) +Output: return value. strftime ( format ) +bleu_metric: 100.0 +---------- +NL: substitute the value under the 'errlog' key of options dictionary for value under the 'err_log' key of daemon_kwargs dictionary. +ref: daemon_kwargs [ 'err_log' ] = options [ 'errlog' ] +Output: daemon _ kwargs ['errlog'] = options ['errlog'] +bleu_metric: 65.15835084211272 +---------- +NL: for every migration_name in migration_names, +ref: for migration_name in migration_names : +Output: for migration _ name in migration _ names : +bleu_metric: 18.850319022747346 +---------- +NL: from itertools import chain into default name space. +ref: from itertools import chain +Output: from itertools import chain +bleu_metric: 100.0 +---------- +NL: return obj_dict. +ref: return obj_dict +Output: return obj _ dict +bleu_metric: 35.93041119630843 +---------- +NL: substitute line for buffer_. +ref: buffer_ = line +Output: buffer _ = line +bleu_metric: 47.28708045015878 +---------- +NL: raise an ValueError exception with string "Key '%s' not found" as argument, substitute '%s' for key. +ref: raise ValueError ( "Key '%s' not found" % key ) +Output: raise valueerror ( " key'% s'not found " % key ) +bleu_metric: 68.55486797904878 +---------- +NL: if self._request_middleware is None, +ref: if self . _request_middleware is None : +Output: if self. _ request _ middleware is none : +bleu_metric: 26.202510071732632 +---------- +NL: define the method render with 4 arguments: self, name, value and attrs set to None. +ref: def render ( self , name , value , attrs = None ) : +Output: def render ( self, name, value, attrs = none ) : +bleu_metric: 81.53551038173114 +---------- +NL: substitute RAW for TYPE. +ref: TYPE = RAW +Output: type = raw +bleu_metric: 53.7284965911771 +---------- +NL: substitute FILE for TYPE. +ref: TYPE = FILE +Output: type = file +bleu_metric: 53.7284965911771 +---------- +NL: substitute the result for guts. concatenate string '"', guts and string '"', substitute the result for tok. +ref: tok = '"' + guts + '"' +Output: tok ='"'+ wrapping +'" ' +bleu_metric: 76.11606003349893 +---------- +NL: call the method parse from the instance of TemplateIfParser class, created with 2 arguments parser and bits, substitute the result for condition. +ref: condition = TemplateIfParser ( parser , bits ) . parse ( ) +Output: condition = templateifparser ( parser, bits ). parse ( ) +bleu_metric: 69.37312655193244 +---------- +NL: call the method apps.get_model with an argument model_identifier, return the result. +ref: return apps . get_model ( model_identifier ) +Output: return apps. get _ model ( model _ identifier ) +bleu_metric: 23.901088824528134 +---------- +NL: call the method loader.get_template with an argument template, return the result. +ref: return loader . get_template ( template ) +Output: return loader. get _ template ( template ) +bleu_metric: 46.92470064105599 +---------- +NL: define the function catalog. +ref: def catalog ( ) : +Output: def catalog ( ) : +bleu_metric: 100.0 +---------- +NL: define the method handle_data with 2 arguments self and d. +ref: def handle_data ( self , d ) : +Output: def handle _ data ( self, d ) : +bleu_metric: 63.15552371794036 +---------- +NL: define the function lock with arguments f and flags. +ref: def lock ( f , flags ) : +Output: def lock ( f, flags ) : +bleu_metric: 100.0 +---------- +NL: call the function force_text with an argument template_string. +ref: template_string = force_text ( template_string ) +Output: return force _ text ( template _ string ) +bleu_metric: 17.827531042796256 +---------- +NL: if potfile file path doesnt exist, +ref: if not os . path . exists ( potfile ) : +Output: if not os. path. exists ( potfile ) : +bleu_metric: 100.0 +---------- +NL: decrement self.active_writers by integer 1, +ref: self . active_writers -= 1 +Output: self. active _ writers - = 1 +bleu_metric: 35.49481056010052 +---------- +NL: if self has an attribute '_coerce', +ref: if hasattr ( self , '_coerce' ) : +Output: if hasattr ( self,'_ coerce') : +bleu_metric: 67.03420896351791 +---------- +NL: call the function _trans.templatize with 2 arguments: src and origin, return the result. +ref: return _trans . templatize ( src , origin ) +Output: return _ trans. templatize ( src, origin ) +bleu_metric: 72.92571723872932 +---------- +NL: define the method compile_string with 2 arguments: template_string and origin. +ref: def compile_string ( template_string , origin ) : +Output: def compile _ string ( template _ string, origin ) : +bleu_metric: 37.59663529467017 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: raise NotImplementedError exception with an argument string 'Subclasses must implement this method.'. +ref: raise NotImplementedError ( 'Subclasses must implement this method.' ) +Output: raise notimplementederror ('subclasses must implement this method.') +bleu_metric: 56.51873019421646 +---------- +NL: decorator function wraps with an argument func. +ref: @ wraps ( func ) +Output: @ wraps ( func ) +bleu_metric: 100.0 +---------- +NL: replace every occurrence of ' ' in value for '\xa0', return the result. +ref: return value . replace ( " " , "\xa0" ) +Output: return value. replace ('\ xa0 ','\ x xc') +bleu_metric: 63.177625391915704 +---------- +NL: append mw_instance.process_request at the end of request_middleware. +ref: request_middleware . append ( mw_instance . process_request ) +Output: request _ middleware. append ( request _ instance. process _ request ) +bleu_metric: 18.92240568795935 +---------- +NL: if boundary is false or return value of the method cgi.valid_boundary called with an argument boundary evaluates to false, +ref: if not boundary or not cgi . valid_boundary ( boundary ) : +Output: if not boundary or cgi. valid _ boundary ( boundary ) : +bleu_metric: 53.03624596095554 +---------- +NL: convert val to an list, substitute it for val. +ref: val = list ( val ) +Output: val = list ( val ) +bleu_metric: 100.0 +---------- +NL: if ValueError exception is caught. +ref: except ValueError : +Output: except valueerror : : : +bleu_metric: 31.239399369202552 +---------- +NL: import module re. +ref: import re +Output: import re +bleu_metric: 100.0 +---------- +NL: convert the first element of the result to uppercase, append to it the rest of the result, substitute it for capfirst. call the function allow_lazy with 3 arguments: capfirst and six.text_type. +ref: capfirst = allow_lazy ( capfirst , six . text_type ) +Output: attrs = allow _ lazy ( capfirst, six. text _ type ) +bleu_metric: 34.899812526885086 +---------- +NL: define the method eval with 2 arguments self and context. +ref: def eval ( self , context ) : +Output: def eval ( self, context ) : +bleu_metric: 100.0 +---------- +NL: from django.utils.six import StringIO into default name space. +ref: from django . utils . six import StringIO +Output: from django. utils. six import stringio +bleu_metric: 76.1894894736741 +---------- +NL: substitute size for self._size. +ref: self . _size = size +Output: self. _ size = size +bleu_metric: 36.55552228545124 +---------- +NL: errors is an empty list. +ref: errors = [ ] +Output: errors = [ ] +bleu_metric: 100.0 +---------- +NL: if 'error_messages' is contained in kwargs, +ref: if 'error_messages' in kwargs : +Output: if'error _ messages'in kwargs : +bleu_metric: 51.93071778680676 +---------- +NL: call the method self._add_local_translations. +ref: self . _add_local_translations ( ) +Output: self. _ add _ local _ translations ( ) +bleu_metric: 25.21193618434983 +---------- +NL: derive the class Node form the base class object. +ref: class Node ( object ) : +Output: class node ( object ) : +bleu_metric: 70.71067811865474 +---------- +NL: if os.path.sep is contained in fixture_name, +ref: if os . path . sep in fixture_name : +Output: if os. path. sep in fixture _ name : +bleu_metric: 61.153805769010226 +---------- +NL: define the method __init__ with 2 arguments: self and tokens. +ref: def __init__ ( self , tokens ) : +Output: def _ _ init _ _ ( self, tokens ) : +bleu_metric: 52.96074933406222 +---------- +NL: if primary_keys is true, +ref: if primary_keys : +Output: if primary _ keys : +bleu_metric: 31.239399369202552 +---------- +NL: define the method __mod__ with 2 arguments: self and rhs. +ref: def __mod__ ( self , rhs ) : +Output: def _ _ mod _ _ ( self, rhs ) : +bleu_metric: 52.96074933406222 +---------- +NL: if socket.error, renamed to e, exception is caught, +ref: except socket . error as e : +Output: except socket. error as e : : +bleu_metric: 80.91067115702212 +---------- +NL: substitute func for value under the '_setupfunc' key of the self.__dict__ dictionary. +ref: self . __dict__ [ '_setupfunc' ] = func +Output: self. _ _ dict _ _ ['_ setupfunc'] = func +bleu_metric: 29.34712724688436 +---------- +NL: data is None. +ref: data = None +Output: data = none +bleu_metric: 70.71067811865474 +---------- +NL: from django.utils.text import get_valid_filename into default name space. +ref: from django . utils . text import get_valid_filename +Output: from django. utils. text import get _ valid _ filename +bleu_metric: 55.936849159330734 +---------- +NL: otherwise if auto_id is true, +ref: elif auto_id : +Output: elif auto _ id : +bleu_metric: 31.239399369202552 +---------- +NL: call the method self.get_json_data with an argument escape_html, +ref: return json . dumps ( self . get_json_data ( escape_html ) ) +Output: return self. get _ json _ data ( escape _ html ) +bleu_metric: 16.451929399933107 +---------- +NL: self.nodelist_empty is an instance of NodeList class. +ref: self . nodelist_empty = NodeList ( ) +Output: self. nodelist _ empty = nodelist ( ) +bleu_metric: 28.997844147152072 +---------- +NL: if ValidationError renamed to e, exception is caught, +ref: except ValidationError as e : +Output: except validationerror as e : except : +bleu_metric: 35.49481056010052 +---------- +NL: app is a string 'django' +ref: app = 'django' +Output: app ='django ' +bleu_metric: 100.0 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: for every char in result of the self.add_truncation_text, called with 2 arguments: an empty string and truncate. +ref: for char in self . add_truncation_text ( '' , truncate ) : +Output: for char in self. add _ truncation _ text ('', truncate ) : +bleu_metric: 61.65255292124369 +---------- +NL: call the method ETAG_MATCH.findall with an argument etag_str, substitute the result for etags. +ref: etags = ETAG_MATCH . findall ( etag_str ) +Output: etags = etag _ match. findall ( etag _ str ) +bleu_metric: 24.022110864391532 +---------- +NL: if field_type equals a string 'AutoField(', +ref: if field_type == 'AutoField(' : +Output: if field _ type = ='autofield (': +bleu_metric: 39.832871551569504 +---------- +NL: c is an instance of the class SimpleCookie. +ref: c = SimpleCookie ( ) +Output: c = simplecookie ( ) +bleu_metric: 41.386440336942734 +---------- +NL: attrs is a dictionary containing 1 entry: return value of the smart_text function with argument obj._meta for 'model'. +ref: attrs = { "model" : smart_text ( obj . _meta ) } +Output: attrs = {'model': smart _ text ( obj. _ meta ) } +bleu_metric: 50.727846440621036 +---------- +NL: split ip_str into 2 parts from right, return second element of the result. +ref: return ip_str . rsplit ( ':' , 1 ) [ 1 ] +Output: return ip _ str. split ( ) [ 1 ] +bleu_metric: 32.80163552182343 +---------- +NL: define the function flatten_result with an argument source. +ref: def flatten_result ( source ) : +Output: def flatten _ result ( source ) : +bleu_metric: 53.7284965911771 +---------- +NL: if request._post_parse_error is true, +ref: if request . _post_parse_error : +Output: if request. _ post _ parse _ error : +bleu_metric: 25.21193618434983 +---------- +NL: except if KeyError exception is caught, +ref: except KeyError : +Output: except keyerror : +bleu_metric: 39.57341821670389 +---------- +NL: for every f in opts.fields, +ref: for f in opts . fields : +Output: for f in opts. fields : +bleu_metric: 100.0 +---------- +NL: where 'strdq' is replaced with '"[^"\\]*(?:\\.[^"\\]*)*"', 'strsq' is replaced with "'[^'\\]*(?:\\.[^'\\]*)*'", 'i18n_open' is replaced with return value of function re.escape called with an argument string '_(', 'i18n_close' is replaced with return value of function re.escape called with an argument string ')'. remove all occurrences of newline character from constant_string. +ref: constant_string = constant_string . replace ( "\n" , "" ) +Output: def _ _ init _ _ ( self ) : _ _ ('^ ', none ) : _ (? : _ +bleu_metric: 8.415986258156725 +---------- +NL: define the method incr with self, key, delta defaulting to integer 1 and version defaulting to None as arguments. +ref: def incr ( self , key , delta = 1 , version = None ) : +Output: def incr ( self, key, delta = 1, version = none ) : +bleu_metric: 83.94327083733336 +---------- +NL: if type of result is ConvertingDict, ConvertingList or ConvertingTuple, +ref: if type ( result ) in ( ConvertingDict , ConvertingList , ConvertingTuple ) : +Output: if type ( result ) in ( convertingdict, convertinglist, convertingtuple ) : +bleu_metric: 45.303726076701544 +---------- +NL: join missing_fields into a string separated by string ', ', use it and opts.model.__name__ to format message, substitute the result for message. +ref: message = message % ( ', ' . join ( missing_fields ) , opts . model . __name__ ) +Output: message ='% s. _ _ name _ _ ( ) +bleu_metric: 10.276795791404941 +---------- +NL: comment_lineno_cache is None. +ref: comment_lineno_cache = None +Output: comment _ lineno _ cache = none +bleu_metric: 18.5750579991336 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: use the remainder of the division of name by count as the argument for the call to the avoid_wrapping function, store the result in result. +ref: result = avoid_wrapping ( name % count ) +Output: result = avoid _ wrapping ( name % count ) +bleu_metric: 57.06745777055999 +---------- +NL: values is an empty list. +ref: values = [ ] +Output: values = [ ] +bleu_metric: 100.0 +---------- +NL: if field.rel.to._default_manager has an attribute 'get_by_natural_key', +ref: if hasattr ( field . rel . to . _default_manager , 'get_by_natural_key' ) : +Output: if hasattr ( field. rel. to. _ default _ manager,'get _ by _ natural _ key') : +bleu_metric: 44.58268699842813 +---------- +NL: self.dict is an instance of OrderedDict class, created with arguments: tuples with 2 argument x and None, for every x in iterables, +ref: self . dict = OrderedDict ( ( ( x , None ) for x in iterable ) if iterable else [ ] ) +Output: self. dict = ordereddict ( ( x, none ) for x in iterator ) : +bleu_metric: 31.244333987002797 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: register.tag decorator function with an argument 'filter', +ref: @ register . tag ( 'filter' ) +Output: @ register. tag ('filter') +bleu_metric: 100.0 +---------- +NL: define the function _samefile with arguments src and dst. +ref: def _samefile ( src , dst ) : +Output: def _ samefile ( src, dst ) : +bleu_metric: 69.89307622784943 +---------- +NL: requires_system_checks is boolean False. +ref: requires_system_checks = False +Output: requires _ system _ checks = false +bleu_metric: 18.5750579991336 +---------- +NL: alternatively, if six.PY3 is true check if message does not have an attribute 'message', if six.PY3 is false, check if message doesnt have an attribute 'code', perform the following, +ref: elif not hasattr ( message , 'message' if six . PY3 else 'code' ) : +Output: elif ( six. py3 if not hasattr ( message,'message') and not hasattr ( message,'code +bleu_metric: 41.26152034907945 +---------- +NL: if KeyError exception is caught, +ref: except KeyError : +Output: except keyerror : : : +bleu_metric: 31.239399369202552 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: convert d into a integer, subtract d from it, substitute the result for m. +ref: m = int ( d ) - d +Output: m = int ( d ) - d +bleu_metric: 100.0 +---------- +NL: define the function make_key with self class instance, key and version set to None as arguments. +ref: def make_key ( self , key , version = None ) : +Output: def make _ key ( self, key, version = none ) : +bleu_metric: 54.23782837718303 +---------- +NL: filemsg is a string 'file %s, ', where '%s' is replaced with origin. +ref: filemsg = 'file %s, ' % origin +Output: filemsg ='file % s,'% origin +bleu_metric: 100.0 +---------- +NL: if cls has an attribute k, +ref: if hasattr ( cls , k ) : +Output: if hasattr ( cls, k ) : +bleu_metric: 100.0 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: raise an TemplateSyntaxError exception with an argument string "back called without some previous parsing". +ref: raise TemplateSyntaxError ( "back called without some previous " "parsing" ) +Output: raise templatesyntaxerror ( " back called without some previous previous parser " ) +bleu_metric: 47.04071058096001 +---------- +NL: error_class, label_suffix and empty_permitted. for every field_name in self.fields, +ref: for field_name in self . fields : +Output: for field _ name in self. fields : +bleu_metric: 59.004687263928076 +---------- +NL: substitute upload_handlers for self._upload_handlers. +ref: self . _upload_handlers = upload_handlers +Output: self. _ upload _ handlers = upload _ handlers +bleu_metric: 17.827531042796256 +---------- +NL: if the key doesnt exists use sys.stdout as an argument. if value under the 'no_color' key of the options dictionary. +ref: if options . get ( 'no_color' ) : +Output: if options ['no _ color'] is not none : +bleu_metric: 15.911783110981517 +---------- +NL: if self.instance.pk is not None, +ref: if self . instance . pk is not None : +Output: if self. instance. pk is not none : +bleu_metric: 76.91605673134586 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: return klass. +ref: return klass +Output: return klass +bleu_metric: 100.0 +---------- +NL: value is an empty list. +ref: value = [ ] +Output: value = [ ] +bleu_metric: 100.0 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: import module time. +ref: import time +Output: import time +bleu_metric: 100.0 +---------- +NL: raise an NoReverseMatch exception with an argument string "%s is not a registered namespace", with '%s' replaced with key. +ref: raise NoReverseMatch ( "%s is not a registered namespace" % key ) +Output: raise noreversematch ( " % s is not a registered namespace " % key ) +bleu_metric: 78.04755352592598 +---------- +NL: append node to nodelist. +ref: nodelist . append ( node ) +Output: nodelist. append ( node ) +bleu_metric: 100.0 +---------- +NL: error_messages is an empty dictionary. substitute error_message for value under the 'invalid' key of the error_messages dictionary. +ref: error_messages [ 'invalid' ] = error_message +Output: error _ messages ['invalid'] = error _ message +bleu_metric: 47.03709593866897 +---------- +NL: if options.traceback is true or e is not CommandError instance, +ref: if options . traceback or not isinstance ( e , CommandError ) : +Output: if options. traceback or e is not commanderror : +bleu_metric: 34.49083812326534 +---------- +NL: return self._choices. +ref: return self . _choices +Output: return self. _ choices +bleu_metric: 50.813274815461476 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: call the method self._get_to_python with an argument pk_field, substitute the result for to_python. +ref: to_python = self . _get_to_python ( pk_field ) +Output: to _ python = self. _ get _ to _ python ( pk _ field ) +bleu_metric: 15.66384057330969 +---------- +NL: substitute varlist for self.varlist. +ref: self . _varlist = varlist +Output: self. varlist = varlist +bleu_metric: 45.180100180492246 +---------- +NL: return encoding. +ref: return encoding +Output: return encoding +bleu_metric: 100.0 +---------- +NL: if now equals to boolean True and now is not an instance of datetime.datetime, +ref: if now and not isinstance ( now , datetime . datetime ) : +Output: if now = = true and not isinstance ( now, datetime. datetime ) : +bleu_metric: 73.51460991014883 +---------- +NL: if token.contents equals a string 'else', +ref: if token . contents == 'else' : +Output: if token. contents = ='else': : +bleu_metric: 86.26751460052914 +---------- +NL: return results. +ref: return results +Output: return results +bleu_metric: 100.0 +---------- +NL: call the function plural_re.match with an argument t.contents, substitute the result for pluralmatch. +ref: pluralmatch = plural_re . match ( t . contents ) +Output: pluralmatch = plural _ re. match ( t. contents ) +bleu_metric: 64.50001140844255 +---------- +NL: for every middleware_method in self._exception_middleware, +ref: for middleware_method in self . _exception_middleware : +Output: for middleware _ method in self. _ exception _ middleware : +bleu_metric: 21.972813874997158 +---------- +NL: from xml.sax.saxutils import XMLGenerator into default name space. +ref: from xml . sax . saxutils import XMLGenerator +Output: from xml. lazy. langutils import xmlgenerator +bleu_metric: 33.03164318013807 +---------- +NL: if fields is true, +ref: if fields : +Output: if fields : +bleu_metric: 100.0 +---------- +NL: for every c in reversed order of self.__class__.__mro__, +ref: for c in reversed ( self . __class__ . __mro__ ) : +Output: for c in reversed ( self. _ _ class _ _. _ _ mro _ _ ) : +bleu_metric: 38.30597817747975 +---------- +NL: from django.utils import six into default name space. +ref: from django . utils import six +Output: from django. utils import six +bleu_metric: 100.0 +---------- +NL: return nothing. +ref: return +Output: return +bleu_metric: 100.0 +---------- +NL: return the string '', with occurrences of '%s' replaced by self.number and self.paginator.num_pages, respectively. +ref: return '' % ( self . number , self . paginator . num_pages ) +Output: return'< page % s of % s >'% ( self. number, self. paginator. num _ pages ) +bleu_metric: 72.64444538040294 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: default_error_messages is a dictionary with 4 initial entries: return value of the function _ called with string as an argument, +ref: default_error_messages = { 'invalid' : _ ( 'Enter a number.' ) , 'max_digits' : ungettext_lazy ( 'Ensure that there are no more than %(max)s digit in total.' , 'Ensure that there are no more than %(max)s digits in total.' , 'max' ) , 'max_decimal_places' : ungettext_lazy ( 'Ensure that there are no more than %(max)s decimal place.' , 'Ensure that there are no more than %(max)s decimal places.' , 'max' ) , 'max_whole_digits' : ungettext_lazy ( 'Ensure that there are no more than %(max)s digit before the decimal point.' , 'Ensure that there are no more than %(max)s digits before the decimal point.' , 'max' ) , } +Output: default _ error _ messages = {'invalid': _ ('enter a number.'), } _ +bleu_metric: 0.11242951010268665 +---------- +NL: _called_from_command_line is boolean False. +ref: _called_from_command_line = False +Output: _ called _ from _ command _ line = false +bleu_metric: 12.605968092174912 +---------- +NL: if opts.model is true, +ref: if opts . model : +Output: if opts. model : +bleu_metric: 100.0 +---------- +NL: define the method copy with an argument self. +ref: def copy ( self ) : +Output: def copy ( self ) : +bleu_metric: 100.0 +---------- +NL: collect is an empty list. +ref: collect = [ ] +Output: collect = [ ] +bleu_metric: 100.0 +---------- +NL: if length of value is not equal to integer 1, +ref: if len ( value ) != 1 : +Output: if len ( value )! = 1 : +bleu_metric: 100.0 +---------- +NL: self.blocks is a dictionary with elements: n for n.name, for every n in return value of the method nodelist.get_nodes_by_type, +ref: self . blocks = dict ( ( n . name , n ) for n in nodelist . get_nodes_by_type ( BlockNode ) ) +Output: self. blocks = dict ( ( n. get _ nodes _ by _ type ( n, nodelist. get _ nodes _ type ( n +bleu_metric: 35.40818918986726 +---------- +NL: label is an empty string. +ref: label = '' +Output: text ='' +bleu_metric: 75.98356856515926 +---------- +NL: substitute name for old_attr. +ref: old_attr = name +Output: old _ attr = name +bleu_metric: 35.93041119630843 +---------- +NL: get the next element of the iterable pattern_iter, assign the result for ch and escaped, respectively. +ref: ch , escaped = next ( input_iter ) +Output: ch, escaped = next ( pattern _ iter ) +bleu_metric: 57.06745777055999 +---------- +NL: if AttributeError or UnsupportedOperation exception occurred. +ref: except ( AttributeError , UnsupportedOperation ) : +Output: except ( attributeerror, unsupportedoperation ) : +bleu_metric: 28.729491522452538 +---------- +NL: raise an ValidationError with 2 arguments: value under the 'invalid_date' key of the self.error_messages dictionary and code set to string 'invalid_date'. +ref: raise ValidationError ( self . error_messages [ 'invalid_date' ] , code = 'invalid_date' ) +Output: raise validationerror ( self. error _ messages ['invalid _ date'], code ='invalid _ date') +bleu_metric: 34.233757203961886 +---------- +NL: define the method __init__ with 7 arguments: self, request, template, context set to None, content_type set to None, +ref: def __init__ ( self , request , template , context = None , content_type = None , status = None , current_app = None ) : +Output: def _ _ init _ _ ( self, request, template, context = none, content _ type = none, content _ type = none, +bleu_metric: 32.6369916232479 +---------- +NL: if self.field.cache_choices is true, +ref: if self . field . cache_choices : +Output: if self. field. cache _ choices : +bleu_metric: 51.93071778680676 +---------- +NL: define function fix_location_header with request and response as arguments. +ref: def fix_location_header ( request , response ) : +Output: def fix _ location _ header ( request, response ) : +bleu_metric: 52.96074933406222 +---------- +NL: delete attr. +ref: del attr +Output: del attr +bleu_metric: 100.0 +---------- +NL: pk_key is a string "%s-%s", where '%s' is replaced with: result of the method self.add_prefix called with an argument i, +ref: pk_key = "%s-%s" % ( self . add_prefix ( i ) , self . model . _meta . pk . name ) +Output: pk _ key = " % s - % s " % ( i ) +bleu_metric: 32.07892700757465 +---------- +NL: from __future__ import unicode_literals into default name space. +ref: from __future__ import unicode_literals +Output: from _ _ future _ _ import unicode _ literals +bleu_metric: 13.950796967929133 +---------- +NL: from __future__ import unicode_literals into default name space. +ref: from __future__ import unicode_literals +Output: from _ _ future _ _ import unicode _ literals +bleu_metric: 13.950796967929133 +---------- +NL: define the method widget_attrs with arguments self and widget. +ref: def widget_attrs ( self , widget ) : +Output: def widget _ attrs ( self, widget ) : +bleu_metric: 63.15552371794036 +---------- +NL: call the method self.to_python with an argument value, strip the whitespaces from the result, substitute it for value. +ref: value = self . to_python ( value ) . strip ( ) +Output: value = self. to _ python ( value ). strip ( ) +bleu_metric: 67.39047062564734 +---------- +NL: yield line. +ref: yield line +Output: yield line +bleu_metric: 100.0 +---------- +NL: write raw_data to self.file file. +ref: self . file . write ( raw_data ) +Output: self. file. write ( raw _ data ) +bleu_metric: 57.06745777055999 +---------- +NL: substitute empty_label for self.empty_label. +ref: self . empty_label = empty_label +Output: self. empty _ label = empty _ label +bleu_metric: 19.96019880774733 +---------- +NL: call the function import_string with an argument loader, substitute the result for TemplateLoader. +ref: TemplateLoader = import_string ( loader ) +Output: templateloader = import _ string ( loader ) +bleu_metric: 41.11336169005197 +---------- +NL: for every sql in return value of the function connection.creation.sql_for_pending_references called with arguments: model, style, +ref: alter_sql . extend ( [ '-- ' + sql for sql in connection . creation . sql_for_pending_references ( model , style , pending_references ) ] ) +Output: sql = connection. creation. sql _ for _ pending _ references ( model, style, sql _ style, sql _ sql _ references = { } +bleu_metric: 23.623790626704146 +---------- +NL: if response.streaming is true, +ref: if response . streaming : +Output: if response. streaming : : : : : : : : : : : : : : : : : : : +bleu_metric: 20.185159816886607 +---------- +NL: call the function force_text with an argument top_errors, format error_row with it, insert it at the beginning of output. +ref: output . insert ( 0 , error_row % force_text ( top_errors ) ) +Output: output. insert ( force _ text ( top _ errors ) ) _ output +bleu_metric: 27.22589423069702 +---------- +NL: return the result. decorator function register.filter with an argument is_safe set to boolean True. +ref: @ register . filter ( is_safe = True ) +Output: @ register. filter ( is _ safe = true ) +bleu_metric: 49.13270548144421 +---------- +NL: raise an ImproperlyConfigured with an argument string 'Loader does not define a "load_template" callable template source loader'. +ref: raise ImproperlyConfigured ( 'Loader does not define a "load_template" callable template source loader' ) +Output: raise improperlyconfigured ('loader does not def a " load _ template " callable _ templateer') +bleu_metric: 19.554016376461796 +---------- +NL: call the method self.coerce with an argument choice, append the result to new_value. +ref: new_value . append ( self . coerce ( choice ) ) +Output: new _ value. append ( self. coerce ( choice ) ) +bleu_metric: 77.60114635728618 +---------- +NL: for every i in sequence of integers, from 0 to the result of the method self.total_form_count, +ref: for i in range ( 0 , self . total_form_count ( ) ) : +Output: for i in range ( 0, self. total _ form _ count ( ) ) : +bleu_metric: 63.83240325919925 +---------- +NL: raise an NoReverseMatch exception with an argument string "Reverse for '%s' with arguments '%s' and keyword ", +ref: raise NoReverseMatch ( "Reverse for '%s' with arguments '%s' and keyword " "arguments '%s' not found. %d pattern(s) tried: %s" % ( lookup_view_s , args , kwargs , len ( patterns ) , patterns ) ) +Output: raise noreversematch ( " reverse for'% s'with arguments'% s ', keyword ) +bleu_metric: 9.381159089026506 +---------- +NL: if CommandError exception is caught, +ref: except CommandError : +Output: except commanderror : : : : +bleu_metric: 26.26909894424158 +---------- +NL: a string '%s_%s', where '%s' is replaced with tablename and f.name, respectively, return value of the function qn called with an argument tablename and return value of the function qn called with an argument f.name. join field_output elements into a string, separated by whitespaces, append it to table_output. +ref: table_output . append ( " " . join ( field_output ) ) +Output: table _ output. append ('\ n '. join ( field _ output ) ) +bleu_metric: 35.95818888322724 +---------- +NL: call the self.get_response with request as the argument, substitute the result for response. +ref: response = self . get_response ( request ) +Output: response = self. get _ response ( request ) +bleu_metric: 53.107253497886994 +---------- +NL: import module django.core.checks.compatibility.django_1_7_0. +ref: import django . core . checks . compatibility . django_1_7_0 +Output: import django. core. checks. compatibility. django _ 1 _ 7 _ 0 +bleu_metric: 54.50176720923847 +---------- +NL: escaped is boolean True. +ref: escaped = True +Output: escaped = true +bleu_metric: 70.71067811865474 +---------- +NL: call the method self.unclosed_block_tag with an argument list with an element endtag. +ref: self . unclosed_block_tag ( [ endtag ] ) +Output: self. unclosed _ block _ tag ( [ endtag ] ) +bleu_metric: 47.85543921093738 +---------- +NL: define the method __init__ with arguments: self, cmd and unpacked dictionary kwargs. +ref: def __init__ ( self , cmd , ** kwargs ) : +Output: def _ _ init _ _ ( self, cmd, * * kwargs ) : +bleu_metric: 64.70107100770991 +---------- +NL: is length of list_ equals integer 0, +ref: if len ( list_ ) == 0 : +Output: if len ( list _ ) = = 0 : +bleu_metric: 63.40466277046861 +---------- +NL: code set to string 'max_whole_digits' and params set to a dictionary with an entry: difference of the self.max_digits and self.decimal_places, for 'max'. return value. +ref: return value +Output: return value +bleu_metric: 100.0 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: if line ends with a new line character substitute width incremented by integer 1 for max_width, if not substitute width for max_width. +ref: max_width = min ( ( line . endswith ( '\n' ) and width + 1 or width ) , width ) +Output: max _ width = width if ( line. endswith ( b'\ n') and width + 1 else width ) +bleu_metric: 54.81799462606964 +---------- +NL: get translation_function attribute of the object t, call the result with an argument eol_message, substitute the result for result. +ref: result = getattr ( t , translation_function ) ( eol_message ) +Output: result = getattr ( t, translation _ function ) ( eol _ message ) +bleu_metric: 41.896825433302276 +---------- +NL: import module hmac. +ref: import hmac +Output: import hmac +bleu_metric: 100.0 +---------- +NL: from django.utils import six and lru_cache into default name space. +ref: from django . utils import six , lru_cache +Output: from django. utils import six, lru _ cache +bleu_metric: 67.86502681586725 +---------- +NL: call the method app_config.get_models with include_auto_created set to boolean True, substitute the result for models. +ref: models = app_config . get_models ( include_auto_created = True ) +Output: models = app _ config. get _ models ( include _ auto _ created = true ) +bleu_metric: 11.986062961075742 +---------- +NL: raise an TemplateDoesNotExist exception with an argument, elements of not_found joined into a string, separated with ', ' +ref: raise TemplateDoesNotExist ( ', ' . join ( not_found ) ) +Output: raise templatedoesnotexist ( not _ found [ : ] ) +bleu_metric: 10.811583508674765 +---------- +NL: return boolean False. +ref: return False +Output: return false +bleu_metric: 75.98356856515926 +---------- +NL: import_library and libraries. __all__ is a tuple containing 4 strings: 'Template', 'Context', 'RequestContext' and 'compile_string'. +ref: __all__ = ( 'Template' , 'Context' , 'RequestContext' , 'compile_string' ) +Output: import _ library, library. _ _ all _ _ = ('template ','requestcontext ', compile _ string') +bleu_metric: 17.05746719127207 +---------- +NL: define the function conditional_escape with an argument text. +ref: def conditional_escape ( text ) : +Output: def conditional _ escape ( text ) : +bleu_metric: 53.7284965911771 +---------- +NL: if candidate is not an instance of six.string_types, +ref: if not isinstance ( candidate , six . string_types ) : +Output: if not isinstance ( candidate, six. string _ types ) : +bleu_metric: 64.75445426291286 +---------- +NL: comment is an empty list. +ref: comment = [ ] +Output: comment = [ ] +bleu_metric: 100.0 +---------- +NL: extend all_models list with the result. call the function emit_post_migrate_signal with 4 arguments: all_models converted into a set, verbosity, interactive and database. +ref: emit_post_migrate_signal ( set ( all_models ) , verbosity , interactive , database ) +Output: emit _ post _ migrate _ signal ( all _ models, interactive, database ) +bleu_metric: 33.81307292971254 +---------- +NL: replace %s in string ' %s%s' with: line and character ',' if i is lesser than length of table_output decremented by one, +ref: full_statement . append ( ' %s%s' % ( line , ',' if i < len ( table_output ) - 1 else '' ) ) +Output: if ('% s % s'% ( line, ( table _ output - 1 ) ) : +bleu_metric: 36.09760024931269 +---------- +NL: if ch equals a string '?', +ref: if ch == '?' : +Output: if ch = = '?': : : +bleu_metric: 75.1049981570978 +---------- +NL: substitute inverse_match for self.inverse_match. +ref: self . inverse_match = inverse_match +Output: self. inverse _ match = inverse _ match +bleu_metric: 19.96019880774733 +---------- +NL: assign self.model._meta.pk to self._pk_field and pk. +ref: self . _pk_field = pk = self . model . _meta . pk +Output: self. _ pk _ field, pk = self. model. _ meta. pk +bleu_metric: 39.3454937704783 +---------- +NL: call the __init__ method with 3 arguments: ERROR, unpacked list args and unpacked dictionary kwargs from the base class of Error. +ref: return super ( Error , self ) . __init__ ( ERROR , * args , ** kwargs ) +Output: super ( error, self ). _ _ init _ _ ( error, * args, * * kwargs ) +bleu_metric: 51.31275135405763 +---------- +NL: if token.token_type equals integer 0, +ref: if token . token_type == 0 : +Output: if token. token _ type = = 0 : +bleu_metric: 53.107253497886994 +---------- +NL: if string 'forloop' is contained in context, +ref: if 'forloop' in context : +Output: if'forloop'in context : +bleu_metric: 100.0 +---------- +NL: derive the class BoundaryIter from the six.Iterator base class. +ref: class BoundaryIter ( six . Iterator ) : +Output: class boundaryiter ( six. iterator ) : +bleu_metric: 35.15059938464902 +---------- +NL: substitute path_info for self.path_info. +ref: self . path_info = path_info +Output: self. path _ info = path _ info +bleu_metric: 19.96019880774733 +---------- +NL: define the method clean with arguments self and value. +ref: def clean ( self , value ) : +Output: def clean ( self, value ) : +bleu_metric: 100.0 +---------- +NL: string '--keyword=gettext_noop', string '--keyword=gettext_lazy', string '--keyword=ngettext_lazy:1,2', string '--keyword=ugettext_noop', string '--keyword=ugettext_lazy', string '--keyword=ungettext_lazy:1,2', string '--keyword=pgettext:1c,2', string '--keyword=npgettext:1c,2,3', string '--keyword=pgettext_lazy:1c,2', string '--keyword=npgettext_lazy:1c,2,3' and string '--output=-', substitute the result for args. append work_file to args. +ref: args . append ( work_file ) +Output: self. work _ file = ('- - key ', none ) +bleu_metric: 11.502783619900047 +---------- +NL: if html is true, +ref: if html : +Output: if html : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : +bleu_metric: 5.919382824640358 +---------- +NL: substitute is_reversed for self.is_reversed. +ref: self . is_reversed = is_reversed +Output: self. is _ reversed = is _ reversed +bleu_metric: 19.96019880774733 +---------- +NL: define the function total_ordering with an argument cls. +ref: def total_ordering ( cls ) : +Output: def total _ ordering ( cls ) : +bleu_metric: 53.7284965911771 +---------- +NL: return an empty string, +ref: return '' +Output: return'' +bleu_metric: 100.0 +---------- +NL: append string '-- The following references should be added but depend on non-existent tables:' to the final_output. +ref: final_output . append ( '-- The following references should be added but depend on non-existent tables:' ) +Output: final _ output. append ('- - - : references or non _ tables : ', none ) +bleu_metric: 32.08521724608534 +---------- +NL: substitute the result for the value under the 'month' key of the html dictionary. for every i in successive list of integers from 1 to 30, append tuple containing i and i elements into a list, +ref: choices = [ ( i , i ) for i in range ( 1 , 32 ) ] +Output: return [ ( i, i ) for i in reversed ( i, 1 ) ] +bleu_metric: 55.5823725182819 +---------- +NL: call the method self._clean_form. +ref: self . _clean_form ( ) +Output: self. _ clean _ form ( ) +bleu_metric: 31.239399369202552 +---------- +NL: for every handler in handlers, +ref: for handler in handlers : +Output: for handler in handlers : +bleu_metric: 100.0 +---------- +NL: if imatch is true, +ref: if imatch : +Output: if imatch : +bleu_metric: 100.0 +---------- +NL: return None. +ref: return None +Output: return none +bleu_metric: 75.98356856515926 +---------- +NL: factor is integer 0. +ref: factor = 0 +Output: factor = 0 +bleu_metric: 100.0 +---------- +NL: from django.core.management.sql import sql_custom into default name space. +ref: from django . core . management . sql import sql_custom +Output: from django. core. management. sql import sql _ custom +bleu_metric: 73.61703354503865 +---------- +NL: substitute length of tokens for l. +ref: l = len ( tokens ) +Output: l = len ( tokens ) +bleu_metric: 100.0 +---------- +NL: if fk_name is true, +ref: if fk_name : +Output: if fk _ name : +bleu_metric: 31.239399369202552 +---------- +NL: if HTMLParseError exception is caught, +ref: except HTMLParseError : +Output: except htmlparseerror : +bleu_metric: 39.57341821670389 +---------- +NL: get the name of the callback, substitute it for view_name. +ref: view_name = callback . __name__ +Output: view _ name = callback. get ( ) +bleu_metric: 23.462350320528 +---------- +NL: define the method __setattr__ with self, name and value as arguments. +ref: def __setattr__ ( self , name , value ) : +Output: def _ _ setattr _ _ ( self, name, value ) : +bleu_metric: 59.687741756344955 +---------- +NL: substitute use_l10n for self.use_l10n. +ref: self . use_l10n = use_l10n +Output: self. use _ l10n = use _ l10n +bleu_metric: 19.96019880774733 +---------- +NL: call the method kwarg_re.match with an argument first element of bits, substitute the result for match. +ref: match = kwarg_re . match ( bits [ 0 ] ) +Output: match = kwarg _ re. match ( bits [ 0 ] ) +bleu_metric: 67.29864884660303 +---------- +NL: for every hook in sys.path_hooks, +ref: for hook in sys . path_hooks : +Output: for hook in sys. path _ options : +bleu_metric: 51.93071778680676 +---------- +NL: intrans is boolean False. +ref: intrans = False +Output: intrans = false +bleu_metric: 70.71067811865474 +---------- +NL: formated with c, filemsg and comment_lineno_cache. call the function warnings.warn with 2 arguments: warn_msg and TranslatorCommentWarning. +ref: warnings . warn ( warn_msg , TranslatorCommentWarning ) +Output: warnings. warn ( warn _ msg, translatorcommentwarning ) +bleu_metric: 37.700638045494706 +---------- +NL: define the method compress with arguments self and data_list. +ref: def compress ( self , data_list ) : +Output: def compress ( self, data _ list ) : +bleu_metric: 53.107253497886994 +---------- +NL: derive the class ViewDoesNotExist from the Exception base class. +ref: class ViewDoesNotExist ( Exception ) : +Output: class viewdoesnotexist ( exception ) : +bleu_metric: 24.924249970265265 +---------- +NL: call the method final_output.extend with an argument output. +ref: final_output . extend ( output ) +Output: final _ output. extend ( output ) +bleu_metric: 63.89431042462724 +---------- +NL: requires_system_checks is boolean False. +ref: requires_system_checks = False +Output: requires _ system _ checks = false +bleu_metric: 18.5750579991336 +---------- +NL: substitute it for candidate_subs. if not, +ref: else : +Output: else : : : +bleu_metric: 42.728700639623405 +---------- +NL: if self.choices is true, +ref: if self . choices : +Output: if self. choices : +bleu_metric: 100.0 +---------- +NL: call the function resolver.resolve_error_handler with status_code as an argument, assign the result to the callback and param_dict, respectively. +ref: callback , param_dict = resolver . resolve_error_handler ( status_code ) +Output: callback, param _ dict = resolver. resolve _ error _ handler ( status _ code ) +bleu_metric: 16.679551613797315 +---------- +NL: define the method render with an argument self. +ref: def render ( self ) : +Output: def render ( self ) : +bleu_metric: 100.0 +---------- +NL: return data. +ref: return data +Output: return data +bleu_metric: 100.0 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: remove config dictionary element under 'level' key, if it exists substitute it for level, if not, level is None. +ref: level = config . pop ( 'level' , None ) +Output: level = config. pop ('level ', none ) +bleu_metric: 80.91067115702212 +---------- +NL: call the function flatten_result with an argument item, assign the result to res and args, respectively. +ref: res , args = flatten_result ( item ) +Output: res, args = flatten _ result ( item ) +bleu_metric: 53.107253497886994 +---------- +NL: substitute obj_pk.pk for obj_pk. +ref: obj_pk = obj_pk . pk +Output: obj _ pk = obj _ pk. pk +bleu_metric: 19.96019880774733 +---------- +NL: return boolean False. +ref: return False +Output: return false +bleu_metric: 75.98356856515926 +---------- +NL: derive the class NoReverseMatch with Exception as base class. +ref: class NoReverseMatch ( Exception ) : +Output: class noreversematch ( exception ) : +bleu_metric: 28.751742289713444 +---------- +NL: import module json. +ref: import json +Output: import json +bleu_metric: 100.0 +---------- +NL: use global variable _default. +ref: global _default +Output: global _ default +bleu_metric: 53.7284965911771 +---------- +NL: define the method configure_handler with 2 arguments: self and config. +ref: def configure_handler ( self , config ) : +Output: def configure _ handler ( self, config ) : +bleu_metric: 63.15552371794036 +---------- +NL: if ch is not equal to string '\\'. +ref: if ch != '\\' : +Output: if ch! ='\': +bleu_metric: 79.5637166192145 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: format translated with rhs, substitute the result for translated. +ref: translated = translated % rhs +Output: translated = translated. format ( rhs ) +bleu_metric: 27.776190340117914 +---------- +NL: and directory_permissions_mode set to None. if location is None, +ref: if location is None : +Output: if location is none : +bleu_metric: 48.8923022434901 +---------- +NL: biggest_number is maximum numbers element. +ref: biggest_number = max ( [ x for x in numbers if x is not None ] ) +Output: biggest _ number = len ( ) +bleu_metric: 6.870470052394348 +---------- +NL: wsgi_opts is a dictionary with 4 initial entries: value under the key 'maxspare' of options dictionary converted to an integer, +ref: wsgi_opts = { 'maxSpare' : int ( options [ "maxspare" ] ) , 'minSpare' : int ( options [ "minspare" ] ) , 'maxChildren' : int ( options [ "maxchildren" ] ) , 'maxRequests' : int ( options [ "maxrequests" ] ) , } +Output: wsgi _ opts = {'maxdie': int ( options ['maxdie'], int ( options ), +bleu_metric: 7.794049382119763 +---------- +NL: raise an AttributeError exception with an argument string "You cannot set content to a 304 (Not Modified) response". +ref: raise AttributeError ( "You cannot set content to a 304 (Not Modified) response" ) +Output: raise attributeerror ( " you cannot set content to a 304 ( not modified ) response " ) +bleu_metric: 53.879875614671356 +---------- +NL: is_usable is boolean True. +ref: is_usable = True +Output: is _ usable = true +bleu_metric: 27.301208627090666 +---------- +NL: raise an ValueError exception wit an argument string "Not a string literal: %r", where "%r" is replaced with s. +ref: raise ValueError ( "Not a string literal: %r" % s ) +Output: raise valueerror ( " not a string literal : % r " % s. name ) +bleu_metric: 56.13959048116961 +---------- +NL: yield string 'year' as an return value of the generator. +ref: yield 'year' +Output: yield'year ' +bleu_metric: 100.0 +---------- +NL: if scheme is countaine in self.url_schemes return boolean True, otherwise return False. +ref: return scheme in self . url_schemes +Output: return scheme in self. url _ schemes +bleu_metric: 58.739490946992134 +---------- +NL: if six.PY2 is true and value is greater than sys.maxint, +ref: if six . PY2 and value > sys . maxint : +Output: if six. py2 and value > sys. maxint : +bleu_metric: 76.11606003349893 +---------- +NL: if match is true, +ref: if match : +Output: if match : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : +bleu_metric: 3.840050896652556 +---------- +NL: define the method extend_nodelist with 4 arguments: self, nodelist, node and token. +ref: def extend_nodelist ( self , nodelist , node , token ) : +Output: def extend _ nodelist ( self, nodelist, node, token ) : +bleu_metric: 73.67565054628356 +---------- +NL: for every form in self call the method form.has_changed if any of the results evaluates to true, return boolean True, +ref: return any ( form . has_changed ( ) for form in self ) +Output: return form. has _ changed ( self ) if form. has _ changed ( ) : +bleu_metric: 13.947196297357516 +---------- +NL: convert exclude elements to list, substitute it for construct_instance_exclude. +ref: construct_instance_exclude = list ( exclude ) +Output: construct _ instance _ exclude = list ( exclude ) +bleu_metric: 51.566269182398216 +---------- +NL: if new_conn_created is true, +ref: if new_conn_created : +Output: if new _ conn _ created : +bleu_metric: 22.679164443904003 +---------- +NL: decorator method register.tag with an argument 'block', +ref: @ register . tag ( 'block' ) +Output: @ register. tag ('block') +bleu_metric: 100.0 +---------- +NL: if bf_errors is true, +ref: if bf_errors : +Output: if bf _ errors : +bleu_metric: 31.239399369202552 +---------- +NL: if self.is_bound is false, +ref: if not self . is_bound : +Output: if not self. is _ bound : +bleu_metric: 45.18010018049224 +---------- +NL: if var starts with '_(' and var ends with ')', +ref: if var . startswith ( '_(' ) and var . endswith ( ')' ) : +Output: if var. startswith ('_ (')') and var. endswith (')') : +bleu_metric: 89.86505734084011 +---------- +NL: __M is a raw string '(?P\w{3})'. +ref: __M = r'(?P\w{3})' +Output: _ _ m = r'(? p < call > \ w { 3 } ) ' +bleu_metric: 61.53267326643309 +---------- +NL: where '%s' is replaced with tag and TemplateTagNode.mapping converted into a list. return an instance of a TemplateTagNode class, created with an argument tag. +ref: return TemplateTagNode ( tag ) +Output: return templatetagnode ( tag ) +bleu_metric: 46.10584375680587 +---------- +NL: define the method strftime with 2 arguments: self and fmt. +ref: def strftime ( self , fmt ) : +Output: def strftime ( self, fmt ) : +bleu_metric: 100.0 +---------- +NL: if stream_or_string is an instance of six.string_types type. +ref: if isinstance ( stream_or_string , six . string_types ) : +Output: if isinstance ( stream _ or _ string, six. string _ types ) : +bleu_metric: 24.848852650155177 +---------- +NL: set attr.name attribute of Module_six_moves_urllib_response object to attr. +ref: setattr ( Module_six_moves_urllib_response , attr . name , attr ) +Output: setattr ( module _ six _ moves _ urllib _ response, attr. name, attr ) +bleu_metric: 43.48553979929487 +---------- +NL: define the method write with 3 arguments self, outfile and encoding. +ref: def write ( self , outfile , encoding ) : +Output: def write ( self, outfile, encoding ) : +bleu_metric: 100.0 +---------- +NL: skip this loop iteration, +ref: continue +Output: continue +bleu_metric: 100.0 +---------- +NL: define the method add_filters with 3 arguments: self, filterer and filters. +ref: def add_filters ( self , filterer , filters ) : +Output: def add _ filters ( self, filterer, filters ) : +bleu_metric: 69.30977286178778 +---------- +NL: call the method time_str.decode with an argument string 'utf-8', substitute the result for time_str. +ref: time_str = time_str . decode ( 'utf-8' ) +Output: time _ str = time _ str. decode ('utf - 8') +bleu_metric: 58.56596027429395 +---------- +NL: call the function new_method_proxy with an argument dir, substitute the result for __dir__. +ref: __dir__ = new_method_proxy ( dir ) +Output: _ _ dir _ _ = new _ method _ proxy ( dir ) _ _ dir _ proxy ( dir ) +bleu_metric: 15.415064977510756 +---------- +NL: define the method __len__ with an argument self. +ref: def __len__ ( self ) : +Output: def _ _ len _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: call the method token.split_contents, substitute results without the first element for bits. +ref: bits = token . split_contents ( ) [ 1 : ] +Output: bits = token. split _ contents ( ) [ 1 : ] +bleu_metric: 64.75445426291286 +---------- +NL: multiply offset.days with 86400, add offset.seconds to the result, return the result. +ref: return offset . days * 86400 + offset . seconds +Output: return offset. days * ( offset. seconds / 60 ) +bleu_metric: 44.534504264163466 +---------- +NL: join self into a bytes string, yield the result as the return value of the generator. +ref: yield b'' . join ( self ) +Output: yield b''. join ( self ) +bleu_metric: 100.0 +---------- +NL: import module warnings. +ref: import warnings +Output: import warnings +bleu_metric: 100.0 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: import module warnings. +ref: import warnings +Output: import warnings +bleu_metric: 100.0 +---------- +NL: return a tuple with 3 elements: TYPE, outdict and stream. +ref: return ( TYPE , outdict , stream ) +Output: return type, outdict, stream +bleu_metric: 39.027754150798174 +---------- +NL: from collections import OrderedDict into default name space. +ref: from collections import OrderedDict +Output: from collections import ordereddict +bleu_metric: 52.08154731870476 +---------- +NL: define the function safe_join with 2 arguments base and unpacked dictionary paths. +ref: def safe_join ( base , * paths ) : +Output: def safe _ join ( base, * * paths ) : +bleu_metric: 53.16967153331754 +---------- +NL: convert newline character to unicode and substitute the result for newline. +ref: newline = unicode ( "\n" ) +Output: newline = unicode ( b'\ n') +bleu_metric: 73.48889200874657 +---------- +NL: call the function datetime.utcfromtimestamp with argument timeout, substitute it for exp. +ref: exp = datetime . utcfromtimestamp ( timeout ) +Output: exp = datetime. utcfromtimestamp ( timeout ) +bleu_metric: 100.0 +---------- +NL: substitute BOOL for LockFileEx.restype. +ref: LockFileEx . restype = BOOL +Output: lockfileex. restype = bool +bleu_metric: 34.061156713521726 +---------- +NL: get the value under the format key of the _serializers dictionary, return the Serializer filed of the result. +ref: return _serializers [ format ] . Serializer +Output: return _ serializers [ format ]. serializer ( ) +bleu_metric: 33.18077402843942 +---------- +NL: if num_loopvars is greater than integer 1, unpack is an boolean True, otherwise is an boolean False. +ref: unpack = num_loopvars > 1 +Output: unpack = num _ loopvars > 1 +bleu_metric: 30.739407647563223 +---------- +NL: call the function mark_safe with an argument word, substitute the result for i-th element of words. +ref: words [ i ] = mark_safe ( word ) +Output: words [ i ] = mark _ safe ( word ) +bleu_metric: 57.835698664651424 +---------- +NL: evaluate function Lock() assign the result to initLock. +ref: initLock = Lock ( ) +Output: initlock = lock ( ) +bleu_metric: 36.79832735299481 +---------- +NL: and code set to string 'invalid'. decorator deconstructible, +ref: @ deconstructible +Output: @ deconstructible +bleu_metric: 100.0 +---------- +NL: bring integer 2 to the power of 10, multiply it by integer 64, substitute the result for chunk_size. +ref: chunk_size = 64 * 2 ** 10 +Output: chunk _ size = 64 * 2 * * 10 +bleu_metric: 67.86502681586725 +---------- +NL: define the method __init__ with 2 arguments: self and conditions_nodelists. +ref: def __init__ ( self , conditions_nodelists ) : +Output: def _ _ init _ _ ( self, conditions _ nodelists ) : +bleu_metric: 22.894156860669913 +---------- +NL: define the method _save with arguments self, name and content. +ref: def _save ( self , name , content ) : +Output: def _ save ( self, name, content ) : +bleu_metric: 75.39221180326288 +---------- +NL: substitute '%s' in string '%s_%s' with id_ and first_select, return it. +ref: return '%s_%s' % ( id_ , first_select ) +Output: return'% s _ % s'% id _, first _ select +bleu_metric: 31.53554052490132 +---------- +NL: if length of key is greater than MEMCACHE_MAX_KEY_LENGTH, +ref: if len ( key ) > MEMCACHE_MAX_KEY_LENGTH : +Output: if len ( key ) > memcache _ max _ key _ length : +bleu_metric: 41.211837513230265 +---------- +NL: if formfield is true, +ref: if formfield : +Output: if formfield : +bleu_metric: 100.0 +---------- +NL: set cache to the value of the dictionary caches under the key settings.CACHE_MIDDLEWARE_ALIAS. +ref: cache = caches [ settings . CACHE_MIDDLEWARE_ALIAS ] +Output: caches [ cache _ middleware _ alias ] = cache. cache _ middleware _ alias +bleu_metric: 12.512236921161914 +---------- +NL: return nodelist_true_output, if true, if not call the method self.nodelist_true.render with an argument context and return the result. +ref: return nodelist_true_output or self . nodelist_true . render ( context ) +Output: return nodelist _ true _ output or context. render ( context ) +bleu_metric: 42.61082723917017 +---------- +NL: convert elements of self into a list, return the its printable representation. +ref: return repr ( list ( self ) ) +Output: return repr ( self ) +bleu_metric: 37.74640312757081 +---------- +NL: if number is greater than self.num_pages, +ref: if number > self . num_pages : +Output: if number > self. num _ pages : +bleu_metric: 51.93071778680676 +---------- +NL: replace all the strings '\\' with '/' in the string name, use it as an argument for the call to the force_text function, return the result. +ref: return force_text ( name . replace ( '\\' , '/' ) ) +Output: return force _ text ( name ='\ \ ','/') +bleu_metric: 55.19468837375201 +---------- +NL: return boolean True. +ref: return False +Output: return true +bleu_metric: 75.98356856515926 +---------- +NL: and construct as boolean False, return the result. save.alters_data is boolean True. +ref: save . alters_data = True +Output: save. alters _ data = true +bleu_metric: 26.26909894424158 +---------- +NL: substitute s1 for s. +ref: s = s1 +Output: s = s1 +bleu_metric: 100.0 +---------- +NL: string '%Y-%m-%d', convert the result into a string and append it to ',', substitute the result for d. format string 'tag:%s%s:%s/%s' with bits.hostname, d, bits.path and bits.fragment, return it. +ref: return 'tag:%s%s:%s/%s' % ( bits . hostname , d , bits . path , bits . fragment ) +Output: return'tag : % s : % s / % s'% ( bits. host, bits. fragment ) +bleu_metric: 62.833020966865135 +---------- +NL: return integer 0. +ref: return 0 +Output: return 0 +bleu_metric: 100.0 +---------- +NL: if cache_timeout equals to None, +ref: if cache_timeout is None : +Output: if cache _ timeout = = none : +bleu_metric: 19.96019880774733 +---------- +NL: derive the class TemplateLiteral from Literal base class. +ref: class TemplateLiteral ( Literal ) : +Output: class template lines long ( literal ) : +bleu_metric: 29.07153684841096 +---------- +NL: call the function termcolors.parse_color_setting with DJANGO_COLORS as an argument, assign the result to color_settings. +ref: color_settings = termcolors . parse_color_setting ( DJANGO_COLORS ) +Output: color _ settings = termcolors. parse _ color _ setting ( django _ colors ) +bleu_metric: 16.61742929957894 +---------- +NL: TRANSLATOR_COMMENT_MARK is a string 'Translators'. +ref: TRANSLATOR_COMMENT_MARK = 'Translators' +Output: translator _ comment _ mark ='translations ' +bleu_metric: 20.86130724305753 +---------- +NL: call to the self.handle_uncaught_exception method with request, resolver and value of the evaluated function sys.exec_info, +ref: response = self . handle_uncaught_exception ( request , resolver , sys . exc_info ( ) ) +Output: response = self. handle _ uncaught _ exception ( request, resolver, sys. exc _ info ( ) ) +bleu_metric: 48.88156258282175 +---------- +NL: substitute item_date for latest_date. +ref: latest_date = item_date +Output: latest _ date = item _ date +bleu_metric: 18.5750579991336 +---------- +NL: call the signed_value.rsplit method with arguments self.sep and integer 1, substitute the result for value and sig, respectively. +ref: value , sig = signed_value . rsplit ( self . sep , 1 ) +Output: value, sig = signed _ value. rsplit ( self. sep, 1 ) +bleu_metric: 71.60350546947922 +---------- +NL: call the method f.value_from_object with an argument instance, substitute the result for qs. +ref: qs = f . value_from_object ( instance ) +Output: qs = f. value _ from _ object ( instance ) +bleu_metric: 44.534504264163466 +---------- +NL: from email import charset as Charset, encoders as Encoders, message_from_string and generator. +ref: from email import ( charset as Charset , encoders as Encoders , message_from_string , generator ) +Output: from email import charset as charcoders as encoders, message _ from _ string, generator +bleu_metric: 19.679212551230012 +---------- +NL: if v is an instance of list or tuple type, +ref: if isinstance ( v , ( list , tuple ) ) : +Output: if isinstance ( v, ( list, tuple ) ) : +bleu_metric: 100.0 +---------- +NL: incomment is boolean True. +ref: incomment = True +Output: incomment = true +bleu_metric: 70.71067811865474 +---------- +NL: return self._num_pages. +ref: return self . _num_pages +Output: return self. _ num _ pages +bleu_metric: 34.5720784641941 +---------- +NL: call the function get_supported_language_variant with an argument accept_lang, return the result. +ref: return get_supported_language_variant ( accept_lang ) +Output: return get _ supported _ language _ variant ( accept _ lang ) +bleu_metric: 13.217947626377288 +---------- +NL: call the function unicodedata.combining with an argument char, if it evaluates to true, +ref: if unicodedata . combining ( char ) : +Output: if unicodedata. combining ( char ) : +bleu_metric: 100.0 +---------- +NL: return value of the call to the function _ with an argument string 'Enter only digits separated by commas.' and string 'invalid'. decorator deconstructible, +ref: @ deconstructible +Output: @ deconstructible ( enterfile,'enter') +bleu_metric: 21.200626759025184 +---------- +NL: get the value under the 'use_base_manager' key of the options dictionary, substitute the result for use_base_manager. +ref: use_base_manager = options . get ( 'use_base_manager' ) +Output: use _ base _ manager = options. get ('use _ base _ manager') +bleu_metric: 35.846689280970864 +---------- +NL: define the function reverse with 6 arguments: viewname, urlconf set to None, args set to None, kwargs set to None, +ref: def reverse ( viewname , urlconf = None , args = None , kwargs = None , prefix = None , current_app = None ) : +Output: def reverse ( viewname, urlconf = none, args = none, kwargs = none, kwargs = none, +bleu_metric: 35.004836399162585 +---------- +NL: if self._is_rendered is true, +ref: if self . _is_rendered : +Output: if self. _ is _ rendered : +bleu_metric: 31.239399369202552 +---------- +NL: while current_len is smaller than or equal to length, +ref: while current_len <= length : +Output: while current _ len < = length : +bleu_metric: 53.7284965911771 +---------- +NL: define the function _set_response_etag, with response as an argument. +ref: def _set_response_etag ( response ) : +Output: def _ set _ response _ etag ( response ) : +bleu_metric: 39.553325358771794 +---------- +NL: decorator function register.filter with an argument string "escapejs". +ref: @ register . filter ( "escapejs" ) +Output: @ register. filter ( " escapejs " ) +bleu_metric: 100.0 +---------- +NL: if mw_instance has an attribute named 'process_response'. +ref: if hasattr ( mw_instance , 'process_response' ) : +Output: if hasattr ( mw _ instance,'process _ response') : +bleu_metric: 33.649324423301515 +---------- +NL: call the method self.xml.endElement with an argument string 'object'. +ref: self . xml . endElement ( "object" ) +Output: self. xml. endelement ( " object " ) +bleu_metric: 67.10275993197631 +---------- +NL: replace '%s' in string 'django_%s_template_' with self.app_or_project. +ref: prefix = 'django_%s_template_' % self . app_or_project +Output: self. app _ or _ project ='django _ % s _ template _'% self. app _ or _ project +bleu_metric: 16.081986819293686 +---------- +NL: call the method blankout with 2 arguments: part and 'S', write the result to out. +ref: out . write ( blankout ( part , 'S' ) ) +Output: out. write ( blankout ( part,'s') ) +bleu_metric: 80.03203203844998 +---------- +NL: from django.utils import six into default name space. +ref: from django . utils import six +Output: from django. utils import six +bleu_metric: 100.0 +---------- +NL: call the method parser.add_argument with 3 arguments: string 'args', metavar set to string 'app_label' and nargs set to '*'. +ref: parser . add_argument ( 'args' , metavar = 'app_label' , nargs = '*' ) +Output: parser. add _ argument ('args ', metavar ='* ', nargs ='*') +bleu_metric: 68.79419393521871 +---------- +NL: if six.PY2 is true, +ref: if six . PY2 : +Output: if six. py2 : +bleu_metric: 48.8923022434901 +---------- +NL: self.waiting_readers is integer 0. +ref: self . waiting_readers = 0 +Output: self. waiting _ readers = 0 +bleu_metric: 30.739407647563223 +---------- +NL: call the method node.render with an argument context, return the result. +ref: return node . render ( context ) +Output: return node. render ( context ) +bleu_metric: 100.0 +---------- +NL: call the os.path.splitex with argument name, assign the result to name and ext, respectively. +ref: name , ext = os . path . splitext ( name ) +Output: name, ext = os. path. splitex ( name ) +bleu_metric: 78.25422900366436 +---------- +NL: decorator stringfilter, +ref: @ stringfilter +Output: @ stringfilter +bleu_metric: 100.0 +---------- +NL: PATTERN is a string "classdef< 'class' any+ ':'suite< any*funcdef< 'def' unifunc='__unicode__'parameters< '(' NAME ')' > any+ >any* > >". +ref: PATTERN = """ classdef< 'class' any+ ':' suite< any* funcdef< 'def' unifunc='__unicode__' parameters< '(' NAME ')' > any+ > any* > > """ +Output: pattern = ( classdef <'class _ unicode _ _ ', any ='name') > any force _ > ' +bleu_metric: 8.707776258159534 +---------- +NL: self.invoked_for_django is boolean True. +ref: self . invoked_for_django = True +Output: self. invoked _ for _ django = true +bleu_metric: 19.96019880774733 +---------- +NL: substitute kwargs for media_attrs. +ref: media_attrs = kwargs +Output: media _ attrs = kwargs +bleu_metric: 35.93041119630843 +---------- +NL: define the method read with 3 arguments: self, unpacked list args and unpacked dictionary kwargs. +ref: def read ( self , * args , ** kwargs ) : +Output: def read ( self, * args, * * kwargs ) : +bleu_metric: 100.0 +---------- +NL: divide num by self._cull_frequency, floor the result and substitute it for cull_num. +ref: cull_num = num // self . _cull_frequency +Output: cull _ num = num / self. _ cull _ frequency +bleu_metric: 26.91109110344471 +---------- +NL: define the function cleanup_url with an argument url. +ref: def cleanup_url ( url ) : +Output: def cleanup _ url ( url ) : +bleu_metric: 53.7284965911771 +---------- +NL: define the method streaming_content with 2 arguments: self and value. +ref: def streaming_content ( self , value ) : +Output: def streaming _ content ( self, value ) : +bleu_metric: 63.15552371794036 +---------- +NL: import module re. +ref: import re +Output: import re +bleu_metric: 100.0 +---------- +NL: substitute compile_function for self.tags dictionary value under the name key. +ref: self . tags [ name ] = compile_function +Output: self. tags [ name ] = compile _ function +bleu_metric: 67.86502681586725 +---------- +NL: unpack the manifest.values function return value and feed it to the itertools.chain function, create_models is a set containing chanied list. +ref: create_models = set ( itertools . chain ( * manifest . values ( ) ) ) +Output: create _ models = set ( manifest. valuess. chain ( value ) ) +bleu_metric: 26.899385026596622 +---------- +NL: create the object WSGIServer with 2 arguments: get_internal_wsgi_application return value and unpacked dictionary wsgi_opts, call the method run on it. +ref: WSGIServer ( get_internal_wsgi_application ( ) , ** wsgi_opts ) . run ( ) +Output: wsgiserver ( get _ internal _ wsgi _ application, * * wsgi _ opts ) +bleu_metric: 16.61742929957894 +---------- +NL: return boolean True, otherwise return boolean False. define the function is_naive with an argument value. +ref: def is_naive ( value ) : +Output: def is _ naive ( value ) : +bleu_metric: 53.7284965911771 +---------- +NL: app_name and model._meta.object_name, respectively. evaluate connection.creation.sql_create_model method with model, no_style() and seen_models as arguments, +ref: sql , references = connection . creation . sql_create_model ( model , no_style ( ) , seen_models ) +Output: output. extend ( connection. creation. sql _ create _ model ( model, no _ style ( ), seen _ models ) ) +bleu_metric: 21.682999057776513 +---------- +NL: post is a string ''. +ref: post = '' +Output: post ='< could not parse > ' +bleu_metric: 100.0 +---------- +NL: context is an instance of a class Context, created with 2 arguments: dictionary created by apllying options to unpacked dictionary containing 3 entries: +ref: context = Context ( dict ( options , ** { base_name : name , base_directory : top_dir , 'docs_version' : docs_version , } ) , autoescape = False ) +Output: context = context ( {'invalid': {'invalid': ','rb': un allowing ', * * kwargs +bleu_metric: 10.888264129754024 +---------- +NL: for every key in self.keyOrder, +ref: for key in self . keyOrder : +Output: for key in self. keyorder : +bleu_metric: 58.300645587502856 +---------- +NL: increment current_len by integer 1, +ref: current_len += 1 +Output: current _ len + = 1 +bleu_metric: 41.11336169005197 +---------- +NL: derive the class SuspiciousMultipartForm from the SuspiciousOperation base class. +ref: class SuspiciousMultipartForm ( SuspiciousOperation ) : +Output: class suspiciousmultipartform ( suspiciousoperation ) : +bleu_metric: 24.924249970265265 +---------- +NL: from django.utils.http import urlquote into default name space. +ref: from django . utils . http import urlquote +Output: from django. utils. http import urlquote +bleu_metric: 100.0 +---------- +NL: from django.core.serializers.base import DeserializationError into default name space. +ref: from django . core . serializers . base import DeserializationError +Output: from django. core. serializers. base import deserializationerror +bleu_metric: 80.81591428066642 +---------- +NL: from django.utils.deprecation import RemovedInDjango19Warning into default name space. +ref: from django . utils . deprecation import RemovedInDjango19Warning +Output: from django. utils. deprecation import removedindjango19warning +bleu_metric: 67.23698847001903 +---------- +NL: if self._wrapped is empty, +ref: if self . _wrapped is empty : +Output: if self. _ wrapped is empty : +bleu_metric: 52.53819788848316 +---------- +NL: call the function make_origin with 4 arguments: display_name, self.load_template_source, template_name and template_dirs, +ref: origin = make_origin ( display_name , self . load_template_source , template_name , template_dirs ) +Output: return make _ origin ( display _ name, self. load _ template _ source, template _ name, template _ dirs ) +bleu_metric: 11.739521786077454 +---------- +NL: if self.file is false or self.file.closed is true, return boolean true, otherwise return boolean false. +ref: return not self . file or self . file . closed +Output: return not self. file or self. file. closed +bleu_metric: 100.0 +---------- +NL: import module warnings. +ref: import warnings +Output: import warnings +bleu_metric: 100.0 +---------- +NL: substitute pubid for self.pubid. +ref: self . pubid = pubid +Output: self. pubid = pubid +bleu_metric: 100.0 +---------- +NL: if length of bits is not integer 2 or 3, +ref: if len ( bits ) not in ( 2 , 3 ) : +Output: if len ( bits ) is not 2, 3 : +bleu_metric: 45.55949363186468 +---------- +NL: return an instance of a class WithNode, created with 4 arguments: None, None, nodelist and extra_context as extra_context. +ref: return WithNode ( None , None , nodelist , extra_context = extra_context ) +Output: return withnode ( none, none, nodelist, extra _ context = extra _ context ) +bleu_metric: 17.124730448946572 +---------- +NL: _iterlists is a string "lists". +ref: _iterlists = "lists" +Output: _ iterlists = " lists " +bleu_metric: 68.03749333171201 +---------- +NL: from django.core.exceptions import ValidationError into default name space. +ref: from django . core . exceptions import ValidationError +Output: from django. core. exceptions import validationerror +bleu_metric: 76.1894894736741 +---------- +NL: define the method __reduce__ with an argument self. +ref: def __reduce__ ( self ) : +Output: def _ _ reduce _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: message, settings.SERVER_EMAIL, list of second elements of a for every a in settings.Managers and connection set to connection, as arguments, assign the result to mail. if html_message is true, +ref: if html_message : +Output: if html _ message : +bleu_metric: 31.239399369202552 +---------- +NL: return boolean False. +ref: return False +Output: return false +bleu_metric: 75.98356856515926 +---------- +NL: define the method __init__ with 4 arguments: self, name, regex and next set to None. +ref: def __init__ ( self , name , regex , next = None ) : +Output: def _ _ init _ _ ( self, name, regex, next = none ) : +bleu_metric: 53.745123081358614 +---------- +NL: if pickle.PickleError exception is caught, +ref: except pickle . PickleError : +Output: except pickle. pickleerror : +bleu_metric: 41.386440336942734 +---------- +NL: define the function get_public_serializer_formats. +ref: def get_public_serializer_formats ( ) : +Output: def get _ public _ serializer _ formats ( ) : +bleu_metric: 30.26643726685863 +---------- +NL: open writer.path file in write mode, with the file descriptor as fh, perform, +ref: with open ( writer . path , "wb" ) as fh : +Output: with open ( writer. path, fh ) as fh : +bleu_metric: 67.09548263862051 +---------- +NL: define the function do_ifequal with 2 arguments: parser, token and negate. +ref: def do_ifequal ( parser , token , negate ) : +Output: def do _ ifequal ( parser, token, negate ) : +bleu_metric: 69.30977286178778 +---------- +NL: define the method _assert_mutable with an argument self. +ref: def _assert_mutable ( self ) : +Output: def _ assert _ mutable ( self ) : +bleu_metric: 47.987820666906636 +---------- +NL: do nothing. +ref: pass +Output: pass +bleu_metric: 100.0 +---------- +NL: if data is an instance of bytes, +ref: if isinstance ( data , bytes ) : +Output: if isinstance ( data, bytes ) : +bleu_metric: 100.0 +---------- +NL: if OSError, renamed to e, is caught, +ref: except OSError as e : +Output: except oserror as e : : +bleu_metric: 41.11336169005197 +---------- +NL: for every pythonrc in tuple containing 2 elements: return value of the function os.environ.get called with a string "PYTHONSTARTUP", +ref: for pythonrc in ( os . environ . get ( "PYTHONSTARTUP" ) , '~/.pythonrc.py' ) : +Output: for pythonrc in ( os. environ. get ( " pythonartuple " ) : +bleu_metric: 44.33290755096693 +---------- +NL: dest set to string 'interactive', default set to boolean True and help as 'Tells Django to NOT prompt the user for input of any kind.' call the method parser.add_argument with 5 arguments: string '--no-initial-data', action set to string 'store_false', +ref: parser . add_argument ( '--no-initial-data' , action = 'store_false' , dest = 'load_initial_data' , default = True , help = 'Tells Django not to load any initial data after database synchronization.' ) +Output: parser. add _ argument ('- - no - data ', action ='store _ false ', dest ='interactive ', +bleu_metric: 27.777163639626423 +---------- +NL: return boolean False. +ref: return False +Output: return false +bleu_metric: 75.98356856515926 +---------- +NL: for dirname in dirs, +ref: for dirname in dirs [ : ] : +Output: for dirname in dirs : +bleu_metric: 42.88819424803535 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: from the base class of the class SimpleCookie call the value_encode method with val as the argument, store the result in the val and encoded, respectively. +ref: val , encoded = super ( SimpleCookie , self ) . value_encode ( val ) +Output: val, encoding = super ( simplecookie ( val ) ) +bleu_metric: 22.455236837540035 +---------- +NL: string 'A secure pseudo-random number generator is not available on your system. Falling back to Mersenne Twister.'. using_sysrandom is boolean False. +ref: using_sysrandom = False +Output: using _ sysrandom = false +bleu_metric: 27.301208627090666 +---------- +NL: call the function module_to_dict with an argument settings._wrapped, substitute it for user_settings. +ref: user_settings = module_to_dict ( settings . _wrapped ) +Output: user _ settings = module _ to _ dict ( settings. _ wrapped ) +bleu_metric: 17.694975149532556 +---------- +NL: call the function force_text with an argument ttl, substitute the result for ttl. +ref: ttl = force_text ( ttl ) +Output: ttl = force _ text ( ttl ) +bleu_metric: 45.18010018049224 +---------- +NL: append cleaned_lien to statement. +ref: statement . append ( cleaned_line ) +Output: statement. append ( cleaned _ usen ) +bleu_metric: 45.18010018049224 +---------- +NL: if y and m and d are all true, +ref: if y and m and d : +Output: if y and m and d : +bleu_metric: 100.0 +---------- +NL: from django.utils.deprecation import RemovedInDjango19Warning into default name space. +ref: from django . utils . deprecation import RemovedInDjango19Warning +Output: from django. utils. deprecation import removedindjango19warning +bleu_metric: 67.23698847001903 +---------- +NL: call the function date.strftime with an argument string '%s, %%d %s %%Y %%H:%%M:%%S ' formated with dow and month, +ref: time_str = date . strftime ( '%s, %%d %s %%Y %%H:%%M:%%S ' % ( dow , month ) ) +Output: date. strftime ('% s, % d % s % ( y, month : % m : % ( ( ( ( ( request +bleu_metric: 34.91382214414941 +---------- +NL: define the function u with an argument s. +ref: def u ( s ) : +Output: def u ( s ) : +bleu_metric: 100.0 +---------- +NL: call the method __init__ from the base class of the class AssignmentNode, with 3 arguments: takes_context, args and kwargs. +ref: super ( AssignmentNode , self ) . __init__ ( takes_context , args , kwargs ) +Output: super ( assignmentnode, takes _ context, kwargs ) +bleu_metric: 21.850470907496923 +---------- +NL: if exception ValueError or TypeError is raised, +ref: except ( ValueError , TypeError ) : +Output: except ( valueerror, typeerror ) : +bleu_metric: 28.729491522452538 +---------- +NL: __all__ is an list containing a string 'File'. +ref: __all__ = [ 'File' ] +Output: _ _ all _ _ = ['file'] +bleu_metric: 27.968424579665367 +---------- +NL: return retval. +ref: return retval +Output: return retval +bleu_metric: 100.0 +---------- +NL: call the method self.stream.write with argument string '%s\n', with '%s' replaced with msg_data. +ref: self . stream . write ( '%s\n' % msg_data ) +Output: stream. write ( self. stream. write ('% s \ n'% msg _ data ) +bleu_metric: 61.073883395124426 +---------- +NL: substitute logging.NOTSET for logger.level. +ref: logger . level = logging . NOTSET +Output: logger. level = logging. notset +bleu_metric: 84.08964152537145 +---------- +NL: otherwise if basetype equals a string 'message' and subtype equals a string 'rfc822', +ref: elif basetype == 'message' and subtype == 'rfc822' : +Output: elif basetype = ='message'and subtype = ='rfc8p': +bleu_metric: 82.82477531331041 +---------- +NL: and result of the function flatatt, called with an argument final_attrs. define the method value_from_datadict with 4 arguments: self, data, files and name. +ref: def value_from_datadict ( self , data , files , name ) : +Output: def value _ from _ datadict ( self, data, files, name ) : +bleu_metric: 64.70107100770991 +---------- +NL: raise an exception of the class ValueError with string "Key '%s' not found" as argument, '%s' is substituted for key. +ref: raise ValueError ( "Key '%s' not found" % key ) +Output: raise valueerror ( " key'% s'not found " % key ) +bleu_metric: 68.55486797904878 +---------- +NL: if exception SuspiciousOperation as e is caught, +ref: except SuspiciousOperation as e : +Output: except suspiciousoperation as e : : +bleu_metric: 41.11336169005197 +---------- +NL: call the function force_text with an argument ttl, substitute the result for ttl. +ref: ttl = force_text ( ttl ) +Output: ttl = force _ text ( ttl ) +bleu_metric: 45.18010018049224 +---------- +NL: if the union of the kwargs and defaults dictionary keys converted into sets is not the same as the union of the defaults and prefix +ref: if set ( kwargs . keys ( ) ) | set ( defaults . keys ( ) ) != set ( params ) | set ( defaults . keys ( ) ) | set ( prefix_args ) : +Output: if kwargs. set ( kwargs. union ( defaults ) and not set ( defaults ) ) : +bleu_metric: 12.133857752666286 +---------- +NL: if self.asvar is None, +ref: if self . asvar is None : +Output: if self. asvar is none : +bleu_metric: 66.06328636027614 +---------- +NL: if s is an instance of six.text_type or Promise, +ref: if isinstance ( s , ( six . text_type , Promise ) ) : +Output: if isinstance ( s, ( six. text _ type, promise ) ) : +bleu_metric: 60.28817681965138 +---------- +NL: call the method self.stdout.write with an argument string "Installed %d object(s) from %d fixture(s)", +ref: self . stdout . write ( "Installed %d object(s) from %d fixture(s)" % ( self . loaded_object_count , self . fixture_count ) ) +Output: self. stdout. write ( " installed % d object ( s ) from % d fixture ( s ) " % ( app _ or _ +bleu_metric: 61.33349559111026 +---------- +NL: call the method t.led with 2 arguments left and self. +ref: left = t . led ( left , self ) +Output: return t. led ( left, self ) +bleu_metric: 80.81591428066642 +---------- +NL: return an string '', where '%s' is replaced with self.parent_name.token. +ref: return '' % self . parent_name . token +Output: return'< extendsnode : extends % s >'% self. parent _ name. token +bleu_metric: 59.088710322310554 +---------- +NL: for every attachment in self.attachments, +ref: for attachment in self . attachments : +Output: for attachment in self. attachments : +bleu_metric: 100.0 +---------- +NL: return value. +ref: return value +Output: return value +bleu_metric: 100.0 +---------- +NL: from django.core.cache.backends.base import BaseCache and DEFAULT_TIMEOUT into default name space. +ref: from django . core . cache . backends . base import BaseCache , DEFAULT_TIMEOUT +Output: from django. core. cache. backends. base import basecache, default _ timeout +bleu_metric: 68.89656775362826 +---------- +NL: define initialization method __init__ with argument self. +ref: def __init__ ( self ) : +Output: def _ _ init _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: call the function next with an argument cycle_iter, call the method resolve on the result with an argument context, substitute the result for value. +ref: value = next ( cycle_iter ) . resolve ( context ) +Output: value = next ( cycle _ iter ). resolve ( context ) +bleu_metric: 64.75445426291286 +---------- +NL: call the method self.compile_function_error with 2 arguments token and e, if it evaluates to false, +ref: if not self . compile_function_error ( token , e ) : +Output: if not self. compile _ function _ error ( token, e ) : +bleu_metric: 56.35190098079903 +---------- +NL: chunks is an empty list. +ref: chunks = [ ] +Output: chunks = [ ] +bleu_metric: 100.0 +---------- +NL: call the method logging.Handler.__init__ with an argument self. +ref: logging . Handler . __init__ ( self ) +Output: logging. handler. _ _ init _ _ ( self ) +bleu_metric: 31.61487584488943 +---------- +NL: call the executor.loader.detect_conflicts, substitute the result fr conflicts. +ref: conflicts = executor . loader . detect_conflicts ( ) +Output: conflicts conflicts = executor. loader. detect _ conflicts ( ) +bleu_metric: 53.16967153331754 +---------- +NL: _localtime is None. +ref: _localtime = None +Output: _ localtime = none +bleu_metric: 35.93041119630843 +---------- +NL: multiply self.number and self.paginator.per_page, return the result. +ref: return self . number * self . paginator . per_page +Output: return self. number + self. paginator. per _ page +bleu_metric: 48.442732379638635 +---------- +NL: assign the result to the sql and references, respectively. add model to seen_models set. +ref: seen_models . add ( model ) +Output: seen _ models. add ( model ) +bleu_metric: 63.89431042462724 +---------- +NL: define the method clean with arguments self and value. +ref: def clean ( self , value ) : +Output: def clean ( self, value ) : +bleu_metric: 100.0 +---------- +NL: if data is false and initial is true, +ref: if not data and initial : +Output: if not data and initial : +bleu_metric: 100.0 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: define the method url with arguments self and name. +ref: def url ( self , name ) : +Output: def url ( self, name ) : +bleu_metric: 100.0 +---------- +NL: if package doesnt have an 'rindex' attribute, +ref: if not hasattr ( package , 'rindex' ) : +Output: if not hasattr ( package,'rindex') : +bleu_metric: 100.0 +---------- +NL: raise an exception. +ref: raise +Output: raise +bleu_metric: 100.0 +---------- +NL: call the method RE_DATE.match with an argument value, substitute the result for match. +ref: match = RE_DATE . match ( value ) +Output: match = re _ date. match ( value ) +bleu_metric: 57.06745777055999 +---------- +NL: from django.db.migrations.writer import MigrationWriter into default name space. +ref: from django . db . migrations . writer import MigrationWriter +Output: from django. db. migrations. writer import migrationwriter +bleu_metric: 80.81591428066642 +---------- +NL: if vale is None or an empty string, +ref: if value in ( None , '' ) : +Output: if value in ( none,'' ) : +bleu_metric: 73.48889200874657 +---------- +NL: msg is an string "Unclosed tag '%s'. Looking for one of: %s ", where '%s' is replaced with command, +ref: msg = "Unclosed tag '%s'. Looking for one of: %s " % ( command , ', ' . join ( parse_until ) ) +Output: msg = " unclosed tag'% s '. look of one of % s " % command : % ( url, name, +bleu_metric: 33.06503485650832 +---------- +NL: call the method apps.get_app_config with an argument app_label, substitute the result for app_config. +ref: app_config = apps . get_app_config ( app_label ) +Output: app _ config = apps. get _ app _ config ( app _ label ) +bleu_metric: 16.61742929957894 +---------- +NL: define the method _iterkeys with an argument self. +ref: def _iterkeys ( self ) : +Output: def _ iterkeys ( self ) : +bleu_metric: 61.04735835807844 +---------- +NL: get the value under the 'shutdown_message' key of the options dictionary, if it exists substitute it for shutdown_message, +ref: shutdown_message = options . get ( 'shutdown_message' , '' ) +Output: shutdown _ message = options. get ('shutdown _ message ', false ) +bleu_metric: 39.3454937704783 +---------- +NL: return self.source. +ref: return self . source +Output: return self. source +bleu_metric: 100.0 +---------- +NL: if f is None, +ref: if f is None : +Output: if f is none : +bleu_metric: 48.8923022434901 +---------- +NL: default as an empty list and help as an string 'Locales to exclude. Default is none. Can be used multiple times.'. define the handle method with self class instance and dictionary **options as arguments. +ref: def handle ( self , ** options ) : +Output: def handle ( self, * * options ) : +bleu_metric: 100.0 +---------- +NL: derive the class CommentNode from Node base class. +ref: class CommentNode ( Node ) : +Output: class commentnode ( node ) : +bleu_metric: 33.16700344765874 +---------- +NL: from django.utils.encoding import force_text into default name space. +ref: from django . utils . encoding import force_text +Output: from django. utils. encoding import force _ text +bleu_metric: 67.86502681586725 +---------- +NL: and third element of result of the function sys.exc_info. call the function import_module with an argument module_path, substitute the result for module. +ref: module = import_module ( module_path ) +Output: module = import _ module ( module _ path ) +bleu_metric: 19.72940627795883 +---------- +NL: return result. +ref: return result +Output: return result +bleu_metric: 100.0 +---------- +NL: substitute value under the name key of the lib.tags dictionary for value under the name key of the temp_lib.tags dictionary. +ref: temp_lib . tags [ name ] = lib . tags [ name ] +Output: temp _ lib. tags [ name ] = lib. tags [ name ] +bleu_metric: 80.5312203079627 +---------- +NL: if self.to_field is true, +ref: if self . to_field : +Output: if self. to _ field : +bleu_metric: 35.49481056010052 +---------- +NL: from django.http.response import HttpResponse, StreamingHttpResponse, HttpResponseRedirect, HttpResponsePermanentRedirect, +ref: from django . http . response import ( HttpResponse , StreamingHttpResponse , HttpResponseRedirect , HttpResponsePermanentRedirect , HttpResponseNotModified , HttpResponseBadRequest , HttpResponseForbidden , HttpResponseNotFound , HttpResponseNotAllowed , HttpResponseGone , HttpResponseServerError , Http404 , BadHeaderError , JsonResponse ) +Output: from django. http. response import ( httprespontpresponse, streamingresponseredirect, httpresponser, +bleu_metric: 1.755681755351795 +---------- +NL: call the method handler.addQuickElement with 2 arguments: string 'rights' and value under the 'item_copyright' key of the item dictionary. +ref: handler . addQuickElement ( "rights" , item [ 'item_copyright' ] ) +Output: handler. addquickelement ( " rights ", item ['item _ copyright'] ) +bleu_metric: 59.088710322310554 +---------- +NL: define the function byte2int with an argument bs. +ref: def byte2int ( bs ) : +Output: def byte2int (p ) : +bleu_metric: 50.0 +---------- +NL: call the function lazy_number with 5 arguments: ngettext, str, singular set to singular, plural set to plural, +ref: return lazy_number ( ngettext , str , singular = singular , plural = plural , number = number ) +Output: lazy _ number ( ngettext, str, singular = singular, plural = plural, plural _ plural = plural, plural _ number = number +bleu_metric: 52.19276037182894 +---------- +NL: for every k and v in return value of the method module.__dict__.items, only if result of the method omittable called with an argument k is false. derive the class Command from the BaseCommand base class. +ref: class Command ( BaseCommand ) : +Output: class command ( basecommand ) : +bleu_metric: 33.16700344765874 +---------- +NL: call the method stream.unget with an argument chunk. +ref: stream . unget ( chunk ) +Output: stream. unget ( chunk ) +bleu_metric: 100.0 +---------- +NL: opts.localized_fields, opts.labels, opts.help_texts and opts.error_messages, substitute the result for fields. for every k and v in return value of the function six.iteritems called with an argument fields, if n is false, append it to a list, +ref: none_model_fields = [ k for k , v in six . iteritems ( fields ) if not v ] +Output: def is _ types ( self, data ) : +bleu_metric: 6.319846675669708 +---------- +NL: _func_defaults is a string "func_defaults". +ref: _func_defaults = "func_defaults" +Output: _ func _ defaults = " func _ defaults " +bleu_metric: 18.850319022747346 +---------- +NL: dest as a string 'locale', action as a string 'append' and help as a string, 'Creates or updates the message files for the given locale(s) (e.g. pt_BR). Can be used multiple times.'. call the method parser.add_argument with 5 arguments: string '--exclude', string '-x', default as a empty list, +ref: parser . add_argument ( '--exclude' , '-x' , default = [ ] , dest = 'exclude' , action = 'append' , help = 'Locales to exclude. Default is none. Can be used multiple times.' ) +Output: parser. add _ argument ('- - exclude ', action ='store _ false ', dest ='interactive ', default = +bleu_metric: 24.198319698976732 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: raise an ExternalReferenceForbidden exception with arguments context, base, sysid and pubid. +ref: raise ExternalReferenceForbidden ( context , base , sysid , pubid ) +Output: raise externalreferenceforbidden ( context, base, sysid, pubid ) +bleu_metric: 71.30446095917854 +---------- +NL: call the method connection.constraint_checks_disabled, with the result perform, +ref: with connection . constraint_checks_disabled ( ) : +Output: with connection. force _ checks _ disabled ( ) : +bleu_metric: 38.677062763523445 +---------- +NL: call the method expires.utcnow, subtract the result from expires, substitute the result for delta. +ref: delta = expires - expires . utcnow ( ) +Output: delta = expires. utcnow - expires ( ) +bleu_metric: 45.91497693322866 +---------- +NL: call the handle_filed method of the base class of the Serializer class, with arguments obj and field. +ref: super ( Serializer , self ) . handle_field ( obj , field ) +Output: super ( serializer, self ). handle _ field ( obj, field ) +bleu_metric: 53.12583871630396 +---------- +NL: do nothing. +ref: pass +Output: pass +bleu_metric: 100.0 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: call the Error function with 4 arguments, string "%s was connected to the '%s' signal with a lazy reference to the '%s' sender, +ref: errors . append ( Error ( "%s was connected to the '%s' signal " "with a lazy reference to the '%s' sender, " "which has not been installed." % ( description , name , '.' . join ( reference ) ) , obj = receiver . __module__ , hint = None , id = 'signals.E001' ) ) +Output: return error ( " % s is related to the'% s'signal with the lazy may the " " " % s " sender. " +bleu_metric: 9.988939062339425 +---------- +NL: call the method self._existing_object with an argument pk, substitute the result for value under the 'instance' key of kwargs. +ref: kwargs [ 'instance' ] = self . _existing_object ( pk ) +Output: kwargs ['instance'] = self. _ existing _ object ( pk ) +bleu_metric: 65.40585844910979 +---------- +NL: if length of bits is lesser than integer 2, +ref: if len ( bits ) < 2 : +Output: if len ( bits ) < 2 : +bleu_metric: 100.0 +---------- +NL: call the method copy.deepcopy with 2 arguments: self._wrapped and memo, return the result. +ref: return copy . deepcopy ( self . _wrapped , memo ) +Output: return copy. deepcopy ( self. _ wrapped, memo ) +bleu_metric: 69.97522298221912 +---------- +NL: loaded_objects_in_fixture is integer 0. +ref: loaded_objects_in_fixture = 0 +Output: loaded _ objects _ in _ fixture = 0 +bleu_metric: 18.575057999133595 +---------- +NL: return result. +ref: return result +Output: return result +bleu_metric: 100.0 +---------- +NL: call the method __init__ from the base class of the class RadioChoiceInput, with 2 arguments: unpacked list args, +ref: super ( RadioChoiceInput , self ) . __init__ ( * args , ** kwargs ) +Output: super ( radiochoiceinput, self ). _ _ init _ _ ( * args, * * kwargs ) +bleu_metric: 55.48581090137994 +---------- +NL: substitute value for value under the key key of dictionary at last element of self.dicts. +ref: self . dicts [ - 1 ] [ key ] = value +Output: self. dicts [ - 1 ] = value +bleu_metric: 63.70964381207871 +---------- +NL: from django.core.cache.backends.base import BaseCache and DEFAULT_TIMEOUT into default name space. +ref: from django . core . cache . backends . base import BaseCache , DEFAULT_TIMEOUT +Output: from django. core. cache. backends. base import basecache, default _ timeout +bleu_metric: 68.89656775362826 +---------- +NL: code set to string 'max_decimal_places' and params set to a dictionary with an entry: self.decimal_places for 'max'. if self.max_digits is not None and self.decimal_places is not None and whole_digits is grater than the difference of, +ref: if ( self . max_digits is not None and self . decimal_places is not None and whole_digits > ( self . max_digits - self . decimal_places ) ) : +Output: if self. max _ digits is not none and not self. decimal _ places is not none and whole _ digits : +bleu_metric: 10.127396571535655 +---------- +NL: if value is false and self.required is true, +ref: if not value and self . required : +Output: if not value and self. required : +bleu_metric: 100.0 +---------- +NL: append character '/' to the base_url. +ref: base_url += '/' +Output: base _ url + ='/ ' +bleu_metric: 63.89431042462724 +---------- +NL: if dirname is true and dirname path doesnt exists, +ref: if dirname and not os . path . exists ( dirname ) : +Output: if dirname and not os. path. exists ( dirname ) : +bleu_metric: 100.0 +---------- +NL: define the method regex with an argument self. +ref: def regex ( self ) : +Output: def regex ( self ) : +bleu_metric: 100.0 +---------- +NL: call the method parser.add_argument with arguments: string 'args' and nargs set to '*'. +ref: parser . add_argument ( 'args' , nargs = '*' ) +Output: parser. add _ argument ('args ', nargs ='*') +bleu_metric: 73.51460991014883 +---------- +NL: if plan_node is contained in loader.applied_migrations, +ref: if plan_node in loader . applied_migrations : +Output: if plan _ node in loader. apply _ migrations : +bleu_metric: 23.901088824528134 +---------- +NL: substitute the regex_compiled for value under the language_code key of the self._regex_dict dictionary. +ref: self . _regex_dict [ language_code ] = regex_compiled +Output: self. _ regex _ dict [ language _ code ] = regex _ compiled +bleu_metric: 14.247788801610147 +---------- +NL: set file pointer at the beginning of the self.file file. +ref: self . file . seek ( 0 ) +Output: self. file. seek ( 0 ) +bleu_metric: 100.0 +---------- +NL: return self.__name. +ref: return self . __name +Output: return self. _ _ name +bleu_metric: 41.11336169005197 +---------- +NL: call the method self.read, substitute the result or self._body. +ref: self . _body = self . read ( ) +Output: self. _ body = self. read ( ) +bleu_metric: 67.04226838163329 +---------- +NL: return result, +ref: return result +Output: return result +bleu_metric: 100.0 +---------- +NL: assign the result to ctypes and opts. get the value under the 'boundary' key of the opts dictionary, substitute it for boundary. +ref: boundary = opts . get ( 'boundary' ) +Output: boundary = opts. get ('boundary') +bleu_metric: 100.0 +---------- +NL: aise and exception InvalidCacheBackendError with string "Could not find backend '%s': %s" as argument, replace '%s' with backend and e, respectively. +ref: raise InvalidCacheBackendError ( "Could not find backend '%s': %s" % ( backend , e ) ) +Output: parser. add _ argument ( " could not find backend'% s " % e ) +bleu_metric: 31.875383058093316 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: define the method save_existing_objects with 2 arguments: self and commit set to boolean True. +ref: def save_existing_objects ( self , commit = True ) : +Output: def save _ existing _ objects ( self, commit = true ) : +bleu_metric: 39.3755531055134 +---------- +NL: from django.core.mail.utils import DNS_NAME into default name space. +ref: from django . core . mail . utils import DNS_NAME +Output: from django. core. mail. utils import dns _ name +bleu_metric: 73.61703354503865 +---------- +NL: needs_multipart_form is boolean True. +ref: needs_multipart_form = True +Output: needs _ multipart _ form = true +bleu_metric: 18.5750579991336 +---------- +NL: do nothing. +ref: pass +Output: pass +bleu_metric: 100.0 +---------- +NL: define the function indexbytes with 2 arguments buf and i. +ref: def indexbytes ( buf , i ) : +Output: def indexbytes ( buf, i ) : +bleu_metric: 100.0 +---------- +NL: call the function new_method_proxy with an argument getattr, substitute the result for __getattr__. +ref: __getattr__ = new_method_proxy ( getattr ) +Output: _ _ getattr _ _ = new _ method _ proxy ( getattr ( getattr ) ) +bleu_metric: 15.071676257541073 +---------- +NL: split first and second element of hextet into parts by ':', sum their lengths, substitute the result for sep. +ref: sep = len ( hextet [ 0 ] . split ( ':' ) ) + len ( hextet [ 1 ] . split ( ':' ) ) +Output: sep = hextet [ 0 ]. split (':') +bleu_metric: 23.65128205554767 +---------- +NL: define the method __contains__ with 2 arguments: self and item. +ref: def __contains__ ( self , item ) : +Output: def _ _ contains _ _ ( self, item ) : +bleu_metric: 52.96074933406222 +---------- +NL: split host from the right side into 2 parts at the ':', substitute the result for bits. +ref: bits = host . rsplit ( ':' , 1 ) +Output: bits = host. rsplit (': ', 1 ) +bleu_metric: 100.0 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: perform the bitwise or operation on the next 6 operands pyinotify.IN_MODIFY pyinotify.IN_DELETE, pyinotify.IN_ATTRIB, +ref: mask = ( pyinotify . IN_MODIFY | pyinotify . IN_DELETE | pyinotify . IN_ATTRIB | pyinotify . IN_MOVED_FROM | pyinotify . IN_MOVED_TO | pyinotify . IN_CREATE ) +Output: super (yinotify. _ delete, subcommand, self. _ delete, sub, subotify = none, name +bleu_metric: 5.234452711926258 +---------- +NL: derive the class MiddlewareNotUsed from the Exception base class. +ref: class MiddlewareNotUsed ( Exception ) : +Output: class middlewarenotused ( exception ) : +bleu_metric: 28.751742289713444 +---------- +NL: import module os. +ref: import os +Output: import os +bleu_metric: 100.0 +---------- +NL: call the method self.configure_handler with an argument value under name key of handlers dictionary, substitute the result for handler. +ref: handler = self . configure_handler ( handlers [ name ] ) +Output: handler = self. configure _ handler ( name ) +bleu_metric: 35.453206016838706 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: call the cursor method on the value under the db key of connections dictionary, preform following with return value named cursor, +ref: with connections [ db ] . cursor ( ) as cursor : +Output: with connections [ db ]. cursor ( ) as cursor : +bleu_metric: 100.0 +---------- +NL: called with an argument kw, only if v is not None, substitute the result for kw. call the method datetime.time with an argument unpacked dictionary kw, return the result. +ref: return datetime . time ( ** kw ) +Output: return datetime. time ( * * kw ) +bleu_metric: 100.0 +---------- +NL: sum _cached_filenames, new_filenames and _error_files, store the result in filelist. +ref: filelist = _cached_filenames + new_filenames + _error_files +Output: filelist = filelist + new _ filenames + _ error _ files +bleu_metric: 15.537125692760354 +---------- +NL: call the function allow_lazy with an argument strip_tags, substitute the result for strip_tags. +ref: strip_tags = allow_lazy ( strip_tags ) +Output: strip _ tags = allow _ lazy ( strip _ tags ) +bleu_metric: 14.283632578659287 +---------- +NL: substitute field.queryset for self.queryset. +ref: self . queryset = field . queryset +Output: self. queryset = field. queryset +bleu_metric: 100.0 +---------- +NL: substitute klass.__dict__ for next. +ref: next = advance_iterator +Output: next = klass. _ _ dict _ _ _ _ +bleu_metric: 14.991106946711685 +---------- +NL: call the function import_module with an argument templatetag_module. +ref: import_module ( templatetag_module ) +Output: import _ module ( templatetag _ module ) +bleu_metric: 19.96019880774733 +---------- +NL: define the method tag with 3 arguments: self, name set to None and compile_function set to None. +ref: def tag ( self , name = None , compile_function = None ) : +Output: def tag ( self, name, compile _ function = none, compile _ function = none ) : +bleu_metric: 34.530649895521286 +---------- +NL: pop value under the 'ipv6' key of the kwargs dictionary, if it is true, +ref: if kwargs . pop ( 'ipv6' , False ) : +Output: if kwargs. pop ('ipv6') : +bleu_metric: 69.57270315504846 +---------- +NL: define the method writer with an argument self. +ref: def writer ( self ) : +Output: def writer ( self ) : +bleu_metric: 100.0 +---------- +NL: p and errors set to string 'replace', for p in self.params. derive the class InvalidTemplateLibrary form the base class Exception. +ref: class InvalidTemplateLibrary ( Exception ) : +Output: class invalidtemplatelibrary ( exception ) : +bleu_metric: 28.751742289713444 +---------- +NL: define the method render with 2 arguments: self and context. +ref: def render ( self , context ) : +Output: def render ( self, context ) : +bleu_metric: 100.0 +---------- +NL: substitute allow_empty_first_page for self.allow_empty_first_page. +ref: self . allow_empty_first_page = allow_empty_first_page +Output: self. allow _ empty _ first _ page = allow _ empty _ first _ page +bleu_metric: 10.216198665886358 +---------- +NL: replace every occurrence of '\t' in s with '\\t'. +ref: s = s . replace ( '\t' , '\\t' ) +Output: s = s. replace ('\ t ','\ \ t') +bleu_metric: 100.0 +---------- +NL: needs_multipart_form is boolean False. +ref: needs_multipart_form = False +Output: needs _ multipart _ form = false +bleu_metric: 18.5750579991336 +---------- +NL: call the method self.handle_starttag, with tag and attrs as the arguments. +ref: self . handle_starttag ( tag , attrs ) +Output: self. handle _ starttag ( tag, attrs ) +bleu_metric: 57.06745777055999 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: update the self._catalog dictionary with other._catalog. +ref: self . _catalog . update ( other . _catalog ) +Output: self. _ catalog. update ( other. _ catalog ) +bleu_metric: 43.24227075463214 +---------- +NL: concatenate opts.concrete_fields, sortable_virtual_fields and opts.many_to_many, for every f in sorted result, +ref: for f in sorted ( opts . concrete_fields + sortable_virtual_fields + opts . many_to_many ) : +Output: for f in sorted ( opts. concrete _ fields + sortedable _ virtual _ fields + opts. many _ to _ many ) : +bleu_metric: 34.042950698715764 +---------- +NL: if message is an instance of SafeData. +ref: if isinstance ( message , SafeData ) : +Output: if isinstance ( message, safedata ) : +bleu_metric: 58.8837385313777 +---------- +NL: if self.data and self.files are both False, +ref: if not ( self . data or self . files ) : +Output: if not self. data and not self. files : +bleu_metric: 31.338807538721735 +---------- +NL: set filter_func objec attr attribute to value. +ref: setattr ( filter_func , attr , value ) +Output: setattr ( filter _ func, attr, value ) +bleu_metric: 57.06745777055999 +---------- +NL: call the method nodelist.get_nodes_by_type with an argument ExtendsNode, if it evaluates to true, +ref: if nodelist . get_nodes_by_type ( ExtendsNode ) : +Output: if nodelist. get _ nodes _ by _ type ( extendsnode ) : +bleu_metric: 22.894156860669913 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: call the method __deepcopy__ from the base class of the class MultiWidget, with an argument memo, substitute the result for obj. +ref: obj = super ( MultiWidget , self ) . __deepcopy__ ( memo ) +Output: obj = super ( multiwidget, self ). _ _ deepcopy _ _ ( memo ) +bleu_metric: 44.476089284108944 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: define the function sql_indexes with 3 arguments: app_config, style and connection. +ref: def sql_indexes ( app_config , style , connection ) : +Output: def sql _ indexes ( app _ config, style, connection ) : +bleu_metric: 46.82568791024402 +---------- +NL: if app_config.models_module is None, +ref: if app_config . models_module is None : +Output: if app _ config. models _ module is none : +bleu_metric: 16.2617017151949 +---------- +NL: raise an NotImplementedError exception with an argument string 'subclasses of Origin must provide a reload() method'. +ref: raise NotImplementedError ( 'subclasses of Origin must provide a reload() method' ) +Output: raise notimplementederror ('subclasses of origin must provide a reload ( ) method') +bleu_metric: 64.69161553933024 +---------- +NL: substitute kwargs for self.kwargs. +ref: self . kwargs = kwargs +Output: self. kwargs = kwargs +bleu_metric: 100.0 +---------- +NL: return boolean True. +ref: return True +Output: return true +bleu_metric: 75.98356856515926 +---------- +NL: append the tempdir to self.paths_to_remove. +ref: self . paths_to_remove . append ( tempdir ) +Output: self. paths _ to _ remove. append ( tempdir ) +bleu_metric: 47.85543921093738 +---------- +NL: if fk.unique is boolean true, +ref: if fk . unique : +Output: if fk. unique : +bleu_metric: 100.0 +---------- +NL: otherwise returns s. call the method connection.cursor, with the result as cursor, +ref: with connection . cursor ( ) as cursor : +Output: with connection. cursor ( ) as cursor : +bleu_metric: 100.0 +---------- +NL: update fields dictionary with new_class.declared_fields. +ref: fields . update ( new_class . declared_fields ) +Output: fields. update ( new _ class. declared _ fields ) +bleu_metric: 31.61487584488943 +---------- +NL: append a tuple with 2 elements: f and f with first occurrence of the path replaced with an empty string, to self.choices. +ref: self . choices . append ( ( f , f . replace ( path , "" , 1 ) ) ) +Output: self. choices. append ( ( f, f. replace ( path,'' ) ) ) +bleu_metric: 83.79990355241307 +---------- +NL: use_null_fallback is boolean False. +ref: use_null_fallback = False +Output: use _ null _ fallback = false +bleu_metric: 18.5750579991336 +---------- +NL: call the method parser.compile_filter with an argument value, substitute the result for value under the name key of kwargs dictionary. +ref: kwargs [ name ] = parser . compile_filter ( value ) +Output: kwargs [ name ] = parser. compile _ filter ( value ) +bleu_metric: 64.75445426291286 +---------- +NL: derive the class SplitDateTimeField from the base class MultiValueField class. +ref: class SplitDateTimeField ( MultiValueField ) : +Output: class splitdatetimefield ( multivaluefield ) : +bleu_metric: 18.73000789958672 +---------- +NL: call the method middleware.process_view with 4 arguments: request, view_func, args and kwargs, substitute the result for result. +ref: result = middleware . process_view ( request , view_func , args , kwargs ) +Output: result = middleware. process _ view ( request, view _ func, args, kwargs ) +bleu_metric: 47.975435114018964 +---------- +NL: and string 'ascii' and call the function to_bytes with 2 arguments: value and string 'latin-1', join the previous 2 results into a string, separated by ': ', append it to a list, substitute the resulting list for headers. join headers into a string, separated by string '\r\n'. +ref: return b'\r\n' . join ( headers ) +Output: return'\ r '. join ( headers ) ('\ r \ n') +bleu_metric: 54.92704080363614 +---------- +NL: derive the class Http404 from the Exception base class. +ref: class Http404 ( Exception ) : +Output: class http404 ( exception ) : +bleu_metric: 38.260294162784476 +---------- +NL: define the method media with an argument self. +ref: def media ( self ) : +Output: def media ( self ) : +bleu_metric: 100.0 +---------- +NL: if data is an instance of datetime.datetime or datetime.time classes, and supports_microseconds field of self.field.widget is false, +ref: if ( isinstance ( data , ( datetime . datetime , datetime . time ) ) and not getattr ( self . field . widget , 'supports_microseconds' , True ) ) : +Output: if isinstance ( data, datetime. datetime, datetime. time ) and not supports _ microsecond : +bleu_metric: 27.96307545954787 +---------- +NL: from django.conf import settings into default name space. +ref: from django . conf import settings +Output: from django. conf import settings +bleu_metric: 100.0 +---------- +NL: value under the self key of state_frame dictionary is None. +ref: state_frame [ self ] = None +Output: state _ frame [ self ] = none +bleu_metric: 44.63236137853329 +---------- +NL: error_msg is a string "Invalid template name in 'extends' tag: %r.", where '%s' is replaced with parent. +ref: error_msg = "Invalid template name in 'extends' tag: %r." % parent +Output: error _ msg = " invalid template name in'extends'tag : % r. " % ( parent, none ) +bleu_metric: 54.39695797716092 +---------- +NL: if option_value is None, +ref: if option_value is None : +Output: if option _ value is none : +bleu_metric: 23.9802967618271 +---------- +NL: derive the class LocalTimezone from the ReferenceLocalTimezone base class. +ref: class LocalTimezone ( ReferenceLocalTimezone ) : +Output: class localtimezone ( referenceslocaltimezone ) : +bleu_metric: 24.924249970265265 +---------- +NL: and autoescape as autoescape, use the result as an argument for the call to the function mark_safe, return the result. decorator function register.filter with an argument is_safe set to boolean False. +ref: @ register . filter ( is_safe = False ) +Output: @ register. filter ( is _ safe = false ) +bleu_metric: 49.13270548144421 +---------- +NL: otherwise if field_type equals a string 'IntegerField(' and connection.features.can_introspect_autofield is false, +ref: elif field_type == 'IntegerField(' and not connection . features . can_introspect_autofield : +Output: elif field _ type = ='integerfield ('and connection. features. can _ introspection _ autofield : +bleu_metric: 27.74870273560583 +---------- +NL: instantiate QueryDict class with 2 arguments: an empty string and encoding set to self._encoding, instantiate a class MultiValueDict, return them. +ref: return QueryDict ( '' , encoding = self . _encoding ) , MultiValueDict ( ) +Output: return multivalue ('', encoding = self. _ encoding ) +bleu_metric: 39.73800697584402 +---------- +NL: define the method to_python with arguments self and value. +ref: def to_python ( self , value ) : +Output: def to _ python ( self, value ) : +bleu_metric: 63.15552371794036 +---------- +NL: and pk.rel.parent_link is true and function pk_is_not_editable called with an argument pk.rel.to._meta.pk evaluates to true, if function pk_is_not_editable called with an argument pk evaluates to true, or pk.name is not contained in form.fields, +ref: if pk_is_not_editable ( pk ) or pk . name not in form . fields : +Output: if not ( ( pk _ is not none ) and not ( not pk. name ) : +bleu_metric: 16.6352496246992 +---------- +NL: if match is true, +ref: if match : +Output: if match : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : +bleu_metric: 3.840050896652556 +---------- +NL: define function patch_cache_control, with response and dictionary set of arguments, kwargs, as arguments. +ref: def patch_cache_control ( response , ** kwargs ) : +Output: def patch _ cache _ control ( response, * * kwargs ) : +bleu_metric: 59.687741756344955 +---------- +NL: define initialization method __init__ with self class instance, level, msg, hint defaulting to None, obj defaulting to None and if defaulting to None as arguments. +ref: def __init__ ( self , level , msg , hint = None , obj = None , id = None ) : +Output: def _ _ init _ _ ( self, level, msg, hint = none, obj = none ) : +bleu_metric: 49.62806188414642 +---------- +NL: assign the bits elements to tag, this_value_expr, max_value_expr and max_width, respectively. +ref: tag , this_value_expr , max_value_expr , max_width = bits +Output: tag, this _ value _ expr, max _ value _ expr, max _ width = bits +bleu_metric: 11.592539060615074 +---------- +NL: remove the value under the 'using' key from the options dictionary, assign it to the db, if the entry doesnt exists, +ref: db = options . pop ( 'using' , DEFAULT_DB_ALIAS ) +Output: db = options. pop ('using ', none ) +bleu_metric: 80.91067115702212 +---------- +NL: if filename is empty, +ref: if not filename : +Output: if not filename : : : +bleu_metric: 57.21248424548514 +---------- +NL: call the method __init__ from the base class of the class InlineForeignKeyField, with 2 arguments unpacked list args, +ref: super ( InlineForeignKeyField , self ) . __init__ ( * args , ** kwargs ) +Output: super ( inlineforrengnkeyfield, self ). _ _ init _ _ ( * args, * * kwargs ) +bleu_metric: 55.48581090137994 +---------- +NL: define the method __init__ with 2 arguments: self and name. +ref: def __init__ ( self , name ) : +Output: def _ _ init _ _ ( self, name ) : +bleu_metric: 52.96074933406222 +---------- +NL: from django.core.exceptions import ImproperlyConfigured into default name space. +ref: from django . core . exceptions import ImproperlyConfigured +Output: from django. core. exceptions import improperlyconfigured +bleu_metric: 76.1894894736741 +---------- +NL: third element of the result of the function sys.exc_info. define the method __init__ with an argument self. +ref: def xreadlines ( self ) : +Output: def _ _ init _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: for every v in value call the function conditional_escape with an argument v, append the result in a list, substitute the resulting list for value. +ref: value = [ conditional_escape ( v ) for v in value ] +Output: value = [ conditional _ escape ( v ) for v in value ] +bleu_metric: 67.39047062564734 +---------- +NL: derive the class TemplateEncodingError form the base class Exception. +ref: class TemplateEncodingError ( Exception ) : +Output: class templateencosterror ( exception ) : +bleu_metric: 28.751742289713444 +---------- +NL: if version is None, +ref: if version is None : +Output: if version is none : +bleu_metric: 48.8923022434901 +---------- +NL: call the method self.xml.startElement with 2 arguments: string 'field' and a dictionary containing 2 entries: field.name for 'name', +ref: self . xml . startElement ( "field" , { "name" : field . name , "type" : field . get_internal_type ( ) } ) +Output: self. xml. startelement ( " field ", { " field. name : " } ) +bleu_metric: 32.09458631375224 +---------- +NL: substitute self.file for thefile. +ref: thefile = self . file +Output: thefile = self. file +bleu_metric: 100.0 +---------- +NL: call the method m.group with an argument string 'sec', convert the result into a string, substitute it for sec. +ref: sec = int ( m . group ( 'sec' ) ) +Output: this = int ( m. group ('be') ) +bleu_metric: 72.41577342575827 +---------- +NL: substitute '%s' in a string "Merging %s" with app_label, +ref: self . stdout . write ( self . style . MIGRATE_HEADING ( "Merging %s" % app_label ) ) +Output: self. stdout. write ( self. style. migrate _ heading ( " merge % s " % app _ label ) ) +bleu_metric: 53.520645513275824 +---------- +NL: get opt attribute of the opts object, substitute it for value. +ref: value = getattr ( opts , opt ) +Output: value = getattr ( opts, opt ) +bleu_metric: 100.0 +---------- +NL: for every basedir in basedirs, +ref: for basedir in basedirs : +Output: for basedir in basedirs : +bleu_metric: 100.0 +---------- +NL: if file_or_path has an attribute 'read', +ref: if hasattr ( file_or_path , 'read' ) : +Output: if hasattr ( file _ or _ path,'read') : +bleu_metric: 53.070741098514354 +---------- +NL: classmethod decorator, +ref: @ classmethod +Output: @ classmethod +bleu_metric: 100.0 +---------- +NL: define the function _replace_entity with an argument match. +ref: def _replace_entity ( match ) : +Output: def _ replace _ entity ( match ) : +bleu_metric: 47.987820666906636 +---------- +NL: call the method self.parse_file_upload with arguments self.META and data, assign the result to self._post and self._files. +ref: self . _post , self . _files = self . parse_file_upload ( self . META , data ) +Output: self. _ post, self. _ files = self. parse _ file _ upload ( self. meta, data ) +bleu_metric: 27.698762715990977 +---------- +NL: call the function get_bytes_from_wsgi with environ, string 'PATH_INFO' and character '/' as arguments, substitute the result for path_info. +ref: path_info = get_bytes_from_wsgi ( environ , 'PATH_INFO' , '/' ) +Output: path _ info = get _ bytes _ from _ wsgi ( environ,'path _ info ','/') +bleu_metric: 36.314748337164254 +---------- +NL: if Exception exception is caught, +ref: except Exception : +Output: except exception : : : : : : : : : : : : : : : +bleu_metric: 9.629943614188138 +---------- +NL: result of the method ProjectState.from_apps with an argument apps and result of the method InteractiveMigrationQuestioner, called with 2 arguments specified_apps set to app_labels and dry_run set to self.dry_run. if self.empty is true, +ref: if self . empty : +Output: if self. empty : +bleu_metric: 100.0 +---------- +NL: subcommand is a string 'help'. +ref: subcommand = 'help' +Output: subcommand ='help ' +bleu_metric: 100.0 +---------- +NL: dest as a string 'interactive', default set to boolean True, and help as a string 'Tells Django to NOT prompt the user for input of any kind.'. define the method handle with 3 arguments: self, unpacked list app_labels and unpacked dictionary options. +ref: def handle ( self , * app_labels , ** options ) : +Output: def handle ( self, * app _ labels, * * options ) : +bleu_metric: 69.64705665515707 +---------- +NL: raise an ValueError with an argument string "'%s' has no field named '%s'.", with '%s' replaced with self.__class__.__name__ and field, respectively. +ref: raise ValueError ( "'%s' has no field named '%s'." % ( self . __class__ . __name__ , field ) ) +Output: raise valueerror ( "'% s'has no field named'% s'_ name _ _, field ) +bleu_metric: 49.198559147469325 +---------- +NL: call the method Model._meta.get_all_field_names, substitute the result for model_fields. +ref: model_fields = Model . _meta . get_all_field_names ( ) +Output: model _ fields = model. _ meta. get _ all _ field _ names ( ) +bleu_metric: 13.78592993183041 +---------- +NL: join p and cmd into a file path, substitute it for f. +ref: f = os . path . join ( p , cmd ) +Output: f = os. path. join ( p, cmd ) +bleu_metric: 100.0 +---------- +NL: get the value under the field key of self.fields dictionary, substitute error_messages field of the result for error_messages. +ref: error_messages = self . fields [ field ] . error_messages +Output: error _ messages = self. fields [ field ]. error _ messages +bleu_metric: 55.120033574472714 +---------- +NL: call the method threading.RLock, substitute the result for self._lock. +ref: self . _lock = threading . RLock ( ) +Output: self. _ lock = threading. rlock ( ) +bleu_metric: 34.172334076593074 +---------- +NL: from UserList import UserList into default namespace. +ref: from UserList import UserList +Output: from userlist import userlist +bleu_metric: 24.117803988461297 +---------- +NL: from django.http import Http404 into default name space. +ref: from django . http import Http404 +Output: from django. http import http404 +bleu_metric: 80.91067115702212 +---------- +NL: call the method self.create_token with 3 arguments: last_bit, tuple with 2 elements: upto and sum of upto and length of last_bit, +ref: result . append ( self . create_token ( last_bit , ( upto , upto + len ( last_bit ) ) , False ) ) +Output: result. extend ( self. create _ token ( last _ bit, ( upto, len ( last _ bit ) ) ) ) +bleu_metric: 25.19460242629816 +---------- +NL: define class dummy. +ref: class dummy : +Output: class dummy : +bleu_metric: 100.0 +---------- +NL: define __del__ method with self as the argument. +ref: def __del__ ( self ) : +Output: def _ _ del _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: substitute root for value under the NEXT key of the link dictionary. +ref: link [ NEXT ] = root +Output: link [ next ] = root +bleu_metric: 48.8923022434901 +---------- +NL: from django.apps import apps into default name space. +ref: from django . apps import apps +Output: from django. apps import apps +bleu_metric: 100.0 +---------- +NL: if it does append it to targets list. if not, +ref: else : +Output: else : : : +bleu_metric: 42.728700639623405 +---------- +NL: while i is smaller than l, +ref: while i < l : +Output: while i < l : +bleu_metric: 100.0 +---------- +NL: define the method render with 2 arguments self and context. +ref: def render ( self , context ) : +Output: def render ( self, context ) : +bleu_metric: 100.0 +---------- +NL: define the method _cache with argument self. +ref: def _cache ( self ) : +Output: def _ cache ( self ) : +bleu_metric: 61.04735835807844 +---------- +NL: re.U and re.S, substitute the result for re_words. call the function re.compile with 2 arguments: raw string '<.*?>|(.)' and bitwise OR performed with 2 operands, +ref: re_chars = re . compile ( r'<.*?>|(.)' , re . U | re . S ) +Output: re _ words = re. compile ( r'<. *? > | (. ) ', bit | | | | (? : +bleu_metric: 61.454866282148146 +---------- +NL: return an empty dictionary. +ref: return { } +Output: return { } +bleu_metric: 100.0 +---------- +NL: call the method app_config.get_model with an argument model_label, substitute the result for model. +ref: model = app_config . get_model ( model_label ) +Output: model = app _ config. get _ model ( model _ label ) +bleu_metric: 14.807582680058125 +---------- +NL: if value is not contained in result, +ref: if value is not result : +Output: if value is not result : +bleu_metric: 100.0 +---------- +NL: if tt.tm_isdst is greater than intger 0, return boolean True, otherwise return boolean False. +ref: return tt . tm_isdst > 0 +Output: return tt. tm _ isdst > 0 +bleu_metric: 35.49481056010052 +---------- +NL: define the method _get_choices with an argument self. +ref: def _get_choices ( self ) : +Output: def _ get _ choices ( self ) : +bleu_metric: 47.987820666906636 +---------- +NL: loader is instance of MigrationLoader initialized with connection as an argument. +ref: loader = MigrationLoader ( connection ) +Output: loader = migrationloader ( connection ) +bleu_metric: 51.54486831107658 +---------- +NL: call the method termios.tcsetattr with fd, termios.TCSANOW and attr_list, as arguments. +ref: termios . tcsetattr ( fd , termios . TCSANOW , attr_list ) +Output: return termios. tcsetattr ( fd, termios. tc renderu, attr _ list ) +bleu_metric: 49.852287898736826 +---------- +NL: _urllib_robotparser_moved_attributes is a list containing an instance of MovedAttribute class, created with 3 argument: strings, +ref: _urllib_robotparser_moved_attributes = [ MovedAttribute ( "RobotFileParser" , "robotparser" , "urllib.robotparser" ) , ] +Output: _ urllib _ robotparser _ moved _ attributes = [ movedattribute ( " ", " urllib ", " +bleu_metric: 22.092651961465677 +---------- +NL: define the method render with 4 arguments: self, name, value and attrs set to None. +ref: def render ( self , name , value , attrs = None ) : +Output: def render ( self, name, value, attrs = none ) : +bleu_metric: 81.53551038173114 +---------- +NL: call the method cursor.close, +ref: cursor . close ( ) +Output: cursor. close ( ) +bleu_metric: 100.0 +---------- +NL: call the function endblock_re.match with an argument t.contents, substitute the result for endbmatch. +ref: endbmatch = endblock_re . match ( t . contents ) +Output: endbmatch = endblock _ re. match ( t. contents ) +bleu_metric: 64.50001140844255 +---------- +NL: for every key and value in parse_gsl with query_string is it exists or an empty string if not and keep_blank_values set to boolean True. +ref: for key , value in parse_qsl ( query_string or '' , keep_blank_values = True ) : +Output: for key, value in parse _mcl ( query _ string,'', keep _ blank _ values = true ) : +bleu_metric: 28.196659117306076 +---------- +NL: define the function get_resolver with an argument urlconf. +ref: def get_resolver ( urlconf ) : +Output: def get _ resolver ( urlconf ) : +bleu_metric: 53.7284965911771 +---------- +NL: call the method apps.get_app_config with an argument model._met.app_label, substitute path field of the result for app_dir. +ref: app_dir = apps . get_app_config ( model . _meta . app_label ) . path +Output: app _ dir = apps. get _ app _ config ( model. _ met. app _ label ) +bleu_metric: 15.875722180934988 +---------- +NL: if locations is not empty, +ref: if locations : +Output: if not locations : : : +bleu_metric: 30.739407647563223 +---------- +NL: derive the class SignatureExpired from the BadSignature base class. +ref: class SignatureExpired ( BadSignature ) : +Output: class signatureexele ( badsignature ) : +bleu_metric: 28.751742289713444 +---------- +NL: define the method get with 3 arguments: self, key and default set to None. +ref: def get ( self , key , default = None ) : +Output: def get ( self, key, default = none ) : +bleu_metric: 78.25422900366436 +---------- +NL: define the method_mark_post_parse_error with an argument self. +ref: def _mark_post_parse_error ( self ) : +Output: def _ mark _ post _ parse _ error ( self ) : +bleu_metric: 33.649324423301515 +---------- +NL: call the method self.xml.endElement with an argument string 'field'. +ref: self . xml . endElement ( "field" ) +Output: self. xml. endelement ( " field " ) +bleu_metric: 67.10275993197631 +---------- +NL: call the __init__ method with unpacked list args and unpacked dictionary kwargs from the base class of the GenericIPAddressField class. +ref: super ( GenericIPAddressField , self ) . __init__ ( * args , ** kwargs ) +Output: super ( genericipaddressfield, self ). _ _ init _ _ ( * args, * * kwargs ) +bleu_metric: 55.48581090137994 +---------- +NL: from django.utils import six and timezone into default name space. +ref: from django . utils import six , timezone +Output: from django. utils import six, timezone +bleu_metric: 100.0 +---------- +NL: return value. +ref: return value +Output: return value +bleu_metric: 100.0 +---------- +NL: self.cache_suffix converted to a string, appended to the character '*', call os.path.join with self._dir and fname as arguments, filelist is a list containing all the previous results. return filelist. +ref: return filelist +Output: return filelist ( self. _ dir, fname ) +bleu_metric: 14.991106946711685 +---------- +NL: if self.verbosity is greater or equal to integer 1, +ref: if self . verbosity >= 1 : +Output: if self. verbosity > = 1 : +bleu_metric: 100.0 +---------- +NL: call the function StringIO with an argument stream_or_string, substitute the result for stream. +ref: stream = StringIO ( stream_or_string ) +Output: stream = stringio ( stream _ or _ string ) +bleu_metric: 19.72940627795883 +---------- +NL: from django.utils import archive into default name space. +ref: from django . utils import archive +Output: from django. utils import archive +bleu_metric: 100.0 +---------- +NL: append string '-0000' to time_str, return the result. +ref: return time_str + '-0000' +Output: return time _ str +'- 0000 ' +bleu_metric: 59.004687263928076 +---------- +NL: if self.allow_multiple_selected is false, +ref: if not self . allow_multiple_selected : +Output: if not self. allow _ multiple _ selected : +bleu_metric: 36.46285861936466 +---------- +NL: raise an TemplateSyntaxError exception with an argument "'%s' received unexpected keyword argument '%s'", +ref: raise TemplateSyntaxError ( "'%s' received unexpected keyword argument '%s'" % ( name , param ) ) +Output: raise templatesyntaxerror ( "'% s'received unexpected keyword argument'% s'" % ( bits [ 0 ], +bleu_metric: 64.5302276641166 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: from django.apps import apps into default name space. +ref: from django . apps import apps +Output: from django. apps import apps +bleu_metric: 100.0 +---------- +NL: instantiate Header class with localpart and encoding, convert it to a string, substitute the result for localpart. +ref: localpart = str ( Header ( localpart , encoding ) ) +Output: localpart = str ( header ( localpart, encoding ) ) +bleu_metric: 76.11606003349893 +---------- +NL: derive the class FileInput from the Input base class. +ref: class FileInput ( Input ) : +Output: class fileinput ( input ) : +bleu_metric: 33.16700344765874 +---------- +NL: d is an empty dictionary. +ref: d = { } +Output: d = { } +bleu_metric: 100.0 +---------- +NL: substitute it for value under the 'pk' key of data dictionary. return data. +ref: return data +Output: return data +bleu_metric: 100.0 +---------- +NL: split content by newline character, for every line in result, +ref: for line in content . split ( "\n" ) : +Output: for line in content. split ( ) : +bleu_metric: 54.516343785887585 +---------- +NL: if value is true, +ref: if value : +Output: if value : +bleu_metric: 100.0 +---------- +NL: property decorator, +ref: @ property +Output: @ property +bleu_metric: 100.0 +---------- +NL: unpacked list field_value as an argument, substitute the result for value. substitute value for value under the field.attname key of the data dictionary. +ref: data [ field . attname ] = value +Output: data [ field. attname ] = value +bleu_metric: 100.0 +---------- +NL: call the function six.text_type with s, encoding and errors as the arguments, substitute the result for s. +ref: s = six . text_type ( s , encoding , errors ) +Output: s = six. text _ type ( s, encoding, errors ) +bleu_metric: 67.39047062564734 +---------- +NL: raise an exception. +ref: raise +Output: raise +bleu_metric: 100.0 +---------- +NL: if app_config.models_module is None. +ref: if app_config . models_module is None : +Output: if app _ config. models _ module is none : +bleu_metric: 16.2617017151949 +---------- +NL: for every tag in open_tags, +ref: for tag in open_tags : +Output: for tag in open _ tags : +bleu_metric: 35.49481056010052 +---------- +NL: _assertRegex is a strnig "assertRegex". +ref: _assertRegex = "assertRegex" +Output: _ assertregex = " assertregex " +bleu_metric: 26.64731314108428 +---------- +NL: derive the class EmailBackend from the BaseEmailBackend base class. +ref: class EmailBackend ( BaseEmailBackend ) : +Output: class emailbackend ( baseemailbackend ) : +bleu_metric: 24.924249970265265 +---------- +NL: call the method validators.RegexValidator with an argument regex set to regex, substitute it for self._regex_validator. +ref: self . _regex_validator = validators . RegexValidator ( regex = regex ) +Output: self. _ regex _ validator = validators. regexvalidator ( regex = regex ) +bleu_metric: 46.15425015629849 +---------- +NL: if error_messages is true and f.name is contained in error_messages, +ref: if error_messages and f . name in error_messages : +Output: if error _ messages and f. name in error _ messages : +bleu_metric: 37.5022891676693 +---------- +NL: call the method parser.add_argument with 4 arguments: string 'args', metavar set to 'app_label', nargs set to '+', +ref: parser . add_argument ( 'args' , metavar = 'app_label' , nargs = '+' , help = 'One or more application label.' ) +Output: parser. add _ argument ('args ', metavar ='app label ', nargs ='+'+ ', +bleu_metric: 46.67945545551307 +---------- +NL: append i-th element of existing to child_loggers. +ref: child_loggers . append ( existing [ i ] ) +Output: child _ loggers. append ( existing [ i ] ) +bleu_metric: 73.61703354503865 +---------- +NL: call the mimetypes.guess_type with an argument filename, assign the result to the mimetype and _, respectively. +ref: mimetype , _ = mimetypes . guess_type ( filename ) +Output: mimetype, _ = mimetypes. guess _ type ( filename ) +bleu_metric: 61.626070997295855 +---------- +NL: call the function force_bytes with an argument secret, substitute the result for secret. +ref: secret = force_bytes ( secret ) +Output: secret = force _ bytes ( secret ) +bleu_metric: 45.18010018049224 +---------- +NL: call the function getargspec with an argument func, substitute the result for params, varargs, varkw and defaults. +ref: params , varargs , varkw , defaults = getargspec ( func ) +Output: params, varargs, varkw, defaults = getargspec ( func ) +bleu_metric: 100.0 +---------- +NL: define the function javascript_quote with 2 arguments: s and quote_double_quotes set to boolean False. +ref: def javascript_quote ( s , quote_double_quotes = False ) : +Output: def javascript _ quote ( s, quote _ double _ quotes = false ) : +bleu_metric: 20.706193828327603 +---------- +NL: increment i by integer 1,. +ref: i += 1 +Output: i + = 1 +bleu_metric: 100.0 +---------- +NL: decorator deconstructible, +ref: @ deconstructible +Output: @ deconstructible +bleu_metric: 100.0 +---------- +NL: break from this loop execution. +ref: break +Output: break +bleu_metric: 100.0 +---------- +NL: define the method cleaned_data with an argument self. +ref: def cleaned_data ( self ) : +Output: def cleaned _ data ( self ) : +bleu_metric: 53.7284965911771 +---------- +NL: break from the loop execution, +ref: break +Output: break +bleu_metric: 100.0 +---------- +NL: call the method self.make_key with key and version set to version as arguments, substitute the result for key. +ref: key = self . make_key ( key , version = version ) +Output: key = self. make _ key ( key, version = version ) +bleu_metric: 67.39047062564734 +---------- +NL: get the name key of the data dictionary, substitute it for value. +ref: value = data . get ( name ) +Output: value = data. get ( name ) +bleu_metric: 100.0 +---------- +NL: call the timestamp.strftime with string '%Y%m%d%H%M%S' as an argument, substitute the result for changeset. +ref: changeset = timestamp . strftime ( '%Y%m%d%H%M%S' ) +Output: changeset = timestamp. strftime ('% y % m % m % m % s') +bleu_metric: 47.616523531016895 +---------- +NL: if val is None, +ref: if val is None : +Output: if val is none : +bleu_metric: 48.8923022434901 +---------- +NL: define the method clear with argument self. +ref: def clear ( self ) : +Output: def clear ( self ) : +bleu_metric: 100.0 +---------- +NL: call the function six.reraise with 3 arguments: exc_type, exc_value and third element of the result of the method sys.exc_info. +ref: six . reraise ( exc_type , exc_value , sys . exc_info ( ) [ 2 ] ) +Output: six. reraise ( exc _ type, exc _ value, sys. exc _ info [ 2 ] ) +bleu_metric: 36.85289119518547 +---------- +NL: raise an ValidationError with 2 arguments: value under the 'required' key of the self.error_messages dictionary and code set to string 'required'. +ref: raise ValidationError ( self . error_messages [ 'required' ] , code = 'required' ) +Output: raise validationerror ( self. error _ messages ['required'], code ='required') +bleu_metric: 68.48075777090853 +---------- +NL: define the function get_default_timezone. +ref: def get_default_timezone ( ) : +Output: def get _ default _ timezone ( ) : +bleu_metric: 36.72056269893592 +---------- +NL: define the method get_host with an argument self. +ref: def get_host ( self ) : +Output: def get _ host ( self ) : +bleu_metric: 53.7284965911771 +---------- +NL: return nothing. +ref: return +Output: return +bleu_metric: 100.0 +---------- +NL: get config dictionary element under 'format' key, if it exists substitute it for fmt, if not, fmt is None. +ref: fmt = config . get ( 'format' , None ) +Output: fmt = config. get ('format ', none ) +bleu_metric: 80.91067115702212 +---------- +NL: if call to the method finder.find_module with an argument name evaluates to true, +ref: if finder . find_module ( name ) : +Output: if finder. find _ module ( name ) : +bleu_metric: 53.107253497886994 +---------- +NL: ipv4_address is a string "%d.%d.%d.%d" formated with first 2 elements of seventh element of hextets converted into hexadecimal number, +ref: ipv4_address = "%d.%d.%d.%d" % ( int ( hextets [ 6 ] [ 0 : 2 ] , 16 ) , int ( hextets [ 6 ] [ 2 : 4 ] , 16 ) , int ( hextets [ 7 ] [ 0 : 2 ] , 16 ) , int ( hextets [ 7 ] [ 2 : 4 ] , 16 ) , ) +Output: ipv4 _ address = ( " % d. % d. % d. % ( 3 [ 2 : ] * ( hextets [ 0 +bleu_metric: 7.890823658111145 +---------- +NL: for every elt in list_ call the method bytes_to_text with 2 argument: elt and self.encoding, append the result into a list, +ref: list_ = [ bytes_to_text ( elt , self . encoding ) for elt in list_ ] +Output: return [ bytes _ to _ text ( elt, self. encoding ) for elt in list _ to _ text ( ) ] +bleu_metric: 40.28016247714586 +---------- +NL: return name, ser_fmt and cmp_fmt. +ref: return name , ser_fmt , cmp_fmt +Output: return name, ser _ fmt, cmp _ fmt +bleu_metric: 24.808415001701817 +---------- +NL: from django.utils.http import urlquote into default name space. +ref: from django . utils . http import urlquote +Output: from django. utils. http import urlquote +bleu_metric: 100.0 +---------- +NL: if value.tzinfo is None and call to the method value.tzinfo.utcoffset called with an argument value evaluates to None, +ref: return value . tzinfo is None or value . tzinfo . utcoffset ( value ) is None +Output: if value. tzinfo is none and value. tzinfo. utcoffset ( value ) is none : +bleu_metric: 58.30738459889046 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: append value under the key v of background dictionary to code_list. +ref: code_list . append ( background [ v ] ) +Output: code _ list. append ( settings [ v ] ) +bleu_metric: 48.442732379638635 +---------- +NL: substitute self.parent_instance.pk for value under the 'initial' key of the kwargs dictionary. +ref: kwargs [ "initial" ] = self . parent_instance . pk +Output: kwargs ['initial'] = self. parent _ instance. pk +bleu_metric: 67.29864884660303 +---------- +NL: substitute greater element between integer 0 and end decremented by one for last. +ref: last = max ( 0 , end - 1 ) +Output: last = max ( 0, end - 1 ) +bleu_metric: 100.0 +---------- +NL: define the method __init__ with 3 arguments: self, widgets and attrs set to None. +ref: def __init__ ( self , widgets , attrs = None ) : +Output: def _ _ init _ _ ( self, widgets, attrs = none ) : +bleu_metric: 47.631009147745075 +---------- +NL: derive the class WSGIServer from simple_server.WSGIServer and object base classes. +ref: class WSGIServer ( simple_server . WSGIServer , object ) : +Output: class wsgiserver ( simple _ server. wsgiserver, object ) : +bleu_metric: 38.72015705071016 +---------- +NL: if Exception, renamed to e, exception is caught, +ref: except Exception as e : +Output: except exception as e : : +bleu_metric: 41.11336169005197 +---------- +NL: substitute self.state for state. +ref: state = self . state +Output: state = self. state +bleu_metric: 100.0 +---------- +NL: define the method __get__ with 3 arguments: self, obj and tp. +ref: def __get__ ( self , obj , tp ) : +Output: def _ _ get _ _ ( self, obj, tp ) : +bleu_metric: 59.687741756344955 +---------- +NL: for every tag in tags, are false, for every tag in tags, if return value of the method checks.tag_exists called with an argument tag, evaluates to false, +ref: invalid_tag = next ( tag for tag in tags if not checks . tag_exists ( tag ) ) +Output: if not tag in tags : ( tag ) : +bleu_metric: 16.953660567746102 +---------- +NL: if use_l10n is true, or if use_l10n is None and settings.USE_L10N is true, +ref: if use_l10n or ( use_l10n is None and settings . USE_L10N ) : +Output: if use _ l10n or ( use _ l10n is none and settings. use _ l10n ) : +bleu_metric: 19.268479640608692 +---------- +NL: self.activated is boolean True. +ref: self . activated = True +Output: self. activated = true +bleu_metric: 75.98356856515926 +---------- +NL: return an empty string and an empty string. +ref: return '' , '' +Output: return'','' +bleu_metric: 100.0 +---------- +NL: define the function wrapper with list args, and dictionary pair of values kwargs as arguments. +ref: def wrapper ( * args , ** kwargs ) : +Output: def wrapper ( * args, * * kwargs ) : +bleu_metric: 100.0 +---------- +NL: append string '_0' to id_. +ref: id_ += '_0' +Output: id _ + ='_ 0 ' +bleu_metric: 31.239399369202552 +---------- +NL: define the method format_subject with 2 arguments: self and subject. +ref: def format_subject ( self , subject ) : +Output: def format _ subject ( self, subject ) : +bleu_metric: 63.15552371794036 +---------- +NL: call the method match.groupdict, substitute the result for kwargs. +ref: kwargs = match . groupdict ( ) +Output: kwargs = match. groupdict ( ) +bleu_metric: 100.0 +---------- +NL: for every dict_ in self.dicts, +ref: for dict_ in self . dicts : +Output: for dict _ in self. dicts : +bleu_metric: 66.06328636027614 +---------- +NL: substitute t.nodelist for self.nodelist. +ref: self . nodelist = t . nodelist +Output: self. nodelist = t. nodelist +bleu_metric: 100.0 +---------- +NL: define the method __bool__ with an argument self. +ref: def __bool__ ( self ) : +Output: def _ _ bool _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: import module sys. +ref: import sys +Output: import sys +bleu_metric: 100.0 +---------- +NL: substitute number_value for kwargs dictionary value under the 'number' key. +ref: kwargs [ 'number' ] = number_value +Output: kwargs ['number'] = number _ value +bleu_metric: 67.86502681586725 +---------- +NL: return result +ref: return result +Output: return result +bleu_metric: 100.0 +---------- +NL: if timezone has an attribute 'normalize', +ref: if hasattr ( timezone , 'normalize' ) : +Output: if hasattr ( timezone,'normalize') : +bleu_metric: 100.0 +---------- +NL: call the function force_text with an argument value, substitute the result for value. +ref: value = force_text ( value ) +Output: value = force _ text ( value ) +bleu_metric: 45.18010018049224 +---------- +NL: weight is an integer 0. +ref: weight = 0 +Output: weight = 0 +bleu_metric: 100.0 +---------- +NL: from the base class of the SimpleCookie class call the method load with rawdata as argument. +ref: super ( SimpleCookie , self ) . load ( rawdata ) +Output: super ( simplecookie, self ). load ( rawdata ) +bleu_metric: 72.78163215270872 +---------- +NL: derive the class DefusedXmlException from the ValueError base class. +ref: class DefusedXmlException ( ValueError ) : +Output: class defusedxmlexception ( valueerror ) : +bleu_metric: 24.924249970265265 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: join bytes and self._leftover into a bytes string, substitute it for self._leftover. +ref: self . _leftover = b'' . join ( [ bytes , self . _leftover ] ) +Output: self. _ leftover = b''. join ( bytes, self. _ leftover ) +bleu_metric: 53.059036669648904 +---------- +NL: call the method f.formfield with an argument, unpacked dictionary kwargs, substitute the result for formfield. +ref: formfield = f . formfield ( ** kwargs ) +Output: formfield = f. formfield ( * * kwargs ) +bleu_metric: 100.0 +---------- +NL: return nothing. +ref: return +Output: return +bleu_metric: 100.0 +---------- +NL: define the function make_decorator with 2 arguments: unpacked list m_args and unpacked dictionary m_kwargs. +ref: def _make_decorator ( * m_args , ** m_kwargs ) : +Output: def make _ decorator ( * m _ args, * * m _ kwargs ) : +bleu_metric: 20.9734257913107 +---------- +NL: define the _set_post method with self class instance and post as the arguments. +ref: def _set_post ( self , post ) : +Output: def _ set _ post ( self, post ) : +bleu_metric: 57.608442016038964 +---------- +NL: substitute the '%s' with table and list containing first element of cursor.fetchone method, respectively. define the method clear with argument self. +ref: def clear ( self ) : +Output: def clear ( self ) : +bleu_metric: 100.0 +---------- +NL: if safe is not None, +ref: if safe is not None : +Output: if safe is not none : +bleu_metric: 59.46035575013605 +---------- +NL: call the method self.compile_filter with an argument token.contents, substitute the result for filter_expression. +ref: filter_expression = self . compile_filter ( token . contents ) +Output: filter _ expression = self. compile _ filter ( token. contents ) +bleu_metric: 45.78831372133982 +---------- +NL: call the method widget_attrs with an argument widget, from the base class of the DecimalField class, substitute the result for attrs. +ref: attrs = super ( DecimalField , self ) . widget_attrs ( widget ) +Output: attrs = super ( decimalfield, self ). widget _ attrs ( widget ) +bleu_metric: 50.24331618720053 +---------- +NL: call the function bytes with an argument value, return the result. +ref: return bytes ( value ) +Output: return bytes ( value ) +bleu_metric: 100.0 +---------- +NL: if self.allow_folders is true, +ref: if self . allow_folders : +Output: if self. allow _ folders : +bleu_metric: 35.49481056010052 +---------- +NL: get the value under the ns key of the resolver.app_dict dictionary, substitute it for app_list. +ref: app_list = resolver . app_dict [ ns ] +Output: app _ list = resolver. app _ dict. get ( ns ) +bleu_metric: 16.943571815930884 +---------- +NL: define the function activate with an argument timezone. +ref: def activate ( timezone ) : +Output: def activate ( timezone ) : +bleu_metric: 100.0 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: define the method writeString with 2 arguments self and encoding. +ref: def writeString ( self , encoding ) : +Output: def writetring ( self, encoding ) : +bleu_metric: 70.02496081947426 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: choices is an property object of this class where _get_choices is a getter and _set_choices is a setter function. +ref: choices = property ( _get_choices , _set_choices ) +Output: choices = property ( _ get _ choices, _ set _ choices ) +bleu_metric: 27.22589423069702 +---------- +NL: define the method has_other_pages with an argument self. +ref: def has_other_pages ( self ) : +Output: def has _ other _ pages ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: append string ".moves.urllib_parse" to __name__, use it as an key to get the value from the sys.modules dictionary, substitute it for parse. +ref: parse = sys . modules [ __name__ + ".moves.urllib_parse" ] +Output: parser. modules = sys. modules [ _ _ name _ parse ( ". moves. urllib _ parse " ) ] +bleu_metric: 30.29928206533524 +---------- +NL: substitute save_m2m for form.save_m2m. +ref: form . save_m2m = save_m2m +Output: form. save _ m2m = save _ m2m +bleu_metric: 19.96019880774733 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: append templatetag_module to _templatetags_modules. +ref: _templatetags_modules . append ( templatetag_module ) +Output: _ templatetags _ modules. append ( templatetag _ module ) +bleu_metric: 22.997519112894445 +---------- +NL: call the function format_html_join twice, first time with 3 elements: an empty string, string ' {0}="{1}"' +ref: return ( format_html_join ( '' , ' {0}="{1}"' , sorted ( attrs . items ( ) ) ) + format_html_join ( '' , ' {0}' , sorted ( boolean_attrs ) ) ) +Output: return format _ html _ join ('{ 0 } = " { 1 } " ', contents = " { 1 } " ', attr +bleu_metric: 27.15751395008594 +---------- +NL: return self. +ref: return self +Output: return self +bleu_metric: 100.0 +---------- +NL: call the method self.can_write.release. +ref: self . can_write . release ( ) +Output: self. can _ write. release ( ) +bleu_metric: 51.93071778680676 +---------- +NL: rise an KeyError exception with an argument key. +ref: raise KeyError ( key ) +Output: raise keyerror ( key ) +bleu_metric: 54.467618616059134 +---------- +NL: for every arg in args, +ref: for arg in args : +Output: for arg in args : +bleu_metric: 100.0 +---------- +NL: define the method has_key with 2 arguments: self and key. +ref: def has_key ( self , key ) : +Output: def has _ key ( self, key ) : +bleu_metric: 63.15552371794036 +---------- +NL: left justify value under the 'microsecond' key of the kw dictionary, in the field of width 6, fill the rest with '0', +ref: kw [ 'microsecond' ] = kw [ 'microsecond' ] . ljust ( 6 , '0' ) +Output: kw ['microsecond'] = kw ['microsecond']. l10 ('0') +bleu_metric: 75.7647478605596 +---------- +NL: call the function var.find with an argument: '_' appended to VARIABLE_ATTRIBUTE_SEPARATOR, if the result is greater than integer -1, +ref: if var . find ( VARIABLE_ATTRIBUTE_SEPARATOR + '_' ) > - 1 or var [ 0 ] == '_' : +Output: if var. find ( variable _ attribute _ separator +'_') > - 1 : +bleu_metric: 43.87967189045593 +---------- +NL: __all__ is an tuple with 3 elements: strings 'MultiPartParser', 'MultiPartParserError' and 'InputStreamExhausted'. +ref: __all__ = ( 'MultiPartParser' , 'MultiPartParserError' , 'InputStreamExhausted' ) +Output: _ _ all _ _ = ('multipartparser ','inputstreamexhausted ','inputstreamarsererror +bleu_metric: 17.459264138922485 +---------- +NL: join printable representation of d into a string separated with ', ', for every d in self.dicts, substitute the result for dictreprs. +ref: dictreprs = ', ' . join ( repr ( d ) for d in self . dicts ) +Output: dictreprs = ', '. join ( repr ( d ) ) +bleu_metric: 58.599599026827576 +---------- +NL: otherwise, if field.rel is true and field.rel is an instance of models.ManyToOneRel, +ref: elif field . rel and isinstance ( field . rel , models . ManyToOneRel ) : +Output: elif field. rel and isinstance ( field. rel, models. manytoonerelrel ) : +bleu_metric: 70.36321661008309 +---------- +NL: if text is an empty string and length of opts equals integer 1 and first element of opts equals string 'reset', +ref: if text == '' and len ( opts ) == 1 and opts [ 0 ] == 'reset' : +Output: if text ='' and len ( opt ) = = 1 and opts [ 0 ] = ='reset': +bleu_metric: 82.54709659685857 +---------- +NL: from django.utils.six.moves.urllib.parse import urljoin into default name space. +ref: from django . utils . six . moves . urllib . parse import urljoin +Output: from django. utils. six. moves. urllib. parse import urljoin +bleu_metric: 100.0 +---------- +NL: call the method self.xml.startElement with arguments string 'natural' and an empty dictionary. +ref: self . xml . startElement ( "natural" , { } ) +Output: self. xml. startelement ( " natural ", { } ) +bleu_metric: 74.51484621508065 +---------- +NL: property decorator, +ref: @ property +Output: @ property +bleu_metric: 100.0 +---------- +NL: raise an ValidationError with 3 arguments: value under the 'invalid_choice' key of the self.error_messages dictionary, +ref: raise ValidationError ( self . error_messages [ 'invalid_choice' ] , code = 'invalid_choice' , params = { 'value' : value } , ) +Output: raise validationerror ( self. error _ messages ['invalid _ choice'], code ='invalid _ choice ', params = { +bleu_metric: 35.137255878280165 +---------- +NL: call the self.delete method with key and version set to version as arguments. +ref: self . delete ( key , version = version ) +Output: self. delete ( key, version = version ) +bleu_metric: 100.0 +---------- +NL: call the method normalize with sum of parent_pat and pat as an argument, substitute the result for new_matches. +ref: new_matches = normalize ( parent_pat + pat ) +Output: new _ matches = normalize ( parent _ pat + pat ) +bleu_metric: 35.556702356686955 +---------- +NL: yield value under key key of self dictionary. +ref: yield self [ key ] +Output: yield self [ key ] +bleu_metric: 100.0 +---------- +NL: substitute result for cache dictionary value under the key key. +ref: cache [ key ] = result +Output: cache [ key ] = result +bleu_metric: 100.0 +---------- +NL: get the value under the key key of the self.cookies dictionary, substitute max-age for 'max-age' key of the returned dictionary. +ref: self . cookies [ key ] [ 'max-age' ] = max_age +Output: self. cookies [ key ] ['max - age'] = max _ age +bleu_metric: 81.72460049207133 +---------- +NL: define the method __copy__ with an argument self. +ref: def __copy__ ( self ) : +Output: def _ _ copy _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: from django.utils.functional import lazy into default name space. +ref: from django . utils . functional import lazy +Output: from django. utils. functional import lazy +bleu_metric: 100.0 +---------- +NL: added to a tuple with an element year, substitute the result for s1. call the function _findall with 2 arguments: s1 and year converted into a string, substitute the result for sites1. +ref: sites1 = _findall ( s1 , str ( year ) ) +Output: sites1 = _ findall ( s1, year ) +bleu_metric: 27.97794081296143 +---------- +NL: for every middleware_method in self._request_middleware, +ref: for middleware_method in self . _request_middleware : +Output: for middleware _ method in self. _ request _ middleware : +bleu_metric: 21.972813874997158 +---------- +NL: 'migrations. Unmigrated apps will also have their initial_data fixture reloaded. Does not achieve a "fresh install" state.' define the add_arguments with arguments self and parser. +ref: def add_arguments ( self , parser ) : +Output: def add _ arguments ( self, parser ) : +bleu_metric: 63.15552371794036 +---------- +NL: substitute c_int64 for ULONG_PTR. +ref: ULONG_PTR = c_int64 +Output: ulong _ ptr = c _ int64 +bleu_metric: 18.5750579991336 +---------- +NL: call the method language_code_re.search with an argument lang_code, if it evaluates to false, +ref: if not language_code_re . search ( lang_code ) : +Output: if not language _ code _ re. search ( lang _ code ) : +bleu_metric: 23.077125078149244 +---------- +NL: if s is an instance of bytes class, +ref: if isinstance ( s , bytes ) : +Output: if isinstance ( s, bytes ) : +bleu_metric: 100.0 +---------- +NL: for every accessor_name and object_list is return value of the method self.m2m_data.items. +ref: for accessor_name , object_list in self . m2m_data . items ( ) : +Output: for accessor _ name, object _ list in self. m2m _ data. items ( ) : +bleu_metric: 35.587851490678766 +---------- +NL: if obj is an instance of datetime.datetime, +ref: if isinstance ( obj , datetime . datetime ) : +Output: if isinstance ( obj, datetime. datetime ) : +bleu_metric: 100.0 +---------- +NL: call the method handler.addQuickElement with 2 arguments: string 'pubDate' and result of the function rfc2822_date, +ref: handler . addQuickElement ( "pubDate" , rfc2822_date ( item [ 'pubdate' ] ) ) +Output: handler. addquickelement ( " pubdate ", rfc 36 _ date ( self. feed [ 2 : ] ) ) +bleu_metric: 25.0737833894674 +---------- +NL: substitute file.mode for self.mode. +ref: self . mode = file . mode +Output: self. mode = file. mode +bleu_metric: 100.0 +---------- +NL: for every c in reversed order of candidate, convert c into an integer, sum all the results and substitute the result for evens. +ref: evens = sum ( int ( c ) for c in candidate [ - 1 : : - 2 ] ) +Output: ass = int ( c ) + b': candidate'% c : % s'% c ) +bleu_metric: 20.287366424876012 +---------- +NL: if first and second element of sys.version_info are both equal to integer 3, +ref: if sys . version_info [ : 2 ] >= ( 3 , 3 ) : +Output: if sys. version _ info [ 0 ]! = 3 : +bleu_metric: 17.942106086730668 +---------- +NL: join chunks into bytes string, substitute it for chunk. +ref: chunk = b'' . join ( chunks ) +Output: chunk = b '. join ( chunks ) +bleu_metric: 81.7612903878452 +---------- +NL: if not, call the function sys.getdefaultencoding and substitute the result for fs_encoding. app_template_dirs is an empty list. +ref: app_template_dirs = [ ] +Output: fs _ template _ dirs = sys. getdefaultcoate ( ) +bleu_metric: 11.498759556447222 +---------- +NL: define the method split_leading_dir with 2 arguments self and path. +ref: def split_leading_dir ( self , path ) : +Output: def split _ leading _ dir ( self, path ) : +bleu_metric: 52.96074933406222 +---------- +NL: call the self._lock.reader method, with the result perform the following, +ref: with self . _lock . reader ( ) : +Output: with self. _ lock. reader ( ) : +bleu_metric: 63.40466277046861 +---------- +NL: substitute self.default_locale_path for locale_dir. +ref: locale_dir = self . default_locale_path +Output: locale _ dir = self. default _ locale _ path +bleu_metric: 21.200626759025184 +---------- +NL: output_transaction is boolean True. +ref: output_transaction = True +Output: output _ transaction = true +bleu_metric: 27.301208627090666 +---------- +NL: obj is an instance of Model class, created with an unpacked dictionary data as argument. +ref: obj = Model ( ** data ) +Output: obj = model ( * * data ) +bleu_metric: 70.71067811865474 +---------- +NL: call the method apps.setdefault with 2 arguments: pattern and an empty list, append to the resulting object pattern.namespace. +ref: apps . setdefault ( pattern . app_name , [ ] ) . append ( pattern . namespace ) +Output: apps. setdefault ( pattern, [ ] ). namespace ( ) +bleu_metric: 45.336381247153966 +---------- +NL: for every key and value in data, +ref: for key , value in data : +Output: for key, value in data : : : +bleu_metric: 72.26568811456053 +---------- +NL: define the method configure_root with 3 arguments: self, config and incremental set to boolean False. +ref: def configure_root ( self , config , incremental = False ) : +Output: def configure _ root ( self, config, incremental = false ) : +bleu_metric: 54.23782837718303 +---------- +NL: value under the 'link' key of item dictionary for 'href' and "alternate" for "rel". if value under the 'pubdate' key of the item dictionary is not None, +ref: if item [ 'pubdate' ] is not None : +Output: if item ['pubdate'] is not none : +bleu_metric: 79.10665071754359 +---------- +NL: call the function get_fixed_timezone with an argument offset, substitute the result for tzinfo. +ref: tzinfo = get_fixed_timezone ( offset ) +Output: tzinfo = get _ fixed _ timezone ( offset ) +bleu_metric: 36.46285861936466 +---------- +NL: derive the class SuspiciousOperation from the Exception base class. +ref: class SuspiciousOperation ( Exception ) : +Output: class suspiciousoperation ( exception ) : +bleu_metric: 33.16700344765874 +---------- +NL: from django.conf import settings into default name space. +ref: from django . conf import settings +Output: from django. conf import settings +bleu_metric: 100.0 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: if app_dir is a directory, +ref: if os . path . isdir ( app_dir ) : +Output: if os. path. isdir ( app _ dir ) : +bleu_metric: 61.626070997295855 +---------- +NL: define the function mark_for_escaping with an argument s. +ref: def mark_for_escaping ( s ) : +Output: def mark _ for _ escaping ( s ) : +bleu_metric: 43.36189090348675 +---------- +NL: if AttributeError exception is caught, +ref: except AttributeError : +Output: except attributeerror : : : +bleu_metric: 31.239399369202552 +---------- +NL: call the field.rel.to._meta.get_field method with an field.rel.field_name argument, on the result call the method to_python, +ref: return field . rel . to . _meta . get_field ( field . rel . field_name ) . to_python ( field_value ) +Output: obj = field. rel. to. _ meta. get _ field ( field. rel. field _ name ). to _ python +bleu_metric: 35.630548449868954 +---------- +NL: define the method __init__ with 4 arguments: self, object_list, number, and paginator. +ref: def __init__ ( self , object_list , number , paginator ) : +Output: def _ _ init _ _ ( self, object _ list, number, paginator ) : +bleu_metric: 42.461633178803446 +---------- +NL: called with the argument microseconds set to integer 0, on the result of the method value.time. return list containing 2 elements: None and None. +ref: return [ None , None ] +Output: return [ none, none ] +bleu_metric: 32.17294420803808 +---------- +NL: define the function timeuntil with 2 arguments, d and now defaulting to none. +ref: def timeuntil ( d , now = None ) : +Output: def timeuntil ( d, now = none ) : +bleu_metric: 73.48889200874657 +---------- +NL: call the method validate with an argument value from the base class of the DecimalField class. +ref: super ( DecimalField , self ) . validate ( value ) +Output: super ( decimalfield, self ). validate ( value ) +bleu_metric: 72.78163215270872 +---------- +NL: append rel_to to string 'ForeignKey(, substitute the result for field_type. +ref: field_type = 'ForeignKey(%s' % rel_to +Output: field _ type ='foreignkey ( rel _ to.') +bleu_metric: 13.217947626377288 +---------- +NL: define the function avoid_wrapping with an argument value. +ref: def avoid_wrapping ( value ) : +Output: def avoid _ wrapping ( value ) : +bleu_metric: 53.7284965911771 +---------- +NL: from django.core.serializers.python import Deserializer as PythonDeserializer into default name space. +ref: from django . core . serializers . python import Deserializer as PythonDeserializer +Output: from django. core. serializers. python import deserializer as pythondeserializer +bleu_metric: 69.36418337614295 +---------- +NL: if code is not None, +ref: if code is not None : +Output: if code is not none : +bleu_metric: 59.46035575013605 +---------- +NL: raise an TemplateSyntaxError exception with an argument string "'firstof' statement requires at least one argument". +ref: raise TemplateSyntaxError ( "'firstof' statement requires at least one argument" ) +Output: raise templatesyntaxerror ( "'firstof'statement requires at least one argument " ) +bleu_metric: 78.04755352592598 +---------- +NL: from importlib import find_loader as importlib_find. +ref: from importlib import find_loader as importlib_find +Output: from importlib import find _ loader as importlib _ find +bleu_metric: 24.808415001701817 +---------- +NL: substitute the result for args. call the function popen_wrapper with an argument args, assign the result to msgs, errors and status, respectively. +ref: msgs , errors , status = popen_wrapper ( args ) +Output: msgs, errors, status = popen _ wrapper ( args ) +bleu_metric: 61.626070997295855 +---------- +NL: get the value under the 'id' key of the self.field.widget.attrs dictionary, if the key exists substitute it for id_, +ref: id_ = self . field . widget . attrs . get ( 'id' ) or self . auto_id +Output: id _ = self. field. widget. attrs. get ('id ', none ) +bleu_metric: 70.23026466283672 +---------- +NL: return string "", where '%s' is replaced with self.name and '%r' with self.nodelist. +ref: return "" % ( self . name , self . nodelist ) +Output: return " < block node : % s. contents : % r > " % ( self. name, self. nodelist ) +bleu_metric: 75.39221180326288 +---------- +NL: if nodelist_empty is None, +ref: if nodelist_empty is None : +Output: if nodelist _ empty is none : +bleu_metric: 23.9802967618271 +---------- +NL: define the method __iter__ with an argument self. +ref: def __iter__ ( self ) : +Output: def _ _ iter _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: from django.utils.module_loading import import_string into default name space. +ref: from django . utils . module_loading import import_string +Output: from django. utils. module _ loading import import _ string +bleu_metric: 39.553325358771794 +---------- +NL: call the self.make_bytes method with an argument chunk, for every chunk in value join the result to a bytes string, +ref: value = b'' . join ( self . make_bytes ( chunk ) for chunk in value ) +Output: return b '. join ( self. make _ bytes ( chunk ) for chunk in value ) +bleu_metric: 67.93780442907995 +---------- +NL: if value is contained in self.empty_values, +ref: if value in self . empty_values : +Output: if value in self. empty _ values : +bleu_metric: 51.93071778680676 +---------- +NL: and help is a string 'App label of the application to squash migrations for.'. call the method parser.add_argument with 2 arguments: string 'migration_name', +ref: parser . add_argument ( 'migration_name' , help = 'Migrations will be squashed until and including this migration.' ) +Output: parser. add _ argument ('migration _ name ', action ='store _ false ', dest ='interactive ', help = { +bleu_metric: 16.397906895258597 +---------- +NL: define the function jython_reloader with main_func, args and kwargs as arguments. +ref: def jython_reloader ( main_func , args , kwargs ) : +Output: def jython _ reloader ( main _ func, args, kwargs ) : +bleu_metric: 46.82568791024402 +---------- +NL: from django.test.signals import setting_changed into default name space. +ref: from django . test . signals import setting_changed +Output: from django. test. signals import setting _ changed +bleu_metric: 67.86502681586725 +---------- +NL: set the file position pointer at the beginning. +ref: file . seek ( 0 ) +Output: file. seek ( 0 ). seek ( 0 ) +bleu_metric: 55.936849159330734 +---------- +NL: return boolean False. +ref: return False +Output: return false +bleu_metric: 75.98356856515926 +---------- +NL: from django.template.base import TemplateDoesNotExist into default name space. +ref: from django . template . base import TemplateDoesNotExist +Output: from django. template. base import templatedoesnotexist +bleu_metric: 59.33643406390795 +---------- +NL: from django.http import HttpResponse into default name space. +ref: from django . http import HttpResponse +Output: from django. http import httpresponse +bleu_metric: 68.48940448305333 +---------- +NL: code is a string 'limit_value' +ref: code = 'limit_value' +Output: code ='limit _ value ' +bleu_metric: 35.49481056010052 +---------- +NL: call the method match.group with an argument integer 1, substitute the result for text. +ref: text = match . group ( 1 ) +Output: text = match. group ( 1 ) +bleu_metric: 100.0 +---------- +NL: split header string at string '\r\n', for every line in result, +ref: for line in header . split ( b'\r\n' ) : +Output: for line in header. split ('\ r \ n') : +bleu_metric: 83.97085972233151 +---------- +NL: call the method base.build_instance with arguments Model, data and db, substitute the result for obj. +ref: obj = base . build_instance ( Model , data , db ) +Output: obj = base. build _ instance ( model, data, db ) +bleu_metric: 54.23782837718303 +---------- +NL: substitute _iterkeys for iterkeys. +ref: iterkeys = _iterkeys +Output: iterkeys = _ iterkeys +bleu_metric: 47.28708045015878 +---------- +NL: return value.pk. +ref: return value . pk +Output: return value. pk +bleu_metric: 100.0 +---------- +NL: append ch to quant. +ref: quant . append ( ch ) +Output: quant. append ( ch ) +bleu_metric: 100.0 +---------- +NL: define the method write with 2 arguments: self and val. +ref: def write ( self , val ) : +Output: def write ( self, val ) : +bleu_metric: 100.0 +---------- +NL: and help as a string 'Nominates a database to print the SQL for. Defaults to the "default" database.', as arguments. define the method handle_app_config with self class instance, app_config and dictionary options as arguments. +ref: def handle_app_config ( self , app_config , ** options ) : +Output: def handle _ app _ config ( self, app _ config, * * options ) : +bleu_metric: 42.461633178803446 +---------- +NL: return None. +ref: return None +Output: return none +bleu_metric: 75.98356856515926 +---------- +NL: substitute length of self.loopvars for num_loopvars. +ref: num_loopvars = len ( self . loopvars ) +Output: num _ loopvars = len ( self. loopvars ) +bleu_metric: 71.02992180127423 +---------- +NL: deactivate and deactivate_all are lambda functions returning None. +ref: deactivate = deactivate_all = lambda : None +Output: deactivate, deactivate _ all = none +bleu_metric: 20.556680845025983 +---------- +NL: move integer 1 left for 50 bits, substitute the result for PB. +ref: PB = 1 << 50 +Output: pb = 1 < < 40 +bleu_metric: 61.47881529512643 +---------- +NL: start is an integer 0. +ref: start = 0 +Output: start = 0 +bleu_metric: 100.0 +---------- +NL: return the result. define the method render_option with 4 arguments: self, selected_choices, option_value and option_label. +ref: def render_option ( self , selected_choices , option_value , option_label ) : +Output: def render _ option ( self, selected _ choices, option _ value, option _ label ) : +bleu_metric: 17.096862609754858 +---------- +NL: if it doesnt exists return otherwise. define the method __getitem__ with 2 arguments: self and key. +ref: def __getitem__ ( self , key ) : +Output: def _ _ getitem _ _ ( self, key ) : +bleu_metric: 52.96074933406222 +---------- +NL: call the function get_language, substitute the result for language_code. +ref: language_code = get_language ( ) +Output: language _ code = get _ language ( ) _ code +bleu_metric: 16.108992769687397 +---------- +NL: if bit starts with '_("' ot bit starts with "_('", +ref: if bit . startswith ( '_("' ) or bit . startswith ( "_('" ) : +Output: if bit. startswith ('_ ('can bit bit. startswith ( " _'" ) : +bleu_metric: 68.68466871848692 +---------- +NL: return value of method url.hexdigest(), return value of method ctx.hexdigest, respectively, substitute it for cache_key. call the function _i18n_cache_key_suffix with request and cache_key as arguments, return the result. +ref: return _i18n_cache_key_suffix ( request , cache_key ) +Output: return _ i18n _ cache _ key _ suffix ( request, cache _ key ) +bleu_metric: 16.61742929957894 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: convert text without first element to hexadecimal integer, substitute it for c. +ref: c = int ( text [ 1 : ] , 16 ) +Output: c = hex2 int ( text [ 1 : ] ) +bleu_metric: 60.6478940381425 +---------- +NL: if self.file_path file path exists and it is not a directory, +ref: if os . path . exists ( self . file_path ) and not os . path . isdir ( self . file_path ) : +Output: if os. path. exists ( self. file _ path, os. path. isdir ( ) ) : +bleu_metric: 58.259041044814275 +---------- +NL: if value under the 'feed_url' key of the self.feed dictionary is not None, +ref: if self . feed [ 'feed_url' ] is not None : +Output: if self. feed ['feed _ url'] is not none : +bleu_metric: 53.12583871630396 +---------- +NL: return nothing. +ref: return +Output: return +bleu_metric: 100.0 +---------- +NL: import module os. +ref: import os +Output: import os +bleu_metric: 100.0 +---------- +NL: get _iterlists attribute of the class d, call the result with an argument unpacked dictionary kw, convert the result to a iterable, +ref: return iter ( getattr ( d , _iterlists ) ( ** kw ) ) +Output: return iter ( getattr ( d, _ iterlists ) ( * * kw ) ) +bleu_metric: 77.78111223054219 +---------- +NL: define the function wrapper with 2 arguments: unpacked list args and unpacked dictionary kwds. +ref: def wrapper ( * args , ** kwds ) : +Output: def wrapper ( * args, * * kwds ) : +bleu_metric: 100.0 +---------- +NL: substitute '%r' in string ' pgettext(%r, %r) ' with message_context and result of the function join_tokens, +ref: out . write ( ' pgettext(%r, %r) ' % ( message_context , join_tokens ( singular , trimmed ) ) ) +Output: self. pgettext ( % r, % r )'% join _ context, join ( self. tokens ) +bleu_metric: 39.67679217098602 +---------- +NL: call the method self.getlist with an argument key, return the result. +ref: return self . getlist ( key ) +Output: return self. getlist ( key ) +bleu_metric: 100.0 +---------- +NL: create dictionary out of the unpacked dictionary options, using defaults._get_kwargs as a mapping function, substitute the result for defaults. +ref: defaults = dict ( defaults . _get_kwargs ( ) , ** options ) +Output: defaults = dict ( defaults. _ get _ kwargs, * * kwargs ) +bleu_metric: 46.15425015629849 +---------- +NL: replace '%s' in the string 'handler%s' with view_type, use it as an name of the attribute to get from the self.urlconf_module, +ref: callback = getattr ( self . urlconf_module , 'handler%s' % view_type , None ) +Output: getattr ( self. urlconf _ module,'handler % s'% view _ type ) +bleu_metric: 50.21277621795816 +---------- +NL: warn_msg is a string "The translator-targeted comment '%s' (%sline %d) was ignored, because it wasn't the last item on the line.", +ref: warn_msg = ( "The translator-targeted comment '%s' " "(%sline %d) was ignored, because it wasn't the last item " "on the line." ) % ( c , filemsg , comment_lineno_cache ) +Output: warn _ msg = " the translator - target comment'% s'( % takesine % d ) is not none else " " t be +bleu_metric: 13.759659638895316 +---------- +NL: get attribute piece of the self object, call it and use the result as an argument for the call to the function force_text, +ref: pieces . append ( force_text ( getattr ( self , piece ) ( ) ) ) +Output: return force _ text ( self. get ( self, getattr ( ) ) ) +bleu_metric: 37.42031646082125 +---------- +NL: format self.day_field string with name, use it as the key for the data dictionary, substitute the result for d. +ref: d = data . get ( self . day_field % name ) +Output: d = data. get ( self. day _ field % name ) +bleu_metric: 67.39047062564734 +---------- +NL: get the '_decorated_function' attribute from func object, if it exists substitute it for func. +ref: func = getattr ( func , '_decorated_function' , func ) +Output: func = getattr ( func,'_ decorated _ function ', func ) +bleu_metric: 63.0190855592386 +---------- +NL: call the function six.iteritems with an argument blocks, for every name and block in result, +ref: for name , block in six . iteritems ( blocks ) : +Output: for name, block in six. iteritems ( blocks ) : +bleu_metric: 100.0 +---------- +NL: import module django. +ref: import django +Output: import django +bleu_metric: 100.0 +---------- +NL: call the method self.build_potfiles, substitute the result for potfiles. +ref: potfiles = self . build_potfiles ( ) +Output: potfiles = self. build _ potfiles ( ) +bleu_metric: 46.92470064105599 +---------- +NL: call the method self.stdout.write with an argument string "Checking %s for fixtures...", +ref: self . stdout . write ( "Checking %s for fixtures..." % humanize ( fixture_dir ) ) +Output: self. stdout. write ( " check % s for fixtures.. " % name ) +bleu_metric: 57.33109106568253 +---------- +NL: import module sys. +ref: import sys +Output: import sys +bleu_metric: 100.0 +---------- +NL: if length of bits is not equal to integer 3, +ref: if len ( bits ) != 3 : +Output: if len ( bits )! = 3 : +bleu_metric: 100.0 +---------- +NL: call the method self._archive.extractfile with an argument member, substitute the result for extracted. +ref: extracted = self . _archive . extractfile ( member ) +Output: extracted = self. _ archive. extractfile ( member ) +bleu_metric: 67.03420896351791 +---------- +NL: import module binascii. +ref: import binascii +Output: import binascii +bleu_metric: 100.0 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: _get_files is getter function for FILES attribute of this class. +ref: FILES = property ( _get_files ) +Output: files = property ( files ) +bleu_metric: 41.11336169005197 +---------- +NL: return boolean True. +ref: return True +Output: return true +bleu_metric: 75.98356856515926 +---------- +NL: with self.mutex perform, +ref: with self . mutex : +Output: with self. mutex : +bleu_metric: 100.0 +---------- +NL: call the function get_template with 2 arguments template_name and dirs, return the result. +ref: return get_template ( template_name , dirs ) +Output: return get _ template ( template _ name, dirs ) +bleu_metric: 31.455601883230706 +---------- +NL: l is lambda function with argument x, that calls the method self.make_key with x and version set to version as arguments. +ref: l = lambda x : self . make_key ( x , version = version ) +Output: l = lambda self : x, version = version ) +bleu_metric: 50.08057750957471 +---------- +NL: define the method upload_handlers with an argument self. +ref: def upload_handlers ( self ) : +Output: def upload _ handlers ( self ) : +bleu_metric: 53.7284965911771 +---------- +NL: if AmbiguityError exception is caught, +ref: except AmbiguityError : +Output: except ambiguityerror : : : : +bleu_metric: 26.26909894424158 +---------- +NL: if ValidationError, renamed to e, is caught, +ref: except ValidationError as e : +Output: except validationerror as e : : +bleu_metric: 41.11336169005197 +---------- +NL: return an dictionary containing 1 entry: request for 'request'. +ref: return { 'request' : request } +Output: return {'request': request } +bleu_metric: 100.0 +---------- +NL: if AttributeError exception is caught, +ref: except AttributeError : +Output: except attributeerror : : : +bleu_metric: 31.239399369202552 +---------- +NL: call the function func with an argument unpacked list args, substitute the result for result. +ref: result = func ( * args ) +Output: result = func ( * args ) +bleu_metric: 100.0 +---------- +NL: format the string '

%s

' with the result, for every p in paras, substitute list of results for paras. if not, +ref: else : +Output: else : +bleu_metric: 100.0 +---------- +NL: from django.utils.encoding import force_text and DEFAULT_LOCALE_ENCODING into default name space. +ref: from django . utils . encoding import force_text , DEFAULT_LOCALE_ENCODING +Output: from django. utils. encoding import force _ text, default _ locale _ encoding +bleu_metric: 42.64993772296153 +---------- +NL: append field to problem_fields list for every model in apps.get_models with argument kwargs dictionary, only if app_configs is None, +ref: problem_fields = [ field for model in apps . get_models ( ** kwargs ) if app_configs is None or model . _meta . app_config in app_configs for field in model . _meta . local_fields if isinstance ( field , models . BooleanField ) and not field . has_default ( ) ] +Output: def _ fields ( self. get _ models, * * kwargs ) : if app _ configs is none else none : +bleu_metric: 5.276590780860079 +---------- +NL: get the value under the 'ignore' key of the options dictionary, substitute it for self.ignore. +ref: self . ignore = options . get ( 'ignore' ) +Output: self. ignore = options. get ('ignore') +bleu_metric: 100.0 +---------- +NL: derive the class NowNode from Node base class. +ref: class NowNode ( Node ) : +Output: class nownode ( node ) : +bleu_metric: 33.16700344765874 +---------- +NL: if StandardError, renamed to e, exception is caught, +ref: except StandardError as e : +Output: except standarderror as e : except except +bleu_metric: 36.55552228545123 +---------- +NL: if msg is true, +ref: if msg : +Output: if msg : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : +bleu_metric: 5.6531710785114235 +---------- +NL: _error_files is an empty list. +ref: _error_files = [ ] +Output: _ error _ files = [ ] +bleu_metric: 44.63236137853329 +---------- +NL: return the result. decorator function register.filter with 2 arguments is_safe set to boolean True and needs_autoescape set to boolean True. +ref: @ register . filter ( is_safe = True , needs_autoescape = True ) +Output: @ register. filter ( is _ safe = true, needs _ autoescape = true ) +bleu_metric: 34.6697783111003 +---------- +NL: if filename is an instance of MIMEBase, +ref: if isinstance ( filename , MIMEBase ) : +Output: if isinstance ( filename, mimebase ) : +bleu_metric: 65.80370064762462 +---------- +NL: derive the class DebugNodeList from the NodeList base class. +ref: class DebugNodeList ( NodeList ) : +Output: class debugnodelist ( nodelist ) : +bleu_metric: 24.924249970265265 +---------- +NL: priority is floating point number 1.0. +ref: priority = 1.0 +Output: priority = float ( 1. 0 ) +bleu_metric: 31.239399369202552 +---------- +NL: raise KeyError exception with an argument key. +ref: raise KeyError ( key ) +Output: raise keyerror ( key ) +bleu_metric: 54.467618616059134 +---------- +NL: formated with value under 'target' key of config dictionary and e. otherwise if klass is a subclass of logging.handlers.SMTPHandler and string 'mailhost' is contained in config, +ref: elif issubclass ( klass , logging . handlers . SMTPHandler ) and 'mailhost' in config : +Output: elif oslass ['mailtphandler ] and os. path. smtphandler ('mailhost') in confi +bleu_metric: 15.435109972796832 +---------- +NL: return maybe. +ref: return maybe +Output: return maybe +bleu_metric: 100.0 +---------- +NL: with field_value as an argument, return the result. define the method _handle_m2m_field_node with arguments self, node and field. +ref: def _handle_m2m_field_node ( self , node , field ) : +Output: def _ handle _ m2m _ field _ node ( self, node, field ) : +bleu_metric: 49.40911248125205 +---------- +NL: call the method extend_nodelist with 3 arguments: nodelist, node and token, from the base class of the class DebugParser. +ref: super ( DebugParser , self ) . extend_nodelist ( nodelist , node , token ) +Output: extend _ nodelist ( nodelist, node, token ). extend ( debugparser ) +bleu_metric: 45.845403319927435 +---------- +NL: from django.utils.itercompat import is_iterable into default name space. +ref: from django . utils . itercompat import is_iterable +Output: from django. utils. itercompat import is _ iterable +bleu_metric: 67.86502681586725 +---------- +NL: call the method self.has_key with an argument key, return the result. +ref: return self . has_key ( key ) +Output: return self. has _ key ( key ) +bleu_metric: 46.92470064105599 +---------- +NL: call the method __new__ from the base class of the class DeclarativeFieldsMetaclass, with 4 arguments: mcs, name, bases and attrs. +ref: new_class = ( super ( DeclarativeFieldsMetaclass , mcs ) . __new__ ( mcs , name , bases , attrs ) ) +Output: super ( declarativefieldsmetaclass, mc, attrs ) +bleu_metric: 6.704103742144045 +---------- +NL: skip this loop iteration. +ref: continue +Output: continue +bleu_metric: 100.0 +---------- +NL: sum results of method self.save_existing_objects called with an argument commit and of method self.save_new_objects, +ref: return self . save_existing_objects ( commit ) + self . save_new_objects ( commit ) +Output: self. save _ existing _ objects = ( commit ) + self. save _ new _ objects ( ) +bleu_metric: 30.83012995502152 +---------- +NL: for every attr in tuple with 3 arguments: strings 'expects_localtime', 'is_safe' and 'needs_autoescape', +ref: for attr in ( 'expects_localtime' , 'is_safe' , 'needs_autoescape' ) : +Output: for attr in ('expects _ localtime ','is _ safe ','needs _ autoescape') : +bleu_metric: 37.71701894792374 +---------- +NL: for f in file_list, +ref: for f in file_list : +Output: for f in file _ list : +bleu_metric: 35.49481056010052 +---------- +NL: import module re. +ref: import re +Output: import re +bleu_metric: 100.0 +---------- +NL: call the function get_standard_processors, append processors to the result, for every processor is the result, +ref: for processor in get_standard_processors ( ) + processors : +Output: for processors in get _ standard _ processors ( processors ) : +bleu_metric: 16.064553745630615 +---------- +NL: call the function force_text with 3 arguments: old_field_name, self._encoding and errors as a string 'replace', +ref: self . _files . appendlist ( force_text ( old_field_name , self . _encoding , errors = 'replace' ) , file_obj ) +Output: old _ field _ name, self. _ encoding, errors ='replace') _ _ _ +bleu_metric: 32.266218040333364 +---------- +NL: yield v. +ref: yield v +Output: yield v +bleu_metric: 100.0 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: cc is a dictionary populated with items by calling function _to_tuple with el as an argument, +ref: cc = dict ( _to_tuple ( el ) for el in cc_delim_re . split ( response [ 'Cache-Control' ] ) ) +Output: cc = dict ( ( _ to _ tuple ( el ) ) for el in cc ) +bleu_metric: 27.657290182995865 +---------- +NL: split template once at the first character ':', convert the first element to lowercase and substitute it for scheme. +ref: scheme = template . split ( ':' , 1 ) [ 0 ] . lower ( ) +Output: scheme = template. split (':') [ 0 ]. lower ( ) +bleu_metric: 81.17187697331059 +---------- +NL: ESCAPE_MAPPINGS is an dictionary with 10 initial entries: None for 'A', None for 'b', None for 'B', '0' for 'd', 'x' for 'D', +ref: ESCAPE_MAPPINGS = { "A" : None , "b" : None , "B" : None , "d" : "0" , "D" : "x" , "s" : " " , "S" : "x" , "w" : "x" , "W" : "!" , "Z" : None , } +Output: escape _ mappings = {'a': none,'b':'x ','x': none,':'2 +bleu_metric: 9.612212086017154 +---------- +NL: locales is a list with an element locale. +ref: locales = [ locale ] +Output: locales = [ locale ] +bleu_metric: 100.0 +---------- +NL: call the method parser.parse with an argument tuple with one element string 'endblock', substitute the result for nodelist. +ref: nodelist = parser . parse ( ( 'endblock' , ) ) +Output: nodelist = parser. parse ( ('endblock ', ) ) +bleu_metric: 100.0 +---------- +NL: loaders is an empty list. +ref: loaders = [ ] +Output: loaders = [ ] +bleu_metric: 100.0 +---------- +NL: register.tag decorator, +ref: @ register . tag +Output: @ register. tag +bleu_metric: 100.0 +---------- +NL: return client. +ref: return client +Output: return client +bleu_metric: 100.0 +---------- +NL: call the function os.stat with an argument path, perform bitwise and on 2 operands st_mode field of the result and stat.S_IREAD, +ref: if ( ( os . stat ( path ) . st_mode & stat . S_IREAD ) != stat . S_IREAD ) : +Output: stat. stat | = os. stat ( path ), f _ mode ) +bleu_metric: 26.284973308343712 +---------- +NL: define the method __delitem__ with 3 arguments: self and key. +ref: def __delitem__ ( self , key ) : +Output: def _ _ delitem _ _ ( self, key ) : +bleu_metric: 52.96074933406222 +---------- +NL: call the method path.expanduser with an argument template, substitute it for expanded_template. +ref: expanded_template = path . expanduser ( template ) +Output: expanded _ template = path. expanduser ( template ) +bleu_metric: 71.02992180127423 +---------- +NL: call the method field.widget.value_from_datadict with 3 arguments: self.data, self.files and return value of the method, +ref: value = field . widget . value_from_datadict ( self . data , self . files , self . add_prefix ( name ) ) +Output: data = field. widget. value _ from _ datadict ( self. data, self. files, value ) +bleu_metric: 53.54652623295677 +---------- +NL: define the function pbkdf2 with 5 arguments: password, salt, iterations, dklen set to integer 0 and digest set to None. +ref: def pbkdf2 ( password , salt , iterations , dklen = 0 , digest = None ) : +Output: def pbkdf2 ( password, salt, iterations, dklen = 0, digest = none ) : +bleu_metric: 85.78928092681434 +---------- +NL: define the function get_default_timezone_name. +ref: def get_default_timezone_name ( ) : +Output: def get _ default _ timezone _ name ( ) : +bleu_metric: 30.26643726685863 +---------- +NL: ch2 is None. +ref: ch2 = None +Output: ch2 = none +bleu_metric: 70.71067811865474 +---------- +NL: define the method handle_uncaught_exception with self class instance, request, resolver and exec_info as arguments. +ref: def handle_uncaught_exception ( self , request , resolver , exc_info ) : +Output: def handle _ uncaught _ exception ( self, request, resolver, exc _ info ) : +bleu_metric: 42.461633178803446 +---------- +NL: substitute name for new_attr. +ref: new_attr = name +Output: new _ attr = name +bleu_metric: 35.93041119630843 +---------- +NL: convert config_string to lowercase and split it by ';' character, substitute the result for parts. +ref: parts = config_string . lower ( ) . split ( ';' ) +Output: parts = config _ string. lower ( ). split (';') +bleu_metric: 73.51460991014883 +---------- +NL: doublecolon_start is an integer -1. +ref: doublecolon_start = - 1 +Output: doublecolon _ start = - 1 +bleu_metric: 41.11336169005197 +---------- +NL: call the method self._start_relational_field with the argument field. +ref: self . _start_relational_field ( field ) +Output: self. _ start _ relational _ field ( field ) +bleu_metric: 33.260249505555045 +---------- +NL: call the method s.decode with encoding and errors as the arguments, substitute the result for s. +ref: s = s . decode ( encoding , errors ) +Output: s = s. decode ( encoding, errors ) +bleu_metric: 100.0 +---------- +NL: if token equals a string "not" and i incremented by 1 is lesser than l, +ref: if token == "not" and i + 1 < l and tokens [ i + 1 ] == "in" : +Output: if token = = " not " and i + 1 < l : +bleu_metric: 40.756721749573586 +---------- +NL: get 'help_texts' attribute from the options object, if it exists substitute it for self.help_texts, if not self.help_texts is None. +ref: self . help_texts = getattr ( options , 'help_texts' , None ) +Output: self. help _ texts = getattr ( options,'help _ texts ', none ) +bleu_metric: 37.66410991613996 +---------- +NL: if match is false or call to the method match.group with an argument integer 1 evaluates to boolean false, +ref: if not match or not match . group ( 1 ) : +Output: if not match or match. group ( 1 ) : +bleu_metric: 78.31566121841203 +---------- +NL: otherwise if ch equals a string 'P', +ref: elif ch != 'P' : +Output: elif ch = ='p': +bleu_metric: 35.49481056010053 +---------- +NL: from django.core.wsgi import get_wsgi_application into default name space. +ref: from django . core . wsgi import get_wsgi_application +Output: from django. core. wsgi import get _ wsgi _ application +bleu_metric: 55.936849159330734 +---------- +NL: call the method self.appendlist with 2 arguments: return value of the function force_text with 3 arguments: +ref: self . appendlist ( force_text ( key , encoding , errors = 'replace' ) , force_text ( value , encoding , errors = 'replace' ) ) +Output: self. appendlist ( force _ text ('< s ', use _ l10n = self. appendlist ( force _ text +bleu_metric: 12.827922161871646 +---------- +NL: while i is lesser than length of subject and i-th element of subject is not equal to p-th element of subject, +ref: while i < len ( subject ) and subject [ i ] != subject [ p ] : +Output: while i < len ( subject ) and subject [ i ]! = p [ - t ] : +bleu_metric: 74.38894884946686 +---------- +NL: call the method value.replace with an arugment tzinfo set to None, return the result. +ref: return value . replace ( tzinfo = None ) +Output: return value. replace ( tzinfo = none ) +bleu_metric: 74.19446627365011 +---------- +NL: get the type of self object, call the __bool__ method on the result with an argument self, return the result. +ref: return type ( self ) . __bool__ ( self ) +Output: return type ( self ). _ _ bool _ _ ( self ) +bleu_metric: 53.070741098514354 +---------- +NL: call the method parser.add_argument with 5 arguments: string '--database', action set to string 'store', dest as a string 'database', +ref: parser . add_argument ( '--database' , action = 'store' , dest = 'database' , default = DEFAULT_DB_ALIAS , help = 'Nominates a database to ' 'introspect. Defaults to using the "default" database.' ) +Output: parser. add _ argument ('- - database ', action ='store ', dest ='database ', default = default _ +bleu_metric: 36.757200288222776 +---------- +NL: substitute form.instance.pk for pk_value. +ref: pk_value = form . instance . pk +Output: pk _ value = form. instance. pk +bleu_metric: 63.89431042462724 +---------- +NL: return a list with an element etag_str. +ref: return [ etag_str ] +Output: return [ etag _ str ] +bleu_metric: 30.739407647563223 +---------- +NL: call the method readline.parse_and_bind with an argument string "tab:complete". +ref: readline . parse_and_bind ( "tab:complete" ) +Output: readline. parse _ and _ bind ( " tab : complete " ) +bleu_metric: 55.54570250728591 +---------- +NL: while ch is not equal to terminal_char, +ref: while ch != terminal_char : +Output: while ch! = terminal _ char : +bleu_metric: 45.18010018049224 +---------- +NL: return the value under the language_code key of the self._namespace_dict dictionary. +ref: return self . _namespace_dict [ language_code ] +Output: return self. _ namespace _ dict [ language _ code ] +bleu_metric: 21.972813874997158 +---------- +NL: append a tuple with 2 elements: obj and form.changed_data to self.changed_objects. +ref: self . changed_objects . append ( ( obj , form . changed_data ) ) +Output: self. changed _ objects. append ( ( obj, form. changed _ data ) ) +bleu_metric: 50.21277621795816 +---------- +NL: multiply delta.days, integer 24, integer 60 and integer 60 add delta.seconds to it, substitute the result for since. +ref: since = delta . days * 24 * 60 * 60 + delta . seconds +Output: now = delta. days + ( other. days * ( 60, delta. seconds ) ) +bleu_metric: 27.05850713752761 +---------- +NL: create a tuple out of types of v, for every k and v in sorted_items, extend key tuple with the result. +ref: key += tuple ( type ( v ) for k , v in sorted_items ) +Output: key + = ( type ( k, sorted _ items ) for k, v in sorted _ items ) +bleu_metric: 38.39817133079349 +---------- +NL: call the method translation.activate with an argument saved_locale. +ref: translation . activate ( saved_locale ) +Output: translation. activate ( saved _ locale ) +bleu_metric: 45.18010018049224 +---------- +NL: for every func in self.response_fixes, +ref: for func in self . response_fixes : +Output: for func in self. response _ fixes : +bleu_metric: 51.93071778680676 +---------- +NL: derive the class DebugNode from Node base class. +ref: class DebugNode ( Node ) : +Output: class debugnode ( node ) : +bleu_metric: 33.16700344765874 +---------- +NL: import module os. +ref: import os +Output: import os +bleu_metric: 100.0 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: if expires is lesser than now, +ref: if expires < now : +Output: if expires < now : +bleu_metric: 100.0 +---------- +NL: from django.utils.translation import ugettext and ungettext into default name space. +ref: from django . utils . translation import ugettext , ungettext +Output: from django. utils. translation import ugettext, ungettext +bleu_metric: 100.0 +---------- +NL: code set to an string 'invalid_choice' and dictionary params with an entry: value for 'value'. define the method valid_value with arguments self and value. +ref: def valid_value ( self , value ) : +Output: def valid _ value ( self, value ) : +bleu_metric: 63.15552371794036 +---------- +NL: call the function mark_safe with an argument new_obj, substitute the result for obj. +ref: obj = mark_safe ( new_obj ) +Output: obj = mark _ safe ( new _ obj ) +bleu_metric: 19.72940627795883 +---------- +NL: move integer 1 left for 30 bits, substitute the result for GB. +ref: GB = 1 << 30 +Output: $ = 1 < < 40 +bleu_metric: 51.697315395717055 +---------- +NL: return r. +ref: return r +Output: return r +bleu_metric: 100.0 +---------- +NL: from django.core.exceptions import ImproperlyConfigured into default name space. +ref: from django . core . exceptions import ImproperlyConfigured +Output: from django. core. exceptions import improperlyconfigured +bleu_metric: 76.1894894736741 +---------- +NL: call the function handle_app with 2 arguments: app_config.models_module and unpacked dictionary options. +ref: return handle_app ( app_config . models_module , ** options ) +Output: handle _ app ( app _ config. models _ module, * * options ) +bleu_metric: 34.823528327578536 +---------- +NL: call the method self.validate_key with argument key. +ref: self . validate_key ( key ) +Output: self. validate _ key ( key ) +bleu_metric: 45.18010018049224 +---------- +NL: decorator stringfilter, +ref: @ stringfilter +Output: @ stringfilter +bleu_metric: 100.0 +---------- +NL: self.xml is a instance of SimplerXMLGenerator class created with 2 arguments: self.stream and value under the 'encoding' key of the +ref: self . xml = SimplerXMLGenerator ( self . stream , self . options . get ( "encoding" , settings . DEFAULT_CHARSET ) ) +Output: self. xml = simplerxmlgenerator ( self. stream, self. feed ['encoding'] ) +bleu_metric: 37.83333192102432 +---------- +NL: call the method self.validate_key with argument key. +ref: self . validate_key ( key ) +Output: self. validate _ key ( key ) +bleu_metric: 45.18010018049224 +---------- +NL: dest set to string 'use_threading', default set to boolean True and help set to 'Tells Django to NOT use threading.'. call the method parser.add_argument with 5 arguments: string '--noreload', action set to string 'store_false', +ref: parser . add_argument ( '--noreload' , action = 'store_false' , dest = 'use_reloader' , default = True , help = 'Tells Django to NOT use the auto-reloader.' ) +Output: parser. add _ argument ('- - noinput ', action ='store _ false ', dest ='interactive ', +bleu_metric: 24.030037447185336 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: import module cgi. +ref: import cgi +Output: import cgi +bleu_metric: 100.0 +---------- +NL: substitute error_messages for value under the 'error_messages' key of attrs dictionary. +ref: attrs [ 'error_messages' ] = error_messages +Output: attrs ['error _ messages'] = error _ messages +bleu_metric: 27.968424579665367 +---------- +NL: return output. +ref: return output +Output: return output +bleu_metric: 100.0 +---------- +NL: define the method load_template with 3 arguments: self, template_name, template_dirs set to None. +ref: def load_template ( self , template_name , template_dirs = None ) : +Output: def load _ template ( self, template _ name, template _ dirs = none ) : +bleu_metric: 18.951629567590743 +---------- +NL: join all of the results into a string separated by newline character, return the result. define the method __str__ with an argument self. +ref: def __str__ ( self ) : +Output: def _ _ str _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: call the method self.get_queryset, return the length of the result. +ref: return len ( self . get_queryset ( ) ) +Output: return len ( self. get _ queryset ( ) ) +bleu_metric: 57.835698664651424 +---------- +NL: call the method compiled_parent._render with an argument context, return the result. +ref: return compiled_parent . _render ( context ) +Output: return compiled _ parent. _ render ( context ) +bleu_metric: 34.48444257953326 +---------- +NL: substitute exception for self.exception. +ref: self . exception = exception +Output: self. exception = exception +bleu_metric: 100.0 +---------- +NL: from django.core.files.base import File into default name space. +ref: from django . core . files . base import File +Output: from django. core. files. base import file +bleu_metric: 89.31539818068694 +---------- +NL: get config dictionary element under 'handlers' key, if it exists substitute it for handlers, if not, handlers is EMPTY_DICT. +ref: handlers = config . get ( 'handlers' , EMPTY_DICT ) +Output: handlers = config. get ('handlers ', empty _ dict ) +bleu_metric: 69.67812829199794 +---------- +NL: for every root in settings.ALLOWED_INCLUDE_ROOTS, +ref: for root in settings . ALLOWED_INCLUDE_ROOTS : +Output: for root in settings. allowed _ include _ roots : +bleu_metric: 42.80320606750595 +---------- +NL: call the method self.fields.values, for every field in result, +ref: for field in self . fields . values ( ) : +Output: for field in self. fields. values ( ) : +bleu_metric: 100.0 +---------- +NL: define the method O with an argument self. +ref: def O ( self ) : +Output: def o ( self ) : +bleu_metric: 70.71067811865474 +---------- +NL: call the function mark_safe with an arguments: for every n in nodelist results of the function force_text called with an argument n, joined in a string, return the result. +ref: return mark_safe ( '' . join ( force_text ( n ) for n in nodelist ) ) +Output: return mark _ safe ( force _ text ( n ) for n in nodelist ( n ) ) +bleu_metric: 41.85918788182776 +---------- +NL: and help is a string "Only dump objects with given primary keys. Accepts a comma separated list of keys. " "This option will only work when you specify one model.". call the method parser.add_argument with 5 arguments: string '-o', string '--output', default is None, dest set to string 'output', +ref: parser . add_argument ( '-o' , '--output' , default = None , dest = 'output' , help = 'Specifies file to which the output is written.' ) +Output: parser. add _ argument ('- - output ', action ='store _ false ', dest ='interactive ', default = +bleu_metric: 28.96882143390811 +---------- +NL: raise an NotImplementedError exception with argument string 'subclasses of Storage must provide a listdir() method'. +ref: raise NotImplementedError ( 'subclasses of Storage must provide a listdir() method' ) +Output: raise notimplementederror ('subclasses of storage must provide a listdir ( ) method') +bleu_metric: 64.69161553933024 +---------- +NL: if is_templatized is true, +ref: if is_templatized : +Output: if is _ templatized : +bleu_metric: 31.239399369202552 +---------- +NL: import module sys. +ref: import sys +Output: import sys +bleu_metric: 100.0 +---------- +NL: want_unicode is boolean True. +ref: want_unicode = True +Output: want _ unicode = true +bleu_metric: 27.301208627090666 +---------- +NL: _format_cache is an empty dictionary. +ref: _format_cache = { } +Output: _ format _ cache = { } +bleu_metric: 44.63236137853329 +---------- +NL: if ret equals to integer 0, return boolean True, otherwise return boolean False. +ref: return ( ret == 0 ) +Output: return ( ret = = 0 ) +bleu_metric: 100.0 +---------- +NL: self.message_context is None. +ref: self . message_context = None +Output: self. message _ context = none +bleu_metric: 26.26909894424158 +---------- +NL: result of the call to the function _ with an argument string 'Tue' for 1, result of the call to the function _ with an argument string 'Wed' for 2, result of the call to the function _ with an argument string 'Thu' for 3, result of the call to the function _ with an argument string 'Fri' for 4, result of the call to the function _ with an argument string 'Sat' for 5, and result of the call to the function _ with an argument string 'Sun' for 6. WEEKDAYS_REV is an dictionary with 7 entries: 0 for 'monday', 1 for 'tuesday', 2 for 'wednesday', 3 for 'thursday', 4 for 'friday', 5 for 'saturday' and 6 for 'sunday'. +ref: WEEKDAYS_REV = { 'monday' : 0 , 'tuesday' : 1 , 'wednesday' : 2 , 'thursday' : 3 , 'friday' : 4 , 'saturday' : 5 , 'sunday' : 6 } +Output: weekdays _ 1 = { 1 : _ ('2 ', 2 :') +bleu_metric: 2.67506823164552 +---------- +NL: for every _ and nodelist in self.conditions_nodelists, +ref: for _ , nodelist in self . conditions_nodelists : +Output: for _, nodelist in self. conditions _ nodelists : +bleu_metric: 61.153805769010226 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: val is None. +ref: val = None +Output: val = none +bleu_metric: 70.71067811865474 +---------- +NL: if USE_INOTIFY is true, +ref: if USE_INOTIFY : +Output: if use _ inotify : +bleu_metric: 31.239399369202552 +---------- +NL: and '%(error)s' is replaced with return value of the force_text function called with an argument e, extend the top_errors with the result. call the function six.text_type with an argument bf, append the result to hidden_fields. +ref: hidden_fields . append ( six . text_type ( bf ) ) +Output: hidden _ fields. append ( six. text _ type ( bf ) ) +bleu_metric: 49.62822700197383 +---------- +NL: substitute value for value. return value converted into a boolean. +ref: return bool ( value ) +Output: value = bool ( value ) +bleu_metric: 68.03749333171201 +---------- +NL: from django.utils.six.moves.urllib.parse import parse_qsl, urlencode, quote, urljoin and urlsplit into default name space. +ref: from django . utils . six . moves . urllib . parse import parse_qsl , urlencode , quote , urljoin , urlsplit +Output: from django. utils. six. moves. urllib. parse import parse _ q, urlencode, urlspl +bleu_metric: 64.22746145498867 +---------- +NL: call the method self.xml.startElement with 2 arguments: string 'field' and dictionary containing 3 entries: field.name for 'name', +ref: self . xml . startElement ( "field" , { "name" : field . name , "rel" : field . rel . __class__ . __name__ , "to" : smart_text ( field . rel . to . _meta ) , } ) +Output: self. xml. startelement ( " field ", { " field. name : " field. name } ) +bleu_metric: 16.50149780724822 +---------- +NL: from django.db import connections, router, transaction and DEFAULT_DB_ALIAS into default name space. +ref: from django . db import connections , router , transaction , DEFAULT_DB_ALIAS +Output: from django. db import ( connections, router, transaction, default _ db _ alias ) +bleu_metric: 47.17689621306842 +---------- +NL: increment self.active_readers by t. +ref: self . active_readers += t +Output: self. active _ readers + = t +bleu_metric: 35.49481056010052 +---------- +NL: call the method to_python with an argument value from the base class of the DateField class, return the result. +ref: return super ( DateField , self ) . to_python ( value ) +Output: return super ( datefield, self ). to _ python ( value ) +bleu_metric: 45.93073632354733 +---------- +NL: define the method _get_scheme with an argument self. +ref: def _get_scheme ( self ) : +Output: def _ get _ scheme ( self ) : +bleu_metric: 47.987820666906636 +---------- +NL: self.loaded_object_count is integer 0. +ref: self . loaded_object_count = 0 +Output: self. loaded _ object _ count = 0 +bleu_metric: 23.356898886410004 +---------- +NL: and i is greater than or equal to self.min_num, value under the 'empty_permitted' key of the defaults dictionary is boolean True. +ref: defaults [ 'empty_permitted' ] = True +Output: defaults ['empty _ permitted'] = true +bleu_metric: 33.932513407933634 +---------- +NL: raise an TemplateDoesNotExist exception. +ref: raise TemplateDoesNotExist +Output: raise templatedoesnotexist +bleu_metric: 16.954225822593184 +---------- +NL: replace every occurrence of '\\' in s with '\\\\'. +ref: s = s . replace ( '\\' , '\\\\' ) +Output: s = s. replace ('\ \ ','\ \ \ \ \ \') +bleu_metric: 90.21315316859231 +---------- +NL: if identity lambda function returns false, substitute the x for capfirst, if not call the function force_text with an argument x, +ref: capfirst = lambda x : x and force_text ( x ) [ 0 ] . upper ( ) + force_text ( x ) [ 1 : ] +Output: cap = lambda x : x if not x : force _ text ( x ) if x else force _ text ('ascii') +bleu_metric: 22.534921437308476 +---------- +NL: call the method self.data.isoformat, return the result. +ref: return self . data . isoformat ( ) +Output: return self. data. isoformat ( ) +bleu_metric: 100.0 +---------- +NL: call the method __deepcopy__ with an argument memo, from the base class of the class MultiValueField, substitute the result for result. +ref: result = super ( MultiValueField , self ) . __deepcopy__ ( memo ) +Output: result = super ( multivaluefield, self ). _ _ deepcopy _ _ ( memo ) +bleu_metric: 44.476089284108944 +---------- +NL: otherwise if count is greater than integer 1, +ref: elif count > 1 : +Output: elif count > 1 : +bleu_metric: 100.0 +---------- +NL: substitute '%s' in a string " - %s\n" with return value of the operation.describe method, write the result to self.stdout. +ref: self . stdout . write ( " - %s\n" % operation . describe ( ) ) +Output: self. stdout. write ( " - % s \ n " % operation. description ( ) ) +bleu_metric: 87.25129388059689 +---------- +NL: return the printable representation of the self object converted to a list. +ref: return repr ( list ( self ) ) +Output: return repr ( self ) ( ) +bleu_metric: 42.45672557693626 +---------- +NL: python_2_unicode_compatible decorator, +ref: @ python_2_unicode_compatible +Output: @ python _ 2 _ unicode _ compatible +bleu_metric: 18.575057999133595 +---------- +NL: if string '__str__' is not contained in __dict__ field of klass, +ref: if '__str__' not in klass . __dict__ : +Output: if'_ _ str _ _'not in klass : +bleu_metric: 34.07806467081348 +---------- +NL: from . import Error, Tags and register into default name space. +ref: from . import Error , Tags , register +Output: from. import error, tags, register +bleu_metric: 36.889397323344056 +---------- +NL: if self.data.minute equals integer 0 and self.data.hour equals integer 0, +ref: if self . data . minute == 0 and self . data . hour == 0 : +Output: if self. data. minute = = 0 and self. data. hour = = 0 : +bleu_metric: 100.0 +---------- +NL: join elements of comment_notes into a string, separated by whitespaces, append it to the string ' #', append the result to field_desc. +ref: field_desc += ' # ' + ' ' . join ( comment_notes ) +Output: field _ desc. append ('# % s'% ( comment _ notes ) ) +bleu_metric: 11.986062961075742 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: return self.DSTDIFF. +ref: return self . DSTDIFF +Output: return self. dstdiff +bleu_metric: 66.8740304976422 +---------- +NL: attrs as a dictionary with an entry: checkbox_id for 'id', substitute the result for value under the 'clear' key of the substitutions dictionary. format self.template_with_clear with substitutions, substitute the result for value under the 'clear_template' key of, +ref: substitutions [ 'clear_template' ] = self . template_with_clear % substitutions +Output: def clear _ template ( self, name ) : +bleu_metric: 10.400927574124633 +---------- +NL: call the traceback.print_exc method. +ref: traceback . print_exc ( ) +Output: traceback. print _ exc ( ) +bleu_metric: 35.49481056010052 +---------- +NL: self.timezone is None. +ref: self . timezone = None +Output: self. timezone = none +bleu_metric: 75.98356856515926 +---------- +NL: call the method tpl.format with an arguments self.name, self.sysid and self.pubid. +ref: return tpl . format ( self . name , self . sysid , self . pubid ) +Output: return tpl. format ( self. name, self. sysid, self. pubid ) +bleu_metric: 100.0 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: raise an NotImplementedError exception with argument string "This backend doesn't support absolute paths.". +ref: raise NotImplementedError ( "This backend doesn't support absolute paths." ) +Output: raise notimplementederror ( " this backend doesn't support absolute paths. " ) +bleu_metric: 64.4013384989717 +---------- +NL: from . import six into default name space. +ref: from . import six +Output: from. import six +bleu_metric: 100.0 +---------- +NL: if rhs is an instance of dict type and number is true, +ref: if isinstance ( rhs , dict ) and number : +Output: if isinstance ( rhs, dict and number ) : +bleu_metric: 63.40466277046861 +---------- +NL: get the value under the 'database' key of options dictionary, use it as a index to get connections list element, store it in connection. +ref: connection = connections [ options [ 'database' ] ] +Output: connection = connections [ options ['database'] ] +bleu_metric: 100.0 +---------- +NL: otherwise if cls._delegate_bytes is true, +ref: elif cls . _delegate_bytes : +Output: elif cls. _ delegate _ bytes : +bleu_metric: 31.239399369202552 +---------- +NL: call the method password.translate with an argument hmac.trans_5C, update outer dictionary with the result. +ref: outer . update ( password . translate ( hmac . trans_5C ) ) +Output: inner. update ( password. translate ( hmac. trans _ 5c ) ) +bleu_metric: 63.0190855592386 +---------- +NL: use it to call the cgi.parse_header method, assign the result to the _ and content_params respectively. if string 'charset' is contained in content_params, +ref: if 'charset' in content_params : +Output: if'charset'in content _ params : +bleu_metric: 51.93071778680676 +---------- +NL: define private method __str__ with argument self. +ref: def __str__ ( self ) : +Output: def _ _ str _ _ ( self ) : +bleu_metric: 43.36189090348675 +---------- +NL: call the self._lock.writer method, with the result perform the following, +ref: with self . _lock . writer ( ) : +Output: with self. _ lock. writer ( ) : +bleu_metric: 63.40466277046861 +---------- +NL: if count of occurrence of '.' in ip_str is not equal to integer 3, +ref: if ip_str . count ( '.' ) != 3 : +Output: if count. count ( '.')! = 3 : +bleu_metric: 86.66415730847504 +---------- +NL: call the method self.dicts.pop, return the result. +ref: return self . dicts . pop ( ) +Output: return self. dicts. pop ( ) +bleu_metric: 100.0 +---------- +NL: substitute value under the f.name key of the error_messages dictionary for value under the 'error_messages' key of kwargs dictionary. +ref: kwargs [ 'error_messages' ] = error_messages [ f . name ] +Output: kwargs ['error _ messages'] = error _ messages [ f. name ] +bleu_metric: 44.476089284108944 +---------- +NL: return val and encoded as a tuple. +ref: return val , encoded +Output: return val, encoding = ( ) +bleu_metric: 29.847458960098226 +---------- +NL: try, +ref: try : +Output: try : : : : : : +bleu_metric: 25.098621243978965 +---------- +NL: append tuple with 2 elements: command and token.source, append the result to self.command_stack. +ref: self . command_stack . append ( ( command , token . source ) ) +Output: self. command _ stack. append ( ( command, token. source ) ) +bleu_metric: 73.51460991014883 +---------- +NL: for every character in name, +ref: for character in name : +Output: for character in name : +bleu_metric: 100.0 +---------- +NL: define the function yesno with 2 arguments value and arg set to None. +ref: def yesno ( value , arg = None ) : +Output: def yesno ( value, arg = none ) : +bleu_metric: 73.48889200874657 +---------- +NL: define the method incr with 4 arguments, self class instance, key, delta defaulting to integer 1 and version defaulting to None. +ref: def incr ( self , key , delta = 1 , version = None ) : +Output: def incr ( self, key, delta = 1, version = none ) : +bleu_metric: 83.94327083733336 +---------- +NL: make a directory migrations_directory. +ref: os . mkdir ( migrations_directory ) +Output: os. makedirs ( migrations _ directory ) +bleu_metric: 24.446151121745054 +---------- +NL: value under the ORDERING_FIELD_NAME key of the form.fields is an instance of IntegerField class, created with 2 arguments: +ref: form . fields [ ORDERING_FIELD_NAME ] = IntegerField ( label = _ ( 'Order' ) , required = False ) +Output: form. fields [ ordering _ field _ name ] = integerfield ('', default ='time') +bleu_metric: 22.07016052700904 +---------- +NL: substitute value under the 'database' key of the options dictionary for database. +ref: database = options . get ( 'database' ) +Output: using = options. get ('database') ' +bleu_metric: 75.39221180326288 +---------- +NL: call the function six.text_type with an argument arg, append the result to '%', format the previous with value, return the result. +ref: return ( "%" + six . text_type ( arg ) ) % value +Output: return'% s % s'% ( six. text _ type ( arg ) ) +bleu_metric: 25.18750835198491 +---------- +NL: call the hashlib.md5 fuction with force_bytes(key) as argument. +ref: args = hashlib . md5 ( force_bytes ( key ) ) +Output: hashlib. hash1 ( force _ bytes ( key ) ) +bleu_metric: 44.08231875586727 +---------- +NL: defaults is an dictionary with 3 initial entries: self.auto_id for 'auto_id', result of the call to the method self.add_prefix, +ref: defaults = { 'auto_id' : self . auto_id , 'prefix' : self . add_prefix ( i ) , 'error_class' : self . error_class , } +Output: defaults = {'auto _ id': self. auto _ id ( ), self. prefix, prefix = {'invalid _ prefix ' +bleu_metric: 23.18721052191986 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: if not, +ref: else : +Output: else : : : : +bleu_metric: 34.5720784641941 +---------- +NL: if StopIteration exception, +ref: except StopIteration : +Output: except stopiteration : : : +bleu_metric: 31.239399369202552 +----------