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\nMeteor.methods({\n fetchInstaApi: function(){\n var instaDebounce = _.debounce(Meteor.bindEnvironment(function(){\n var ig = Meteor.npmRequire('instagram-node').instagram();\n\n ig.use({ access_token: Meteor.settings.insta... | javascript | edit | 0 | 1 | mit | c8639e7b8e380cbe1f68c7597de438ccdebdda77 | Rhjulskov/webonaut,Rhjulskov/webonaut,Rhjulskov/webonaut | server/instaFeed.es6.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */\n\nwindow.matchMedia = window.matchMedia || (function( doc, undefined ) {\n\n ... | javascript | edit | 0 | 3 | mit | 28929cc0260ea14c2de5ec19874c6dbba00f9100 | therealedsheenan/matchMedia.js,amitabhaghosh197/matchMedia.js,AndBicScadMedia/matchMedia.js,ababic/matchMedia.js,therealedsheenan/matchMedia.js,paulirish/matchMedia.js,zxfjessica/match-media-polyfill,CondeNast/matchMedia.js,CondeNast/matchMedia.js,ababic/matchMedia.js,dirajkumar/matchMedia.js,zxfjessica/match-media-pol... | matchMedia.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n* Computes the inverse of the lower incomplete gamma function.\n*\n* @module @stdlib/math/base/special/gammaincinv\n*\n* @example\n* var gammaincinv = require( '@stdlib/math/base/special/gammaincinv' );\n*\n* var v... | javascript | edit | 0 | 0 | apache-2.0 | 166231a4e9c666d017f6823b46f238fd50537e5a | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | lib/node_modules/@stdlib/math/base/special/gammaincinv/lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Modules datastore fixtures.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n *... | javascript | edit | 0 | 1 | apache-2.0 | a06d8d4a10b0cfb5905a0dc183bf25b26dd51e69 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | assets/js/googlesitekit/modules/datastore/__fixtures__/index.js | rejected_duplicate | Near-duplicate of sample 86910 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar prevWindowOnError = window.onerror;\nwindow.onerror = function(message, url, line, stack) {\n var now = Date.now();\n stack = stack || 'window@'+url+':'+line+':0';\n Kadira.sendErrors([{\n appId : Kadira.options.appId,\n na... | javascript | edit | 0 | 2 | mit | a8bde2cb21c53fbdcf6a4aae9124a310f9e0111f | chatr/kadira,meteorhacks/kadira | lib/client/error_reporters/window_error.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Return slim client instead of full client\n\nCo-authored-by: Owen Smith <<EMAIL>>"
},
{
"role": "assistant",
"content": "module.exports = import('ifrau').then(function(ifrau) {\n\treturn ifrau.SlimClient;\n});\n"
}
] | javascript | new_file | 0 | 1 | apache-2.0 | 3825954db3a1f20411329f6efde9fc7b09c62f22 | Brightspace/frau-jwt | ifrau-client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (){\n\"use strict\";\n\nvar BBM = require(\"./BBM.js\");\nvar ENUM = BBM.ENUM;\nvar REGSTR =\n[\n \"\\\"{3,}\"\n, \"--\"\n, \"\\\\*{2}\"\n, \"\\\\^{2}\"\n, \",,\"\n, \"__\"\n, \"''\"\n, \"\\\\?<\"\n, \"!<\"\n, \"#<\"\n, \"#\\... | javascript | edit | 0 | 1 | mit | 8c4b151b36ac5ff4d83206e19675c45932248809 | Preole/bbm,Preole/bbm | src/BBM.fn.toBBM.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {DeviceEventEmitter} from 'react-native';\n\nclass KeyboardObserver {\n\n constructor() {\n this.keyboardHeight = 0;\n this.animationWillEndAt = 0;\n this.listeners = {};\n this.listenerId = 0;\n DeviceEventEmitte... | javascript | edit | 0 | 1 | mit | 44f3adfdbf85467272d71cf10c9ecd4fe75b57b7 | azendoo/react-native-keyboard-responsive-view | src/KeyboardObserver.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n *\n * WSO2 Inc. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance... | javascript | edit | 0 | 1 | apache-2.0 | 334c168af32f349fa8dbd1ee319611647fa44004 | tishan89/carbon-analytics,minudika/carbon-analytics,Niveathika92/carbon-analytics,erangatl/carbon-analytics,Niveathika92/carbon-analytics,minudika/carbon-analytics,minudika/carbon-analytics,tishan89/carbon-analytics,tishan89/carbon-analytics,wso2/carbon-analytics,wso2/carbon-analytics,tishan89/carbon-analytics,wso2/car... | components/org.wso2.carbon.siddhi.editor.core/src/main/resources/web/commons/js/menu-bar/deploy-menu.js | rejected_duplicate | Near-duplicate of sample 97313 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nimport countries from './countries';\n\n\nexport default Ember.Component.extend({\n i18n: Ember.inject.service(),\n countries: countries,\n languages: Ember.computed('countries', function() {\n ... | javascript | edit | 0 | 3 | apache-2.0 | 61ef41e923fe2d05f36f47ed26139fcf6e4685ae | CenterForOpenScience/isp,CenterForOpenScience/isp,samanehsan/isp,samanehsan/isp,CenterForOpenScience/isp,samanehsan/isp | app/components/language-picker/component.js | rejected_duplicate | Near-duplicate of sample 101179 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport TeaserGrid from 'components/TeaserGrid';\nimport Container from 'components/Container';\nimport BlockContainer from 'components/BlockContainer';\nimport Section from 'components/Section';\nimport Headi... | javascript | edit | 0 | 1 | apache-2.0 | 4f0b898c968cca08ac87638d4250c6140f354a7f | iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend | src/components/HomepagePetitions/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* globals module */\nmodule.exports = {\n afterInstall: function() {\n var _this = this;\n return _this.addAddonsToProject({\n packages: [\n { name: 'ember-flexberry', target: '0.12.3' }\n ]\n }).then(functio... | javascript | edit | 0 | 1 | mit | 8ea1ff2f989480a77181a384d64cfdcd68a88c18 | Flexberry/ember-flexberry-designer,Flexberry/ember-flexberry-designer,Flexberry/ember-flexberry-designer | blueprints/ember-flexberry-designer/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar config = require('./webpack.config.js');\nvar webpack = require('webpack');\n\nconfig.devtool = 'source-map';\n\nconfig.output.publicPath = './';\n\nconfig.plugins.push(\n new webpack.DefinePlugin({\n 'process.env': {\n 'NO... | javascript | edit | 0 | 0 | mit | 3322f2a9c5627719c552d737543a3f7f88888122 | messinmotion/minigrid,henriquea/minigrid,henriquea/minigrid | webpack.config.dist.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n options: {\n require: ['sass-css-importer'],\n loadPath: ['<%%= bowerOpts.directory || \"bower_components\" %>'],\n bundleExec: true,\n },\n debug: {\n src: '<%%= dirs.tmp %>/prepare/assets/styles/mai... | javascript | edit | 0 | 0 | mit | cd072a2e2de2213eb9450445c5a48ca5c6452335 | half-pipe/half-pipe,half-pipe/half-pipe | lib/generators/half_pipe/templates/tasks/options/sass.js | rejected_duplicate | Near-duplicate of sample 105247 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n\t\"use strict\";\n\tfunction initPage() {\n\n\t\tvar fileTypes = [\n\t\t\t\"csv\",\n\t\t\t\"gif\",\n\t\t\t\"jpeg\",\n\t\t\t\"jpg\",\n\t\t\t\"mp3\",\n\t\t\t\"mp4\",\n\t\t\t\"pdf\",\n\t\t\t\"png\",\n\t\t\t\"tif\",\n\t\t\t\... | javascript | edit | 0 | 2 | apache-2.0 | 5068d340bf68c03d79d3c6b9325f5557d4daa3c9 | uvalib/Libra2,uvalib/Libra2,uvalib/Libra2,uvalib/Libra2,uvalib/Libra2 | lib/libra2/app/assets/javascripts/file_upload_options.js | rejected_duplicate | Near-duplicate of sample 72952 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction TileMap(w, h) {\n this.width = w;\n this.height = h;\n this.reset();\n}\n\nTileMap.prototype.reset = function() {\n this.map = [];\n for(var y = 0; y < this.height; y++) {\n this.map[y] = [];\n for(var x = 0; x < thi... | javascript | edit | 0 | 3 | mit | 9dd210893d6e961f89836281df4a16c056917d8f | yoo2001818/TableFlip | src/TileMap.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar requirejs = require('requirejs');\n\nvar applicationConfig = {\n baseUrl: './public/js',\n name: 'app',\n out: './public/app.js',\n mainConfigFile: './public/js/app.js',\n paths: {\n 'socket.io': 'empty:',\n ... | javascript | edit | 0 | 1 | apache-2.0 | c7dd9a0b4aacce1e04e9cbe4400b085cd0eb9119 | pinittome/pinitto.me,pinittome/pinitto.me,pinittome/pinitto.me | src/build.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * A reusable component to display a styled heading.\n */\n\nimport PropTypes from 'prop-types';\nimport React, {Component} from 'react';\nimport {StyleSheet, css} from 'aphrodite/no-important';\n\nexport default class Heading exten... | javascript | edit | 0 | 1 | mit | 225df4bb8f5e6561161dab095c49a8b78286dbb2 | wchargin/wchargin.github.io,wchargin/wchargin.github.io | src/components/Heading.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(attr, bindingPath, model) {\n let cellComponent = this._super(...arguments);\n if (attr.kind === 'belongsTo') {\n switch (<% '`${model.modelName}+${bindingPath}`' %>) {\n<%= bodySwitchBindingPath %>\n }\n }\n\n r... | javascript | edit | null | null | mit | 39525514e4849eb514bb563e51f5cb7e5900f0ea | Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry | blueprints/flexberry-edit-form/snippets/getCellComponent-function.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { constant, includes } from 'lodash';\nimport { element } from 'angular';\nimport uiModules from 'ui/modules';\nimport registry from 'ui/registry/chrome_nav_controls';\nimport '../components/notification_center';\nimport template... | javascript | edit | 0 | 2 | mit | a9ed364ba26e9952a05934ac5369dce8db23c4da | sw-jung/kibana_notification_center,sw-jung/kibana_notification_center | public/nav_control/nav_control.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar httpProxy = require('http-proxy');\nvar http = require('http');\n\nvar proxy = httpProxy.createProxy();\n\nvar routes = {\n // Router\n 'hook.labeli.org' : 'http://localhost:9000',\n // Api\n 'api.labeli.... | javascript | edit | 0 | 2 | mit | 641b6937f8b8b54bd654c4ca6ca5345be5ff3f0e | asso-labeli/labeli-router,asso-labeli/labeli-router | router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*! http://mths.be/repeat v0.1.0 by @mathias */\nif (!String.prototype.repeat) {\n\t(function() {\n\t\t'use strict'; // needed to support `apply`/`call` with `undefined`/`null`\n\t\tvar repeat = function(count) {\n\t\t\tif (this == null... | javascript | edit | 0 | 7 | mit | 253529d42c1ef9b7aed7b2754c77bc8a246d892e | mathiasbynens/String.prototype.repeat | repeat.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar merge = require('webpack-merge')\nvar prodEnv = require('./prod.env')\n\nmodule.exports = merge(prodEnv, {\n NODE_ENV: '\"development\"',\n API_HOST: '\"http://localhost:3000\"'\n})\n\n```\n\nApply this change: Fix local api serve... | javascript | edit | 0 | 0 | mit | 3c54b4d5f8351898be26699ad9cece43318a32e3 | riseshia/Bonghwa,riseshia/Bonghwa,riseshia/Bonghwa,riseshia/Bonghwa | frontend/config/dev.env.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or v... | javascript | edit | 0 | 0 | mit | c956e63c62f17c3c671ea991f978e42218a94691 | codeforgso/cityvoice,ajb/cityvoice,daguar/cityvoice,ajb/cityvoice,codeforgso/cityvoice,daguar/cityvoice,codeforgso/cityvoice,codeforamerica/cityvoice,codeforamerica/cityvoice,ajb/cityvoice,codeforamerica/cityvoice,daguar/cityvoice,daguar/cityvoice,codeforamerica/cityvoice,ajb/cityvoice,codeforgso/cityvoice | app/assets/javascripts/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function () {\n $(\"[class='switch-checkbox']\").bootstrapSwitch();\n\n $('input[class=\"switch-checkbox\"]').on('switchChange.bootstrapSwitch', function(event, state) {\n var url = $(this).attr('url') + state;\n var method = ... | javascript | edit | 0 | 2 | mit | d703dad4967b92c85a470b5d445a7a1fd5765352 | bear454/osem,hennevogel/osem,AndrewKvalheim/osem,differentreality/osem,differentreality/osem,rishabhptr/osem,openSUSE/osem,rishabhptr/osem,bear454/osem,SeaGL/osem,openSUSE/osem,rishabhptr/osem,differentreality/osem,hennevogel/osem,hennevogel/osem,SeaGL/osem,hennevogel/osem,openSUSE/osem,bear454/osem,rishabhptr/osem,And... | app/assets/javascripts/osem-switch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst path = require('path');\nconst { infer } = require('bayesjs');\nconst { json, send } = require('micro');\n\nconst htmlContent = fs\n .readFileSync(path.join(__dirname, 'index.html'))\n .toString();\n\n... | javascript | edit | 0 | 4 | mit | 23a7aefe2d78f46523bd71a25c3ceb90db254f5e | fhelwanger/bayesjs-ws,fhelwanger/bayesjs-ws | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* Listen for messages and get modResource meta tag*/\nchrome.runtime.onMessage.addListener(function(msg, sender, sendResponse) {\n if (msg.command && (msg.command == \"getResource\")) {\n\n function getMetaContentByName(name,conten... | javascript | edit | 0 | 3 | mit | 5955b691f3e44cbf8224e070c1c67fdd070f5454 | bartholomej/modx-manager-switch,bartholomej/modx-manager-switch | src/content.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Discord = require('discord.js');\nconst config = require('./config.json');\nconst manager = new Discord.ShardingManager('./bot.js');\n\n//Spawn with a relevant number of shards automatically\nmanager.spawn();\n\n```\n\nApply this ... | javascript | edit | 0 | 0 | mit | 73f420d634399f26a329fd66f1afc6221e1aeb8b | moustacheminer/MSS-Discord,moustacheminer/MSS-Discord,moustacheminer/MSS-Discord | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module(\"hikeio\").\n\tdirective(\"fancybox\", [\"$rootScope\", function($rootScope) {\n\t\treturn {\n\t\t\tlink: function (scope, element, attrs) {\n\t\t\t\tscope.$on(\"$routeChangeStart\", function () {\n\t\... | javascript | edit | 0 | 1 | mit | 11764092ee043286fd017da940c28df51a4eba00 | zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io | client/js/directives/fancy-box-directive.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n app: {\n src: ['tmp/transpiled/app/**/*.js'],\n dest: 'tmp/public/assets/app.js'\n },\n\n test: {\n src: 'tmp/transpiled/tests/**/*.js',\n dest: 'tmp/public/tests/tests.js'\n }\n};\n\n```\n\nApply th... | javascript | edit | 0 | 0 | mit | 16eadc7fd084c4d4471655aa5239b77c933529db | sajt/ember-weather,mixonic/ember-app-kit,duvillierA/try_ember,grese/miner-app-OLD,cevn/tasky-web,ClockworkNet/ember-boilerplate,stefanpenner/ember-app-kit,kiwiupover/seattle-auckland-weather,kiwiupover/ember-weather,shin1ohno/want-js,tomclose/minimal_eak_test_stub_problem,ClockworkNet/ember-boilerplate,Anshdesire/ember... | tasks/options/concat_sourcemap.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport type { Children } from 'react';\nimport React from 'react';\n\nimport { addTransitionListener } from 'yubaba-core';\n\nexport default class TransitionContainer extends React.Component {\n _detatch: Function;\n\n pro... | javascript | edit | null | null | mit | 6aa462a2d69c71f8813925b65c715d329a912ef0 | madou/yubaba,madou/yubaba | packages/react/src/TransitionContainer.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$( document ).ready(function() {\n Dropzone.autoDiscover = false;\n var myDropzone = new Dropzone(\".dropzone\", {\n url: '/api/file',\n autoProcessQueue: true,\n maxFilesize: maxFilesize,\n acceptedFil... | javascript | edit | 0 | 2 | mit | 2237d762db94f82264d5784412720fcfe69226a0 | zedee/Media,zedee/Media,AsgardCms/Media,oimken/Media,MentallyFriendly/Media,mikemand/Media,gabva/Media,mikemand/Media,AsgardCms/Media,mikemand/Media,AsgardCms/Media,MentallyFriendly/Media,gabva/Media,ruscon/Media,oimken/Media,zedee/Media,oimken/Media,ruscon/Media | Assets/js/init-dropzone.js | rejected_duplicate | Near-duplicate of sample 84146 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport TB from '../../src/tadaboard-node-sdk';\n\ndescribe('TB', () => {\n});\n\n```\n\nApply this change: Add simple test for TB.response"
},
{
"role": "assistant",
"content": "import TB from '../../src/tadaboard-node-sdk';... | javascript | edit | 0 | 1 | mit | 490f0af6992eab28938273d91341073138082b35 | tadaboard/node-sdk,tadaboard/node-sdk | test/unit/tadaboard-node-sdk.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst {\n remote: { app }\n} = require('electron');\n\nconst DefaultNotification = require('./default-notification');\nconst { appId, loadBots } = require('./helpers');\n\n// From https://github.com/felixrieseberg/elec... | javascript | edit | 0 | 2 | apache-2.0 | c716b8f23392e2d26c7675f193be4c54f72205cd | zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-electron,zulip/zulip-electron,zulip/zulip-desktop,zulip/zulip-electron | app/renderer/js/notification/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['app', 'controllers/Today', 'controllers/History', 'services/History'], function (app) {\n \"use strict\";\n\n return app.config(['$routeProvider', function (routes) {\n routes\n .when('/', {\n controller: 'Toda... | javascript | edit | 0 | 1 | mit | c518210b525a55e01f8ec1551ec40a2d08133bac | BrettBukowski/tomatar | public/js/routes/Routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar chai = require('chai');\n\nchai.use(require('chai-fs'));\nchai.should();\n\nconst ROOT_DIR = path.join(process.cwd(), '..');\n\ndescribe('As a dev', function() {\n\n describe('When testing generator d... | javascript | edit | 0 | 1 | mit | a1bf63b212b97d8b7e1ad90e7397ab79defe902c | CodeRichardJohnston/slate-demo,cartridge/cartridge-cli,code-computerlove/quarry,code-computerlove/slate-cli,cartridge/cartridge,code-computerlove/slate,CodeRichardJohnston/slate-demo,code-computerlove/slate | generatorTests/test/directoryStructureSpec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Backbone = require('backbone');\nvar url = require('url');\n\n\"use strict\";\n\nexports.HistoryUpdate = Backbone.View.extend({\n\n initialize : function () {\n console.log('HistoryUpdate:initialize');\n this.listen... | javascript | edit | 0 | 4 | bsd-3-clause | 9be9372f979c83ed89bc0bcf852ef99b21bc02f7 | menpo/landmarker.io,menpo/landmarker.io,menpo/landmarker.io | src/js/app/view/history.js | rejected_duplicate | Near-duplicate of sample 83894 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n(function() {\n angular.module('ncsaas')\n .service('invitationService', ['baseServiceClass', '$http', 'ENV', invitationService]);\n\n function invitationService(baseServiceClass, $http, ENV) {\n /*jshint validt... | javascript | edit | 0 | 1 | mit | 9f2b45cec678d106844359977968c859f1bc9c16 | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | app/scripts/services/invitation-service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Cell used for showing and allowing the editing of an AmountEntry\n *\n * Copyright 2015 Ethan Smith\n */\n\nvar $ = require('jquery'),\n AmountEntryCell = require('./AmountEntryCell');\n\nvar EditableAmountCell = AmountEntryC... | javascript | edit | 0 | 1 | mit | 0dae84d675d76dafcde86eb1911b9c9f3cf31997 | onebytegone/banknote-client,onebytegone/banknote-client | src/view/table/cell/EditableAmountCell.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst fs = require(\"fs-extra-promise\");\nconst path = require(\"path\");\nconst log = require(\"log\");\n\nconst findDirsWithEntry = async (baseDir, entryFile = \"index.js\") => {\n const res = [];\n const dir... | javascript | edit | 0 | 4 | mit | 1e2dacf7b8946f8e97d0ae823cfd00a2cf131819 | Combitech/codefarm,Combitech/codefarm,Combitech/codefarm | src/lib/backend/lib/find_dirs_with_entry.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport type { ThunkOrActionType } from \"./actionCreators\";\nimport type { ActionType } from \"./actionTypes\";\nimport type { AppState } from \"./reducers\";\nimport type { Store as ReduxStore } from \"redux\";\n\nimport { b... | javascript | edit | null | null | mit | 35e083ed2ae2c8e2d0ba286303ee8f3ab120ff2e | captbaritone/markdown.today,captbaritone/markdown.today,captbaritone/markdown.today | src/store.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('soundmist').directive('player', function (Player) {\n return {\n restrict: 'E',\n scope: false,\n replace: false,\n templateUrl: 'directives/player/player.html',\n link: function (scope, element) {\n ... | javascript | edit | 0 | 3 | cc0-1.0 | 0703a2c971dc6fc0e0280c680e539a696fc81f2c | Kattjakt/soundmist,Kattjakt/soundmist | app/directives/player/player.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('dotenv').config({silent: true});\n\nconst process = require('process');\nconst http = require('http');\nconst createHandler = require('github-webhook-handler');\nconst GitHubApi = require('github');\nconst Configuration = requi... | javascript | edit | 0 | 3 | isc | 2754983001e7a5853620db4d1b13b91a944424c9 | pholleran-org/probot,probot/probot,bkeepers/PRobot,probot/probot,pholleran-org/probot,probot/probot,pholleran-org/probot,bkeepers/PRobot | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar url = require(\"url\");\nvar packageJSON = require(\"../../../package.json\");\n\nvar config = {\n // @@ENV gets replaced by build system\n environment: \"@@ENV\",\n // If the UI is served through a proxied URL, this can be set h... | javascript | edit | 0 | 0 | apache-2.0 | ffae6c6f7c935684a132b191b71bae1919ecffab | cribalik/marathon-ui,mesosphere/marathon-ui,mesosphere/marathon-ui,cribalik/marathon-ui | src/js/config/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar queue = require('queue-async');\nvar express = require('express');\nvar request = require('request');\n\nvar app = express();\napp.use(express.static(__dirname + '/static'));\n\napp.get('/:owner/:repo', function(req, res, next) {\n ... | javascript | edit | 0 | 2 | mit | 9f3981cd7e6ba35ee01a5a81e6cd1ba8f6e524f2 | stuartpb/starwatchcats,stuartpb/starwatchcats | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'common/collections/single-timeseries'\n],\nfunction (Collection) {\n return {\n requiresSvg: true,\n hasDatePicker: true,\n collectionClass: Collection,\n\n collectionOptions: function () {\n return {\n ... | javascript | edit | 0 | 4 | mit | 4a4a71225c39f12c981f8c1b5962f05154496fa3 | tijmenb/spotlight,alphagov/spotlight,keithiopia/spotlight,alphagov/spotlight,tijmenb/spotlight,keithiopia/spotlight,keithiopia/spotlight,tijmenb/spotlight,alphagov/spotlight | app/common/modules/single-timeseries.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('lodash'),\n path = require('path'),\n webpackConfig = require('./webpack.config.js');\n\n_.merge(webpackConfig, {\n devtool: 'inline-source-map',\n module: {\n preLoaders: [\n {\n test: ... | javascript | edit | 0 | 1 | mit | 27e591f9b15c2b73b3f1ddef7c7c61208f90b53c | ufocoder/WebsocketUI,ufocoder/WebsocketUI | karma.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*globals $, GOVUK, suchi */\n/*jslint\n white: true,\n browser: true */\n\n$(function() {\n \"use strict\";\n function browserWarning() {\n var container = $('<div id=\"global-browser-prompt\"></div>'),\n text = $('<p><a hr... | javascript | edit | 0 | 5 | mit | ecf867bf88ddd300d4dab1ad978db8d0554258d7 | kalleth/static,alphagov/static,tadast/static,alphagov/static,robinwhittleton/static,alphagov/static,robinwhittleton/static,tadast/static,kalleth/static,kalleth/static,tadast/static,tadast/static,kalleth/static,robinwhittleton/static,robinwhittleton/static | app/assets/javascripts/browser-check.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst striptags = require('striptags');\n\nconst { convertFormatToSeconds, convertSecondsToFormat, normalizeString } = require('../utils');\n\nclass SubtitlePiece {\n static fromSubtitlesParserItem(item) {\n return new Subtitl... | javascript | edit | 0 | 7 | mit | 1c93e4d142284de9508da497003bcb34f7ed87b8 | CLUG-kr/ming,CLUG-kr/ming | src/data/SubtitlePiece.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, {PropTypes} from 'react'\nimport FormBuilderPropTypes from '../FormBuilderPropTypes'\nimport Str from './String'\n\nexport default React.createClass({\n propTypes: {\n field: FormBuilderPropTypes.field.isRequired,\n ... | javascript | edit | 0 | 1 | mit | ba6e39146412a83443c0110af7d77e642c747115 | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | src/field-inputs/Url.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ------------------------------------\n// Constants\n\nconst COUNTER_INCREMENT = 'COUNTER_INCREMENT';\n\n// ------------------------------------\n// Action creators\n\nexport function increment(value = 1) {\n return {\n type: COUN... | javascript | edit | 0 | 2 | mit | 809aaa2d1cd4007e36c1518d8a44944e3b88a9d6 | nbschool/ecommerce_web,nbschool/ecommerce_web | src/modules/mymodule.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//@flow\n\nimport { createStore, compose, applyMiddleware } from \"redux\";\nimport { routerMiddleware } from \"react-router-redux\";\nimport createHistory from \"history/createBrowserHistory\";\nimport reducers from \"./data/reducers\"... | javascript | edit | 0 | 1 | mit | a8857834ca63ead1d53c7136ada3f27d77bc7a99 | slightly-askew/portfolio-2017,slightly-askew/portfolio-2017 | src/store.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose'),\n User = mongoose.model('User'),\n constants = require('../common/constants'),\n SHA256 = require('crypto-js/sha256');\n\nUser.findOne({username: 'admin'})\n .exec(function (err, user) {\n... | javascript | edit | 0 | 3 | mit | d78e7efdadd90cb3a167fce2d60043693e4c32e9 | TA-2016-NodeJs-Team2/Telerik-Racer,TA-2016-NodeJs-Team2/Telerik-Racer | server/init/default-users.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar telegramBot = require('node-telegram-bot-api');\nvar twitter = require('twitter');\nvar aws = require('aws-sdk');\nvar nconf = require('nconf');\nvar log4js = require('log4js');\n\nnconf.file('config', __dirname + '/config/config.js... | javascript | edit | null | null | mit | e6a72cd9754ea4bf2332c8a5262614295f10ebef | dollars0427/mtrupdate-bot | bot.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst thesaurus = require('powerthesaurus-api')\n\nmodule.exports = (router) => {\n router.use('/v1/names', (req, res, next) => {\n Promise.all(req.query.bandname.split(' ').map((name) => thesaurus(name)))\n .then((results) => {\... | javascript | edit | 0 | 2 | mit | 25b6134a2ced438ec2ab2dbfde6ff7a3003c1ab7 | signup-from-bandname/banGen,signup-from-bandname/banGen,signup-from-bandname/banGen | src/routes/names.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport http from '../http';\n\nimport albumInfo from './album';\nimport artistInfo from './artist';\n\nexport default {\n /**\n * Get extra song information (lyrics, artist info, album info).\n *\n * @param {Object} ... | javascript | edit | 0 | 4 | mit | 4de0a8456b92488180954f2994f987bdb5798256 | X-Ryl669/kutr,phanan/koel,alex-phillips/koel,X-Ryl669/kutr,phanan/koel,mikifus/koel,mikifus/koel,phanan/koel,alex-phillips/koel,alex-phillips/koel,mikifus/koel,X-Ryl669/kutr | resources/assets/js/services/info/song.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport {Button} from 'react-bootstrap'\nimport tourIcon from 'resources/tour-icon.svg'\nimport ReactSVG from 'react-svg'\n\nexport default function HopscotchLauncher(props) {\n return <Button bsStyle=\"link... | javascript | edit | 0 | 1 | mit | beffff1c70d6bc7b7dfd56144d98f3f37fd179dd | NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet | client/src/components/HopscotchLauncher.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Install ES2015-complaint polyfills for Object, Array, String, Function,\n// Symbol, Map, Set, and Promise, patching the native implementations when\n// they are available.\nrequire(\"./install-promise.js\");\n\nvar Mp = module.constr... | javascript | edit | 0 | 3 | mit | 2ae406a61f6bbe200c7e5a4c6fcb1d6422d32fc9 | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor | tools/tool-env/install-runtime.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs'),\n path = require('path');\n\n// normalize node 0.6 and 0.8\nfs.existsSync || (fs.existsSync = path.existsSync);\n\n\n\nvar platforms = {\n win32: function(folder){\n process.env.PATH += ';' + folder;\n }\... | javascript | edit | 0 | 4 | mit | 36c5d3a4f84a02c2ae467fb09e57e9db4f6c36dc | modulexcite/appjs,appjs/appjs,eric-seekas/appjs,appjs/appjs,reekoheek/appjs,SaravananRajaraman/appjs,SaravananRajaraman/appjs,milani/appjs,tempbottle/appjs,tempbottle/appjs,SaravananRajaraman/appjs,yuhangwang/appjs,eric-seekas/appjs,reekoheek/appjs,reekoheek/appjs,milani/appjs,imshibaji/appjs,modulexcite/appjs,yuhangwa... | lib/bindings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('arethusaTranslateGuiApp').service('containerHelper', [\n function() {\n var self = this;\n\n var DIRTY = 'dirty-bg';\n var CLEAN = 'clean-bg';\n\n function stats(scope) {\n return scope... | javascript | edit | 0 | 3 | mit | e356d1dda09d7303b8fead6c158c308a154607ee | LFDM/angular-translate-gui | client/app/i18n/container_helper.service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { translate } from 'react-i18next';\nimport Button from 'react-bootstrap/lib/Button';\nimport Glyphicon from 'react-bootstrap/lib/Glyphicon';\n\nconst ActionsButton... | javascript | edit | 0 | 2 | mit | e189c3bef0dfa572e4d966635475d8c23bfda79e | DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager | client/src/components/forms/FormActions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n;(function(exports) {\n var TextGrabber = function() {\n this.submittedText = \"\";\n this.currentLine = \"\";\n };\n\n TextGrabber.prototype = {\n write: function(e) {\n if (e.event === \"submit\") {\n this.subm... | javascript | edit | 0 | 4 | mit | a9e219a5e5be3b18335b5031b5c0450b1e54bd5b | maryrosecook/codewithisla | src/text-grabber.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst router = require('express').Router()\nconst nonUser = require('./non-user')\nconst user = require('./user-only')\n\nrouter.use('/', nonUser)\nrouter.use('/', user)\n\nmodule.exports = router\n\n```\n\nApply this change: Add middle... | javascript | edit | 0 | 1 | mit | cf269a26ac586a948b7cbb332e1f88113f15221b | Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge | src/routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport test from 'ava';\nimport '../src/index';\nimport FileCollection from '../src/FileCollection';\n\ntest('that it sets the output file if a src file and output directory are provided', t => {\n let src = new File('src/file.txt').... | javascript | edit | 0 | 1 | mit | 86a611bf64d3fb18bde62e3457c1c09953c4b158 | JeffreyWay/laravel-mix | test/file-collection.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar cp = require('child_process')\n\nvar BIN = '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary'\nvar ARGS = ['--load-and-launch-app=chrome']\n\nvar child = cp.spawn(BIN, ARGS)\n\n// Nod... | javascript | edit | 0 | 1 | mit | 59fa43dee003ed4b7ae16742bfd0d1e5543d431c | nicola/webtorrent,loon3/webtorrent,gillesdemey/webtorrent,beni55/webtorrent,solderzzc/webtorrent,jamesliu96/webtorrent,arestov/webtorrent,karissa/webtorrent,whitef0x0/webtorrent,ngjermundshaug/webtorrent,whitef0x0/webtorrent,akiva/webtorrent,sideffect0/webtorrent,feross/webtorrent,gillesdemey/webtorrent,nicola/webtorre... | bin/start.js | rejected_duplicate | Near-duplicate of sample 77233 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nimport {Component} from 'react'\nimport {Link} from 'react-router'\nimport Countdown from 'react-countdown-now';\nimport CountdownTimer from './CountdownTimer'\n\nconst registrationEndDate = \"Wednesday, November 15 201... | javascript | edit | 0 | 1 | mit | 962b29531ef90a415ee062a45b81c5dd927e3f18 | blockstack/blockstack-site,blockstack/blockstack-site | app/js/components/Alert.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports.config = {\n\n baseUrl: 'http://dev.hmda-pilot.ec2.devis.com/',\n\n specs: ['cucumber/*.feature'],\n\n allScriptsTimeout: 30000,\n getPageTimeout: 30000,\n\n capabilities: {\n browserName: 'chrome'\n },\... | javascript | edit | 0 | 1 | cc0-1.0 | c4e98094e2250d556566d76512f502e382d05ae5 | cfpb/hmda-pilot,LinuxBozo/hmda-pilot,LinuxBozo/hmda-pilot,cfpb/hmda-pilot,cfpb/hmda-pilot,LinuxBozo/hmda-pilot | test/functional/conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = require('path');\nvar expect = require('expect.js');\nvar walkSync = require('walk-sync');\nvar broccoli = require('broccoli');\nvar fs = require('fs');\n\n// require('mocha-jshint')();\n\nvar Tar = require('... | javascript | edit | 0 | 2 | mit | b08269f679a78d1f24774a687706927a8b00bd57 | trek/broccoli-tar,vasman/broccoli-zip | tests/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*globals mocha*/\nrequire.config({\n baseUrl: '/',\n paths: {\n 'tabler': '../',\n 'jquery': 'test/lib/jquery-1.7.1',\n 'underscore': 'test/lib/underscore'\n }\n});\nmocha.setup({\n ui: 'bdd',\n glob... | javascript | edit | 0 | 1 | mit | 9e7379f863ab7bb8b4ae2fd39530692a427df5a1 | BrandwatchLtd/tabler,BrandwatchLtd/tabler,BrandwatchLtd/tabler | test/loader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n \n angular\n .module('lecturer')\n .factory('coursesFactory', coursesFactory);\n\n /* @ngInject */\n function coursesFactory(coursesService) {\n var selectedCourse = {}... | javascript | edit | 0 | 2 | mit | b163c12143f332b276cd1104ab42598489994c6e | MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS | client/lecturer/app/courses.factory.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nExt.define('SlateAdmin.view.progress.NavPanel', {\n extend: 'SlateAdmin.view.LinksNavPanel',\n xtype: 'progress-navpanel',\n\n\n title: 'Student Progress',\n data: true,\n\n applyData: function(data) {\n if (data !... | javascript | edit | 0 | 2 | mit | 122abc843a93c20ccaa48deea0675cbd281f3c41 | SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate-admin | sencha-workspace/SlateAdmin/app/view/progress/NavPanel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport const PAUSE_STORAGE_KEY = 'is-logging-paused'\n\nexport function isLoggable({ url }) {\n // Just remember http(s) pages, ignoring data uris, newtab, ...\n const loggableUrlPattern = /^https?:\\/\\/\\w+([-/.#=$^@&%?+(),]\\w*... | javascript | edit | 0 | 7 | mit | cd2e472740ea42928b635d79a22d71d1f24024d9 | WorldBrain/WebMemex,WorldBrain/WebMemex | src/activity-logger/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env node */\n\n'use strict';\n\nmodule.exports = {\n staticFileGlobs: [\n 'index.html',\n 'bower_components/webcomponentsjs/webcomponents-*.js',\n 'images/*',\n 'favicon.ico'\n ],\n navigat... | javascript | edit | 0 | 0 | mit | 796a9e6f66b019fbe102c79ed2c0836369cde36f | frigus02/website,frigus02/website | src/sw-precache-config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/** section: scripty2 ui\n * mixin S2.UI.Mixin.Element\n * \n * Provides a few convenience methods for widgets that map easily to a\n * single element.\n**/\n\n(function() {\n var METHODS = $w('observe stopObserving show hide ' + \... | javascript | edit | 0 | 2 | mit | d938dec90ecc359be562851b91223e3512dd0dea | madrobby/scripty2,madrobby/scripty2 | src/ui/mixin/element.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).on('click', 'a', function(event) {\n var lnk = event.currentTarget;\n\n //for backwards compatibility\n var rels = lnk.rel.split(' ');\n $.each(rels, function() {\n if (this.match(/^popup/)) {\n ... | javascript | edit | 0 | 3 | bsd-2-clause | 8b5a0f5a1d7f435d23e3c220a85e4180531f3aeb | kaufmo/koala-framework,nsams/koala-framework,koala-framework/koala-framework,nsams/koala-framework,kaufmo/koala-framework,nsams/koala-framework,koala-framework/koala-framework,kaufmo/koala-framework | Kwc/Basic/LinkTag/Extern/Component.defer.js | rejected_duplicate | Near-duplicate of sample 98034 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar webpack = require(\"webpack\");\nvar path = require(\"path\");\n\nmodule.exports = {\n devtool: \"source-map\",\n entry: path.join(__dirname, \"src/main.js\"),\n\n output: {\n path: path.join(__dirname, \"build\"),\n public... | javascript | edit | 0 | 0 | mit | cb68b3bb815013c4f933665da4d1c9805e64b899 | gpbl/react-day-picker,saenglert/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker | examples/webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Collection of all business processes which where made online\n\n'use strict';\n\nmodule.exports = require('./resolve')(require('../db').BusinessProcess);\n\n```\n\nApply this change: Update up to changes in resolver"
},
{
"ro... | javascript | edit | 0 | 2 | mit | 0e7e67747c19bf2e4da0f2569563243d7f28e7cd | egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations | business-processes/index.js | rejected_duplicate | Near-duplicate of sample 94801 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar countVotes = function () {\n \"use strict\";\n // find votes for object\n var deltaVotesQuery = {\n delta: {\n $exists: true\n }\n };\n\n var deltaVotes = Votes.find(deltaVotesQuery).fetch();\n\n var voteTable = {};... | javascript | edit | 0 | 3 | mit | e25af70c3c3043e7028fa6c85d06ea976c35997e | rrevanth/news,rrevanth/news | server/votes/countVotes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nif(!this.chai) { chai = require(\"chai\"); }\nvar expect = chai.expect;\n\n(function($) {\n\tvar cleanupDom = function(){\n\t\t$('body >:not(#mocha)').remove()\n\t};\n\n\tdescribe('Featherlight', function() {\n\t\tafterEach(cleanupDom);... | javascript | edit | 0 | 1 | mit | e6080452d70ad2b16ab3fac3a93f1816549b57c1 | xStrom/featherlight,danielchikaka/featherlight,noelboss/featherlight,noelboss/featherlight,danielchikaka/featherlight,getprodigy/featherlight,xStrom/featherlight,hnkent/featherlight,minervaproject/featherlight,beeseenmedia/featherlight,n7best/featherlight,n7best/featherlight,minervaproject/featherlight,hnkent/featherli... | test/featherlight_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst t = require('tap')\nconst spawn = require('child_process').spawn\nconst split = require('split2')\nconst autocannon = require.resolve('../autocannon')\nconst target = require.resolve('./targetProcess')\n\nconst lin... | javascript | edit | 0 | 1 | mit | 0f309adcd9742f4d2a7c4f85cdaf852f19552436 | mcollina/autocannon | test/onPort.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Create action types for Redux"
},
{
"role": "assistant",
"content": "import constanst from 'flux-constants'\n\nexport default constants([\n \n 'ON_CLICK_MENU_BUTTON',\n \n 'POSTS_REQUEST',\n 'POSTS_SUCCESS',\n 'POSTS_FA... | javascript | new_file | 0 | 0 | mit | f77d3a06aa7fe7413296f91c7c6ae82c74b4c807 | nomkhonwaan/nomkhonwaan.github.io | src/constants/actionTypes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar basePage = require('../pages/Base');\n\ndescribe('Main page', function() {\n\n basePage.go();\n\n it('should be at the correct URL', function() {\n expect(basePage.currentUrl).toEqual(browser.baseUrl + basePage.url);\n ... | javascript | edit | 0 | 1 | mit | 6d505a32934e0cadf929accb8cebfce40ef63b68 | Droogans/ProtractorPageObjects | test/stories/frontPage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Entry point for server rendering subprocess\n\n/* jshint strict: false */\n\nif (process.env.NODE_ENV === undefined) {\n require(\"babel-core/register\")({\n only: ['react-forms', 'src/encoded/static'],\n });\n} else {\n ... | javascript | edit | 0 | 0 | mit | a72de95ffbd59cc74a6dd9607f28a8ec04b3315f | ENCODE-DCC/snovault,4dn-dcic/fourfront,ENCODE-DCC/encoded,4dn-dcic/fourfront,hms-dbmi/fourfront,ENCODE-DCC/snovault,ENCODE-DCC/encoded,ENCODE-DCC/snovault,ENCODE-DCC/snovault,T2DREAM/t2dream-portal,T2DREAM/t2dream-portal,ENCODE-DCC/encoded,T2DREAM/t2dream-portal,T2DREAM/t2dream-portal,hms-dbmi/fourfront,hms-dbmi/fourfr... | src/encoded/static/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst lo_isNumber = require('lodash.isnumber');\nconst lo_isString = require('lodash.isstring');\nconst lo_isObject = require('lodash.isobject');\nconst lo_has = require('lodash.has');\n\nconst math = require('mathjs');... | javascript | edit | 0 | 6 | mit | 1dec88178c4a0c939cd21045d3584a9429d702bf | appetizermonster/hain,hainproject/hain,hainproject/hain,hainproject/hain,appetizermonster/hain,hainproject/hain,appetizermonster/hain,appetizermonster/hain | app/main/plugins/hain-plugin-math/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module dependencies\n */\nimport rndstr from 'rndstr';\nimport AuthSess from '../../models/auth-session';\nimport Userkey from '../../models/userkey';\n\n/**\n * Accept\n *\n * @param {Object} params\n * @param ... | javascript | edit | 0 | 3 | mit | 9aa3a785ca1dd35c4402e6d1e655f9be30288383 | syuilo/misskey-core,syuilo/misskey-core,syuilo/misskey-core,syuilo/misskey-core | src/endpoints/auth/accept.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar hljs = require('../../build');\n\ndescribe('.getLanguage', function() {\n it('should get an existing language', function() {\n var result = hljs.getLanguage('python');\n\n result.should.be.instanceOf(Object);... | javascript | edit | 0 | 1 | bsd-3-clause | 172ec0b4c753fc6a99eb7912cf9fca06d71103fa | Sannis/highlight.js,dbkaplun/highlight.js,sourrust/highlight.js,bluepichu/highlight.js,bluepichu/highlight.js,isagalaev/highlight.js,palmin/highlight.js,palmin/highlight.js,StanislawSwierc/highlight.js,carlokok/highlight.js,teambition/highlight.js,teambition/highlight.js,dbkaplun/highlight.js,Sannis/highlight.js,highli... | test/api/getLanguage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst merge = require('webpack-merge');\r\nconst webpack = require('webpack');\r\nconst OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin');\r\nconst ExtractTextPlugin = require('extract-text-webpack-plugin');\r\nconst Man... | javascript | edit | 0 | 0 | mit | 7c333b1ea5ffa23334d81e125a87841c91c719ae | tuelsch/bolg,tuelsch/bolg | config/front.prod.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Workflow State\nexport const WORKFLOW_STATE_RUNNING = 'running';\nexport const WORKFLOW_STATE_PAUSED = 'paused';\nexport const WORKFLOW_STATE_IDLE = 'idle';\n\n```\n\nApply this change: Define constants for macro actions"
},
{
... | javascript | edit | 0 | 0 | mit | 587dc3f78c3b100ed84476849de7fc9d59a2a865 | cheton/cnc.js,cheton/cnc,cncjs/cncjs,cheton/cnc.js,cheton/piduino-grbl,cheton/cnc.js,cncjs/cncjs,cncjs/cncjs,cheton/piduino-grbl,cheton/piduino-grbl,cheton/cnc,cheton/cnc | src/app/constants/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst ANY_ARRAY = [\n 'boolean[]',\n 'integer[]',\n 'number[]',\n 'string[]',\n 'object[]',\n 'null[]',\n];\n\n// `_slice` patch operator\nconst sliceOperator = {\n attribute: ANY_ARRAY,\n\n argument: ['integer[... | javascript | edit | 0 | 2 | apache-2.0 | 54dbeb7bef3f31244dc4ca6f5b0ab5ff71c2bb3e | autoserver-org/autoserver,autoserver-org/autoserver | src/patch/operators/array.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\nvar fb = require(\"./firebaselogin.js\");\nvar db = fb.database();\nvar ref = db.ref();\nvar glob = require('glob');\n\nexports.test = function(req, res) {\n ref.on(\"value\"... | javascript | edit | 0 | 3 | mit | 60248caad30d984b8879d260b0a3d1c2a1105565 | hookbot/multi-player,hookbot/multi-player | server/api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {createContainer} from 'stardux'\nimport View from '../../../src/dragon/views/base'\n\ndescribe('Unit: View', function() {\n\n /*\n TODO: what happens if:\n - there is no container?\n - there is no template?\n *... | javascript | edit | 0 | 1 | mit | b5e9d9134e49a3e467921c07f967e0c7e5e6ab0b | chrisabrams/dragon,chrisabrams/dragon | test/unit/views/base.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass OutletsReceivable {\n static transform(modified, ...names) {\n modified.outlets = names;\n modified._argsTransformFns.push(this.filterOutlets.bind(null, modified));\n }\n\n static filterOutlets(modified, opt... | javascript | edit | 0 | 6 | mit | 9cbfc459fd163d79d7e8e99e339a05f04377cb66 | darvelo/ether,darvelo/ether,darvelo/ether | src/classes/modifiers/outlets-receivable.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = (req, res, next, {\n /**\n * @param acceptableDomains\n *\n * List of fully qualified accceptable domain names.\n * Should be for example 'safaricom.co.ke', not just 'safaricom' or 'co.ke'\n *\n * IMPORTANT... | javascript | edit | 0 | 5 | mit | 9673596b7c313b8544c51f0053131008909de6dc | Waiyaki/provisioning-scheduler,Waiyaki/provisioning-scheduler,Waiyaki/provisioning-scheduler | server/middleware/requireEmailWithDomains.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction(resp) {\n var flights = resp.rows.map(function(r) {\n return {\n flight : r.key[0]\n };\n });\n flights.unshift({\"flight\": \"All\"});\n return {flights:flights};\n}\n\n//@ sourceURL=/finder/data.js\n\n\n```\n\n... | javascript | edit | 0 | 1 | apache-2.0 | fc7023dcefd21b3e376e63facdb94d3dde8b3bf0 | shmakes/hf-basic,shmakes/hf-basic | evently/finder/loggedIn/data.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { AtomicBlockUtils } from 'draft-js';\n\nclass ImageSource extends React.Component {\n componentDidMount() {\n const { editorState, options, onUpdate } = ... | javascript | edit | 0 | 2 | mit | d87ae0303852f1021f76200c062a0bf666a645e3 | springload/draftail,springload/draftail,springload/draftail,springload/draftail | examples/sources/ImageSource.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe('Import JSON', () => {\n it('should work properly', () => {\n cy.loginVisit('/')\n\n cy.fixture('import.json').then(IMPORT_API => {\n // Click [Import JSON] button\n cy.get('.j-buttons__wrapper > a[href=\"/new\... | javascript | edit | 0 | 1 | mit | a4f0ef9e898417a51bcc7a92c1e81605b62df5ce | hellofresh/janus-dashboard,hellofresh/janus-dashboard | tests/features/api/02-import-json_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\njsio('from shared.javascript import Class')\njsio('import fan.ui.Button')\njsio('import fan.ui.RadioButtons')\njsio('import fan.tasks.views.View')\n\nexports = Class(fan.tasks.views.View, function(supr) {\n\t\n\tthis._className += ' Tas... | javascript | edit | 0 | 1 | mit | 81dc99e8e63041c57c477fda1c56da228c259fcf | marcuswestin/Focus | fan/tasks/views/TaskItemView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Light } from './Light';\n\n/**\n * @author mrdoob / http://mrdoob.com/\n */\n\nfunction AmbientLight( color, intensity ) {\n\n\tLight.call( this, color, intensity );\n\n\tthis.type = 'AmbientLight';\n\n\tthis.castShadow = undef... | javascript | edit | 0 | 1 | mit | 3abc44cceb5d10905092384b98a6d1c51a267180 | spite/three.js,ndebeiss/three.js,TristanVALCKE/three.js,kaisalmen/three.js,sasha240100/three.js,amakaroff82/three.js,jostschmithals/three.js,mese79/three.js,aardgoose/three.js,Ludobaka/three.js,rlugojr/three.js,Jozain/three.js,matgr1/three.js,WestLangley/three.js,fraguada/three.js,nhalloran/three.js,nhalloran/three.js,... | src/lights/AmbientLight.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n before : function(client) {\n console.log('Setting up functional tests...');\n client\n .url('http://localhost:3000')\n .pause(1000);\n },\n\n after : function(client) {\n console.log('Closing ... | javascript | edit | 0 | 1 | mit | 7c42661294649483a283fc6d15866ea044da9bc4 | coshx/cmv-app,coshx/cmv-app | test/functional/initialize_map.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconsole.log(\"menu-fill\");\n\nvar menu_env = $(\"#menu-env\");\n\n\nvar item1 = menu_env_data[0];\nvar item2 = menu_env_data[1];\n\n\nfunction createLinkItem (item) {\n var _a = $(\"<a/>\", { href: item.link });\n $(\"<i/>\", { class... | javascript | edit | 0 | 2 | mit | f418d87d1c57b19ac5fb85ab14fa2f57db63ac06 | vejuhust/yet-another-monitoring-dashboard,vejuhust/yet-another-monitoring-dashboard | content/menu-fill.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.