messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * grunt-liquibase\n * https://github.com/chrisgreening/grunt-liquibase\n *\n * Copyright (c) 2014 Chris Greening\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = function(grunt) {\n\n // Project config... | javascript | edit | 0 | 1 | mit | 596a5affa2f9411c6a4b0a1c28f3b0d917b5feee | cgreening/grunt-liquibase,MRN-Code/grunt-liquibase,idefy/grunt-liquibase,sameetn/grunt-liquibase | Gruntfile.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 {\... | javascript | edit | 0 | 1 | apache-2.0 | 7c68b56fc77202d7fac215ddda0a6fcaf334e9dc | ManageIQ/manageiq-ui-self_service,dtaylor113/manageiq-ui-self_service,ManageIQ/manageiq-ui-self_service,ManageIQ/manageiq-ui-service,AllenBW/manageiq-ui-service,dtaylor113/manageiq-ui-self_service,AllenBW/manageiq-ui-service,ManageIQ/manageiq-ui-service,dtaylor113/manageiq-ui-self_service,ManageIQ/manageiq-ui-self_serv... | client/app/states/marketplace/details/details.state.js | rejected_duplicate | Near-duplicate of sample 78570 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//= require govuk/multivariate-test\n\n/*jslint browser: true,\n * indent: 2,\n * white: true\n */\n/*global $, GOVUK */\n$(function () {\n\n GOVUK.taxDiscBetaPrimary = function () {\n $('.primary-apply').html($('#beta-primary').h... | javascript | edit | 0 | 2 | mit | d483635a68a46a53832c64d72b03a857700a52ad | alphagov/frontend,alphagov/frontend,alphagov/frontend,alphagov/frontend | app/assets/javascripts/tax-disc-ab-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('bower.json'),\n jshint: {\n grunt: {\n src: ['Gruntfile.js']\n },\n main: {\n src: ['tock.js'],\n options: {\... | javascript | edit | 0 | 1 | mit | b3b78ff3a18bdfcc533e9f76e4d9ed251c4e6245 | Falc/Tock.js | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nManageIQ.angular.app.service('DialogEditorHttp', ['$http', 'API', function($http, API) {\n this.loadDialog = function(id) {\n return API.get('/api/service_dialogs/' + id + '?attributes=content,buttons,label');\n };\n\n this.saveDi... | javascript | edit | 0 | 2 | apache-2.0 | 36522ada53a64a129cb3519b4183da8084dced1c | ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic | app/assets/javascripts/services/dialog_editor_http_service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst path = require('path')\nconst {spawn} = require('child_process')\n\nconst CONFIG = require('../config')\n\nmodule.exports = async function () {\n return new Promise((resolve, reject) => {\n const eslint = spawn... | javascript | edit | 0 | 4 | mit | d7327f575048b5735bf65fa0e0fc666601e26e25 | brettle/atom,PKRoma/atom,PKRoma/atom,brettle/atom,atom/atom,Mokolea/atom,atom/atom,PKRoma/atom,Mokolea/atom,Mokolea/atom,brettle/atom,atom/atom | script/lib/lint-java-script-paths.js | rejected_duplicate | Near-duplicate of sample 95263 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nmodule.exports = {\n up: function (queryInterface, Sequelize) {\n queryInterface.addColumn(\n 'Rescues',\n 'type',\n {\n type: Sequelize.ENUM('success', 'failure', 'invalid', 'other'),\n ... | javascript | edit | 0 | 1 | bsd-3-clause | cb92a155868f4a46472f4061640d9a93cbbf2cb2 | FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com | bin/migrations/migrations/20161028050220-unnamed-migration.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Pixelator = function(data, partner) {\n this.data = data;\n this.partner = partner;\n};\n\nPixelator.prototype = {\n defaults: function() {\n var default_context = this.data.context || {};\n default_context.timestamp = new ... | javascript | edit | 0 | 3 | mit | 71c798ac47b0e1c8ad4e10fd4e5a01a429a273bc | howaboutwe/pixelator,howaboutwe/pixelator | app/assets/javascripts/core/pixelator.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: fix: Fix stack traces for errors happening inside coffee-script tests.\n\nBoth `coffee-script` as well as `source-map-support` (loaded through `babel-register`) patch `Error.prepareStackTrace` to modify stack traces to point to correct e... | javascript | new_file | 0 | 0 | mit | 9fc4be566d1d4f7f68eafc35c4659cb246654936 | tediousjs/tedious,tediousjs/tedious,pekim/tedious | test/setup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('./intro-anim.sass');\n\nconst isTouchDevice = 'ontouchstart' in document.documentElement;\nconst ev = isTouchDevice ? 'touchend' : 'click';\nconst delay = isTouchDevice ? 1050 : 550;\n\ndocument.getElementById('corners').addEve... | javascript | edit | 0 | 1 | mit | 4b2c8b781b824ebbc56376cd897a26d79bdfca4b | arkis/arkis.io,arkis/arkis.io | app/src/home/intro-animation/intro-anim.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nif (process.env.NO_UPDATE) {\n process.exit(0);\n}\n\nconst path = require(\"path\");\nconst fs = require(\"fs\");\nconst request = require(\"request\");\n\n// Pin to specific version, reflecting the spec version in ... | javascript | edit | 0 | 0 | mit | 78fa674d525f1165a26932c3b1dcb65da6f5f8e2 | jsdom/whatwg-url,jsdom/whatwg-url,jsdom/whatwg-url | scripts/get-latest-platform-tests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction getDocuments(path, email, key, projectId) { \n const token = getAuthToken_(email, key);\n \n const baseUrl = \"https://firestore.googleapis.com/v1beta1/projects/\" + projectId + \"/databases/(default)/documents/\" + path;... | javascript | edit | 0 | 1 | mit | a4960ee0a4e0e95d86774bc7ebaaad74bf8695e6 | grahamearley/FirestoreGoogleAppsScript | src/Read.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar generators = require('yeoman-generator'),\n _ = require('lodash');\n\nmodule.exports = generators.Base.extend({\n\n constructor: function () {\n generators.Base.apply(this, arguments);\n\n this.argument('app... | javascript | edit | 0 | 1 | isc | 4f1c5dd238b101a57207708e84da229364572eb9 | rudijs/generator-ngpack,rudijs/generator-ngpack,rudijs/generator-ngpack | app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction BaseError(data){\n var oldLimit = Error.stackTraceLimit,\n error;\n\n Error.stackTraceLimit = 20;\n\n error = Error.apply(this, arguments);\n\n Error.stackTraceLimit = oldLimit;\n\n if(Error.captureStackTr... | javascript | edit | 0 | 7 | mit | f5ef0965335933ef9c0cf694f7340fca60b1fd49 | MauriceButler/generic-errors | baseError.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { useRef } from 'react';\n\nexport default {\n title: 'Core/Rendering',\n};\n\n// NOTE: in our example apps each component is mounted twice as we render in strict mode\nlet timesMounted = 0;\nexport const Counter = () => ... | javascript | edit | 0 | 3 | mit | 1142e1ddb10699a59790b1a144ca3570a307cc8a | storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook | examples/official-storybook/stories/core/rendering.stories.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nMeteor.loginWithGoogle = function (options, callback) {\n // support both (options, callback) and (callback).\n if (!callback && typeof options === 'function') {\n callback = options;\n options = {};\n }\n\n var config = Accou... | javascript | edit | 0 | 8 | mit | 2601075b3380a6488e8fe6adc45fcbf840d5897f | papimomi/meteor,aramk/meteor,dev-bobsong/meteor,yiliaofan/meteor,brdtrpp/meteor,zdd910/meteor,AlexR1712/meteor,lieuwex/meteor,juansgaitan/meteor,codingang/meteor,cog-64/meteor,yiliaofan/meteor,4commerce-technologies-AG/meteor,nuvipannu/meteor,Hansoft/meteor,jenalgit/meteor,cog-64/meteor,planet-training/meteor,Jeremy017... | packages/accounts-google/google_client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// @ngInject\nvar ParameterSearchController = function($scope, $location, $controller, npdcAppConfig, Parameter) {\n // Extend NpolarApiBaseController\n $controller(\"NpolarBaseController\", {\n $scope: $scope\n }... | javascript | edit | 0 | 3 | mit | 16c50fd316a43c2b934ee2d4d0434166101ad849 | npolar/npdc-indicator,npolar/npdc-indicator | src/indicator-parameter/ParameterSearchController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar cors = require('cors');\nvar bodyParser = require('body-parser');\nvar nano = require('nano')('http://localhost:5984');\nvar todo = nano.db.use('todo');\n\nvar app = express();\n\napp.use(cors());\... | javascript | edit | 0 | 2 | mit | d64bd789940684d8f53ee41e9ac1a105c5eb9982 | PurityControl/uchi-komi-js | problems/kata/001-todo-backend/001/app.js | rejected_duplicate | Near-duplicate of sample 91604 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst naked = require('naked-string');\n\nmodule.exports = function equalsish(stringOne, stringTwo) {\n\tif (stringOne === undefined) {\n\t\tthrow new Error('No arguments provided.');\n\t} else if (stringTwo === undefin... | javascript | edit | 0 | 3 | apache-2.0 | 7dcdac1d7e2012090a7346ef764ea07f62b1f835 | dar5hak/equalsish | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nconst GroupRolesView = () => (\n <div/>\n)\n\nexport default GroupRolesView\n\n```\n\nApply this change: Add form for role view"
},
{
"role": "assistant",
"content": "import React from 'react'\n... | javascript | edit | 0 | 1 | mit | 77030bd69fdba772e4632443ea0328ffc4f3370b | mg4tv/mg4tv-web,mg4tv/mg4tv-web | src/components/GroupRolesView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Vue from 'vue';\nimport VueRouter from 'vue-router';\n\nVue.use(VueRouter);\n\nimport Home from './Home';\n// import Counter from './Counter'\n\nconst Counter = resolve => require.ensure([], () => resolve(require('./Counter').def... | javascript | edit | 0 | 2 | mit | 6a30ee8c3487069be065e1b82df578bbc8cd806b | scopewu/vue-vuex-starter-kit,scopewu/vue-vuex-starter-kit | src/router/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Run the first test with \"focus\" tag.\n *\n * @param {Object} hydro\n * @api public\n */\n\nmodule.exports = function(hydro) {\n if (!hydro.get('focus')) return;\n var focus = false;\n hydro.on('pre:test', function(test) {\n... | javascript | edit | 0 | 3 | mit | 2de4a243971aab231adbcab0e67e21570cdbd971 | hydrojs/focus | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ntf = require('ntf')\n , test = ntf.http('http://ntfjs.org')\n\nexports.ntf = test.get('/', function(test) {\n test.statusCode(200)\n test.body('ntf')\n test.done()\n})\n\n```\n\nApply this change: Add failing test to example"
... | javascript | edit | 0 | 1 | mit | 5323addedf2cfd1e42218d471b2ef96b70a64276 | shutterstock/ntfd | example/tests/ntfjs.org.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n preset: \"ts-jest\",\n testEnvironment: \"node\",\n moduleNameMapper: {\n \"^(admin|site|charts|utils|db|settings)/(.*)$\": \"<rootDir>/$1/$2\",\n \"^settings$\": \"<rootDir>/settings\",\n ... | javascript | edit | 0 | 0 | mit | 0a0f4879d820bc0764282e15a3959d11a23842e5 | owid/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,owid/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher | jest.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//\n// types.js - type predicators\n//\n\nBiwaScheme.isNil = function(obj){\n return (obj === BiwaScheme.nil);\n};\n\nBiwaScheme.isUndef = function(obj){\n return (obj === BiwaScheme.undef);\n};\n\nBiwaScheme.isChar = function(obj){\n... | javascript | edit | 0 | 3 | mit | 86d8f1368c1757cc655b2c7e2ecc9fa7bf78dfbc | biwascheme/biwascheme.github.io,yhara/biwascheme,biwascheme/biwascheme,biwascheme/biwascheme,biwascheme/biwascheme,biwascheme/biwascheme.github.io,yhara/biwascheme | src/system/types.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst React = require('react');\nvar { NativeModules, Platform } = require('react-native');\n\nif (Platform.OS === 'android') {\n module.exports = {\n get(dim) {\n try {\n if(!NativeModules.ExtraDimensions) {\n ... | javascript | edit | 0 | 0 | isc | 58f2b85604c59880d50dff79011022ed4f2bc248 | jaysoo/react-native-extra-dimensions-android,Sunhat/react-native-extra-dimensions-android,Sunhat/react-native-extra-dimensions-android,jaysoo/react-native-extra-dimensions-android | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n'use strict';\n\nvar program = require('commander')\n , gulp = require('gulp')\n , chalk = require('chalk')\n , exec = require('exec')\n , pjson = require('./package.json')\n\nvar strings = {\n crea... | javascript | edit | 0 | 2 | mit | d29101b0e12007ecc4ffc0b515c3f5896702feb6 | jinn-tool/jinn | index.js | rejected_duplicate | Near-duplicate of sample 75584 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nconst seneca = require('seneca')()\nconst senecaContet = require('seneca-context')\n\nseneca.add({role:'api', cmd:'post'}, (args, done) => {\n seneca.make('blog/posts').save$(args.post, done)\n})\n\nseneca.act({role:'web... | javascript | edit | 0 | 1 | mit | 12ab81512d58c257decb5a4997a74bb662934098 | eoinsha/seneca-mt-demo | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel'\n\nimport {transform} from 'babel-core'\nimport Path from 'path'\n\nexport const compiler = true\nexport const minifier = false\nexport function process(contents, {rootDirectory, filePath, config}) {\n const beginning = con... | javascript | edit | 0 | 1 | mit | f73eb6af5d1b32dcaf53ca26fa2c99c7edd89514 | steelbrain/ucompiler-plugin-babel | src/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n* Features a variety of commonly used widgets, including toolbars, text inputs, checkboxes, groups\n* and multiple types of buttons. \n*\n* @namespace onyx \n*/\nmodule.exports.version = \"2.6.0-pre.16\";\n\n```\n\nApply this chang... | javascript | edit | 0 | 0 | apache-2.0 | 1496dad8078c3a3dc5197d4d56152ac946ee86b5 | enyojs/onyx,enyojs/onyx | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env node */\n'use strict';\n\nconst fastbootTransform = require('fastboot-transform');\n\nconst filesToImport = [\n 'dependencyLibs/inputmask.dependencyLib.js',\n 'inputmask.js',\n 'inputmask.extensions.js',\n 'inputmask.d... | javascript | edit | 0 | 1 | mit | 124a16c6fee95c52f0a20a6bba3d948b2d8724c5 | pzuraq/ember-inputmask,blimmer/ember-inputmask,pzuraq/ember-inputmask,blimmer/ember-inputmask | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-devtools',\n isEnabled: function() {\n var addonConfig = this.app.project.config(this.app.env)['ember-devtools'];\n return addonConfig.enabled;\n }\n};... | javascript | edit | 0 | 1 | mit | 681976d249137b65a62ecf282b7fd965abe9590f | aexmachina/ember-devtools,aexmachina/ember-devtools | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nvar path = require('path');\n\nmodule.exports = {\n name: 'ember-cli-octicons',\n blueprintsPath: function() {\n return path.join(__dirname, 'blueprints');\n }\n};\n\n```\n\nApply this cha... | javascript | edit | 0 | 1 | mit | 6613a524deee98784f9b3a282ebfbe08c38dc539 | kpfefferle/ember-cli-octicons,kpfefferle/ember-octicons,kpfefferle/ember-cli-octicons,kpfefferle/ember-octicons | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\nglobal.use = function (path) {\n if(path === 'config'){\n return require.main.require('./' + path);\n }else{\n return require('./' + path);\n }\n};\n\nconst Server = use('core/s... | javascript | edit | 0 | 2 | mit | 5561f959ae4a33bd47ccc76ebbef01807e3e8a9c | yura-chaikovsky/dominion | index.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>columnName</div>})}\n </div>\n )\n\n}\n\ne... | javascript | edit | 0 | 1 | mit | 2f2663e7010837ee11a51aaf9a837d15ded56840 | severnsc/brewing-app,severnsc/brewing-app | src/Components/EditableTable/EditableTableHeader/index.js | rejected_duplicate | Near-duplicate of sample 95522 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\n\nmodule.exports = function requireAll(options) {\n if (typeof options === 'string') {\n options = {\n dirname: options,\n filter: /(.+)\\.js(on)?$/,\n excludeDirs: /^\\.(git|svn)$/,\n pa... | javascript | edit | 0 | 7 | mit | de0e9f7326601b810153c6e63a2e5c189c1858c7 | SteveKanter/node-require-all | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar EventEmitter = require('events').EventEmitter;\nvar inherits = require('inherits');\n\nmodule.exports = function(fn) {\n\n inherits(fn, EventEmitter);\n\n var self = new fn();\n\n fn.prototype.addEventListener = function(ev, cb... | javascript | edit | 0 | 1 | mit | 854f618c63fa254fef9810963d816cff0a296216 | deathcap/unworkify | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar browserify = require('browserify');\nvar watchify = require('watchify');\nvar koars = require('koars-utils')({module: 'assets', asset:'js'});\n\nmodule.exports = function(src, dest, excludes) {\n\t//Setup our cache, timestamp and wa... | javascript | edit | 0 | 3 | bsd-3-clause | 378099084cd9375ab8755abb00633b9f59f375aa | koars/browserify | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n[\n 'lib/jquery/jquery.min.js',\n 'lib/angular/angular.js',\n 'lib/underscore/underscore-min.js',\n 'lib/umbraco/Extensions.js',\n 'js/app.js',\n 'js/umbraco.resources.js',\n 'js/umbraco.services.js',\n 'js/umbr... | javascript | edit | 0 | 0 | mit | f9bd33dafe554ddb2ff82a4f956b4fd0a4db72ac | umbraco/Umbraco-CMS,abjerner/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,dawoe/Umbraco-CMS,marcemarc/Umbraco-CMS,arknu/Umbraco-CMS,umbraco/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,abjerner/Umbraco-CMS,abryukhov/Umbraco-CMS,dawoe/Umbraco-CMS,robertjf/Umbraco-CMS,arknu/Umbraco-CMS,robertjf/Umbraco-CMS,umbraco/Umbraco-CMS,... | src/Umbraco.Infrastructure/WebAssets/PreviewInitialize.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar detect = require('rtc-tools/detect');\nvar isTestling = typeof __testlingConsole != 'undefined';\n\n// if we are running in testling then run the media tests\nif (isTestling) {\n require('./media');\n\n if (! detect.moz) {\n //... | javascript | edit | 0 | 0 | apache-2.0 | 794a671862448a52c437b8a75c4c29bebdbae228 | rtc-io/rtc-quickconnect,rtc-io/rtc-quickconnect | test/all.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nmodule.exports.Receiver = require( './lib/receiver' );\n\nmodule.exports.transports = {\n\treceivers: {\n\t\tExpress: require( './lib/transport.receiver.express' ),\n\t\tLocal: require( './lib/transport.receiver.loc... | javascript | edit | 0 | 5 | mit | 5589ab5cf11d02a6ba5dd888e18fbccef7787d56 | BlueRival/json-fling | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n/**\n * This file creates a `tsconfig.json` if it doesn't already exist.\n * tsconfig is the recommended method for configuring TypeScript.\n */\n\n/* global require process */\nconst exec = require('child_process... | javascript | edit | 0 | 0 | mit | faee60fb0d23cb78b016a01ec583be95b03cdf51 | wub/preact-cli-plugin-typescript | bin/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport const RUNNING = 'RUNNING';\n\nexport const START_LOAD_RUNTIME = 'START_LOAD_RUNTIME';\nexport const FINISH_LOAD_RUNTIME = 'FINISH_LOAD_RUNTIME';\nexport const FAIL_LOAD_RUNTIME = 'FAIL_LOAD_RUNTIME';\n\n```\n\nApply this change: ... | javascript | edit | 0 | 0 | apache-2.0 | 458b683a66b98ae454eac27e87a0d3951ffa9a44 | pcardune/pyret-ide,pcardune/pyret-ide | src/redux/action-types.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { addCallback } from 'meteor/vulcan:core';\nimport { Subscriptions } from './collection'\n\nasync function deleteOldSubscriptions(subscription) {\n const { userId, documentId, collectionName, type } = subscription\n Subscriptio... | javascript | edit | 0 | 1 | mit | 149635f3119a64373b38fae4e56fc93c2db54afc | Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope | packages/lesswrong/lib/collections/subscriptions/callbacks.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar path = require('path');\nvar argv = require('optimist').argv;\n\n// Load options into JS object.\nexports.options = JSON.parse(fs.readFileSync(path.resolve(__dirname,'../'+argv.optionsFile)));\n\n\n```\n\nAp... | javascript | edit | 0 | 0 | mit | 8b17519bcd20f691f94019be636eb474f6a1f706 | MisterTea/TidalWave,MisterTea/TidalWave,MisterTea/TidalWave,MisterTea/TidalWave,MisterTea/TidalWave,MisterTea/TidalWave | server/options-handler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport columnify from 'columnify';\nimport figures from 'figures';\nimport chalk from 'chalk';\n\nexport default function TextFormatter(errorsGroupedByFile) {\n const files = Object.keys(errorsGroupedByFile);\n\n const errorsText = fi... | javascript | edit | 0 | 3 | mit | 4abc3604fbe0d44e4a4a6222558613c906ca95ef | cjoudrey/graphql-schema-linter | src/formatters/text_formatter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports= {\n\tviews: [{\n\t\t\"name\": \"Raw Match Data\",\n\t\t\"view\": \"matches\"\n\t}],\n\t\n\tmatches: function (mongoCollection, callback) {\n\t\tmongoCollection.find().toArray(function (err, matches) {\n\t\t\tcallback([\n... | javascript | edit | 0 | 1 | bsd-2-clause | a5b314aa1c9a36f1311871b32ee6d94ec161cd29 | FRCteam4909/FRC-Scouting,FRCteam4909/FRC-Scouting,FRCteam4909/FRC-Scouting | config/views.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar express = require('express'),\n\tindex = require('./routes/index.js');\n\nvar app = express();\n\napp.get('/', index.get);\n\nvar server = app.listen(3000, function () {\n\n var host = server.address().address;\n ... | javascript | edit | 0 | 1 | mit | 0080f81ee471972876be9fe847f60da2c6f37fc0 | Zeikko/beating-forehead-vein-backend | app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Measurement from 'esri/dijit/Measurement';\nimport React, {\n Component,\n PropTypes\n} from 'react';\n\nexport default class InfoWindow extends Component {\n static contextTypes = {\n map: PropTypes.object.isRequired\n }\... | javascript | edit | 0 | 8 | mit | 69bdc2ba08689ea7065ca0f23eda0a3c840b4d89 | wri/gfw-mapbuilder,wri/gfw-mapbuilder,wri/gfw-mapbuilder | src/js/components/TabPanel/Measurement.js | rejected_duplicate | Near-duplicate of sample 100664 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (angular) {\n 'use strict';\n\n function FlotDirective(eehFlot, $interval) {\n return {\n restrict: 'AE',\n template: '<div class=\"eeh-flot\"></div>',\n scope: {\n ... | javascript | edit | 0 | 3 | mit | 8d4a96b8cff3e4ed82aeeb1679326da265b6d42b | ethanhann/eeh-flot | src/eeh-flot-directive.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction randomise ({\n count = 1,\n min = 0,\n max = 100,\n precision = 0,\n join = ', '\n}) {\n const delta = max - min\n const array = []\n let index = count\n while (index-- > 0) {\n const number = min + Math.random() * ... | javascript | edit | 0 | 2 | mit | 15ad543162ca1a06e321d96e6c46ab16fef07641 | cnlon/randomise | randomise.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst axios = require('axios')\nconst sharp = require('sharp')\n\nasync function fetchPostProcessedRadarFrame(url) {\n const data = await fetchRadarImage(url)\n return processImage(data)\n}\n\nasync function fetchRadarImage(url) {\n ... | javascript | edit | 0 | 4 | mit | 9c7befc18f142f1eed895257a099d3095f4f2f3e | heikkipora/sataako-fi,heikkipora/sataako-fi,heikkipora/sataako-fi,heikkipora/sataako-fi | src/fmi-radar-images.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar BlueprintClient = require('xively-blueprint-client-js');\n\nvar client = new BlueprintClient({\n authorization: process.env.BLUEPRINT_AUTHORIZATION\n});\n\nconsole.log('Client initialized with authorization >', process.env.BLUEPRIN... | javascript | edit | 0 | 0 | mit | 8ecca249abcc8f6ff4760ef3a3ee57486a6bdffe | Altoros/refill-them-api | modules/blueprint.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { onBlur } from \"../display/focus.js\"\nimport { on } from \"../util/event.js\"\n\n// These must be handled carefully, because naively registering a\n// handler for each editor will cause the editors to never be\n// garbage coll... | javascript | edit | 0 | 4 | mit | bf36d46f618163f7ee269bc8c7722513f5a9640c | wingify/CodeMirror,mtaran-google/CodeMirror,nightwing/CodeMirror,namin/CodeMirror,dperetti/CodeMirror,codio/CodeMirror,namin/CodeMirror,pabloferz/CodeMirror,notepadqq/CodeMirror,codio/CodeMirror,SidPresse/CodeMirror,hackmdio/CodeMirror,codio/CodeMirror,hackmdio/CodeMirror,thomasjm/CodeMirror,notepadqq/CodeMirror,nightw... | src/edit/global_events.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This require this file to load all the models into the \n// interactive note console\n\nprocess.env.NODE_ENV = 'development'\nrequire('coffee-script')\no = require('./models/organization')\nb = require('./models/badge')\nu = require(... | javascript | edit | 0 | 0 | mit | 412ee4ba7e2992fb0ed5e967f81cc436e1a16804 | EverFi/Sash,EverFi/Sash,EverFi/Sash | load_models.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar chai = require('chai');\nvar expect = chai.expect;\n\nvar Stats = require('lib/common/components/stats');\n\nvar ReadStream = require('lib/common/streams/read-stream');\nvar WriteStream = require('lib/common/stre... | javascript | edit | 0 | 3 | mit | 3ac6057a28b2f3d2e9cee0e663b10ac0d225d99f | fldubois/avfs | test/unit/specs/avfs/partials/members.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst r = require('./../../../db');\nconst config = require('config');\n\nconst check = id =>\n\tnew Promise((resolve, reject) => {\n\t\tr.table('registrations')\n\t\t\t.get(id)\n\t\t\t.run(r.conn, (err1, res) => {\n\t\t\t\tif (err1) {\... | javascript | edit | 0 | 3 | mit | 29ed8407f945a36d0c2ad41eebd48d4ac7ef29db | moustacheminer/discordmail,moustacheminer/discordmail | server/discord/utils/dmail/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport HouseholdService from '../services/HouseholdService'\n\nclass Household extends Component {\n constructor(props) {\n super(props)\n\n this.state = {\n name: ''\n }\n }\n ... | javascript | edit | 0 | 1 | mit | f112e257fb276be3003bf5cfa61aaa8b8811024a | cernanb/personal-chef-react-app,cernanb/personal-chef-react-app | src/components/Household.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// Service for the spec config.\n// We keep this separate so that changes are kept even if the spec changes.\nangular.module('vlui')\n .factory('Config', function() {\n var Config = {};\n\n Config.data = {};\n ... | javascript | edit | 0 | 2 | bsd-3-clause | a90e6f1f92888e0904bd50d67993ab23ccec1a38 | vega/vega-lite-ui,uwdata/vega-lite-ui,uwdata/vega-lite-ui,vega/vega-lite-ui,uwdata/vega-lite-ui,vega/vega-lite-ui | src/services/config/config.service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar padManager = require('../../db/PadManager');\nvar url = require('url');\n\nexports.expressCreateServer = function (hook_name, args, cb) {\n //redirects browser to the pad's sanitized url if needed. otherwise, renders the html\n ar... | javascript | edit | 0 | 3 | apache-2.0 | f6cebdad9813026b2909fadc4e43adcdc4d78b10 | University-of-Potsdam-MM/etherpad-lite,ether/etherpad-lite,2-B/etherpad-lite,joequant/etherpad-lite,tiblu/etherpad-lite,xavidotron/etherpad-lite,asac/etherpad-lite,aptivate/etherpad-lite,joequant/etherpad-lite,KonradMil/etherpad-lite,joequant/etherpad-lite,aptivate/etherpad-lite,webzwo0i/etherpad-lite,ether/etherpad-li... | src/node/hooks/express/padurlsanitize.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst activitiesByTimestamp = {\n // activityTimestamps: [1488058736421, 1488058788421, 1488058446421, 1488051326421, 1488051326555]\n 1488058736421: {\n text: \"hang at Golden Gate park 🍺\",\n },\n 1488078736421: {\n text: \... | javascript | edit | 0 | 0 | mit | 12c4395a7939f3b435060ce701fd9002c6be2d8f | mknudsen01/today,mknudsen01/today | src/sampleActivities.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\n\nlet version;\n\nmodule.exports = {\n Client: require('./client/Client'),\n Shard: require('./sharding/Shard'),\n ShardingManager: require('./sharding/ShardingManager'),\n Collection: require('./util/... | javascript | edit | 0 | 0 | apache-2.0 | cdf3136cde02d459d1c7e670afcb7217cb357f97 | robflop/discord.js,devsnek/discord.js,zajrik/discord.js,robflop/discord.js,aemino/discord.js,Lewdcario/discord.js,zajrik/discord.js,SpaceEEC/discord.js,appellation/discord.js,hydrabolt/discord.js,meew0/discord.js,aemino/discord.js,robflop/discord.js,hydrabolt/discord.js,Drahcirius/discord.js,Drahcirius/discord.js,CodeM... | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst notify = (events) => ({ dispatch }) => next => action => {\n const returnValue = next(action);\n events.forEach( event => {\n if (event.catch.indexOf(action.type) !== -1) {\n dispatch(event.dispatch());\n }\n });\n ... | javascript | edit | 0 | 5 | mit | f17b368d6b462bcde11948b3241fcffcba167df2 | zalmoxisus/redux-notify | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(function(require){\r\n\r\n var scene = new THREE.Object3D();\r\n var camera = new THREE.PerspectiveCamera(75, 16 / 9, 0.1, 5000);\r\n\r\n camera.position.set(0, 0, 5);\r\n camera.lookAt(new THREE.Vector3(0, 0, 0));\r\... | javascript | edit | 0 | 1 | mit | eb2724c64a6bf129bf70127bf3901535c89ba504 | Suva/AnotherAutumn,Suva/AnotherAutumn,Suva/AnotherAutumn,Suva/AnotherAutumn,Suva/AnotherAutumn | src/scene/BasicScene.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nprivacyOptions = { // true means exposed\n _id: true,\n commentCount: true,\n createdAt: true,\n email_hash: true,\n isInvited: true,\n karma: true,\n postCount: true,\n slug: true,\n username: true,\n 'profile.name': true,\n ... | javascript | edit | 0 | 0 | mit | 2af1f21d2496cb192973c27bff321527534e2c7c | Discordius/Telescope,simbird/Test,ahmadassaf/Telescope,zires/Telescope,rtluu/immersive,sharakarasic/telescope-coderdojola,Leeibrah/telescope,georules/iwishcitiescould,acidsound/Telescope,tepk/Telescope,simbird/Test,veerjainATgmail/Telescope,TribeMedia/Telescope,STANAPO/Telescope,Daz2345/Telescope,queso/Telescope,sophea... | lib/publications.js | rejected_duplicate | Near-duplicate of sample 94911 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.onload=function(){\nvar theNumber = _.random(1, 100);\nvar theList = $(\"#list\");\nvar theBanner = $(\"#triumph\");\n\n$(\"#submit\").click(function() {\n var theGuess = $(\"#guess\").val();\n $(\"#guess\").val(\"\");\n if (t... | javascript | edit | 0 | 3 | mit | f15b2e65c990436ab64da1d2f5506d4b5c127b02 | tdreid/Guezzmo,tdreid/Guezzmo | js/script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst uuidV4 = require('uuid/v4');\n\nclass SocketAdapter {\n constructor(uuid) {\n this.uuid = uuid;\n this.conn = {\n remoteAddress: `socket-adapter: ${this.uuid}`,\n };\n this.pair = null;\n this.callbacks = {};\... | javascript | edit | 0 | 2 | mit | dabbed7a84a8b40fefb8503234de2b2fdb58a338 | frostburn/panel-league,frostburn/panel-league | lib/api/socket-adapter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport scripts from './scripts';\nimport shortcut from './shortcut';\nimport setUserRequire from './require';\n\n\nmodule.exports = {\n scripts,\n setUserRequire,\n shortcut\n}\n```\n\nApply this change: Add log to module exports"
... | javascript | edit | 0 | 0 | mit | 6c28462ee6b375b005e4ed4b183f1c395bee55c6 | simonlovesyou/AutoRobot | src/js/client/util/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global angular */\n(function() {\n angular.module(\"googlechart\")\n .factory(\"agcScriptTagHelper\", agcScriptTagHelperFactory);\n\n agcScriptTagHelperFactory.$inject = [\"$q\"];\n function agcScriptTagHelperFactory(... | javascript | edit | 0 | 3 | mit | e24e3c50970cabb78acb6375fa8dceabb74fc06c | angular-google-chart/angular-google-chart,nbering/angular-google-chart,nbering/angular-google-chart,angular-google-chart/angular-google-chart | src/agcScriptTagHelper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport moment from 'moment';\n\nconst DefaultDateFormat = 'YYYY-MM-DD';\nconst DefaultTimeFormat = 'HH:mm:ss';\nconst DefaultDateTimeFormat = 'YYYY-MM-DD HH:mm:ss';\n\nexport default function renderDate(date, formFormat, displayFormat) ... | javascript | edit | 0 | 5 | mit | 4de767d8c6bd350dcba2f36339ad52f465b6c629 | cantonjs/re-admin,cantonjs/re-admin | src/utils/renderDate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nTemplate.notificationBadge.helpers({\n count: function () {\n // TODO: find a better way ?\n this._count = this._count || this.count;\n\n if (this.count !== this._count) {\n $('.notification-count')\n .css({ opacit... | javascript | edit | 0 | 3 | mit | c990c04bf6307c1fc36f30772574c7280d10398c | erasaur/notification-badge | lib/notification-badge.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe(\"Utilities\", function() {\n\tit(\"should get the domain\", function() {\n\t\texpect(getDomain('http://www.google.com')).toMatch('www.google.com');\n\t\texpect(getDomain('http://www.google.com/')).toMatch('www.google.com');\n\... | javascript | edit | 0 | 1 | mit | 7c92d068c2cb19663f3058b6d5f45b0fbd8a64bf | AntarcticApps/Tiles,AntarcticApps/Tiles | tests/spec/utilities.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n modules: false,\n presets: [\n [\"latest\", { es2015: { modules: false } }],\n \"es2015-rollup\",\n \"react\",\n \"stage-0\"\n ]\n};\n\n```\n\nApply this change: build: Fix issue with babel config err... | javascript | edit | 0 | 0 | mit | 074e2c12fede2c51d3757bb06d4d761b716af17e | chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs,skatejs/skatejs | config/babel.umd.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport MemoryFileSystem from 'memory-fs'\nimport tty from 'tty'\nimport path from 'path'\nimport webpack from 'webpack'\n\nexport default function plugin (config) {\n const compiler = webpack(config)\n compiler.outputFileSystem = new ... | javascript | edit | 0 | 3 | mit | 627a61ab32ac65ee0955c64f7f01209468c41cdd | elliottsj/metalsmith-plugin-webpack | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar bluebird = require('bluebird');\nvar fs = bluebird.promisifyAll(require('fs'));\nvar hljs = require('../../build');\nvar path = require('path');\nvar utility = require('../utility');\n\nfunction testA... | javascript | edit | 0 | 1 | bsd-3-clause | bca29aa0ce8043b1918688dd2a1dcfa0d2c9bae9 | CausalityLtd/highlight.js,lizhil/highlight.js,Sannis/highlight.js,StanislawSwierc/highlight.js,ehornbostel/highlight.js,krig/highlight.js,axter/highlight.js,weiyibin/highlight.js,robconery/highlight.js,kayyyy/highlight.js,0x7fffffff/highlight.js,adam-lynch/highlight.js,devmario/highlight.js,highlightjs/highlight.js,eho... | test/api/highlightAuto.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar debug = require('debug')('fundation:redis');\nvar Redis = require('ioredis');\n\n//\n// Redis\n//\nmodule.exports = function(app) {\n\n // Check if there is any configuration for Redis\n var serv... | javascript | edit | 0 | 2 | mit | c910d489215a0231ea626479057d71902f4a0758 | fundation/fundation | lib/redis.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe(\"The constructor is supposed a proper Captcha object\", function() {\n it('Constructor Captcha exists', function(){\n expect(Captcha).toBeDefined();\n });\n});\n\n```\n\nApply this change: Add test to chekc if cap... | javascript | edit | 0 | 1 | mit | d915a20733462e619234116bed5bc51ee121f60c | sonjahohlfeld/Captcha-Generator,sonjahohlfeld/Captcha-Generator | test/spec/test_captcha.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar R = require('ramda');\n\n\nfunction onPrClose() {\n\n}\n\nfunction writeSuccess(res, result) {\n res.send(':)');\n}\n\nfunction writeFailure(res, err) {\n res.send(':(');\n}\n\nfunction pullRequestRouteHandler(req... | javascript | edit | 0 | 3 | mit | dbb8974ac01d634eac952f5e927b98505bc76fff | rafkhan/the-clusternator,alanthai/the-clusternator,rafkhan/the-clusternator,rangle/the-clusternator,bennett000/the-clusternator,rangle/the-clusternator,alanthai/the-clusternator,rangle/the-clusternator,bennett000/the-clusternator,bennett000/the-clusternator | src/server/pullRequest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global document, $ */\n/* Project specific Javascript goes here. */\n\n/*\nFormatting hack to get around crispy-forms unfortunate hardcoding\nin helpers.FormHelper:\n\n if template_pack == 'bootstrap4':\n grid_colum_matcher... | javascript | edit | 0 | 2 | mit | e44d438f960df6931a547a83b9b6388ecf5a0ab6 | SaturDJang/warp,SaturDJang/warp,SaturDJang/warp,SaturDJang/warp | warp/static/js/project.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar chai = require('chai');\nvar expect = chai.expect;\nvar models = require('../server/db/models');\nvar request = require('request');\nvar localServerUri = 'http://127.0.0.1:3000/';\nvar GETUri = localServerUri + '?x=100.123456&y=-50.... | javascript | edit | 0 | 1 | mit | 36c13c4d4e7ffd312cbb1efa9ba881b3258a01a2 | scottdixon/uncovery,team-oath/uncovery,team-oath/uncovery,team-oath/uncovery,scottdixon/uncovery,scottdixon/uncovery,scottdixon/uncovery,team-oath/uncovery | specs/integration.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar autoprefixer = require('autoprefixer-core')\n , cssAid = require('css-aid/process')\n , cssAidRules = [require('css-aid/rules/variables')]\n , getFiles = require('./css-bundle-get-files');\n\nmodule.ex... | javascript | edit | 0 | 1 | mit | b6d0bc97db074b04123c0ab42c8f6e49a22e402b | egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations | server/css-bundle.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst webpack = require('webpack');\nconst banner = require('./banner');\n\nmodule.exports = {\n entry: './src/api/v4/index.js',\n output: {\n path: path.resolve(__dirname, '../dist/public'),\n fil... | javascript | edit | 0 | 0 | bsd-3-clause | 71e4557ac4e36f717b5e8d3da394ca6b18ca4f37 | splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js | webpack/webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar $ = require('jquery');\n\nmodule.exports = function(namespace) {\n var toggleSelector = '[data-' + namespace + '-toggle]';\n var openClass = namespace + '--open';\n\n var body = $(document.body).addClass(namespace);\n\n ... | javascript | edit | 0 | 3 | mit | d516cc28ca767dda67179798711494d26ba1c197 | dotsunited/off-canvas-navigation,dotsunited/off-canvas-navigation | lib/setup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport _ from '../wrap/lodash'\nimport isMatcher from '../matchers/is-matcher'\nimport * as stringifyObject from 'stringify-object-es5'\n\nexport default (anything) => {\n if (_.isString(anything)) {\n return stringifyString(anythin... | javascript | edit | 0 | 5 | mit | cca37003d0931d4f446eb8c80e18a31fa35fd4e0 | testdouble/testdouble.js,testdouble/testdouble.js,testdouble/testdouble.js | src/stringify/anything.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\napp.filter('dashcase', function () {\n\n return function (input) {\n\n input = input.replace(/\\s+/g, '-')\n .toLowerCase()\n .replace('ä', 'ae')\n .replace('ö', 'oe')\n .replace('ü', 'ue')\n .replace('ß', '... | javascript | edit | 0 | 1 | mit | a3f1459bbfd7edaad9eefc4c64306a85c85b2f3d | stekhn/portfolio,stekhn/portfolio,stekhn/portfolio | src/script/components/dashcaseFilter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as actionTypes from \"../../src/actions/types\";\nimport exampleReducer from \"../../src/reducers/example-reducer\";\n\ndescribe(\"exampleReducer\", () => {\n test(\"initial state\", () => {\n expect(exampleReducer(undefine... | javascript | edit | 0 | 1 | mit | 80e7eebae4772ee6659330e36f515f70430133a9 | tiere/react-starter,tiere/react-starter | test/reducers/example-reducer.test.js | rejected_duplicate | Near-duplicate of sample 71003 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport Dialog from 'material-ui/lib/dialog';\nimport FlatButton from 'material-ui/lib/flat-button';\nimport RaisedButton from 'material-ui/lib/raised-button';\n\n// NOTE: For emit `onTouchTap` ... | javascript | edit | 0 | 1 | mit | 248c21e5d391ef985b7aab2992f3237234b8054f | mgi166/usi-front,mgi166/usi-front | frontend/components/modals/promoteModal.js | rejected_duplicate | Near-duplicate of sample 97974 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * fullcalendar-rightclick v1.1\n * Docs & License: https://github.com/mherrmann/fullcalendar-rightclick\n * (c) 2015 Michael Herrmann\n */\n\n(function($) {\n\tvar fc = $.fullCalendar;\n\tvar AgendaView = fc.views.agenda;\n\tvar o... | javascript | edit | 0 | 2 | mit | c2cecbfa182b27d93a4c40a602d97ee77ef5949d | mherrmann/fullcalendar-rightclick,mherrmann/fullcalendar-rightclick | fullcalendar-rightclick.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular.module('pub.security.authentication', [])\n\n .factory('authentication', [\n '$q',\n '$http',\n 'securityContext',\n function($q, $http, securityContext) {\n\n va... | javascript | edit | 0 | 2 | mit | 15df3d995d8177651d0806e26f000b85bebd1ce4 | carlospaelinck/publications-js,carlospaelinck/publications-js | client/js/src/security/authentication.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nvar context = {/* user id */};\n//TODO: Replace with node-cache\n\n/*Example:\n{\n command: '/track',\n stage: 'askForTrack',\n parameters: [\n 'Mike Oldfield'\n ]\n}\n*/\n\ncontext.save = function (us... | javascript | edit | 0 | 2 | mit | 5244b12616b2c7546d6d78f7914b22a15961a3e0 | TheBeastOfCaerbannog/last-fm-bot | modules/contextStorage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'extensions/views/single_stat'\n],\nfunction (SingleStatView) {\n var NumberView = SingleStatView.extend({\n\n changeOnSelected: true,\n labelPrefix: '',\n\n formatValue: function(value) {\n return this.format... | javascript | edit | 0 | 3 | mit | ffabc205276183238c8d6dc1676724508a035c8d | tijmenb/spotlight,alphagov/spotlight,alphagov/spotlight,keithiopia/spotlight,keithiopia/spotlight,alphagov/spotlight,tijmenb/spotlight,tijmenb/spotlight,keithiopia/spotlight | app/common/views/visualisations/volumetrics/number.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as actType from './action-types';\n\nconst initialState = {\n loadingApi: undefined,\n runtimeApi: undefined,\n};\n\nfunction loadApi(state = initialState, action) {\n switch (action.type) {\n case actType.START_LOAD_RUNT... | javascript | edit | 0 | 4 | apache-2.0 | a5164cf372f181da57ce972a5de8e3a91e2f4a5d | pcardune/pyret-ide,pcardune/pyret-ide | src/redux/reducer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {validate_request} from '../utils/errors'\nimport express from 'express'\n\nfunction validate_request_body(request, response, next_handler) {\n request.checkBody({\n 'screen_name': {\n notEmpty: {\n errorMessage: ... | javascript | edit | 0 | 1 | mit | 968ef346f21ebe8048feb1c725c0c31fd77879c1 | thewizardplusplus/vk-group-stats,thewizardplusplus/vk-group-stats | src/routers/group_router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Pascal's triangle is defined as the rth column of the nth row is n! / ( r! x (n - r)!)\n *\n * @param {Integer} n\n * @return {Array} int array where each value represents a level in the triangle.\n */\nfunction pascalsTriangle(... | javascript | edit | 0 | 4 | mit | 625ba111d23a074c638df40b95c21fa9c36a5868 | vinnyoodles/algorithms,vinnyoodles/algorithms,vinnyoodles/algorithms | src/recursion/pascalsTriangle.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst vuedoc = require('../..')\n\n/* global describe it expect */\n\ndescribe('issues', () => {\n describe('#21 - undefined default value is rendering as a non string', () => {\n it('undefined default value is rende... | javascript | edit | 0 | 1 | mit | 66d004e2b1f4fb5a269587519bb4a47b25935648 | vuedoc/md,vuedoc/md | test/specs/issues.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar exec = require('child_process').exec;\n\nvar dbconfig = require(process.cwd() + '/config/database');\nvar envconfig = dbconfig[process.env.FP_NODE_ENV];\n\nif (!envconfig) throw('invalid environment variable'... | javascript | edit | 0 | 2 | bsd-3-clause | 04984d3ca2479e98cdec679d707d129eeb30af60 | codeforamerica/fast_pass | db/create.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar assert = require(\"assert\");\nvar parseApk = require(\"..\");\n\ndescribe(\"APK V24\", function () {\n var output = null;\n\n before(function (done) {\n parseApk(__dirname + \"/samples/test_v24.apk\", function (err, ou... | javascript | edit | 0 | 2 | mit | 7e6b7463cb3c6a81d32f8bbb3d4a5af0dad57737 | rubenv/node-apk-parser | test/apk_test_v24.js | rejected_duplicate | Near-duplicate of sample 87084 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global describe, it */\n/*exported should */\n/*jshint -W030 */\n\nvar should = require('should'),\n supertest = require('supertest'),\n app = require('../app');\n\ndescribe('notSupported', function() {\n\n it('should not suppo... | javascript | edit | 0 | 1 | apache-2.0 | ac87ce6e6055531f6e33a8def6014be7ad53f44b | joshco/osdi-service,NGPVAN/osdi-service | test/notSupported.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Error\n *\n * @constructor\n */\nvar ValidationError = function() {\n this.length = 0;\n};\n\nValidationError.prototype.push = function(item) {\n this[this.length] = item;\n this.length += 1;\n};\n\n/**\n * GetProperties\n */... | javascript | edit | 0 | 1 | mit | 14db900ae0d48c8b80f9089bcc6192f229a2ec91 | Baggz/Amanda,apiaryio/Amanda,apiaryio/Amanda | src/engines/json/validationError.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module(\"hikeio\").\n\tdirective(\"giveFocus\", [\"$timeout\", function($timeout) {\n\treturn {\n\t\tlink: function(scope, element, attributes) {\n\t\t\tscope.$watch(attributes.giveFocus, function(value) {\n\t... | javascript | edit | 0 | 2 | mit | bfe5961922d3b73e1f3dfef126bab4c0064a8afd | zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io | client/js/directives/give-focus-directive.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.