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\nvar jsonfile = require('jsonfile');\n\n// Read in the file to be patched\nvar file = process.argv[2]; // e.g. '../src/MyProject/project.json'\nif (!file)\n console.log(\"No filename provided\");\nconsole.log(\"File: \" + file);\n\n//... | javascript | edit | 0 | 2 | apache-2.0 | 8a399ced8e4e39f0fbb9adad5cd560ff16f3e85d | SteelToeOSS/Discovery,SteelToeOSS/Discovery,SteelToeOSS/Discovery | scripts/patch-project-json.js | rejected_duplicate | Near-duplicate of sample 99433 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar http = require(\"https\");\nvar querystring = require(\"querystring\");\n\nvar ImgurProto = {\n gallery: function(params, callback) {\n var qs = querystring.stringify(params);\n var options = {\n hostname: \"api.imgur.co... | javascript | edit | 0 | 4 | mit | 43bf3700d21f37e36b787f0bfefd331399e24e2f | evilmarty/imgur-rss,evilmarty/imgur-rss | imgur.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env/node\n\nvar cheerio = require('cheerio'),\n fs = require('fs'),\n md = require('marked'),\n mkdirp = require('mkdirp'),\n path = require('path');\n\nfunction slurp(fpath) {\n return fs.readFileSync(fpath, {en... | javascript | edit | 0 | 2 | mit | b91a2d062e41eb2c8710467603f25dac14279495 | mkremins/stasis | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _param = require('./param.json');\nvar _du = require('diskspace');\n\nvar pollInterval = _param.pollInterval || 3000;\n\nvar c;\nvar smallestDev;\nvar smallest;\n\nfunction checkFnc(dev)\n{\n\treturn function(total, free, status)\n\... | javascript | edit | 0 | 5 | apache-2.0 | 457968ce2fb77e9e626ad0a85ec75151a08a31e8 | graphdat/plugin-diskuse_summary,GabrielNicolasAvellaneda/boundary-plugin-diskuse-summary,boundary/boundary-plugin-diskuse-summary | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nmodule.exports = function (str, opts) {\n if (typeof str !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n opts = opts || {};\n\n return str + ' & ' + (opts.postfix || 'rainbows');\n};\n\n```\n\nA... | javascript | edit | 0 | 10 | mit | 7d7b852e1e9e8c3f13066db58391dc15bff77d29 | icyflame/terminal-wallet,icyflame/terminal-wallet | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst release = require('./lib/release')\n\nmodule.exports = function () {\n const project = this.project\n const { getChangeLog, newRelease } = release(project)\n\n return [\n {\n title: 'Start minor release',\n action:... | javascript | edit | 0 | 1 | mit | 9e33466ee630670b0e1d0b4ec96cabf07f36000c | imdone/imdone-core,imdone/imdone-core | .imdone/actions/board.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar rabbit = require('./rabbit');\nvar config = require('./rabbit.json');\nvar commandLineArgs = require('command-line-args');\n\nvar args = commandLineArgs([{ name: 'port', alias: 'p' }]).parse();\n\nvar socketConfig = require('./socke... | javascript | edit | 0 | 2 | mit | a78aa48a7f663f0f17836a2950d529f14aeaeea4 | RenovoSolutions/socket-server | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nconst express = require('express');\nconst app = express();\nconst cookieParser = require('cookie-parser')\nconst config = require('./config/config');\nconst sqlClient = require('knex')(config.database);\nconst analytics... | javascript | edit | 0 | 1 | mit | 7583c6e1c33629944bb36b3364b4b93f39bc8cb3 | kdelemme/analytics | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\n\nfunction SuperSimpleDB(path) {\n if (!fs.existsSync(path)) {\n write({});\n }\n\n this.get = get;\n this.set = set;\n\n function get(key) {\n return read()[key];\n }\n\n function set(key, value) {... | javascript | edit | 0 | 2 | mit | 49da4756ac25c32e3f183c0c31a9f97d7e5dd610 | jhollingworth/super-simple-db | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n'use strict';\n\nvar helpers = require('./lib/test-helpers');\n\nmodule.exports = {\n setFirebaseData: helpers.setFirebaseData,\n setFirebaseRules: helpers.setFirebaseRules,\n setDebug: helpers.setDebug,\n users: helpers.users,\n ... | javascript | edit | 0 | 1 | isc | c5d64f61247ffd21d11c8cea2b5dc8b4c41f3cd3 | dinoboff/targaryen,goldibex/targaryen,goldibex/targaryen,dinoboff/targaryen | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar elegantStatus = require('./');\n\nvar done = elegantStatus('Perform assessment');\n\nsetTimeout(function () {\n done(true);\n\n done = elegantStatus('Set defense systems');\n\n setTimeout(function () {\n done(false);... | javascript | edit | 0 | 1 | mit | f8554c6ae9ed9d2e73e683749948cbb1fe679bea | inikulin/elegant-status | playground.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst gulp = require('gulp');\nconst config = require('./config');\nconst eslint = require('gulp-eslint');\n\ngulp.task('eslint', () => {\n return gulp.src(config.lib)\n .pipe(eslint(config.root + '.eslint.json'))\n .pipe(eslint.... | javascript | edit | 0 | 1 | mit | e49071dffa40ab6712fefa5ea99597e51e68fa4b | tandrewnichols/is-io-version | gulp/eslint.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Reflux = require('reflux');\nvar config = require('./../../../config');\nvar ApiActions = require('./../actions/ApiActions');\n\nvar buffer = [];\nvar ws;\n\nvar ApiStore = Reflux.createStore({\n init: function () {\n ... | javascript | edit | 0 | 4 | mit | a3b50a4f17fe21ed2c90ccafe1f1a088780de9a6 | plouc/mozaik,backjo/mozaikdummyfork,danielw92/mozaik,beni55/mozaik,codeaudit/mozaik,tlenclos/mozaik,juhamust/mozaik,michaelchiche/mozaik,danielw92/mozaik,plouc/mozaik,juhamust/mozaik,beni55/mozaik,backjo/mozaikdummyfork,michaelchiche/mozaik,tlenclos/mozaik,codeaudit/mozaik | src/core/stores/ApiStore.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Cleaner = require('clean-css');\nvar defaultCleaner = new Cleaner();\nvar Promise = require('promise');\n\nexports.name = 'clean-css';\nexports.inputFormats = ['clean-css', 'css', 'cssmin'];\nexports.outputFormat =... | javascript | edit | 0 | 4 | mit | 0e10dee4f75fafe6c543b5f3afa266e0f1f93046 | jstransformers/jstransformer-clean-css | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar globals = {};\n\n// Stash old global.\nif (\"tree-node\" in global) globals.tree-node = global.tree-node;\n\nmodule.exports = require(\"./dist/tree-node\");\n\n// Restore old global.\nif (\"tree-node\" in globals) global.tree-node =... | javascript | edit | 0 | 0 | mit | 1f42ce2a525e67c57c5fd9ab7d223fe533501590 | deztopia/treenode | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['backbone'], function(Backbone) {\n var MoxieModel = Backbone.Model.extend({\n fetch: function(options) {\n options = options || {};\n // Set a default error handler\n if (!options.erro... | javascript | edit | 0 | 2 | apache-2.0 | 0506736f4e0b6db7667445f414ec52d081d6c2a9 | ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client | app/core/models/MoxieModel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-gravatar',\n\n included: function included(app) {\n this.app = app;\n this._super.included(app);\n\n app.import(app.bowerDirectory + '/blueimp-md... | javascript | edit | 0 | 3 | mit | fdbe99bee4de0e5fd1ac6e31a77c6ce609db6d19 | johnotander/ember-cli-gravatar,johnotander/ember-cli-gravatar | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path'),\n cmd = require('./lib/utils/cmd'),\n fs = require('fs'),\n Q = require('q'),\n osenv = require('osenv'),\n extractUser = require('./lib/utils/extractUser'),\n extractPassword = require('./l... | javascript | edit | 0 | 1 | mit | 1dd495608ac245827734b7ea74403f10c69089ec | mistermark/mvn-credentials,mistermark/mvn-credentials | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar DtsCreator = require('typed-css-modules');\nvar loaderUtils = require('loader-utils');\n\nmodule.exports = function(source, map) {\n this.cacheable && this.cacheable();\n var callback = this.async();\n\n // Pass on query paramete... | javascript | edit | 0 | 3 | mit | e169b25cf5d2f459ab3c8844fbbbd86603233137 | olegstepura/typed-css-modules-loader | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Imports\n// -------------------------------------------------------------------------------------------------\n\nvar UMDFormatter = require('6to5/lib/6to5/transformation/modules/umd');\nvar util = require('./lib/util');\n\n\n// Main\... | javascript | edit | 0 | 2 | mit | fa33cb73def69835288eccad70ffc6b20961f24e | tomekwi/6-to-library | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as ActionTypes from '../constants/ActionTypes';\n\nlet defaultState = {\n loading: false,\n data: [], // array of comics\n last_error: undefined\n}\n\nexport default function(state = defaultState, action) {\n switch (action... | javascript | edit | 0 | 4 | mit | b302e7fab835955de490cf2813be58c7483d6a72 | kozko2001/existentialcomics,kozko2001/existentialcomics | web/js/reducers/Api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nvar fs = require('fs');\nvar path = require('path');\n\n\nfunction readSnippet() {\n try {\n return fs.readFileSync(path.join(process.cwd(), 'vendor/newrelic-snippet.html'), {\n encodin... | javascript | edit | 0 | 6 | mit | 673b054d240328b1cd2e7b7bd5ab7ea71f8edd52 | AltSchool/ember-newrelic,AltSchool/ember-newrelic | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nyeomanApp.controller('EditZoneCtrl'\n , ['$scope', '$rootScope', 'UIEvents', 'ZoneFactory', 'ZoneService', 'EditZoneService', 'EditTriggerService', 'TriggerFactory'\n , function($scope, $rootScope, UIEvents, ZoneFacto... | javascript | edit | 0 | 2 | mit | 52262e47cb866ef010bd40e98e8bbe22ba54bcb9 | ninjablocks/ninja-sentinel,ninjablocks/ninja-sentinel,ninjablocks/ninja-sentinel | yeoman/app/scripts/controllers/editZone.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n/**\n * Module dependencies.\n */\n\nvar AssertionError = require('assert').AssertionError\n , callsite = require('callsite')\n , fs = require('fs')\n\n/**\n * Expose `assert`.\n */\n\nmodule.exports = process.env.NO_ASSERT\n ? fun... | javascript | edit | 0 | 2 | mit | 984b2e8d0de6a7f2900b6d5311684c1b20409afc | tj/better-assert,CantemoInternal/better-assert | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst schedule = require('node-schedule');\n\nconst jenkins = require('./lib/jenkins');\nconst redis = require('./lib/redis');\n\nconst gitter = require('./lib/gitter');\nconst sendgrid = require('./lib/sendgrid');\n... | javascript | edit | 0 | 3 | mit | 0e36ee3da481a8cd2391720711ea8d25c17da21f | Starefossen/jenkins-monitor | index.js | rejected_duplicate | Near-duplicate of sample 101155 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar boombox = require('boombox');\nvar test = boombox(require('tape'));\nvar signaller = require('rtc-signaller');\nvar WebSocket = require('ws');\nvar reTrailingSlash = /\\/$/;\n\nmodule.exports = function(opts) {\n // initialise the ... | javascript | edit | 0 | 5 | apache-2.0 | 142a9cb38331f87429579aa8de83df6f581c13f4 | rtc-io/rtc-signallercheck | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar app = require(\"app\"); // Module to control application life.\nvar BrowserWindow = require(\"browser-window\"); // Module to create native browser window.\n\n// Keep a global reference of the window object, if you don\"t, the win... | javascript | edit | 0 | 3 | mit | 11cf53b47d132fd936d4d4ceb21017a69139c2fa | doryphores/down-quark,doryphores/down-quark | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar postcss = require('postcss');\n\nmodule.exports = postcss.plugin('postcss-prefixer-keyframes', function (opts) {\n opts = opts || {};\n\n var prefix = opts.prefix || '';\n\n var usedKeyframes = [];\n\n return function (c... | javascript | edit | 0 | 3 | bsd-2-clause | 46f0ac7f218c9daa002042bd1a4220cf1f985d1c | koala-framework/postcss-prefixer-keyframes | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n module: {\n loaders: [\n { test: /\\.js$/, loaders: ['babel-loader'], exclude: /node_modules/ }\n ]\n },\n output: {\n library: 'Redux',\n libraryTarget: 'umd'\n },\n resolve: ... | javascript | edit | 0 | 0 | mit | 2f64cb13cf6cbcb42fa1fc26265209bd4d1ee7cc | TannerRogalsky/make-stateful | webpack.config.base.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst path = require('path');\n\ndescribe('node data resolution', () => {\n const relativeDataPath = './data/data.json';\n\n it('should be able to resolve data files through relative paths', () => {\n con... | javascript | edit | 0 | 2 | apache-2.0 | 4e55c93cad255389acbf2c242ad34afcfd2c2df8 | bazelbuild/rules_nodejs,alexeagle/rules_nodejs,alexeagle/rules_nodejs,alexeagle/rules_nodejs,bazelbuild/rules_nodejs,alexeagle/rules_nodejs,bazelbuild/rules_nodejs,bazelbuild/rules_nodejs,bazelbuild/rules_nodejs | internal/e2e/node/data_resolution.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar grunt = require('grunt');\n\nvar makeOptions = function (options) {\n\n var baseOptions = {\n base: null,\n prefix: 'grunt-',\n verbose: false\n };\n\n if (options) {\n for (var key in options) {... | javascript | edit | 0 | 4 | mit | 9c21763204b0cac5756a7c4168a1ccdf782fea54 | gratimax/gulp-grunt | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\n\nimport { TYPE } from './../utils/constant';\n\nfunction ProgressBar({\n delay,\n isRunning,\n closeToast,\n type,\n hide,\n className... | javascript | edit | 0 | 3 | mit | b89de7edfbcc8a1303b10173f26fc02640e2e68f | fkhadra/react-toastify,sniphpet/react-toastify,fkhadra/react-toastify,fkhadra/react-toastify,fkhadra/react-toastify,sniphpet/react-toastify | src/components/ProgressBar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar asyncDone = require('async-done');\n\nfunction settle(fn, done){\n asyncDone(fn, function(error, result){\n var settled = {};\n\n if(error != null){\n settled.state = 'error';\n settled.value = erro... | javascript | edit | 0 | 2 | mit | 30f3c76a882793a5bc2e4c0654e19af0ed540795 | phated/async-settle,gulpjs/async-settle | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { ItemTypes } from './constants';\n\nconst demoFolderStructure = {\n 0: {\n type: ItemTypes.ROOT,\n content: [1, 7]\n },\n 1: {\n type: ItemTypes.FOLDER,\n name: 'Answers',\n content: [2, 3, 6]\n },\n 2: {\n ... | javascript | edit | 0 | 0 | mit | 028069d0a5ef3564d6f0c7cbcf5bec9000c3324b | zhukov-maxim/tree-dnd,zhukov-maxim/tree-dnd | src/demoFolderStructure.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nmodule.exports = function (str, opts) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\topts = opts || {};\n\n\treturn str + ' & ' + (opts.postfix || 'rainbows');\n};\n\n```\n\nA... | javascript | edit | 0 | 5 | mit | 8673625754c127e6edbdddf71fd4043d0d94fedc | xipasduarte/google-store-link | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nvar svg = require('virtual-dom/virtual-hyperscript/svg')\nvar bezier = require('bezier-easing')\nvar Size = require('create-svg-size')\nvar Circle = require('./circle')\nvar Mask = require('./mask')\n\nmodule.exports = C... | javascript | edit | 0 | 2 | mit | 814a78288bdcf41f17c0de0ef2ef466288bdd1bd | bendrucker/circle-bounce | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\n'use strict';\n\nfunction getTaskConfig(projectConfig) {\n\tvar taskConfig = {\n\t\tsvgSrc: projectConfig.paths.src.svgs + '**/*.svg',\n\t\toutDir: '',\n\n\t\tsettings: {\n\t\t \"dest\": \"\",\n\t\t \"mo... | javascript | edit | 0 | 1 | mit | e6cdb4e94a8e9ac108da2a10a5e1dfd14c10dee1 | jtuds/cartridge-svgs,cartridge/cartridge-svgs | _config/task.svgs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwrapAsync = (Meteor.wrapAsync)? Meteor.wrapAsync : Meteor._wrapAsync;\nMongo.Collection.prototype.aggregate = function(pipelines) {\n var coll = MongoInternals.defaultRemoteCollectionDriver().mongo.db.collection(this._name);\n return ... | javascript | edit | 0 | 2 | mit | 26d316fd8a5e431f7ef5d2a19eae86e6cc0f919c | meteorhacks/meteor-aggregate,Philip-Nunoo/meteor-aggregate | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar helper = require('../helper');\n\n/**\n * Defines all linting task.\n *\n * @function\n * @memberof! GruntLint\n * @private\n * @param {Object} grunt - The grunt instance\n * @returns {Object} Grunt config object\n ... | javascript | edit | 0 | 5 | apache-2.0 | d6f090b2214b5c05b4d85899f3ecf38e89d4eab3 | sagiegurari/js-project-commons | lib/grunt/task/lint.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nprotractor.expect = {\n challengeSolved: function (context) {\n describe('(shared)', () => {\n beforeEach(() => {\n browser.get('/#/score-board')\n })\n\n it(\"challenge '\" + context.challenge + \"' should be ... | javascript | edit | 0 | 1 | mit | c7626a6c9a44387d736d6b3cea78941d7c170927 | bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop | test/e2e/_sharedSpec.js | rejected_duplicate | Near-duplicate of sample 89948 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar DemoApp = function(desktop) {\n this.demoWindow = desktop.createWindow({\n x: 50,\n y: 50,\n title: \"Demo App!\"\n });\n this.demoWindow.body.innerHTML = \"<span class='posDisplay'>0, 0</span>\";\n this.on(\"tick\", fu... | javascript | edit | 0 | 1 | mit | 6b19a1cb7d20baebc8351a1348e9c3ad2d4142cc | Thristhart/demotopical,Thristhart/demotopical | apps/demoApp.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\n\nfunction isSdkDirectory() {\n var cwd = process.cwd();\n\n var data = fs.readdirSync(cwd);\n\n data = data.map(item => item.toLowerCase());\n\n if (data.indexOf('scripts') > -1 &&\n data.indexOf('plug... | javascript | edit | 0 | 5 | mit | 212e7e7c7996473269d89887fa156c33f89356ef | BuildFire/sdk-cli | tools/isSdkDirectory.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst BaseStep = require('./base-step');\n\nmodule.exports = class VoidStep extends BaseStep {\n start() {}\n};\n\n```\n\nApply this change: Return a promise from void step"
},
{
"role": "assistant",
"conte... | javascript | edit | 0 | 1 | bsd-3-clause | c300c2de2e2cbd9ccb91ac1fd9c5b3307751cf4a | kiteco/kite-installer | lib/install/void-step.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar\n growler = require('growler')\n;\n\nmodule.exports = function(applicationOptions) {\n\n applicationOptions = applicationOptions || {};\n\n var growl = new growler.GrowlApplication('Gulp', applicationOptions);\n\... | javascript | edit | 0 | 2 | mit | b003316b731566c6e9900f2dd966e2c8315c0eb2 | yannickcr/gulp-notify-growl | lib/gulp-notify-growl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {createAction} from 'redux-actions';\nimport values from 'lodash/values';\nimport {UnitActions} from './constants';\nimport {Action} from '../common/constants';\nimport {ApiResponse, UnitServices} from './constants';\n\nexport co... | javascript | edit | null | null | mit | e0a63f538942dc54837617afb41ef469925f667d | nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map | src/modules/unit/actions.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport $ from 'jquery';\n\nexport default Ember.Component.extend({\n attributeBindings: ['role'],\n didInsertElement () {\n const $emEl = this.$();\n const $modalBtn = $('[em-modal-open]');\n\n $em... | javascript | edit | 0 | 5 | mit | 2d1c5f5e42690117bc49ba2efa2d00ce55eda89a | pe1te3son/spendings-tracker,pe1te3son/spendings-tracker | app/components/em-modal.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Map from '../src/ol/Map.js';\nimport View from '../src/ol/View.js';\nimport MVT from '../src/ol/format/MVT.js';\nimport VectorTileLayer from '../src/ol/layer/VectorTile.js';\nimport VectorTileSource from '../src/ol/source/VectorT... | javascript | edit | 0 | 2 | bsd-2-clause | cbf0ecfd75b096d0c3866c6e38c3465f2fcdd4ee | geekdenz/openlayers,stweil/ol3,stweil/openlayers,oterral/ol3,stweil/openlayers,geekdenz/ol3,openlayers/openlayers,openlayers/openlayers,adube/ol3,oterral/ol3,geekdenz/ol3,geekdenz/openlayers,geekdenz/ol3,geekdenz/openlayers,stweil/ol3,bjornharrtell/ol3,stweil/ol3,adube/ol3,bjornharrtell/ol3,oterral/ol3,stweil/openlayer... | examples/vector-tile-info.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar app = angular.module('settingsWindow', ['schemaForm']);\n\napp.run(function($rootScope) {\n $rootScope.GUI = require('nw.gui');\n $rootScope.AppName = $rootScope.GUI.App.manifest.name;\n $rootScope.Version ... | javascript | edit | 0 | 1 | mit | d8e74ca29436e1efbf04124d893e1c0d8e542ec2 | teak/Pussh,teak/Pussh,lukasmcd14/Pussh,lukasmcd14/Pussh,lukasmcd14/Pussh | Resources/js/settings-window.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$.fn.userAutocomplete = function () {\n 'use strict';\n\n function formatUser(user) {\n return Select2.util.escapeMarkup(user.email);\n }\n\n this.select2({\n minimumInputLength: 1,\n multiple: true,\n initSelection: fun... | javascript | edit | 0 | 1 | bsd-3-clause | 1b12dee6fb16fd27686f91ebad9dcf5a3c07b610 | jordan-brough/solidus,jordan-brough/solidus,jordan-brough/solidus,Arpsara/solidus,Arpsara/solidus,Arpsara/solidus,pervino/solidus,pervino/solidus,jordan-brough/solidus,pervino/solidus,pervino/solidus,Arpsara/solidus | backend/app/assets/javascripts/spree/backend/user_picker.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { Router, Route, hashHistory } from 'react-router'\n\nimport App from './App'\nimport Home from './Home'\nimport Overview from './Overview'\nimport MatchReportContainer from './containers/MatchReportCon... | javascript | edit | 0 | 0 | mit | 0ae5aeb2d2fcfa9d443f70a30cb61ca90887e0fb | georgeF105/handball-scoring,georgeF105/handball-scoring | app/components/routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { StyleSheet } from 'react-native';\n\nconst theme = {\n colours: {\n primary: '#fbb632',\n secondary: '#2c2c2c',\n dark: '#212121',\n light: '#bebebe',\n }\n}\n\nconst navigatorStyle = {\n navBarTextColor: 'white'... | javascript | edit | 0 | 0 | mit | 6a18f6e67ee4f43d841d7951c3466cbef5d20133 | akilb/rukatuk-mobile,akilb/rukatuk-mobile,akilb/rukatuk-mobile,akilb/rukatuk-mobile,akilb/rukatuk-mobile | app/config/styles.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar m = angular.module(\"routeUrls\", []);\n\nm.factory(\"urls\", function($route) {\n\n var pathsByName = {};\n angular.forEach($route.routes, function (route, path) {\n if (route.name) {\n pathsByName[route.nam... | javascript | edit | 0 | 3 | mit | c56f979acc1fb4dc262d61c418f9513c778aeaa4 | emgee/angular-route-urls,emgee/angular-route-urls | route-urls.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Comments } from \"meteor/example-forum\";\n\nComments.addField([\n // This commment will appear in alignment forum view\n {\n fieldName: 'af',\n fieldSchema: {\n type: Boolean,\n optional: true,\n label: ... | javascript | edit | 0 | 0 | mit | db86bf349127f51f7199ff12edf72d9483d9fbe4 | Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope | packages/lesswrong/lib/modules/alignment-forum/comments/custom_fields.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar feature_flags = (function () {\n\nvar exports = {};\n\nexports.mark_read_at_bottom = page_params.staging ||\n _.contains(['mit.edu'], page_params.domain);\nexports.summarize_read_while_narrowed = page_pa... | javascript | edit | 0 | 4 | apache-2.0 | 864ae3ad51eb93313f0e415545ac4adffa2a2a6a | jimmy54/zulip,glovebx/zulip,m1ssou/zulip,adnanh/zulip,joshisa/zulip,atomic-labs/zulip,bitemyapp/zulip,Suninus/zulip,swinghu/zulip,Juanvulcano/zulip,xuanhan863/zulip,moria/zulip,zhaoweigg/zulip,jessedhillon/zulip,j831/zulip,samatdav/zulip,suxinde2009/zulip,jimmy54/zulip,eastlhu/zulip,huangkebo/zulip,fw1121/zulip,moria/z... | static/js/feature_flags.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Set the RequireJS configuration\nrequire.config({\n paths : {\n \"use\" : \"libs/use\",\n \"text\" : \"libs/text\",\n \"jquery\" : \"libs/jquery\",\n \"underscore\" : \"libs/underscore\",\n \"bac... | javascript | edit | 0 | 1 | apache-2.0 | 2d5b22f05271bf73dccbfb3c093ae9b45fa604cc | iLanguage/iLanguage,cesine/iLanguage,vronvali/iLanguage,vronvali/iLanguage,cesine/iLanguage,iLanguage/iLanguage,cesine/iLanguage,iLanguage/iLanguage,iLanguage/iLanguage,vronvali/iLanguage,cesine/iLanguage,vronvali/iLanguage,vronvali/iLanguage,cesine/iLanguage,iLanguage/iLanguage,vronvali/iLanguage | public/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst { getLoader } = require('react-app-rewired');\n\n// this is the path of eslint-loader `index.js`\nconst ESLINT_PATH = `eslint-loader${path.sep}index.js`;\n\nfunction getEslintOptions(rules) {\n cons... | javascript | edit | 0 | 2 | mit | 3d246e03375d09f8f070d56a7e9ce3a6c3a0b821 | timarney/react-app-rewired,timarney/react-app-rewired | packages/react-app-rewire-eslint/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * # Convert Release.json to Changes.md\n *\n * @param {Array} data The releases from Github's API\n * @param {String} out Changelog filename\n * @return {Stream} The file write stream\n */\n\nvar fs = require('fs');\n\nmodule.... | javascript | edit | 0 | 1 | mit | 90602ae76e8a1e207479d1a9c18513d727a56f52 | killercup/ghReleases2Changelog | lib/convert.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nimport reduce from 'lodash-es/reduce'\nimport merge from 'lodash-es/merge'\n\nfunction bundleModules (modules) {\n let bundle = reduce(modules, (acc, v1, k1) => {\n reduce(v1, (acc2, v2, k2) => {\n if (k2 !== 'data') {\n ... | javascript | edit | 0 | 2 | mit | 4444a847382b5983a991613d1d546e861a5a4720 | jsonmvc/jsonmvc,jsonmvc/jsonmvc | packages/jsonmvc/src/fns/bundleModules.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('dotenv').load();\nvar express = require('express');\nvar notelyServerApp = express();\nvar Note = require('./models/note');\nvar bodyParser = require('body-parser');\n\n// Allow ourselves to use `req.body` to work with form dat... | javascript | edit | 0 | 1 | mit | be2c05a6e5f3e3adfc99a4424f6f181a45a53863 | FretlessJS-2016-03/notely,FretlessJS-2016-03/notely | server/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar d3 = require('d3');\nvar React = require('react');\nvar ReactDOM = require('react-dom');\n\nvar AnitmationCircle = React.createClass({\n\n displayName: 'AnitmationCircle',\n\n propTypes: {\n className: React.PropTypes.string,\n... | javascript | edit | 0 | 2 | apache-2.0 | 077bcbb17e8fdda2915e62dd56fc4e7e3be37428 | dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui | src/js/components/charts/AnimationCircle.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nfunction BrowserWarning() {\n return (\n <div>\n <p className=\"alert alert-warning\">\n Currently, Varaamo does not support IE11.\n We are investigating this issue and finding a solu... | javascript | edit | 0 | 1 | mit | b533ebe00bafbe82258190d1345d180dc5640edf | fastmonkeys/respa-ui | app/pages/browser-warning/BrowserWarning.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default class GameLoop {\n loop = () => {\n this.subscribers.forEach((callback) => {\n callback.call();\n });\n\n this.loopID = window.requestAnimationFrame(this.loop);\n }\n constructor() {\n this.subscribers... | javascript | edit | 0 | 2 | mit | a9e4fd9eea5f4f1edcf8dedf38b10f80d877fa92 | havster09/react-aliens | src/native/utils/game-loop.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar Locket = require('../')\nvar cadence = require('cadence')\nvar path = require('path')\nvar crypto = require('crypto')\nvar seedrandom = require('seedrandom')\n\n\nfunction pseudo (max) {\n var random = seed... | javascript | edit | 0 | 2 | mit | 4525ca92cdb39a69070a5657c4859a5949b49965 | bigeasy/locket,bigeasy/locket | benchmark/load.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar http = require('http');\nvar path = require('path');\nvar fs = require('fs');\nvar mime = require('mime');\n\nfunction send404 (response) {\n\tresponse.writeHead(404, {\"Content-type\" : \"text/plain\"});\n\trespo... | javascript | edit | 0 | 2 | bsd-3-clause | d12a2d766f9719e5440d20d1badbcd96cdcf178d | MXProgrammingClub/bus-tracker-frontend,MXProgrammingClub/bus-tracker-frontend,MXProgrammingClub/bus-tracker-frontend | site/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('app')\n.directive('selectOnClick', function () {\n return {\n restrict: 'A',\n link: function (scope, element) {\n var focusedElement;\n element.on('click', function () {\n ... | javascript | edit | 0 | 2 | mit | b460ef197fbc662e7689369142ddab3a0971a33b | olyckne/FO,olyckne/FO | app/directives/SelectOnClick.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire.config({\n\n // alias libraries paths\n paths: {\n 'domReady': '../bower_components/requirejs-domready/domReady',\n 'angular': '../bower_components/angular/angular',\n 'jquery': '../bower_components/jq... | javascript | edit | 0 | 0 | mit | f41645773553db918ea1041e5ddb7ccdf7476b73 | loginwashere/pixel-clicker | app/scripts/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport {\n Text,\n TouchableHighlight\n} from 'react-native';\n\nclass Button extends Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n const {th... | javascript | edit | 0 | 2 | mit | 7b14ccbb14cb28c3a1fbf2499114858125d808a2 | uiheros/react-native-redux-todo-list,uiheros/react-native-redux-todo-list,uiheros/react-native-redux-todo-list | app/components/shared/Button.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport CodeMirror from 'codemirror';\nimport './qwery-mode';\nimport Hint from './hint';\nimport Completion from './completion';\nimport QueryRunner from './query-runner';\n\nexport default class QueryEditor ... | javascript | edit | 0 | 4 | mit | 1dbc20c1010fbd65e1d0f2ada053923ef672c43c | paulsonnentag/qwery-me,BrackCurly/qwery-me,BrackCurly/qwery-me,BrackCurly/qwery-me,paulsonnentag/qwery-me,paulsonnentag/qwery-me | app/query-editor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport cx from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport YouTubePlayerEmbed from './PlayerEmbed';\n\nconst YouTubePlayer = ({\n active,\n className,\n enabled,\n mode,\n media,\n seek,\... | javascript | edit | 0 | 2 | mit | a4493c011466778fae7375e84a9aa278671a3e8e | u-wave/web,welovekpop/uwave-web-welovekpop.club,u-wave/web,welovekpop/uwave-web-welovekpop.club | src/sources/youtube/Player.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Has Vowels\n * \n * hasVowel tests if the String calling the function has a vowels\n * \n * @param {void}\n * @return {Boolean} returns true or false indicating if the string\n * has a vowel or not\n */\nString.prototype.hasVowe... | javascript | edit | 0 | 1 | mit | e17bb98bcc5c188308b57b8e5eb462b77f9092b2 | andela-oolutola/string-class,andela-oolutola/string-class | src/String.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n 'extends': './index.js',\n\n 'plugins': [\n 'react'\n ],\n\n 'ecmaFeatures': {\n 'jsx': true\n },\n\n 'rules': {\n 'react/display-name': 0,\n 'react/jsx-boolean-value': 2,\n 'react/jsx-no-undef'... | javascript | edit | 0 | 0 | mit | ea34be8eed7fda0ed90dbb3d10fbb84ebf600ac9 | brigade/eslint-config-brigade | react.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Vue from \"vue\";\nimport VueResource from \"vue-resource\";\nimport Carousel from \"./components/Carousel.vue\";\nimport styles from './carousel.css';\n\nVue.use(VueResource);\nVue.config.debug = true;\n\nconst carousel = new Vu... | javascript | edit | 0 | 2 | mit | f6511c1f514f7a3fe52f355dba9de371b141a890 | ludo237/photo-gallery,ludo237/vuejs-carousel,ludo237/vuejs-carousel,ludo237/photo-gallery | src/carousel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module(\"ngJustGage\", [])\n .directive('justGage', ['$timeout', function ($timeout) {\n return {\n restrict: 'EA',\n scope: {\n id: '@',\n class: '@',\n min: '=',\n max: '=',\n t... | javascript | edit | 0 | 3 | mit | 5e0759e56e01bd6e0b4a6f6e55c624ebb881f736 | mattlaver/angular-justgage,mattlaver/angular-justgage | ng-justgage.js | rejected_duplicate | Near-duplicate of sample 82479 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Popup script\n */\n\n'use strict';\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './components/app-component';\n\nReactDOM.render(<App/>, document.getElementById('styleme-app'));\n\n```\n\nApp... | javascript | edit | 0 | 0 | mit | 5ca507223decf01768fbb245afa6df55800c7ed8 | dashukin/StyleMe,dashukin/StyleMe | src/js/popup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport {withReduxSaga} from 'configureStore'\n\nimport Layout from 'components/Layout'\nimport HomeHero from 'components/HomeHero'\nimport ProgramsList from 'containers/ProgramsList'\nimport SearchBar from 'co... | javascript | edit | 0 | 1 | mit | 8b985cc16bda9cf1efe2841b8e29a6a0ca01a7da | bmagic/acdh-client | pages/index.js | rejected_duplicate | Near-duplicate of sample 91765 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction sortProject(changeEvent) {\n\n var data = {};\n\n // Get old and new index from event\n data.oldIndex = changeEvent.oldIndex;\n data.newIndex = changeEvent.newIndex;\n\n // Get filters \n data.filters = {};\n ... | javascript | edit | 0 | 1 | mit | 8d1b0b79cd530e66cd0181dd44a8a9d69bf1652e | BBBThunda/projectify,BBBThunda/projectify,BBBThunda/projectify | public/script/project.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\nCopyright 2018 Google LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n https://www.apache.org/... | javascript | edit | 0 | 0 | apache-2.0 | b2d3cce4cbfdf6514b892cd530553eeaca9e61ef | google/docsy,grpc/grpc.io-docsy,grpc/grpc.io-docsy,google/docsy | postcss.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n/**\n * Module dependencies.\n */\n\nvar path = require('path');\nvar spawn = require('child_process').spawn;\n\n// node executable\nvar node = process.execPath || process.argv[0];\nvar gnode = path.resolve(__dirname, '..', 'bin', 'gn... | javascript | edit | 0 | 3 | mit | d4828f471fe14b7843cb50ab2e6cfb63d3cdf8e0 | TooTallNate/gnode | test/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Change WebSocket to @faddat one"
},
{
"role": "assistant",
"content": "import { api } from 'steem';\n\napi.setWebSocket('ws://138.201.198.167:8090');\n\nmodule.exports = api;\n"
}
] | javascript | new_file | 0 | 0 | mit | ddca8c7660b6010aa21c0a6993eaff79985601b0 | Sekhmet/busy,busyorg/busy,ryanbaer/busy,ryanbaer/busy,Sekhmet/busy,busyorg/busy | src/steemAPI.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('sk.backgammon', [])\n .controller('MainCtrl', ['$scope', function ($scope) {\n }]);\n\n\n```\n\nApply this change: Initialize array with 30 black and white stones/checkers."
},
{
"role": "assis... | javascript | edit | 0 | 1 | mit | 9dd1456038eafb0735bb1790cc8de029e58dd039 | stamkracht/backgammon,stamkracht/backgammon | src/js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPrism.languages.python= { \n\t'comment': {\n\t\tpattern: /(^|[^\\\\])#.*?(\\r?\\n|$)/g,\n\t\tlookbehind: true\n\t},\n\t'string': /\"\"\"[\\s\\S]+?\"\"\"|'''[\\s\\S]+?'''|(\"|')(\\\\?.)*?\\1/g,\n\t'keyword' : /\\b(as|assert|break|class|c... | javascript | edit | 0 | 0 | mit | d2a960c8e0f5d219a59377c3230033720e91683f | JustinBeckwith/prism,CupOfTea696/prism,chaosshen/prism,danielberkompas/prism,mcanthony/prism,MakeNowJust/prism,manfer/prism,PrismJS/prism,iwatakeshi/prism,mcanthony/prism,nauzilus/prism,MakeNowJust/prism,desertjim/prism,mooreInteractive/prism,danielberkompas/prism,aviaryan/prism,RobLoach/prism,nauzilus/prism,valorkin/p... | components/prism-python.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Provide a search widget with a popup to enter and clear search terms.\n * Test suite can get a handle on this for clean slate testing.\n */\ntsbar.initSearchWidget = function(exports, $) {\n\n function SearchWidget() {\n\n ... | javascript | edit | 0 | 1 | bsd-3-clause | 4034135c801f057fb1c891a36f07353221373755 | TiddlySpace/tsbar | src/search.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular\n .module('app.layout')\n .controller('ShellController', ShellController);\n\n function ShellController(\n $rootScope,\n $scope,\n config,\n lo... | javascript | edit | 0 | 2 | apache-2.0 | 6239588bbb9ea1dd01795551a12010c1465a8019 | Poniverse/Poniverse.net | src/client/app/layout/shell.controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n// add two numbers without using +\nfunction add(a,b) {\n if(b == 0)\n return a;\n var sum = a ^ b;\n var carry = (a & b) << 1;\n return add(sum,carry);\n}\n```\n\nApply this change: Add example invocation for ... | javascript | edit | 0 | 2 | mit | 08c88a615de11501f5e1e9e0e4450910c1868599 | Pranay92/JS-Overrides | src/Operator.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar sse4_crc32 = require(\"bindings\")(\"sse4_crc32\");\n\n\n/**\n * Defines a progressive 32-bit CRC calculator\n *\n * @param input The input string for which the CRC is to be calculated\n * @param initial_crc The initial CRC passed i... | javascript | edit | 0 | 3 | mit | 64b30166be0c7a82065034e01d00643af5d979fa | dudleycarr/sse4_crc32,Voxer/sse4_crc32,gagern/sse4_crc32,gagern/sse4_crc32,dudleycarr/sse4_crc32,Voxer/sse4_crc32,dudleycarr/sse4_crc32,dudleycarr/sse4_crc32,Voxer/sse4_crc32,Voxer/sse4_crc32,gagern/sse4_crc32 | sse4_crc32.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar assert = require('assert');\nvar ghir = require('../dist');\n\nassert.ok(true);\n\nassert(ghir.hasVote('I agree, +1!'));\nassert(! ghir.hasVote('I agree, 2+1!'));\nassert(! ghir.hasVote('I agree!'));\n\n// assert(ghir.hasVote(' \\... | javascript | edit | 0 | 0 | mit | 008d8c2cb63391b2be5b2cbfd0b0bee96058b326 | adjohnson916/github-issue-rank,adjohnson916/github-issue-rank | test/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n $(\"#modal-1\").on(\"change\", function() {\n if ($(this).is(\":checked\")) {\n $(\"body\").addClass(\"modal-open\");\n } else {\n $(\"body\").removeClass(\"modal-open\");\n }\n });\n\n $(\".modal-... | javascript | edit | null | null | mit | adf7c42b48cbcf6e98871b529faeadf80a8cf4e0 | costolo/chain,costolo/chain,costolo/chain | app/assets/javascripts/modal.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nmodule.exports = function () {\n\treturn function (irc) {\n\t\tirc.topic = function (channel, topic, fn) {\n\t\t\tif (typeof topic === 'function') {\n\t\t\t\tfn = topic;\n\t\t\t\ttopic = '';\n\t\t\t}\n\n\t\t\tthis.write('TOPIC ' + cha... | javascript | edit | 0 | 4 | mit | d7f4f424637e603768af853001efef54e5a5af9b | ChiperSoft/ircsock.js | lib/protocol-handlers/topic.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['require', 'app', 'backbone.marionette', 'backbone', 'marked', 'underscore'],\n function (require, App, Marionette, Backbone, marked, _) {\n 'use strict';\n\n var controller = {\n showHelp: function () {\n req... | javascript | edit | 0 | 1 | mit | b6b3c9fc38f85b310bec6d73d90fda71ef5afed4 | chunqi/nusmods,nusmodifications/nusmods,nathanajah/nusmods,mauris/nusmods,nusmodifications/nusmods,nusmodifications/nusmods,chunqi/nusmods,Yunheng/nusmods,Yunheng/nusmods,chunqi/nusmods,nusmodifications/nusmods,zhouyichen/nusmods,zhouyichen/nusmods,mauris/nusmods,mauris/nusmods,mauris/nusmods,zhouyichen/nusmods,Yunheng... | app/scripts/help/main.js | rejected_duplicate | Near-duplicate of sample 77339 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar makeNode = require(\"../node/make_node\"),\n\tminify = require(\"../graph/minify\"),\n\tprettier = require(\"prettier\");\n\nmodule.exports = function(bundle, options){\n\tvar source = prettier.format(\n\t\t`\n\t\t\tif(typeof proces... | javascript | edit | 0 | 2 | mit | 6f274d1471bda67816e2de21bfc8b0e1897638d9 | stealjs/steal-tools,stealjs/steal-tools | lib/bundle/add_process_shim.js | rejected_duplicate | Near-duplicate of sample 75908 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// noinspection JSUnresolvedVariable\nmodule.exports = {\n cache: false,\n debug: false,\n module: {\n loaders: [\n {\n // This is a custom property.\n name: 'jsx',\n test: /\\.jsx?$/,\n loader: 'b... | javascript | edit | 0 | 0 | mit | 8799a7e7c3eaa7820e75d49cd4412e85c7252b4f | amcsi/szeremi,amcsi/szeremi | configs/webpack.base.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\njsdom = require('jsdom')\nwindow = jsdom.jsdom().createWindow();\ndocument = window.document;\nglobal.document.implementation.createHTMLDocument = function (html, url) {\n return jsdom.html(html);\n};\n\n$ = jQuery = require('jq... | javascript | edit | 0 | 1 | mit | 4de0b1a4f323dd6fc878f1213eb80412b241c4e9 | ai/evil-blocks,ai/evil-blocks | test/mocha.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar virus = document.querySelector(\"div\");\nvar x = 1;\nvar y = 0;\nvar vy = 0;\nvar ay = 0;\nvar vx = .1; // px per millisecond\nvar startTime = Date.now();\nvar clickTime;\ntimer = setInterval(function animate() {\n\tvar t = Date.no... | javascript | edit | 0 | 4 | mit | 53a79fd3e8466db84253f8774261bef0d3833a62 | BOZ2323/virun,BOZ2323/virun | virun.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar expect = require('chai').expect;\nvar passwords = require('..');\n\ndescribe('mongoose-password-bcrypt-nodejs', function() {\n});\n\n```\n\nApply this change: Add use strict to tests\n\nSigned-off-by: Ian Macalinao <<EMAIL>>"
},
... | javascript | edit | 0 | 1 | mit | b276c2e332e9482c1cd64ec4ac02e53c2245cd2c | simplyianm/mongoose-password-bcrypt-nodejs | test/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nglobal.useBluebird = false;\nglobal.useQ = false;\nglobal.useWhen = false;\n\nglobal.useCreed = true;\nglobal.parallelQueries = 25;\n\nvar creed = require('../../dist/creed');\n\nrequire('../lib/fakesP');\n\nmodule.exports = function up... | javascript | edit | 0 | 2 | mit | 6bd97b4ee5d57db1258040978fa5649ecc68e419 | briancavalier/creed,briancavalier/creed,bergus/creed,bergus/creed | perf/madeup-parallel/promises-creed.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Fake service (makes a tether)\n/* jshint node: true */\n\n(function () {\n \"use strict\";\n\n var runtime = require(\"quark_node_runtime.js\");\n var ipify = require(\"./ipify\");\n\n function Consumer() {};\n Consume... | javascript | edit | 0 | 1 | apache-2.0 | 29f8fd3db9258d891cb421f9658bb521fd7aa298 | datawire/quark,datawire/datawire-connect,datawire/quark,datawire/datawire-connect,datawire/datawire-connect,datawire/quark,datawire/datawire-connect,bozzzzo/quark,bozzzzo/quark,bozzzzo/quark,datawire/quark,datawire/quark,bozzzzo/quark,datawire/quark | examples/directory/ipClient.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar navbar = function($interval, $q, User) {\n return {\n restrict: 'E', // only activate on element attribute\n templateUrl: 'navbar.html',\n link: function(scope, element) {\n var formats = [formatPe... | javascript | edit | 0 | 2 | mit | a4ff3c9bbd5f6acd7e0069f06d2a3d8de5453300 | swm93/bugtracker,swm93/bugtracker,swm93/bugtracker | app/assets/javascripts/angular/directives/navbarDir.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar async = require('async');\n\n/**\n * Create a new user and move it to a new subcompany.\n * The new user will be the first admin of the subcompany.\n * @param {Object} subcompany Informations of the subcompany\n * @... | javascript | edit | 0 | 1 | mit | 276aeaa74bf7f014e5ca77f0178b81b75c0cd1bb | AnyFetch/anyfetch.js,AnyFetch/anyfetch.js | lib/utility/create-subcompany-with-admin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'aux/has-property'\n], function (hasProperty) {\n /**\n * Using the browsers console logging options, allowing to use console.error if accessible otherwise fallsback to\n * console.log (again if accessible).\n ... | javascript | edit | 0 | 4 | mit | 100476c4c6a0c7530b5bf711287aced1d2b46611 | rockabox/Auxilium.js | src/console-logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// nth-child pseudo selector\nModernizr.addTest('nthchild', function(){\n\n return Modernizr.testStyles(\"#modernizr div {width:1px} #modernizr div:nth-child(2n) {width:2px;}\", function (elem) {\n var elems = elem.getElementsByTagN... | javascript | edit | 0 | 3 | mit | c9645f1d6e5c8b6af4709c46c31a11792e87bfc3 | Modernizr/Modernizr,Modernizr/Modernizr | feature-detects/css-nthchild.js | rejected_duplicate | Near-duplicate of sample 99342 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.