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 st = require('st')\n , http = require('http')\n , js = require('atomify-js')\n , css = require('atomify-css')\n , open = require('open')\n\nmodule.exports = function (args) {\n\n var mount = st(args.server.st || process.cwd())\... | javascript | edit | 0 | 7 | mit | a48d5a1ae957db81aa464d463a4aab0b15ff29a2 | atomify/atomify | lib/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the minimum time.\n*\n* @private\n* @param {ArrayArray} times - times\n* @returns {NonNegativeIntegerArray} minimum time\n*/\nfunction min( times ) {\n\tvar out;\n\tvar t;\n\tvar i;\n\n\tou... | javascript | edit | 0 | 5 | apache-2.0 | 542a5dc9cb71b9bcb402620b82d4c5c8c8c98109 | 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/utils/timeit/lib/min_time.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$.fn.userAutocomplete = function () {\n 'use strict';\n\n function formatUser(user) {\n return Select2.util.escapeMarkup(user.email);\n }\n\n this.select2({\n minimumInputLength: 1,\n multiple: true,\n initSelection: fun... | javascript | edit | 0 | 1 | bsd-3-clause | 18dba001d139a01cfc8a52b9122dd821c72139d7 | jordan-brough/solidus,Arpsara/solidus,jordan-brough/solidus,pervino/solidus,pervino/solidus,Arpsara/solidus,Arpsara/solidus,jordan-brough/solidus,pervino/solidus,Arpsara/solidus,pervino/solidus,jordan-brough/solidus | backend/app/assets/javascripts/spree/backend/user_picker.js | rejected_duplicate | Near-duplicate of sample 101351 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst audioUtil = require('../utils/audio');\n\nconst PhysicsSprite = require('./physics-sprite');\n\nclass Barrier extends PhysicsSprite {\n constructor(game, x, y) {\n super(game, x, y, 'barrier', 2, true);\n\n ... | javascript | edit | 0 | 1 | mit | 1c8f5cc3126258472e9e80928f9cb9f9ac358899 | to-the-end/to-the-end,to-the-end/to-the-end | objects/barrier.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n var locale = 'en' !== LOCALE ? LOCALE : '';\n var options = $.extend({}, $.datepicker.regional[locale], $.timepicker.regional[locale], {\n dateFormat: 'dd.mm.yy'\n });\n\n var init;\n... | javascript | edit | 0 | 2 | mit | d5c4c7b0e48c736abf56022be40ba962cea78d9b | DarvinStudio/DarvinAdminBundle,DarvinStudio/DarvinAdminBundle,DarvinStudio/DarvinAdminBundle | Resources/public/scripts/date-time-pickers-init.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {mobileQuery, responsiveAction} from 'ghost/utils/mobile';\n\nvar PostsView = Ember.View.extend({\n target: Ember.computed.alias('controller'),\n classNames: ['content-view-container'],\n tagName: 'section',\n\n mobil... | javascript | edit | 0 | 2 | mit | 22f147c995a48cb1a0a592060a712e727aaac92e | developer-prosenjit/Ghost,cicorias/Ghost,Klaudit/Ghost,obsoleted/Ghost,kolorahl/Ghost,sergeylukin/Ghost,imjerrybao/Ghost,BayPhillips/Ghost,phillipalexander/Ghost,bastianbin/Ghost,ignasbernotas/nullifer,Elektro1776/javaPress,Romdeau/Ghost,augbog/Ghost,kortemy/Ghost,schneidmaster/theventriloquist.us,dggr/Ghost-sr,optikal... | core/client/views/posts.js | rejected_duplicate | Near-duplicate of sample 102620 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs'),\n path = require('path'),\n CACHE_DIR = path.join(__dirname, '/../../.cache'),\n THRESHOLD = 3.4 * 1024 * 1024; // 3.4 MB\n\ndescribe('bootcode size', function () {\n this.timeout(60 * 1000);\n\n ... | javascript | edit | 0 | 2 | apache-2.0 | a707671862e95b88c827f835187c1d3f96f899bd | postmanlabs/postman-sandbox | test/system/bootcode-size.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ConfigBuilder = require('../builders/ConfigBuilder');\n\nmodule.exports.register = function(Handlebars, options) {\n options = options || {};\n\n var helpers = {\n helper_config: function(key) {\n var config ... | javascript | edit | 0 | 4 | mit | 27c448c3672b174df3dcfa3cff1e29f85983b2b3 | oksana-khristenko/assemble-starter,oksana-khristenko/assemble-starter | app/helpers/register-helpers/helper-config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function modelLoader(isParent) {\n 'use strict';\n\n if (isParent || process.env.MCTEST) {\n console.log('using mocks/model');\n return require('./mocks/model');\n }\n\n let ropts = {\n ... | javascript | edit | 0 | 5 | mit | 87ecca5fb61b6ff202c317771c6ce7e6ebdcb979 | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | backend/server/model-loader.js | rejected_duplicate | Near-duplicate of sample 106353 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * Copyright 2015 Geoscience Australia (http://www.ga.gov.au/copyright.html)\n */\n\n(function(angular) {\n\n'use strict';\n\nangular.module(\"icsm.toolbar\", [])\n\n.directive(\"icsmToolbar\", [function() {\n\treturn {\n\t\tcontro... | javascript | edit | 0 | 2 | apache-2.0 | 76c698424bcfaa28a0de3b78779595f51ec9a63f | Tomella/fsdf-elvis,Tomella/fsdf-elvis,Tomella/fsdf-elvis | source/icsm/toolbar/toolbar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar page = require('webpage').create(),\n system = require('system'),\n fs = require('fs');\n\nvar userAgent = \"Grabshot\"\n\nvar url = system.args[1];\nvar format = system.args[2] || \"PNG\"\n\npage.viewportSize = {\n width: 1... | javascript | edit | 0 | 2 | mit | 40bad4868b572bf0753cdc7bcc7b9a856f2f6bda | bjeanes/grabshot,bjeanes/grabshot | render.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n/**\n * @module PointerGestures\n */\n(function() {\n var t... | javascript | edit | 0 | 3 | bsd-3-clause | d6328b1e65daf111720f76b70f6d469a91a96335 | Polymer/PointerGestures | pointergestures.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport initialState from './initialState';\nimport { \n LOGO_SPIN_STARTED, \n LOGO_SPIN_ENDED, \n PAGE_SCROLL_STARTED, \n PAGE_SCROLL_ENDED,\n APP_INIT,\n STATUS_UPDATE,\n PROVIDER_CHANGE,\n BOARD_CHANGE,\n\n ... | javascript | edit | 0 | 10 | mit | 3c9c39915271ff611c7dbcacddde379c78301303 | AdamSalma/Lurka,AdamSalma/Lurka | src/client/reducers/StatusReducer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or v... | javascript | edit | 0 | 0 | mit | 3248f52485a8cf44788a070744378f4e421b1529 | TerrenceLJones/not-bored-tonight,TerrenceLJones/not-bored-tonight | app/assets/javascripts/application.js | rejected_duplicate | Near-duplicate of sample 77977 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fs = require('fs');\nvar hljs = require('../build');\nvar path = require('path');\nvar utility = require('./utility');\n\nfunction testAutoDetection(language) {\n it('should be detected as ' + language, ... | javascript | edit | 0 | 1 | bsd-3-clause | 3495b9e94ffb9dc03bf6c3699f9484343829171c | snegovick/highlight.js,iOctocat/highlight.js,dYale/highlight.js,dbkaplun/highlight.js,kevinrodbe/highlight.js,dirkk/highlight.js,abhishekgahlot/highlight.js,kevinrodbe/highlight.js,daimor/highlight.js,Ajunboys/highlight.js,cicorias/highlight.js,isagalaev/highlight.js,xing-zhi/highlight.js,yxxme/highlight.js,STRML/highl... | test/highlightAuto.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ncore.controller('AbstractController', function ($scope, StorageService) {\n\n\t$scope.isAssumed = function() {\n\t\treturn StorageService.get(\"assumed\");\n\t};\n\n\t$scope.isAssuming = function() {\n\t\treturn StorageService.get(\"ass... | javascript | edit | 0 | 1 | mit | 83322ef4a60598c58adedcec4240f83e659d5349 | TAMULib/Weaver-UI-Core,TAMULib/Weaver-UI-Core | app/controllers/abstractController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport Affirmations from './analytics/Affirmations'\n\nexport default class Dashboard extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data: {\n u... | javascript | edit | 0 | 1 | mit | ba555027b6ce0815cc3960d31d1bd56fbf8c04a3 | scrumptiousAmpersand/journey,scrumptiousAmpersand/journey | client/components/Dashboard.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$('body').scrollspy({ target: '#side-menu' , offset : 10});\nvar disableEvent = function(e) {\n e.preventDefault();\n};\n$('a[href=\"#\"]').click(disableEvent);\n$('button[type=\"submit\"]').click(disableEvent);\n\n// Initialize popo... | javascript | edit | 0 | 1 | apache-2.0 | 03ee8adc1cf7bde21e52386e72bc4a663d6834f3 | CenterForOpenScience/osf-style,CenterForOpenScience/osf-style | script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular\n .module('ngVibrant')\n .directive('vibrant', vibrant);\n\nfunction vibrant($vibrant) {\n var directive = {\n restrict: 'AE',\n scope: {\n model: '=ngModel', //Model\n url: '@?',\n ... | javascript | edit | 0 | 4 | apache-2.0 | 0915cc2024564c1ee79f9695c82eda8adb1f9980 | maxjoehnk/ngVibrant | src/vibrant.directive.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (config) {\n config.set({\n\n port: 9876,\n\n logLevel: config.LOG_INFO,\n\n autoWatch: true,\n singleRun: false,\n colors: true,\n\n plugins: [\n 'karma-jasmine',\n 'karma-sinon',\... | javascript | edit | 0 | 1 | mit | d250bb1ac822aa7beb8a3602698001559c7e7c83 | mavenlink/brainstem-js | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Depending on the exact usage, QUnit could be in one of several places, this\n// function handles finding it.\nmodule.exports = function requireQUnit( resolve = require.resolve ) {\n\ttry {\n\n\t\t// First we attempt to find QUnit rel... | javascript | edit | 0 | 4 | mit | f0117c0242844550f6aed2dc1b706c0ffb44c769 | qunitjs/qunit,qunitjs/qunit | src/cli/require-qunit.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst cacheName = 'cache-v4'\nconst precacheResources = [\n '/',\n '/posts/',\n 'index.html',\n '/bundle.min.js',\n '/main.min.css',\n '/fonts/Inter-UI-Bold.woff',\n '/fonts/Inter-UI-Medium.woff',\n '/fonts/Inter-UI-Medium.woff2... | javascript | edit | 0 | 1 | mit | 2a1b7b1b0b9706dba23e45703b996bba616018e3 | MSF-Jarvis/msf-jarvis.github.io | static/service-worker.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nRouter.configure({\n layoutTemplate : 'layout',\n loadingTemplate : 'loading',\n notFoundTemplate : 'notFound'\n // waitOn : function () {\n // return Meteor.subscribe('posts');\n // }\n});\n\nRouter.route('/', {na... | javascript | edit | 0 | 3 | mit | a27021ff9d42fbe10e8d5107387dbaafab96e654 | JohnathanWeisner/man_tears,JohnathanWeisner/man_tears | lib/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar nodegit = require(\"../\"),\n path = require(\"path\");\n\n// This code walks the history of the master branch and prints results\n// that look very similar to calling `git log` from the command line\n\nnodegit.Repository.open(pa... | javascript | edit | 0 | 1 | mit | aae8f83338ed69a28e8c8279e738857b13364841 | nodegit/nodegit,nodegit/nodegit,nodegit/nodegit,nodegit/nodegit,jmurzy/nodegit,jmurzy/nodegit,jmurzy/nodegit,jmurzy/nodegit,jmurzy/nodegit,nodegit/nodegit | examples/walk-history.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nCounter = function (name, cursor, interval) {\n this.name = name;\n this.cursor = cursor;\n this.interval = interval || 1000 * 10;\n this._collectionName = 'counters-collection';\n}\n\n// every cursor must provide a collection name ... | javascript | edit | 0 | 2 | mit | cac8899b7ff10268146c9d150faa94f5126284de | nate-strauser/meteor-publish-performant-counts | lib/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe(\"m.withAttr()\", function () {\n\t\"use strict\"\n\n\tit(\"calls the handler with the right value/context without callbackThis\", function () { // eslint-disable-line\n\t\tvar spy = sinon.spy()\n\t\tvar object = {}\n\t\tm.with... | javascript | edit | 0 | 1 | mit | a76bbc0d7afe1136b8768ef0aadc57024fa88d55 | tivac/mithril.js,MithrilJS/mithril.js,lhorie/mithril.js,impinball/mithril.js,barneycarroll/mithril.js,pygy/mithril.js,pygy/mithril.js,impinball/mithril.js,MithrilJS/mithril.js,barneycarroll/mithril.js,lhorie/mithril.js,tivac/mithril.js | test/mithril.withAttr.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet origBot, origGuild;\n// A dummy message object so ESLint doesn't complain\nclass Message {}\nclass Client {\n constructor(bot, guild) {\n origBot = bot;\n origGuild = guild;\n }\n\n get guilds() {\n ret... | javascript | edit | 0 | 6 | mit | e1a896d31ace67e33986b78b04f9fab50536dddb | TTtie/TTtie-Bot,TTtie/TTtie-Bot,TTtie/TTtie-Bot | extensions/API/Client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n describe('icon-toggle tests', function () {\n\n it('Should have MaterialIconToggle globally available', function () {\n expect(MaterialIconToggle).to.be.a('function');\n });\n\n it('Should be upgraded to a MaterialIcon... | javascript | edit | 0 | 1 | apache-2.0 | afdd27cc9e852d2aa4c311a67635cc6ffa55455b | hassanabidpk/material-design-lite,yonjar/material-design-lite,LuanNg/material-design-lite,coraxster/material-design-lite,hebbet/material-design-lite,snice/material-design-lite,i9-Technologies/material-design-lite,craicoverflow/material-design-lite,Saber-Kurama/material-design-lite,pedroha/material-design-lite,it-andy-h... | test/unit/icon-toggle.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst _ = require('underscore');\n\nfunction buildSlots(slots) {\n const res = {};\n _.each(slots, (value, key) => {\n if ( _.isString(value)) {\n res[key] = {\n name: key,\n value: value\n ... | javascript | edit | 0 | 2 | mit | bdd1d8705399c1c9272499a300a3bc869717ef04 | ExpediaDotCom/alexa-conversation | request-builder.js | rejected_duplicate | Near-duplicate of sample 75070 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n/* eslint-disable no-console */\n/* eslint-disable import/default */\nvar chalk = require('chalk');\nvar app = require('../app.js'); // This initializes the Express application\nvar config = require('../../config.js');\... | javascript | edit | 0 | 2 | mit | 819ba6bfb8cb4b8a329520a09c05abf276e12148 | zklinger2000/fcc-heroku-rest-api | src/buildScripts/nodeServer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar pingPong = function(i) {\n if ((i % 3 === 0) && (i % 5 != 0)) {\n return \"ping\";\n } else if ((i % 5 === 0) && (i % 6 != 0)) {\n return \"pong\";\n } else if ((i % 3 === 0) && (i % 5 === 0)) {\n return \"ping pong\";\n... | javascript | edit | 0 | 5 | mit | cd3b959d10b8ac8c8011715a7e8cd3308f366cb2 | kcmdouglas/pingpong,kcmdouglas/pingpong | js/scripts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar BATCH_API_ENDPOINT = 'http://127.0.0.1:8080/api/v1/sql/job';\n\nmodule.exports = {\n db: {\n host: 'localhost',\n port: 5432,\n dbname: 'analysis_api_test_db',\n user: 'postgres',\n pass: ''\n ... | javascript | edit | 0 | 4 | bsd-3-clause | ef7450d5719b591b4517c9e107afe142de4246a8 | CartoDB/camshaft | test/test-config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n config.set({\n frameworks: ['mocha'],\n browsers: ['Firefox', 'PhantomJS'],\n files: [require.resolve('es5-shim'), 'build/test.js'],\n reporters: ['dots']\n });\n\n... | javascript | edit | 0 | 3 | mit | 9a4c99a0f8ff0076c4803fe90d904ca4a8f8f05e | ruslansagitov/loud | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport moment from \"moment\";\n\n\nclass Record extends React.Component {\n render() {\n const {record} = this.props;\n\n return (\n <dl className=\"dl-horizontal\">\n ... | javascript | edit | 0 | 1 | mit | 1a77bdfc1cd0106d2a0c9813f41c86e0ed6bd677 | scottwoodall/django-react-template,scottwoodall/django-react-template,scottwoodall/django-react-template | frontend/src/app/users/components/detail/Record.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar nconf = require('nconf')\n , path = require('path');\n\nconst defaults = {\n username: \"\",\n password: \"\",\n guardcode: \"\",\n twofactor: \"\",\n sentryauth: false,\n sentryfile: \"\",\n autojoin: [],\n ... | javascript | edit | 0 | 2 | mit | cd8a7f8facceddf2ffa0eae165438cfa31e8044e | rubyconn/steam-chat | lib/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Spec02 = require(\"../../specs/spec_0_2.js\");\n\nconst spec02 = new Spec02();\n\nfunction JSONParser(_spec) {\n this.spec = (_spec) ? _spec : new Spec02();\n}\n\n/**\n * Level 0 of validation: is that string? is that JSON?\n */\nf... | javascript | edit | 0 | 5 | apache-2.0 | fb92f710ead91a13d0bfa466b195e4e8ea975679 | cloudevents/sdk-javascript,cloudevents/sdk-javascript | lib/formats/json/parser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function( window, document, undefined ) {\n 'use strict';\n\n var hslEl = document.createElement( 'div' );\n hslEl.classList.add( 'hsl' );\n document.body.appendChild( hslEl );\n\n window.addEventListener( 'mousemove', function( e... | javascript | edit | 0 | 1 | mit | ac05b52e7fbaeef5d6e09d5552da0f4a4fe17e7f | razh/experiments,razh/experiments,razh/experiments | palette/js/picker-main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * @flow strict\n * @typechecks\n * @format\n */\n\n/**\n * Retrieve an object's own values as an array. If you want the values in the\n * protoype chain, too, use getOb... | javascript | edit | null | null | mit | db46938bd0b4fe175928b9d13626f6ced9cb1206 | facebook/draft-js | src/util/getOwnObjectValues.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/local/bin/node\n\nvar options = {},\n\targs = process.argv.slice( 0 ),\n\tspider = require( \"../index.js\" );\n\nargs.splice( 0, 2 );\nargs.forEach( function( value ) {\n\tvar arg = value.match( /^(?:--)((?:[a-zA-Z])*)(?:=)((?:.... | javascript | edit | 0 | 5 | mit | 4b24302999e934ad7d3cb0ad042b9d6678ed13de | arschmitz/spider.js | bin/spider.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module dependencies\n */\n\nmodule.exports = mongoose => {\n var Decimal = require('mongoose-float').loadType(mongoose, 2);\n var Float = require('mongoose-float').loadType(mongoose, 20);\n\n return {\n co... | javascript | edit | 0 | 19 | mit | 9a5547d4c754d5594d2a8f64a3cb4937642e9bb1 | wistityhq/strapi,wistityhq/strapi | packages/strapi-hook-mongoose/lib/utils/index.js | rejected_complexity | Cyclomatic complexity too high: 19 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar aFrom = require('es5-ext/array/from')\n , partial = require('es5-ext/function/#/partial')\n , extend = require('es5-ext/object/extend-properties')\n , ee = require('event-emitter')\n\n , o;\n\no = ee(exp... | javascript | edit | 0 | 1 | isc | 43cd349bba9405b35b94678d03d65fe5ed7635b2 | medikoo/tad | lib/logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Winston = require('winston');\n\nfunction Logger(level) {\n const logLevel = level || 'info';\n\n const logger = new Winston.Logger({\n level: logLevel,\n transports: [\n new Winston.transports.Consol... | javascript | edit | 0 | 2 | mit | 3318df78d163ba860674899a5bcec9e8b0ef9b65 | rapid7/acs,rapid7/acs,rapid7/acs | lib/logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar RawnetAdmin = window.RawnetAdmin || {};\n\nRawnetAdmin.menu = function(){\n\n function toggleNav(link) {\n var active = $('#mainNav a.active'),\n target = $(link.attr('href')),\n activeMenu = $('#subNav nav.active');\n\n... | javascript | edit | 0 | 3 | mit | 4a0c00a9553977ca6c8fde6ee75eb3d3b71aae37 | rawnet/rawnet-admin,rawnet/rawnet-admin,rawnet/rawnet-admin | app/assets/javascripts/rawnet_admin/modules/menu.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nconst path = require('path');\nconst proc = require('child_process');\nconst startCase = require('lodash.startcase');\n\nconst baseDir = process.argv[2];\n\nconst files = proc.execFileSync(\n 'find', [baseDir, '-... | javascript | edit | 0 | 2 | mit | 5acedf5027a81f604c9d5dc2cf7b101bf79525ae | OpenZeppelin/zeppelin-solidity,OpenZeppelin/openzeppelin-contracts,OpenZeppelin/openzeppelin-contracts,OpenZeppelin/openzeppelin-contracts,OpenZeppelin/zeppelin-solidity | scripts/gen-nav.js | rejected_duplicate | Near-duplicate of sample 96340 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst commonRules = require(\"./rules\");\n\nmodule.exports = {\n parser: \"babel-eslint\",\n plugins: [\"react\", \"babel\", \"flowtype\", \"prettier\", \"import\"],\n env: {\n browser: true,\n es6: true,\n ... | javascript | edit | 0 | 0 | mit | bfd61aed0e339c4043d2045146be76cd11e2f7fd | moira-alert/web2.0,moira-alert/web2.0,moira-alert/web2.0,moira-alert/web2.0 | .eslint-config/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n var mds = angular.module('mds', [\n 'motech-dashboard', 'entityService','instanceService', 'mdsSettingsService', 'ngCookies', 'ui.directives',\n 'ngRoute', 'ui.directives'\n ]);\... | javascript | edit | 0 | 1 | bsd-3-clause | ae9018e0442b5ce077d4d771712bae5ba378e448 | pmuchowski/modules,sebbrudzinski/modules,wstrzelczyk/modules,koshalt/modules,LukSkarDev/modules,atish160384/modules,tstalka/modules,frankhuster/modules,LukSkarDev/modules,atish160384/modules,shubhambeehyv/modules,tstalka/modules,koshalt/modules,frankhuster/modules,mkwiatkowskisoldevelo/modules,shubhambeehyv/modules,jus... | modules/mds/src/main/resources/webapp/js/app.js | rejected_duplicate | Near-duplicate of sample 84024 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Spanish\n\n$.extend( $.fn.pickadate.defaults, {\n monthsFull: [ 'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre' ],\n monthsShort: [ 'Ene', 'Feb', 'Mar'... | javascript | edit | 0 | 0 | mit | 24557a3b1b096e96baf8cb7e99c02f2a52181ee5 | wghust/pickadate.js,nayosx/pickadate.js,okusawa/pickadate.js,b-cuts/pickadate.js,spinlister/pickadate.js,perdona/pickadate.js,mdehoog/pickadate.js,dribehance/pickadate.js,nsmith7989/pickadate.js,bluespore/pickadate.js,Drooids/pickadate.js,baminteractive/pickadatebam,mdehoog/pickadate.js,mohamnag/pickadate.js,baminterac... | lib/translations/es_ES.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(){\n 'use strict';\n\n angular.module('app.states')\n .run(appRun);\n\n /** @ngInject */\n function appRun(routerHelper) {\n routerHelper.configureStates(getStates());\n }\n\n function getStates() {\n return {\n... | javascript | edit | 0 | 1 | apache-2.0 | c699baa93814c1b50209b42e31c2108c14b4e380 | boozallen/projectjellyfish,AllenBW/api,boozallen/projectjellyfish,mafernando/api,projectjellyfish/api,stackus/api,mafernando/api,boozallen/projectjellyfish,projectjellyfish/api,stackus/api,sonejah21/api,sreekantch/JellyFish,AllenBW/api,sreekantch/JellyFish,sreekantch/JellyFish,AllenBW/api,sonejah21/api,boozallen/projec... | src/client/app/states/orders/details/details.state.js | rejected_duplicate | Near-duplicate of sample 77774 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * React-related utilities\n */\n\nimport React from 'react';\n\n/**\n * Like React.Children.forEach(), but traverses through all descendant children.\n *\n * @param children Children of a React element, i.e. `elem.props.children`\... | javascript | edit | 0 | 2 | mit | 10b427e9ed67937b0c09f164a518f5f408dfd050 | elliottsj/react-children-utils | reactUtils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport moment from 'moment';\nimport getServerList from './../../utils/getServerList';\n\nfunction getInitialState() {\n return {\n time: undefined,\n servers: getServerList().map(server => Object.assign(server, {state: 'loading'... | javascript | edit | 0 | 2 | mit | d0fda64c6e4db63f14c894e89a9f1faace9c7eb5 | jseminck/jseminck-be-main,jseminck/jseminck-be-main | src/components/Servers/serverReducer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst parser = require('../parser');\n\nfunction InMemory(partials) {\n\tthis.partials = partials;\n\tthis.compiledPartials = {};\n}\n\nInMemory.prototype.get = function (id) {\n\tif (this.compiledPartials.hasOwnPropert... | javascript | edit | 0 | 3 | mit | b3bb2ea4896414553a2b18573310eb9b7cdc4f09 | maghoff/mustachio,maghoff/mustachio,maghoff/mustachio | lib/partials/in-memory.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar page = require('webpage').create();\nvar _ = require('underscore');\nvar fs = require('fs');\n\nfunction stdout(str) {\n fs.write('/dev/stdout', str, 'w')\n}\n\nfunction stderr(str) {\n fs.write('/dev/stderr', str, 'w')\n}\n\npage... | javascript | edit | 0 | 1 | mit | 985f707ada6f4299b0c886f25550bd1a932419f4 | sclevine/jasmine-runner-node | lib/runner/run_phantom.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n $('#columns .tweets').empty(); // Remove dummy content.\n\n $('.not-signed-in #the-sign-in-menu').popover({\n placement: 'below',\n trigger: 'manual'\n }).popover('show');\n});\n\n// __END__ ... | javascript | edit | 0 | 1 | mit | 2d329f918e5a5eaa5ccd19b32f745caf7beca020 | kana/ddh0313,kana/ddh0313 | public/javascripts/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport List from '@ichef/gypcrete/src/List';\nimport ListRow from '@ichef/gypcrete/src/ListRow';\nimport TextLabel from '@ichef/gypcrete/src/TextLabel';\n\nfunction DemoList() {\n return (\n <List... | javascript | edit | 0 | 1 | apache-2.0 | ae73a9c27835b80d3f4102b9239e16506e534c75 | iCHEF/gypcrete,iCHEF/gypcrete | packages/storybook/examples/Popover/DemoList.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fixtures = require('node-require-directory')(__dirname);\n\nexports.load = function(specificFixtures) {\n return exports.unload().then(function() {\n if (typeof specificFixtures === 'string') {\n specificFixtures = [specifi... | javascript | edit | 0 | 4 | mit | b37df655a98ed9dad6c31f15882af83cdde66452 | wikilab/wikilab-api | test/helpers/fixtures/index.js | rejected_duplicate | Near-duplicate of sample 91665 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports = module.exports = function(authenticate) {\n \n return function verify(req, token, cb) {\n authenticate(token, function(err, tkn, ctx) {\n if (err) { return cb(err); }\n \n // TODO: Check confirmation method... | javascript | edit | 0 | 5 | mit | 4388e9713abf80d4d001a86c67a447bd5a9f3beb | bixbyjs/bixby-http | app/auth/bearer/verify.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, {PropTypes} from 'react';\n\nconst puke = (obj) => <pre>{JSON.stringify(obj, 2, ' ')}</pre>\n\nconst Results = React.createClass({\n render() {\n return (\n <div>\n Results: {puke(this.p... | javascript | edit | 0 | 4 | mit | 71ed439f9f6e5e958c4aeac5522cd37dd90ec997 | DiegoCardoso/github-battle,DiegoCardoso/github-battle | app/components/Results.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global localStorage */\nimport axios from 'axios';\n\nexport const BASE_URL = process.env.REACT_APP_API_URL;\n\nconst request = (endpoint, { headers = {}, body, ...otherOptions }, method) => {\n return axios(`${BASE_URL}${endpoint}`... | javascript | edit | 0 | 5 | mit | a2772d17f97ad597e731d3fa71b363e9a190c1dc | oSoc17/code9000,oSoc17/code9000,oSoc17/code9000,oSoc17/code9000,oSoc17/code9000,oSoc17/code9000 | web-app/src/utils/api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar kue = require('kue');\nvar Bot = require('../models/bot');\n\nvar router = express.Router();\n\n/* GET home page. */\nrouter.get('/', function(req, res, next) {\n res.render('index');\n});\n\nrout... | javascript | edit | 0 | 2 | mit | 0f4aa813546a29fb55e08bf67c2a659b0f85b0fa | Ecotaco/bumblebee-bot,Ecotaco/bumblebee-bot | routes/index.js | rejected_duplicate | Near-duplicate of sample 81592 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nSpreeStore.module('Checkout',function(Checkout, SpreeStore, Backbone,Marionette,$,_){\n Checkout.Controller = {\n show: function(state) {\n SpreeStore.noSidebar()\n order = new SpreeStore.Models.Order({ number: SpreeStore.... | javascript | edit | 0 | 3 | bsd-3-clause | 80c24f86d0ed9655f74c710f11a59bc050df5432 | njaw/spree,njaw/spree,njaw/spree | app/assets/javascripts/spree/apps/checkout/checkout_controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n\t\n\tvar rule = data.rules[parseInt(request.param.num, 10)] || null;\n\t\n\tif (rule === null) return response.error(404);\n\t\n\tswitch (request.method) {\n\t\tcase 'PUT':\n\t\t\tvar cmd = '';\n\t\t\t\n\t\t\tswitch (req... | javascript | edit | 0 | 6 | mit | 801c830a6f128a09ae1575069e2e20e8457e9ce9 | miyukki/Chinachu,xtne6f/Chinachu,xtne6f/Chinachu,kounoike/Chinachu,kounoike/Chinachu,xtne6f/Chinachu,valda/Chinachu,valda/Chinachu,kanreisa/Chinachu,polamjag/Chinachu,wangjun/Chinachu,miyukki/Chinachu,polamjag/Chinachu,kanreisa/Chinachu,valda/Chinachu,miyukki/Chinachu,kounoike/Chinachu,wangjun/Chinachu,wangjun/Chinachu... | api/script-rules-rule-action.vm.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport { openModal } from 'actions/uiActions';\nimport Icon from 'utils/icons';\nimport ConfirmModal from '../Modals/ConfirmModal';\n\nexport default class DeleteIcon extends Compone... | javascript | edit | 0 | 1 | mit | 6e0974dc5db259931419a64cd4d13a61425283b5 | JasonEtco/flintcms,JasonEtco/flintcms | app/components/DeleteIcon/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* All related comment actions will be managed here */\n/* appending comment see views/comments/create.js.erb */\n\n$(function(){\n\n // declare variables for link, button, form ids\n var viewCommentForm = '#view_comment_form';\n var... | javascript | edit | 0 | 2 | mit | 8ee09efd28cfce24b0d712d5a1713caef4dd6819 | pratikmshah/myblog,pratikmshah/myblog,pratikmshah/myblog | app/assets/javascripts/comments.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Create the canvas on editor start"
},
{
"role": "assistant",
"content": "$(document).ready(function() {\n innerInitialize();\n});\n\nvar innerInitialize = function() {\n // Create the canvas and context\n initCanvas(... | javascript | new_file | 0 | 1 | mit | 2268bfb7be50412878eaa38627ab0a06c981aef8 | Tactique/jswars | assets/js/EditorApp.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\n_ = require('underscore')._\nvar request = require('request');\nvar router = express.Router({mergeParams: true});\nvar exec = require('child_process').exec;\nvar path = require('path');\nvar parentDir ... | javascript | edit | 0 | 4 | mit | aadce336447569e40160034e87fa3e674540239d | ControCurator/controcurator,ControCurator/controcurator,ControCurator/controcurator | routes/api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// node dependencies\nvar express = require('express');\n\nvar db = require('./db');\nvar passport = require('passport');\nvar morgan = require('morgan');\nvar parser = require('body-parser');\n\n// custom dependencies\nvar db = require... | javascript | edit | 0 | 0 | mit | 77f69e6f30817e31a34203cce6dbdbdc6eed86dd | aphavichitr/hackifieds,glistening-gibus/hackifieds,Hackifieds/hackifieds,glistening-gibus/hackifieds,Hackifieds/hackifieds,glistening-gibus/hackifieds,aphavichitr/hackifieds | server/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport webpack from 'webpack';\nimport WebpackDevServer from 'webpack-dev-server';\nimport config from './webpack.config.babel';\nimport open from 'open';\n\nconst webpackServer = new WebpackDevServer(webpack(config), config.devServer);... | javascript | edit | 0 | 2 | mit | a394119b4badf2fda57fa48989bff0e9810b7c79 | frostney/react-app-starterkit,frostney/react-app-starterkit | server-dev.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst i = require('itemDataRefresher.js');\n\nfateBus.subscribe(module, 'fate.configurationLoaded', function(topic, configuration) {\n new i.ItemDataRefresher('roll', configuration.shaderDataTSV)\n});\n\n```\n\nApply this change: Use t... | javascript | edit | 0 | 1 | mit | 061c79c86dec927d07c9566f982c9909abfbccad | rslifka/fate_of_all_fools,rslifka/fate_of_all_fools | app/rollDataRefresher.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//\n// See https://github.com/jenkinsci/js-builder\n//\nvar builder = require('@jenkins-cd/js-builder');\n\n// Disable js-builder based linting for now.\n// Will get fixed with https://github.com/cloudbees/blueocean/pull/55\nbuilder.lin... | javascript | edit | 0 | 0 | mit | 67b10db38f23873d832009c29519b57fb1e769e2 | ModuloM/blueocean-plugin,kzantow/blueocean-plugin,jenkinsci/blueocean-plugin,tfennelly/blueocean-plugin,jenkinsci/blueocean-plugin,jenkinsci/blueocean-plugin,kzantow/blueocean-plugin,jenkinsci/blueocean-plugin,tfennelly/blueocean-plugin,ModuloM/blueocean-plugin,alvarolobato/blueocean-plugin,kzantow/blueocean-plugin,jen... | blueocean-web/gulpfile.js | rejected_duplicate | Near-duplicate of sample 107616 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @depends MatrixStack.js\n */\nvar Camera = new Class({\n initialize: function() {\n this.projection = new MatrixStack();\n this.modelview = new MatrixStack();\n },\n\n perspective: function(fovy, aspect, n... | javascript | edit | 0 | 1 | mit | 9d19611474e61db68fcf2f7b9ee8505fea59092e | oampo/webglet | src/Camera.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'client',\n environment: environment,\n baseURL: '/',\n locationType: 'auto',\n\n 'ember-simple-auth-token': {\n serv... | javascript | edit | 0 | 4 | bsd-2-clause | 48b03917df05a8c9892a3340d93ba4b92b16b81c | mblayman/lcp,mblayman/lcp,mblayman/lcp | client/config/environment.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar myApp = angular.module('CordovaAppHarness', ['ngRoute']);\n\n\nmyApp.config(['$routeProvider', function($routeProvider){\n $routeProvider.when('/', {\n templateUrl: 'views/list.html',\n controller: 'ListCtrl'\n ... | javascript | edit | 0 | 2 | apache-2.0 | c313bafe3cf063cf0f32318363050f4cce43afae | guozanhua/chrome-app-developer-tool,apache/cordova-app-harness,guozanhua/chrome-app-developer-tool,feedhenry/cordova-app-harness,feedhenry/cordova-app-harness,apache/cordova-app-harness,apache/cordova-app-harness,feedhenry/cordova-app-harness,guozanhua/chrome-app-developer-tool,apache/cordova-app-harness,guozanhua/chro... | www/cdvah/js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//electron entry-point\n\nconst REACT_DEVELOPER_TOOLS = require('electron-devtools-installer').REACT_DEVELOPER_TOOLS;\nvar installExtension = require('electron-devtools-installer').default;\nvar app = require('electron').app;\nvar Brows... | javascript | edit | 0 | 4 | mit | 00a621ec5e411bf070d789c8f7a6344b30986844 | cynicaldevil/gitrobotic,cynicaldevil/gitrobotic | main.start.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (<EMAIL>), Duncan Mitchell (<EMAIL>), or Johannes Kinder (<EMAIL>) for details or support | LICENSE.md for license details */\n\n\"use strict\";\n\n/**\n * Thi... | javascript | edit | 0 | 1 | mit | 1a3aeafe8f22d5e80276a7e0caaae99a274f2641 | ExpoSEJS/ExpoSE,ExpoSEJS/ExpoSE,ExpoSEJS/ExpoSE | Analyser/src/External.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 { View, StyleSheet, TouchableWithoutFeedback, Animated } from 'react-native';\nimport { OPEN_ANIM_DURATION, CLOSE_ANIM_DURATION } from './constants';... | javascript | edit | 0 | 1 | isc | 80a8734522b5aaaf12ff2fb4e1f93500bd33b423 | instea/react-native-popup-menu | src/Backdrop.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require( 'path' );\n\nmodule.exports = {\n\tpreset: 'jest-puppeteer',\n\tsetupFilesAfterEnv: [\n\t\t'<rootDir>/config/bootstrap.js',\n\t\t'@wordpress/jest-console',\n\t\t'expect-puppeteer',\n\t],\n\ttestMatch: [\n\t\t'<root... | javascript | edit | 0 | 0 | apache-2.0 | 11c5510b06900c328ff61101bbf11cabf00419c4 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | tests/e2e/jest.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar injection = require('../services/injection.js');\nvar Q = require('q');\nvar mongoose = require('mongoose');\n\nmodule.exports = function (test, fixtureName, testFn) {\n var dbUrl = 'mongodb://localhost:27017/' + fixtureName;\n\n... | javascript | edit | 0 | 2 | mit | fa09a1300bb527ad8c804e06bc33edc1b9213ea4 | allcount/allcountjs,chikh/allcountjs,chikh/allcountjs,allcount/allcountjs | test/integration-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright 2016 Google Inc. All Rights Reserved.\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... | javascript | edit | 0 | 0 | apache-2.0 | 0ab42696086c681302a2718f89b557bbe40442e8 | foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm | src/foam/u2/HTMLElement.js | rejected_duplicate | Near-duplicate of sample 97401 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire(\"../scss/index.scss\");\n\nvar React = require('react');\nvar Locale = require('grommet/utils/Locale');\nvar Cabler = require('./components/Cabler');\n\nvar locale = Locale.getCurrentLocale();\nvar localeData;\ntry {\n localeD... | javascript | edit | 0 | 0 | apache-2.0 | fee641c22a50f685055139a8abb34a6a6159378e | grommet/grommet-cabler,grommet/grommet-cabler | src/js/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport storage from './storage';\nimport {SVGRenderer} from 'scratch-svg-renderer';\n\n// Contains 'font-family', but doesn't only contain 'font-family=\"none\"'\nconst HAS_FONT_REGEXP = 'font-family(?!=\"none\")';\n\nconst getCostumeUr... | javascript | edit | 0 | 4 | bsd-3-clause | a37ea675122ca7da96a84090aa86f7e7eaa038d4 | LLK/scratch-gui,LLK/scratch-gui | src/lib/get-costume-url.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (){\n /* ADAPTER\n *\n * This blanket.js adapter is designed to autostart coverage\n * immediately. The other side of this is handled from Cucumber\n *\n * Required blanket commands:\n * blanket.setupCoverage(); /... | javascript | edit | 0 | 2 | mit | dadee563a1ea459c588b1507a4a98078e20d0dc6 | vemperor/capybara-blanket,kfatehi/cucumber-blanket,kfatehi/cucumber-blanket,keyvanfatehi/cucumber-blanket,keyvanfatehi/cucumber-blanket | javascript/cucumber-blanket.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction hide_covers() {\n // Remove covers\n $(\".mix_element div.cover\").remove()\n // Add class so cards can be restyled\n $(\".mix_card.half_card\").addClass(\"ext-coverless_card\")\n\n // Remove covers on track page... | javascript | edit | 0 | 2 | mit | 69772952eaa4bbde2a35fc767ac5f496e1c57e99 | pbhavsar/8tracks-Filter | src/filter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// JS Goes here - ES6 supported\nif (window.netlifyIdentity) {\n window.netlifyIdentity.on('login', () => {\n document.location.href = '/admin/';\n });\n}\n\n```\n\nApply this change: Fix issue with always redirecting to /admin whe... | javascript | edit | 0 | 1 | mit | ab57ad3b7547089eee9a2fb4484c370ef6730c2a | koiamericas/one-click-hugo-cms,mobarreto/one-click-hugo-cms,dwaiba/one-click-hugo-cms,karsens/one-click-hugo-cms,PolymerChar/polymerchar-cms,philipppolder/ppolder,ranasingh/psn-hugo-cms,ecerecerez/one-click-hugo-cms,hvp17/netlify-cms-test,covingtondoan/radiorounds,biilmann/cms-identity-demo,thgrace/one-click-hugo-cms,p... | src/js/app.js | rejected_duplicate | Near-duplicate of sample 70025 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Detects if only the primary button has been clicked in mouse events.\n * @param {MouseEvent} e Event instance (or Event-like, i.e. `SyntheticEvent`)\n * @return {Boolean}\n */\nexport const isPrimaryClick = e =>\n !(e.altKey ||... | javascript | edit | 0 | 1 | mit | b2648c0b5fa32934d24b271fdb050d11d0484c21 | jacobbuck/primary-click | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('Common');\nvar win = new Window();\napplication.exitAfterWindowsClose = true;\nwin.visible = true;\nwin.title = \"Hi Tint World!\";\n\n\nvar webview = new WebView(); // Create a new webview for HTML.\nwin.appendChild(webview); ... | javascript | edit | 0 | 1 | mit | d54e3be13f374f3aa9b2f1e24bc476e7aadbfbcb | niaxi/hello-tint,niaxi/hello-tint | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by thram on 21/01/17.\n */\nimport forEach from \"lodash/forEach\";\nimport assign from \"lodash/assign\";\nimport isArray from \"lodash/isArray\";\nimport {observe, state, removeObserver} from \"thrux\";\n\nexport const... | javascript | edit | 0 | 3 | mit | 0c28f538d9382d85c69ecb06a208ae1b0874b29c | Thram/react-thrux | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#! /usr/bin/env node\n\nimport chalk from 'chalk';\nimport console from 'console';\n\nimport gitAuthorStats from './git-author-stats';\n\ngitAuthorStats().forEach((gitAuthorStat) => {\n const author = chalk.bold(gitAuthorStat.author);\... | javascript | edit | 0 | 1 | mit | f563f24c06d6de9401aa7d43fea0d5319bf5df0e | caedes/git-author-stats | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path')\nconst parse = require('./parsers/index')\n// TODO Fix ampersand in selectors\n// TODO ENFORCE THESE RULES\n// value-no-vendor-prefix – don't allow vendor prefixes\n// property-no-vendor-prefix – don't allow... | javascript | edit | 0 | 1 | mit | 15093e0594b007941d29d17751bc8de40e65a346 | styled-components/stylelint-processor-styled-components | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nclass Footer extends React.PureComponent {\n render () {\n return <footer className='container row'>\n <p className='col-xs-12'>\n Copyright 2017 Junyoung Choi. <a href='https://github.c... | javascript | edit | 0 | 1 | mit | af6776fc87f7a18c18355f40e58364e5ca3237b7 | CarbonStack/carbonstack | components/base/Footer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport isPromise from './isPromise';\n\nconst defaultTypes = ['PENDING', 'FULFILLED', 'REJECTED'];\n\nexport default function promiseMiddleware(config={}) {\n const promiseTypeSuffixes = config.promiseTypeSuffixes || defaultTypes;\n r... | javascript | edit | 0 | 6 | mit | f01915febfe98c8dd27a97af00473a64030d5e4f | pburtchaell/redux-promise-middleware | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport _ from './utils';\n\nexport default {\n has: (value = {}, conditions = {}) => {\n if (!_.isObject(conditions)) return false;\n if (_.isArray(value)) return !!_.find(value, conditions);\n if (_.isObject(value)) return !!... | javascript | edit | 0 | 4 | mit | 08cad5105b71b10b063af27ed256bc4ab7571896 | smizell/hf | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport AtomControl from './components/AtomControl';\nimport CardControl from './components/CardControl';\nimport { classToDOMCard } from './utils/classToCard';\nimport Container, { EMPTY_MOBILEDOC } from './components/Container';\nimpor... | javascript | edit | 0 | 0 | bsd-3-clause | f47b43cee6bbd40a6879f5ce09eb2612c83496f9 | upworthy/react-mobiledoc-editor | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar url = require('url')\nvar dashButton = require('node-dash-button');\nvar request = require('request')\n\nfunction DasherButton(button) {\n var options = {headers: button.headers, body: button.body, json: button.json}\n\n this.dash... | javascript | edit | 0 | 7 | mit | 7390f356615c375960ebf49bca2001a1fee43788 | maddox/dasher,maddox/dasher | lib/dasher.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('proxtop', ['ngMaterial', 'ui.router', 'angular-progress-arc', 'pascalprecht.translate'])\n .config(['$stateProvider', '$urlRouterProvider', '$translateProvider', function($stateProvider, $urlRouterProvider, $translate... | javascript | edit | 0 | 1 | mit | 4aa75606353bd190240cbfd559eb291a891a7432 | kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop | src/ui/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst config = Object.assign({\n development: {\n api: {\n trade_events: {\n host: 'https://intrasearch.govwizely.com/v1/trade_events',\n },\n },\n },\n production: {\n api: {\n trade_events: {\n ... | javascript | edit | 0 | 0 | mit | cbb27012bb0c8ffc338d92b2cf3ef4449a65e4a4 | GovWizely/trade-event-search-app,GovWizely/trade-event-search-app | src/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n/**\n * Copyright (c) 2015-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.... | javascript | edit | 0 | 0 | bsd-3-clause | 8295d27a906f850cefd86321d212162cba7ef296 | CodeLinkIO/react-native,imjerrybao/react-native,shrutic123/react-native,tszajna0/react-native,gitim/react-native,DanielMSchmidt/react-native,jadbox/react-native,ndejesus1227/react-native,tsjing/react-native,exponent/react-native,naoufal/react-native,martinbigio/react-native,mironiasty/react-native,browniefed/react-nati... | local-cli/wrong-react-native.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(){\nvar mod = angular.module('caspy.api', ['ngResource', 'caspy.server']);\n\nmod.config(['$resourceProvider', \n function($resourceProvider) {\n $resourceProvider.defaults.stripTrailingSlashes = false;\n }]\n);\n... | javascript | edit | 0 | 2 | bsd-3-clause | 1aac1de738fdef73676948be8e4d5d8fc18eb27c | altaurog/django-caspy,altaurog/django-caspy,altaurog/django-caspy | caspy/static/js/api.js | rejected_duplicate | Near-duplicate of sample 78269 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n backgrid\n http://github.com/wyuenho/backgrid\n\n Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors\n Licensed under the MIT @license.\n*/\n\n/**\n A Footer is a generic class that only defines a default tag `tfoot` and\... | javascript | edit | 0 | 2 | mit | cb754daf342cdea42225efca3834966bd5328fba | goodwall/backgrid,blackducksoftware/backgrid,wyuenho/backgrid,wyuenho/backgrid,digideskio/backgrid,qferr/backgrid,bryce-gibson/backgrid,aboieriu/backgrid,ludoo0d0a/backgrid,bryce-gibson/backgrid,blackducksoftware/backgrid,aboieriu/backgrid,digideskio/backgrid,Acquisio/backgrid,kirill-zhirnov/backgrid,crealytics/backgri... | src/footer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar geocode = require('./geocode');\nvar mongoose = require('./mongo');\nvar otp = require('./otp');\n\n/**\n * Expose `router`\n */\n\nvar router = module.exports = express.Router();\n\n/**\n * Main c... | javascript | edit | 0 | 2 | bsd-3-clause | c51089b4f5be53d7657aecf9cfa721ced5895fa4 | amigocloud/modified-tripplanner,tismart/modeify,miraculixx/modeify,miraculixx/modeify,tismart/modeify,arunnair80/modeify,amigocloud/modeify,tismart/modeify,amigocloud/modeify,miraculixx/modeify,arunnair80/modeify-1,arunnair80/modeify-1,arunnair80/modeify,miraculixx/modeify,amigocloud/modeify,amigocloud/modified-trippla... | lib/health.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar addFollowers = require('./follow');\nvar checkAuth = require('./check_auth');\nvar checkPrivilege = require('./privilege_check');\nvar githubOAuth = require('./github_oauth');\nvar users = require('./db').get('users');\n\nmodule.exp... | javascript | edit | 0 | 2 | mit | f6397f79ef1471f87aa113a4dc4bab900e07935c | simplyianm/ghfollowers,legoboy0215/ghfollowers,simplyianm/ghfollowers,legoboy0215/ghfollowers | lib/routes.js | rejected_duplicate | Near-duplicate of sample 84581 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.