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\n// # Place all the behaviors and hooks related to the matching controller here.\n// # All this logic will automatically be available in application.js.\n// # You can use CoffeeScript in this file: http://coffeescript.org/\n\n$(document)... | javascript | edit | 0 | 1 | mit | e8a103ff739c4daa6b90efd52dea9630cd3f491b | robertbaker13/write-in-mvp,robertbaker13/write-in-mvp,robertbaker13/write-in-mvp,user512/write-in-mvp,user512/write-in-mvp,user512/write-in-mvp | app/assets/javascripts/welcome.js | rejected_duplicate | Near-duplicate of sample 99343 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar OpenIDConnectStrategy = require('passport-openidconnect').Strategy;\nvar passportAuthenticateWithCUstomClaims = require('PassportAuthenticateWithCustomClaims').PassportAuthenticateWithCustomClaims;\n\nfunction Strategy(options, veri... | javascript | edit | 0 | 1 | mit | e53c716e76bf3ed9180b9b34b4efefb2b484819d | promethe42/passport-franceconnect | lib/strategy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//= require govuk/multivariate-test\n\n/*jslint browser: true,\n * indent: 2,\n * white: true\n */\n/*global $, GOVUK */\n$(function () {\n\n GOVUK.taxDiscBetaPrimary = function () {\n $('.primary-apply').html($('#beta-primary').h... | javascript | edit | 0 | 2 | mit | ed5464da7d6b9be998a89fc0897239cb0fbf43da | alphagov/frontend,alphagov/frontend,alphagov/frontend,alphagov/frontend | app/assets/javascripts/tax-disc-ab-test.js | rejected_duplicate | Near-duplicate of sample 72479 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// People frequently sudo install web-component-tester, and we have to be a\n// little careful about file permissions.\n//\n// sauce-connect-launcher downloads and caches the sc binary into its package\n// directory the first time you t... | javascript | edit | 0 | 4 | bsd-3-clause | 2c943d20dae87bfb9aed666644815bbb759c39fb | Polymer/tools,Polymer/tools,Polymer/tools,Polymer/tools | packages/wct-sauce/scripts/postinstall.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nexports.delayed = function delayed(ms, value) {\n return new Promise(resolve => setTimeout(() => resolve(value), ms));\n};\n\nexports.timeoutError = 'timeoutError';\n\n/**\n * Waits a promise for specified timeout.\n *... | javascript | edit | 0 | 2 | mit | fe266d13835b0ec76648608cab9004324c5aded4 | Dzenly/tia,Dzenly/tia,Dzenly/tia,Dzenly/tia | api/utils/promise-utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport './index.css';\nimport React from 'react';\nimport { DropTarget } from 'react-dnd';\n\nconst ConceptDropTarget = ({ connectDropTarget, isOver, canDrop, children }) =>\n connectDropTarget(\n <div className=\"ConceptDropTarget\... | javascript | edit | 0 | 3 | mit | 368e4a68f473259f0b59c9164ff7815868641cdc | transparantnederland/browser,transparantnederland/browser,waagsociety/tnl-relationizer,transparantnederland/relationizer,transparantnederland/relationizer,waagsociety/tnl-relationizer | app/components/ConceptDropTarget/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar hn = require('hacker-news-api');\nvar ent = require('ent');\nvar qs = require('querystring');\nvar S = require('string');\n\nvar hnRegex = /^https?:\\/\\/news\\.ycombinator\\.com\\/(.*)/;\n\n\n\nmodule.exports.url = function(url, r... | javascript | edit | 0 | 5 | mit | 6f2d1ebec42aaa1ed9edf32e33018b89840bb7f5 | brhoades/EuIrcBot,LinuxMercedes/EuIrcBot,brhoades/EuIrcBot,gmackie/EuIrcBot,gmackie/EuIrcBot,euank/EuIrcBot,LinuxMercedes/EuIrcBot,euank/EuIrcBot | modules/hn/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @providesModule I18nManager\n * @flow\n * @fo... | javascript | edit | null | null | mit | 413595ce25477495c7891288eca5c1c249ec83f5 | Root-App/react-native-mock-render | src/Libraries/ReactNative/I18nManager.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from './template';\nimport config from 'ember-get-config';\n\n/**\n * @module ember-osf\n * @submodule components\n */\n\n/**\n * Render the provided url in an iframe via MFR\n *\n * Sample usag... | javascript | edit | 0 | 1 | apache-2.0 | 5dc37ed9c2c20fa8759a69647302feacb674d12f | crcresearch/ember-osf,baylee-d/ember-osf,CenterForOpenScience/ember-osf,chrisseto/ember-osf,jamescdavis/ember-osf,hmoco/ember-osf,binoculars/ember-osf,cwilli34/ember-osf,pattisdr/ember-osf,hmoco/ember-osf,chrisseto/ember-osf,pattisdr/ember-osf,baylee-d/ember-osf,binoculars/ember-osf,crcresearch/ember-osf,CenterForOpenS... | addon/components/file-renderer/component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass Show {\n\n\tstatic get INTERMISSION() {\n\t\treturn new Show('Sendepause');\n\t}\n\n\tconstructor(title) {\n\t\tthis.title = title;\n\t}\n\n\tisRunningNow() {\n\t\treturn this.startTime.isBefore() && this.endTime.isAfter();\n\t}\n... | javascript | edit | 0 | 3 | mit | 2f1c22e3c150c57c759d15da40239aec27b16c6e | cemrich/zapp-backend | models/Show.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\"\nmodule.exports = (function(obj) {\n var cli = require(\"cli\"),\n json = require(\"jsonfile\");\n\n function returnUnicArrays(arr) {\n try {\n var filteredArray = arr.filter(function(item, pos) {\n ... | javascript | edit | 0 | 2 | mit | dcea9b4539ba2b16b3d2a7ee8ecebb86d2f30122 | klaytonfaria/zweepr | lib/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n window.collections.comics = Backbone.Collection.extend({\n url: '/comics'\n });\n})();\n\n```\n\nApply this change: Fix url to the root"
},
{
"role": "assistant",
"content": "(function() {\n window.coll... | javascript | edit | 0 | 1 | mit | d2906d68cd6a075d92fa6582918c8497e19c7133 | jboyens/comics,jboyens/comics | app/assets/javascripts/comics_collection.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\nvar bcrypt = require('bcrypt-nodejs');\n\nvar UserSchema = new Schema({\n email: String,\n password: String,\n firstName: String,\n lastName: String\n});\n\... | javascript | edit | 0 | 1 | mit | 14ac3febd59136b5309f6b170c4a64f42df4529e | revov/uci-gui,revov/uci-gui | models/user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Fibers = Npm.require('fibers');\n\nvar originalYield = Fibers.yield;\nFibers.yield = function() {\n var kadiraInfo = Kadira._getInfo();\n if(kadiraInfo) {\n var eventId = Kadira.tracer.event(kadiraInfo.trace, 'async');;\n if... | javascript | edit | 0 | 3 | mit | 0314d4a3cbbee5f69deea275497a0bfb9343e78f | chatr/kadira,meteorhacks/kadira | lib/hijack/async.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * All modules.\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 * You may obtain... | javascript | edit | 0 | 0 | apache-2.0 | 433f26766615c97744acda90d6007bb776d9c88c | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | assets/js/modules/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('lodash'),\n dgram = require('dgram');\n\nfunction Client (opts) {\n opts = _.defaults(_.pick(opts, Object.keys(Client.defaults)), Client.defaults);\n\n for (var key in opts) {\n Object.defineProperty(this, key, { ... | javascript | edit | 0 | 3 | mit | f2779249c0cffb3f54b26437c35fdc5b206014d5 | MCProHosting/oxide | lib/oxide_client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar through2 = require('through2');\nvar fs = require('graceful-fs');\n\nfunction getStats() {\n return through2.obj(fetchStats);\n}\n\nfunction fetchStats(file, enc, cb) {\n fs.stat(file.path, function (err, stat) {\... | javascript | edit | 0 | 2 | mit | b34f5b45348dcd6b9f7853825ab982f99c55888f | erikkemperman/vinyl-fs,wearefractal/vinyl-fs,gulpjs/vinyl-fs | lib/src/getStats.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// 11: destructuring - string\n// To do: make all tests pass, leave the assert lines unchanged!\n\ndescribe('destructuring also works on strings', () => {\n\n \n it('destructure every character', () => {\n const [a, b, c] = 'abc';\... | javascript | edit | 0 | 1 | mit | 169824100f88f017d1793b70a69198a8f9047fe3 | Semigradsky/katas,cmisenas/katas,JonathanPrince/katas,JonathanPrince/katas,JonathanPrince/katas,cmisenas/katas,tddbin/katas,ehpc/katas,Semigradsky/katas,ehpc/katas,rafaelrocha/katas,Semigradsky/katas,tddbin/katas,tddbin/katas,rafaelrocha/katas,cmisenas/katas,rafaelrocha/katas,ehpc/katas | katas/es6/language/destructuring/string.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Controller = function(shape) {\n this.gameBoard = new tetrisBoard();\n this.gameView = new browserView({gameBoard: this.gameBoard});\n}\nController.prototype.startGame = function() {\n this.gameBoard.blit();\n this.gameView.anim... | javascript | edit | 0 | 1 | mit | 6fb985cb7a1e1f6edeaf91829eb2e7b77de9806f | RoyTuesday/tetrelementis,peternatewood/tetrelementis,peternatewood/tetrelementis,RoyTuesday/tetrelementis | controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Immutable from 'immutable';\n\nimport {\n parseGrounds,\n parseEntities\n} from 'state/utils/parseLevel';\n\nimport * as level1 from 'state/levels/level-01';\n\nexport const initialState = Immutable.fromJS({\n time: 120,\n pl... | javascript | edit | 0 | 0 | mit | 292c0376e79156ab1db3cc4417715aa18f8e26ad | mattesja/mygame,mattesja/mygame,stevenhauser/i-have-to-return-some-videotapes,stevenhauser/i-have-to-return-some-videotapes | src/state/initialState.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar logger = require('log4js').getLogger('APP_LOG');\nvar request = require('request');\n\nfunction sendMessage(config, receiver, message, botname, callback) {\n\n\tvar chat_id = config.receivers[receiver].chat_id;\n\tvar token = config... | javascript | edit | 0 | 3 | apache-2.0 | d3614fd4f03f22657171ffcd494a4a83df663cdb | dollars0427/ATMessager,dollars0427/ATMessager | atmessager/lib/telegram.js | rejected_duplicate | Near-duplicate of sample 93629 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n\toptions: {\n\t\tconfigFile: 'karma-unit.conf.js'\n\t},\n\n\t// Sinle run\n\tunit: {\n\t\tsingleRun: true,\n\t\tpreprocessors: {\n\t\t\t'src/**/*.js': ['coverage']\n\t\t},\n\t\treporters: ['dots', 'coverage'],\n\t\t... | javascript | edit | 0 | 0 | mit | 58bd59fa0829a48bf07f6a39d106514de1d43aad | sebald/ed,mps-gmbh/ed,mps-gmbh/ed,sebald/ed,sebald/ed,mps-gmbh/ed | grunt/karma.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst url = {\n _regex: {\n default: /^(?:https?:\\/\\/)?[^\\s\\/\\.]+(?:\\.[a-z]{2,})+(?:\\/\\S*)?$/i\n },\n default: context => {\n if (context.value === null || context.value && !context.value.toString().match(url._regex.def... | javascript | edit | 0 | 4 | mit | dcb19ef5aaa9cecb689bae83f7a2923d7e61c4d8 | TechnologyAdvice/obey | src/typeStrategies/url.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module(\"hikeio\").\n\tdirective(\"fancybox\", function() {\n\t\treturn {\n\t\t\tlink: function (scope, element, attrs) {\n\t\t\t\tscope.$on(\"$routeChangeStart\", function () {\n\t\t\t\t\t$.fancybox.close();\... | javascript | edit | 0 | 1 | mit | 6366bdb1eb597098bf48a9722413391cb3e48be4 | 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\nMeteor.methods({\n\n 'deleteTemplate'(templateId) {\n console.log(\"### DELETING TEMPLATE ###\");\n check(templateId, Match.Any);\n \n Template.remove(templateId);\n\n console.log(JSON.stringify({\n resource: \"te... | javascript | edit | 0 | 2 | mit | bfb84e6a4d4cf8e710d3e54075e2f3da0651d63d | kmcroft13/cloud-templates,kmcroft13/box-templates,kmcroft13/cloud-templates,kmcroft13/box-templates | server/methods/templates/deleteTemplate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst {readFileSync} = require('fs')\nconst {resolve} = require('path')\n\nfunction createRequestDecorator (stats) {\n return (req, res, next) => {\n res.locals = res.locals || Object.create(null)\n res.locals.webpackClientStats ... | javascript | edit | 0 | 5 | mit | 77d27e84389b43548b32053ab08efc79bdfe2484 | enten/udk,enten/udk | node/serveAssets.js | rejected_duplicate | Near-duplicate of sample 94473 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport { Link } from 'react-router';\n\nclass MembersPreview extends Component {\n\n render() {\n const {displayName, searchImg, intro, slug} = this.props;\n\n return (\n ... | javascript | edit | 0 | 2 | cc0-1.0 | 9f0fa5056dcf0ea3d3f9db3f1afeb58caa340d77 | cape-io/acf-client,cape-io/acf-client | src/components/Members/MembersPreview.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n// Coroutine function that returns a promise that resolves when the coroutine\n// is finished. Accepts a generator function, and assumes that everything\n// yielded from the generator function is a promise.\nmodule.exports = function ... | javascript | edit | 0 | 2 | apache-2.0 | 8405b28f9fa1d2383fdd8d74f84e50465e212253 | feihong/node-examples,feihong/node-examples | coroutine.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nRouter.route('/media', {name: 'mediaMenu'});\n\nRouter.route('/media/static/:filepath*', function () {\n if (settings.findOne({key: 'mediainternalserver'}).value) {\n // var mime = Npm.require('mime');\n var fs = Npm... | javascript | edit | 0 | 4 | mit | ffc5324d21065acff2cff65277d208c86ffa6809 | cedarsuite/cedarserver,monty5811/cedarserver,monty5811/cedarserver,cedarsuite/cedarserver | media/lib/routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar jQuery = require('jquery');\nvar VIE = require('../vie.js');\n\n// Until https://github.com/tmpvar/jsdom/issues/issue/81 is fixed\nVIE.RDFa.predicateSelector = '[property]';\n\nexports['test inheriting subject'] = function(test) {\n... | javascript | edit | 0 | 1 | mit | 007eff6d9b3fba33af9910ad66c1692e70b99d75 | bergie/VIE,bergie/VIE | test/rdfa.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// For conditions of distribution and use, see copyright notice in LICENSE\n\nvar client = new WebSocketClient();\nvar scene = new Scene();\nvar syncManager = new SyncManager(client, scene);\nvar loginData = {\"name\": \"Test User\"};\n... | javascript | edit | 0 | 0 | apache-2.0 | 828b9def79d0a5c39a925051b0b958c2b452c228 | playsign/WebTundra,playsign/WebTundra,AlphaStaxLLC/WebTundra,AlphaStaxLLC/WebTundra,realXtend/WebTundra,AlphaStaxLLC/WebTundra,realXtend/WebTundra | Test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict'\n\nconst main = require('./lib/main')\n\nif (require.main === module) {\n main()\n}\n\n```\n\nApply this change: Use main return value as process exit code"
},
{
"role": "assistant",
"conte... | javascript | edit | 0 | 0 | isc | 575d14749b4eabcd7463c0f6c13acfa4fd681d94 | jcollado/multitest | multitest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar massahHelper = require('massah/helper')\n , helper = massahHelper.application.helper\n\nmodule.exports = (function() {\n var library = massahHelper.getLibrary()\n .then('the user has the access level (.*)', function(level... | javascript | edit | 0 | 2 | apache-2.0 | 02029c252511edfa3090111bc700944869fa55a3 | pinittome/pinitto.me,pinittome/pinitto.me,pinittome/pinitto.me | test/steps/pages/board.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst expect = require('chai').expect;\nconst sinon = require('sinon');\nconst proxyquire = require('proxyquire');\nconst Plugin = require('.');\n\ndescribe('rsvg-brunch', function () {\n\n // Brunch will automatically... | javascript | edit | 0 | 1 | mit | 696605c6aeb63181371bd747e6db0109a9a3376e | caleb531/rsvg-brunch | test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {mobileQuery, responsiveAction} from 'ghost/utils/mobile';\n\nvar PostsView = Ember.View.extend({\n target: Ember.computed.alias('controller'),\n classNames: ['content-view-container'],\n tagName: 'section',\n\n mobil... | javascript | edit | 0 | 2 | mit | 22f147c995a48cb1a0a592060a712e727aaac92e | developer-prosenjit/Ghost,cicorias/Ghost,Klaudit/Ghost,obsoleted/Ghost,kolorahl/Ghost,sergeylukin/Ghost,imjerrybao/Ghost,BayPhillips/Ghost,phillipalexander/Ghost,bastianbin/Ghost,ignasbernotas/nullifer,Elektro1776/javaPress,Romdeau/Ghost,augbog/Ghost,kortemy/Ghost,schneidmaster/theventriloquist.us,dggr/Ghost-sr,optikal... | core/client/views/posts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global module, asyncTest, ok, start */\n\nmodule(\"forge.httpd\");\n\nasyncTest(\"Test that content is being served via https\", 1, function () {\n if (window.location.protocol == \"https:\") {\n ok(true, \"Expected 'https:... | javascript | edit | 0 | 2 | bsd-2-clause | 8d63b47a04d3841e89a359928f9ad27c214822ed | trigger-corp/trigger.io-httpd,trigger-corp/trigger.io-httpd | module/tests/automated.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction quote(s) {\n\treturn \"\\\"\" + s.replace(/([\\\\\\\"])/, \"\\\\$1\") + \"\\\"\";\n}\n\nfunction maybe_quote(s) {\n\tif (/[\\\\\\\"]/.test(s))\n\t\treturn quote(s);\n\telse\n\t\treturn s;\n}\n\nfunction repr(x, max_depth) {\n\t... | javascript | edit | 0 | 10 | mit | d394c7e4dc8d9286034d08c5445e95d2a0cf6891 | arlolra/flashproxy,infinity0/flashproxy,infinity0/flashproxy,glamrock/flashproxy,infinity0/flashproxy,arlolra/flashproxy,arlolra/flashproxy,infinity0/flashproxy,glamrock/flashproxy,arlolra/flashproxy,glamrock/flashproxy,arlolra/flashproxy,glamrock/flashproxy,glamrock/flashproxy,infinity0/flashproxy,glamrock/flashproxy,... | util.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport class Step {\n constructor(name, from, to, pos, param = null) {\n this.name = name\n this.from = from\n this.to = to\n this.pos = pos\n this.param = param\n }\n}\n\nconst steps = Object.create(null)\n\nexport fun... | javascript | edit | 0 | 7 | mit | e2a3192f9ad1cc3ecd19001038bb7883c5f252eb | ProseMirror/prosemirror-transform | step.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst moment = require('moment');\n\nconst formatString = 'YYYY-MM-DD HH:mm:ss';\nmodule.exports = {\n current: true,\n id: 1,\n name: 'Bowling Green Game',\n openAt: moment().format(formatString),\n closeAt: moment().format(format... | javascript | edit | 0 | 0 | mit | a26b63a37cc3027bb37cb1a381b0e89fea231ca0 | osumb/challenges,osumb/challenges,osumb/challenges,osumb/challenges | spec/fixtures/test-data/test-performance.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n function WavesWalletDepositController ($scope, events, coinomatService, dialogService, notificationService,\n applicationContext, bitcoinUriService) {\n ... | javascript | edit | 0 | 3 | mit | 88fe77b133eb5e9b09acc80d41e3b2f2b12097b2 | wavesplatform/WavesGUI,beregovoy68/WavesGUI,wavesplatform/WavesGUI,beregovoy68/WavesGUI,wavesplatform/WavesGUI,beregovoy68/WavesGUI,wavesplatform/WavesGUI,beregovoy68/WavesGUI | src/js/wallet/wallet.deposit.controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Controller.extend({\n session: Ember.inject.service(),\n notifications: Ember.inject.service(),\n\n actions: {\n addToOrder(order, account, attrs) {\n const isManager = (this... | javascript | edit | 0 | 2 | mit | c031c1b7e14a97812f12f0ec02800a9285d954c7 | yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time | client/app/controllers/new-portion-order.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n'use strict';\n\nexport const buyIn = 20;\nexport const startingSeconds = 15 * 60;\nexport const smallBlinds = [ 100, 200, 300, 400, 500, 800, 1000, 1500, 2000, 3000, 5000];\nexport function payouts( pot ) {\n if ( pot <= 80 ) {\n ... | javascript | edit | 0 | 1 | mit | bcd6742b0cc7a2e17da8c7e727573e99c30c4f45 | pattern/react-poker,pattern/react-poker | variables.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Lanes = ( global.Lanes || (global.Lanes = {}) );\nLanes.Vendor = ( Lanes.Vendor || {} );\n\nLanes.Vendor.ReactProxy = require(\"react-proxy\");\nLanes.Vendor.ReactTestUtils = require('react-addons-test-utils');\nLanes.Vendor.d... | javascript | edit | 0 | 0 | mit | 9638172ebf656409613df191590559f4e2adce5e | argosity/lanes,argosity/hippo,argosity/hippo,argosity/lanes,argosity/lanes,argosity/hippo | npm-build/development.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Mailman discard\n// @namespace http://bd808.com/userscripts/\n// @description Automatically selects \"Discard\" and ticks the \"Add\" and \"Discards\" checkboxes on Mailman admin requests for pending messages... | javascript | edit | 0 | 0 | mit | 938211a21bd73c73cdc9e877a93cee732c628dd0 | bd808/userscripts,bd808/userscripts | mailman-discard-and-ban.user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable global-require */\n\nmodule.exports = {\n 'Bungie.net': require( './Bungie.net.js' ),\n MiggyRSS: require( './MiggyRSS.js' ),\n Reddit: require( './Reddit.js' ),\n rsi: require( './rsi.js' ),\n Steam: re... | javascript | edit | 0 | 0 | mit | b9b6b177d5ff43a393c152fd8b0ed518002e67f9 | post-tracker/finder | modules/finders/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* This file is part of Indico.\n * Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).\n *\n * Indico is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public Lic... | javascript | edit | 0 | 3 | mit | 9c7c632269afff96fc41f6c3663fd20fde3b795e | DirkHoffmann/indico,mic4ael/indico,indico/indico,OmeGak/indico,indico/indico,DirkHoffmann/indico,ThiefMaster/indico,mic4ael/indico,pferreir/indico,ThiefMaster/indico,OmeGak/indico,pferreir/indico,OmeGak/indico,mvidalgarcia/indico,pferreir/indico,DirkHoffmann/indico,mic4ael/indico,mvidalgarcia/indico,DirkHoffmann/indico... | indico/htdocs/js/indico/angular/filters.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//= require govuk/multivariate-test\n\n/*jslint browser: true,\n * indent: 2,\n * white: true\n */\n/*global $, GOVUK */\n$(function () {\n\n GOVUK.taxDiscBetaPrimary = function () {\n $('.primary-apply').html($('#beta-primary').h... | javascript | edit | 0 | 2 | mit | 74a45aa89391182f432b19b1b3c25338e189c9c9 | alphagov/frontend,alphagov/frontend,alphagov/frontend,alphagov/frontend | app/assets/javascripts/tax-disc-ab-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { KafkaJSNotImplemented } = require('../../../errors')\n\nconst MESSAGE_CODEC_MASK = 0x3\nconst RECORD_BATCH_CODEC_MASK = 0x07\n\nconst Types = {\n None: 0,\n GZIP: 1,\n Snappy: 2,\n LZ4: 3,\n}\n\nconst Codecs = {\n [Types.GZ... | javascript | edit | 0 | 2 | mit | b4e695d3fafccdfaba2b97b685383aa69ebc0a4e | tulios/kafkajs,tulios/kafkajs,tulios/kafkajs,tulios/kafkajs | src/protocol/message/compression/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport config from 'config';\nimport hapiAuthCookie from 'hapi-auth-cookie';\n\nexport default (server, projectConfig) => {\n server.register(hapiAuthCookie, (err) => {\n if (err) {\n throw err;\n }\n\n server.auth.strate... | javascript | edit | 0 | 2 | mit | 2d473bc2aa873f71cafdd04e147d5b541a0e164f | apazzolini/rsapp | src/api/extensions/auth.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * RouterHistoryContainer is already connected to the router state, so you only\n * have to pass in `routes`. It also responds to history/click events and\n * dispatches routeTo actions appropriately.\n */\n\nimport React from 'rea... | javascript | edit | 0 | 4 | mit | 65a4352846bb570c33bd918584977f084e147d54 | zapier/redux-router-kit | src/components/RouterHistoryContainer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// User-specific configuration\nexports.conversationWorkspaceId = ''; // replace with the workspace identifier of your conversation\n\n// Create the credentials object for export\nexports.credentials = {};\n\n// Watson Conversation\n// ... | javascript | edit | 0 | 0 | apache-2.0 | 8b0b45b41bc26db0771ebd58d521540ac7c490e6 | ibmtjbot/tjbot,zhix/tjbot,zhix/tjbot,Hachimaki/TJBot,Hachimaki/TJBot,ibmtjbot/tjbot | recipes/conversation/config.default.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n $(\"body\").prepend(\"<div id='uat-bar'><a class='go' href='#'>Show me what to test</a><div class='pop-over hide'><a class='close' href='#'>close</a></div></div>\");\n $(\"head\").append(\"<link href='http://github.com/plus2/uat_dire... | javascript | edit | 0 | 1 | mit | c29b6f6da351534deccb5cd7c62f7eceee140fc9 | plus2/whereuat,plus2/whereuat | lib/uat_director/javascript/uat_director.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar User = require('../models/user');\nvar express = require('express');\nvar router = express.Router();\n\nrouter.route('/auth').get(getAuth);\nrouter.route('/auth').post(login);\nrouter.route('/auth').delete(logout);\nmodule.exports =... | javascript | edit | 0 | 3 | mit | 5a1818fd71502a6c325387d1f5f61c76cadc0512 | asso-labeli/labeli-api,asso-labeli/labeli-api,asso-labeli/labeli-api | routes/auth.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar apn = require('apn');\nvar util = require('util');\nvar BasePushNotification = require('./BasePushNotification');\nconnection = new apn.Connection({\n cert: '',\n key: ''\n}).on('error', console.log.bind(console.log)).on('transmis... | javascript | edit | 0 | 1 | mit | 4bdb309eacb34b27cd4f6df4979d823754cb3562 | ghaiklor/sails-service-pusher | lib/APNPushNotification.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = [\n 'ie/7..latest',\n 'chrome/latest',\n 'firefox/latest',\n 'safari/5..latest',\n 'android/4.4..latest',\n 'iphone/latest',\n 'ipad/latest'\n]\n\n```\n\nApply this change: Drop support for IE7 and Safari 5"
},... | javascript | edit | 0 | 0 | bsd-3-clause | 3024f5a600747068ae5de791e35294ba7580cc16 | PolicyStat/policystat-sauce-browsers | lib/browsers-definition.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* NESTED INCLUDING MIXINS\n #gradient > @include vertical($primaryColor, $secondaryColor);\n #grid > @include gu($rtl);\n TO =====>\n @include gradient-vertical($primaryColor, $secondaryColor);\n @include grid-gu($rtl);\... | javascript | edit | 0 | 0 | mit | 2085fe00e06bdbe55884d14b01c837ff32495dbe | duvillierA/grunt-less-to-sass | tasks/lib/replacements/@include_nested.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n/**\n * ./bin/gonzales.js filename\n * ./bin/gonzales.js filename -s\n */\nvar gonzales = require('..'),\n fs = require('fs'),\n filename = process.argv[2],\n silent = process.argv[3] === '-s';\n\nif (!fi... | javascript | edit | 0 | 0 | mit | 877c0dd3828633563de3ad96064765b3e9d47115 | brendanlacroix/gonzales-pe,tonyganch/gonzales-pe,brendanlacroix/gonzales-pe,tonyganch/gonzales-pe | bin/gonzales.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/** @babel */\n/** @jsx etch.dom */\n\nimport {CompositeDisposable} from 'atom'\nimport etch from 'etch'\nimport EtchComponent from './etch-component'\n\nclass AboutStatusBar extends EtchComponent {\n constructor () {\n super()\n ... | javascript | edit | 0 | 1 | mit | c1b608a4001d5893cc1e48b608dcbab197aa6aea | mnquintana/atom-about,atom/about | lib/about-status-bar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {\n makeCharacteristicEventListener,\n ReactNativeBluetooth,\n} from './lib';\n\nconst writeCharacteristicValue = (characteristic, buffer, withResponse) => {\n return new Promise((resolve, reject) => {\n if (!withResponse) ... | javascript | edit | 0 | 2 | apache-2.0 | 90d6425ba5ad311223915c85cb5ded8f4bf82db0 | sogilis/react-native-bluetooth,sogilis/react-native-bluetooth,sogilis/react-native-bluetooth-manager,sogilis/react-native-bluetooth-manager,sogilis/react-native-bluetooth-manager,sogilis/react-native-bluetooth,sogilis/react-native-bluetooth-manager,sogilis/react-native-bluetooth | src/characteristicWrite.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { nextCoord } from '../../../../utils';\nimport checkCollide from '../../../../collisions';\nimport { pixelToTile } from '../../../../tiles';\n\nimport interfaceWithObjects from '../../Common/interface-objects';\n\nexport default... | javascript | edit | 0 | 6 | mit | 6948ab430cd6dc8fa5112b637d12a83cb0c8d27a | ThomasMays/incremental-forest,ThomasMays/incremental-forest | src/sprites/character/Player/update/move.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nexport const H1 = ({ classes, children }) => (\n <h1\n className={`${classes} text-3xl font-extrabold tracking-tight text-gray-800 leading-9 sm:leading-10 sm:text-4xl md:text-5xl md:leading-14`}\n >\n ... | javascript | edit | 0 | 1 | mit | c74fa468a78f99c3dc305ed9c535a95e0079dcb8 | dtjv/dtjv.github.io | src/components/Headings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport View from 'girder/views/View';\nimport { AccessType } from 'girder/constants';\n\nimport VegaWidgetTemplate from '../templates/vegaWidget.pug';\nimport '../stylesheets/vegaWidget.styl';\n\nimport vg from 'vega';\n\nvar VegaWidget... | javascript | edit | 0 | 4 | apache-2.0 | 83f4844364f200cae38066d7feca7c932bcc88e7 | adsorensen/girder,sutartmelson/girder,data-exp-lab/girder,sutartmelson/girder,sutartmelson/girder,RafaelPalomar/girder,manthey/girder,jbeezley/girder,Xarthisius/girder,manthey/girder,jbeezley/girder,kotfic/girder,sutartmelson/girder,Xarthisius/girder,RafaelPalomar/girder,adsorensen/girder,girder/girder,Kitware/girder,g... | plugins/vega/web_client/views/VegaWidget.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Tweet = require('../models/tweet')\nconst config = require('../config')\nconst mongoose = require('mongoose')\n\nconst specificTweetsController = function (req, res) {\n res.set('Access-Control-Allow-Origin', '*')\n\n if (!req.p... | javascript | edit | 0 | 3 | mit | 4df5338c87542f6dbf56ba3013bc012b599e333c | SentiSocial/sentisocial-backend,SentiSocial/backend | js/controllers/specific-tweets.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ncore.directive(\"validatedinput\", function() {\n\treturn {\n\t\ttemplate: '<span ng-include src=\"view\"></span>',\n\t\trestrict: 'E',\n\t\tscope: {\n\t\t\t\"type\": \"@\",\n\t\t\t\"model\": \"=\",\n\t\t\t\"property\": \"@\",\n\t\t\t\"... | javascript | edit | 0 | 3 | mit | fc976d49f97fbd5d827edc8190abd1e6b3890b2c | TAMULib/Weaver-UI-Core,TAMULib/Weaver-UI-Core | app/directives/validatedInputDirective.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst app = require('muffin')\nconst router = app.router\n\nrouter.get('/', function *(next) {\n console.log('Requested home')\n yield next\n})\n\napp.run(router)\n\n```\n\nApply this change: Set some sample rendering options"
},
... | javascript | edit | 0 | 1 | mit | 3c2cf102602e5e203f83c8535a2601f4876dcff9 | muffinjs/cli,muffin/cli | kit/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mathChart = {\n\tvar insertchart = function(canvas,data)\n\t{\n\t\tvar xmlns=\"https://www.w3.org/2000/svg\"\n\t\tvar svg = document.createElementNS(xmlns,\"svg\");\n\t\tsvg.height = canvas.clientHeight;\n\t\tsvg.width = canvas.clie... | javascript | edit | null | null | mit | a097dd790e059eec22f4b9374418ba3284fae4f3 | corehello/mathChart,corehello/mathChart | mathChart.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('cloud/app.js');\nrequire('cloud/fuse.min.js');\n\n/*\n * Provides Cloud Functions for Rice Maps.\n */\nParse.Cloud.define(\"placesSearch\", function(request, response) {\n console.log(\"Search Query: \" + request.params.query)... | javascript | edit | 0 | 1 | mit | 84ab9b7b949235d840fbf19e394fc009b3a06e1b | rice-apps/atlas,rice-apps/atlas,rice-apps/atlas | parse/cloud/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nimport React, {Component} from 'react'\nimport {Link} from 'react-router-dom'\nimport Card from '../components/Card'\nimport {connect} from 'react-redux';\nimport {bindActionCreators} from 'redux'\n\nimport * as channelsActions from '... | javascript | edit | 0 | 1 | mit | c41f47f32e55029827babc95f8e889c33b3fff95 | kevinladkins/newsfeed,kevinladkins/newsfeed,kevinladkins/newsfeed | client/src/containers/ChannelIndexView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n\n/**\n * Upload `contact` (containing contact data) onto Cluestr.\n *\n * \n * @param {Object} contact Contact to upload, plus cluestrClient\n * @param {Function} cb Callback to call once contacts has been uploaded.\n ... | javascript | edit | 0 | 2 | mit | 46962c63a43577a2902045958882b2ecdaa7ad3e | AnyFetch/gcontacts-provider.anyfetch.com | lib/provider-google-contact/helpers/upload.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction set_correct_origin(prev, last) {\n $(last).find(\"input[id*='origin_auto']\").prop(\"disabled\", true).val($(prev).find(\"input[id*='destination_auto']\").val());\n $(last).find(\"input[type='number'][id*='origin']\").val... | javascript | edit | 0 | 2 | mit | 4ce92b03bbda3f6c5d7112c53bed0cfa9205b03a | livingsilver94/getaride,livingsilver94/getaride,livingsilver94/getaride | planner/static/planner/js/new_step_form.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst eslint = require('gulp-eslint');\nconst config = require('../utils/config');\n\nmodule.exports = gulp => () => {\n const stream = gulp.src(path.join(config.pkgdir, 'src/**/*.js'))\n .pipe(eslint(... | javascript | edit | 0 | 2 | mit | 536c249f522ee04fa87f6aad5f652b09fdad959f | odopod/code-library,odopod/code-library | gulp-tasks/code-quality.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// FIXME: don't use hardcoded params\nvar nano = require('nano')('http://localhost:5984');\nvar db = nano.db.use('todo');\n\nvar todo = {};\n\ntodo.getAll = function(callback) {\n var results = [];\n db.view('todos', 'all_todos', func... | javascript | edit | 0 | 2 | mit | 29adca094212de2b38632a70e37d9b59b459e59c | PurityControl/uchi-komi-js | problems/kata/001-todo-backend/001/todo.js | rejected_duplicate | Near-duplicate of sample 84470 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar config = require('../config/configuration.js');\n\nfunction htmlReplace(str) {\n return str.replace(/<\\/?[^>]+\\/?>/g, ' ').replace(/ +/g, ' ').replace(/ ?\\n ?/g, '\\n').trim();\n}\n\nmodule.exports = function(pa... | javascript | edit | 0 | 6 | mit | f93145b58a5f8cd540b24310deef772bccdeeeb1 | AnyFetch/embedmail-hydrater.anyfetch.com | lib/index.js | rejected_duplicate | Near-duplicate of sample 96985 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst webModel = require('../webModel');\nconst webModelFunctions = require('../webModelFunctions');\nconst robotModel = require('../robotModel');\n\nasync function makeMap() {\n if (webModel.debugging) {\n console.log('Make M... | javascript | edit | 0 | 6 | mit | ae727f6c05c2bf9f27a40ee98eb52fb782098636 | chrisl8/ArloBot,chrisl8/ArloBot,DTU-R3/ArloBot,DTU-R3/ArloBot,DTU-R3/ArloBot,chrisl8/ArloBot,chrisl8/ArloBot,chrisl8/ArloBot,chrisl8/ArloBot,DTU-R3/ArloBot,DTU-R3/ArloBot,DTU-R3/ArloBot | node/behaviors/makeMap.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nconst keystone = require('keystone');\nconst jwt = require('jsonwebtoken');\n\n/*\n JWT middleware\n*/\n\nexports.requireJwtAuth = function(req, res, next) {\n const errorMessage = {\n badHeader: 'Bad request - missing JWT header... | javascript | edit | 0 | 6 | mit | 5133b16080b85d8933e0f4da8197b7198403e484 | pista329/keystonejs-test-project,pista329/keystonejs-test-project | routes/rest_views/middleware.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar socketIo = require('socket.io');\n\nfunction deepClone(base) {\n if (!base || typeof base != 'object')\n return base;\n\n var cloned = Object.create(null);\n Object.keys(base).forEach(function(key) {\n cloned[key] = deepClo... | javascript | edit | 0 | 3 | mit | c42c732793eb4ee75af7c616ef245e590a47dab7 | KitaitiMakoto/express-droonga,KitaitiMakoto/express-droonga,droonga/express-droonga,droonga/express-droonga | lib/socket-adaptor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//initialize things globally if necessary\nvar move = \"rock\";\n\nfunction respond(command) {\n if(command === \"move\")\n return Math.random() < 0.5 ? \"rock\" : \"paper\";\n else\n return \"err\";\n}\n```\n\nApply this change... | javascript | edit | 0 | 3 | mit | 0f70adee51fb89805952cf99bafb3d8ac0ffdea8 | jacksondc/crane,jacksondc/crane,jacksondc/crane | examples/rps/players/js-player.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n\n\n// If `marked` is defined, initialize it with our preferred options\nif (marked !== undefined) {\n marked.setOptions({\n gfm: true,\n tables: true,\n breaks: true,\n pedantic: false,\n ... | javascript | edit | 0 | 5 | mit | 9299388df693c3717bb47353ce1e3d3543a7975e | custode/reviewboard,KnowNo/reviewboard,brennie/reviewboard,KnowNo/reviewboard,reviewboard/reviewboard,bkochendorfer/reviewboard,custode/reviewboard,davidt/reviewboard,sgallagher/reviewboard,sgallagher/reviewboard,beol/reviewboard,chipx86/reviewboard,beol/reviewboard,beol/reviewboard,chipx86/reviewboard,KnowNo/reviewboa... | reviewboard/static/rb/js/utils/textUtils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nconst UI = require('console-ui');\nconst cli = require('cli');\n\nconst Project = require('../models/project');\nconst CommandFactory = require('../commands/command-factory');\n\nconst discovery = require('../task... | javascript | edit | 0 | 3 | mit | dc43bff790323b658a4f7ccb129a6f164b8eef60 | deployjs/deployjs-cli | bin/deploy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport userController from '../controllers/users';\nimport recipeController from '../controllers/recipes';\nimport Login from '../middleware/ensureLogin';\nimport User from '../middleware/isuser';\nimport recipeAdd from '../middleware/v... | javascript | edit | 0 | 1 | mit | b5f2976524bfe41893f5d288ea3fb73bfef33081 | Billmike/More-Recipes,Billmike/More-Recipes | server/routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Module = require('module')\n , wrap = Module.wrap\n , readFile = require('fs').readFileSync\n , dirname = require('path').dirname\n , vm = require('vm')\n , createContext =... | javascript | edit | 0 | 6 | mit | 5076878be6bade0457301d6128f30b59662eb75b | medikoo/node-ext | lib/require-in-context.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global hljs */\n\nWee.fn.make('guide', {\n\t/**\n\t * Highlight code and bind click events\n\t *\n\t * @constructor\n\t */\n\t_construct: function() {\n\t\tvar priv = this.$private;\n\n\t\t// Setup syntax highlighting\n\t\tpriv.highl... | javascript | edit | 0 | 1 | apache-2.0 | 761b9cfb6eca9d57f65b32a683eb0f13dfcbc391 | weepower/wee,weepower/wee | source/modules/guide/core/js/script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport './empty.scss';\n\nconst Empty = (props) => (\n <div className=\"container empty\">\n <div className=\"empty__image\" />\n <div className=\"empty__text\">\n <h2 className=\"heading -gamma\"... | javascript | edit | 0 | 2 | mit | 11b093cafe9b89050656b0dbb3337fa1f3bf4610 | DoSomething/rogue,DoSomething/rogue,DoSomething/rogue | resources/assets/components/Empty/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Component, PropTypes } from 'react'\nimport {Link} from 'react-router'\n\nclass JobListing extends Component {\n static propTypes: {\n title: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired... | javascript | edit | null | null | mit | e4e06bb7cbe3e33862b8031b41c2d32f97da8894 | blockstack/blockstack-site,blockstack/blockstack-site | app/js/components/JobListing.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nlet gl = require('./gl');\nlet glm = require('gl-matrix');\nlet mat4 = glm.mat4;\nlet Camera = require('./Camera');\n\nconst _name = 'orthographic.camera';\nconst _left = -1;\nconst _top = -1;\nconst _near = 0.1;\nconst... | javascript | edit | 0 | 1 | mit | 98783e8c4fc67f5875c4be47c1706cedd1f3ee0e | allotrop3/four,allotrop3/four | src/OrthographicCamera.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withRouter } from 'react-router';\nimport classNames from 'classnames';\nimport NavItem from '../navItem/navItem';\nimport styles from './navDropdown.css';\n\nfun... | javascript | edit | 0 | 1 | mit | 849fd9cbdfa2dd1998ae2f6c9f2688bb6978a126 | OperationCode/operationcode_frontend,hollomancer/operationcode_frontend,sethbergman/operationcode_frontend,hollomancer/operationcode_frontend,miaket/operationcode_frontend,OperationCode/operationcode_frontend,sethbergman/operationcode_frontend,hollomancer/operationcode_frontend,NestorSegura/operationcode_frontend,miake... | src/scenes/home/header/navDropdown/navDropdown.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default chart => {\n if (chart.responsive) {\n\n const {\n width,\n height\n } = chart\n\n // preserve original values\n chart._originWidth = width\n chart._originHeight = height\n\n // setup height c... | javascript | edit | 0 | 4 | mit | cd06fbc2c9c8241e741b3e1ffc174372dff3669c | simonwoerpel/d3-playbooks,simonwoerpel/d3-playbooks,simonwoerpel/d3-playbooks | src/lib/responsive/setup_responsiveness.js | rejected_duplicate | Near-duplicate of sample 97878 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n externals: {\n 'backbone': 'Backbone',\n 'backbone.babysitter': 'Backbone.ChildViewContainer',\n 'cocktail': 'Cocktail',\n 'jquery': 'jQuery',\n 'jquery-ui': 'jQuery',\n 'jquery.minicolors': 'jQue... | javascript | edit | 0 | 0 | mit | 0d7c4b7b6a2a9a72a2dca3fbd405097a9a7f180c | codevise/pageflow,codevise/pageflow,tf/pageflow,tf/pageflow,codevise/pageflow,tf/pageflow,tf/pageflow,codevise/pageflow | package/config/webpack.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n \"fileSignature\": {\n \"byteOffset\": 0,\n \"length\": 4,\n \"previousProperty\": null,\n \"type\": \"fixedLengthString\"\n },\n \"saveGameVersion\": {\n \"byteOffset\": 4,\n \"length\": 4,\n ... | javascript | edit | 0 | 0 | mit | c567d818c3ee340fa34159f2997aa10838747bc6 | bmaupin/js-civ5save | src/civ5saveproperties.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nTemplate.postSubmit.events({\n 'submit form': function(e) {\n e.preventDefault();\n\n var post = {\n url: $(e.target).find('[name=url]').val(),\n title: $(e.target).find('[name=title]').val()\n };\n\n post.slug = ... | javascript | edit | 0 | 2 | mit | ea6df9cde188a81998f4d4f9348c985db72a1e69 | drainpip/music-management-system,drainpip/music-management-system | app/client/templates/posts/post_submit.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = config => {\n config.set({\n frameworks: ['jasmine'],\n\n files: ['*.js'],\n\n preprocessors: {\n '*.js': ['webpack'],\n },\n\n browsers: ['Chrome_fakeDevices'],\n\n plugins: [\n 'karma-chro... | javascript | edit | 0 | 2 | mit | 6bfc6f79e8272fb6e564b352dfb5bb858dd69c59 | aullman/opentok-camera-filters,aullman/opentok-camera-filters | tests/karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar regionStyle = {\n initial: {\n fill: '#000000',\n \"fill-opacity\": 1,\n stroke: 'none',\n \"stroke-width\": 0,\n \"stroke-opacity\": 1\n },\n hover: {\n \"fill-opacity\": 0.8,\n cursor: 'pointer'\n },\n se... | javascript | edit | 0 | 1 | mit | 42a9803fc2a316631b967b68b5ad3e12c8bb43bf | ferflores/lightning,ferflores/lightning | src/client/modules/map.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar through = require( 'through2' );\nvar gutil = require( 'gulp-util' );\nvar PluginError = gutil.PluginError;\nvar sanitize = require( 'sanitize-html' );\n\nconst PLUGIN_NAME = 'gulp-sanitize-translations.js';\n\nmodule.exports = func... | javascript | edit | 0 | 6 | mit | 43ecb332c85edc585dae35d1c574c065da89ca43 | gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib | gulp/plugins/gulp-sanitize-translations.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport FlatButton from 'material-ui/FlatButton';\nimport { red600 } from 'material-ui/styles/colors';\nimport RemoveCircle from 'material-ui/svg-icons/content/remove-circle';\n\n\nconst styles ... | javascript | edit | 0 | 2 | mit | 26ff7b3522980e5e49367f5d39c28910588ff3e2 | matteolc/admin-on-rest,marmelab/admin-on-rest,matteolc/admin-on-rest,marmelab/admin-on-rest | src/mui/input/ImageInputPreview.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { createSelector } from \"reselect\";\nimport { endsWith, flatMap, keys, map, max, pick } from \"lodash-es\";\n\nimport { taskDisplayNames } from \"../utils\";\n\nconst getMaximumTaskLimit = (limits, type) => (\n max(map(limit... | javascript | edit | 0 | 2 | mit | 4b0590961c42d151a0bc0fffd0afba23ded3c982 | virtool/virtool,igboyes/virtool,igboyes/virtool,virtool/virtool | client/src/js/settings/selectors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nlet ListToMapLinkingController = function() {\n let self = {};\n\n function mapMarkerSelected(data) {\n let parentDiv = $(\"#serviceList\");\n let dPanel = d3.selectAll(\".serviceEntry\")\n .filter((d) =>... | javascript | edit | 0 | 5 | mit | 6a9653aa0b63e3bd0483be3bd0f79a4ac1164085 | AndrewTBurks/EnglewoodSocialServices,AndrewTBurks/EnglewoodSocialServices,uic-evl/EnglewoodSocialServices,uic-evl/EnglewoodSocialServices | src/js/controllers/listToMapLinkingController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { expect } from 'chai';\nimport { addTodo } from './common.js';\n\n\ndescribe('App', function() {\n beforeEach(function() {\n // TODO: refactor this using something like async.series\n return addTodo(browser, 'buy cheddar'... | javascript | edit | 0 | 1 | mit | 2a903cbdc966f0cb23ad8b659d677fa061fc4819 | NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet | tests/acceptance/specs/todos.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport DomMock from '../../helpers/dom-mock';\nimport jsdom from 'mocha-jsdom';\nimport expect from 'expect';\nimport React from 'react';\nimport TestUtils from 'react-addons-test-utils';\nimport { Portal } from '../../../portal/src/con... | javascript | edit | 0 | 1 | mit | e052265d4e9415b63bb2fd81fb983bdd30754944 | trendmicro/serverless-survey-forms,trendmicro/serverless-survey-forms | web/test/components/portal/Portal.js | rejected_duplicate | Near-duplicate of sample 88986 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport './styles/App.css';\nimport TravelObject from './components/TravelObject'\n\nclass App extends React.Component {\n render () {\n return(\n <div className=\"App\">\n <TravelObject type=\... | javascript | edit | 0 | 2 | apache-2.0 | ab581f23f246aa856d47170cde42aa3ba9b4008f | googleinterns/step98-2020,googleinterns/step98-2020 | step-capstone/src/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar animate;\nvar Game = Game || {};\nvar WIDTH = window.innerWidth;\nvar HEIGHT = window.innerHeight;\nvar FPS = 1000 / 30;\nvar engine = new Game.Engine('game', WIDTH, HEIGHT);\n\nengine.init();\nengine.register(new Game.SnakeGame(WID... | javascript | edit | 0 | 4 | mit | 3233df80aaba2e7a81abbb68643854386f2bad7c | msanatan/snake,msanatan/snake,msanatan/snake | javascripts/init.js | rejected_duplicate | Near-duplicate of sample 75542 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.