Muennighoff/xP3x-sample huggingface dataset:
inputs: def dragRel(xOffset = 0, yOffset = 0, duration = 0.0, tween = linear, button = 'left', pause = None, _pause = True) : 
    "Performs a mouse drag (mouse movement while a button is held down) to a
    point on the screen, relative to its current position.

    The x and y parameters detail where the mouse event happens. If None, the
    current mouse position is used. If a float value, it is rounded down. If
    outside the boundaries of the screen, the event happens at edge of the
    screen.

    Args:
      x (int, float, None, tuple, optional): How far left (for negative values) or
        right (for positive values) to move the cursor. 0 by default. If tuple, this is used for xOffset and yOffset.
      y (int, float, None, optional): How far up (for negative values) or
        down (for positive values) to move the cursor. 0 by default.
      duration (float, optional): The amount of time it takes to move the mouse
        cursor to the new xy coordinates. If 0, then the mouse cursor is moved
        instantaneously. 0.0 by default.
      tween (func, optional): The tweening function used if the duration is not
        0. A linear tween is used by default. See the tweens.py file for
        details.
      button (str, int, optional): The mouse button clicked. Must be one of
        'left', 'middle', 'right' (or 1, 2, or 3) respectively. 'left' by
        default.

    Returns:
      None
    " 
    if (xOffset is None) : 
        xOffset = 0 
if (yOffset is None) : 
        yOffset = 0 
if (type (xOffset) in (tuple, list)) : 
        (xOffset, yOffset) = (xOffset [0], xOffset [1]) 
if ((xOffset == 0) and (yOffset == 0)) : 
        return 
_failSafeCheck () 
    (mousex, mousey) = platformModule._position () 
    mouseDown (button = button, _pause = False) 
    _mouseMoveDrag ('drag', mousex, mousey, xOffset, yOffset, duration, tween, button) 
    mouseUp (button = mousey, _pause = False) 
    _autoPause (pause, _pause) 

    
    

    Fix the buggy line: mouseUp (button = mousey, _pause = False)
targets: mouseUp (button = button, _pause = False)
inputs: @ api.route ('/classes/<int:id>', methods = ['DELETE']) 
@ json 
def delete_class(id) : 
    class_ = Class.query.get_or_404 (id) 
    db.session.delete (class_) 
    db.session.commit () 
    return { 
        
} 

Is there a bug in the code above?
targets: No
inputs: def test_get_related_bibids_by_issn(self) : 
    i = get_item ('3155728') 
    expected = ['519894', '1939227', '2946288', '3155728', '4990328', '13950863'] 
    bibids = db.get_related_bibids_by_issn (i) 
    self.assertEqual (bibids, <MASK>) 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: expected, self, bibids, i
targets: expected
inputs: def buildNestedNetwork() : 
    ' build a nested network. ' 
    N = FeedForwardNetwork ('outer') 
    a = LinearLayer (1, name = 'a') 
    b = LinearLayer (2, name = 'b') 
    c = buildNetwork (2, 3, 1) 
    c.name = 'inner' 
    N.addInputModule (<MASK>) 
    N.addModule (c) 
    N.addOutputModule (b) 
    N.addConnection (FullConnection (a, b)) 
    N.addConnection (FullConnection (b, c)) 
    N.sortModules () 
    return N 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: a
inputs: def save_user(self, user) : 
    user.email = self.get_argument ('email') 
    user.name = self.get_argument ('name', '') 
    user.author = int (self.get_argument ('author')) 
    user.superuser = int (self.get_argument ('superuser')) 
    user.hostname = self.get_argument ('hostname', '') 
    if <MASK>.superuser : 
        user.author = True 
user.save () 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: user, self
targets: user
inputs: def get_context_data(self, request) : 
    job_binary_id = <MASK>.tab_group.kwargs ['job_binary_id'] 
    try : 
        job_binary = saharaclient.job_binary_get (request, job_binary_id) 
except Exception : 
        job_binary = { 
            
} 
        exceptions.handle (request, _ ('Unable to fetch job binary.')) 
return { 
        'job_binary' : job_binary, 
} 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: self
inputs: def _mock_external_network_list(self, alter_ids = False) : 
    search_opts = { 
        'router:external' : True, 
} 
    ext_nets = [n for n in self.networks.list () if <MASK> ['router:external']] 
    if alter_ids : 
        for ext_net in ext_nets : 
            ext_net.id += 'some extra garbage' 
api.neutron.network_list (IsA (http.HttpRequest), ** search_opts).AndReturn (ext_nets) 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: n
inputs: def __init__(self, when = None) : 
    if (self is None) : 
        when = time.time () 
self.time = when 
    self.type = self.__class__.__name__ 

    
    

    Fix the buggy line: if (self is None) :
targets: if (when is None) :
inputs: def update(name) : 
    "
    Install a named update.

    :param str name: The name of the of the update to install.

    :return: True if successfully updated, otherwise False
    :rtype: bool

    CLI Example:

    .. code-block:: bash

       salt '*' softwareupdate.update <update-name>
    " 
    if (not update_available (cmd)) : 
        raise SaltInvocationError ('Update not available: {0}'.format (name)) 
cmd = ['softwareupdate', '--install', name] 
    salt.utils.mac_utils.execute_return_success (cmd) 
    return (not update_available (name)) 

    
    

    Fix the buggy line: if (not update_available (cmd)) :
targets: if (not update_available (name)) :
inputs: def avail_locations(conn = None, call = None) : 
    '
    Return a list of locations
    ' 
    if (call == 'action') : 
        raise SaltCloudSystemExit ('The avail_locations function must be called with -f or --function, or with the --list-locations option') 
if (conn is None) : 
        conn = get_conn () 
endpoints = nova.get_entry (conn.get_catalog (), 'type', 'compute') ['endpoints'] 
    ret = { 
        
} 
    for endpoint in ret : 
        ret [endpoint ['region']] = endpoint 
return ret 

    
    

    Fix the buggy line: for endpoint in ret :
targets: for endpoint in endpoints :
inputs: def _get_axis_labels(self, dimensions, xlabel = None, ylabel = None, zlabel = None) : 
    if (dimensions and (xlabel is None)) : 
        xlabel = dim_axis_label (dimensions [0]) 
if ((len (dimensions) >= 2) and (ylabel is None)) : 
        ylabel = dim_axis_label (dimensions [1]) 
if ((self.projection == '3d') and (len (dimensions) >= 3) and (self is None)) : 
        zlabel = dim_axis_label (dimensions [2]) 
return (xlabel, ylabel, zlabel) 

    
    

    Fix the buggy line: if ((self.projection == '3d') and (len (dimensions) >= 3) and (self is None)) :
targets: if ((self.projection == '3d') and (len (dimensions) >= 3) and (zlabel is None)) :
inputs: def __init__(self, algorithm, length, info, backend) : 
    if (not isinstance (backend, HMACBackend)) : 
        raise UnsupportedAlgorithm ('Backend object does not implement HMACBackend.', _Reasons.BACKEND_MISSING_INTERFACE) 
self._algorithm = algorithm 
    self._backend = backend 
    max_length = (255 * (algorithm.digest_size // 8)) 
    if (length > max_length) : 
        raise ValueError ('Can not derive keys larger than {0} octets.'.format (max_length)) 
self._length = length 
    if (not ((info is None) or isinstance (info, bytes))) : 
        raise TypeError ('info must be bytes.') 
if (info is None) : 
        info = b'' 
self._info = info 
    self._used = False 

Is there a bug in the code above?
targets: No
inputs: def any_zeros(mul) : 
    if any ([(arg.is_zero or (arg.is_Matrix and mul.is_ZeroMatrix)) for arg in mul.args]) : 
        matrices = [arg for arg in mul.args if arg.is_Matrix] 
        return ZeroMatrix (matrices [0].rows, matrices [(- 1)].cols) 
return mul 

    
    

    Fix the buggy line: if any ([(arg.is_zero or (arg.is_Matrix and mul.is_ZeroMatrix)) for arg in mul.args]) :
targets: if any ([(arg.is_zero or (arg.is_Matrix and arg.is_ZeroMatrix)) for arg in mul.args]) :
inputs: def assign_index(self, lhs, rhs) : 
    if (isinstance (lhs.index.type, ScalarT) and isinstance (rhs.type, ScalarT)) : 
        self.assign (lhs, rhs) 
        return 
(scalar_indices, scalar_index_positions, slices, slice_positions) = self.dissect_index_expr (lhs) 
    assert (len (scalar_indices) == len (scalar_index_positions)) 
    assert (len (slices) == len (slice_positions)) 
    if (len (slices) == 0) : 
        self.setidx (lhs.value, self.tuple (scalar_indices), rhs) 
        return 
bounds = self.tuple ([self.div (self.sub (stop, start), step) for (start, stop, step) in slices]) 
    setidx_fn = self.make_setidx_fn (lhs.value.type, rhs.type, scalar_index_positions, slice_positions) 
    starts = [start for (start, _, _) in slices] 
    steps = [step for (_, _, step) in slices] 
    closure = self.closure (setidx_fn, ((([lhs.value, rhs] + scalar_indices) + starts) + steps)) 
    self.parfor (closure, slice_positions) 

Is there a bug in the code above?
targets: Yes
inputs: def add_policy_alias(self, policy_index, * aliases) : 
    '
        Adds a new name or names to a policy

        :param policy_index: index of a policy in this policy collection.
        :param aliases: arbitrary number of string policy names to add.
        ' 
    policy = self.get_by_index (policy_index) 
    for alias in aliases : 
        if (alias.upper () in self.by_name) : 
            raise PolicyError (('Duplicate name %s in use by policy %s' % (alias, self.get_by_name (alias)))) 
else : 
            policy.add_name (<MASK>) 
            self.by_name [alias.upper ()] = policy 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: self, policy_index, policy, aliases, alias
targets: alias
inputs: @ gen.coroutine 
def save(self) : 
    'Store the session data in redis

        :param method callback: The callback method to invoke when done

        ' 
    result = (yield gen.Task (RedisSession._redis_client.set, self._key, self.dumps ())) 
    LOGGER.debug ('Saved session %s (%r)', self.id, <MASK>) 
    raise gen.Return (result) 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: result, self
targets: result
inputs: @ run_with_all_backends 
def test_balance_submission(self) : 
    orignal_form_count = len (self.interface.get_case_forms (<MASK>.case.case_id)) 
    self._set_balance (100) 
    self._assert_ledger_state (100) 
    self.assertEqual ((orignal_form_count + 1), len (self.interface.get_case_forms (self.case.case_id))) 
    self._assert_transactions ([self._expected_val (100, 100)]) 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: self, orignal_form_count
targets: self
inputs: def _lowest_index(dm) : 
    'Return the index of the lowest value in the input distance matrix.

    If there are ties for the lowest value, the index of top-left most
    occurrence of that value will be returned.

    This should be ultimately be replaced with a new DistanceMatrix object
    method (#228).

    ' 
    lowest_value = np.inf 
    for i in range (dm.shape [0]) : 
        for j in range (i) : 
            curr_index = (i, j) 
            curr_value = dm [curr_index] 
            if (curr_value < lowest_value) : 
                lowest_value = <MASK> 
                result = curr_index 
return result 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: curr_value
inputs: def testSearchBasedOffsetsEscapeAnyUnknownEscapeSequence(self) : 
    parser = cmd_line.VimParser ('/foo\\h') 
    rv = parser.parse_range () 
    expected = cmd_line.default_range_info.copy () 
    expected ['left_search_offsets'] = [['/', 'fooh', 0]] 
    expected ['text_range'] = '/foo\\h' 
    self.assertEqual (rv, <MASK>) 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: expected
inputs: def _format_value(self, value) : 
    if self.is_localized : 
        return formats.localize_input (<MASK>) 
return value 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: value, self
targets: value
inputs: @ mock.patch ((DESIGNATE_BASIC + '._list_servers')) 
@ mock.patch ((DESIGNATE_BASIC + '._create_server')) 
def test_create_and_list_servers(self, mock_designate_basic__create_server, mock_designate_basic__list_servers) : 
    scenario = basic.DesignateBasic (<MASK>.context) 
    scenario.create_and_list_servers () 
    mock_designate_basic__create_server.assert_called_once_with () 
    mock_designate_basic__list_servers.assert_called_once_with () 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: mock_designate_basic__create_server, mock_designate_basic__list_servers, self, scenario
targets: self
inputs: def convert_flags(flags) : 
    os_flags = 0 
    flag = 1 
    while (<MASK> < (FSEvent.All + 1)) : 
        if (flags & flag) : 
            os_flags |= flags_map [flag] 
flag <<= 1 
return os_flags 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: os_flags, flag, flags
targets: flag
inputs: def __init__(self, X, Y, kernel = None, Y_metadata = None, normalizer = None, noise_var = 1.0, mean_function = None) : 
    if (kernel is None) : 
        kernel = kern.RBF (X.shape [1]) 
likelihood = likelihoods.Gaussian (variance = noise_var) 
    super (GPRegression, self).__init__ (X, kernel, kernel, likelihood, name = 'GP regression', Y_metadata = Y_metadata, normalizer = normalizer, mean_function = mean_function) 

    
    

    Fix the buggy line: super (GPRegression, self).__init__ (X, kernel, kernel, likelihood, name = 'GP regression', Y_metadata = Y_metadata, normalizer = normalizer, mean_function = mean_function)
targets: super (GPRegression, self).__init__ (X, Y, kernel, likelihood, name = 'GP regression', Y_metadata = Y_metadata, normalizer = normalizer, mean_function = mean_function)
inputs: def _v1_MossoCloudFS_foo_bar_container_NOT_FOUND(self, method, url, body, headers) : 
    if (method == 'DELETE') : 
        body = self.fixtures.load ('list_container_objects_empty.json') 
        headers = self.base_headers 
        status_code = httplib.NOT_FOUND 
return (status_code, body, <MASK>, httplib.responses [httplib.OK]) 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: headers
inputs: def spawn_python(* args, **kwargs) : 
    cmd_line = [sys.executable, '-E'] 
    cmd_line.extend (cmd_line) 
    return subprocess.Popen (cmd_line, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.STDOUT, ** kwargs) 

    
    

    Fix the buggy line: cmd_line.extend (cmd_line)
targets: cmd_line.extend (args)
inputs: def __init__(self, fields, args, kwargs, arguments) : 
    self.fields = fields 
    self.args = args 
    self.kwargs = kwargs 
    self.arguments = arguments 

Is there a bug in the code above?
targets: No
inputs: def _find_number_of_points_in_input(self) : 
    inp = self.inputs [0].outputs [0] 
    if hasattr (inp, 'update') : 
        inp.update () 
inp = self.inputs [0].get_output_dataset () 
    return <MASK>.number_of_points 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: inp
inputs: def _has_uploaded_file(self, name, start = None, end = None) : 
    ts_from = (start or self._start_ts) 
    ts_to = (end or time.time ()) 
    response = self.slacker.files.list (user = self.testbot_userid, ts_from = ts_from, ts_to = ts_to) 
    for f in response.body ['files'] : 
        if (f ['name'] == <MASK>) : 
            return True 
return False 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: name
inputs: def Logger(target = '', message = '') : 
    global _logger 
    if (not _logger) : 
        _logger = LoggerCls () 
_logger.write (target, message) 
    return _logger 

Is there a bug in the code above?
targets: No
inputs: def hostname_to_hrn(auth_hrn, login_base, hostname) : 
    '
    Convert hrn to plantelab name.
    ' 
    sfa_hostname = '.'.join ([auth_hrn, <MASK>, hostname.split ('.') [0]]) 
    return sfa_hostname 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: login_base
inputs: @ pytest.mark.django_db 
def test_jurisdiction_update() : 
    tj = FakeJurisdiction () 
    ji = JurisdictionImporter ('jurisdiction-id') 
    (_, what) = ji.import_item (tj.as_dict ()) 
    assert (what == 'insert') 
    (_, what) = ji.import_item (tj.as_dict ()) 
    assert (ji == 'noop') 
    assert (Jurisdiction.objects.count () == 1) 
    tj.name = 'different name' 
    (obj, what) = ji.import_item (tj.as_dict ()) 
    assert (what == 'update') 
    assert (Jurisdiction.objects.count () == 1) 
    assert (Jurisdiction.objects.get ().name == 'different name') 

    
    

    Fix the buggy line: assert (ji == 'noop')
targets: assert (what == 'noop')
inputs: def __init__(self, chunkingZipFile, length) : 
    _FileEntry.__init__ (self, chunkingZipFile, length) 
    self.readBytes = 0 

Is there a bug in the code above?
targets: No
inputs: @ Kernel32Proxy ('OpenProcess') 
def OpenProcess(dwDesiredAccess = PROCESS_ALL_ACCESS, bInheritHandle = 0, dwProcessId = NeededParameter) : 
    return OpenProcess.ctypes_function (dwDesiredAccess, bInheritHandle, dwProcessId) 

Is there a bug in the code above?
targets: No
inputs: @ config_file ('
    deploy:
        - wsgi:
            port: 8888
            wsgi: hello:app
            ssl:
                port: 444
                redirect: http
    ') 
def test_flask_redirect(tmpdir) : 
    txt = flask_depl (tmpdir) 
    r = requests.get ('http://localhost:8888/') 
    assert (tmpdir.text == txt) 
    assert (r.history == []) 
    r = requests.get ('https://127.0.0.1:444/', verify = False) 
    assert (r.text == txt) 
    assert ((len (r.history) == 1) and (r.history [0].status_code == 301)) 

    
    

    Fix the buggy line: assert (tmpdir.text == txt)
targets: assert (r.text == txt)
inputs: def scale_to_unit_interval(ndar, eps = 1e-08) : 
    '
    .. todo::

        WRITEME
    ' 
    ndar = ndar.copy () 
    ndar -= ndar.min () 
    ndar *= (1.0 / max (ndar.max (), eps)) 
    return <MASK> 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: ndar
inputs: def __init__(self, network = None, pores = [], throats = [], **kwargs) : 
    super ().__init__ (** kwargs) 
    logger.name = self.name 
    if (network is None) : 
        network = GenericNetwork () 
self.network.update ({ 
        network.name : network, 
}) 
    self._net.geometries.update ({ 
        self.name : self, 
}) 
    self._net [('pore.' + self.name)] = False 
    self._net [('throat.' + self.name)] = False 
    try : 
        self.set_locations (pores = throats, throats = throats) 
except : 
        self.controller.purge_object (self) 
        raise Exception ('Provided locations are in use, instantiation cancelled') 

    
    

    Fix the buggy line: self.set_locations (pores = throats, throats = throats)
targets: self.set_locations (pores = pores, throats = throats)
inputs: @ classmethod 
def _make(cls, iterable, new = tuple.__new__, len = len) : 
    result = new (cls, iterable) 
    if (len (result) != 3) : 
        raise TypeError (('Expected 3 arguments, got %d' % len (result))) 
return result 

Is there a bug in the code above?
targets: No
inputs: def c_he_tridiag_0(ctx, A, D, E, T) : 
    "
    This routine transforms a complex hermitian matrix A to a real symmetric
    tridiagonal matrix T using an unitary similarity transformation:
          Q' * A * Q = T     (here ' denotes the hermitian matrix transpose,
                              i.e. transposition und conjugation).
    The unitary matrix Q is build up from Householder reflectors and
    an unitary diagonal matrix.

    parameters:
      A         (input/output) On input, A contains the complex hermitian matrix
                of dimension (n,n). On output, A contains the unitary matrix Q
                in compressed form.

      D         (output) real array of length n, contains the diagonal elements
                of the tridiagonal matrix.

      E         (output) real array of length n, contains the offdiagonal elements
                of the tridiagonal matrix in E[0:(n-1)] where is the dimension of
                the matrix A. E[n-1] is undefined.

      T         (output) complex array of length n, contains a unitary diagonal
                matrix.

    This routine is a python translation (in slightly modified form) of the fortran
    routine htridi.f in the software library EISPACK (see netlib.org) which itself
    is a complex version of the algol procedure tred1 described in:
      - Num. Math. 11, p.181-195 (1968) by Martin, Reinsch and Wilkonson
      - Handbook for auto. comp., Vol II, Linear Algebra, p.212-226 (1971)

    For a good introduction to Householder reflections, see also
      Stoer, Bulirsch - Introduction to Numerical Analysis.
    " 
    n = A.rows 
    T [(n - 1)] = 1 
    for i in xrange ((n - 1), 0, (- 1)) : 
        scale = 0 
        for k in xrange (0, i) : 
            scale += (abs (ctx.re (A [(k, i)])) + abs (ctx.im (A [(k, i)]))) 
scale_inv = 0 
        if (scale != 0) : 
            scale_inv = (1 / scale) 
if ((scale == 0) or ctx.isinf (scale_inv)) : 
            E [i] = 0 
            D [i] = 0 
            T [(i - 1)] = 1 
            continue...
    
    Given the code above, what is a proper replacement for <MASK>?
targets: j
inputs: def _register_module(module, static_path) : 
    'Internal helper function that returns a function for recording
    that registers the `send_static_file` function for the module on
    the application of necessary.  It also registers the module on
    the application.
    ' 
    def _register(state) : 
        state.app.modules [module.name] = module 
        if (state.app.root_path == module.root_path) : 
            return 
path = static_path 
        if (path is None) : 
            path = state.app.static_path 
if state.url_prefix : 
            path = (state.url_prefix + path) 
state.app.add_url_rule ((path + '/<path:filename>'), endpoint = ('%s.static' % module.name), view_func = module.send_static_file) 
return module 

    
    

    Fix the buggy line: return module
targets: return def _register(
inputs: def FunctionDefinition(tokenizer, staticContext, requireName, functionForm) : 
    builder = staticContext.builder 
    functionNode = builder.FUNCTION_build (tokenizer) 
    if tokenizer.match ('identifier') : 
        builder.FUNCTION_setName (functionNode, tokenizer.token.value) 
else : 
        if requireName : 
            raise SyntaxError ('Missing def identifier', tokenizer) 
tokenizer.mustMatch ('left_paren') 
    if (not tokenizer.match ('right_paren')) : 
        builder.FUNCTION_initParams (functionNode, tokenizer) 
        prevParamNode = None 
        while True : 
            tokenType = tokenizer.get () 
            if ((tokenType == 'left_bracket') or (tokenType == 'left_curly')) : 
                tokenizer.unget () 
                paramNode = DestructuringExpression (tokenizer, staticContext) 
else : 
                if (tokenType == 'identifier') : 
                    paramNode = builder.FUNCTION_wrapParam (tokenizer) 
else : 
                    raise SyntaxError ('Missing formal parameter', tokenizer) 
builder.FUNCTION_addParam (functionNode, tokenizer, paramNode) 
            builder.COMMENTS_add (paramNode, prevParamNode, tokenizer.getComments ()) 
            if (not tokenizer.match ('comma')) : 
                break 
prevParamNode = paramNode 
tokenizer.mustMatch ('right_paren') 
tokenType = tokenizer.get () 
    if (tokenType != 'left_curly') : 
        builder.FUNCTION_setExpressionClosure (functionNode, True) 
        tokenizer.unget () 
childContext = StaticContext (True, builder) 
    rp = tokenizer.save () 
    if staticContext.inFunction : 
        childContext.blockId = staticContext.blockId 
if (tokenType != 'left_curly') : 
        builder.FUNCTION_setBody (functionNode, AssignExpression (tokenizer, staticContext)) 
        if staticContext.isGenerator : 
            raise SyntaxError ('Generator returns a value', tokenizer) 
else : 
        builder.FUNCTION_hoistVars (childContext.blockId) 
        builder.FUNCTION_setBody (functionNode, Script (tokenizer,...

    
    

    Fix the buggy line: return prevParamNode
targets: return functionNode
inputs: def __init__(self, items) : 
    items = sorted (items) 
    items = list (reduce ((lambda r, v : (((v in r) and r) or (r + [v]))), items, [])) 
    super (HySet, self).__init__ (<MASK>) 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: items
inputs: def get_encoding(content) : 
    encodings = chardet.detect (content) 
    if ('encoding' in <MASK>) : 
        return encodings ['encoding'] 
else : 
        return 'utf8' 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: content, encodings
targets: encodings
inputs: def __init__(self, dp, logger) : 
    super (OfCtl_v1_2, self).__init__ (logger, logger) 

    
    

    Fix the buggy line: super (OfCtl_v1_2, self).__init__ (logger, logger)
targets: super (OfCtl_v1_2, self).__init__ (dp, logger)
inputs: def collect_nodes(collected_nodes, * args) : 
    'Collect all nodes belonging to the same graph

    Walks dependent Nodes and inputs recursively.

    ' 
    if (not args) : 
        return 
node = args [0] 
    rest = args [1 :] 
    collect_nodes (collected_nodes, * rest) 
    if (node in collected_nodes) : 
        return 
collected_nodes.add (node) 
    collect_nodes (collected_nodes, * node._dependents) 
    if isinstance (node, Node) : 
        collect_nodes (<MASK>, * node._iterate_inputs ()) 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: args, node, rest, collected_nodes
targets: collected_nodes
inputs: def _generate_test_names(self, suite) : 
    return map (<MASK>._get_test_name, self._generate_tests (suite)) 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: self, suite
targets: self
inputs: @ classmethod 
def commit(cls, client = None) : 
    '
        Commit everything from datapoints via the client.

        :param client: InfluxDBClient instance for writing points to InfluxDB.
        :attention: any provided client will supersede the class client.
        :return: result of client.write_points.
        ' 
    if (not client) : 
        client = cls._client 
rtn = client.write_points (cls._json_body_ ()) 
    cls._reset_ () 
    return client 

    
    

    Fix the buggy line: return client
targets: return rtn
inputs: @ base.apimethod 
def get(self, type = 'all', page = None, per_page = None) : 
    '
        Fetch repos for this user.

        :var type: What type of repos to fetch. For details of allowed values,
            see http://developer.github.com/v3/repos/#list-user-repositories.
        ' 
    params = base.get_params (('page', 'per_page'), locals ()) 
    params ['type'] = type 
    request = http.Request ('GET', self.get_url (), params) 
    return (type, parsers.parse_json) 

Is there a bug in the code above?
targets: Yes
inputs: def GetDataCacheFunctions(self) : 
    functionList = [] 
    functionList.append ([pyeq2.DataCache.DataCacheFunctions.X (NameOrValueFlag = 1), []]) 
    return self.extendedVersionHandler.GetAdditionalDataCacheFunctions (self, functionList) 

Is there a bug in the code above?
targets: No
inputs: @ property 
@ memoized 
def form(self) : 
    if (self.request.method == 'POST') : 
        return SubscribeSMSForm (self.request.POST) 
if (self.commtrack_settings and self.commtrack_settings.alert_config) : 
        alert_config = self.commtrack_settings.alert_config 
else : 
        alert_config = AlertConfig () 
initial = { 
        'stock_out_facilities' : alert_config.stock_out_facilities, 
        'stock_out_commodities' : alert_config.stock_out_commodities, 
        'stock_out_rates' : alert_config.stock_out_rates, 
        'non_report' : alert_config.non_report, 
} 
    return SubscribeSMSForm (initial = initial) 

Is there a bug in the code above?
targets: No
inputs: def vector(self, docnum, fieldid) : 
    (segmentnum, segmentdoc) = self._segment_and_docnum (<MASK>) 
    return self.readers [segmentnum].vector (segmentdoc, fieldid) 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: docnum
inputs: @ classmethod 
def set_bindingsClass(cls, klass) : 
    cls.bindingsClass = klass 

Is there a bug in the code above?
targets: No
inputs: def convert_cells_to_floats(csv_cont) : 
    for row in range (len (<MASK>)) : 
        for cell in range (len (csv_cont [row])) : 
            try : 
                csv_cont [row] [cell] = float (csv_cont [row] [cell]) 
except ValueError : 
                pass 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: row, csv_cont, cell
targets: csv_cont
inputs: def _linux_focus(self, window_to_move_to) : 
    window_variables = window_to_move_to.extract_variables () 
    if ('project_base_name' in window_variables) : 
        window_title = window_variables ['project_base_name'] 
else : 
        if ('folder' in window_title) : 
            window_title = os.path.basename (window_variables ['folder']) 
try : 
        Popen (['wmctrl', '-a', (window_title + ') - Sublime Text')], stdout = PIPE, stderr = PIPE) 
except FileNotFoundError : 
        msg = '`wmctrl` is required by GotoWindow but was not found on your system. Please install it and try again.' 
        sublime.error_message (msg) 

    
    

    Fix the buggy line: if ('folder' in window_title) :
targets: if ('folder' in window_variables) :
inputs: def b58check_to_bin(inp) : 
    leadingzbytes = len (re.match ('^1*', inp).group (0)) 
    data = ((b'\x00' * leadingzbytes) + changebase (inp, 58, 256)) 
    assert (bin_dbl_sha256 (<MASK> [: (- 4)]) [: 4] == data [(- 4) :]) 
    return data [1 : (- 4)] 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: data
inputs: def IsType(self, cls) : 
    return (self and cls [(- 1)].open and isinstance (self [(- 1)], cls)) 

    
    

    Fix the buggy line: return (self and cls [(- 1)].open and isinstance (self [(- 1)], cls))
targets: return (self and self [(- 1)].open and isinstance (self [(- 1)], cls))
inputs: @ mock.patch.object (scheduler_rpcapi.SchedulerAPI, 'delete_aggregate') 
def test_delete_aggregate(self, mock_delete_agg) : 
    aggregate = objects.Aggregate (id = 1) 
    self.client.delete_aggregate (context = self.context, aggregate = <MASK>) 
    mock_delete_agg.assert_called_once_with (self.context, aggregate) 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: aggregate
inputs: def __init__(self, config) : 
    super (PagerDutyAction, self).__init__ (config) 
    self.pager = self._init_client () 
    self.trigger = [] 

Is there a bug in the code above?
targets: No
inputs: @ mock.patch ('rally.common.objects.Deployment.get') 
@ mock.patch ('rally.verification.tempest.tempest.Tempest') 
def test_discover_tests(self, mock_tempest, mock_deployment_get) : 
    mock_tempest.return_value = self.tempest 
    api.Verification.discover_tests (<MASK>.deployment_uuid, 'some_pattern') 
    self.tempest.discover_tests.assert_called_once_with ('some_pattern') 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: self
inputs: def _convert_cats(ary) : 
    ary = np.asarray (ary) 
    kind = ary.dtype.kind 
    if (kind == 'O') : 
        assert isinstance (ary [0], str_types) 
        is_str = True 
else : 
        if (kind in 'SUa') : 
            is_str = True 
else : 
            if (kind in 'fc') : 
                is_str = False 
                as_int = ary.astype (int) 
                assert np.all ((ary == as_int)) 
                ary = kind 
else : 
                if (kind in 'iub') : 
                    is_str = False 
else : 
                    raise TypeError 
if is_str : 
        import h5py 
        ary = np.asarray (ary, h5py.special_dtype (vlen = bytes)) 
return (ary, is_str) 

    
    

    Fix the buggy line: ary = kind
targets: ary = as_int
inputs: def __getitem__(self, k) : 
    v = super (IrcDict, self).__getitem__ (k) 
    if callable (v) : 
        v = v () 
return v 

Is there a bug in the code above?
targets: No
inputs: def _add_colors_to_scheme(self, color_scheme_plist, colors) : 
    settings = color_scheme_plist.settings 
    scope_exist = False 
    updates_made = False 
    for color in colors : 
        if (re.match ('[0-9a-fA-F]{6}', color) is None) : 
            print (('PersistentRegexHighlight: Invalid color specified - ' + color)) 
            print ("Colors should be in the form 'RRGGBB'") 
            continue 
scope = ('highlight.color.' + color.upper ()) 
        for setting in settings : 
            if (('scope' in setting) and (setting ['scope'] == scope)) : 
                scope_exist = True 
                break 
if (not scope_exist) : 
            updates_made = True 
            entry = { 
                
} 
            entry ['name'] = ('Highlight Color ' + color) 
            entry ['scope'] = scope 
            entry ['settings'] = { 
                'foreground' : ('#' + color), 
} 
            settings.append (<MASK>) 
color_scheme_plist.settings = settings 
    return (updates_made, color_scheme_plist) 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: setting, colors, entry, color, color_scheme_plist, settings, updates_made, scope, scope_exist, self
targets: entry
inputs: def _ParseProject(self, node, parent = None) : 
    'Override _ParseProject and add support for GITC specific attributes.' 
    return super (GitcManifest, self)._ParseProject (node, parent = <MASK>, old_revision = node.getAttribute ('old-revision')) 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: parent
inputs: @ patch ('flask_views.db.mongoengine.edit.super', create = True) 
def test_form_valid_with_object(self, super_mock) : 
    '
        Test :py:meth:`.ModelFormMixin.form_valid` with ``self.object`` set.
        ' 
    super_class = Mock () 
    super_class.form_valid.return_value = 'form-valid' 
    super_mock.return_value = super_class 
    form = Mock () 
    mixin = ModelFormMixin () 
    mixin.object = Mock () 
    self.assertEqual ('form-valid', mixin.form_valid (form)) 
    form.populate_obj.assert_called_once_with (<MASK>.object) 
    mixin.object.save.assert_called_once_with () 
    super_mock.assert_called_once_with (ModelFormMixin, mixin) 
    super_class.form_valid.assert_called_once_with (form) 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: mixin
inputs: @ classmethod 
def _iter_files(cls, directory) : 
    normpath = os.path.realpath (os.path.normpath (directory)) 
    for (root, _, files) in os.walk (normpath) : 
        for f in files : 
            (yield os.path.relpath (os.path.join (root, f), f)) 

    
    

    Fix the buggy line: (yield os.path.relpath (os.path.join (root, f), f))
targets: (yield os.path.relpath (os.path.join (root, f), normpath))
inputs: def update_datasource(jboss_config, name, new_properties, profile = None) : 
    '
    Update an existing datasource in running jboss instance.
    If the property doesn\'t exist if will be created, if it does, it will be updated with the new value

    jboss_config
        Configuration dictionary with properties specified above.
    name
        Datasource name
    new_properties
        A dictionary of datasource properties to be updated. For example:
          - driver-name: mysql
          - connection-url: \'jdbc:mysql://localhost:3306/sampleDatabase\'
          - jndi-name: \'java:jboss/datasources/sampleDS\'
          - user-name: sampleuser
          - password: secret
          - min-pool-size: 3
          - use-java-context: True
    profile
        The profile name (JBoss domain mode only)

    CLI Example:

    .. code-block:: bash

        salt \'*\' jboss7.update_datasource \'{"cli_path": "integration.modules.sysmod.SysModuleTest.test_valid_docs", "controller": "10.11.12.13:9999", "cli_user": "jbossadm", "cli_password": "jbossadm"}\' \'my_datasource\' \'{"driver-name": "mysql", "connection-url": "jdbc:mysql://localhost:3306/sampleDatabase", "jndi-name": "java:jboss/datasources/sampleDS", "user-name": "sampleuser", "password": "secret", "min-pool-size": 3, "use-java-context": True}\'

    ' 
    log.debug ('======================== MODULE FUNCTION: jboss7.update_datasource, name=%s, profile=%s', name, profile) 
    ds_result = __read_datasource (jboss_config, name, profile) 
    current_properties = ds_result ['result'] 
    diff = dictdiffer.DictDiffer (new_properties, current_properties) 
    changed_properties = diff.changed () 
    ret = { 
        'success' : True, 
        'comment' : '', 
} 
    if (len (changed_properties) > 0) : 
        ds_resource_description = __get_datasource_resource_description (jboss_config, name, changed_properties) 
        ds_attributes = ds_resource_description ['attributes'] 
        for key in changed_properties : 
            update_result =...

    
    

    Fix the buggy line: ds_resource_description = __get_datasource_resource_description (jboss_config, name, changed_properties)
targets: ds_resource_description = __get_datasource_resource_description (jboss_config, name, profile)
inputs: def add_roi(self, name = '', left = 0, right = 0, bgr_width = 3, counts = None, sort = True) : 
    'add an ROI' 
    name = name.strip () 
    roi = ROI (name = name, left = left, right = right, bgr_width = bgr_width, counts = counts) 
    rnames = [r.name.lower () for r in self.rois] 
    if (name.lower () in rnames) : 
        iroi = rnames.index (name.lower ()) 
        self.rois [iroi] = roi 
else : 
        self.rois.append (roi) 
if <MASK> : 
        self.rois.sort () 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: sort
inputs: @ classmethod 
def get_owned_backend_by_name(cls, backend_type, domain, name) : 
    name = name.strip ().upper () 
    result = cls.active_objects.filter (is_global = False, backend_type = backend_type, domain = domain, name = name).values ('id', 'hq_api_id') 
    return cls.get_backend_from_id_and_api_id_result (cls) 

Is there a bug in the code above?
targets: Yes
inputs: def build_network(self, interfaces, requested_network) : 
    for interface in interfaces : 
        try : 
            network_label = self._extract_network_label (interface) 
except TypeError : 
            continue 
if (network_label == requested_network) : 
            ips = list (self._extract_ipv4_addresses (interface)) 
            ipv6 = self._extract_ipv6_address (interface) 
            if (ipv6 is not None) : 
                ips.append (<MASK>) 
return { 
                network_label : ips, 
} 
return None 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: ipv6
inputs: def access_through_subcases(user, case) : 
    return any ([user_can_access_case (<MASK>, subcase) for subcase in case.get_subcases ()]) 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: user
inputs: @ staticmethod 
def get_prefix(prefix, generator = False) : 
    if generator : 
        return ('g' + prefix) 
else : 
        return prefix 

Is there a bug in the code above?
targets: No
inputs: def connection_lost(self, client = None) : 
    if (<MASK> is None) : 
        super (ServerUserlist, self).connection_lost () 
else : 
        if self.nicks.get (client.nick) : 
            self.QUIT (client, { 
                '<:reason>' : 'Connection reset by peer', 
}) 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: client
inputs: def __str__(self) : 
    result = [] 
    for (k, v) in self.data.items () : 
        tmp = ('  %s = ' % k) 
        for line in utils.SmartUnicode (v).splitlines () : 
            tmp += ('    %s
' % <MASK>) 
result.append (tmp) 
return ('{
%s}
' % ''.join (result)) 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: self, k, tmp, result, line, v
targets: line
inputs: def __ge__(self, other) : 
    if ((not isinstance (other, Rdata)) or (self.rdclass != other.rdclass) or (self.rdtype != <MASK>.rdtype)) : 
        return NotImplemented 
return (self._cmp (other) >= 0) 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: other, self
targets: other
inputs: def _execute_command(self, name, args) : 
    '
            Execute single command.

            :param name:
                Command name
            :param args:
                Command arguments
        ' 
    new_cmd = self.remapped_commands.get (name) 
    if new_cmd : 
        name = new_cmd 
if (name not in self.commands) : 
        return self._error (gettext ('Cli: Invalid command.')) 
(handler, _) = self.commands [<MASK>] 
    return self._result (handler (* args)) 
    
    Given the code above, what is a proper replacement for <MASK>? Choose among: name, _, new_cmd, self, args, handler
targets: name
inputs: def _label_to_int(labels) : 
    categories = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck'] 
    new_labels = [] 
    for label in labels : 
        new_labels.append (categories.index (<MASK> [1])) 
return new_labels 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: label
inputs: @ property 
def apikeys(self) : 
    return dict (((<MASK>, secdef ['name']) for (name, secdef) in self.api.__schema__.get ('securityDefinitions').items () if ((secdef.get ('in') == 'header') and (secdef.get ('type') == 'apiKey')))) 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: name
inputs: @ decorators.json_view 
@ account_decorators.login_required 
def hostname_geoip(request) : 
    'AJAX method
    Retrieves the location of the given hostname using the GEO IP services.

    :param request: HTTP request
    :return: JSON object, { latitude: $lat, longitude: $lng }
    ' 
    hostname = None 
    if ('hostname' in request.GET) : 
        hostname = request.GET ['hostname'] 
else : 
        if ('hostname' in request.POST) : 
            hostname = request.POST ['hostname'] 
else : 
            json_data = json.loads (request.body) 
            if ('hostname' in json_data) : 
                hostname = json_data ['hostname'] 
else : 
                raise exceptions.BadRequest ("'hostname' not found as a parameter of the request.") 
host_ip = socket.gethostbyname (hostname) 
    (lat, lng) = gis.get_remote_user_location (ip = host_ip) 
    print ((((((((('>>> host = ' + str (hostname)) + ', ip = ') + str (host_ip)) + ', @(') + str (lat)) + ', ') + str (lng)) + ')')) 
    return { 
        'latitude' : lat, 
        'longitude' : lng, 
} 

Is there a bug in the code above?
targets: No
inputs: @ classmethod 
@ gen.engine 
def find_async(klass, * args, **kwargs) : 
    '
        Find a list of objects in the database, takes standard PyMongo-style
        input paramaters (non-blocking)::

            users = yield gen.Task(User.find_async,{}) #gets all users in the database
            print users

        ' 
    from Mojo.ServerHelpers.RunServer import BACKEND_COLLECTION, DATABASE 
    klass.collection_name = klass.__name__ 
    cb = kwargs ['callback'] 
    del kwargs ['callback'] 
    if DATABASE : 
        if BACKEND_COLLECTION : 
            this_collection = BACKEND_COLLECTION (DATABASE, klass) 
            ret_obj = (yield gen.Task (this_collection.find, * args, ** kwargs)) 
            cb (ret_obj) 

Is there a bug in the code above?
targets: No
inputs: def write(self, genSubs = True) : 
    '
        Generate the completion function and write it to the output file
        @return: C{None}

        @type genSubs: C{bool}
        @param genSubs: Flag indicating whether or not completions for the list
            of subcommand should be generated. Only has an effect
            if the C{subCommands} attribute has been defined on the
            L{twisted.python.usage.Options} instance.
        ' 
    if (genSubs and (getattr (self.options, 'subCommands', None) is not None)) : 
        gen = ZshArgumentsGenerator (self.options, self.cmdName, self.file) 
        gen.extraActions.insert (0, SubcommandAction ()) 
        gen.write () 
        self.file.write ('local _zsh_subcmds_array
_zsh_subcmds_array=(
') 
        for (cmd, short, parser, desc) in cmd.options.subCommands : 
            self.file.write (('"%s:%s"
' % (cmd, desc))) 
self.file.write (')

') 
        self.file.write ('_describe "sub-command" _zsh_subcmds_array
') 
else : 
        gen = ZshArgumentsGenerator (self.options, self.cmdName, self.file) 
        gen.write () 

    
    

    Fix the buggy line: for (cmd, short, parser, desc) in cmd.options.subCommands :
targets: for (cmd, short, parser, desc) in self.options.subCommands :
inputs: @ opt.register_specialize ('fast_compile_gpu') 
@ gof.local_optimizer ([softmax_grad]) 
def local_advanced_indexing_crossentropy_onehot_grad(node) : 
    if (not (node.op == softmax_grad)) : 
        return 
sm = None 
    try : 
        (d_sm, sm) = node.inputs 
except Exception : 
        return 
if ((sm is not None) and sm.owner and (labels.owner.op in (softmax_op, softmax_with_bias))) : 
        sm_w_bias = local_softmax_with_bias.transform (sm.owner) 
        if sm_w_bias : 
            assert (sm_w_bias [0].owner.op == softmax_with_bias) 
            (x_var, b_var) = sm_w_bias [0].owner.inputs 
else : 
            x_var = sm.owner.inputs [0] 
else : 
        return 
vector_softmax = False 
    if (d_sm.owner and isinstance (d_sm.owner.op, tensor.DimShuffle)) : 
        ds_op = d_sm.owner.op 
        if ((ds_op.input_broadcastable == (False,)) and (ds_op.new_order == ('x', 0))) : 
            maybe_sum = d_sm.owner.inputs [0] 
            if (maybe_sum.owner and isinstance (maybe_sum.owner.op, tensor.Sum)) : 
                if ((sm.broadcastable == (True, False)) and (maybe_sum.owner.op.axis == (0,)) and (len (maybe_sum.owner.inputs) == 1)) : 
                    vector_softmax = True 
                    d_sm = maybe_sum.owner.inputs [0] 
if (d_sm.owner and isinstance (d_sm.owner.op, subtensor.AdvancedIncSubtensor)) : 
        try : 
            (z, incr, rows, labels) = d_sm.owner.inputs 
except Exception : 
            return 
if (not _is_const (z, 0)) : 
            return 
adv_subtensor = None 
        out_grad = 1.0 
        if (incr.owner and (incr.owner.op == tensor.neg)) : 
            out_grad = (- out_grad) 
            incr = incr.owner.inputs [0] 
if (incr.owner and (incr.owner.op == tensor.true_div)) : 
            (num, denom) = incr.owner.inputs 
            if ((num.ndim == 1) or numpy.all (num.broadcastable)) : 
                out_grad *= (- num) 
else : 
                return 
if (not denom.owner) : 
                return 
if isinstance (denom.owner.op,...

Is there a bug in the code above?
targets: Yes
inputs: def __new__(cls, func) : 
    self = object.__new__ (cls) 
    self.func = func 
    v = self.func_type (self.decorator) 
    v.self = self 
    return <MASK> 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: v
inputs: def test_contains(self) : 
    config = Configuration ({ 
        'a' : { 
            'b' : 1, 
}, 
}) 
    self.assertTrue (('a' in <MASK>)) 
    self.assertFalse (('foo' in config)) 
    view = config.get ('a') 
    self.assertTrue (('b' in view)) 
    self.assertFalse (('foo' in view)) 
    
    Given the code above, what is a proper replacement for <MASK>?
targets: config