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\nimport { assert } from 'chai';\nimport ShadowTemplate from '../src/ShadowTemplate';\n\n\nwindow.MyElement = class MyElement extends HTMLElement {\n greet() {\n return `Hello!`;\n }\n};\ncustomElements.define('my-element', MyElement...
javascript
edit
0
1
mit
a77cae24fb8e0560d2e2bc86f6c08a62b7b36d9d
rlugojr/basic-web-components,basic-web-components/basic-web-components,basic-web-components/basic-web-components,rlugojr/basic-web-components
packages/basic-component-mixins/test/ShadowTemplate.tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n theme: {\n extend: {}\n },\n variants: {},\n plugins: []\n}\n\n```\n\nApply this change: Purge tailwindcss classes not mentioned in apply\n\n[#867]" }, { "role": "assistant", "content": "module.ex...
javascript
edit
0
0
mit
26a2a896c5333e286e16619bc8c9d268d30a814f
arkency/rails_event_store,arkency/rails_event_store,RailsEventStore/rails_event_store,RailsEventStore/rails_event_store,RailsEventStore/rails_event_store,arkency/rails_event_store,arkency/rails_event_store,RailsEventStore/rails_event_store
ruby_event_store-browser/elm/tailwind.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar URI = require('urijs');\nvar _ = require('underscore');\nvar Backbone = require('backbone');\nvar MetaModel = require('./meta-model');\n\nBackbone.PreambleModel = MetaModel.extend({\n getAJAXUrl: function(id) {\n ...
javascript
edit
0
1
cc0-1.0
39fb8e8ef10506fb4ae401d2de1c6ef0e27086f0
eregs/regulations-site,tadhg-ohiggins/regulations-site,tadhg-ohiggins/regulations-site,eregs/regulations-site,18F/regulations-site,18F/regulations-site,18F/regulations-site,18F/regulations-site,tadhg-ohiggins/regulations-site,eregs/regulations-site,eregs/regulations-site,tadhg-ohiggins/regulations-site
regulations/static/regulations/js/source/models/preamble-model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { storiesOf } from '@storybook/react'\nimport { action } from '@storybook/addon-actions'\nimport Tab from 'components/Tab/Tab'\nimport DraggableTab from 'components/Tab/DraggableTab'\nimport Icon from '...
javascript
edit
0
1
mit
1291e59bbf295918de6bcfc430d766717f46f5fa
xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2
stories/tab.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) Ajay Sreedhar. All rights reserved.\n *\n * Licensed under the MIT License.\n * Please see LICENSE file located in the project root for more information.\n */\n\n'use strict';\n\nconst releaseConfig = {\n appId:...
javascript
edit
0
0
mit
05864ed7dd4cf0cf8a0c19ba8c37bc73afb600c3
ajaysreedhar/kongdash,ajaysreedhar/kongdash,ajaysreedhar/kongdash
build/builder-config.js
rejected_duplicate
Near-duplicate of sample 92933
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst React = require('react');\nconst { mapChildren } = require('idyll-component-children');\nimport TextContainer from './text-container';\n\nclass Map extends React.Component {\n render() {\n const {\n idyll,\n hasError...
javascript
edit
0
2
mit
f9cb778aee192923d927d8f1cd2921e235485128
idyll-lang/idyll,idyll-lang/idyll
packages/idyll-components/src/map.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n this.IO = {\n load: function(url, async) {\n if (async) {\n return this.loadAsync(url);\n }\n return this.loadSync(url); \n },\n loadAsync: function(url) {\n var de...
javascript
edit
0
2
apache-2.0
c09f44c763b69b86ec323bc0c7fb7506d47e9e34
zbraniecki/fluent.js,zbraniecki/fluent.js,projectfluent/fluent.js,mail-apps/l20n.js,projectfluent/fluent.js,Pike/l20n.js,l20n/l20n.js,mail-apps/l20n.js,projectfluent/fluent.js,stasm/l20n.js,Swaven/l20n.js,Pike/l20n.js,zbraniecki/l20n.js
lib/io.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @fileoverview Run phantom bootstrapper jobs\n * Spawns a child process to run the phantomjs job, with a callback on\n * completion\n */\n\nvar childProcess = require('child_process'),\n phantomjs = require('phantomjs'),\n ...
javascript
edit
0
2
mit
f3865e87a30c9c93709a2e558e2e1de3c7712df8
Livefyre/lfbshtml,Livefyre/lfbshtml,Livefyre/lfbshtml
src/app/consumer/phantomrunner.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport jwt from 'jsonwebtoken';\n\n// Components\nimport UserDAO from './sql';\n\nimport schema from './schema.graphqls';\nimport createResolvers from './resolvers';\nimport { refreshTokens } from './auth';\nimport tokenMiddleware from ...
javascript
edit
0
7
mit
490e5c6f3847ea49163e788bf25a3e808f45199f
sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit
src/server/modules/user/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet argv = require('yargs').argv;\nlet command = require('node-cmd');\nlet jigsaw = require('./tasks/bin');\nlet mix = require('laravel-mix');\n\nlet AfterBuild = require('on-build-webpack');\nlet BrowserSync = require('browser-sync');\...
javascript
edit
0
3
mit
5601159d3578b952adeda6c7f87beefc86976724
adamwathan/jigsaw,tightenco/jigsaw,tightenco/jigsaw,adamwathan/jigsaw,tightenco/jigsaw
site/webpack.mix.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst lernaAliases = require('lerna-alias').jest()\n\nmodule.exports = {\n testEnvironment: 'node',\n moduleNameMapper: Object.assign(lernaAliases, {\n '^redux-saga/effects$': lernaAliases['^redux-saga$'].replace(/index\\.js$/, 'ef...
javascript
edit
0
0
mit
01955d0e5f99f71043ceb01a43a4888ff53565fe
yelouafi/redux-saga,yelouafi/redux-saga,redux-saga/redux-saga,redux-saga/redux-saga
packages/testing-utils/jest.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\"\nimport { StaticQuery, graphql } from \"gatsby\"\n\nimport Member from \"./Member\"\n\nimport \"./index.module.css\"\n\nconst Team = ({ members }) => (\n <ul styleName=\"root\">\n {members.map((data, inde...
javascript
edit
0
1
mit
036bbbe213ce0a80b56fc6448a86fdb49bf4ed55
subvisual/subvisual.co,subvisual/subvisual.co
src/components/home/Team/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar request = require('request');\nvar assert = require('assert');\nvar helpers = require('../../../lib/test_helpers.js');\n\ndescribe('hljomaholl', function() {\n // The only thing that changes is the form attribute, so why not just r...
javascript
edit
0
1
mit
02896d4a839c87d319101023df1862b16e95f3fd
apis-is/apis
endpoints/hljomaholl/tests/integration_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst way = require('senseway');\n\nconst historyDeleteFrame = (hist, t) => {\n const newHist = way.clone(hist);\n newHist.map((ch) => {\n return ch.splice(t, 1);\n });\n return newHist;\n};\n\nconst historyDuplicateFrame = (hist...
javascript
edit
0
6
mit
513024b1add009b895acd5e12f60094f95fb14a7
axelpale/lately,axelpale/lately
example/drummer/src/historyComponent/reduce.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport mockReq from 'mock-require';\nimport chai from 'chai';\nimport { shallow } from 'enzyme';\n\nimport Match from 'react-router/Match';\n\nchai.should();\n\nglobal.OKAPI_URL = 'http://localhost:9130';\n\nmockReq('stripes-loader!', {...
javascript
edit
0
1
apache-2.0
d694448e175c3c92d9f8ace88aa2c369026aa5bb
folio-org/stripes-core,folio-org/stripes-core,folio-org/stripes-core
test/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * This script keeps the height set on elements with regard to their\n * width for a given aspect ratio. Great for \"display:block\" elements\n *\n * Example usage:\n *\n * <div data-keep-aspect-ratio=\"16:9\">\n *\n * Author: Rod ...
javascript
edit
0
1
bsd-3-clause
7b1d235f444dc3edb8ac53bd8de3396e66a9b418
innaDa/RcmPlugins,jerv13/RcmPlugins,bjanish/RcmPlugins,bjanish/RcmPlugins,innaDa/RcmPlugins,jerv13/RcmPlugins,bjanish/RcmPlugins,jerv13/RcmPlugins,innaDa/RcmPlugins
RcmBrightCoveLib/public/keep-aspect-ratio.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst continuationBit = 1 << 7;\nconst lowBitsMask = ~continuationBit & 0xff;\n\n/**\n * @template {ArrayBufferView} T\n *\n * @param {ReadableStream<Uint8Array>} stream\n * @param {number} length of the returned ArrayBufferView\n * @pa...
javascript
edit
0
5
mit
a9bf8a35794c94c6033f102b500ea10e78755513
Alexendoo/utf,Alexendoo/utf,Alexendoo/utf,Alexendoo/utf
client/js/decompress.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport styles from './Button.css';\n\nconst Button = (props) => {\n const classNames = [styles.Button];\n if (props.state) {\n classNames.push(styles[`Button--state-${props.state}`]);\n }...
javascript
edit
0
3
mit
b339dc9664ace02351c981e9d05c20851aa165a9
bufferapp/buffer-components,bufferapp/buffer-components
src/Button/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Checks if value is array-like.\n * A value is considered array-like if it’s not a function and has a `value.length` that’s an\n * integer greater than or equal to 0 and less than or equal to `Number.MAX_SAFE_INTEGER`.\n * @param...
javascript
edit
0
8
mit
c75e162718129ce1038442dabd81f4915a238c53
georapbox/smallsJS,georapbox/smallsJS,georapbox/jsEssentials
src/is/isArrayLike/isArrayLike.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function () {\n return {\n\n /**\n * Format monetary to standard format with ISO 4217 code.\n */\n format: function (m) {\n if (m.isInvalid()) {\n return \"Invalid monetary!\";\n }\n\n return ...
javascript
edit
0
2
mit
fd57b24f7d186220436d779200d582856570f966
davidknezic/bitcoin-trade-guard
src/js/lib/monetary/formatting.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// We faced a bug in babel so that transform-runtime with export * from 'x' generates import statements in transpiled code\r\n// Tracked here : https://github.com/babel/babel/issues/2877\r\n// We tested the workaround given here https:/...
javascript
edit
0
1
mit
684fe7ced5ac9a43adb7c6f4f1698327c2a3a521
kalisio/kCore
src/common/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\n\nmodule.exports = {\n\n development: {\n client: 'pg',\n connection: 'postgres://localhost/envelopresent',\n migrations: {\n directory: path.join(__dirname, '..', 'datasource', 'migrations'...
javascript
edit
0
0
mit
b51c70f2afce34680298088182bb92c7e26b7420
chikh/envelopresent
configs/knexfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.config = {\n specs: ['ui/**/*.spec.js'],\n sauceUser: process.env.SAUCE_USERNAME,\n sauceKey: process.env.SAUCE_ACCESS_KEY,\n baseUrl: 'http://localhost:3000',\n capabilities: {\n 'browserName': 'chrome',\n ...
javascript
edit
0
0
mit
d58636faa24ace56822cda4254a1b765935ac3fe
agilejs/2015-06-team-3,agilejs/2015-06-team-1,agilejs/2015-04-team-1,agilejs/2015-06-team-4,agilejs/2015-06-team-6,agilejs/2015-06-team-5,agilejs/2015-04-team-1,agilejs/2014-10-Dinatriumdihydrogendiphosphat,agilejs/2015-06-team-3,agilejs/2015-06-team-2,agilejs/2014-10-typesafe,agilejs/2014-10-floppy,agilejs/2015-06-tea...
test/client/ui-saucelabs.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar cv = require('../lib/opencv');\n\nvar COLOR = [0, 255, 0]; // default red\nvar thickness = 2; // default 1\n\ncv.readImage('./files/mona.png', function(err, im) {\n if (err) throw err;\n if (im.width() < 1 || im.height() < 1) thro...
javascript
edit
0
4
mit
d79f633547008f6add566ea5c39794046dacd90c
qgustavor/node-opencv,mvines/node-opencv,piercus/node-opencv,julianduque/node-opencv,keeganbrown/node-opencv,lntitbk/node-opencv,dropfen/node-opencv,webcats/node-opencv,akshonesports/node-opencv,akshonesports/node-opencv,peterbraden/node-opencv,piercus/node-opencv,jainanshul/node-opencv,Queuecumber/node-opencv,cascade2...
examples/face-detection-rectangle.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// DOUBLY-LINKED LIST\n\n// define constructor\nfunction Node(val) {\n\tthis.data = val;\n\tthis.previous = null;\n\tthis.next = null;\n}\n\nfunction DoublyLinkedList() {\n\tthis._length = 0;\n\tthis.head = null;\n\tt...
javascript
edit
0
5
mit
511ddc7dcb44c54c24fa09fda91475bd0f5326bc
derekmpham/interview-prep,derekmpham/interview-prep
doubly-linked-list.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar loaders = require(\"./loaders\");\nvar preloaders = require(\"./preloaders\");\nvar HtmlWebpackPlugin = require('html-webpack-plugin');\nvar webpack = require('webpack');\n\nmodule.exports = {\n entry: ['./src/index.ts'],\n ou...
javascript
edit
0
0
mit
66b391ff1a66e9ae160cfadf54fd94e088348a46
var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training
angular-typescript-webpack-jasmine/webpack/webpack.build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { moduleFor, test } from 'ember-qunit';\nimport { Offline } from 'ember-flexberry-data';\nimport startApp from 'dummy/tests/helpers/start-app';\n\nlet App;\n\nmoduleFor('service:user', 'Unit | Service ...
javascript
edit
0
1
mit
74c5a0a45de24850b7d506c6af17218709e5ecbe
Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-data
tests/unit/services/user-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 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 ...
javascript
edit
null
null
bsd-3-clause
53eaf9062d4495d5309325c2db3038595e1d4bd8
farazs/react-native,cosmith/react-native,doochik/react-native,kesha-antonov/react-native,adamjmcgrath/react-native,imjerrybao/react-native,negativetwelve/react-native,kesha-antonov/react-native,Purii/react-native,salanki/react-native,hoastoolshop/react-native,jaggs6/react-native,exponent/react-native,ankitsinghania94/r...
Libraries/Components/LazyRenderer.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar SearchService = function($http, $q) {\n\n\tthis.search = function(query) {\n\n\t\tvar deferred = $q.defer();\n\n\t\tvar from = query.from ? '&from=' + query.from : \"\";\n\t\tvar size = query.size ? '&size=' + query...
javascript
edit
0
7
apache-2.0
0c374abc35fbefa915834d8bde05d030a9b48e22
dainst/chronontology-frontend,dainst/chronontology-frontend
js/services/searchService.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar southWest = L.latLng(45.36638, -75.73674),\n northEast = L.latLng(45.36933, -75.73316),\n bounds = L.latLngBounds(southWest, northEast);\n\nvar map = L.map('map', {\n center: [45.36806, -75.73408],\n zoom: 18,\n minZo...
javascript
edit
0
0
mit
f8309803daacc51a59daa8fb17096c666a4b615b
zxiiro/maps,zxiiro/maps
ottawa/celebration-park/local.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Words(sentence){\n \"use strict\";\n sentence = sentence.toLowerCase();\n var wordMatches = sentence.match(/\\w+/g);\n var result = {};\n for(var idx = 0 ; idx < wordMatches.length ; idx++) {\n result[word...
javascript
edit
0
3
mit
eed9e520f02ca0a9b42a8ace3b3eb2b90ad3f4b1
driis/exercism,driis/exercism,driis/exercism
javascript/word-count/words.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express')\nvar vhost = require('vhost')\n\nvar app2014 = require('./2014/app')\nvar app2015 = require('./2015/app')\nvar app2016 = require('./2016/app')\nvar appSplash = require('./splash/app')\n\n//var redirect =...
javascript
edit
0
1
mit
3a8d487334bf1b623d5c93503c33fb0334a11c0d
auchenberg/coldfront.co,auchenberg/coldfront.co
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar hapi = require('hapi');\nvar moonboots = require('moonboots_hapi');\nvar config = require('getconfig');\nvar templatizer = require('templatizer');\nvar Good = require('good');\nvar ElectricFence = require('electricfence');\nvar serv...
javascript
edit
0
1
mit
72b3933fbcc1f0ce1cee85ecf6064a5be6a251ea
wraithgar/lift.zone,wraithgar/lift.zone,wraithgar/lift.zone
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\nvar port = process.env.PORT || 3000;\n\n// Asset paths first\napp.get('/js/:file', serveFile.bind(null, 'dist/js'));\napp.get('/css/:file', serveFile.bind(null, 'dist/css'));\napp...
javascript
edit
0
1
apache-2.0
55b92a8ebd70e4c30d50610884a1b890f57ae82b
ilitvak/Pomodoro-App,ilitvak/Pomodoro-App
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Licensed under the Apache License, Version 2.0 (the “License”); you may not\n// use this file except in compliance with the License. You may obtain a copy of\n// the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n...
javascript
edit
0
5
apache-2.0
da1bf2e70b7c1dc2005f38d69e186a1043b0cab7
ctrine/webpack-settings,ctrine/webpack-settings
src/configs/webpack/rules/default.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar media = require('rtc-media');\nvar h = require('hyperscript');\nvar crel = require('crel');\nvar screenshare = require('..')({\n chromeExtension: 'rtc.io screenshare',\n version: '^1.0.0'\n});\n\nvar buttons = {\n install: h('but...
javascript
edit
0
2
apache-2.0
532d3eab820b4ffa3eb00c81f650c1c4686c871d
rtc-io/rtc-screenshare
examples/share-window.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { prefixLink } from './gatsby-helpers'\n\nif (process.env.NODE_ENV === `production`) {\n let stylesStr\n try {\n stylesStr = require(`!raw!public/styles.css`)\n } catch (e) {\n // ignore\n }\n...
javascript
edit
0
3
mit
8bf302fb83764ce1e8bf9fd39fc4099067aee203
0x80/gatsby,mingaldrichgan/gatsby,fabrictech/gatsby,Khaledgarbaya/gatsby,mingaldrichgan/gatsby,fk/gatsby,fk/gatsby,danielfarrell/gatsby,okcoker/gatsby,fk/gatsby,gatsbyjs/gatsby,mickeyreiss/gatsby,okcoker/gatsby,Khaledgarbaya/gatsby,gatsbyjs/gatsby,mickeyreiss/gatsby,mingaldrichgan/gatsby,chiedo/gatsby,chiedo/gatsby,gat...
lib/isomorphic/html-styles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTinytest.add('meteor-assert', function (test) {\n var isDefined = false;\n try {\n assert;\n isDefined = true;\n }\n catch (e) {\n }\n test.isTrue(isDefined, \"assert is not defined\");\n test.throws(function () {\n asse...
javascript
edit
0
2
bsd-3-clause
831351123815f125adcdb17efe7c5e467f0ad42d
peerlibrary/meteor-assert
tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n version: '1.1.2',\n summary: 'Meteor bundle analysis and visualization.',\n documentation: 'README.md',\n});\n\nNpm.depends({\n \"d3-selection\": \"1.0.5\",\n \"d3-shape\": \"1.0.6\",\n \"d3-hierarchy\": \"1.1...
javascript
edit
0
1
mit
b4af69796c13cf832d0ff53d5bcc2c9d51d79394
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
packages/non-core/bundle-visualizer/package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([], function() {\n 'use strict';\n\n return withFileDrop;\n\n function withFileDrop() {\n\n this.after('initialize', function() {\n var self = this;\n\n if (!this.handleFilesDropped) {\n ...
javascript
edit
0
4
apache-2.0
179d721407ce581079427a07a7e18e7cb5535b2a
j-bernardo/lumify,RavenB/lumify,bings/lumify,dvdnglnd/lumify,TeamUDS/lumify,bings/lumify,j-bernardo/lumify,lumifyio/lumify,bings/lumify,Steimel/lumify,TeamUDS/lumify,dvdnglnd/lumify,Steimel/lumify,Steimel/lumify,RavenB/lumify,lumifyio/lumify,j-bernardo/lumify,dvdnglnd/lumify,RavenB/lumify,RavenB/lumify,lumifyio/lumify,...
lumify-web-war/src/main/webapp/js/util/withFileDrop.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Archive from '../../component/archive/archive-list-container';\nimport PropTypes from 'prop-types';\n\nconst render = ({ match }) => <Archive name={match.params.name} />;\nrender.propTypes = {\n mat...
javascript
edit
0
1
apache-2.0
c9b3c797373fc4b83a84551bfb56459f8c36f50a
Unleash/unleash-frontend,Unleash/unleash-frontend,Unleash/unleash-frontend,Unleash/unleash-frontend
src/page/archive/index.js
rejected_duplicate
Near-duplicate of sample 101874
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Class } from '../lib/objects';\nimport { isQueryExpression } from './expression';\n\nexport default Class.extend({\n evaluator: null,\n\n init(evaluator) {\n this.evaluator = evaluator;\n },\n\n evaluate(expression) {\n ...
javascript
edit
0
3
mit
7c4d61814b2512f977ed13a793479ad801d693d7
orbitjs/orbit-core,jpvanhal/orbit-core,orbitjs/orbit.js,jpvanhal/orbit.js,orbitjs/orbit.js,jpvanhal/orbit-core,SmuliS/orbit.js,jpvanhal/orbit.js,SmuliS/orbit.js
lib/orbit/query/context.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @fileoverview\n * Utility functions for handling tutorial images in multiple languages\n */\n\nimport {enImages as defaultImages} from './en-steps.js';\n\nlet savedImages = {};\nlet savedLocale = '';\n\nconst loadSpanish = () =>...
javascript
edit
0
3
bsd-3-clause
775b805e56bbc1aa9962e0c37a82a47b4a23ff9f
LLK/scratch-gui,LLK/scratch-gui
src/lib/libraries/decks/translate-image.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar hostname = location.hostname.replace(/^www\\./, '');\n\nvar style = document.createElement('link');\nstyle.rel = 'stylesheet';\nstyle.href = chrome.extension.getURL('styles/' + hostname + '.css');\ndocument.documentElement.appendChi...
javascript
edit
0
1
mit
85cb638499d7930ce9c4c119e7ccd15d7adef7f8
p3lim/dotjs-universal,p3lim/dotjs-universal
dotjs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport callbacks from 'ember-encore/mixins/adapter-callbacks';\n\nexport default DS.RESTAdapter.extend(callbacks, {\n defaultSerializer: '-encore',\n\n pathForType: function(type) {\n return Ember.String.pluralize(Ember.String.unde...
javascript
edit
0
3
bsd-3-clause
21082cb80f8c77c2a90d5f032193a4feda2edcf4
mirego/ember-encore
lib/adapter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// import React and Redux dependencies\nvar React = require('react');\nvar connect = require('react-redux').connect;\nvar $ = require('jquery');\n\nvar DepVar = require('./DepVar');\n\nfunction mapStatetoProps (state, ownProps) {\n ret...
javascript
edit
0
1
mit
ec555d651c1748b793dc12ef901af806b6d09dde
Agnition/agnition,marcusbuffett/agnition,Agnition/agnition,marcusbuffett/agnition
server/client/containers/RunAdHocExperiment/DepVars.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport openDevToolsWindow from './openWindow';\n\nconst menus = [\n { id: 'devtools-left', title: 'To left' },\n { id: 'devtools-right', title: 'To right' },\n { id: 'devtools-bottom', title: 'To bottom' },\n { id: 'devtools-panel',...
javascript
edit
0
5
mit
5a22dbf7d62117b3e9349b41ccc3f5ef2dc9ff71
zalmoxisus/redux-devtools-extension,zalmoxisus/redux-devtools-extension
src/browser/extension/background/contextMenus.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*globals PushStateTree, it, expect */\ndescribe('ObjectEvent should', function() {\n 'use strict';\n\n it('be available on global scope', function() {\n expect(PushStateTree).toBeDefined();\n });\n\n it('throw an error if not us...
javascript
edit
0
1
mit
5c34ebb081bb40d15daf595e642cfe0dc14f4f55
gartz/pushStateTree,gartz/pushStateTree
test/specs/route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\r\nlet fs = require(\"fs\");\r\nlet path = require(\"path\");\r\n\r\nlet Q = require(\"q\");\r\nlet express = require(\"express\");\r\nlet bodyParser = require(\"body-parser\");\r\nlet restify = require(\"restify\");\r\n...
javascript
edit
0
1
mit
4580c5feca6b28b4afe46f4ad58aa3cb7b6c7b17
pankrator/Beacon-Spam,pankrator/Beacon-Spam
website/server/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet rpc = require('./rpc');\nlet util = require('./util');\n\nlet idKey = util.idKey;\nlet realmKey = util.realmKey;\nlet registeredConstructors = {};\n\nexports.create = create;\nexports.registerConstructors = register...
javascript
edit
0
3
apache-2.0
22076933adbf6a17cdd664ac18c612a35a1df234
realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js
lib/objects.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport Immutable from 'immutable';\nimport { Button } from 'react-bootstrap';\nimport styles from '../styles.module.css';\n\nconst EditProfile = ({onSubmit}) => {\n return(\n <div>\n <...
javascript
edit
0
1
apache-2.0
d3924ba8fa88a13044cf9150616c5660847e06d0
dataloom/gallery,kryptnostic/gallery,kryptnostic/gallery,dataloom/gallery
src/containers/profile/components/EditProfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif ('angular' in window) {\n angular.module('ng').run(['$rootScope', '$window', function ($rootScope, window) {\n\n \t$rootScope.$watch(function() {\n\t\t return $window.location.pathname + $window.location.search;\n \t}, function (...
javascript
edit
0
2
mit
2305a450851dbaf03f6f0583b7b12e290ac79f0b
kisenka/svg-sprite-loader,kisenka/webpack-svg-sprite-loader,princed/webpack-svg-sprite-loader
lib/web/angular-base-workaround.js
rejected_duplicate
Near-duplicate of sample 92592
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport NotificationProvider from \"./NotificationProvider\";\nimport LibNotify from \"node-notifier/notifiers/notifysend\";\nimport which from \"utils/node/fs/which\";\nimport UTIL from \"util\";\n\n\nfunction NotificationProviderLibNot...
javascript
edit
0
1
mit
6113b3bf024e578bb920713470c94d5e9853c684
chhe/livestreamer-twitch-gui,bastimeyer/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,streamlink/streamlink-twitch-gui,bastimeyer/livestreamer-twitch-gui,bastimeyer/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,chhe/livestreamer-twitch-gui
src/app/utils/notification/NotificationProviderLibNotify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n pkg: '<json:package.json>',\n test: {\n files: ['test/**/*.js']\n },\n lint: {\n files: ['grunt.js', 'lib/**/*.js', 'test/**...
javascript
edit
0
1
mit
4b5965328d8dc4388793fd7dfbbc0df3b5d9ca73
ddubyah/thumblr
grunt.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconnect = require('connect');\nserveServer = require('serve-static');\njade = require(\"./lib/processor/jade.js\");\n\nfunction miniharp(root) {\n //console.log(root);\n var app = connect()\n .use(serveServer(root))\n .use(jade(...
javascript
edit
0
1
mit
605e59e704422fd780fa23a757a17225c8400255
escray/besike-nodejs-harp,escray/besike-nodejs-harp
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// Generates a string from \"color-1\" to \"color-32\" based on an input string\nmodule.exports = function(str) {\n\tlet hash = 0;\n\n\tfor (let i = 0; i < str.length; i++) {\n\t\thash += str.charCodeAt(i);\n\t}\n\n\t...
javascript
edit
0
2
mit
3a89935c293c8133ad9dd48c0be01949083a9c4a
thelounge/lounge,MaxLeiter/lounge,realies/lounge,realies/lounge,williamboman/lounge,ScoutLink/lounge,williamboman/lounge,thelounge/lounge,FryDay/lounge,MaxLeiter/lounge,realies/lounge,FryDay/lounge,ScoutLink/lounge,ScoutLink/lounge,MaxLeiter/lounge,williamboman/lounge,FryDay/lounge
client/js/libs/handlebars/colorClass.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar got = require('got');\nvar cheerio = require('cheerio');\nvar md = require('html-md');\n\nmodule.exports = function(id, callback) {\n var url = 'http://www.stm.dk/_p_' + id + '.html';\n\n got(url, function(err, da...
javascript
edit
0
3
mit
75e55d7bd009fcc0bd670c592a34319c8b2655ed
matiassingers/statsministeriet-speeches-scraper
index.js
rejected_duplicate
Near-duplicate of sample 72652
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// http://stackoverflow.com/questions/11935175/sampling-a-random-subset-from-an-array\nvar featureCollection = require('turf-featurecollection');\n\n/**\n * Takes a {@link FeatureCollection} and returns a FeatureCollection with given nu...
javascript
edit
0
2
mit
854e8f71d40d7d2a077a208f3f6f33f9a0dc23f4
Turfjs/turf-sample
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component} from 'react'\nimport './Reaction.sass'\n\nclass Reaction extends Component {\n constructor() {\n super();\n this.state = { React: false };\n }\n\n componentDidMount() {\n var thiz = this;\n\n set...
javascript
edit
0
2
mit
3b9847a61da0b294ddfee133cda962fa393f914d
Jeffrey-Meesters/React-Shoot,Jeffrey-Meesters/React-Shoot
client/components/Reaction.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('./env');\nvar http = require('http');\nvar koa = require('koa');\nvar app = koa();\n\napp.use(require('koa-bodyparser')());\napp.use(function *(next) {\n if (typeof this.request.body === 'undefined' || this.request.body === nu...
javascript
edit
0
5
mit
024de1e7eff4e4f688266d14abfe0dbcaedf407e
luin/doclab,luin/doclab
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire('./patch/functionName');\n\n(function (window, document, undefined) {\nvar oldMappy = window.Mappy\nvar Mappy = require('./lib/main')\n\n//Node style module export\nif (typeof module === 'object' && typeof modul...
javascript
edit
0
3
mit
59d6f506b93982816e2f98a76b361b2a9ebd57ac
mediasuitenz/mappy,mediasuitenz/mappy
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar program = require('commander');\nvar userArgs = process.argv.splice(2);\nvar message = userArgs.join(' ');\n\nif (message.length > 140) {\n console.log('Message was too long. Can only be 140 characters. It wa...
javascript
edit
0
0
mit
65bb0ff4fce04e58febe70936adf503d432f9d41
tylerpeterson/confluence-user-status
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar path = require('path')\n\nmodule.exports = function (file) {\n var segments = file.split(path.sep)\n var index = segments.lastIndexOf('node_modules')\n if (index === -1) return\n if (!segments[index + 1]) return\...
javascript
edit
0
6
mit
c722da297169e89fc6d79860c2c305dc3b4a1c60
watson/module-details-from-path
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Match from 'react-router/Match';\nimport Miss from 'react-router/Miss';\nimport Users from './Users';\n\nclass UsersRouting extends React.Component {\n NoMatch() {\n return <div>\n <h2>Uh-oh!<...
javascript
edit
0
2
apache-2.0
69a1ac6f09fef4f7954677a005ebfe32235ed5cd
folio-org/ui-users,folio-org/ui-users
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * gaze\n * https://github.com/shama/gaze\n *\n * Copyright (c) 2014 Kyle Robinson Young\n * Licensed under the MIT license.\n */\n\ntry {\n // Attempt to resolve optional pathwatcher\n require('bindings')('pathwatcher.node');\n ...
javascript
edit
0
0
mit
6ec2bff81999a815fe44f1ddf3a02c9edc46829c
bevacqua/gaze,modulexcite/gaze,bevacqua/gaze,prodatakey/gaze,modulexcite/gaze,bevacqua/gaze,prodatakey/gaze,modulexcite/gaze,prodatakey/gaze
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst YQL = require('yql');\nconst _ = require('lodash');\n\nmodule.exports = (opts, callback) => {\n\topts = opts || [];\n\n\tlet query;\n\n\tif (_.isEmpty(opts)) {\n\t\tquery = new YQL('select * from weather.forecast ...
javascript
edit
0
3
mit
66de12f38c0d0021dad895070e9b823d99d433e4
riyadhalnur/weather-cli
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-ui-sortable',\n\n included: function(app) {\n app.import(app.bowerDirectory + '/jquery-ui/ui/version.js');\n app.import(app.bowerDirectory + '/jquery-ui...
javascript
edit
0
1
mit
9a7bada461b9c2096b282952333eb6869aa613cb
12StarsMedia/ember-ui-sortable,12StarsMedia/ember-ui-sortable
index.js
rejected_duplicate
Near-duplicate of sample 106503
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst { config, Lambda } = require('aws-sdk')\n\nconst { stringify } = JSON\n\nconfig.update({\n accessKeyId: 'ABC',\n secretAccessKey: 'SECRET',\n})\n\nconst lambda = new Lambda({\n apiVersion: '2015-03-31',\n endpo...
javascript
edit
0
1
mit
3c660bb65805957ef71481c97277c0093cae856a
dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline
tests/integration/lambda-invoke/lambdaInvokeHandler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst expect = require('chai').expect\n\nconst dataHelper = require('../helpers/data/aggregated-data-helper')\n\nvar workloadOwnerId\nvar workloadOwnerGrade\n\ndescribe('View overview', function () {\n before(function () {\n return ...
javascript
edit
0
1
mit
9a38407db4740cb027f40cf2dbd7c4fbf3996816
ministryofjustice/wmt-web,ministryofjustice/wmt-web
test/e2e/view-offender-manager-overview.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (env) {\n \"use strict\";\n env.ddg_spice_tfl_status = function(api_result){\n\n Spice.add({\n id: \"tfl_status\",\n name: \"Travel\",\n data: api_result,\n meta: {\n ...
javascript
edit
0
1
apache-2.0
72be6e08669779cbd6a6ed55d56cfb45b857dc95
sagarhani/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,navjotahuja92/zeroclicki...
share/spice/tfl_status/tfl_status.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint node:true*/\n/* global require, module */\nvar EmberApp = require('ember-cli/lib/broccoli/ember-app');\n\nmodule.exports = function(defaults) {\n var app = new EmberApp(defaults, {\n // Add options here\n });\n\n // Use `...
javascript
edit
0
1
mit
798f0a318578df8f91744accf1ec1a55310ee6ef
djsegal/julz,djsegal/julz
docs/ember-cli-build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @flow\n */\nimport path from \"path\"\n\nimport flattenConfiguration from \"./configuration/flattenConfiguration\"\nimport start from \"./commands/start\"\nimport build from \"./commands/build\"\n\nfunction normalizeConfiguratio...
javascript
edit
null
null
mit
7ffd6936bd40a5a47818f51864a6eb86ed286e56
MoOx/statinamic,MoOx/phenomic,phenomic/phenomic,MoOx/phenomic,pelhage/phenomic,phenomic/phenomic,MoOx/phenomic,phenomic/phenomic
packages/phenomic/src/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport uglify from \"rollup-plugin-uglify\"\n\nexport default {\n plugins: [\n uglify()\n ]\n}\n\n\n```\n\nApply this change: Optimize uglifyjs's output via options." }, { "role": "assistant", "content": "import...
javascript
edit
0
0
mit
30018cff5b64782ee83d40b62f15ae26b7f4b240
Mytrill/hyperapp,tzellman/hyperapp,Mytrill/hyperapp
rollup.config.js
rejected_duplicate
Near-duplicate of sample 91511
true
[ { "role": "user", "content": "Write javascript code for the following: Add method to create an event" }, { "role": "assistant", "content": "import { Mongo } from 'meteor/mongo';\nimport { ValidatedMethod } from 'meteor/mdg:validated-method';\nimport { SimpleSchema } from 'meteor/aldeed:simple-sc...
javascript
new_file
0
2
mit
955e8af495b9e43585fd088c8ed21fa92fb6307b
f-martinez11/ActiveU,f-martinez11/ActiveU
imports/api/events.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (millisecondsToISO8601Duration) {\n\t'use strict';\n\n\tmillisecondsToISO8601Duration.iso8601duration = function(milliseconds) {\n\t\tvar offset = Math.floor(milliseconds);\n\t\tvar milliseconds = offset % 1000;\n\t\toffset = ...
javascript
edit
0
12
mit
b1d90a138b7d285c0764d930b5b430b4e49ac2b0
wking/milliseconds-to-iso-8601-duration,wking/milliseconds-to-iso-8601-duration
milliseconds-to-iso-8601-duration.js
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nwindow._ = require('lodash');\n\n/**\n * We'll load jQuery and the Bootstrap jQuery plugin which provides support\n * for JavaScript based Bootstrap features such as modals and tabs. This\n * code may be modified to fit the specific n...
javascript
edit
0
1
apache-2.0
7571f2b5b4ecca329cf508ef07dd113e6dbe53fc
zhiyicx/thinksns-plus,beautifultable/phpwind,cbnuke/FilesCollection,orckid-lab/dashboard,zeropingheroes/lanyard,slimkit/thinksns-plus,tinywitch/laravel,hackel/laravel,cbnuke/FilesCollection,zhiyicx/thinksns-plus,zeropingheroes/lanyard,remxcode/laravel-base,hackel/laravel,orckid-lab/dashboard,beautifultable/phpwind,zero...
resources/assets/js/bootstrap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n\n var options = (function () {\n // Holy shit\n var optionsArray = location.href.split('?')[1].split('#')[0].split('=')\n var result = {}\n\n optionsArray.forEach(function (value, index) {\n // 0 is a ...
javascript
edit
0
2
mit
fd9b4b9c8f7196269f84a77522bf3fd90ee360ff
IonicBrazil/ionic-garden,Jandersoft/ionic-garden,IonicBrazil/ionic-garden,Jandersoft/ionic-garden
www/js/load-ionic.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from '../templates/components/scroll-to-here';\n\nexport default Ember.Component.extend({\n layout: layout\n});\n\n```\n\nApply this change: Add scroll to here logic" }, { "role": "assi...
javascript
edit
0
3
mit
b26c2afa7c54ead6d5c3ed608bc45a31e9d51e0f
ember-montevideo/ember-cli-scroll-to-here,ember-montevideo/ember-cli-scroll-to-here
addon/components/scroll-to-here.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This script is used to serve the built files in production and proxy api requests to the service.\n// Would be preferrable to replace with apache.\n\nconst express = require('express');\nconst proxy = require('express-http-proxy');\n...
javascript
edit
0
2
mit
6ba02cc85b13ddd89ef7a787feee9398dff24c68
TulevaEE/onboarding-client,TulevaEE/onboarding-client,TulevaEE/onboarding-client
scripts/start.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport TokenAuthenticator from '../authenticators/token';\n\nexport function initialize(application) {\n application.register('authenticator:token', TokenAuthenticator);\n}\n\nexport default {\n name: 'simple-token',\n initialize\n};...
javascript
edit
0
1
mit
e5350251a99d92dc75c3db04674ed6044029f920
datajohnny/ember-simple-token,datajohnny/ember-simple-token
addon/initializers/simple-token.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Wrapper around the bcrypt npm package\",\n version: \"0.9.2\",\n documentation: null\n});\n\nNpm.depends({\n bcryptjs: \"2.3.0\"\n});\n\nPackage.onUse(function (api) {\n api.use(\"modules@0.7.5\", \"...
javascript
edit
0
1
mit
ff3993c6583b331bd5326aeaa6a710517c6bdab6
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
packages/npm-bcrypt/package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport app from '../app';\nimport '../services/PlusMinClient';\n\napp.controller('plusMinController', function ($element, $scope, $http, PlusMinClient) {\n let client = PlusMinClient;\n $scope.state = 'loading';\n\n $scope.toState = ...
javascript
edit
0
3
mit
0095363683a71a75de3da3470fc65fe4aa7da5ab
LuudJanssen/plus-min-list,LuudJanssen/plus-min-list,LuudJanssen/plus-min-list
src/client/js/controllers/plusMin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = (sequelize, DataTypes) => {\n const User = sequelize.define('User', {\n username: {\n type: DataTypes.STRING,\n allowNull: false,\n unique: true,\n },\n password: {\n type: DataTypes.STRING...
javascript
edit
0
1
mit
17f3f1fb9967f3db50d0997d7be480726aaf0219
3m3kalionel/PostIt,3m3kalionel/PostIt
server/models/user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(kbox) {\n\n var events = kbox.core.events;\n var deps = kbox.core.deps;\n var envs = [];\n\n // EVENT: pre-engine-create\n events.on('pre-engine-create', function(createOptions, done) {\n ...
javascript
edit
0
2
mit
4d9a9d30326bda7d88b4877a9e75c94949df79ca
kalabox/kalabox-cli,rabellamy/kalabox,ManatiCR/kalabox,RobLoach/kalabox,RobLoach/kalabox,ari-gold/kalabox,rabellamy/kalabox,oneorangecat/kalabox,ManatiCR/kalabox,oneorangecat/kalabox,ari-gold/kalabox,kalabox/kalabox-cli
plugins/kalabox-core/events.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * head.script.js\n *\n * Essential scripts, to be loaded in the head of the document\n * Use gruntfile.js to include the necessary script files.\n */\n\n// Load respimage if <picture> element is not supported\nif(!window.HTMLPictu...
javascript
edit
0
0
mit
cd841f91370e770e73992e3bf8cd0930c4fa4e82
jolantis/artlantis,jolantis/artlantis
assets/javascript/head.scripts.js
rejected_duplicate
Near-duplicate of sample 100872
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nimport React from 'react';\n\n/**\n * Method to display the title of a variant.\n * 1st option is the ClinVar Preferred Title if it's present.\n * 2nd alternative is a string constructed with the canonical transcript, gen...
javascript
edit
0
13
mit
7292d5c3db9d8a274567735d6bde06e8dcbd2b7b
ClinGen/clincoded,ClinGen/clincoded,ClinGen/clincoded,ClinGen/clincoded,ClinGen/clincoded
src/clincoded/static/libs/render_variant_title.js
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { Col } from 'react-flexbox-grid/lib';\nimport { DeleteButton } from './IconButton';\n\nconst SourceOrCollectionWidget = (props) => {\n const { object, onDelete, o...
javascript
edit
0
11
apache-2.0
cbec0d253d7b451cb5584329b21900dbbce7ab19
mitmedialab/MediaCloud-Web-Tools,mitmedialab/MediaCloud-Web-Tools,mitmedialab/MediaCloud-Web-Tools,mitmedialab/MediaCloud-Web-Tools
src/components/common/SourceOrCollectionWidget.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// slack invite links expire after 30 days and you can't(at least as far as i can tell) create tokens for things like slackin anymore\n\nconst fs = require('fs')\n\nconst slackInviteLink = process.argv[2]\n\nconst siteHeaderPath = `${__...
javascript
edit
0
0
mit
b62647e8f52c9646d7f4f6eb789db1b84c94228a
tkh44/emotion,emotion-js/emotion,tkh44/emotion,emotion-js/emotion,emotion-js/emotion,emotion-js/emotion
scripts/replace-slack-link.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport React, {\n Animated,\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.p...
javascript
edit
0
1
mit
1960321adb5c7fcc17fea23e0e313c94bb34de2e
exponentjs/react-native-tab-navigator
TabBar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n countUpdated: () => ({\n // Run the query each time count updated\n countUpdated: () => true\n })\n};\n\n```\n\nApply this change: Fix Counter subscription filter definition" }, { "role": "assistant", ...
javascript
edit
0
1
mit
89b7985d0b21fe006d54f613ea7dc6625d5525f5
sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit
src/server/modules/counter/subscriptions_setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar dbm = require('db-migrate');\nvar type = dbm.dataType;\n\nexports.up = function(db, callback) {\n db.createTable('users', {\n columns: {\n id: { type: 'int', primaryKey: true, autoIncrement: true },\n firstName...
javascript
edit
0
1
bsd-3-clause
3b9cebffb70d2fc08b8cf48f86ceb27b42d8d9b4
t3mpus/tempus-api
migrations/20131122023554-make-user-table.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport path from 'path';\n\nconst projectRoot = path.join(__dirname, '..');\n\nexport default {\n cache: true,\n entry: [\n path.join(projectRoot, 'src', 'hibp.js'),\n ],\n output: {\n library: 'hibp',\n libraryTarget: 'umd...
javascript
edit
0
0
mit
aaf220bd9c37755bcf3082098c3df96d7a197001
wKovacs64/hibp,wKovacs64/hibp,wKovacs64/hibp
webpack/webpack.config.base.babel.js
rejected_duplicate
Near-duplicate of sample 82467
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar assert = require('assert');\nvar jade = require('jade');\n\n\nvar source = [\n'each v, i in list',\n' div #{v},#{i}'\n].join('\\n');\n\nvar fn = jade.compile(source);\nvar html = fn({ list:['a', 'b', 'c'] });...
javascript
edit
0
0
mit
0b54a083f4c1a3bdeb097fbf2462aa6d6bc484d5
kjirou/nodejs-codes
basis/jade/syntax_samples/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'underscore';\nimport Model from 'girder/models/Model';\n\nimport ElementCollection from '../collections/ElementCollection';\nimport convert from '../annotations/convert';\n\nexport default Model.extend({\n resourceName...
javascript
edit
0
3
apache-2.0
cb1a3ff383ef90b56d3746f4ed9ea193402a08b9
girder/large_image,DigitalSlideArchive/large_image,DigitalSlideArchive/large_image,girder/large_image,girder/large_image,DigitalSlideArchive/large_image
web_client/models/AnnotationModel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst electron = require(\"electron\");\nconst {app} = electron;\nconst {Menu} = electron;\nconst {BrowserWindow} = electron;\n\nmodule.exports.setDevMenu = function () {\n var devMenu = Menu.buildFromTemplate([{\n...
javascript
edit
0
1
mit
aa35d4f0801549420ae01f0be3c9dececaa6c345
petschekr/Chocolate-Shell,petschekr/Chocolate-Shell
core/devMenu.js
rejected_duplicate
Near-duplicate of sample 107676
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport array from 'role:@sanity/form-builder/input/array?'\nimport boolean from 'role:@sanity/form-builder/input/boolean?'\nimport date from 'role:@sanity/form-builder/input/date?'\nimport email from 'role:@sanity/form-builder/input/ema...
javascript
edit
0
3
mit
e6de9cdbc7ee08097b041550fc1b1edd60a98619
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
src/sanity/inputResolver/inputResolver.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function allowQueryParams(params) {\n return function allowQueryParamsMiddleware(req, res, next) {\n req.context.allowedQueryParams = params;\n next();\n };\n};\n\n```\n\nApply this change: Throw on ...
javascript
edit
0
2
bsd-3-clause
ededc73fd74777d0d44b3d1613414fe3787a6c9f
CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb
lib/cartodb/middleware/allow-query-params.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n// Use Parse.Cloud.define to define as many cloud functions as you want.\n// For example:\nParse.Cloud.define(\"hello\", function(request, response) {\n response.success(\"Doms Cloud Code!\");\n});\n\n```\n\nApply this change: Add us...
javascript
edit
0
2
mit
fed23fcd236419462e5e5ee8f71db0d88eedfbe3
Mccoy123/sotonSquashAppCloudCode,Mccoy123/sotonSquashAppCloudCode
parseCloudCode/parse/cloud/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire.config({\n paths: {\n raphael: '../raphael'\n //you will need eve if you use the nodeps version\n /*eve: '../bower_components/eve/eve'*/\n }\n});\n\nrequire(['raphael'], function(Rapha...
javascript
edit
0
1
mit
3fb83189ad65c6cd0ca13bf1e7ecfe41ca0eed8c
DmitryBaranovskiy/raphael,DmitryBaranovskiy/raphael,danielgindi/raphael,danielgindi/raphael
dev/amdDev.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or v...
javascript
edit
0
1
mit
83cd7781120c105b8eeffe3b957d6a5a1b365cdf
markcipolla/vivus,markcipolla/vivus,markcipolla/vivus
app/assets/javascripts/vivus/application.js
rejected_duplicate
Near-duplicate of sample 71080
true