messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar should = require(\"should\");\n\nvar rank = require(\"../index.js\").rank;\n\ndescribe(\"Rank calculation\", function() {\n\n var points = 72;\n\n var hours = 36;\n\n var gravity = 1.8;\n\n describe(\"Calulate the rank f... | javascript | edit | 0 | 1 | mit | 8dcc55af2eb7c286565351909134bded508b3d98 | tlksio/librank | test/rank.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nexport default ({members, preview, props: { submit_custom_email, edit_custom }}) =>\n <div className='custom-email-preview'>\n <div className='email-recipients'>\n <h2>Email Recipients</h2>\n ... | javascript | edit | 0 | 1 | mit | 321b5b9b916d5afd386de72da882873e7e67e70c | foundersandcoders/sail-back,foundersandcoders/sail-back | src/admin/dumb_components/preview_custom_email.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass Disposable{\n constructor(callback){\n this.disposed = false\n this.callback = callback\n }\n dispose(){\n if(this.disposed) return\n this.callback()\n this.callback = null\n }\n}\nmodule.exports = Disposable\n\... | javascript | edit | 0 | 3 | mit | 161b09e250f0e5f822907994488a39ec6a16e607 | ZoomPK/event-kit,steelbrain/event-kit | src/Disposable.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module('arethusa.core').directive('rootToken', [\n 'state',\n 'depTree',\n function(state, depTree) {\n return {\n restrict: 'A',\n scope: {},\n link: function(scope, element, attrs) {\n ... | javascript | edit | 0 | 3 | mit | b3ca504604f8fd25ef428042909a4bad75736967 | PonteIneptique/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa | app/js/arethusa.core/directives/root_token.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport test from 'tape'\nimport { connection } from '../config/rethinkdb'\n\nimport './server/helpers/config'\nimport './server/helpers/createStore'\nimport './server/helpers/renderApp'\nimport './server/config/rethinkdb'\nimport './ser... | javascript | edit | 0 | 1 | mit | e87f9a09f2199d239cfc662f8580010fa3caa8e4 | mike-engel/bkmrkd,mike-engel/bkmrkd,mike-engel/bkmrkd | test/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport mongoose from 'mongoose';\nimport { Promise } from 'es6-promise';\nmongoose.Promise = Promise;\nimport findOrCreate from 'mongoose-findorcreate';\n\nconst Schema = mongoose.Schema;\n\nconst TripSchema = new Schema( {\n userId: {... | javascript | edit | 0 | 1 | mit | c7f38e0b6f91a920c6d9e38ee7cceaced50cdf49 | sirbrillig/voyageur-js-server | app/models/trip.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n var mds = angular.module('mds', [\n 'motech-dashboard', 'entityService','instanceService', 'mdsSettingsService', 'ngCookies', 'ui.directives',\n 'ngRoute', 'ui.directives'\n ]);\... | javascript | edit | 0 | 1 | bsd-3-clause | ae9018e0442b5ce077d4d771712bae5ba378e448 | pmuchowski/modules,sebbrudzinski/modules,wstrzelczyk/modules,koshalt/modules,LukSkarDev/modules,atish160384/modules,tstalka/modules,frankhuster/modules,LukSkarDev/modules,atish160384/modules,shubhambeehyv/modules,tstalka/modules,koshalt/modules,frankhuster/modules,mkwiatkowskisoldevelo/modules,shubhambeehyv/modules,jus... | modules/mds/src/main/resources/webapp/js/app.js | rejected_duplicate | Near-duplicate of sample 84024 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport Icon from './components/base/icons/Icon';\n\nexport Alert from './components/base/containers/Alert';\nexport Drawer from './components/base/containers/Drawer';\nexport Fieldset from './components/base/containers/Fieldset';\nexpor... | javascript | edit | null | null | mit | 20b21a65d7c3beb0e91bc3edec78139205767fa8 | jrios/es-components,jrios/es-components,TWExchangeSolutions/es-components,jrios/es-components,TWExchangeSolutions/es-components | src/index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n World functions\n */\n\nimport _ from 'underscore';\n\nexport const create = () => {\n return {\n tripods: [],\n food: []\n };\n};\n\nexport const addTripod = (world, tripod) => {\n world.tripods.push(tripod);\n};\n\nex... | javascript | edit | 0 | 2 | bsd-2-clause | a40324a5b03ab497822a4e2287b9d6ef37d5848b | rumblesan/tripods,rumblesan/tripods | src/World.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Instance of the Bolt module.\n *\n * @namespace Bolt\n *\n * @mixes Bolt.actions\n * @mixes Bolt.activity\n * @mixes Bolt.app\n * @mixes Bolt.ckeditor\n * @mixes Bolt.conf\n * @mixes Bolt.data\n * @mixes Bolt.datetime\n * @mixes... | javascript | edit | 0 | 0 | mit | 638a38a53544f1ed1854b2215125ef224ef085b2 | Eiskis/bolt-base,tekjava/bolt,HonzaMikula/masivnipostele,pygillier/bolt,Intendit/bolt,pygillier/bolt,richardhinkamp/bolt,hugin2005/bolt,cdowdy/bolt,HonzaMikula/masivnipostele,nantunes/bolt,romulo1984/bolt,GawainLynch/bolt,codesman/bolt,GawainLynch/bolt,CarsonF/bolt,richardhinkamp/bolt,bolt/bolt,Intendit/bolt,nikgo/bolt... | app/src/js/bolt.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @package admiral\n * @author Andrew Munsell <<EMAIL>>\n * @copyright 2015 WizardApps\n */\n\nvar Fleetctl = require('fleetctl'),\n Promise = require('bluebird');\n\nexports = module.exports = function(nconf) {\n var option... | javascript | edit | 0 | 2 | mit | d85193139375a5e907bb90bf9dc1fc01b5e4e732 | andrewmunsell/admiral | src/fleet.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar GameController = require(\"./GameController\");\n\nexports.fire = function (req, res) {\n\n var player = req.body.username;\n var x = req.body.x;\n var y = req.body.y;\n\n GameController.findGame(player).then(function(game) {\n ... | javascript | edit | 0 | 4 | mit | b439d4a79f607eca47b7444254270b66c4676603 | andereld/progark,andereld/progark | server/controllers/Play.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar StubGenerator = require('./stub-generator');\nvar CachingBrowserify = require('./caching-browserify');\nvar mergeTrees = require('broccoli-merge-trees');\n\nmodule.exports = {\n name: 'ember-browserify',\n\n included: function(app... | javascript | edit | 0 | 4 | mit | 936c009c1887b4f45690f9265c48aabc19c0cb4c | chadhietala/ember-browserify,ef4/ember-browserify,stefanpenner/ember-browserify,asakusuma/ember-browserify | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n/**\n * Library version.\n */\n\nexports.version = '0.0.1';\n\n/**\n * Constructors.\n */\n\nexports.Batch = require('./batch');\nexports.Parser = require('./parser');\nexports.Socket = require('./sockets/sock');\nexports.Queue = requ... | javascript | edit | 0 | 2 | mit | 3f8fa230aa2e645ef0143e47954a559820153d17 | DavidCai1993/axon,Unitech/pm2-axon,Unitech/axon,tj/axon,Unitech/axon,Unitech/pm2-axon,tj/axon,DavidCai1993/axon | lib/index.js | rejected_duplicate | Near-duplicate of sample 83752 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Module dependencies\n */\n\nvar autoprefixer = require('autoprefixer');\nvar postcss = require('postcss');\nvar atImport = require('postcss-import');\nvar calc = require('postcss-calc');\nvar customMedia = require('postcss-custo... | javascript | edit | 0 | 3 | mit | 8091723fda06b99d76fd59946602835c7e8d8689 | travco/preprocessor,suitcss/preprocessor | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport hasCallback from 'has-callback';\nimport promisify from 'es6-promisify';\nimport yargsBuilder from 'yargs-builder';\n\nimport renamerArgsBuilder from './renamerArgsBuilder';\nimport fsRenamer from './fsRenamer';\nimport getExisti... | javascript | edit | 0 | 3 | mit | 9bd6a642236fbb1d3a638d29f3f85b5dc6997f46 | rohanorton/batch-file-renamer | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * The Searchbox module.\n *\n * @return searchbox class (extends Backbone.View).\n */\ndefine([\n 'underscore',\n 'backbone',\n 'handlebars',\n 'map/views/Widget',\n 'map/presenters/SearchboxPresenter',\n 'text!map/templates... | javascript | edit | 0 | 9 | mit | d5e7c6daa667e5fa5d0258a84791902b0ec08ca8 | KarlaRenschler/gfw,Vizzuality/gfw,codeminery/gfw,KarlaRenschler/gfw,codeminery/gfw,KarlaRenschler/gfw,Vizzuality/gfw,codeminery/gfw,cciciarelli8/gfw,apercas/gfw,KarlaRenschler/gfw,apercas/gfw,apercas/gfw,apercas/gfw,codeminery/gfw,cciciarelli8/gfw | app/assets/javascripts/map/views/SearchboxView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { AutoSizer } from 'react-virtualized';\n\nimport Kanban from './Kanban';\n\nimport Perf from 'react-addons-perf';\n\nimport 'react-virtualized/styles.css';\nimport '... | javascript | edit | 0 | 1 | mit | 43d99e445612c68b56861c6c456096468e19ccd1 | edulan/react-virtual-kanban,edulan/react-virtual-kanban | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = require('./ServerlessOffline.js');\n\n// Serverless exits with code 1 when a promise rejection is unhandled. Not AWS.\n// Users can still use their own unhandledRejection event though.\nprocess.removeAllListeners('unhan... | javascript | edit | 0 | 0 | mit | 9bbd4b0e9dc448e9461df0ba11a4198b03693f66 | dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst url = require('url');\n\nmodule.exports = function(env, callback) {\n class CNAME extends env.plugins.Page {\n getFilename() {\n return 'CNAME';\n }\n\n getView() {\n return (env, locals, conte... | javascript | edit | 0 | 2 | mit | 8be34454952c75759258c463206855a39bfc1dde | xavierdutreilh/wintersmith-cname | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport SVGInjector from 'svg-injector';\n\nexport default class ReactSVG extends Component {\n\n static defaultProps = {\n evalScripts: 'never',\n callback: () => {}\n }\n\n ... | javascript | edit | 0 | 2 | mit | 974cb4efbbabcad2cf93eb4938c5414ccb92eb41 | atomic-app/react-svg | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { GRAPHQL_URL } from 'constants';\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { Router, browserHistory } from 'react-router';\nimport { syncHistoryWithStore } from 'react-router-redux';\nimport with... | javascript | edit | 0 | 4 | mit | 7e5b2f723ec07571d987f176083694396b6f4098 | garden-aid/web-client,garden-aid/web-client,garden-aid/web-client | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nimport {Video} from 'kaleidoscopejs';\nimport {ContainerPlugin, Mediator, Events} from 'clappr';\n\nexport default class Video360 extends ContainerPlugin {\n constructor(container) {\n super(container);\n Mediator.on(`${this.op... | javascript | edit | 0 | 3 | mit | 5bd8a33f12bb38bfb32cbc330d483c711dd32655 | thiagopnts/video-360,thiagopnts/video-360 | src/index.js | rejected_duplicate | Near-duplicate of sample 103276 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport '../vendor/gridforms.css'\n\nimport React, {cloneElement, Children, PropTypes} from 'react'\n\nlet classNames = (...args) => args.filter(cn => !!cn).join(' ')\n\nexport let GridForm = ({children, className, component: Component, ... | javascript | edit | 0 | 2 | mit | aeaafbdeaf6d4f13cc38d5ba9bc05b9508550bad | insin/react-gridforms | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport path from 'path';\nimport fs from 'fs';\nimport collect from './collect';\n\n\nlet runOnAllFiles;\n\nfunction hasFlowPragma(source) {\n return source\n .getAllComments()\n .some(comment => /@flow/.test(comment.value));\n}\... | javascript | edit | 0 | 11 | mit | 52e91f6eadb2d6577bd67e525d851fc4e3213187 | namjul/eslint-plugin-flowtype-errors | src/index.js | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nimport {Video} from '@thiagopnts/kaleidoscope';\nimport {ContainerPlugin, Mediator, Events} from 'clappr';\n\nexport default class Video360 extends ContainerPlugin {\n constructor(container) {\n super(container);\n Mediator.on(... | javascript | edit | 0 | 3 | mit | 36e75858d0c6b10d11d998d2d205be7d237c7bb8 | thiagopnts/video-360,thiagopnts/video-360 | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport arrayBufferToImage from './arrayBufferToImage.js';\nimport createImage from './createImage.js';\nimport { loadImage, configure } from './loadImage.js';\nimport { external } from './externalModules.js';\n\nexport {\n arrayBufferT... | javascript | edit | 0 | 0 | mit | 53bf7d8625644477eb9d5fc6c5a5070979b573c4 | cornerstonejs/cornerstoneWebImageLoader,chafey/cornerstoneWebImageLoader | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Listing of all the infrastructure unit tests\ndefine([\n\t\"./Destroyable\",\n\t\"./register\",\n\t\"./Widget-attr\",\n\t\"./handlebars\",\n\t\"./Widget-lifecycle\",\n\t\"./Widget-placeAt\",\n\t\"./Widget-utility\",\n\t\"./HasDropDow... | javascript | edit | 0 | 0 | bsd-3-clause | b4c7d9e420f19ce8c30411288bdcdbe32c329d5d | EAlexRojas/deliteful,brunano21/deliteful,brunano21/deliteful,EAlexRojas/deliteful,cjolif/deliteful,tkrugg/deliteful,kitsonk/deliteful,tkrugg/deliteful,harbalk/deliteful,harbalk/deliteful,kitsonk/deliteful,cjolif/deliteful | tests/unit.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst _ = require('underscore');\nconst app = require('express')();\nconst Analytics = require('analytics-node');\nconst { secrets } = require('app/config/config');\nconst { guid } = require('./users');\n\nconst segmen... | javascript | edit | 0 | 2 | mit | e3e7b721228250a7dc4c899f1e4e4d7841a71b0b | heymanhn/journey-backend | utils/analytics.js | rejected_duplicate | Near-duplicate of sample 82344 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction AutoFillTodaysDate(day, month, year) {\n\n\tvar dod_elm = document.getElementById(\"todaysDateOfDisposalLabel\");\n\tvar dod_day = document.getElementById(\"dateOfDisposal_day\");\n\tvar dod_month = document.getElementById(\"da... | javascript | edit | 0 | 2 | mit | a7db683614c87ef00adec299f4b1c4a359b4c2f2 | dvla/vehicles-online,dvla/vehicles-presentation-common,dvla/vrm-retention-online,dvla/vehicles-presentation-common,dvla/vehicles-presentation-common,dvla/vehicles-online,dvla/vehicles-online,dvla/vrm-retention-online,dvla/vrm-retention-online,dvla/vrm-retention-online,dvla/vehicles-online | public/javascripts/autofill-todays-date.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { ApolloServer } = require('apollo-server-micro')\n\nconst { schema } = require('./schema')\nconst { createErrorFormatter, sentryIgnoreErrors } = require('./errors')\n\nmodule.exports = function createHandler(options) {\n let Sen... | javascript | edit | 0 | 2 | mit | b6a4044bee87508bfa9aa64225444d505a2265a9 | relekang/micro-rss-parser | src/index.js | rejected_duplicate | Near-duplicate of sample 90635 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n \"less!src/stylesheets/main.less\"\n], function() {\n var manager = new codebox.tabs.Manager({\n draggable: false\n });\n manager.$el.addClass(\"component-panels\");\n\n // Add tabs to grid\n codebox.... | javascript | edit | 0 | 1 | apache-2.0 | d9311ed552d14982e998e7bef1af66f0be0e1394 | etopian/codebox-package-panels,CodeboxIDE/package-panels | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport getComponentName from '../getComponentName';\n\n/* eslint-disable */\nclass Foo extends Component {\n render() {\n return <div />;\n }\n}\n\nfunction Bar() {\n return <di... | javascript | edit | 0 | 1 | apache-2.0 | 2825d4a0991fb7d2db5ab72f4e6cba84ef0b552b | iCHEF/gypcrete,iCHEF/gypcrete | src/utils/__tests__/getComponentName.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { compose, createStore } from 'redux';\nimport middleware from './middleware';\nimport reducers from './reducers';\n\nfunction configureStore() {\n return compose(middleware)(createStore)(reducers);\n}\n\nexport var store = conf... | javascript | edit | 0 | 1 | mit | 42c9b6b124955a68f37517f72a20203eaaa3eb6c | roryaronson/farmbot-web-frontend,FarmBot/farmbot-web-frontend,RickCarlino/farmbot-web-frontend,MrChristofferson/farmbot-web-frontend,RickCarlino/farmbot-web-frontend,roryaronson/farmbot-web-frontend,roryaronson/farmbot-web-frontend,MrChristofferson/farmbot-web-frontend,FarmBot/farmbot-web-frontend | src/store.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar parser = require('./parser');\nvar Interpreter = require('./interpreter');\n\nfunction TileAction(tile, tileX, tileY, key, data, renderer, callback) {\n this.tile = tile;\n this.key = key;\n this.data = data;\n this.tileX = tile... | javascript | edit | 0 | 7 | mit | 771de23463c5cb631aaee43df25f497741fab5e8 | tnRaro/AheuiChem,tnRaro/AheuiChem,yoo2001818/AheuiChem,yoo2001818/AheuiChem | src/action.js | rejected_duplicate | Near-duplicate of sample 87114 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('igTruncate', []).filter('truncate', function (){\n return function (text, length, end){\n if (text !== undefined){\n if (isNaN(length)){\n length = 10;\n }\n\n if (end === undefined){\n e... | javascript | edit | 0 | 6 | mit | 1da5e1ebc06d7e34eb62b8f8b242df2c7acbcedb | OpenCST/angular-truncate | src/igTruncate.js | rejected_duplicate | Near-duplicate of sample 79642 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar Assignment = new mongoose.Schema({\n due: {\n type: Date,\n required: true\n },\n description: {\n type: String\n },\n posted: {\n type: Number,\n required: true\n }\n});\nmo... | javascript | edit | 0 | 0 | mit | 911db01256b1f2e9f3639e7767804a82351da48a | librecms/librecms-api | schemata/Assignment.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar assign = require('lodash').assign;\nvar utils = require('gulp-util');\nvar webpack = require('webpack');\nvar PluginError = utils.PluginError;\n\nvar defaults = {\n optimize: false,\n plugins: {\n webpack: {\n ... | javascript | edit | 0 | 2 | mit | 4faef2bde754588c884b3488071f1592d5c17611 | cloudfour/core-gulp-tasks | lib/js.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @module utils\n */\nvar utils = module.exports = {};\n\n\n/**\n * Given a JSON string, convert it to its base64 representation.\n *\n * @method\n * @memberOf utils\n */\nutils.jsonToBase64 = function (json) {\n var bytes = new ... | javascript | edit | 0 | 3 | mit | 633a10075f7c1feab809526cf64b07e7ce8d1832 | auth0/node-auth0,Annyv2/node-auth0 | src/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { call, takeLatest, select } from 'redux-saga/effects';\nimport { TOGGLE_NOTIFICATION } from 'common/actionTypes/userSettings';\nimport { ENABLE_VOTING } from 'common/actionTypes/voting';\nimport { notify, notifyPermission } from... | javascript | edit | 0 | 2 | mit | 98aea0edf7154b80fcc7c0acb3921f3776e23190 | dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta | client/src/features/userSettings/sagas.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar childProcess = require('child_process');\nvar fs = require('fs');\nvar path = require('path');\n\nfunction isMangarack(key) {\n return /^mangarack/.test(key);\n}\n\nfs.readdirSync(__dirname).forEach(function(folderName) {\n if... | javascript | edit | 0 | 2 | mit | 3901dd45585eacebe1e0b4d7fd55aab0b94cefa2 | Deathspike/mangarack.js,MangaRack/mangarack,MangaRack/mangarack,Deathspike/mangarack.js,MangaRack/mangarack,Deathspike/mangarack.js | update-npm.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Karma configuration\n//\n// For all available config options and default values, see:\n// http://karma-runner.github.io/0.10/config/configuration-file.html\n\nmodule.exports = function (config) {\n 'use strict';\n\n config.set({\n ... | javascript | edit | 0 | 3 | apache-2.0 | 9484f3cb37841c988a1e1893645ba99693d9d896 | giovaneliberato/tablero,giovaneliberato/tablero,TWtablero/tablero,giovaneliberato/tablero,TWtablero/tablero,TWtablero/tablero,giovaneliberato/tablero,TWtablero/tablero | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// jest-dom adds custom jest matchers for asserting on DOM nodes.\n// allows you to do things like:\n// expect(element).toHaveTextContent(/react/i)\n// learn more: https://github.com/testing-library/jest-dom\nimport \"@testing-library/j... | javascript | edit | 0 | 1 | bsd-3-clause | 639e97117d9651f6cee03474686b787f5e59c9a8 | plone/mockup,plone/mockup,plone/mockup | src/setupTests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\n\nmodule.exports = function(config) {\n config.set({\n basePath: '',\n frameworks: ['jasmine'],\n preprocessors: { 'src/testception-spec.js': ['webpack'] },\n files: ['src/testception-spec.js'... | javascript | edit | 0 | 1 | mit | 73a85ead520c66583a748667b109225cb894c5e0 | fvanwijk/testception | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n/* Gear task runner. Executes Gearfile using a tasks workflow.\n * See http://gearjs.org/#tasks.tasks\n *\n * Usage:\n * > gear\n */ \nvar gear = require('../index'),\n vm = require('vm'),\n path = require('... | javascript | edit | 0 | 6 | bsd-3-clause | 552909944462a4c541a00af5b7508dbf391f41fc | twobit/gear | bin/gear.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add test case for new npm/module-aware compiler"
},
{
"role": "assistant",
"content": "var compiler = require('../compiler')\n\ncompiler.compileJS('require(\"socket.io/support/socket.io-client/socket.io\")')\n\n"
}
] | javascript | new_file | 0 | 0 | mit | 32dc1fe382cda7b53c2bfacc02811849dc0a616b | marcuswestin/require,marcuswestin/require | test/node.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe('attributeName filter', function() {\n var filter;\n beforeEach(angular.mock.module('PraxisDocBrowser'));\n\n beforeEach(inject(function(attributeNameFilter, $sce) {\n filter = function(input) {\n return $sce.getTrus... | javascript | edit | 0 | 2 | mit | 9491446d1b1d91e5c148fd6f943148c08de8de76 | rightscale/praxis,praxis/praxis,rightscale/praxis,gampleman/praxis,gampleman/praxis,rightscale/praxis,gampleman/praxis | spec/api_browser/filters/attribute_name_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar webpackConfig = require(\"./webpack.config\");\nObject.assign(webpackConfig, {\n debug: true,\n devtool: \"inline-source-map\"\n});\n\nwebpackConfig.externals.push(\"react/lib/ExecutionEnvironment\");\nwebpackConfig.externals.... | javascript | edit | 0 | 1 | apache-2.0 | a2e8380767936e874924736793a8c2de5ead590a | FlockOfBirds/carousel,mendixlabs/carousel,FlockOfBirds/carousel,mendixlabs/carousel | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n;(function ($, window, document, undefined) {\n 'use strict';\n\n Foundation.libs.offcanvas = {\n name : 'offcanvas',\n\n version : '5.0.3',\n\n settings : {},\n\n init : function (scope, method, options) {\n this.eve... | javascript | edit | 0 | 1 | mit | c3c8ec9ed9f153cc77fd5ae82b889c1b5bd1cf36 | mbarlock/foundation,aoimedia/foundation,dragthor/foundation-sites,dragthor/foundation-sites,jaylensoeur/foundation-sites-6,gnepal7/foundation,dimamedia/foundation-6-sites-simple-scss-and-js,karland/foundation-sites,joe-watkins/foundation,atmmarketing/foundation-sites,walbo/foundation,ysalmin/foundation,oller/foundation... | js/foundation/foundation.offcanvas.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport function extend(obj) {\n var arg, i, k;\n\n for (i = 1; i < arguments.length; i++) {\n arg = arguments[i];\n\n for (k in arg) {\n if (arg.hasOwnProperty(k)) {\n obj[k] = arg[k];\n ... | javascript | edit | 0 | 5 | mit | cfea5e5c4a7a8f78382930a2445299f8ca9da50a | chemoish/videojs-chapter-thumbnails,chemoish/videojs-chapter-thumbnails | src/helper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\r\n * Bulgarian translation for bootstrap-datepicker\r\n * Apostol Apostolov <<EMAIL>>\r\n */\r\n;(function($){\r\n\t$.fn.datepicker.dates['bg'] = {\r\n\t\tdays: [\"Неделя\", \"Понеделник\", \"Вторник\", \"Сряда\", \"Четвъртък\", \"... | javascript | edit | 0 | 1 | apache-2.0 | cbe9f82b34c63c8ffdcb7f117fdb5ab3a268b575 | kiwiupover/bootstrap-datepicker,dswitzer/bootstrap-datepicker,vsn4ik/bootstrap-datepicker,i-am-kenny/bootstrap-datepicker,champierre/bootstrap-datepicker,nilbus/bootstrap-datepicker,dswitzer/bootstrap-datepicker,Youraiseme/bootstrap-datepicker,yangyichen/bootstrap-datepicker,Habitissimo/bootstrap-datepicker,hebbet/boot... | js/locales/bootstrap-datepicker.bg.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport './index.css';\nimport React, { PropTypes } from 'react';\n\nimport HashLink from './../HashLink';\nimport ConceptTile from './../ConceptTile';\nimport ConceptDragSource from '../ConceptDragSource';\nimport Padding from '../Paddi... | javascript | edit | 0 | 1 | mit | dfea4618f46b69c37df36a27de3e4d1327c7203f | transparantnederland/relationizer,waagsociety/tnl-relationizer,transparantnederland/browser,waagsociety/tnl-relationizer,transparantnederland/browser,transparantnederland/relationizer | app/components/ConceptList/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n(function() {\n\n angular.module('ncsaas')\n .directive('loginbox', function($window) {\n return {\n restrict: 'A',\n link: function(scope, element, attrs) {\n var winHeight = $window.inn... | javascript | edit | 0 | 1 | mit | 8199d30354e83690343e4c779073de7dee523842 | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | app/scripts/directives/login-box.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @ngdoc service\n * @name ausEnvApp.environment\n * @description\n * # environment\n * Service in the ausEnvApp.\n */\nangular.module('ausEnvApp')\n .service('environment', function () {\n var service = this;... | javascript | edit | 0 | 1 | bsd-2-clause | 275b8f8017bd196c40aef8b1b2c753f56a31fa14 | ANU-WALD/aus-env,ANU-WALD/aus-env,ANU-WALD/aus-env,ANU-WALD/aus-env | app/scripts/services/environment.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// MRのassignee_nameが既知の場合には、チャットワークの通知先IDを設定します。\nexport default function(req, res, next) {\n if (req.objectKind === 'merge_request') {\n if (req.body.object_attributes.assignee_name === 'shigeru.nakajima') {\n req.body.object_... | javascript | edit | 0 | 3 | mit | 4c38d0fcc5f7eb620ca052f02e0db98ed81b0724 | luxiar/syamo,ledsun/syamo,luxiar/syamo,ledsun/syamo | lib/filter/mappingAssignee.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Chrome = require('../');\nvar assert = require('assert');\n\ndescribe('registering event', function () {\n describe('\"event\"', function () {\n it('should give the raw message', function (done) {\n Chrome(funct... | javascript | edit | 0 | 1 | mit | db403e516d5583f9cd5dbe9e3921f1c369f25d2b | cyrus-and/chrome-remote-interface,cyrus-and/chrome-remote-interface | test/event.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar method = require('../../waterlock-ldap-auth');\nvar ldap = method.ldap;\nvar connection = method.connection;\n\n/**\n * Login action\n */\nmodule.exports = function(req, res) {\n \n var params = req.params.all();\... | javascript | edit | 0 | 3 | mit | 7ac46ed8e33285064d1a96989e55ceb365928542 | OpenServicesEU/waterlock-ldap-auth,waterlock/waterlock-ldap-auth,OpenServicesEU/waterlock-ldap-auth,waterlock/waterlock-ldap-auth,fladi/waterlock-ldap-auth,fladi/waterlock-ldap-auth,corycollier/waterlock-multiple-ldap-auth,corycollier/waterlock-multiple-ldap-auth | lib/controllers/actions/login.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar assert = require('assert');\n\ndescribe(\"Basic Test\", function(){\n it(\"Loads the basic demo page and sends values to server\", function(){\n browser.url('http://localhost:7888/src/e2e-tests/basic-demo-page?auto-activat... | javascript | edit | null | null | mit | 65160150bb563a5db8757c7bc2966dd38eff4dfb | mattzeunert/glasswing,mattzeunert/glasswing,mattzeunert/glasswing | src/e2e-tests/basic.e2e.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//I hear you like to run node in your node, so I'm testing node using node\r\nvar spawn = require('spawn-cmd').spawn,\r\n testProcess = spawn('node ./src/index.js < ./tests/eval.js'),\r\n assert = require('assert');\r\n\r\ntestPro... | javascript | edit | 0 | 1 | mit | b0888069daf80486d38944063e4661a362d29d7c | chad-autry/stdin-eval-stdout | tests/test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nQUnit.module(\"png\");\n\nQUnit.test(\"png-image-element format returns an image\", function(assert) {\n var done = assert.async();\n \n var image = Viz(\"digraph { a -> b; }\", { format: \"png-image-element\" });\n\n assert.ok(imag... | javascript | edit | 0 | 2 | mit | 9ef7d006c9c882043d2c6f6e27a62d6d26198dac | mdaines/viz.js,mdaines/viz.js,mdaines/viz.js,mdaines/viz.js | tests/png.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Isomorphic CSS style loader for Webpack\n *\n * Copyright © 2015 Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this sour... | javascript | edit | 0 | 2 | mit | 6834d216400f61c3682ee3974977e73f2d0da0b7 | 5punk/isomorphic-style-loader,kriasoft/isomorphic-style-loader | src/withStyles.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * Start Bootstrap - Agency Bootstrap Theme (http://startbootstrap.com)\n * Code licensed under the Apache License v2.0.\n * For details, see http://www.apache.org/licenses/LICENSE-2.0.\n */\n\n// jQuery for page scrolling feature ... | javascript | edit | 0 | 2 | apache-2.0 | 1282f064f119e2d1b27dc5ec84dd952cb2201ae5 | jamlamberti/startbootstrap-agency,jamlamberti/startbootstrap-agency,jamlamberti/startbootstrap-agency | js/agency.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { ipcMain } = require('electron');\n\nfunction isPromise(object) {\n return object.then && typeof(object.then) === 'function';\n}\n\nfunction isGenerator(object) {\n return object.next && typeof(object.next) === 'function';\... | javascript | edit | 0 | 4 | mit | f0ab55e742304db3f1e23a30d73108cd2ac88aee | kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop | src/app/lib/ipc_handler.js | rejected_duplicate | Near-duplicate of sample 91411 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\n// Create a pushover instance\nconst pushover = new (require('pushover-notifications'))({\n user: process.env.PUSHOVER_USER,\n token: process.env.PUSHOVER_TOKEN\n})\n\n// Load utilities\nconst i18n = require('../../loc... | javascript | edit | 0 | 4 | mit | f3ee98e068265aecbde8e52fafbe955ea1480bd6 | jHoldroyd/trollmoji | app/libs/utils/methods/notify.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n\n\t/* Vars */\n\n\tvar TIME = 500;\n\n\tvar pics = $('.ref-pic');\n\tvar refs = $('.ref-block');\n\n\n\t/* Handlers */\n\n\tvar refHandler = function(event) {\n\t\tvar $this = $(this);\n\t\tvar ACT = 'active';\n\t\tvar ... | javascript | edit | 0 | 2 | mit | dceb11ea80ca2464ea4907737fa91123857d5eb6 | albertoblaz/albertoblaz.github.io,albertoblaz/albertoblaz.github.io | js/script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//@flow\n\n/*******************************************************************************\n * Imports\n *******************************************************************************/\n\nimport React from 'react'\n\nimport { Markdown... | javascript | edit | 0 | 2 | mit | b2c454861de9dbada3ee60ea041637165538488a | ostera/tldr.jsx,ostera/tldr.jsx,ostera/tldr.jsx,ostera/tldr.jsx | src/components/NotFound.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add function to play radar ping sound"
},
{
"role": "assistant",
"content": "var audio = new AudioContext || new webkitAudioContext;\n\nfunction playRadarPing() {\n var osc = audio.createOscillator();\n var gain = audio.cre... | javascript | new_file | 0 | 1 | mit | 07b7bdfcff71eee89363e0e8b67ef080148a204f | peternatewood/socket-battle,peternatewood/socket-battle | public/audio.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nModule.register(\"recognizer\",{\n\n start() {\n this.display = false;\n this.image = \"\";\n console.log(\"Recognizer started\");\n this.sendSocketNotification(\"RECOGNIZER_STARTUP\");\n return;\n },\n\n socketNotific... | javascript | edit | 0 | 3 | mit | 1fe6e0891a6b50cea9df5399812cdbf3daa88604 | OniDotun123/MirrorMirror,OniDotun123/MirrorMirror,OniDotun123/MirrorMirror | modules/recognizer/recognizer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(() => {\n\n const restaurants = ['taste', 'variantti', 'kanttiini', 'blancco', 'factory']\n\n const days = [\n \t{name: \"Maanantai\"},\n \t{name: \"Tiistai\"},\n \t{name: \"Keskiviikko\"},\n \t{name: \"Torstai\"... | javascript | edit | 0 | 1 | mit | 3bc3c822a7aff47e57423a9ce36e8b5d6b6eeacd | sampohaavisto/pitskulounas,sampohaavisto/pitskulounas,sampohaavisto/pitskulounas | static/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {List} from 'immutable';\nimport {expect} from 'chai';\n\nimport {createPlayer} from '../src/core';\n\ndescribe('createPlayer', () => {\n it('sets name properly', () => {\n const name = 'someName';\n ... | javascript | edit | 0 | 1 | apache-2.0 | 470fbbe32934834e8b5cc983e021fc3e7f7c9594 | evanepio/NodejsWarOServer | test/core_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Policies are simply Express middleware functions which run before your controllers.\n * You can apply one or more policies for a given controller or action.\n *\n * Any policy file (e.g. `authenticated.js`) can be dropped into t... | javascript | edit | 0 | 0 | mit | bdef84e429a948ac336438a20d539a10de19b030 | maxfierke/WaterCooler | config/policies.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default function(a, b) {\n const alast = a.lastOpened;\n const blast = b.lastOpened;\n if (alast < blast) {\n return 1;\n } else if (alast > blast) {\n return -1;\n }\n return 0;\n}\n\n```\n\nApply this change: Fix bu... | javascript | edit | 0 | 5 | mit | 9ecbd6caa7a51141fa790ef7ab8a94b94f6e6492 | DenQ/electron-react-lex,DenQ/electron-react-lex | app/utils/compare-last-opened.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nimport config from '../config';\nimport url from 'url';\nimport browserSync from 'browser-sync';\nimport gulp from 'gulp';\n\ngulp.task('browserSync', function() {\n\n const DEFAULT_FILE = 'index.ht... | javascript | edit | 0 | 3 | mit | 53ade6629935c05653eb9dc35237597602ef061d | StrikeForceZero/angularjs-ionic-gulp-browserify-boilerplate,tungptvn/tungpts-ng-blog,adamcolejenkins/dotcom,henrymyers/quotes,cshaver/angularjs-gulp-browserify-boilerplate,dnaloco/digitala,cshaver/angularjs-gulp-browserify-boilerplate,dnaloco/digitala,Deftunk/TestCircleCi,StrikeForceZero/angularjs-ionic-gulp-browserify... | gulp/tasks/browserSync.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction routerConfig ($stateProvider, $urlRouterProvider) {\n 'ngInject';\n $stateProvider\n .state('home', {\n url: '/',\n templateUrl: 'app/main/main.html',\n controller: 'MainController',\n controllerAs: 'ma... | javascript | edit | 0 | 1 | mit | 954b34245682de410257ebf5aab3ea6281850b12 | RobEasthope/lazarus,RobEasthope/lazarus | src/app/index.route.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport CreatorTypeContainer from '../../containers/CreatorTypeContainer'\nimport * as s from '../../styles/jso'\nimport { css, media } from '../../styles/jss'\n\nconst creatorTypeModalStyle = css(\n s.bgcWhit... | javascript | edit | 0 | 1 | mit | fe268dacebda3161c2efeb9d1091a412702d1228 | ello/webapp,ello/webapp,ello/webapp | src/components/modals/CreatorTypesModal.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Renderer = require('./renderer')\nconst Document = require('./document')\nconst Element = require('./document/element')\n\nconst windowElement = new Element.Tag()\nwindowElement.props.set('n-style', ['__default__', 'item'])\n\ncon... | javascript | edit | 0 | 2 | apache-2.0 | 64b3b6f6b40b1e604d9f161c1b34a7cf619e02b0 | Neft-io/neft,Neft-io/neft,Neft-io/neft,Neft-io/neft,Neft-io/neft,Neft-io/neft | packages/neft-core/src/initializer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar HashMap = require('..'),\n test = require('test-more')();\n\nvar hashmap = new HashMap();\n\ntest.\n\n ok(hashmap, 'new HashMap()').\n\n is(function() {\n hashmap.max_load_factor(0.75);\n return hashmap.max_lo... | javascript | edit | 0 | 1 | mit | 905f2424a016aeb004f5bd2a14b26fe008d485ac | chad3814/node-hashtable,vigbk/node-hashtable,vigbk/node-hashtable,vigbk/node-hashtable,chad3814/node-hashtable,chad3814/node-hashtable | test/hashtable.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('dashboard/core');\nrequire('dashboard/github_data_source');\n\nDashboard.Router = Ember.Router.extend({\n root: Ember.Route.extend({\n index: Ember.Route.extend({\n route: '/',\n connectOutlets: function(router) {... | javascript | edit | 0 | 1 | isc | 869084d477d7df84d80b2674e2a5be7242fe562b | greyhwndz/dashboard,pangratz/dashboard,greyhwndz/dashboard,pangratz/dashboard,greyhwndz/dashboard | app/lib/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nimport EPSG21781 from '@geoblocks/sources/EPSG21781.js';\n\n/**\n * @type {string}\n */\nexport const themesUrl = 'https://geomapfish-demo-dc.camptocamp.com/2.4/themes?version=2&background=background';\n\n\n/**\n * @type {string}\n */... | javascript | edit | 0 | 0 | mit | 7a27af0f05a6b18f0423bf61a1d834e75d9eeea0 | camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo | api/src/constants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready( function () {\n $('#signup').click(function(event){\n event.preventDefault();\n $('#screen_block').show();\n $('#signup_modal').show();\n });\n\n $('#screen_block').click(function(event){\n event.preven... | javascript | edit | 0 | 1 | mit | 38991d9f5b34b84f6cb1c26de6d622cadb33b7f7 | great-horned-owls-2014/dbc-what-is-this,great-horned-owls-2014/dbc-what-is-this | app/assets/javascripts/questions.js | rejected_duplicate | Near-duplicate of sample 93998 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n 'use strict';\n angular.module('copayApp.services').factory('homeIntegrationsService', function(configService, $log) {\n var root = {};\n var services = [];\n\n root.register = function(serviceInfo) {\n $log.info('Adding home... | javascript | edit | 0 | 2 | mit | 0898198cb32667ff94b83dd0d2f1ce26a810d89f | cmgustavo/copay,matiu/copay,fr34k8/copay,dabura667/copay,gabrielbazan7/copay,bitchk-wallet/copay,gabrielbazan7/copay,Bitcoin-com/Wallet,Bitcoin-com/Wallet,gabrielbazan7/copay,bitjson/copay,msalcala11/copay,Bitcoin-com/Wallet,msalcala11/copay,gabrielbazan7/copay,cmgustavo/copay,janko33bd/copay,bitchk-wallet/copay,fr34k8... | src/js/services/homeIntegrationsService.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar Model = require('./model');\n\nmodule.exports = new Restifier();\nmodule.exports.Restifier = Restifier;\n\nfunction Restifier() {\n this.prefix = '';\n}\n\nRestifier.prototype.initialize = function() {\n return ... | javascript | edit | 0 | 1 | mit | 638def304c2efc0755aedf0070760bc15c404bee | simplyianm/preston,simplyianm/preston | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n\n RecipeListView.prototype.template = Handlebars.compile($(\"#recipe-list-tpl\").html());\n RecipeView.prototype.template = Handlebars.compile($(\"#recipe-tpl\").html());\n\n var service = new RecipeService();... | javascript | edit | 0 | 1 | mit | 04649c101a33074c7745c867aab8eacc322a057a | enoliglesias/wpreader,enoliglesias/wpreader | www/js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\n\nclass SearchBar extends Component {\n\trender() {\n\t\treturn <input onChange={event => console.log(event.target.value)} />;\n\t}\n\n\t// onInputChange(event) {\n\t// \tconsole.log(event.targ... | javascript | edit | 0 | 1 | mit | 1b0427393e5713700039862b2d5cbd7c3e079cba | JosephLeon/redux-simple-starter-tutorial,JosephLeon/redux-simple-starter-tutorial | src/components/search_bar.js | rejected_duplicate | Near-duplicate of sample 90950 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([], function() {\n var MoxieConf = {\n endpoint: 'http://api.m.ox.ac.uk',\n paths: {\n places_search: '/places/search',\n places_id: '/places/',\n dates: '/oxford_dates/',\n ... | javascript | edit | 0 | 1 | apache-2.0 | b7ffeb3e868611232fc03fd6f317d66511ff5f1e | ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client | app/moxie.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel'\n\n/* @flow */\n\nimport type {Point, TextEditorMarker, TextEditor, Range} from 'atom'\n\nexport type Provider = {\n grammarScopes: Array<string>,\n getDeclarations: ((params: {textEditor: TextEditor, visibleRange: Range})... | javascript | edit | null | null | mit | e30d9f0b4ea028f0a93177500a490d99cc15cd26 | steelbrain/declarations | lib/types.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe(\"Core Bliss\", function () {\n\t\"use strict\";\n\n\tbeforeEach(function () {\n\t\tfixture.setBase('tests/fixtures');\n\t\tthis.fixture = fixture.load('core.html');\n\t\tdocument.body.innerHTML += this.fixture[0];\n\t});\n\n\t... | javascript | edit | 0 | 1 | mit | 9686e400d6823e23e5740676b5f8e67f32a56051 | LeaVerou/bliss,LeaVerou/bliss,dperrymorrow/bliss,zdfs/bliss,dperrymorrow/bliss,zdfs/bliss | tests/CoreSpec.js | rejected_duplicate | Near-duplicate of sample 93597 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nDashboard.TickerWidget = Dashboard.Widget.extend({\n sourceData: \"\",\n\n templateName: 'ticker_widget',\n classNames: ['widget', 'widget-ticker'],\n\n widgetView: function() {\n var widget = this;\n\n \treturn this._super().re... | javascript | edit | 0 | 1 | mit | deacf13c2a918d910b5a994fa7aec90ce2891650 | kloudsio/mucuchies,ShiftForward/mucuchies,kloudsio/mucuchies,ShiftForward/mucuchies | app/models/widgets/ticker_widget.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $(\".per-page\").chosen({\n width: '70px',\n disable_search_threshold: 20,\n });\n\n $(\".per-page\").change(function () {\n location.href = add_parameter(location.href, 'per_page', $(this).v... | javascript | edit | 0 | 1 | mit | 977307c14c41df2eeb53df04f58222ef7a009fc6 | Marri/glowfic,Marri/glowfic,Marri/glowfic,Marri/glowfic | app/assets/javascripts/paginator.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nvar semver = require('semver')\nvar sub = require('subleveldown')\nvar DepDb = require('dependency-db')\n\nmodule.exports = function (db, name, range, opts) {\n range = String(range || '*')\n\n var depDb = new DepDb(su... | javascript | edit | 0 | 8 | mit | 4555f764571997162c5659f0f8c5de60fef2323f | watson/npm-dependency-db | lib/query.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst parseUrl = require('parseurl');\nconst get = require('lodash/get');\nconst crypto = require('crypto');\nconst timingSafeCompare = require('tsscmp');\n\nconst contentStore = require('../../lib/content-store');\n\n\n/* eslint-disabl... | javascript | edit | 0 | 1 | mit | 16666da6421dd2bf6f580ef534c9a7b24d9cd927 | nhsuk/betahealth,nhsuk/betahealth,nhsalpha/betahealth,nhsalpha/betahealth,nhsalpha/betahealth,nhsuk/betahealth | app/middleware/preview-api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nfunction makeError (res, originalError) {\n var errorMessage = res.body.message || res.body.error_message || res.body.ErrorMessage\n if (errorMessage) {\n var error = new Error(originalError.message)\n if (res.bo... | javascript | edit | 0 | 7 | mit | 34ba61a4dca1c8968ca03c669dba1689a99c26ba | LOKE/supertest-thenable | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\n/* eslint-disable no-param-reassign */\n\n// Replace absolute file paths with <PROJECT_ROOT>\n\nconst cwd = process.cwd()\n\n/*::\ntype Val = string | Object\n */\n\nmodule.exports = {\n print (val/* : Val */, serialize... | javascript | edit | 0 | 6 | apache-2.0 | aded6fe440526e31c1f2da2f4336bf53c10f4f9d | tribou/jest-serializer-path | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar dispatcher = require('../dispatcher');\nmodule.exports = {\n render: require('./render'),\n builtInStore: require('./built-in-store'),\n actionBuilder: require('./action-builder'),\n clear: require('./clear'),\n mountedComponen... | javascript | edit | 0 | 1 | mit | d8c404e8b641e9ff42f0fd10843f55977667594f | Jerom138/focus,Jerom138/focus,Jerom138/focus,KleeGroup/focus-core | application/index.js | rejected_duplicate | Near-duplicate of sample 77902 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nvar suite = require('suite.js');\nvar o = require('./object-sugar');\n\n// test schemas\nvar license = o.schema('License', {\n name: {type: String, unique: true}\n});\n\nvar library = o.schema('Library', {\n n... | javascript | edit | 0 | 1 | mit | d15c68fbffbc7ac26e07bf034ab828c72669447f | sugarjs/object-sugar | lib/tests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport NodePatcher from './NodePatcher';\n\nexport default class FunctionApplicationPatcher extends NodePatcher {\n constructor(node, context, editor, fn, args) {\n super(node, context, editor);\n this.fn = fn;\n this.args = a... | javascript | edit | 0 | 3 | mit | 99383952dc38f0e673955aa76feb210c93c665bc | alangpierce/decaffeinate,alangpierce/decaffeinate,eventualbuddha/decaffeinate,decaffeinate/decaffeinate,eventualbuddha/decaffeinate,alangpierce/decaffeinate,decaffeinate/decaffeinate | src/patchers/FunctionApplicationPatcher.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (env) {\n \"use strict\";\n env.ddg_spice_rfc = function(api_result) {\n\n if (!api_result || api_result.error || api_result.message == \"no results.\") {\n return Spice.failed('rfc');\n }\n\n ... | javascript | edit | 0 | 4 | apache-2.0 | 3a449b052e3080c7af175012b8bfdf2e221568c3 | soleo/zeroclickinfo-spice,levaly/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,deserted/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,soleo/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,whalenrp/zeroclickinf... | share/spice/rfc/rfc.js | rejected_duplicate | Near-duplicate of sample 88213 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar yeoman = require( 'yeoman-generator' ),\n yosay = require( 'yosay' );\n\nvar DashGenerator = yeoman.generators.Base.extend( {\n initializing: function() {\n this.pkg = require( '../../package.json' )... | javascript | edit | 0 | 1 | mit | 5b08e397562e9a56d3142e145057a930860b4f6a | Circular-Studios/generator-dash | generators/app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport index from './'\nimport { keyGen, removeKeyType } from './util'\n\n/**\n * @param {string} [query=''] Plaintext query string to match against start of tag names.\n * eg. 'wo' would match 'work', 'women' (assuming both these tags... | javascript | edit | 0 | 1 | mit | ac9a1dd651b5d590e2633a140ca6aa53e1a7d9e8 | WorldBrain/WebMemex,WorldBrain/WebMemex | src/search/search-index/tag-suggestions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction nativeStrategy(data) {\n const { origin, destination, mode } = data;\n\n let originLocation;\n let destinationLocation;\n\n if (typeof origin === 'object' && origin.lat && origin.lng) {\n originLocation = new google.maps... | javascript | edit | 0 | 7 | mit | d142757dfdccd5480f28b1938009e80133c6cc68 | bondz/react-static-google-map | src/strategies/direction/nativeStrategy.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.