messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport View from '../View';\nimport HeaderAnalysesView from './HeaderAnalysesView';\nimport HeaderUserView from './HeaderUserView';\nimport HeaderImageView from './HeaderImageView';\nimport router from '../../router';\nimport events fro... | javascript | edit | 0 | 1 | apache-2.0 | 57c67f110ddbfcc17ae6ab83170018bd778c0062 | DigitalSlideArchive/HistomicsTK,DigitalSlideArchive/HistomicsTK | web_client/views/layout/HeaderView.js | rejected_duplicate | Near-duplicate of sample 82352 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport const printStyles =\n`<style>\n\tdiv {\n border-radius: 0px !important;\n box-shadow: none !important; }\n\n\t@media print {\n\t @page { margin: 0; }\n\t body { margin: 0 0; }\n\t img {visibility: hidden; }\n\t}\n\n</style>`;\... | javascript | edit | 0 | 0 | mit | adb12ea094d1e4b82d45489ff3bccf84b5a7791f | AndrewTHuang/fear-the-repo,sujaypatel16/fear-the-repo,dont-fear-the-repo/fear-the-repo,dont-fear-the-repo/fear-the-repo,AndrewTHuang/fear-the-repo,sujaypatel16/fear-the-repo | src/styles/PrinterStyles.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// TODO: load based on params\nEmber.keys(requirejs._eak_seen).filter(function(key) {\n return (/\\_test/).test(key);\n}).forEach(function(moduleName) {\n require(moduleName, null, null, true);\n});\n\n```\n\nApply this change: Fix te... | javascript | edit | 0 | 1 | mit | e46fd7eb7d2040145d3aab2fe0e097856c4de20d | tobobo/vice-frontend,mtian/ember-app-kit-azure,stefanpenner/ember-app-kit,digitalplaywright/eak-simple-auth-blog-client,achambers/appkit-hanging-test-example,michaelorionmcmanus/eak-bootstrap,shin1ohno/want-js,grese/miner-app-OLD,grese/miner-app-OLD,lucaspottersky/ember-lab-eak,tomclose/minimal_eak_test_stub_problem,to... | tests/test-loader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nQUnit.config.urlConfig.push({\n id: \"jquery\",\n label: \"jQuery version\",\n value: [\"3.2.1\", \"3.2.0\", \"3.1.1\", \"3.0.0\", \"2.2.4\", \"2.1.4\", \"2.0.3\", \"1.12.4\", \"1.11.3\"],\n tooltip: \"What jQuery Core version to te... | javascript | edit | 0 | 4 | mit | a12ef315f9f8996b7b0a9036f4c82ba168e09c51 | DavyJonesLocker/client_side_validations,DavyJonesLocker/client_side_validations,DavyJonesLocker/client_side_validations | test/javascript/public/test/settings.js | rejected_duplicate | Near-duplicate of sample 100462 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n // Find the parent window, which has its parent set to itself.\n var parentWindow = window;\n while (parentWindow.parent !== parentWindow) {\n parentWindow = parentWindow.parent;\n }\n\n function failFunc(msg) {\... | javascript | edit | 0 | 2 | bsd-3-clause | 514a9f2a5b58adefd596d6551373c48397f12076 | hgl888/mobile-chrome-apps,hgl888/mobile-chrome-apps,xiaoyanit/mobile-chrome-apps,guozanhua/mobile-chrome-apps,liqingzhu/mobile-chrome-apps,MobileChromeApps/mobile-chrome-apps,chirilo/mobile-chrome-apps,hgl888/mobile-chrome-apps,wudkj/mobile-chrome-apps,chirilo/mobile-chrome-apps,xiaoyanit/mobile-chrome-apps,xiaoyanit/m... | chromeapi.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { c } from 'ttag';\nimport PropTypes from 'prop-types';\nimport { Alert, Button, PrimaryButton, Block } from 'react-components';\n\nconst AddressesSection = ({ onRedirect }) => {\n return (\n ... | javascript | edit | 0 | 1 | mit | 217ad8ea81bc57b3bc9830d83b6798bdd11a03e5 | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | packages/components/containers/domains/AddressesSection.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction Events(target){\n var events = {}, i, list, args, A = Array;\n target = target || this\n /**\n * On: listen to events\n */\n target.on = function(type, func, ctx){\n events[type] || (events[type] = [])\n ... | javascript | edit | 0 | 5 | mit | 70ca3912f97118b3f583eca4299114c8ecc67e52 | allouis/minivents,Aestek/minivents,remy/minivents,callpage/minivents,samlin08/minivents,objectliteral/multivents | minivents.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\n\nmodule.exports = {\n 'dev': {\n 'webpack': require(path.join(process.cwd(), 'tasks/config/webpack.js')),\n 'publicPath': '/public/',\n 'keepalive': true,\n 'port': 3000,\n 'hot': true,\n ... | javascript | edit | 0 | 0 | mit | 76a39b70604d5f5fd31c4bc3c878204026a1c05a | msikma/react-hot-boilerplate,msikma/react-hot-boilerplate | tasks/webpack-dev-server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ntry {\n window;\n} catch(e) {\n var utility = require('./../game/utility');\n}\n\nfunction Wall(start_x, start_y, end_x, end_y) {\n this.start_x = start_x;\n this.start_y = start_y;\n this.end_x = end_x;\n this.end_y = end_y\n}\n\... | javascript | edit | 0 | 1 | apache-2.0 | 29c079971ecd241a69ccde5bee41f3a0170ab753 | ninjadev/globalgamejam2016,ninjadev/globalgamejam2016 | game/Wall.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function($){\n\t$.entwine('userswitcher', function($){\n\n\t\t$('form.userswitcher select').entwine({\n\t\t\tonchange : function(){\n\t\t\t\tthis.parents('form:first').submit();\n\t\t\t}\n\t\t});\n\n\t\t$('form.userswitcher .Actions').... | javascript | edit | 0 | 2 | bsd-3-clause | f72ab3d284c2b751263de3847c0b908e86d156bc | sheadawson/silverstripe-userswitcher,sheadawson/silverstripe-userswitcher | javascript/userswitcher.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Comments, Posts } from 'meteor/example-forum';\n\n\n// Recent Comments query index\\\nComments._ensureIndex({'postedAt': -1, '_id': -1});\n\n// Top Posts query index\nPosts._ensureIndex({'status': -1, 'draft': -1, 'isFuture': -... | javascript | edit | 0 | 0 | mit | b0948a2a74242a7b37cbf08880e5fb979d8e85c3 | Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2 | packages/lesswrong/lib/modules/indexes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport { string, oneOfType, arrayOf, node } from 'prop-types'\nimport { Helmet } from 'react-helmet'\n\nimport pick from '../utils/pick'\nimport commonPropTypes from './commonPropTypes'\n\nclass... | javascript | edit | 0 | 1 | mit | 8228b123661c6dedf988fe6d5ac2be247f7a6a9f | verkstedt/react-amp-components | src/components/Sidebar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar pg = require('pg')\n , Transaction = require('any-db').Transaction\n , pgNative = null\n\ntry { pgNative = pg.native } catch (__e) {}\n\nexports.forceJS = false\n\nexports.createConnection = function (opts, callback) {\n\tvar back... | javascript | edit | 0 | 3 | mit | 1bd478df6fe6a2a43871d6914a9cc197353a6a06 | grncdr/node-any-db,MignonCornet/node-any-db | any-db-postgres/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport BackgroundImage from 'ember-cli-image/components/background-image';\nimport ImageContainer from 'ember-cli-image/components/image-container';\nimport XImg from 'ember-cli-image/components/x-img';\n\nimport ImgixMixin from 'ember-... | javascript | edit | 0 | 1 | mit | c0b947f1a4cd59045092ee37a4952c015c7b9418 | bustlelabs/ember-cli-image-imgix,bustlelabs/ember-cli-image-imgix | app/initializers/image-imgix.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { Router, Route, hashHistory, IndexRoute } from 'react-router'\n\nimport App from './App'\nimport Home from './Home'\nimport NewGameContainer from './containers/NewGameContainer'\nimport Games from './G... | javascript | edit | 0 | 0 | mit | 686f957171786496adae8426e2112b8e7201acc8 | georgeF105/handball-scoring,georgeF105/handball-scoring | app/components/routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n var $explorer = $('#explorer');\n\n $('.nav-main .submenu-trigger').on('click', function() {\n if ($(this).closest('li').find('.nav-submenu').length) {\n\n // Close other active submenus first, i... | javascript | edit | 0 | 4 | bsd-3-clause | e73c97463f71717a42ed2f13d02e2ef42c071267 | rsalmaso/wagtail,rsalmaso/wagtail,FlipperPA/wagtail,mixxorz/wagtail,takeflight/wagtail,FlipperPA/wagtail,nimasmi/wagtail,jnns/wagtail,FlipperPA/wagtail,gasman/wagtail,takeflight/wagtail,mikedingjan/wagtail,nimasmi/wagtail,zerolab/wagtail,wagtail/wagtail,kaedroho/wagtail,zerolab/wagtail,takeflight/wagtail,kaedroho/wagta... | wagtail/wagtailadmin/static_src/wagtailadmin/js/submenu.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { createStore, applyMiddleware, compose } from 'redux';\nimport thunk from 'redux-thunk';\nimport invariant from 'redux-immutable-state-invariant';\nimport devTools from 'remote-redux-devtools';\nimport reducer from '../reducers'... | javascript | edit | 0 | 2 | mit | 7f1f44bd33cb95a5b891abec74682c75c7b9c37e | zalmoxisus/redux-remote-monitor,zalmoxisus/remote-redux-devtools | examples/counter/store/configureStore.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Q = {};\n\n/**\n * @constructor\n */\nfunction QDeferred () {};\n\nQDeferred.prototype.reject = function (args) {};\n\nQDeferred.prototype.resolve = function (args) {};\n\n/**\n * @type {string}\n */\nQDeferred.prototype.state;\n\n/... | javascript | edit | 0 | 1 | mit | 89bb5bd242b1208e4775f93ef9ce82171196b07e | lgeorgieff/nbuild,lgeorgieff/ccbuild | tools/closure_compiler_externs/q.js | rejected_duplicate | Near-duplicate of sample 79070 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Backbone = require('backbone');\nvar BusinessModel = Backbone.Model.extend({\n\tparse: function(data) {\n this.name = data.name;\n this.address = data.location.display_address.join(' ');\n this.rating = dat... | javascript | edit | 0 | 1 | mit | 5b21df123a996655337bbf83c95a3cdca6a8c201 | Localhost3000/along-the-way | app/js/models/business-model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet express = require('express'),\n\tbodyParser = require('body-parser'),\n\tmorgan = require('morgan'),\n\tmustacheExpress = require('mustache-express'),\n\n\tpath = require('path'),\n\n\tdb = require('./lib/db');\n\n// load configurat... | javascript | edit | 0 | 2 | bsd-3-clause | e68b3527d220cfad180273453f7d90ffadf41e36 | gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2 | web/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport TreeView from './TreeView';\nimport TreeDialog from './TreeDialog';\n\nexport {\n TreeView,\n TreeDialog\n};\n\n```\n\nApply this change: Add all views to the plugin namespace"
},
{
"role": "assistant",
"content... | javascript | edit | 0 | 0 | apache-2.0 | 22c9e0ab626f0954a23093ec71ea98ea33d139d1 | jbeezley/girder,jbeezley/girder,manthey/girder,Kitware/girder,data-exp-lab/girder,Xarthisius/girder,Xarthisius/girder,kotfic/girder,RafaelPalomar/girder,jbeezley/girder,manthey/girder,girder/girder,girder/girder,RafaelPalomar/girder,jbeezley/girder,data-exp-lab/girder,Xarthisius/girder,data-exp-lab/girder,Kitware/girde... | plugins/treeview/web_client/views/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (root, factory) {\n if(typeof define === 'function' && define.amd) {\n define(['knockout'], factory);\n } else {\n factory(root.ko);\n }\n}(this, function(ko) {\n ko.bindingHandlers.bindHtml = {\n update: function... | javascript | edit | 0 | 3 | mit | 8823993762c66303ac6bebbf0ed4899b3bd1eae2 | calvinwoo/knockout-bind-html | knockout-bind-html.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path'),\n ProjectType = require('./ProjectType');\n\nmodule.exports = projectType => {\n projectType = projectType || ProjectType.FRONTEND;\n return {\n \"projectType\": projectType,\n \"port... | javascript | edit | 0 | 3 | mit | f45dac5a23e23e3120e63e42b777ec971844d55a | mtfranchetto/smild,mtfranchetto/smild,mtfranchetto/smild | lib/DefaultOptions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global define */\n\ndefine([\n 'jquery',\n 'underscore',\n 'backbone',\n 'marionette',\n 'dust',\n 'dust.helpers',\n 'dust.marionette',\n 'views/replyable-view',\n 'controllers/navigation/navigator',\n 'content/comments/com... | javascript | edit | 0 | 1 | mit | 092ec9f8f375233572f207059c537b4dbb397d49 | B3ST/B3,B3ST/B3,B3ST/B3 | app/views/comment-view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function($) {\n\n $.fn.scancode = function(options) {\n var settings = $.extend({\n dataAttr : 'scancode-callback-path'\n }, options);\n\n return this.each(function() {\n $(this).click(function(e) {\n e.preve... | javascript | edit | 0 | 3 | mit | 9c0a7c3d2b0f4de752b2cd8490d2c0a103e03a34 | enriquez/coinpocketapp.com,MrBluePotato/Dogepocket,enriquez/coinpocketapp.com,MrBluePotato/Dogepocket,enriquez/coinpocketapp.com | app/vendor/js/scancode.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Object.extend({\n savedTransition: null,\n isLoggedIn: false,\n currentUser: null,\n\n init: function() {\n this.set('isLoggedIn', localStorage.getItem('isLoggedIn') ... | javascript | edit | 0 | 2 | apache-2.0 | 709f4ff7be7af964ad7c27378d614f7cab5a5895 | mbrubeck/crates.io,mbrubeck/crates.io,rust-lang/crates.io,mbrubeck/crates.io,steveklabnik/crates.io,Susurrus/crates.io,Gankro/crates.io,BlakeWilliams/crates.io,mbrubeck/crates.io,rust-lang/crates.io,steveklabnik/crates.io,Gankro/crates.io,chenxizhang/crates.io,steveklabnik/crates.io,sfackler/crates.io,Gankro/crates.io,... | app/services/session.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Common configuration for webpacker loaded from config/webpacker.yml\n\nconst { join, resolve } = require('path')\nconst { env } = require('process')\nconst { safeLoad } = require('js-yaml')\nconst { readFileSync } = require('fs')\n\n... | javascript | edit | 0 | 3 | mit | 6ccb7706359674578f00a3b06aa310b9d94a9af3 | osu-cascades/ecotone-web,osu-cascades/ecotone-web,osu-cascades/ecotone-web,osu-cascades/ecotone-web | config/webpack/configuration.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash');\nvar base = require('./base');\n\nconst development = _.merge({}, base, {\n env: 'development',\n auth0: {\n callbackURL: 'http://localhost:9000/auth/callback',\n clientID: 'uyTltKDRg1... | javascript | edit | 0 | 0 | mit | b15892304e25b368f293ae5bca7d3a3f354dcbf1 | CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder | config/env/development.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Record as record } from 'immutable';\n\nexport class CardModel extends record({\n id: null,\n name: '',\n mana: null,\n attack: null,\n defense: null,\n}) {\n constructor(obj) {\n super(obj);\n\n // TODO: find a way... | javascript | edit | 0 | 1 | mit | 713ea52be0ee5bcafd7f683d420c28d85fc7b7bf | inooid/react-redux-card-game,inooid/react-redux-card-game | src/redux/modules/card.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport config from '../config/environment';\n\nexport function initialize(application) {\n\n if (Ember.get(config, 'sentry.development') === true) {\n return;\n }\n\n if (!config.sentry) {\n throw ne... | javascript | edit | 0 | 6 | mit | f4d22437eef8e09fe8d71e095ca637a6b0129a95 | dschmidt/ember-cli-sentry,damiencaselli/ember-cli-sentry,damiencaselli/ember-cli-sentry,dschmidt/ember-cli-sentry | app/instance-initializers/raven-setup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * External dependencies\n */\nimport { useMount } from 'react-use';\nimport PropTypes from 'prop-types';\n\n/**\n * Internal dependencies\n */\nimport Data from 'googlesitekit-data';\nimport { CORE_SITE } from '../../googlesitekit... | javascript | edit | 0 | 2 | apache-2.0 | 31fdd792b9a32f2f9c1223240867c5e527f71f04 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | assets/js/components/surveys/SurveyViewTrigger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.initConfig({\n\n jshint: {\n files: ['*.js', 'client/app/*.js', 'server/**/*.js', 'database/**/*.js'],\n options: {\n ignores: [\n // (TODO: add lib files here)\n ... | javascript | edit | 0 | 1 | mit | 5dd53b364029bcd6bed62314686215d8014d89b3 | MAKE-SITY/MKSTream,SimonDing87/MKSTream,SimonDing87/MKSTream,MAKE-SITY/MKSTream | Gruntfile.js | rejected_duplicate | Near-duplicate of sample 69427 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n\tgrunt.loadNpmTasks('grunt-contrib-jshint');\n\tgrunt.loadNpmTasks('grunt-contrib-qunit');\n\n\tgrunt.initConfig({\n\t\tjshint: {\n\t\t\tall: ['*.js', 'test/*.js'],\n\n\t\t\toptions: {\n\t\t\t\tjshi... | javascript | edit | 0 | 1 | mit | ea303509f1759de77759c6a1c9bc3a8628621488 | bgrins/ExpandingTextareas,bgrins/ExpandingTextareas,domchristie/ExpandingTextareas,domchristie/ExpandingTextareas | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n var packageFile = grunt.file.readJSON(\"package.json\");\n \n grunt.initConfig({\n pkg: packageFile,\n jshint: {\n all: [\"Gruntfile.js\", \"app.js\", \"index.js\", ... | javascript | edit | 0 | 1 | mit | 4c3c39866eb0b07108be2489a5f063d0a318709a | shakeelmohamed/egress-bootstrap | Gruntfile.js | rejected_duplicate | Near-duplicate of sample 85760 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//= require jquery.ui.tabs\n//= require vendor/select2\n//= require vendor/redactor\n\n$(document).ready(function(){\n if($(\"select.select2\").length) {\n $(\"select.select2\").select2();\n }\n\n // In one line for easy removal u... | javascript | edit | 0 | 2 | bsd-3-clause | 5279bb328de11665b4acfb1edcce347ec5b37e5d | netkodo/otwartezabytki,netkodo/otwartezabytki,netkodo/otwartezabytki,netkodo/otwartezabytki | app/assets/javascripts/active_admin.js | rejected_duplicate | Near-duplicate of sample 93520 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class UpdateButton extends React.Component {\n static propTypes = {\n label: PropTypes.string.isRequired,\n login: PropTypes.string.isRequired,\n ... | javascript | edit | 0 | 4 | mit | e0b1be8a781a58fb17444d4abc80a175a6e088d0 | k0kubun/github-ranking,k0kubun/githubranking,k0kubun/github-ranking,k0kubun/github-ranking,k0kubun/github-ranking,k0kubun/githubranking,k0kubun/github-ranking,k0kubun/githubranking,k0kubun/githubranking,k0kubun/githubranking | app/javascript/components/update_button.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (browser, module, suite, config) {\n\n module.axes = module.axes || {};\n\n module.axes.x = module.axes.x || {\n label: 'Date'\n };\n module.axes.y = module.axes.y || [\n {\n label: 'User satisfa... | javascript | edit | 0 | 5 | mit | 4d402d778a574bf131f5d8c19f7deb04f192a872 | alphagov/cheapseats | lib/tests/modules/user_satisfaction_graph.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet defaultOptions = {\n wait: false,\n renderNullWhileWaiting: true,\n withRef: false,\n bindI18n: 'languageChanged loaded',\n bindStore: 'added removed',\n translateFuncName: 't',\n nsMode: 'default',\n usePureComponent: false... | javascript | edit | 0 | 1 | mit | 36f040079ed2eef515bc97a2d0bdfea07afb8218 | i18next/react-i18next,i18next/react-i18next,i18next/react-i18next,i18next/react-i18next,i18next/react-i18next,i18next/react-i18next,i18next/react-i18next,i18next/react-i18next | src/context.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst s3 = require('aws-sdk').S3;\nconst s3Bucket = require('../../../config')('/aws/s3Bucket');\nconst logger = require('../../lib/logger');\n\nmodule.exports = () => ({\n uploadImageStream(stream, key) {\n const contentType = (str... | javascript | edit | 0 | 2 | mit | 8f5a7c13dd0f281066e74b281ba203b6cf6499d6 | synapsestudios/oidc-platform,synapsestudios/oidc-platform,synapsestudios/oidc-platform,synapsestudios/oidc-platform | api/src/application/image/image-service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react'\nimport { Link } from 'react-router'\n\n//TODO make it generic (it's duplicated for gsim inputs and outputs)\nexport default function ServiceSubEntities(\n { entities, uriName, remove, disable... | javascript | edit | 0 | 2 | mit | 9436c1a758746b34c07ba0d5c58daff830dbbdc8 | UNECE/Model-Explorer,UNECE/Model-Explorer | src/js/components/service-sub-entities.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport OAuth2 from 'simple-auth-oauth2/authenticators/oauth2';\n\nexport default OAuth2.extend({\n authenticate: function (options) {\n return this.fetchOauthData(options).then(this.fetchAccessToken.bind(... | javascript | edit | 0 | 2 | mit | b5fabe752a9d325fe4f944d76fd15d60a3b86261 | nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf | resources/frontend/app/authenticators/torii-oauth2.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 | ae245b42cb97532d69a55d90b84bc7ef94222426 | ddoria921/Notes,ddoria921/Notes | app/controllers/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n;(function(exports) {\n function Eventer() {\n var callbacks = {};\n\n this.addListener = function(obj, event, callback) {\n callbacks[event] = callbacks[event] || [];\n callbacks[event].push({\n obj: obj,\n ... | javascript | edit | 0 | 3 | mit | ae6a1c694d46866c581ca47a07c4d561a4d89437 | maryrosecook/codewithisla | src/eventer.js | rejected_duplicate | Near-duplicate of sample 84210 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n *\n *\n * @copyright 2017 Government of Canada\n * @license MIT\n * @author igboyes\n *\n */\nimport React from \"react\";\nimport { capitalize } from \"lodash\";\nimport { connect } from \"react-redux\";\nimport { Label } from \"... | javascript | edit | 0 | 1 | mit | 093c7b77eac28485e2b3ea10396ffb8c96bd5a2b | igboyes/virtool,virtool/virtool,virtool/virtool,igboyes/virtool | client/src/js/account/components/General.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst\n {app} = require('electron'),\n fs = require('fs-extra'),\n Path = require('path'),\n klaw = require('klaw-sync');\n\nvar PluginManager = {\n loadedPlugins: {},\n\n LoadPlugins: function(mod, appEvents) {\n ... | javascript | edit | 0 | 3 | mit | 1ef81de1fc3cc846d86adee9ed401bc233447fe8 | ChiefOfGxBxL/Ice-Sickle,ChiefOfGxBxL/Ice-Sickle | classes/PluginManager.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path')\nconst assert = require('yeoman-assert')\nconst helpers = require('yeoman-test')\n\ndescribe('react-zeal', () => {\n beforeEach(() => {\n return helpers.run(path.join(__dirname, '../../app'))\n .wit... | javascript | edit | 0 | 1 | mit | e777490e26317068c46884f080140c9f2bf15804 | CodingZeal/generator-react-zeal,CodingZeal/generator-react-zeal | app/__tests__/app-spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { observable } from 'mobx'\nimport getCookie from './utils/getCookie'\n\nconst config = observable({\n projectName: '',\n spaceKey: '',\n requiredExtensions: [],\n baseURL: getCookie('BACKEND_URL') || __BACKEND_URL__ || windo... | javascript | edit | 0 | 2 | bsd-3-clause | 2284bd6aa19c4e8104303ec269b306b629150ef7 | Coding/WebIDE-Frontend,Coding/WebIDE-Frontend | app/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nTemplate.createDoc.events({\n\n \"submit .new-doc\": function(event) {\n console.log(\"test\");\n event.preventDefault();\n var title = event.target.title.value;\n Documents.insert({\n title: title\n }, function(err... | javascript | edit | 0 | 1 | mit | 5af1c17b0d1d24a310756ab6ecaa33a10c603da7 | markdownerds/markdownerds,markdownerds/markdownerds | client/templates/createdoc/create_doc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar App = require('../app');\nvar Backbone = require('backbone');\nvar Marionette = require('backbone.marionette');\nvar _ = require('underscore');\nvar keyboardShortcuts = require('./keyboardshortcuts.json');\nvar mark... | javascript | edit | 0 | 1 | mit | 209a36049698406ce03c14eeeabfe4a7700639bb | Yunheng/nusmods,mauris/nusmods,nusmodifications/nusmods,chunqi/nusmods,chunqi/nusmods,Yunheng/nusmods,zhouyichen/nusmods,nathanajah/nusmods,mauris/nusmods,nusmodifications/nusmods,chunqi/nusmods,zhouyichen/nusmods,nusmodifications/nusmods,mauris/nusmods,Yunheng/nusmods,Yunheng/nusmods,zhouyichen/nusmods,nathanajah/nusm... | app/scripts/help/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar assert = chai.assert;\ndescribe('LMLayerWorkerCode', function() {\n it('should exist!', function() {\n assert.isFunction(LMLayerWorkerCode,\n 'Could not find LMLayerWorkerCode! Does embedded_worker.js exist?'\n );\n });... | javascript | edit | 0 | 1 | apache-2.0 | 6c5ea6fea94d68125e9a32002a897156f64dbf87 | tavultesoft/keymanweb,tavultesoft/keymanweb | common/predictive-text/unit_tests/in_browser/cases/basic.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport BaseMeshBehavior from './BaseMeshBehavior'\n\n// base class for geometry behaviors\nexport default\nclass BaseGeometryBehavior extends BaseMeshBehavior {\n\n static get type() { return 'geometry' }\n\n static get observedAt... | javascript | edit | 0 | 2 | mit | 77471e4143cc7e7bd5592236285d5209dea36496 | trusktr/infamous,trusktr/infamous,trusktr/infamous | src/html/behaviors/BaseGeometryBehavior.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar m = require('mithril');\n\n//Components\nvar StudentInfo = require('../components/StudentInfo.js');\nvar StudentJob = require('../components/StudentJob.js');\nvar Messaging = require('../components/Messa... | javascript | edit | 0 | 1 | mit | c2e3d74abd8fc64e018d8969bc654ec6c263f084 | mksq/network,mksq/network,mksq/network | client/app-bundle/views/StudentProfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport React, { Component } from 'react';\nimport { Link } from 'react-router';\nimport { Text } from 'react-dom';\nimport _ from 'underscore';\nimport styles from './Window2.css';\nimport ALL_DATA from '../fixtures/alldata.js... | javascript | edit | 0 | 2 | mit | 4c7c4be66b0c5c38070bfc0c2827b440bb94bacf | Fresh-maker/razor-client,Fresh-maker/razor-client | app/components/Window2.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Fix bug when navigating insite"
},
{
"role": "assistant",
"content": "chrome.webNavigation.onHistoryStateUpdated.addListener(function(details) {\n chrome.tabs.executeScript(null, {file: \"lib/jquery-3.1.1.min.js\"}, function... | javascript | new_file | 0 | 1 | mit | f7583fdf37e3d4730dbab5f1165ea0f9b22da7ef | nschulte/indies-stats,nschulte/indies-stats | background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst LinkWithTooltip = React.createClass({\n render() {\n let tooltip = <Tooltip placement=\"top\">{this.props.tooltip}</Tooltip>;\n\n return (\n <OverlayTrigger overlay={tooltip} delayShow={300} delayHide={150}>\n <... | javascript | edit | 0 | 1 | mit | a90b5618409689a6455214cb83129db6a5ab9740 | dozoisch/react-bootstrap,jesenko/react-bootstrap,mmarcant/react-bootstrap,Terminux/react-bootstrap,Sipree/react-bootstrap,react-bootstrap/react-bootstrap,glenjamin/react-bootstrap,glenjamin/react-bootstrap,HPate-Riptide/react-bootstrap,react-bootstrap/react-bootstrap,apkiernan/react-bootstrap,Lucifier129/react-bootstra... | docs/examples/TooltipInCopy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nAPI.on(API.ADVANCE, callback);\n\nfunction callback () {\n\n\tvar a = API.getMedia().cid;\n\tsetTimeout(function() {\n\t var b = API.getMedia().cid;\n\t if (a === b) {\n\t API.sendChat(\"Track stuck, force skipping!\");\n\t... | javascript | edit | 0 | 3 | mit | aa1d70e586b13327c846841f144b6e71ac043716 | ronaldb/plug-forceskip | forceskip.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*Deal with the contene of the click on the navbar and display the page correctly.*/\n$('.navbar a[data-ex]').on('click', function(event) {\n\tevent.preventDefault();\n\t//Remove the active class;\n\tdocument.querySelector('.navbar li.... | javascript | edit | 0 | 1 | mit | 83bc0dd92d68660b6f17aecc06d9d7b3f8c4d2a3 | pierr/prez-js,pierr/prez-js | examples/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(){\n\t\"use strict\";\n\n\tangular\n\t\t.module('VinculacionApp')\n\t\t.controller('MainController', MainController);\n\n\tfunction MainController () {\n\t\tvar vm = this;\n\n\t\tvm.expand = false;\n\t\tvm.navItems = \n\t\t[ \... | javascript | edit | 0 | 1 | mit | 050c1061c114e1e1789b333aaf394f1a3e1f8ac2 | Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC,Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC | dev/app/components/main/main.controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* globals require:false */\nrequire('prismjs/themes/prism-solarizedlight.css');\nrequire('./src/scss/docs.scss');\nrequire('envision');\nrequire('envision/dist/envision.css');\n\n```\n\nApply this change: Use prism default theme for be... | javascript | edit | 0 | 0 | mit | ced67a4959d3acc121f5029afd061c0420e8f274 | albinohrn/envision,sitevision/envision,melineric/envision,albinohrn/envision,melineric/envision,sitevision/envision,melineric/envision,albinohrn/envision | packages/envision-docs/gatsby-browser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = [].concat(\n require('./biomedical-engineering'),\n require('./chemical-engineering'),\n require('./computer-science')\n);\n```\n\nApply this change: Add accounting courses to catalog"
},
{
"role": "assistant... | javascript | edit | 0 | 0 | mit | 2ebb380803ed33d22fe9c94fc876b8a9203af057 | KenanY/course-search,KenanY/course-search | client/catalog/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global TASK_CONFIG */\nconst gulp = require(\"gulp\");\nconst sizereport = require(\"gulp-sizereport\");\nconst projectPath = require(\"../lib/project-path\");\n\nfunction sizeReportTask() {\n return gulp\n .src([\n projectP... | javascript | edit | 0 | 1 | mit | efdb3cab14d1d7f03f08f909f3c93ceffda4cd44 | CosminAnca/fosterkit,CosminAnca/fosterkit,CosminAnca/fosterkit,CosminAnca/fosterkit | gulpfile.js/tasks/sizereport.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar baseline = {\n\t\"aapl\" : 92,\n\t\"ibm\" : 120,\n\t\"wmt\" : 68,\n\t\"abx\" : 13,\n\t\"msft\" : 35\n};\n\nvar last = {};\n\nsetInterval(function(){\n\n//\t//Add imaginary ticker\n//\tvar newTicker = Math.random().toString(36).subst... | javascript | edit | 0 | 4 | mit | bc876d3967e40bfa4a9ef259f597121699c2ea18 | tecfu/tty-table | examples/data/streamer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport 'babel-polyfill';\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { browserHistory } from 'react-router';\nimport { syncHistoryWithStore } from 'react-router-redux... | javascript | edit | 0 | 1 | mit | 11fce40a9d89ab30133917ccae3c9658c00c69af | FuBoTeam/fubo-flea-market,FuBoTeam/fubo-flea-market | app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar es = require('event-stream'),\n gutil = require('gulp-util'),\n PluginError = gutil.PluginError;\n\nmodule.exports = function (ops) {\n ops = ops || {};\n var cheerio = ops.cheerio || require('cheerio');\n\n return es.map(f... | javascript | edit | 0 | 7 | mit | 11bc63451e7eb35c6a5759fd3ecd55c16fa7a936 | KenPowers/gulp-cheerio,knpwrs/gulp-cheerio,vast/gulp-cheerio | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nTemplate.createBetForm.helpers({\n photo: function(){\n return Session.get(\"photo\");\n }\n})\n\nTemplate.createBetForm.events({\n \"submit .create-bet\" : function(event){\n event.preventDefault();\n\n var title = event.ta... | javascript | edit | 0 | 3 | mit | d363345909fd366ceba507bfb38a9ff991588478 | nmmascia/webet,nmmascia/webet | client/templates/bets/create.js | rejected_duplicate | Near-duplicate of sample 72880 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jshint node:true*/\n'use strict';\n\nvar exec = require('child_process').exec;\nvar colors = require('colors');\n\nmodule.exports = title;\n\n/**\n * Sets title to current CLI tab or window.\n *\n * @param {strint} input - Title to se... | javascript | edit | 0 | 3 | mit | 7de6b0f2868cfe47843a2518482fad7f410c4659 | dvdln/terminal-title | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar docxReader = require(\"./docx-reader\");\nvar DocumentConverter = require(\"./document-to-html\").DocumentConverter;\nvar htmlPaths = require(\"./html-paths\");\nvar documentMatchers = require(\"./document-matchers\");\nvar style = ... | javascript | edit | 0 | 1 | bsd-2-clause | 2fb0cb2820dee31b4e48937586f7f98c7ec8aa61 | mwilliamson/mammoth.js,mwilliamson/mammoth.js | lib/index.js | rejected_duplicate | Near-duplicate of sample 90934 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar ShortId = require('./shortid');\n\nvar defaultSave = mongoose.Model.prototype.save;\nmongoose.Model.prototype.save = function(cb) {\n for (fieldName in this.schema.tree) {\n if (this.isNew &&... | javascript | edit | 0 | 7 | mit | 5c19b7c5c701253739e68e9ecd31623b8efb704c | leeroybrun/mongoose-shortid-nodeps,hiconversion/mongoose-shortid-nodeps | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function () {\n const trackers = [];\n let isFinished = false;\n let onFinished = () => {};\n\n function tryToFinish () {\n if (all(pluck(trackers, 'executed')) && !isFinished) {\n isFinishe... | javascript | edit | 0 | 3 | mit | 15ee2ff765ca72b0636ba1523abd5c738e10864a | toboid/all-finished | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['moxie.conf', 'underscore', 'today/views/CardView', 'hbs!today/templates/rti'], function(conf, _, CardView, rtiTemplate) {\n\n var RTI_REFRESH = 60000; // 1 minute\n var RTICard = CardView.extend({\n initialize: ... | javascript | edit | 0 | 2 | apache-2.0 | a74eb06d92a9c5e9daeb946297d4c5e5da005ca6 | ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client | app/today/views/RTICard.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(_) {\n var validationErrorFor = {\n mixin: 'all mixins must be objects.',\n object: 'target must be a constuctor or an object.'\n },\n\n withA = function(errorType, object) {\n if( !_.isObject(... | javascript | edit | 0 | 2 | mit | 0e8cbc303c97564c98bf9c01b0167209555f7d3c | serradura/lodash_ext | includeIn.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright (c) 2013 Intel Corporation. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar callback_listeners = {};\nvar callback_id = 0;\nvar extension... | javascript | edit | 0 | 3 | bsd-3-clause | 8c9b63e1e9fff3cee0f4e0df0df3e4e20c729536 | tomatell/crosswalk,alex-zhang/crosswalk,bestwpw/crosswalk,chinakids/crosswalk,siovene/crosswalk,tedshroyer/crosswalk,mrunalk/crosswalk,Pluto-tv/crosswalk,chuan9/crosswalk,xzhan96/crosswalk,crosswalk-project/crosswalk,crosswalk-project/crosswalk-efl,jondong/crosswalk,Bysmyyr/crosswalk,qjia7/crosswalk,zeropool/crosswalk,... | extensions/renderer/xwalk_internal_api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable ghost/ember/alias-model-in-controller */\nimport Controller from '@ember/controller';\nimport {inject as service} from '@ember/service';\n\nexport default class ApplicationController extends Controller {\n @service ... | javascript | edit | 0 | 6 | mit | f4f897f33c59f573c20c87ff4c9387a7cec0bf08 | TryGhost/Ghost-Admin,TryGhost/Ghost-Admin | app/controllers/application.js | rejected_duplicate | Near-duplicate of sample 70094 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\n\nmodule.exports = {\n fillLogin: function(form, data) {\n var formData = _.merge(form, data);\n return formData;\n },\n\n headers: function() {\n return {\n 'User-Age... | javascript | edit | 0 | 1 | mit | 197ddda395067b87d02b976b03037f47af606b80 | kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop | src/app/api/page_utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nmodule.exports = {\n options: {\n auth: require('./options/auth'),\n body: require('./options/body'),\n callback: require('./options/callback'),\n cookie: require('./options/cookie'),\n encoding: require('./options/enc... | javascript | edit | 0 | 0 | apache-2.0 | add64845db369da0b842f91d052324530e11287a | request/core | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// User roles\napp.constant('USER_ROLES', {\n all: ['ROLES_ADMIN', 'ROLES_LEADER', 'ROLES_WORKER'],\n admin: 'ROLES_ADMIN',\n worker: 'ROLES_WORKER',\n leader: 'ROLES_LEADER'\n});\n\n// Authentication events\napp.constant('A... | javascript | edit | 0 | 0 | mit | 10894cf1bc17a5985c57c3e1a059803ef90b8d76 | fingo/urlopia,fingo/urlopia,fingo/urlopia,fingo/urlopia,fingo/urlopia | src/main/resources/public/js/constants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { Link } from 'gatsby'\n\nimport MeImg from '../images/me.jpg'\nimport { MenuIcon } from './icons/Menu'\n\nconst Nav = ({ onClick }) => {\n return (\n <div className=\"flex items-center justify-betw... | javascript | edit | 0 | 1 | mit | 02dab375a6e1c06b84170f3a038ea6db8e5c342a | dtjv/dtjv.github.io | src/components/nav.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function( $ ) {\n\tvar requests = {};\n\tvar zipValid = {\n\t\tus: /[0-9]{5}(-[0-9]{4})?/\n\t};\n\n\t$.ziptastic = function(zip, callback){\n\t\t// Only make unique requests\n\t\tif(!requests[zip]) {\n\t\t\trequests[zip] = $.getJSON('h... | javascript | edit | 0 | 3 | mit | c8ebc8e9e7f8559ef627491193ec55d2ec4d3b03 | Ziptastic/ziptastic-jquery-plugin,Ziptastic/ziptastic-jquery-plugin,daspecster/ziptastic-jquery-plugin,daspecster/ziptastic-jquery-plugin | jquery.ziptastic.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar isPackageMissing = require('ember-cli-is-package-missing');\n\nmodule.exports = {\n description: 'Generates a server directory for mocks and proxies.',\n\n normalizeEntityName: function() {},\n\n afterInstall: function(options) {... | javascript | edit | 0 | 6 | mit | a693a0a7eee07995d79033baef8fe182143f2789 | rtablada/ember-cli,trentmwillis/ember-cli,givanse/ember-cli,scalus/ember-cli,nathanhammond/ember-cli,kanongil/ember-cli,Turbo87/ember-cli,ef4/ember-cli,xtian/ember-cli,sivakumar-kailasam/ember-cli,givanse/ember-cli,buschtoens/ember-cli,calderas/ember-cli,cibernox/ember-cli,johanneswuerbach/ember-cli,pzuraq/ember-cli,ba... | blueprints/server/index.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 | 2 | bsd-3-clause | a1a15bda062d3e51e4c8fcfc00ab78cd27bd4fc9 | zhangwei001/react-native,barakcoh/react-native,rebeccahughes/react-native,maskkid/react-native,dylanchann/react-native,roy0914/react-native,sunblaze/react-native,jonesgithub/react-native,Guardiannw/react-native,chsj1/react-native,mjetek/react-native,Intellicode/react-native,gabrielbellamy/react-native,wangziqiang/react... | packager/webSocketProxy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar base_layer = new L.tileLayer(\r\n 'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',{\r\n attribution: '© <a href=\" http://www.openstreetmap.org/\" title=\"OpenStreetMap\">OpenStreetMap</a> and contribut... | javascript | edit | 0 | 0 | mit | 5373afb242a06091db3dcd0f8473b641b8d3767d | withtwoemms/leaflet-locatecontrol,Drooids/leaflet-locatecontrol,nikolauskrismer/leaflet-locatecontrol,jblarsen/leaflet-locatecontrol,cederache/leaflet-locatecontrol,domoritz/leaflet-locatecontrol,cederache/leaflet-locatecontrol,nikolauskrismer/leaflet-locatecontrol,vivek8943/leaflet-locatecontrol,rick-frantz/leaflet-lo... | demo/script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @author: @AngularClass\n */\n\nrequire('ts-node/register');\nvar helpers = require('./helpers');\n\nexports.config = {\n baseUrl: 'http://localhost:3000/',\n\n // use `npm run e2e`\n specs: [\n helpers.root('src/**/**.e2e.... | javascript | edit | 0 | 1 | mit | 5b02710c63cb4bf86af8bbc61c0c18113a8ef5ec | sebastianhaas/medical-appointment-scheduling,sebastianhaas/medical-appointment-scheduling,sebastianhaas/medical-appointment-scheduling,sebastianhaas/medical-appointment-scheduling | config/protractor.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport * as React from 'react';\nimport { View, Text } from 'react-native';\n\nimport { connect } from 'lib/utils/redux-utils';\n\nimport Button from '../components/button.react';\nimport type { AppState } from '../redux/red... | javascript | edit | null | null | bsd-3-clause | 5d0a6b1591cf9fae6f182176d563bb284b9e493d | Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal | native/calendar/calendar-input-bar.react.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @module bowerPackageURL\n * @author Matthew Hasbach\n * @copyright Matthew Hasbach 2015\n * @license MIT\n */\n\n/**\n * The bowerPackageURL callback\n * @callback bowerPackageURLCallback\n * @param {Object} err - An error objec... | javascript | edit | 0 | 3 | mit | e95ac0b22ab7ea7e9911d79587869112465467f4 | mjhasbach/bower-package-url | lib/bowerPackageURL.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar path = require('path');\n\nfunction getComponentFiles(filename) {\n var ext = path.extname(filename);\n if (ext === '.js') {\n return null;\n }\n\n var nameNoExt = path.basename(filename, ... | javascript | edit | 0 | 7 | mit | 2089937b11199521f112ce196e498e87db3474d5 | marko-js/marko,marko-js/marko | components/taglib/TransformHelper/getComponentFiles.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Link, withRouter } from 'react-router';\nimport $ from 'jquery';\n\nclass Bookmarks extends React.Component {\n constructor(props) {\n super(props);\n this.s... | javascript | edit | 0 | 1 | mit | 5269d3c08d97c03c37f83617daba3eaf238e96b4 | francoabaroa/escape-reality,lowtalkers/escape-reality,francoabaroa/escape-reality,lowtalkers/escape-reality | react-client/src/components/Bookmarks.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Q = require(\"q\");\nvar _ = require(\"lodash\");\nvar path = require(\"path\");\nvar Packager = require(\"pkgm\");\nvar pkg = require(\"../package.json\");\n\nvar logger = require(\"./utils/logger\")(\"packages\");\n\nvar manager =... | javascript | edit | 0 | 1 | apache-2.0 | 56125a7c8375404d2ff355c11d70ab5146c291f4 | code-box/codebox,rodrigues-daniel/codebox,ronoaldo/codebox,Ckai1991/codebox,CodeboxIDE/codebox,indykish/codebox,nobutakaoshiro/codebox,fly19890211/codebox,LogeshEswar/codebox,blubrackets/codebox,blubrackets/codebox,kustomzone/codebox,quietdog/codebox,etopian/codebox,lcamilo15/codebox,listepo/codebox,quietdog/codebox,no... | lib/packages.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar AWS = require('aws-sdk');\n\nmodule.exports = function createS3Client() {\n const awsConfig = (process.env.NODE_ENV === 'development')\n ? JSON.parse(fs.readFileSync('./tmp/aws_message_popup.json'))\n ... | javascript | edit | 0 | 1 | mit | c74d6cc74e697493f1c71552f9ef143ac6e5f96c | kesiena115/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows,kesiena115/threeflows,kesiena115/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows | server/s3_client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport registerServiceWorker from './registerServiceWorker';\n\nReactDOM.render(<App />, document.getElementById('root'));\n... | javascript | edit | 0 | 0 | mit | c4335f69294c6ca940e80ca32050b096426b577a | cernanb/personal-chef-react-app,cernanb/personal-chef-react-app | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport LinterUI from './main'\nimport type Intentions from './intentions'\n\nconst linterUiDefault = {\n instances: new Set(),\n signalRegistry: null,\n statusBarRegistry: null,\n activate() {\n if (!atom.inSpecMod... | javascript | edit | null | null | mit | e2670701f4bc717d28e59285ca9057728786259a | AtomLinter/linter-ui-default,steelbrain/linter-ui-default,steelbrain/linter-ui-default | lib/index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar page = require('webpage').create();\nvar system = require('system');\nvar args = system.args;\nvar url = args[1];\nvar imagePath = args[2];\nvar attempt = 0;\n\nfunction widgetsReady() {\n return document.querySelector('.widget') !... | javascript | edit | 0 | 3 | mit | ce0083e48b19bb661637999ae2596897f80fa719 | geckoboard/diffy | lib/capture.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst table = require('text-table')\nconst chalk = require('chalk')\n\nclass Reporter {\n report (results) {\n let output = '\\n'\n let totalErrors = 0\n let totalWarnings = 0\n\n results.forEach((result) => {\n totalE... | javascript | edit | 0 | 4 | mit | f1e243422f90de3f75a4acab06fc41423e8c6b06 | sourceboat/sass-lint-vue | lib/reporter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar EXPORTABLE_RESOURCES;\n\nEXPORTABLE_RESOURCES = {\n Request: './Request',\n APIError: './APIError',\n JWTSecuredRequest: './JWTSecuredRequest',\n Responsebuilder: './ResponseBuilder',\n SilvermineResponseB... | javascript | edit | 0 | 2 | mit | 8bdfbdbd885a435d1d659ee83134fc22a6742688 | silvermine/apigateway-utils | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function($){\n $.appendSolveButton = function () {\n var $solve = $(document.createElement('div')).text('solve').css({\n cursor: 'pointer',\n position: 'fixed',\n left: 0,\n bottom: 0,\n padding: '1em 2em',... | javascript | edit | 0 | 2 | mit | 18809ce25afa59e318ecf5ccab7e0d102fa982c9 | en30/online-judge-helper,en30/online-judge-helper,en30/online-judge-helper | chrome_extension/client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport CardIOView from './CardIO.ios';\nimport * as constants from './constants';\n\nexport default CardIOView;\nexport const CardIOConstants = constants;\n\n```\n\nApply this change: Add preload to js api"
},
{
"role": "assista... | javascript | edit | 0 | 0 | mit | 052e14ad23fae1bead4565ee3adb103bb03b3832 | BBB/react-native-card.io | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nmodule.exports = {\n extends: 'javascript/standard/optional.js'\n}\n\n```\n\nApply this change: Remove extension from extends path"
},
{
"role": "assistant",
"content": "'use strict'\n\nmodule.exports = {\n ... | javascript | edit | 0 | 0 | bsd-3-clause | 4e5a0e6fdb7d424f082205acf8f18b8edde278b1 | strvcom/eslint-config-javascript,strvcom/js-coding-standards,strvcom/eslint-config-javascript | environments/nodejs/optional.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst Chai = require(\"chai\");\nconst {util} = Chai;\n\n\nlet overwritten, unindentPattern;\n\n/**\n * Strip leading tabulation from string blocks when running \"equal\" method.\n *\n * Enables use of ES6 template st... | javascript | edit | 0 | 4 | isc | e5de493971c3290e037c16141332d3c487cf756c | Alhadis/Snippets,Alhadis/Snippets,Alhadis/Snippets,Alhadis/Snippets,Alhadis/Snippets | js/chai-unindent.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PureComponent } from 'react';\nimport { Link } from 'react-router-dom';\nimport PropTypes from 'prop-types';\nimport styles from './navItem.css';\n\nclass NavItem extends PureComponent {\n\n constructor() {\n super()... | javascript | edit | 0 | 3 | mit | f8dd2d87760659701e25244884dea30c84b0dcd8 | hollomancer/operationcode_frontend,NestorSegura/operationcode_frontend,alexspence/operationcode_frontend,tskuse/operationcode_frontend,hollomancer/operationcode_frontend,tskuse/operationcode_frontend,miaket/operationcode_frontend,sethbergman/operationcode_frontend,alexspence/operationcode_frontend,NestorSegura/operatio... | src/shared/components/nav/navItem/navItem.js | rejected_duplicate | Near-duplicate of sample 91498 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Line = require('./line');\n\nvar simplifyGeometry = function(points, tolerance){\n\n var dmax = 0;\n var index = 0;\n\n for (var i = 1; i <= points.length - 2; i++){\n d = new Line(points[0], points[points.length - 1]).perpend... | javascript | edit | 0 | 5 | mit | 84e07a26ca69f84916ca5d8cd60316d336ad268d | seabre/simplify-geometry,gronke/simplify-geometry | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nangular.module('pathwayApp')\n.controller('PathwayController', function ($scope, $http, $stateParams, $cookieStore, $state) {\n $http({method: 'GET',\n url: '/api/pathways/' + $stateParams.id\n }).success(funct... | javascript | edit | 0 | 1 | mit | f7c515b7c716b0a1fb75a2bb9a87d83c773b5f2f | aattsai/Pathway,aattsai/Pathway,aattsai/Pathway | pipeline/app/assets/javascripts/controllers/PathwayController.js | rejected_duplicate | Near-duplicate of sample 97200 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.