messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar net = require('net');\nvar config = require('hyperflowMonitoringPlugin.config.js');\n\nvar MonitoringPlugin = function () {\n};\n\nMonitoringPlugin.prototype.sendMetrics = function () {\n var that = this;\n //TODO: Create conn...
javascript
edit
0
3
mit
68d0f077935e3d54d08556cb9ec646b30e443acf
dice-cyfronet/hyperflow-monitoring-plugin
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n/**\n * Properties to prefix.\n */\nvar postcss = require(\"postcss\"),\n\t\tprops = [\n\t\t\t\"hyphens\",\n\t\t\t\"line-break\",\n\t\t\t\"text-align-last\",\n\t\t\t\"text-emphasis\",\n\t\t\t\"text-emphasis-color\",\n...
javascript
edit
0
3
mit
83d2edc294966aa1c5d29ef16ddf623f6983cce7
Rycochet/postcss-epub,antyakushev/postcss-epub
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst webpack = require('webpack');\nconst WebpackDevServer = require('webpack-dev-server');\nconst webpackConfig = require('./webpack.config.local');\n\nnew WebpackDevServer(webpack(webpackConfig), {\n publicPath: '/dist/',\n hot...
javascript
edit
0
2
mit
92b28424a9d10ded0ebf59ef2a044596d99627cd
KleeGroup/focus-showcase
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar util = require('util');\nvar minimist = require('minimist');\n\n/**\n * Parse arguments and return command object\n * @param {array} \targv Command line arguments\n * @param {object} opts Argument parsing option...
javascript
edit
0
8
mit
032243593b312553e384dc068255abc5aea77473
hakovala/node-simpleton
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n user: {\n actions: {\n create: 'User.create', // Use the User plugin's controller.\n update: 'User.update',\n destroy: 'User.destroy',\n deleteall: 'User.destroyAll',\n },\n attributes:...
javascript
edit
0
0
mit
fb845792abc681eb600b9a17da11120c8064bd07
wistityhq/strapi,wistityhq/strapi
packages/strapi-plugin-users-permissions/config/layout.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { connect } from 'react-redux'\nimport merge from 'lodash/merge'\nimport clone from 'lodash/clone'\nimport pickBy from 'lodash/pickBy'\nimport { encode } from 'querystring'\nimport TableHeadCell from '../components/TableHeadCell'...
javascript
edit
0
1
mit
5bc3d461c0837f1300baeb39c47062d15b2676d7
clarat-org/claradmin,clarat-org/claradmin,clarat-org/claradmin,clarat-org/claradmin
client/app/bundles/Index/containers/TableHeadCell.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * This file is provided by Facebook for testing and evaluation purposes\n * only. Facebook reserves all rights not expressly granted.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED...
javascript
edit
0
0
bsd-3-clause
9579909492ac9d80cfec0d9c9858ce7d89760aa1
eclectriq/flux,ludiculous/flux,ayarulin/flux,nikhyl/flux,debbas/ChatV2,JanChw/flux,crsr/flux,keikun17/flux,jmandel/flux,gfogle/elm-todomvc,Chen-Han/flux,ephetic/flux,ayarulin/flux,superphung/flux,prabhash1785/flux,rstefek/flux,UIKit0/flux-1,Demian-Moschin/flux,avinnakota/flux,mircle/flux,viviancpy/flux,alexeybondarenko...
examples/flux-chat/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport m from 'mithril';\nimport AppComponent from '../../app/scripts/components/app.js';\nimport AIPlayer from '../../app/scripts/models/ai-player.js';\nimport { qs } from './utils.js';\n\nexport function _before() {\n // Minimize the...
javascript
edit
0
1
mit
04ff61e25b17b68a417908758529e2fbb829ac8d
caleb531/connect-four
test/ui/fixtures.js
rejected_duplicate
Near-duplicate of sample 91161
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar execFile = require('child_process').execFile;\n\nmodule.exports = function (str, cb) {\n\texecFile('osascript', ['-e', str], function (err, stdout) {\n\t\tif (err) {\n\t\t\tcb(err);\n\t\t\treturn;\n\t\t}\n\n\t\tcb(err...
javascript
edit
0
2
mit
0c2e09addecb2384efe3bc310c0afee033586d86
sindresorhus/run-applescript
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-cli-inject-asset-map',\n\n // Add asset map hash to asset-map controller\n postBuild: function (results) {\n console.log('Injecting asset map hash...');\n...
javascript
edit
0
1
mit
fe52ed79a76c1fa2a3368da23722ce9f5959e227
jcaffey/ember-cli-inject-asset-map,jcaffey/ember-cli-inject-asset-map
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar Mail = require('./channels/Mail');\nvar Console = require('./channels/Console');\n\nclass SiteDownNotification {\n\n\tconstructor(site)\n\t{\n\t\tthis.site = site;\n\n\t\tthis.message = site.getAttribute('url') + ...
javascript
edit
0
2
mit
d49e5b628ef3c352e6664ab290b831b68bd65e3b
jonathandey/uptime-monitor,jonathandey/uptime-monitor
notifications/SiteDownNotification.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = Storage\n\nfunction Storage () {\n if (!(this instanceof Storage)) return new Storage()\n this.chunks = []\n}\n\nStorage.prototype.put = function (index, buf, cb) {\n this.chunks[index] = buf\n if (cb) process.nextT...
javascript
edit
0
7
mit
cfe3214bc9f571c7e428c85dcd4fcb4845ad5832
mafintosh/memory-chunk-store
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar cli = require('cli').enable('version');\nvar fs = require('fs');\nvar path = require('path');\nvar cwd = process.cwd();\nvar options = cli.parse({\n 'append': ['a', 'append to the g...
javascript
edit
0
2
mit
7c39d6c44216d85785e064c724f1b11ce0b46745
stefanmaric/ntee
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar consecutiveSlash = /(:)?\\/+/g;\nvar endsWithExtension = /[^\\/]*\\.[^\\/]+$/g;\n\nvar fn = function(match, c) {\n return c ? '://' : '/';\n};\n\nvar pppath = function(parts, filename) {\n if (typeof parts === 'st...
javascript
edit
0
4
mit
eea34dcd016c2b497ff5af29c149d3e97530e566
yuanqing/pppath
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {TemplateDirective, View, ViewPort, ViewFactory, InitAttrs} from 'templating';\nimport {Injector, Inject} from 'di';\n\n@TemplateDirective({selector: 'router-view-port'})\nexport class RouterViewPort {\n @Inject(ViewFactory, Vie...
javascript
edit
0
2
apache-2.0
5b057575255fc56845c37bae3289da0a72fe93a4
shangyilim/router,JanPietrzyk/router,rakeshbhavsar/router,excellalabs/router,shangyilim/router,loomio/router,kyroskoh/router,angular/router,excellalabs/router,JanPietrzyk/router,kyroskoh/router,IgorMinar/router,AyogoHealth/router,rakeshbhavsar/router,AyogoHealth/router,shangyilim/router,IgorMinar/router,IgorMinar/route...
src/routerViewPort.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar generatePairs = function(string) {\n var pairs = [];\n string = string.toLowerCase();\n for (var i = 0; i < string.length - 1; i++) {\n pair = string.substr(i, 2);\n if (!/\\s/.test(pair)) {\n pairs.push(pair);\n }\...
javascript
edit
0
4
mit
869ba7c3b24aa0d8b3d15481df4a7de5327a64e9
sanchitgera/Lingual
lib/white.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/*\n * Dependencies..\n */\n\nvar Ware;\n\nWare = require('ware');\n\n/*\n * Components.\n */\n\nvar parse,\n stringify;\n\nparse = require('./lib/parse.js');\nstringify = require('./lib/stringify.js');\n\n/**\n * Co...
javascript
edit
0
2
mit
1e9c43f190abf3cddc7e7704e918abde3368a2ee
eush77/remark,tanzania82/remarks,yukkurisinai/mdast,chcokr/mdast,ulrikaugustsson/mdast,yukkurisinai/mdast,ulrikaugustsson/mdast,eush77/remark,wooorm/remark,chcokr/mdast
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (paths, ignores) {\n let result = []\n let edge = String.prototype\n\n for (let i = 0, ignoresLength = ignores.length; i < ignoresLength; i++) {\n let ignore = ignores[i]\n\n if (ignore.lastIndexOf('.'...
javascript
edit
0
5
mit
62c1b14f0e0da04c0952865a74ede42b21ae864b
whaaaley/path-ignore
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst EventEmitter = require('events');\n\nconst devtools = require('./lib/devtools.js');\nconst Chrome = require('./lib/chrome.js');\n\nfunction CDP(options, callback) {\n if (typeof options === 'function') {\n ...
javascript
edit
0
3
mit
4683e61d4d3eb6fb696f5e5672831b1f0de0d3db
cyrus-and/chrome-remote-interface,cyrus-and/chrome-remote-interface
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path'),\n servestatic = require('serve-static');\n\nvar basedir = path.dirname(require.resolve('govuk_template_mustache/package.json'));\n\nmodule.exports = {\n setup: function (app, options) {\n\n optio...
javascript
edit
0
3
mit
02b11e3eef293f87a32bae4ff747dcf4f66d436b
UKHomeOffice/govuk-template-compiler,UKHomeOffice/govuk-template-compiler
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar cheerio = require('cheerio');\nvar _ = require('underscore');\nvar multiline = require('multiline');\n\nvar template = _.template(multiline(function() {\n /*\n <a href=\"<%= url %>\" title=\"<%= title %>\" class=...
javascript
edit
0
1
mit
068ce6d6a58dceb64c32173c37483f821ae8c31e
ly-tools/gitbook-plugin-fancybox,LingyuCoder/gitbook-plugin-fancybox
index.js
rejected_duplicate
Near-duplicate of sample 92362
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-power-select'\n};\n\n```\n\nApply this change: Add the wormhole destination in the {{content-for “body-footer”}}" }, { "role": "assistant", "conten...
javascript
edit
0
2
mit
288b361b388a23e4b4ea9aef10f659e5ba65a6ca
cibernox/ember-power-select,Dremora/ember-power-select,cibernox/ember-power-select,chrisgame/ember-power-select,esbanarango/ember-power-select,esbanarango/ember-power-select,cibernox/ember-power-select,esbanarango/ember-power-select,cibernox/ember-power-select,chrisgame/ember-power-select,Dremora/ember-power-select
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar execFile = require('child_process').execFile;\nvar wifiName = require('wifi-name');\n\nfunction getPassword(ssid, cb) {\n\tvar cmd = 'sudo';\n\tvar args = ['cat', '/etc/NetworkManager/system-connections/' + ssid];\n\t...
javascript
edit
0
6
mit
10280069a4c1ecf5cbaebd8b0f9b67f3d9c219d2
kevva/linux-wifi-password
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar es6tr = require(\"es6-transpiler\");\n\nvar createES6TranspilerPreprocessor = function(args, config, logger, helper) {\n config = config || {};\n var log = logger.create('preprocessor.es6-transpiler');\n var defaultOptions = {\n ...
javascript
edit
0
6
bsd-3-clause
c7ac887023341250eb1c4c6e9bb70ae5138b23f9
ouhouhsami/karma-es6-transpiler-preprocessor
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar postcss = require('postcss')\nvar isVendorPrefixed = require('is-vendor-prefixed')\n\nmodule.exports = postcss.plugin('postcss-remove-prefixes', function (options) {\n if (!options) {\n options = {};\n }\n\n va...
javascript
edit
0
6
mit
864ce5aa89a99b17051bb41ce243490b8be0d4a1
johnotander/postcss-remove-prefixes
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter;\nvar Promise = require('bluebird');\n\nvar emitThen = function (event) {\n var args = Array.prototype.slice.call(arguments, 1);\n return Promise\n .bind(this)...
javascript
edit
0
4
mit
3651031dc09ea89f35ffc67363af07f444f2caf7
bendrucker/emit-then
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nvar path = require('path');\nvar filterInitializers = require('fastboot-filter-initializers');\nvar VersionChecker = require('ember-cli-version-checker');\nvar mergeTrees = require('broccoli-mer...
javascript
edit
0
7
mit
48db09838c934b349250efbada6aadcc95fece9c
ronco/ember-cli-head,ronco/ember-cli-head
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport bluebird from 'bluebird'\nimport consoleStamp from 'console-stamp'\nimport 'newrelic';\n\nimport { getSingleton as initApp } from './app/app'\n\n\nglobal.Promise = bluebird\nglobal.Promise.onPossiblyUnhandledRejection((e) => { th...
javascript
edit
0
1
mit
955c5abe4bc2843df9c88124776207e83292d157
FreeFeed/freefeed-server,SiTLar/freefeed-server,SiTLar/freefeed-server,golozubov/freefeed-server,golozubov/freefeed-server,FreeFeed/freefeed-server
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar loaderUtils = require('loader-utils');\nvar postcss = require('postcss');\n\nmodule.exports = function (source) {\n if ( this.cacheable ) this.cacheable();\n\n var file = loaderUtils.getRemainingRequest(this);\n var ...
javascript
edit
0
5
mit
346b58a0e4693f9bb25ca4271e7518a3a027983d
mokevnin/postcss-loader
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (path) {\n var req = require;\n return function (module_name) {\n try {\n return req(module_name);\n } catch (err) {\n var resolve = null;\n req.main.paths.some(function (item) {\n ...
javascript
edit
0
3
mit
28e666a0419b17cfa85a8e340927fd9cd691d045
watilde/graceful-require
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar toc = require('markdown-toc');\n\nmodule.exports = {\n book: {},\n hooks: {\n \"page:before\": function (page) {\n page.content = toc.insert(page.content, {\n slugify: function (str) {\n ...
javascript
edit
0
1
mit
2b8f476de5049d3d0933ca1712f1c22190a250cf
willin/gitbook-plugin-atoc
index.js
rejected_duplicate
Near-duplicate of sample 99170
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst createUrl = require('./lib/create-url');\nconst downloadAndSave = require('./lib/download-and-save');\nconst parsePage = require('./lib/parse-page');\n\nmodule.exports = save;\n\n/**\n * @param {string} urlOrMediaId\n * @return {...
javascript
edit
0
2
mit
f681c2e21fe5b84d97d22a909103ddd64db5b1e1
ericnishio/instagram-save
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar DtsCreator = require('typed-css-modules');\nvar loaderUtils = require('loader-utils');\nvar objectAssign = require('object-assign');\n\nmodule.exports = function(source, map) {\n this.cacheable && this.cacheable();\n var callback ...
javascript
edit
0
3
mit
9fc664fcacbd8149b06a6b80e62f7a1d4e8609e4
olegstepura/typed-css-modules-loader
index.js
rejected_duplicate
Near-duplicate of sample 101324
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\nvar express = require('express'),\n app = express(),\n bodyParser = require('body-parser'),\n config = require('./libs/config'),\n email = require('./libs/email')\n \napp.use(bodyParser.json())\napp.post('/s...
javascript
edit
0
0
mit
185c90d862bccb2061f00bf2f4e6858cbb0eb660
MakerFaireOrlando/mfo-server
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport dataComplete from './actions/dataComplete';\nimport preprocessData from './actions/preprocessData';\nimport readFile from '../functions/file/readFile';\nimport preprocessFile from '../functions/file/preprocessFile';\n\nimport { P...
javascript
edit
0
8
mit
8b2da192dbc26d7354ec1db9d101ae4c927b1bc6
krajvy/nearest-coordinates,krajvy/nearest-coordinates,krajvy/nearest-coordinates
src/state/middleware.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Uses the slack button feature to offer a real time bot to multiple teams */\nvar Botkit = require('botkit');\n\nif (!process.env.TOKEN || !process.env.PORT) {\n console.log('Error: Specify token and port in environment');\n process...
javascript
edit
0
2
mit
0d62962e33a670ae3459d936ea7b95d2782eb340
slackhq/easy-peasy-bot-custom-integration
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar AWS = require('aws-sdk');\nvar s3 = new AWS.S3();\nvar yaml = require('js-yaml');\n\n// const s3EnvVars = require('s3-env-vars');\n// var doc = s3EnvVars(\"mybucketname\", \"folderpathinbucket\", \"filename\", function(err, data) {\...
javascript
edit
0
3
mit
172ffddb3645f508093fac4e6d2d355c0c3e7d5a
Referly/lambda-s3-yml
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Campaigns = require('../../app/models/Campaign');\n\nmodule.exports = function getCampaignForKeyword() {\n return (req, res, next) => {\n if (req.reply.template) {\n return next();\n }\n\n return Ca...
javascript
edit
0
2
mit
c2c4730b4554357f394c3ecb9bae3e465cc4a154
DoSomething/gambit,DoSomething/gambit
lib/middleware/campaign-keyword.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n({\n mainConfigFile: './requirejs.conf.js',\n paths: {\n jquery: 'lib/jquery/jquery.min',\n almond: 'lib/almond/almond'\n },\n baseUrl: '.',\n name: \"streamhub-map\",\n exclude: ['streamhub-sdk', 'almond'],\n stubModules: ...
javascript
edit
0
2
mit
823ecb6eb0f78d51b950fbe382b73769c8502c58
cheung31/streamhub-map,Livefyre/streamhub-map,Livefyre/streamhub-map
build-prod.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** @license MIT License (c) copyright 2014 original authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\ndefine(['curl/_privileged'], function (priv) {\n\tvar loadScript = priv['core'].loadScript;\n\n\tpriv['core'].lo...
javascript
edit
0
3
mit
af0c5f7cbbfb29a962477160976f8a048eb493d1
unscriptable/curl-cache-bust
cache-bust.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst _ = require(\"lodash\");\nconst express = require(\"express\");\nconst router = express.Router();\nconst session = require(\"express-session\");\nconst connect = require(\"../../utils/database.js\");\nconst restrict = require(\".....
javascript
edit
0
4
bsd-3-clause
f841fdaa19aeb5e35251af3c709f9893fc83cc68
limzykenneth/char,limzykenneth/char
routes2/api/auth.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as types from '../actions/connections';\n\n\nexport default function(state = {}, action) {\n switch (action.type) {\n case types.CONNECTION_REQUEST: {\n const { server, database } = action;\n return { connected: false, ...
javascript
edit
0
6
mit
91266e20e67cb920c86c014202a906af55b387bd
sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui
src/renderer/reducers/connections.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Router, Route, IndexRoute, browserHistory } from 'react-router';\nimport { Provider } from 'react-redux';\nimport store from 'lib/store';\nimport App from 'components/app';\nimport AdminDashboard fro...
javascript
edit
0
0
mit
9493463612fae494ee5f1f644e379b876b8c5655
sirbrillig/voyageur-js-client,sirbrillig/voyageur-js-client
app/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst path = require('path');\nconst fs = require('fs');\n\nconst nodePaths = (process.env.NODE_PATH || '')\n .split(process.platform === 'win32' ? ';' : ':')\n .filter(Boolean)\n .filter(folder => !path.isAbsolute(f...
javascript
edit
0
5
mit
3735ae8afefd31831fa5d8d8445412b0f55ac41a
jaredpalmer/razzle,jaredpalmer/razzle,jaredpalmer/react-production-starter
packages/razzle/config/paths.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n isDarwin: process.platform === 'darwin',\n isNonDarwin: process.platform !== 'darwin',\n isWindows: process.platform === 'win32',\n isLinux: process.platform === 'linux',\n isWindows7: process.platform === 'win32...
javascript
edit
0
0
mit
5c3cc5bce58b5c5b0dd7861b993b25d865e95aee
Aluxian/Messenger-for-Desktop,Aluxian/Messenger-for-Desktop,rafael-neri/whatsapp-webapp,Aluxian/Facebook-Messenger-Desktop,rafael-neri/whatsapp-webapp,Aluxian/Facebook-Messenger-Desktop,Aluxian/Messenger-for-Desktop,Aluxian/Facebook-Messenger-Desktop,rafael-neri/whatsapp-webapp
src/scripts/common/utils/platform.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nProjectsController.$inject = [ 'TbUtils', 'projects', '$rootScope' ];\n\nfunction ProjectsController(TbUtils, projects, $rootScope) {\n const vm = this;\n\n vm.searchObj = term => { return { Name: term }; };\n vm.searchResults ...
javascript
edit
0
2
mit
b7af36180873e1bb8bf201ae3dd7a2d765519ce0
Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC,Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC
dev/app/components/main/projects/projects.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport RaisedButton from 'material-ui/RaisedButton';\nimport ActionAndroid from 'material-ui/svg-icons/action/android';\nimport FontIcon from 'material-ui/FontIcon';\n\nconst styles = {\n button: {\n marg...
javascript
edit
0
1
mit
3f463786c52254f353e5bb9c22155441146f8eef
janmarsicek/material-ui,mit-cml/iot-website-source,hwo411/material-ui,ichiohta/material-ui,w01fgang/material-ui,igorbt/material-ui,hwo411/material-ui,mtsandeep/material-ui,pancho111203/material-ui,manchesergit/material-ui,lawrence-yu/material-ui,frnk94/material-ui,ichiohta/material-ui,hai-cea/material-ui,mtsandeep/mate...
docs/src/app/components/pages/components/RaisedButton/ExampleComplex.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n collectCoverageFrom: [\n \"**/src/**/*.{js,jsx}\",\n \"!**/index.js\",\n ],\n coverageDirectory: \"<rootDir>/packages/storybook/coverage\",\n coveragePathIgnorePatterns: [\n \"node_modules\",\n \"pac...
javascript
edit
0
0
apache-2.0
915acf8a0b9012f04825846b91c68c1ac0ed9df1
Autodesk/hig,Autodesk/hig,Autodesk/hig
packages/storybook/jest.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mysql = require('mysql');\n\nexports.connection = mysql.createConnection({\n host: 'localhost',\n user: 'root',\n database: 'uncovery'\n});\n\nexports.initialize = function(callback) {\n exports.connection.connect();\n};\n\n```\...
javascript
edit
0
1
mit
6a06c6ffcaf5d3456ffa0830aee5efbeed19f540
team-oath/uncovery,team-oath/uncovery,team-oath/uncovery,scottdixon/uncovery,scottdixon/uncovery,scottdixon/uncovery,scottdixon/uncovery,team-oath/uncovery
server/db/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n if (window.location.href.search(/query=/) == -1) {\n $('#query').one('click, focus', function() {\n $(this).val('');\n });\n }\n\n $(document).bind('keyup', function(event) {\n if ($(eve...
javascript
edit
0
1
mit
a2f5836cc763ed63d2bba47e494c636f64ef0b7e
rubygems/rubygems.org-backup,square/rubygems.org,rubygems/rubygems.org-backup,square/rubygems.org,square/rubygems.org,rubygems/rubygems.org-backup
public/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 103531
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefaultScope(4);\nintRange(-8, 7);\n\nc10_Car = Clafer(\"c10_Car\").withCard(4, 4);\nc11_owner = c10_Car.addChild(\"c11_owner\").withCard(1, 1);\nc21_Person = Clafer(\"c21_Person\").withCard(4, 4);\nc11_owner.refToUnique(c21_Person);\nC...
javascript
edit
0
0
mit
fbd4d6a6a34a13f7d3b506baf6e7687364707a5e
gsdlab/chocosolver,gsdlab/chocosolver
src/test/resources/positive/i205-ref-disambiguation-II.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react'\nimport {LineChart} from 'react-d3-basic'\n\nimport classes from './RoomChart.scss'\n\nclass RoomChart extends React.Component {\n static propTypes = {\n data: PropTypes.object\n };\n rende...
javascript
edit
0
3
mit
987a064c7ee618788b74709d49ea9727a4bfa2e2
seriallos/hubot-stats-web,seriallos/hubot-stats-web
src/views/HomeView/RoomChart.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require(\"path\");\nvar fs = require(\"fs-extra\");\nvar assert = require(\"assert\");\n\nvar Box = require(\"../\");\n\nvar TRUFFLE_BOX_DEFAULT = \"<EMAIL>:trufflesuite/truffle-init-default.git\";\n\ndescribe(\"Unbox\", func...
javascript
edit
0
3
mit
5b5df02c9120d9d13616f9dcabda1a959191ee19
ConsenSys/truffle
packages/truffle-box/test/unbox.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\nvar logger = require('winston');\nvar request = require('superagent');\n\nfunction SlackGateway(incomingURL, channelMapping) {\n this.incomingURL = incomingURL;\n this.invertedMapping = _.invert(channelMapp...
javascript
edit
0
2
mit
bbdf0c9d323e17a31f9e2e1d6442012fd1e47fdf
ekmartin/slack-irc,tcr/slack-irc,andreaja/slack-irc,lmtierney/slack-irc,leeopop/slack-irc,umegaya/slack-irc,zabirauf/slack-irc,php-ug/slack-irc,reactiflux/discord-irc,robertkety/slack-irc,erikdesjardins/slack-irc,xbmc/slack-irc,chipx86/slack-irc,mxm/slack-irc
lib/slack-gateway.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nExt.define('Densa.overrides.HasMany', {\n override: 'Ext.data.association.HasMany',\n /**\n * Allow filters in storeConfig\n *\n * Original overrides filters with filter\n */\n createStore: function() {\n ...
javascript
edit
0
5
bsd-2-clause
761c016727331da4a252f4936390c2fd11097bc0
koala-framework/densajs,Ben-Ho/densajs
src/overrides/HasMany.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar autoload = require('auto-load');\nvar kue = require('kue');\nvar async = require('async');\nvar debug = require('debug')('kue:boot');\nvar jobs = autoload(__dirname);\n\nmodule.exports = function(app) {\n var que...
javascript
edit
0
2
mit
2601364bb01ba8b3bce372440c48f20e41e2c6f0
AnyFetch/gdrive-provider.anyfetch.com
jobs/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar pingPongOutput = function(inputNumber) {\n if(inputNumber % 3 === 0) {\n return \"ping\";\n } else {\n return inputNumber;\n }\n};\n\n```\n\nApply this change: Implement numbers divisible by 5" }, { "role": "assista...
javascript
edit
0
3
mit
e6f6f94480582504c4ff1293e9c5b00e8b450000
JeffreyRuder/ping-pong-app,JeffreyRuder/ping-pong-app
js/scripts.js
rejected_duplicate
Near-duplicate of sample 72560
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar pingPong = function(i) {\n if (isPingPong(i)) {\n return pingPongType(i)\n } else {\n return false;\n }\n}\n\nvar pingPongType = function(i) {\n if ((i % 3 === 0) && (i % 5 != 0)) {\n return \"ping\";\n } else if (...
javascript
edit
0
4
mit
84639f7c85a9ae4109dee5b042e44fecc16c02dd
kcmdouglas/pingpong,kcmdouglas/pingpong
js/scripts.js
rejected_duplicate
Near-duplicate of sample 69319
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('underscore');\n\nmodule.exports = function extend (Superclass, prototypeFragment) {\n prototypeFragment = prototypeFragment || {};\n\n var Subclass = function () {\n if (_.isFunction(protot...
javascript
edit
0
2
mit
2fadeb3eaf5c182bd29380edc7b7c5666b37177e
ImpactFlow/flow
lib/extend.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n\n// internal\nvar mixin = require('./mincer/common');\n\n\nmodule.exports = {\n VERSION: '0.0.0',\n\n EngineTemplate: require('./mincer/engine_template'),\n Environment: require('./mincer/environment'),\n ...
javascript
edit
0
0
mit
cb7b7847c3324bb5dbbea5b9e185cece8eaf2b96
rhyzx/mincer,mcanthony/mincer,nodeca/mincer,inukshuk/mincer
lib/mincer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ExecutorBase from '../../action/Executor';\nimport types from '../../action/types';\n\nexport default class Executor extends ExecutorBase {\n\n _onAttack(action, world) {\n\n }\n\n}\n```\n\nApply this change: Remove empty c...
javascript
edit
0
0
mit
58dd0255dc16aea48eedc2bee64da922a9e8d394
DirtyHairy/mayrogue-deathmatch,DirtyHairy/mayrogue-deathmatch
src/server/action/Executor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\n\nmodule.exports = function (config) {\n config.set({\n basePath: 'public',\n browsers: ['ChromeHeadlessCustom'],\n files: [\n 'styles/index.css',\n 'scripts/mithril.min.js',\n 'scripts/un...
javascript
edit
0
3
mit
7be59a49cb351dcfa4874c885ba017277027849b
caleb531/connect-four
karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n(function () {\n\n var expect = require('chai').expect;\n\n var collect = require('../src/collect');\n\n describe('collect.js', function () {\n\n it('should exist', function () {\n expect(collect).to.be.ok;\n...
javascript
edit
0
1
mit
050359c7399b9e8905d114a2438fa7e374da9811
JakeSidSmith/jargs
tests/collect.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ngoog.provide('Main');\n// Core\n// Either require 'Blockly.requires', or just the components you use:\ngoog.require('Blockly');\ngoog.require('Blockly.FieldDropdown');\ngoog.require('Blockly.FieldImage');\ngoog.require('Blockly.FieldNum...
javascript
edit
0
1
apache-2.0
ebdaf4dd46279ee1650fd4fc1a5128f0c404ee79
mark-friedman/blockly,picklesrus/blockly,google/blockly,picklesrus/blockly,mark-friedman/blockly,mark-friedman/blockly,google/blockly,mark-friedman/blockly,mark-friedman/blockly,mark-friedman/blockly,google/blockly,rachel-fenichel/blockly,rachel-fenichel/blockly,google/blockly,rachel-fenichel/blockly,google/blockly,rac...
tests/compile/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n var i=0;\n var $td;\n var state;\n\n function checkDocumentsStatuses(){\n $.getJSON(\"/api/documents_states\", function(data){\n var $bars = $(\".bar\");\n for(i=0;i<$bars.length;i++){\n ...
javascript
edit
0
2
mit
3c21402775b39586d62cc137f4832c3397192aac
analiceme/chaos
public/javascripts/documents.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar sigintHooked = false;\n\nmodule.exports = function sigintHook( fn ) {\n\tif ( sigintHooked ) {\n\t\treturn;\n\t}\n\tsigintHooked = true;\n\t// ctrl+c should stop this task and quit grunt gracefully\n\t// (process.on(\"SIGINT\", fn) ...
javascript
edit
0
2
mit
b6988ddfadcc5636fcdfff772715cd5199954f04
peol/grunt-surveil
tasks/lib/sigint-hook.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ncustomElements.define('declarative-shadow-dom', class extends HTMLTemplateElement {\n static get observedAttributes() {\n return [];\n }\n\n constructor(self) {\n // assignment required by polyfill\n self =...
javascript
edit
0
4
mit
6eb0da204f11a2396f1f663675c0e5406554ca9b
tomalec/declarative-shadow-dom,tomalec/declarative-shadow-dom
declarative-shadow-dom.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport test from 'ava';\nimport fn from '../source/libs/compare-versions';\n\ntest('Compare versions', t => {\n\tt.is(-1, fn('1', '2'));\n\tt.is(-1, fn('v1', '2'));\n\tt.is(-1, fn('1.1', '1.2'));\n\tt.is(-1, fn('1', '1.1'));\n\tt.is(-1,...
javascript
edit
0
1
mit
594ece2b5001d39a2cd255c2a25829a1291cb75f
busches/refined-github,busches/refined-github,sindresorhus/refined-github,sindresorhus/refined-github
test/compare-versions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n/* Component with a state */\nexport default class AddChatMessage extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tthis.state = {message: ''}\n\t}\...
javascript
edit
0
2
mit
bd77652a50eb0feab274d65ed45a127ddf2402c7
axax/lunuc,axax/lunuc,axax/lunuc
src/components/chat/AddChatMessage.js
rejected_duplicate
Near-duplicate of sample 102748
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path'),\n assert = require('assert'),\n fs = require('fs');\n\nvar carto = require('../lib/carto');\nvar tree = require('../lib/carto').tree;\nvar helper = require('./support/helper');\n\nfunction cleanupItem(k...
javascript
edit
0
11
apache-2.0
67b66b5568f264a9ed4b0940de406ed26797fd4e
pnorman/carto,clhenrick/carto,CartoDB/carto,CartoDB/carto,gravitystorm/carto,stefanklug/carto,tomhughes/carto,whitelynx/carto,mapbox/carto,midnightcomm/carto,madeinqc/carto,1ec5/carto
test/specificity.test.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"m.withAttr()\", function () {\n\t\"use strict\"\n\n\tit(\"calls the handler with the right value/context without callbackThis\", function () { // eslint-disable-line\n\t\tvar spy = sinon.spy()\n\t\tvar object = {}\n\t\tm.with...
javascript
edit
0
1
mit
ee8ab3561b9722c327bac0b1ea082ab510156977
MithrilJS/mithril.js,tivac/mithril.js,lhorie/mithril.js,impinball/mithril.js,barneycarroll/mithril.js,impinball/mithril.js,tivac/mithril.js,pygy/mithril.js,MithrilJS/mithril.js,pygy/mithril.js,barneycarroll/mithril.js,lhorie/mithril.js
test/mithril.withAttr.js
rejected_duplicate
Near-duplicate of sample 109246
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst prompts = require('prompts')\nconst addHook = require('../lib/add-hook')\nconst { onCancel } = require('../lib/utils')\nconst { blue, yellow } = require('kleur')\n\nmodule.exports = async (argv, globalOpts) => {\n const res = awa...
javascript
edit
0
3
mit
03217724b92da3636e1e8b81acd35d652a21bc57
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/expo/bin/commands/add-hook.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport gulp from 'gulp'\nimport path from 'path'\nimport BrowserSync from 'browser-sync'\nimport { compiler, handleWebpackResults } from '../webpack/compiler'\n\nconst browserSync = BrowserSync.create()\nconst args = global.__args\ncons...
javascript
edit
0
2
mit
e65b54770e47356e2aba9afc46b1551fa7ece6b0
3five/Rudiments-Stack,3five/Rudiments-Stack,3five/Rudiments-Stack,3five/Rudiments-Stack,3five/Rudiments-Stack
build/tasks/dev.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { NodeComponent } from 'substance'\nimport { renderEntity } from '../../entities/entityHelpers'\n\nexport default class RefComponent extends NodeComponent {\n\n render($$) {\n const db = this.context.pubMetaDbSession.getDocum...
javascript
edit
0
3
mit
2fbf834731d37d53d81238f58866ff90edca5cbb
substance/texture,substance/texture
src/editor/components/RefComponent.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Drop parens for arrow function" }, { "role": "assistant", "content": "var words = 'Hello Camp JS'.split(' ');\nwords.forEach(word => document.body.innerHTML += '<p>' + word + '</p>');\n" } ]
javascript
new_file
0
1
mit
eb3035ffcf0d68ad7477c0b25021fa46cbe32ab1
markdalgleish/slush-campjs-gulp
templates/src/scripts/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar packageJson = require('../package.json');\n\nvar program = require('commander');\n\nprogram\n .version(packageJson.version)\n .description(packageJson.description)\n .command('convert', 'convert Avails betw...
javascript
edit
0
0
mit
67098dc24693d31a34ac2fd78d9b145b4e8aee9a
pivotshare/avails
bin/avails.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst BinaryPjax = require('../base/binary_pjax');\nconst Client = require('../base/client');\nconst defaultRedirectUrl = require('../base/url').defaultRedirectUrl;\nconst getLoginToken = require('../common_func...
javascript
edit
0
4
apache-2.0
225f12f2527e9d8d7d6d4b65da642375d31ffbcc
negar-binary/binary-static,binary-static-deployed/binary-static,ashkanx/binary-static,4p00rv/binary-static,ashkanx/binary-static,binary-com/binary-static,raunakkathuria/binary-static,binary-static-deployed/binary-static,kellybinary/binary-static,kellybinary/binary-static,4p00rv/binary-static,binary-com/binary-static,bi...
src/javascript/binary/static_pages/video_facility.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport md from 'components/md'\n\nconst WhenToUseAttrs = () => md`\n ## When to use attrs?\n\n You can pass in attributes to styled components using \\`attrs\\`, but\n it is not always sensible to do so.\n\n The rule of thumb is to ...
javascript
edit
0
1
mit
2e4976b3515f7afda8275fe89b2ac16b3e2c4f2c
styled-components/styled-components-website,styled-components/styled-components-website
sections/faqs/when-to-use-attrs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\n\nmodule.exports = function (methodName, config) {\n\n\t// Ensure the minimum parameters have been passed\n\tif (!methodName || !_.isString(methodName)) {\n\t\tthrow new Error('The first parameter passed to `...
javascript
edit
0
12
mit
69f93bb91f57900f337b6ba7c5d0602e6846cdd8
trayio/threadneedle
lib/addMethod/validateRESTInput.js
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nListController = RouteController.extend({\n layoutTemplate: 'Layout',\n\n subscriptions: function () {\n this.subscribe('hosts');\n },\n\n action: function () {\n this.render('HostList');\n }\n\n});\n\n```\n\nApply this chang...
javascript
edit
0
1
mit
16fa91c15f27843b8d947ca47fac4e50bd765d2f
steyep/syrinx,hb5co/syrinx,mikebarkas/syrinx,bfodeke/syrinx,bfodeke/syrinx,hb5co/syrinx,steyep/syrinx,shrop/syrinx,shrop/syrinx,mikebarkas/syrinx
lib/controllers/list_controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet mongoose = require('mongoose');\nlet Schema = mongoose.Schema;\n\nlet teamSchema = new Schema({\n name : {\n type: String,\n required: true,\n unique: true\n },\n email : {\n typ...
javascript
edit
0
0
apache-2.0
be394881923665df48a9d9b82c290e2c8a03a41a
asso-labeli/nuitinfo,asso-labeli/nuitinfo,asso-labeli/nuitinfo
server/entities/team/team.model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Chip Component Stories.\n *\n * Site Kit by Google, Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You...
javascript
edit
0
1
apache-2.0
ea87c51a6de416f083d9015166db9008b800da61
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
assets/js/components/Chip.stories.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @ngdoc filter\n * @name dockstore.ui.filter:PreviewFilter\n * @function\n * @description\n * # PreviewFilter\n * Filter in the dockstore.ui.\n */\nangular.module('dockstore.ui')\n .filter('PreviewFilter', [func...
javascript
edit
0
3
apache-2.0
cacebb76a7554c5713d4f88a8060969c0eea7d7c
ga4gh/dockstore-ui,ga4gh/dockstore-ui,ga4gh/dockstore-ui
app/scripts/filters/previewfilter.js
rejected_duplicate
Near-duplicate of sample 97218
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n \"use strict\";\n GOVUK.Tracker.load();\n var cookieDomain = (document.domain === 'www.beta.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : document.domain;\n GOVUK.analytics = new GOVUK....
javascript
edit
0
1
mit
a42559d9fca840fc4ac9f3bd90e781a952c64fa9
AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/di...
app/assets/javascripts/_analytics.js
rejected_duplicate
Near-duplicate of sample 95189
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Promisify synchronous function\n\n'use strict';\n\nvar callable = require('es5-ext/lib/Object/valid-callable')\n , deferred = require('../../deferred')\n , isPromise = require('../../is-promise')\n , process...
javascript
edit
0
3
isc
4ec65ebe85d0a1f74373840b5d3418888b30caf6
medikoo/deferred
lib/ext/function/promisify-sync.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst autoUpdater = require('electron').autoUpdater\nconst Menu = require('electron').Menu\n\nvar state = 'checking'\n\nexports.initialize = function () {\n autoUpdater.on('checking-for-update', function () {\n state = 'checking'\n ...
javascript
edit
0
4
mit
b7648a75e3fa793aedcbf902b11c64133b34a893
blep/electron-api-demos,blep/electron-api-demos,PanCheng111/XDF_Personal_Analysis,blep/electron-api-demos,PanCheng111/XDF_Personal_Analysis,electron/electron-api-demos,blep/electron-api-demos,PanCheng111/XDF_Personal_Analysis,electron/electron-api-demos,electron/electron-api-demos
auto-updater.js
rejected_duplicate
Near-duplicate of sample 109052
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { configure, addDecorator } from '@storybook/react';\nimport { setDefaults } from '@storybook/addon-info';\nimport { setOptions } from '@storybook/addon-options';\nimport backgroundColor from 'react-storybook-decorator-background...
javascript
edit
0
1
mit
8d7f9f021d8fbd1469bd812591ff07be1262ac8e
teamleadercrm/teamleader-ui
.storybook/config.js
rejected_duplicate
Near-duplicate of sample 81477
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst presets = [\n [\n \"@babel/env\",\n {\n targets: {\n edge: \"18\",\n firefox: \"66\",\n chrome: \"73\",\n safari: \"12\",\n ie: \"9\"\n }\n },\n ],\n];\n\nmodule.exports = {p...
javascript
edit
0
0
mit
e1cbf4dbc5186e87a81d40b987f4944ddecfbee6
defunctzombie/commonjs-assert
babel.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular\n .module('app')\n .run([\n '$document',\n '$rootScope',\n function($document, $rootScope) {\n function visibilitychanged() {\n var d = $document[0],\n isHidden = d.hidden || ...
javascript
edit
0
5
mit
b79deb524fe24ae0e82bb1cf377b497657bba459
xemle/spop-web,Schnouki/spop-web,Schnouki/spop-web,xemle/spop-web
public/scripts/run/visibilityEvents.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = ServerFactory => class HttpsServerFactory extends ServerFactory {\n create (options) {\n const fs = require('fs')\n const https = require('https')\n const t = require('typical')\n const serverOptions = {}\n...
javascript
edit
0
6
mit
d0758e87e20d9a8996a648fa197c10aec62480ca
lwsjs/lws
lib/server-factory-https.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\nconst ExtractTextPlugin = require('extract-text-webpack-plugin');\n\nmodule.exports = {\n entry: {\n app: './app.js'\n },\n\n outp...
javascript
edit
0
0
mit
892a30519995cbbbb05beb80c405fae2c1ccf155
javierportillo/webpack-starter,javierportillo/webpack-starter
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// this Proxy handler will be used to preserve the unaltered behavior of the window global by default\nconst doNothingHandler = {\n get(target, prop) {\n const value = Reflect.get(target, prop);\n\n // make sure the function rece...
javascript
edit
0
1
mit
a2940a6db57615f745b59e8e061ef48993de9918
kaliber5/ember-window-mock,kaliber5/ember-window-mock
addon/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\n\nconst webpack = require('webpack');\nconst CopyWebpackPlugin = require('copy-webpack-plugin');\nconst Dotenv = require('dotenv-webpack');\n\n\nmodule.exports = {\n entry: {\n 'facebook-messenger/hand...
javascript
edit
0
0
mit
d8d9d6772e72e4d52245a233b1fa40f01d923b44
kehitysto/coaching-chatbot,kehitysto/coaching-chatbot
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Check if src dir has been formatted" }, { "role": "assistant", "content": "import { message, danger } from \"danger\";\nimport prettier from 'prettier';\n\nconst srcDir = `${__dirname}/src/**/*.js`;\nconst options = {\n sing...
javascript
new_file
0
0
mit
112aec851eb4c6f85ee4c365f663adc2bc80cb0b
ldabiralai/simulado
dangerfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\nvar fs = require('fs');\n\nvar config = {\n entry: {\n 'app': './app/index.js'\n },\n devtool: 'source-map',\n output: {\n path: __dirname + '/dist',\n filename: `[name].[hash].js`,\n p...
javascript
edit
0
2
mit
96d65ebacf80370c36ac80407ae38c3823294a0e
bsingr/mastermind,bsingr/mastermind
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module(\"Prometheus.services\").factory('UrlConfigDecoder', function($location) {\n return function(defaultHash) {\n var hash = $location.hash() || defaultHash;\n if (!hash) {\n return {};\n }\n // Decodes UTF-...
javascript
edit
0
3
apache-2.0
5cd8fcfc08aa1f68a3e7b07654bf9647e8b46032
thooams/promdash,alonpeer/promdash,lborguetti/promdash,jonnenauha/promdash,juliusv/promdash,jmptrader/promdash,alonpeer/promdash,prometheus/promdash,jonnenauha/promdash,thooams/promdash,thooams/promdash,jonnenauha/promdash,juliusv/promdash,thooams/promdash,jmptrader/promdash,alonpeer/promdash,juliusv/promdash,juliusv/p...
app/assets/javascripts/angular/services/url_config.js
rejected_duplicate
Near-duplicate of sample 73132
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nvar program = require('commander'),\n meta = require('../package.json'),\n lint = require('../index');\n\nvar detects;\n\nprogram\n .version(meta.version)\n .usage('[options] \\'<file or glo...
javascript
edit
0
0
mit
876827176d608677adce254c9cc3c957abbcb5f2
skovhus/sass-lint,benthemonkey/sass-lint,zallek/sass-lint,sasstools/sass-lint,MethodGrab/sass-lint,donabrams/sass-lint,zaplab/sass-lint,joshuacc/sass-lint,srowhani/sass-lint,sktt/sass-lint,carsonmcdonald/sass-lint,Snugug/sass-lint,bgriffith/sass-lint,DanPurdy/sass-lint,srowhani/sass-lint,sasstools/sass-lint,alansouzati...
bin/sass-lint.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst MuxDemux = require('mux-demux')\nconst debug = require('../debug').sub('shoe')\nconst pull = require('pull-stream')\nconst stps = require('stream-to-pull-stream')\nconst psts = require('pull-stream-to-stream')\ncons...
javascript
edit
0
1
mit
11a17e6f8655275a75fd0c9be796440e3a2d43c2
CoderPuppy/movie-voting.js,CoderPuppy/movie-voting.js,CoderPuppy/movie-voting.js
browser/conn.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Boom = require('boom');\n\nexports.register = function (server, conf, next) {\n\n\tconst validate = function(req, decodedToken, callback){\n var exs = server.methods.executionserver.getExecutionServer(decodedToken.executionse...
javascript
edit
0
2
apache-2.0
dfb21cd44ae2c0d1dd70b4a2253839c98daa1683
juanprietob/clusterpost,juanprietob/clusterpost,juanprietob/clusterpost
src/clusterpost-auth/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Validation for bookmark payloads.\n'use strict';\n\nvar Hoek = require('hoek');\nvar Joi = require('joi');\n\nvar validators = {};\n\nvalidators.bookmarkID = Joi.string().guid();\n\n// Bookmark without ID. Used for the update and sav...
javascript
edit
0
0
isc
0719710c9d5c34be3a236028848db437269baf03
mikl/bookmeister,mikl/bookmeister
server/plugins/bookmarks/validators.js
rejected_duplicate
Near-duplicate of sample 83620
true