messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * This file is intended to detect active ad blocker.\n *\n * Ad blockers block URLs containing the word \"ads\" including this file.\n * If the file does load, `googlesitekit.canAdsRun` is set to true.\n */\n\nglobal.googlesitekit... | javascript | edit | 0 | 1 | apache-2.0 | cbc42df4304d209f788fb9edc2688ee538c7470e | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | assets/js/ads.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright (c) 2017 The Regents of the University of Michigan.\n// All Rights Reserved. Licensed according to the terms of the Revised\n// BSD License. See LICENSE.txt for details.\n\nconst Scheduler = require(\"../../lib/scheduler\")... | javascript | edit | 0 | 1 | bsd-3-clause | aaaaa76705e996cad798ec0d964b78434a87e621 | daaang/awful-mess | spec/dev/scheduler.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Configuration\nmodule.exports = function(grunt) {\n // Initialize config\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n });\n\n // Load required tasks from submodules\n grunt.loadTasks('grunt... | javascript | edit | 0 | 1 | mit | abfcaf9e91eb8ca9976d6c7055bbca4086a9c5b2 | yellowled/yl-bp,yellowled/yl-bp | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name TPP Touchscreen Input Assist\n// @namespace chfoo/tppinputassist\n// @version 1.11.0\n// @homepage https://github.com/chfoo/tppinputassist\n// @updateURL https://raw.githubusercontent.c... | javascript | edit | null | null | mit | 3a086bf6d4fbba72a9393c4d234d5462b5df68e8 | chfoo/tppinputassist,chfoo/tppinputassist | header.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//http://stats.nba.com/media/players/230x185/201939.png\n\nmodule.exports = (dispatch) => {\n dispatch({type: 'RECEIVE_PLAYER_INFO', payload: {\n name: \"Klay Thompson\",\n team: \"Golden State Warriors\",\n ppg: 21.9,\n ap... | javascript | edit | 0 | 1 | mit | 3c999cf0f30d4638f59e57be1be8c5bac38be989 | michael-lowe-nz/NBA-battles,michael-lowe-nz/NBA-battles | api/getPlayer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.initConfig({\n movePackageTo: process.env[\"JOB_NAME\"] ? \"\\\\\\\\telerik.com\\\\Resources\\\\BlackDragon\\\\Builds\\\\appbuilder-sublime-package\" : \"build\",\n jobName: pr... | javascript | edit | 0 | 5 | apache-2.0 | e5f5593a922593bf8333c4704e35546c4a57b1c2 | Icenium/appbuilder-sublime-package,dimitardanailov/appbuilder-sublime-package,dimitardanailov/appbuilder-sublime-package,Icenium/appbuilder-sublime-package | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * grunt-check-pages\n * https://github.com/DavidAnson/grunt-check-pages\n *\n * Copyright (c) 2014 David Anson\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = function(grunt) {\n\n // Project configur... | javascript | edit | 0 | 1 | mit | 71ef5ba237e6fa75eca9b64877faba452fbcd973 | DavidAnson/grunt-check-pages,DavidAnson/grunt-check-pages,DavidAnson/check-pages,Flimm/check-pages,Flimm/check-pages,DavidAnson/check-pages | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nexport default class AddTodoForm extends React.Component {\n static propTypes = {\n onSubmit: React.PropTypes.func.isRequired\n }\n\n render() {\n return (\n <form onSubmit={this.handleSubmit}... | javascript | edit | 0 | 1 | cc0-1.0 | bda47cb62117f4f29a7e633abaa01e06b21a100e | ksmithbaylor/react-todo-list,ksmithbaylor/react-todo-list | src/TodoApp/AddTodoForm.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as React from \"react\";\nimport {BuildSnapshot} from \"./BuildSnapshot\";\n\n/**\n * Container Component for BuildSnapshots.\n * \n * @param {*} props input property containing an array of build data to be\n * rendered through... | javascript | edit | 0 | 2 | apache-2.0 | 3d605ebb4a693802b36a65264c588a51cd62dbc4 | googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020 | src/main/webapp/components/BuildSnapshotContainer.js | rejected_duplicate | Near-duplicate of sample 90329 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* istanbul ignore file */\nconst http = require('http')\n\nmodule.exports = function httpRequest(body) {\n return new Promise((resolve, reject) => {\n const request = http.request(\n {\n hostname: 'server',\n por... | javascript | edit | 0 | 3 | apache-2.0 | 27486485c9f5821d76090a75f05d5d27991cdf48 | heiskr/sagefy,heiskr/sagefy,heiskr/sagefy,heiskr/sagefy | client/request.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(Backbone) {\n\n _.extend(Backbone.Events, {\n\n // Bind an event only once. When executed for the first time, it would\n // remove itself from the callbacks list.\n once: function(events, callback, context) {\n ... | javascript | edit | 0 | 1 | mit | 7b13a9fda936503e476fd9a5aa5ac92146fdb5ed | gsamokovarov/backbone-once | backbone-once.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n var Twit = Npm.require('twit');\n var twitter = new Twit({\n consumer_key: process.env.TWIT_KEY,\n consumer_secret: process.env.TWIT_SECRET,\n ac... | javascript | edit | 0 | 3 | mit | 188677d8389f7b2082ecdb606273c34d23127a5c | rrevanth/news,rrevanth/news | app/packages/fraction-twitter/lib/tweetHot.next.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// https://github.com/json-schema/JSON-Schema-Test-Suite/blob/develop/tests/draft4/required.json\nvar scenerios = [\n {\n \"description\": \"required validation\",\n \"schema\": {\n \"properties\": {\n ... | javascript | edit | 0 | 1 | mit | 16ad51fa278a7c6751b204d04c18a0e5357beea9 | southpolesteve/ember-cli-json-schema,southpolesteve/ember-cli-json-schema | tests/unit/services/json-schema-draft4/required-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { sort } from 'sajari';\n\nimport Base from './Base.js';\nimport Components from '../constants/QueryComponentConstants.js';\n\nconst Sort = props => {\n const { field, order, ...others } = props;\n r... | javascript | edit | 0 | 1 | mit | a3b47d5bb732e920cba5f7bcddf3f15eab60c337 | sajari/sajari-sdk-react,sajari/sajari-sdk-react | src/api-components/Sort.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar jshint = require('gulp-jshint');\nvar mocha = require('gulp-mocha');\n\ngulp.task('default', ['lint', 'mocha']);\n\ngulp.task('test', ['default']);\n\ngulp.task('mocha', function () {\n ... | javascript | edit | 0 | 1 | bsd-3-clause | 4e48b29570a6b1b85492508f7e34656f130dc476 | luizbranco/torus-cli,manifoldco/torus-cli,manifoldco/torus-cli,luizbranco/torus-cli,luizbranco/torus-cli,manifoldco/torus-cli | cli/Gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports.config = {\n npm: {\n enabled: true\n },\n\n files: {\n javascripts: {\n joinTo: 'app.js'\n },\n stylesheets: {\n joinTo: {\n 'app.css': /^app\\/styles/\n }\n }\n },\n\n overrides: {\n ... | javascript | edit | 0 | 0 | mit | 9810b9950de6f7830c0557abefd3a12e0edaf148 | makenew/tasty-brunch,makenew/tasty-brunch,rxlabs/tasty-todos,makenew/tasty-brunch,rxlabs/tasty-todos,rxlabs/tasty-todos | brunch-config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { PROD_PROJECT_ID } from '../secrets';\n\nexport const OPTIMIZELY_BASE_URL = 'https://www.optimizelyapis.com/experiment/v1/';\n\nexport const PROJECTS_URL = `${OPTIMIZELY_BASE_URL}projects/`;\n\nexport const PROD_EXPERIMENTS_URL ... | javascript | edit | 0 | 1 | mit | 7bdd46cdf2128b65efb8b62e6d5cc5b9c6c3a9d5 | zebogen/kapow-optimizely-dashboard,zebogen/kapow-optimizely-dashboard | src/constants/Endpoints.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function _bindPlanEvents () {\n 'use strict';\n\n function getPlanContext (element)\n {\n var context = element.parentElement;\n if ('BODY' === context.tagName)\n {\n return null;\n }\n else if (context.classList... | javascript | edit | 0 | 4 | mit | 51a3c472ee6e4010971af1e7534ba6a5b2178abd | marek-saji/standupper | public/js/script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nmodule.e... | javascript | edit | 0 | 3 | mit | d50634c9bf93893c82400e012c12841644c0d6a2 | voideanvalue/relay,xuorig/relay,cpojer/relay,kassens/relay,xuorig/relay,xuorig/relay,wincent/relay,iamchenxin/relay,cpojer/relay,xuorig/relay,cpojer/relay,atxwebs/relay,josephsavona/relay,wincent/relay,dbslone/relay,iamchenxin/relay,voideanvalue/relay,xuorig/relay,yungsters/relay,voideanvalue/relay,wincent/relay,xuorig... | scripts/getBabelOptions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine ([\"lib/lodash\", \"lib/Handlebars\", \"src/skinner/core/keypath\"], function (_, Handlebars, keyPath) {\n \"use strict\";\n\n function resolveData(data, subject, additionalDimensionData, context) {\n var allContext ... | javascript | edit | 0 | 4 | mit | 1cf9b5d0a0946057399b261e598080efe0f686a2 | dbachrach/skinner,dbachrach/skinner | src/skinner/core/resolver.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// https://... | javascript | edit | 0 | 2 | apache-2.0 | c9f9444f3b7ad45cfffc6084de15a5c30796b264 | googleinterns/step51-2020,googleinterns/step51-2020,googleinterns/step51-2020,googleinterns/step51-2020,googleinterns/step51-2020 | DSA-Campaign-Uplift-Estimation/src/main/webapp/script.js | rejected_duplicate | Near-duplicate of sample 91653 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar playTarget = '.player-controls__play';\nvar nextTarget = '.button_round';\n\nfunction onKeyPress(key) {\n if (key === NEXT) {\n var cards = document.querySelectorAll('.slider__item')\n var nextCard = cards[cards.len... | javascript | edit | 0 | 3 | apache-2.0 | 3f9ee727a59c00f955521b1c3f2137c9b901bce9 | feedbee/keysocket,feedbee/keysocket | extension/keysocket-yandex-radio.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @param {mongoose.Schema} schema\n * @param {?Object=} options\n */\nmodule.exports = exports = function constantPlugin(schema, options) {\n var validSchemaTypes = ['String', 'Number', 'Date', 'ObjectID'];\n\n function vali... | javascript | edit | 0 | 4 | isc | 5413c871f0d98e27515ee57e5a8a09fadaac11aa | cakuki/mongoose-constant | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Continuous delivery server\nconst { spawn } = require('child_process')\nconst { resolve } = require('path')\nconst { createServer } = require('http')\nconst { urlencoded } = require('body-parser')\n\nconst hostname = '127.0.0.1'\ncon... | javascript | edit | 0 | 4 | mit | 84746b5ce55292e85bdbbb031fff2712c8d40aee | jsonnull/jsonnull.com,jsonnull/jsonnull.com,jsonnull/jsonnull.com | scripts/cd-server.js | rejected_duplicate | Near-duplicate of sample 99308 | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add callback version of pagination."
},
{
"role": "assistant",
"content": "function displayPage(results) {\n $('#results tbody').empty();\n\n for (let row of results) {\n let tr = $('<tr />');\n for (let f... | javascript | new_file | 0 | 3 | mit | b733ed269de8dee5fd25cb4b273cc9963a21aa1d | efritz/arrows,JoshuaSCochrane/arrows | examples/pagination/js/callbacks.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Sets the default permissions to new users\n */\nMeteor.users.after.insert(function (userId, doc) {\n var userId = doc._id;\n\n if (orion.adminExists) {\n // if there is a admin created we will set the default roles.\n va... | javascript | edit | 0 | 3 | mit | 867730d0855a81aa7b72118fc969932c37790cfb | kevohagan/orion,BudickDa/orion,justathoughtor2/orion,PEM--/orion,Citronnade/orion,mauricionr/orion,PEM--/orion,nabiltntn/orion,Citronnade/orion,orionjs/orion,BudickDa/orion,kevohagan/orion,jorisroling/orion,mauricionr/orion,justathoughtor2/orion,rwatts3/orion,rwatts3/orion,nabiltntn/orion,orionjs/orion,TedEwanchyna/ori... | packages/accounts/accounts_server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar l10n_file = __dirname + '/../l10n/commands/tell.yml';\nvar l10n = require('../src/l10n')(l10n_file);\nvar CommandUtil = require('../src/command_util').CommandUtil;\nexports.command = function(rooms, items, players, npcs, Commands) {... | javascript | edit | 0 | 2 | mit | 935076aa1cb280bea1fe1ac9c49aa4c52108b820 | shawncplus/ranviermud,seanohue/ranviermud,seanohue/ranviermud | commands/tell.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar l10n_file = __dirname + '/../l10n/commands/tell.yml';\nvar l10n = require('../src/l10n')(l10n_file);\nvar CommandUtil = require('../src/command_util').CommandUtil;\nexports.command = function(rooms, items, players, npcs, Commands) {... | javascript | edit | 0 | 2 | mit | 070cd9727bdb269a215b0dd087bb30c83fd3d5f5 | seanohue/ranviermud,shawncplus/ranviermud,seanohue/ranviermud | commands/tell.js | rejected_duplicate | Near-duplicate of sample 108047 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nBlogPosts.allow({\n\n insert: Utils.constant(true),\n\n remove: Utils.constant(true),\n\n update: Utils.constant(true),\n});\n\n```\n\nApply this change: Secure updates on BlogPost collection"
},
{
"role": "assistant",
... | javascript | edit | 0 | 2 | mit | 7722859f57858f8567bb5ab82dfdc023b9470b50 | anticoders/blog,anticoders/blog,anticoders/blog | server/privileges.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst rethinkDB = require('rethinkdb');\nconst program = require('commander');\n\nconst UserDB = require('./UserDB');\nconst metrics = require('./metrics');\n\n\nprogram\n .version('0.0.1')\n .option('-p, --port <n>',... | javascript | edit | 0 | 2 | mit | 7b14081f1852c17167ea4295459f7514b234b5b6 | nobus/Labyrinth,nobus/Labyrinth | server/userGarden.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar vm = require('vm');\nvar includeInThisContext = function(path) {\n var code = fs.readFileSync(path);\n vm.runInThisContext(code, path);\n}.bind(this);\nincludeInThisContext(\"dist/liphte.min.js\");\nex... | javascript | edit | 0 | 1 | mit | 2eebdd3b129adbaf661c6a6a5e18c5329f4b6311 | maveius/liphte.ts,maveius/liphte.ts | liphte.ts.js | rejected_duplicate | Near-duplicate of sample 91466 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport styled from 'styled-components';\n\nexport const Save = styled.div`\n align-items: center;\n display: flex;\n flex-direction: row;\n justify-content: center;\n padding: 8px;\n\n &:hover {\n color: #000;\n }\n`;\n\nexpor... | javascript | edit | 0 | 0 | mit | 707ab3e66fb6f27a4e6d7e8165b229c3deea8140 | jenovs/bears-team-14,jenovs/bears-team-14 | client/src/components/SmallSave/styled.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst AccessController = require('./access-controller')\nconst { DAGNode } = require('ipld-dag-pb')\n\n\nclass IPFSAccessController extends AccessController {\n constructor (ipfs) {\n super()\n this._ipfs = ipfs\n... | javascript | edit | 0 | 3 | mit | 168c9b47763e30982a47c4c1fed683f31788d098 | haadcode/orbit-db,orbitdb/orbit-db,orbitdb/orbit-db,haadcode/orbit-db | src/ipfs-access-controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst router = require('express').Router() // eslint-disable-line new-cap\n\nconst website = require('../data/website')\n\n/* GET API */\nrouter.get('/api', (req, res) => {\n res.json(website)\n})\n\n/* GET home page */\nrouter.get('/'... | javascript | edit | 0 | 1 | mit | c47e5906cd53d9348df05194c511cc5a0c020b8e | mlcdf/website,mlcdf/website | routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar vows = require('vows')\n, assert = require('assert')\n, Glue = require(__dirname + \"/../lib/glue\");\n\nvar suite = vows.describe('bindTo')\n\nsuite.addBatch({\n \"ensures\": {\n \"that the target object of glue is cha... | javascript | edit | 0 | 1 | mit | 1ffcd46beb7659fa314c6ea799991d6320c828e1 | edgecase/glue.js | spec/bind_to_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs'),\n expandHomeDir = require('expand-home-dir'),\n async = require('async')\n ;\n\nfunction readFile(fileLocation, cb) {\n fs.readFile(fileLocation, {encoding: 'utf8'}, function (err, fileContents) {\n ... | javascript | edit | 0 | 3 | mit | 72d6da5a3550976deba5cc245f5d3b88f770cf4d | dice-cyfronet/hyperflow-client,dice-cyfronet/hyperflow-client | lib/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst userCtr = require('./../controllers/users.js');\nconst authentication = require('./../middleware/authentication');\nconst authorisation = require('./../middleware/authorisation');\n\nconst userRoutes = (router) =... | javascript | edit | 0 | 1 | mit | dd43ad4214d51d911beae3ecead16705736a5148 | andela-oolutola/document-management-system-api | routes/users.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { get } from 'lodash';\n\nimport { calculateCurrentEvents } from '../../lib/events';\nimport { getEbudgie } from './ebudgie';\n\nexport const showMontlyIncomesAmount = async (page_scoped_id, reply) => {\n try {\n const ebudgi... | javascript | edit | 0 | 3 | mit | af4aa45ca05de249b4dc4bee0271c47cc838ddac | nikolay-radkov/ebudgie-server,nikolay-radkov/ebudgie-server | src/bot/helpers/incomes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport mongoose, { Schema } from 'mongoose';\n\nconst userSchema = new Schema({\n first_name: { type: String, required: true },\n last_name: { type: String, required: true },\n email: { type: String, unique: true, required: tru... | javascript | edit | 0 | 0 | mit | f22a82b87463a0abf802af582d52b89520433e46 | davidlamt/antfinder-api | models/users_model.js | rejected_duplicate | Near-duplicate of sample 102811 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar azure = require(\"azure-storage\");\n//\nvar nconf = require(\"nconf\");\nnconf.env()\n .file({\n file: \"config.json\",\n search: true\n });\nvar storageName = nconf.get(\"StorageName\");\nvar storageKey = nconf.get(\"Stora... | javascript | edit | 0 | 3 | mit | 57103d1f7e4eee6f4405de13c9650663395b0007 | peterblazejewicz/azure-aspnet5-examples,peterblazejewicz/azure-aspnet5-examples | src/storage-queue/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { elem, mod } from 'ember-cli-bem/mixins/bem';\n\nconst {\n HTMLBars: { makeBoundHelper },\n} = Ember;\n\nconst BLOCK_KEY = 'blockName';\n\nexport default makeBoundHelper(function(params, hash) {\n c... | javascript | edit | 0 | 2 | mit | 57153e83cc810e5bb5f4c9a6774cc8a9163acddd | nikityy/ember-cli-bem,nikityy/ember-cli-bem | addon/helpers/elem.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar moment = require('moment');\nvar _ = require('lodash');\n\nvar config = require('../config');\nvar paths = require('../elements/PathsMixin');\n\n\nmodule.exports = function(page) {\n return t('feed', {xmlns: 'http://... | javascript | edit | 0 | 2 | mit | f5f6841d299d4bcfcde428130d48ef7266b36747 | antwarjs/antwar,RamonGebben/antwar,RamonGebben/antwar | dev/staticRss.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport nock from 'nock'\nimport req from 'supertest'\nimport test from 'tape'\nimport server from '../../server'\n\nnock('http://www.newyorker.com')\n .get('/')\n .replyWithFile(200, './test/fixtures/homepage.html')\n\ntest('server', ... | javascript | edit | 0 | 2 | mit | a49429c4737888bc3e43b50a221d966422841fb2 | mmwtsn/borowitz-index,mmwtsn/borowitz-index | test/integration/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module('arethusa.core').constant('MAIN_ROUTE', {\n controller: 'MainCtrl',\n template: '<div ng-include=\"template\"></div>',\n resolve: {\n loadConfiguration: function($http, confUrl, configurator) {\n ... | javascript | edit | 0 | 1 | mit | 7772afb9c69d5c6e4ffc0bbe6507eaf1df257293 | Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa | app/js/arethusa.core/routes/main.constant.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nRB.APIToken = RB.BaseResource.extend({\n defaults: _.defaults({\n tokenValue: null,\n note: null,\n policy: {},\n userName: null\n }, RB.BaseResource.prototype.defaults),\n\n rspNamespace: 'api_token... | javascript | edit | 0 | 3 | mit | a51e96883d8fcc394ac1e2b4744c5634fb16184b | KnowNo/reviewboard,chipx86/reviewboard,brennie/reviewboard,beol/reviewboard,davidt/reviewboard,chipx86/reviewboard,KnowNo/reviewboard,sgallagher/reviewboard,sgallagher/reviewboard,KnowNo/reviewboard,sgallagher/reviewboard,brennie/reviewboard,beol/reviewboard,custode/reviewboard,bkochendorfer/reviewboard,brennie/reviewb... | reviewboard/static/rb/js/resources/models/apiTokenModel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire([ \"jquery\", \"lib/analytics/analytics\" ], function($, Analytics) {\n\n \"use strict\";\n\n var analytics = new Analytics();\n\n analytics.trackView();\n\n // Set up Omniture event handlers\n\n var windowUnloadedFromSubmi... | javascript | edit | 0 | 4 | mit | 0da039bab055f1c5c90f6424b67159bcb13b3577 | Lostmyname/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo,Lostmyname/rizzo,Lostmyname/rizzo,Lostmyname/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo,Lostmyname/rizzo | app/assets/javascripts/lib/analytics/travel_insurance_omniture.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n devtool: 'eval',\n entry: [\n 'webpack-dev-server/client?http://localhost:3000',\n 'webpack/hot/only-dev-server',\n './index'\n ],\n out... | javascript | edit | 0 | 0 | mit | a76a96c708c5e6b111bbfff14415b794065d28ee | rackt/redux-router,acdlite/redux-router,mjrussell/redux-router | examples/links/webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nchorus.dialogs.TabularDataPreview = chorus.dialogs.Base.extend({\n constructorName: \"TabularDataPreview\",\n\n templateName: 'tabular_data_preview',\n title: function() {return t(\"dataset.data_preview_title\", {name: this.mod... | javascript | edit | 0 | 2 | apache-2.0 | ed824d747a12b85c662e9451c69857d20c14ae90 | hewtest/chorus,mpushpav/chorus,lukepolo/chorus,jamesblunt/chorus,hewtest/chorus,mpushpav/chorus,atul-alpine/chorus,prakash-alpine/chorus,hewtest/chorus,mpushpav/chorus,mpushpav/chorus,lukepolo/chorus,lukepolo/chorus,prakash-alpine/chorus,prakash-alpine/chorus,jamesblunt/chorus,atul-alpine/chorus,hewtest/chorus,jamesblu... | app/assets/javascripts/dialogs/tabular_data/tabular_data_preview.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst knex = require('../../../knex').web\n\nmodule.exports = function (id) {\n return knex('individual_case_overview')\n .first('grade_code AS grade',\n 'team_id AS teamId',\n 'team_name AS teamName',\n ... | javascript | edit | 0 | 2 | mit | c5caa31810a39e69ddb281143ecac063d0a9e3d5 | ministryofjustice/wmt-web,ministryofjustice/wmt-web | app/services/data/get-individual-overview.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction* chunkify(start, final, chunk, delay) {\n for (let index = start; index < final; index++) {\n if ((index > start) && (index % (start + chunk) === 0)) {\n yield new Promise(resolve => setTimeout(resolve, delay))\n }\... | javascript | edit | 0 | 6 | mit | 8fadc42c9711d08efb182eb0d865c51fd39645af | yangmillstheory/chunkify,yangmillstheory/chunkify | src/chunkify.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { expect } from 'chai';\nimport { remote } from 'electron';\nimport {\n defaultPathFallback,\n cwdKernelFallback\n} from '../../src/notebook/path';\n\ndescribe('defaultPathFallback', () => {\n it('returns a object with the def... | javascript | edit | 0 | 2 | bsd-3-clause | 900e6845b52ba6389914f85c06d0d09cf07dc342 | jdfreder/nteract,nteract/composition,rgbkrk/nteract,rgbkrk/nteract,captainsafia/nteract,0u812/nteract,nteract/composition,0u812/nteract,jdetle/nteract,0u812/nteract,jdetle/nteract,nteract/nteract,jdetle/nteract,rgbkrk/nteract,jdfreder/nteract,nteract/nteract,rgbkrk/nteract,nteract/nteract,temogen/nteract,nteract/nterac... | test/renderer/path-spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {\n TAP_ASSERT_DONE,\n TAP_PLAN\n} from '../actions'\n\nconst initialState = {\n assertions: {},\n currentCount: 0,\n nextEstimatedCount: 0,\n plan: undefined\n}\n\nexport default (state = initialState, action) => {\n swit... | javascript | edit | 0 | 4 | mit | a97533599023613ad8c99a8ab2e2b55e3224f291 | cskeppstedt/electron-tap-view,cskeppstedt/electron-tap-view | app/reducers/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(\"#saveAsFile\").click(function() {\n html2canvas($(\"#course-table\")).then(function(canvas) {\n var bgcanvas = document.createElement(\"canvas\");\n bgcanvas.width = canvas.width;\n bgcanvas.height = canvas.height;\n va... | javascript | edit | 0 | 1 | mit | 79d95c34c3b3b132d95ed47140328298458dad53 | henryyang42/NTHU_Course,henryyang42/NTHU_Course,leVirve/NTHU_Course,sonicyang/NCKU_Course,leVirve/NTHU_Course,sonicyang/NCKU_Course,henryyang42/NTHU_Course,henryyang42/NTHU_Course,sonicyang/NCKU_Course,sonicyang/NCKU_Course,leVirve/NTHU_Course,leVirve/NTHU_Course | table/static/js/saveAsFile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport Application from '../../app';\nimport config from '../../config/environment';\n\nexport default function startApp(attrs) {\n let application;\n\n // use defaults, but you can override\n let attribut... | javascript | edit | 0 | 1 | mit | 3d40e7e6a469a59bed25f6f19e3b9595e164ab55 | minutebase/ember-portal,minutebase/ember-portal | tests/helpers/start-app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {assert} from 'chai'\nimport {uniq} from 'lodash'\nimport URI from 'urijs'\nimport request from 'request'\nimport events from 'utils/eventsDirectoryToSlideArray'\n\ndescribe('Event Links', function() {\n\tdescribe('are valid', fu... | javascript | edit | 0 | 3 | mit | b10951fb48b5afb916213f44482e657bfee4b17e | L4GG/timeline,L4GG/timeline,L4GG/timeline | tests/integration/links.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * This <server-gardu-reporter> project created by :\n * Name : syafiq\n * Date / Time : 28 June 2017, 11:03 PM.\n * Email : <EMAIL>\n * Github : syafiqq\n */\n\n(function ($)\n{\n $(function ()\n {\n ... | javascript | edit | 0 | 3 | mit | 20797136cd834312a2418b0698021413f63a7366 | Syafiqq/server-gardu-reporter,Syafiqq/server-gardu-reporter,Syafiqq/server-gardu-reporter,Syafiqq/server-gardu-reporter | raw/assets/js/layout/admin/auth/login/admin_auth_login_common_layout.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n elements: {\n classTableRows: {\n selector: '//div[@class=\"classes-list\"]/div[2]/div',\n locateStrategy: 'xpath'\n }\n }\n};\n\n```\n\nApply this change: [DASH-2376] Add some selectors in order to ... | javascript | edit | 0 | 0 | mit | 4b0beda4f602f48870cb77d6c825e95367105d02 | Syncano/syncano-dashboard,Syncano/syncano-dashboard,Syncano/syncano-dashboard | test/e2e/pages/classesPage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Users from 'meteor/vulcan:users';\n\nexport const generateIdResolverSingle = ({collectionName, fieldName}) => {\n return async (doc, args, context) => {\n if (!doc[fieldName]) return null\n\n const { currentUser } = contex... | javascript | edit | 0 | 4 | mit | 376f2ccff34e733f01caca72b12f0e4e613429b9 | Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2 | packages/lesswrong/lib/modules/utils/schemaUtils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar utils = require(\"bolt-internal-utils\");\n\nmodule.exports = {\n testStringStartsWith: function(test) {\n test.equal(utils.String.startsWith(\"characters\", \"c\"), true, \"Expecting \\\"characters\\\" to start with \\\"c\\\"\"... | javascript | edit | 0 | 1 | mit | 8807d8e4b4e1583cff1b389b3d1d6354395fdff7 | Chieze-Franklin/bolt-internal-utils | test/test_with_nodeunit.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nmodule.exports = {\n up: function(queryInterface, Sequelize) {\n return queryInterface.createTable('dns_records', {\n id: {\n allowNull: false,\n autoIncrement: true,\n primaryKey: true,\n ... | javascript | edit | 0 | 1 | mit | 6a7350757520d1577a1751041355fa0b1eb9662d | nowhere-cloud/node-api-gate | migrations/0002-create-dns-record.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport const GoogleApi = function(opts) {\n opts = opts || {};\n\n if (!opts.hasOwnProperty('apiKey')) {\n throw new Error('You must pass an apiKey to use GoogleApi');\n }\n\n const apiKey = opts.apiKey;\n const libraries = opts... | javascript | edit | 0 | 7 | mit | be2ea1d95b5e4764ec9255c1ec3c09db1ab92c14 | fullstackreact/google-maps-react,fullstackreact/google-maps-react | src/lib/GoogleApi.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n purge: [],\n darkMode: false, // or 'media' or 'class'\n theme: {\n extend: {},\n },\n variants: {\n extend: {},\n },\n plugins: [],\n}\n\n```\n\nApply this change: chore(web): Add prefix setting to Tai... | javascript | edit | 0 | 0 | mit | 23367bd69f3b293ec5a338914937c2ae81f11bf5 | ruedap/nekostagram,ruedap/nekostagram,ruedap/nekostagram,ruedap/nekostagram | web/tailwind.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Record } from 'immutable';\n\nexport default Record({\n createdAt: null,\n temperature: null,\n humidity: null,\n isValid: false,\n errors: 0,\n});\n\n```\n\nApply this change: Add support for fermenter-iteration attribute... | javascript | edit | 0 | 0 | mit | 79a3444d39b69a341f4ac9ecc41147bee51b89df | cjk/smart-home-app | src/common/fermenter/fermenterEnv.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @author Robert Slifka (GitHub @rslifka)\n// @connect docs.google.com\n// @connect rslifka.github.io\n// @copyright 2017-2018, Robert Slifka (https://github.com/rslifka/fate_of_all_fools)\n// @descrip... | javascript | edit | 0 | 0 | mit | 3a1ad0c467e02854c8b8cceda133c698a63fcaca | rslifka/fate_of_all_fools,rslifka/fate_of_all_fools | fateOfAllFools.dev.user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Moment from 'moment';\n\nconst DataObjectsTableDateCell = ({ content }) => {\n const dateValue = content.value;\n const date = Moment(dateValue).format('DD/MM/YYYY');\n const time = Moment(dateValue... | javascript | edit | 0 | 1 | mit | d967a3c6647697a8e3af70bc9e508843cc534f02 | Syncano/syncano-dashboard,Syncano/syncano-dashboard,Syncano/syncano-dashboard | src/apps/DataObjects/DataObjectsTable/DataObjectsTableDateCell.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar assert = require('assert');\nvar uuid = require('uuid');\n\nmodule.exports = {\n NewEvent: function(eventType, data, metadata) {\n assert(eventType);\n assert(data);\n\n var event = {\n eventId: uu... | javascript | edit | 0 | 3 | mit | cd5afa980aa07571f2a094d1243500c3f9d80308 | RemoteMetering/geteventstore-promise,RemoteMetering/geteventstore-promise | eventFactory.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Base webpack config used across other specific configs\n */\n\nconst path = require('path');\nconst validate = require('webpack-validator');\n\nconst config = validate({\n entry: [\n 'babel-polyfill',\n './views/component... | javascript | edit | 0 | 0 | mit | 1cc390262adb5c03968aee1753bcd1e8aad3b604 | amoshydra/nus-notify,amoshydra/nus-notify | webpack.config.base.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar assert = require('chai').assert;\nvar xdTesting = require('../../lib/index')\nvar templates = require('../../lib/templates');\nvar q = require('q');\n\ndescribe('MultiDevice - selectAny', function () {\n var te... | javascript | edit | 0 | 1 | mit | 4c3fa5fa31e24f4633f65060ba3a4e5ee278d6ac | spiegelm/xd-testing,spiegelm/xd-testing,spiegelm/xd-testing | test/multidevice/selectAny.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction addImageToExperienceForm(experienceID) {\n var assetURL = \"/users/\" + getCurrentUser() + \"/assets/new\"\n $.ajax({\n method: \"get\",\n url: assetURL,\n })\n .done(function(response){\n var postURL = \"/users/\"... | javascript | edit | 0 | 1 | mit | 769520bf1ac90987d942cec4e08bd78b34480c5c | dma315/ambrosia,dma315/ambrosia,dma315/ambrosia | app/assets/javascripts/views/experiences/add_image_to_experience_form.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { action } from '@ember/object';\nimport { later } from '@ember/runloop';\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nexport default class CrateTomlCopy extends Component {\n @tr... | javascript | edit | null | null | apache-2.0 | 0ec851372caa9309df9651126d71361d8163f889 | rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io | app/components/crate-toml-copy.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar util = require(\"util\")\n , EventEmitter = require(\"events\").EventEmitter\n\nmodule.exports = (function() {\n var CustomEventEmitter = function(fct) {\n this.fct = fct;\n var self = this;\n process.nextTick(fun... | javascript | edit | 0 | 2 | mit | dca436ecfd25d400ecd6760ba8aeeefc067b4687 | grimurd/sequelize,toddbluhm/sequelize,gorangajic/sequelize,yjwong/sequelize,gintsgints/sequelize,alexbooker/sequelize,Kagaherk/sequelize,sorin/sequelize,overlookmotel/sequelize,johanneswuerbach/sequelize,phanect/sequelize,sequelize/sequelize,codyrigney92/sequelize,calvintwr/sequelize,MagicIndustries/sequelize,rpaterson... | lib/emitters/custom-event-emitter.js | rejected_duplicate | Near-duplicate of sample 72282 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\"app/app\",\n \"ember\"], function(App, Ember) {\n \"use strict\";\n\n App.ApplicationController = Ember.Controller.extend({\n hasMessage: function() {\n var message = this.get('session.message')\n return ... | javascript | edit | 0 | 2 | mit | df46bb81776cba0723fa09a686bd13a2bb9ccd7d | pepyatka/pepyatka-html,dsumin/freefeed-html,pepyatka/pepyatka-html,FreeFeed/freefeed-html,SiTLar/pepyatka-html,FreeFeed/freefeed-html,dsumin/freefeed-html,epicmonkey/pepyatka-html,SiTLar/pepyatka-html,epicmonkey/pepyatka-html | public/js/app/controllers/ApplicationController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport bcrypt from 'bcrypt';\n\nmodule.exports = {\n encryptPassword(password) {\n const passwordHash = bcrypt.hashSync(password, 10);\n return passwordHash;\n },\n\n};\n\n```\n\nApply this change: Edit function for password val... | javascript | edit | 0 | 1 | mit | d968fe324bddd13c645d75aa874c811cfcc98056 | 3m3kalionel/PostIt,3m3kalionel/PostIt | server/helpers/encrypt.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n up: (queryInterface, Sequelize) => queryInterface.createTable('Messages', {\n id: {\n allowNull: false,\n autoIncrement: true,\n primaryKey: true,\n type: Sequelize.INTEGER\n },\n conte... | javascript | edit | 0 | 1 | mit | 5993e26d58c3bc099bdc01b71166fe8814289667 | 3m3kalionel/PostIt,3m3kalionel/PostIt | server/migrations/20170625133452-create-message.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar test = function (a, b) {}, desc, defineProperty\n , generate, mixin;\n\ntry {\n\tObject.defineProperty(test, 'length', { configurable: true, writable: false,\n\t\tenumerable: false, value: 1 });\n} catch (ignore) {... | javascript | edit | 0 | 3 | isc | 23d7bce1eab8f6b770ab2c527c23c3c0908ce907 | medikoo/es5-ext | function/_define-length.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Shogi from '../src/shogi';\nimport * as CONST from '../constants/actionTypes';\n\nconst InitialState = {\n board: Shogi.Board,\n isHoldingPiece: undefined\n};\n\nconst ShogiReducer = (state = InitialState, action) => {\n switc... | javascript | edit | 0 | 5 | mit | bba2cfe90230b4b4d8120c61b90ede8cc8febb0a | mgi166/usi-front,mgi166/usi-front | frontend/reducers/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n\n // 1. All configuration goes here\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n concat: {\n igv: {\n src: [\n ... | javascript | edit | 0 | 1 | mit | 15c6f23ff43b1dcc1056c9d63bd7df10b79e65be | igvteam/igv.js,NabaviLab/CNV-Visualizer,NabaviLab/CNV-Visualizer,NabaviLab/CNV-Visualizer,NabaviLab/CNV-Visualizer,NabaviLab/CNV-Visualizer,igvteam/igv.js | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar util = require('util');\n/**\n * @param {Errors[]} errorsCollection\n */\nmodule.exports = function(errorsCollection) {\n var errorCount = 0;\n /**\n * Formatting every error set.\n */\n errorsColle... | javascript | edit | 0 | 2 | mit | 35fdaf00c8e11976b9bcc1dc03b661d4281ff012 | wurmr/jscs-teamcity-reporter | teamcity-reporter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into including all the files listed below.\n// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically\n// be included in the compiled file accessible f... | javascript | edit | 0 | 0 | bsd-3-clause | 2a5c56794ba90d34efff284e4771b5922f70c1e4 | solidusio/solidus_paypal_braintree,solidusio/solidus_paypal_braintree,solidusio/solidus_paypal_braintree,solidusio/solidus_paypal_braintree | app/assets/javascripts/solidus_paypal_braintree/frontend.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Date: 1/9/15\n * Author: Shirish Goyal\n */\n\n(function () {\n 'use strict';\n\nangular\n .module('crowdsource.interceptor', [])\n .factory('AuthHttpResponseInterceptor', AuthHttpResponseInterceptor);\n\nAuthHttpResponse... | javascript | edit | 0 | 6 | mit | 461281865ccd7521f25b2d4e893eb55c036f56dc | crowdresearch/crowdsource-platform,crowdresearch/crowdsource-platform,crowdresearch/daemo,rakshit-agrawal/crowdsource-platform,Milstein/crowdsource-platform,DESHRAJ/crowdsource-platform,Macbull/crowdsource-platform,crowdresearch/daemo,xasos/crowdsource-platform,crowdresearch/crowdsource-platform,shirishgoyal/crowdsourc... | static/js/crowdsource.interceptor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This is a function that decorates React's createClass.\n// It's used only internally in this library,\n// but could be used externally eventually.\n\n// See the mixins for more information on what this does.\n\nvar UI = require('reap... | javascript | edit | 0 | 2 | mit | 63d22bfa615b999e0601da71acae794af3ee4865 | Lupino/reapp-ui,oToUC/reapp-ui,jhopper28/reapp-ui,zackp30/reapp-ui,srounce/reapp-ui,zenlambda/reapp-ui,reapp/reapp-ui | component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nimport ComponentRenderer from './src/templates/component-renderer-with-pagination'\n\nexports.replaceComponentRenderer = ({ props, loader }) => {\n if (props.layout) {\n return null\n }\n\n return <Com... | javascript | edit | 0 | 2 | mit | 9efb161d405226438d27a73c628f49b445e01aa6 | LuisLoureiro/placard-wrapper | gatsby-browser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n // load all tasks from package.json\n require('load-grunt-config')(grunt);\n require('time-grunt')(grunt);\n\n /**\n * TASKS\n */\n // build everything ready for a commit\n grunt.register... | javascript | edit | 0 | 1 | mit | a441848f22a460a462280c885e4cf53b8eed672b | jackocnr/intl-tel-input,jackocnr/intl-tel-input,Bluefieldscom/intl-tel-input,Bluefieldscom/intl-tel-input | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// URLs grom telegram\nconst TELEGRAM_BASE_URL = 'https://api.telegram.org';\nconst TELEGRAM_MESSAGE_PHOTO_ENDPOINT = '/sendPhoto';\nconst DEFAULT_PHOTO_URL = 'http://media.salemwebnetwork.com/cms/CROSSCARDS/17343-im-sorry-pug.jpg';\n\n... | javascript | edit | 0 | 0 | apache-2.0 | 896a87b740c5e228a81f23a11a26845aa849e346 | bserh/giphify_bot | constants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.initConfig({\n \"babel\": {\n options: {\n sourceMap: false\n },\n dist: {\n files: [\n {\n \"expand\": true,\n \"cwd\": \"modules/\",\... | javascript | edit | 0 | 1 | mit | 874886cda57b80b5f06a9e3003bd9e20c6601feb | simonlovesyou/file-wipe | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n(function() {\n var metaKeyword = '';\n var src = window.location.href;\n var metas = document.getElementsByTagName('meta');\n for (i in metas) {\n console.log(metas[i]);\n if (metas[i].name && metas[i].name.indexOf('keyword... | javascript | edit | 0 | 8 | mit | fc0bcc9db1e93a520706d21e8766ad38ac1fe00f | codingtwinky/itchy-octo-fibula | public/src/bacon-0.0.1.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst mastic = require('./server.js');\nconst { promise } = require('mastic-polyfills/bundles');\n\nconst server = mastic({\n\tpolyfills: [promise]\n});\n\nserver.listen();\n\n```\n\nApply this change: Load all default mastic polyfills ... | javascript | edit | 0 | 1 | mit | d19a0feb10b945a14e5bc0da69d3b47eea6fd47a | thibthib/mastic | packages/mastic-node-server/start.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n/*global describe */\n/*global it */\n\nconst assert = require(\"assert\");\nconst fs = require(\"fs\");\nconst URL = require(\"../lib/url\").URL;\nconst uRLTestParser = require(\"./web-platform-tests/urltestparser\");\... | javascript | edit | 0 | 6 | mit | bd42878d39a42486565548f0c4cc69fcf4e7ce69 | jsdom/whatwg-url,jsdom/whatwg-url,aaronshaf/whatwg-url,tilgovi/whatwg-url,jsdom/whatwg-url | test/web-platform.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nNotifications = new Mongo.Collection('notifications');\n\n// TODO add allow/deny rules\n// user is owner of project - deny\n// user is not logged in - deny\n\ncreateRequestNotification = function(request) {\n check(request, {\n user... | javascript | edit | 0 | 1 | mit | c606a7d8c4bd008098e6bda631b13cefe96cc82f | PUMATeam/puma,PUMATeam/puma | lib/collections/notifications.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nimport { uploadValidationActive } from 'preprint-service/helpers/upload-validation-active';\nimport { module, test } from 'qunit';\n\nmodule('Unit | Helper | upload validation active');\n\n// Replace this with your real tests.\ntest('... | javascript | edit | 0 | 1 | apache-2.0 | 102e8120046d6a39aa0db05961288fec320eb3f3 | caneruguz/ember-preprints,caneruguz/ember-preprints,laurenrevere/ember-preprints,CenterForOpenScience/ember-preprints,baylee-d/ember-preprints,laurenrevere/ember-preprints,baylee-d/ember-preprints,CenterForOpenScience/ember-preprints | tests/unit/helpers/upload-validation-active-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n // Resolves string keys with dots in a deeply nested object\n // http://stackoverflow.com/a/22129960/4405214\n var resolveObject = function(path, obj) {\n return path\n .split('.')\n .reduce(function(prev... | javascript | edit | 0 | 3 | bsd-3-clause | 396a996b4c49e3230fea28590bcebeeb461b4622 | pervino/solidus,pervino/solidus,pervino/solidus,pervino/solidus | backend/app/assets/javascripts/spree/backend/translation.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Script for AutoTabber\n * Handles Tab Keypress\n * @author MarcosBL <<EMAIL>>\n*/\n\n/* DOKUWIKI:include taboverride.js */\n/* DOKUWIKI:include taboverride.escape.js */\n\njQuery(window).load(function(){\n var textareas =... | javascript | edit | 0 | 1 | apache-2.0 | fbf1c83e2fce602a7c7d19ac78372309b6b86be7 | MarcosBL/dokuwiki-plugin-autotabber | script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n $('body').on('click', '[data-apos-search-filter]', function() {\n $(this).closest('form').submit();\n });\n $('body').on('keyup', '[data-apos-search-field]').keyup(function (e) {\n if (e.keyCode == 13) {\n ... | javascript | edit | 0 | 2 | mit | d8a312185800fd7ee32f7a1bbe590cca63beb32e | punkave/apostrophe,punkave/apostrophe | lib/modules/apostrophe-search/public/js/always.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function($) {\n $.widget('pageflow.hiddenTextIndicator', {\n _create: function() {\n var parent = this.options.parent,\n that = this;\n\n parent.on('pageactivate', function(event) {\n that.element.toggleCl... | javascript | edit | 0 | 2 | mit | d2bfa4fc9abb6b47cd5c2c64652d315e9a0d1699 | tf/pageflow,tf/pageflow-dependabot-test,codevise/pageflow,Modularfield/pageflow,tf/pageflow-dependabot-test,tf/pageflow,Modularfield/pageflow,codevise/pageflow,codevise/pageflow,tf/pageflow,tf/pageflow,Modularfield/pageflow,tf/pageflow-dependabot-test,tf/pageflow-dependabot-test,codevise/pageflow,Modularfield/pageflow,... | app/assets/javascripts/pageflow/slideshow/hidden_text_indicator_widget.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar MidiInput = function() {\n this.init = function(visualizer) {\n this.visualizer = visualizer;\n\n if (navigator.requestMIDIAccess) {\n navigator.requestMIDIAccess().then(onMidiSuccess, onMidiReject);\n } else {\n ... | javascript | edit | 0 | 3 | mit | bf2c1b5f09c348f172846087db10344f53bd3c44 | jakate/AudioViz,jakate/AudioViz,jakate/AudioViz | js/MidiInput.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/** @babel */\n\nimport etch from 'etch'\n\nimport {CompositeDisposable} from 'atom'\n\nexport default class AbstractComponent {\n constructor(properties, children, callback) {\n if (properties) this.properties = properties\n els... | javascript | edit | 0 | 6 | unlicense | 3ee7ed2698db579ec2d8b4cb6c6c4afc509993c2 | berenm/xoreos-editor,berenm/game-data-explorer | lib/core/abstract-component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport function changeLocation(location) {\n return {\n type: 'CHANGE_LOCATION',\n location\n };\n}\n\nexport function changeUnitType(unitType) {\n return {\n type: 'CHANGE_UNIT_TYPE',\n unitType\n };\n}\n\nexport functi... | javascript | edit | 0 | 1 | mit | 6034574f1299343c7df07cfbb65b889fd8b526fd | JavierPDev/Weather-D3,JavierPDev/Weather-D3 | src/actions/appActions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n/*!\n * BALLZ repl module\n *\n * @author pfleidi\n */\n\nvar Readline = require('readline');\nvar Util = require('util');\n\nvar Parser = require('../lib/parser');\nvar Environment = require('../lib/environment')... | javascript | edit | 0 | 2 | mit | 12ed1dbfd2cfa2d9c5ef9dd93b1ede0e28c32fdf | pfleidi/ballz.js | bin/ballz-repl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar chai = require('chai');\nvar chaiAsPromised = require('chai-as-promised');\nchai.use(chaiAsPromised);\n\nvar expect = chai.expect;\n\nmodule.exports = function() {\n\n disclaimer = element(by.css('div.disclaimer'));\n\n this.G... | javascript | edit | 0 | 2 | cc0-1.0 | d7e2221203de3f69a952ae02562d8e6556ae1087 | LinuxBozo/hmda-pilot,LinuxBozo/hmda-pilot,cfpb/hmda-pilot,cfpb/hmda-pilot,LinuxBozo/hmda-pilot,cfpb/hmda-pilot | test/functional/cucumber/step_definitions/commonSteps.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nSpace.Object.extend('Todos.LayoutController', {\n\n mixin: [\n Space.messaging.EventSubscribing\n ],\n\n dependencies: {\n layout: 'Layout',\n _: 'underscore'\n },\n\n Constructor() {\n this._currentLayout = null;\n ... | javascript | edit | 0 | 1 | mit | c596901ffce073b75635fe86000b5911e2d98cf7 | meteor-space/todos,meteor-space/todos,meteor-space/todos | packages/app/source/client/controllers/layout-controller.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.