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\";\n\n/* global describe, it */\n\ndescribe('Riak client', function() {\n\n var riakClient = require('../lib/riak')();\n\n it('#getServerInfo', function() {\n return riakClient.getServerInfo()\n .the...
javascript
edit
0
1
mit
80da46e990bc2f9562d56874903ecfde718027e7
oleksiyk/riakfs
test/riak.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\n\n// Serve assets in /public\nvar path = require('path');\napp.use(express.static(path.join(__dirname, '../client')));\n\n// Body parsing for JSON POST payloads\nvar bodyParser = ...
javascript
edit
0
1
mit
a30b3ede167cd547af9d367c9c07504e5015d8dc
unixmonkey/caedence.net-2015,unixmonkey/caedence.net-2015
server/app.js
rejected_duplicate
Near-duplicate of sample 86117
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport logger from 'morgan';\nimport bodyParser from 'body-parser';\nimport http from 'http';\n\nconst app = express();\n\napp.use(logger('dev'));\n\napp.use(bodyParser.json());\napp.use(bodyParser.urlenc...
javascript
edit
0
1
mit
851cf0c6edb73b18dac37ffebb5b09c0e5237310
Billmike/More-Recipes,Billmike/More-Recipes
server/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { includePaths, excludePaths } from '../config/utils';\n\nexport default options => ({\n test: /\\.(mjs|jsx?)$/,\n use: [\n {\n loader: 'babel-loader',\n options,\n },\n ],\n include: includePaths,\n exclude:...
javascript
edit
0
1
mit
1bcb78fa324e44fd9dcfebdb0a5f5e409f9a746a
storybooks/storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook
lib/core/src/server/common/babel-loader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst pgp = require('pg-promise')()\n\nconst dbName = 'vinyl'\nconst connectionString = process.env.DATABASE_URL || `postgres://localhost:5432/${dbName}`\nconst db = pgp(connectionString)\n\nconst getAlbums = () => {\n return db.query(...
javascript
edit
0
2
mit
f51217f928277adb8888e52cbcd8d7f373d72df4
Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge
src/db/queries.js
rejected_duplicate
Near-duplicate of sample 68868
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Evernote-webhooks: A project to use webhooks to automate things in Evernote\n */\nvar express = require('express');\nvar config = require('./config.json');\n\nvar app = express();\nvar consumerKey = process.env.consumerKey;\nvar ...
javascript
edit
0
1
mit
ffd6a08630675550427919737f6ddb6020ff1e63
tomzhang32/evernote-webhooks,tomzhang32/evernote-webhooks
main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst webpack = require('webpack');\nconst webpackDevMiddleware = require('webpack-dev-middleware');\nconst webpackHotMiddleware = require('webpack-hot-middleware');\nconst config = require('./webpack.config');\n\nconst app = new (requi...
javascript
edit
0
2
mit
ca7e839ee3013af0f16b3e4c0c88b231063cfc38
quandhz/resaga,quandhz/resaga
examples/async/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('ngAppInit', []).\n\nprovider('$init', function(\n){\n this.$get = function() {\n return {};\n };\n}).\n\ndirective('ngAppInit', function(\n $window,\n $init\n){\n return {\n compile: function(...
javascript
edit
0
1
mit
4f6915eb0ee67ea77a69ac7d4653279abb6e6bbd
gsklee/angular-init
data-init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(app) {\r\n /**\r\n * @apiGroup buildings\r\n * @apiName Show list of buildings\r\n * @apiVersion 3.0.0\r\n * @api {get} buildings Show list of available buildings\r\n * @apiSuccess {[]} b...
javascript
edit
0
3
mit
04866dcdf67fe8a264a0bf6308613339527ed69c
igalshapira/ziggi3,igalshapira/ziggi3
app/api/rooms.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('pingPong', function() {\n it(\"is false for a number that is not divisible by 3 or 5\", function() {\n expect(pingPong(7)).to.equal(false);\n });\n it(\"will run pingPongType if isPingPong is true\", function() {\n ex...
javascript
edit
0
1
mit
1e2f32d2da67b3731deee762f888682884f90099
kcmdouglas/pingpong,kcmdouglas/pingpong
spec/specs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n let height = 1,\n block = '#',\n space = ' ';\n\n if (height<2) {\n return console.log('Error! Height must be >= 2');\n }\n\n for (let i = 0; i < height; i++) {\n console.log(space...
javascript
edit
0
4
mit
d9a2f54d42395ca21edc1de6383049af0d512c42
MastersAcademy/js-course-2017,MastersAcademy/js-course-2017,MastersAcademy/js-course-2017
homeworks/dmitry.minchenko_wer1Kua/homework_2/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\napp.controller('LoginCtrl', ['$scope', '$log', '$route', 'User',\n function($scope, $log, $route, User) {\n $scope.loginForm = {};\n $scope.errors = {};\n\n $scope.login = function() {\n $log.debug('Se...
javascript
edit
0
3
isc
54b272985753eeec263f0efe810197aea8a4106b
cdunklau/alexandria,cdunklau/alexandria,bertjwregeer/alexandria,bertjwregeer/alexandria,cdunklau/alexandria
alexandria/static/js/controllers/login.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*eslint-env node*/\n\n// Import assert function\nglobal.assert = require(\"assert\");\n\n// Code coverage helper\nrequire(\"blanket\")({\n pattern: \"src/sinon.js\"\n});\n\n// 'Simulate' browser environment by creating a window obje...
javascript
edit
0
0
mit
91d8bb02e4216ac90cfe6d2ec98c52785720cc3b
ArnaudBuchholz/training-functions-stub,ArnaudBuchholz/training-functions-stub
node.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createAction } from 'redux-actions';\n\nexport const REQUEST_LOGIN = \"REQUEST_LOGIN\";\nexport const SUCCESS_LOGIN = \"SUCCESS_LOGIN\";\nexport const FAILURE_LOGIN = \"FAILURE_LOGIN\";\nexport const REQUEST_S...
javascript
edit
null
null
mit
1ec5cc77997e6cc254b1891c2efdc1839f63625e
ygkn/DJ-YAGICHAN-SYSTEM,ygkn/DJ-YAGICHAN-SYSTEM
client/src/actions.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * GCMKey provider\n *\n * @description :: Server-side logic for managing users\n * @help :: See http://links.sailsjs.org/docs/controllers\n */\n\nmodule.exports = {\nkey: function key(req, res) {\n sails.log(\"Google Proje...
javascript
edit
0
1
mit
e1b5de724f301ae61ef656dbeab783bc2cdf2d54
SneakSpeak/sp-server
api/controllers/GCMController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n\n\tgrunt.initConfig({\n\n\t\tmeta: {\n\t\t\tbanner: '// ' + grunt.file.read('src/loStorage.js').split(\"\\n\")[0]\n\t\t},\n\n\t\tmin: {\n\t\t\tdist: {\n\t\t\t\tsrc: ['<banner>', 'src/loStorage.js'],...
javascript
edit
0
1
mit
06dba54a9bd08e27756dceebd214841986de9d1a
js-coder/loStorage.js,js-coder/loStorage.js,florian/loStorage.js,florian/loStorage.js,joshprice/loStorage.js,npmcomponent/js-coder-loStorage.js
grunt.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar qb;\nfunction launch() {\n if ( ! qb ) qb = QBug.create();\n qb.launchBrowser();\n// qb.launchBrowser('chromium');\n}\n\nif ( chrome.app.runtime ) {\n ajsonp = (function() {\n var factory = OAuthXhrFactory.create({\n aut...
javascript
edit
0
3
apache-2.0
7f71436ba8d4c879a945d4ba7d88a71f2dbe0a43
osric-the-knight/foam,shepheb/foam,jacksonic/foam,shepheb/foam,foam-framework/foam,osric-the-knight/foam,jacksonic/foam,osric-the-knight/foam,foam-framework/foam,mdittmer/foam,mdittmer/foam,mdittmer/foam,shepheb/foam,jlhughes/foam,jlhughes/foam,jlhughes/foam,foam-framework/foam,jacksonic/foam,foam-framework/foam,mdittm...
apps/crbug/bg.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nthis.Element && function (ElementPrototype) {\n ElementPrototype.matches = ElementPrototype.matches ||\n ElementPrototype.matchesSelector || \n ElementPrototype.mozMatchesSelector ||\n ElementPrototype.msMatchesSelector ||\n...
javascript
edit
0
6
mit
c945aa9f72df97c2244d108d7cb0a4a778d6e2f1
smockle/black-coffee
vendor/assets/javascripts/_element.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport http from '../http';\n\nexport default class collections {\n\n static get(collectionID) {\n return http.get(`/zebedee/collectionDetails/${collectionID}`)\n .then(response => {\n return response...
javascript
edit
0
1
mit
36ca146ddd18461b71f7375b2b8cee064ed4828d
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
src/app/utilities/api-clients/collections.js
rejected_duplicate
Near-duplicate of sample 72136
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Settings component.\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may...
javascript
edit
0
2
apache-2.0
c56370a3518f967a6f4afed8bcc84c17500ee0b3
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
assets/js/googlesitekit-settings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport config from 'config';\n\n\nexport const originMiddleware = async (ctx, next) => {\n ctx.response.set('Access-Control-Allow-Origin', config.origin);\n ctx.response.set('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS...
javascript
edit
0
1
mit
9c2095a5ac8baab688a6a063ebf879ec5768ccb1
FreeFeed/freefeed-server,FreeFeed/freefeed-server
app/setup/initializers/origin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\r\n\tEach Enyo-provided library will annotate this structure with its own\r\n\tversion info. Why? In general, Enyo and its libraries are versioned\r\n\tand released together, but libraries may be versioned separately in\r\n\tthe futu...
javascript
edit
0
0
apache-2.0
e331915acffec129dd38f2d6b797cbe55a39b07f
bright-sparks/enyo,enyojs/enyo,mcanthony/enyo,kustomzone/enyo,beni55/enyo,wikieswan/enyo,PKRoma/enyo,soapdog/enyo,beni55/enyo,enyojs/enyo,kustomzone/enyo,bright-sparks/enyo,zefsolutions/enyo,zefsolutions/enyo,PKRoma/enyo,mcanthony/enyo,wikieswan/enyo,soapdog/enyo
source/boot/version.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path'),\n fs = require('fs'),\n crypto = require('crypto');\n\ndescribe(\"writeFile functionality\", function() {\n var _this = this;\n require('./harness.js')(_this);\n it(\"creates a directory\", fun...
javascript
edit
0
2
bsd-2-clause
1af89b716f562b046bb1673725ee2cb6b660a82d
terribleplan/WorkingDirectory
spec/writeFile.spec.js
rejected_duplicate
Near-duplicate of sample 68077
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node:true */\n\nmodule.exports = {\n afterInstall: function() {\n return this.addBowerPackageToProject('polyfills-pkg');\n },\n\n normalizeEntityName: function() {\n }\n};\n\n```\n\nApply this change: Stop requiring a p...
javascript
edit
0
1
mit
0427b16a7ca1a2f1f5811794d798952787ffc6ea
IvyApp/ivy-redactor,IvyApp/ivy-redactor
blueprints/ivy-redactor/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { IsolatedInlineNodeComponent as SubstanceIsolatedInlineNodeComponent } from 'substance'\n\n/*\n This is overriding Substance.IsolatedInlineNodeComponent to support Models.\n*/\nexport default class IsolatedInlineNodeComponentNe...
javascript
edit
0
2
mit
146601a2d4ebe4f9549146907c9c1fb757cf3405
substance/texture,substance/texture
src/kit/ui/_IsolatedInlineNodeComponent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar nano = require('nano')('http://localhost:5984');\nvar db = nano.db.use('todo');\n\nvar todo = {};\n\nmodule.exports = todo;\n\n```\n\nApply this change: Copy get all logic into a getAll function." }, { "role": "assistant", ...
javascript
edit
0
2
mit
7f641cdf7fa3c1507c50e4bad02ec6ee2f9a13d7
PurityControl/uchi-komi-js
problems/kata/001-todo-backend/001/todo.js
rejected_duplicate
Near-duplicate of sample 67959
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Include The 'require.async' Module\nrequire(\"require.async\")(require);\n\n/**\n * Tokenizes an input string.\n *\n * @param {String} Input\n *\n * @return {Array}\n */\nfunction tokenize (input) {\n return input\n .re...
javascript
edit
0
2
mit
3d6b4cd627992544062a40512957d179fd78561f
itkoren/Lets-Node-ex-6
sentiment/index.js
rejected_duplicate
Near-duplicate of sample 90670
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global isic:true*/\n\nvar isic = isic || {};\n\n_.extend(isic, {\n models: {},\n collections: {},\n views: {},\n router: new Backbone.Router(),\n events: _.clone(Backbone.Events)\n});\n\ngirder.router.enabled(false);\n\...
javascript
edit
0
0
apache-2.0
2c2517cef0f4b3183b8bbeabc72ff754a82178fc
ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive
web_external/js/init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar debug = require('debug')('server');\nvar express = require('express');\nvar path = require('path');\n\nvar routes = require('./routes/index');\n\nvar app = express();\n\napp.use('/', routes);\n\napp.set('view engi...
javascript
edit
0
1
mit
7e33179406372482e0cfba1f14b5959883ae7fa3
team-kke/erichika
backend/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Test = require('./include/runner');\n\nconst setUp = (context) => {\n return context.gitP(context.root).init();\n};\n\ndescribe('remote', () => {\n\n let context;\n let REMOTE_URL = 'https://github.com/steveukx/git-js.git';\...
javascript
edit
0
1
mit
ddcc84a84d3eced473e57c46c5f667424b4386fa
steveukx/git-js,steveukx/git-js
test/integration/test-remote.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n Env: process.env.NODE_ENV || 'development',\n Permissions: {\n viewPage: 'viewPage'\n },\n boxWidth: 55,\n boxHeight: 30,\n Difficulties: {\n 1: {\n name: 'Very Easy',\n ...
javascript
edit
0
0
mit
ce70133b029a387bc4af082e44d85ac0b77bc698
EnzoMartin/Minesweeper-React,EnzoMartin/Minesweeper-React
config/Definitions.js
rejected_duplicate
Near-duplicate of sample 97026
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n var ripper = require('./Rip'),\n encoder = require('./Encode'),\n ui = require('bull-ui/app')({\n redis: {\n host: 'localhost',\n port: '6379'\n }\n }),\n Queue = r...
javascript
edit
0
2
mit
5f6c2a23b524f1b6465e3335956b2d62e9c6f42b
aztechian/ncoder,aztechian/ncoder
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar postcss = require('postcss');\n\nmodule.exports = postcss.plugin('postcss-prefixer-font-face', function (opts) {\n opts = opts || {};\n\n var prefix = opts.prefix || '';\n\n var usedFonts = [];\n\n return function (css, ...
javascript
edit
0
3
bsd-2-clause
80ce4c3203bff1e5848360d91a507778ea86edc3
koala-framework/postcss-prefixer-font-face
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar test = require('tape')\nvar names = require('../lib/imageref.js')\n\ntest('litmus', function (t) {\n t.plan(2)\n t.looseEqual(\n names(['1', '']),\n ['atom-h']\n )\n t.looseEqual(\n names(['1', 'gc']),\n ['bond-left'...
javascript
edit
0
1
isc
350cfb9149d7137d54cc53dee10d6d367ab24bfb
figlief/jsatomix
test/imagenames.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst path = require('path');\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst routes = require('./controllers/routes');\n\nlet app = express();\n\n// Configure view engine and vie...
javascript
edit
0
0
mit
3086a6cb835bc47ca26c357178612f01b6f4ade8
kwhinnery/todomvc-plusplus,kwhinnery/todomvc-plusplus
src/server/webapp.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar async = require(\"async\");\n\nfunction capitalize(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nmodule.exports = function seeder(seedObject, mongoose, logger, cb) {\n if(!cb) {\n c...
javascript
edit
0
4
mit
d117690efaadd5db838818cbe43a1dbaa63ca885
AnyFetch/seeder.js
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { expect } = require('chai');\nconst Plexacious = require('../lib/Plexacious');\nconst config = {\n \"hostname\": process.env.PLEX_SERVER_HOST,\n \"port\": process.env.PLEX_SERVER_PORT,\n \"https\": process.env.PLEX_SERVER_HTTP...
javascript
edit
0
1
isc
b98db4ad0e627c6a5326e8cabfde1e71e4bfdf2e
ketsugi/plexacious
test/plexacious.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction hide_covers() {\n // Remove covers\n $(\".mix_element div.cover\").remove()\n // Add class so cards can be restyled\n $(\".mix_card.half_card\").addClass(\"ext-coverless_card\")\n\n // Remove covers on track page...
javascript
edit
0
2
mit
203add406fbf5e23976bb32cac99bf004ba5eb4d
pbhavsar/8tracks-Filter
src/filter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar cookie = require('cookie');\n\nvar _cookies = cookie.parse((typeof document !== 'undefined') ? document.cookie : '');\n\nfor (var key in _cookies) {\n try {\n _cookies[key] = JSON.parse(_cookies[key]);\n } catch(e) {\n // No...
javascript
edit
0
3
mit
877e9a521fe131978cd63b0af669c01746fe1d8c
ChrisCinelli/react-cookie-async,reactivestack/cookies,xpepermint/react-cookie,eXon/react-cookie,reactivestack/cookies,reactivestack/cookies
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n'use strict';\n\nconst moment = require(\"moment\");\nconst sugar = require(\"sugar\");\nconst chalk = require(\"chalk\");\nconst exec = require(\"child_process\").exec;\n\nprocess.argv.splice(0, 2);\nif (process....
javascript
edit
0
2
mit
d982c14d41f9a36e34471c19bc3cf277a64685ee
sam3d/git-date
index.js
rejected_duplicate
Near-duplicate of sample 69981
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar child_process = require('child_process');\nvar byline = require('./byline');\n\nexports.handler = function(event, context) {\n var proc = child_process.spawn('./main', [JSON.stringify(event)], { stdio: [process.stdin, 'pipe', 'pipe...
javascript
edit
0
1
mit
79bf07a15de57912c2f6a0306e028fb3e99fa31e
ArjenSchwarz/igor,ArjenSchwarz/igor
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nclass Mutex {\n constructor() {\n // Item at index 0 is the caller with the lock:\n // [ <has the lock>, <waiting>, <waiting>, <waiting> ... ]\n this.queue = [];\n }\n\n acquire({ timeout = 60000 } = {}) {\n...
javascript
edit
0
3
mit
f232636afd0a7ab9cb148f7b87aac551a866f3ec
ilkkao/snap-mutex
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar express = require('express');\nvar path = require('path');\nvar bodyParser = require('body-parser');\n\nvar api = require('./nestor/api');\n\nvar app = express();\n\napp.use(bodyParser.json());\n\nvar router = expre...
javascript
edit
0
1
mit
b758446bae6fc066626d04f207c3e668d2a38fd4
maxdeviant/nestor
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Dispatcher prototype\n */\n\nvar dispatcher = Dispatcher.prototype;\n\n/**\n * Exports\n */\n\nmodule.exports = Dispatcher;\n\n/**\n * Dispatcher\n *\n * @return {Object}\n * @api public\n */\n\nfunction Dispatcher() {\n if (!(...
javascript
edit
0
2
mit
f788366f2d9c21eb208bd53575210ed8da881b1b
vebin/barracks,yoshuawuyts/barracks,yoshuawuyts/barracks
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar minimatch = require('minimatch');\n\nvar anymatch = function(criteria, string, returnIndex, startIndex, endIndex) {\n if (!Array.isArray(criteria)) { criteria = [criteria]; }\n if (arguments.length === 1) { return...
javascript
edit
0
7
isc
63978e0a545bb6945964fe0b5c964ccb52a67624
es128/anymatch,floatdrop/anymatch
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fs = require('fs');\n\nfunction reset() {\n exports.out = [];\n exports.xmlEmitter = null;\n exports.opts = {};\n} reset();\n\n/**\n * Load a formatter\n * @param {String} formatterPath\n * @return\n */\nf...
javascript
edit
0
4
mit
e5e3e797753c954d1da82bf29adaf2d6bfacf945
cleydsonjr/gulp-jshint-xml-file-reporter,lourenzo/gulp-jshint-xml-file-reporter
index.js
rejected_duplicate
Near-duplicate of sample 100049
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require('util');\n\nGeometryBounds = function(bounds) {\n this.xKey = \"x\";\n this.yKey = \"y\";\n\n this.bounds = [];\n if(!bounds || !bounds[0]) return;\n\n this.xKey = Object.keys(bounds[0])[0];\n this.yKey = Object...
javascript
edit
0
6
mit
f188b3030f519a90708a57b0b840ec7516d6c53b
alandarev/node-geometry
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\n/**\n * Binary to run a pg server.\n * (C) 2015 Alex Fernández.\n */\n\n// requires\nvar stdio = require('stdio');\nvar server = require('../lib/server.js');\nvar packageJson = require(__dirname + '...
javascript
edit
0
2
mit
47d947642b5199ed81c388a51e5381fd0c6347f6
alexfernandez/pooled-pg
bin/pg-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire.config({\n baseUrl: '../lib',\n paths: {\n 'test': '..',\n 'forge': 'forge.min'\n },\n shim: {\n sinon: {\n exports: 'sinon',\n }\n }\n});\n\n// add function...
javascript
edit
0
3
mit
1142407be4e1884fc79188680f2b8649f19d887f
dopry/browserbox,emailjs/emailjs-imap-client,nifgraup/browserbox,ltgorm/emailjs-imap-client,dopry/browserbox,emailjs/emailjs-imap-client,whiteout-io/browserbox,ltgorm/emailjs-imap-client
test/unit/unit.js
rejected_duplicate
Near-duplicate of sample 104503
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @class CM_FormField_Text\n * @extends CM_FormField_Abstract\n */\nvar CM_FormField_Text = CM_FormField_Abstract.extend({\n\t_class: 'CM_FormField_Text',\n\n\t/** @type Boolean */\n\t_skipTriggerChange: false,\n\n\tevents: {\n\t\...
javascript
edit
0
3
mit
572907e88cc2acf6ad7482f8cee43cce03385d39
vogdb/cm,fvovan/CM,tomaszdurka/CM,zazabe/cm,fauvel/CM,cargomedia/CM,mariansollmann/CM,mariansollmann/CM,njam/CM,vogdb/cm,christopheschwyzer/CM,fvovan/CM,fauvel/CM,tomaszdurka/CM,cargomedia/CM,alexispeter/CM,fvovan/CM,alexispeter/CM,zazabe/cm,fauvel/CM,fvovan/CM,cargomedia/CM,njam/CM,tomaszdurka/CM,mariansollmann/CM,vog...
library/CM/FormField/Text.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Builder.js\n *\n * @author: Harish Anchu <<EMAIL>>\n * @copyright Copyright (c) 2015-2016, QuorraJS.\n * @license See LICENSE.txt\n */\n\nvar StackedHttpKernel = require('./StackedHttpKernel');\n\nfunction Builder() {\n\n /**...
javascript
edit
0
2
mit
ff3e075eba9f87013879c889a8d70e119be04e13
quorrajs/Positron,quorrajs/Positron
lib/stack/Builder.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('getFolders()', function() {\n it('should return the correct list of folders', function() {\n var objects = [\n { Key: '/' },\n { Key: 'test/' },\n { Key: 'test/test/' },\n { Key: 'test/a/b' },\n { ...
javascript
edit
0
2
mit
6e5a575e2bab2ce9b1cb83182a791fe8d1995558
ChrisZieba/dodgercms,ChrisZieba/dodgercms,etopian/dodgercms,etopian/dodgercms
test/utils-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Run tests interactively in the browser\",\n version: '1.0.5-pre.2'\n});\n\nPackage.on_use(function (api) {\n // XXX this should go away, and there should be a clean interface\n // that tinytest and th...
javascript
edit
0
1
mit
c638b15fe519f33b2bfda4ae1269d77d4dba0cae
akintoey/meteor,ndarilek/meteor,Puena/meteor,ljack/meteor,Profab/meteor,ashwathgovind/meteor,DCKT/meteor,nuvipannu/meteor,shrop/meteor,DAB0mB/meteor,deanius/meteor,Paulyoufu/meteor-1,AnthonyAstige/meteor,jirengu/meteor,Ken-Liu/meteor,sdeveloper/meteor,AnjirHossain/meteor,emmerge/meteor,TechplexEngineer/meteor,yanisIk/m...
packages/test-in-browser/package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar log4js = require('log4js');\n\nlog4js.configure({\n appenders: [\n { \n 'type': 'file',\n 'filename': 'logs/mymap.log',\n 'category': ['mymap', 'console'],\n 'maxLogSize': 5242880,\n 'backups':...
javascript
edit
0
2
mit
4dc707df767bd7d4ace82747a9b478a29b7eda2e
k4v1cs/mymap
config/log4js.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { NavLink } from 'react-router-dom';\n\nimport './style.css';\n\nconst Header = props => {\n const { isAdmin, loggedIn } = props;\n return (\n <div>\n <div className=\"navbar\">\n <div...
javascript
edit
0
5
mit
ed79ebfb2f092f386a2b6798ebbbd21dd2f68fbb
jenovs/bears-team-14,jenovs/bears-team-14
client/src/components/Header/Header.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst MySql = require(\"./MySql.js\");\n\nclass Meet{\n constructor(obj){\n Object.keys(obj).forEach(k=>this[k]=obj[k]);\n }\n\n asMarkdown(){\n return `*${this.post_title}* ${this.meet_start_time}\\n_${this.guid}_`;\n }\n\n}\...
javascript
edit
0
1
mit
cf1b6a0f7df449b834d1fecca64a774a6f768593
severnbronies/Sail
DataAccess/Meets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst path = require('path');\n\nconst exec = require('child_process').exec;\n// this is from the env of npm, not node\nconst nodePath = process.env.NODE;\nconst version = process.versions.v8;\nconst tmpfile =...
javascript
edit
0
2
mit
c2d0f37353c6ea1daf5f10c149d01c6e667c3524
js-cli/js-v8flags,tkellen/js-v8flags
fetch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * DefaultKeystoneConfiguration contains the default settings for keystone.\n * @class DefaultKeystoneConfiguration\n * @param {Theme} theme\n * @constructor\n *\n */\nmodule.exports = function DefaultKeystoneConfiguration(theme) {...
javascript
edit
0
5
mit
03bd8cd920c7d2d26e93da9e690cef5a01b710bf
stunjiturner/estorejs,stunjiturner/estorejs,quenktechnologies/estorejs
core/util/DefaultKeystoneConfiguration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = exports = MC\n\nfunction MC () {\n this._loading = 0\n this.models = {}\n}\n\nvar modelLoaders = {}\nMC.model = function (name, loader) {\n modelLoaders[name] = loader\n return MC\n}\n\nMC.prototype.load = function ...
javascript
edit
0
6
isc
703714a2b5d527aa87cd996cbc07c9f3fab3a55d
isaacs/emcee
emcee.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component} from 'react';\nimport Style from 'styled-components';\n\nclass Progress extends Component {\n state = {progress: 0};\n\n componentDidMount() {\n this.props.emitter.on(({progress}) => {\n if (this.stat...
javascript
edit
null
null
mit
272e86c5f7e2d661fff0914abd612f5aef4ee6b1
chitchu/react-mosaic,chitchu/react-mosaic
demo/Progress.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {\n assemble,\n writeFile,\n unicodeVersion\n} = require('./utils.js');\n\nconst properties = [\n 'ASCII',\n 'Alphabetic',\n 'Any',\n 'Default_Ignorable_Code_Point',\n 'Lowercase',\n 'Noncharacter_Code_P...
javascript
edit
0
0
mit
d6484cd7f2cb24f7c0596f363c983c6c2a71057a
GerHobbelt/xregexp,slevithan/xregexp,slevithan/xregexp,slevithan/XRegExp,slevithan/xregexp,GerHobbelt/xregexp,GerHobbelt/xregexp,slevithan/XRegExp
tools/scripts/property-regex.js
rejected_duplicate
Near-duplicate of sample 80900
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar pagination = require('hexo-pagination');\nvar _ = require('lodash');\n\nhexo.extend.generator.register('category', function(locals){\n var config = this.config;\n var categories = locals.data.categories;\n if (config.category_gen...
javascript
edit
0
3
mit
a8514306b93f1311c6052cfe6440e84a1da1cca2
ahaasler/hexo-theme-colos,ahaasler/hexo-theme-colos
scripts/generators.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar request = require('request');\n\nvar opts = {\n uri: 'https://api.github.com' + '/users/' + parseParams(process.argv[2]) + '/events',\n json: true,\n method: 'GET',\n headers: {\n 'User-Agent': 'n...
javascript
edit
0
3
mit
66921fdcec7506f3f86ee34ff9619e1978f7c41d
jm-janzen/scripts,jm-janzen/scripts,jm-janzen/scripts
gevents.js
rejected_duplicate
Near-duplicate of sample 68603
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash');\nvar bluebird = require('bluebird');\nvar fs = bluebird.promisifyAll(require('fs'));\nvar glob = require('glob');\nvar hljs = require('../../build');\nvar path = requi...
javascript
edit
0
1
bsd-3-clause
1528ba519169e493fac28c21d6c483187d24bc36
bluepichu/highlight.js,carlokok/highlight.js,aurusov/highlight.js,highlightjs/highlight.js,MakeNowJust/highlight.js,palmin/highlight.js,teambition/highlight.js,palmin/highlight.js,Sannis/highlight.js,sourrust/highlight.js,isagalaev/highlight.js,tenbits/highlight.js,Sannis/highlight.js,highlightjs/highlight.js,sourrust/...
test/markup/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = buster.referee.assert;\n\nbuster.testCase(\"Call onerror\", {\n\n setUp: function () {\n $ = {};\n $.post = this.spy();\n\n initErrorHandler(\"/error\", \"localhost\");\n },\n \n \"exception within the system...
javascript
edit
0
1
mit
34d660f07f603b9017fe2dcd88518c0a5c175503
lucho-yankov/window.onerror
test/onerror-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nconsole.log(this) //contexto global\nconsole.log(this === window) //true\n\nvar developer = {\n name : 'Erik',\n lastName : 'Ochoa',\n isAdult : true,\n completeName: function(){\n return this.name + this.lastName\n }\n}\n \nc...
javascript
edit
0
1
mit
2b7213f17e1b6206329bbc02693053b04e52669a
Elyager/this-in-depth,Elyager/this-in-depth
this.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('Prerequisites', () => {\n describe('Call the same resource with both http client and iframe', () => {\n it('http headers should be less or equal than iframe ones', () => {\n browser.url('/');\n browser.left...
javascript
edit
0
1
mit
3a04f4e532a7dbba3d560866e9e93b305ae3bf17
apiaryio/apiary-console-seed,apiaryio/apiary-console-seed,apiaryio/console-proxy,apiaryio/console-proxy
test/prerequisite.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Command to handle APS events\n */\nApe.registerCmd(\"event\", true, function(params, info) {\n\t\n\tif(params.multi){\n\t\tvar recipient = Ape.getChannelByPubid(params.pipe);\n\t}else{\n\t\tvar recipient = Ape.getUserByPubid(para...
javascript
edit
0
4
mit
df378b792ed24f04915783f803cc3355b69e6129
ptejada/ApePubSub,ptejada/ApePubSub
APE_Server/APScripts/framework/cmd_event.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Alfred = require('../index');\nconst Builder = Alfred.Builder;\n\nconst bot = new Alfred();\n\nbot.login('username', 'password')\n .then(() => bot.send('servernotifyregister', { 'event': 'server' }))\n .then(() => bot.send('...
javascript
edit
0
4
mit
c907f340b2ac40a6d4af218f2d68df5fde5cc57d
schroffl/alfred-teamspeak
test/test-builder.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst logger = require('../logging');\nconst passport = require('passport');\nconst { setupOIDC } = require('./oidc');\n\nconst getUserById = require('../models/user.accessors').getUserById;\n\nrequire('./providers/ow4.js');\n\nmodule.e...
javascript
edit
0
1
mit
35b55bec4912c6f14351422bc6e6c6fecfd5bfe5
dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta
server/auth/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Raven.js @VERSION\n * https://github.com/getsentry/raven-js\n *\n * Includes TraceKit\n * https://github.com/getsentry/TraceKit\n *\n * Copyright 2013 Matt Robenolt and other contributors\n * Released under the BSD license\n * ht...
javascript
edit
0
0
bsd-2-clause
bdbeb4706abdf570ac5a926a2ed156a67909fac6
grelas/raven-js,Mappy/raven-js,malandrew/raven-js,chrisirhc/raven-js,eaglesjava/raven-js,vladikoff/raven-js,malandrew/raven-js,iodine/raven-js,janmisek/raven-js,chrisirhc/raven-js,housinghq/main-raven-js,housinghq/main-raven-js,getsentry/raven-js,iodine/raven-js,samgiles/raven-js,PureBilling/raven-js,vladikoff/raven-js...
template/_copyright.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nexports.AgGridAurelia = require('./lib/agGridAurelia').AgGridAurelia;\nexports.AgGridColumn = require('./lib/agGridColumn').AgGridColumn;\nexports.AgCellTemplate = require('./lib/agTemplate').AgCellTemplate;\nexports.AgEditorTemplate ...
javascript
edit
0
1
mit
5e44054ad4223d32b53c2312ecd5798b0e114548
ceolter/ag-grid,ceolter/angular-grid,ceolter/angular-grid,ceolter/ag-grid
main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar GitHubAPI = function(accessToken, org, repo) {\n\n var API_URL = 'https://api.github.com/repos/' + org + '/' + repo;\n\n return {\n getBranch: function(branchName) {\n return $.get(API_URL + '/branches/'...
javascript
edit
0
1
mit
f43ddd7cc2e642e267970d9ac33931e1e8ac3821
nhsalpha/vidius,nhsalpha/vidius,nhsalpha/vidius
public/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ready;\n\nbeforeEach(function() {\n\tstorage = TEST_STORAGE;\n\n\tstorage.clear(function() {\n\t\tready = true;\n\t});\n\n\twaitsFor(function() {\n\t\treturn ready;\n\t}, \"the storage to be set up for testing\", 500);\n});\n\nafter...
javascript
edit
0
1
mit
9cfef29bf4495ee906341e1f3836142801093f9c
AntarcticApps/Tiles,AntarcticApps/Tiles
tests/lib/storage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { MJMLElement } from 'mjml-core'\nimport React, { Component } from 'react'\n\nconst tagName = 'mj-spacer'\nconst parentTag = ['mj-column', 'mj-hero-content']\nconst selfClosingTag = true\nconst defaultMJMLDefinition = {\n attrib...
javascript
edit
0
1
mit
632cdba5fab5df66cbbc98bb7168c13e9b5eb81b
mjmlio/mjml
packages/mjml-spacer/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * WidgetNull component.\n *\n * Site Kit by Google, Copyright 2021 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 m...
javascript
edit
0
1
apache-2.0
3d283ba50b964b06e0591114483b2f59e9012d5f
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
assets/js/googlesitekit/widgets/components/WidgetNull.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire('../stanza/dataforms');\n\n\nmodule.exports = function (client) {\n client.disco.addFeature('jabber:x:data');\n client.disco.addFeature('urn:xmpp:media-element');\n client.disco.addFeature('http://jabbe...
javascript
edit
0
2
mit
627f1de997b292bd0069048bdda36b2ba0f144c2
soapdog/stanza.io,legastero/stanza.io,rogervaas/stanza.io,legastero/stanza.io,otalk/stanza.io,flavionegrao/stanza.io,otalk/stanza.io,soapdog/stanza.io,spunkydunker/stanza.io,firdausramlan/stanza.io,spunkydunker/stanza.io,flavionegrao/stanza.io,rogervaas/stanza.io,glpenghui/stanza.io,Palid/stanza.io,glpenghui/stanza.io,...
lib/plugins/dataforms.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {type} from 'ramda';\n\nexport const sanitizeOptions = options => {\n if (type(options) === 'Object') {\n return Object.entries(options).map(([value, label]) => ({\n label: String(label),\n value,\...
javascript
edit
0
2
mit
a3e393d43c1752420360f71c319d2d6ea2300712
plotly/dash,plotly/dash,plotly/dash,plotly/dash,plotly/dash
components/dash-core-components/src/utils/optionTypes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global require, describe, it */\n\nimport assert from 'assert';\nvar urlPrefix = 'http://katas.tddbin.com/katas/es6/language/';\nvar katasUrl = urlPrefix + '__grouped__.json';\n\nvar GroupedKata = require('../src/grouped-kata.js');\n...
javascript
edit
0
1
mit
1dc21a911253f9485a71963701355a226b8a71e5
wolframkriesing/es6-react-workshop,wolframkriesing/es6-react-workshop
test/load-json-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport config from './config/environment';\n\nvar Router = Ember.Router.extend({\n location: config.locationType\n});\n\nRouter.map(function() {\n this.route('lists', function() {\n this.route('show', {p...
javascript
edit
0
1
mit
33afa5699718ca8afcf7ffcda01e17af214da5bd
sabarasaba/moviezio-client,sabarasaba/moviezio-client,sabarasaba/moviez.city-client,sabarasaba/moviez.city-client,sabarasaba/moviezio-client,sabarasaba/moviez.city-client,sabarasaba/moviezio-client,sabarasaba/moviezio-client,sabarasaba/moviezio-client,sabarasaba/moviez.city-client,sabarasaba/moviez.city-client,sabarasa...
app/router.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * grunt-util-options\n * https://github.com/mikaelkaron/grunt-util-process\n *\n * Copyright (c) 2013 Mikael Karon\n * Licensed under the MIT license.\n */\n\nmodule.exports = function(grunt) {\n\t\"use strict\";\n\n\tvar _ = grunt...
javascript
edit
0
1
mit
08b0f2604942a6b48eedf05a0f1a7e1573ad4699
mikaelkaron/grunt-util-options
main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndocument.addEventListener('DOMContentLoaded', function () {\n display('Searching...');\n});\n\nfunction display(msg) {\n var el = document.body;\n el.innerHTML = msg;\n}\n\nchrome.runtime.getBackgroundPage(displayMessages);\n\nfuncti...
javascript
edit
0
1
apache-2.0
87cb50db1913fccaee9e06f4eef8ab16d8564488
mediascape/discovery-extension,mediascape/discovery-extension
popup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ExamplePluginComponent from \"./components/ExamplePluginComponent\";\n\nvar PluginHelper = global.MarathonUIPluginAPI.PluginHelper;\n\nPluginHelper.registerMe(\"examplePlugin-0.0.1\");\n\nPluginHelper.injectComponent(ExamplePlugi...
javascript
edit
0
0
apache-2.0
fd3e37f287d48df7185f8655dab37894ffafaae6
mesosphere/marathon-ui-example-plugin
main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst _ = require('lodash');\n\nconst tests = {\n db: (value) => {\n const keys = ['query', 'connect', 'begin'];\n\n return keys.every((key) => _.has(value, key));\n },\n};\n\nconst ok = require('ok')(tests);\n\...
javascript
edit
0
5
mit
06164aff052d6922f1506398dc60a7dde78a9f98
thebitmill/midwest-membership-services
resolve-cache.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular.module('app.states')\n .run(appRun);\n\n /** @ngInject */\n function appRun(routerHelper, navigationHelper) {\n routerHelper.configureStates(getStates());\n navigationHelper.navItem...
javascript
edit
0
1
apache-2.0
ba70aba5132157e1ec43264a2cc5257ba0ba880c
stackus/api,sreekantch/JellyFish,mafernando/api,sonejah21/api,AllenBW/api,stackus/api,projectjellyfish/api,AllenBW/api,mafernando/api,boozallen/projectjellyfish,projectjellyfish/api,boozallen/projectjellyfish,stackus/api,sonejah21/api,AllenBW/api,sreekantch/JellyFish,sonejah21/api,sreekantch/JellyFish,boozallen/project...
src/client/app/states/manage/cms/cms.state.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport async function up(knex) {\n await knex.schema.createTable('Resource', (table) => {\n table.uuid('id').notNullable().primary()\n table.string('name', 32).notNullable()\n table.string('mime', 32)\n table.string('md5')\...
javascript
edit
0
1
mit
f7d6d3ff62ac6de0022e4b014ac5b04096758d48
thangntt2/chatbot_api_hapi,vietthang/hapi-boilerplate
src/db/migrations/20161005172637_init_demo.js
rejected_duplicate
Near-duplicate of sample 79160
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createStore, applyMiddleware } from 'redux'\nimport logger from 'redux-logger'\nimport thunk from 'redux-thunk'\nimport oaaChat from './reducers'\n\nconst configureStore = () => {\n\tconst store = createStore(\n\t\toaaChat, app...
javascript
edit
0
2
mit
69454caa8503cb7cfa7366d569ed16cd9bf4caa8
danielzy95/oaa-chat,danielzy95/oaa-chat
app/configureStore.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// Load our requirements\nconst glob = require('glob'),\n path = require('path'),\n logger = require('../log');\n\n// Build a list of the available locale files in a given directory\nmodule.exports = function(...
javascript
edit
0
2
apache-2.0
fcbaeb4705d02858f59c1142f77117e953c4db96
transmutejs/core
app/libs/locale/available-locales.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n verbose: !!process.env.VERBOSE,\n moduleNameMapper: {\n testHelpers: '<rootDir>/testHelpers/index.js',\n },\n setupTestFrameworkScriptFile: '<rootDir>/testHelpers/setup.js',\n testResultsProcessor: './node_m...
javascript
edit
0
0
mit
27ea2b2e1951431b0f6bae742d7c3babf5053bc1
tulios/kafkajs,tulios/kafkajs,tulios/kafkajs,tulios/kafkajs
jest.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * Start Bootstrap - Agnecy Bootstrap Theme (http://startbootstrap.com)\n * Code licensed under the Apache License v2.0.\n * For details, see http://www.apache.org/licenses/LICENSE-2.0.\n */\n\n// jQuery for page scrolling feature ...
javascript
edit
0
2
apache-2.0
fd6dd6bbe2220181202535eb6df9715bf78cf956
tibotiber/greeny,tibotiber/greeny,tibotiber/greeny
js/agency.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar pkg = require(process.cwd() + '/package.json');\nvar intrepidjsVersion = pkg.version;\n\n// Dummy index, only shows intrepidjs-cli version\nconsole.log(intrepidjsVersion);\n\n```\n\nApply this change: Use __dirname instead of proces...
javascript
edit
0
0
mit
4fd824256e18f986f2cbd3c54cb1b9019cc1918e
wtelecom/intrepidjs-cli
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n name: 'Ember CLI ic-ajax',\n\n init: function(name) {\n this.treePaths['vendor'] = 'node_modules';\n },\n\n included: function(app) {\n var options = this.app.options.icAjaxOptions || {ena...
javascript
edit
0
3
mit
2f747d79f542577e5cf60d18b9fbf8eea82070da
rwjblue/ember-cli-ic-ajax,tsing80/ember-cli-ic-ajax,stefanpenner/ember-cli-ic-ajax,taras/ember-cli-ic-ajax
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport postcss from 'postcss';\n\nconst postcssFlexibility = postcss.plugin('postcss-flexibility', () => css => {\n\tcss.walkRules(rule => {\n\t\tconst isDisabled = rule.some(({prop, text}) =>\n\t\t\tprop === '-js-display' || text === '...
javascript
edit
0
3
mit
cb0ebc4c7ca492ed3c1144777643468ef0db054e
7rulnik/postcss-flexibility
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = isPromise;\n\nfunction isPromise(obj) {\n return obj && typeof obj.then === 'function';\n}\n```\n\nApply this change: Make the test a bit more strict" }, { "role": "assistant", "content": "module.exports = ...
javascript
edit
0
4
mit
a2172115022e7658573428d9ddf9b094f9c6d1b5
floatdrop/is-promise,then/is-promise,then/is-promise
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nconst express = require('express');\nconst fileExists = require('file-exists');\nconst bodyParser = require('body-parser');\nconst fs = require('fs');\nconst { port = 8123 } = require('minimist')(process.argv.slice(...
javascript
edit
0
4
mit
933ee47b1f2cf923f4937ebb8297cef49c3390f8
finom/node-direct,finom/node-direct
index.js
rejected_duplicate
Near-duplicate of sample 78745
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nconst Discord = require('discord.js');\nconst client = new Discord.Client();\nconst config = require(\"./config.json\");\n\nclient.on('ready', () => {\n console.log(\"I am ready!\");\n // client.channels.get('spam').send(\"Soup is r...
javascript
edit
0
8
mit
edbc6e8931c9c2777520c0ccf0a3d74b8f75ebf6
Rafer45/soup
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n/*!\n * Module dependencies.\n */\n\nvar dummy\n , hotplate = require('hotplate')\n;\n\n\nexports.getAllStores = hotplate.cachable( function( done ){\n \n var res = {\n stores: {},\n collections: {},\n };\n\...
javascript
edit
0
5
mit
bc3e85aafc3fa1095169153661093d3f012424e2
shelsonjava/hotplate,mercmobily/hotplate,mercmobily/hotplate,shelsonjava/hotplate
node_modules/hotCoreStoreRegistry/lib/hotCoreStoreRegistry.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('mwUI.Menu')\n\n .directive('mwMenuTopEntries', function ($rootScope, $timeout) {\n return {\n scope: {\n menu: '=mwMenuTopEntries',\n right: '='\n },\n transclude: true,\n templateUr...
javascript
edit
0
2
apache-2.0
9235990779b1098df387e534656a921107732818
mwaylabs/uikit,mwaylabs/uikit,mwaylabs/uikit
src/mw-menu/directives/mw_menu_top_entries.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Q = require('q');\n\n/**\n * Chai-Mugshot Plugin\n *\n * @param mugshot - Mugshot instance\n * @param testRunnerCtx - Context of the test runner where the assertions are\n * done\n */\nmodule.exports = function(mugshot, testRunne...
javascript
edit
0
4
mit
e1e5840e921465d0454213cb455aca4661bcf715
uberVU/chai-mugshot,uberVU/chai-mugshot
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of...
javascript
edit
0
3
bsd-3-clause
b9c96cfc73b6e0adcb7b747c40ac40c74995ea7f
acdlite/react,apaatsio/react,jorrit/react,krasimir/react,jordanpapaleo/react,mosoft521/react,facebook/react,jameszhan/react,yungsters/react,STRML/react,AlmeroSteyn/react,glenjamin/react,tomocchino/react,Simek/react,trueadm/react,jzmq/react,TheBlasfem/react,silvestrijonathan/react,joecritch/react,yiminghe/react,promethe...
eslint-rules/no-primitive-constructors.js
rejected_duplicate
Near-duplicate of sample 111647
true