messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport jwt from 'jsonwebtoken';\nimport errors from 'feathers-errors';\n\n/**\n * Verifies that a JWT token is valid\n * \n * @param {Object} options - An options object\n * @param {String} options.secret - The JWT secret\n */\nexport ... | javascript | edit | 0 | 2 | mit | 7d56f85029af381d27a70d3eec719a3270febe14 | feathersjs/feathers-passport-jwt,feathersjs/feathers-passport-jwt,feathersjs/feathers-authentication,eblin/feathers-authentication,eblin/feathers-authentication,m1ch3lcl/feathers-authentication,m1ch3lcl/feathers-authentication | src/hooks/verify-token.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Continuous delivery server\nconst { spawn } = require('child_process')\nconst { resolve } = require('path')\nconst { createServer } = require('http')\nconst { parse } = require('qs')\n\nconst hostname = '127.0.0.1'\nconst port = 80\n... | javascript | edit | 0 | 3 | mit | 6b883624c19abad009db96f0d00d1ef84b1defe9 | jsonnull/jsonnull.com,jsonnull/jsonnull.com,jsonnull/jsonnull.com | scripts/cd-server.js | rejected_duplicate | Near-duplicate of sample 96928 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * The PropTypes.EmberComponent validator\n */\n\nimport Ember from 'ember'\nconst {typeOf} = Ember\n\nimport logger from '../logger'\n\nexport default function (ctx, name, value, def, logErrors, throwErrors) {\n const isObject = ... | javascript | edit | 0 | 4 | mit | 8b6befcd13104e8eb829947d42a843ec648b5296 | ciena-blueplanet/ember-prop-types,sandersky/ember-prop-types,sandersky/ember-prop-types,sandersky/ember-prop-types,ciena-blueplanet/ember-prop-types,ciena-blueplanet/ember-prop-types | addon/utils/validators/ember-component.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Tweak heroku build to put it into production mode"
},
{
"role": "assistant",
"content": "var build = require('./build');\n\nbuild()\n .catch(function(err) {\n require('trace');\n require('clarify');\n console.trace(... | javascript | new_file | 0 | 1 | mit | 0f68aa298d5cc7c2578126456197fe0ce0798db1 | LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements | build/start.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// CHANGELOG check\nconst hasAppChanges = _.filter(git.modified_files, function(path) {\n return _.includes(path, 'lib/');\n}).length > 0\n\nif (hasAppChanges && _.includes(git.modified_files, \"CHANGELOG.md\") === false) {\n fail(\"N... | javascript | edit | 0 | 1 | mit | 34b539fbe0b7af085bfc9a5e497b403694e3ac0e | artsy/emission,artsy/eigen,artsy/eigen,artsy/emission,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen,artsy/emission,artsy/emission,artsy/emission,artsy/emission,artsy/emission | Dangerfile.js | rejected_duplicate | Near-duplicate of sample 97862 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\n/*global module, require*/\n\nvar modalDialogueFactory = require(\"./processes/modal-dialogue.js\"),\n commentFactory = require(\"./accordion-comment.js\"),\n\n online = {\n\tonline: true,\n\toffline: false\n ... | javascript | edit | 0 | 2 | mit | 5575571bf0dca4f941e87164839605dc6aca0014 | cse-bristol/multiuser-file-menu,cse-bristol/multiuser-file-menu | js/buttons/delete-button.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n // only run if the correct page\n if (!($('body').hasClass('students') && $('body').hasClass('show'))) return;\n\n // imports\n var createEl = window.shared.ReactHelpers.createEl;\n var PageContainer = window.share... | javascript | edit | 0 | 3 | mit | b8db7e248edc31bd5231088832feacf35843b73e | erose/studentinsights,erose/studentinsights,jhilde/studentinsights,erose/studentinsights,studentinsights/studentinsights,jhilde/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,jhilde/studentinsights,jhilde/studentinsights,erose/studentinsights,studentinsights/studentinsights | app/assets/javascripts/student_profile/main.js | rejected_duplicate | Near-duplicate of sample 93686 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as http_data from \"./http-data\";\nimport * as urlModule from \"url\";\nconst transferrers = {};\n\nfunction transfer(request) {\n // url - the resource URI to send a message to\n // options.method - the method to use for ... | javascript | edit | 0 | 5 | mit | cb755108580ee143b9e74883a2948598473e341d | lynx-json/jsua | src/transferring/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Not to mix with `DataSnapshots` class which is about different thing\n// (serialized list views updated reactively)\n//\n// This one is about snaphots of data made in specific moments of time.\n// Snaphots are not reactive in any way... | javascript | edit | 0 | 2 | mit | 59db5d86469bf8f474f8a1ab40588d218831c99c | egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations | model/lib/data-snapshot/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global describe, it */\n\nimport assert from 'assert';\nimport {KATAS_URL, URL_PREFIX} from '../src/config.js';\nimport GroupedKata from '../src/grouped-kata.js';\n\ndescribe('load ES6 kata data', function() {\n\n it('loaded data ar... | javascript | edit | 0 | 1 | mit | 425470a41a20f416fb05c575a443ffffb9aac71d | wolframkriesing/es6-react-workshop,wolframkriesing/es6-react-workshop | test/load-json-spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global describe, beforeEach, it*/\n'use strict';\n\nvar path = require('path');\nvar helpers = require('yeoman-generator').test;\n\n\ndescribe('browserify generator', function () {\n beforeEach(function (done) {\n helpers... | javascript | edit | 0 | 2 | mit | e7da62df0ace6f30593df7d18ae983cb7e44c778 | dlmoody/generator-browserify,vincentmac/generator-browserify,dlmoody/generator-browserify | test/test-creation.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar createTouchEditor = function createTouchEditor() {\n var noop = function () {},\n TouchEditor;\n\n TouchEditor = function (el, options) {\n /*jshint unused:false*/\n this.textarea = el;\n this.win =... | javascript | edit | 0 | 2 | mit | 51b20d91eb64be964c6cd9f585553d41ddd297fa | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost | ghost/admin/assets/lib/touch-editor.js | rejected_duplicate | Near-duplicate of sample 95112 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n::if embeddedLibraries::::foreach (embeddedLibraries)::\n::__current__::::end::::end::\n// lime.embed namespace wrapper\n(function ($hx_exports, $global) { \"use strict\";\n$hx_exports.lime = $hx_exports.lime || {};\n$hx_exports.lime.$s... | javascript | edit | null | null | mit | 914e94f9e5531465fdf6028734fb99402fae3411 | madrazo/lime-1,player-03/lime,madrazo/lime-1,MinoGames/lime,openfl/lime,player-03/lime,openfl/lime,madrazo/lime-1,madrazo/lime-1,MinoGames/lime,openfl/lime,openfl/lime,madrazo/lime-1,player-03/lime,MinoGames/lime,openfl/lime,player-03/lime,player-03/lime,MinoGames/lime,MinoGames/lime,MinoGames/lime,player-03/lime,madra... | templates/html5/output.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst options = {\n frameworks: ['kocha', 'browserify'],\n files: [\n 'packages/karma-kocha/__tests__/*.js'\n ],\n preprocessors: {\n 'packages/karma-kocha/__tests__/*.js': ['browserify']\n },\n browserify: { debug: true },\... | javascript | edit | 0 | 1 | mit | bbce11a5b7cf71b35d1ab77d48eacd8ddc755b9e | kt3k/kocha | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst base = require('skatejs-build/karma.conf');\nmodule.exports = (config) => {\n base(config);\n\n config.files = [\n // React\n 'https://scontent.xx.fbcdn.net/t39.3284-6/13591530_1796350410598576_924751100_n.js',\n\n // R... | javascript | edit | 0 | 1 | mit | 0d6fd08589942a675b380a03dd1f35b100648ce8 | chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n_r(function (app) {\n if ( ! window.app.views.hasOwnProperty('db')) {\n app.views.db = {};\n }\n \n /**\n * Database selection box\n */\n app.views.db.box = app.base.formView.extend({\n \n model: app.models.Db,\n mo... | javascript | edit | 0 | 2 | mit | e3d04be3e031feabc28d5b13deaa4b445f885a05 | maritz/nohm-admin,maritz/nohm-admin | static/js/views/dbView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// install : cordova plugin add https://github.com/whiteoctober/cordova-plugin-app-version.git\n// link : https://github.com/whiteoctober/cordova-plugin-app-version\n\nangular.module('ngCordova.plugins.appVersion', [])\n\... | javascript | edit | 0 | 1 | mit | a1d6637ecd4f9d8c0745d3ea59ec83742e371c24 | listrophy/ng-cordova,dangerfarms/ng-cordova,sesubash/ng-cordova,driftyco/ng-cordova,justinwp/ng-cordova,DavidePastore/ng-cordova,cihadhoruzoglu/ng-cordova,5amfung/ng-cordova,candril/ng-cordova,omefire/ng-cordova,alanquigley/ng-cordova,Jewelbots/ng-cordova,beauby/ng-cordova,GreatAnubis/ng-cordova,Freundschaft/ng-cordova... | src/plugins/appVersion.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst textUtil = require('../utils/text');\n\nmodule.exports = {\n init(nextLevelId, cameraPosition) {\n this.nextLevelId = nextLevelId;\n this.cameraPosition = cameraPosition;\n },\n\n create() {\n // TO... | javascript | edit | 0 | 1 | mit | dd2db0cee5a24f8564a2d306aa9098eba400c1a4 | to-the-end/to-the-end,to-the-end/to-the-end | states/level-fail-menu.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global module:false */\nmodule.exports = function (config) {\n config.set({\n basePath: '',\n\n frameworks: ['mocha', 'chai'],\n\n reporters: ['dots', 'progress'],\n\n browsers: ['ChromeIncognito', 'Firefox', 'Safari'],\... | javascript | edit | 0 | 1 | mit | 245ddf33d7d4fecbf000a6cd42f3c54cbc476238 | jensarps/IDBWrapper,jayfunk/IDBWrapper,jayfunk/IDBWrapper,jensarps/IDBWrapper | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n const files = [\n {\n pattern: 'browser/everything.html',\n included: false,\n served: true,\n },\n {\n pattern: 'browser/everything.js',\n included: true,\n ... | javascript | edit | 0 | 2 | mit | 623796045a00bb3cd67dd88ece4c89cae01e9f09 | noflo/noflo-browser,noflo/noflo-browser | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst fs = require('fs');\nconst cp = require('child_process');\nconst os = require('os');\nconst commander = require('commander');\nconst parse = require('git-url-parse');\n\nconst gitRoot = cp.execSync('git rev-parse ... | javascript | edit | null | null | mit | fe3cf35e9c1ba40fe92e0b018bfa55026b6a786d | shawncplus/ranviermud | util/install-bundle.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2012 Mark Cavage, Inc. All rights reserved.\n\nvar jsonParser = require('./json_body_parser');\nvar formParser = require('./form_body_parser');\nvar multipartParser = require('./multipart_parser');\n\nvar errors = require(... | javascript | edit | 0 | 11 | mit | 85f32436c920101c8877462d11445ca44bc32832 | TheDeveloper/node-restify,prasmussen/node-restify,adunkman/node-restify,chaordic/node-restify,kevinykchan/node-restify,uWhisp/node-restify,jclulow/node-restify,ferhatsb/node-restify | lib/plugins/body_parser.js | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"modulePaths\": [\n \"<rootDir>/app\",\n \"<rootDir>/node_modules\"\n ],\n \"moduleFileExtensions\": [\n \"js\",\n \"json\"\n ],\n \"testRegex\": \"/test/*/.*-test.js$\",\... | javascript | edit | 0 | 0 | apache-2.0 | ee97033aab6492b08c23f7eb52e93c9f4f58b9bf | stamp-web/stamp-webservices | jest.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global chrome,document,window */\n(function init(angular) {\n \"use strict\";\n try {\n chrome.storage.local.get([\"url\", \"tab.selected\", \"always-tab-update\"], function (items) {\n var url = items.url;\n ... | javascript | edit | 0 | 6 | mit | 13b19fd044152ac6bf1213aa4d22fa0cb1623da6 | jimschubert/NewTab-Redirect,jimschubert/NewTab-Redirect | js/redirect.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Command = require('../structures/Command');\nconst snekfetch = require('snekfetch');\nconst { inspect } = require('util');\n\nclass PostCommand extends Command {\n\tconstructor() {\n\t\tsuper({\n\t\t\tname: 'post',\n\t\t\tdescript... | javascript | edit | 0 | 3 | mit | 1696f212f0ff83997f2aadb6b14a9cd4d716a172 | robflop/robbot | src/commands/post.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Grasspiler / errors.js\n * copyright (c) 2016 Susisu\n */\n\n\"use strict\";\n\nfunction endModule() {\n module.exports = Object.freeze({\n ParseError,\n CompileError\n });\n}\n\nclass ParseError extends Error... | javascript | edit | 0 | 1 | mit | d64c1914a95e150b32ec750171187b8354059cd8 | susisu/Grasspiler | lib/errors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst Item = require('./item');\nconst Handler = require('./handler');\nconst Plugin = require('../plugin');\nconst url = require('url');\nconst {coroutine: co} = require('bluebird');\n\nclass Router extends Plugin {\... | javascript | edit | 0 | 3 | mit | 22eb68d51eefaefaa8def3b0ef44d4a551babcca | coreyp1/defiant,coreyp1/defiant | lib/plugin/router/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nGithub = {};\n\n// Request Github credentials for the user\n// @param options {optional}\n// @param credentialRequestCompleteCallback {Function} Callback function to call on\n// completion. Takes one argument, credentialToken on succe... | javascript | edit | 0 | 5 | mit | 4b0660934648ff19db30803f5faf84bedfe2c5d2 | EduShareOntario/meteor,daltonrenaldo/meteor,dev-bobsong/meteor,youprofit/meteor,skarekrow/meteor,PatrickMcGuinness/meteor,DCKT/meteor,henrypan/meteor,HugoRLopes/meteor,jdivy/meteor,benjamn/meteor,yalexx/meteor,daltonrenaldo/meteor,youprofit/meteor,Profab/meteor,sitexa/meteor,TribeMedia/meteor,esteedqueen/meteor,yanisIk... | packages/github/github_client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.\n For licensing, see LICENSE.html or http://cksource.com/ckfinder/license\n */\n\n( function( window, bender ) {\n\t'use strict';\n\n\tvar unlock = bender.... | javascript | edit | 0 | 1 | mit | a0f8a7bcc765f8fb07a2760a09307faf39404aca | benderjs/benderjs-amd | lib/adapter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'verody:groupaccount',\n version: '0.1.0',\n summary: 'Account management package providing qualified access to a single Meteor server account from one or more sets of credentials.',\n git: 'https:... | javascript | edit | 0 | 1 | mit | 1057855e5c60e281e8c2450d4ac5560c385da771 | ekobi/meteor-groupaccount,ekobi/meteor-groupaccount,ekobi/meteor-groupaccount | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndocument.documentElement.style.webkitTouchCallout='none';\n\nvar root = document.getElementsByTagName( 'html' )[0]\nroot.setAttribute( 'class', 'hybrid' );\n\nvar styleElement = document.createElement('style');\nroot.appendChild(styleEl... | javascript | edit | 0 | 0 | mit | 3e968acae5397d7b33d409fc0c26da610c1ba9b0 | intellum/neeman,intellum/neeman,intellum/neeman,intellum/neeman | Resources/js/InjectCSS.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright 2013 Rackspace\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 a copy of the License at\n *\n * ... | javascript | edit | 0 | 1 | apache-2.0 | df3766e78ec0c5af757135192e5a1ff6b051199f | racker/node-cassandra-client,racker/node-cassandra-client | lib/errors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * grunt-ember-handlebars\n * https://github.com/yaymukund/grunt-ember-handlebars\n *\n * Copyright (c) 2012 Mukund Lakshman\n * Licensed under the MIT license.\n *\n * A grunt task that precompiles Ember.js Handlebars templates int... | javascript | edit | 0 | 1 | mit | 5010579e063b1534d77638b08e6f61646d6969c8 | yaymukund/grunt-ember-handlebars,gooddata/grunt-ember-handlebars,gooddata/grunt-ember-handlebars | tasks/ember-handlebars.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2014-2020 Bjoern Kimminich.\n * SPDX-License-Identifier: MIT\n */\n\nconst request = require('request')\nconst colors = require('colors/safe')\nconst logger = require('../lib/logger')\nconst utils = require('../lib/... | javascript | edit | 0 | 2 | mit | cfe506bf86d27cf1c1c9677adf7902e3c003dfe7 | bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop | lib/webhook.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*==================================================\n * Exhibit.ExhibitJSONImporter\n *==================================================\n */\n \nExhibit.ExhibitJSONImporter = {\n};\nExhibit.importers[\"application/json\"] = Exhibit.... | javascript | edit | 0 | 5 | bsd-3-clause | 84a3c8c53f6e5c307aacceb91b7caaec7829bb95 | zepheira/exhibit,zepheira/exhibit,zepheira/exhibit,zepheira/exhibit,zepheira/exhibit,zepheira/exhibit | src/webapp/api/scripts/importers/exhibit-json-importer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar nock = require('nock')\n , io = require('../index');\n\nvar helper = exports;\n\n//\n// Define the default options\n//\nvar default_options = helper.default_options = {\n endpoint: 'https://api.orchestrate.io',\n api: 'v0'\n};\n\... | javascript | edit | 0 | 0 | mit | ff4ac1f418508c005d5afa713027af33dcf29ff1 | giraffi/node-orchestrate.io | test/helper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nBlogPostsFactory.$inject = ['$resource'];\nfunction BlogPostsFactory($resource){\n return $resource('/api/v1/posts/:postId');\n}\n\nangular.module('blog.posts.service', [\n 'ngResource'\n]).factory('Posts', BlogPostsFactory);\n\n```\n... | javascript | edit | 0 | 1 | isc | 54b35d592d3d2c7e9c4357acc2c3cdc3a3c5478f | RupertJS/rupert-example-blog,RupertJS/rupert-example-blog | src/client/blog/posts/posts-service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst ld = require('lodash');\nconst moment = require('moment');\nconst setMetadata = require('../utils/updateMetadata.js');\n\n/**\n * Adds metadata from billing into usermix\n * @param {String} username\n * @return {Promise}\n */\nmo... | javascript | edit | 0 | 1 | mit | 3d0972cc6f42359bc3a94254c808a1a6e34517a9 | makeomatic/ms-users,makeomatic/ms-users | src/custom/cappasity-users-activate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar torii, container;\n\nimport buildFBMock from 'test/helpers/build-fb-mock';\nimport toriiContainer from 'test/helpers/torii-container';\nimport configuration from 'torii/configuration';\n\nvar originalConfiguration = configuration.en... | javascript | edit | 0 | 1 | mit | ef35f61e3d19f4afefdf31343434d475a8a0e80f | Vestorly/torii,cjroebuck/torii,cibernox/torii,garno/torii,anilmaurya/torii,cjroebuck/torii,Vestorly/ember-tron,image-tester/torii,bantic/torii,rwjblue/torii,raycohen/torii,embersherpa/torii,gnagel/torii,garno/torii,rancher/torii,embersherpa/torii,abulrim/torii,curit/torii,gannetson/torii,anilmaurya/torii,greyhwndz/tori... | test/tests/integration/endpoints/facebook-connect-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n bind : function (app) {\n\n app.get('/', function (req, res) {\n console.log(\"Clearing the session.\")\n delete req.session\n res.render('index');\n });\n\n app.get('/examples/template-data... | javascript | edit | 0 | 1 | mit | c4e00daab05ac6cc0b9965fd5a07539b3281bd2e | stephenjoe1/pay-staff-tool,stephenjoe1/pay-staff-tool,stephenjoe1/pay-staff-tool | app/routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mapboxDataTeam = require('mapbox-data-team');\n\nconst config = {\n 'API_BASE': 'https://api-osm-comments-staging.tilestream.net/api/v1/',\n 'MAPBOX_ACCESS_TOKEN': 'pk.eyJ1Ijoic2FuamF5YiIsImEiOiI3NjVvMFY0In0.byn_eCZGAwR1yaPeC-... | javascript | edit | 0 | 0 | bsd-2-clause | e4b7c59821ba71bb49c212e65bc23da3eeaa26a6 | mapbox/osm-comments,mapbox/osm-comments | app/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport commonUrl from 'shared/constants/commonLinks';\nimport LinkButton from 'shared/components/linkButton/linkButton';\nimport styles from './opCodeCon.css';\n\nconst OpCodeCon = () => (\n <div className={... | javascript | edit | 0 | 3 | mit | 58239dac2cc98052570cd13e87905c9fb3b11de5 | sethbergman/operationcode_frontend,OperationCode/operationcode_frontend,sethbergman/operationcode_frontend,sethbergman/operationcode_frontend,hollomancer/operationcode_frontend,OperationCode/operationcode_frontend,hollomancer/operationcode_frontend,OperationCode/operationcode_frontend,hollomancer/operationcode_frontend | src/scenes/home/opCodeCon/opCodeCon.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar log4js = require('log4js');\nvar logger = log4js.getLogger();\nvar express = require('express');\nvar favicon = require('serve-favicon');\nvar bodyParser = require('body-parser');\nvar port = process.env.OPENSHIFT_NODEJS_PORT || 300... | javascript | edit | 0 | 1 | mit | dfb9b5b2b45d76a463af38eb6362922bf6ea9f9e | jimmyangel/rikitrakiws,jimmyangel/rikitrakiws | rikitrakiws.js | rejected_duplicate | Near-duplicate of sample 107177 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\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 * @format\n * @flow strict-local\n */\n\n... | javascript | edit | 0 | 0 | mit | b14b34b232b4873137ea3f3c7a90f86b9013885a | javache/react-native,javache/react-native,janicduplessis/react-native,javache/react-native,javache/react-native,janicduplessis/react-native,facebook/react-native,facebook/react-native,facebook/react-native,facebook/react-native,janicduplessis/react-native,javache/react-native,janicduplessis/react-native,javache/react-n... | Libraries/ReactPrivate/ReactNativePrivateInitializeCore.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button } from 'react-bootstrap';\nimport FontAwesome from 'react-fontawesome';\n\nimport ContentContainer from '../../../components/applayout/ContentContainer';\n... | javascript | edit | 0 | 1 | apache-2.0 | 81d56eb96900ee77e31bd3cfc09751084f076c57 | dataloom/gallery,kryptnostic/gallery,dataloom/gallery,kryptnostic/gallery | src/containers/toputilizers/components/TopUtilizersForm.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// js/routes\n\n(function() {\n \"use strict\";\n\n angular.module(\"NoteWrangler\")\n .config(config);\n\n function config($routeProvider) {\n $routeProvider\n .when(\"/notes\", {\n templateUrl: \"../templates/page... | javascript | edit | 0 | 1 | mit | 8ebb4b1d798c02dd62d7b0e584f567374c4a930c | var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training | NoteWrangler/public/js/routes.js | rejected_duplicate | Near-duplicate of sample 77131 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\n\nvar webInterface = function(dbot) {\n var dbot = dbot;\n\n var pub = 'public';\n var app = express.createServer();\n\n app.use(express.compiler({ src: pub, enable: ['sass'] }));\n app.... | javascript | edit | 0 | 2 | mit | d60038a85207a5126048733c700b15cd39b7e80b | zuzak/dbot,zuzak/dbot | modules/web.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction(doc, req) {\n start({\n \"headers\" : {\n \"Content-type\": \"text/html\"\n }\n });\n var Mustache = require(\"vendor/mustache\");\n var x = Mustache.to_html(this.templates.paste, doc);\n return x;\... | javascript | edit | 0 | 1 | mit | 9c69add5dbeb82687180f0f225defbe8cc2f0553 | gdamjan/paste-couchapp | shows/paste.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n model() {\n let node = this.modelFor('nodes.detail');\n return node.get('draftRegistrations');\n }\n});\n\n```\n\nApply this change: Make both node ... | javascript | edit | 0 | 1 | apache-2.0 | 2aacce141e11e2e30f566cad900c9fa1f4234d2b | crcresearch/ember-osf,CenterForOpenScience/ember-osf,pattisdr/ember-osf,hmoco/ember-osf,baylee-d/ember-osf,hmoco/ember-osf,jamescdavis/ember-osf,CenterForOpenScience/ember-osf,pattisdr/ember-osf,chrisseto/ember-osf,binoculars/ember-osf,binoculars/ember-osf,cwilli34/ember-osf,jamescdavis/ember-osf,crcresearch/ember-osf,... | tests/dummy/app/routes/nodes/detail/draft-registrations.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash');\n\nvar prompts = [\n {\n type: 'input',\n name: 'projectName',\n message: 'Machine-name of your project?',\n // Name of the parent directory.\n default: _.last(process.cwd().sp... | javascript | edit | 0 | 2 | mit | 4390638b4674024c7abd266450916fbe4f78ea5a | phase2/generator-outrigger-drupal,phase2/generator-outrigger-drupal,phase2/generator-outrigger-drupal | prompts.js | rejected_duplicate | Near-duplicate of sample 104625 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * JBoss, Home of Professional Open Source.\n * Copyright 2014 Red Hat, Inc., and individual contributors\n * as indicated by the @author tags.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no... | javascript | edit | 0 | 2 | apache-2.0 | 1e28a1f64256b02c70d1534561760657c6076179 | jdcasey/pnc,jbartece/pnc,jsenko/pnc,alexcreasy/pnc,ruhan1/pnc,thauser/pnc,alexcreasy/pnc,jsenko/pnc,jbartece/pnc,dans123456/pnc,thescouser89/pnc,matejonnet/pnc,matedo1/pnc,jdcasey/pnc,ruhan1/pnc,rnc/pnc,jbartece/pnc,matedo1/pnc,matedo1/pnc,pkocandr/pnc,thauser/pnc,alexcreasy/pnc,project-ncl/pnc,jsenko/pnc,dans123456/pn... | ui/app/common/authentication/directives/pncRequiresAuth.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = require('path');\nvar winston = require('winston');\n\n//\n// Logging levels\n//\nvar config = {\n levels: {\n silly: 0,\n verbose: 1,\n debug: 2,\n info: 3,\n warn: 4,\n error: 5\n },\n ... | javascript | edit | 0 | 2 | apache-2.0 | 608891cff627257521353d513397b01294bbf855 | mwaylabs/mcap-cli | lib/logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nRouter.configure({\n layoutTemplate: '_layout'\n});\n\n\n//From what I can tell this has been depreciated\n//https://github.com/iron-meteor/iron-router/blob/739bcc1445db3ad6bf90bda4e0cab3203a0ae526/lib/router.js#L88\nRouter.map(functio... | javascript | edit | 0 | 1 | mit | 96507503d52fef205e9462de3bdcd7d38f18c453 | mtr-cherish/cherish,mtr-cherish/cherish | lib/routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nchrome.contextMenus.create(\n {\n \"title\": \"Define \\\"%s\\\"\",\n \"contexts\":[\"selection\"],\n \"onclick\": function(info, tab){\n chrome.tabs.create(\n {url: \"http://www.google.... | javascript | edit | 0 | 1 | mit | c530d6bee2bc659945b711c215b9f0368f0a8981 | nwjlyons/google-dictionary-lookup | background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar app = require(\"express\")();\n\napp.get('/', function (req, res) {\n res.send('c\\'est ne une jsbin');\n});\n\napp.listen(3000);\n\n```\n\nApply this change: Add support for serving static files and logging"
},
{
"role": "... | javascript | edit | 0 | 1 | mit | b33eafc06f6f89166cecd8cde664c470cc249b31 | thsunmy/jsbin,jsbin/jsbin,filamentgroup/jsbin,mingzeke/jsbin,jwdallas/jsbin,kentcdodds/jsbin,jsbin/jsbin,knpwrs/jsbin,IvanSanchez/jsbin,martinvd/jsbin,blesh/jsbin,saikota/jsbin,pandoraui/jsbin,carolineartz/jsbin,dhval/jsbin,svacha/jsbin,mlucool/jsbin,dennishu001/jsbin,eggheadio/jsbin,Freeformers/jsbin,mcanthony/jsbin,c... | lib/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst u = require('../styles/utils');\n\nmodule.exports = {\n '.dashboard': {\n 'padding': u.inRem(20),\n },\n\n '.dashboard’s-title': {\n 'font-size': u.inRem(40),\n 'line-height': u.inRem(40),\n },\n\n '.dashboard’s-subt... | javascript | edit | 0 | 0 | mit | 596710cc1308f0da187aca5f3cbe4f0b39a478a6 | magnificat/magnificat.surge.sh,magnificat/magnificat.surge.sh,magnificat/magnificat.surge.sh | frontend/Components/Dashboard.style.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nvar passport = require('passport')\n\nmodule.exports = function(app) {\n var house = require('../controllers/houseController')\n\n app.route('/houses')\n .get(house.list_all_houses)\n .post(passport.authenticate(... | javascript | edit | 0 | 4 | apache-2.0 | 4fead2fa52d33a187879371f2cb5b9af2ad2aa14 | sotirelisc/housebot-api | api/routes/houseRoutes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Incomplete type for settings in the `settings.json` file.\n *\n * This contains only the settings that the background script uses. Other\n * settings are used when generating the `manifest.json` file.\n *\n * @typedef Settings\n... | javascript | edit | 0 | 0 | bsd-2-clause | 2e357b2fd8d384047a98a2d13f074c378c6c7cbb | hypothesis/browser-extension,hypothesis/browser-extension,hypothesis/browser-extension,hypothesis/browser-extension | src/background/settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n\n get: function(task) {\n return new Promise((resolve, reject) => {\n\n // Check type\n if ( task.type === undefined || ! ['show', 'move'].includes(task.type) ) {\n return rejec... | javascript | edit | 0 | 4 | apache-2.0 | c1941e8deb1011fcda896467dea65f2a1a067bcd | transmutejs/core | app/libs/details/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport GraphiQL from 'graphiql';\nimport { fetch } from 'global';\nimport 'graphiql/graphiql.css';\n\nimport FullScreen from './components/FullScreen';\n\nconst FETCH_OPTIONS = {\n method: 'post',\n headers... | javascript | edit | 0 | 2 | mit | 4b534e9a9412d28c5a5e741287c0153af2286c2f | enjoylife/storybook,storybooks/storybook,rhalff/storybook,jribeiro/storybook,nfl/react-storybook,jribeiro/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,rhalff/storybook,enjoylife/storybook,nfl/react-storybook,jribeiro/storybook,nfl/react-storybook,kadirahq/react-storybook,storybooks/sto... | addons/graphql/src/preview.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar slugify = require('./slugify');\nvar join = require('path').join;\nvar moment = require('moment');\n\nmodule.exports = function (title, page, draft, dateStamp) {\n\n var relative_path_without_extension;\n\n var slug = slugify(titl... | javascript | edit | 0 | 5 | cc0-1.0 | 3d81d8597aec5d77525edf6b479e02317b75ca36 | davidmerfield/Blot,davidmerfield/Blot,davidmerfield/Blot,davidmerfield/Blot | app/dashboard/routes/importer/helper/determine_path.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst propertiesReader = require(\"properties-reader\");\n\nconst defaults = {\n \"primary-color\": \"#1890ff\",\n \"info-color\": \"#1890ff\",\n \"link-color\": \"#1890ff\",\n \"font-size-base\": \"14px\",\n \"border-radius-base\"... | javascript | edit | 0 | 2 | apache-2.0 | e6516d3ef113bb35bcee5fd199ab06d14ca3f036 | phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida | src/main/webapp/styles.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from \"react\";\nimport { Modal } from \"react-bootstrap\";\nimport { AlgorithmSelect, Button } from \"virtool/js/components/Base\";\n\nconst getInitialState = () => ({\n algorithm: \"pathoscope_bowtie\"\n... | javascript | edit | 0 | 1 | mit | 1208ee980cf3e5b3c2c847c2a8d27b4ec7207f0f | igboyes/virtool,igboyes/virtool,virtool/virtool,virtool/virtool | client/src/js/samples/components/Analyses/Create.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n *\n * This is used to build the bundle with browserify.\n *\n * The bundle is used by people who doesn't use browserify.\n * Those who use browserify will install with npm and require the module,\n * the package.json file points to... | javascript | edit | 0 | 1 | mit | f998f5fe7aedb8e33a81727c8371b690a698c73b | mike-casas/lock,mike-casas/lock,mike-casas/lock | src/browser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This module is responsible for capturing videos\n\n'use strict';\n\nconst config = require('config');\nconst PiCamera = require('pi-camera');\nconst myCamera = new PiCamera({\n mode: 'video',\n output: process.argv[2],\n width: co... | javascript | edit | 0 | 3 | mit | fc112a5d2fe9418150c15740b297e2c74af72ab2 | stetsmando/pi-motion-detection | lib/VideoCapture.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction ResponsesNewWindow(surveyID) {\n try {\n var ResponsesIndexView = require('ui/common/responses/ResponsesIndexView');\n var ResponsesNewView = require('ui/common/responses/ResponsesNewView');\n var ConfirmDialog = require('u... | javascript | edit | 0 | 2 | mit | 5dd916bab3b94f1f7e64b8d177a8e743eac615f8 | nilenso/ashoka-survey-mobile,nilenso/ashoka-survey-mobile | Resources/ui/handheld/android/ResponsesNewWindow.js | rejected_duplicate | Near-duplicate of sample 74827 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jslint browser: true, single: true, maxlen: 120, eval: true, white: true */\n/*global define */\n/*global set_based_abc_inline_js*/\n\n//-------------------------------------------------------------------------------------------------... | javascript | edit | 0 | 2 | mit | 0458bfe4e4fbe287049722f4efa46df1fa2be52f | SetBased/php-abc-core,SetBased/php-abc-core | lib/js/SetBased/Abc/Core/Page/CorePage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports.map = {\n\t'node': ['net.env.node.stdio'],\n\t'browser': ['net.env.browser.csp'],\n\t'mobile': []\n}\n\nexports.resolve = function(env, opts) {\n\treturn exports.map[env] || [];\n};\n\n```\n\nApply this change: Fix for missing d... | javascript | edit | 0 | 2 | mit | 74b84e2aa981ed9d8972afa97b998c8110a6dc6e | hashcube/js.io,hashcube/js.io,gameclosure/js.io,gameclosure/js.io | packages/net/__imports__.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Author: Alexandre Havrileck (Oxyno-zeta) \n * Date: 25/06/16\n * Licence: See Readme\n */\n(function () {\n\t'use strict';\n\n\tangular\n\t\t.module('libparsio.technical.services')\n\t\t.factory('updateService', updateService);\n... | javascript | edit | 0 | 2 | mit | 2ddf6d6222e6c0fa6f6b29665b90a2ba6fbd5d0f | oxyno-zeta/LibParsio,oxyno-zeta/LibParsio | src/app/libparsio/technical/services/update.service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n This view is used for rendering the buttons at the footer of the topic\n\n @class TopicFooterButtonsView\n @extends Discourse.ContainerView\n @namespace Discourse\n @module Discourse\n**/\nDiscourse.TopicFooterButtonsView = D... | javascript | edit | 0 | 7 | mit | f390c9257874452e2a7e2aa918502a713d7ea4e2 | natefinch/discourse,natefinch/discourse | app/assets/javascripts/discourse/views/topic_footer_buttons_view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'staringatlights:autoform-generic-error',\n version: '1.0.0',\n // Brief, one-line summary of the package.\n summary: 'Enables generic error handling in AutoForm.',\n // URL to the Git repository containi... | javascript | edit | 0 | 1 | mit | aa044b333981737f5abf7f3f620965af043aa914 | abecks/meteor-autoform-generic-error,abecks/meteor-autoform-generic-error | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimportScripts('https://www.gstatic.com/firebasejs/3.6.6/firebase-app.js');\nimportScripts('https://www.gstatic.com/firebasejs/3.6.6/firebase-messaging.js');\n\n// Initialize the Firebase app in the service worker by passing in the\n// m... | javascript | edit | 0 | 0 | apache-2.0 | b05684290a939fc4475335aad1d348b208a22d0f | firebase/codelab-friendlychat-web,firebase/codelab-friendlychat-web | cloud-functions-angular-start/src/firebase-messaging-sw.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fork = require('child_process').fork;\nvar amountConcurrentServers = process.argv[2] || 2;\nvar port = initialPortServer();\nvar servers = [];\nvar path = __dirname;\nvar disableAutomaticGarbageOption = '--expose-gc';\n\nfor(var i =... | javascript | edit | 0 | 2 | mit | ab4b56ad493205c736dea190cd776e2c89a42e5b | eltortuganegra/server-websocket-benchmark,eltortuganegra/server-websocket-benchmark | servers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nmodule.exports = [\n {\n type: 'bitcoin',\n purpose: 'payment'\n },\n {\n type: 'bitcoin',\n purpose: 'messaging'\n },\n {\n type: 'ec',\n purpose: 'sign'\n },\n {\n type: 'ec',\n purpose: 'update'\n }\... | javascript | edit | 0 | 0 | mit | 0c8ac4b02930dc5ea3dbec668ac5077f0d834237 | tradle/identity | lib/requiredKeys.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { StaticQuery, graphql } from 'gatsby'\nimport Navigation from '../components/navigation'\n\nexport default ({ children }) => (\n <StaticQuery\n query={graphql`\n query NavigationQuery {\n ... | javascript | edit | 0 | 1 | mit | 0e28a2b11bd735e90410736548b88acd5c910eaf | LuisLoureiro/placard-wrapper | src/components/layout.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n\t'use strict';\n\t// Awesome Browser Shortcuts\n\tchrome.commands.onCommand.addListener(function (command) {\n\t\tvar tabQuery = {active: true, currentWindow: true};\n\t\tif (command === 'toggle-pin') {\n\t\t\t// Get cu... | javascript | edit | 0 | 5 | mit | cfac1524d1d33c1c6594f54f29d7691b121f89ab | djadmin/browse-awesome | background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2014-2015, University of Colorado Boulder\n\n/**\n * Base module for model elements whose position and opacity can change.\n *\n * @author John Blanco\n * @author Andrew Adare\n */\ndefine( function( require ) {\n 'use str... | javascript | edit | 0 | 1 | mit | 9ed345347d76ee4cf46658d583e9cb4713d14077 | phetsims/energy-forms-and-changes,phetsims/energy-forms-and-changes,phetsims/energy-forms-and-changes | js/energy-systems/view/EFACBaseNode.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar app = require('http').createServer();\nvar request = require('request');\nvar io = require('socket.io')(app);\nvar fs = require('fs');\n\napp.listen(13374);\n\nio.on('connection', function (socket) {\n \n setInterval(function() {\... | javascript | edit | 0 | 3 | mit | c61ebc077aaad3a53f7a3289aa6f0df2a025749b | EddyShure/wazzup,EddyShure/wazzup | backend/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'Class', 'uri', 'bluebird',\n 'map/services/DataService'\n], function(Class, UriTemplate, Promise, ds) {\n\n 'use strict';\n\n var GET_REQUEST_ID = 'GeostoreService:get',\n SAVE_REQUEST_ID = 'GeostoreService:save';\n... | javascript | edit | 0 | 1 | mit | a1db43e66826bc016c5c6a885d261c47eb105ef4 | Vizzuality/gfw,Vizzuality/gfw | app/assets/javascripts/map/services/GeostoreService.js | rejected_duplicate | Near-duplicate of sample 86507 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @ngdoc overview\n * @name angularBootstrapCalendarApp\n * @description\n * # angularBootstrapCalendarApp\n *\n * Main module of the application.\n */\nangular\n .module('mwl.calendar', [\n 'ui.bootstrap.tool... | javascript | edit | 0 | 0 | mit | 315f0ba79a0312cecc3e2b864329cf8845735ea9 | nameandlogo/angular-bootstrap-calendar,danibram/angular-bootstrap-calendar-modded,danibram/angular-bootstrap-calendar-modded,polarbird/angular-bootstrap-calendar,alexjohnson505/angular-bootstrap-calendar,rasulnz/angular-bootstrap-calendar,rasulnz/angular-bootstrap-calendar,CapeSepias/angular-bootstrap-calendar,LandoB/a... | scripts/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar stringUtil = require('ember-cli/lib/utilities/string');\n\nmodule.exports = {\n description: 'Generates a new custom assertion into tests/assertions/',\n\n locals: function(options) {\n var entity = options.entity;\n var ... | javascript | edit | 0 | 1 | mit | 7d6689f17d296a6d1b914e39d1d04e7f5cb7dd7e | dockyard/ember-cli-custom-assertions,dockyard/ember-cli-custom-assertions | blueprints/assertion/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport type { MessageThemeContext } from './types'\nimport React, { PureComponent } from 'react'\nimport styled from '../styled'\nimport Chat from './Chat'\nimport classNames from '../../utilities/classNames'\nimport css from ... | javascript | edit | null | null | mit | 766e9a47d10710ed5649a21f0891919bb96399b2 | helpscout/blue,helpscout/blue,helpscout/blue | src/components/Message/Embed.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global document, customElements, BaseElement, Moment */\n\nclass CalendarIllustration extends BaseElement {\n constructor() {\n super().fetchTemplate();\n }\n\n /**\n * Draws the illustration.\n *\n * @ret... | javascript | edit | 0 | 1 | mit | 2d8abed76cd7795771f5e89e752e800b8ae1350c | mzdr/timestamp,mzdr/timestamp | app/components/calendar/calendar-illustration/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport './Menu.css';\nimport React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { closeMenu } from 'shared/state/app/actions';\nimport shallowCompare from 'react-addons-shallow-compare';\n\ncla... | javascript | edit | 0 | 3 | mit | ee58f2e977c884202d357a8ee5acfd567214da4f | npms-io/npms-www,npms-io/npms-www | src/app/containers/menu/Menu.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Add Etag header to each http and rpc response\n//\n\n'use strict';\n\nconst crypto = require('crypto');\n\n\nmodule.exports = function (N) {\n N.wire.after([ 'responder:http', 'responder:rpc' ], { priority: 95 }, function etag_304_r... | javascript | edit | 0 | 8 | mit | fa1209db9af0166901f278452dc9b8c1d1d1fa5c | nodeca/nodeca.core,nodeca/nodeca.core | lib/autoload/hooks/responder/etag_304_revalidate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar iframe;\n\nfunction initFrame() {\n iframe = document.createElement('iframe');\n document.body.appendChild(iframe);\n}\n\n// Listen to the parent window send src info to be set on the nested frame\nfunction receiveNestedFrameData(... | javascript | edit | 0 | 5 | mit | 1b2e12784594fda9454242825befaf673492c40f | bufferapp/buffer-extension-shared,bufferapp/buffer-extension-shared | buffer-frame-container.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst createAppTemplate = (app, template) => {\n const hadClassName = !!app.className;\n const quenchedClassName = `${app.className} quenched`.replace(/\\bpre-quench\\b/g, '');\n\n let html = app.outerHTML\n .replace(/<!--\\s*<q>\... | javascript | edit | 0 | 2 | mit | cd09645cc7d1abd1f4b5993b89cc3048ad65447c | stowball/quench-vue | src/createAppTemplate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { Container, Tab, Tabs, Text } from 'native-base';\nimport WorkerInfoScreen from '../worker-info-screen';\nimport I18n from '../../../i18n';\n\n// @TODO Replace temporary data with data ... | javascript | edit | 0 | 1 | mit | 390d09f5f35246ab1d7ab95a475457205f92eb68 | justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client | js/components/developer/worker-profile-screen/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"env\": {\n \"browser\": true\n },\n \"extends\": [\n \"airbnb\",\n // These prettier configs are used to disable inherited rules that conflict\n // with the way prettier will format code. Full info ... | javascript | edit | 0 | 0 | mit | c57b1eab1ed849c7d197396e64ef04dcd897af2d | mathspace/eslint-config-mathspace | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport browserSync from 'browser-sync';\nimport paths from '../mconfig.json';\n\nexport const server = browserSync.create();\n\nfunction serve(done) {\n server.init({\n notify: false,\n proxy: paths.url,\n host: ... | javascript | edit | 0 | 1 | mit | 80e16145089eccd6841a8ad05888d28360ad3833 | locomotivemtl/locomotive-boilerplate,locomotivemtl/locomotive-boilerplate,stephenbe/locomotive-boilerplate,stephenbe/locomotive-boilerplate,stephenbe/locomotive-boilerplate | build/serve.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst billion = 1000000000.0\nconst million = 1000000.0\nconst thousand = 1000.0\n\nexport function numberToHuman(number, showZero = true) {\n if (number === 0 && !showZero) { return '' }\n let num\n let suffix\n if (number >= billi... | javascript | edit | 0 | 7 | mit | a64bee572690ce186fda28a0cd98f16d5dcf9aa5 | ello/webapp,ello/webapp,ello/webapp | src/lib/number_to_human.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction handleVueDestruction(vue) {\n document.addEventListener('turbolinks:before-render', function teardown() {\n vue.$destroy();\n document.removeEventListener('turbolinks:before-render', teardown);\n });\n}\n\nvar Turbolink... | javascript | edit | 0 | 2 | mit | bd36bfa8bb390a873ecfebbb7fe380a342f54de7 | jeffreyguenther/vue-turbolinks | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Configstore = require('configstore')\nconst inq = require('inquirer')\nconst prompts = require('./setup-prompts')\n\nmodule.exports = class ServerConfig {\n\n constructor(defaults) {\n this.db = new Configstore('wowser', defau... | javascript | edit | 0 | 1 | mit | df76de82feaa17e92979ccd28f3a74d8e59a4f1d | wowserhq/wowser,timkurvers/wowser,eoy/wowser,wowserhq/wowser,eoy/wowser,timkurvers/wowser | src/scripts/lib/server/utils/server-config/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(function() {\n 'use strict';\n\n /**\n * @param {string} str\n * @return {string}\n */\n var capitalize = function(str) {\n return str.substr(0, 1).toUpperCase() + str.substr(1);\n };\n\n return ... | javascript | edit | 0 | 1 | mit | 270252a65be4e6377ff3a8f1515c2432b101e60f | loonkwil/reversi,loonkwil/reversi | app/scripts/helpers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar content = (function() {\n return {\n normalizeTags: function(element) {\n var i, j, node, sibling;\n\n var fragment = document.createDocumentFragment();\n\n for (i = 0; i < element.childNodes.length; i++) {\n ... | javascript | edit | 0 | 11 | mit | b7803e394d2bd4047e5d8fd7990a196bb06e5643 | nickbalestra/editable.js,upfrontIO/editable.js | src/content.js | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst moment = require('moment-timezone');\nconst chalk = require('chalk');\n\nexports.printMessage = function (message) {\n console.log(message);\n};\n\nexports.printError = function (message) {\n const errorOutput = chalk`{bgRed Err... | javascript | edit | 0 | 2 | mit | 3ceb8ea7eede62614d665f986d7954cedab71352 | Belar/space-cli | src/helpers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel'\n\nimport Path from 'path'\nimport {getDir, findFile} from './common'\nimport {CONFIG_FILE_NAME} from '../defaults'\n\nexport function findRoot(path, options) {\n if (options.root !== null) {\n return options.root\n }\n... | javascript | edit | 0 | 4 | mit | 56c9ee0611428ec8db267d293d93d63f11b8021a | steelbrain/UCompiler | src/helpers/find-root.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('./dist/dialogs.js');\nrequire('./dist/dialogs-default-translations.js');\nrequire('./dist/dialogs.css');\nmodule.exports = 'dialogs.main';\n\n```\n\nApply this change: Fix problems with importing file\n\nrequire css file was gi... | javascript | edit | 0 | 0 | mit | 3ed922da5e3c2e404f40d7896061553128a3c73b | m-e-conroy/angular-dialog-service,m-e-conroy/angular-dialog-service | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar\n\tplatform = require('enyo/platform'),\n\tdispatcher = require('enyo/dispatcher'),\n\tgesture = require('enyo/gesture');\n\nexports = module.exports = require('./lib/options');\nexports.version = '2.6.0-pre';\n\n//... | javascript | edit | 0 | 0 | apache-2.0 | 91a10fccd6bcf455723fe0c4722a97dd17e19ddc | enyojs/moonstone | index.js | rejected_duplicate | Near-duplicate of sample 100053 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar originalDataModule = require('data-module');\nvar gutil = require('gulp-util');\nvar through2 = require('through2');\n\nvar DataModuleError = gutil.PluginError.bind(null, 'gulp-data-module');\n\n\nvar dataModule = function dataModul... | javascript | edit | 0 | 4 | mit | 0ef56b936013ea773b69581954c64f7eef2b2419 | tomekwi/gulp-data-module | index.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.