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\nexports.config = {\n // Locally, we should just use the default standalone Selenium server\n // In Travis, we set up the Selenium serving via Sauce Labs\n\n // Tests to run\n specs: [\n './protractor/**/*.spec.js'\n ],\n\n // C... | javascript | edit | 0 | 0 | mit | 0aeefb8fb3b8e58f7312323aab397f622b251013 | denisKaranja/angularfire,douglascorrea/angularfire,jamestalmage/angularfire,fbentz/angularfire,fbentz/angularfire,FirebaseExtended/angularfire,FirebaseExtended/angularfire,nbr1ninrsan2/angularfire,bpietravalle/angularfire,FirebaseExtended/angularfire,yoda-yoda/angularfire,cesarmarinhorj/angularfire,bpietravalle/angular... | tests/local_protractor.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*eslint-disable max-nested-callbacks*/\n\nimport React from 'react';\nimport {shallow} from 'enzyme';\nimport {describe, it} from 'mocha';\nimport {expect} from 'chai';\nimport Spinner from 'react-native-gifted-spinner';\n\nimport AppV... | javascript | edit | 0 | 1 | mit | 06cea187980cd50fd4699e689b4191ffb2a4d9fc | WWCJSBoulder/DWClient,justinhaaheim/empower-app,BrianJVarley/simple-offset-pro,salokas/barcodebar,ming-cho/react-native-demo,AcademyPgh/Y1S2-ReplayFX-Schedule,keyifadami/CrewCrossCheck,mandlamag/ESXApp,ming-cho/react-native-demo,yogakurniawan/phoney-mobile,mandlamag/ESXApp,apoi/kahvi,WWCJSBoulder/DWClient,chriswohlfart... | src/modules/__specs__/AppView.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet input = require(\"fs\").readFileSync(\"./data\").toString();\n\nlet santaPosition = [0, 0];\nlet roboSantaPosition = [0, 0];\n\nlet uniqueSantaPositions = [];\n\nfunction updateUniquePositions() {\n\tif (uniqueSantaPositions.indexOf... | javascript | edit | 0 | 6 | mit | 82544193853cd0988ee2536d134d1fa451d8fbb4 | Mark-Simulacrum/advent-of-code-2015,Mark-Simulacrum/advent-of-code-2015,Mark-Simulacrum/advent-of-code-2015,Mark-Simulacrum/advent-of-code-2015 | day3/solution.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction loadDashboard(page, dashboard) {\n\tvar url = \"/dashboards/page/\"+dashboard+\"/\"+page+\"/\";\n\tconsole.log(\"Getting\", url);\n\tvar spinner = '<div class=\"text-center\" style=\"width:100%;margin-top:5em;opacity:0.6\">';\n... | javascript | edit | 0 | 3 | mit | e986ee873dd62c0c333aa7530a1753cef09af39f | synw/django-chartflo,synw/django-chartflo,synw/django-chartflo | chartflo/templates/dashboards/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Em from 'ember';\nimport { task, timeout } from 'ember-concurrency';\n\nconst { computed } = Em;\n\nvar applicationController = Em.Controller.extend({\n\tactiveNote: null,\n\n hideSidePanel: false,\n\n init: function() {\n E... | javascript | edit | 0 | 2 | mit | 5deb018244d0a06f6d3feccb21b1c0e26864321d | ddoria921/Notes,ddoria921/Notes | app/controllers/application.js | rejected_duplicate | Near-duplicate of sample 102540 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass Dice extends React.Component {\n constructor() {\n super();\n this.state = {\n \tvalue: '',\n words: this.parseInput(decodeURIComponent(location.search.substring(5))),\n div: document.createElement(\"div\")\n\t... | javascript | edit | 0 | 4 | mit | 1856ce1b2b89d3d708f38e7bde323446864646c9 | testlnord/wurfelspiel,testlnord/wurfelspiel,testlnord/wurfelspiel | js/game.js | rejected_duplicate | Near-duplicate of sample 67564 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequirejs.config({\n baseUrl: 'test',\n paths: {\n pvcf: '../../lib/pvcf',\n when: '../test/vendor/when/when',\n node: '../test/vendor/when/node',\n callbacks: '../test/vendor/when/callbacks'\n }\n})... | javascript | edit | 0 | 1 | mit | 08517b8cc97af75922ad40704fc333bdd0cba5fa | rootsher/pvcf,rootsher/pvcf,rootsher/pvcf | test/src/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Meteor } from 'meteor/meteor';\nimport { handleMigration } from './migrations';\n\nMeteor.startup(() => {\n handleMigration();\n});\n```\n\nApply this change: Fix meteor method not found error by initializing meteor methods ... | javascript | edit | 0 | 1 | mit | 212033e54f0d4729b0ade59aaaad19074b388cc0 | RobNeXX/4minitz,Huggle77/4minitz,RobNeXX/4minitz,RobNeXX/4minitz,4minitz/4minitz,Huggle77/4minitz,4minitz/4minitz,Huggle77/4minitz,4minitz/4minitz | server/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet React = require('react-native');\nlet {\n AppRegistry,\n StyleSheet,\n Text,\n View,\n StatusBarIOS\n} = React;\n\nclass Meowth extends React.Component {\n componentWillMount() {\n StatusBarIOS.setStyle('light-content');\n ... | javascript | edit | 0 | 1 | apache-2.0 | a8cb21f70f884c5b854b54f1de85d993ef687aaf | yrezgui/meowth-ios | index.ios.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n\n /***********************************************************/\n /* Handle Proceed to Payment\n /***********************************************************/\n jQuery(function() {\n jQuery(document).o... | javascript | edit | 0 | 2 | mit | 8f17182642f52022ed2664f7232dac5218302e02 | flaviocopes/grav-plugin-shoppingcart-paypal,flaviocopes/grav-plugin-shoppingcart-paypal | gateways/paypal_express/script.js | rejected_duplicate | Near-duplicate of sample 108206 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst authenticatedRoutes = FlowRouter.group({\n name: 'authenticated'\n});\n\nauthenticatedRoutes.route( '/', {\n name: 'index',\n action() {\n BlazeLayout.render( 'default', { yield: 'index' } );\n }\n});\n\nauthenticatedRoutes... | javascript | edit | 0 | 1 | mit | 495d7a008b1621531cdf39f2d74ac22aee42deac | lnwKodeDotCom/WeWish,lnwKodeDotCom/WeWish | both/routes/authenticated.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nchrome.webRequest.onBeforeRequest.addListener(\n (details) => { \n chrome.tabs.sendMessage(details.tabId, { content: \"message\" }, () => {});\n\n const startTime = new Date().getTime();\n let randNumber;\n\n ... | javascript | edit | 0 | 2 | mit | d0c02bdfc462c2f8bc748e44ce3f5d4552fc58db | VladReshet/no-ads-forever | background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\n\nimport DestinationListingCard from '../DestinationListingCard/DestinationListingCard';\nimport Badge from '../../Badge/Badge';\n\nimport css from './PlaceListingCard.css';\n\nconst PlaceListi... | javascript | edit | 0 | 1 | mit | ff72938231c463ff7d6ac0eb0b38c229f06e6246 | NGMarmaduke/bloom,appearhere/bloom,NGMarmaduke/bloom,rdjpalmer/bloom,appearhere/bloom,rdjpalmer/bloom,appearhere/bloom,rdjpalmer/bloom,NGMarmaduke/bloom | components/Cards/PlaceListingCard/PlaceListingCard.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst dirs = {\n M1A: 'M1 → Kabaty',\n M1B: 'M1 → Młociny',\n M2A: 'M2 → Dworzec Wileński',\n M2B: 'M2 → Rondo Daszyńskiego',\n};\n\n\nexport default {\n onGetSchedules: function(res) {\n print(\n res.sched... | javascript | edit | 0 | 1 | isc | 2eacea5fc28a1edb0cc18319a32267cd6841aa7e | stasm/get-ztm-dirs | src/handler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction MockXHR() {\n this.method = null\n this.url = null\n this.data = null\n this.headers = {}\n this.readyState = 0\n this.status = 0\n this.responseText = null\n}\n\nMockXHR.responses = {}\n\nMockXHR.prototype.open = functi... | javascript | edit | 0 | 2 | mit | b33be185ba08eef310536b73278aec60a1a3c3db | github/include-fragment-element,github/include-fragment-element | test/mock-xhr.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n tinymce.PluginManager.requireLangPack('uploadimage');\n\n tinymce.create('tinymce.plugins.UploadImage', {\n UploadImage: function(ed, url) {\n var form, iframe, win, editor = ed;\n function showDialog() {\... | javascript | edit | 0 | 1 | mit | dccdf983e68961fd3cd6d87bd207dc7deb02086b | dancingbytes/tinymce-rails-imageupload,CraigJZ/tinymce-rails-imageupload-1,dancingbytes/tinymce-rails-imageupload,PerfectlyNormal/tinymce-rails-imageupload,PerfectlyNormal/tinymce-rails-imageupload,PerfectlyNormal/tinymce-rails-imageupload,ekubal/tinymce-rails-imageupload,ekubal/tinymce-rails-imageupload,ekubal/tinymce... | app/assets/javascripts/tinymce/plugins/uploadimage/plugin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nexport function attemptChangeName(obj, name) {\n if (!canRedefineValue(obj, 'name')) {\n return;\n }\n\n Object.defineProperty(obj, 'name', {\n value: name,\n });\n}\n\nexport function canRedefineValue(obj, property) {\n co... | javascript | edit | 0 | 2 | mit | f9f8f7103cef43417a246414c311b2bcdad686c3 | foobarhq/reworkjs,reworkjs/reworkjs,reworkjs/reworkjs,reworkjs/reworkjs,foobarhq/reworkjs | src/framework/util/util.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, {Component} from 'react'\n\nimport Field from './Field.js'\nimport Select from './Select.js'\nimport Input from './Input.js'\nimport Label from './Label.js'\n\nexport default class QuestionForm extends Component {\n handl... | javascript | edit | 0 | 1 | mit | e3fde9655ce25219938afcb8d6aa056adbf1c545 | ONSdigital/eq-author,ONSdigital/eq-author,ONSdigital/eq-author | src/components/QuestionForm.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { find } from 'lodash';\n\nexport const getSettings = namespace => state => state.settings.collection[namespace];\n\nexport const getSetting = (namespace, setting) => state =>\nstate.settings.collection[namespace][setting];\n\nex... | javascript | edit | 0 | 1 | mit | d6ed0c7bc74b83ea46887c1afa1da3fd0f7f2481 | worona/worona-app,worona/worona-app | client/packages/core-app-worona/src/app/settings-app-extension-worona/selectorCreators/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport function isImage(file) {\n if (file.type.split('/')[0] === 'image') {\n return true;\n }\n}\n\nexport function convertBytesToMbsOrKbs(filesize) {\n let size = '';\n // I know, not technically correct...\n if... | javascript | edit | 0 | 3 | mit | 9c2f44c60b714ac83ba3a1ca38c0898d4d37e07a | Yuvaleros/material-ui-dropzone | src/helpers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst JS_BUILT_IN_OBJECTS = [\n 'object',\n 'function',\n 'boolean',\n 'symbol',\n 'error',\n 'infinity',\n 'number',\n 'math',\n 'date',\n];\nconst RESERVED_NAMES = ['admin', 'series', 'file', ...JS_BUILT_IN_OBJECTS];\n\nexpor... | javascript | edit | 0 | 0 | mit | b0b117554055bb0452c02955965627b00841ca94 | wistityhq/strapi,wistityhq/strapi | packages/strapi-plugin-content-type-builder/admin/src/containers/FormModal/utils/reservedNames.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { shallow } from 'enzyme';\nimport { expect } from 'chai';\nimport { ActionCableProvider, ActionCable } from '../index';\n\ntest('ActionCable render without children', () => {\n const node = shallow(\... | javascript | edit | 0 | 1 | mit | 594b03ceb00f0ac76ad015a7380a4c9f23903f50 | cpunion/react-actioncable-provider | lib/__tests__/ActionCable-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = [\n {\n test: /\\.jsx?/,\n exclude: /node_modules/,\n loader: 'babel-loader',\n },\n {\n test: /\\.css$/,\n use: [ 'style-loader', 'css-loader' ]\n },\n];\n\n\n```\n\nApply this change: Use more descr... | javascript | edit | 0 | 0 | mit | 6f9dcc82d086a79e173338007f984570cfdc3185 | trotzig/react-available-times,trotzig/react-available-times | webpack.rules.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar path = require('path');\n\n// #ARCHIVE:0 Eliminate unused config options id:1203\nvar DEFAULT_EXCLUDE_PATTERN = \"^(node_modules|bower_components|\\\\.imdone|target|build|dist|logs)[\\\\/\\\\\\\\]?|\\\\.(git|svn|hg|np... | javascript | edit | 0 | 0 | mit | 8067e9fc0de92888653237558213ab8c9298a99b | imdone/imdone-core,imdone/imdone-core | lib/constants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport './App.css';\nimport Table from './Table';\n\nclass App extends Component {\n constructor () {\n super();\n const ws = new WebSocket('ws://localhost:42745/websocket')\n this.st... | javascript | edit | 0 | 2 | mit | 4accf166520646369b2f3e2b2ecf7ee3a158ff0a | KenMacD/tarabish,KenMacD/tarabish,KenMacD/tarabish,KenMacD/tarabish | client/react/src/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function runSagas(routes, dispatch, props, sagaMiddleware) {\n return Promise.all(\n routes\n .filter(function(route) {\n var sagasToRun;\n return route.component &&\n (sagasToRun = route.compone... | javascript | edit | 0 | 4 | mit | 2a4ec61b2b04c3a548c30a2fb993964aaeff7c34 | heroku/create-render-4r | lib/run-sagas.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst path = require(\"path\");\nconst rollup = require(\"rollup\");\n\nfunction createPreprocessor(options, preconfig, basePath, logger) {\n const cache = new Map();\n const log = logger.create(\"preprocessor.rollu... | javascript | edit | 0 | 5 | mit | 802d6bb7174eb2d444246ffb0523e7c6c45a83c3 | showpad/karma-rollup-preprocessor,jlmakes/karma-rollup-preprocessor,jlmakes/karma-rollup-preprocessor | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n ___ usage ___ en_US ___\n usage: prolific tcp <options>\n\n -u, --url <string>\n The URL of the logging destination.\n\n -r, --rotate <number>\n Reopen TCP connection after specified number... | javascript | edit | 0 | 2 | mit | 683e4c5056eacf561e69835c5531b5411df3fb66 | bigeasy/prolific,bigeasy/prolific | prolific.tcp/tcp.argv.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport apiClient from 'api-client';\nimport loader from 'loader';\n\nconst init = (apikey, security) => {\n const client = apiClient.init(apikey, security);\n return {\n getSecurity() {\n return client.getSecurity();\n },\n... | javascript | edit | 0 | 1 | mit | b268949468a4f32677dfeca0d1a8da19f8ad39a9 | filestack/filestack-js,filestack/filestack-js | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { router, stringifyQuery, parseQuery } from '../router';\n\nconst defaultQuery = {\n 'x-access-from': 'ui'\n};\n\nfunction normalize(url) {\n const urlLocation = new URL(url, /^\\//.test(url) ? location.origin : undefined);... | javascript | edit | 0 | 2 | mit | ef05e8d694820d3638a01139320d447deb335918 | code16/sharp,code16/sharp,code16/sharp | resources/assets/js/util/url.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Formats a number to the American `1,000.00` format\n *\n * @param {number|string} number The value to format\n * @return {string} The formatted number\n */\nexport default function numberWithCommas(number) {\n const parts = num... | javascript | edit | 0 | 9 | mit | f24f92487abf2529faea31622f33c8a656530f24 | HarvestProfit/harvest-profit-ui | src/utilities/NumbersHelper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n/**\n * handle autoplay\n *\n * @param {element} slideTo slide to frame function\n * @param {element} options slider options\n */\nexport default function initAutoplay (slide, options) {\n let autoplayTime = (typeof optio... | javascript | edit | 0 | 2 | mit | 7b9e2f1fc757c941b87ad9f3107b09796f4fac21 | AmitM30/basic-swiper,AmitM30/basic-swiper | src/utils/init-autoplay.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport $ from 'jquery';\nimport setupNativeFormVariableList from '~/ci_variable_list/native_form_variable_list';\n\ndescribe('NativeFormVariableList', () => {\n preloadFixtures('pipeline_schedules/edit.html.raw');\n\n let $wrapper;\n\... | javascript | edit | 0 | 1 | mit | 67fc0a2b92f49250b14562a04539b775f0d55cc4 | iiet/iiet-git,jirutka/gitlabhq,jirutka/gitlabhq,axilleas/gitlabhq,iiet/iiet-git,dreampet/gitlab,axilleas/gitlabhq,dreampet/gitlab,dreampet/gitlab,jirutka/gitlabhq,mmkassem/gitlabhq,iiet/iiet-git,stoplightio/gitlabhq,iiet/iiet-git,axilleas/gitlabhq,axilleas/gitlabhq,dreampet/gitlab,mmkassem/gitlabhq,stoplightio/gitlabhq... | spec/javascripts/ci_variable_list/native_form_variable_list_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n ... | javascript | edit | 0 | 4 | mit | 1af1be4cad8db37e096724d0f2c666bd860b330f | ptmt/react-native-macos,ptmt/react-native-macos,ptmt/react-native-macos,ptmt/react-native-macos,ptmt/react-native-macos,ptmt/react-native-macos,ptmt/react-native-macos,ptmt/react-native-macos | local-cli/runMacOS/findXcodeProject.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst assert = require('assert');\nconst { crypto, config } = require('./config');\n\ndescribe(\"WebCrypto\", () => {\n\n it(\"get random values\", () => {\n var buf = new Uint8Array(16);\n var check = new Buffer(buf).t... | javascript | edit | 0 | 1 | mit | 0d67458b71a5cbb7127d455bcc993fd1a0b2e969 | PeculiarVentures/node-webcrypto-p11,PeculiarVentures/node-webcrypto-p11 | test/crypto.js | rejected_duplicate | Near-duplicate of sample 84084 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (module) {\n module.controller(\"FilesEditController\", FilesEditController);\n\n FilesEditController.$inject = ['file'];\n\n /* @ngInject */\n function FilesEditController(file) {\n var ctrl = this;\n ... | javascript | edit | 0 | 1 | mit | 788cd10725c28ee6f0b25c371475e73ebe229fb3 | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | website/app/application/core/projects/project/files/file-edit-controller.js | rejected_duplicate | Near-duplicate of sample 70377 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport chai, { expect } from 'chai';\nimport mockery from 'mockery';\nimport dirtyChai from 'dirty-chai';\nchai.use(dirtyChai);\n\nimport { shallow } from 'enzyme';\n\nimport React from 'react';\n\ndescribe('WrapperUserIndexPage', () =>... | javascript | edit | 0 | 1 | mit | 474163478d11e839b493417b584e16a80a1559d1 | retaxJS/retax-seed | src/routes/user/component/indexRoute/__tests__/WrapperUserIndexPage-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n\nmodule.exports = {\n 'get': {\n 'description': 'This endpoint returns information about invoices that have been approved. The response includes basic details of each invoice, such as sender and receiver info... | javascript | edit | 0 | 0 | mit | e746455d849e06f7c8b59bf097631a78da53a2ff | bebraw/react-crm-backend,koodilehto/koodilehto-crm-backend | spec/paths/approved_invoice.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\r\n\r\nvar tablesUpdater = require('./tablesUpdater');\r\nvar resultsUpdater = require('./resultsUpdater');\r\nvar tournamentsUpdater = require('./tournamentsUpdater');\r\nvar groupsUpdater = require('./groupsUpdater');\r\... | javascript | edit | 0 | 2 | apache-2.0 | c1221144279bffcfd8f21b1cd3116dd40ac6253d | Softcadbury/FootballDashboard,Softcadbury/DashboardFootball,Softcadbury/DashboardFootball,Softcadbury/football-peek,Softcadbury/FootballDashboard | server/updaters/mainUpdater.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst assert = require('assert')\nconst Application = require('spectron').Application\n\ndescribe('application launch', function () {\n this.timeout(10000)\n\n beforeEach(function () {\n this.app = new Application({\n path: __... | javascript | edit | 0 | 3 | apache-2.0 | c594979d9be6b93542095108b04a723501ca9e12 | brainwane/zulip-electron,steele/zulip-electron,zulip/zulip-desktop,brainwane/zulip-electron,zulip/zulip-electron,zulip/zulip-electron,zulip/zulip-electron,brainwane/zulip-electron,steele/zulip-electron,zulip/zulip-desktop,steele/zulip-electron,zulip/zulip-desktop,zulip/zulip-desktop | tests/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(function(require) {\n 'use strict';\n\n var $ = require('jquery');\n require('bootstrap');\n\n /**\n * This customization allows to define own focus, click, render, show, lookup functions for Typeahead\n */\n ... | javascript | edit | 0 | 4 | mit | acedb6440d409145dce37b61a9dea76eebb05172 | orocrm/platform,orocrm/platform,orocrm/platform | src/Oro/Bundle/UIBundle/Resources/public/js/extend/bootstrap/bootstrap-typeahead.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n({ \n testPropertiesExposed: function(cmp) {\n var testUtils = cmp.get(\"v.testUtils\");\n \n [\"appCodeName\", \"appName\", \"appVersion\", \"cookieEnabled\", \"geolocation\", \n \"language\", \"onLine\... | javascript | edit | 0 | 1 | apache-2.0 | ccddceeef4ca5bf1208c2873b4775aac0994f00e | badlogicmanpreet/aura,madmax983/aura,madmax983/aura,forcedotcom/aura,madmax983/aura,forcedotcom/aura,badlogicmanpreet/aura,forcedotcom/aura,madmax983/aura,forcedotcom/aura,badlogicmanpreet/aura,badlogicmanpreet/aura,badlogicmanpreet/aura,madmax983/aura,forcedotcom/aura,madmax983/aura,badlogicmanpreet/aura | aura-components/src/test/components/lockerTest/secureNavigatorTest/secureNavigatorTestController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport path from 'path';\nimport HtmlWebpackPlugin from 'webpack-html-plugin';\nimport webpack from 'webpack';\n\nconst array = (target) => target.filter((item) => item);\n\nexport default ({dev, prod}) => ({\n entry: array([\n ... | javascript | edit | 0 | 3 | mit | fc6cb30f7323e35be709e3ad591bbb136f0ef5df | tomvej/redux-starter,tomvej/redux-starter | webpack.config.babel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst rewrite = require('connect-modrewrite');\nconst serveIndex = require('serve-index');\nconst serveStatic = require('serve-static');\n\nmodule.exports = function (grunt) {\n return {\n livereload: {\n optio... | javascript | edit | 0 | 3 | apache-2.0 | 47f7ac51444b54d4790586950832632fbdf30612 | binary-static-deployed/binary-static,4p00rv/binary-static,kellybinary/binary-static,ashkanx/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,kellybinary/binary-static,binary-static-deployed/binary-static,4p00rv/binary-static,kellybinary/binary-static,negar-binary/binary-static,ashkanx/binary-... | build/connect.js | rejected_duplicate | Near-duplicate of sample 105119 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport MCStoreBus from './mcstorebus';\n\nclass StateStoreService {\n /*@ngInject*/\n constructor() {\n this.states = {};\n this.bus = new MCStoreBus();\n }\n\n updateState(key, value) {\n this.states[ke... | javascript | edit | 0 | 2 | mit | 911ba266f0f5fd01c9c66948dad967af27edbc1b | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | website/src/app/global.services/store/state-store.service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//@flow\nimport {Readable} from 'stream';\nimport RarFileChunk from './rar-file-chunk';\nexport default class RarStream extends Readable {\n _rarFileChunks: RarFileChunk[];\n _byteOffset: number = 0;\n\n constructor(...rarFileChunks:... | javascript | edit | null | null | mit | d2dde55619473b30dd16fd2276e81977dffd5593 | 1313/rar-stream | src/rar-file/rar-stream.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nvar program = require('commander'),\n meta = require('../package.json'),\n lint = require('../index');\n\nvar detects,\n formatted,\n configPath,\n ignores,\n configOptions = {};\n... | javascript | edit | 0 | 3 | mit | aeab0f4207efb2c2880552d7994077bf453f8099 | skovhus/sass-lint,DanPurdy/sass-lint,srowhani/sass-lint,flacerdk/sass-lint,Snugug/sass-lint,joshuacc/sass-lint,Dru89/sass-lint,MethodGrab/sass-lint,sasstools/sass-lint,bgriffith/sass-lint,sktt/sass-lint,alansouzati/sass-lint,ngryman/sass-lint,zallek/sass-lint,sasstools/sass-lint,benthemonkey/sass-lint,carsonmcdonald/sa... | bin/sass-lint.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport { Avatar } from './Avatar';\nexport Button from './Button';\nexport FloatingAction from './FloatingAction';\nexport FullScreenTextArea from './FullScreenTextArea';\nexport Icon from './Icon';\nexport User from './User';\n\n```\n\... | javascript | edit | null | null | mit | 7fd8521156a34ddee04f150548e00838561aa97c | tobycyanide/felony,tobycyanide/felony,henryboldi/felony,henryboldi/felony | src/components/common/index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Ember.js plugin\n *\n * Patches event handler callbacks and ajax callbacks.\n */\n;(function(window, Raven, Ember) {\n'use strict';\n\n// quit if Ember isn't on the page\nif (!Ember) {\n return;\n}\n\nvar _oldOnError = Ember.... | javascript | edit | 0 | 3 | bsd-3-clause | edb1532478facc1b121c52d1bad2ed361d669232 | iodine/raven-js,clara-labs/raven-js,grelas/raven-js,malandrew/raven-js,chrisirhc/raven-js,eaglesjava/raven-js,hussfelt/raven-js,getsentry/raven-js,Mappy/raven-js,getsentry/raven-js,eaglesjava/raven-js,housinghq/main-raven-js,danse/raven-js,getsentry/raven-js,iodine/raven-js,getsentry/raven-js,benoitg/raven-js,grelas/ra... | plugins/ember.js | rejected_duplicate | Near-duplicate of sample 70417 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nexports.up = (knex, Promise) => Promise.all([\n knex.schema.createTable('users', table => {\n table.uuid('id')\n .primary()\n .defaultTo(knex.raw('uuid_generate_v4()'));\n table.string('username'... | javascript | edit | 0 | 1 | mit | ba19c41de3da74bf26f76a435bc412f43b5631d5 | majori/piikki | migrations/20161117225616_index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['views/user/login', 'views/user/signup', 'views/header', 'views/order/vl_orders'],\n function (UserLogin, UserSignup, HeaderView, OrdersView) {\n\n var Ui = {};\n\n var loginView = new UserLogin()\n var signupView = ne... | javascript | edit | 0 | 1 | apache-2.0 | d69c40a6ced3b25a582b093dae6ab07d738947f4 | neich/nodebb,neich/nodebb,neich/nodebb | public/scripts/ui.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport DefaultLayout from './DefaultLayout'\nimport {Router, Route, NotFound, Redirect} from 'router:@sanity/base/router'\nimport locationStore from 'datastore:@sanity/base/location'\nimport SanityIntlProvider... | javascript | edit | 0 | 2 | mit | e583d332d04d6fa45e387525793d6f120ee7dcd4 | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | packages/@sanity/default-layout/src/components/DefaultLayoutRouter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport has from 'lodash/has';\nimport isPlainObject from 'lodash/isPlainObject';\nimport isArray from 'lodash/isArray';\n\nconst UUID_KEY_PATTERN = /__.+uuid__/i;\n\nexport default function stripUUID(value) {\n if (isPlainObject(value)... | javascript | edit | 0 | 8 | mit | 9a46fd4a6a7bbc408f258a23b141f44297b853d0 | youzan/zent,youzan/zent,youzan/zent,youzan/zent | packages/zent/src/design/stripUUID.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// We use factories for the models we want to test so just set \n// empty fixtures here to keep the DS.FixtureAdapter quiet\nApp.CurrentUser.FIXTURES = [];\nApp.WallPost.FIXTURES = [];\nApp.ProjectPhase.FIXTURES = [];\nApp.TaskSearch.FI... | javascript | edit | 0 | 0 | bsd-3-clause | 5caa4281c7f5e1bace711f95fe91d8edbb2fb194 | onepercentclub/bluebottle,jfterpstra/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle | test/js/fixtures/common.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar confy = require('../index');\nvar testCase = require('nodeunit').testCase;\n\nconfy.configFile = __dirname + '/.confy';\nconfy.clean();\nprocess.ENV.EDITOR = __dirname + '/editorcmd';\n\nmodule.exports = testCase({\n setUp: functio... | javascript | edit | 0 | 1 | mit | 2bb4efab77c87ffd6c395c77d00b7890542d0630 | hokaccha/node-confy | test/editor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('materialscommons').component('mcExperimentTaskDetails', {\n templateUrl: 'app/project/experiments/experiment/components/tasks/mc-experiment-task-details.html',\n controller: MCExperimentTaskDetailsComponentControll... | javascript | edit | 0 | 2 | mit | 0b91890a5588f6e559aab5f6dc8abee2dd6efc96 | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | website/src/app/project/experiments/experiment/components/tasks/mc-experiment-task-details.component.js | rejected_duplicate | Near-duplicate of sample 83471 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Socket.io Communication\n */\n\n// module dependencies\nvar crypto = require('crypto');\n\n// variable declarations\nvar socketCodes = {};\n\nmodule.exports = function(socket) {\n // establish connection\n socket.emit('pair:ini... | javascript | edit | 0 | 4 | mit | 6359226476d6724133863ec9a806d70c2ceaadb1 | drejkim/multi-screen-demo,drejkim/multi-screen-demo,drejkim/multi-screen-demo | routes/socket.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nimport { db, Rat } from '../db'\nimport Query from './index'\n\n/**\n * A class representing a rat query\n */\nclass NicknameQuery extends Query {\n /**\n * Create a sequelize rat query from a set of parameters\n * @constructor\n... | javascript | edit | 0 | 2 | bsd-3-clause | be3e67e981125cb4e835abedc87df3c693152a2c | FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com | src/query/NicknameQuery.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport '../styles/WeaveElement.css';\n\nclass WeaveElement extends Component {\n constructor() {\n super();\n\n this.state = {red: false};\n this.handleClick = this.handleClick.bind(t... | javascript | edit | 0 | 4 | mit | 6e2d7b798504d57c549e3e3750d88e0785f70f71 | nobus/weaver,nobus/weaver | src/components/WeaveElement.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar yeoman = require('yeoman-generator');\n\nmodule.exports = yeoman.generators.Base.extend({\n initializing: function() {\n this.option('gh_page_type', {\n type: String,\n required: true,\n desc: 'Gith... | javascript | edit | 0 | 2 | mit | 6ca61608e8bed65e03d59b224af62e312dcd1626 | gjeck/generator-jekyll-ghpages,gjeck/generator-jekyll-ghpages,gjeck/generator-jekyll-ghpages | generators/gulp/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nannotationApp.directive('morphForm', function() {\n return {\n restrict: 'E',\n scope: true,\n templateUrl: 'templates/morph_form.html'\n };\n});\n\n```\n\nApply this change: Use strict in morphForm directive"
},
{
"r... | javascript | edit | 0 | 1 | mit | 297a346983d1353b4eaa82ca25cfae88a2eed208 | PonteIneptique/arethusa,latin-language-toolkit/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa | app/js/directives/morph_form.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Project configuration.\n\nvar pkg = require(\"../package\");\n\nmodule.exports = {\n\t\"package\" : pkg,\n\t\"paths\" : {\n\t\t\"private\": \"Resources/Private\",\n\t\t\"public\": \"Resources/Public\",\n\t},\n\t\"Sass\" : {\n\t\t\... | javascript | edit | 0 | 0 | mit | 1646d23736e1f9fb7125136ed2ed934556d197d0 | t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template | Build/Config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { placeStylesheet } from \"../../common/styles\";\n\nwindow.Buttercup = {\n\n fetchArchives: function() {\n return new Promise(function(resolve, reject) {\n let timeout = setTimeout(() => reject(new Error(\"T... | javascript | edit | 0 | 3 | mit | 85acc479edf0d08bd3216b4a0b36748117670dc1 | perry-mitchell/buttercup-chrome,perry-mitchell/buttercup-chrome,buttercup-pw/buttercup-browser-extension,buttercup-pw/buttercup-browser-extension | source/popup/js/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Run tests interactively in the browser\",\n version: '1.0.6'\n});\n\nPackage.onUse(function (api) {\n // XXX this should go away, and there should be a clean interface\n // that tinytest and the drive... | javascript | edit | 0 | 1 | mit | 58d921e92620f220dc73d49792f791add873caaf | mauricionr/meteor,jenalgit/meteor,shmiko/meteor,vacjaliu/meteor,iman-mafi/meteor,papimomi/meteor,chasertech/meteor,jagi/meteor,vjau/meteor,framewr/meteor,vacjaliu/meteor,daltonrenaldo/meteor,chengxiaole/meteor,dev-bobsong/meteor,EduShareOntario/meteor,stevenliuit/meteor,allanalexandre/meteor,shrop/meteor,Prithvi-A/mete... | packages/test-in-browser/package.js | rejected_duplicate | Near-duplicate of sample 92609 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// https://github.com/kni-labs/rrssb\nvar popupCenter = function(url, title, w, h) {\n // Fixes dual-screen position Most browsers Firefox\n var dualScreenLeft =\n window.screenLeft !== undefined ? wind... | javascript | edit | 0 | 9 | mit | 47e48049229d5393c024c0b742bd8511693d5e09 | DeveloperDavo/learnitmyway,DeveloperDavo/learnitmyway | static/js/share-buttons.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nnoUiSlider.create(slider, {\n start: 80,\n range: {\n min: 0,\n max: 100\n },\n cssPrefix: 'noUi-', // defaults to 'noUi-',\n cssClasses: {\n // Full list of classnames to override.\n // Does N... | javascript | edit | 0 | 0 | mit | 875e1aa44952cd946e739b9ffa52cae074ded129 | leongersen/noUiSlider,leongersen/noUiSlider,leongersen/noUiSlider,leongersen/noUiSlider | documentation/more/classes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*globals chrome,console */\n/*jslint indent:2,browser:true, node:true */\nvar PromiseCompat = require('es6-promise').Promise;\n\nvar oAuthRedirectId = \"freedom.oauth.redirect.handler\";\n\nvar ChromeIdentityAuth = function() {\n \"us... | javascript | edit | 0 | 6 | apache-2.0 | 2e66a868619fd017b1e409da3b60c750ac7e4960 | freedomjs/freedom-for-chrome,freedomjs/freedom-for-chrome,freedomjs/freedom-for-chrome,freedomjs/freedom-for-chrome | providers/oauth/oauth.identity.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Program to determine if string is a palindrome\n\nfunction checkPalindrome(str) {\n\n\t// identify non-alphanumeric characters through regular expression\n\tvar regEx = /[^A-Za-z0-9]/g;\n\n\t// lower case all characters in string and... | javascript | edit | 0 | 3 | mit | 1b273af40df9a093271b2d21cebcc545f2f55dce | derekmpham/interview-prep,derekmpham/interview-prep | string/palindrome-check.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar dummy\n , hotplate = require('hotplate')\n , path = require('path')\n;\n\n\n// exports.sendResponse = function(method, res, obj){\nexports.sendResponse = function(res, obj, status){\n\n var status;\n var isOK;... | javascript | edit | 0 | 8 | mit | 21fe3174410756b25281bed5a446516f2c053016 | shelsonjava/hotplate,mercmobily/hotplate,mercmobily/hotplate,shelsonjava/hotplate | node_modules/hotCoreErrorProtocol/lib/hotCoreErrorProtocol.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular\n .module('orders')\n .controller('ReciptController', ReciptController);\n\n ReciptController.$inject = ['$scope', 'OrdersService', '$stateParams', '$location'];\n\n function ReciptCon... | javascript | edit | 0 | 1 | mit | c53adcb912b3a370556f6e078968d954d46b1f7f | JavaScriptAcademy/oneStep,JavaScriptAcademy/oneStep,JavaScriptAcademy/oneStep | modules/orders/client/controllers/recipt.client.controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('cat-buddy.services', [])\n.factory('Animals', function($http) {\n var getAllFromInternetByZipCode = function(animalName, zipCode, offset) {\n offset = offset || 0;\n return $http({\n method: 'GET',\n url... | javascript | edit | 0 | 2 | mit | e91dc89930431c8c79a02d3adb1a136ea55b4665 | reinaisnothere/mvp,reinaisnothere/mvp | client/app/services/services.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { join } from 'path'\nimport buildWebpackConfig from './config/build-webpack-config'\nimport buildKarmaConfig from './config/build-karma-config'\nimport startDevelop from './action/start-develop'\nimport runTest from './action/ru... | javascript | edit | 0 | 3 | mit | 3b0492386a595331d147c2a1e5f3748c1e0963c3 | saguijs/sagui,saguijs/sagui | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default class UserLocation {\n constructor({\n apiKey,\n cacheTtl = 604800, // 7 days\n fallback = 'exact', // If IP-based geolocation fails\n specificity = 'general',\n }) {\n let coordsLoaded = false;\n\n co... | javascript | edit | 0 | 4 | apache-2.0 | f4955e86bb284b7111c71f8a9f270da7c8818c15 | kevinsmith/user-location | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nimport backbone from 'backbone';\nimport _ from 'underscore';\n\nclass Person extends backbone.Model {\n getFullName() {\n return this.get('firstName') + ' ' + this.get('lastName');\n }\n}\n// Using benmccorm... | javascript | edit | 0 | 1 | mit | 7ce25e9c841a98ac2d428a6d7e1a70015e890349 | andrewrota/backbone-with-es6-classes,andrewrota/backbone-with-es6-classes | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nconst CommandUtil = require('../src/command_util').CommandUtil;\nconst l10nFile = __dirname + '/../l10n/commands/kill.yml';\nconst _ = require('../src/helpers');\nconst l10n = require('../src/l10n')(l10nFile);\nconst util... | javascript | edit | 0 | 6 | mit | 39430a54cdcac3cae01fb49c54b4e81f66303522 | seanohue/ranviermud,seanohue/ranviermud,shawncplus/ranviermud | commands/kill.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n model(params) {\n return this.store.find('seq', params.lang + \"-\" + params.seq).then(\n (model) => model,\n (error) => null);\n },\n afterModel(model)... | javascript | edit | 0 | 2 | mit | 959b28ea1da440d8c71e9d739c2ea099721f5de4 | wordset/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui,wordset/wordset-ui,BryanCode/wordset-ui,BryanCode/wordset-ui | app/routes/seq.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Vue from 'vue';\nimport Countdown from '../src/vue-countdown';\nimport {getVM} from './helpers';\n\ndescribe('Vue countdown component', () => {\n it('sets passed label correctly', () => {\n const vm = getVM(Countdown, {... | javascript | edit | 0 | 1 | mit | c45f77f19e84ad54d70574b019198dd9a9fc43f8 | maksimovicdanijel/vue-countdown,maksimovicdanijel/vue-countdown | test/vue-countdown.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Continuous delivery server\nconst { spawn } = require('child_process')\nconst { resolve } = require('path')\nconst { createServer } = require('http')\nconst { urlencoded } = require('body-parser')\n\nconst hostname = '127.0.0.1'\ncon... | javascript | edit | 0 | 3 | mit | af52d32fe73ba180ef6975edff4ef04c42e5149b | jsonnull/jsonnull.com,jsonnull/jsonnull.com,jsonnull/jsonnull.com | scripts/cd-server.js | rejected_duplicate | Near-duplicate of sample 96780 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst h = require('virtual-dom/h');\n\nmodule.exports = function (data) {\n const {gameID, game} = data;\n return h('div', {className: 'room'}, [\n game.playing ? null : h('form', {method: 'post', action: `/${gameID}`}, [\n h(... | javascript | edit | 0 | 2 | mit | 3c71fc5e7e9c146b0ac59eb792bca74a0c52a0d0 | rijkvanzanten/luaus | app/views/room.js | rejected_duplicate | Near-duplicate of sample 92336 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint no-console:0 */\n\n// RailsUjs is *required* for links in Lucky that use DELETE, POST and PUT.\nimport RailsUjs from \"rails-ujs\";\n\n// Turbolinks is optional. Learn more: https://github.com/turbolinks/turbolinks/\nimport Tu... | javascript | edit | 0 | 0 | mit | 9c0c8362aeb27327a1c5747d51e9e87a7497e73f | luckyframework/cli,luckyframework/cli,luckyframework/cli | src/browser_app_skeleton/src/js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\nimport ApplicationSerializer from '../serializers/application';\n\nexport default ApplicationSerializer.extend({\n\n normalize: function (modelClass, resourceHash, prop) {\n var normalizedHash = resourc... | javascript | edit | 0 | 7 | mit | 14d808a9e369fc38fff1975ea0e6225b788b12d9 | Turistforeningen/Hytteadmin,Turistforeningen/Hytteadmin | client/app/serializers/cabin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport buble from '@rollup/plugin-buble'\n\nexport default {\n input: 'src/commands.js',\n output: {\n dir: 'dist',\n format: 'cjs',\n sourcemap: true\n },\n plugins: [buble()],\n external(id) { return !/^[\\.\\/]/.test(id... | javascript | edit | 0 | 1 | mit | b8ebb9207195e23afa6c0ce3f943c6908abee740 | ProseMirror/prosemirror-commands | rollup.config.js | rejected_duplicate | Near-duplicate of sample 74951 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = (function(){\n\n\t// GET /users/:id/media?lat=<LAT>&lng=<LNG>&time=<TIME>\n\treturn function* collection(id) {\n\n\t\t// Twitter Requests\n var twitterDef = require('q').defer()\n var TwitterManager = require('../... | javascript | edit | 0 | 1 | mit | 1f2587a913a987fa0eae03bfa4b4dd1cffb8a5e1 | capsul/capsul-api | controllers/users/collection.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: [bar] Add summary inside the bar."
},
{
"role": "assistant",
"content": "var builder = require('focus').component.builder;\nvar React = require('react');\nvar applicationStore = require('focus').application.builtInStore();\n\... | javascript | new_file | null | null | mit | d12eeb4944e9414b1f0543fda462fff3656b9970 | KleeGroup/focus-components,Bernardstanislas/focus-components,anisgh/focus-components,Bernardstanislas/focus-components,KleeGroup/focus-components,asimsir/focus-components,JabX/focus-components,sebez/focus-components,Ephrame/focus-components,JabX/focus-components,sebez/focus-components,anisgh/focus-components,Ephrame/fo... | application/bar/index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable object-shorthand */\nmodule.exports = {\n // We need to make sure that the transpiler hit the linoleum source since we are\n // not building to npm or simliar.\n ignore: function(filename) {\n return ((/node_modu... | javascript | edit | 0 | 3 | mit | d88b60ddc0bbea880011b48a4d5e9a1374b7b67a | kpdecker/linoleum | babel-defaults.js | rejected_duplicate | Near-duplicate of sample 81533 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar artistController = require('../controllers/artist-controller');\nvar genreController = require('../controllers/genre-controller');\n\nmodule.exports = function(app, passport) {\n app.get('/auth/facebook', passport.authenticate('fac... | javascript | edit | 0 | 1 | mit | 4e35bbcc85351ff97aeacd3674d16612c94e78be | kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender | routes/routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$.extend( true, $.fn.dataTable.defaults, {\n \"autoWidth\": false,\n \"columnDefs\": [\n { width: '10%', targets: 0 },\n { width: '15%', targets: 1 },\n { width: '10%', targets: 2 },\n { width: '10%', t... | javascript | edit | 0 | 1 | apache-2.0 | d7c0f286914c260f545b5c9c095a19daed918ff1 | deka108/mathqa-server,deka108/mathqa-server,deka108/mathqa-server,deka108/mathqa-server,deka108/meas_deka,deka108/meas_deka,deka108/meas_deka,deka108/meas_deka | cms/static/cms/js/user/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { $assign, $fetch, $replaceAll } from 'domose';\n\n/* Dispatch an Custom Event with a detail\n/* ========================================================================== */\n\nfunction $dispatch(target, type, detail) {\n\t// an... | javascript | edit | 0 | 3 | apache-2.0 | 04cc01275c74084ad1d01180ae6a7cf4f3438875 | gschnall/global-nav,gschnall/global-nav | shared/shared.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst productionConfig = {\n apiBase: 'http://api.storypalette.net/v1/',\n socketBase: 'http://api.storypalette.net/',\n environment: 'production',\n port: 8882,\n};\n\nconst developmentConfig = {\n apiBase: 'http://localhost:8880/... | javascript | edit | 0 | 0 | isc | 745633dabd3e695a30edc5fbd1625bb7f09aa26d | storypalette/storypalette-performer-touch,storypalette/storypalette-performer-touch | server/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.onload = function() {\n var xScale = new Plottable.LinearScale();\n var yScale = new Plottable.LinearScale();\n\n var xAxis = new Plottable.XAxis(xScale, \"bottom\");\n var yAxis = new Plottable.YAxis(yScale, \"left\");\n\n ... | javascript | edit | 0 | 1 | mit | 10290106b9a075685852699cb8bbaf5bb3a012ca | RobertoMalatesta/plottable,jacqt/plottable,NextTuesday/plottable,NextTuesday/plottable,gdseller/plottable,jacqt/plottable,palantir/plottable,NextTuesday/plottable,alyssaq/plottable,iobeam/plottable,alyssaq/plottable,jacqt/plottable,palantir/plottable,RobertoMalatesta/plottable,palantir/plottable,danmane/plottable,danma... | tutorials/customProjectors/customProjectors.js | rejected_duplicate | Near-duplicate of sample 77514 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.loadNpmTasks('grunt-bower-concat');\n var taskConfig = {\n pkg: grunt.file.readJSON('package.json'),\n bower_concat: {\n all: {\n dest: 'build/_bow... | javascript | edit | 0 | 1 | mit | 9772f857d22a68912b96d113f7953b89e733e33c | pra85/grunt-bower-concat-example | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * externs.js - define externs for the google closure compiler\n * \n * Copyright © 2012-2015, JEDLSoft\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance wit... | javascript | edit | 0 | 1 | apache-2.0 | e8dac4b099ea892d8953eedcb035cd802414600b | iLib-js/iLib,iLib-js/iLib,iLib-js/iLib,iLib-js/iLib,iLib-js/iLib | js/lib/externs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('pulse-settings', 'Integration | Component | pulse settings', {\n integration: true\n});\n\ntest('it renders',... | javascript | edit | 0 | 1 | apache-2.0 | c38995393eb051f0430d6241725c673aa40db704 | usecanvas/web-v2,usecanvas/web-v2,usecanvas/web-v2 | tests/integration/components/pulse-settings/component-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n\n $('#primaryPostForm').validate()\n\n // Image preview in upload input\n $('.form__input--upload').on('change', function () {\n\n var label = $(this).data('label');\n var image =... | javascript | edit | 0 | 1 | mit | 20d13a2f21c00968cd9c749dc1527c0ed43a3a34 | DNepovim/kraj-praha,DNepovim/kraj-praha,DNepovim/kraj-praha | wp-content/themes/template/src/scripts/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar options = {\n container: document.getElementById('myChart'),\n data: generateSpiralData(),\n series: [{\n type: 'line',\n xKey: 'x',\n yKey: 'y',\n marker: {\n enabled: false\n ... | javascript | edit | 0 | 2 | mit | a8836a562b1a7d1f0d4a4f59f9c30c3b46ca7318 | ceolter/ag-grid,ceolter/ag-grid,ceolter/angular-grid,ceolter/angular-grid | grid-packages/ag-grid-docs/src/javascript-charts-axis/axis-tick-count/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright (C) 2012 salesforce.com, inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n ... | javascript | edit | 0 | 3 | apache-2.0 | cc1a92e941a68df9f0f606c1b399e83a013a9aca | madmax983/aura,badlogicmanpreet/aura,lcnbala/aura,badlogicmanpreet/aura,madmax983/aura,forcedotcom/aura,SalesforceSFDC/aura,forcedotcom/aura,DebalinaDey/AuraDevelopDeb,madmax983/aura,DebalinaDey/AuraDevelopDeb,navyliu/aura,forcedotcom/aura,SalesforceSFDC/aura,madmax983/aura,igor-sfdc/aura,lhong375/aura,navyliu/aura,for... | aura-components/src/main/components/auradocs/search/searchController.js | rejected_duplicate | Near-duplicate of sample 103253 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n\n // toggle on/off switch\n $(document).on('click', '[data-toggle]', function() {\n targetHide = $(this).data('toggle-hide')\n targetShow = $(this).data('toggle-show')\n $('[data-toggle-name=\"' + targetHide ... | javascript | edit | 0 | 1 | mit | 2b4f8c7d914a2539af765ee2d1a56688073b2c25 | aelogica/express_admin,aelogica/express_admin,aelogica/express_admin,aelogica/express_admin | app/assets/javascripts/express_admin/utility.js | rejected_duplicate | Near-duplicate of sample 104549 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$.fn.productAutocomplete = function (options) {\n 'use strict'\n\n // Default options\n options = options || {}\n var multiple = typeof (options.multiple) !== 'undefined' ? options.multiple : true\n\n function formatProduct (produc... | javascript | edit | 0 | 3 | bsd-3-clause | 071ac08d6ef28b1dd39224a4bf4df24140203056 | imella/spree,imella/spree,imella/spree | backend/app/assets/javascripts/spree/backend/product_picker.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { Link } from 'react-router'\nimport { ElloMark } from '../iconography/ElloIcons'\n\nclass Navbar extends React.Component {\n render() {\n return (\n <nav className=\"Navbar\" role=\"navigation... | javascript | edit | 0 | 1 | mit | f0ecaecbe12972301e5c8044d9613f1b46b8a4ec | ello/webapp,ello/webapp,ello/webapp | src/components/navigation/Navbar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport BlogPost from '../database/models/blog-post';\nimport log from '../log';\n\nconst PUBLIC_API_ATTRIBUTES = [\n 'id',\n 'title',\n 'link',\n 'description',\n 'date_updated',\n 'date_published',\n 'author_id'\n];\n\nconst DEF... | javascript | edit | 0 | 2 | mit | 8527c947f131b9c430041943b3596b46d65b54ec | csblogs/api-server,csblogs/api-server | src/controllers/post-controller.js | rejected_duplicate | Near-duplicate of sample 107094 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.