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\nvar _ = require('lodash');\n\nexports.removeStopwords = function(text, options) {\n var defaults = {\n 'stopwords': require('./stopwords_en.js').words,\n 'inputSeparator': /[\\\\., ]+/,\n 'outputSeparator': ' '\n }\n options... | javascript | edit | 0 | 3 | mit | 222dfb84be3710bedd7cd3d89fee32490fef5ed8 | fergiemcdowall/stopword | lib/stopword.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction resolveAuto(cb, value) {\n if (value && typeof value.then === 'function') {\n return value.then(cb)\n }\n\n return cb(value)\n}\n\nfunction resolveSync(cb, value) {\n if (value && typeof value.then === 'function') {\n ... | javascript | edit | 0 | 2 | isc | f51592cdadc1fc8e4dbdf7264606cc6ded45ca76 | alex-shnayder/corrie | resolvers/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nsteal('can/util/mvc.js')\n.then('funcunit/qunit', \n\t 'can/test/fixture.js')\n.then(function() {\n\t// Set the test timeout to five minutes\n\tQUnit.config.testTimeout = 300000;\n})\n.then('./mvc_test.js',\n\t 'can/construct/construc... | javascript | edit | 0 | 5 | mit | 359aedc53fb580fdccccd95bf9d8a339ae72720d | rjgotten/canjs,gsmeets/canjs,airhadoken/canjs,tracer99/canjs,bitovi/canjs,dimaf/canjs,azazel75/canjs,rjgotten/canjs,shiftplanning/canjs,juristr/canjs,rasjani/canjs,janza/canjs,mindscratch/canjs,patrick-steele-idem/canjs,WearyMonkey/canjs,ackl/canjs,schmod/canjs,whitecolor/canjs,beno/canjs,tracer99/canjs,whitecolor/canj... | test/can_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\ndescribe(\"tichu-tournament-list module\", function() {\n beforeEach(module(\"tichu-tournament-list\"));\n\n describe(\"TournamentListController controller\", function() {\n var scope;\n var appController;\n ... | javascript | edit | 0 | 1 | mit | 427a93ef9a8fbaef4f12111d679ec50c021dcf0c | aragos/tichu-tournament,aragos/tichu-tournament,aragos/tichu-tournament | web/test/unit/tournaments/tournament-list-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar GOVUK = GOVUK || {};\nGOVUK.UserSatisfaction = GOVUK.UserSatisfaction || function () {};\n\nGOVUK.UserSatisfaction.prototype = {\n cookieNameSeenBar: \"seenSurveyBar\",\n cookieNameTakenSurvey: \"takenUserSatisfactionSurvey\",\n\n... | javascript | edit | null | null | mit | 20fcea62a454b7af2edfba2614211eefd6086246 | alphagov/static,kalleth/static,robinwhittleton/static,tadast/static,tadast/static,kalleth/static,robinwhittleton/static,kalleth/static,tadast/static,robinwhittleton/static,alphagov/static,tadast/static,kalleth/static,alphagov/static,robinwhittleton/static | app/assets/javascripts/user-satisfaction-survey.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\nvar fs = require('fs')\n , repl = require('repl')\n , Tumblr = require('../index.js')\n , util = require('util')\n , _ = require('underscore'); // TODO: Figure out where to specify this dependency\n\nfs.readF... | javascript | edit | 0 | 4 | apache-2.0 | 930d8870ec62306e02e118736c907b67bb6c3812 | tumblr/tumblr.js,tumblr/tumblr.js,CodeCloudMe/tum2,jhorbulyk/tumblr.js,Apercu/tumblr.js,roderickhsiao/tumblr.js,ridixcr/tumblr.js,sbglasius/tumblr.js,radiofrequency/tumblr.js,adrianseeley/tumblr.js,mfressdorf/tumblr.js,CodeCloudMe/tum2,daltomania/tumblr.js,irace/tumblr.js | bin/repl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst debug = require('debug')('calendar:routes:month');\nconst express = require('express');\nconst common = require('./common');\nconst dayRouter = require('./day');\nconst validators = require('../lib/validators');\n... | javascript | edit | 0 | 1 | mit | e67c691b0903e116b5eb516d1bd61249a4f65c67 | kollavarsham/calendar-api | routes/month.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar request = require('request');\nvar _und = require('underscore');\n\n/* Get orders listing. */\nexports.list = function(req, res){\n var results = {\n orders: [],\n bitStampOrders: [],\n btceOrders: []\n };... | javascript | edit | 0 | 3 | mit | 7b43c4ef9d11fd66df4adc72d0774569dce0ca82 | thomaslangston/bitnode | routes/order.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport { connect } from 'react-redux'\nimport { fetchHouseholds, convertLead } from '../redux/modules/Households/actions'\nimport { fetchMeals } from '../redux/modules/Meals/actions'\nimport { C... | javascript | edit | 0 | 1 | mit | dce3a37f86f230f9eb8400ded60246dcec7431d4 | cernanb/personal-chef-react-app,cernanb/personal-chef-react-app | src/containers/LeadsContainer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Graphite = require('graphite');\nvar Measured = require('measured');\n\nvar reportInterval = 5000;\nvar graphiteHost = process.env.GRAPHITE_HOST || null;\nvar graphitePort = process.env.GRAPHITE_PORT || 2003;\nvar envName = process.... | javascript | edit | 0 | 3 | mit | 2e80e26e67dccf4fbe0292b1e793371239c001fb | JakeChampion/polyfill-service,mcshaz/polyfill-service,kdzwinel/polyfill-service,kdzwinel/polyfill-service,JakeChampion/polyfill-service,jonathan-fielding/polyfill-service,mcshaz/polyfill-service,jonathan-fielding/polyfill-service,kdzwinel/polyfill-service,mcshaz/polyfill-service,jonathan-fielding/polyfill-service | service/metrics.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Patterns gallery - A simple gallery\n *\n * Copyright 2013 Simplon B.V. - Wichert Akkerman\n */\ndefine([\n \"jquery\",\n \"../registry\",\n \"photoswipe\"\n], function($, patterns) {\n var gallery = {\n name:... | javascript | edit | 0 | 1 | bsd-3-clause | 9964565a9fadfab2a27cceeedc8a41199f764d08 | janga1997/Patterns,janga1997/Patterns,garbas/Patterns,garbas/Patterns,janga1997/Patterns,garbas/Patterns | src/pat/gallery.js | rejected_duplicate | Near-duplicate of sample 67283 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar parseMark = require('./mark');\n\nfunction parseRootMark(model, spec, width, height) {\n return {\n type: \"group\",\n width: width,\n height: height,\n scales: spec.scales || [],\n axes: spec.axes || [],\n legend... | javascript | edit | 0 | 4 | bsd-3-clause | 9c34dcfce84c2d6059ba037a30664cdfe25b07f2 | mathisonian/vega-browserify,vega/vega,Jerrythafast/vega,shaunstanislaus/vega,mcanthony/vega,seyfert/vega,Applied-Duality/vega,shaunstanislaus/vega,timelyportfolio/vega,Jerrythafast/vega,nyurik/vega,chiu/vega,carabina/vega,mcanthony/vega,mathisonian/vega-browserify,vega/vega,uwdata/vega,vega/vega,smclements/vega,Applied... | src/parse/marks.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Sagui configuration object\n */\nmodule.exports = {\n /**\n * Different application entry-points\n * Each page is a combination of a JavaScript file and a HTML file\n *\n * Example: 'index' -> 'index.html' and 'index.js... | javascript | edit | 0 | 0 | mit | 5244e6f325cc93b83d8c7be48bc87189a366e112 | cskeppstedt/kartografen,cskeppstedt/kartografen,cskeppstedt/kartografen | sagui.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nFlowRouter.route('/', {\n name: 'landing',\n action: function() {\n if (Meteor.userId()) {\n FlowRouter.go('user-home', {userId: Meteor.userId()});\n } else {\n var loginRedirect = Accounts.onLogin(function() {\n ... | javascript | edit | 0 | 2 | mit | 44abefdba48dfb2af574b8ae86fc16b4ddc33145 | piemonkey/to-do-tree,piemonkey/to-do-tree | client/routing.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Head from 'next/head';\nimport Link from 'next/link';\nimport { Container } from 'reactstrap';\n\nimport config from '@lib/config';\nimport style from './style.module.css';\n\n/**\n * 404 page\n */\nexport default function NotFou... | javascript | edit | 0 | 1 | mit | 35dd61402e1059a39b82aed7283cb8e3a52ee994 | TreeChicken/TreeChicken.github.io,TreeChicken/TreeChicken.github.io | pages/404/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {List, Map, fromJS} from 'immutable';\nimport {expect} from 'chai';\n\nimport reducer from '../src/reducer';\n\ndescribe('reducer', () => {\n it('handles SET_STATE', () => {\n const initialState = Map();\n const action = {... | javascript | edit | null | null | mit | 8e1ad4c034329396a9cb81abed613e7080b9869d | AlexKVal/vote-client,AlexKVal/vote-client | test/reducer_spec.js | rejected_code_smell | Internal duplication: ~107% of the file is inside repeated 12+ line blocks | null |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar tape = require('tape')\nvar queue = require('../')\n\ntape('concurrent', function (t) {\n t.plan(4)\n\n var actual = []\n var q = queue()\n\n q.push(function (cb) {\n setTimeout(function () {\n actual.push('one')\n ... | javascript | edit | 0 | 2 | mit | 74223ee35f865190b2bb2c529e565ccc044a8046 | jessetane/queue,jessetane/queue,jessetane/queue | test/concurrent.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Legend from 'components/app/pulse/Legend';\nimport { Link } from 'routes';\n\nfunction LayerCard(props) {\n const { layerActi... | javascript | edit | 0 | 6 | mit | b151f0525478fb72d1a4db5fe4eba5252864a622 | resource-watch/resource-watch,resource-watch/resource-watch,resource-watch/resource-watch,resource-watch/resource-watch | components/app/pulse/LayerCard.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst chai = require('chai');\nconst expect = chai.expect;\nconst xcode = require('xcode');\nconst createGroup = require('../../src/ios/createGroup');\nconst last = require('lodash').last;\n\nconst project = xcode.project('test/fixtures... | javascript | edit | 0 | 1 | mit | cca9ddab4d1d98f82b1b9a8c1ed339c22a0945fa | rnpm/rnpm-plugin-link | test/ios/createGroup.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport { addAction } from '../lib/database';\nimport CheckinStore from '../store/checkin-store.js';\n\nlet app = express();\n\napp.post('/', (req, res) => {\n addAction('CHECKIN', {\n studentId:... | javascript | edit | 0 | 2 | unlicense | 00dea9e35b8c78b87e67400d83e5106668419484 | TheFourFifths/consus,TheFourFifths/consus | src/api/checkin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n root: true,\n parserOptions: {\n ecmaVersion: 2017,\n sourceType: 'module'\n },\n plugins: [\n 'ember'\n ],\n extends: [\n 'eslint:recommended',\n 'plugin:ember/recommended'\n ],\n env: {\n ... | javascript | edit | null | null | mit | dbf3cea773607eb6b18d65b0fc666b43ceb69270 | ember-cli/ember-cli,buschtoens/ember-cli,mike-north/ember-cli,fpauser/ember-cli,cibernox/ember-cli,ef4/ember-cli,patocallaghan/ember-cli,asakusuma/ember-cli,jgwhite/ember-cli,twokul/ember-cli,raycohen/ember-cli,ef4/ember-cli,buschtoens/ember-cli,balinterdi/ember-cli,thoov/ember-cli,asakusuma/ember-cli,patocallaghan/emb... | blueprints/app/files/.eslintrc.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { readdirSync, copyFileSync } = require('fs')\nconst { join } = require('path')\n\nconst PUBLIC_DIR = join(__dirname, '..', 'public')\nconst BINDINGS_BUILD_DIR = join(__dirname, '..', 'bindings', 'build', 'Release')\n\nconst FILE_... | javascript | edit | 0 | 2 | mit | 8bfcf981ac8dd75db76fce9e8ccd9bac7603216f | Kylart/KawAnime,Kylart/KawAnime,Kylart/KawAnime | scripts/moveLibs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n// Generate an HTML coverage report from a sourcemap-remapped JSON one.\n\nlet istanbul = require('istanbul');\n\nlet collector = new istanbul.Collector();\nlet reporter = new istanbul.Reporter();\n\nlet remappedJ... | javascript | edit | 0 | 2 | mit | 897bd31686a07c943d37b931b641df18bb211a4a | caleb531/connect-four | coverage-report.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n// Generate an HTML coverage report from a sourcemap-remapped JSON one.\n\n'use strict';\n\nvar istanbul = require('istanbul');\n\nvar collector = new istanbul.Collector();\nvar reporter = new istanbul.Reporter();... | javascript | edit | 0 | 2 | mit | 6e70d57e84f3e61ff9607175b82fed420f1aff38 | caleb531/truthy,caleb531/truthy | coverage-report.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar replaceAll = function( oldToken ) {\n var configs = this;\n return {\n from: function( string ) {\n return {\n to: function( newToken ) {\n var _token;\n var index = -1;\n if ( configs.ign... | javascript | edit | 0 | 4 | mit | 546cc438ea31d00892186421740d9999bf2844bd | FagnerMartinsBrack/str-replace | src/str-replace.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(r) {\n 'use strict';\n\n return {\n allByProject: allByProject\n };\n\n function allByProject() {\n return r.table('access').run().then(function(allAccess) {\n let byProject... | javascript | edit | 0 | 2 | mit | 046d334917f33207d1459c0db5d93564dcfaaf88 | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | backend/server/db/model/access.js | rejected_duplicate | Near-duplicate of sample 84621 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/** Just for testing */\n\nimport Classy from '../dist/Classy';\n\nlet classy = new Classy({\n clientId: 'fbnwFsTgUox9VAPTsHfJXk5KiyScSU',\n clientSecret: 'XlX9sSH0sHHxTVIoBilbxcEYbQrrtLsYhtwNSrwuN0vgID0164xYY',\n baseUrl: 'https://d... | javascript | edit | 0 | 1 | mit | a950f3b78370140f50a21cb9ba9fe322e0705b2c | classy-org/classy-node | test/testModule.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Simple initializer that implements the mutationObserverMixin \n * in all the Components. It uses a flag defined in the app \n * environment for it.\n */\n\nimport Ember from 'ember';\nimport mutationObserver from '../mixins/muta... | javascript | edit | 0 | 4 | mit | 749150a2b9b9f61b50ec1337a86ee55ef29028b0 | zzarcon/ember-cli-Mutation-Observer,zzarcon/ember-cli-Mutation-Observer | addon/initializers/mutation-observer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst\n inquirer = require('inquirer');\n\nconst\n fakeAuthorLs = [\n {\n email: 'jane.doe@example.com',\n name: 'Jane Doe'\n },\n {\n alias: 'Work',\n email: '<EMAI... | javascript | edit | 0 | 4 | mit | 46cbc3aba7a8c2c289000ffad7fe142b851f3bcb | dannycjones/git-chauthor | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport { red } from 'chalk';\nimport R from 'ramda';\n\ntype Clog = typeof console.log;\ntype GraphQLError = { message: string };\n\n// FIXME: Improve naming\nexport function exitError(clog: Clog, ...errors: Array<string>): ... | javascript | edit | null | null | apache-2.0 | e22df6146c837c71f4968688b1b8d25d4244894e | amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon | cli/src/exit.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nRouter.route('/admin/insei/:insei', {\n template: 'inseisList'\n})\nRouter.route('/insei/:insei', {\n template: 'inseisList'\n})\n\n```\n\nApply this change: Add new route for profile"
},
{
"role": "assistant",
"content": ... | javascript | edit | 0 | 0 | mit | 863a37371898b95c457ec036fded86a106ce9fad | goacademie/fanhui,goacademie/fanhui | packages/slack-inseis/client/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env node */\n\n'use strict'\n\nconst {setSvgConfiguration} = require('ember-frost-core/utils/frost-icon-svg')\n\nmodule.exports = {\n name: 'ember-frost-navigation',\n\n included: function () {\n this.app = this._findHost... | javascript | edit | 0 | 6 | mit | 4bfd04800e5bc77070ea9d7d2d4146179134b4a7 | ciena-frost/ember-frost-navigation,ciena-frost/ember-frost-navigation,ciena-frost/ember-frost-navigation | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * index.js\n * Client entry point.\n *\n * @author Francis Brito <<EMAIL>>\n * @license MIT\n */\n'use strict';\n\n/**\n * Client\n * Provides methods to access PrintHouse's API.\n *\n * @param {String} apiKey API key identifyin... | javascript | edit | 0 | 5 | mit | 2a203656d901d5be3de84c34769ed0c375144b6f | francisbrito/ph-node | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * cssParser Wef plugin\n * Copyright (c) 2011 Pablo Escalada\n * MIT Licensed\n */\n\n//requires: wef.events, console, cssParser\n//exports: cssParser\n//events: onSelector, onProperty\n\n/**\n * The cssParser plugin\n */\n(functi... | javascript | edit | 0 | 1 | mit | 35d809175d33ab9be6980bf46a0fd7123f08696a | diesire/wef,diesire/wef,diesire/wef | plugins/cssParser/src/cssParser.wef.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\nvar nodemailer = require('nodemailer');\n\n// create reusable transporter object using the default SMTP transport\nvar smtp = process.env.SMTPCREDENTIALS || '';\nvar tra... | javascript | edit | 0 | 2 | mit | 075bc4bcc51600f97cc9520ba399a902ebfecf6b | gnomex/spa-form-deliver,gnomex/spa-form-deliver | routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('sgApp')\n .directive('sgSection', ['$rootScope', '$window', '$timeout', function($rootScope, $window, $timeout) {\n return {\n replace: true,\n restrict: 'A',\n templateUrl: 'views/par... | javascript | edit | 0 | 5 | mit | 465dab44153c951c9034a92b71ba4596b4949322 | soulfresh/sc5-styleguide,junaidrsd/sc5-styleguide,jkarttunen/sc5-styleguide,hence-io/sc5-styleguide,hannu/sc5-styleguide,hannu/sc5-styleguide,soulfresh/sc5-styleguide,varya/sc5-styleguide,lewiscowper/sc5-styleguide,varya/sc5-styleguide,jkarttunen/sc5-styleguide,patriziosotgiu/sc5-styleguide,kraftner/sc5-styleguide,ifee... | lib/app/js/directives/section.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Parases a query string into a query object\n */\nDoppelganger.Filters.QueryStringFilter = new Filter('QueryString', function(request){\n\tvar search = request.search,\n\t\tsplitSearch = search.slice(1).split('&'),\n\t\tquery = {... | javascript | edit | 0 | 3 | apache-2.0 | d3fc18a2b66f8007d37bfece5f951a54b143a79a | wwalser/Doppelganger,wwalser/Doppelganger | lib/filters/QueryStringFilter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar addListExpandHandler = function() {\n $('body').on('click', '.a-list *[data-toggle=\"collapse\"]', function() {\n // This script runs before the bootstrap collapse handler, so the collapsed-class will still be\n // present ev... | javascript | edit | 0 | 2 | mit | 60d2ff01ef3bd5240bc50ab15c2f9529a3b2e9e6 | Altinn/DesignSystem,Altinn/DesignSystem | source/js/production/modules/addListExpandHandler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport shallowEqual from 'fbjs/lib/shallowEqual';\nimport {restoreLocation} from './actions';\nimport {stringify} from 'qs';\n\n\nconst updated = callback => {\n let lastQuery;\n let lastPathname;\n\n return ({pathname, query, hash})... | javascript | edit | 0 | 4 | mit | 4f7c74d6905716bb5a80696dace24f549993c479 | nkbt/in-flux,packetloop/component-router,nkbt/in-flux,in-flux/in-flux,in-flux/component-router | src/location.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndb.broadcast.remove();\ndb.broadcast.insert({ \"_id\": 1, \"text\": \"GVM version 0.9.3 \" });\ndb.broadcast.insert({ \"_id\": 2, \"text\": \"In this release: \" });\ndb.broadcast.i... | javascript | edit | 0 | 0 | apache-2.0 | b9fca3c3fd932fb6406324652e7774e394c2457f | skpal/sdkman-cli,shanman190/sdkman-cli,jbovet/gvm,nobeans/gvm-cli,GsusRecovery/sdkman-cli,GsusRecovery/sdkman-cli,dsyer/gvm,gvmtool/gvm-cli,sdkman/sdkman-cli,nobeans/gvm-cli,DealerDotCom/gvm-cli,dsyer/gvm,DealerDotCom/gvm-cli,skpal/sdkman-cli,busches/gvm-cli | db/0930_release.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst urls = require('../../../../../lib/urls')\n\nconst renderReferralHelp = ({ params: { referralId } }, res) => {\n const {\n company: { name: companyName, id },\n } = res.locals\n\n res\n .breadcrumb(companyName, urls.compa... | javascript | edit | 0 | 1 | mit | ec2cac259793109508e5cfa7b39b62367f6ce872 | uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend | src/apps/companies/apps/referrals/help/controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* globals module */\n\nmodule.exports = {\n afterInstall: function() {\n var self = this;\n\n return this.addBowerPackageToProject( 'bootstrap-datepicker' )\n .then( function() {\n return self... | javascript | edit | 0 | 1 | mit | 98f59733af1f34480216639dbfb9206dd33798f0 | juwara0/sl-ember-components,theoshu/sl-ember-components,theoshu/sl-ember-components,Suven/sl-ember-components,notmessenger/sl-ember-components,notmessenger/sl-ember-components,softlayer/sl-ember-components,softlayer/sl-ember-components,erangeles/sl-ember-components,alxyuu/sl-ember-components,SpikedKira/sl-ember-compone... | blueprints/sl-components/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add fixtures to main tests"
},
{
"role": "assistant",
"content": "steal(\"./fixture/fixture_test.js\",\n\t\"./object/object_test.js\",\n\t\"./string/string_test.js\")"
}
] | javascript | new_file | 0 | 0 | mit | 560b233adb18679a617dd9bc7334f59ad5825cb5 | janza/canjs,thomblake/canjs,scorphus/canjs,WearyMonkey/canjs,ackl/canjs,mindscratch/canjs,Psykoral/canjs,thecountofzero/canjs,cohuman/canjs,rjgotten/canjs,ackl/canjs,dimaf/canjs,rasjani/canjs,airhadoken/canjs,sporto/canjs,bitovi/canjs,tracer99/canjs,azazel75/canjs,WearyMonkey/canjs,scorphus/canjs,gsmeets/canjs,Psykoral... | util/util_test.js | rejected_duplicate | Near-duplicate of sample 75482 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// // Place all the behaviors and hooks related to the matching controller here.\n// // All this logic will automatically be available in application.js.\nvar ready = function() {\n $(\".reply-button\").hide();\n\n $(\".reply-content\... | javascript | edit | 0 | 4 | mit | 4cfc244e74d208fdc9f92e903164031132084082 | calblueprint/ashby-village,calblueprint/ashby-village,calblueprint/ashby-village | app/assets/javascripts/replies.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express')\nvar expressValidator = require('express-validator')\nvar passport = require('./passport.js');\n\nmodule.exports = (function(){\n function configure(app) {\n app.use(express.static(__dirname + '/publ... | javascript | edit | 0 | 1 | isc | 53593511d70e0e84ac01fa0daca2496566afc500 | xdv/gatewayd,whotooktwarden/gatewayd,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd,xdv/gatewayd,zealord/gatewayd,zealord/gatewayd | config/initializers/middleware.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nApp.ObjectPanel = Ext.extend(Ext.Panel, {\n\tborder: false\n\t,iconCls: 'icon-tab-object'\n\t,closable: true\n\t,layout: 'vbox'\n\t,initComponent: function(){\n\t\tthis.items = [\n\t\t\t{border:true,margins:\"5 5 5 5\",frame:true,layout... | javascript | edit | 0 | 1 | mit | 60fc668df8dd00a14f86f6cc6b411cfb7739ece5 | paparent/FluidDB-Explorer,paparent/FluidDB-Explorer | static/js/App.ObjectPanel.js | rejected_duplicate | Near-duplicate of sample 85559 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n authToken: process.env.AUTH_TOKEN || 'secret',\n env: process.env.NODE_ENV,\n flickr: {\n key: process.env.FLICKR_KEY || '123abc',\n secret: process.env.FLICKR_SECRET || 'secret',\n userId: process.env.F... | javascript | edit | 0 | 0 | mit | 9fba38cc368e119246adec5167a5bf76b284f91b | franvarney/franvarney-api | config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Component from '@ember/component';\nimport { action } from '@ember/object';\nimport { later } from '@ember/runloop';\n\nexport default class CrateTomlCopy extends Component {\n tagName = '';\n\n showSuccess = false;\n showNoti... | javascript | edit | 0 | 1 | apache-2.0 | db2632449384cab4ae2a8d86858d4b9020858152 | rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io | app/components/crate-toml-copy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst initialState = {\n city: '',\n id: '',\n boundary: '',\n};\n\nconst currentLocation = (state = initialState, action) => {\n switch (action.type) {\n case 'UPDATE_CURRENT_LOCATION':\n return Object.assign({}, state, {\n... | javascript | edit | 0 | 2 | mit | c833e1ed0be6272472a1d9c79ef520ff8587026a | theredspoon/trip-raptor,Tropical-Raptor/trip-raptor | src/client/scripts/reducers/location_reducer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\n\nmodule.exports = {\n entry: ['core-js/fn/array/from', path.resolve(__dirname, 'src/index.js')],\n output: {\n path: path.resolve(__dirname, 'dist'),\n libraryTarget: 'umd',\n library: 'feather... | javascript | edit | 0 | 0 | mit | d5ba74d93b9dcedd653a2942aec109d47e388551 | colebemis/feather,colebemis/feather | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar Server = require(\"../server\");\n\nexports.testMissingBasicHeader = function (test) {\n\tvar parser = Server.prototype._basicAuthentication({\n\t\t\"headers\": {}\n\t});\n\tparser().fail(function (err) {\n\t\ttes... | javascript | edit | 0 | 1 | isc | f85af3a4e559eabe33d4750b6bab950f278e221c | whymarrh/mattress | tests/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.addEventListener(\"load\", () => {\n const SUPPORTED_TYPES = [\"Files\", \"application/x-moz-file\"];\n\n let body = document.getElementsByTagName(\"body\")[0];\n\n body.addEventListener(\"dragover\", (ev) => {\n if(SUPPORT... | javascript | edit | 0 | 4 | mit | db6dc35d531a4a73aa5830f6cb52584afb92e627 | thecoshman/http,thecoshman/http,thecoshman/http,thecoshman/http | assets/drag_drop.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Main application class of \"QxMaterialDemo\".\n */\nqx.Class.define(\"qxmaterialdemo.Application\", {\n extend: qxm.Application,\n // extend: qxm.application.Standalone,\n members: {\n /**\n * This method... | javascript | edit | 0 | 2 | mit | 9c53fa0da8e16cef2bdfa9ecccb97e5e954120d3 | Estandarte/QxMaterialDemo,Estandarte/QxMaterialDemo,Estandarte/QxMaterialDemo | source/class/qxmaterialdemo/Application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst { Dialect } = require('../dialect');\nconst MysqlSchemaInspector = require('./schema-inspector');\n\nclass MysqlDialect extends Dialect {\n constructor(db) {\n super(db);\n\n this.schemaInspector = new Mysq... | javascript | edit | 0 | 8 | mit | 92dde65e7042047ee33bda3512676ef37116d334 | wistityhq/strapi,wistityhq/strapi | packages/core/database/lib/dialects/mysql/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar isDbjsKind = require('./is-dbjs-kind');\n\nmodule.exports = function (value) {\n\tif (isDbjsKind(value)) return value;\n\tthrow new TypeError(value + \" is not dbjs object\");\n};\n\n```\n\nApply this change: Fix er... | javascript | edit | 0 | 2 | mit | 4353bac987b869be618bf783a3476dbc2031a75a | medikoo/dbjs | valid-dbjs-kind.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function linkLayerTooltip (layerDef, visMap) {\n if (!layerDef.tooltipModel) return;\n\n function onChange (tooltipModel) {\n var attrs = JSON.parse(JSON.stringify(tooltipModel.attributes));\n\n visMap.getLayerB... | javascript | edit | 0 | 3 | bsd-3-clause | dcbbd4d4e3fae10f0f00bd6bf3f0f6d09f6bd57c | splashblot/dronedb,splashblot/dronedb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb | lib/assets/javascripts/cartodb3/deep-insights-integration/link-layer-tooltip.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar webfs = require('web-fs');\n\n// instantiate an instance, because web-fs doesn't, but fs does\nvar fs = webfs();\n\nfs.statSync = function(file) {\n return {\n isFile: function() { return false; },\n isFIFO: function() { retu... | javascript | edit | 0 | 1 | mit | 6d0b00640542282e8f2094c5e7eb56753726cc5b | deathcap/webnpm,deathcap/webnpm | create-webfs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst enpoint = 'https://api.github.com/emojis';\nconst delimiterRegex = /(\\:[\\w\\-\\+]+\\:)/g;\nlet emojis = null;\n\nexport function load() {\n return new Promise((resolve) => {\n if (emojis) return resolve(emojis);\n\n retur... | javascript | edit | 0 | 2 | mit | 454e65c4a604d9251d607d0cc7e24f00864bb311 | zzarcon/gh-emoji | gh-emoji.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env mocha */\nimport expect from 'expect'\nimport React from 'react'\nimport TestUtils from 'react-addons-test-utils'\nimport ReactDOM from 'react-dom'\nimport { IntlProvider } from 'react-intl'\nimport Genres from '../../src/... | javascript | edit | 0 | 1 | mit | 22f3b22d5b08ee56f8b2966d3c939f48dff3a43f | digibib/ls.ext,digibib/ls.ext,digibib/ls.ext,digibib/ls.ext | redef/patron-client/test/components/Genres.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('workspaceApp').controller('MainCtrl', ['$scope', 'Wish', 'Offer' , function ($scope, Wish, Offer) {\n $scope.wish = new Wish();\n $scope.errors = {};\n\n $scope.addWish = function(form) {\n $scope.... | javascript | edit | 0 | 2 | mit | 02771cf286eac88ff2038a759301f03f4ae2b7cb | santail/diilid.ee-public,santail/diilid.ee-public,santail/diilid.ee-public | client/app/main/main.controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst filesInDirectory = dir => new Promise (resolve =>\n\n dir.createReader ().readEntries (entries =>\n\n Promise.all (entries.filter (e => e.name[0] !== '.').map (e =>\n\n e.isDirectory\n ? filesIn... | javascript | edit | 0 | 3 | unlicense | 354b5e2a511a3adf5861655ba56de44ea11aa59d | xpl/crx-hotreload | hot-reload.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Fix the base URLs to point at the static folder"
},
{
"role": "assistant",
"content": "// Change this constant to move the tests to your own server.\nvar CROSS_ORIGIN_BASE_URL = \"http://browserscope.spoofguard.org/security/s... | javascript | new_file | 0 | 0 | apache-2.0 | 3bd39a2dc7d3d4087cc0825317fcb0d10427fef0 | elsigh/browserscope,elsigh/browserscope,elsigh/browserscope,elsigh/browserscope | categories/security/static/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Utility to determine is an argument value corresponds\n * to a known command name (alias).\n *\n * @param cmd The argument string.\n * @param commands The list of known commands.\n */\nmodule.exports = function getCommandByN... | javascript | edit | 0 | 8 | mit | 30a350a74476d41dff4446cc8f29ec06dbf32ba5 | freeformsystems/cli-define,cli-kit/cli-define | lib/get-command-by-name.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport assert from 'assert';\n\nexport default mutation => {\n const { name, ...patch } = mutation;\n\n if (typeof name === 'string') {\n assert(name.length <= 32, 'Name must be 32 characters or less');\n\n Object.assign(patch, ... | javascript | edit | 0 | 2 | mit | bf253c8a256a905ee7478d3c41ade2e6fb5024b3 | PsychoLlama/filament,PsychoLlama/filament | src/utils/light-attributes-mutation.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction receiveMessage(event) {\n\tvar commentPath,\n\t\tiframeURL;\n\n\t// get url of comment\n\tcommentPath = event.data.commentURL;\n\tiframeURL \t= \"https://news.ycombinator.com/\" + commentPath;\n}\n\nvar drawIframe = function( U... | javascript | edit | 0 | 2 | mit | c601837b932a4fd4c156d93b6b9b249ef7ca0617 | tonyonodi/reddit-comments,tonyonodi/back-to-the-comments,tonyonodi/reddit-comments,tonyonodi/back-to-the-comments | inject.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe(\"demo page\",\r\n{\r\n given: loadPage(\"/demo/index.htm\"),\r\n when: [\r\n input({ \"#name\": \"John\" }),\r\n click(\"#hello\")\r\n ],\r\n then: {\r\n \"#message\": should.haveText(\"Hello,... | javascript | edit | 0 | 1 | bsd-2-clause | a80cd9fe7928ffea5e54453c710196b283fd7afd | andrewdavey/witness,andrewdavey/witness,andrewdavey/witness | src/Witness/demo/specs/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nFlame.CollectionView = Ember.CollectionView.extend(Flame.LayoutSupport, Flame.EventManager, {\n classNames: ['flame-list-view'],\n\n init: function() {\n this._super();\n var emptyViewClass = this.get('emptyView');\... | javascript | edit | 0 | 2 | mit | bf11e0213519f8f93baf9b11829e94a02ca12fba | massive/flame.js,massive/flame.js,renotoaster/flame.js,mattijauhiainen/flame.js,lalnuo/flame.js,lalnuo/flame.js,mattijauhiainen/flame.js,renotoaster/flame.js,flamejs/flame.js,lalnuo/flame.js | views/collection_view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar assert = require('chai').assert;\nvar Trader = require('../../lib/trader.js');\nvar PostgresqlInterface = require('../../lib/protocol/db/postgresql_interface.js');\n\nvar db = 'psql://lamassu:lamassu@localhost/lamas... | javascript | edit | 0 | 1 | unlicense | 06242fe78a266054de9b74d0f08d50bf429d7e53 | naconner/lamassu-server,naconner/lamassu-server,joshmh/lamassu-server,lamassu/lamassu-server,naconner/lamassu-server,joshmh/lamassu-server,joshmh/lamassu-server,lamassu/lamassu-server,evan82/lamassu-server,joshmh/lamassu-server,lamassu/lamassu-server | test/unit/traderApiTest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint undef: true, unused: true */\n/* globals console:false, CloudOS:false */\n/* globals console, setTimeout, CloudOS, Fuse */\n\n(function($)\n{\n // Handlebar templates compiled at load time to create functions\n // templ... | javascript | edit | 0 | 2 | mit | 683729a5b9853db1ebea6b50a5ab58b4cd2f5be1 | kynetx/Joinfuse,kynetx/Joinfuse | js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\n'use strict';\n\nimport React from 'react';\nimport NativeBaseComponent from '../Base/NativeBaseComponent';\nimport computeProps from '../../Utils/computeProps';\nimport ScrollableTabView from './../vendor/react-native-scro... | javascript | edit | null | null | mit | 9690468ef70c978bafaf1ddc48dec67d0deb69da | GeekyAnts/NativeBase,GeekyAnts/NativeBase,GeekyAnts/NativeBase,sampsasaarela/NativeBase,chaitanya0bhagvan/NativeBase,GeekyAnts/NativeBase,GeekyAnts/NativeBase | Components/Widgets/Tabs.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 MongoClient = require(\"mongodb\").MongoClient;\nconst config = require(\"./config\");\n\nlet singleton = null;\n\nfunction connect() {\n if (singleton) {\n return singleton;\n } else {\n sin... | javascript | edit | 0 | 2 | mit | 3bee567e549992174cff18ed2e39141b92ac6ecc | TeaSeaLancs/train-timeline,TeaSeaLancs/train-timeline | util/mongodb.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport expect from 'expect';\n\nimport isCommand from '../../../../src/cli/commands/helpers/isCommand';\n\ndescribe('cli', () => {\n describe('commands', () => {\n describe('helpers', () => {\n describe('isCommand',... | javascript | edit | 0 | 1 | mit | 5c14d689ea7148cf4a264e7f870f639f7560916d | vgno/roc,vgno/roc-config,rocjs/roc | test/cli/commands/helpers/isCommand.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * External dependencies\n */\nimport gulp from 'gulp';\nimport del from 'del';\n\ngulp.task( 'copy', () => {\n\tdel.sync( [ './release/**/*' ] );\n\n\tgulp.src(\n\t\t[\n\t\t\t'readme.txt',\n\t\t\t'google-site-kit.php',\n\t\t\t'dis... | javascript | edit | 0 | 1 | apache-2.0 | 44ae15fe9b28cf9f8d5d3a67b5fdf72f53325dce | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | gulp-tasks/copy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar _ = require('underscore')\n, proxy = require(__dirname + '/src/proxy')\n, callbackHandler = require(__dirname + '/src/callbackHandler')\n, core = require(__dirname + '/src/core')\n, hashcore = require(__dirname + '/src/hash-core')... | javascript | edit | 0 | 0 | mit | 454ff3dc32bc1ef3cc3f641f99f6ba76dc46738d | plediii/venacava | venacava.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\n uglify=require('gulp-uglify'),\n sass=require('sass')\n ;\n\n//Scripts task\n//Uglifies.\ngulp.task('scripts', function(){\n gulp.src('src/*.js')\n .pipe(uglify())\n .pipe(gulp.dest('build... | javascript | edit | 0 | 1 | mit | c9c2fe5796e17776897f8f395c73def0f678e6b3 | andela-pbirir/inverted-index,andela-pbirir/inverted-index | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport TestUtils from 'react/lib/ReactTestUtils';\nimport { Menu } from './menu';\n\ndescribe('Menu', () => {\n let instance;\n\n beforeEach(() => {\n instance = TestUtils.renderIntoDocument(\n <Men... | javascript | edit | 0 | 1 | apache-2.0 | 2471eb3f937de86a7070b375fa2bb20546d09a53 | Sage/carbon,Sage/carbon,Sage/carbon | src/components/menu/__spec__.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nCenterScout.config(function($routeProvider) {\n $routeProvider.when('/', {\n controller: 'HomeController',\n templateUrl: 'views/home.html'\n });\n\n $routeProvider.when('/home', {\n controller: 'HomeContro... | javascript | edit | 0 | 1 | mit | b4504960451ba1a63a9ea29dbb2e6b9ea9ae559f | LFHS/CenterScout | web/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport * as React from 'react';\nimport { Row, Col } from 'react-bootstrap';\nimport Box from '../../../components/box';\n\nclass Files extends React.PureComponent<any, any> {\n constructor() {\n super();\n (this: any).... | javascript | edit | null | null | mit | 117f7883c090623b4268c579e4debd270c5d3ba5 | CodeForCharlotte/CMPD-Holiday-Gift,CodeForCharlotte/cmpd-holiday-gift-backend,CodeForCharlotte/CMPD-Holiday-Gift,CodeForCharlotte/cmpd-holiday-gift-backend,CodeForCharlotte/CMPD-Holiday-Gift,CodeForCharlotte/cmpd-holiday-gift-backend,CodeForCharlotte/CMPD-Holiday-Gift | react-ui/src/app/dashboard/household/components/form/files.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar d = require('d')\n , setPrototypeOf = require('es5-ext/object/set-prototype-of')\n , Set = require('es6-set/polyfill')\n\n , PlainSet;\n\nmodule.exports = PlainSet = function (/*iterable*/... | javascript | edit | 0 | 1 | mit | 43446a3760b0cd844ca9885e08c595ecdaf2417e | medikoo/dbjs | plain-set.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n $('button#boot').click(function() {\n var l = Ladda.create( document.querySelector( '#boot' ) );\n l.start();\n $.get('/performActions.php?theAction=boot', function(data) {\n l.stop();\n ... | javascript | edit | 0 | 1 | mit | 782a50fbc154193ed8b2956f277714531bab2edb | tlongren/vps-status,MinFu/vps-status,tlongren/vps-status,MinFu/vps-status | js/actions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Auth utils\n */\nvar bcrypt = require('bcrypt');\nvar crypto = require(\"crypto\");\n\nfunction generateAuthorization(appid, appsecret) {\n var d = new Date().toUTCString();\n var signature = generateHmac(d, appsecret);\n ret... | javascript | edit | 0 | 3 | mit | e6cdbf64e6accf39282a5a7ae11db80b113406af | tes/seguir,cliftonc/seguir,gajjargaurav/seguir | api/auth/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport HeadMetaTags from '../../components/headMetaTags';\n\nclass DiseasePage extends Component {\n render() {\n const title = this.props.params.diseaseId;\n return (\n <div classN... | javascript | edit | 0 | 1 | mit | 5c163847f558bd4082b61529accfc605ecb026b0 | alliance-genome/agr,alliance-genome/agr,alliance-genome/agr,alliance-genome/agr | webapp/src/containers/diseasePage/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add event listener for start button Add a click event listener to the start button that displays a countdown when the start button is clicked"
},
{
"role": "assistant",
"content": "// Back-end\n\n// Front-end\n$(document).rea... | javascript | new_file | 0 | 2 | mit | 00b5a0ea75342c9dfbcf7b498db0101bc18299b3 | jonnygovish/Bubble-Blaster-Game,jonnygovish/Bubble-Blaster-Game | js/scripts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/* global module, require */\n\nvar customMedia = require(\"postcss-custom-media\");\nvar nested = require('postcss-nested');\nvar autoprefixer = require('autoprefixer');\nvar extend = require('deep-extend');\n\nmodule.... | javascript | edit | 0 | 1 | apache-2.0 | 1c3598a27c59ebe4adf226643c6ee0335b4f8005 | bquarks/polygulp,eduardosainz/polygulp | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// JS and CSS bundles\n//\n//= link application.js\n//= link application.css\n//= link_tree ../images\n//= link_tree ../html\n\n```\n\nApply this change: Fix compiling static error pages"
},
{
"role": "assistant",
"content":... | javascript | edit | 0 | 0 | isc | 30cbe1778a2b10011b8f7bdf18be2f8804de9afc | nanaya/moebooru,moebooru/moebooru,nanaya/moebooru,moebooru/moebooru,moebooru/moebooru,moebooru/moebooru,nanaya/moebooru,nanaya/moebooru,nanaya/moebooru,moebooru/moebooru | app/assets/config/manifest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar queue = [];\nvar loaded = document.readyState === \"loaded\" ||\n document.readyState == \"complete\";\n\nvar ready = function() {\n loaded = true;\n while (queue.length)\n (queue.shift())();\n};\n\nif (document.addEventListen... | javascript | edit | 0 | 6 | mit | 1902bcf88568e033371d3958f045a119548524ac | dfischer/meteor,ndarilek/meteor,colinligertwood/meteor,justintung/meteor,TribeMedia/meteor,namho102/meteor,saisai/meteor,Quicksteve/meteor,mauricionr/meteor,bhargav175/meteor,judsonbsilva/meteor,ljack/meteor,pjump/meteor,Puena/meteor,luohuazju/meteor,kidaa/meteor,benjamn/meteor,aramk/meteor,saisai/meteor,kengchau/meteo... | packages/meteor/startup_client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n// JSM exported symbols\nvar EXPORTED_SYMBOLS = [\"GM_notification\"];\n\nconst alertsServ = Components.classes[\"@mozilla.org/alerts-service;1\"]\n .getService(Components.interfaces.nsIAlertsService);\n\nfunction GM_notification(a... | javascript | edit | 0 | 4 | bsd-3-clause | 4f0f4cb15537f6a57cd3d3c35531749643521ab6 | HasClass0/greasemonkey,Ventero/greasemonkey,HasClass0/greasemonkey,Ventero/greasemonkey,Martii/greasemonkey,Martii/greasemonkey,the8472/greasemonkey,the8472/greasemonkey | modules/GM_notification.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Vue from 'vue'\nimport Router from 'vue-router'\nimport Resource from 'vue-resource'\nimport Home from '../views/Home'\n\nVue.use(Router)\nVue.use(Resource)\n\nexport default new Router({\n mode: 'history',\n routes: [\n {\n... | javascript | edit | 0 | 1 | mit | 59e6b6591eed0e1f9c7018c5d983ee6b7639ea46 | wopian/hibari,wopian/hibari | client/router/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar through2 = require('through2');\n\nfunction featureCodeToLayer(featureCode) {\n switch (featureCode) {\n case 'PCLI':\n return 'country';\n case 'ADM1':\n return 'region';\n case 'ADM2':\n ... | javascript | edit | 0 | 18 | mit | 8a97f17055a7fc42c1c9b8c2b8a51fe6d3aa901f | pelias/geonames,pelias/geonames | lib/streams/layerMappingStream.js | rejected_complexity | Cyclomatic complexity too high: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n// Requiring collections-online and loading configuration\nconst co = require('./collections-online');\nco.config(__dirname);\n// Register collections-online plugins\nrequire('./plugins').register();\n\n// This registers ... | javascript | edit | 0 | 0 | mit | dcd51a1c6167b98201efbe86d65cfc3563c174fa | CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder | indexing.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Meteor } from 'meteor/meteor';\nimport { Template } from 'meteor/templating';\n\nimport './receipts.html';\n\nMeteor.subscribe('donations');\nMeteor.subscribe('purchases');\n\nTemplate.receiptsList.helpers({\n donations: () =>... | javascript | edit | 0 | 3 | mit | 62e46e9f9ea57818b8e0220a7725170b12ac4694 | enove/NoSLB,enove/Thriver,enove/NoSLB,enove/Thriver | views/accounts/receipts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar config = require('./config/config_server');\nvar fs = require('fs');\n\n// external libraries\nvar winston = require('winston');\n\nfs.mkdirSync('./logs');\n\nvar logger = new (winston.Logger)({\n transports: [\n new (winston.tr... | javascript | edit | 0 | 0 | mit | 5ecdc31a482c93405d3eb17b44e66d7fb610af21 | ptmccarthy/nodechat | logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * The Turnpike router.\n */\nvar Routes = require('routes');\n\nRouter = {};\n\nRouter.routes = function(routes) {\n delete Router.router;\n Router.router = Routes();\n\n Router.router.addRoute('/', \"Index\");\n\n for (var ro... | javascript | edit | 0 | 3 | mit | e137476232fc1cf8807d077b119e66bfb9c1a94a | jay-depot/turnpike,jay-depot/turnpike | lib/Router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar Brick = function(x, y){\n this.x = x || 50,\n this.y = y || 50,\n this.height = 20,\n this.width = 80,\n this.colour = \"blue\"\n}\n\n```\n\nApply this change: Remove Brick Draw function from game js file, place in Brick js"
... | javascript | edit | 0 | 3 | mit | 2e46fd8f84ae739bfa87377b8332fb7e4740ae8a | theomarkkuspaul/Brick-Breaker,theomarkkuspaul/Brick-Breaker | js/brick.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nvar toArray = require('stream-to-array')\nvar Promise = require('bluebird')\n\nmodule.exports = streamToPromise\n\nfunction streamToPromise (stream) {\n var promise\n if (stream.readable) {\n promise = fromReadable(... | javascript | edit | 0 | 3 | mit | 7c341ae2ea8b9bc0fbe577bfd03c82e374c25c9d | bendrucker/stream-to-promise | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// #TODO: change the whole `fieldspec` thing to just operate on the schema in place?\n// #TODO: clean up the Base.Schema methods\n// #TODO: chainable inserts and updates\n\nvar _ = require('underscore')\nrequire('./ext-underscore.js');\... | javascript | edit | 0 | 2 | mit | 21424c5b69495a3424e22109ed028be1582c01f4 | brianloveswords/gogo,brianloveswords/gogo | lib/hyde.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst axios = require('axios')\nconst createHistory = require('history').createBrowserHistory\nconst { buildQueryString } = require('../../../src/lib/url-helpers')\n\nconst history = createHistory()\n\nhistory.listen((location, action) ... | javascript | edit | 0 | 3 | mit | 6ef63c3ca51290262c5427d24644ba2ada260c3a | uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2 | assets/javascripts/lib/xhr.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar gulp = require('./parent-gulp');\nvar del = require('del');\n\nvar defineTask = require('./define-task');\nrequire('./browserify-compile');\nrequire('./serve');\nrequire('./styles');\nrequire('./testing')... | javascript | edit | 0 | 1 | mit | 9ac1b3cf0fd54ef9820c6100c0f2d02343c2ba9d | EvidentSolutions/evident-gulp-build | lib/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n\n// internal\nvar mixin = require('./mincer/common').mixin;\nvar prop = require('./mincer/common').prop;\n\n\nmodule.exports = {\n VERSION: '0.0.0',\n\n EngineTemplate: require('./mincer/engine_template'),\n ... | javascript | edit | 0 | 0 | mit | 3d9b8ad0d7fccb90ab6015b2ee6c5820266329a5 | mcanthony/mincer,inukshuk/mincer,rhyzx/mincer,nodeca/mincer | lib/mincer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gonzales = require('gonzales-pe');\nvar linters = [\n require('./linters/space_before_brace')\n];\n\nexports.lint = function (data, path, config) {\n var ast = this.parseAST(data);\n var result = [];\n\n ... | javascript | edit | 0 | 2 | mit | 896f05b7316b861f68c2e40e7640ec9b92e92023 | lesshint/lesshint,JoshuaKGoldberg/lesshint,runarberg/lesshint,gilt/lesshint | lib/linter.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.