messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nconst CryptoDropdown = ({ label, cryptos, action }) => (\n <div className=\"form-group form-group-sm\">\n <label className=\"col-sm-2 control-label\">{label}</label>\n <div className=\"col-sm-10\">\n ... | javascript | edit | 0 | 1 | mit | 949254b178c540d98783e3efe3c2df82cd138ce4 | davidoevans/react-redux-dapp,davidoevans/react-redux-dapp | src/components/CryptoDropdown.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Component from '@ember/component';\nimport layout from '../templates/components/banner-with-close-button';\nimport {inject as service} from '@ember/service';\nimport {computed} from '@ember/object';\n\nexport default Component.ex... | javascript | edit | 0 | 2 | mit | 9ccba19417e58ecd619ceb036ea2f3cc48eb64c4 | nypublicradio/nypr-ui,nypublicradio/nypr-ui | addon/components/banner-with-close-button.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar authRouter = require('express').Router();\nvar jwt = require('jwt-simple');\nvar auth = require('../lib/auth');\nvar User = require('../../db/models/User');\nvar Promise = require('bluebird');\nvar bcrypt = require('bcryptjs');\nbcr... | javascript | edit | 0 | 4 | mit | b8d022270a10d59cc895acafad4742ad61e3460c | SillySalamanders/Reactivity,SillySalamanders/Reactivity | server/routes/authRouter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport EditIcon from 'part:@sanity/base/edit-icon'\nimport React from 'react'\nimport {Tooltip} from 'react-tippy'\n\nimport styles from './ItemStatus.css'\n\nconst DraftStatus = () => (\n <Tooltip\n tabIndex={-1}\n className={st... | javascript | edit | 0 | 1 | mit | deb70b4a47e2a8aa800c80fb79da50f841d85adf | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | packages/@sanity/desk-tool/src/components/DraftStatus.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar inspector = require('..');\nvar expect = require('expect.js');\n\ndescribe(\"url-inspector\", function sites() {\n\tit(\"should get title from http://www.lavieenbois.com/\", function(done) {\n\t\tthis.timeout(5000);\n\t\tinspector('... | javascript | edit | 0 | 1 | mit | c042b19ee5414afe1ab206ebebace8675d55c096 | kapouer/url-inspector | test/sites.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport test from 'ava';\nimport domLoaded from '../';\n\ntest('domLoaded is a function', t => {\n\tt.is(typeof domLoaded, 'function');\n});\n\n```\n\nApply this change: Test domLoaded returns a Promise"
},
{
"role": "assistant",... | javascript | edit | 0 | 1 | mit | d232a4d61f6de338916a15744e925f5ff8e3ca9a | lukechilds/when-dom-ready | test/types.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar dust\n\ntry {\n dust = require('dustjs-linkedin')\n try { require('dustjs-helpers') }\n catch (ex) {}\n}\ncatch (ex) {\n try { dust = require('dust') }\n catch (ex) {}\n}\n\nif (!dust) throw new Error('\"dustjs-linkedin\" or \"... | javascript | edit | 0 | 3 | mit | 17ce6c41c8e7b43f1e9f12fe66e4e65ec9f7a487 | mikefrey/hapi-dust | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nTemplate.Multiselect.onRendered(function multiselectOnRendered() {\n let template = this;\n let config = {};\n if(template.data.configOptions) {\n config = template.data.configOptions;\n }\n\n // autorun waits until after the de... | javascript | edit | 0 | 5 | mit | e7afd02eb05683909c88ef0531963f4badf9d351 | brucejo75/meteor-bootstrap-multiselect,brucejo75/meteor-bootstrap-multiselect | Multiselect.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mediaPlugins = \"\";\r\n\r\nif (mediaPickerEnabled) {\r\n mediaPlugins += \" mediapicker\";\r\n}\r\n\r\nif (mediaLibraryEnabled) {\r\n mediaPlugins += \" medialibrary\";\r\n}\r\n\r\ntinyMCE.init({\r\n selector: \"textarea.... | javascript | edit | 0 | 1 | bsd-3-clause | 53317d97c5862ab96161066546fd3a744939ca2e | armanforghani/Orchard,LaserSrl/Orchard,Serlead/Orchard,AdvantageCS/Orchard,tobydodds/folklife,geertdoornbos/Orchard,hannan-azam/Orchard,rtpHarry/Orchard,brownjordaninternational/OrchardCMS,jagraz/Orchard,gcsuk/Orchard,JRKelso/Orchard,TalaveraTechnologySolutions/Orchard,jimasp/Orchard,sfmskywalker/Orchard,rtpHarry/Orcha... | src/Orchard.Web/Modules/TinyMce/Scripts/orchard-tinymce.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * 403 Forbidden Network Error Interceptor\n *\n * This interceptor redirects to login page when\n * any 403 session expired error is returned in any of the\n * network requests\n */\n\nvar LOGIN_ROUTE = '/login';\nvar SESSION_EXPI... | javascript | edit | 0 | 4 | bsd-3-clause | 1f79b26808612ec1879394fad9ddc0ace5bbe1e6 | CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb | lib/assets/javascripts/builder/data/backbone/network-interceptors/interceptors/forbidden-403.js | rejected_duplicate | Near-duplicate of sample 84741 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst TelegramBot = (() => {\n 'use strict';\n\n const form = '#frm_telegram_bot';\n\n const onLoad = () => {\n const bot_name = 'binary_test_bot';\n $(form).on('submit', (e) => {\n e.preventDefault();\... | javascript | edit | 0 | 1 | apache-2.0 | 4d398ea4ccecad68c5938c266506f8a4a30acc2d | raunakkathuria/binary-static,ashkanx/binary-static,negar-binary/binary-static,4p00rv/binary-static,ashkanx/binary-static,binary-static-deployed/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,4p00rv/binary-static,binary-com/binary-static,kellybinary/binary-static,raunakkathuria/binary-static... | src/javascript/binary/websocket_pages/user/telegram_bot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n lossLayer: {\n // if we want to add this disclaimer (with the hover) to a widget in the legend,\n // - type must be 'lossLayer' in the 'legend' section of the layer, OR\n // - the layer has to have 'isLossLa... | javascript | edit | 0 | 0 | mit | 979b21e574ab78debf0bc247f94acac0c33f3ca3 | Vizzuality/gfw,Vizzuality/gfw | components/map/components/legend/components/layer-statement/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @flow\n */\n\nimport bunyan from 'bunyan';\nimport path from 'path';\n\nimport UserSettings from './UserSettings';\n\nclass ConsoleRawStream {\n write(rec) {\n if (rec.level < bunyan.INFO) {\n console.log(rec);\n } e... | javascript | edit | 0 | 4 | mit | dee7c234c5a6e98a7d21a99ae5539fe978ca2d4e | exponentjs/xdl,exponentjs/xdl,exponentjs/xdl | src/Logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst webpack = require('webpack')\nconst path = require('path')\n\nconst configuration = {\n entry: path.resolve(__dirname, 'app'),\n output: {\n path: path.resolve(__dirname, 'public'),\n filename: '[name].js'\... | javascript | edit | 0 | 0 | mit | caf0a2289145c699a853aa75449bbaebacb0b7e9 | rhberro/the-react-client,rhberro/the-react-client | webpack.production.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport nextRoutes from 'next-routes';\n\nconst pages = nextRoutes();\n\npages\n .add('signin', '/signin/:token?')\n .add('createEvent', '/:parentCollectiveSlug/events/(new|create)')\n .add('events-iframe', '/:collectiveSlug/events/if... | javascript | edit | 0 | 0 | mit | b9399f212ba6744374a0a54d4b06b21200865bb4 | OpenCollective/frontend | src/server/pages.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default function(state={}, action) {\n switch(action.type) {\n case 'example_data':\n return 'The action controller worked properly'\n default:\n return state;\n }\n}\n\n```\n\nApply this change: Modify switch s... | javascript | edit | 0 | 2 | mit | d6593eeea21a624ff0bb1b1d43f433f77ae55e47 | danshapiro-optimizely/bandwidth,danshapiro-optimizely/bandwidth | src/reducers/reducer_workload.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Promise from 'bluebird';\nimport { lookupServiceAsync } from '../utils/lookup-service';\n\nfunction findService(fullyQualifiedName) {\n // Get just the service name from the fully qualified name\n let nameParts = fullyQualified... | javascript | edit | 0 | 1 | apache-2.0 | 048cc348d0bd0b614e05913cc5619b54b174463e | KillrVideo/killrvideo-web,KillrVideo/killrvideo-web,KillrVideo/killrvideo-web | src/server/services/discovery.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nvar chalk = require('chalk')\nvar deepEqual = require('deep-equal')\nvar indent = require('./indent')\nvar os = require('os')\n\nconst CHECK = '\\u2713'\nconst CROSS = '\\u2717'\nconst PASS_COLOR = 'green'\nconst FAIL_CO... | javascript | edit | 0 | 6 | isc | b27471e3ae289e4b3e97302ff7a5e9cc4ace59e8 | nickmccurdy/purespec | src/Result.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n// GEOSEARCH /////////////////////////////////////////////////////////\n\nwindow.setupGeosearch = function() {\n $('#geosearch').keypress(function(e) {\n if((e.keyCode ? e.keyCode : e.which) != 13) return;\n \n var search = ... | javascript | edit | 0 | 5 | isc | 593ec57633fbef471f09501e0c886899e51bd467 | tony2001/ingress-intel-total-conversion,3ch01c/ingress-intel-total-conversion,pfsmorigo/ingress-intel-total-conversion,manierim/ingress-intel-total-conversion,FLamparski/ingress-intel-total-conversion,SpamapS/ingress-intel-total-conversion,tony2001/ingress-intel-total-conversion,tony2001/ingress-intel-total-conversion,... | code/geosearch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Geometric from './geometric/geometric.js'\n\nexport default class Background\n{\n static draw(p)\n {\n Background.changeColor(p)\n Background.translateCamera(p)\n Background.translateCameraByMouse(p)\n\n Geometric.d... | javascript | edit | 0 | 2 | mit | 21edc4ec471a55a0dce9dd2c7d3e84a5576aaf84 | yuki-nit2a/yuki.nit2a.com,yuki-nit2a/yuki.nit2a.com | src/js/graphic/background/background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport function apply(issue, jiraClientAPI) {\n if(issue === null || issue.fields.status.statusCategory.colorName !== 'yellow') {\n return Promise.reject(new Error(`Cannot commit against this issue ${issue.key}`));\n }\n\n return ... | javascript | edit | 0 | 3 | mit | 1f8b40ecfe9a2c7d7c31a0f71a72049dc413749d | DarriusWrightGD/jira-precommit-hook,TWExchangeSolutions/jira-precommit-hook | src/issue-strategies/bug-maintenance.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n// Code based largely on this module:\n// https://www.npmjs.org/package/git-credential\nfunction parseOutput(data, callback) {\n var output = {};\n\n if (data) {\n output = data.toString('utf-8')\n .split('\\n'... | javascript | edit | 0 | 2 | mit | 8bd45a62113fa47b03217887e027afe0bfdd04dc | nwinkler/git-credential-helper | lib/util/parse.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar requirejs = require('requirejs');\n\nvar PageConfig = requirejs('page_config');\n\nvar get_dashboard_and_render = require('./server/mixins/get_dashboard_and_render');\n\nvar renderContent = function (req, res, model) {\n model.set(... | javascript | edit | 0 | 2 | mit | 44ddb35699ed2a7cff9e5dc2f4b36823931a57b6 | alphagov/spotlight,tijmenb/spotlight,alphagov/spotlight,keithiopia/spotlight,alphagov/spotlight,tijmenb/spotlight,keithiopia/spotlight,keithiopia/spotlight,tijmenb/spotlight | app/process_request.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst initState = {};\n\nexport default (state = initState, action) => {\n switch (action.type) {\n case \"GET_STATIONBOARD_REQUESTED\":\n const { stationId } = action.payload;\n return {\n ... | javascript | edit | 0 | 3 | mit | 8671f86ecc9ece19dd1739edfb9f3a6cc92af12e | rafaelkallis/hackzurich2017 | reducer/stationboards.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Welcome!\n// Add your github user if you accepted the challenge!\n\nvar players = [\n\t'raphamorim',\n\t'israelst',\n\t'afonsopacifer',\n\t'rafaelfragosom',\n 'brunokinoshita',\n\t'paulinhoerry',\n\t'enieber',\n 'alanrsoares'\n... | javascript | edit | 0 | 0 | mit | 3fba858b12cd7d3d36fdc8618e2e6c1f11a83263 | joselitojunior/write-code-every-day,vitorleal/write-code-every-day,raphamorim/write-code-every-day,mabrasil/write-code-every-day,Gcampes/write-code-every-day,arthurvasconcelos/write-code-every-day,cesardeazevedo/write-code-every-day,hocraveiro/write-code-every-day,mauriciojunior/write-code-every-day,rtancman/write-code... | challengers.js | rejected_duplicate | Near-duplicate of sample 101137 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/** \n * 12-22-2016\n * ~~ Scott Johnson\n */\n\n/** List jshint ignore directives here. **/\n/* jslint node: true */\n/* jshint esversion: 6 */\n/*eslint-env es6*/\n\n\n// Stop jshint from complaining about the promise.catch() syntax.\... | javascript | edit | 0 | 1 | mit | 3bf6e52f7955fd688de4c90e6f1d5fda241b45d2 | lucentminds/builder-bob | builder-bob.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// block scope - let\n// To do: make all tests pass, leave the asserts unchanged!\n\ndescribe('`let` restricts the scope of the variable to the current block', () => {\n\n describe('`let` vs. `var`', () => {\n\n it('`var` works as u... | javascript | edit | 0 | 2 | mit | 0e4cebad2acb269667b14ddc58cb3bb172809234 | cmisenas/katas,JonathanPrince/katas,cmisenas/katas,rafaelrocha/katas,JonathanPrince/katas,ehpc/katas,cmisenas/katas,rafaelrocha/katas,JonathanPrince/katas,Semigradsky/katas,tddbin/katas,ehpc/katas,tddbin/katas,Semigradsky/katas,Semigradsky/katas,rafaelrocha/katas,tddbin/katas,ehpc/katas | katas/es6/language/block-scoping/let.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet selectENV = (env) => {\n if (env === 'development') {\n return 'postgres://localhost:5432/todos';\n } else if (env === 'test') {\n return 'postgres://localhost:5432/todos_test_db';\n }\n}\n\nmodule.exports = { selectENV };\... | javascript | edit | 0 | 3 | mit | 713377318286d72bc7836c0a79d4060f95d163ef | spencerdezartsmith/to-do-list-app,spencerdezartsmith/to-do-list-app | server/_config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Component, Children, PropTypes } from \"react\";\nimport withSideEffect from \"react-side-effect\";\n\n\nconst supportedHTML4Attributes = {\n \"bgColor\": \"bgcolor\"\n};\n\nclass BodyAttributes extends Component {\n render()... | javascript | edit | 0 | 2 | mit | 86bd1cf69106768f9a576278f569700b4a48ee1c | TrueCar/gluestick-shared,TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick | src/components/BodyAttributes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Phaser from 'phaser-ce';\nimport { getConfig } from './config';\nimport TutorialState from './TutorialState';\n\nexport default class WreckSam {\n\n constructor() {\n const config = getConfig();\n this.game = new... | javascript | edit | 0 | 1 | mit | 7dcb583e7425bff4964b1e3ce52c745c512b1489 | marc1404/WreckSam,marc1404/WreckSam | src/game/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// For conditions of distribution and use, see copyright notice in LICENSE\n/*\n * @author Tapani Jamsa\n * @author Erno Kuusela\n * @author Toni Alatalo\n * Date: 2013\n */\n\nvar app = new Applic... | javascript | edit | 0 | 0 | apache-2.0 | 9fd827df81a400df1577c3405a646e26a1b17c51 | playsign/WebTundra,AlphaStaxLLC/WebTundra,realXtend/WebTundra,AlphaStaxLLC/WebTundra,playsign/WebTundra,AlphaStaxLLC/WebTundra,realXtend/WebTundra | src/exampleApp.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Loader to create the Ember.js application\n/*global require */\n\nwindow.App = require('ghost/app')['default'].create();\n\n```\n\nApply this change: Add initial client unit test."
},
{
"role": "assistant",
"content": "//... | javascript | edit | 0 | 0 | mit | 404743f170808d467769c69ec8e89117b7644d79 | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost | ghost/admin/loader.js | rejected_duplicate | Near-duplicate of sample 69387 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction makeRegistry( base ) {\n return {\n _data: {},\n add: function(name, func) {\n // precautionary case conversion, as later querying of\n // the registry by function-caller uses lower case a... | javascript | edit | 0 | 3 | apache-2.0 | 1df9443cf4567a4deef6f708d5f0ed0f8e3858da | foresthz/less.js,foresthz/less.js,less/less.js,less/less.js,less/less.js | lib/less/functions/function-registry.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport postcss from \"postcss\"\nimport fs from \"fs\"\nimport gs from \"glob-stream\"\nimport rcLoader from \"rc-loader\"\nimport { Transform } from \"stream\"\nimport plugin from \"./plugin\"\n\nexport default function ({ files, confi... | javascript | edit | 0 | 3 | mit | e8a8fed47acf2a7bb9a72720e7c92fbfa6c94952 | gaidarenko/stylelint,stylelint/stylelint,hudochenkov/stylelint,heatwaveo8/stylelint,stylelint/stylelint,hudochenkov/stylelint,gucong3000/stylelint,heatwaveo8/stylelint,stylelint/stylelint,gaidarenko/stylelint,stylelint/stylelint,hudochenkov/stylelint,gaidarenko/stylelint,evilebottnawi/stylelint,gucong3000/stylelint,hea... | src/lintStream.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2020\n */\n\nimport Realm from 'realm';\n\nexport class TemperatureBreachConfiguration extends Realm.Object {}\n\nTemperatureBreachConfiguration.schema = {\n name: 'Temperature... | javascript | edit | 0 | 3 | mit | bf04e2c0a7637b0486562167c6046cb8c2a74a26 | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile | src/database/DataTypes/TemperatureBreachConfiguration.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express')\nconst bodyParser = require('body-parser')\nconst cors = require('cors')\nconst morgan = require('morgan')\nconst {sequelize} = require('./models')\nconst config = require('./config/config')\n\nconst a... | javascript | edit | 0 | 1 | mit | f068173deb8aefb9ff0ac55c5fe5e57fd4363288 | rahman541/tab-tracker,rahman541/tab-tracker | server/src/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(global){\n\n // For Android 4.3- (included)\n document.body.addEventListener('click', function(e) {\n if (!e.path) {\n e.path = [];\n var t = e.target;\n while (t !== document) {\n e.path.push(t);\n ... | javascript | edit | 0 | 3 | mit | b2987678c06e7527491984a11e86a63da1d17cb4 | zhoukekestar/web-modules,zhoukekestar/modules,zhoukekestar/web-modules,zhoukekestar/modules,zhoukekestar/modules,zhoukekestar/web-modules | src/_fixMobile/EventPath.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar orm = require('orm');\nvar db = orm.connect('sqlite://db.sqlite');\n\nfunction init(callback) {\n db.sync(callback);\n}\n\nmodule.exports = {\n init: init\n};\n\n```\n\nApply this change: Use correct directory for sqlite datab... | javascript | edit | 0 | 1 | mit | aceeb92a1c71a2bdae0f1ebfce50c2391a20bbe2 | dashersw/cote-workshop,dashersw/cote-workshop | models.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar expect = require('chai').expect;\nvar Unsubscribe = require('../../lib/resources/unsubscribe');\nvar helper = require('../test_helper');\n\ndescribe('Unsubscribe', function() {\n var server;\n\n beforeEach(function() {\n... | javascript | edit | 0 | 1 | mit | e518509d82651340e881a638e5279ed6a1be7af1 | delighted/delighted-node,callemall/delighted-node | test/resources/unsubscribe_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport 'react-datepicker/dist/react-datepicker.css'\nimport '../App.css'\nimport React, { Component } from 'react'\nimport { Field, reduxForm } from 'redux-form'\nimport { Form } from 'semantic-ui-react'\nimport DatePicker from 'react-d... | javascript | edit | 0 | 1 | mit | 16162985c41a9cd78e17a76b66de27fe2b7bc31d | cernanb/personal-chef-react-app,cernanb/personal-chef-react-app | src/components/NewEngagementForm.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(){ \n \"use strict\";\n xtag.register(\"sam-tabbar\", {\n lifecycle: {\n created: function() {\n if (!this.role) {\n this.role = \"tablist\";\n }\n },\n inserted: function() {\n ... | javascript | edit | 0 | 4 | apache-2.0 | 6dc8a96b20179bd04a2e24fa4c3b0106d35ebaba | Swissnetizen/sam-tabbar | src/main.js | rejected_duplicate | Near-duplicate of sample 75106 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst builder = require('botbuilder');\nconst timesheet = require('./timesheet');\n\nmodule.exports = exports = [(session) => {\n\n builder.Prompts.text(session, 'Please tell me your domain user?');\n\n}, (session, r... | javascript | edit | 0 | 2 | mit | 92978a1a24c2b2df4dba8f622c40f34c4fa7ca12 | 99xt/jira-journal,99xt/jira-journal | modules/signin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'jquery'\n],\nfunction($) {\n return function() {\n var self = this;\n if (!self.sprite && self.lasyEmoji[0]) {\n var pickerTop = self.picker.offset().top,\n pickerBottom = picker... | javascript | edit | 0 | 4 | mit | 0715d2b60dd1ebd851d4e5ea9ec9073424211012 | mervick/emojionearea | src/function/lazyLoading.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar nocache = require('..')\n\nvar assert = require('assert')\nvar connect = require('connect')\nvar request = require('supertest')\n\ndescribe('nocache', function () {\n it('sets headers properly', function (done) {\n var app = con... | javascript | edit | 0 | 1 | mit | 7a328c49ea155df7ff2ae55825aa299c541bf31e | helmetjs/nocache | test/index.js | rejected_duplicate | Near-duplicate of sample 84829 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint import/no-extraneous-dependencies: [\"error\", {\"devDependencies\": true}] */\n/* eslint-env node, mocha */\nimport test from 'ava';\nimport endpoint from '../src/endpoint';\n\ntest('happy ponies', () => {\n const fetch = ()... | javascript | edit | 0 | 1 | mit | 5ac0fccde96dd50007767263c19b1432bb4e41d8 | hughrawlinson/api-client-helper | test/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport './main.sass'\nimport 'babel-core/polyfill'\n\nimport React from 'react'\nimport thunk from 'redux-thunk'\nimport createLogger from 'redux-logger'\nimport { Router } from 'react-router'\nimport createBrowserHistory from 'history/... | javascript | edit | 0 | 1 | mit | 684d9d693b19bc4d09c26627bb16ddcfa6230c63 | ello/webapp,ello/webapp,ello/webapp | src/main.js | rejected_duplicate | Near-duplicate of sample 74883 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ienoopen = require('..')\n\nvar assert = require('assert')\nvar connect = require('connect')\nvar request = require('supertest')\n\ndescribe('ienoopen', function () {\n beforeEach(function () {\n this.app = connect()\n this.a... | javascript | edit | 0 | 1 | mit | 18c94b0fcf2fdab6dea4ee0f3c0de11ba6e368f6 | helmetjs/ienoopen | test/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst electron = require('electron');\nconst { app, BrowserWindow } = electron;\n\nlet mainWindow; // Ensures garbage collection does not remove the window\n\napp.on('ready', () => {\n // Creates the application window... | javascript | edit | 0 | 1 | mit | 5bd8d02a8073fc55560fbc534f840627e81683de | joyceky/interactive-periodic-table,joyceky/interactive-periodic-table,joyceky/interactive-periodic-table | src/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport styles from './InterestGroup.css';\nimport React from 'react';\nimport InterestGroup from './InterestGroup';\nimport Button from 'app/components/Button';\nimport { Link } from 'react-router';\n\nexport type Props = {\n interestG... | javascript | edit | null | null | mit | 97b8f1d793341c20acf7eabb9395ee575b7bcb59 | webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp | app/routes/interestgroups/components/InterestGroupList.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar expect = require('chai').expect,\n hh = require('../index');\n\ndescribe('#method', function () {\n it('hh.method is a function', function () {\n expect(hh.method).a('function');\n });\n});\n\n```\n\nApply this chang... | javascript | edit | 0 | 1 | mit | 10bfd8221e3264d12e6f12470a0d24debc855bd8 | rsp/node-hapi-helpers | test/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar expect = require('chai').expect;\nvar rm = require('../');\n\ndescribe('1rm', function () {\n\n // 400# x 4\n var expectations = {\n brzycki: 436,\n epley: 453,\n lander: 441,\n lombardi: 459,\n ... | javascript | edit | 0 | 1 | mit | d650050d72d0272a350d26c1f03b2e4534e99b33 | bendrucker/1rm.js | test/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express')\nconst app = express()\nconst path = require('path')\nvar cors = require('cors')\nvar bodyParser = require('body-parser')\n// var pg = require('pg')\n// var format = require('pg-format')\n// var client... | javascript | edit | 0 | 1 | mit | 3c83c85662300646972a2561db80e26e80432f48 | acucciniello/notebook-sessions,acucciniello/notebook-sessions | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nMeteor.subscribe('regions');\nMeteor.subscribe('applications');\n\nTemplate.applications.helpers({\n applications: function() {\n return Applications.find({}, {limit: 10});\n },\n\n formatDate: function(date) {\n return date.ge... | javascript | edit | 0 | 2 | apache-2.0 | 4cf7eb019de9b51505dbf1ba8e2b5f9bc77e0b20 | IngloriousCoderz/GetReel,IngloriousCoderz/GetReel | recruit/client/applications.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react/addons';\nimport Backbone from 'backbone';\nimport Router from 'react-router';\n\nexport default React.createClass({\n displayName: \"Name\",\n\n propTypes: {\n provider: React.PropTypes.instanceOf(... | javascript | edit | 0 | 1 | apache-2.0 | b7ea9dc3f4e5bc7b028cf6aa4a5c7529b7d34160 | CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend | troposphere/static/js/components/providers/Name.react.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst webpack = require('webpack');\nconst { CleanWebpackPlugin } = require('clean-webpack-plugin');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\nconst CopyWebpackPlugin = require('copy-webp... | javascript | edit | 0 | 0 | mit | df11a29999a30f430162e2a6742903879f4608c4 | ddugovic/RelayChess,ddugovic/RelayChess,ddugovic/RelayChess | web/webpack.common.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global Pebble navigator */\nfunction pebbleSuccess(e) {\n // do nothing\n}\nfunction pebbleFailure(e) {\n console.error(e);\n}\n\nvar reportPhoneBatt;\n\nPebble.addEventListener('ready', function(e) {\n if (navigator.getBattery) {... | javascript | edit | 0 | 3 | mit | 46f2f3e86783a0b1eeed9be1ac35cd50a3ce1939 | stuartpb/rainpower-watchface,stuartpb/rainpower-watchface,stuartpb/rainpower-watchface | src/pkjs/index.js | rejected_duplicate | Near-duplicate of sample 91843 | 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 // Status reporting code\n // Use this to report missing hardware, plugin or unsupported browser\n ext._getStatus ... | javascript | edit | 0 | 1 | bsd-3-clause | b9eccecc4a5574ec05e29c55b16e19814b7d2c19 | visor841/SkelScratch,Calvin-CS/SkelScratch | Kinect2Scratch.js | rejected_duplicate | Near-duplicate of sample 69367 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nElm.Native.Now = {};\n\nElm.Native.Now.make = function(localRuntime) {\n\n localRuntime.Native = localRuntime.Native || {};\n\n\n localRuntime.Native.Now = localRuntime.Native.Now || {};\n\n if (localRuntime.Native.Now.values) {\n ... | javascript | edit | 0 | 4 | mit | ce1c9f69ab4aec5e1d2a1c15faaeb0a00a954f04 | chendrix/elm-rogue,chendrix/elm-rogue,chendrix/elm-rogue | src/Native/Now.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport * as Constants from '../constants/favorite'\nimport {logoutDone} from '../constants/login'\nimport type {FavoriteAction} from '../constants/favorite'\nimport type {Folder} from '../constants/types/flow-types'\n\nty... | javascript | edit | null | null | bsd-3-clause | ec343008e4db8688acfb383a3b254a86ecfeac29 | keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client | shared/reducers/favorite.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Return promise for given async function\n\n'use strict';\n\nvar f = require('es5-ext/lib/Function/functionalize')\n , concat = require('es5-ext/lib/List/concat').call\n , slice = require('es5-ext/lib/List/slice/call')\n\n , ... | javascript | edit | 0 | 3 | isc | be4104b7fa5e985da4970d733231ba2f9f4d1c24 | medikoo/deferred | lib/async-to-promise.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n'use strict';\n\n/* Unit tests for file client/scripts/arcademode/store/configureStore.js. */\nimport { expect } from 'chai';\nimport configureStore from '../../../../../client/scripts/arcademode/store/configureStore';\n\ndescribe('co... | javascript | edit | 0 | 1 | bsd-3-clause | a9d67c9f29270b56be21cb71073020f8957374d4 | freeCodeCamp/arcade-mode,kevinnorris/arcade-mode,kevinnorris/arcade-mode,kevinnorris/arcade-mode,freeCodeCamp/arcade-mode,freeCodeCamp/arcade-mode,kevinnorris/arcade-mode,freeCodeCamp/arcade-mode | test/client/scripts/arcademode/store/configureStore.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar stylefmt = require('stylefmt');\nvar data = '';\n\n// Get options if needed\nif (process.argv.length > 2) {\n var opts = JSON.parse(process.argv[2]);\n process.chdir(opts.file_path);\n}\n\nprocess.stdin.on('data',... | javascript | edit | 0 | 2 | isc | 64ae5257caf51aa470249561184b7b8c7a4d614c | dmnsgn/sublime-cssfmt,dmnsgn/sublime-cssfmt,dmnsgn/sublime-stylefmt | stylefmt.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Returns a BlockingResponse object with a redirect URL if the request URL\n * matches a file type extension.\n *\n * @param {object} request\n * @return {object|undefined} the blocking response\n */\nfunction req... | javascript | edit | 0 | 4 | mit | 47eb145d096e569254fcc96d1b71925cf0ff631f | nysa/github-tab-sizer | src/background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n var extend = require('extend'),\n defaults = require('./protractor.conf');\n\n exports.config = extend(defaults.config, {\n // --- uncomment to use mac mini's ---\n // seleniumAddress: 'htt... | javascript | edit | 0 | 1 | mit | 1b2d9602dade5c599390645bd02e9b066f4f0ef5 | ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend | cla_frontend/assets-src/javascripts/app/test/protractor.conf.local.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n printWidth: 100,\n tabWidth: 2,\n useTabs: false,\n semi: true,\n singleQuote: true,\n quoteProps: 'consistent',\n trailingComma: 'all',\n bracketSpacing: true,\n arrowParens: 'always',\n};\n\n```\n\nApply ... | javascript | edit | 0 | 0 | apache-2.0 | 6653fcba245b25adc7c20bf982a3d119f2659711 | jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs | .prettierrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe(\"Implement queue with two stacks\", function() {\n const Queue = new QueueTwoStacks(); \n Queue.enqueue(1);\n Queue.enqueue(2);\n Queue.enqueue(3);\n\n describe(\"enqueue()\", function() {\n it(\"appends an element to ... | javascript | edit | 0 | 1 | mit | 276492033ce2a3048b453d75c0e361bf4ebfd5d7 | ThuyNT13/algorithm-practice,ThuyNT13/algorithm-practice | tests/spec/QueueTwoStacksSpec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport './TicTacToe.scss';\nimport { connect } from 'react-redux';\nimport ticTacToeActions from 'actions/tictactoe';\n\nimport GameBoard from './components/GameBoard';\n\nconst mapStateToProps = (... | javascript | edit | 0 | 5 | mit | 009e3a12d21aa5b04acd1f17616a6af2458046b1 | terakilobyte/terakilobyte.github.io,terakilobyte/terakilobyte.github.io | src/projects/TicTacToe/TicTacToe.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { moduleForModel, test } from 'ember-qunit';\n\nmoduleForModel('canvas', 'Unit | Model | canvas', {\n // Specify the other units that are required for this test.\n needs: 'model:op model:pulseEvent model:team model:user'.w()\n}... | javascript | edit | 0 | 1 | apache-2.0 | 520a7ecf81d37df70aefe39efe2e9e1092f25a52 | usecanvas/web-v2,usecanvas/web-v2,usecanvas/web-v2 | tests/unit/models/canvas-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass Atom {\n constructor(state) {\n this.state = state;\n this.watches = {};\n }\n\n reset(state) {\n return this._change(state);\n }\n\n swap(f, ...args) {\n return this._change(f(this.state, ...args));\n }\n\n der... | javascript | edit | 0 | 1 | mit | 7d8ef029b25f4869bf046e6e28fc4bd801614944 | mike-casas/lock,mike-casas/lock,auth0/lock-passwordless,mike-casas/lock,auth0/lock-passwordless,auth0/lock-passwordless | src/atom/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require ('gulp');\n\n\ngulp.task ( 'html', ['css'], function() {\n gulp.src('src/main/resources/html/**')\n .pipe ( gulp.dest( './build/') );\n\n gulp.src('src/test/resources/**')\n .pipe ( gulp.dest('./build/data/'));\n\... | javascript | edit | 0 | 1 | bsd-3-clause | 42be88e329535f7777e0c33da7194d21bf81c6b4 | dblezek/webapp-skeleton,dblezek/webapp-skeleton | gulp/tasks/html.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar test = require(\"test\");\nrequire(\"a\");\ntry {\n require(\"A\");\n test.assert(false, \"should fail to require alternate spelling\");\n} catch (error) {\n}\ntest.print(\"DONE\", \"info\");\n\n```\n\nApply this change: Updat... | javascript | edit | 0 | 0 | bsd-3-clause | fc4428b965c58dda423f8bd100ccbb0760d44893 | kriskowal/mr,kriskowal/mr | spec/case-sensitive/program.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst url_for_static = require('../base/url').url_for_static;\nconst moment = require('moment');\n\nconst check_new_release = function() { // calling this method is handled by GTM tags\n const last_reload = localStorage.getIt... | javascript | edit | 0 | 5 | apache-2.0 | d286a3d9d171b77651e6c81fad3970baa5584fdc | binary-com/binary-static,negar-binary/binary-static,4p00rv/binary-static,ashkanx/binary-static,raunakkathuria/binary-static,raunakkathuria/binary-static,binary-static-deployed/binary-static,binary-static-deployed/binary-static,raunakkathuria/binary-static,binary-com/binary-static,kellybinary/binary-static,ashkanx/binar... | src/javascript/binary/common_functions/check_new_release.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Switch } from '@blueprintjs/core';\nimport { Themes } from '../../../containers/enums';\n\nconst ColorsPanel = ({ theme, setTheme }) =>\n <div className=\"mt-1\"... | javascript | edit | 0 | 1 | mit | 06a9a7400aedc0985657874c3aba35af6ab6b1fb | builtwithluv/ZenFocus,builtwithluv/ZenFocus | app/components/Settings/components/colors-panel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport React, { Component } from 'react'\nimport { Link } from 'react-router'\n\nimport s from './Sidebar.scss'\n\nexport default class Sidebar extends Component {\n constructor (props) {\n super(props)\n\n this.state =... | javascript | edit | 0 | 1 | mit | 45731fa369103e32b6b02d6ed5e99997def24e08 | jmdesiderio/swan-cms,jmdesiderio/swan-cms | app/client/components/Sidebar/Sidebar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* globals QUnit */\n\nexport default function setupQUnit(assertion, _qunitGlobal) {\n var qunitGlobal = QUnit;\n\n if (_qunitGlobal) {\n qunitGlobal = _qunitGlobal;\n }\n\n var originalModule = qunitGlobal.module;\n\n qunitGlob... | javascript | edit | 0 | 6 | mit | 11c4c935d9bb1ab5967a8eba97cd73d6ee9df684 | kellyselden/ember.js,fpauser/ember.js,thoov/ember.js,kanongil/ember.js,Gaurav0/ember.js,mixonic/ember.js,csantero/ember.js,Gaurav0/ember.js,Turbo87/ember.js,kennethdavidbuck/ember.js,gfvcastro/ember.js,sandstrom/ember.js,csantero/ember.js,xiujunma/ember.js,asakusuma/ember.js,qaiken/ember.js,jasonmit/ember.js,givanse/em... | packages/internal-test-helpers/lib/ember-dev/setup-qunit.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport styled, { css } from 'styled-components'\n\nimport * as vars from 'settings/styles'\nimport * as colors from 'settings/colors'\n\ntype Props = {\n depth: '1' | '2' | '3' | '4' | '5' | '6',\n}\n\nconst fn = ({ depth: de... | javascript | edit | null | null | mit | f13ecda8d2a69f455b175d013a2609197f495bb0 | izumin5210/OHP,izumin5210/OHP | src/components/outline/Link.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel'\n\n/* @flow */\n\nimport Path from 'path'\nimport {findCached} from './common'\nimport {CONFIG_FILE_NAME} from '../defaults'\n\nexport async function findRoot(directory: string): Promise<string> {\n const configFile = await... | javascript | edit | null | null | mit | 248b0e54a3bda3271f5735dedf61eda8395d882d | steelbrain/UCompiler | src/helpers/find-root.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst Rectangle = require('../lib/Rectangle');\nconst cursor = require('kittik-cursor').create().resetTTY();\n\nRectangle.create({text: 'Text here!', x: 'center', width: 20, background: 'green', foreground: 'black'}).... | javascript | edit | 0 | 0 | mit | 294aafacd298a013881f92f7a866a8b07f5a25f5 | kittikjs/shape-rectangle | examples/simple.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global require, module */\nvar EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function (defaults) {\n var app = new EmberAddon(defaults, {\n 'ember-cli-babel': {\n includePolyfill: true\n ... | javascript | edit | 0 | 1 | mit | 7dbdff31b9c97fb7eed2420e1e46508dee1797a2 | MyPureCloud/ember-webrtc-troubleshoot,MyPureCloud/ember-webrtc-troubleshoot,MyPureCloud/ember-webrtc-troubleshoot | ember-cli-build.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport Base from 'ember-simple-auth/authenticators/base';\nimport Configuration from '../configuration';\n\nconst { get, isEmpty, inject: { service }, RSVP: { resolve, reject } } = Ember;\n\nexport default Ba... | javascript | edit | 0 | 2 | mit | 68943423f789993e2ca91cd5f76e94d524a127c8 | datajohnny/ember-simple-token,datajohnny/ember-simple-token | addon/authenticators/token.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\nimport React, { PureComponent } from 'react';\nimport { Text, StyleSheet, View } from 'react-native';\n\nimport type { Style } from '../types';\nimport NavButton from '../nav/NavButton';\n\nconst styles = StyleSheet.create(... | javascript | edit | null | null | apache-2.0 | a8d2e74163cf71bb811150143089f83aca2c55a0 | vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile | src/lightbox/LightboxFooter.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function () {\n $('input[type=\"file\"]').on('change', function (e) {\n if ($(this).val()) {\n $('input[type=\"submit\"]').prop('disabled', false);\n }\n else {\n $('input[type=\"submit\"]').prop('disabled', true);... | javascript | edit | 0 | 2 | apache-2.0 | 79788a69daa951d85f4600926c464d6fbff9fe5b | harvard-library/archivesspace-checker,harvard-library/archivesspace-checker | assets/javascripts/global.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails\n\nimport \"@hotwired/turbo-rails\"\n\nimport './controllers'\n\n```\n\nApply this change: Fix importmap loading on production"
}... | javascript | edit | 0 | 0 | mit | 836cf5d5caf8a0cde92a6e018f3ea28aa77eb42e | dncrht/mical,dncrht/mical,dncrht/mical,dncrht/mical | app/javascript/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { options } from 'preact';\n\nlet currentIndex;\nlet component;\n\noptions.beforeRender = function (vnode) {\n\tcomponent = vnode._component;\n\tcurrentIndex = 0;\n}\n\nconst createHook = (create) => (...args) => {\n\tif (compone... | javascript | edit | 0 | 4 | mit | 99fe3b420e9bc14a2d01fd0f3c61bb94ce970a2c | developit/preact,developit/preact | hooks/src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar CustomListItemView = require('cartodb3/components/custom-list/custom-list-item-view');\nvar _ = require('underscore');\n\nmodule.exports = CustomListItemView.extend({\n\n render: function () {\n this.$el.empty();\n this.clear... | javascript | edit | 0 | 1 | bsd-3-clause | 30dd01f64e5e7dc98a517c8ff2353ab2cdde0583 | CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb | lib/assets/javascripts/cartodb3/components/form-components/editors/node-dataset/node-dataset-item-view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n], function () {\n\n /**\n * @exports is-defined\n *\n * Helper which checks whether a variable is defined or not.\n *\n * @param {*} check The variable to check that is defined\n * @para... | javascript | edit | 0 | 3 | mit | b3b18edfa2e964fe76125eb53189d92c48b867d1 | rockabox/Auxilium.js | src/is-defined.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default function() {\n\treturn `\n\t\thtml {\n\t\t\theight: 100%;\n\t\t\toverflow-y: scroll;\n\t\t}\n\n\t\tbody {\n\t\t\tfont-family: 'Lato', sans-serif;\n\t\t\tfont-size: 14px;\n\t\t\tcolor: #000;\n\t\t\tbackground: #f6f6f6;\n\t... | javascript | edit | 0 | 1 | mit | 36a53309e022f1ad6351756568bcc4d9e0df6940 | vvasilev-/weatheros,vvasilev-/weatheros | app/src/common/base-styles.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nVtTracker.SisterModalController = Ember.ObjectController.extend({\n needs: ['districtSistersIndex', 'application'],\n\n districts: Ember.computed.alias('controllers.application.model'),\n\n modalTitle: function() {\n if (this.get(... | javascript | edit | 0 | 2 | mit | 7f3804a1da20276ad309fa6554cca329f296ff64 | bfcoder/vt-ht-tracker,bfcoder/vt-ht-tracker,bfcoder/vt-ht-tracker | app/assets/javascripts/districts/controllers/sister_modal_controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Rightmove Enhancement Suite\n// @namespace https://github.com/chigley/\n// @description Keyboard shortcuts\n// @include http://www.rightmove.co.uk/*\n// @version 1\n// @grant GM_addStyl... | javascript | edit | 0 | 4 | mit | eb0f5fd8a337ace145c40e9b624738619542033a | chigley/rightmove-enhancement-suite | Rightmove_Enhancement_Suite.user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Load required modules\nvar http = require('http'), // http server core module\n port = 8080,\n timeNow = new Date().toLocaleString('en-US', {hour12: false, timeZone: 'Europe/Kiev'}),\n express = require('expres... | javascript | edit | 0 | 1 | mit | e78af7ead579d2c91f461734d2bdff5910cf3a5c | SteveBidenko/github-angular,SteveBidenko/github-angular,SteveBidenko/github-angular | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Validation\n *\n * @constructor\n * @param {object} options\n */\nvar Validation = function(options) {\n\n // Save a reference to the ‘this’\n var self = this;\n\n var defaultOptions = {\n singleError: true,\n errorMess... | javascript | edit | 0 | 6 | mit | cfa1a5e3a4f3e988d3c844c84874a8dabd852822 | apiaryio/Amanda,Baggz/Amanda,apiaryio/Amanda | src/engines/json/validation.js | rejected_duplicate | Near-duplicate of sample 73246 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Namespace: lb\n * Root of Legal Box Scalable JavaScript Application\n *\n * Authors:\n * o Eric Bréchemier <<EMAIL>>\n * o Marc Delhommeau <<EMAIL>>\n *\n * Copyright:\n * Legal-Box SAS (c) 2010-2011, All Rights Reserved\n *\... | javascript | edit | 0 | 2 | bsd-3-clause | 5d309087a7e4cd2931a1c8e29096f9eadb5de188 | eric-brechemier/lb_js_scalableApp,eric-brechemier/lb_js_scalableApp,eric-brechemier/lb_js_scalableApp | src/lb.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport { get } from '@ember/object';\nimport { hash } from 'rsvp';\n\nexport default Route.extend({\n globalStore: service(),\n\n model() ... | javascript | edit | 0 | 1 | apache-2.0 | cd432d2fd9ef0c76f9673990f4b2c2f8680a1831 | rancherio/ui,pengjiang80/ui,vincent99/ui,lvuch/ui,rancherio/ui,westlywright/ui,rancher/ui,vincent99/ui,rancherio/ui,pengjiang80/ui,lvuch/ui,vincent99/ui,lvuch/ui,rancher/ui,westlywright/ui,pengjiang80/ui,westlywright/ui,rancher/ui | lib/global-admin/addon/security/roles/new/route.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nself.$config = {\n landing: false,\n debug: false,\n repo: 'soruly/whatanime.ga',\n twitter: 'soruly',\n url: 'https://whatanime.ga',\n sidebar: true,\n disableSidebarToggle: false,\n nav: {\n default: []\n },\n icons: [],\... | javascript | edit | 0 | 0 | mit | a84b8d2ae8a5abd33936115ef83200fbe8a2d390 | soruly/whatanime.ga,soruly/whatanime.ga,soruly/whatanime.ga | docs/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar googleapis = require('googleapis');\n\n/*\n Example of using google apis module to discover the URL shortener module, and shorten\n a url\n @param params.url : the URL to shorten\n */\nexports.googleapis = function(params, cb) {\n ... | javascript | edit | null | null | mit | 9dfd7d6b5cf4f56b3d2aac4e6f97ff1c2986ee6e | RHMAP-Support/URL_shortener,RHMAP-Support/URL_shortener | main.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n Copyright (C) 2016 Google Inc., authors, and contributors\n Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n */\n\n(function (can, GGRC) {\n 'use strict';\n\n var tpl = can.view(GGRC.mustache_path +... | javascript | edit | 0 | 2 | apache-2.0 | 2021611229e5b6691297504fc72926b085d70ca3 | josthkko/ggrc-core,kr41/ggrc-core,AleksNeStu/ggrc-core,edofic/ggrc-core,plamut/ggrc-core,andrei-karalionak/ggrc-core,josthkko/ggrc-core,kr41/ggrc-core,AleksNeStu/ggrc-core,edofic/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,kr41/ggrc-core,josthkko/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,j0gurt/ggrc-c... | src/ggrc/assets/javascripts/components/mapped-objects/mapped-objects.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\ndescribe('MainCtrl', function() {\n beforeEach(module('arethusa'));\n\n it('sets scope values', inject(function($controller, $rootScope) {\n var scope = $rootScope.$new();\n var mystate = {\n init: functi... | javascript | edit | 0 | 1 | mit | 08a48f04219f01fa3140a17ce6c905cbca9b54a5 | fbaumgardt/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa | spec/arethusa.core/main_ctrl_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction FileSubmit(FilePath, FileURL, ThumbURL, FileType) {\n\n // var input_id=window.name.split(\"___\").join(\".\");\n var input_id=window.name.replace(/____/g,'-').split(\"___\").join(\".\");\n var preview_id = 'image_' + ... | javascript | edit | 0 | 3 | bsd-3-clause | 0f53f3742abf00c18e14b1ad4ad2da5369586c03 | ryneeverett/filebrowser-safe,ryneeverett/filebrowser-safe,ryneeverett/filebrowser-safe,fawx/filebrowser-safe,ryneeverett/filebrowser-safe,fawx/filebrowser-safe,fawx/filebrowser-safe | filebrowser_safe/static/filebrowser/js/FB_FileBrowseField.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar webpack = require('webpack');\n\n\nmodule.exports = {\n entry: [\n './examples/index'\n ],\n\toutput: {\n path: path.join(__dirname, 'examples'),\n\t\tfilename: 'bundle.js',\n\t},\n\tresolveLoade... | javascript | edit | 0 | 0 | mit | 91a006a3795d177d4ed12b380f43f7227d654de7 | idolize/react-spinkit,KyleAMathews/react-spinkit,pieter-lazzaro/react-spinkit | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Component from '@ember/component';\nimport { inject as service } from '@ember/service';\nimport { task } from 'ember-concurrency';\n\nexport default Component.extend({\n store: service(),\n flashMessages: service(),\n verifyAp... | javascript | edit | 0 | 3 | bsd-2-clause | 4e4ceb2fbb9eeffdd61b1f1bfc022347d4ae46e8 | barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web | app/components/appearance-verify.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.