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 hoverZoomPlugins = hoverZoomPlugins || [];\nhoverZoomPlugins.push({\n name: 'wallhaven.cc',\n prepareImgLinks: function (callback) {\n var res = [];\n hoverZoom.urlReplace(res,\n 'img[src*=\"/th.wallh... | javascript | edit | 0 | 2 | mit | e513455d27aad423afe5bed9d34054430af82473 | extesy/hoverzoom,extesy/hoverzoom | plugins/wallhaven_cc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\nconst EditableTableHeader = ({columnNames}) => {\n\n return(\n <div>\n {columnNames.map( columnName => {return <div key={columnName}>{columnName}</div>})}\n </... | javascript | edit | 0 | 1 | mit | 6af9dc39bbf566d6bea1d2bc553d47e9312e7daa | severnsc/brewing-app,severnsc/brewing-app | src/Components/EditableTable/EditableTableHeader/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst ComputationResult = require('./computation-result');\nconst joi = require('joi');\n\n/* istanbul ignore next */\n/**\n * @class RemoteComputationResult\n * @extends ComputationResult\n * @description RemoteComputa... | javascript | edit | 0 | 1 | mit | 5d3bae193a4258fe1310f677f09df68de082590f | MRN-Code/coinstac,MRN-Code/coinstac,MRN-Code/coinstac | packages/coinstac-common/src/models/computation/remote-computation-result.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar five = require(\"../lib/johnny-five.js\"),\n board = new five.Board();\n\nboard.on(\"ready\", function() {\n // Creates a piezo object and defines the pin to be used for the signal\n var piezo = new five.Piezo(3);\n\n // Injects... | javascript | edit | 0 | 1 | mit | 73419f13fdb6a10cc0362a108375c062721b612d | AnnaGerber/johnny-five,cumbreras/rv,kod3r/johnny-five,kod3r/johnny-five,joelunmsm2003/arduino | eg/piezo.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright (c) 2013 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nfunction load() {\n $('unlock-passphrase-button').onclick = f... | javascript | edit | 0 | 3 | bsd-3-clause | 9ded25a6bb411da73117adcb50fe5194de8bd635 | krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,ondra-novak/chromium.src,ltilve/chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,chuan9/chromium-crosswal... | chrome/browser/resources/managed_user_passphrase_dialog.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n 'use strict';\n require('./cookie-functions.js');\n require('govuk_publishing_components/components/cookie-banner.js');\n\n window.GOVUK.DEFAULT_COOKIE_CONSENT = {\n 'essential': true,\n 'usage': false,\n 'brexit': false\n ... | javascript | edit | 0 | 1 | mit | dc7e4ee88250241d6950b4bdd6da0dc899050ccb | ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public | cla_public/static-src/javascripts/modules/cookie-banner.js | rejected_duplicate | Near-duplicate of sample 70515 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst cookieParser = require('cookie-parser');\nconst csrf = require('csurf');\n\nmodule.exports = function(server) {\n let secure = true;\n if (process.env.NODE_ENV === 'development') {\n secure = false;\n }\n s... | javascript | edit | 0 | 2 | apache-2.0 | 6a68619153b8b2cd9c35401e3943d4c4cc218eb6 | societe-generale/react-loopback-generator,societe-generale/react-loopback-generator | generators/server/templates/server/boot/security.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n* A list of English stopwords.\n*\n* @module @stdlib/datasets/smart-stopwords-en\n*\n* @example\n* var STOPWORDS = require( '@stdlib/datasets/smart-stopwords-en' )\n* // returns [ \"a\", \"a's\", \"able\", \"about\... | javascript | edit | 0 | 0 | apache-2.0 | ac3b1f587ed3a1cc7e0816d4d0a788da8e6d3a09 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | lib/node_modules/@stdlib/datasets/stopwords-english/lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/* Controllers */\n\nvar cvAppControllers = angular.module('cvAppControllers', []);\n\ncvAppControllers.controller('HomeController', ['$scope', '$http', function($scope, $http) {\n\t$http.get('/app/info/info.json').succ... | javascript | edit | 0 | 1 | mit | 05e683ffe8c940d8fe5f762d91b3d76ab95e5b9d | RegularSvensson/cvApp,RegularSvensson/cvApp | app/js/controllers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst sum = require('./sum');\n\ntest('adds 1 + 2 to equal 3', () => {\n expect(sum(1, 2)).toBe(3);\n});\n```\n\nApply this change: Change test result to test travis ci notification"
},
{
"role": "assistant",
"content": "co... | javascript | edit | 0 | 1 | mit | 9672073a981ce9ebb88f7911854518ee9d0225ca | FermORG/FermionJS,FermORG/FermionJS | test/reducers/sum.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * public/src/js/logger.js - delish\n * \n * Licensed under MIT license.\n * Copyright (C) 2017 Karim Alibhai.\n */\n\nconst util = require('util')\n , debounce = require('debounce')\n\nlet currentLog = document.querySelector('.... | javascript | edit | 0 | 1 | mit | 8d362700afeaa78d1741b91c7bf9f31553debfa3 | karimsa/delish,karimsa/delish,karimsa/delish | public/src/js/logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default function getPreloadedState(position, cb) {\n chrome.storage.local.get([\n 'monitor' + position, 'slider' + position, 'dispatcher' + position,\n 'test-templates', 'test-templates-sel'\n ], options => {\n cb({\n ... | javascript | edit | 0 | 4 | mit | d23d00bafe9fb4a89d92f812506c244d2be595a1 | zalmoxisus/redux-devtools-extension,zalmoxisus/redux-devtools-extension | src/browser/extension/background/getPreloadedState.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport 'whatwg-fetch';\n\nconst apiBaseURL = 'http://localhost:1337';\n\nfunction parseJSONFromResponse(response) {\n return response.json();\n}\n\nexport const bookshelfApi = {\n getBooks() {\n return fetch(`${apiBaseURL}/books`)\... | javascript | edit | 0 | 4 | mit | cecc6de2d3df51acd077c5e3f8e3c88b8608d987 | w1nston/bookshelf,w1nston/bookshelf | app/services/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar monorouter = require('monorouter');\nvar reactRouting = require('monorouter-react');\nvar PetList = require('./views/PetList');\nvar PetDetail = require('./views/PetDetail');\nvar Preloader = require('./views/Preloader');\n\n\nmodul... | javascript | edit | 0 | 1 | mit | 8d885db7d5e7a731f1ae180c0160db046cd1355c | matthewwithanm/monorouter | examples/renderinitial/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport PaginationMixin from '../../mixins/pagination';\n\nconst { computed } = Ember;\n\nexport default Ember.Controller.extend(PaginationMixin, {\n queryParams: ['page', 'per_page', 'sort'],\n page: '1... | javascript | edit | 0 | 2 | apache-2.0 | c75bb56fc01ba261f77d848d5667b7b480c71261 | Susurrus/crates.io,steveklabnik/crates.io,steveklabnik/crates.io,Susurrus/crates.io,rust-lang/crates.io,rust-lang/crates.io,Susurrus/crates.io,Susurrus/crates.io,rust-lang/crates.io,rust-lang/crates.io,steveklabnik/crates.io,steveklabnik/crates.io | app/controllers/category/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module dependencies.\n */\n\n/**\n * Find device by id\n */\nexports.command = function(req, res) {\n var client = exports.client;\n var channel = '/control/' + req.params.deviceId + '/' + req.params.comma... | javascript | edit | 0 | 1 | apache-2.0 | 9c20d0be36788e04838ea8e19e6f7eed3e0f44c3 | msprunck/openit-site,msprunck/openit-site | app/controllers/control.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Q = require('q');\nconst RegularUsers = require('./../models/userSchema.js');\nconst BusinessUsers = require('./../models/businessUserSchema.js');\nconst Events = require('./../models/eventSchema.js');\nconst utils = require('../u... | javascript | edit | 0 | 2 | unlicense | 2e424fd72f6a1e484da6085238702c989879ad27 | DeFieldsEPeriou/DeGreenFields,eperiou/DeGreenFields,eperiou/DeGreenFields,DeFieldsEPeriou/DeGreenFields | server/server-logic.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet EnvironmentVariables = {\n description: 'Set environment variables for each task your service launches in addition to those set by Mesos.',\n type: 'object',\n title: 'Environment Variables',\n properties: {\n variables: {\n ... | javascript | edit | 0 | 2 | apache-2.0 | 0c2a557dbef6674d3d352cd49e9c13f4ed2f8362 | dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui | src/js/schemas/service-schema/EnvironmentVariables.js | rejected_duplicate | Near-duplicate of sample 109486 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2015, EMC, Inc.\n\n'use strict';\n\nmodule.exports = GraphModelFactory;\n\nGraphModelFactory.$provide = 'Models.GraphObject';\nGraphModelFactory.$inject = [\n 'Model'\n];\n\nfunction GraphModelFactory (Model) {\n retu... | javascript | edit | 0 | 1 | apache-2.0 | b8173fcb00aa5e8599c2bdca5e888614eebf70eb | YoussB/on-core,YoussB/on-core | lib/models/graph-object.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*! http://mths.be/endswith v0.1.0 by @mathias */\nif (!String.prototype.endsWith) {\n\t(function() {\n\t\t'use strict'; // needed to support `apply`/`call` with `undefined`/`null`\n\t\tvar toString = {}.toString;\n\t\tString.prototype.... | javascript | edit | 0 | 11 | mit | bb1901f9173c5df8ca7444919cfbe18457ebfa3f | mathiasbynens/String.prototype.endsWith | endswith.js | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst loaders = require(\"./loaders\");\nconst webpack = require(\"webpack\");\nconst path = require(\"path\");\n\nmodule.exports = {\n context: path.join(__dirname, \"..\"),\n entry: [\"./src/test.ts\"],\n output: {\n filename: \... | javascript | edit | 0 | 0 | mit | 14c9a161b2362d84905476ffb31be2864eec8a4a | var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training | angular-typescript-webpack-jasmine/webpack/webpack.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { moduleForModel, test } from 'ember-qunit';\n\nmoduleForModel('ilm-session', 'Unit | Serializer | ilm session', {\n // Specify the other units that are required for this test.\n needs: ['serializer:ilm-session']\n});\n\n// Rep... | javascript | edit | 0 | 1 | mit | 6a4390f2cd0731a55bc6f65745ca16156fa74a94 | jrjohnson/frontend,gabycampagna/frontend,djvoa12/frontend,thecoolestguy/frontend,gboushey/frontend,stopfstedt/frontend,dartajax/frontend,thecoolestguy/frontend,gboushey/frontend,ilios/frontend,dartajax/frontend,ilios/frontend,jrjohnson/frontend,gabycampagna/frontend,djvoa12/frontend,stopfstedt/frontend | tests/unit/serializers/ilm-session-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar overload = require('../src/overload');\nvar should = require('should');\n\ndescribe('overload', function() {\n describe('arity', function() {\n it('should exist', function() {\n overload.should.have.property('ar... | javascript | edit | 0 | 1 | mit | d12c22bcd977b818dd107cfe5a5fe072f9bbab74 | nathggns/Overload | tests/arity.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// server.js\n\n'use strict';\n\nconst express = require('express');\nconst app = express();\nconst mongoose = require('mongoose');\nconst morgan = require('morgan');\nconst bodyParser = require('body... | javascript | edit | 0 | 0 | mit | 4b91adde9fcdac4489f062552dd96c72efa26fda | brandonlee503/Node-Angular-App-Test,brandonlee503/Node-Angular-App-Test | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst app = require('./app');\nrequire('./api.js')(app);\nrequire('./static.js')(app);\n\nconst PORT = process.env.PORT || 4000;\n\napp.listen(PORT, () => {\n console.log(`App listening on port ${PORT}!`);\n});\n\n```\... | javascript | edit | 0 | 1 | mit | 0d98c7264a78894fbed253e8711bf0ba8c89ba0c | clembou/github-requests,clembou/github-requests,clembou/github-requests | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst R = require(\"ramda\");\nconst Promise = require(\"bluebird\");\nconst pubsub = require(\"../\")(\"amqp://docker\");\n\n\n\nconst publish = (event, index) => {\n const data = { number: index + 1 };\n console.log(` [-] Publis... | javascript | edit | 0 | 1 | mit | e0fcfb103b04c290c4572cf2acacf8b56cd16f59 | philcockfield/mq-pubsub | example/pub.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport { apolloExpress, graphiqlExpress } from 'apollo-server';\nimport bodyParser from 'body-parser';\nimport cors from 'cors';\nimport { createServer } from 'http';\nimport { SubscriptionServer } from '... | javascript | edit | 0 | 1 | mit | 9cb0c8ee1f56dbe8c966ea4b912f4fd73f8d3684 | misas-io/misas-server,vincentfretin/assembl-graphql-js-server,misas-io/misas-server,a1528zhang/graphql-mock-server | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule(\"Hide department children\", {\n setup: function() {\n this.$departments = $(\n '<div class=\"js-hide-department-children\">'\n + '<div class=\"department\">'\n + '<div class=\"child-organisations\">'\n +... | javascript | edit | 0 | 1 | mit | bb7dc88b6bdb324dfc2feb627a86d1125e8d51a4 | robinwhittleton/whitehall,askl56/whitehall,hotvulcan/whitehall,askl56/whitehall,YOTOV-LIMITED/whitehall,YOTOV-LIMITED/whitehall,ggoral/whitehall,alphagov/whitehall,hotvulcan/whitehall,ggoral/whitehall,alphagov/whitehall,askl56/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,robinwhittleton/whitehall,robinwhittleto... | test/javascripts/unit/hide_department_children_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar CustomError = require('es5-ext/error/custom')\n , logger = require('../lib/logger')();\n\nmodule.exports = function (t, a) {\n\tt = t(logger);\n\tt(true, true, 'foo');\n\tt.ok(false, 'bar');\n\tt.not(false, tr... | javascript | edit | 0 | 1 | isc | 2483669d68dd399e9597db2c413994817ef1ed61 | medikoo/tad | test/assert.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Problem: We need a simple way to look at a user's badge count and JavaScript point from a web browser\n// Solution: Use Node.js to perform the profile look ups and server our template via HTTP\n\n// 1. Create a web server\nvar http =... | javascript | edit | 0 | 2 | apache-2.0 | 1bba0e18bc7221580308890087a5334c0122ebf7 | JordanPortfolio/NodeJS-temp,JordanPortfolio/NodeJS-temp | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Sequelize = require('sequelize');\nconst db = require('../db.js');\n\nconst Users = db.define('users',\n {\n id: {\n type: Sequelize.UUID,\n defaultValue: Sequelize.UUIDV1,\n primaryKey: true,\n },\n faceb... | javascript | edit | 0 | 0 | mit | 12bfc0b76c17b34baf779bc8debfa6fadb312890 | VictoriousResistance/iDioma,VictoriousResistance/iDioma | server/db/models/userModel.js | rejected_duplicate | Near-duplicate of sample 70846 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar bunyan = require('bunyan');\nvar log = bunyan.createLogger({ name: 'app' });\n\nvar app = express();\n\nvar webhooks = require('datashaman-webhooks');\nwebhooks.boot(app, 'somesecret');\n\napp.post... | javascript | edit | 0 | 2 | mit | 3e6db5efd2d25ab673f8c77734ecb9b4de924588 | datashaman/datashaman-webhooks | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nVue.component('spark-kiosk-notify', {\n props: [\n ],\n data() {\n return {\n 'notifications': [],\n 'users': [],\n 'newNotification': {\n \"user_id\": null\n }\... | javascript | edit | 0 | 1 | mit | 1c26e7c754a77a6775ce7c8461dc6e47e856ebad | vmitchell85/spark-kiosk-notify,vmitchell85/spark-kiosk-notify,vmitchell85/spark-kiosk-notify | src/resources/assets/js/SparkKioskNotify/spark-kiosk-notify.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst mongoose = require('mongoose')\n\nconst PermissionSchema = new mongoose.Schema({\n regex: { type: String, required: true, unique: true },\n roles: { type: [ String ], required: true },\n dateCreated: { type: Dat... | javascript | edit | 0 | 3 | mit | bc07195fadc3d654a02917947e0dac2feb43e0bc | thebitmill/midwest-membership-services | services/permissions/model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nhqDefine('domain/js/case_search_main', [\n 'jquery',\n 'hqwebapp/js/initial_page_data',\n 'domain/js/case_search',\n], function(\n $,\n initialPageData,\n caseSearch\n) {\n $(function () {\n var viewModel = c... | javascript | edit | 0 | 1 | bsd-3-clause | 2983df1c5a6363f1cdd827a9ac006ff71ddd259c | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/apps/domain/static/domain/js/case_search_main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\n/** Load modules. */\nvar fs = require('fs'),\n path = require('path');\n\n/** Resolve program params. */\nvar args = process.argv.slice(process.argv[0] === process.execPath ? 2 : 0),\n filePa... | javascript | edit | 0 | 1 | mit | db04398e499a8725a0391e10d1955b7c805cb209 | rlugojr/lodash,msmorgan/lodash,beaugunderson/lodash,steelsojka/lodash,boneskull/lodash,msmorgan/lodash,steelsojka/lodash,rlugojr/lodash,beaugunderson/lodash,boneskull/lodash | test/remove.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel';\n\nexport default {\n binary: {\n title: 'Binary path',\n description: 'Path for elm-format',\n type: 'string',\n default: '/usr/local/bin/elm-format',\n order: 1,\n },\n formatOnSave: {\n title: 'Forma... | javascript | edit | 0 | 0 | mit | c99f338e1ff0141d256e75150cd9c1e126429682 | triforkse/atom-elm-format | src/settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by Neil on 29/09/13.\n */\nfunction signin(mode, callback, clientID) { // clientID filled in by template, immediate = true because we should not need to ask permission again\n gapi.auth.authorize({client_id: clientID,... | javascript | edit | 0 | 2 | mit | 4954b4b8f0e9325dbfe7bfa5baf9ece539f03347 | nparley/mylatitude,nparley/mylatitude,nparley/mylatitude | js/endpoints.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport styleBody from 'ghost/mixins/style-body';\nimport AuthenticatedRoute from 'ghost/routes/authenticated';\n\nvar paginationSettings = {\n status: 'all',\n staticPages: 'all',\n page: 1,\n limit: 15\n};\n\nvar PostsRoute... | javascript | edit | 0 | 1 | mit | ebf8d2dfda7e919dbe6beabc70a11e0ba243b7a2 | dbalders/Ghost-Admin,TryGhost/Ghost-Admin,acburdine/Ghost-Admin,acburdine/Ghost-Admin,airycanon/Ghost-Admin,JohnONolan/Ghost-Admin,TryGhost/Ghost-Admin,JohnONolan/Ghost-Admin,kevinansfield/Ghost-Admin,airycanon/Ghost-Admin,kevinansfield/Ghost-Admin,dbalders/Ghost-Admin | routes/posts.js | rejected_duplicate | Near-duplicate of sample 70635 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst gulp = require('gulp');\nconst gutil = require('gulp-util');\nconst eslint = require('gulp-eslint');\nconst excludeGitignore = require('gulp-exclude-gitignore');\nconst mocha = require('gulp-mocha');\nconst istanbul = require('gul... | javascript | edit | 0 | 1 | mit | 543a31cc11fdb145cde89c42b44f1bd0d22cef6d | FountainJS/generator-fountain-tslint | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @module\n * Tweet the current weather.\n */\nconst {postStatus} = require('./../../api/twitter-api');\nconst weather = require('./../weather/getWeather');\nconst logger = require('./../logger');\nconst moment = require('moment-t... | javascript | edit | 0 | 2 | mit | 76326fa424405c3930855652d69ee603ab7df5e7 | Ollen/dale-bot | bot/utils/twitter/tweetWeather.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nlet levelOnePokemons = ['Pikachu','Magikarp','Balbasaur'];\n\nlet allPokemons = ['Meowth', 'Poliwag', ...levelOnePokemons];\n\nconsole.log(allPokemons);\n\nlet pikachuName = \"Pikachu\";\nlet arrayWords = [...pikachuName... | javascript | edit | 0 | 0 | apache-2.0 | 9d68a8e39598e53cee8c7ba26ab6096f9dfdd219 | teerasej/training-javascript-es6-beginner-thai | spread_operator/app-finish.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst gulp = require('gulp');\nconst babel = require('gulp-babel');\n\ngulp.task('default', () =>\n gulp.src('lib/delve.js')\n .pipe(babel({ presets: ['es2015'] }))\n .pipe(gulp.dest('dist'))\n);\n\n```\n\nApply thi... | javascript | edit | 0 | 1 | mit | 437b52a37060631ae6cce3bd2002db0d7143a3f7 | tylerFowler/delvejs | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global require */\n\nvar gulp = require('gulp'),\n spawn = require('child_process').spawn,\n ember,\n node;\n\n\ngulp.task('server', function () {\n if (node) node.kill(); // Kill server if one is running\n node = spawn('... | javascript | edit | 0 | 3 | bsd-3-clause | f69dacc5aecab76e7dd3920decce6950f8c6d300 | FreeMusicNinja/freemusic.ninja,FreeMusicNinja/freemusic.ninja | gulpfile.js | rejected_duplicate | Near-duplicate of sample 89725 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fontName = 'seti',\n gulp = require('gulp'),\n iconfont = require('gulp-iconfont'),\n iconfontCss = require('gulp-iconfont-css'),\n svgmin = require('gulp-svgmin');\n\ngulp.task('font', function(){\n g... | javascript | edit | 0 | 1 | mit | 866967ddb5ca862c34394113472f9ec543b7549c | jesseweed/seti-ui | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n connect = require('gulp-connect'),\n stylus = require('gulp-stylus'),\n prefix = require('gulp-autoprefixer');\n\nvar paths = {\n styles: 'css/bare-ninja.styl',\n html: './*.html'\n};\n\ngulp... | javascript | edit | 0 | 1 | mit | 30013e03caa57ce57090d36c812aa6d128db3348 | trevanhetzel/barekit,trevanhetzel/barekit | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('babel/register')\n\nvar gulp = require('gulp')\nvar $ = require(\"gulp-load-plugins\")()\nvar runSequence = require(\"run-sequence\")\n\ngulp.task(\"build\", function() {\n return gulp.src(\"src/**/*.js\")\n .pipe($.babel()... | javascript | edit | 0 | 1 | mit | 65fc00db12ebad06df6557bc3276eccc493566e2 | launchbadge/node-bok | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ShareDB = require('sharedb');\n\nShareDB.types.register(require('rich-text').type);\n\nmodule.exports = new ShareDB({\n db: require('sharedb-mongo')('mongodb://localhost:27017/quill-sharedb-cursors')\n});\n\n```\n\nApply this chang... | javascript | edit | 0 | 0 | mit | 33ba0535b53c580d91b6b2de3d8b919ae3d5c781 | pedrosanta/quill-sharedb-cursors,pedrosanta/quill-sharedb-cursors | helpers/sharedb-server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n *\tAn RTC Object factory that works in Firefox and Chrome when adapter.js is present\n */\nfunction AdapterJsRTCObjectFactory() {\n\n\tthis.createIceServer = function(url, username, password) {\n\t\treturn createI... | javascript | edit | 0 | 2 | mit | d485edf1145ccfba4e8668c13dfd5ed2170624da | nicktindall/cyclon.p2p-rtc-client,nicktindall/cyclon.p2p-rtc-client | lib/AdapterJsRTCObjectFactory.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\"\r\n\r\nlet gulp = require('gulp');\r\nlet ts = require('gulp-typescript');\r\nlet tsProject = ts.createProject(\"tsconfig.json\");\r\n\r\ngulp.task(\"default\", () => {\r\n return tsProject.src()\r\n .pipe(tsPro... | javascript | edit | 0 | 1 | apache-2.0 | 371a70778560330e5730acf1a76c6de17c578d17 | munumafia/EasyJSON,munumafia/EasyJSON | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst inlineNg2Template = require('gulp-inline-ng2-template');\nconst gulp = require('gulp');\nconst clean = require('gulp-clean');\n\nconst tmpDir = './tmp';\nconst distDir = './dist';\n\ngulp.task('inline-templates', ['clean-tmp'], fu... | javascript | edit | 0 | 1 | mit | 900b593d7c66248086892b9cedfa24563fb8e270 | mpalourdio/ng-http-loader,mpalourdio/ng-http-loader,mpalourdio/ng-http-loader | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright (c) 2013 Intel Corporation. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// Implementation of the W3C's Device Capabilities API.\n// http:... | javascript | edit | 0 | 1 | bsd-3-clause | 64b03b3b7209ea61c03f35616b399c755c933541 | tomatell/crosswalk,rakuco/crosswalk,weiyirong/crosswalk-1,amaniak/crosswalk,crosswalk-project/crosswalk,fujunwei/crosswalk,chinakids/crosswalk,siovene/crosswalk,rakuco/crosswalk,hgl888/crosswalk-efl,Pluto-tv/crosswalk,rakuco/crosswalk,leonhsl/crosswalk,RafuCater/crosswalk,crosswalk-project/crosswalk-efl,pk-sam/crosswal... | sysapps/device_capabilities_new/device_capabilities_api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Re-using Gesso entry point\n// Detect whether this is called from a built bundle from the browser, or as the build project.\n\n\nif (typeof window !== 'undefined') {\n // Client-side require\n module.exports = {\n canvas: docume... | javascript | edit | 0 | 0 | mit | 3799c780d5b9ca0cfd97f3795c1ce456b78d4261 | gessojs/gessojs,gessojs/gessojs | gesso/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\njsio('import browser.events')\n\nvar logger = logging.getLogger(jsio.__path);\n\nvar windowResizeCallbacks = [];\n\nfunction handleResize() {\n\tif (!windowResizeCallbacks.length) { return; }\n\tvar size = exports.getWindowSize();\n\tfo... | javascript | edit | 0 | 3 | mit | 8c42ee718563fd7c82bacba65baf65cb12dd09fc | marcuswestin/fin | js/browser/resizeManager.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\nfor each li \n\tcolor = find span color --- this.text\n\turl = find main prod image -- this.url\n\tcategory Swatch Color Button = matching color.url\nend\n\non click \n*/\n\t\nvar colorBtnSrc = {};\n\t\n$(\"span:contains('Color')\")... | javascript | edit | 0 | 1 | mit | 5cda8ad7e27dbbafc2ab2c7d6569fec6546db2ce | iamandrebulatov/BC-Category-Page-Color-Swatch | colorImageSelector.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Evidently superinspired by Chris Wilson's AudioContext-MonkeyPatch library,\n * and just patching webkitCreateShadowRoot to createShadowRoot\n */\n(function() {\n\n if( HTMLElement.prototype.webkitCreateShadowRoot !== undefi... | javascript | edit | 0 | 6 | apache-2.0 | 150741269e8cc655ad7041faa1cf825fbf5a4515 | sole/WebComponentsMonkeyPatch | WebComponentsMonkeyPatch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\n\nvar gulp = require('gulp');\nvar gulp_mocha = require('gulp-mocha');\nvar gulp_jshint = require('gulp-jshint');\nvar gulp_jsdoc = require(\"gulp-jsdoc\");\n\n\nvar files = ['lib/**/*.js'];\nvar tests = ['te... | javascript | edit | 0 | 1 | mit | d33e9df3e82505d60c16324fb1a5fec6204bb5bb | bankonme/bitcore-channel,homeopatchy/bitcore-channel,eXcomm/bitcore-channel,braydonf/bitcore-channel,maraoz/bitcore-channel,bitpay/bitcore-channel,studio666/bitcore-channel | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module dependencies.\n */\n\nvar express = require('express');\nvar routes = require('./routes');\nvar memos = require('./routes/memos');\nvar http = require('http');\nvar path = require('path');\n\nvar app = ex... | javascript | edit | 0 | 1 | mit | 801df6499b96c860a2d108dea053304131ab56fd | eqot/memo | server/app.js | rejected_duplicate | Near-duplicate of sample 108927 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * search.js - Search form tests.\n */\n\ncasper.test.begin('Tests search form submission and results', 2, function suite(test) {\n casper.start();\n\n // Open the homepage.\n casper.customThenOpen('/', function() {\n casper.... | javascript | edit | 0 | 1 | mit | 9afda10bfeb4d07e3ba2e40e93ebec125d41d7ed | Lullabot/casperjs_foundation,Lullabot/casperjs_foundation | tests/search.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n concat = require('gulp-concat'),\n rename = require('gulp-rename'),\n uglify = require('gulp-uglify');\n\nvar SRC = 'src/*.js';\nvar DEST = 'dist/';\n\ngulp.task('build', function() {\n gulp.src(S... | javascript | edit | 0 | 1 | mit | 1e0b79aa7b62e3162b98c277db248236b75f3a4a | jamesdixon/jsonapi-datastore,niksy/jsonapi-datastore,beauby/jsonapi-datastore,jprincipe/jsonapi-datastore | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Sandbox - A stripped down object of things that plugins can perform.\n * This object will be passed to plugins on command and hook execution.\n */\nSandbox = function(irc, commands, usage) {\n this.bot = {\n say: function(to,... | javascript | edit | 0 | 2 | mit | ffd4229e0940e26d7e4d5e948180c40bf14eb871 | jirwin/treslek,rackerlabs/treslek | lib/sandbox.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @author Frank David Corona Prendes <<EMAIL>>\n * @copyright MIT 2016 Frank David Corona Prendes\n * @description Tarea Gulp para la compresion de ficheros JS\n * @version 1.0.1\n */\n(function () {\n 'use strict';\n\n var ... | javascript | edit | 0 | 1 | mit | bc83a3b4a6b834e972cb2a723e692ec8491a290b | frankdavidcorona/gcompress | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// var usingOraclize = artifacts.require(\"./usingOraclize.sol\");\nvar Arbiter = artifacts.require(\"./Arbiter.sol\");\nvar Judge = artifacts.require(\"./Judge.sol\");\nvar ComputationService = artifacts.require(\"./ComputationService.... | javascript | edit | 0 | 2 | mit | d1eb4d23bdf6d84a17a9ef7175f6901ca7f40178 | nud3l/verifying-computation-solidity,nud3l/verifying-computation-solidity | migrations/2_deploy_contracts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar AudioletParameter = new Class({\n initialize: function(node, inputIndex, value) {\n this.node = node;\n if (typeof inputIndex != 'undefined' && inputIndex != null) {\n this.input = node.inputs[inputIndex]... | javascript | edit | 0 | 4 | apache-2.0 | b48f8416fd6637d7fce284ff4e47b01df4829d57 | oampo/Audiolet,Kosar79/Audiolet,oampo/Audiolet,kn0ll/Audiolet,Kosar79/Audiolet,Kosar79/Audiolet,mcanthony/Audiolet,kn0ll/Audiolet,mcanthony/Audiolet,bobby-brennan/Audiolet,bobby-brennan/Audiolet | src/core/AudioletParameter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar removeExcessSpaces = function(htmlString) {\n\tvar processedString = htmlString.replace(/\\s+</g, '<');\n\tprocessedString = processedString.replace(/>\\s+/g, '>');\n processedString = processedString.replace(/\\:</g, ': <');\n\tre... | javascript | edit | 0 | 2 | mit | a1354ce9155bb6609f56421033a5e889372d2b63 | peternatewood/tetrelementis,RoyTuesday/tetrelementis,RoyTuesday/tetrelementis,peternatewood/tetrelementis | tetris.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar jayson = require(__dirname + '/../..');\nvar format = require('util').format;\n\nvar methods = {\n // a method that prints every request\n add: function(a, b, callback) {\n callback(null, a + b);\n }\n};\n\nvar server = jayson... | javascript | edit | 0 | 3 | mit | c3a05985a25b38714e54de13c865f5322dc1b9d3 | taoyuan/jayson,Lughino/jayson,Meettya/jayson,tedeh/jayson,taoyuan/remjson,tedeh/jayson | examples/method_routing/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { getContext, settled } from '@ember/test-helpers';\nimport { run } from '@ember/runloop';\n\nexport function setBreakpoint(breakpoint) {\n let breakpointArray = Array.isArray(breakpoint) ? breakpoint : [breakpoint];\n let { ow... | javascript | edit | 0 | 5 | mit | 1935b925cc03c9e0d711b7e63c441580394e6d16 | freshbooks/ember-responsive,freshbooks/ember-responsive | addon-test-support/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar exports = module.exports = require('./utils.js');\n\n// We override this function for browsers, because they print objects nicer\n// natively than JSON.stringify can.\nexports.logObject = function (msg, obj) {\n if (/MSIE/.test(nav... | javascript | edit | 0 | 2 | isc | 627acdbfdeae585e449162fa15275df7ea270215 | darkdarkdragon/ripple-lib,ripple/ripple-lib,ripple/ripple-lib,wilsonianb/ripple-lib,wilsonianb/ripple-lib,darkdarkdragon/ripple-lib,ripple/ripple-lib,darkdarkdragon/ripple-lib,wilsonianb/ripple-lib,ripple/ripple-lib | src/js/ripple/utils.web.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport PropTypes from 'prop-types'\nimport api from 'api'\nimport { LargeButton } from '@hackclub/design-system'\n\nclass SubmitButton extends Component {\n static propTypes = {\n status: Pr... | javascript | edit | 0 | 5 | mit | 1a024423c0ca91047eaeaa2d7fdc397d5a3b0635 | hackclub/website,hackclub/website,hackclub/website | src/components/apply/SubmitButton.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar jayson = require(__dirname + '/../..');\nvar format = require('util').format;\n\nvar methods = {\n // a method that prints every request\n add: function(a, b, callback) {\n callback(null, a + b);\n }\n};\n\nvar server = jayson... | javascript | edit | 0 | 3 | mit | c3a05985a25b38714e54de13c865f5322dc1b9d3 | taoyuan/jayson,Lughino/jayson,Meettya/jayson,tedeh/jayson,taoyuan/remjson,tedeh/jayson | examples/method_routing/server.js | rejected_duplicate | Near-duplicate of sample 109874 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport api from 'api'\nimport storage from 'storage'\nimport { LargeButton } from '@hackclub/design-system'\n\nclass SubmitButton extends Component {\n constructor(props) {\n super(props)\n ... | javascript | edit | 0 | 3 | mit | 067de672c56f6e61d0563bf2deac4a0b67a8f8e4 | hackclub/website,hackclub/website,hackclub/website | src/components/apply/SubmitButton.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $('.key').click(function() {\n var number = $(this).text();\n $('#preview').append(number);\n });\n});\n\n```\n\nApply this change: Handle edge cases with zero key"
},
{
"role": "assistan... | javascript | edit | 0 | 3 | mit | 8885b2f7712407d05d677b2c03822a40843509aa | CodeAstra/calculator,CodeAstra/calculator | js/calci.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport class Notification {\n /**\n * @typedef NotificationOptions\n * @property {string} title\n * @property {string} message\n * @property {('basic'|'sms')} [type='basic']\n */\n\n /**\n *\n * @param {NotificationOptio... | javascript | edit | 0 | 2 | mit | faa0e6ac15aca4dbae679cc20da587b4254f91ed | nextgensparx/quantum-router,nextgensparx/quantum-router | src/chrome/notification.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nfunction User( fName, lName) {\n this.fName = fName;\n this.lName = lName;\n //this.img = img; //need to add images and urls...\n this.posts = [];\n}\n\nUser.prototype.newPost = function( content, socMedia... | javascript | edit | 0 | 2 | mit | 87fd189a152a926ba4a5b66bcdc70f09e7e6f6ec | sevfitz/turducken,sevfitz/turducken | js/turducken.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n/* This declares the function that will send a message\n */\n\nfunction sendMessage(e) {\n e.preventDefault();\n const inputNode = e.target.message;\n const message = inputNode.value;\n console.log(\"Sending message:\... | javascript | edit | 0 | 1 | mit | bd87fe2da4bbf994ad72226de12c00ecf01223a2 | The1502Initiative/Instantaneous,The1502Initiative/Instantaneous,The1502Initiative/Instantaneous | src/client/sendMessages.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport AsyncQueue from '../utils/asyncQueueStructures';\n\nlet asyncQueue = new AsyncQueue();\n\nconst endAsync = () => {\n return { type: 'ASYNC_INACTIVE' };\n};\n\nconst callAsync = (dispatchFn, delay = 500, dispatchEnd, newState) =>... | javascript | edit | 0 | 2 | mit | f262509674196d05fc929b5b7c111a3a66f6f92c | ivtpz/brancher,ivtpz/brancher | app/actions/asyncActions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport sqlite from 'sqlite'\nimport winston from 'winston'\n\nexport default class Community {\n static async init() {\n if (this.db) { return }\n this.db = await sqlite.open('/data/community.sqlite3').catch(winston.err... | javascript | edit | 0 | 5 | mit | 07f4d6e7ab4899cb1b85f12e9b0b05c0c0171341 | tinnvec/stonebot,tinnvec/stonebot | src/community/community.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {browserHistory} from 'react-router'\nimport Login from './Login';\nimport {connect} from 'react-redux';\nimport {bindActionCreators} from 'redux';\nimport * as actions from '../actions/LoginActions';\... | javascript | edit | 0 | 3 | mit | 55c074a2c627187327dd98800d9524a9e725cb95 | nathejk/status-app,nathejk/status-app | src/components/HomePage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nconst errors = require('@feathersjs/errors');\nconst getItems = require('./get-items');\nconst replaceItems = require('./replace-items');\n\nmodule.exports = function (func) {\n if (!func) {\n func = () => {};\n }\n\n if (typeof... | javascript | edit | 0 | 4 | mit | aa94224f57fcd86704ff01ee1c7af299a75c95f8 | feathersjs/feathers-hooks-common | lib/services/alter-items.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*eslint-disable-next-line no-unused-vars*/\nfunction onNotificationMessage(message) {\n document.getElementById('symbol').innerHTML = message.symbol;\n document.getElementById('message').innerHTML = message.messageText;\n document.g... | javascript | edit | 0 | 4 | mit | 443c0f43039d6fd1fda9760d5fb2570f2a930ebd | owennw/OpenFinD3FC,ScottLogic/bitflux-openfin,owennw/OpenFinD3FC,ScottLogic/StockFlux,ScottLogic/StockFlux,ScottLogic/bitflux-openfin | packages/stockflux-watchlist/public/notificationHandler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nConnector.playerSelector = '#d-content';\n\nConnector.getArtistTrack = () => {\n\tif (isPlayingLiveRadio()) {\n\t\tlet songTitle = $('.d-queue-info .song-title').text();\n\t\treturn Util.splitArtistTrack(songTitle);\n\t... | javascript | edit | 0 | 3 | mit | ffb497ac013b005aff799cb4523e9b772519636b | david-sabata/web-scrobbler,carpet-berlin/web-scrobbler,david-sabata/web-scrobbler,carpet-berlin/web-scrobbler,galeksandrp/web-scrobbler,galeksandrp/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,alexesprit/web-scrobbler,inverse/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,inverse/web-scrobbler,alexesprit/web-scrobb... | connectors/amazon-alexa.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @flow\n */\n\ntype ResData = {\n\tnewStates: {[key: string]: string}\n};\n\n/**\n * Encode the updated states, to send to the client.\n *\n * @param updatedStates\t{StatesObject}\t\t\t\tThe updated states\n * @param encodeState\... | javascript | edit | null | null | mit | 2edfecbcd8b891a839e3ee36ed18d8052900d134 | nheyn/express-isomorphic-dispatcher | src/dispatchResponse.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ValidatorUtil = {\n isDefined: function (value) {\n return value != null && value !== '' || typeof value === 'number';\n },\n\n isEmail: function (email) {\n return email != null &&\n email.length > 0 &&\n !/\\s/.... | javascript | edit | 0 | 6 | apache-2.0 | c41ba3df26018ff84e6c5e73f06c7df36e508243 | dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui | src/js/utils/ValidatorUtil.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nexport default function (el: HTMLTextAreaElement, headToCursor: string, cursorToTail: ?string) {\n const curr = el.value, // strA + strB1 + strC\n next = headToCursor + (cursorToTail || '')... | javascript | edit | null | null | mit | 2800cd66ab65cc464c5ddeb1a619a2ed9e254e35 | yuku-t/undate,yuku-t/undate | src/update.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nYUI.add(\"stream-user\", function(Y) {\n \"use strict\";\n \n var falco = Y.namespace(\"Falco\"),\n streams = Y.namespace(\"Falco.Streams\"),\n User;\n \n User = function() {};\n \n User.prototype = {\... | javascript | edit | 0 | 1 | mit | 4326d2baf1350e19c87db457a1e170e73bd0a11d | tivac/falco,tivac/falco | src/js/streams/stream-user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass Vector2D {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n }\n\n add(vec) {\n return new Vector2D(this.x + vec.x, this.y + vec.y);\n }\n\n multiply(factor) {\n return new Vector2D(thi... | javascript | edit | 0 | 1 | mit | 12bfc2fdd9c1574eb37a68dc7b8fa9508b082118 | 190n/five.js | lib/vector2d.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2016-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n ... | javascript | edit | 0 | 0 | bsd-3-clause | a75fef48bfb440a22fdc9605d4e677b87ebf290f | jevakallio/react-native,Bhullnatik/react-native,exponentjs/react-native,facebook/react-native,ptmt/react-native-macos,ptmt/react-native-macos,pandiaraj44/react-native,hoastoolshop/react-native,pandiaraj44/react-native,kesha-antonov/react-native,facebook/react-native,hammerandchisel/react-native,hoangpham95/react-native... | local-cli/core/Constants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Define keyboard shortcuts for showing and hiding a custom panel.\nvar { Cc, Ci } = require(\"chrome\");\nvar { Hotkey } = require(\"hotkeys\");\nvar panel = require(\"panel\");\nvar timers = require(\"timers\");\nvar data = require(\... | javascript | edit | 0 | 2 | mit | b7f8dfb12f79012e5ded0b14684ad75ae7dc1821 | rhelmer/warn-before-quit,rhelmer/warn-before-quit,nigelbabu/warn-before-quit,nigelbabu/warn-before-quit | lib/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* globals define, FastBoot */\n(function() {\n define('ismobilejs', ['exports'], function(exports) {\n 'use strict';\n\n let isMobileClass = FastBoot.require('ismobilejs');\n // Change the context so that when isMobile intern... | javascript | edit | 0 | 1 | mit | 29a464500056d1b0c80e4056139931cb77dacd53 | sandydoo/ember-is-mobile,sandydoo/ember-is-mobile | public/fastboot-is-mobile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright (c) 2015 MediaMath Inc. All rights reserved.\n * This code may only be used under the BSD style license found at http://mediamath.github.io/strand/LICENSE.txt\n\n*/\nPolymer({\n\tis: \"mm-action\",\n\n\tbe... | javascript | edit | 0 | 2 | bsd-3-clause | fd5ee5b257ef44549c870abc620527dda9d4a358 | sassomedia/strand,anthonykoerber/strand,shuwen/strand,dlasky/strand,shuwen/strand,sassomedia/strand,anthonykoerber/strand,dlasky/strand | src/mm-action/mm-action.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass GelatoApplication extends Backbone.Model {\n\n constructor() {\n Backbone.$('body').prepend('<gelato-application></gelato-application>');\n Backbone.$('gelato-application').append('<gelato-dialogs></gelato-dialogs>');\n ... | javascript | edit | 0 | 2 | mit | 9b44e8f5367bf24b6d5c21d35f402bc0686c1383 | jernung/gelato,jernung/gelato,mcfarljw/gelato-framework,mcfarljw/backbone-gelato,mcfarljw/backbone-gelato,mcfarljw/gelato-framework | src/modules/Application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst router = require('express').Router();\n\nconst scraper = require('../service/scraper');\n\nrouter.get('/', (req, res, next) => {\n const packageName = req.query.package;\n\n if (!packageName) {\n const err = new Error... | javascript | edit | 0 | 3 | mit | cc4f209f011639d4f6888a39e71b1145e58cf5c5 | enric-sinh/android-changelog-api | src/route/changelogs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nApplication.Directives.directive(\"showTemplateDetails\", showTemplateDetailsDirective);\nfunction showTemplateDetailsDirective() {\n return {\n restrict: \"E\",\n replace: true,\n scope: {\n template:... | javascript | edit | 0 | 1 | mit | 70d3dca4c01484539cc0ca570d0c6e3e9959c8d7 | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | website/app/application/core/projects/project/provenance/wizard/show-template-details.js | rejected_duplicate | Near-duplicate of sample 90453 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports._regExpRegExp = /^\\/(.+)\\/([im]?)$/;\nexports._lineRegExp = /\\r\\n|\\r|\\n/;\n\nexports.splitLines = function (text) {\n var lines = [];\n var match, line;\n while (match = exports._lineRegExp.exec(text)) {\n line = tex... | javascript | edit | 0 | 4 | mit | 5ae8a55a75bef8a0af6d330842000152e2830c0e | slap-editor/slap-util | lib/text.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { instanceOf, func } from 'prop-types';\nimport Cookies from 'universal-cookie';\nimport hoistStatics from 'hoist-non-react-statics';\n\nexport default function withCookies(WrapperCompon... | javascript | edit | 0 | 1 | mit | 0692f1a02b2dd231b40f06dce5941fdf15feecac | eXon/react-cookie,reactivestack/cookies,reactivestack/cookies,reactivestack/cookies | packages/react-cookie/src/withCookies.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar TruffleError = require(\"truffle-error\");\nvar inherits = require(\"util\").inherits;\nvar defaultGas = 90000;\nvar web3 = require(\"web3\");\n\ninherits(StatusError, TruffleError);\n\nfunction StatusError(args, tx, receipt) {\n v... | javascript | edit | 0 | 3 | mit | 0be67d85e1d203b41d1dddded41f8d634e01a44f | ConsenSys/truffle | packages/truffle-contract/statuserror.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst\n express = require('express'),\n bodyParser = require('body-parser');\n\nconst\n {mongoose} = require('./db/mongoose'),\n dbHandler = require('./db/dbHandler');\n\nlet app = express();\nlet port = porcess.env.PORT || 3000;\n\... | javascript | edit | 0 | 2 | mit | 8486a37ca95cc2c211ec6a66b618e986e3d7dec6 | daniellara/smooky-todoes | server/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Store } from 'consus-core/flux';\nimport CartStore from './cart-store';\n\nlet student = null;\n\nclass StudentStore extends Store{\n hasOverdueItems(items){\n return items.some(element => {\n return elemen... | javascript | edit | 0 | 1 | unlicense | 3b3de3a210fe69cd4e95f0c218801992cab0c88c | TheFourFifths/consus-client,TheFourFifths/consus-client | src/store/student-store.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar $ = require('jquery');\nvar LocalStorage = require('./local_storage');\n\nvar LOGIN = 'vizzuality';\nvar KEY = 'R_de188fd61320cb55d359b2fecd3dad4b';\n\nvar UrlShortener = function() {\n this.localStorage = new LocalStorage('cartodb... | javascript | edit | 0 | 4 | bsd-3-clause | ea89c8e3f4068f775cca71dbfd6c2d8410addecb | thorncp/cartodb,UCL-ShippingGroup/cartodb-1,thorncp/cartodb,DigitalCoder/cartodb,codeandtheory/cartodb,DigitalCoder/cartodb,nyimbi/cartodb,nuxcode/cartodb,UCL-ShippingGroup/cartodb-1,DigitalCoder/cartodb,codeandtheory/cartodb,nuxcode/cartodb,CartoDB/cartodb,bloomberg/cartodb,future-analytics/cartodb,nyimbi/cartodb,code... | lib/assets/javascripts/cartodb/new_common/url_shortener.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { API } from 'api';\nimport Scenarios from 'api/scenarios';\n\ndescribe('scenarios', () => {\n\n afterEach(() => {\n API.clearStorage();\n });\n\n it('should have currentScenario be set to \"MockedRequests\"', () => {\n ... | javascript | edit | 0 | 1 | mit | 75a7442f43aeaa63727ba09c892cb7b4f5e4f1c5 | 500tech/bdsm,500tech/mimic,500tech/mimic,500tech/bdsm | test/api/scenarios.spec.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.