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\nfunction isSecured(operation) {\n if (_.has(this.schema.secured, operation)) {\n return this.schema.secured[operation];\n }\n else {\n return this.schema.secured.common || false;\n }\n};\n\nexport default isSecured;\n```\n\nAp...
javascript
edit
0
3
mit
8d46d03dd81046fb1e9821ab5e3c4c85e7eba747
jagi/meteor-astronomy
lib/modules/storage/class_static_methods/is_secured.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar cryptoUtil = require('../util/crypto');\nvar InsightStorage = require('./InsightStorage');\nvar inherits = require('inherits');\n\nfunction EncryptedInsightStorage(config) {\n InsightStorage.apply(this, [config]);\n}\ninherits(Encr...
javascript
edit
0
3
mit
3bed3dbca37e1e2072581ae8fc1a532c63c1afd7
LedgerHQ/copay,troggy/unicoisa,Bitcoin-com/Wallet,BitGo/copay,wallclockbuilder/copay,msalcala11/copay,cmgustavo/copay,BitGo/copay,Kirvx/copay,DigiByte-Team/copay,mpolci/copay,Neurosploit/copay,payloadtech/wallet,mzpolini/copay,mpolci/copay,wallclockbuilder/copay,wallclockbuilder/copay,ObsidianCryptoVault/copay,fr34k8/c...
js/plugins/EncryptedInsightStorage.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
0
mit
3578177e3e10ebb0c5c0403b2df13fa472c70edb
eqot/petroglyph3,eqot/petroglyph3
app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 77977
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require jquery\n\n$(function() {\n $('.login-trello').click(function() {\n Trello.authorize({\n type: \"redirect\",\n name: \"Reportrello\",\n scope: {\n read: true,\n write: true\n }\n });\n...
javascript
edit
0
1
mit
197b667ca677c5961c9c1d116fb86032bd2ef861
SauloSilva/reportrello,SauloSilva/reportrello,SauloSilva/reportrello
app/assets/javascripts/application.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 file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or any plug...
javascript
edit
0
0
mit
9716b2cd82d4f4a778f798b88838a5685db2b7ea
gadzorg/gram2_api_server,gadzorg/gram2_api_server,gadzorg/gram2_api_server
app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 71086
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global Stripe */\nimport config from '../config/environment';\nimport Ember from 'ember';\nvar debug = config.LOG_STRIPE_SERVICE;\n\nfunction createToken (card) {\n if (debug) {\n Ember.Logger.info('StripeService: getStripeToken ...
javascript
edit
0
3
mit
e467997d760eeb7c3b9282a645568e4b3bcc13e8
iezer/ember-stripe-service,iezer/ember-stripe-service,sescobb27/ember-stripe-service,samselikoff/ember-stripe-service,samselikoff/ember-stripe-service,ride/ember-stripe-service,fastly/ember-stripe-service,fastly/ember-stripe-service,sescobb27/ember-stripe-service,ride/ember-stripe-service
app/services/stripe.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default class HttpApi {\n constructor (prefix = '') {\n this.prefix = prefix\n this.opts = {\n credentials: 'same-origin',\n headers: new Headers({\n 'Content-Type': 'application/json',\n })\n }\n\...
javascript
edit
0
4
isc
fecd1be97cfd7539a738effe8a870ed71470b56a
bhj/karaoke-forever,bhj/karaoke-forever
src/lib/HttpApi.js
rejected_duplicate
Near-duplicate of sample 100185
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Cached Variables *******************************************************************************/\nvar context = sessionStorage.getItem('context');\nvar rowThumbnails = document.querySelector('.row-thumbnails');\n\n/* Initialization ...
javascript
edit
0
2
mit
1cf21242ccd82a54bf1b0da0f61184065f3bd765
NYPD/moe-sounds,NYPD/moe-sounds
WebContent/js/moe-list.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport test from 'tape'\nimport { Vector, Polygon, Rectangle, Circle, ShapeEventEmitter } from '..'\n\ntest('Polygon#contains', t => {\n t.plan(5)\n //Disable warning about missing 'new'. That's what we are testing\n /*jshint -W064 *...
javascript
edit
0
1
mit
700f316c0ca9aa873181111752ba99b0f17a1d35
tillarnold/shapes
src-es6/test/classTest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$( document ).ready(function () {\n\t$('.contextual-help').click(function (){\n\t\t$(this).find('i').toggleClass('active');\n\t});\n\n\t$('body').click(function (e) {\n\t\t$('[data-toggle=\"popover\"]').each(function () {\n\t //t...
javascript
edit
0
4
apache-2.0
0a5d4a96c4f656ff2aa154274dc19cfa3f4d3d17
ging/horizon,ging/horizon,ging/horizon,ging/horizon
openstack_dashboard/static/fiware/contextualHelp.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Twig.js 0.8.2\n *\n * @copyright 2011-2015 John Roepke and the Twig.js Contributors\n * @license Available under the BSD 2-Clause License\n * @link https://github.com/justjohn/twig.js\n */\n\nvar Twig = (function (Twig) {...
javascript
edit
0
1
bsd-2-clause
6655280140920d0697a5bf1ef8cff12c7bcee5d0
FoxyCart/twig.js,FoxyCart/twig.js,FoxyCart/twig.js
src/twig.header.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n db: 'mongodb://localhost/mean',\n app: {\n name: 'MEAN - A Modern Stack - Production'\n },\n facebook: {\n clientID: 'APP_ID',\n clientSecret: 'APP_SECRET',\n ...
javascript
edit
0
0
bsd-2-clause
2135e956f28bafdfe11786d3157f52ea05bccf33
asm-products/barrtr,asm-products/barrtr
config/env/production.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar program = require(\"commander\");\nvar pkg = require(\"../../package.json\");\nvar fs = require(\"fs\");\nvar mkdirp = require(\"mkdirp\");\nvar Helper = require(\"../helper\");\n\nprogram.version(pkg.version, \"-v, --version\");\np...
javascript
edit
0
0
mit
f4ac2aad1922930d4c27d4841e5665714a509a14
realies/lounge,ScoutLink/lounge,realies/lounge,rockhouse/lounge,rockhouse/lounge,FryDay/lounge,williamboman/lounge,rockhouse/lounge,sebastiencs/lounge,sebastiencs/lounge,libertysoft3/lounge-autoconnect,metsjeesus/lounge,FryDay/lounge,williamboman/lounge,williamboman/lounge,metsjeesus/lounge,ScoutLink/lounge,sebastiencs...
src/command-line/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport opacity from 'ember-animated/motions/opacity';\n\n/**\n Fades inserted, removed, and kept sprites.\n\n ```js\n import fade from 'ember-animated/transitions/fade'\n\n export default Component.extend({\n transition: fade\n ...
javascript
edit
0
2
mit
a92f5fd72560341022223b039b9282f0c360627e
ember-animation/ember-animated,ember-animation/ember-animated,ember-animation/ember-animated
addon/transitions/fade.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Source Model\nAV.source = Backbone.Model.extend({\n\turl: 'php/redirect.php/source',\n\tdefaults: {\n\t\tname: '',\n\t\ttype: 'raw',\n\t\tcontentType: 'txt',\n\t\tdata: ''\n\t},\n});\n// Source Model Tests\n\n\n// test_source = new A...
javascript
edit
0
0
bsd-3-clause
f6f3afda12313c5093774b47b62fa79789efccc0
Swarthmore/juxtaphor,Swarthmore/juxtaphor
dev/_/components/js/sourceModel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar callisto = require('callisto');\nvar users = require('./lib/users.js');\nvar sqlite3 = require('sqlite3').verbose();\nvar db = new sqlite3.Database('database.db3');\n\ncallisto.server({\n port: 8090,\n root: 'www'\n});\n\ncall...
javascript
edit
0
0
mit
74e17f622ac60623e4461c5c472e740f292855f6
codingvillage/callisto,codingvillage/callisto
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function () {\n // Thai\n return {\n inputTooLong: function (args) {\n var overChars = args.input.length - args.maximum;\n\n var message = 'โปรดลบออก ' + overChars + ' ตัวอักษร';\n\n return message;\n },\n ...
javascript
edit
0
1
mit
625fc78ee616baedf64aa37357403b4b72c7363c
bottomline/select2,select2/select2,ZaArsProgger/select2,inway/select2,ZaArsProgger/select2,iestruch/select2,inway/select2,bottomline/select2,iestruch/select2,select2/select2
src/js/select2/i18n/th.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert')\nvar mongo = require('../')\nvar db = mongo('mongodb://read:<EMAIL>:31617/esdiscuss')\n\nbefore(function (done) {\n this.timeout(10000)\n db._get(done)\n})\n\ndescribe('read only operation', function () ...
javascript
edit
0
1
mit
263e6691ad0cda4c2adaee1aca584316fedcf382
then/mongod,then/then-mongo
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar test = require('tape');\n\nvar isError = require('../index.js');\n\ntest('isError is a function', function t(assert) {\n assert.equal(typeof isError, 'function');\n assert.end();\n});\n\ntest('returns true for...
javascript
edit
0
1
mit
74632c81aa309e7d4cfab2bc4fb80effd49da773
Raynos/is-error
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar TagsSettingsMenuView = Ember.View.extend({\n saveText: Ember.computed('controller.model.isNew', function () {\n return this.get('controller.model.isNew') ?\n 'Add Tag' :\n 'Save Tag';\n }),\n\n ...
javascript
edit
0
4
mit
4fef0f8785960eb82c02b5ac64f8b136d145a111
acburdine/Ghost-Admin,airycanon/Ghost-Admin,TryGhost/Ghost-Admin,acburdine/Ghost-Admin,dbalders/Ghost-Admin,kevinansfield/Ghost-Admin,kevinansfield/Ghost-Admin,dbalders/Ghost-Admin,JohnONolan/Ghost-Admin,JohnONolan/Ghost-Admin,airycanon/Ghost-Admin,TryGhost/Ghost-Admin
views/settings/tags/settings-menu.js
rejected_duplicate
Near-duplicate of sample 97392
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst expect = require('chai').expect;\n\nconst version = process.env.QB_VERSION;\n\ndescribe('check compiler version inside docker', function () {\n it('should have the same version', async () => {\n const exec = require('chi...
javascript
edit
0
1
bsd-2-clause
9d75d13fcca1105093170e6b98d1e690fc9cbd29
FredTingaud/quick-bench-back-end,FredTingaud/quick-bench-back-end,FredTingaud/quick-bench-back-end
system-test/env.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Module dependencies\n */\nvar accounting = require('accounting')\n , util = require('util')\n , currency = require('currency-symbol-map');\n\n/**\n * formatPrice - format currency code and price nicely\n * @param {Object} valu...
javascript
edit
0
8
mit
3f5e236d5a23f13e8f683a550d31ff44080ecb01
urgeiolabs/aws-price
transforms.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\n/**\n * Abstract base class that ensures required public methods are implemented by\n * inheriting classes.\n *\n * @example\n *\n * class BloomFilterCache extends Cache {\n * constructor() {\n * super()\n * }\n ...
javascript
edit
0
3
mit
e34ec4cde226f760dc21926e9f2fb504fdb7fdb5
masasron/adonis-throttle,masasron/adonis-throttle
src/Drivers/Cache/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar f_ = require('../index.js');\n\nvar TaskList = require('./TaskList');\n\nvar f_config = {\n\tfunctionFlow: ['getSource', 'writeSource', 'notify'], // REQUIRED\n\tresetOnRetryAll: true,\n\n\ttoLog: ['all'],\n\n\tdesc: 'Test taskList...
javascript
edit
0
2
mit
210babd039054adf81522da01f55b10b5e0dc06f
opensoars/f_
tests/dev.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar locastyle = locastyle || {};\n\nlocastyle.toggleText = (function() {\n 'use strict';\n\n var config = {\n trigger: '[data-ls-module=toggleText]',\n triggerChange: 'toggleText:change'\n };\n\n function eventHandler(el, targ...
javascript
edit
0
2
mit
351e1eb2093ff4cfb87f17f6bcfccb95f0f589f0
locaweb/locawebstyle,deividmarques/locawebstyle,deividmarques/locawebstyle,deividmarques/locawebstyle,locaweb/locawebstyle,locaweb/locawebstyle
source/assets/javascripts/locastyle/_toggle-text.js
rejected_duplicate
Near-duplicate of sample 77764
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Bonfire: Sum All Odd Fibonacci Numbers */\n\nfunction sumFibs(num) {\n\n\tvar f1 = 1;\n\tvar f2 = 1;\n\n\tfunction fib(){\n\t\t\n\t}\n\n\n\n\n return num;\n}\n\nsumFibs(4);\n```\n\nApply this change: Edit Fibonacci project in Bonfir...
javascript
edit
0
2
mit
c090cf03c81639622df3f7d3b0414aea926d95a3
witblacktype/freeCodeCamp_projects,witblacktype/freeCodeCamp_projects
bonfires/sum-all-odd-fibonacci-numbers/logic.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport ENV from 'plenario-explorer/config/environment';\n\nexport default Ember.Controller.extend({\n modelArrived: Ember.observer('model', function() {\n const nodeList = this.get('model.nodes');\n co...
javascript
edit
0
1
mit
069d6ac19107f126cc71b37dad5d8d0821d3c249
UrbanCCD-UChicago/plenario-explorer,UrbanCCD-UChicago/plenario-explorer,UrbanCCD-UChicago/plenario-explorer
app/controllers/stream.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Discord = require('discord.js');\nconst { ChannelProcessor } = require('./channelProcessor');\nconst {discordApiToken } = require('./secrets.js');\nconst client = new Discord.Client();\n\nconst channelProcessorMap = {};\n\nclient....
javascript
edit
0
2
mit
c8ac6f48aae5a473f712231bbad389f9b788cfc7
bumblepie/haikubot
discord-client/src/bot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { GraphQLEnumType } from 'graphql';\n\nexport default {\n type: new GraphQLEnumType({\n name: 'FairSorts',\n values: {\n created_at_asc: {\n value: 'created_at',\n },\n created_at_desc: {\n val...
javascript
edit
0
0
mit
c8edf1a27fe1a9142793a071b079d079138c6851
artsy/metaphysics,broskoski/metaphysics,artsy/metaphysics,mzikherman/metaphysics-1,mzikherman/metaphysics-1,craigspaeth/metaphysics,1aurabrown/metaphysics,mzikherman/metaphysics-1,mzikherman/metaphysics-1,artsy/metaphysics,craigspaeth/metaphysics
schema/sorts/fair_sorts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar memoize = require('memoizee/plain')\n , validDb = require('dbjs/valid-dbjs')\n , defineFile = require('dbjs-ext/object/file')\n , defineJpegFile = require('dbjs-ext/object/file/image-file/jpeg-f...
javascript
edit
0
2
mit
d1709007440080cc4b1ced6dbebe0096164f15fb
egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations
model/file.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n title: 'now.sh',\n subcommands: new Set([\n 'login',\n 'deploy',\n 'ls',\n 'list',\n 'alias',\n 'scale',\n 'certs',\n 'dns',\n 'domains',\n 'rm',\n 'remove',\n 'whoami',\n 's...
javascript
edit
0
1
apache-2.0
f8339c53d8b89ebb913088be19954ad8d0c44517
zeit/now-cli,zeit/now-cli,zeit/now-cli,zeit/now-cli,zeit/now-cli,zeit/now-cli,zeit/now-cli
src/providers/sh/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar http = require('http');\n\nvar assert = require('assertive');\n\nvar fetch = require('../lib/fetch');\n\ndescribe('fetch', function() {\n var server;\n\n before('start echo server', function(done) {\n server = ...
javascript
edit
0
1
bsd-3-clause
cc472a3d07b2803c9e3b4cb80624d1c312d519f7
jkrems/srv-gofer
test/fetch.js
rejected_duplicate
Near-duplicate of sample 94495
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @id iitc-plugin-region-score-lead@hansolo669\n// @name IITC plugin: region score lead\n// @category Tweaks\n// @version 0.2.3\n// @namespace https://github.com/hansolo669/iit...
javascript
edit
0
0
mit
f1c0c236e8b6d3154781c9f30f91b3eae59b60e4
hansolo669/iitc-tweaks,hansolo669/iitc-tweaks
region-score-lead.meta.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Save post after submit the form" }, { "role": "assistant", "content": "Template.add_post.events({\n 'submit .add_post_form': function(){\n var title = event.target.title.value;\n var body - event.target.body....
javascript
new_file
null
null
mit
32c4655b62a4edf005b4233ad8b0ce8718c10537
pH-7/pH7Ortfolio,pH-7/pH7Ortfolio
client/templates/admin/posts/posts.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('$meteorSession service', function () {\n var $meteorSession,\n $rootScope,\n $scope;\n\n beforeEach(angular.mock.module('angular-meteor'));\n\n beforeEach(angular.mock.inject(function(_$meteorSession_, _$rootScope...
javascript
edit
0
1
mit
67ad246f902b2c04a426d16d5fe877ffa1fee5d0
IgorMinar/angular-meteor,omer72/angular-meteor,IgorMinar/angular-meteor,zhoulvming/angular-meteor,dszczyt/angular-meteor,craigmcdonald/angular-meteor,divramod/angular-meteor,aleksander351/angular-meteor,thomkaufmann/angular-meteor,Urigo/angular-meteor,Unavi/angular-meteor,manhtuongbkhn/angular-meteor,dszczyt/angular-me...
tests/integration/angular-meteor-session-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('emixApp',\n ['ngRoute',\n 'emixApp.controllers',\n 'emixApp.directives',\n 'emixApp.services',\n 'mgcrea.ngStrap',\n 'ngMorris',\n //'ngGoogleMap'\n 'pascalprecht.translate'\n ])\n .config(...
javascript
edit
0
1
mit
0aad07073773a20898d950c649a7fa74b22497fc
sierrodc/ASP.NET-MVC-AngularJs-Seed,sierrodc/ASP.NET-MVC-AngularJs-Seed,sierrodc/ASP.NET-MVC-AngularJs-Seed
Emix.Web/ngApp/emixApp.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar assert = require('assert');\nvar chromedriver = require('chromedriver');\nvar browser = require('../');\n\nchromedriver.start();\nbrowser.remote('http://localhost:9515/').timeout('60s').operationTimeout('20s');\naft...
javascript
edit
0
1
mit
85db50188bcf660bdf83fc09c0c50eed9f0433c4
ForbesLindesay/selenium-mocha
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Component, PropTypes } from 'react';\nimport os from 'os';\nimport semver from 'semver';\n\nexport const semverValidator = (props, propName, componentName) => {\n if (props[propName]) {\n return semver.validRange(props[prop...
javascript
edit
0
5
mit
67567c4809789b1896b470c621085125450cf845
petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-
src/renderer/ui/components/generic/PlatformSpecific.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\ndescribe('Login controller', function () {\n var scope;\n var loginCtrl;\n var $httpBackend;\n\n beforeEach(module('todo.controllers'));\n\n beforeEach(inject(function(_$httpBackend_, $controller, $rootSc...
javascript
edit
0
1
mit
e42f8f09fa04b1893a96479e004f06fa964efc67
timothygordon32/reactive-todolist,timothygordon32/reactive-todolist
test/assets/javascripts/specs/login-controller-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar eventSource = require('express-eventsource'),\n logger = require('radiodan-client').utils.logger('event-routes');\n\nmodule.exports = function (app, eventBus, services) {\n var eventStream = eventSource();\n\n // Shared ev...
javascript
edit
0
3
apache-2.0
62f676d0f493689dc877b12f9067c32179d81788
radiodan/magic-button,radiodan/magic-button
app/events/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction sortProject(changeEvent) {\n\n var data = {};\n\n // Get old and new index from event\n data.oldIndex = changeEvent.oldIndex;\n data.newIndex = changeEvent.newIndex;\n\n // Get filters \n data.filters = {};\n ...
javascript
edit
0
1
mit
78b046830969751e89f34683938a58154ec4ce1f
BBBThunda/projectify,BBBThunda/projectify,BBBThunda/projectify
public/script/project.js
rejected_duplicate
Near-duplicate of sample 101376
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction findByIds(items, ids) {\n return ids\n .map((id) => {\n return items.find((item) => item.id === id)\n })\n .filter((item) => item)\n}\n\nfunction findOneById(items, id) {\n return items.find((item) => item.id ==...
javascript
edit
0
6
isc
05975f56e6561e789dfb8fedaf4954cc751c787c
alex-shnayder/comanche
src/common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as FrontendPrefsOptions from './utils/frontend-preferences-options';\n\nconst config = {\n api:{\n host: 'http://localhost:3000',\n sentinel: null // keep always last\n },\n auth: {\n cookieDomain: 'localhost',\n ...
javascript
edit
0
0
mit
10c8e31cfd598b8f736ba7cdc9d280b607b30042
davidmz/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client,kadmil/freefeed-react-client,davidmz/freefeed-react-client,davidmz/freefeed-react-client,FreeFeed/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client
src/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// = Server config =============================================================\n\nexport const port = 3000\n\nexport const enableGraphiQL = true;\n\nexport const logFile = 'store.log'\n\n// = App config ===============================...
javascript
edit
0
0
mit
6d22dabca3b69a06fb8f3fdc11469b6da7641bfd
jukkah/comicstor
src/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// =================================================================================================\n// Core.js | String Functions\n// (c) 2014 Mathigon / Philipp Legner\n// =============================================================...
javascript
edit
0
3
mit
84e2ef62b1faff132d69ad3384be68fb364d86c9
Mathigon/core.js
src/string.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n '../jquery/autosubmit'\n], function(require) {\n var autosubmit = {\n initContent: function(root) {\n $(\"[data-autosubmit]\", root)\n .find(\"input[type-search]\").andSelf()\n ...
javascript
edit
0
1
bsd-3-clause
0fe751a62840bd6027da6e99ff53a7c1c72365c1
janga1997/Patterns,janga1997/Patterns,garbas/Patterns,garbas/Patterns,garbas/Patterns,janga1997/Patterns
src/patterns/autosubmit.js
rejected_duplicate
Near-duplicate of sample 71143
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport Link from 'next/link'\nimport { translate } from 'react-i18next'\n\nimport Section from './section'\n\nconst Events = ({ t }) => (\n <Section title={t('eventsSection...
javascript
edit
0
1
mit
a8d74088d41f2bb83336dc242d512193e743385a
sgmap/inspire,sgmap/inspire
components/home/events.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\nimport { createStyledComponent, pxToEm } from '../../../../../library/styles';\nimport _Flex from '../../../../../library/Flex';\n\ntype Props = {\n gutterWidth?: number | string,\n theme: Object\n};\n\nexport const conta...
javascript
edit
null
null
apache-2.0
f5484310a9e52d1c7786d111486882dd94959a98
mineral-ui/mineral-ui,mineral-ui/mineral-ui
src/website/app/demos/Flex/components/Flex.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar elasticsearch = require('elasticsearch');\n\nif (sails.config.useElastic === true) {\n var CLIENT = new elasticsearch.Client({\n host: sails.config.elasticHost,\n log: sails.config.elasticLogLevel\n })\n}\n\nmodu...
javascript
edit
0
5
mit
8bfcc293065a51f365fe574dcf168c3c10af98a6
molgenis/gene-network,molgenis/gene-network
api/controllers/requestHandlers/handleSuggest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n 'src-specs': {\n src: [\n 'test/fail-tests-if-have-errors-in-src.js',\n 'test/spec/api/**/*',\n 'test/spec/core/**/*',\n 'test/spec/dataviews/**/*',\n 'test/spec/util/**/*',\n 'test...
javascript
edit
0
0
bsd-3-clause
0a0d0c90aab2d5cb50e67e11cac747342eda27ed
splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js
grunt/tasks/_browserify-bundles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar allTestFiles = [];\nvar TEST_REGEXP = /_test\\.js$/i;\n\nvar pathToModule = function(path) {\n return path.replace(/^\\/base\\/js\\//, '..\\/').replace(/\\.js$/, '');\n};\n\nObject.keys(window.__karma__.files).forEach(function(file...
javascript
edit
0
3
mit
30f2923409e548ccc4626278509ae158bae6d5e0
xaroth8088/tournament-of-lulz,xaroth8088/tournament-of-lulz,xaroth8088/tournament-of-lulz,xaroth8088/tournament-of-lulz
web_clients/javascript_mvc/www/js/test/test-main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Submission = require('../models/Submission');\nconst moment = require('moment');\n\n/**\n * GET /submissions\n */\nexports.getSubmissions = (req, res) => {\n const page = parseInt(req.query && req.query.page) || 0;\n Submission\...
javascript
edit
0
5
mit
cf4e0ba45bb8da2f44ea3eccee25f38b69479f45
hakatashi/esolang-battle,hakatashi/esolang-battle,hakatashi/esolang-battle
controllers/submission.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport { translate } from 'react-i18next'\n\nimport { GEODATA_API_URL } from '@env'\n\nconst Thumbnail = ({ recordId, thumbnails, t }) => {\n const hasThumbnail = thumbnail...
javascript
edit
0
3
mit
3ac7f2a8044ad8febe16541e9b3683cf00fd1ae0
sgmap/inspire,sgmap/inspire
components/search/result/thumbnail.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n* Allocate a buffer using an octet array.\n*\n* @module @stdlib/buffer/from-array\n*\n* @example\n* var array2buffer = require( '@stdlib/type/buffer/from-array' );\n*\n* var buf = array2buffer( [ 1, 2, 3, 4 ] );\n*...
javascript
edit
0
0
apache-2.0
221ed0e89bf69a169d1110788e0be3e2d10c49f0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/buffer/from-array/lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function metaForField(content, fieldName) {\n if (!content) { return; }\n\n try {\n return content.constructor.metaForProperty(fieldName);\n } catch (err) {\n return;\n }\n\n}\n\n\n```\n\nApply this change: Fix ...
javascript
edit
0
3
mit
a151d88b94ee726f0450b93df5ede04124a81ded
cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack
packages/rendering/addon/-private/meta-for-field.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar assert = require('assert');\nvar sinon = require('sinon');\n\nvar Account = require('../../lib/endpoints/account');\nvar Request = require('../../lib/request');\n\ndescribe('endpoints/account', function () {\n de...
javascript
edit
0
1
mit
c6335c604a1495d2526f6f395e429e065f9317af
jwilsson/glesys-api-node
test/endpoints/account.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst handleError = (err, res) => {\n switch (err.code) {\n case 401:\n return res.status(401).send(err.message);\n case 404:\n return res.status(404).send(err.message);\n default:\n return res.status(400).send(...
javascript
edit
0
3
mit
5591b4615ec9e88f448ad2a9f777c85e659bd0a0
johadi10/PostIt,johadi10/PostIt
server/helpers/helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function normalizeOutput(type, value) {\n return {\n type,\n name: value.name,\n firstName: value.firstName,\n lastName: value.lastName,\n personId: value.personId,\n userId: v...
javascript
edit
0
1
mit
a96f3a13dc3a80d18ca7bc2fec5268c453c24533
TobitSoftware/chayns-components,TobitSoftware/chayns-components,TobitSoftware/chayns-components
src/react-chayns-personfinder/utils/normalizeOutput.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function () {\n var params = {'data_type': '23andme_names'};\n\n $.ajax({\n 'type': 'GET',\n 'url': '/json-data/',\n 'data': params,\n 'success': function(data) {\n if (data.profiles && dat...
javascript
edit
0
5
mit
979bf24a28e95f6975fde020b002426eafe5f3e6
PersonalGenomesOrg/open-humans,OpenHumans/open-humans,PersonalGenomesOrg/open-humans,OpenHumans/open-humans,OpenHumans/open-humans,PersonalGenomesOrg/open-humans,PersonalGenomesOrg/open-humans,OpenHumans/open-humans
static/js/activity-23andme-complete-import.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefaultConf = {\n height: 100,\n width: 300,\n fingerprintLength: 20\n};\n\ndescribe(\"The constructor is supposed a proper Captcha object\", function() {\n it('Constructor Captcha exists', function(){\n expect(Captch...
javascript
edit
0
1
mit
8c8c3ef0efabbcf07ead714b3fb79f1f7ed81a41
sonjahohlfeld/Captcha-Generator,sonjahohlfeld/Captcha-Generator
test/spec/test_captcha.js
rejected_duplicate
Near-duplicate of sample 81448
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Creates an object of type wgaPipeline for drawing whole genome alignment visualizations\n * @author Markus Ankenbrand <<EMAIL>> \n * @constructor\n * @param {Object} svg - jQuery object containing a svg DOM element. Visualizatio...
javascript
edit
0
1
mit
0100ebf9a24675a16ec200caf894af862196589c
BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,AliTVTeam/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,AliTVTeam/AliTV
d3/js/wgaPipeline.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction do_command(item, command, val) {\n var data = {};\n data[item] = command;\n\n if (val != undefined) {\n\tdata[\"value\"] = val;\n }\n $.get(\"/CMD\", data);\n}\n\nfunction do_scene(scene, action) {\n $.get(\"/...
javascript
edit
0
2
mit
c74647dae08d8d5f55a3d68de956a37b1fccec0e
idiotic/idiotic-webui,idiotic/idiotic-webui,idiotic/idiotic-webui
assets/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/ Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// Licensed under the Apache-2.0 License on an \"AS IS\" BASIS, WITHOUT WARRANTIES OF ANY KIND. \n\n// ABOUT THIS NODE.JS SAMPLE: This sample is part of t...
javascript
edit
0
1
apache-2.0
d90f7b2a0393318affbb02ff89a63ade1a8b0469
awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,a...
javascript/example_code/nodegetstarted/sample.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar TaskScheduler = require(\"./task\").TaskScheduler;\nvar colors = require(\"colors\");\n\nexports.execute = function(initialStep, context, cb) {\n\tvar completedSteps = 0;\n\tvar estimatedSteps = initialStep.remaining;\n\n\tvar sched...
javascript
edit
0
7
mit
3bc142f44ebd589227eec3660c72640fdfa7a238
aaubry/feed-reader,aaubry/feed-reader
bl/pipeline.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = HttpConnection;\n\nvar request = require('requestretry');\nvar HttpConfig = require(\"./HttpConfig\");\nvar PaymayaApiError = require(\"./PaymayaApiError\");\n\nfunction HttpConnection(httpConfig) {\n\tthis._httpConfig ...
javascript
edit
0
8
mit
56e784e7e966ccff9ba29b658ebd31406a868987
PayMaya/PayMaya-Node-SDK
lib/paymaya/core/HttpConnection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nexport default {\n setup,\n};\n\n/**\n * Module dependencies.\n */\n\nimport SequelizeStore from 'koa-generic-session-sequelize';\nimport session from 'koa-generic-session';\n\n/**\n * Prepares session middleware and m...
javascript
edit
0
6
mit
bb85a90b6941c8f6d20b2cc6e15359d7daf9b461
HiFaraz/identity-desk
src/authentication/sessions.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add code to video detail component" }, { "role": "assistant", "content": "import React from 'react';\n// import VideoListItem from './video_list_item';\n\nconst VideoDetail = ({video}) => {\n const videoId = video.id.videoId...
javascript
new_file
0
1
mit
88e405fdaa97a224ad6683d39163a04d86982ede
izabelka/redux-simple-starter,izabelka/redux-simple-starter
src/components/video_detail.js
rejected_duplicate
Near-duplicate of sample 96679
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst test = require('tape')\nconst BorrowState = require('../lib/module.js')\n\nconst sleep50ms = require('./sleep.js')\nconst countTo = require('./count-to.js')\n\n;[true, false].forEach((unsafe) => {\n test(`read-only-parallel (${un...
javascript
edit
0
1
isc
1e2aa246a558447455dba80c4f49e5f9cdbb00c7
jamescostian/borrow-state
test/read-only-parallel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2020 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\nconst path = require('path');\nconst rulesDirPlugin = require('esl...
javascript
edit
0
0
bsd-3-clause
b948a9b149394932a0d3bf8a957a8792e23510ae
ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend
front_end/.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require jquery.treetable\n//= require browse_everything/behavior\n\n// Show the files in the queue\nBlacklight.onLoad( function() {\n // We need to check this because https://github.com/samvera/browse-everything/issues/169\n if ($...
javascript
edit
0
2
apache-2.0
c7329c1c5347ca2f453c41aeb0f479edc4050187
samvera/hyrax,samvera/hyrax,samvera/hyrax,samvera/hyrax
app/assets/javascripts/hyrax/browse_everything.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport { get } from \"lodash-es\";\nimport { connect } from \"react-redux\";\nimport { Panel } from \"react-bootstrap\";\n\nimport { getSoftwareUpdates } from \"../../updates/actions\";\nimport { Icon } fro...
javascript
edit
0
2
mit
79ac8a1c0b3e48b3b29f24422ab189d5dccc8fa0
virtool/virtool,igboyes/virtool,igboyes/virtool,virtool/virtool
client/src/js/home/components/Welcome.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n\tname: \"frappe-html\",\n\tsetup(build) {\n\t\tlet path = require(\"path\");\n\t\tlet fs = require(\"fs/promises\");\n\n\t\tbuild.onResolve({ filter: /\\.html$/ }, (args) => {\n\t\t\treturn {\n\t\t\t\tpath: path.joi...
javascript
edit
0
2
mit
17e546f1a58744f7fe2f4e80147f6df2a203a2ee
StrellaGroup/frappe,StrellaGroup/frappe,frappe/frappe,frappe/frappe,StrellaGroup/frappe,frappe/frappe
esbuild/frappe-html.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nconst getJSON = (\n endpoint: string,\n data: ?{},\n successCallback: ({\n url: string,\n title: string,\n author_name: string,\n thumbnail_url: string,\n }) => void,\n) => {\n const request = new XMLHttpReq...
javascript
edit
null
null
mit
662828ef56046bc7830718ef897a4ebbefd50278
springload/draftail,springload/draftail,springload/draftail,springload/draftail
examples/utils/embedly.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(){\n 'use strict'\n\n const New = {\n templateUrl: 'pages/new/new.html'\n\n // templateUrl: 'components/bookmarks/bookmark-search.html',\n // controller: 'NewController'\n // controllerAs: 'model'\n }\n\n angul...
javascript
edit
0
1
mit
443a4ae12198f757370e95cf9e2de12aae9f710f
Dom-Mc/shareMark,Dom-Mc/shareMark,Dom-Mc/shareMark
app/assets/javascripts/pages/new/new.component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst path = require('path');\nconst resolveApp = require('rear-core/resolve-app');\n\nconst ownNodeModules = fs.realpathSync(\n path.join(__dirname, '..', 'node_modules')\n);\n\nconst AppPaths = {\n ownNode...
javascript
edit
0
0
mit
7f009627bc82b67f34f93430152da71767be0029
erremauro/rear,rearjs/rear
packages/rear-system-package/config/app-paths.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert'),\n\tcapitalize = require('../index.js')\n\n\ndescribe('Capitalizer', function () {\n\n\tit('Capitalizes the first letter of a string', function () {\n\t\tassert.equal(capitalize('test'), 'Test')\n\t\tasser...
javascript
edit
0
1
mit
8046548e86332e8b544563bcbc660a37b50ebd5e
adius/capitalizer
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst chai = require('chai');\n\nconst plate = require('../index');\n\nconst expect = chai.expect;\n\ndescribe('Those postal codes', function() {\n it('should be valid', function() {\n expect(plate.validate('10188')...
javascript
edit
0
1
mit
314b2f1b8350b64e29824257cef48f142d4c152f
alefteris/greece-postal-code
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @author aniero / https://github.com/aniero\n */\nvar DiagonalMovement = require('../core/DiagonalMovement');\nvar JPFNeverMoveDiagonally = require('./JPFNeverMoveDiagonally');\nvar JPFAlwaysMoveDiagonally = require('./JPFAlwaysM...
javascript
edit
0
5
bsd-3-clause
b77fd67ee02329bd25fe224689dcd8434262c282
radify/PathFinding.js,radify/PathFinding.js
src/finders/JumpPointFinder.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// `ddg_spice_urban_dictionary` is a callback function that gets\n// \"urban dictionary cool\" or \"urban dictionary ROTFL.\"\n\n// Note: This plugin can display adult content and profanity.\n\nfunction ddg_spice_urban_dictionary(respon...
javascript
edit
0
5
apache-2.0
9edb7717b460685efaff9b2974daa9b776bd2921
alexandernext/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,ppant/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,samskeller/zeroclic...
share/spice/urban_dictionary/urban_dictionary.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (window) {\n window.__env = window.__env || {};\n window.__env.hostUrl = 'https://' + window.location.hostname +'/';\n window.__env.apiUrl = window.__env.hostUrl+'api/';\n window.__env.intontationUrl = window.__env.hostUrl...
javascript
edit
0
3
mit
614b4d791cf3660f1e84550cc17e86c2d10f5c9f
MontrealCorpusTools/polyglot-server,MontrealCorpusTools/polyglot-server,MontrealCorpusTools/polyglot-server,MontrealCorpusTools/polyglot-server
iscan/static/iscan/env.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('MyApp', ['ngResource', 'ngMessages', 'ngRoute', 'ngAuth', 'mgcrea.ngStrap'])\n .config(['$routeProvider', function($routeProvider) {\n $routeProvider\n .when('/', {\n templateUrl: 'views/home.html',\n ...
javascript
edit
0
1
mit
7888270cc70a99be1c0fc20945a9684d66a69134
hsr-ba-fs15-dat/satellizer,gshireesh/satellizer,bnicart/satellizer,jskrzypek/satellizer,jskrzypek/satellizer,johan--/satellizer,vebin/satellizer,TechyTimo/CoderHunt,celrenheit/satellizer,maciekrb/satellizer,maciekrb/satellizer,david300/satellizer,ELAPAKAHARI/satellizer,gregoriusxu/satellizer,maciekrb/satellizer,rick447...
examples/client/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// From https://github.com/airbnb/enzyme/blob/master/docs/guides/jsdom.md\n\nvar jsdom = require('jsdom').jsdom;\n\nvar exposedProperties = ['window', 'navigator', 'document'];\n\nglobal.document = jsdom('');\nglobal.window = document.d...
javascript
edit
0
2
bsd-3-clause
1771ab50f1a5d3dbe06871a26bdfa31882e393ac
jdetle/nteract,jdfreder/nteract,jdetle/nteract,nteract/nteract,0u812/nteract,0u812/nteract,nteract/nteract,captainsafia/nteract,temogen/nteract,jdetle/nteract,nteract/composition,rgbkrk/nteract,nteract/nteract,0u812/nteract,captainsafia/nteract,nteract/composition,temogen/nteract,rgbkrk/nteract,rgbkrk/nteract,captainsa...
test/setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Compile = require('./index2.js')\n\ncompile = Compile('b11bf50b8a391d4e8560e97fd9d63460')\n\n//Source Code to be compiled remotely\nvar sourceCode = 'print 3*20' \n\n//Programming Language Selection\nvar language = 'Python' \n\n//In...
javascript
edit
0
1
mit
a707a26bd606f8b10e5610dec5f8f2743b6c41a4
saru95/ideone-npm
example/test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar loadTodos = function() {\n $.ajax({\n url: \"/graphql?query={todoList{id,text,done}}\"\n }).done(function(data) {\n console.log(data);\n var dataParsed = JSON.parse(data);\n var todos = dataParsed.data.todoList;\n\n ...
javascript
edit
0
3
mit
bac5e65bf28e4645d30ef6620a1d11d98b214e79
equinux/graphql,graphql-go/graphql
examples/todo/static/assets/js/app.js
rejected_duplicate
Near-duplicate of sample 100375
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Js-coding-standards\n *\n * @author Robert Rossmann <<EMAIL>>\n * @copyright 2016 STRV\n * @license http://choosealicense.com/licenses/bsd-3-clause BSD-3-Clause License\n */\n\n'use strict'\n\nmodule.exports = {\n\n ...
javascript
edit
0
0
bsd-3-clause
05c19987d3f569aa892d50755c757a6356e4a9f1
strvcom/js-coding-standards,strvcom/eslint-config-javascript,strvcom/eslint-config-javascript
environments/react/v15.js
rejected_duplicate
Near-duplicate of sample 68011
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction setup(options, imports, register) {\n // Import\n var server = imports.server.http;\n var port = imports.server.port;\n var watch = imports.watch;\n var workspace = imports.workspace;\n var logger = imports.lo...
javascript
edit
0
1
apache-2.0
8999a66c88e56bc769bded0fe1ec17e0360682b5
rajthilakmca/codebox,code-box/codebox,code-box/codebox,fly19890211/codebox,etopian/codebox,nobutakaoshiro/codebox,indykish/codebox,Ckai1991/codebox,fly19890211/codebox,CodeboxIDE/codebox,lcamilo15/codebox,kustomzone/codebox,lcamilo15/codebox,ronoaldo/codebox,ronoaldo/codebox,listepo/codebox,rajthilakmca/codebox,indykis...
src/core/cb.main/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport * as counterActions from '../actions/counterActions';\nimport { dispatch } from '../store';\n\n@connect(state => ({\n\tcounter: state.c...
javascript
edit
0
1
mit
d607447c7a4ee04fd559ba44f4fbb07ad42b8453
autozimu/react-hot-boilerplate,autozimu/react-hot-boilerplate
src/components/Counter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['summernote/core/range'], function (range) {\n /**\n * @class editing.History\n *\n * Editor History\n *\n */\n var History = function ($editable) {\n var stack = [], stackOffset = -1;\n var editable = $editabl...
javascript
edit
0
3
mit
715fec370fa84ee9687a3e1f34e942a37cdf9dd7
bebeeteam/summernote,summernote/summernote,summernote/summernote,AshDevFr/winternote,summernote/summernote,bebeeteam/summernote,bebeeteam/summernote,AshDevFr/winternote,AshDevFr/winternote
src/js/editing/History.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst React = require('react');\nconst classNames = require('classnames');\n\nclass Button extends React.Component {\n render() {\n const {\n className,\n children,\n type,\n ...props\n } = this.props;\n\n ...
javascript
edit
0
1
mit
68bb8489b6fe7b2466159b2e5b9e08c21c466588
Opstarts/opstarts-ui
src/button.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n token: process.env.TOKEN || '1234567890abcdef',\n settings: {\n webHook: {\n port: process.env.PORT || 443,\n host: process.env.HOST || '0.0.0.0'\n }\n },\n telegram: {\n port: 443,\n host:...
javascript
edit
0
0
mit
10503ba849b7f43e18509e08bd26b66917fa84ea
edloidas/rollrobot
src/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport React from 'react'\n\nclass FixButton extends React.Component {\n handleClick(): void {\n this.props.cb()\n }\n render() {\n return <button className=\"fix-btn\" onClick={() => this.handleClick()}>Fix</but...
javascript
edit
null
null
mit
bea0e08a0f75d9ce5cd5f661db0aca50e678534c
steelbrain/linter-ui-default,steelbrain/linter-ui-default,AtomLinter/linter-ui-default
lib/tooltip/fix-button.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nrequire('babel-polyfill');\n\nvar cli = require('../lib/cli');\ncli.run(process);\n\n```\n\nApply this change: Use `.default` to access exported function" }, { "role": "assistant", "content": "#!/usr/b...
javascript
edit
0
0
mit
bc6633cdbfaccdec91725caf578c159e7bbd8baa
Springworks/node-scale-reader
bin/cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react/addons';\n\nlet find = React.addons.TestUtils.findRenderedDOMComponentWithTag;\nlet render = React.addons.TestUtils.renderIntoDocument;\n\nlet Control = reqmod('components/control');\n\n/**\n * Control compone...
javascript
edit
0
1
mit
b41e1a78f7ac0fa996b290391273cd70d6375193
melonmanchan/teamboard-client-react,JanKuukkanen/Oauth-client-react,JanKuukkanen/Oauth-client-react,N4SJAMK/teamboard-client-react,tanelih/teamboard-client-react,melonmanchan/teamboard-client-react,santtusulander/teamboard-client-react,N4SJAMK/teamboard-client-react,santtusulander/teamboard-client-react,nikolauska/team...
test/components/control.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nmodule.exports = function (sequelize, DataTypes) {\n let User = sequelize.define('User', {\n id: {\n type: DataTypes.UUID,\n primaryKey: true,\n defaultValue: DataTypes.UUIDV4\n },\n email: {\n ...
javascript
edit
0
1
bsd-3-clause
0b9bed076bac3f942e904a5e8388880af515ced0
FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com
api/db/user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { animate } from '../actions/animate'\n\nconst Circle = {\n\n getInitialState() {\n return Circle.set(null, { color: 'orange', time: Date.now() })\n },\n\n set (_, { color, time }) {\n let sin = Math.sin(time / 200)\n ...
javascript
edit
0
1
mit
9c6ee2b1a02d751bb4a1134a2a0d07e531d50acd
vigetlabs/microcosm,leobauza/microcosm,leobauza/microcosm,vigetlabs/microcosm,leobauza/microcosm,vigetlabs/microcosm
examples/simple-svg/app/stores/circle.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst _ = require('lodash'),\n fstate = require('../util/fstate'),\n digest = require('../util/digest'),\n hashcache = require('../util/hashcache'),\n log = require('../util/log')\n ;\n\n\nfunction buildDigest(buildDir, cb) {\n fs...
javascript
edit
0
2
mit
461893aac3ec8cd55caa2946b015891a9daff0cc
Iceroad/martinet,Iceroad/martinet,Iceroad/martinet
lib/engine/buildDigest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* globals menu */\n\nTemplate.sidebarItem.helpers({\n\tcanLeave() {\n\t\tconst roomData = Session.get(`roomData${ this.rid }`);\n\n\t\tif (!roomData) { return false; }\n\n\t\tif (((roomData.cl != null) && !roomData.cl) || (roomData.t =...
javascript
edit
0
5
mit
ed6eed2c1f589c179cb57d9386f29cbfdbf1fc37
NexFive/DrustChat,NexFive/DrustChat,NexFive/DrustChat,NexFive/DrustChat
packages/rocketchat-ui-sidenav/client/sidebarItem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { combineReducers } from 'redux';\nimport { routerReducer } from 'react-router-redux';\nimport { reducer as formReducer } from 'redux-form';\nimport auth from './userSignUp';\nimport login from './login';\nimport book from './boo...
javascript
edit
0
0
mit
de04f9e1f50dc38e70cb4b47271829042dc9b301
amarachukwu-agbo/hello-books,amarachukwu-agbo/hello-books
client/reducers/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst cleanWebPackPlugin = require('clean-webpack-plugin');\n\nmodule.exports = {\n output: {\n path: path.resolve(__dirname, 'dist'),\n filename: 'bundle.js',\n publicPath: '/static/',\n },\n ...
javascript
edit
0
0
mit
a7af375c66552df8a73f945679b1ff01f95c6f36
amarachukwu-agbo/hello-books,amarachukwu-agbo/hello-books
client/webpack.common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport hoistStatics from \"hoist-non-react-statics\";\nimport { Cookies } from \"react-cookie\";\nimport getDisplayName from \"../utils/getDisplayName\";\nimport { NEX...
javascript
edit
0
2
mit
219639c6d2d3df9b6126b1cb6407173d95a53d80
traveloka/soya-next
packages/soya-next/src/cookies/withCookiesPage.js
accepted
null
true