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'use strict';\nvar gulp = require('gulp');\n\nexports.css = function() {\n gulp.watch('./app/**/*.css', ['autoprefix']);\n};\n\nexports.copy = function() {\n gulp.watch('./app/**/*.html', ['copy']);\n};\n\nexports.js = function() {\n ...
javascript
edit
0
1
mit
5d07a09b4d5c72eca8564dd30bcd5f2f2a4bb6f0
dasilvacontin/animus,formap/animus
tasks/watch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n\nfunction descend(path, o) {\n var step = path.shift();\n\n if (typeof(o[step]) === \"undefined\") {\n throw new Error(\"Broken descend path\");\n }\n\n while (path.length > 0) {\n if (typeof(o...
javascript
edit
0
4
mit
cadc5ff5d1060a77cb00d90f1eb4d0cff81c0d14
nikcorg/extract
extract.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst aws = require('aws-sdk');\n\nconst app = express();\nconst port = process.env.PORT || 3000;\nconst bucket = process.env.S3_BUCKET;\n\napp.use(express.static('./public'));\n\n\napp.listen(port);...
javascript
edit
0
2
mit
1bcffdea0361b75307330351722a1fa48c6e758e
bkilrain/FamilyPhotoShare,bkilrain/FamilyPhotoShare
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nvar meow = require('meow');\nvar chalk = require('chalk');\nvar updateNotifier = require('update-notifier');\nvar quote = require('./index.js');\nvar pkg = require('./package.json');\n\nvar cli = me...
javascript
edit
0
2
mit
ad6472393c023af674fbd547f51c0473ee2cd8e2
riyadhalnur/quote-cli
cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'templates:tabs',\n summary: 'Reactive tabbed interfaces compatible with routing.',\n version: '2.2.1',\n git: 'https://github.com/meteortemplates/tabs.git'\n});\n\nPackage.onUse(function(api) {\n api.ver...
javascript
edit
0
1
mit
f641be737b0aa7033aab09cc61a9ebcf168bb20f
meteortemplates/tabs,meteortemplates/tabs
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Pokeio = require('./poke.io')\n\nPokeio.playerInfo.latitude = 62.0395926\nPokeio.playerInfo.longitude = 14.0266575\n\nPokeio.GetLocation(function(loc) {\n console.log('[i] Current location: ' + loc)\n});\n\nPokeio.GetAccessToken(...
javascript
edit
0
3
mit
dc160773cb01bb87a14000335e72d5d40250be03
Tolia/Pokemon-GO-node-api,dddicillo/IBM-Dublin-PokeTracker,Armax/Pokemon-GO-node-api
example.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar client = require('../dist/client.js');\n\ndescribe('A suite', function () {\n it('contains spec with an expectation', function () {\n expect(true).toBe(true);\n });\n});\n\n```\n\nApply this change: Test if function update is d...
javascript
edit
0
1
mit
ef34b55bcca9a136f1c00a4112e2011f5279ccf1
klambycom/diffsync,klambycom/diffsync,klambycom/diffsync
test/client_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar tape = require(\"tape\"),\n jsdom = require(\"jsdom\"),\n d3 = Object.assign(require(\"../\"), require(\"d3-selection\"));\n\n/*************************************\n ************ Components *************\n *******************...
javascript
edit
0
3
bsd-3-clause
97d944bbcd6da304f51ed921707233e94f0e9e3c
curran/d3-component
test/create-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst path = require('path');\n\nconst mocksPath = path.join(__dirname, 'mocks');\n\nmodule.exports = {\n computationPath: path.resolve(__dirname, '../src/index.js'),\n local: [\n {\n files: [\n {\n ...
javascript
edit
0
0
mit
232e8435d70c41c0a56d82b853e9f7e0710a8ee8
MRN-Code/decentralized-single-shot-ridge-regression
test/declaration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Eliza = require('./lib/eliza');\nvar eliza = new Eliza();\n\neliza.memSize = 500;\n\nvar initial = eliza.getInitial();\n\nmodule.exports = {\n conversation: 'You can @mention me in a channel (or DM me) and I\\'ll start a conversati...
javascript
edit
0
1
mit
378538acadeca08f3efd885699e0d2f8ef0b34db
martindale/snarl-eliza
eliza.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.addEventListener('load', function(){\n\n module('touchstart');\n\n test('should use touchstart when touchstart is supported', function() {\n assert({ listener:'touchstart', receives:'touchstart' });\n });\n\n test('should ...
javascript
edit
0
1
mit
253564d368e32bec0507d8959be82f1b15a27e42
mwbrooks/thumbs.js,pyrinelaw/thumbs.js,pyrinelaw/thumbs.js
test/thumbs_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport assert from \"power-assert\";\nimport Component from \"../src/Component\";\nimport * as property from \"../src/property\";\n\ndescribe(\"property\", () => {\n describe(\".bind\", () => {\n const c1 = new Component();\n pro...
javascript
edit
0
1
mit
969a640cac2e979a50f1837624023be7d90030d2
seanchas116/konomi
packages/konomi/test/propertyTest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {exec} = require('child_process')\n\nconst Command = exports.Command = require('./command')\nconst Response = exports.Response = require('./response')\nconst Controller = exports.Controller = require('./controller')\n\n// System p...
javascript
edit
0
4
mit
fb614d14fff4d9d0fdd4abdd56881553ebe49ecf
yishn/Goban,yishn/Sabaki,yishn/Sabaki,yishn/Goban
modules/gtp/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar test = require(\"tape\")\nvar h = require(\"hyperscript\")\n\nvar FormData = require(\"../index\")\n\ntest(\"FormData works with <select> elements\", function (assert) {\n var elements = {\n foo: h(\"select\", [\n ...
javascript
edit
0
1
mit
54498cb23b8b3e50e9dad44cbd8509916e917ae3
Raynos/form-data-set
test/select.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).on('ajaxComplete ready', function () {\n\n // Initialize inputs\n $('input[data-provides=\"anomaly.field_type.datetime\"]:not([data-initialized])').each(function () {\n\n var $this = $(this);\n var inputM...
javascript
edit
0
2
mit
2dc0f2b8842af35ab001f765f95b0d237e361efe
anomalylabs/datetime-field_type,anomalylabs/datetime-field_type
resources/js/picker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function () {\n\n 'use strict';\n\n var env = {};\n\n env.getEnvironment = function (callback) {\n // FIXME: we assume this code runs on the same thread as the\n // javascript executed from sugar-toolkit-gt...
javascript
edit
0
3
apache-2.0
b2f43f2406835f8a1b1858966abbf36d1f0afe2d
sugarlabs/sugar-web,godiard/sugar-web
env.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar exec = require('child_process').exec\n\n// check that they've commited changes\n\nexec('git status', function(err, stdout, stdrr) {\n var show = stdout.trim()\n \n if (show.match(\"nothing to commit\")) {\n...
javascript
edit
0
3
bsd-2-clause
6c4bad448fdc3753e24ab74824f7ed00e714c489
aijiekj/git-it,pushnoy100500/git-it,strider99/git-it,ubergrafik/git-it,anilmainali/git-it,thenaughtychild/git-it,itha92/git-it-1,jlord/git-it,seenaomi/git-it,strider99/git-it,thenaughtychild/git-it,pushnoy100500/git-it,gjbianco/git-it,jlord/git-it,AkimSolovyov/git-it,gjbianco/git-it,hicksca/git-it,aijiekj/git-it,anilma...
problems/commit_to_it/verify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nvar dateCreated = new Date();\n\nvar meta = {\n title: 'The Linux Command Line',\n authors: 'Zach Janicki',\n dateCreated: dateCreated,\n abstract: \"This is a sample usage of the MFR on the pre...
javascript
edit
0
1
apache-2.0
d4156a3af771cd57da3f7719e9afb4c92b327e21
pattisdr/ember-preprints,hmoco/ember-preprints,pattisdr/ember-preprints,laurenrevere/ember-preprints,CenterForOpenScience/ember-preprints,laurenrevere/ember-preprints,hmoco/ember-preprints,caneruguz/ember-preprints,baylee-d/ember-preprints,caneruguz/ember-preprints,CenterForOpenScience/ember-preprints,baylee-d/ember-pr...
app/routes/preprints.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n version: '1.1.0',\n summary: 'Meteor bundle analysis and visualization.',\n documentation: 'README.md',\n});\n\nNpm.depends({\n \"d3-selection\": \"1.0.5\",\n \"d3-shape\": \"1.0.6\",\n \"d3-hierarchy\": \"1.1...
javascript
edit
0
1
mit
8e39fd7762d1ccebd5647d96aaf7eeb30b6f1bbc
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
packages/non-core/bundle-visualizer/package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar wompt = require(\"../includes\"),\nmongoose = wompt.mongoose,\nObjectId = mongoose.Schema.ObjectId;\n\nvar AccountStats = new mongoose.Schema({\n\taccount_id : {type: ObjectId, index: true}\n\t,frequency : String\n\t...
javascript
edit
0
0
mit
f32ed63a71a9d3b57061830d4f6de470bbe76fd9
iFixit/wompt.com,iFixit/wompt.com,Wompt/wompt.com,iFixit/wompt.com,iFixit/wompt.com,Wompt/wompt.com,Wompt/wompt.com
nodejs/lib/models/account_stats.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* https://github.com/angular/protractor/blob/master/docs/toc.md */\n\ndescribe('my app', function() {\n\n browser.get('index.html');\n\n it('should automatically redirect to /play when location hash/fragment is empty...
javascript
edit
0
1
mit
554e12b30919a04779a4b96b2da50f15d770728d
blainesch/angular-morse,blainesch/angular-morse,blainesch/angular-morse
e2e-tests/scenarios.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2013, Google Inc. Please see the AUTHORS file for details.\n// All rights reserved. Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function() {\n if (navigator...
javascript
edit
0
7
bsd-3-clause
5520c40d6dc84d89b7133a5c1041b94a997eed14
2947721120/chromedeveditor,b0dh1sattva/chromedeveditor,modulexcite/chromedeveditor,valmzetvn/chromedeveditor,googlearchive/chromedeveditor,vivalaralstin/chromedeveditor,valmzetvn/chromedeveditor,2947721120/chromedeveditor,beaufortfrancois/chromedeveditor,beaufortfrancois/chromedeveditor,2947721120/choredev,hxddh/chrome...
app/spark_bootstrap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\n\nmodule.exports = {\n entry: './test/build/index.js',\n output: {\n path: __dirname + \"/build\",\n filename: \"bundle.js\",\n publicPath: \"./build/\"\n },\n bail: true,\n module: {\n load...
javascript
edit
0
0
bsd-3-clause
a05f58f5b0131787ca26fcef2cec3d30dea70d9f
jupyter/jupyterlab,TypeFox/jupyterlab,eskirk/jupyterlab,TypeFox/jupyterlab,charnpreetsingh185/jupyterlab,jupyter/jupyterlab,TypeFox/jupyterlab,jupyter/jupyterlab,charnpreetsingh185/jupyterlab,charnpreetsingh185/jupyterlab,eskirk/jupyterlab,charnpreetsingh185/jupyterlab,eskirk/jupyterlab,TypeFox/jupyterlab,eskirk/jupyte...
test/webpack.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Logger = require('franston')('jobs/update-cache')\n\nconst GithubActivity = require('../models/github-activity')\nconst GithubCache = require('../models/github-cache')\nconst Series = require('run-series')\n\nlet dateMap = {}\n\nf...
javascript
edit
0
2
mit
de1edd3537adc17c1da10a67c16f5bdd5199a230
franvarney/franvarney-api
server/jobs/update-activity-cache.js
rejected_duplicate
Near-duplicate of sample 79242
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react'\nimport FormControl from './FormControl'\n\nclass UsernameControl extends Component {\n\n static propTypes = {\n suggestions: PropTypes.array,\n }\n\n static defaultProps = {\n ...
javascript
edit
0
3
mit
89e6ce73a259f2bb050700e77b3059c6a327fe61
ello/webapp,ello/webapp,ello/webapp
src/components/forms/UsernameControl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar React = require(\"react\");\nvar {Button} = require(\"react-bootstrap\");\n\n\nvar confirmMark = \"\\u2713\"; // check mark\nvar retractMark = \"\\u00D7\"; // multiplication sign\n\nfunction confirmOrRetractButton(userSelected, conf...
javascript
edit
0
2
mit
400bf74845b5c97670e3e4d65b33c01d2489e4ca
webXcerpt/openCPQ
lib/confirm-retract.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nif (global.Proxy)\n{\n\treturn;\n}\n\nvar decorateProperty = require('poor-mans-proxy-decorate-property');\n\n\nglobal.Proxy = function(target, handler) {\n\n\tvar proxy = Object.create(Object.getPrototypeOf(target));\n...
javascript
edit
0
8
mit
68f0bfbcc401e756c4da8d73d2320a89aa2296ee
bealearts/poor-mans-proxy
lib/poor-mans-proxy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar helpers = require('../helpers');\n\nvar units = ['em', 'ex', 'ch', 'rem', 'vh', 'vw', 'vmin', 'vmax',\n 'px', 'mm', 'cm', 'in', 'pt', 'pc'];\n\nmodule.exports = {\n 'name': 'zero-unit',\n 'defaults': {\...
javascript
edit
0
8
mit
0ed92d8d54147a621354ad5de39818df2f48438b
zaplab/sass-lint,zallek/sass-lint,sktt/sass-lint,DanPurdy/sass-lint,flacerdk/sass-lint,sasstools/sass-lint,srowhani/sass-lint,ngryman/sass-lint,benthemonkey/sass-lint,joshuacc/sass-lint,MethodGrab/sass-lint,bgriffith/sass-lint,donabrams/sass-lint,sasstools/sass-lint,alansouzati/sass-lint,skovhus/sass-lint,Snugug/sass-l...
lib/rules/zero-unit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2015, EMC, Inc.\n\n'use strict';\n\nmodule.exports = {\n friendlyName: 'Flash Quanta BMC',\n injectableName: 'Task.Linux.Flash.Quanta.Bmc',\n implementsTask: 'Task.Base.Linux.Commands',\n options: {\n fil...
javascript
edit
0
0
apache-2.0
5fcb21e8ffbc97c31f0a5a2ae657f820b67e913e
nortonluo/on-tasks,bbcyyb/on-tasks,AlaricChan/on-tasks,nortonluo/on-tasks,AlaricChan/on-tasks,bbcyyb/on-tasks
lib/task-data/tasks/flash-quanta-bmc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Transform = require('readable-stream/transform');\nvar util = require('util');\n\nfunction ThrottleStream (options) {\n if (!(this instanceof ThrottleStream)) {\n return new ThrottleStream(options);\n }\n\n options = options |...
javascript
edit
0
4
mit
7189905bf94124240176dfff30df4dc4fc7e0021
dbhowell/pino-cloudwatch
lib/throttle-stream.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar runway = require('./runway.js')\nmodule.exports = runway\n\n\n\ndocument.onclick = function(event) {\n event = event || window.event // IE specials\n var target = event.target || event.srcElement // IE specials\n\n if (target.t...
javascript
edit
0
4
mit
b83aed401a78906d69ff24b86613c7f8323f0290
rm-rf-etc/concise-demo,rm-rf-etc/concise-demo,rm-rf-etc/concise
libs/runway-browser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fs from 'fs';\nimport glob from 'glob';\nimport path from 'path';\nimport SVGSprite from 'svg-sprite';\nimport vinyl from 'vinyl';\n\nfunction SVGCompilerPlugin(options) {\n this.options = {baseDir: path.resolve(options.baseDir)...
javascript
edit
0
1
apache-2.0
23d038de57c680bbde5dea03ab0b07d552c84fea
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
webpack/plugins/svg-compiler-plugin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet input = null;\n\nexport default function getInputSize(value) {\n if (!input) {\n input = document.createElement('div');\n input.className = 'input';\n input.style.display = 'inline-block';\n input.styl...
javascript
edit
0
2
mit
1d7c5b856de2b01f84a26dba6c9b2c60b4a94ebe
TobitSoftware/chayns-components,TobitSoftware/chayns-components,TobitSoftware/chayns-components
src/react-chayns-tag_input/utils/getInputSize.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fs = require('fs');\nvar path = require('path');\nvar Sequelize = require('sequelize');\nvar basename = path.basename(module.filename);\nvar env = process.env.NODE_ENV || 'development';\nvar confi...
javascript
edit
0
3
mit
130a9affffb3ef959ca1cbaf8abaa23849b8c964
3m3kalionel/PostIt,3m3kalionel/PostIt
server/models/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express')\nconst socketio = require('socket.io')\nconst http = require('http')\nconst config = require('./config')\n\nconst app = express()\nconst server = http.Server(app)\nconst io = socketio(server)\nconst ho...
javascript
edit
0
3
mit
062ffc8422fe1f8a37f1e3108ff3e829b9a1f027
nicklasfrahm/indesy-server
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n isFunction,\n last\n}\nfrom 'lodash';\nimport callMeteorMethod from '../../storage/utils/call_meteor_method';\nimport rawAll from '../../fields/utils/rawAll';\n\nfunction wrapMethod(methodName) {\n return function(...metho...
javascript
edit
0
5
mit
e9659281048a1c171bc894ba14c49e62d5b8b5d0
jagi/meteor-astronomy
lib/modules/methods/utils/wrapMethod.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ActivityStream = require('./activity-stream.js');\nvar SimplerEventLogger = require('./simple-event-logger.js');\n\n(new ActivityStream())\n.pipe(new SimplerEventLogger())\n.pipe(process.stdout);\n\n```\n\nApply this change: Exit cl...
javascript
edit
0
2
mit
b72991c0ee1ea973dcd9527bbb686a6c6ec29138
danielbeardsley/gwhid
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst ghost = require('ghost');\nconst express = require('express');\nconst path = require('path');\n\nconst wrapperApp = express();\n\nghost({\n config: path.join(__dirname, 'config.js')\n}).then(functio...
javascript
edit
0
1
mit
a30db6341374e4d90862f55d4b83bbd81fa26f93
jtanguy/clevercloud-ghost
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$().ready(function () {\n\n $(\"form.comment\").on(\"submit\", function (event) {\n event.preventDefault();\n var $form = $(this);\n var $comments = $(\".comment-group\");\n $.ajax({\n type: $form.attr(\"method\"),\n ...
javascript
edit
0
1
mit
3cf9ce5642d2168c6751eb82924052747ab53799
kxxoling/Programmer-Sign,kxxoling/Programmer-Sign,kxxoling/Programmer-Sign
sigh/static/js/sigh.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nelation.require(['engine.things.light'], function() {\n elation.component.add('engine.things.light_ambient', function() {\n this.postinit = function() {\n this.defineProperties({\n 'color': { type: 'color', d...
javascript
edit
0
2
mit
b0b23cae304d007a7d17049bcd0e43c9c48d2bfb
jbaicoianu/elation-engine
scripts/things/light_ambient.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'lodash';\n\nconst IfPermission = props =>\n (props.stripes.hasPerm(props.perm) ? props.children : null);\n\nexport default IfPermission;\n\n```\n\nApply this change: Use Stripes object from context, not from prop\n\nPart...
javascript
edit
0
2
apache-2.0
184a5a80d428ae067096a3ecf1b8593968b18bdd
folio-org/stripes-components,folio-org/stripes-components
lib/IfPermission/IfPermission.js
rejected_duplicate
Near-duplicate of sample 81565
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Joi = require('joi');\n\nconst ValidationError = require('./validation-error');\nconst { mergeJoiOptions, joiSchema } = require('./joi');\nconst { mergeEvOptions, evSchema } = require('./ev');\nconst { parameters } = require('./pa...
javascript
edit
0
2
mit
30c34a2e367a628f8568f6a1377a743554fd0de8
AndrewKeig/express-validation,AndrewKeig/express-validation
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'lodash';\nimport { Graph, alg } from 'graphlib';\n\n_.memoize.Cache = WeakMap;\nlet dijkstra = _.memoize(alg.dijkstra);\n\nexport function setupGraph(pairs) {\n\tlet graph = new Graph({ directed: true });\n\t_.each(pairs,...
javascript
edit
0
2
mit
74a94988c7e815688d9e740f6f3f7f7e8dbf08ca
siddharthkchatterjee/graph-resolver
lib/graph.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* mithril\nimport m from \"mithril\"\nimport { h } from \"seview/mithril\"\n\nexport const render = (view, element) => m.render(element, h(view))\nend mithril */\n\n/* preact */\nimport preact from \"preact\"\nimport { h } from \"sevie...
javascript
edit
0
1
mit
1bb8e4e05766ed4ab73d4a8ad5424d238eb6c19a
foxdonut/meiosis-examples,foxdonut/meiosis-examples
examples/realworld/src/util/view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global require: false, module: false */\n'use strict';\nvar webpack = require('webpack');\nvar config = require('./webpack.config');\n\nfunction wrapEntry(entry) {\n\tif (entry instanceof Array) {\n\t\treturn entry;\n\t}\n\treturn [en...
javascript
edit
0
3
apache-2.0
30db793631ea4c2062b3e3d941ef580c9ca8035b
ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client
webpack.hot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Vietnamese translation for the jQuery Timepicker Addon */\n/* Written by Nguyen Dinh Trung */\n(function($) {\n\t$.timepicker.regional['vi'] = {\n\t\ttimeOnlyTitle: 'Chọn giờ',\n\t\ttimeText: 'Thời gian',\n\t\thourText: 'Giờ',\n\t\tm...
javascript
edit
0
1
mit
5302e3e876f6c9fbba2b7c1c2121a4056c2ea690
pyonnuka/jQuery-Timepicker-Addon,Youraiseme/jQuery-Timepicker-Addon,Jaspersoft/jQuery-Timepicker-Addon,trentrichardson/jQuery-Timepicker-Addon,ristovskiv/jQuery-Timepicker-Addon,nicofrand/jQuery-Timepicker-Addon,ssyang0102/jQuery-Timepicker-Addon,ristovskiv/jQuery-Timepicker-Addon,Jaspersoft/jQuery-Timepicker-Addon,bre...
localization/jquery-ui-timepicker-vi.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar net = require('net');\n\nvar server = net.createServer(function (socket) {\n socket.write('Echo server\\r\\n');\n socket.pipe(socket);\n});\n\nserver.listen(1337, '127.0.0.1');\n```\n\nApply this change: Print incomming message on...
javascript
edit
0
1
mit
58ac22f06ec371a15b29a6aed7b5032d2453ad1c
FuriKuri/info-bundling
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\npatch();\n\nfunction patch() {\n var ensure = __webpack_require__.e;\n var head = document.querySelector('head');\n\n __webpack_require__.e = function(chunkId, callback) {\n var loaded = false;\n\n var handler = function(error)...
javascript
edit
0
2
mit
ce4b95359c29b42431a836888b83203f05cb5089
NekR/async-module-loader
patch.js
rejected_duplicate
Near-duplicate of sample 93600
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * BaseCache it's a simple static cache\n *\n * @namespace Barba.BaseCache\n * @type {Object}\n */\nvar BaseCache = {\n /**\n * The array that keeps everything.\n *\n * @memberOf Barba.BaseCache\n * @type {Array}\n */\n ...
javascript
edit
0
1
mit
f31b2231d992271c598ae9be74e55c2f4e4f4a79
luruke/barba.js,luruke/barba.js
src/Cache/BaseCache.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport template from './item-review.html';\nimport './item-review.scss';\n\nfunction ItemReviewController($rootScope, dimSettingsService) {\n 'ngInject';\n\n const vm = this;\n vm.canReview = dimSettingsService.allowIdPostToDtr;\n v...
javascript
edit
0
2
mit
791d6cec734a682a4ed1bafec233398097775e38
delphiactual/DIM,DestinyItemManager/DIM,bhollis/DIM,DestinyItemManager/DIM,delphiactual/DIM,bhollis/DIM,bhollis/DIM,chrisfried/DIM,DestinyItemManager/DIM,DestinyItemManager/DIM,bhollis/DIM,delphiactual/DIM,delphiactual/DIM,chrisfried/DIM,chrisfried/DIM,chrisfried/DIM
src/scripts/item-review/item-review.component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n/* eslint-disable no-param-reassign, no-console */\n\nimport mongoose, { Schema } from 'mongoose';\nimport MongodbMemoryServer from 'mongodb-memory-server';\n\nmongoose.Promise = Promise;\n\nconst mongoServer = new MongodbM...
javascript
edit
0
2
mit
4429894621ebd450d50a85ff23fb393f7b5564a5
nodkz/graphql-compose-mongoose
src/__mocks__/mongooseCommon.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction copyToClipboard(str){\n 'use strict';\n\n // Copy str to clipboard\n var textArea = document.createElement('textarea');\n document.body.appendChild(textArea);\n textArea.value = str;\n textArea.select();\n document.execC...
javascript
edit
0
1
mit
4ad1ddda54fc4581c1efbd2d8fe33f0b3d14c20a
Roadagain/TitleViewer,Roadagain/TitleViewer
popup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndocument.addEventListener('DOMContentLoaded', function() {\n\tgetSource();\n});\n\nfunction getSource() {\n\tdocument.getElementById('source').innerText = \"Loading\";\n\tchrome.tabs.query({active: true, currentWindow: true}, function(t...
javascript
edit
0
3
mit
6b0dc9bf664dfe6d037e1c8278c857127c591d8a
jammaloo/decode-gmail,jammaloo/decode-gmail,jammaloo/decode-gmail
popup.js
rejected_duplicate
Near-duplicate of sample 97782
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar classNames = require('classnames');\nvar React = require('react');\n\nvar Panel = require('./Panel');\n\nvar AlertPanel = React.createClass({\n\n displayName: 'AlertPanel',\n\n defaultProps: {\n icon: null\n },\n\n propTypes:...
javascript
edit
0
3
apache-2.0
bfb2396d57837298e43a55c6ae6c922f2cb46bd0
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
src/js/components/AlertPanel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n // There is no default option for setting readonly a field with django-bootstrap4\n $('#id_mother_tongue').prop('readonly', true);\n\n // Set tooltips\n $('[data-toggle=\"tooltip\"]').tooltip...
javascript
edit
0
3
mit
1814afba39af2e9ad87adb1cca5907a727007adf
Teknologforeningen/teknologr.io,Teknologforeningen/teknologr.io,Teknologforeningen/teknologr.io,Teknologforeningen/teknologr.io
teknologr/registration/static/js/registration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// Requirements\nvar User = module.parent.require('./user'),\n winston = module.parent.require('winston'),\n watsonDev = require('watson-developer-cloud'),\n\n// Methods\n Watson = {};\n\nWatson.response = fu...
javascript
edit
null
null
mit
7dde6f8dd6495b6993f34ea4fcdb5cdc9158a2e7
gmochi56/nodebb-plugin-watson
library.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n \nclass HeaderImg extends React.Component {\n render() {\n const style = {\n width: '98%',\n height: '500px',\n clear: 'both',\n margin: '0 1% .5em',\n text-align: 'center',\n ...
javascript
edit
null
null
mit
e9f6c13b1dfd21bf9e315ce04c5e1ea7323f12ca
arpith/wordanddeedindia,arpith/wordanddeedindia
components/HeaderImg.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar p = require('path')\n , helper = require('../helpers/promise')\n , scripts_path = p.resolve(__dirname, '../../scripts')\n\nmodule.exports = {\n client: function(client) {\n return function() {\n return helper.runasroot(re...
javascript
edit
0
1
bsd-3-clause
39959eb5b7c80ead491097b0581ba155191152fe
ezseed/ezseed,ezseed/ezseed
cli/commands/install.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global twemoji, s9e*/\n\nimport { override } from 'flarum/extend';\nimport app from 'flarum/app';\nimport Post from 'flarum/models/Post';\nimport Formatter from 'flarum/utils/Formatter';\n\napp.initializers.add('emoji', () => {\n ove...
javascript
edit
0
1
mit
0b194091101c173ee8505eb4a7f711b9c43973a3
flarum/emoji,flarum/emoji,flarum/flarum-ext-emoji,flarum/flarum-ext-emoji
js/forum/src/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(ext) {\n // Cleanup function when the extension is unloaded\n ext._shutdown = function() {};\n\n // Status reporting code\n // Use this to report missing hardware, plugin or unsupported browser\n ext._getStatus ...
javascript
edit
0
1
bsd-3-clause
41d7fab27e1b405a62cae14424ab9be9d19be53d
visor841/SkelScratch,Calvin-CS/SkelScratch
Kinect2Scratch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $(\".tooltip-link\").tooltip( {placement: \"right\"} );\n});\n\nif($(\".email\").length){\n // variables, which will be replaced\n var at = / AT /;\n var dot = / DOT /g;\n\n // function, which repla...
javascript
edit
0
1
mit
0700800eabf4592711c5979b80dafa503f073153
nicolasmccurdy/nicolasmccurdy.github.io,nicolasmccurdy/nicolasmccurdy.github.io
js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { flow, curry, get, mapValues } from 'lodash/fp'\nimport { bind } from 'lodash'\n\nconst _bindSelector = curry((selectionName, selector) =>\n flow(\n get(selectionName),\n selector\n )\n)\n\nconst bindToSelection = (actio...
javascript
edit
0
1
mit
94393f587dd1433a48d440e053f6012379f4ca47
actano/yourchoice-redux
src/bindToSelection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport mongoose from 'mongoose';\n\nconst uri = `mongodb://${process.env.MONGO_USERNAME}:${process.env\n .MONGO_PASSWORD}@${process.env.MONGO_ADDRESS}`;\n\nmongoose.Promise = global.Promise;\n\nmongoose.connect(uri, { useMongoClient: t...
javascript
edit
0
1
mit
70cc46d66fd5183eaa0d7e0a1f3c1897b0a0761c
nnnoel/graphql-apollo-resource-manager,nnnoel/graphql-apollo-resource-manager
server/src/data/connectors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** A layer for an adjust speed modification */\nimport React from 'react'\n\nimport colors from 'lib/constants/colors'\n\nimport PatternLayer from './pattern-layer'\nimport HopLayer from './hop-layer'\n\nexport default function AdjustS...
javascript
edit
0
2
mit
e29485ea7f284c93414df9c7f75a60e56ee92aed
conveyal/analysis-ui,conveyal/analysis-ui,conveyal/analysis-ui
lib/components/modifications-map/adjust-speed-layer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\nvar server = require('http').createServer(app); \nvar io = require('socket.io').listen(server);\n//var models = require(\"./models\");\n\nvar PORT = process.env.PORT || 3000;\n\n...
javascript
edit
0
2
mit
e3069db9f87c97ec9bce712aebc14fcfa1e9b21c
Jakeyrob/thumbroll,shanemcgraw/thumbroll,Jakeyrob/thumbroll,Jakeyrob/thumbroll,shanemcgraw/thumbroll,absurdSquid/thumbroll,shanemcgraw/thumbroll,absurdSquid/thumbroll
server/app.js
rejected_duplicate
Near-duplicate of sample 73808
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction viewTeams() {\n\n getTeams(\n success = function (data) {\n populateTeamsTable(data.teams);\n },\n error = function (jqxhr) {\n handleApiError(jqxhr);\n }\n );\n\n func...
javascript
edit
0
2
mit
cfd3266412adf3acb59b8cd4fd96725b8d95d218
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
src/main/web/florence/js/functions/_viewTeams.js
rejected_duplicate
Near-duplicate of sample 76911
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport jwt from 'jsonwebtoken';\n\nconst router = express.Router(); // eslint-disable-line new-cap\n\nrouter.post('/token', (req, res) => {\n const authentication = {\n authenticationProvider: 'github...
javascript
edit
0
1
mit
9e58bf443f0c37c79542677ba9512053a202f31b
csblogs/api-server,csblogs/api-server
src/components/token/token-routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs')\n , path = require('path')\n\nfunction read(dir) {\n var f = path.resolve(dir, '.node-dev.json')\n return fs.existsSync(f) ? JSON.parse(fs.readFileSync(f)) : {}\n}\n\nvar c = read('.')\nc.__proto__ = read(proce...
javascript
edit
0
2
mit
982a908bae99c14a72fd28ed2d3e5dc25106f707
shinygang/node-dev,jiyinyiyong/node-dev,fgnass/node-dev,whitecolor/ts-node-dev,Casear/node-dev,whitecolor/ts-node-dev,SwoopCMI/node-dev,fgnass/node-dev,fgnass/node-dev
lib/cfg.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst _Environments = {\n production: { API_URL: 'https://dev-api.vets.gov', BASE_URL: 'https://www.vets.gov' },\n staging: { API_URL: 'https://staging-api.vets.gov', BASE_URL: 'https://staging.vets.gov' },\n development: { API_URL: ...
javascript
edit
0
3
cc0-1.0
96f5e341a47cf3cbde9222ed72f44d716acb9aa0
department-of-veterans-affairs/vets-website,department-of-veterans-affairs/vets-website
src/js/common/helpers/environment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Prismic = require('prismic.io');\n\nmodule.exports = {\n getAll(apiEndpoint) {\n return Prismic.api(apiEndpoint).then(api => (\n api.query(null, { lang: '*' })\n ));\n },\n};\n\n```\n\nApply this change: Increase page...
javascript
edit
0
1
mit
0977a95ee827aeb849b9d47b8e1c2ff7d0cca5e4
puhastudio/store-prismic
lib/api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport BaseWatcher from './BaseWatcher';\n\n/**\n * This checks for people spamming links.\n */\nclass LinkSpamWatcher extends BaseWatcher {\n constructor(bot) {\n super(bot);\n }\n\n usesBypassRules = true;\n\n /**\n...
javascript
edit
0
8
mit
1a34adf4e512be4639414dc7202b97d2ee056ee3
ATLauncher/Discord-Bot
src/watchers/LinkSpamWatcher.js
rejected_duplicate
Near-duplicate of sample 68572
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport lunr from 'lunr'\nimport data from '../../data'\n\nvar emoticonsList = []\n\nvar index = lunr(function() {\n this.pipeline.reset()\n\n this.field('short_name', { boost: 2 })\n this.field('emoticons')\n this.field('name')\n\n ...
javascript
edit
0
4
bsd-3-clause
b07e598a8a64308a835fa3f32e8f4bf4ac2ba6c4
MarcoPolo/emoji-mart,MarcoPolo/emoji-mart
src/utils/emoji-index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\nvar canvas;\nvar context;\n\n$(document).ready(function(){\n\t$(\"<canvas/>\").attr({\n\t\tid: \"main_canvas\", width:$(document).innerWidth()+\"px\", height: $(document).innerHeight()+\"px\"\n\t}).css({\n\t\tbackground...
javascript
edit
0
2
mit
6874f4dd0d08d0b3a0d227f304dd2f8a56a6f72b
50Wliu/airplane-simulator,50Wliu/airplane-simulator
js/init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Logs which are used in 'cli.js'\n */\nmodule.exports = {\n successInsertMsg: function () {\n console.log('The TOC was ' + 'successfully'.bold.green + ' inserted.');\n },\n\n successCleanMsg: function () {\n ...
javascript
edit
0
1
mit
4f32b708483a3724490b442c82c818ccd170fad6
eGavr/toc-md
lib/log.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar bindEvents = function() {\n\tsmoothScroll.init();\n\n\tdocument.querySelector('.mobile-menu-toggle').addEventListener('click', function(event) {\n\t\tevent.preventDefault();\n\t\tdocument.getElementById('nav-list').classList.toggle(...
javascript
edit
0
4
mit
6b3df806d78639a8b4d9b593515b1850bc63afd7
jboland/genome-ui-challenge,jboland/genome-ui-challenge
js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n function RelatedLinksAppController($scope) {\n var vm = this;\n\n vm.relations = $scope.model.viewModel; \n var currentVariant = _.find($scope.content.variants, function...
javascript
edit
0
5
mit
c619a94990f71215640cc4aa0fa289517720ef1f
dawoe/umbraco-nexu,dawoe/umbraco-nexu,dawoe/umbraco-nexu
src/Our.Umbraco.Nexu.Web/App_Plugins/Nexu/controllers/related-links-app-controller.js
rejected_duplicate
Near-duplicate of sample 100306
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path'),\n fs = require('fs');\n\n\nfunction FileUrlMapper(options) {\n this.base = options.directory;\n this.spa = options.spa;\n}\n\nFileUrlMapper.prototype.hasTrailingSlash = function(url) {\n return url[u...
javascript
edit
0
2
mit
f4ad545b2522f8009f78efa8e7f5745cf7413c08
eth0lo/slr
src/file_url_mapper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n \"use strict\";\n\n var ActionQueue = window.ActionQueue = function () {\n var self = this instanceof ActionQueue ? this : Object.create(ActionQueue.prototype);\n\n self._queue = [];\n ...
javascript
edit
0
4
mit
fa18d31b4017a42a29d3f4345a4a7ade9ef08b9f
dataworker/dataworker,dataworker/dataworker,jctank88/dataworker,jctank88/dataworker
action_queue.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable class-methods-use-this */\nclass BasePage {\n\n get mainHeading() { return browser.getText('h1'); }\n waitForMainHeadingWithDataId(id) {\n browser.waitForVisible(`[data-title=\"${id}\"]`, 3000);\n return browse...
javascript
edit
0
1
mit
06e19fabe77e7e91e9a439ccfe3fd524e31ab7e8
noms-digital-studio/csra-app,noms-digital-studio/csra-app,noms-digital-studio/csra-app
test/end-to-end/browser/pages/BasePage.js
rejected_duplicate
Near-duplicate of sample 92562
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright 2014-2015 Fabian Tollenaar <<EMAIL>>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the Licens...
javascript
edit
0
3
apache-2.0
87ed8d27f466183897275d2ae96a47b0b220e3f2
webmasterkai/signalk-server-node,SignalK/signalk-server-node,sbender9/signalk-server-node,sbender9/signalk-server-node,sbender9/signalk-server-node,SignalK/signalk-server-node,SignalK/signalk-server-node,webmasterkai/signalk-server-node,webmasterkai/signalk-server-node,SignalK/signalk-server-node
providers/from_json.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/// <reference path=\"controller.js\" />\n/// <reference path=\"dataAccess.js\" />\n(function () {\n var serviceRoot = \"http://localhost:16502/api/\";\n \n var persister = Chat.persisters.get(serviceRoot);\n\n var controll...
javascript
edit
0
1
mit
7c79a82e84a5a39c3f0f1813257899198b725885
VelizarIT/WebServices-TheRoadRunner,Cheeesus/WebServices-TheRoadRunner,Cheeesus/WebServices-TheRoadRunner,VelizarIT/WebServices-TheRoadRunner
JustRunnerChat/JustRunnerChat/ChatScripts/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar RoundNode = require(\"./RoundNode\");\n\nmodule.exports = (function () {\n\n\tvar radius = 40;\n\n\tvar o = function (graph) {\n\t\tRoundNode.apply(this, arguments);\n\n\t\tvar that = this,\n\t\t\tsuperHoverHighlightingFunction = th...
javascript
edit
0
1
mit
b6f23e50aec4ae364db0601e3efa04b902722d13
MissLoveWu/webvowl,VisualDataWeb/WebVOWL,leshek-pawlak/WebVOWL,leshek-pawlak/WebVOWL,MissLoveWu/webvowl,VisualDataWeb/WebVOWL
src/webvowl/js/elements/nodes/SetOperatorNode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global describe:false, it:false, beforeEach:false, afterEach:false, request:false, mock:false*/\n\n'use strict';\n\ndescribe('/', function () {\n\n it('should say \"hello\"', function (done) {\n request(mock)\n .g...
javascript
edit
0
1
mit
af986b41b7826615ec0c0f67d069a8096773492a
LinuxBozo/18FAgileBPA,adj7388/18FAgileBPA,adj7388/18FAgileBPA,adj7388/18FAgileBPA,LinuxBozo/18FAgileBPA,LinuxBozo/18FAgileBPA
test/spec/server/controllers/api/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst mediaExtensions = {\n audio: [\n '.aac', '.asf', '.flac', '.m2a', '.m4a', '.m4b', '.mp2', '.mp4',\n '.mp3', '.oga', '.ogg', '.opus', '.wma', '.wav', '.wv', '.wvp'],\n video: [\n '.avi', '.mp4', '.m4v', '.webm', '.mov', ...
javascript
edit
0
0
mit
20e3fb6f5fdc8098739a797ab005d3f67e77f225
feross/webtorrent-desktop,feross/webtorrent-desktop,feross/webtorrent-desktop,webtorrent/webtorrent-desktop,webtorrent/webtorrent-desktop,feross/webtorrent-app,feross/webtorrent-app,feross/webtorrent-app,webtorrent/webtorrent-desktop
src/renderer/lib/media-extensions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\ndescribe('Directive: alertMessages', function() {\n\n // load the directive's module\n beforeEach(module('polestar'));\n\n var element,\n scope;\n\n beforeEach(module('polestar', function($provide) {\n var moc...
javascript
edit
0
1
bsd-3-clause
36cab8b19d58301ac7ce16643feaf5b2579b6a2e
uwdata/vega-lite-ui,uwdata/vega-lite-ui,vega/vega-lite-ui,uwdata/vega-lite-ui,vega/vega-lite-ui,vega/vega-lite-ui
src/alertmessages/alertmessages.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Mycockpit Directive\n */\n(function() {\n 'use strict';\n\n angular\n .module('dashboard')\n .directive('dashboard', ['dashboardFactory', function(dashboardFactory) {\n\n // Width of the dashboard ...
javascript
edit
0
2
apache-2.0
4f33f1022273dfcaccd520ef6f58999373ddc871
fluanceit/angular-dashboard,fluanceit/angular-dashboard,fluanceit/angular-dashboard
src/dashboard.directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from \"react\";\nimport { connect } from \"react-redux\";\nimport { employeeUpdate, employeeEdit, employeeEditSave } from \"../../actions\";\nimport { Card, CardSection, Button } from \"../common\";\nimport E...
javascript
edit
0
1
mit
722a4c19db98955e257def819cb35431a6736328
alvloureiro/Manager,alvloureiro/Manager,alvloureiro/Manager
src/components/employee/EmployeeEdit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\r\n\r\n\r\nmodule.exports = (function(){\r\n /**\r\n * Import modules\r\n */\r\n const footballDb = require('./../db/footballDb')\r\n /**\r\n * football module API\r\n */\r\n return {\r\n ...
javascript
edit
0
1
mit
1f6603ae25e6dfa2636f8d7828f4456cf58ae9ac
CCISEL/connect-controller,CCISEL/connect-controller
example/controllers/football.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n //tabs\n\t$('ul.tabs li').click(function(){\n\t\tvar tab_id = $(this).attr('data-tab');\n\n\t\t$('ul.tabs li').removeClass('current');\n\t\t$('.tab-content').removeClass('current');\n\n\t\t$(this).addClass('current');\...
javascript
edit
0
1
mit
f7e7e3a7c60fcbdd99aab902fcc6484e5775905c
chaddanna/d1-baseball,chaddanna/d1-baseball,chaddanna/d1-baseball
js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function() {\n\treturn {\n\t\tbail: true,\n\t\tmodule: {\n\t\t\tloaders: [\n\t\t\t\t{\n\t\t\t\t\ttest: /\\.ts$/,\n\t\t\t\t\texclude: /node_modules/,\n\t\t\t\t\tloader: 'ts-loader',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\tres...
javascript
edit
0
1
mit
e47cffc722c0ae405eb2c00e2109b98b191019e1
RenovoSolutions/Gulp-Typescript-Utilities
webpack/ts.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport connect from 'connect';\nimport faker from 'faker';\nimport path from 'path';\nimport serveStatic from 'serve-static';\nimport uuid from 'node-uuid';\nimport {Server as WebSocketServer} from 'ws';\n\nconnect().use(serveStatic(pat...
javascript
edit
0
1
mit
2677136d8c46402c339207e4f5100ab09c0f4924
zsiciarz/isthisachat,zsiciarz/isthisachat
backend/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar network = function () {\n this.port = 8080;\n this.ip = \"127.0.0.1\";\n};\n\nmodule.exports = new network();\n```\n\nApply this change: [Enhancement] Change port and ip for azure host" }, { "role": "assistant", "c...
javascript
edit
0
2
mit
acf34da2afb0fb2477e1d487c279fc6dc4c8b9f1
NikolaDimitroff/GiftOfTheSanctum,NikolaDimitroff/GiftOfTheSanctum,NikolaDimitroff/GiftOfTheSanctum
src/network_manager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet ivm = require('isolated-vm');\nlet isolate = new ivm.Isolate;\n\nfunction makeContext() {\n\tlet context = isolate.createContextSync();\n\tlet global = context.global;\n\tglobal.setSync('ivm', ivm);\n\tisolate.compileScriptSync(`\n\...
javascript
edit
0
3
isc
63aa47d7f16d6c1f568bd2a7af5185494ea35558
laverdet/isolated-vm,laverdet/isolated-vm,laverdet/isolated-vm,laverdet/isolated-vm
tests/cross-context-instance.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar logger = require('./logger'),\n mongoose = require('mongoose');\n\n// Log unexpected events.\nvar events = ['disconnecting', 'disconnected', 'close', 'reconnected', 'error'];\nevents.forEach(function(event) {\n ...
javascript
edit
0
8
mit
80e7a0c453f9c33f54468888773658b0541a1bfa
OdiloOrg/api-umbrella-gatekeeper,apinf/api-umbrella,NREL/api-umbrella-gatekeeper,apinf/api-umbrella,apinf/api-umbrella,cmc333333/api-umbrella-gatekeeper,NREL/api-umbrella,apinf/api-umbrella,NREL/api-umbrella,NREL/api-umbrella,apinf/api-umbrella,NREL/api-umbrella
lib/mongo_connect.js
rejected_duplicate
Near-duplicate of sample 90877
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst HTTPStatus = require('http-status-codes');\n\n// eslint-disable-next-line no-unused-vars\nfunction handleErrorResponse(err, req, res, next) {\n const responseObject =\n {\n type: err.type || 'about:blank',\n title:\n...
javascript
edit
0
5
mit
920ab8209d85673038d04fa51a7a28593941c72a
C3-TKO/junkan-server
app/errorResponse.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n steamID: \"\",\n steamNick: \"\",\n steamError: \"\",\n reconnectTries: 0,\n connected: false,\n away: false,\n lastInvite: \"\",\n lastChat: \"\",\n ghostTimer: null,\n users: {}, //...
javascript
edit
0
0
mit
2945de8666055238fe2b43f60daad7aaf2279355
rubyconn/steam-chat
lib/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { connect } from \"react-redux\"\n\nimport * as trackActions from '../actions/trackActions'\nimport * as playlistActions from '../actions/playlistActions'\n\nimport VideoFeed from './VideoFeed'\n\n\nconst mapStateToProps = (state...
javascript
edit
0
1
mit
40a460b2d9c707c9d532e8e155d8ea3c44af9b79
cthit/playIT-python,cthit/playIT-python,cthit/playIT-python,cthit/playIT-python
frontend/src/components/ActiveVideoFeed.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar assert = require(\"@sinonjs/referee\").assert;\nvar createSet = require(\"./create-set\");\n\ndescribe(\"createSet\", function() {\n describe(\"when called without arguments\", function() {\n it(\"return...
javascript
edit
0
1
bsd-3-clause
6448429f021d5babcc7d0df6742af5e271537acd
busterjs/samsam
lib/create-set.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst fs = require('fs');\nconst path = require('path');\nconst os = require('os');\nconst marked = require('marked');\nconst ECT = require('ect');\n\nfunction md2html(filePath, cb) {\n fs.readFile(filePath, 'utf8', (e...
javascript
edit
0
2
mit
0e18aac64aeb5dff37e9fa93aec10e79ae7f8cbb
fossamagna/electron-md2pdf-hands-on,fossamagna/electron-md2pdf-hands-on
md2html.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// Load requirements\nconst parser = require('parse-torrent-name');\n\n// Create promise to resolve with dataset\nmodule.exports = function(filename) {\n return new Promise((resolve, reject) => {\n\n // Variables\n ...
javascript
edit
0
9
apache-2.0
7432e639f1a5f4cd96a01df9692ae482f72889f6
transmutejs/core
app/libs/job/show.js
accepted
null
true