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// remove-resource.js\n/*\n Copyright (c) 2011 Talis Inc, Some Rights Reserved\n Licensed under the Apache License, Version 2.0, http://www.apache.org/licenses/LICENSE-2.0\n*/\n\n(function($){\n\n calli.removeResource = function(...
javascript
edit
0
3
apache-2.0
420f6de25d9d6abfa219be5f67d15138058d6a57
jimmccusker/callimachus,jimmccusker/callimachus,edwardsph/callimachus,3-Round-Stones/callimachus,edwardsph/callimachus,edwardsph/callimachus,edwardsph/callimachus,3-Round-Stones/callimachus,edwardsph/callimachus,jimmccusker/callimachus,jimmccusker/callimachus,jimmccusker/callimachus,jimmccusker/callimachus,3-Round-Ston...
webapp/scripts/remove-resource.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Immutable = require('Immutable');\n\nfunction shallowEqualImmutable(objA, objB) {\n if (Immutable.is(objA, objB)) {\n return true;\n }\n var key;\n // Test for A's keys different from B.\n for (key in objA) {\n if (objA.h...
javascript
edit
0
9
mit
594cfcc87f5720c156e5989017836b1102afc9f3
steffenmllr/react-immutable-render-mixin,jurassix/react-immutable-render-mixin
shallowEqualImmutable.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport config from '../config';\n\nexport async function main(req, res) {\n res.json({\n status: 'online',\n user: config.user,\n repo: config.repo\n });\n}\n\n```\n\nApply this change: Print latest-release info in /" }, ...
javascript
edit
0
1
mit
73e3c706a1bb7dd3ad41bf493413498218b32a65
Aluxian/squirrel-updates-server,TakeN0/squirrel-updates-server,arkakkar/electron-update-api
src/controllers/home.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Selector = require('selector_manager/model/Selector');\nconst Selectors = require('selector_manager/model/Selectors');\n\nmodule.exports = {\n run() {\n describe('Selector', () => {\n var obj;\n\n beforeEach(()...
javascript
edit
0
1
bsd-3-clause
056b353fcfa89db060af9037cd03eb164a125280
QuorumDMS/grapesjs,QuorumDMS/grapesjs,artf/grapesjs,artf/grapesjs,artf/grapesjs
test/specs/selector_manager/model/SelectorModels.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\ndescribe('/#/complain', function () {\n protractor.beforeEach.login({ email: '<EMAIL>', password: 'admin123' })\n\n describe('challenge \"uploadSize\"', function () {\n it('should be possible to upload files greater...
javascript
edit
0
1
mit
11e0289ac28efd183456503d6178f00ce46f96d0
m4l1c3/juice-shop,oviroman/disertatieiap2017,m4l1c3/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bonze/juice-shop,m4l1c3/juice-shop,m4l1c3/juice-shop,bkimminich/juice-shop,oviroman/disertatieiap2017,m4l1c3/juice-shop,oviroman/disertatieiap2017,bkimminich/juice-shop,oviroman/disertatieiap2017,bonze/juice-shop,...
test/e2e/complainSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global exports */\n\"use strict\";\n\n// module Debug.Profile\n\nconst _timers = {};\n\nexports.timerStart = function () {\n return process.hrtime();\n}\n\nexports.timerEnd = function (start) {\n return function () {\n var hrTim...
javascript
edit
0
1
mit
5354d30437d83926095c0c30d39a46ca783d17c8
felixSchl/neodoc,felixSchl/neodoc,felixSchl/neodoc
src/Debug/Profile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$.fn.alchemyPageSelect = function(options) {\n var pageTemplate = HandlebarsTemplates.page\n\n this.select2({\n placeholder: options.placeholder,\n minimumInputLength: 3,\n initSelection: function (_$el, callback) {\n if...
javascript
edit
0
2
bsd-3-clause
3d07f1dfbdb988b3c310b9f40b26f216f7cea509
robinboening/alchemy_cms,mamhoff/alchemy_cms,AlchemyCMS/alchemy_cms,AlchemyCMS/alchemy_cms,mamhoff/alchemy_cms,mamhoff/alchemy_cms,robinboening/alchemy_cms,robinboening/alchemy_cms,AlchemyCMS/alchemy_cms
app/assets/javascripts/alchemy/page_select.js
rejected_duplicate
Near-duplicate of sample 89881
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Filters */\nangular.module('myApp.filters').filter('interpolate', function(version) {\n 'use strict';\n\n return function(text) {\n return String(text).replace(/\\%VERSION\\%/mg, version);\n };\n}).filter('percent', f...
javascript
edit
0
2
mit
bb6f6ac51339fe41498a40def9695854d02cfc22
Ecodev/gims,Ecodev/gims,Ecodev/gims,Ecodev/gims,Ecodev/gims
htdocs/js/filter/filters.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env mocha, jest */\n\nimport React from 'react';\nimport { shallow } from 'enzyme';\n\nimport DueDate from '../DueDate';\n\nit('should render', () => {\n shallow(<DueDate />);\n});\nit('should be a <span />', () => {\n const...
javascript
edit
0
1
mit
b4ce0c4e2ea27dbb249c11825b222cc6d6ca3db5
mkermani144/wanna,mkermani144/wanna
desktop/src/Task/__tests__/DueDate.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar chalk = require('chalk');\n\nvar log = function log(value) {\n console.log(value);\n};\n\nlog.green = function(value) {\n console.log(chalk.green(value));\n};\n\nlog.blue = function(value) {\n console.log(chalk.blue(value));\n};\...
javascript
edit
0
1
mit
6edb02c591f4a2992a49af04f4c17395d81afdc6
seanjs-stack/generator-seanjs
app/log.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar func_r = require('./eyebleach_reddit');\nvar func_t = require('./eyebleach_twitter');\nvar conf = require('./config');\n\nfunction postEyeBleach() {\n func_t.postTweet(func_r.getUrl(conf.subreddit)[1], func_r.getUrl(conf.subreddit)...
javascript
edit
0
2
apache-2.0
0769e531875134bfa8f73ad3a523aa159d003838
lolPants/eye-bleach-bot
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { parse } from 'papaparse'\nimport {\n compose, filter, find, flatten, identity,\n join, map, match, not, skip, takeWhile\n} from 'ramda'\n\nconst clean = compose(filter(identity), flatten)\n\nconst dataRegexp = match(RegEx...
javascript
edit
0
2
mit
11972d0e7ba22533f111b7fa6f5f6da55b96966b
peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag
app/static/js/lib/csv.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n* Features a variety of commonly used widgets, including toolbars, text inputs, checkboxes, groups\n* and multiple types of buttons. \n*\n* @namespace onyx \n*/\nmodule.exports.version = \"2.6.0-pre.4.dev\";\n\n```\n\nApply this ch...
javascript
edit
0
0
apache-2.0
df2f4535fd7e21abf049decf2f208729178777f8
enyojs/onyx,enyojs/onyx
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst SVGO = require('svgo');\nconst { getOptions } = require('loader-utils');\nconst { version } = require('vue');\nconst { major } = require('semver')\n\nmodule.exports = async function (svg) {\n const callback = this.async();\n con...
javascript
edit
0
5
mit
5d275983b89b0e78cebd4c41e2bfe5d9deb8f73e
visualfanatic/vue-svg-loader
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar dredge = require('./lib/dredge');\n\n/**\n * @return promise\n * This module makes use of the node-promise API.\n * Operate on the singular data argument passed to a `then` callback, as follows:\n *\n * var dredge = require('dredge'...
javascript
edit
0
1
mit
64bd4d2624d165834fe35ad61873b7e50e2f66da
imgges/dredge
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\n\nvar defaultConfig = {\n database: {\n backend: 'leveldown',\n file: __dirname + '/data/baixs.db'\n },\n etcd: {\n host: 'racktables.hupu.com',\n port: '4001',\n },\n zabbix: {\n url: '',...
javascript
edit
0
1
apache-2.0
38f3b282943e29529b3c90bfc0543087cee22b29
HupuInc/baixs,HupuInc/baixs
config.js
rejected_duplicate
Near-duplicate of sample 74606
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar RedisStore = require('connect-redis');\nvar url = require('url');\nvar envVariables = ['REDIS_SESSION_URI', 'REDIS_URI', 'REDIS_SESSION_URL', 'REDIS_URL', 'REDISTOGO_URL', 'OPENREDIS_URL'];\nvar fallback = 'redis://localhost:6379'\n...
javascript
edit
0
11
mit
4fe002e28296d54889d2e722c2d175c3499e2358
oblador/connect-redis-autoconfig
index.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\n// var path = require('path');\n\nmodule.exports = {\n name: 'ember-power-select',\n\n included: function(app) {\n this._super.included.apply(this, arguments);\n // Don't include the pre...
javascript
edit
0
6
mit
6c31e88b7c97e91073ebea9ef5b3a42566891355
chrisgame/ember-power-select,esbanarango/ember-power-select,cibernox/ember-power-select,Dremora/ember-power-select,esbanarango/ember-power-select,chrisgame/ember-power-select,cibernox/ember-power-select,cibernox/ember-power-select,Dremora/ember-power-select,cibernox/ember-power-select,esbanarango/ember-power-select
index.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-g-map',\n\n included: function(app, parentAddon) {\n var target = (parentAddon || app);\n target.import('vendor/addons.css');\n },\n\n contentFor: fun...
javascript
edit
0
7
mit
d6440b143ea2020d75ac1f9b495c182c176d996e
moeabm/ember-g-map,asennikov/ember-g-map,asennikov/ember-g-map,moeabm/ember-g-map
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'; // eslint-disable-line\n\nconst { default: ImageminPlugin } = require('imagemin-webpack-plugin');\nconst imageminMozjpeg = require('imagemin-mozjpeg');\n\nconst config = require('./config');\n\nmodule.exports = {\n plugin...
javascript
edit
0
0
mit
9dd101f56ce050ff09eddf52a5774b2ca3324e4d
ptrckvzn/sage,ptrckvzn/sage,c50/c50_roots,generoi/sage,NicBeltramelli/sage,ChrisLTD/sage,generoi/sage,NicBeltramelli/sage,NicBeltramelli/sage,ChrisLTD/sage,ChrisLTD/sage,generoi/sage,ptrckvzn/sage,roots/sage,roots/sage,c50/c50_roots,c50/c50_roots,ChrisLTD/sage
resources/assets/build/webpack.config.optimize.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Meatspace = require('./lib/meatspace');\nvar meatspackles = require('./lib/meatspackles')\nvar bots;\n\nfunction setupBots(){\n var meatspaces = [];\n var configs = require('config.json');\n configs = configs instanceof Array\n ...
javascript
edit
0
2
mit
ceec535651850c7162e221a55a9aaa7697f3b3d1
omni5cience/meatspackles,omni5cience/meatspackles
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Assert = require('assert')\nconst FS = require('fs')\n\nconst Winston = require('winston')\n\nconst Factory = require('./lib/factory')\n\nvar exceptionLogger\n\nfunction isString (str) {\n return typeof str === 'string'\n}\n\nmod...
javascript
edit
0
2
mit
63158acb55d1daa498e062319cdf9a0eb1697f37
onmodulus/logger
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nclass HistoryModal extends React.Component {\n\trender() {\n const post = this.props.details['post'];\n const signup = this.props.details['post']['signup'];\n const campaign = this.props.details['c...
javascript
edit
0
1
mit
b4e476c62cce8c9551e3ad5fdc4b0cce7f6a5649
DoSomething/rogue,DoSomething/rogue,DoSomething/rogue
resources/assets/components/HistoryModal/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nMeteor.publish(\"userInfo\", function() {\n\tif(!this.userId) {\n\t\treturn this.ready();\n\t}\n\n\treturn Meteor.users.find(this.userId, {\n\t\tfields: {\n\t\t\t\"admin\": 1,\n\t\t\t\"alive\": 1,\n\t\t\t\"target\": 1,\n\t\t\t\"assassin...
javascript
edit
0
1
mit
9989cb75be3041e7566eafaef21f3fe8160f80ad
DarkAce65/Assassin,DarkAce65/Assassin
server/configuration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Generator = require('generate-js'),\n Joi = require('joi'),\n async = require('async');\n\nvar EndPoint = Generator.generate(function EndPoint(options) {\n var _ = this;\n\n _.defineProperties(options);\n _.debug = fa...
javascript
edit
0
2
mit
06d5c2c828c62994b1bbfe3bc11cfb6bb96a9f7d
Mike96Angelo/EndPoint
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { transformAttributes } from \"../../components/form/dynamic-attributes\";\n\n\nfunction serializeValue(fieldType, value) {\n if(fieldType === 'autocomplete') {\n return !!value ? value.id : value;\n }\n return va...
javascript
edit
0
3
mit
5eb942bf1e9a5e81cd435354f97ff5f197c67936
code16/sharp,code16/sharp,code16/sharp
resources/assets/js/util/form/transform-fields.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar Dropbox = require('dropbox');\nvar options;\n\nvar queue = {};\n\nfunction addToDropboxQueue (message) {\n var user = message.user;\n var fileContent = message.file;\n var fileName = message.fileName;\n var saveOb...
javascript
edit
0
2
mit
e84e598337721ee7a652509a7971f85f418f80e9
jsbin/dropbox-sync
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar promise = require('promises-a');\nvar emitter = require('emitter');\n\nmodule.exports = imgur;\nfunction imgur(apiKey) {\n function upload(file) {\n var def = promise();\n emitter(def.promise);\n\n if (!file || !file.type....
javascript
edit
0
4
mit
7aa12a5804dd49c0d07ec693312a6bc17fe9309e
ForbesLindesay/imsave,ForbesLindesay/imsave
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar AWS = require(\"aws-sdk\");\n\nvar s3 = new AWS.S3({\n accessKeyId: process.env.AWS_KEY,\n secretAccessKey: process.env.AWS_SECRET\n});\n\nvar importer = require(\"./importer\")(s3);\n\nif (!process.env.ELASTICSEARCH_URL) {\n con...
javascript
edit
0
4
mit
af4e4fd193995e307c5a589e811ae5ea8b9772a7
everydayhero/s32es-import
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar map = require('map-async'),\n isStream = require('is-stream'),\n concat = require('concat-stream');\n\n\nmodule.exports = function (tape) {\n var Test = tape.Test;\n\n Object.defineProperty(Test.prototype, '...
javascript
edit
0
3
mit
fdc89d57d69bd9379c615f276fdc6d6885f929ee
eush77/tape-drain
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst path = require('path');\nconst fastbootTransform = require('fastboot-transform');\nconst Funnel = require('broccoli-funnel');\n\nmodule.exports = {\n name: 'ember-cli-intl-tel-input',\n\n included: function(app)...
javascript
edit
0
3
mit
3745a4980a7b59d7568350b61e7e087625f044e9
Socivo/ember-cli-intl-tel-input,Socivo/ember-cli-intl-tel-input
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar server = require('http').createServer()\nvar wr = require('./water_rower.js')({ debug: false} );\nvar ws = require('ws');\nvar url = require('url')\nvar WebSocketServer = ws.Server\nvar wsServer = new WebSocketServer({ server: serve...
javascript
edit
0
1
bsd-3-clause
aa47bf800c355ed9699ea24d2ec67974d9ba18eb
crertel/node-wr,crertel/node-wr
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nfunction exec (command) {\n return require('child_process').execSync(command).toString();\n}\n\nfunction luckyCommit (desiredString) {\n if (!/^[0-9a-f]{1,40}$/.test(desiredString)) {\n throw n...
javascript
edit
0
3
mit
00000006232e1c3c42436af6a7a5258ebd3b6618
not-an-aardvark/lucky-commit,not-an-aardvark/lucky-commit
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * deep-clone\n * @author Garrett Reed <<EMAIL>> 2016\n * MIT Licensed\n *\n * Suports:\n * Primitives: null, string, number, function (inherits prototype)\n * Collections: object, array\n *\n * @param {object} target Receiving ...
javascript
edit
0
7
mit
21b0145783853cbd3d87d937f5c30a14d3a40b77
garrettreed/js-deep-clone
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Obstruct = require('obstruct');\nvar minivents = require('minivents');\nvar createGetter = require('./lib/createGet');\nvar createSetter = require('./lib/createSet');\nvar noop = function () {};\n\nvar Model = Obstruct.extend({\n c...
javascript
edit
0
3
mit
e5e348fb4b3dee12b9200806114f30046f6192ea
allouis/model
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n $('#carousel-example-generic').height($(window).height()-$('#panel-title').height());\n});\n\n$(window).resize(function(){\n $('#carousel-example-generic').height($(window).height()-$('#panel-title').height());\n}...
javascript
edit
0
2
mit
c53da44f60a5e05ad514e6cb2004682d4647c0c0
theghostbel/capture-asteroid,theghostbel/capture-asteroid
cartoon.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path')\nvar readPackage = require('read-closest-package')\nvar fork = require('child_process').fork\n\nmodule.exports = tooler\nfunction tooler (cb) {\n readPackage(function (err, data, file) {\n if (err) return ...
javascript
edit
0
5
mit
a56ac53d7c4b797ed5a6a0c6c5b93ba7b4ba0ed0
Jam3/tooler
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n 'GitHub example testing': function (test) {\n test\n .open('https://github.com')\n .waitForElement('input[name=q]')\n .assert.title().is('GitHub · Build software better, together.', 'GitHub has the correc...
javascript
edit
0
1
mit
096ffb107428424148c50dd4444fb474d9684abe
jorilytter/dalekjs-example
github.js
rejected_duplicate
Near-duplicate of sample 79197
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\n\nexports.compareOutput = function (test) {\n\ttest.expect(2);\n\n\tvar input = fs.readFileSync('tmp/index.html', { encoding: 'utf8' });\n\tvar expected = fs.readFileSync('test/expected/index.html', { encoding: ...
javascript
edit
0
1
mit
7e86f360b0bfab7bf375944712cdd721a86c613e
flyingswan3000/grunt-include-source,flyingswan3000/grunt-include-source,jwvdiermen/grunt-include-source,flyingswan3000/grunt-include-source,jwvdiermen/grunt-include-source,kamilkisiela/grunt-include-source,flyingswan3000/grunt-include-source,jwvdiermen/grunt-include-source,kamilkisiela/grunt-include-source,jwvdiermen/g...
test/html_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['require', 'module', 'jquery', 'underscore', 'backbone', './manifest_item'],\n function (require, module, $, _, Backbone, ManifestItem) {\n\n var SpineItem = ManifestItem.extend({\n\n defaults: {\n ...
javascript
edit
0
1
bsd-3-clause
c6d91477d3a961ccf3a070a8befd6405bfcf1482
looknear/readium-js,readium/readium-js,readium/readium-js,bibliolabs/readium-js,bibliolabs/readium-js,ravn-no/readium-js,ravn-no/readium-js,kivuto/readium-js,looknear/readium-js,kivuto/readium-js
epub-modules/epub/src/models/spine_item.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar element = require('../valid-html-element')\n , randomUniq = require('time-uuid');\n\nmodule.exports = function () {\n\tif (element(this).id) return this.id;\n\treturn (this.id = this.nodeName.toLowerCase() + '-'...
javascript
edit
0
3
mit
06caf2aa629ed5052b2888ee9827300a9fc59302
medikoo/dom-ext
html-element/#/get-id.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * 'timeFormat' formats time into more readable formats.\n */\nconst months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\nconst timeFormat = module.exports = {\n toShortDateTime: function...
javascript
edit
0
2
mit
20d3bcd3e4c9e32d3731a07194823a4d0cf2afba
nus-mtp/worldscope,nus-mtp/worldscope,nus-mtp/worldscope,nus-mtp/worldscope
app_server/public/src/js/modules/utils/dateFormat.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// js/controllers/nw-category-select.controller\n\n(function() {\n \"use strict\";\n\n angular.module(\"NoteWrangler\")\n .controller(\"nwCategorySelectController\", nwCategorySelectController);\n\n nwCategorySelectController.$inj...
javascript
edit
0
1
mit
fa0a10895f3c18758c0ae4dfa774dcc38b38a172
var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training
NoteWrangler/app/js/controllers/nw-category-select.controller.js
rejected_duplicate
Near-duplicate of sample 87781
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst jsonStringify = require('@bugsnag/safe-json-stringify')\nconst filterPaths = [\n // report\n 'events.[].app',\n 'events.[].metaData',\n 'events.[].user',\n 'events.[].breadcrumbs',\n 'events.[].request',\n 'events.[].device...
javascript
edit
0
3
mit
39d5cfb7f959f9bd650b528c1b87089fd1de3557
bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js
packages/core/lib/json-payload.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nconst { getGuildString } = require('../../locales.js');\nconst music = require('../../music.js');\n\nmodule.exports = {\n variants: ['leave', 'lv'],\n usage: 'lv',\n async action(message, arg) {\n const l = getGuildString(messag...
javascript
edit
0
4
mit
703b67fe44f844f9e2e90a18638f17a7fef38dc3
GoBJIuH/NullBot
src/commands/music/leave.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require jquery\n//= require spice-html5-bower\n//= require_tree ../locale\n//= require gettext/all\n\n$(function() {\n var host = window.location.hostname;\n var encrypt = window.location.protocol === 'https:';\n var port = encry...
javascript
edit
0
3
apache-2.0
ced6cf896248728464309d09d129969eb095d7be
ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic
app/assets/javascripts/remote_consoles/spice.js
rejected_duplicate
Near-duplicate of sample 93618
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {createAction} from 'redux-actions';\nimport values from 'lodash/values';\nimport {UnitActions, SearchActions} from './constants';\nimport {Action} from '../common/constants';\nimport {ApiResponse, UnitServices} from './constants...
javascript
edit
null
null
mit
be043fb25ee3a6b37158c313fa140d0f5e4e44a2
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\n//= require ./store\n//= require_tree ./mixins\n//= require_tree ./models\n//= require_tree ./controllers\n//= require_tree ./views\n//= require_tree ./helpers\n//= require_tree ./templates\n//= require ./router.js.coffee\n//= require_t...
javascript
edit
0
0
mit
41392b8055a0813ddc1bf7dc7e8eb3d3cdf5f978
volontariat/voluntary_ranking,volontariat/voluntary_ranking,volontariat/voluntary_ranking
app/assets/javascripts/voluntary_ranking/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Module imports.\nconst mongoose = require('mongoose');\nconst Guid = require('guid');\n\nconst Schema = mongoose.Schema;\n\n// Mongoose schema for bills. Pretty self explanatory.\nconst BillSchema = new Schema({\n bid: {\n type: ...
javascript
edit
0
0
mit
a706c5cafbe72362dacc91c567c9cda016fe39b1
hannupekka/splitthebill,hannupekka/yabsa,hannupekka/yabsa,hannupekka/splitthebill,hannupekka/yabsa
server/models/bill.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { spawn } = require('child_process')\n\nmodule.exports = {\n onPreBuild({ utils: { status: { show } } }) {\n spawn('sleep', ['60'], { detached: true })\n show({ summary: 'Test' })\n }\n}\n\n```\n\nApply this change: Revert...
javascript
edit
0
1
apache-2.0
59eec97713488c95c2e8869e8b73ce0d0eab09bb
ehmicky/cv-website,ehmicky/cv-website
plugin.js
rejected_duplicate
Near-duplicate of sample 80096
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Discord = require('discord.js')\nconst Feed = require('../structs/db/Feed.js')\nconst createLogger = require('../util/logger/create.js')\nconst maintenance = require('../maintenance/index.js')\n\nmodule.exports = async (oldChannel...
javascript
edit
0
10
mit
41004830f6fe4fd2fa6e0752688564fcfe04012f
synzen/Discord.RSS,synzen/Discord.RSS
src/events/channelUpdate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Staccato = require('staccato')\nvar cadence = require('cadence')\n\nmodule.exports = cadence(function (async, syslog, input, output) {\n var loop = async(function () {\n async(function () {\n input.read(async())...
javascript
edit
0
2
mit
825a921412c7d94fc21e4adf97f369ffaa95b74d
bigeasy/wafer
parse.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n /* ngInject */\n function PeopleTabController($log, ACSAggregate, ACSVariables) {\n var ctl = this;\n\n initialize();\n\n function initialize() {\n ctl.acsVaria...
javascript
edit
0
4
apache-2.0
d7796e4982834b312df1ad29fd21127cc5714f03
MuseumStat/imls-museum-data,azavea/imls-museum-data,azavea/imls-museum-data,azavea/imls-museum-data,MuseumStat/imls-museum-data,MuseumStat/imls-museum-data
app/scripts/views/museum/tab-people-directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// >>> PUBLIC <<<\n\nmodule.exports = (moduleName) => (type, val) => {\n const tag = Object.prototype.toString.call(val);\n if (`[object ${type}]` !== tag) {\n throw new TypeError(`${moduleName}: expected [${type}] but got ${tag}]`...
javascript
edit
0
3
mit
ae62db02f22123cb9775a07b012c7980f3cfc9f9
snovakovic/js-flock
src/internals/assertType.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport lodash from 'lodash';\n\nimport refractToComponentsMap from 'refractToComponentMap';\n\nimport theme from 'theme';\n\nclass Attribute extends React.Component {\n static propTypes = {\n theme: React...
javascript
edit
0
3
mit
6e8f66b10326794ac86d14095d2a74dc3ef8d8ee
apiaryio/attributes-kit,apiaryio/attributes-kit,apiaryio/attributes-kit
src/Attribute/Attribute.js
rejected_duplicate
Near-duplicate of sample 85141
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ngoog.module('ngeo.olcs.Manager');\ngoog.module.declareLegacyNamespace();\n\ngoog.require('olcs.contrib.Manager');\n\nconst Manager = class extends olcs.contrib.Manager {\n /**\n * @override\n */\n constructor() {\n super(...arg...
javascript
edit
0
1
mit
0d0177c8a1884e25b8405a222e3a1c404d13fdf1
camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,adube/ngeo,camptocamp/ngeo,adube/ngeo,adube/ngeo,camptocamp/ngeo,adube/ngeo
src/modules/olcs/Manager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar currentTimeout;\nfunction actionWrapper(searchAction){\n return function(){\n const DEFAULT_TIMEOUT = 5000;\n var context = this;\n var args = arguments;\n if(currentTimeout){\n //Cancel previous search action.\n ...
javascript
edit
0
3
mit
7ebd422c17938d2429dae428ad82835a0a6872ab
Jerom138/focus-components,Ephrame/focus-components,sebez/focus-components,JRLK/focus-components,Ephrame/focus-components,KleeGroup/focus-components,asimsir/focus-components,Jerom138/focus-components,anisgh/focus-components,get-focus/focus-components,JabX/focus-components,sebez/focus-components,JRLK/focus-components,Jab...
page/search/search-header/action-wrapper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport path from 'path';\nimport express, { Router } from 'express';\nimport serveIndex from 'serve-index';\nimport winston from 'winston';\nimport expressWinston from 'express-winston';\nimport basicauth from 'basicauth-mid...
javascript
edit
null
null
mit
1e345f9fb9af2370f556cb02b42799a17547958c
KarolAltamirano/node-express-boilerplate
src/routes/appLogs.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar TaskList = require('../POMs/TasksList.js');\n\ndescribe('Check that task name can be updated', function() {\n\n beforeAll(function() {\n TaskList.actionsBeforeAll();\n });\n\n it('Adding new task', function() ...
javascript
edit
0
1
mit
cb11593663bf6e1aecc63ac870c86674910d7d2c
MitocGroup/deep-microservices-todomvc,MitocGroup/deep-microservices-todo-app,MitocGroup/deep-microservices-todo-app,MitocGroup/deep-microservices-todomvc,MitocGroup/deep-microservices-todomvc,MitocGroup/deep-microservices-todo-app,MitocGroup/deep-microservices-todomvc
src/deep-todo/tests/e2e/Tests/TaskEditing.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Fs = require('fs');\n\nconst Hoek = require('hoek');\nconst Thurston = require('thurston');\nconst Items = require('items');\nconst Some = require('lodash.some');\n\nconst internals = {\n defaults: {\n p...
javascript
edit
0
2
bsd-3-clause
052c44a00c56987cb8e834ce933741fa7d5a6bfb
ruiquelhas/lafayette
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @file Defines the provider settings.\n *\n * Will set the path to Mongo, and applications id\n * Most of the configuration can be done using system environment variables.\n */\n\n// Load environment variables from .env file\nvar...
javascript
edit
0
0
mit
1b78ca46a9a2c27e9a72f0723e945bf51ecbf00c
AnyFetch/gcontacts-provider.anyfetch.com
config/configuration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* global Connector */\n\nConnector.playerSelector = '#page_sidebar';\n\nConnector.getArtist = function() {\n\tvar artists = $.map($('.player-track-artist').children(), function(artist) {\n\t\treturn $.text(artist);\n\t...
javascript
edit
0
1
mit
a1049762936328d99385db4766571cd81c2e8e43
usdivad/web-scrobbler,inverse/web-scrobbler,ex47/web-scrobbler,galeksandrp/web-scrobbler,alexesprit/web-scrobbler,alexesprit/web-scrobbler,david-sabata/web-scrobbler,usdivad/web-scrobbler,carpet-berlin/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,ex47/web-scrobbler,Paszt/web-scrobbler,inverse/web-scrobbler,carpet-be...
connectors/v2/deezer.js
rejected_duplicate
Near-duplicate of sample 68012
true
[ { "role": "user", "content": "Write javascript code for the following: Update the minified version of the dynamic options handling plugin." }, { "role": "assistant", "content": "(function(a){a.fn.dynamicoptions=function(g){var b=a.extend({},g);return this.each(function(){var e=function(c){field=...
javascript
new_file
0
2
apache-2.0
3f1f5fdcc9db9ae1570121d5ab97f8191e9549fa
rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son
app/soc/content/js.min/melange.dynamicoptions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst yargs = require('yargs');\n\nif (yargs.argv.network == 'ropsten' || yargs.argv.network == 'mainnet') {\n var providerURL = `https://${yargs.argv.network}.infura.io`\n var HDWalletProvider = require('truffle-hdwallet-provider')...
javascript
edit
0
0
mit
262b3d6b40a995d2633dffe6db00b5ef41ed6349
makoto/blockparty,makoto/blockparty
truffle.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nconst co = require('co');\nconst { Game, ReadlineInterface } = require('../');\nconst path = require('path');\n\nconst args = process.argv.slice(2);\n\nfunction *loadGame(pathArgIndex)\n{\n\tconst t...
javascript
edit
0
4
mit
a872aaeac83bfd6db32c11da040e7c16a636aa6e
returnString/etholow
bin/etholow.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @fileoverview Run the bootstrap service\n */\n\nvar port = 3020,\n system = require('system'),\n page = require('webpage').create(),\n serverObj = require('./server').create(port),\n util = require('./util'),\n mo...
javascript
edit
0
2
mit
fddaf3a097cbff3b1cb36191f099ec07dc85b844
Livefyre/lfbshtml,Livefyre/lfbshtml,Livefyre/lfbshtml
src/phantom/bootstrapper.js
rejected_duplicate
Near-duplicate of sample 81496
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Highlight source code\nhljs.initHighlightingOnLoad();\n\n// Enable all tooltips by default\n$('a[data-toggle=\"tooltip\"]').tooltip();\n\n\n```\n\nApply this change: Add inline preview of thumbnails" }, { "role": "assistant",...
javascript
edit
0
3
mit
e9bd61ec7a2f308c5f9ce3ec41d2acc7a8e06c1c
Turistforeningen/www.nasjonalturbase.no,Turistforeningen/www.nasjonalturbase.no
js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// Blank the document so the 404 page doesn't show up visibly.\ndocument.documentElement.style.display = 'none';\n\n// Can't use DOMContentLoaded, calling document.write or document.close inside it from\n// inside an ...
javascript
edit
0
3
bsd-3-clause
a6b43e831557618fe3aa07b47384dfaa7a02db31
esprehn/chromium-codereview,esprehn/chromium-codereview
ui/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function(require) {\n\n var test = require('../../test')\n var assert = test.assert\n\n\n assert(seajs.log('seajs.log test', 'group') === undefined, 'group')\n\n assert(seajs.log('a') === undefined, 'log')\n assert(seajs.log...
javascript
edit
0
1
mit
2a13367651fb5add49b7b4010a166667183f6ce3
kaijiemo/seajs,13693100472/seajs,moccen/seajs,imcys/seajs,AlvinWei1024/seajs,longze/seajs,coolyhx/seajs,JeffLi1993/seajs,zaoli/seajs,lee-my/seajs,angelLYK/seajs,chinakids/seajs,chinakids/seajs,Lyfme/seajs,yuhualingfeng/seajs,kaijiemo/seajs,treejames/seajs,uestcNaldo/seajs,PUSEN/seajs,evilemon/seajs,zwh6611/seajs,PUSEN/...
tests/specs/util/log.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * L.Control.GeoSearch - search for an address and zoom to it's location\n * L.GeoSearch.Provider.OpenStreetMap uses openstreetmap geocoding service\n * https://github.com/smeijer/L.GeoSearch\n */\n\nL.GeoSearch.Provider.OpenStreet...
javascript
edit
0
3
mit
e6d7a5f3bc8fb03249b579ec21da16e494760737
smeijer/L.GeoSearch,maettyhawk/leaflet-geosearch,smeijer/leaflet-geosearch,smeijer/leaflet-geosearch,fredrikekelund/L.GeoSearch,fredrikekelund/L.GeoSearch,ville6000/leaflet-geosearch,smeijer/L.GeoSearch
src/js/l.geosearch.provider.openstreetmap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconsole.log('lord');\nvar express = require('express');\n\nconsole.log('hey');\nvar app = express();\n\nconsole.log('ok');\n\napp.get('/', function(req, res){\n\tconsole.log('yay', res.render)\n res.send('Hello World');\n});\n\napp.lis...
javascript
edit
0
1
apache-2.0
389ba577488c643d0c5b7cd3504a02c084aa03b7
tessel/t1-runtime,tessel/t1-runtime,tessel/t1-runtime,tessel/t1-runtime,tessel/t1-runtime
test/express/test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require('util');\n\n\nvar APIError = function(name, message, status, requestInfo, originalError){\n this.name = name || this.constructor.name || this.constructor.prototype.name || '';\n this.message = message || '';\n this...
javascript
edit
0
8
mit
45e231624d6772984b9443cdcfc9c9905d8b17d8
ngonzalvez/rest-facade,ngonzalvez/rest-orm
src/exceptions/APIError.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar SoftAPSetup = require('../index');\nvar sap = new SoftAPSetup();\n\nconsole.log(\"Requesting public key...\");\nsap.publicKey(configure);\n\nfunction configure(err, dat) {\n\n\tif(err) { throw err; }\n\tconsole.log(\"Received public...
javascript
edit
0
2
apache-2.0
176c60b166d6fd4add0c662f7e9d3f2c84c7ee4a
spark/softap-setup-js
test/basic-example.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n'use strict';\n\nvar path = require('path');\nvar webpack = require('webpack');\nvar HtmlWebpackPlugin = require('html-webpack-plugin');\nvar ExtractTextPlugin = require(\"extract-text-webpack-plugin\");\n\n\nmodule.exports = {\n\n ...
javascript
edit
0
0
mit
b5ed43661e2873a0a3c80683eee487a4142b1989
ga92yup/chronos-frontend,ga92yup/chronos-frontend
webpack.config.js
rejected_duplicate
Near-duplicate of sample 92840
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport UnauthenticatedRouteMixin from 'ember-simple-auth/mixins/unauthenticated-route-mixin';\n\nexport default Ember.Route.extend(UnauthenticatedRouteMixin);\n\n```\n\nApply this change: Create a user record...
javascript
edit
0
1
bsd-2-clause
30af243b156565a251b74fffcd290374de4aeb31
mblayman/lcp,mblayman/lcp,mblayman/lcp
client/app/login/route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Orbit from '../../src';\nimport { Promise } from 'rsvp';\n\nOrbit.Promise = Promise;\n\nOrbit.pluralize = function(original) {\n return original.match(/s$/) ? original : original + 's';\n};\n\nOrbit.singularize = function(origin...
javascript
edit
0
0
mit
88d035aa69b6cdaa9190a1b7174155cc89cc250c
jpvanhal/orbit-core,SmuliS/orbit.js,orbitjs/orbit.js,jpvanhal/orbit.js,orbitjs/orbit-core,orbitjs/orbit.js,SmuliS/orbit.js,jpvanhal/orbit.js,jpvanhal/orbit-core
test/support/orbit-setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nRocketChat.Migrations.add({\n\tversion: 96,\n\tup() {\n\t\tconst query = {\n\t\t\t$or: [{\n\t\t\t\t's3.path': {\n\t\t\t\t\t$exists: true\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\t'googleCloudStorage.path': {\n\t\t\t\t\t$exists: true\n\t\t\t\t}\n\...
javascript
edit
0
2
mit
7b5d45ddca83ae2e3dd97f5da270c885496a75a4
inoio/Rocket.Chat,pitamar/Rocket.Chat,cnash/Rocket.Chat,nishimaki10/Rocket.Chat,Kiran-Rao/Rocket.Chat,flaviogrossi/Rocket.Chat,flaviogrossi/Rocket.Chat,trt15-ssci-organization/Rocket.Chat,Kiran-Rao/Rocket.Chat,cnash/Rocket.Chat,pkgodara/Rocket.Chat,fatihwk/Rocket.Chat,mrinaldhar/Rocket.Chat,VoiSmart/Rocket.Chat,mrinald...
server/startup/migrations/v096.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @category Internal\n * @param {*} val The object to test.\n * @return {boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * isArray([...
javascript
edit
0
3
mit
f19626d3e55b842029497370fbea8ba31e994525
markprzepiora/eigensheep,markprzepiora/eigensheep,markprzepiora/eigensheep
src/internal/is_array.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst merge = require('webpack-merge');\nconst path = require('path');\nconst webpack = require('webpack');\n\nconst common = {\n entry: './src/index.js',\n output: {\n library: 'wargamer',\n libraryTa...
javascript
edit
0
3
mit
f46d7e1417df33a1998ae3b11787bd92734fa7f7
hkwu/wargamer
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst commonConfig = require('./webpack.common');\nconst path = require('path');\nconst Webpack = require('webpack');\n\nconst { version } = require('./package.json');\n\nmodule.exports = Object.assign(commonConfig, {\n entry: './src/m...
javascript
edit
0
0
mit
1b31337b27ca6c7423964420c0678d45637aba57
jeremyckahn/rekapi,jeremyckahn/rekapi
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar webpack = require('webpack');\nvar configFile = require('./settings/config.json');\n\nmodule.exports = {\n entry: [\n path.resolve(__dirname, 'app/main.js')\n ],\n output: {\n path: ...
javascript
edit
0
0
isc
13494bcf2d1bec673a22e9b525fe9d9293177753
klpdotorg/tada-frontend,klpdotorg/tada-frontend,klpdotorg/tada-frontend
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* See license.txt for terms of usage */\n\ndefine([], function() {\n\n// ********************************************************************************************* //\n// Firebug Trace - FBTrace\n\nvar scope = {};\n\ntry\n{\n Com...
javascript
edit
0
2
bsd-3-clause
622dd5b461e8e59891d04200b556ac83ffa4426f
firebug/tracing-console,firebug/tracing-console
extension/content/firebug/lib/trace.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar MongoClient = require('mongodb').MongoClient;\n\nvar config = require('../front/config.json');\n\nMongoClient.connect(config.mongodb, function(err, db) {\n if (err) { \n throw new Error(err);\n ...
javascript
edit
0
2
mit
c7af19b55adae2dc7b0c83e64c56457772e4e794
tlksio/db
backup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// app.shoppingList1.controller.js\n\n(function() {\n \"use strict\";\n\n angular.module(\"ShoppingList\")\n .controller(\"ShoppingList1Controller\", ShoppingList1Controller);\n\n ShoppingList1Controller.$inject = [\"ShoppingListF...
javascript
edit
0
1
mit
40be8a6bfa429b02bdbecf5b67339667a36fed1c
var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training
SPAWithAngularJS/module4/modules/src/shoppingList/app.shoppingList.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { readAsArrayBuffer } from 'pouchdb-binary-utils';\n\nexport function bufferToHexString(buffer) {\n const hexCodes = [];\n const view = new DataView(buffer);\n\n for (let i = 0; i < view.byteLength; i += 4) {\n //...
javascript
edit
0
8
apache-2.0
e6c1ec600ad294afa104e4dcb62109316c1df053
explorigin/portfolio,explorigin/portfolio
packages/gallery/src/utils/conversion.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst duration = require('@maxdome/duration');\nconst Throttle = require('redis-throttle');\n\nmodule.exports = config => {\n Throttle.configure(config);\n return (key, limit, callback) => {\n let span = '1 second';\n if (typeof...
javascript
edit
0
4
mit
7a3e6a6ada3a6ecd902eb91d2a50e2ee8679c4a7
sharaal/dnode,sharaal/dnode
packages/throttle/index.js
rejected_duplicate
Near-duplicate of sample 85490
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\nvar bodyParser = require('body-parser');\n\napp.set('port', (process.env.PORT || 5000));\napp.use(bodyParser.json());\n\napp.get('/', function(req, res) {\n\tres.send('DC Metro Ap...
javascript
edit
0
2
mit
9699cb15058049af973969eee7fe5c36bc4e0837
pmyers88/dc-metro-echo
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar EngineIO = require(\"engine.io\")\nvar EventEmitter = require(\"events\").EventEmitter\n\nvar EngineStream = require(\"./eiostream\")\n\nmodule.exports = EngineServer\n\nfunction EngineServer(onConnection) {\n var engine = new Ev...
javascript
edit
0
3
mit
4fe2f08611213ed32eb80d377b0243c28c48995c
Raynos/engine.io-stream,Raynos/engine.io-stream
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(){\n colors = ['#eeeeee', '#d6e685', '#8cc665', '#44a340', '#1e6823'];\n days = document.getElementsByClassName('day');\n Array.prototype.forEach.call(days, function(element) {\n element.addEventListener('click', functio...
javascript
edit
0
5
mit
1a7ad0dfa0065b3eac2004354bc4752590d8fc1b
ueokande/github-pseudo-contributions,iBenza/github-pseudo-contributions
script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for ...
javascript
edit
0
3
mit
a741084589d05964498bed23b193825458916c86
the-ress/vscode,stringham/vscode,microlv/vscode,0xmohit/vscode,Krzysztof-Cieslak/vscode,Krzysztof-Cieslak/vscode,stringham/vscode,mjbvz/vscode,Krzysztof-Cieslak/vscode,landonepps/vscode,Microsoft/vscode,Microsoft/vscode,mjbvz/vscode,microlv/vscode,stringham/vscode,hoovercj/vscode,DustinCampbell/vscode,cleidigh/vscode,h...
build/npm/postinstall.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport './styles/App.css';\nimport TravelObject from './components/TravelObject'\n\nclass App extends React.Component {\n render () {\n return(\n <div className=\"App\">\n <TravelObject type=\...
javascript
edit
0
2
apache-2.0
396bc01ebfe0c67922c55165a01286eb0b0e611a
googleinterns/step98-2020,googleinterns/step98-2020
step-capstone/src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from \"react\"\nimport { PropTypes } from \"react\"\nimport Helmet from \"react-helmet\"\n\nimport Header from \"Header\"\nimport Footer from \"Footer\"\nimport GoogleAnalyticsTracker from \"GoogleAnalyticsTr...
javascript
edit
0
1
mit
d1c3b39ba59f5430ed9d971d10bae2707018497d
putaindecode/putaindecode.fr,revolunet/putaindecode.fr,putaindecode/putaindecode.fr,revolunet/putaindecode.fr,putaindecode/putaindecode.io,revolunet/putaindecode.fr,putaindecode/putaindecode.fr
web_modules/Layout/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\n\ngulp.task('default', function() {\n gulp.src('css/*.css')\n .pipe(concat('app.min.css'))\n .pipe(gulp.dest('dist/'));\n});\n\n// TODO: I was in the middle of setting up Gulp and Sass, but ...
javascript
edit
0
1
mit
d78467b5fa4785dea196e8b927362e1b811087ef
karuto/project-squirrel,karuto/project-squirrel
Gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { XMLSchema } from 'substance'\nimport SheetSchemaData from '../../tmp/SheetSchema.data'\n\nconst SheetSchema = XMLSchema.fromJSON(SheetSchemaData)\n\n// TODO: this should come from compilation\nSheetSchema.getName = function() {...
javascript
edit
0
1
apache-2.0
d15234738742f73907618d1c23b55c0058b6b2ad
stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila
src/sheet/SheetSchema.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar concat = require('gulp-concat');\nvar uglify = require('gulp-uglify');\nvar rename = require('gulp-rename');\nvar template = require('gulp-template');\nvar KarmaServer = require('karma').Server;\n\nvar b...
javascript
edit
0
1
mit
3c219f195a865c26086c462f29db298014c56caf
dvberkel/LaunchpadJS
Gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([], function () {\n /**\n * A loader for Javascript <script/> tags\n */\n function LoadScript () {\n\n var script, head,\n onLoadHandler,\n $this = this,\n done = false;\n\n ...
javascript
edit
0
5
mit
5d7177bb09a396ae7604a1facd43077bd512e1a1
rockabox/Auxilium.js
src/utils/load-script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nbeforeEach(function() {\n this.addMatchers({\n toBeLessThan: function(expected) {\n return this.actual < expected;\n },\n toHaveAllValuesInRange: function (low, high) {\n for (var idx = 0; idx < this.actual.length;...
javascript
edit
0
4
mit
9dd99f675430fe26874953b97ac2f5f5ab62a55d
sbnb/capensis-steganography
tests/spec/SpecHelper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//Dependencies.\nvar CoreStore = require('../CoreStore');\nvar buildDefinition = require('./definition');\n/**\n * Class standing for the reference store.\n */\nclass ReferenceStore extends CoreStore {\n constructor(conf){\n conf = ...
javascript
edit
0
3
mit
c29070dc37fb4e289058777d1b13b35f8afa6b4c
Jerom138/focus,Jerom138/focus,Jerom138/focus,KleeGroup/focus-core
store/reference/store.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'underscore';\nimport {Configuration} from './Configuration';\nimport {EntryMetadataConfiguration} from './EntryMetadataConfiguration';\n\nexport const EntryMetadata = Configuration.extend({\n modelName: 'entry',\n i18nK...
javascript
edit
0
2
mit
73a1a4d7744459ddf684c0e41ea215473e73be2f
tf/pageflow,tf/pageflow,codevise/pageflow,codevise/pageflow,tf/pageflow,codevise/pageflow,codevise/pageflow,tf/pageflow
package/src/editor/models/EntryMetadata.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports = module.exports = function(serializeClientCb, deserializeClientCb, s) {\n var StateStore = require('../lib/txn/state');\n \n var store = new StateStore(s);\n store.serializeClient(serializeClientCb);\n store.deserializeCli...
javascript
edit
0
1
mit
540b751209b01c2bc781cd9eb38dcabce005f8d4
authnomicon/nodex-aaa-oauth2
xom/transactionstore.js
accepted
null
true