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/* Voice Tutorial 4: Making a Proxy Call\n API Reference: https://docs.nexmo.com/voice/voice-api/api-reference\n */\n\n'use strict';\nrequire('dotenv').config({path: __dirname + '/../.env'});\nconst app = require('express')();\nconst ...
javascript
edit
0
1
mit
02be6197ffec6c3f6d0214617c815423c6b8c4d4
nexmo-community/nexmo-node-quickstart,nexmo-community/nexmo-node-quickstart
voice/proxy-call.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Bootstrap from 'bootstrap-webpack-plugin'\nimport Path from 'path'\n\n\n\nconst path = Path.join.bind(null, __dirname)\nconst outputDir = path(`build`)\n\nexport default {\n entry: {\n playground: `./examples/playground/main....
javascript
edit
0
0
mit
1836d5b36ad6185e1152de0b11be07c2f10d629f
gregory90/react-popover,littlebits/react-popover,clara-labs/react-popover
webpack.config.babel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar helpers = require('../helpers');\n\nmodule.exports = {\n 'name': 'mixins-before-declarations',\n 'defaults': {\n 'exclude': [\n 'breakpoint',\n 'mq'\n ]\n },\n 'detect': function (ast, parser) {\...
javascript
edit
0
6
mit
c35453c01ded83c521c1b953a3830185aa9bd74c
sktt/sass-lint,srowhani/sass-lint,DanPurdy/sass-lint,srowhani/sass-lint,sasstools/sass-lint,donabrams/sass-lint,ngryman/sass-lint,Dru89/sass-lint,bgriffith/sass-lint,flacerdk/sass-lint,benthemonkey/sass-lint,sasstools/sass-lint
lib/rules/mixins-before-declarations.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { InputGroup, Intent } from '@blueprintjs/core';\n\nconst Option = ({ intent, title, type, value, unit, onChange, inputStyles }) => (\n <label className=\"pt-label...
javascript
edit
0
3
mit
45df2186d52482b810fee9ef71179d46e4886ff8
builtwithluv/ZenFocus,builtwithluv/ZenFocus
app/components/Settings/components/option.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\nCopyright 2015, 2016 OpenMarket Ltd\nCopyright 2020 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obt...
javascript
edit
0
1
apache-2.0
da97d8885b8a9145c933d7cce7c713446f817f6c
matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk
src/components/views/messages/UnknownBody.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global process */\n\nconst nodeEnv = (process.env.NODE_ENV || 'development');\n\nexport default {\n nodeEnv,\n logReduxActions: () => Boolean(process.env.LOG_REDUX_ACTIONS),\n warnOnDroppedErrors: nodeEnv === 'development',\n stu...
javascript
edit
0
1
mit
432b6421bbf4d49d22747bb15f1d0d741c6b4265
popcodeorg/popcode,popcodeorg/popcode,jwang1919/popcode,jwang1919/popcode,outoftime/learnpad,jwang1919/popcode,popcodeorg/popcode,popcodeorg/popcode,jwang1919/popcode,outoftime/learnpad
src/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n createControlSubject,\n createStdinSubject,\n createIOPubSubject,\n createShellSubject,\n} from 'enchannel-zmq-backend';\n\nimport * as fs from 'fs';\nimport * as uuid from 'uuid';\nimport { launch } from 'spawnteract';\n...
javascript
edit
0
4
bsd-3-clause
1bf0f61c03478a1e2277fecbdf770bcb2a920041
rgbkrk/nteract,nteract/nteract,jdfreder/nteract,jdetle/nteract,nteract/nteract,0u812/nteract,rgbkrk/nteract,jdfreder/nteract,rgbkrk/nteract,0u812/nteract,captainsafia/nteract,nteract/nteract,nteract/nteract,jdetle/nteract,rgbkrk/nteract,jdfreder/nteract,0u812/nteract,nteract/composition,captainsafia/nteract,temogen/nte...
src/notebook/api/kernel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n self.addEventListener('message', function(obj) {\n window.setInterval(function() {\n console.log('worker: ' + obj.existence);\n var limit = obj.existence - 1;\n ...
javascript
edit
0
2
mit
385658e20f1f513a77ce34758d0e41f197a8a4ba
AlbertoFuente/lab,AlbertoFuente/lab
core/workers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp')\nvar gulpSequence = require('gulp-sequence')\nvar getEnabledTasks = require('../lib/getEnabledTasks')\nvar os = require('os')\nvar path = require('path')\n\nvar production...
javascript
edit
0
4
mit
15262b0348636af809d6c4b9240428412a367a96
jakefleming/mezzotent,jakefleming/mezzotent,vigetlabs/gulp-starter,jakefleming/mezzotent,greypants/gulp-starter,greypants/gulp-starter,vigetlabs/gulp-starter,jakefleming/mezzotent,greypants/gulp-starter,greypants/gulp-starter,vigetlabs/gulp-starter,vigetlabs/gulp-starter
gulpfile.js/tasks/production.js
rejected_duplicate
Near-duplicate of sample 82722
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar parseCommand = require('./parse-command');\n\nvar router = express.Router();\n\nrouter.post('/', (req, res) => {\n parseCommand(req)\n .then(res.send);\n});\n\nmodule.exports = router;\n\n```\n\n...
javascript
edit
0
2
mit
cb592c2306fbe401c13917a34f0813b5bcb5e04c
NSAppsTeam/nickel-bot
src/router.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { apiConstants, apiProvidersConst, httpService, newsModelFactory } from '../../common/common.js';\n\nexport default class AirPollution {\n static getSummary() {\n let options = httpService.clone(apiConstants.airPollutio...
javascript
edit
0
4
mit
768ea00e7bee2b9de34d07b21fd18813cbdb6f2b
AlexanderAntov/scraper-js,AlexanderAntov/scraper-js
src/providers/weather/air-pollution-service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function ($scope, $location, $service) {\n console.log('CartOauthCtrl');\n\n $scope.hasBeenInited = false;\n\n $scope.startOauthProcess = function() {\n $service.getOauthUrl().then(funct...
javascript
edit
0
5
mit
2df12a10c390da8bf0e886b7717b70126508aa41
agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart
web/src/scripts/controller/CartOauthCtrl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst lock = require('./lock-controller');\nconst utils = require('./utils');\n\nfunction notify(text) {\n console.info(text);\n utils.notifySlack({\n channel: '#alerts',\n text: text,\n username: 'Lock System Monitoring'\n ...
javascript
edit
0
3
mit
994ab2e64b18199d9d0acd34de8cd442aff1841d
straylightlabs/hands-free-lock,straylightlabs/hands-free-lock,straylightlabs/hands-free-lock,straylightlabs/hands-free-lock,straylightlabs/hands-free-lock
LockServer/controllers/health-controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('graceful-fs')\n\nvar BUF_LENGTH = 64 * 1024\nvar _buff = new Buffer(BUF_LENGTH)\n\nfunction copyFileSync (srcFile, destFile, options) {\n var clobber = options.clobber\n var preserveTimestamps = options.preserveTimes...
javascript
edit
0
5
mit
f83b13af8fa49a500fd554a53ba800f999be5919
jprichardson/node-fs-extra
lib/copy-sync/copy-file-sync.js
rejected_duplicate
Near-duplicate of sample 95633
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nconst crypto = require('crypto');\nconst b64 = require('../');\nconst prettyBytes = require('pretty-bytes');\n\nconst timer = {\n reset: () => timer.startTime = process.hrtime(),\n duration: () => process.hrtime...
javascript
edit
0
2
mit
45ab550d51fddf10526996423e1bcd70169c3e6f
lukechilds/base64-async
benchmark/sync-vs-async.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('lib/rules/disallow-objectcontroller', function () {\n var checker = global.checker({\n plugins: ['./lib/index']\n });\n\n describe('not configured', function() {\n\n it('should report with undefined', func...
javascript
edit
0
1
mit
c4a345314585cd23d965d0e52441a275ae53f356
minichate/jscs-ember-deprecations,minichate/jscs-ember-deprecations
test/lib/rules/disallow-objectcontroller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Sfx = {\n sounds: { },\n\n preload: function() {\n // Note to self: Do not preload \"burning tomato\". It doesn't work due to timing issues and just causes overhead.\n },\n\n load: function(fileName) {\n if...
javascript
edit
0
3
mit
ccb8732f686b578c9f1d09c21f5498769f15bf01
burningtomatoes/CabinInTheSnow
src/core/sfx.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function isFocusable(el) {\n let focusableTags = ['INPUT', 'BUTTON', 'LINK', 'SELECT', 'A', 'TEXTAREA'];\n let { tagName, type } = el;\n\n if (type === 'hidden') {\n return false;\n }\n\n return focusableTags.incl...
javascript
edit
0
3
mit
204053d95ffa1429288def46fa1e13941834e045
cibernox/ember-native-dom-helpers,cibernox/ember-native-dom-helpers
addon-test-support/-private/is-focusable.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar commands = []\n\ncommands.ping = {\n adminOnly: true,\n modOnly: false,\n fn: function (client, message) {\n message.reply('Pong!')\n }\n}\n\ncommands['admin-only'] = {\n adminOnly: true,\n modOnly: false,\n fn: function (...
javascript
edit
0
1
unlicense
1a15c2bd96e4356fd5659e52380cc5e519cd2007
Dougley/DiscordFeedback
Commands/Commands/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n *\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF...
javascript
edit
0
5
apache-2.0
ef93b58cecc433382f125702934e3ed30d995eb3
tripodsan/cordova-plugin-file,cadenasgmbh/cordova-plugin-file,tripodsan/cordova-plugin-file,macdonst/cordova-plugin-file,apache/cordova-plugin-file,macdonst/cordova-plugin-file,mnill/cordova-plugin-file,sanmeranam/cordova-file,cadenasgmbh/cordova-plugin-file,mnill/cordova-plugin-file,GenusAS/cordova-plugin-file,purplec...
www/android/FileSystem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { decamelizeKeys } from 'humps'\nimport store from '../../store'\nimport { saveProfile } from '../../actions/profile'\n\nexport function preferenceToggleChanged(obj) {\n const newObj = { ...obj }\n if (newObj.hasOwnProperty('is...
javascript
edit
0
3
mit
cfe552eaf0b7b036a7343da97080bf2660c03866
ello/webapp,ello/webapp,ello/webapp
src/helpers/junk_drawer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as util from '~/assets/js/util'\n\ndescribe('util', () => {\n test('getRSSLink', () => {\n expect(util.getRSSLink('foo')).toEqual({\n hid: 'rss',\n rel: 'alternate',\n type: 'application/rss+xml',\n href...
javascript
edit
0
1
mit
9fd9751f875e2800672c12e66889234375deeb51
sunya9/beta,sunya9/beta,sunya9/beta
__tests__/assets/js/util.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport BaseComponent from './flexberry-base';\n\nexport default BaseComponent.extend({\n tagName: 'td',\n classNames: [],\n column: null,\n record: null,\n\n didInsertElement: function() {\n var _this = this;\n this.$('input'...
javascript
edit
0
2
mit
7adc1e15da0b0e0c11b383758322e2ed3412486a
Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry
addon/components/object-list-view-input-cell.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by crispin on 10/12/2015.\n */\nfunction loadEmbedIframe(onSave) {\n // add modal window\n $('.workspace-menu').append(templates.embedIframe());\n\n // variables\n var modal = $(\".modal\");\n\n // modal f...
javascript
edit
0
3
mit
ece9294c28b8cd0bf3336fecc3ea245a51120c3d
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
src/legacy/js/functions/_loadEmbedIframe.js
rejected_duplicate
Near-duplicate of sample 91317
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport replacePath from \"../helpers/replacePath\";\n\nexport default function (t, path, state, regexps) {\n\tconst sourcePath = path.get(\"source\");\n\tif(sourcePath) {\n\t\treplacePath(t, sourcePath, state, regexps);\n\t}\n}\n```\n\n...
javascript
edit
0
2
mit
6f1ba3e83d9375b92c63b3a5e43f0976eee5a0e8
Velenir/babel-plugin-import-redirect
src/transformers/importExportDeclaration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ApplicationAdapter from 'ghost/adapters/application';\n\nexport default ApplicationAdapter.extend({\n find: function (store, type, id) {\n return this.findQuery(store, type, {id: id, status: 'all'});\n },\n\n find...
javascript
edit
0
1
mit
dd85bdc9d47dba05e574b3217f1f1cd3e171b400
Japh/shortcoffee,dggr/Ghost-sr,BlueHatbRit/Ghost,karmakaze/Ghost,JohnONolan/Ghost,denzelwamburu/denzel.xyz,telco2011/Ghost,ErisDS/Ghost,JulienBrks/Ghost,Kikobeats/Ghost,cwonrails/Ghost,SachaG/bjjbot-blog,sangcu/Ghost,letsjustfixit/Ghost,petersucks/blog,dbalders/Ghost,mohanambati/Ghost,ErisDS/Ghost,SachaG/bjjbot-blog,ST...
core/client/app/adapters/user.js
rejected_duplicate
Near-duplicate of sample 94134
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst TelegramBot = require('node-telegram-bot-api');\n\nconst config = require('../config');\nconst utils = require('./utils');\nconst Kinospartak = require('./Kinospartak/Kinospartak');\n\nconst bot = new TelegramBot(c...
javascript
edit
0
3
mit
061d5ff56ea10b8b1b6441bdfe6dd4c0751ce6b6
TheBeastOfCaerbannog/kinospartak-bot
app/updateChannel.js
rejected_duplicate
Near-duplicate of sample 67439
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar GitHubApi = require('github');\nvar githubapi = new GitHubApi({\n\t// required\n\tversion: \"3.0.0\",\n\t// optional\n\ttimeout: 3000\n});\n\nexports.getPackageJson = function (user, repo, callback) {\n if (!user...
javascript
edit
0
4
mit
361b2f3c3d871da640431e8cd24baeedda15707d
seriema/npmalerts,creationix/npmalerts
lib/github.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {Plugin} = require(\"../edit\")\nconst {menuBar} = require(\"../menu/menubar\")\nconst {inputRules, allInputRules} = require(\"../inputrules\")\nconst {defaultRules} = require(\"./inputrules\")\nconst {defaultMenuItems} = require(...
javascript
edit
0
3
mit
8646b63a22e82765743b102c1665d5e97e831e75
kiejo/prosemirror,tzuhsiulin/prosemirror,tzuhsiulin/prosemirror,kiejo/prosemirror,kiejo/prosemirror,salzhrani/prosemirror,tzuhsiulin/prosemirror,salzhrani/prosemirror,salzhrani/prosemirror
src/schema/defaultsetup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Media from 'ember-responsive/media';\n\n/**\n * An initializer that sets up `ember-responsive`.\n *\n * Refer to {{#crossLink \"Ember.Application.responsive\"}}{{/crossLink}}\n * for examples of how to configure this library befo...
javascript
edit
0
5
mit
08289ce0e335bffcb0126fc940660c465cf13d98
topaxi/ember-responsive,jasonmit/ember-responsive,jasonmit/ember-responsive,jherdman/ember-responsive,topaxi/ember-responsive,freshbooks/ember-responsive,salzhrani/ember-responsive,salzhrani/ember-responsive,elwayman02/ember-responsive,f3ndot/ember-responsive,freshbooks/ember-responsive,f3ndot/ember-responsive,jherdman...
addon/initializers/responsive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport I18nJs from 'i18n-js';\n\nI18nJs.locale = 'en'; // a locale from your available translations\nexport const getLanguages = () => Promise.resolve('en');\nexport default I18nJs;\n\n```\n\nApply this change: Fix test - ge...
javascript
edit
0
1
mit
01c728ab907329058ad29b456a2e6eb3ee2cacb2
AlexanderZaytsev/react-native-i18n,AlexanderZaytsev/react-native-i18n,AlexanderZaytsev/react-native-i18n,AlexanderZaytsev/react-native-i18n
example/src/__mocks__/react-native-i18n.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from './template';\nimport config from 'ember-get-config';\n\nexport default Ember.Component.extend({\n layout,\n download: null,\n mfrUrl: Ember.computed('download', function() {\n ...
javascript
edit
0
1
apache-2.0
f9639831d2d01cfad745f9355f76bd6bd305e932
jamescdavis/ember-osf,crcresearch/ember-osf,CenterForOpenScience/ember-osf,samchrisinger/ember-osf,baylee-d/ember-osf,crcresearch/ember-osf,binoculars/ember-osf,hmoco/ember-osf,pattisdr/ember-osf,binoculars/ember-osf,hmoco/ember-osf,CenterForOpenScience/ember-osf,chrisseto/ember-osf,cwilli34/ember-osf,jamescdavis/ember...
addon/components/file-renderer/component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport path from 'path';\nimport renderApp from './renderApp.js';\nimport express from 'express';\nimport compression from 'compression';\nconst server = express();\nconst port = process.env.PORT || 80;\n\nserver.use(compression());\nse...
javascript
edit
0
1
mit
8094fb5d78b8fecc3a45a0bd7771b034888bd41a
davidgilbertson/davidg-site,davidgilbertson/davidg-site
app/server/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar advertisingCSSRules = [{\n \"trigger\": {\n \"url-filter\": \".*\"\n },\n \"action\": {\n \"type\": \"css-display-none\",\n \"selector\":\n \".ad-promotions-container,\\\n .ad-wide,\\\n .ad-top,\\\n #...
javascript
edit
0
0
mit
725165d485e127498f934e63e0498614dd7d4072
kaishin/Nope,kaishin/Nope,kaishin/Nope
Nope.safariextension/rules/custom/css_rules.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nFileBrowserHelper = {\n markItUp: false,\n\n show: function(markItUp, type) {\n this.markItUp = markItUp\n var textarea_id = $(markItUp.textarea).attr('id');\n FileBrowser.show(textarea_id, '/admin/filebrowser...
javascript
edit
0
1
bsd-3-clause
5d861adc02e43d859cad88b8e08338e625233bc5
Iv/django-markiup-filebrowser,Iv/django-markiup-filebrowser
markitup_filebrowser/static/markitup_filebrowser/sets/markdown/FilebrowserHelper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function(require) {\n 'use strict';\n\n var $ = require('jquery');\n require('bootstrap');\n\n /**\n * This customization allows to define own click, render, show functions for Typeahead\n */\n var Typeahea...
javascript
edit
0
5
mit
21c5f97e898b8f02ff38445536481151affdf077
orocrm/platform,orocrm/platform,orocrm/platform
src/Oro/Bundle/UIBundle/Resources/public/js/extend/bootstrap/bootstrap-typeahead.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = require('../')\n , assert = require('assert')\n\n$.import('Foundation')\n$.NSAutoreleasePool('alloc')('init')\n\n// Subclass 'NSObject', creating a new class named 'NRTest'\nvar NRTest = $.NSObject.extend('NRTest')\n , counter...
javascript
edit
0
1
mit
a13ed5a7f9a50ecd2e5c9341d37dfe795c374c02
mralexgray/NodObjC,TooTallNate/NodObjC,TooTallNate/NodObjC,mralexgray/NodObjC,telerik/NodObjC,telerik/NodObjC,jerson/NodObjC,jerson/NodObjC,jerson/NodObjC
tests/extend.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport React, {\n Platform,\n StyleSheet,\n View,\n} from 'react-native';\n\nimport Layout from './Layout';\n\nexport default class TabBar extends React.Component {\n static propTypes = {\n ...View.propTypes,\n ...
javascript
edit
0
1
mit
59b316ab7f226fddb5ee1475ba7433bf48ea2ee6
exponentjs/react-native-tab-navigator
TabBar.js
rejected_duplicate
Near-duplicate of sample 72403
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nvar SubRowArray = Ember.ArrayController.extend({\n init: function() {\n this._super();\n var oldObject = this.get('oldObject');\n if (oldObject) {\n var content = this.get('content');\n ...
javascript
edit
0
2
bsd-3-clause
6637f4982ba917abdc1123f8cf1b6f615ecc9b73
Gaurav0/ember-table,Gaurav0/ember-table,Cuiyansong/ember-table,nomadop/ember-table,nomadop/ember-table,hedgeserv/ember-table,hedgeserv/ember-table,phoebusliang/ember-table,Cuiyansong/ember-table,phoebusliang/ember-table
addon/controllers/sub-row-array.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (config) {\n config.set({\n basePath: '../..',\n frameworks: ['jasmine'],\n files: [\n // Angular libraries\n 'lib/angular.js',\n 'lib/angular-mocks.js',...
javascript
edit
0
1
mit
a4d75a52e958995836c6136a05238a3a96dfbcf9
Ikornaselur/coredata-api-service
tests/config/karma.unit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njQuery(\n function () {\n jQuery('.datetime-pick').datetimepicker();\n jQuery('.date-pick').datetimepicker({\n 'pickDateOnly': true,\n 'defaultDate': new Date('01/01/1974'),\n 'timeFormat': '',\n 'yearRange': ...
javascript
edit
0
1
apache-2.0
d9de35187567712f563c45ee6eb0df40b233ab00
rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son
app/soc/content/js/datetimepicker-090825.js
rejected_duplicate
Near-duplicate of sample 86905
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Redirect to up to date documentation\n// @namespace sieradzki.it\n// @description Detects if currently viewed online documentation page is the most recent version available, and if not, redirects use...
javascript
edit
0
3
mit
fbed3b71609ec1354bf5140d2bc3d28681d54709
kuc/Redirect-to-up-to-date-documentation
redirectToUpToDateDocumentation.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport actions from '../actions/index.js';\nimport { fetchFPKey } from '../utils/utils';\nconst filepicker = require('filepicker-js');\nimport '../scss/_...
javascript
edit
0
1
mit
4c8392797d795261187a29d84f714cf9b116fcbc
forkful/forkful,forkful/forkful,rompingstalactite/rompingstalactite,rompingstalactite/rompingstalactite,rompingstalactite/rompingstalactite,forkful/forkful
client/components/ImageUpload.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$( document ).ready( function() {\n function showUploadedImage( source ) {\n $( \"#userImage\" ).attr( \"src\", source );\n }\n $( \"#image-form\" ).submit( function() {\n var image = document.getElementById( \"im...
javascript
edit
0
1
mit
5aa417475b32f75560c994fb7cff850e7663d4ca
VitSalis/endofcodes,VitSalis/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes,dionyziz/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes
static/script/user/view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nsuite('serialization', function () {\n setup(function () {\n var documents = [{\n id: 'a',\n title: 'Mr. Green kills Colonel Mustard',\n body: 'Mr. Green killed Colonel Mustard in the study with the candlestick. Mr. G...
javascript
edit
0
1
mit
b4d0577e3734b979a204b44989ec615191b7b632
olivernn/lunr.js,olivernn/lunr.js,olivernn/lunr.js
test/serialization_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by tom on 08/07/16.\n */\n\nlet location = window.location;\nlet isWebsite = location.protocol.indexOf('http') !== -1 && location.host.indexOf('localhost') === -1;\n\nif(!isWebsite) {\n /* Source: https://developer.mo...
javascript
edit
0
0
mit
be716adc76382618e44836f17b37a76a380b2094
Bizboard/arva-mvc
src/utils/hotfixes/DisableTextSelection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Core,\n Dummy,\n Dashboard,\n GoogleDrive,\n Webcam,\n Tus10,\n MetaData,\n Informer } from '../src/index.js'\n\n// import ru_RU from '../src/locales/ru_RU.js'\n// import ...
javascript
edit
0
1
mit
0b748d12de5d129f7e2ec84e0f0d957a677e9f16
varung-optimus/uppy,transloadit/uppy,varung-optimus/uppy,transloadit/uppy,transloadit/uppy,transloadit/uppy,varung-optimus/uppy
example/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(bitcoinWorker, Models) {\n\n function KeyPair() {\n self = this;\n\n self.isGenerated = false;\n\n // self.bitcoin_worker = new Worker('/js/workers/bitcoin_worker.js');\n // self.bitcoin_worker.postMessage();\n /...
javascript
edit
0
2
mit
b8142700dbe5c9f4031c866cd6ac2d4dba2c55ee
MrBluePotato/Dogepocket,enriquez/coinpocketapp.com,MrBluePotato/Dogepocket,enriquez/coinpocketapp.com,enriquez/coinpocketapp.com
app/js/models/key_pair.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\r\n * Run predefined tasks whenever watched file patterns are added, changed or deleted.\r\n *\r\n * ---------------------------------------------------------------\r\n *\r\n * Watch for changes on\r\n * - files in the `assets` fold...
javascript
edit
0
1
mit
edd3ee4cbe2ad7f0ac3a3b975a4f9c2d573ce013
JoshDobbin/CrispyAdmin,JoshDobbin/CrispyAdmin,JoshDobbin/CrispyAdmin
tasks-gulp/config/watch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Midas Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.\n\n$(document).ready(function () {\n 'use strict';\n\n var hideDownloadsForAnon = function () {\n if (json.global.logged !== \"1\") {\n ...
javascript
edit
0
2
apache-2.0
7ce1ab4d5b06b93e73276638e9a91086bb54463a
midasplatform/rsnabranding,midasplatform/rsnabranding,midasplatform/rsnabranding
public/js/custom.layout.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require(\"path\");\n\nmodule.exports = {\n entry: \"./src/index.js\",\n output: {\n filename: \"bundle.js\",\n path: path.resolve(__dirname, \"dist\")\n },\n module: {\n rules: [\n {\n test: /\\.css...
javascript
edit
0
0
mit
d4fe86d1e075e35c7e4a0181c12b147f22f0b418
dadish/ProcessGraphQL,dadish/ProcessGraphQL
GraphiQL/webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n \"use strict\";\n \n App.PostsNewRoute = Ember.Route.extend({\n actions: {\n willTransition: function(transition) {\n var record = this.get('controller.content');\n \n // Allow transition ...
javascript
edit
0
7
mit
d44749756d41329802e332658105640aa5aa2ea8
codelation/blogelator,codelation/blogelator,codelation/blogelator
app/assets/javascripts/blogelator/routes/posts_new_route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global window*/\n/*global angular*/\n/*global ___socket___*/\n(function (window, socket) {\n \"use strict\";\n\n var app = angular.module(\"BrowserSync\", []);\n\n /**\n * Socket Factory\n */\n app.service(\"Socket...
javascript
edit
0
1
apache-2.0
75817975623de3b2ebd5482ffff9d021cccfc96b
pmq20/browser-sync,Iced-Tea/browser-sync,BrowserSync/browser-sync,BrowserSync/browser-sync,syarul/browser-sync,nitinsurana/browser-sync,d-g-h/browser-sync,Teino1978-Corp/Teino1978-Corp-browser-sync,shelsonjava/browser-sync,felixdae/browser-sync,zhelezko/browser-sync,BrowserSync/browser-sync,mcanthony/browser-sync,harmo...
lib/control-panel/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n\toptions: { reporter: 'spec' },\n\tall: { src: 'test/*-test.js' },\n\tapp: { src: 'test/app-test.js' },\n\tnode: { src: 'test/node-test.js' },\n\tnodeServer: { src: 'test/node-server-test.js' }\n};\n\n```\n\nApply ...
javascript
edit
0
0
bsd-2-clause
7ed647f025681828dee8295b3a0976354f3f2162
KK578/generator-kk578,KK578/generator-kk578
configs/grunt/mochaTest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* See license.txt for terms of usage */\nvar Format = {};\nComponents.utils.import(\"resource://fireformat/formatters.jsm\", Format);\n\nvar Firebug = FW.Firebug;\n\nvar FBTestFireformat = {\n PrefHandler: function(prefs) {\n v...
javascript
edit
0
3
bsd-3-clause
ca3373c477bcc7e351554e02b4b4c262e27ed059
kpdecker/fireformat
test/FBTestFireformat.js
rejected_duplicate
Near-duplicate of sample 92582
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconsole.log('\\'Allo \\'Allo! Content script');\n\n// https://gist.github.com/dkniffin/b6f5dd4e1bde716e7b32#gistcomment-1980578\nfunction toggle_visibility(data_id) {\n var matches = document.querySelectorAll(data_id...
javascript
edit
0
3
mit
d4ec5ba0c60c0ab81f7b8945bbafff578e59ff20
GabLeRoux/hide-jira-board-columns,GabLeRoux/hide-jira-board-columns
app/scripts.babel/contentscript.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar env = require('node-env-file');\nenv(\".env\");\n\nvar paths = gulp.paths;\n\nvar $ = require('gulp-load-plugins')();\n\ngulp.task('scripts', function () {\n return gulp.src(paths.src +...
javascript
edit
0
1
mit
397ed5a09edd16cac35ea6f30173b10841a46c7a
adambutler/geo-pusher,adambutler/geo-pusher,adambutler/geo-pusher
gulp/scripts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar dataSource = function () {\n var module = {};\n\n module.load = function (url, callback) {\n d3.json(url, function (_, data) {\n callback(data);\n });\n };\n\n module.loadCSV = function (url, cal...
javascript
edit
0
2
bsd-2-clause
3df8a507d11831c60cf0bef33d6e0872ef167117
cburgmer/buildviz,cburgmer/buildviz,cburgmer/buildviz
resources/public/common/dataSource.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet bottles = 99;\nwhile (bottles != 0)\n{\n console.log(`${bottles} bottles of beer on the wall, ${bottles} bottles of beer.`);\n --bottles;\n console.log(`Take one down and pass it around, ${bottles} bottles of beer on the wall.`);...
javascript
edit
0
0
cc0-1.0
1e7176484d41769d04d46b2f8877764a87e17851
ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovs...
puzzles/99_Bottles/javascript/99bottles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nchrome.webRequest.onBeforeSendHeaders.addListener(\n function(details) {\n details.requestHeaders.push({\n name: \"X-Molotov-Agent\",\n value: \"{\\\"app_id\\\":\\\"electron_app\\\",\\\"app_build\\\":1,\\...
javascript
edit
0
1
bsd-2-clause
99939b68695d1b8b6ff9f765abe7a742c6017845
jleroy/MoloChrome,jleroy/MoloChrome
background.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar deleteOpenSession = function(timeslot_id){\n event.preventDefault();\n $(\"#modal_remote\").modal('hide');\n swal({\n title: \"Are you sure you wish to cancel?\",\n text: \"This will delete your mentoring timeslot.\",\n...
javascript
edit
0
2
mit
d034c23af62b0b007471ce7d178f1878e695243b
theresaboard/theres-a-board,theresaboard/theres-a-board,theresaboard/theres-a-board
app/assets/javascripts/delete_open_session.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport GithubAPI from '../../api/githubAPI';\n\nclass HomePage extends React.Component {\n constructor(props, context) {\n super(props, context);\n\n this.state = {\n showResult: \"l\"\n };\n\n...
javascript
edit
0
2
mit
ba44e3a48b9e383c9d8ad573f920d8f3a665e483
compumike08/GitHub_Status_API_GUI,compumike08/GitHub_Status_API_GUI
src/components/home/HomePage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Utils = require('./Utils');\nconst testIDs = require('../playground/src/testIDs');\n\nconst { elementByLabel, elementById } = Utils;\n\ndescribe('complex layout', () => {\n beforeEach(async () => {\n await device.relaunchApp()...
javascript
edit
0
1
mit
9f32a721ee065f0a031e766c58a71b74976140f7
ceyhuno/react-native-navigation,wix/react-native-navigation,thanhzusu/react-native-navigation,Jpoliachik/react-native-navigation,3sidedcube/react-native-navigation,ceyhuno/react-native-navigation,ceyhuno/react-native-navigation,chicojasl/react-native-navigation,guyca/react-native-navigation,chicojasl/react-native-navig...
e2e/ComplexLayout.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nexport const PIPELINES_INITIAL_PAGE_SIZE = 2;\nexport const PIPELINES_PAGE_SIZE = 2;\n\n```\n\nApply this change: Use proper page sizes again" }, { "role": "assistant", "content": "// @flow\n\nexport const PIPELI...
javascript
edit
0
0
mit
2200396395d73750261c7900d6c88da19348ae1c
buildkite/frontend,buildkite/frontend
app/components/OrganizationShow/constants.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar _ = require('lodash');\nvar P = require('bluebird');\nvar humps = require('humps');\nvar Schemas = require('../generators/schemas');\n\nfunction ResourceDeserializer(model, params) {\n var schema = Schemas.schemas[mo...
javascript
edit
0
6
mit
11cbb36d19865113636b291e207e5dd587bbd1e2
SeyZ/forest-express-mongoose
deserializers/resource.js
rejected_duplicate
Near-duplicate of sample 101730
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n angular\n .module('scrum_retroboard')\n .controller('UserController', ['$scope', '$http', 'sessionService', 'userService', UserController]);\n\n function UserController($scope, $...
javascript
edit
0
1
mit
d22e6c75b22fa5e443dc8f9bf522c85f39a8404c
Endava-Interns/ScrumRetroBoardFrontEnd,Endava-Interns/ScrumRetroBoardFrontEnd
app/components/controllers/UserController.js
rejected_duplicate
Near-duplicate of sample 78295
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nchrome.tabs.onUpdated.addListener(\n function(tabId, changeInfo, tab) {\n var url = tab.url;\n if (url.indexOf('https://www.bing.com/maps/default.aspx') == 0 && changeInfo.status == 'loading') {\n var rtpInde...
javascript
edit
0
4
mit
3b252fb289c7a767a82b8be9712fd415fdd81687
iic-ninjas/bingoo,rot-13/bingoo
bingoo.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nclass Character {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n this.health_ = 100;\n }\n damage() {\n this.health_ -= 10;\n }\n getHealth() {\n return this.health_;\n }\n toString() {\n r...
javascript
edit
0
1
mit
aee94ef6667fdd0d267a2cd1e718756b1c2bb9de
yosuke-furukawa/tower-of-babel
exercises/class_extend/solution/solution.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('billett.admin').controller('AdminTicketRevokeController', function ($http, $modalInstance, order, ticket) {\n var ctrl = this;\n ctrl.order = order;\n ctrl.ticket = ticket;\n\n ctrl.revoke = function () {\n ...
javascript
edit
0
1
mit
75aaf57ec8e76f4be3347831693557e9185c4f01
blindernuka/billett,blindernuka/billett
frontend/admin/ticket/AdminTicketRevokeController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//\n// Copyright 2014 Ilkka Oksanen <<EMAIL>>\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the Licens...
javascript
edit
0
2
apache-2.0
40e46880557d770952e6081978dac7413dd2cc37
ilkkao/mas,ilkkao/mas,ilkkao/mas,ilkkao/mas
server/public/javascripts/frontpage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default class BaseApiService {\n\tconstructor($http, $log, appConfig, path) {\n\t\t'ngInject';\n\n\t\tthis.$http = $http;\n\t\tthis.$log = $log;\n\n\t\tthis._ = _;\n\n\t\tthis.host = `${appConfig.host}:3000`;\n\t\tthis.url = `//$...
javascript
edit
0
1
unlicense
1262480306ea633f4a9b4c56e4131113341a896c
ejwaibel/squarrels,ejwaibel/squarrels
src/app/shared/api/baseApi.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright 2017 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n refines: 'foam.dao.AbstractDAO',\n methods: [\n // Here to finish implementing the int...
javascript
edit
0
0
apache-2.0
4052b15906f82214e20782676479141976bfe9e4
foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2
src/foam/swift/refines/AbstractDAO.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { getWithDefault } from '@ember/object';\nimport IntercomService from 'ember-intercom-io/services/intercom';\nimport cfg from '../config/environment';\n\nexport default IntercomService.extend({\n config: getWithDefault(cfg, 'int...
javascript
edit
0
0
mit
669a5e8b19a97fd63d3288ee0754c3fbca1c65ab
mike-north/ember-intercom-io,mike-north/ember-intercom-io
app/services/intercom.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar pg = require(\"pg\");\nvar Config = require(\"./config\");\nvar Util = require(\"util\");\n\nvar conString = Util.format(\"postgres://%s:%s@%s:%s/%s]\", Config.postgres.username, Config.postgres.password, Config.postgres.host, Confi...
javascript
edit
0
0
mit
5894eade4ebf9e7c110c5b445e651f5251a9fe62
borwahs/natalieandrob.com,borwahs/natalieandrob.com
server/db.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const KEYCODES = {\n 'enter': 13,\n 'tab': 9,\n 'space': 32,\n 'escape': 27,\n 'up': 38,\n 'down': 40\n};\n\n```\n\nApply this change: Add more keycodes used in cms\n\nSRFCMSAL-2597" }, { "role": "assist...
javascript
edit
0
0
mit
42318849244779b3513ffd32dc69d54f179a5d55
mmz-srf/srf-frontend-framework,mmz-srf/srf-frontend-framework,mmz-srf/srf-frontend-framework,mmz-srf/srf-frontend-framework
source/assets/js/utils/fef-keycodes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'knockout',\n 'knockout-mapping',\n 'knockout-arraytransforms',\n 'knockout-validation'\n], function(ko) {\n return ko;\n})\n```\n\nApply this change: Add dirty-flag extension for knockout" }, { "role":...
javascript
edit
0
2
mit
6a7cb14be69d2776f45f79afd7099398ecede329
eapearson/kbase-ui,eapearson/kbase-ui,kbase/kbase-ui,eapearson/kbase-ui,kbase/kbase-ui,kbase/kbase-ui,briehl/kbase-ui,briehl/kbase-ui,kbase/kbase-ui,kbase/kbase-ui,briehl/kbase-ui,eapearson/kbase-ui,eapearson/kbase-ui
src/client/modules/lib/knockout-plus.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nimport {component} from './polymer-es6';\nimport _ from 'lodash';\n\nconsole.log(\"AT LOGIN\");\n\n@component('at-login')\nexport class AtomTwitchLogin {\n static properties() {\n return { };\n }\n\n ready() {\n ...
javascript
edit
0
1
mit
15f20685ed79148e5f7273287923f2b97dceef50
paulcbetts/atom-twitch,paulcbetts/atom-twitch
lib/at-login.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction createMenuItem(parentSelector,menuData){\n var menuListItem=document.createElement('li');\n $(menuListItem).addClass(menuData.class).appendTo(parentSelector);\n var menuLink=document.createElement('a');\n $(menuLink...
javascript
edit
0
2
mit
cef546a8bb537e5ca976045f67d372ccddc36f0b
edysanchez/test_json
js/respuesta.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env phantomjs */\n\nvar system = require('system');\nvar webpage = require('webpage');\n\nvar page = webpage.create();\nvar ua = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) ' +\n 'AppleWebKit/537.36 (KHTML, like G...
javascript
edit
0
2
mit
405e806514889bbcece5cf44266885c7e50615c2
tkmcc/stylish
phjs-main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDom from 'react-dom';\nimport { Route, Router, browserHistory } from 'react-router';\n\nimport \"./vendor/css/skeleton_css/normalize.css\"\nimport \"./vendor/css/skeleton_css/skeleton_css.css\"\n\...
javascript
edit
0
0
mit
6650d1b9ee9afa29c5316646292cc1227e975f23
Decidr/react-decidr,Decidr/react-decidr,Decidr/react-decidr
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport Root from 'components/Root';\nimport configureStore from './stores';\nimport createBrowserHistory from 'history/lib/createBrowserHistory';\n\nimport initialState from...
javascript
edit
0
0
mit
cdd3bbde2eb51db584f67530836a754284de3d7c
rossta/pathfinder,rossta/pathfinder
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * 24.05.2017\n * TCP Chat using NodeJS\n * https://github.com/PatrikValkovic/TCPChat\n * Created by patri\n */\n'use strict'\n\nconst net = require('net')\nconst log = require('./logger')\nconst config = require('../config.json')\...
javascript
edit
0
2
mit
f4143bc419b4cca0d26bbfde5908043fbe8732be
PatrikValkovic/TCPChat
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nimport { defaults } from 'lodash'\nimport { extractStyles, styleLoader } from './helpers'\n\nexport default function ({ isClient }) {\n let babelOptions = JSON.stringify(defaults(this.options.build.babel, {\n presets...
javascript
edit
0
1
mit
2cb6e1e59632bbce7ead7b78b29c0c4bd5592bb6
jfroffice/nuxt.js,mgesmundo/nuxt.js,jfroffice/nuxt.js,mgesmundo/nuxt.js
lib/webpack/vue-loader.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n\t// Tools for client side\n\taddStyleSheet: function(url) {\n\t\tif (document) {\n\t\t\tvar link = document.createElement(\"link\");\n\t\t\tlink.type = \"text/css\";\n\t\t\tlink.rel = \"stylesheet\";\n\t\t\tlink.hre...
javascript
edit
0
5
mit
0e0f29f6d7f816cda8caf647abbe20f04d0b4607
zipang/markdown-bundle,zipang/markdown-bundle
src/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n applyMiddleware,\n combineReducers,\n compose,\n createStore as createReduxStore\n} from 'redux'\n\nconst makeRootReducer = (reducers, asyncReducers) => {\n // Redux + combineReducers always expect at least one...
javascript
edit
0
3
mit
ca68678fc52b5a4b46ed1b8e207a827c6b5c07b8
tseho/react-redux-app-container
src/store.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n angular.module('marvelousnote.notes')\n .service('NotesService', NotesService);\n\n NotesService.$inject = ['$http'];\n function NotesService($http) {\n var service = this;\n\n service.getNotes = function() {...
javascript
edit
0
1
mit
debc7bf35201daa1e0223c0ab37ee496c635406a
patriciachunk/MarvelousNote,patriciachunk/MarvelousNote
app/notes/notes.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar shell = require('shelljs');\nvar parseGitUrl = require('git-url-parse');\n\nmodule.exports.exec = function exec(command) {\n console.log(\" executing: \" + command);\n const options = { silent: true };\n const ref = shell.exec(...
javascript
edit
0
2
mit
59ea8bc9c970f873fea7ad16116d98dfa2779568
storybooks/storybook-deployer,storybooks/storybook-deployer
src/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function () {\n VS.init({\n remainder : null,\n container : $('.visual_search'),\n query : '',\n unquotable: ['day', 'date'],\n callbacks : {\n facetMatches: function(callback) {\n callback(['day', 'dat...
javascript
edit
0
3
mit
f9cf1298e8d1e924167648be8279a01488a989d4
Djo/visualsearch-with-datepicker
javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('dotenv').config()\n\nimport {version} from '../package.json'\nimport path from 'path'\n\nimport Koa from 'koa'\nimport Route from 'koa-route'\nimport Serve from 'koa-static'\n\nimport Octokat from 'octokat'\nimport Badge from '...
javascript
edit
0
1
mit
4d09b36b71853100eda128b4ef50376c3376cd49
hiendv/hireable
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport VNode from 'snabbdom/vnode';\n\nexport function createTextVNode(text) {\n return VNode(undefined, undefined, undefined, unescape(text));\n}\n\nexport function transformName(name) {\n // Replace -a with A to help camel case ...
javascript
edit
0
2
mit
a4e460b40855d689c90b570ba66b6280f924b2a4
appcues/snabbdom-virtualize
src/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2011 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n(function() {\n var include = function(path) {\n document.wr...
javascript
edit
0
4
apache-2.0
ff7bd17fac5efd1b80d6b36bcbceba9f71b4f154
natduca/trace_event_viewer,natduca/trace_event_viewer,natduca/trace_event_viewer
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nHTMLWidgets.widget({\n\n name: \"sigma\",\n \n type: \"output\",\n \n initialize: function(el, width, height) {\n \n // create our sigma object and bind it to the element\n var sig = new sigma(el.id);\n \n // return i...
javascript
edit
0
2
mit
423bd167163010b89a00f871cce83d76f6e52f4e
iankloo/sigma,iankloo/sigma
inst/htmlwidgets/sigma.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { moduleForModel, test } from 'ember-qunit';\nimport {a as testgroup} from 'ilios/tests/helpers/test-groups';\n\nmoduleForModel('course', 'Unit | Serializer | course ' + testgroup, {\n // Specify the other units that are requi...
javascript
edit
0
1
mit
498a81fee3dc30432d25fa79bc455bdeeee08b10
gboushey/frontend,ilios/frontend,dartajax/frontend,djvoa12/frontend,jrjohnson/frontend,stopfstedt/frontend,ilios/frontend,thecoolestguy/frontend,thecoolestguy/frontend,stopfstedt/frontend,gboushey/frontend,gabycampagna/frontend,gabycampagna/frontend,dartajax/frontend,jrjohnson/frontend,djvoa12/frontend
tests/unit/serializers/course-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction getTurnCount(state, robot, memory) {\n for (let turn = 0;; turn++) {\n if (state.parcels.length == 0 || turn > 50) {\n return turn;\n }\n let action = robot(state, memory);\n state = st...
javascript
edit
0
4
mit
77b1c897a9e23e06006a034a46b18dd3c605e1da
bewuethr/ctci
eloquent_js/chapter07/ch07_ex02.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst AV = require('leancloud-storage')\nconst schedule = require('node-schedule')\n\nconst APP_ID = 'yzbpXQpXf1rWVRfAAM8Durgh-gzGzoHsz'\nconst APP_KEY = '020bjTvbiVinVQ21YtWAJ9t8'\nconst INTERVAL = 10 * 60 * 1000;\n\nAV...
javascript
edit
0
3
mit
cb292522bfaff42b453bf8b1ed7b2dd5fd233e0e
zry656565/Hit-Kounter-LC,zry656565/Hit-Kounter-LC
jobs/calc-site-views.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar expect = require('chai').expect,\n config = require('../../../config/config');\n\ndescribe('config', function () {\n\n describe('getConfig', function () {\n\n var configDirectory = '../../../config/';\n...
javascript
edit
0
1
mit
48b88d4dd154a28106347fa48a83bfd57bf998b3
lxanders/community
server/test/functional/config/configSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global\n define,\n require,\n window,\n console,\n _\n*/\n/*jslint devel:true,\n white: true\n */\ndefine([\n 'jquery',\n 'underscore',\n './pro...
javascript
edit
0
1
mit
ba70a80ee9870d2185734f55349f67ac691a2f20
cloud9UG/generator-qsExtension,cloud9UG/generator-qsExtension
app/templates/extension.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Language switcher for Microsoft Docs\n// @namespace curipha\n// @description Add language menu\n// @include https://docs.microsoft.com/*\n// @version 0.0.1\n// @grant ...
javascript
edit
0
5
unlicense
30c6ae39b53d26eca08ff42e37b58f383d965240
curipha/userscripts,curipha/userscripts
language_switcher_for_microsoft_docs.user.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: no_right_click: Add JSDoc and use addEventListener" }, { "role": "assistant", "content": "/**\n * Disables context menus, including those initiated by a right click.\n */\nfunction disableRightClick() {\n window.addEventList...
javascript
new_file
0
1
apache-2.0
e3503e8cbd9ea13f93b1b40f746ce512e988c60b
EndPointCorp/appctl,EndPointCorp/appctl
extensions/no_right_click/apply.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar EventEmitter = require(\"events\").EventEmitter;\nvar util = require(\"util\");\nvar _ = require(\"lodash\");\nvar express = require(\"express\");\nvar Network = require(\"../src/models/network\");\n\nfunction MockClient(opts) {\n\t...
javascript
edit
0
2
mit
2f1eec32b35cdb0c379ece2837edb95fca13e009
FryDay/lounge,rockhouse/lounge,libertysoft3/lounge-autoconnect,MaxLeiter/lounge,libertysoft3/lounge-autoconnect,libertysoft3/lounge-autoconnect,metsjeesus/lounge,realies/lounge,rockhouse/lounge,MaxLeiter/lounge,MaxLeiter/lounge,williamboman/lounge,ScoutLink/lounge,ScoutLink/lounge,ScoutLink/lounge,sebastiencs/lounge,wi...
test/util.js
rejected_duplicate
Near-duplicate of sample 86472
true