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 * Flag indicating if the client supports touch events.\n * \n * @returns {Boolean} <em>true</em> if have touch support\n * @preserve\n */\nsn.hasTouchSupport = (function() {\n\tif ( !(global && global.document) ) {\n\t\treturn fal...
javascript
edit
0
5
apache-2.0
79924bfd5429029b7ab7943bbbd9ac67182bb0e0
SolarNetwork/solarnetwork-d3,SolarNetwork/solarnetwork-d3
src/core/touch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Promise = require('es6-promise').Promise;\n\nmodule.exports = {\n init: function(url) {\n createIframe(url)\n .then(sendHandshake);\n }\n};\n\nfunction createIframe(url) {\n var iframe = document.createElement('iframe')...
javascript
edit
0
2
mit
c4fbfd51a6281efa61bfa0cff69ee9d6f3c152a6
igoratron/iframe-api
lib/client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport DS from 'ember-data';\nimport _ from 'npm:lodash';\n\nvar Feed = DS.Model.extend({\n\tonestop_id: Ember.computed.alias('id'),\n\toperators: DS.hasMany('operator', { async: true }),\n\turl: DS.attr('str...
javascript
edit
0
0
mit
d31252d2335c1f4a66a27e068fc32c87ed2b52e2
transitland/feed-registry,transitland/feed-registry
app/feed/model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name\t\t InfernoShoutMod Dev\n// @namespace\t http://rune-server.org/\n// @include *.rune-server.org/forum.php\n// @include *.rune-server.org/infernoshout.php?do=detach\n// @version\t\t1\n// ==/UserScri...
javascript
edit
0
0
isc
9f45ec003be871fc1f79264eb2936638baba76d8
nikkiii/infernoshoutmod,nikkiii/infernoshoutmod
infernoshoutmod.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport function signUp(name, email, password) {\n return fetch('/api/user', {\n method: 'POST',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ name,...
javascript
edit
0
1
mit
6631e9734e40a90df936cf0778bbe3c407878f1e
orouvinen/mytype-frontend,orouvinen/mytype-frontend
src/fetch/auth.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports.extend = function(constructor, parent) {\n constructor.prototype = Object.create(parent.prototype);\n constructor.prototype.constructor = constructor;\n};\n\nvar utils = {};\n\nutils.extend = function(constructor, paren...
javascript
edit
0
4
mit
7382b2af070e4b3210bd378242483058ce5f98f0
jnsmalm/jsplay,jnsmalm/jsplay
lib/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Db = require('../');\n\nmodule.exports = Db;\n\nrequire('./row');\n\nDb.prototype.set('toDOMFieldset', function (document/*, options*/) {\n\tvar options = Object(arguments[1]), names, container, rows, body;\n\n\tif ...
javascript
edit
0
4
mit
1ca4cbf376d39c152cb6b2680f777985bd03cea3
medikoo/dbjs-dom
input/utils/fieldset.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/////////////////////////////////\n// Dropbox injection functions //\n/////////////////////////////////\n\nDropbox.appKey = \"8oj6dw6o6urk6wn\";\n\nfunction addDropboxScriptTag() {\n $(\"head\").append('<script type=\"text/javascript\"...
javascript
edit
0
1
mit
d4bad6943f16db6d651725dd39df7974549cf245
Speenah/rit-mycourses-file-downloader
js/injector.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst FaviconsWebpackPlugin = require('favicons-webpack-plugin');\n\nmodule.exports.onCreateWebpackConfig = ({ actions, stage }, { logo, icons = {}, title, background }) => {\n if (stage === 'develop-html' || stage === 'build-html') {\...
javascript
edit
0
5
mit
2c5954d3964bbab33cb381037604d37db7bf4f6b
Creatiwity/gatsby-plugin-favicon
gatsby-node.js
rejected_duplicate
Near-duplicate of sample 90190
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst rawPathToEs6KataLink = (path) => {\n return `http://tddbin.com/#?kata=es6/language/${path}`;\n};\n\nexport default class Kata {\n \n static fromRawItem(rawItem) {\n let kata = new Kata();\n kata.initializePropertiesFromRa...
javascript
edit
0
1
mit
ee7d89a16ccea59a675a7ba1afbf5707a4521f3b
tddbin/es6katas.org
src/kata.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n---\n---\n$(document).ready(function() {\n 'use strict';\n\n // Navbar\n // =======================================================\n const header = $('.header');\n const navbar = $('.navbar-profile');\n const range = 64; // Heigh...
javascript
edit
0
3
mit
694ae32b7f74402bddd4d14e8f2b492776e6c66b
grantmakers/profiles,grantmakers/profiles,grantmakers/profiles
assets/js/profile-index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet serverless\n\nexport async function setup(options) {\n const { servicePath } = options\n\n if (RUN_TEST_AGAINST_AWS) {\n return\n }\n\n // require lazy, AWS tests will execute faster\n const { default: Serverless } = await i...
javascript
edit
0
2
mit
503fc48217ebb38e8d69d858a7e51aa953929225
dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline
tests/integration/_testHelpers/setupTeardown.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('dotenv').config();\n\nvar path = require('path');\nvar express = require('express');\nvar passport = require('passport');\n\nvar authRouter = require('./routes/auth');\n\n\n// Create a new Express application.\nvar app = expres...
javascript
edit
0
1
unlicense
a57f7e9e4e64740c5207d691c5cfb4d62df9381a
passport/express-4.x-facebook-example,passport/express-4.x-facebook-example
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { Provider } from 'react-redux';\nimport { Router } from 'react-native-router-flux';\n\nimport setup from './store/setup';\nimport scenes from './scenes';\n\nglobal.isDebuggingInChrome =...
javascript
edit
0
2
mit
23438dd73bce70df44dde2874113ce8961505acd
teamfa/react-native-starter-app,teamfa/react-native-starter-app,teamfa/react-native-starter-app
src/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n\tconfig.set({\n\n\n\t\tbasePath: '',\n\t\tfiles: [\n\t\t\t'vendor/angular/angular.js',\n\t\t\t'vendor/angular-animate/angular-animate.js',\n\t\t\t'vendor/angular-mocks/angular-mocks.js',\n\t\t\t'dis...
javascript
edit
0
1
mit
3e5afa07ed9d94a1c607c0dff8355c157d6cded1
sebald/ed,mps-gmbh/ed,sebald/ed,mps-gmbh/ed,mps-gmbh/ed,sebald/ed
karma-unit.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nlet fileExists = require('../utils').fileExists;\nlet output = require(\"../output\");\nlet fs = require('fs');\nlet path = require('path');\nlet colors = require('colors');\n\nmodule.exports.getTestRoot = function (curre...
javascript
edit
0
4
mit
f90e02e8e62807d1b22698ec57fcb08281e33834
Codeception/CodeceptJS,Codeception/CodeceptJS,Codeception/CodeceptJS,Shullaca1/Teste-do-CdB,williammizuta/CodeceptJS,williammizuta/CodeceptJS,Nighthawk14/CodeceptJS,Nighthawk14/CodeceptJS,Shullaca1/Teste-do-CdB,williammizuta/CodeceptJS,Shullaca1/Teste-do-CdB
lib/command/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport AppDispatcher from '../dispatchers/app-dispatcher';\nimport {products} from '../lib/sprintly-client';\n\nlet ItemActions = {\n addItem(productId, data) {\n let product = products.get(productId);\n\n if (!product) {\n ...
javascript
edit
0
3
isc
8ce1c294cfc87ba18d743cf14801843cc112a0b4
jeffreymoya/sprintly-kanban,whitebird08/sprintly-kanban,sprintly/sprintly-kanban,pipermerriam/sprintly-kanban,florapdx/sprintly-kanban,florapdx/sprintly-kanban,sprintly/sprintly-kanban,datachand/sprintly-kanban,whitebird08/sprintly-kanban,datachand/sprintly-kanban,pipermerriam/sprintly-kanban,jeffreymoya/sprintly-kanba...
app/actions/item-actions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction hasTypeNumber(numberToCheck) {\n return typeof numberToCheck === 'number';\n}\n\nmodule.exports = {\n\n isNumeric: function isNumeric(numberToCheck) {\n if(!hasTypeNumber(numberToCheck)) {\n ...
javascript
edit
0
3
mit
db90a78b8cc5fc0f30e2ae88ff58165ea8714d4f
lxanders/belt
lib/number.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nApp.FlashMessage = Ember.Object.extend({\n type: 'notice',\n dismissable: true,\n message: null,\n\n isNotice: function(){\n return this.get('type') == 'notice';\n }.property('type'),\n\n isWarning: function(){\n return this...
javascript
edit
0
0
mit
7e38fce931f119035c611825a4c923a59b5a43f9
aackerman/ember-flash-queue
lib/flash-message.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar BigNumber = require(\"bignumber.js\");\n\nclass ErlNumber {\n constructor(value) {\n this.value = new BigNumber(value);\n }\n\n toString() {\n return this.value.toString();\n }\n\n static isErlNumber(erl...
javascript
edit
0
2
mit
6946908ae19972853902e2e0aaf01f35b18731b8
Vereis/jarlang,Vereis/jarlang
src/prefabs/datatype_number.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst mongoose = require('mongoose');\nconst Schema = mongoose.Schema;\n\nconst studentSchema = new Schema({\n fname: String,\n lname: String,\n csub_id: Number,\n gender: String,\n created_at: Date,\n evaluations: [\n {\n ...
javascript
edit
0
0
mit
96e350cb21377ca65d0c05ae63f37416fa0b0f65
corykitchens/gaus,corykitchens/gaus
models/student.model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Stubby Chaos Money Demo Module\n */\n\nvar StubbyChaosMonkey = function() {\n\n /* min is inclusive, and max is exclusive */\n var getRandomArbitrary = function(min, max) {\n return Math.random() * (max -...
javascript
edit
0
3
mit
f3cc961adfdaacfa43b2bc6349a389679f14740e
gocardless/stubby,gocardless/stubby,gocardless/stubby
modules/chaos-monkey.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar crypto = require('crypto');\nvar iv = new Buffer(\"\");\n\nfunction createCryptor(key) {\n key = new Buffer(key);\n return function encrypt(data) {\n var cipher = crypto.createCipheriv(\"bf-ecb\", key, iv);\n try...
javascript
edit
0
2
mit
046b30842e00b37d8b30c899b7af06b76a7b4434
dlom/anesidora
encryption.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction faceCaptures(state = [], action) {\n switch (action.type) {\n case 'FACE_CAPTURE':\n return [action.data, ...state]\n default:\n return state\n }\n}\n\nfunction documentCaptures(state = [], action) {\n switch...
javascript
edit
0
3
mit
364541ae389891a27d7e1b2a87c9e37e25f50bae
onfido/onfido-sdk-core
src/store/reducers/captures.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n extends: [\n 'onelint'\n ],\n plugins: ['import'],\n rules: {\n 'import/no-extraneous-dependencies': [\n 'error', {\n devDependencies: [ '**/test/**/*.js' ],\n ...
javascript
edit
0
0
mit
1de65779516311c98f38f9c77bb13cab2716e5f6
alexjeffburke/unexpected,unexpectedjs/unexpected,alexjeffburke/unexpected
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { View } from 'react-native';\n\nimport { computePosition, styles } from './ContextMenu';\n\n/**\nSimplified version of ContextMenu without animation.\n*/\nexport default class NotAnimatedContextMenu e...
javascript
edit
0
1
isc
25158df23cfefb8c770da68393e8229a3b5ee39f
instea/react-native-popup-menu
src/renderers/NotAnimatedContextMenu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* boilerUtils\n * This object holds functions that assist Boilerplate\n */\n\nvar boilerUtils = {}\n\nboilerUtils.renderAction = function renderAction (action) {\n return {\n 'string': altboiler.getTemplate,\n 'function': action...
javascript
edit
0
2
mit
a894ec199d6335794110b6b54d5b63583bc80da7
Kriegslustig/meteor-altboiler,Kriegslustig/meteor-altboiler
lib/boilerUtils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport Helmet from 'react-helmet'\nimport { graphql } from 'gatsby'\nimport Layout from '../components/Layout'\nimport PostTemplateDetails from '../components/PostTemplateDetails'\n\nclass PostTemplate extends...
javascript
edit
0
2
mit
f771deccadd644e2f79ff975fcb594c3639265c7
schneidmaster/schneid.io,schneidmaster/schneid.io
src/templates/post-template.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst baseUrl = 'http://www.spc.noaa.gov/climo/data/nglsr/data/rpts/';\nconst Promise = require('bluebird');\nconst request = Promise.promisifyAll(require('request'));\nconst co = require('co');\n\nmodule.exports = func...
javascript
edit
0
2
isc
b6045a736c4bcaaa3b6999cbc318b6033acc5d4b
jcharrell/node-spc-storm-reports
src/lib/reports-request.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst fs = require('fs')\nconst { resolve } = require('url')\nconst escapeHTML = require('escape-html')\n\nmodule.exports = createDustRenderer\n\nfunction createDustRenderer () {\n const dust = require('dustjs-linkedin'...
javascript
edit
0
3
mit
fddc78d8eff0e21b790cdb85a17f3c7406cd6f76
domachine/penguin,domachine/penguin
lib/dust_driver.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar walk = require('dom-walk')\n\nvar FormData = require('./index.js')\n\nmodule.exports = getFormData\n\nfunction buildElems(rootElem) {\n var hash = {}\n if (rootElem.name) {\n \thash[rootElem.name] = rootElem\n \treturn h...
javascript
edit
0
2
mit
e5a2221ec332ba1f3cd2fc8888770bdf31e9b851
Raynos/form-data-set
element.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\no_.capitaliseFirstLetter = function(string){\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\no_.lowerFirstLetter = function(string){\n if(!string) return;\n return string.charAt(0).toLowerCase() + string.slice...
javascript
edit
0
2
mit
a107b97aca1d6346811f4fba3bd2cc0dcded2dff
carlbror/political-works,carlbror/political-works
lib/helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar\n moment = require('moment'),\n sprintf = require('sprintf'),\n fsr = require('file-stream-rotator');\n\nfunction create_logger (streamConfig) {\n\n streamConfig = streamConfig || {\n filename: './log/activity.log',\n ...
javascript
edit
0
4
mit
60ba23f69ee6e7997f58c303fe3d9fbb34d01f62
jasonlotito/fsr-logger
fsr-logger.js
rejected_duplicate
Near-duplicate of sample 70714
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar Objectid = mongoose.Schema.Types.ObjectId;\n\nvar BookingSchema = new Schema({\n\troom: Objectid,\n\tstart_time: Date,\n\tend_time: Date,\n\ttitle: St...
javascript
edit
0
3
mit
4061d46dcfb7c33b22e8f1c50c76b507f596dd7a
10layer/jexpress,j-norwood-young/jexpress,j-norwood-young/jexpress,10layer/jexpress,j-norwood-young/jexpress
app/models/booking_model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport preloadDataMixin from '../mixins/preload_data';\n\nexport default Ember.Route.extend(preloadDataMixin, {\n cordova: Ember.inject.service(),\n\n beforeModel() {\n Ember.run(() => this.controllerFor...
javascript
edit
0
5
mit
26fcc3c6876a1ce783892bece78245609ce6d5d0
crossroads/shared.goodcity,crossroads/shared.goodcity
app/routes/post_login.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// window.checkAdLoad = function(){\n// var checkAdLoadfunction = function(){\n// var msg = \"Ad unit is not present\";\n// if($(\"._teraAdContainer\")){\n// console.log(\"Ad unit is present\")\n// msg = \"Ad unit ...
javascript
edit
0
2
mit
0b79ce4530ac5b3a98883e06ba1bf0e2434aa598
hoverr/hoverr.github.io,hoverr/hoverr.github.io
js/myscript.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport AsyncQueue from '../utils/asyncQueueStructures';\n\nlet asyncQueue = new AsyncQueue();\n\nconst endAsync = () => ({ type: 'ASYNC_INACTIVE' });\n\nconst startAsync = () => ({ type: 'ASYNC_ACTIVE' });\n\nconst callAsync = (dispatch...
javascript
edit
0
2
mit
19288160ef71d34f48a424eaea3055cc0cc14c93
ivtpz/brancher,ivtpz/brancher
app/actions/asyncActions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2015-present, Joshua Hollenbeck\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.\n */\nconst RefraxR...
javascript
edit
0
2
bsd-3-clause
4e5f184a89eaa1d58361e178bf7a26e23d9c36fb
netarc/refrax,netarc/refrax
src/resource/RefraxMutableResource.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie\n\nconsole.log('Any cookies yet? ' + document.cookie);\n\nconsole.log('Setting a cookie...');\n\ndocument.cookie = 'something=somethingelse';\n\nconsole.log('OK set one...
javascript
edit
0
2
mit
fa8fa16839f3ff5185fe74c83b75aacc9023155c
oldhill/oldhill.github.io,oldhill/oldhill.github.io
js/cookies.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n/**\n * to_tree(source[, root = null]) -> array\n * - source (array): array of sections\n * - root (mongodb.BSONPure.ObjectID|String): id of common root for result first level.\n *\n * Build sections tree (nested)...
javascript
edit
0
5
mit
c2091a31f778f4a3ca0894833bb4ca07a599ca81
nodeca/nodeca.forum
lib/to_tree.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
0476ef142043c2cbb7bb74dc4994d18f5ab4376e
vega/vega-lite-ui,uwdata/vega-lite-ui,vega/vega-lite-ui,uwdata/vega-lite-ui,uwdata/vega-lite-ui,vega/vega-lite-ui
src/services/config/config.service.js
rejected_duplicate
Near-duplicate of sample 102467
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\r\n $.get(\"includes/header.html\", function(data) {\r\n $('body').prepend(data);\r\n });\r\n $(\"#footer\").load(\"includes/footer.html\");\r\n})\n```\n\nApply this change: Add active class to current pag...
javascript
edit
0
1
mit
ef4f7975c56c9c7adcaa213e99e394c035f1dd71
Skramdhanie/softwarecareers,Skramdhanie/softwarecareers,Skramdhanie/softwarecareers
js/includes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Vue from 'vue';\nimport Vuetify from 'vuetify';\n\nVue.use(Vuetify);\n\nconst csrf = global.document.createElement('input');\ncsrf.name = 'csrfmiddlewaretoken';\ncsrf.value = 'csrfmiddlewaretoken';\nglobal.document.body.append(cs...
javascript
edit
0
1
mit
7000f6dfd23da27fdb4c6b73a03a672f04abf271
DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation
jest_config/setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire.config({\n paths: {\n \"knockout\": \"ext/knockout-2.1.0\",\n \"jquery\": \"ext/jquery-1.7.2.min\",\n \"text\": \"ext/text\",\n \"codemirror\": \"ext/CodeMirror\",\n \"bootstrap\": \"ext/boo...
javascript
edit
0
6
mit
2ba30de598892d4c5667d26f3ca4f94652c849c2
rniemeyer/SamplePresentation,rniemeyer/SamplePresentation
js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n name: 'Unit test',\n testMatch: ['**/packages/**/__tests__/?(*.)+(spec|test).js'],\n transform: {},\n};\n\n```\n\nApply this change: Fix jest hast map issue with .cache folder in examples\n\nSigned-off-by: Alexan...
javascript
edit
0
0
mit
4d5177898b73b95b304a39c2934201aefdc4ef26
wistityhq/strapi,wistityhq/strapi
jest.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable no-param-reassign */\n\nimport Vue from 'vue';\n\nexport default {\n namespaced: true,\n\n state: {\n username: null,\n },\n\n mutations: {\n setUsername(state, username) {\n state....
javascript
edit
0
3
mit
a89cef0ab9d51aeffb5c016cb56539fac275171e
contao/package-manager
src/store/auth.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nGittip.upgrade = {};\n\nGittip.upgrade.init = function () {\n\n var userAgent = navigator.userAgent.toLowerCase();\n var browser = (userAgent.indexOf('msie') != -1) ? parseInt(userAgent.split('msie')[1]) : -1;\n\n if(browser !=...
javascript
edit
0
1
mit
2e59b255d81ab6bf6eb3a2431cd78d3a5f265144
mccolgst/www.gittip.com,gratipay/gratipay.com,mccolgst/www.gittip.com,eXcomm/gratipay.com,mccolgst/www.gittip.com,eXcomm/gratipay.com,gratipay/gratipay.com,mccolgst/www.gittip.com,studio666/gratipay.com,gratipay/gratipay.com,studio666/gratipay.com,eXcomm/gratipay.com,eXcomm/gratipay.com,studio666/gratipay.com,studio666...
js/gittip/upgrade.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet express = require('express');\n\nlet router = require('./router.js');\nlet createDatabaseManager = require('./models/dbManager.js');\nlet ClientError = require('./errors.js').ClientError;\n\n\nconst dbUrl = 'mongodb...
javascript
edit
0
2
bsd-3-clause
1ac7400520c35c47b27c311fad3a15887f8cb2d5
cdunklau/athenicpaste
athenicpaste/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base')\n , cursor = Base.cursor\n , color = Base.color;\n\n/**\n * Expose `TAP`.\n */\n\nexports = module.exports = TAP;\n\n/**\n * Initialize a new `TAP` reporter.\n *\n * ...
javascript
edit
0
1
mit
33d33c639ee78ff0877127b9c03fc9f842f83440
nexdrew/mocha,tinganho/mocha,kevinburke/mocha,jbnicolai/mocha,duncanbeevers/mocha,outsideris/mocha,ajaykodali/mocha,GabrielNicolasAvellaneda/mocha,rstacruz/mocha,antoval/mocha,jbnicolai/mocha,geometrybase/mocha,pandeysoni/mocha,igwejk/mocha,adamgruber/mocha,GerHobbelt/mocha,tswaters/mocha,adamgruber/mocha,TimothyGu/moc...
lib/reporters/tap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction min(a, b) {\n return a < b ? a : b;\n}\n\nconsole.log(min(0, 10));\nconsole.log(min(0, -10));\n\n```\n\nApply this change: Add chapter 3, exercise 1" }, { "role": "assistant", "content": "function min(a, b) {\n\t...
javascript
edit
0
2
mit
087fe83fd227c9700ca4dc0e9248103406617937
bewuethr/ctci
eloquent_js/chapter03/ch03_ex01.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport React from 'react'\nimport {TouchableOpacity, View, FlatList} from 'react-native'\n\nexport default class NodeView extends React.PureComponent {\n\n componentWillMount = () => {\n let rootChildren = this.props....
javascript
edit
null
null
mit
17caa86e56c41bc5ce4092b1162b6cc5a12aa95f
fjmorant/react-native-nested-listview,fjmorant/react-native-nested-listview,fjmorant/react-native-nested-listview
example/nestedListView/NodeView.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports =\n{\n\tbase_name\t\t: 'sms',\n\taction_name\t\t: 'sms/{id}',\n\n\tsend: function() {\n\t\treturn this.action(...arguments);\n\t},\n\n\tgetResponses: function(/* dynamic */) {\n\t\tvar params = this.parse...
javascript
edit
0
1
mit
5448e753590a58ac4fc2340a4cfb0798a54e494b
quiubas/quiubas-node
lib/sms.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar background= __dirname+'/../background';\nvar map= {\n localhost: background\n ,'127.0.0.1': background\n}\n\nexports= module.exports= {\n lookup: function() {\n return map[this.host.name]\n }\n ,paths: [background]\n}\n\n...
javascript
edit
0
1
mit
e3c4841a8552ea180ccfd9c241b6a3bf7382f200
randymized/malifi
test/fixtures/common/_sites.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (karma) {\n let configuration = {\n basePath: '.',\n frameworks: ['mocha'],\n files: [\n { pattern: 'node_modules/chai/chai.js', include: true },\n 'src/*.js',\n 'spec/*.js'\n ],\n ...
javascript
edit
0
2
mit
1f88eb60f6f12d0b01f3902ca22cd6964eac7e72
antivanov/sniffr
karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst xRegExp = require('xregexp');\n\n/**\n * Wrapper for xRegExp to work around\n * https://github.com/slevithan/xregexp/issues/130\n */\nmodule.exports = (regexp, flags) => {\n if (!flags || !flags.includes('x')) {\n // We aren't...
javascript
edit
0
1
mit
c43f5346480d1f92f95ee495d31dd61940d453d7
trotzig/import-js,trotzig/import-js,trotzig/import-js,Galooshi/import-js
lib/xregexp.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport Receipt from './Receipt';\nimport ReceiptsList from './ReceiptsList';\nimport './App.css';\nimport 'bootstrap/dist/css/bootstrap.min.cs...
javascript
edit
0
1
mit
13d00833dfe4386847599ab1e827eebc9030f120
Ramp-Receipts/Ramp,Ramp-Receipts/Ramp
client/src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\n\nmodule.exports = function(opts) {\n this.options = opts;\n\n if (!opts.handlebars) this.options.handlebars = require('handlebars');\n\n if (opts.template) {\n var fileData = fs.readFileSync(this.options....
javascript
edit
0
4
mit
4d6139bcd9af2b8acd02343330bbbe74bbe7a7a1
spacedoc/spacedoc,gakimball/supercollider,spacedoc/spacedoc
lib/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Joi from 'joi';\nimport jsonServerConfig from 'config/server.json';\nimport schema from './schema.js';\n\nclass ServerConfig {\n constructor() {\n this._jsonConfig = jsonServerConfig;\n\n /**\n * Validate the JSON conf...
javascript
edit
0
2
mit
e5d4685e2aec3c40253a62f75b1266024ad3af2f
LuudJanssen/plus-min-list,LuudJanssen/plus-min-list,LuudJanssen/plus-min-list
src/server/config/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst RateLimit = require('express-rate-limit');\nconst RedisStore = require('rate-limit-redis');\nconst logger = require('../../logger').policy;\n\nmodule.exports = (params) => {\n if (params.rateLimitBy) {\n params.keyGenerator = ...
javascript
edit
0
2
apache-2.0
1f2dac22c64a768aac02f2b9a1246dfcb9e9d75a
ExpressGateway/express-gateway
lib/policies/rate-limit/rate-limit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n setupController: function() {\n this.controllerFor( 'pagination' ).get( 'translateService' ).setDictionary( Ember.Object.create({\n 'PAGINATION_DISP...
javascript
edit
0
1
mit
a34125408ec298bbe4083ee06db8727a59028688
Suven/sl-ember-components,erangeles/sl-ember-components,theoshu/sl-ember-components,theoshu/sl-ember-components,notmessenger/sl-ember-components,softlayer/sl-ember-components,azizpunjani/sl-ember-components,Suven/sl-ember-components,alxyuu/sl-ember-components,azizpunjani/sl-ember-components,juwara0/sl-ember-components,...
tests/dummy/app/routes/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar h = require('html')\nvar Panel = require('panel')\n\nfunction Editor() {\n this.layersPanel = new Panel(this, 215, h('.layers-panel'))\n this.inspectorPanel = new Panel(this, 215, h('.inspector-panel'))\n\n this.el = h('.editor',...
javascript
edit
0
1
unlicense
9f2af655b2502eaed5f899651ab652f8561c92c2
freedraw/core,freedraw/core
src/editor.js
rejected_duplicate
Near-duplicate of sample 91025
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nexport const isRequired = (schema, fieldName) => {\n if (!schema.required) {\n return false\n }\n return (schema.required.indexOf(fieldName) != 1)\n}\n\nconst renderField = (fieldSchema, fiel...
javascript
edit
0
7
mit
ead1e86c6edeef2a064d417535b445c11eb18d47
Limenius/liform-react
src/renderField.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express'),\n\trouter = express.Router(),\n\tpassport = require('passport');\n\nmodule.exports = function (app) {\n\tapp.use('/account', router);\n};\n\nrouter.get('/', function (req, res, next) {\n\tconsole.log('U...
javascript
edit
0
3
apache-2.0
91451bab35e3e683d0c77c71f0ba1dbbf25ac302
Mobius5150/libbie,Mobius5150/libbie
app/controllers/account.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jslint eqeq: true, indent: 2, node: true, plusplus: true, regexp: true, unparam: true, vars: true, nomen: true */\n'use strict';\n\nvar Schema = require('mongoose').Schema;\n\n/**\n * The article schema.\n */\nvar PostSchema = new Sch...
javascript
edit
0
5
bsd-3-clause
7ff6cd7e5b3993c62151f1ae57e146bbc9d2a13f
neuola/neuola-data
model/Post.js
rejected_duplicate
Near-duplicate of sample 99371
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire.config({\n baseUrl: '../lib',\n paths: {\n 'test': '..',\n 'forge': 'forge.min',\n 'stringencoding': 'stringencoding.min'\n },\n shim: {\n sinon: {\n exports: '...
javascript
edit
0
3
mit
87d77b7bb4a5ee73004c65df99649a491b58df87
whiteout-io/smtpclient,huangxok/smtpclient,huangxok/smtpclient,emailjs/emailjs-smtp-client,whiteout-io/smtpclient,emailjs/emailjs-smtp-client
test/unit/unit.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\n exclude: ['build/test/external.spec.js'],\n\n files: [\n 'vendor/es5-shim.js',\n 'vendor/es5-sham.js',\n 'vendor/rsvp.js',\n '...
javascript
edit
0
1
mit
c13ba4cb8088fa883c7e399715608b2e16fed77c
unexpectedjs/unexpected
karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar feature_flags = (function () {\n\nvar exports = {};\n\nexports.mark_read_at_bottom = true;\nexports.summarize_read_while_narrowed = true;\n\nexports.twenty_four_hour_time = _.contains([],\n page_para...
javascript
edit
0
5
apache-2.0
a387535d2d6fdc1d6391ce46f2de98e08209fea1
MayB/zulip,fw1121/zulip,peguin40/zulip,stamhe/zulip,brainwane/zulip,vikas-parashar/zulip,voidException/zulip,ericzhou2008/zulip,mahim97/zulip,babbage/zulip,souravbadami/zulip,easyfmxu/zulip,proliming/zulip,bssrdf/zulip,qq1012803704/zulip,xuanhan863/zulip,voidException/zulip,alliejones/zulip,guiquanz/zulip,yocome/zulip,...
static/js/feature_flags.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"env\": {\n \"node\": true\n },\n \"extends\": \"eslint:recommended\",\n \"rules\": {\n \"indent\": [\n \"error\",\n 2\n ],\n \"linebreak-style\": [\n \"error\",\n \"unix\"\n ...
javascript
edit
0
0
mit
aa9c0c1abbcec19a1c7d179f262f228977637e88
raszi/node-tmp,raszi/node-tmp,coldrye-collaboration/node-tmp
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n env: {\n browser: true,\n es6: true,\n },\n globals: {\n afterEach: true,\n beforeEach: true,\n chrome: true,\n expect: true,\n jest: true,\n beforeEach: true,\n afterEach: true,\n d...
javascript
edit
0
0
mit
de7b6aed2c248de3bcedc7f6b2ceba2d6de7558d
jacobSingh/tabwrangler,tabwrangler/tabwrangler,tabwrangler/tabwrangler,tabwrangler/tabwrangler,jacobSingh/tabwrangler
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * In-Memory configuration storage\n */\nlet Config = {\n isInitialized: false,\n debug: true,\n overridePublishFunction: true,\n mutationDefaults: {\n pushToRedis: true,\n optimistic: true,\n },\n p...
javascript
edit
0
2
mit
e50830b890710e142a25ecc6b31145fc11ebe3c1
cult-of-coders/redis-oplog
lib/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('Sock object', function() {\n var socket;\n var pong;\n var joinRoom;\n beforeEach(function() {\n });\n\n afterEach(function() {\n });\n\n it('should exist', function() {\n expect(window.Tilt.Sock).toBeDefined();\n ...
javascript
edit
0
1
mit
6a38487871bbfe84b915eac40bcb82a7bf742cb3
tilt-js/tilt.js
tilt-client/spec/sock_spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('underscore'),\n fs = require('fs');\n\nfunction Writer() {\n \n function gen(templates, numSegments, params, outFile, cb) {\n var stream = fs.createWriteStream(outFile,\n { flags: 'w', encoding: 'utf-8' }),...
javascript
edit
0
2
mit
4d56e2224c0292d1989e1c5c2a6d512925fa983a
cliffano/datagen
lib/writer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env amd */\n(function (name, definition) {\n if (typeof define === 'function') {\n // AMD\n define(definition)\n } else if (typeof module !== 'undefined' && module.exports) {\n // Node.js\n module.exports = defin...
javascript
edit
0
6
apache-2.0
7618f5f225ed9a0c87e37fc941fb1a045838372b
cskeppstedt/null-prune
null-prune.js
rejected_duplicate
Near-duplicate of sample 95198
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nsteal('can/util/mvc.js')\n.then('funcunit/qunit', \n\t 'can/util/fixture')\n.then(function() {\n\tvar oldmodule = window.module;\n\n\t// Set the test timeout to five minutes\n\tQUnit.config.hidepassed = true;\n\tQUnit.config.testTimeou...
javascript
edit
0
4
mit
2a7b7d5fac3e7024af573dc21028bb29e7a05efd
patrick-steele-idem/canjs,cohuman/canjs,scorphus/canjs,rasjani/canjs,rjgotten/canjs,patrick-steele-idem/canjs,juristr/canjs,azazel75/canjs,rasjani/canjs,UXsree/canjs,mindscratch/canjs,sporto/canjs,dispatchrabbi/canjs,dimaf/canjs,rasjani/canjs,cohuman/canjs,jebaird/canjs,Psykoral/canjs,scorphus/canjs,schmod/canjs,airhad...
test/setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar basename = require('path').basename;\n\nmodule.exports = variationMatches;\nfunction variationMatches(variations, path) {\n var result;\n variations.some(function(variation) {\n variation.chain.some(function(dir) {\n ...
javascript
edit
0
2
mit
6720ea61038cf20824fe2b2e1c02db99a569cd3e
stephanwlee/mendel,stephanwlee/mendel,yahoo/mendel,yahoo/mendel
lib/variation-matches.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/*\n * Number Filters\n * \n * In HTML Template Binding\n * {{ filter_expression | filter : expression : comparator}}\n * \n * In JavaScript\n * $filter('filter')(array, expression, comparator)\n * \n * https://docs.ang...
javascript
edit
0
2
mit
3b0d8f70ba2091d20dc91ea5235c0479a16f2991
rachellcarbone/angular-seed,rachellcarbone/angular-seed,rachellcarbone/angular-seed
www/app/filters/app.filters.number.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst mongoose = require('mongoose')\nconst uniqueValidator = require('mongoose-unique-validator')\nconst paginate = require('mongoose-paginate')\nconst requiredValidationMessage = '{PATH} is required'\n\nlet movieSchema = mongoose.Sche...
javascript
edit
0
1
mit
a11095a4d2b16822d79c3cea0500849fbbfc9fd0
iliandj/express-architecture,iliandj/express-architecture
server/data/Movie.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport TestUtils from 'react-addons-test-utils';\n\nexport default {\n renderComponent(Component, props = {}, state = {}) {\n const component = TestUtils.renderIntoDocument(<Component {...props} />);\n ...
javascript
edit
0
2
mit
08ca837aca83e7c8cab88244f69db3cdac4de0e0
react-toolbox/react-toolbox,react-toolbox/react-toolbox,react-toolbox/react-toolbox
components/utils/testing.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar zlib = require(\"zlib\");\n\nvar cors = require(\"cors\"),\n express = require(\"express\");\n\nvar SyslogFilter = require(\"./syslog-filter\");\n\nmodule.exports = function(source) {\n var app = express();\n\...
javascript
edit
0
5
isc
946eb3a92be4e3452f837130e5053643544ea08b
mojodna/log-nexus
lib/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar path = require('path'),\n opener = require('opener'),\n chalk = require('chalk'),\n pkg = require('../package.json'),\n server = require('./server'),\n program = require('commander');\n\nfunction getCon...
javascript
edit
0
1
mit
b94e3b3d2060456bd052a3cdde057f48a7e0ca91
gemini-testing/gemini-gui,gemini-testing/gemini-gui
lib/cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs')\nconst path = require('path')\nconst { compact, sortBy, concat, includes } = require('lodash')\n\nconst config = require('../config')\nconst urls = require('../lib/urls')\n\nconst subApps = fs.readdirSync(__dirn...
javascript
edit
0
3
mit
9d2deacd0ee28da9ae78dc16f7174d3f5d593b32
uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
src/apps/global-nav-items.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\n\n//class-based component (ES6)\nclass SearchBar extends React.Component {\n render() { //method definition in ES6\n return <input />;\n }\n}\n\nexport default SearchBar;\n```\n\nApply this change: Refact...
javascript
edit
0
1
mit
2cb117bd56c5508c4abf885c6b8ed4d4c043462a
phirefly/react-redux-starter,phirefly/react-redux-starter
src/components/search_bar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport SVGInline from 'react-svg-inline';\nimport svg from '../../static/logo.svg';\n\nconst Logo = (props) => {\n return (\n <SVGInline\n svg={svg}\n desc={props.desc}\n ...
javascript
edit
0
1
mit
5ad85f1120a19885ad11ade6a607542b6ea2e3ea
devnews/web,devnews/web
src/components/Logo/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Global settings that do not change in a production environment\n */\n\nif (typeof window === 'undefined') {\n // For tests\n global.window = {}\n}\n\nwindow.appSettings = {\n headerHeight: 60,\n drawerWidth: 250,\n ...
javascript
edit
0
0
mit
e0c685d096bac50e01946d43ab1c7c034ae68d98
AdamSalma/Lurka,AdamSalma/Lurka
src/config/globalSettings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nangular.module('eehMenuBs3').directive('eehMenuBs3MenuItemContent', MenuItemContentDirective);\n\n/** @ngInject */\nfunction MenuItemContentDirective(eehNavigation) {\n return {\n restrict: 'A',\n scope: ...
javascript
edit
0
1
mit
382a847bbc4b483829e3ca3e8fb4169cc6649b92
MenuJS/eeh-menu-bs3,MenuJS/eeh-menu-bs3
src/menu-item-content/menu-item-content-directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('alienUiApp').factory('restTechnicalErrorInterceptor', ['$rootScope', '$q', '$window', 'toaster', '$translate',\n function($rootScope, $q, $window, toaster, $translate) {\n\n var extractErrorMessage =...
javascript
edit
0
4
apache-2.0
3e5e542eff495ec0cdfae7be21c2c50e0901145b
alien4cloud/alien4cloud,alien4cloud/alien4cloud,xdegenne/alien4cloud,loicalbertin/alien4cloud,OresteVisari/alien4cloud,xdegenne/alien4cloud,san-tak/alien4cloud,ngouagna/alien4cloud,alien4cloud/alien4cloud,loicalbertin/alien4cloud,igorng/alien4cloud,broly-git/alien4cloud,ahgittin/alien4cloud,OresteVisari/alien4cloud,xde...
alien4cloud-ui/yo/app/scripts/services/rest_technical_error_interceptor.js
rejected_duplicate
Near-duplicate of sample 79030
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('arethusa.core').directive('langSpecific', [\n 'languageSettings',\n function(languageSettings) {\n return {\n restrict: 'A',\n link: function(scope, element, attrs) {\n var settings...
javascript
edit
0
4
mit
8f5b0dcd02f2b5b81139cba0c757a33d37204070
Masoumeh/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa
app/js/arethusa.core/directives/lang_specific.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n /* flowlint\n * untyped-import:off\n */\n\nimport * as React from 'react';\nimport Datepicker from '@salesforce/design-system-react/components/date-picker';\n\nconst dateRangePicker = ({onChange, startName, endName} : \n ...
javascript
edit
null
null
bsd-3-clause
721294c2debd50f91f191c60aa8183ac11b74bd0
SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci
src/js/components/dateRangePicker.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst redirects = [\n ['192.168.99.100/fjs', 'https://github.com/kriegslustig/presentation-functional-javascript'],\n ['lucaschmid.net/fjs', 'https://github.com/kriegslustig/presentation-functional-javascript']\n]\n\nmodule.exports = ...
javascript
edit
0
2
mit
0ca10de801a0104fa3d9d3f23b074591672f2318
Kriegslustig/lucaschmid.net,Kriegslustig/lucaschmid.net,Kriegslustig/lucaschmid.net
server/lib/redirects.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['backbone.marionette', './ExamView', 'hbs!../templates/exams'],\n function (Marionette, ExamView, template) {\n 'use strict';\n\n return Marionette.CompositeView.extend({\n tagName: 'table',\n className: 'table ...
javascript
edit
0
2
mit
d1785feb25125bf750daa35b3612124fc72e30b3
chunqi/nusmods,nusmodifications/nusmods,nathanajah/nusmods,chunqi/nusmods,nathanajah/nusmods,zhouyichen/nusmods,mauris/nusmods,zhouyichen/nusmods,nathanajah/nusmods,Yunheng/nusmods,Yunheng/nusmods,mauris/nusmods,mauris/nusmods,chunqi/nusmods,zhouyichen/nusmods,nusmodifications/nusmods,zhouyichen/nusmods,nusmodification...
app/scripts/timetable_builder/views/ExamsView.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(app, express) {\n\n // Facebook OAuth\n app.get('/auth/facebook', function(req, res) {\n res.send('Facebook OAuth');\n });\n app.get('/auth/facebook/callback', function(req, res) {\n res.send('Callbac...
javascript
edit
0
1
mit
38ed99078ce7ed579dd72eb1fd493ce756473b59
folksy-squid/Picky-Notes,inspiredtolive/Picky-Notes,derektliu/Picky-Notes,derektliu/Picky-Notes,inspiredtolive/Picky-Notes,derektliu/Picky-Notes,folksy-squid/Picky-Notes,inspiredtolive/Picky-Notes,folksy-squid/Picky-Notes
server/config/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path \t\t= require('path');\nvar rootPath \t= path.normalize(__dirname + '/../../');\n\nmodule.exports \t= {\n local: {\n baseUrl: 'http://localhost:3051',\n db: 'mongodb://localhost/rp_local',\n rootPath: ro...
javascript
edit
0
0
mit
79603dcc2407e989bbe9107f4aa3a25da56e70b5
NRGI/rp-org-frontend,NRGI/rp-org-frontend
server/config/config.js
rejected_duplicate
Near-duplicate of sample 71910
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass ObjectLocator {\n\n constructor(fs, objectName) {\n this.fs = fs;\n this.objectName = objectName;\n this.objects = [];\n this.objectDirectoryName = \"objects\";\n }\n\n run() {\n this.lo...
javascript
edit
0
7
mit
271974693930334174db0a01a86a7cffd3f7f9e0
generationtux/cufflink
src/ObjectLocator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Author: Pierre-Henry Soria <<EMAIL>>\n * Copyright: (c) 2015-2017, Pierre-Henry Soria. All Rights Reserved.\n * License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory...
javascript
edit
0
1
mit
0175c92b62010f33e7410cc0e6a5121ad87e52ba
pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS
templates/system/modules/ph7cms-donation/themes/base/js/donationbox.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Core = require('./core');\n\nclass Discord extends Core {\n constructor() {\n super();\n this.dnsResolver = { resolve: function(address) {return {address: address} } };\n }\n\n async run(state) {\n this.usedTcp = true;...
javascript
edit
0
2
mit
f337cf6f58d0b0da1435e49023a2e7cf5d9d33d9
sonicsnes/node-gamedig
protocols/discord.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Source: http://stackoverflow.com/a/1830844\nfunction isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n}\n\nfunction AppViewModel() {\n this.statStrength = ko.observable();\n this.statEndurance = ko.observable();\n...
javascript
edit
0
12
bsd-2-clause
f585a93f9b3d9a830e752bd205c5427f7e1c4ac2
vegarbg/horizon
character_sheet/js/main.js
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from '../templates/components/mapbox-gl-source';\n\nconst {\n Component,\n computed,\n get,\n getProperties,\n guidFor\n} = Ember;\n\nexport default Component.extend({\n layout,\n tagName...
javascript
edit
0
0
mit
25dbfe06d90c794525c956bf08ccecc1b7c8d8fc
kturney/ember-mapbox-gl,kturney/ember-mapbox-gl
addon/components/mapbox-gl-source.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nMeteor.publish(\"dailyMeasuresBySensor\", (sensorId, dayStart, dayEnd) => {\n check(sensorId, String);\n check(dayStart, String);\n check(dayEnd, String);\n return ReadingsDailyAggregates.find({\n sensorId,\n d...
javascript
edit
0
1
apache-2.0
142681d8ae8c96c30c03752426d6124d64e24c9a
innowatio/iwwa-back,innowatio/iwwa-back
server/readings-daily-aggregates/publications.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar BOARD_HEIGHT = 288;\nvar BOARD_WIDTH = 224;\nvar VERT_TILES = BOARD_HEIGHT / 8;\nvar HORIZ_TILES = BOARD_WIDTH / 8;\n\ngameBoard = new Array(VERT_TILES);\nfor(var y = 0; y < VERT_TILES; y++) {\n gameBoard[y] = new Array(HORIZ_TILES...
javascript
edit
0
3
mit
26d299abc795cd90a5d2a3130e2a04e187e84799
peternatewood/pac-man-replica,peternatewood/pac-man-replica
pac_script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n**| PonkBot\n**| A chat bot for CyTube\n**|\n**@author Xaekai\n**@copyright 2017\n**@license MIT\n*/\n\n'use strict';\n\nconst PonkBot = require('./lib/ponkbot.js');\n\nconst argv = require('minimist')(process.argv.slice(2...
javascript
edit
0
3
mit
a1bcbe2c769e14ecbc54af8587c91555e268bf25
Xaekai/PonkBot
service.js
accepted
null
true