messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n \"use strict\";\n GOVUK.Tracker.load();\n var cookieDomain = (document.domain === 'www.beta.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : document.domain;\n GOVUK.analytics = new GOVUK....
javascript
edit
0
1
mit
a42559d9fca840fc4ac9f3bd90e781a952c64fa9
AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/di...
app/assets/javascripts/_analytics.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTemplate.postsList.helpers({\n posts: function() {\n return Posts.find();\n }\n});\n\n```\n\nApply this change: Sort posts by submission date" }, { "role": "assistant", "content": "Template.postsList.helpers({\n posts:...
javascript
edit
0
1
mit
8901a99c0db6f3cd78e76e7a5625c9eb4dc6ad38
Bennyz/microscope,Bennyz/microscope
client/templates/posts/posts_list.js
rejected_duplicate
Near-duplicate of sample 71801
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Id(a) {\n this.value = a;\n}\n\n// Semigroup (value must also be a Semigroup)\nId.prototype.concat = function(b) {\n return new Id(this.value.concat(b.value));\n};\n\n// Monoid (value must also be a Monoid)\nId.prototype....
javascript
edit
0
2
mit
2bb7e33a608355df3a9a176ca31e198d17f9a8df
fantasyland/fantasy-land,branneman/fantasy-land,Webschool-io/fantasy-land,fantasyland/fantasy-land,nsluss/fantasy-land,Tuch/fantasy-land,TheLudd/fantasy-land,bergus/fantasy-land,davidchambers/fantasy-land,davidchambers/fantasy-land,briancavalier/fantasy-land,rpominov/fantasy-land
id.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar tape = require(\"tape\")\n\nvar evalScript = require(\"../../lib/eval-script\")\n\ntape(\"test evalScript method\", function(t) {\n document.body.className = \"\"\n\n var script = document.createElement(\"script\")\n script.inner...
javascript
edit
0
1
mit
31e1e7e405e5b25431d6794e96a8ff1db5307eff
MoOx/pjax,MoOx/pjax,MoOx/pjax
tests/lib/eval-scripts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n;(function(lander){\n console.log('Moon Lander Visualisation');\n\n var display = document.getElementById('display');\n var horizon = new Array(display.width);\n horizon[0] = 50;\n for (var index = 1; index < display.widt...
javascript
edit
0
2
mit
2fc72c58517325f9bc3c6a9e4b36e1bf0a2a655d
darwins-challenge/moonlander-visualisation,darwins-challenge/moonlander-visualisation,darwins-challenge/moonlander-visualisation
js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nZepto(function($) {\n prettyPrint();\n\n var $frameContainer = $('.frames-container');\n var $container = $('.details-container');\n var $activeLine = $frameContainer.find('.frame.active');\n var $activeFrame = $contain...
javascript
edit
0
2
mit
4362be09dfa4b6471d119a90bc26c64c7f90a8f1
oligriffiths/whoops,nonconforme/whoops,emilkje/whoops,emilkje/whoops,nonconforme/whoops,michabbb-backup/whoops,stefen/whoops,staabm/whoops,michabbb-backup/whoops,Vmak11/whoops,oligriffiths/whoops,stefen/whoops,filp/whoops,filp/whoops,Vmak11/whoops,staabm/whoops,UnderDogg/whoops,UnderDogg/whoops
src/Whoops/Resources/js/whoops.base.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint func-names:0 */\n\nconst path = require('path');\nconst webpackConfig = require('../webpack');\n\nmodule.exports = function (config) {\n config.set({\n browsers: ['PhantomJS'],\n\n singleRun: true,\n\n frameworks: ['...
javascript
edit
0
1
mit
56ee9f3bd29767a2bdf74597ae8e8eb7425a4bc9
wellyshen/react-cool-starter,wellyshen/react-cool-starter,not-bad-react/not-bad-react-starter,wellyshen/react-cool-starter,zolcman/calendartest
tools/testing/karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Update compiled JS with latest" }, { "role": "assistant", "content": "!function(t,e,i,n){function s(e,i){this.element=e,this.$element=t(e),this.init()}var h=\"textareaAutoSize\",o=\"plugin_\"+h,r=function(t){return t.replace(...
javascript
new_file
0
3
mit
77e386ee3d54152993d8922173968af01d328074
javierjulio/textarea-autosize,javierjulio/textarea-autosize
dist/jquery.textarea_autosize.min.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar selftest = require('../selftest.js');\nvar Sandbox = selftest.Sandbox;\n\nselftest.define(\"report-stats\", function () {\n var s = new Sandbox;\n\n run = s.run(\"create\", \"foo\");\n run.expectExit(0);\n s.cd(\"foo\");\n\n //...
javascript
edit
0
1
mit
a1c619568879a39f2417d313489e419c6cb6e51b
msavin/meteor,lieuwex/meteor,dev-bobsong/meteor,nuvipannu/meteor,daltonrenaldo/meteor,SeanOceanHu/meteor,skarekrow/meteor,lawrenceAIO/meteor,jagi/meteor,Hansoft/meteor,mubassirhayat/meteor,ndarilek/meteor,jrudio/meteor,yyx990803/meteor,yiliaofan/meteor,lorensr/meteor,jagi/meteor,ericterpstra/meteor,ndarilek/meteor,Anji...
tools/tests/report-stats.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require spree/frontend\n\nSpreePaypalExpress = {\n hidePaymentSaveAndContinueButton: function(paymentMethod) {\n if (SpreePaypalExpress.paymentMethodID && paymentMethod.val() == SpreePaypalExpress.paymentMethodID) {\n $('.c...
javascript
edit
0
4
bsd-3-clause
e2a33801bcbefffaa59988d89ae07f7899d72a02
quentinuys/better_spree_paypal_express,Reformation/better_spree_paypal_express,givanse/better_spree_paypal_express,StemboltHQ/solidus_paypal_express,freerunningtech/solidus_paypal_express,formrausch/better_spree_paypal_express,FlexMessenger/better_spree_paypal_express,freerunningtech/solidus_paypal_express,quentinuys/b...
app/assets/javascripts/spree/frontend/spree_paypal_express.js
rejected_duplicate
Near-duplicate of sample 79590
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n allFiles: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js', 'index.js'],\n ...
javascript
edit
0
2
apache-2.0
f70cad9a5838144449198bc8a869b698512b94e5
xmpp-ftw/xmpp-ftw-avatar
Gruntfile.js
rejected_duplicate
Near-duplicate of sample 72000
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require(\"path\");\n\nfunction shouldIncludePath(filePath) {\n return path.extname(filePath) === \".sol\";\n}\n\nmodule.exports = { shouldIncludePath };\n\n```\n\nApply this change: Add .abi.json and .json to whitelist for...
javascript
edit
0
1
mit
7346849da85e794043eadf89033c167ef9921e1b
ConsenSys/truffle
packages/compile-solidity/profiler/shouldIncludePath.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env amd */\n(function (name, definition) {\n if (typeof define === 'function') {\n // AMD\n define(definition)\n } else if (typeof module !== 'undefined' && module.exports) {\n // Node.js\n module.exports = defin...
javascript
edit
0
6
apache-2.0
e823c28c3fa336b8e2bd413a7dd7d77e599c6a10
cskeppstedt/null-prune
null-prune.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function($, window, _, undefined){\n\t\n\t$(function() {\n\t\tjQuery.extend(jQuery.validator.messages, {\n\t\t\trequired : \"Това поле е задължително\",\n\t\t\tminlength : jQuery.validator.format(\"Моля въведете поне {0} символа\")\n\t...
javascript
edit
0
5
mit
ba4d319981973372d6eddb3f566500e8f3c20400
Hackfmi/Diaphanum,Hackfmi/Diaphanum
hackfmi/static/js/appConfig.js
rejected_duplicate
Near-duplicate of sample 79821
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nmodule.exports = function (grunt) {\n grunt.initConfig({\n eslint: {\n options: {\n config: \".eslintrc\"\n },\n src: [\n \"Gruntfile.js\",\n ...
javascript
edit
0
1
mit
089fbbf414b37a15b26f04489c53164415601b8a
albertosantini/node-opencpu
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport $ from 'jquery';\nimport _ from 'lodash/fp';\nimport { match } from 'wildstring';\nimport beautify from './common/beautify';\n\nfunction isMatched(needle, haystack) {\n return _.some(rule => match(rule, needle))(haystack);\n}\n\...
javascript
edit
0
2
mit
1d36bf44d2fa77800a0edcc16fc9213f0e6372bb
jihchi/jsonz
src/inject.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express')\nconst guildFeedsAPI = express.Router({ mergeParams: true })\nconst validate = require('../../../../middleware/validator.js')\nconst guildHasFeed = require('../../../../middleware/guildHasFeed.js')\nco...
javascript
edit
0
1
mit
09b9144f7920ddd3d098a87e1c5414ceb25f280f
synzen/Discord.RSS,synzen/Discord.RSS
src/web/routes/api/guilds/feeds/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/node\n\"use strict\";\nvar child_process = require(\"child_process\");\nprocess.chdir(__dirname + \"/src\")\nchild_process.execFile(\"find\", [\"-type\", \"f\"], function(err, stdout, stderr){\n\tvar files = stdout.split(\"\\...
javascript
edit
0
3
mit
5b533ff5294e48299c07e70b59433bf2ac7c97d8
serprex/pixi.js
mkpixi.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from '../templates/components/freestyle-collection';\n\nconst { computed, inject } = Ember;\n\nexport default Ember.Component.extend({\n layout,\n classNames: ['FreestyleCollection'],\n class...
javascript
edit
0
4
mit
f0cad5cd865da965c376e89262eb6f13fa5b3322
chrislopresto/ember-freestyle,chrislopresto/ember-freestyle,chrislopresto/ember-freestyle,chrislopresto/ember-freestyle,chrislopresto/ember-freestyle
addon/components/freestyle-collection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst selectors = require('../../../../selectors')\n\ndescribe('ompany Collections', () => {\n before(() => {\n cy.visit(`/companies`)\n })\n\n it('should return the results summary for a company collection', () => {\n cy.get(s...
javascript
edit
0
1
mit
c39976bc1da5f3a75a3c789b8bdd2793faef678d
uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend
test/end-to-end/cypress/specs/LEP/collection-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';\n\nexport default Ember.Route.extend(AuthenticatedRouteMixin, {\n currentUser: Ember.inject.service('current-user'),\...
javascript
edit
0
1
bsd-2-clause
e9d450d8c56d5628f3d68ce25526bc801e715223
barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web
app/routes/admin/convention-manager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst TwitterPostBase = require('./TwitterPostBase');\nconst { captureGearScreenshot } = require('@/app/screenshots');\nconst { readData, getTopOfCurrentHour } = require('@/common/utilities');\n\nclass GearTweet extends TwitterPostBase ...
javascript
edit
0
1
mit
25d711124e330c784fb4d0ebba1d46fa58f82e7b
misenhower/splatoon2.ink,misenhower/splatoon2.ink,misenhower/splatoon2.ink
src/app/twitter/tweets/GearTweet.js
rejected_duplicate
Near-duplicate of sample 71441
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$( document ).ready(function() {\n var url = $.url();\n var query = url.param(\"q\");\n \n if (typeof query != 'undefined')\n {\n $(\"#left\").attr(\"src\", \"https://www.bing.com/search?q=\" + encodeURICompone...
javascript
edit
0
3
mit
a345b5d235c79f90e81c960cdfad7b591ddff295
zmarty/double-shot-search,zmarty/double-shot-search
search.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path')\nconst webpack = require('webpack')\nconst WebpackDevServer = require('webpack-dev-server')\nconst proxy = require('proxy-middleware')\nconst url = require('url')\nconst express = require('express')\n\nconst...
javascript
edit
0
1
mit
f4ad6105ab1ee8f06962eab92c82437d61de10f6
epicsharp/react-boilerplate,RSS-Dev/live-html,RSS-Dev/live-html,epicsharp/react-boilerplate
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nif (process.env.NEW_RELIC_LICENSE_KEY) require('newrelic');\n\nconst express = require('express');\nconst logger = require('./modules').logger;\nconst mongooseHelper = require('./modules').mongooseHelper;\nconst rollbar...
javascript
edit
0
4
mit
32bf1f5f274d8c2b95d8ea676c1e76e63379c2e0
carparker/carparker-server
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\nvar http = require('http').Server(app);\n\n// TODO: Use socket.io, which requires swift on the ios side, but would make all of this code\n// not necessary.\nvar io = require('webs...
javascript
edit
0
3
mit
3ea3d585d21c3f6bb2b016fbd19278b4dc82c478
jacob-meacham/socket-starter,jacob-meacham/socket-starter
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { spawn } = require('child_process')\n\nmodule.exports = {\n onPreBuild({ utils: { status: { show } } }) {\n spawn('sleep', ['60'], { detached: true })\n show({ summary: 'Test' })\n }\n}\n\n```\n\nApply this change: Revert...
javascript
edit
0
1
apache-2.0
59eec97713488c95c2e8869e8b73ce0d0eab09bb
ehmicky/cv-website,ehmicky/cv-website
plugin.js
rejected_duplicate
Near-duplicate of sample 80096
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { colorClick } from '../../actions/assets';\nimport map from 'lodash/map';\nimport classNames from 'classnames';\n\nconst ColorPicker = ({ assets,...
javascript
edit
0
1
mit
18a2339cf5324eedca0585cb6eb5cabe85b8258e
g8extended/Character-Generator,g8extended/Character-Generator
src/components/slider/colorpicker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function(require, exports, module) {\n\nexports.showCli = true;\nexports.aceKeyboardHandler = require(\"ace/keyboard/vim\").handler;\n\nexports.aceKeyboardHandler.defaultKeymap.unshift(\n \n { keys: ':', type: 'action', act...
javascript
edit
0
1
mit
8c7030fdb352b2002158cef1714a438bd54cd025
c9/c9.ide.ace.keymaps
vim/keymap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n var $body = $('body');\n var senateData;\n\n var scan = function() {\n $.each(senateData, function(i, senator) {\n var firstLastRegEx = new RegExp(senator.firstName + ' ' + senator.lastName);\...
javascript
edit
0
1
mit
dbaf920c7ddedb522d44c41bceb740b6145c4b0c
benjarwar/dial-congress
js/content.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// JavaScript Document\n\n// Scripts written by YOURNAME @ YOURCOMPANY\n\nvar overlays = document.querySelectorAll(\"[data-overlay]\"),\n overlay_closer = document.querySelector(\".overlay-closer\");\n\n// listen for clicks on the ov...
javascript
edit
0
5
mit
90942b50bb9947542e81485cc4ec31908a5891f5
JacobDB/new-site,revxx14/new-site,revxx14/new-site,JacobDB/new-site,JacobDB/new-site
src/assets/scripts/overlay_closer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar oust = require('../index');\nvar pkg = require('../package.json');\nvar fs = require('fs');\n\nvar argv = require('minimist')((process.argv.slice(2)))\n\nvar printHelp = function() {\n console.log('oust');\...
javascript
edit
0
2
apache-2.0
0b231d93b783738e6ccb1dd989dd2b7c716912e6
actmd/oust,addyosmani/oust,addyosmani/oust,actmd/oust
bin/oust.js
rejected_duplicate
Near-duplicate of sample 73725
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// package metadata file for Meteor.js\n\n/* jshint strict:false */\n/* global Package:true */\n\nPackage.describe({\n name: 'twbs:bootstrap', // http://atmospherejs.com/twbs/bootstrap\n summary: 'The most popular front-end framework...
javascript
edit
0
1
mit
88ccbf3f93d7dfeefd2e1695c4115a535fd2d98a
jackRogers/bootstrap-1,dingpf264/bootstrap,jafjuliana/bootstrap,WildDogTeam/bootstrap,november1943/bootstrap,Gbuomprisco/bootstrap,Encore777/bootstrap,xuxinxin/bootstrap,stbraswell/bootstrap,abitdodgy/bootstrap,Lessig2016/rootstrap,luoxingbo/bootstrap,Softdocs/bootstrap,stewaoi/bootstrap,luisfmsouza/bootstrap,andresgal...
package.js
rejected_duplicate
Near-duplicate of sample 73522
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n;(function (f) {\n // CommonJS\n if (typeof exports === \"object\") {\n module.exports = f();\n\n // RequireJS\n } else if (typeof define === \"function\" && define.amd) {\n define([], f);\n\n // <script>\n } else {\n var...
javascript
edit
0
8
mit
35e5e62a351b2ec0b184b8f1cbfea00c4400b137
ForbesLindesay/umd,manvalls/umd
template.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'nitrolabs:accounts-dropbox',\n summary: \"Accounts service for Dropbox\",\n version: '1.3.0',\n git: 'https://github.com/NitroLabs/meteor-accounts-dropbox'\n});\n\nPackage.onUse(function (api) {\n...
javascript
edit
0
1
mit
3e9ba54c0bef843ffc902ba9697cb5de1bb4600c
NitroLabs/meteor-accounts-dropbox
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport classNames from 'classnames/dedupe';\nimport React from 'react';\n\nimport {omit} from '../../utils/Util';\n\nconst FieldLabel = (props) => {\n let {children, className, required} = props;\n let isToggle = false;\n React.Child...
javascript
edit
0
2
apache-2.0
3355cb3d74d53b2cdcc1fa64569d2e09754ecd55
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
src/js/components/form/FieldLabel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Network visualization library\",\n version: \"1.0.6\",\n name: \"futurescaper:futuregrapher\",\n git: \"https://github.com/Futurescaper/futuregrapher.git\"\n});\n\nPackage.onUse(function(api, ...
javascript
edit
0
1
mit
8b9735a6e4532e982c16b62ed984b9c0d7d27fec
Futurescaper/Futuregrapher,Futurescaper/Futuregrapher
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * The actual code for the game\n */\n\nfunction processinput() {\n $(\"#world\").append(\"<p>\" + $(\"#he-said\").val() + \"</p>\");\n $(\"#he-said\").val(\"\");\n}\n\n$(\"#title\").text(\"There's no escape\");\n\n$(\"#world\...
javascript
edit
0
1
mit
80905346e3c143d77d65d15d049390b4691d11c4
brunk23/sturdy-bassoon,brunk23/sturdy-bassoon,brunk23/sturdy-bassoon
textgame.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Has access to the following protected methods\n $config(NAME): Retrieves the template config named NAME\n $forms(NAME): Retrieves the forms templates config named NAME (Shortcut for $config(\"forms\")[NAME])\n $views(NAME): ...
javascript
edit
0
1
mit
79e1bea8b2feeb7c9daaccd62daf50cdb6701192
kodmunki/ku4js-webApp,kodmunki/ku4js-webApp,kodmunki/ku4js-webApp,kodmunki/ku4js-webApp,kodmunki/ku4js-webApp
_TEMPLATE/src/-ProjectFiles-/templates/example.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default function loadAll(model, relationship, dest, options = {}) {\n var page = options.page || 1;\n var query = {\n 'page[size]': 10,\n page: page\n };\n query = Ember.mer...
javascript
edit
0
3
apache-2.0
1f9499b3bd0c13b6afbdc098e1d1aae7c91cad7c
chrisseto/ember-osf,binoculars/ember-osf,chrisseto/ember-osf,baylee-d/ember-osf,baylee-d/ember-osf,crcresearch/ember-osf,crcresearch/ember-osf,CenterForOpenScience/ember-osf,CenterForOpenScience/ember-osf,pattisdr/ember-osf,pattisdr/ember-osf,jamescdavis/ember-osf,hmoco/ember-osf,jamescdavis/ember-osf,hmoco/ember-osf,b...
addon/utils/load-relationship.js
rejected_duplicate
Near-duplicate of sample 89372
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { ClientApi, StoryStore, ConfigApi } from '@storybook/client-api';\nimport start from './start';\n\nexport default {\n start,\n ClientApi,\n ConfigApi,\n StoryStore,\n};\n\n```\n\nApply this change: ADD toId back to core for ...
javascript
edit
0
0
mit
a1c3ea0caca373c3523307f711ba8401b51cd4e6
kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook
lib/core/src/client/preview/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Visit The Stimulus Handbook for more details\n// https://stimulusjs.org/handbook/introduction\n//\n// This example controller works with specially annotated HTML like:\n//\n// <div data-controller=\"hello\">\n// <h1 data-target=\"h...
javascript
edit
0
2
mit
2951a3cee709d17d6cd183f1f3231af1302eaf2f
jellybob/money_potter,jellybob/money_potter,jellybob/money_potter
app/javascript/controllers/pot_list_controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction showMetadata(map) {\n if(!$('.metadata').is(':visible')) $('.metadata').animate({width:'toggle'}, 'slow');\n \n $('.metadata--title').text(map.title);\n}\n```\n\nApply this change: Change to fast for now" }, { "role"...
javascript
edit
0
2
mit
d730357fa02e2e1018088675c993e83ab488a0f2
axismaps/tile-browser,axismaps/tile-browser
js/metadata.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Licensed to Cloudkick, Inc ('Cloudkick') under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * Cloudkick licenses t...
javascript
edit
0
1
apache-2.0
19a15d3969c24b5a8775e69dfc312e1ac4f8f3f3
pquerna/ndislocate
dislocate/schema.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nRouter.configure({ layoutTemplate: 'layout' });\n\nRouter.route('/', function () { this.render('pairs'); });\nRouter.route('/people');\nRouter.route('/fullscreen');\n\n```\n\nApply this change: Use simpler syntax for defining the root r...
javascript
edit
0
0
mit
a671ddcd039906c8dbda0ebd742803b3fc54a915
paircolumbus/pairs,paircolumbus/pairs
routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#import \"env.js\"\n\nvar target = UIATarget.localTarget();\n\nListScreen.tapCellWithName(\"coffee\")\n\ntarget.delay(0.5);\n\nvar text = DetailScreen.displayedText();\nif (text != \"coffee\") {\n UIALogger.logError(\"Expected to see '...
javascript
edit
null
null
mit
3bb7653fa660fbbaa43db3881ed96ef9e442a8aa
jonathanpenn/AutomationExample,jonathanpenn/AutomationExample
automation_script.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createAction } from 'redux-actions'\nimport { get_body } from 'app/http'\n\nconst CHANGE_TAB =\n 'CHANGE_TAB'\nconst FETCH_USER_DETAILS =\n 'FETCH_USER_DETAILS'\nconst SUBMIT_USER_DETAILS =\n 'SUBMIT_USER_DETAILS'\nconst TOG...
javascript
edit
0
5
mit
0ff87ba62a44dc650deea081e267c14b2a91b16e
foundersandcoders/sail-back,foundersandcoders/sail-back
src/user/redux/modules/my_details.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('card', function() {\n beforeEach(module('card'));\n\n describe('Card', function() {\n var Card;\n\n beforeEach(inject(function(_Card_) {\n Card = _Card_;\n }));\n\n it('accepts rank...
javascript
edit
0
1
mit
5869b53ba3ecb560999f02736e3638895290a608
jochakovsky/solitaire,jochakovsky/solitaire,jochakovsky/solitaire,jochakovsky/solitaire
app/card/cardTest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nfunction jsonRequestFailure(jqXHR, status, errorThrown){\n console.log(errorThrown);\n}\n\nfunction requestDataTable(target, dataSource){\n $.ajax({\n url: dataSource,\n type: 'GET',\n dataType: 'json',\n ...
javascript
edit
0
4
mit
d69d560f61c19b7827c103623002ff7ef3a45c82
timfreund/canaria,timfreund/canaria
canaria/static/js/apidemo.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst transformGenerate = require('./transform-generate');\nconst transformApply = require('./transform-apply');\n\nmodule.exports = array => transformGenerate(array.length).map(transform => transformApply(array, transf...
javascript
edit
0
1
mit
e7f419a83122a24c31a76696367a0824bce72edb
arrowrowe/algorithms-node
alg/permutation/unique.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { offline } from 'redux-offline';\nimport offlineConfig from 'redux-offline/lib/defaults';\nimport detectNetwork from 'redux-offline/lib/defaults/detectNetwork.native';\nimport { AsyncStorage } from 'react-native'; // eslint-disa...
javascript
edit
0
4
mit
2a84a9c785590d81f9be96a4f0ab8aa7b90e35af
Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher
app/offline/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport axios from 'axios';\nimport { push } from 'react-router-redux';\nimport { SIGN_UP_SUCCESS, SIGNING_UP, SIGN_UP_FAILURE } from './types';\n\nexport const apiURL = 'https://hellobooksv2.herokuapp.com/api/v1';\n\nexport const signUp...
javascript
edit
0
2
mit
3a5bc16ac6e5b5a7802992f12915ce325d500e94
amarachukwu-agbo/hello-books,amarachukwu-agbo/hello-books
client/actions/userSignUp.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/**\n * Abstract the particular Promise in use. Using when's es6-shim\n * for now as native Prom...
javascript
edit
0
0
mit
ee3973fd3710f3c6e9afebace8566ada0ef15520
axefrog/most,axefrog/core,nissoh/core,cujojs/most,mostjs/core,mostjs/core
lib/Promise.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nangular.module('pathwayApp')\n.controller('HomeController', function ($scope) {\n});\n\n// app.controller('HomeController', function ($scope) {\n// $scope.event = \"hello\"\n// });\n```\n\nApply this change: Add a get ...
javascript
edit
0
1
mit
0611d2790c7fbfa1ffa556d52e0868f0368afa17
aattsai/Pathway,aattsai/Pathway,aattsai/Pathway
pipeline/app/assets/javascripts/controllers/HomeController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Path Constants.\n *\n * @module server/constants/paths\n */\n\nconst path = require('path');\n\n// Define file paths.\nconst ROOT = path.resolve(__dirname, '..');\nconst PUBLIC = `${ROOT}/public`;\nconst INDEX = `${ROOT}/public/...
javascript
edit
0
0
mit
cd58eca72b3ad384bcd0598cccf985ac5290a72a
didju/didju,commandzpdx/habit-calendar,didju/didju,commandzpdx/habit-calendar
server/constants/paths.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Layer = require('../models/Layer');\r\n\r\n\r\nvar getJSON = function(type, req, res) {\r\n var ops = {\r\n id: parseFloat(req.param(\"id\")),\r\n pid: parseFloat(req.param(\"pid\")),\r\n z: parse...
javascript
edit
0
12
mit
49eeac04b199d0029aeebc651805006c50b4ff88
atlastory/api,atlastory/api,atlastory/api
controllers/layer.js
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express');\n\nmodule.exports = (context, pluginOptions = {}, _plugin) => {\n const pathToPolicies = new Map();\n for (const rule of pluginOptions['enforce-trusted-types'] ?? []) {\n const [path, policies] =...
javascript
edit
0
6
bsd-3-clause
56142f49c759f74cee7697d5e14fe4cf2a086155
webcomponents/polyfills,webcomponents/polyfills,webcomponents/polyfills
wct-trusted-types-plugin/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst express = require(\"express\");\nconst app = express();\n\n// install request\nconst request = require('request');\n\nconst PORT = process.env.PORT || 3000;\nconst rovi = process.env.ROVI_APIKEY || '';\n\n\n// A...
javascript
edit
0
2
mit
dcd455f464476981f1259cbf8634b6decb632977
threepears/cors-server
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(ext) {\n // Cleanup function when the extension is unloaded\n ext._shutdown = function() {};\n \n\n // Status reporting code\n // Use this to report missing hardware, plugin or unsupported browser\n ext._getS...
javascript
edit
0
5
bsd-3-clause
7ed5f977cc0a16a30dcd4f5dcf90c12f197e6f95
Calvin-CS/SkelScratch,visor841/SkelScratch
Kinect2Scratch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst yaml = require('js-yaml');\nconst passGen = require('generate-password');\n\nconst fs = require('./fs');\nconst util = require('./util');\n\n/**\n * run subcommand\n */\nmodule.exports = function* (file, filePath, config, passFile...
javascript
edit
0
1
mit
f4e8452b10f8dbcfa4d89e1413f6ea1939f8a0a9
suzuki-shunsuke/ssh-seed,suzuki-shunsuke/ssh-seed
lib/run.cmd.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\nvar http = require('http').Server(app);\nvar io = require('socket.io')(http);\n\nvar size = 16;\nvar drumState = new Array(size*size);\nfor (var i = 0; i < size*size; i++)\n drum...
javascript
edit
0
3
bsd-3-clause
f80c8d6604010d2c28bc241058468f538dc348e2
wpote/beatroot,wpote/beatroot
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar page = tabris.create(\"Page\", {\n title: \"Layout - Relative Positioning\",\n topLevel: true\n});\n\nvar composite1 = tabris.create(\"Composite\", {\n layoutData: {left: 0, top: 0, width: 100, height: 100},\n background: \"red\...
javascript
edit
0
0
bsd-3-clause
7f679d4acb33f38edcbc9c31688d90329824cb80
eclipsesource/tabris-js,pimaxdev/tabris,moham3d/tabris-js,eclipsesource/tabris-js,mkostikov/tabris-js,eclipsesource/tabris-js,moham3d/tabris-js,pimaxdev/tabris,mkostikov/tabris-js
snippets/layout-relative-position/layout-relative-position.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = require('jquery');\nvar Utils = require('./utils.js');\n\n\n// When passed to the template evaluator,\n// its render method will create actual DOM elements\nvar DOMInterface = function() {\n return {\n createFragment: functi...
javascript
edit
0
3
mit
d38a29a91dd3a4af694c60f3cac024a7f3035483
syntheticore/declaire
src/clientDOMInterface.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport babel from 'rollup-plugin-babel';\n\n// eslint-disable-next-line\nexport default function buildConfig(\n // eslint-disable-next-line\n entry /*: string*/,\n // eslint-disable-next-line\n dest /*: string*/\n)...
javascript
edit
0
1
mit
8daf3a45d856d7474ad11e8aeaaa70b571c8648e
jsGiven/jsGiven
js-given/tools/build.rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { moduleFor, test } from 'ember-qunit';\n\nmoduleFor('controller:program-year/publication-check', 'Unit | Controller | ProgramYearPublicationCheck', {\n // Specify the other units that are required for this test.\n needs: ['con...
javascript
edit
0
1
mit
d6e4204af7d9f74dc58fffc4bc4f35326538c6f0
gboushey/frontend,thecoolestguy/frontend,jrjohnson/frontend,dartajax/frontend,gabycampagna/frontend,djvoa12/frontend,djvoa12/frontend,dartajax/frontend,ilios/frontend,gboushey/frontend,jrjohnson/frontend,gabycampagna/frontend,ilios/frontend,thecoolestguy/frontend
tests/unit/controllers/program-year/publication-check-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar firstAndPike = {\n minCust: 23;\n maxCust: 65;\n avgCookieSale: 6.3;\n totalSale[i]:\n\n}\n\nvar seaTacAirport = {\n minCust: 3;\n maxCust: 24;\n avgCookieSale: 1.2;\n totalSale[i]:\n}\n\nvar seattleCenter =...
javascript
edit
null
null
mit
8a0e9ba73757d57a281672a28b88ca4a168a447d
timothy-tran/cookie-stand,timothy-tran/cookie-stand
app.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar log = require(\"/api/Log\");\nvar TiShadow = require(\"/api/TiShadow\");\nvar TiDynamicFont = require('yy.tidynamicfont');\n\nexports.loadCustomFonts = function(name) {\n var dir = Ti.Filesystem.getFile(Ti.Filesystem.applicationDat...
javascript
edit
0
3
apache-2.0
1c15c10f35fd20cad211a64d22b2e6c9fefcdafb
emilyvon/TiShadow,Biotelligent/TiShadow,titanium-forks/dbankier.TiShadow,titanium-forks/dbankier.TiShadow,Biotelligent/TiShadow,emilyvon/TiShadow,HazemKhaled/TiShadow,FokkeZB/TiShadow,emilyvon/TiShadow,HazemKhaled/TiShadow,titanium-forks/dbankier.TiShadow,FokkeZB/TiShadow,r8o8s1e0/TiShadow,Biotelligent/TiShadow,HazemKh...
app/Resources/api/Fonts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction loadPageDataIntoEditor(collectionName){\n\n var pageurl = $('.fl-panel--preview__content').contents().get(0).location.href;\n var pageurldata = \"/data\" + pageurl.split(\"#!\")[1];\n\n $.ajax({\n url: pageurldata,\n d...
javascript
edit
0
2
mit
032687f1766cc60a3b0d89dab06271a5f1565b16
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
src/main/web/florence/js/functions/_loadPageDataIntoEditor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar connect = require('connect');\nvar server = connect.createServer();\n\nserver.use(connect.static(__dirname));\nserver.use('/lib', connect.static(__dirname + '/../lib'));\nserver.use(require('browserify')({\n require: [__dirname + '...
javascript
edit
0
0
mit
549291df5e017a5900caf0b017390fc669e914e4
mikedouglas/conspiracy
web/repl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Parse profile.\n *\n * @param {Object|String} json\n * @return {Object}\n * @api private\n */\nexports.parse = function(json) {\n\tif ('string' == typeof json) {\n\t\tjson = JSON.parse(json);\n\t}\n\n\tvar profile = {};\n\tprofi...
javascript
edit
0
8
mit
a424ac334efd1ac990c79a5a9fd94fef39acab67
zaption/passport-edmodo
lib/profile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport 'react-native'\nimport { encryptWIF, decryptWIF } from '../app/api/crypto'\n\n// use official test vectors from https://github.com/neo-project/proposals/blob/master/nep-2.mediawiki#test-vectors\nconst unencryptedWIF = 'L44B5gGEpq...
javascript
edit
0
1
mit
133d70a41fe1f54e97def99ace66c9458bb39e8a
ixje/neon-wallet-react-native,ixje/neon-wallet-react-native,ixje/neon-wallet-react-native
__tests__/nep2.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar activeTabs = {};\n\nchrome.browserAction.onClicked.addListener(function (tab) {\n if (activeTabs[tab.id]) {\n chrome.tabs.sendMessage(tab.id, {action: \"undo-swap-images\"});\n\n chrome.browserAction.setIcon({\n ...
javascript
edit
0
2
bsd-3-clause
de515a4fd785f297a10d01ce9bdf46e5b186a2c9
bliof/800x600
toggle.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'stache!common/templates/visualisations/completion_numbers',\n 'extensions/views/view',\n 'common/views/visualisations/volumetrics/number',\n 'common/views/visualisations/volumetrics/submissions-graph'\n],\nfunction (temp...
javascript
edit
0
2
mit
4de7f1a86841e372d9060f899604e5bcc56f21f2
keithiopia/spotlight,alphagov/spotlight,tijmenb/spotlight,tijmenb/spotlight,keithiopia/spotlight,keithiopia/spotlight,tijmenb/spotlight,alphagov/spotlight,alphagov/spotlight
app/common/views/visualisations/completion_numbers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst AWS = require('aws-sdk');\nconst Promise = require('bluebird');\nconst _ = require('lodash');\n\n//\n// Step that fetches the existing stack, and stores it in the context\n//\nmodule.exports = function(context)...
javascript
edit
0
2
isc
4551a8d7371b463d90c98b2fc1a81a9b10bdd000
Testlio/lambda-tools
lib/deploy/fetch-stack-step.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar BloggerController = require('./controllers/blogger');\n\nexports.serveRoutes = function(app) {\n\tapp.get('/api/v0.1/bloggers', function(req, res) {\n\t\tBloggerController.getAllProfiles(true, function (profiles, error) {\n\t\t\tif(...
javascript
edit
0
2
mit
037dbc58135277923787836621f256974b85c3df
csblogs/csblogs-web-app,csblogs/csblogs-web-app,robcrocombe/csblogs
api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Player from 'props/player';\nimport Menu from 'props/menu';\nimport canvas from 'canvas';\n\nconst playerOne = new Player();\nconst playerTwo = new Player();\nconst menu = new Menu();\n\nplayerOne.spawn(5, 50);\nplayerTwo.spawn(c...
javascript
edit
0
1
mit
a14195a621d297abb52a976a918770c5a05b0420
oliverbenns/pong,oliverbenns/pong
app/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst program = require('commander');\n\nconst packageInfo = require('./package.json');\n\nconst confc = require('./');\n\nvar files;\n\nprogram\n\t.version(packageInfo.version)\n\t.arguments(`[fileNames...]`)\n\t.action(...
javascript
edit
0
2
mit
bb2a192544d0876eb1b032bd584d59b0805839d4
gluons/ConfC
cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2014, Tidepool Project\n * \n * This program is free software; you can redistribute it and/or modify it under\n * the terms of the associated License, which is identical to the BSD 2-Clause\n * License as published...
javascript
edit
0
1
bsd-2-clause
10dcc20d49763758e0b1f731b08f4d26afe06350
hichameyessou/blip,tidepool-org/blip,hichameyessou/blip,tidepool-org/blip,hichameyessou/blip,tidepool-org/blip
app/start.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n extends: '@dosomething/eslint-config/nodejs/8.x',\n globals: {\n // Support fetch mechanism through isomorphic-fetch module\n fetch: true,\n Response: true,\n },\n};\n\n```\n\nApply this change: Remove i...
javascript
edit
0
0
mit
43199b4c7b7b33528d286b96f82c5a700010b4e5
DoSomething/blink,DoSomething/blink
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ng = require('angular2/core');\nvar ngHttp = require('angular2/http');\nvar Tech = require('./tech');\nrequire('rxjs/Rx');\n\nmodule.exports = ng.Component({\n selector: 'Techs',\n template:\n '<div class=\"techs-container\">' ...
javascript
edit
0
1
mit
34faabb6ff3d2f2d7c3ea0257c1432af06c446d8
FountainJS/generator-fountain-angular2,FountainJS/generator-fountain-angular2,FountainJS/generator-fountain-angular2
generators/techs/templates/src/app/techs/techs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimportScripts('js/sw-toolbox.js');\n\nconst version = '0.0.1';\nconst CACHE_NAME = 'inventory' + version;\nvar urlsToCache = [\n 'index.html',\n 'views/allInventories.html',\n 'views/editInventory.html',\n 'views/editItem.ht...
javascript
edit
0
2
cc0-1.0
bc9d1a7266e24f738b83ecfa64fbd01032043d99
zcdunn/inventory,zcdunn/inventory
worker.js
rejected_duplicate
Near-duplicate of sample 93410
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst About = () => {\n return (\n <header id=\"header\" className=\"component\">\n <a href=\"/\" id=\"about-mainPageButton\">Gå til hovedsiden</a>\n <img className=\"header-logo\" src=\"assets/images/online_logo.svg\" alt...
javascript
edit
0
3
mit
b299b5e38085357022055142855b4b543b1c2b15
dotKom/glowing-fortnight,dotKom/glowing-fortnight
components/about/index.js
rejected_duplicate
Near-duplicate of sample 68661
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport containerFactory from 'second-container'\nimport Fetcher from 'second-fetcher'\nimport Renderer from 'second-renderer'\nimport createDehydrator from 'second-dehydrator'\n\nclass Second {\n constructor () {\n this.initialised ...
javascript
edit
0
2
mit
fc45cf14e4615fb4274a16746cc49c5b3e0a6ef5
wildlyinaccurate/second,wildlyinaccurate/second
packages/second/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport m from 'mithril';\n\nclass ReactionPickerComponent {\n\n oninit({ attrs: { game, session } }) {\n this.game = game;\n this.session = session;\n }\n\n sendReaction(reaction) {\n this.session.emit('send-reaction', { rea...
javascript
edit
0
1
mit
cbce016b41affe01f398252822ab1719f2289424
caleb531/connect-four
app/scripts/components/reaction-picker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport m from 'mithril';\n\nclass ReactionPickerComponent {\n\n oninit({ attrs: { game, session } }) {\n this.game = game;\n this.session = session;\n }\n\n sendReaction(reaction) {\n this.session.emit('send-reaction', { rea...
javascript
edit
0
1
mit
ec66f4afb43659a0140ac1198b683d1ddf6fd6af
caleb531/connect-four
app/scripts/components/reaction-picker.js
rejected_duplicate
Near-duplicate of sample 95258
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar request = require('request');\n\nfunction MTA(host, port, username, password) {\n this.host = host || 'localhost';\n this.port = port || 22005;\n this.username = username;\n this.password = password;\n}\n\n// Throw error for MTA...
javascript
edit
0
13
mit
6529c88e89bd0c0b0147ce8e678a1577d9979fbe
JR10/node-mtasa-sdk
mta.js
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar box = document.getElementsByTagName('a-box')\n\nbox.addEventListener('mouseenter', function () {\n box.setAttribute('color', 'green');\n});\n```\n\nApply this change: Fix missing semi colon 🙄" }, { "role": "assistant", ...
javascript
edit
0
1
apache-2.0
c7e5b421dba4e5c1ac284f089250a4139899cd6c
umpox/umpox.github.io,umpox/umpox.github.io
controls.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar subscriptions = new SubsManager();\n\nRouter.configure({\n layoutTemplate: 'layout',\n loadingTemplate: 'loading',\n notFoundTemplate: 'notFound'\n});\n\nRouter.route('/', {\n name: 'home',\n waitOn: function() {\n ...
javascript
edit
0
1
mit
aa80d29fd0565e4e09d17cd78b4d7d988abb56fe
dexterneo/mangatek,dexterneo/mangas,dexterneo/mangas,dexterneo/mangatek
lib/router.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport CodeMirror from 'codemirror';\nimport 'codemirror/addon/mode/simple';\n\nvar VAR_REGEX = /(\\?|\\$)[A-Za-z_][A-Za-z0-9\\-_]*/;\nvar STRING_REGEX = /\\\"(\\\\.|[^\\\"])*\\\"/;\nvar PROPERTY_ID_REGEX = /:P[0-9]*/;\nvar ITEM_ID_REGE...
javascript
edit
0
0
mit
e3283f1696ad059bc264cb42feecd67fc58dd1dd
paulsonnentag/qwery-me,paulsonnentag/qwery-me,paulsonnentag/qwery-me,BrackCurly/qwery-me,BrackCurly/qwery-me,BrackCurly/qwery-me
app/qwery-mode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { defaults } from 'lodash'\nimport { extractStyles, styleLoader } from './helpers'\n\nexport default function ({ isClient }) {\n let babelOptions = JSON.stringify(defaults(this.options.build.babel, {\n presets: [require.resol...
javascript
edit
0
1
mit
97076fa64961ee69ada9f2fafd17b88aa52604e7
mgesmundo/nuxt.js,jfroffice/nuxt.js,jfroffice/nuxt.js,mgesmundo/nuxt.js
lib/builder/webpack/vue-loader.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst path = require('path')\nconst {spawn} = require('child_process')\nconst process = require('process')\n\nconst CONFIG = require('../config')\n\nmodule.exports = async function () {\n return new Promise((resolve, re...
javascript
edit
0
4
mit
4048b49a5d2d2c37af3f87327ca2ec20476b03ae
brettle/atom,PKRoma/atom,PKRoma/atom,brettle/atom,brettle/atom,atom/atom,Mokolea/atom,PKRoma/atom,Mokolea/atom,atom/atom,atom/atom,Mokolea/atom
script/lib/lint-java-script-paths.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default [ { \"id\": \"001\", \"desc\": \"Mail (Primary Address)\"},\n { \"id\": \"002\", \"desc\": \"Email\" },\n { \"id\": \"003\", \"desc\": \"Text message\" },\n { \"id\": \"004\...
javascript
edit
0
0
apache-2.0
59c6403a135bda8372db4f72e14956d73d5b1d9f
folio-org/ui-users,folio-org/ui-users
data/contactTypes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\r\n// ----------------------------------------------------------------\r\n// Content Class\r\n\r\nclass Content {\r\n static get TYPE_NAME_KEY() {\r\n return 0;\r\n }\r\n \r\n static get CONTENT() {\r\n return 'content';\r\n ...
javascript
edit
null
null
mit
339d18246f52b6b94ab9a4f28bd4050f98c5a540
AyaNakazawa/business_card_bank,AyaNakazawa/business_card_bank,AyaNakazawa/business_card_bank
js/mylib/content.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Filename: main.js\n\n// Require.js allows us to configure mappings to paths\nrequire.config({\n paths: {\n jquery: 'libs/jquery/jquery-min',\n underscore: 'libs/underscore/underscore-min',\n backbone: 'libs/backbone/backbon...
javascript
edit
0
2
mit
71950a5f5915fd6c1fc9a9e722d0bdd08955e330
jbenet/TeXchat
frontend/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** @jsx React.DOM */\n\nvar React = require(\"react\");\n\nvar ModuleButton = React.createClass({\n propTypes: {\n text: React.PropTypes.string.isRequired,\n questionType: React.PropTypes.string.isRequired\n },\n render: funct...
javascript
edit
0
1
apache-2.0
c6796ed33702018f6ab19f2da61ca38ab352419b
douglasvegas/bleeding-edge-sample-app,backstopmedia/bleeding-edge-sample-app,lishengzxc/bleeding-edge-sample-app,JonnyCheng/bleeding-edge-sample-app,zhixiaoyang/bleeding-edge-sample-app,nallself/bleeding-edge-sample-app,guke001/bleeding-edge-sample-app,JackLian/bleeding-edge-sample-app,zhangmingkai4315/bleeding-edge-sa...
client/app/components/module_button.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// It's only ES3 compatible\n// You don't have a console.log, you need send a \"debug\"\n\nfunction play(params) {\n var return_obj = {\n 'debug': 'true',\n 'action': 'shoot',\n 'params': params\n };\n return_obj['params']['...
javascript
edit
0
1
mit
b69806f1ad75da0746c5955c571c1eb10384b64a
fabiosammy/worms,fabiosammy/worms,fabiosammy/worms
players/cpu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst EditTransform = require('wikimedia-page-library').EditTransform;\nconst addHrefToEditButton = require('./addHrefToEditButton');\nconst domUtil = require('../../domUtil');\n\n/**\n * Adds a page header with title, ...
javascript
edit
0
3
apache-2.0
926815fa65e8d5da7997a9131b3c84900064f075
wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps
lib/transformations/pcs/addPageHeader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by xubt on 5/26/16.\n */\n\nkanbanApp.directive('boardBanner', function () {\n return {\n restrict: 'E',\n templateUrl: 'component/board/partials/board-banner.html',\n replace: true,\n cont...
javascript
edit
0
1
mit
73c0073e5961a5661fc88d217fafb9805d9466e0
thiki-org/thiki-kanban-web,thiki-org/thiki-kanban-web,thiki-org/thiki-kanban-web
kanban/component/board/directives/boardsDirective.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n// Used to trigger opera.isReady() functions\nvar deferredComponentsLoadStatus = {\n 'WIDGET_API_LOADED': false,\n 'WIDGET_PREFERENCES_LOADED': false\n // ...etc\n};\n\n// Events to delay until window 'load' event has been\n// fire...
javascript
edit
0
0
mit
0fafb295c61868c68247ed853d3e995768cf8dc5
operasoftware/operaextensions.js,operasoftware/operaextensions.js,operasoftware/operaextensions.js
src/popup/Require.js
rejected_duplicate
Near-duplicate of sample 73213
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global chrome */\n\nchrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {\n var endiURL = 'http://www.elnuevodia.com';\n var startsWithURL = tab.url.slice(0, endiURL.length) === endiURL;\n\n if (changeInfo.status ==...
javascript
edit
0
3
mit
ef4e503dccc25ea7bc41329d8474fba4af5932ef
jpadilla/better-endi
chrome/background.js
accepted
null
true