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 http = require('http');\nvar fs = require('fs');\nvar os = require('os');\nvar exec = require('child_process').exec;\n\nvar targetDir = __dirname + '/tools/';\ntry {\n fs.statSync(targetDir);\n} catch (e) {\n fs.mkdirSync(targ... | javascript | edit | 0 | 2 | mit | a7d9b1dc7d98d20848c87e1cb108ed3a3c901cd1 | rubenv/node-apk-parser | install.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('lodash'),\n assessmentData = require('./assessments'),\n http = require(\"q-io/http\");\n\nvar routes = {};\n\nroutes.publish = function (router) {\n\n router.get('/assess/:assessmentId', function (request, res... | javascript | edit | 0 | 1 | mit | 81a4180cb74b2dc9848fcc68998a9cfcbe6e0eb9 | AdapTeach/code-assessments | src/grade/routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar get = Ember.get, set = Ember.set;\n\nEmber.TargetActionSupport = Ember.Mixin.create({\n target: null,\n action: null,\n\n targetObject: Ember.computed(function() {\n var target = get(this, 'target');\n\n if (Ember.typeOf(ta... | javascript | edit | 0 | 5 | mit | 383df99b1e98b72ec9e9eb379a9ed2ce504deae8 | rodrigo-morais/ember.js,jish/ember.js,zendesk/ember.js,williamsbdev/ember.js,sivakumar-kailasam/ember.js,selvagsz/ember.js,xcskier56/ember.js,vitch/ember.js,jayphelps/ember.js,njagadeesh/ember.js,opichals/ember.js,aihua/ember.js,latlontude/ember.js,artfuldodger/ember.js,jasonmit/ember.js,Vassi/ember.js,JKGisMe/ember.js... | packages/ember-runtime/lib/mixins/target_action_support.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n\tyourCollection = new Models.ItemListings();\n\tfriendCollection = new Models.ItemListings();\n\tfeaturedCollection = new Models.ItemListings();\n\tpublicCollection = new Models.ItemListings();\n\n\tyourView = new Views... | javascript | edit | 0 | 1 | mit | 3e5e898595bbf11121b0e33ea7e16a6af436acf7 | burnflare/CrowdBuy,burnflare/CrowdBuy | js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update });\nvar player;\nvar cursors;\n\nfunction preload() {\n\tgame.load.image('star', 'assets/star.png');\n\tgame.load.image('diamond',... | javascript | edit | 0 | 3 | mit | 195f8daf218bdc9fc4a3d249f4ad851efb742a54 | ethankaminski/ludumdare-34,ethankaminski/ludumdare-34 | js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport expect from 'expect';\nimport sessionReducer from '../../js/reducers/sessionReducer';\nimport * as AppConstants from '../../js/constants/AppConstants';\n\nconst initialState = {\n activeUserIds: [],\n mapMode: AppConstants.MAP_... | javascript | edit | 0 | 1 | mit | a5de37de25483ad7d9896be4bead37445fed121d | x-team/x-map,x-team/x-map,x-team/x-map,x-team/x-map | client/test/reducers/sessionReducer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\r\n\r\n(function () {\r\n angular\r\n .module(\"dummy\", []);\r\n\r\n var fooS = ng.core\r\n .Injectable()\r\n .Class({\r\n constructor: [ng.http.Http, function FooServic... | javascript | edit | 0 | 1 | mit | 0608f2e1f19e64812d516043e4cc616f85724e0a | albertosantini/angular2-es5-jumpstart,albertosantini/angular2-es5-jumpstart | src/client/app/mix-ng1-ng2.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { moduleForModel, test } from 'ember-qunit';\n\nmoduleForModel('order', 'Unit | Model | order', {\n // Specify the other units that are required for this test.\n needs: []\n});\n\ntest('it exists', function(assert) {\n let mod... | javascript | edit | 0 | 1 | mit | 61adbc00c6e1eff5aef106dfcf9b9bb0b549b237 | yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time | client/tests/unit/models/order-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * main.js\n */\n\n'use strict';\n\n// Only run in capable browsers via feature detection\nvar didCutTheMustard = 'querySelector' in document\n && 'classList' in document.createElement('a')\n && 'addEventListener' in window;\n\ni... | javascript | edit | 0 | 3 | mit | 84c2ecc257038707ad5334e47c5001383b917230 | frippz/frippz.se,frippz/frippz.se,frippz/frippz.se | js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).foundation();\n\nfunction show(clickId) {\n\t\t\tvar showdiv = document.getElementById(clickId);\t\t\t\n\t\t\tvar tabUl = document.getElementsByClassName('tabs')[0];\n\t\t\tvar tabs = tabUl.getElementsByClassName('tab-title'... | javascript | edit | 0 | 3 | mit | cf18f56c16dfc0ad4d3f895791fd996723b0ff17 | ot4i/large-messaging-tutorial | js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n $('.add-partner').click(function(){\n $(\".add-partner\").prop(\"disabled\", true);\n $('.new-partner').show();\n $('.add-partner').hide();\n });\n\n $(\".sentiment-spacing\").rangeslider({\n ... | javascript | edit | 0 | 1 | apache-2.0 | 2293e281d30174c309e3dca71618940952f965b0 | sarahikeda/TheFeels,sarahikeda/TheFeels,sarahikeda/TheFeels | app/assets/javascripts/new_partners.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(global) {\n\tvar $ = global.$,\n\t\tQUnit = global.QUnit;\n\t\n\tQUnit.test(\"prettydate basics\", function() {\n\t\tfunction date(then, expected) {\n\t\t\tQUnit.equal(prettyDate(\"2008/01/28 22:25:00\", then), expected);\n\t\... | javascript | edit | 0 | 1 | mit | e49eb5af1ef42a1a51c3308446c7fd7101394550 | gjb7/is217-unit-test | js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction addGamepadPort(elmApp) {\n\n var getGamepads =\n typeof navigator.getGamepads === 'function' ? function () { return navigator.getGamepads(); } :\n typeof navigator.webkitGetGamepads === 'function' ? function () { return ... | javascript | edit | 0 | 5 | bsd-3-clause | 98ea630ab93c00badfdfe05ba783c208677a52c2 | xarvh/elm-gamepad,xarvh/elm-gamepad | port/gamepadPort.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('confRegistrationWebApp')\n .directive('formElements', function () {\n return {\n restrict: 'A',\n link: function questionsToolbarInterface(scope) {\n //Debouncing plugin for jQuery f... | javascript | edit | 0 | 4 | mit | 4c47af70266864407153271dde755b1b76dfd5c6 | CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web | app/scripts/directives/formElements.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar path = require(\"path\");\nvar debug = require(\"debug\")(\"github-todos\");\nvar exec = require(\"child_process\").exec;\n\n\nmodule.exports = {\n \"run\": run,\n \"dir\": dir,\n \"dirty\": dirty,\n \"... | javascript | edit | 0 | 3 | mit | 4bab327448a4a7962b8bbda05fb135391206e649 | naholyr/github-todos,therebelbeta/github-todos-pivotal | lib/git.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Websocket = function(url) {\n this.url = url;\n client = io.connect(url);\n\n client.on('connect', function(socket) {\n console.log('Trying to connect...');\n client.on('connect-ack', function(msg) {\n console.log('Suc... | javascript | edit | 0 | 2 | mit | 50145748cd1a1c7df0d8bf534248a068687465b5 | misko321/draughts,misko321/draughts | public/websocket.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar path = require('path');\nvar expressValidator = require('express-validator');\n\nvar home = require('./routes/home.js');\nvar api = require('./routes/api.js');\n\nvar port = process.env.PORT || 500... | javascript | edit | 0 | 1 | mit | 06730b95b45b421a31ca9e4ede1f79376a671619 | seriema/npmalerts,creationix/npmalerts | lib/web.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Vue from 'vue'\nimport Router from 'vue-router'\nimport menuModule from '../store/modules/menu'\n\nVue.use(Router)\n\nconst router = new Router({\n mode: 'history',\n routes: [\n ...generateRoutesFromMenu(menuMod... | javascript | edit | 0 | 3 | mit | ae7c7f4a8b7d296331b0ce7f968c91c6aebf69d2 | Limeishu/limeishu.org,Limeishu/limeishu.org | src/router/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n window.widgets = {};\n\n $(function() {\n var defaults = {\n platformUrl: 'https://partner.voipgrid.nl/',\n c2d: 'true',\n };\n\n for(var key in defau... | javascript | edit | 0 | 10 | mit | 2634d9766b97d95356d9659dd6f7ac558547e43b | VoIPGRID/chrome-extension,VoIPGRID/chrome-extension | lib/main.js | rejected_duplicate | Near-duplicate of sample 74776 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst semver = require('semver');\nconst utils = require('./utils');\n\nconst codemods = {\n 'ember-modules-codemod': {\n version: '2.16.0-beta.1',\n projectTypes: ['app', 'addon'],\n commands: ['ember-modules... | javascript | edit | 0 | 2 | mit | 282ad171dd778bf165af383feec58dc1dd04a39e | kellyselden/ember-cli-update | src/run-codemods.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport invariant from \"invariant\";\n\nconst propValidates = ([name, propValidationFn]) => (props, componentName) => !(propValidationFn(props, name, componentName) instanceof Error);\n\nexport const satisfyOneOf = (propSet) => {\n i... | javascript | edit | 0 | 3 | mit | 3fa51e83aebce878fcd1e7ecbb6a102e64b75049 | nikcorg/react-satisfy-propset | src/satisfyOneOf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar noop = require('./noop');\nvar Records = require('./records');\n\nmodule.exports = ResultSet;\n\nfunction ResultSet(resultset) {\n this._resultset = resultset;\n}\n\nResultSet.prototype = {\n set: function (key, v... | javascript | edit | 0 | 2 | mit | c8381205a4de7ed90b771144a72f5b26f4e11a0f | dengelke/node-zoom2,dengelke/node-zoom2,dengelke/node-zoom2,dengelke/node-zoom2 | lib/resultset.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n#\n# img2musicXML.js - v0.1-Alpha\n# Apache v2 License\n#\n*/\n\n// Create img2musicXML (abbreviated as i2mx) namespace\nvar i2mx = im2x || { };\n\n// Create JsCheckup class (@TODO: Move to inside namespace)\nvar JsCheckup = functio... | javascript | edit | 0 | 1 | apache-2.0 | 6314bf2ae24a3c8eeeabb5f8ad2ba508f3e50f18 | feikname/img2musicXML,feikname/img2musicXML | img2musicxml.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar bluebird = require('bluebird');\nvar nano = require('nano');\nvar _ = require('lodash');\n\nconst blacklist = new Set(['use']);\n\n/**\n * Promisifies the exposed functions on an object\n * Based on a similar functi... | javascript | edit | 0 | 4 | mit | 55b2881b5ca8eb62b849e9bccc783c081470a2dd | bdchauvette/nano-blue | lib/nano-blue.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport { Map, TileLayer, GeoJSON } from 'react-leaflet'\n\nconst MAP = {\n lat: 47,\n lon: 1,\n zoom: 4,\n osmUrl: 'https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png',\n osmAttributio... | javascript | edit | 0 | 4 | mit | e8a13a0322a3a74b60a41e1933ca7a78cfc38619 | sgmap/inspire,sgmap/inspire | src/components/CenteredMap.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport vk_sdk from 'vksdk'\nimport util from 'util'\nimport {logger} from './logger'\n\nexport const vk_api = new vk_sdk({\n appId: process.env.VK_GROUP_STATS_VK_APP_ID || 5878021,\n appSecret: process.env.VK_GROUP_STATS_VK_APP_SECRET... | javascript | edit | 0 | 0 | mit | 687f89f46a5d0375e497b3fabca8b9ae7120a8dc | thewizardplusplus/vk-group-stats,thewizardplusplus/vk-group-stats | src/utils/vk_api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\"underscore\", \"jquery\", \"app\"], function(_, $, app) {\n return function () {\n\n var public = {};\n var private = {};\n\n private.createObject = function (averageCartype) {\n var queryObject = {\n c: ... | javascript | edit | 0 | 3 | mit | 2b3385253bc066c13972d19062722df2309c4624 | HPI-Hackathon/find-my-car,HPI-Hackathon/find-my-car | javascripts/service/car_ads_service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar profile = (function () {\n\tvar testResourceRe = /^core\\/tests\\//,\n\n\t\tcopyOnly = function (filename, mid) {\n\t\t\tvar list = {\n\t\t\t\t'core/package': 1,\n\t\t\t\t'core/package.json': 1,\n\t\t\t\t'core/tests': 1,\n\t\t\t\t'c... | javascript | edit | 0 | 4 | bsd-3-clause | 8ada31869ec0c462f448546d82959cc7fd5d6624 | kitsonk/core-js,kitsonk/core-js | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: 'Minifiers for Meteor with PostCSS processing - use Autoprefixer and others with ease',\n version: '0.2.4',\n name: 'juliancwirko:postcss',\n git: 'https://github.com/juliancwirko/meteor-postcss... | javascript | edit | 0 | 1 | mit | f8614d73a548a2125aa7245932d59a2c3f06f36a | juliancwirko/meteor-postcss | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Use Bower packages in your Meteor app\",\n version: \"0.1.7\"\n});\n\nPackage._transitional_registerBuildPlugin({\n name: \"bower\",\n use: [\n \"meteor\",\n \"underscore\",\n ],\n sources: [\... | javascript | edit | 0 | 0 | mit | 2ddf2eed2ec33cf05e48f811d8e9522248cfb17c | netanelgilad/meteor-bower,mquandalle/meteor-bower,aaronjudd/meteor-bower | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.Slapdash = window.Slapdash || {};\r\nSlapdash.Util = {\r\n \r\n _urlTemplates: {\r\n height: '%height%',\r\n width: '%width%'\r\n },\r\n \r\n debug: function(msg){\r\n if (console && console.lo... | javascript | edit | 0 | 3 | mit | aadf90298ca9b5c001321651bef54975c7ca2c0f | philipsharp/Slapdash | js/util.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash');\nvar XpItem = require('../models/xpItem');\n\nmodule.exports = {\n set: function (exportString) {\n document.location.hash = exportString;\n },\n get: function () {\n va... | javascript | edit | 0 | 1 | mit | 571deab41c15dce667792373a2a9a36b8f43f329 | grahamgilchrist/hotac-squad-builder,grahamgilchrist/hotac-squad-builder | js-src/modules/controllers/urlHash.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar express = require('express');\nvar supertest = require('supertest');\nvar logger = require('log4js').getLogger('Unit-Test');\nvar nconf = require('nconf');\n\nvar request = supertest(app);\n\nexports['Check view hea... | javascript | edit | null | null | apache-2.0 | 6a47c202e535560978705fcb5ed4d197ebf7fb2a | dollars0427/ATMessager,dollars0427/ATMessager | test/view.sendmessage.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\n// just get render function from react-dom. means we don't have to get all of ReactDOM, and use ReactDOM.render\nimport { render } from 'react-dom'\nimport { BrowserRouter, Match } from 'react-router'\nimport ... | javascript | edit | 0 | 1 | mit | 5ebd553b75419a3955b755f8ff04ff3c5daba4e1 | jelliotartz/FEM-react-intro,jelliotartz/FEM-react-intro | js/ClientApp.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n\n 'use strict';\n\n var path = require('path'),\n loadConfig = require(path.join(__dirname, 'grunt/load')),\n config = {},\n scaffold = {};\n\n module.exports = function (grunt) {\n ... | javascript | edit | 0 | 1 | mit | d5eb83c77146b282f35c6d6b01dfc3a30d163fa9 | marcosmoura/generator-scaffold,marcosmoura/generator-scaffold | templates/core/GruntFile.js | rejected_duplicate | Near-duplicate of sample 74409 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gateway = require(__dirname+'/../../../../');\n\nmodule.exports = function(req, res){\n\n gateway.config.set('DOMAIN', req.body.domain);\n res.send({ 'DOMAIN': gateway.config.get('DOMAIN') });\n\n};\n\n```\n\nApply this change: [B... | javascript | edit | 0 | 1 | isc | 0a280fe047e1adef51746b701e38bdff569835b5 | crazyquark/gatewayd,xdv/gatewayd,whotooktwarden/gatewayd,zealord/gatewayd,zealord/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,crazyquark/gatewayd,Parkjeahwan/awegeeks | lib/http/controllers/api/set_domain.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.angular = {};\nwindow._ngTrace = false;\n\nObject.observe(window.angular, function(changes){\n if (!window._ngTrace && enabled()) {\n window._ngTrace = true;\n inject();\n }\n});\n\nfunction enabled() {\n return window.... | javascript | edit | 0 | 5 | mit | fc2e52894603b3f1b40155a9369be371f234f47d | tambet/ng-trace | scripts/ng-trace.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Adds basic support for Cordova/Phonegap\\n\"+\n \"\\u001b[32mv0.0.8\\n\"+\n \t\t \"\\u001b[33m-----------------------------------------\\n\"+\n \t\t \"\\u001b[0m Adds basic support for Co... | javascript | edit | 0 | 2 | mit | 3d970eeb97ccccdb355a3bba5be462e78e000645 | SpaceCapsule/Meteor-cordova,SpaceCapsule/Meteor-cordova | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst queryString = require('query-string')\nconst XHR = require('../lib/xhr')\n\nconst XhrLink = {\n selector: '.js-xhr',\n\n init (isGlobal = false) {\n this.isGlobal = isGlobal\n document.addEventListener('click', this.handle... | javascript | edit | 0 | 1 | mit | affe6c7ed16f295faa65c616debf32834d544795 | uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2 | assets/javascripts/modules/xhr-link.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar _ = require(\"underscore\"),\n cheerio = require(\"cheerio\"),\n check = require(\"check-types\"),\n multimatch = require(\"multimatch\");\n\nfunction plugin(options) {\n options = norma... | javascript | edit | 0 | 3 | mit | 9e9e7da057d8610d98cb051844044a3c038d4638 | ubenzer/metaltext | lib/excerpts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Gulp.js configuration\nvar gulp = require('gulp'),\n watch = require('gulp-watch'),\n postcss = require('gulp-postcss');\n\n// apply PostCSS plugins\ngulp.task('css', function() {\n return gulp.src('src/style.min.css')\n .p... | javascript | edit | 0 | 1 | mit | 9b254334345ec3afb08a838c33a4e1cdfd6abef5 | kritoke/darksimplicity,kritoke/darksimplicity | postcss/gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nimport FB from 'fb'\nimport { facebookKey } from '../etc/secret.json'\n\n/**\n * Отправить сообщение в Фейсбук\n *\n * @param { string } message - Текст сообщения, которое будет отправлено на\n * ... | javascript | edit | 0 | 4 | mit | d83b79bf2f8974a60d8dba73f3fda5e14c318b3c | azat-io/observer-bot,azat-io/observer-bot | components/facebook-it.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Developed by Radu Puspana\n * Date August 2017\n * Version 1.0\n */\n\nconsole.log(\"welcome to myExpenses!\");\n\n```\n\nApply this change: Add budgetController , uiController , controller modules and keypress event on the globa... | javascript | edit | 0 | 1 | mit | af1b905ea33c01e0df20c6f05606ee15a15db897 | rpuspana/myExpenses,rpuspana/myExpenses | js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\nvar ip = require('iterator-protocol'),\n iterator = ip.iterator\n\nmodule.exports = iterable\nfunction iterable(nextGen, iter) {\n return new LazyIterable(nextGen, iter)\n}\n\nfunction LazyIterable(gen, iter){\n this.... | javascript | edit | 0 | 4 | mit | 9bcf38f3116b163a12345d44954fab3f101b7b41 | kevinbeaty/nextgen | lib/iterable.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {createSelector} from 'reselect'\n\nimport selectActiveRegionalAnalysis from './active-regional-analysis'\nimport selectRegionalAnalyses from './regional-analyses'\n\nexport default createSelector(\n selectActiveRegionalAnalysis... | javascript | edit | 0 | 1 | mit | d7767b07dd07755f549773cee710147bea38f586 | conveyal/analysis-ui,conveyal/analysis-ui,conveyal/analysis-ui | lib/selectors/comparison-analyses.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Readable } from 'stream';\n\nexport default class ServerRequestAdapter extends Readable {\n constructor(connection, mpq, headers, body) {\n super({\n objectMode: true\n });\n\n const [method, url] = mpq.split(' '... | javascript | edit | 0 | 2 | mit | 0dc8c081303dd3c1de6f4992ade7dfa960160be3 | scola84/node-api-ws | src/server-request-adapter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nApp.Controllers.controller(\"usersController\", [\"$scope\", \"Restangular\", usersController]);\nfunction usersController($scope, Restangular) {\n Restangular.one(\"api\").all(\"users\").getList().then(function(users) {\n $sc... | javascript | edit | 0 | 1 | mit | 5dfab2a67470c61101c9ab4da6ab103355012b4a | gtarcea/1DevDayTalk2014,gtarcea/1DevDayTalk2014,gtarcea/1DevDayTalk2014 | website/app/users.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env mocha */\n'use strict'\n\nconst _ = require('lodash')\nconst expect = require('chai').expect\nconst LodashWrapper = require('../client/wrappers/Lodash')\nconst TEST_DATA = require('./fixtures')\n\ndescribe('wrapper: Lodash... | javascript | edit | null | null | mit | 778b45e4f076495759ec6852f3ff2d6e8f615d38 | frakti/dexters-lab | test/test-Lodash.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport SaveTripModal from './save-trip-modal.js'\n\n/**\n * Component corresponding to add trips modal.\n *\n * @param {Object} props These are the props for this component:\n * - db: Firestore database ins... | javascript | edit | 0 | 1 | apache-2.0 | d896ff474a80fc10442a0b134026f21576af22b6 | googleinterns/SLURP,googleinterns/SLURP,googleinterns/SLURP | frontend/src/components/ViewTrips/add-trip-modal.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nHandlebars.registerHelper('color', function(color) {\n var nameText = '';\n var hex = color.hex;\n var colorPickerLink = 'https://duckduckgo.com/?q=color+picker+' +\n encodeURIComponent(hex);\n if (color.name !== '') ... | javascript | edit | 0 | 3 | apache-2.0 | 84ee6aef275d5fcb6f992dfe1ded552622783e54 | tagawa/zeroclickinfo-goodies,marianosimone/zeroclickinfo-goodies,mr-karan/zeroclickinfo-goodies,seisfeld/zeroclickinfo-goodies,RomainLG/zeroclickinfo-goodies,urohit011/zeroclickinfo-goodies,marianosimone/zeroclickinfo-goodies,gautamkrishnar/zeroclickinfo-goodies,urohit011/zeroclickinfo-goodies,charles-l/zeroclickinfo-g... | share/goodie/rgb_color/rgb_color.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * This class implements authentication against google\n * using the OAuth2 authorization flow in a popup window.\n */\n\nimport Oauth2 from 'torii/providers/oauth2-code';\nimport {configurable} from 'torii/configuration';\n\nvar G... | javascript | edit | 0 | 0 | mit | 798a93c3b3c52ef893ac5a244a565a0c1cd26deb | jagthedrummer/torii,raycohen/torii,gannetson/torii,djgraham/torii,garno/torii,gannetson/torii,Gast/torii,cibernox/torii,anilmaurya/torii,mwpastore/torii,cibernox/torii,gnagel/torii,curit/torii,embersherpa/torii,gnagel/torii,image-tester/torii,garno/torii,Vestorly/torii,rancher/torii,cjroebuck/torii,bantic/torii,anilmau... | lib/torii/providers/google-oauth2.js | rejected_duplicate | Near-duplicate of sample 78792 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Grunt Remove Logging\n * https://github.com/ehynds/grunt-remove-logging\n *\n * Copyright (c) 2013 Eric Hynds\n * Licensed under the MIT license.\n */\n\nmodule.exports = function(grunt) {\n \"use strict\";\n\n var task = requi... | javascript | edit | 0 | 3 | mit | 64bac89d1667e5aba5dfe940da9f63f585ab769b | ehynds/grunt-remove-logging,goodpatch/grunt-remove-logging | tasks/grunt-remove-logging.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar MethodProxy = function(object, queue) {\n this.init = function(object, queue) {\n this.object = object;\n\n for (var i = 0; i < queue.length; ++i) {\n this.forward(queue[i]);\n }\n };\n\n // payload : ['methodName',... | javascript | edit | 0 | 3 | mit | 892457433b74999a6cb01bc4fa73255021820c1a | causes/method-proxy-js | method-proxy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n var _paq = window._paq = window._paq || [];\n /* tracker methods like \"setCustomDimension\" should be called before \"trackPageView\" */\n _paq.push([\"setDomains\", [\"*.ksi.fi.muni.cz\"]]);\n _paq.push([\"setDoNotTrack\", true])... | javascript | edit | 0 | 1 | mit | 4b9bf82f1e1a4ec0ff5787e923101fac1e6fdc28 | fi-ksi/web-frontend,fi-ksi/web-frontend,fi-ksi/web-frontend | public/js/matomo.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst { waterfall } = require('async')\nconst { defaults } = require('lodash')\n\nconst checkHostsAvailability = require('../util/check-hosts-availability')\nconst checkRequiredParams = require('../util/check-required-pa... | javascript | edit | 0 | 2 | mit | 24beccc681e623f0c7eb6f9ad3644f0749cbd99f | windtoday/windtoday-core,windtoday/windtoday-core | core/worker/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: Apache-2.0\nABOUT THIS NODE.JS EXAMPLE: This example works with AWS SDK for JavaScript version 3 (v3),\nwhich is available at https://github... | javascript | edit | 0 | 0 | apache-2.0 | 3c2f30805865d0091fc01b2585396626517b412c | awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,a... | javascriptv3/example_code/codebuild/src/libs/codeBuildClient.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by Liam Vovk on 2017-05-14.\n */\n\nmodule.exports.users = [\n {\n name: 'Liam TestDB',\n email: 'liam_is_swag@test.com',\n phone_number: 1234567,\n age: 21,\n account_type: 'contractor'\n },\n {\n n... | javascript | edit | 0 | 0 | mit | 4bdf71887cb8e98af3c0196064fc7939c52c482f | vovkman/messaging-api | test/fixtures/models/users.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nconst plugins = require('../collections-online/plugins');\n\nmodule.exports.register = () => {\n plugins.register(require('./motif-tagging'));\n plugins.register(require('./geo-tagging'));\n plugins.register(require('.... | javascript | edit | 0 | 1 | mit | f50ce3e9c1546153843a77f48bcb972a87b037a5 | CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder | plugins/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction makeData() {\n \"use strict\";\n\n return makeRandomData(50);\n}\n\nfunction run(div, data, Plottable) {\n \"use strict\";\n\n var svg = div.append(\"svg\").attr(\"height\", 500);\n\n var xScale = new Plottable.Scale.Linea... | javascript | edit | 0 | 1 | mit | db8d4d067e36729b26cc4a2a9eaf32e30f190d77 | onaio/plottable,NextTuesday/plottable,softwords/plottable,iobeam/plottable,softwords/plottable,RobertoMalatesta/plottable,RobertoMalatesta/plottable,gdseller/plottable,NextTuesday/plottable,iobeam/plottable,danmane/plottable,danmane/plottable,alyssaq/plottable,onaio/plottable,palantir/plottable,iobeam/plottable,softwor... | quicktests/js/tick_generator.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst PORT = 23526;\nconst restify = require('restify');\nconst shortid = require('shortid');\nconst uuid = require('uuid');\nconst RetroSocket = require('./retroSocket');\n// const messages = require('./messages');\n\n... | javascript | edit | 0 | 1 | unlicense | 803cc58ab5bd632ea8e8f5683b3d4477d7d251de | mgwalker/retros,mgwalker/retros,mgwalker/retros | server/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default class MainView {\n mount() {\n // This will be executed when the document loads...\n document.getElementsByClassName(\"logout-link\")[0].onclick = () => {\n let xhttp = new XMLHttpRequest();\n xhttp.open... | javascript | edit | 0 | 2 | mit | ec62df66dd16aa91a62a1479c6aa34340e9b09bb | tomfbiz/enhanced_map,tomfbiz/enhanced_map | web/static/js/views/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n describe('slider tests', function () {\n\n it('Should have MaterialSlider globally available', function () {\n expect(MaterialSlider).to.be.a('function');\n });\n\n it('Should be upgraded to a MaterialSlider successful... | javascript | edit | 0 | 1 | apache-2.0 | 77faea1946816372a09ef68ac7a44f0be70bbb4e | xiezhe/material-design-lite,lijanele/material-design-lite,rohanthacker/material-design-lite,Ycfx/material-design-lite,yonjar/material-design-lite,ston380/material-design-lite,DigitalCoder/material-design-lite,xiezhe/material-design-lite,fernandoPalaciosGit/material-design-lite,Treevil/material-design-lite,Frankistan/ma... | test/unit/slider.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar FFI = require(\"./ffi\"),\n util = require(\"util\");\n\n// CIF proves a JS interface for the libffi \"callback info\" (CIF) structure\nvar CIF = module.exports = function(rtype, types) {\n this._returnType = rtype;\... | javascript | edit | 0 | 4 | mit | f737fe72dd00b070a515254bb941139a6bea4253 | skoky/node-ffi,lzpfmh/node-ffi,pmuellr/node-ffi,craigcomstocks/node-ffi,node-ffi/node-ffi,skoky/node-ffi,node-ffi/node-ffi,unrealsolver/node-ffi,lzpfmh/node-ffi,node-ffi/node-ffi,node-ffi/node-ffi,craigcomstocks/node-ffi,unbornchikken/node-ffi,paulcbetts/node-ffi,Icenium/node-ffi,lzpfmh/node-ffi,craigcomstocks/node-ffi... | lib/cif.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {\n LOGIN_SUCCESS,\n LOGIN_FAILURE,\n LOGOUT_SUCCESS,\n LOGOUT_FAILURE\n} from '../constants/actions/Auth';\n\nconst fakeUser = {\n username: 'demo',\n token: 'ojn2jr3wrefj'\n};\n\nexport function login(username, password) ... | javascript | edit | 0 | 4 | mit | da6a3a379b5193a0a0c39183a5480c301264ef45 | ufocoder/redux-universal-boilerplate | src/actions/Auth.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add some elements to the DOM."
},
{
"role": "assistant",
"content": "console.log(\"Hello!\");\n\nlet div = document.createElement('div');\nlet h1 = document.createElement('h1');\nh1.textContent = \"Helloooo!\";\n\ndiv.appendC... | javascript | new_file | 0 | 0 | mit | 438b3f5f6884aa8e5e3c8f93bd1d0d31b0b88a6a | runelk/my-node-stack,runelk/my-node-stack,runelk/my-node-stack | src/client/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = require('path');\nvar merge = require('lodash.merge');\nvar configUtils = require('./utils/config-utils');\nvar Config = require('./config');\n\nvar getCurrentPath = configUtils.getCur... | javascript | edit | 0 | 6 | mit | 3510617597f426f181875995244c4f5a3b3039ce | twokul/yam | lib/yam.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar connect = require('connect'),\n port = process.env.PORT || 3000;\n\nconnect()\n .use(connect.static('app'))\n .listen(port);\n\nconsole.log('Application listening on port ' + port);\n\n```\n\nApply this change: Send root page for... | javascript | edit | 0 | 1 | mit | a373b506cd421e03af1b6117fc9049bc3c2d407d | aduth/marionette-require-starter,aduth/marionette-require-starter | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport React from 'react';\nimport moment from 'moment-timezone';\nimport { FormatTime } from 'app/components/Time';\n\ntype Penalty = {\n id: number,\n reason: string,\n weight: number,\n exactExpiration: string\n};\n\n... | javascript | edit | null | null | mit | 53a6f89025183fb037866928ba1ee0146f44fa25 | webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp | app/routes/users/components/Penalties.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar shell = require('shelljs');\n\nif (exec('git status --porcelain').output != '') {\n console.error('Git working directory not clean.');\n process.exit(2);\n}\n\nvar versionIncrement = process.argv[process.argv.length -1];\n\nif (ve... | javascript | edit | 0 | 2 | mit | 0dc4d5cabae77a5ae5f10f831f580aaa8256d11d | saintedlama/passport-local-mongoose,saintedlama/passport-local-mongoose | release.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction generateTree(dataArr, root) {\n let subTree, directChildren, subDataArr;\n let { name, id, articlesCount } = root;\n if (dataArr.length === 0) {\n return {\n id,\n name,\n articl... | javascript | edit | 0 | 3 | mit | 74a023de9af71822ac565ce384a496c3f50c2ffa | armaniExchange/work-genius,armaniExchange/work-genius,armaniExchange/work-genius | server/models/Category/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst html = require('choo/html');\nconst map = require('./map');\nconst { loader } = require('../icons');\nconst { __ } = require('../../locale');\n\nmodule.exports = function (state, emit) {\n let center;\n const { cooperatives, use... | javascript | edit | 0 | 8 | apache-2.0 | ca5be645ccfbe4a258c11112abe9ad80f454b566 | CIVIS-project/BRFApp | lib/components/map/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'hubaaa:endpoint-puller',\n version: '0.1.0',\n // Brief, one-line summary of the package.\n summary: 'Pulls API endpoints, checking for new data and passing it through json pipes.',\n // URL to the Git r... | javascript | edit | 0 | 1 | mit | 37e7c5b5c2517f88ffc90ea16a94e81c2474f48e | hubaaa/meteor-endpoint-puller | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nDarwinator.Boot = function() {};\n\nDarwinator.Boot.prototype = {\n \n preload: function () {\n this.load.image('preloader', 'assets/preloader.gif');\n },\n\n create: function () {\n this.game.input.maxPointer... | javascript | edit | 0 | 2 | mit | 9420d13cf8ad51e7c0d39ccbbc77d9197e4022f0 | werme/DATX02 | src/js/boot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Cache = require('./cache');\nvar Entry = require('./entry');\n\nfunction generateKey(request) {\n return request.method + '\\n' + request.url;\n}\n\nfunction sendCachedResponse(response, cached) {\n response.statusCode = cached.st... | javascript | edit | 0 | 3 | mit | c74385c5451d0622b26822c0c177fae8054692a3 | droonga/express-droonga,KitaitiMakoto/express-droonga,droonga/express-droonga,KitaitiMakoto/express-droonga | lib/response-cache/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (GoL, _) {\n \"use strict\";\n\n var cellNameToSymbol = { Alive: '*', Dead: '.' };\n\n function InvalidArgument(message) {\n this.prototype = Error.prototype;\n this.name = 'InvalidArgument';\n this.message ... | javascript | edit | 0 | 3 | mit | da02f351fc7398859bfc5b334eff312dacb6af4d | tkareine/game_of_life,tkareine/game_of_life,tkareine/game_of_life | lib/game_of_life.support.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe(\"Simple Test:\", function()\n{\n\t\"use strict\";\n\n\tit(\"a is in fact 'Hello World!' and b to be not null\", function()\n\t{\n\t\tvar a = \"Hello World!\";\n\t\tvar b = true;\n\t\texpect(a).toBe(\"Hello World!\");\n\t\texpe... | javascript | edit | 0 | 1 | mit | 98580a1e9664b2825c9683711ed2fd86b4aff6c7 | ericmdev/gulp.tasks,ericmdev/gulp.tasks | example/src/js/spec/simpletest.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst db = require('./db');\nconst express = require('express');\nconst convertIdToBase62 = require('./base62').convertIdToBase62;\nconst logger = require('winston');\n\nconst router = express.Router();\n\nmodule.exports = router;\nrout... | javascript | edit | 0 | 3 | mit | a3e4bf7471b964da83e06bfdf186beb90b25745d | glynnw/url-shortener,glynnw/url-shortener | lib/short-url-controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Browser = require('zombie'),\n browser = new Browser(),\n assert = require('assert'),\n server = require('../server/server'),\n router = require('../server/router'),\n requestHandler = require('./server/requestHandler... | javascript | edit | 0 | 1 | mit | 8d9f78f379d984470e1f8eb397cdefbd6a55dee7 | rickychien/try-nodejs | test/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n ___ usage ___ en_US ___\n usage: prolific average <options>\n\n -q, --qualified <string>\n The qualified name of the entry to aggregate.\n\n --help\n Display this message.\n\n ___ $ ___ ... | javascript | edit | 0 | 2 | mit | 0fedd365fa1f5178118e3090496e6198e9c0f9dd | bigeasy/prolific,bigeasy/prolific | prolific.aggregate/aggregate.argv.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n var $array_controls = $('#array-controls');\n\n $(document).on('click', '#array-controls a', function(e) {\n e.preventDefault();\n var $btn = $(this),\n confirmed = true,\n action = $.trim($btn.tex... | javascript | edit | 0 | 3 | mit | d840ba13ce5f745007b7fd8b4c755fd113643501 | nicinabox/boxcar,nicinabox/boxcar,nicinabox/boxcar | app/assets/javascripts/array_controls.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { call, put, takeLatest } from 'redux-saga/effects';\nimport envConfig from 'env-config';\n\nimport { WeatherActions, WeatherTypes } from './weather.redux';\nimport { get } from '../api/api.sagas';\n\n\nexport function* getWeathe... | javascript | edit | 0 | 2 | mit | 6ae107d83634531db19cde6865a825ee22985edd | wojciech-panek/study-group-6-redux,wojciech-panek/study-group-6-redux | app/modules/weather/weather.sagas.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar args = arguments[0] || {};\n\nvar player = args.player;\n\n$.name.text = player.get(\"FirstName\") + \" \" + player.get(\"LastName\");\n$.position.text = player.get(\"Position\");\n$.gamesPlayed.text = player.get(\"Played\") + \" Pl... | javascript | edit | 0 | 2 | mit | 9c978ecfca071b87d0b326c1ed725c966f79d8e3 | rsmacfarlane88/higher-lower,rsmacfarlane88/higher-lower,rsmacfarlane88/higher-lower | app/widgets/Player/controllers/widget.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass Status {\n constructor(currentHp, maxHp, currentMp, maxMp) {\n currentHp = Math.min(currentHp, maxHp);\n currentMp = Math.min(currentMp, maxMp);\n this.currentHp = isNaN(currentHp) ? 0 : currentHp;\n ... | javascript | edit | 0 | 5 | mit | 9f268314a0936578c61fd2e70802ed432328801a | ara-ta3/node-quest | src/game/model/status.js | rejected_duplicate | Near-duplicate of sample 68489 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.export = {\n afterInstall: function() {\n return this.addBowerPackageToProject([\n { name: 'paint', target: 'git://github.com/alphasights/paint.git#3c085ef958' },\n { name: 'spinjs', target: '2.0.1' }\... | javascript | edit | 0 | 1 | mit | 08e8813f747600508185d05280f38c1399e583d1 | alphasights/ember-cli-paint,alphasights/ember-cli-paint | blueprints/ember-cli-paint/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar app = require('app');\nvar BrowserWindow = require('browser-window');\n\nvar window = null;\n\napp.on('finish-launching', function() {\n window = new BrowserWindow({\n title: 'atom-shell tests',\n width: 800,\n height: 600... | javascript | edit | 0 | 1 | mit | 5bbb41415aeea5e80d6ec97adcef8e4791d0ab3d | aliib/electron,vHanda/electron,jcblw/electron,tinydew4/electron,deepak1556/atom-shell,posix4e/electron,fffej/electron,kcrt/electron,yalexx/electron,nagyistoce/electron-atom-shell,jlhbaseball15/electron,jlhbaseball15/electron,fabien-d/electron,shennushi/electron,kcrt/electron,mattdesl/electron,pirafrank/electron,adamjgr... | spec/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('achievements.controller', [])\n .controller('AchievementsController', function($scope) {\n\n $scope.gold = 15; // Place holder for user-specific data\n $scope.silver = 13; // Place holder for user-specific data\n ... | javascript | edit | 0 | 1 | mit | bf633dde99b39d717315163441d84ae681638a6b | gm758/Bolt,boisterousSplash/Bolt,elliotaplant/Bolt,thomasRhoffmann/Bolt,thomasRhoffmann/Bolt,boisterousSplash/Bolt,gm758/Bolt,elliotaplant/Bolt | client/app/controllers/achievementsController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react'\nimport GameTable from '../GameTable'\nimport PlayerUI from '../PlayerUI'\n\nconst App = () => {\n\n return (\n <div className=\"app\">\n <h2>APP</h2>\n <GameTable />\... | javascript | edit | 0 | 5 | mit | 99febf94f8d1ddd44fe21985d73b5036ab48a046 | fryymann715/merciful-eland,fryymann715/merciful-eland | src/components/app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @module client/controllers/controllerSequence\n */\n'use strict';\n\n// TODO move to service\nvar find = require('101/find');\n\nrequire('app')\n .controller('controllerSequence', controllerSequence);\n\nfunction controllerSequ... | javascript | edit | 0 | 2 | mit | 079b7240b3f9bd7407f78559c24e3eb58d8c52c6 | Runnable/hyperion,Runnable/hyperion | client/controllers/controllerSequence.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { BrowserRouter, Match, Redirect } from 'react-router';\nimport App from './App';\nimport Notes from './components/pages/Notes';\nimport Login from './components/page... | javascript | edit | 0 | 0 | mit | de7bb3598fc9813fc2ee271e738f75bfff04d344 | emyarod/refuge,emyarod/refuge | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#! /usr/bin/env node\n\nconst commander = require('commander')\nconst program = require('../lib/program')\nconst showWinnerImage = require('../lib/modules/show-winner-image')\nconst API_URL = process.env.API_URL\nconst PROFILE_URL = pro... | javascript | edit | 0 | 2 | mit | 83110263751ad76ab36a699c3130361b8eee1392 | durancristhian/meetup-randomizer | bin/cli.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport program from 'commander'\nimport stdin from 'stdin'\n\nimport info from '../package.json'\nimport { checkFiles, checkString } from './checks'\n\nexport default function main() {\n program\n .version(info.version)\n .usage(... | javascript | edit | 0 | 4 | mit | 123b364a68030284602713b773f9717c9685841d | relekang/lint-filter,relekang/lint-filter,relekang/lint-filter | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst isNode = !(typeof window !== 'undefined' && window.document && document.createElement)\nconst svgSource = require('raw!../dist/owl-ui.svg')\n\nif (!isNode) {\n const div = document.createElement('svg')\n div.id = 'owl-icons'\n ... | javascript | edit | 0 | 0 | mit | 20dcf1055890c505c84ad109c238add8e0112d7c | cepave-f2e/owl-icons | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\n\n/* GET all paintings. */\nrouter.get('/', function(req, res, next) {\n res.send('great art at naffordable prices');\n});\n\nmodule.exports = router;\n\n```\n\nApply t... | javascript | edit | 0 | 1 | mit | 25fb5f27839cda0df022d77a923ac51f0f421681 | Paint-market/paintings | routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet express = require('express');\nlet router = express.Router();\n\n/* GET Project */\nrouter.get('/', function (req, res) {\n res.render('graph', {\n title: 'Jama Software Capstone',\n subtitle: 'Project',\n projectId: req.q... | javascript | edit | 0 | 1 | mit | 548aceaef6fa7b020be1c277d01c2eeda266c9cf | RickyV33/Jama-Software,RickyV33/OverView,RickyV33/Jama-Software,RickyV33/OverView | routes/graph.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar request = require('request');\nvar _und = require('underscore');\n\n/* Get orders listing. */\nexports.list = function(req, res){\n var results = {\n orders: [],\n bitStampOrders: [],\n btceOrders: []\n };... | javascript | edit | 0 | 3 | mit | 06ab22a5bf3ef34b902ebb9c9ba66f0b8ddc6326 | thomaslangston/bitnode | routes/order.js | rejected_duplicate | Near-duplicate of sample 94296 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar helpers = require('./../../helpers.js')\n\nconst { client } = require('nightwatch-cucumber')\nconst { defineSupportCode } = require('cucumber')\n\ndefineSupportCode(({ Given, Then, When }) => {\n Given(/^I open Drift\\'s website$/,... | javascript | edit | 0 | 1 | mit | c828060a453c4fb7dc0e9c7871bf67e409e528ba | TheLocust3/Drift-Nightwatch | features/step_definitions/app_steps.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { StyleSheet, Dimensions } from 'react-native';\n\nexport default StyleSheet.create({\n mainContainer: {\n // flex: 3,\n width: Dimensions.get('window').width * .97,\n height: Dimensions.get('window').height * .95,\n ... | javascript | edit | 0 | 0 | mit | 9f85ba5e0576cc6e5308b885c32ee3102320fa73 | fridl8/cold-bacon-client,fridl8/cold-bacon-client,fridl8/cold-bacon-client | containers/styles/GameplayScreenStyle.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n Animated,\n AppState,\n Easing,\n View,\n ViewPropTypes\n} from 'react-native';\nimport CircularProgress from './CircularProgress';\nconst AnimatedProgress... | javascript | edit | 0 | 4 | mit | 086d7cd928c266c8626ea142c232d038c1072319 | bgryszko/react-native-circular-progress | src/AnimatedCircularProgress.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst AppConstants = {\n //Application name\n appName: 'Nano Wallet',\n\n version: '2.0.0',\n\n //Network\n defaultNetwork: 104,\n\n // Ports\n defaultNisPort: 7890,\n defaultMijinPort: 7895,\n defaultWebsocke... | javascript | edit | 0 | 0 | mit | 21d93e9a6214edaf3cda305c48a52c059b7f3960 | mizunashi/NanoWallet,mizunashi/NanoWallet | src/app/config/app.constants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default function getCloneDimensions(node, options) {\n const { parentNode } = node\n const context = document.createElement('div')\n const clone = node.cloneNode(true)\n const style = getComputedStyle(node)\n let rect = {}\n... | javascript | edit | 0 | 4 | mit | 8285227ba7c0a635152ca4a8a711b946ddea4fbc | souporserious/get-node-dimensions | src/get-clone-dimensions.js | rejected_duplicate | Near-duplicate of sample 87571 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.