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$.fn.sidebar = function() {\n var $sidebar = this;\n var $tabs = $sidebar.children('.sidebar-tabs').first();\n var $container = $sidebar.children('.sidebar-content').first();\n\n $sidebar.find('.sidebar-tabs > li > a').on('c...
javascript
edit
0
3
mit
d230d002bf02fb1063b887a0b67d336c31f45b99
wsignor/wsignor.github.io,noerw/sidebar-v2,noerw/sidebar-v2,Turbo87/sidebar-v2,andrewmartini/sidebar-v2,wsignor/wsignor.github.io,MuellerMatthew/sidebar-v2,andrewmartini/sidebar-v2,projectbid7/sidebar-v2
js/jquery-sidebar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(ircbot, config) {\n\tvar request = require('request');\n\t\n\tircbot.addListener('message', function (from, to, message) {\n\t\tif (to !== config.irc.announceChannel || message !== '!who') {\n\t\t\treturn;\n\t\...
javascript
edit
0
4
mit
1af1c4e115cc9f806241ad589f497cd43b7fdad2
initLab/irc-notifier
modules/who.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst h = require('virtual-dom/h');\n\nmodule.exports = function (data) {\n const {gameID, game} = data;\n return h('div', {className: 'room'}, [\n game.playing ? null : h('a', {href: '/new-player/' + gameID}, 'Wanna play along?'),...
javascript
edit
0
4
mit
593b14d0eb07f9b0c9698da3758df51922825ffa
rijkvanzanten/luaus
app/views/room.js
rejected_duplicate
Near-duplicate of sample 69962
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport account from './account';\nimport person from './person';\nimport languages from './languages';\nimport jobTypes from './jobTypes';\nimport creditCards from './creditCards';\n\nconst { combineReducers } = require('redux');\n\nexp...
javascript
edit
0
0
mit
0deb09921fd17a6dac967a47ed2dee31fa85028e
justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client
js/reducers/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\n\nmodule.exports = function initViewEngine (keystone, app) {\n\t// Allow usage of custom view engines\n\tif (keystone.get('custom engine')) {\n\t\tapp.engine(keystone.get('view engine'), keystone.get('custom...
javascript
edit
0
4
mit
ec1a3d52a358958b27c3648299f96bf53de07e92
trentmillar/keystone,frontyard/keystone,danielmahon/keystone,matthewstyers/keystone,trentmillar/keystone,vokal/keystone,benkroeger/keystone,benkroeger/keystone,andrewlinfoot/keystone,frontyard/keystone,frontyard/keystone,naustudio/keystone,Pop-Code/keystone,matthewstyers/keystone,trentmillar/keystone,vokal/keystone,vok...
server/initViewEngine.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nverify(/ca[rt]/,\n [\"my car\", \"bad cats\"],\n [\"camper\", \"high art\"]);\n\nverify(/pr?op/,\n [\"pop culture\", \"mad props\"],\n [\"plop\"]);\n\nverify(/ferr[et|y|ari]/,\n [\"ferret\", \"ferry\",...
javascript
edit
0
0
mit
41eea1ab82ce70a24874cd51498fffcfd3797541
bewuethr/ctci
eloquent_js_exercises/chapter09/chapter09_ex01.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// discard\n\nexports.register = function () {\n this.register_hook('queue','discard');\n}\n\nexports.discard = function (next, connection) {\n var transaction = connection.transaction;\n if (connection.notes.discard ||\n ...
javascript
edit
0
3
mit
1dac18d5d0184d382513c34cc1ee2666b924ca35
Synchro/Haraka,armored/Haraka,Dexus/Haraka,MignonCornet/Haraka,bsmr-x-script/Haraka,jjz/Haraka,julian-maughan/Haraka,AbhilashSrivastava/haraka_sniffer,alessioalex/Haraka,dweekly/Haraka,hatsebutz/Haraka,typingArtist/Haraka,DarkSorrow/Haraka,pedroaxl/Haraka,hiteshjoshi/my-haraka-config,hayesgm/Haraka,msimerson/Haraka,har...
plugins/queue/discard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport NamingStrategyFactory from 'ember-cli-bem/naming-strategies/factory';\n\nconst {\n Component,\n} = Ember;\n\nexport default {\n\n name: 'ember-cli-bem',\n\n initialize(owner) {\n const config = o...
javascript
edit
0
1
mit
fb90564f3e93db090f1cf622a22b0ec1fc9f2461
nikityy/ember-cli-bem,nikityy/ember-cli-bem
app/initializers/ember-cli-bem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$('#suggestions').typed({\n strings: [\"chocolate chip cookies\", \"brownies\", \"pancakes\"],\n typeSpeed: 50,\n backSpeed: 15,\n backDelay: 1500,\n loop: true,\n});\n\n$('#recipe-form').submit(function() {\n\tget_recipe...
javascript
edit
0
3
bsd-2-clause
062ebb5ecf53c778c2e1e67e5f070927cedeb78d
kkelk/MeanRecipes,kkelk/MeanRecipes,kkelk/MeanRecipes,kkelk/MeanRecipes
meanrecipes/static/js/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { expect } = require('chai');\nconst Plexacious = require('../js/Plexacious');\n\nconst plex = new Plexacious();\n\ndescribe('Plexacious:', () => {\n describe('Event attaching:', () => {\n it('should attach a callback to an ev...
javascript
edit
0
1
isc
f4015e8cd71450ddf7b7ebfb96f0957c3e5dea8d
ketsugi/plexacious
test/plexacious.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = require('path');\nvar bigrest = require('../index');\n\nvar http = bigrest.listen(18080, {\n debug: true,\n basepath: __dirname,\n static: {\n urlpath: '/files',\n filepath: path.join(_...
javascript
edit
0
0
mit
c3aeab3192ceb5dc32333453ae35d21878ed4a84
vietor/bigrest,vietor/bigrest
demo/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport moment from 'moment'\n\nexport default class NextFridayProvider {\n static formattedDate() {\n return momentNextFriday().format('M/D');\n }\n\n static millisecondsDate() {\n return momentNextFriday().toDate...
javascript
edit
0
2
isc
c0c389b65c3eb323d76e75c005e2383b6ebfbe84
oliverswitzer/wwltw-for-pivotal-tracker,oliverswitzer/wwltw-for-pivotal-tracker
src/content_scripts/utilities/next_friday_provider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst assert = require('assert');\nconst configMergeLoader = require('../index.js');\n\ndescribe('Config Merge Loader', function() {\n it('should return a function', function() {\n assert.equal(typeof configMergeLoader, 'function');...
javascript
edit
0
1
mit
ddfd3f09e5d0efefbe88eafe6ebfe64d2ee19d2c
bitfyre/config-merge-loader
test/index.test.js
rejected_duplicate
Near-duplicate of sample 89504
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';...
javascript
edit
null
null
mit
5ad964ba3ed5728d88686d2f5cfc3becac49f667
facebook/react-native,myntra/react-native,myntra/react-native,exponentjs/react-native,exponentjs/react-native,hoangpham95/react-native,hoangpham95/react-native,exponent/react-native,pandiaraj44/react-native,exponent/react-native,pandiaraj44/react-native,janicduplessis/react-native,exponentjs/react-native,exponentjs/rea...
Libraries/Animated/src/Animated.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default class Exporter {\n constructor(editor) {\n this.editor = editor;\n }\n\n getData() {\n var tweenTime = this.editor.tweenTime;\n var domain = this.editor.timeline.x.domain();\n var domain_start = domain[0];\...
javascript
edit
0
3
mit
8d5b8c535cdc6c281f5e3b3613b548322eae4905
idflood/TweenTime,idflood/TweenTime
src/scripts/editor/Exporter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst JSUnit = imports.jsUnit;\n// application/javascript;version=1.8\nfunction testBasic1() {\n var foo = 1+1;\n JSUnit.assertEquals(2, foo);\n}\n\nfunction testFakeFailure() {\n var foo = 1+1;\n JSUnit.assertEquals(5, foo)...
javascript
edit
0
1
mit
3375511bc07214da78c36fdd4f87ec7bea8aceed
pixunil/cjs,mtwebster/cjs,pixunil/cjs,djdeath/gjs,djdeath/gjs,djdeath/gjs,mtwebster/cjs,djdeath/gjs,mtwebster/cjs,pixunil/cjs,pixunil/cjs,endlessm/gjs,endlessm/gjs,mtwebster/cjs,endlessm/gjs,djdeath/gjs,pixunil/cjs,endlessm/gjs,mtwebster/cjs,endlessm/gjs
installed-tests/test/js/test0010basic.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global Node */\n\nimport { ensureEl } from './util.js';\nimport { setChildren } from './setchildren.js';\n\nexport function router (parent, Views, initData) {\n return new Router(parent, Views, initData);\n}\n\nexport class Router {...
javascript
edit
0
8
mit
d688d4bdfa582484669f319b1829bfcbdaaeadae
redom/redom,pakastin/redom
esm/router.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2011 Iris Couch\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// ...
javascript
edit
0
1
apache-2.0
5cfc30383756d04c84bf4306a350685185dd4ca4
iriscouch/couchjs,iriscouch/couchjs
couchdb.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('bolt.profile', ['bolt.auth'])\n\n.controller('ProfileController', function ($scope, $rootScope, $window, Auth, Profile) {\n $scope.newInfo = {};\n $scope.session = window.localStorage;\n\n var getUserInfo = function (...
javascript
edit
0
2
mit
1ef3f1ce228275c3714a4874163b220c85fe6cce
elliotaplant/Bolt,gm758/Bolt,boisterousSplash/Bolt,thomasRhoffmann/Bolt,gm758/Bolt,boisterousSplash/Bolt,thomasRhoffmann/Bolt,elliotaplant/Bolt
client/app/controllers/profile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst {BrowserWindow, app} = require('electron');\nconst loadRoute = require('./utils/routes');\n\nlet exportsWindow = null;\n\nconst openExportsWindow = show => {\n if (!exportsWindow) {\n exportsWindow = new Brows...
javascript
edit
0
3
mit
2f70c937c40af5fb88f76f5e7af08800f29a93fc
wulkano/kap
main/exports.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nMeteor.methods({\n userAddVisitedRoom: function(roomId) {\n var rooms = Rooms.find({\n _id: roomId\n }, {\n _id: 1\n });\n if (rooms.count() === 0) {\n throw new Meteor.Err...
javascript
edit
0
3
mit
56e908e8f9e4e4758eecbfa1a74e3d4d533dd4d2
eagleoneraptor/confnode,eagleoneraptor/confnode,dnohales/confnode,dnohales/confnode
collections/user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\n\nclass Footer extends Component {\n render() {\n if (this.props.data) {\n var networks = this.props.data.social.map(function (network) {\n return (\n <span key={networ...
javascript
edit
0
2
mit
6a94be934d49b145a877609b2ea37f805ade5910
enesates/enesates.github.io,enesates/enesates.github.io,NestorPlasencia/NestorPlasencia.github.io,NestorPlasencia/NestorPlasencia.github.io
src/components/Footer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nErrorModel = function (appId) {\n var self = this;\n this.appId = appId;\n this.errors = {};\n this.startTime = Date.now();\n}\n\n_.extend(ErrorModel.prototype, KadiraModel.prototype);\n\nErrorModel.prototype.buildPayload = functi...
javascript
edit
0
2
mit
64994f9901bcf3cef537da822e603215fa5b4568
meteorhacks/kadira,chatr/kadira
lib/models/errors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default () =>\n <div>\n <h1>\n react-todo{' '}\n <small>by <a href=\"https://github.com/pmdarrow\">pmdarrow</a></small>\n </h1>\n <style>{`\n h1 {\n margin: 2rem;\n }\n `}</style>\n </div>...
javascript
edit
0
1
mit
8520af084ed87b946256d30319461d14a8832467
pmdarrow/react-todo
components/Title.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { combineReducers } from 'redux'\nimport {\n REQUEST_WORKSPACES, RECEIVE_WORKSPACES,\n SELECT_WORKSPACE, REQUEST_RESULTS,\n RECEIVE_RESULTS, SELECT_RESULT,\n REQUEST_QUERIES, RECEIVE_QUERIES,\n SELECT_QUERY\n} from '../actio...
javascript
edit
0
3
mit
e1073a4bf48150c057266a5b0f7e0556f3b4b39a
csecapstone485organization/ddf-mobile,csecapstone485organization/ddf-mobile,csecapstone485organization/ddf-mobile
App/reducers/reducers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst http = require('http');\nconst socketIO = require('socket.io');\nconst path = require('path');\n\nconst app = express();\nconst server = http.Server(app);\nconst io = socketIO(server);\n\n// Ex...
javascript
edit
0
1
mit
c9cc4809e687d33cd807268fe9b9e147ebe99687
mbrandau/simple-chat,mbrandau/simple-chat,mbrandau/simple-chat
web_server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n github: {\n username: 'maker-of-life',\n repo: 'maker-of-life/game-of-life',\n branch: 'game',\n localPath: 'tmp',\n },\n\n commit: {\n name: 'Maker of Life',\n mess...
javascript
edit
0
0
mit
80f69f97e1be8d1492ee1708d2e8f41f0fc7926a
erbridge/life-maker
config/default.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Ensures something has been found during the request. Returns 404 if\n * res.template is unset, res.locals is empty and statusCode has not been set\n * to 204.\n *\n * Should be placed at the very end of the middleware pipeline,\...
javascript
edit
0
5
mit
4d4bd6c4533b2be681752b90a999b1936cc954d4
thebitmill/midwest
middleware/ensure-found.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global _:true, App:true, Backbone:true */\n/*jshint forin:false, plusplus:false, sub:true */\n'use strict';\n\ndefine([\n 'zepto',\n 'install',\n 'datastore',\n 'collections/episodes',\n 'collections/podcasts',\n 'mo...
javascript
edit
0
2
mit
dad76c400c3a9188cb99227fb1725f932e673f34
sole/high-fidelity,mozilla/high-fidelity,prateekjadhwani/high-fidelity,lmorchard/high-fidelity,sole/high-fidelity,prateekjadhwani/high-fidelity,lmorchard/high-fidelity,sole/high-fidelity,sole/high-fidelity,mozilla/high-fidelity
www/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar http = require('http');\nvar url = require('url');\nvar port = 8000;\n\nvar server = http.createServer(function (request, response){\n\n try {\n\t\t//go to http://127.0.0.1:8000/?req=Monty\n\t\tconsole.log('Server Pinged');\t//Pi...
javascript
edit
0
3
mit
0f789ea82e785d9e06582e892c4ec4ea45f245c8
delpillar/AvengersCC
httpserver.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * @flow\n */\n\nimport React from 'react';\n\nexport default function Navbar() {\n return (\n <nav className=\"navbar navbar-default navbar-fixed-top navbar-inverse\">\n <div className=\"container-fluid\">\n <div cl...
javascript
edit
0
1
apache-2.0
c0ec7d4aa404259b62ee6d077e648d77ff0b08b5
pinterest/bonsai,pinterest/bonsai,pinterest/bonsai
src/components/Navbar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n( function() {\n\n\t\"use strict\";\n\n\tangular.module('ACBank')\n\t\t.controller('AccountsController', AccountsController);\n\n\tAccountsController.$inject = [ '$scope', '$ionicModal' ];\n\n\tfunction AccountsController ($scope, $ioni...
javascript
edit
0
1
mit
d55af7519d0c44b6686d066a29a79ffe478f5789
danielzy95/NewLeaf-Bank,danielzy95/NewLeaf-Bank
app/components/Accounts/accounts.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nRouter.configure({\n // we use the appBody template to define the layout for the entire app\n layoutTemplate: 'appBody',\n\n // the appNotFound template is used for unknown routes and missing lists\n notFoundTemplate: 'appNotFound'...
javascript
edit
0
1
mit
11abe0cfb783f73d6b5a281430ef1bb9c99460c6
tdamsma/meteor,lorensr/meteor,rabbyalone/meteor,sclausen/meteor,pjump/meteor,aramk/meteor,devgrok/meteor,guazipi/meteor,EduShareOntario/meteor,AnjirHossain/meteor,mubassirhayat/meteor,joannekoong/meteor,dev-bobsong/meteor,yonas/meteor-freebsd,Quicksteve/meteor,lorensr/meteor,shrop/meteor,dandv/meteor,daltonrenaldo/mete...
examples/todos/lib/router.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n\n/**\n * client\n **/\n\n/**\n * client.common\n **/\n\n/**\n * client.common.auth\n **/\n\n/**\n * client.common.auth.register\n **/\n\n\n/*global $, _, nodeca, window*/\n\n\n/**\n * client.common.auth.register.e...
javascript
edit
0
3
mit
15da64f080c5003a3cd62d6d51647d5a88c7069d
nodeca/nodeca.users
client/users/auth/register/exec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar SolidityUtils = {\n\n getCharacterOffsetToLineAndColumnMapping: function(source) {\n var mapping = [];\n\n source = source.split(\"\");\n\n var line = 0;\n var column = 0;\n\n source.forEach(function(character) {\n ...
javascript
edit
0
11
mit
a664da36f0c30e8357198e5db4817ac763254dc0
ConsenSys/truffle
packages/truffle-solidity-utils/index.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport gulpLoadPlugins from 'gulp-load-plugins';\nimport runSequence from 'run-sequence';\n\nimport * as paths from './paths';\nimport gulp from './_gulp';\nimport jspmBuild from './utils';\n\n\nconst $ = gulpLoadPlugins();\n\n\ngulp.ta...
javascript
edit
0
1
unlicense
ab82d0455847ebcec2bf7e57fe795f3924ff001b
gsong/es6-jspm-gulp-starter,gsong/es6-jspm-gulp-starter
tasks/dist.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar request = require('request');\n\nvar opts = {\n uri: 'https://api.github.com' + '/users/jm-janzen/events',\n json: true,\n method: 'GET',\n headers: {\n 'User-Agent': 'nodejs script'\n }\n}\n\n...
javascript
edit
0
3
mit
5556cdf8a84ee8b1201f5e861395fafd784eab09
jm-janzen/scripts,jm-janzen/scripts,jm-janzen/scripts
gevents.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport loop from 'loop';\nimport StatusBar from 'statusBar';\nimport BattleMap from 'map';\nimport state from 'state';\nimport { subtractSet } from 'pura/vector/tuple';\nimport { canvasOffsetLeft, canvasOffsetTop, scaleX, scaleY } from ...
javascript
edit
0
2
mit
a2fda0c397b32f60c6bd8fccbd3e55ccaee381ed
HyphnKnight/js13k-2017,HyphnKnight/js13k-2017
src/battle/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst\n RELOAD_KEY = 'safari-reload-193289123',\n WAIT_TIME = 100; // Does it matter how long to wait?\n\n/**\n * Safari desktop audio is being dumb and won't play until a second page loads an audio file within a ...
javascript
edit
0
7
mit
5733e5c5ef6467b7e74d0129201411651cde5ec1
hiddenwaffle/mazing,hiddenwaffle/mazing
client/src/safari-audio-bandaid.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nMixer = function () {\n\tthis.mix = []\n}\n\n//Adds a track to the mix. Takes args = {url: sound.aws.com, divId: 1}\nMixer.prototype.addTrack = function (args) {\n\tvar newTrack = new Howl({\n\t\turl : [args['url']]\n\t}); \n\tthis.mix[...
javascript
edit
0
2
mit
d24c5ea29e999b3b1ed1c20fd4d19b27c54b302a
chi-bobolinks-2015/TheGoldenRecord,chi-bobolinks-2015/TheGoldenRecord,chi-bobolinks-2015/TheGoldenRecord
app/assets/javascripts/models/mixer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('arachne.controllers')\n\n/**\n * Set new password.\n *\n * @author: Daniel M. de Oliveira\n */\n .controller('PwdActivationController',\n ['$scope', '$stateParams', '$filter', '$location', 'Pwd...
javascript
edit
0
3
apache-2.0
518fac5020c9055cda2e72b91319df340641d1c9
dainst/arachnefrontend,dainst/arachnefrontend,codarchlab/arachnefrontend,codarchlab/arachnefrontend
app/users/pwd-activation.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport React, { Component } from 'react';\nimport ReactCSS from 'reactcss';\n\nimport colors from '../styles/variables/colors';\nimport 'normalize.css';\nimport '../fonts/work-sans/WorkSans.css!';\nimport '../styles/fel...
javascript
edit
0
1
mit
a3c7fef9a49f938aa9426b38a2d6e9652c21ae39
henryboldi/felony,tobycyanide/felony,tobycyanide/felony,henryboldi/felony
src/components/Felony.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nMeteor.startup(function () {\n\n console.log('Running server startup code...');\n\n Accounts.onCreateUser(function (options, user) {\n Roles.addRolesToUserObj(user, ['admin','view-secrets']);\n\n if (options.profile) {\n //...
javascript
edit
0
2
mit
edfb85e8ccb1986c33c2752ea5ddb42f153ce8f2
sumanla13a/moleReteor,dandv/meteor-roles,zoey4lee/meteor-roles,alanning/meteor-roles,dropfen/meteor-roles,sumanla13a/moleReteor,dandv/meteor-roles,challett/meteor-roles
examples/rolesWithAccountsUI/server/startup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function() {\n\n return this\n .title('Benchmarks')\n .helpful()\n .arg()\n .name('treeish-list')\n .title('List of revisions to compare (git treeish)')\...
javascript
edit
0
1
mit
d67f181f7adaf5e15529cab3b0e950821784c125
bem-archive/bem-tools,bem/bem-tools,bem-archive/bem-tools,bem/bem-tools
lib/commands/bench.js
rejected_duplicate
Near-duplicate of sample 83970
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport React, { Component, PropTypes } from 'react';\nimport { observer, PropTypes as MobxPropTypes } from 'mobx-react';\nimport Settings from '../../components/settings/Settings';\nimport ProfileSettings from '../../component...
javascript
edit
0
2
apache-2.0
04f24422e4567ed015db973a5d28f867f984e151
input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus
app/containers/settings/ProfileSettingsPage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nIRG.constants = (function(){\n \n var approvedDomains = function(){\n return [\"imgur.com\", \"flickr.com\", \"cdn.diycozyhome.com\", \"pbs.twimg.com\", \"msnbc.com\",\n \"fbcdn-sphotos-f-a.akamaihd.net\", \"flic...
javascript
edit
0
1
mit
bbae408dae6e4a10488f85ae5180ed62ba033406
CharlieCorner/InfiniteRedditGallery,CharlieCorner/InfiniteRedditGallery
javascript/irg-constants-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Simple, slimline template based on https://github.com/rackt/react-router/blob/master/CHANGES.md\n\nimport Default from './Default'\n\nexport default class Compact extends Default {\n mergesTitle = null\n fixesTitle = null\n commit...
javascript
edit
0
0
mit
0008264bcabddf8d2b6b19fde7aa41b0de7a5b77
CookPete/auto-changelog,CookPete/auto-changelog
src/templates/Compact.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nHubzero.submitbutton = function(task) {\n\t$(document).trigger('editorSave');\n\n\tvar frm = document.getElementById('item-form');\n\n\tif (frm) {\n\t\tif (task == 'cancel' || document.formvalidator.isValid(frm)) {\n\t\t\tHubzero.subm...
javascript
edit
0
5
mit
c9e4245ef6893d9981e7f3cd18c9beb3d20b172a
zooley/hubzero-cms,zooley/hubzero-cms,anthonyfuentes/hubzero-cms,zooley/hubzero-cms,zweidner/hubzero-cms,zweidner/hubzero-cms,zweidner/hubzero-cms,anthonyfuentes/hubzero-cms,zweidner/hubzero-cms,anthonyfuentes/hubzero-cms,anthonyfuentes/hubzero-cms,zooley/hubzero-cms
core/components/com_content/admin/assets/js/content.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nIRG.constants = (function(){\n \n var approvedDomains = function(){\n return [\"imgur.com\", \"flickr.com\", \"cdn.diycozyhome.com\", \"pbs.twimg.com\", \"msnbc.com\",\n \"fbcdn-sphotos-f-a.akamaihd.net\", \"flic...
javascript
edit
0
1
mit
8ef3e64a4724f1a5ba59d785535c777888497793
CharlieCorner/InfiniteRedditGallery,CharlieCorner/InfiniteRedditGallery
javascript/irg-constants-config.js
rejected_duplicate
Near-duplicate of sample 77322
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Karma configuration file, see link for more information\n// https://karma-runner.github.io/0.13/config/configuration-file.html\n\nmodule.exports = function (config) {\n config.set({\n basePath: '',\n frameworks: ['jasmine', '@...
javascript
edit
0
4
mit
ed49dda7b558b023170222c8e3c6cdbb661dd98e
briggySmalls/late-train-mate,briggySmalls/late-train-mate,briggySmalls/late-train-mate
karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Requires\nvar wireFriendly = require('../utils').wireFriendly;\n\n\nfunction setup(options, imports, register) {\n // Import\n var events = imports.events;\n var io = imports.socket_io.io;\n\n // Send events to user\n ...
javascript
edit
0
1
apache-2.0
d76659cde113f54aa724bf2554f9dc84bb2d8e8e
kustomzone/codebox,code-box/codebox,ronoaldo/codebox,smallbal/codebox,ahmadassaf/Codebox,rajthilakmca/codebox,nobutakaoshiro/codebox,fly19890211/codebox,nobutakaoshiro/codebox,Ckai1991/codebox,listepo/codebox,rajthilakmca/codebox,LogeshEswar/codebox,listepo/codebox,rodrigues-daniel/codebox,smallbal/codebox,indykish/cod...
lib/cb.events.socketio/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nsetupFlorence();\n\n\n//forms field styling markup injection\n//$('select:not(.small)').wrap('<span class=\"selectbg\"></span>');\n//$('select.small').wrap('<span class=\"selectbg selectbg--small\"></span>');\n//$('.selectbg--small:eq(1...
javascript
edit
0
0
mit
92d25406976259615fd43a5f93867508b4ee7429
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
src/main/web/florence/js/functions/__init.js
rejected_duplicate
Near-duplicate of sample 73006
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar pointTable = {};\n\nmodule.exports = function(match, response) {\n var points = Number(match[1]),\n multiplier = ('to' === match[2]) - ('from' === match[2]),\n target = match[3];\n\n\n pointTable[target] = (pointTable[targ...
javascript
edit
0
4
mit
5f54a6c59f4011b1a0027c9b92cbf532f4f457ad
elvinyung/strapbots
points/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nServer = require('./src/server');\nMockingjay = require('./src/mockingjay');\nDefaultOptions = require('./src/default_options');\n\nvar Mockingjays = function() {}\n\n/**\n * Start creates a Mockingjays Server and starts proxying\n * or...
javascript
edit
0
1
apache-2.0
cc4030c1901365a14360c581521bece5037b140f
blad/mockingjays
mockingjays.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport * as pubsActions from 'redux/modules/pubs';\n\n@connect(\n state => ({\n availablePubs: state.pubs.availablePubs,\n selectedPub:...
javascript
edit
null
null
mit
b250e5508d49ec212ce1fafa3c5fbdbefb31cf3b
fuczak/pipsy
src/containers/Pubs/Pubs.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n// TODO: use traditional way or ?\nlet Framework = {\n inject: function (coreName) {\n console.log(`framework inject ${coreName}`);\n // checkCore();\n this.coreName = coreName;\n return thi...
javascript
edit
0
1
mit
ce3ea9318e1236e44c3da1aac95a8370debe7af7
Kevin-Xi/dududu
framework.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* lib/client.js\n * The Client object.\n * * */\n\nmodule.exports = Client;\n\nfunction Client(socket){\n if (typeof socket !== 'object')\n throw new Error('Clients can only bind to Sockets');\n\n this._socket = s...
javascript
edit
0
2
mit
ee5ca8c1679e482746ee89c7df85073319fec595
jamen/rela
lib/client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar follow = require('follow');\nvar request = require('request');\n\n\nmodule.exports = function(db_url, handler_url) {\n\n function isSuccessCode(code) {\n return code >= 200 && code < 300;\n }\n\n function forwardHook(doc) {\n ...
javascript
edit
0
3
mit
7f6546b97f62020c2f5b7aeedd7e1f06f823137c
gbuesing/hookforward
forwarder.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar FeatureModel = function(attrs){\n this.id = (attrs && attrs.id) || null;\n this.title = (attrs && attrs.title) || null;\n this.description = (attrs && attrs.description) || null;\n this.mas...
javascript
edit
0
13
mit
e8627295b3a31e7559d9ee3d0200d9ac2d975e05
envato/iodized,envato/iodized
priv/ui/app/js/feature_model.js
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction ddg_spice_xkcd_display(api_result) {\n if (!api_result.img || !api_result.alt) return;\n\n //calls our endpoint to get the number of the latest comic\n $.getJSON('/js/spice/xkcd/latest/', function(data){\n\n //if we are l...
javascript
edit
0
3
apache-2.0
484232c79b3dd498a72d54ac2786dd57b2740972
iambibhas/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,deserted/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,lerna/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,ppant/zeroclickinfo-spice,levaly/zeroclickinfo-spice,levaly/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,P71/zeroclickinfo-sp...
share/spice/xkcd/display/xkcd_display.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Read WS_URL from environment variables" }, { "role": "assistant", "content": "module.exports = {\n WS_URL : process.env.WS_URL || 'http://www.workshape.io/'\n};" } ]
javascript
new_file
0
0
mit
892a68d4185882a21ad92084ba45c114a2462440
Workshape/ws-radial-plot-prerender-server
lib/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global System:false, exports:false */\n\nvar serverRelativeRegexp = /^\\w+:\\/\\/[^\\/]*/;\n\nfunction santiseSource( source ) {\n return source.replace( /(['\\\\])/g, '\\\\$1' )\n .replace( /[\\f]/g, '\\\\f' )\n .replace( /[\\...
javascript
edit
0
1
mit
22a15baa9bac645b1ffb58fa87233143627cf671
jamespamplin/plugin-ng-template
ng-template.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Use this hook to manipulate incoming or outgoing data.\n// For more information on hooks see: http://docs.feathersjs.com/api/hooks.html\n\nmodule.exports = function (options = {}) {\n // eslint-disable-line no-unused-vars\n return ...
javascript
edit
0
9
mit
cc662f1bfdd92dff3c36c492bc4fee64ca2668f6
sscaff1/ccs-feathers,sscaff1/ccs-feathers
src/hooks/create-user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst bcrypt = require('bcrypt')\n\nmodule.exports = function (sequelize, DataTypes) {\n const User = sequelize.define('User', {\n id: {\n primaryKey: true,\n type: DataTypes.UUID,\n defaultValue: DataTypes.UUIDV4\n ...
javascript
edit
0
2
apache-2.0
d48b2c7b53e67f271118dfb33f44ed44137b52e1
cesarandreu/bshed,cesarandreu/bshed
models/user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconsole.log(\"Courses+ background page!\");\ncpal.request.addBeforeSendHeaders([\"*://courses2015.dalton.org/*\"], function(details) {\n\tif (details.url.indexOf(\"user/icon/dalton/\") > -1) {\n\t\tdetails.requestHeaders.push({name: 'X-...
javascript
edit
0
9
mit
9235fec23dd1089ee8c4a78d49f68f1b532fed94
CoursesPlus/CoursesPlus,CoursesPlus/CoursesPlus
etc/bg.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { rhythm } from 'utils/typography'\n\nconst ImagePage = (props) => {\n console.log(props)\n const {regular, retina} = props.data.image\n return (\n <div>\n <p>{props.data.image.FileName}</p>\...
javascript
edit
0
2
mit
3ced3e98bc7dd9f692728da5244b2dead8203da6
0x80/gatsby,Khaledgarbaya/gatsby,danielfarrell/gatsby,fk/gatsby,0x80/gatsby,danielfarrell/gatsby,gatsbyjs/gatsby,mingaldrichgan/gatsby,chiedo/gatsby,0x80/gatsby,fk/gatsby,gatsbyjs/gatsby,okcoker/gatsby,mingaldrichgan/gatsby,fk/gatsby,ChristopherBiscardi/gatsby,mickeyreiss/gatsby,chiedo/gatsby,gatsbyjs/gatsby,danielfarr...
examples/image-gallery/templates/image-page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert');\nvar request = require('supertest');\nvar exec = require('child_process').exec;\n\nvar application = require(__dirname + '/server.js');\n\ndescribe('server', function () {\n before(function () {\n ...
javascript
edit
0
1
mit
25883839e7b996d47784c32912c0a9f20abe3cca
kanbanana/knowledgebase,kanbanana/knowledgebase,kanbanana/knowledgebase
development/server/server.spec.js
rejected_duplicate
Near-duplicate of sample 79655
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar tap = require(\"../\")\n\ntap.test(\"trap result\", function (t0) {\n t0.plan(3)\n \n var t1 = new(tap.Harness)(tap.Test).test()\n \nconsole.log('here')\n t1.plan(1)\n \n t1.on(\"result\", function (res) {\n if (res.wanted...
javascript
edit
0
2
mit
c0e0c0420c51732d0d8ab574af014d0c09c10192
chbrown/node-tap,strongloop-forks/node-tap,strongloop-forks/node-tap,jkrems/node-tap,evanlucas/node-tap,Dignifiedquire/node-tap-core,othiym23/node-tap,isaacs/node-tap,jkrems/node-tap,dominictarr/node-tap,myndzi/node-tap,othiym23/node-tap,chbrown/node-tap,jinivo/marhert,myndzi/node-tap,Raynos/node-tap,iarna/node-tap,tap...
test/result-trap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport request from 'request';\n\nfunction call(endpoint, method, qs, json) {\n let options = {\n uri: `http://localhost/api/${endpoint}`,\n method\n };\n if (typeof qs !== 'undefined') {\n options.qs = qs;...
javascript
edit
0
3
unlicense
71e3042184626c37d9cff421743589b3e21a3e29
TheFourFifths/consus,TheFourFifths/consus
test/util/mock-client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport {observer} from 'mobx-react';\nimport Services from '../components/Services';\nimport Tasks from '../components/Tasks';\nimport FlatButton from 'material-ui/FlatButton';\nimport { Link }...
javascript
edit
0
1
mit
274c3c63cc0f8376c8d20cf8844768933ad0c11f
jsalonen/swarmist,jsalonen/swarmist
client/src/containers/Dashboard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar subscriptions = new SubsManager();\n\nRouter.configure({\n layoutTemplate: 'layout',\n loadingTemplate: 'loading',\n notFoundTemplate: 'notFound'\n});\n\nRouter.route('/', {\n name: 'home',\n waitOn: function() {\n ...
javascript
edit
0
1
mit
8b6b07a2e46763b1f42f8f99cfe07ce30517e10d
dexterneo/mangas,dexterneo/mangas,dexterneo/mangatek,dexterneo/mangatek
lib/router.js
rejected_duplicate
Near-duplicate of sample 99363
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { fromJS } from 'immutable';\nimport {\n SERVER_DATA_AUTHORIZE,\n SERVER_DATA_BALANCE,\n SERVER_DATA_PAYOUT_CURRENCIES,\n SERVER_DATA_BUY,\n UPDATE_TOKEN,\n} from '../_constants/ActionTypes';\n\nconst initialState ...
javascript
edit
0
7
mit
743c72c930d1e5b83492e778d45c3950c2ba397d
nuruddeensalihu/binary-next-gen,qingweibinary/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,binary-com/binary-next-gen,binary-com/binary-next-gen,qingweibinary/binary-next-gen,qingweibinary/binary-next-gen,nazaninreihani/binary-n...
src/_reducers/AccountReducer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by Wayne on 16/2/22.\n */\n\nvar config = require('./config/config');\nvar setup = require('./config/setup')();\nvar express = require('./config/express');\n\n\nnew express().listen(config.port);\nconsole.log('process.en...
javascript
edit
0
1
mit
4142327d11e8efc2d7de074659a065565245abe1
zwmei/NXQS,zwmei/NXQS
flava/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction RecaptchaV3() {\n $(\".recaptcha-v3\").each(function () {\n var el = $(this);\n var clientId = grecaptcha.render($(el).attr(\"id\"), {\n 'sitekey': $(el).attr('data-sitekey'),\n 'badge': $...
javascript
edit
0
1
mit
9ad051a99797c70c2f806409d342d25aa91431a9
concrete5/concrete5,jaromirdalecky/concrete5,deek87/concrete5,olsgreen/concrete5,olsgreen/concrete5,jaromirdalecky/concrete5,haeflimi/concrete5,mlocati/concrete5,mlocati/concrete5,rikzuiderlicht/concrete5,mlocati/concrete5,deek87/concrete5,deek87/concrete5,MrKarlDilkington/concrete5,MrKarlDilkington/concrete5,hissy/con...
concrete/js/captcha/recaptchav3.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar WorldConstructor = function() {\n return function(callback) { callback(this) };\n};\nmodule.exports = WorldConstructor;\n\n```\n\nApply this change: Simplify default World constructor callback" }, { "role": "assistant", ...
javascript
edit
0
1
mit
9c3f28abade0f393e2aba5f5960756fb24832a74
AbraaoAlves/cucumber-js,Telogical/CucumberJS,marnen/cucumber-js,MinMat/cucumber-js,richardmcsong/cucumber-js,bluenergy/cucumber-js,AbraaoAlves/cucumber-js,h2non/cucumber-js,MinMat/cucumber-js,Telogical/CucumberJS,h2non/cucumber-js,vilmysj/cucumber-js,mhoyer/cucumber-js,marnen/cucumber-js,richardmcsong/cucumber-js,vilmy...
lib/cucumber/support_code/world_constructor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function () {\n var locationList = $(\"#location-list\");\n function populateLocations(features) {\n locationList.empty();\n $.each(features, function(i, v) {\n $(\"<li/>\").appendTo(locationList)\n .toggleClass(\"...
javascript
edit
0
2
apache-2.0
bd84d284e22e663535a1d64060dacbea4eb10b30
resbaz/resbaz-2016-02-01,BillMills/resbaz-site,BillMills/resbaz-site,resbaz/resbaz-2016-02-01
js/locations.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// These tests are for locale independent features\n// locale dependent tests would be in locale test folder\nimport { module, test } from '../qunit';\nimport moment from '../../moment';\n\nmodule('calendar');\n\ntest('passing a functio...
javascript
edit
0
1
mit
476c12381d7364fddb46c158b6e13bfeb940cc02
PKRoma/moment,SkReD/moment,Oire/moment,OtkurBiz/moment,moment/moment,monoblaine/moment,xkxx/moment,optimizely/moment,optimizely/moment,xkxx/moment,xkxx/moment,Oire/moment,scriptrdotio/moment,joelmheim/moment,OtkurBiz/moment,ze-pequeno/moment,moment/moment,gabrielmaldi/moment,samuelfullerthomas/moment,maggiepint/moment,...
src/test/moment/calendar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Game Controller\n// A checkers board has 64 squares like a chess board but it only uses 32 squares all the same color\n// Each player has 12 pieces and pieces that make until the last squares on the enemy side is promoted\n// Promote...
javascript
edit
0
1
mit
80d5eb3fa1d3d4653e5d67f62b8a5d8ed6c7a3ca
RenanBa/checkers-v1,RenanBa/checkers-v1
js/game.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\n/**\n * Method using a factory pattern variant to get a reducer\n * for a particular page or page style.\n *\n * For a new page - create a constant object with the\...
javascript
edit
0
2
mit
9a5b708be7e705acfb87ddaa2117c196621cf616
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/pages/dataTableUtilities/reducer/getReducer.js
rejected_duplicate
Near-duplicate of sample 86027
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require('util');\n\nvar levels = [\n 'silly',\n 'input',\n 'verbose',\n 'prompt',\n 'debug',\n 'http',\n 'info',\n 'data',\n 'help',\n 'warn',\n 'error'\n];\n\nlevels.forEach(function(level) {...
javascript
edit
0
2
mit
620f3cdaab7158d0430dd00c2a8b2adadabb7ea9
nylen/node-web-template,nylen/node-web-media-player
lib/logger.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component, PropTypes} from 'react';\n\nexport default class Span extends Component {\n render() {\n const {children, span} = this.props;\n\n const style = {\n boxSizing: 'border-box',\n display: 'flex',\n...
javascript
edit
0
5
bsd-3-clause
4d909497a1c18d05b46cb6b4115dbd6ad5b0656a
interactivethings/catalog,interactivethings/catalog,interactivethings/catalog,interactivethings/catalog
src/components/Specimen/Span.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Mailgun = require('mailgun-js');\nvar packageData = require('../package.json');\n\nmodule.exports = function(options) {\n return new MailgunTransport(options);\n};\n\nfunction MailgunTransport(options) {\n this.op...
javascript
edit
0
2
mit
e580b1c8dc4e2a09feaa5b6be00a3e8d1ea31e01
orliesaurus/nodemailer-mailgun-transport,wmcmurray/nodemailer-mailgun-transport,rasteiner/nodemailer-mailgun-transport
src/mailgun-transport.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport Polyglot from 'node-polyglot';\n\n// Provider root component\nexport default class I18n extends Component {\n constructor(props) {\n super(props);\n\n this._polyglot = new Polyglo...
javascript
edit
0
2
mit
73c4dd83b679457a2d1ff6334fb0bd563e0030d5
nayaabkhan/react-polyglot,nayaabkhan/react-polyglot
src/i18n.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n/*eslint no-underscore-dangle: 0*/\nvar ElementFactory = require('./ElementFactory.js');\nvar elem = new ElementFactory({});\nvar stream = require('stream');\n\nvar ToHTML = function(options) {\n this.options = options;\...
javascript
edit
0
6
isc
1e94858c1498a5cc429aeccdfdd8b2d92615decd
ironikart/html-tokeniser,ironikart/html-tokeniser
lib/toHTML.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Firebase from 'firebase'\nimport Vue from 'vue'\nimport VueRouter from 'vue-router'\n\nimport App from './App.vue'\n\nVue.use(VueRouter)\n\nlet router = new VueRouter({\n hashboang: false,\n history: true,\n})\n\nlet MEGAKanban...
javascript
edit
0
1
mit
dd5b51fe036ffa661c847e70d03eb02d6926e21a
lunardog/MEGAKanban,lunardog/MEGAKanban
src/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n // This is my local Docker IRC server\n var defaultHost = '192.168.99.100:6667';\n\n angular.module('app.factories.chat', []).\n factory('chat', Chat);\n\n Chat.$inject = ['$websoc...
javascript
edit
0
1
mit
e28021852e496cbe943f5b2b3bee1fb6353a629d
BigRoom/mystique,BigRoom/mystique
src/js/factories/chat.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { getCurrentTitle, getCurrentURL } from \"./page.js\";\n\nlet __sharedTracker = null;\n\nexport default class LoginTracker {\n username = \"\";\n password = \"\";\n _url = getCurrentTitle();\n _title = getCurrentTitle...
javascript
edit
0
2
mit
ef08b8e74ece8daafa19e6c788a55f49fb07d15c
perry-mitchell/buttercup-chrome,perry-mitchell/buttercup-chrome,buttercup-pw/buttercup-browser-extension,buttercup-pw/buttercup-browser-extension
source/tab/LoginTracker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar PluginPage = require('./PluginPage');\n\nvar page = new PluginPage('BarcodeScanner', 'cordova-plugin-barcodescanner', function(parent) {\n\n new tabris.Button({\n layoutData: {left: 10, top: 10, right: 10},\n text: 'Scan Barc...
javascript
edit
0
2
bsd-3-clause
9f7f601f966b8abb784d28a87703d952ffca5282
eclipsesource/tabris-js,eclipsesource/tabris-js,eclipsesource/tabris-js
examples/cordova/modules/BarcodeScannerPage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('anol.mouseposition', [])\n\n.directive('anolMousePosition', ['MapService', function(MapService) {\n return {\n restrict: 'A',\n require: '?^anolMap',\n scope: {},\n link: {\n pre...
javascript
edit
0
3
mit
973d38c62da08d6f19b49f1cbd097694080331aa
omniscale/orka-app,omniscale/orka-app,hgarnelo/orka-app,hgarnelo/orka-app
app/anol/modules/mouseposition/mouseposition-directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require(\"path\");\nconst ROOT = require(\"./config/path-helper\").ROOT;\nconst WebpackIsomorphicTools = require(\"webpack-isomorphic-tools\");\n\nfunction hotReloadTemplate(templatesDir) {\n require(\"marko/hot-reload\")....
javascript
edit
0
3
mit
348197bb61eb41bd9c37295f961084448156d47b
hung-phan/all-hail-the-R,hung-phan/koa-react-isomorphic,hung-phan/koa-react-isomorphic,hung-phan/koa-react-isomorphic,hung-phan/all-hail-the-R
prod-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n *\n * WSO2 Inc. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance ...
javascript
edit
0
0
apache-2.0
63d2a9cd58d424f13a38e8a078f37f64565a2771
wso2/carbon-dashboards,ksdperera/carbon-dashboards,lasanthaS/carbon-dashboards,wso2/carbon-dashboards,ksdperera/carbon-dashboards,ksdperera/carbon-dashboards,lasanthaS/carbon-dashboards,lasanthaS/carbon-dashboards
components/dashboards-web-component/jest.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Settings = {\n setUrls: function(urls) {\n localStorage.setItem('urls', JSON.stringify(urls));\n },\n getUrls: function() {\n var urls = localStorage.getItem('urls') || '';\n return JSON.parse(urls);\n }\n};\n\n```\n\nA...
javascript
edit
0
2
mit
65c2c4b7ee3833e8ea30deb701cfcbb337562d7e
craigerm/unstyled,craigerm/unstyled
lib/settings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Controller from '@ember/controller';\nimport {inject as service} from '@ember/service';\n\nexport default class UploadThemeController extends Controller {\n @service config;\n\n get isAllowed() {\n return !this.confi...
javascript
edit
0
3
mit
f65c5a7f8b74fa3af000dec19f69d082a684fa30
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
ghost/admin/app/controllers/settings/theme/uploadtheme.js
rejected_duplicate
Near-duplicate of sample 99598
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from './template';\n\n\nexport default Ember.Component.extend({\n layout,\n\n store: Ember.inject.service(),\n internalState: Ember.inject.service(),\n\n leftTitle: null,\n leftVi...
javascript
edit
0
1
mit
bab8097c98d3d07b10ab096b9445f8585f416e69
whole-tale/dashboard,whole-tale/dashboard,whole-tale/dashboard
app/components/dashboard/unified-view/component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nudefine(function() {\n return function(Factory, groupInstance) {\n\n return function() {\n var child = arguments[0];\n var args = 2 <= arguments.length ? [].slice.call(arguments, 1) : [];\n\n if (!( child instanceof F...
javascript
edit
0
5
mit
0cca0f1f63b05f4a61696e97a14b95add3538129
freezedev/flockn,freezedev/flockn
src/addable.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// considered using the node url library, but couldn't resolve dependencies\n// without serious modifications, leading to maintenance nightmares\n\nmodule.exports = {\n parse: function(url) {\n // rudimentar...
javascript
edit
0
16
mit
d2b8d6ddd32ae28d2487f0d97848851e3b246626
2sidedfigure/ouija
lib/url.js
rejected_complexity
Cyclomatic complexity too high: 16
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Service from '@ember/service';\nimport Evented from '@ember/object/evented';\n\nexport default Service.extend(Evented, {\n\n showWindow: false,\n shownComponents: null,\n popupContent: null,\n\n addComponent(path) {\n if (...
javascript
edit
0
4
apache-2.0
a96bd4f6c0063039b96d6e332fa6556b6f26d3ec
ExplorViz/explorviz-ui-frontend,ExplorViz/explorviz-ui-frontend,ExplorViz/explorviz-ui-frontend
app/services/additional-data.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Terminal client for the Ma3Route REST API\n */\n\n\n\"use strict\";\n\n\n// npm-installed modules\nvar decamelize = require(\"decamelize\");\nvar parser = require(\"simple-argparse\");\n\n\n// own modules\nvar lib = require(\".\...
javascript
edit
0
3
mit
e4bdc029ca5e0345077de8fd2620638f30b20eee
GochoMugo/ma3route-cli
lib/cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nforge['contact'] = {\n\t'select': function (success, error) {\n\t\tforge.internal.call(\"contact.select\", {}, success, error);\n\t},\n\t'selectById': function (id, success, error) {\n\t\tforge.internal.call(\"contact.selectById\", {id:...
javascript
edit
0
2
bsd-2-clause
1f7a5c9aa26d4752336fb5cd9e651f52c0d72253
trigger-corp/trigger.io-contact,trigger-corp/trigger.io-contact
module/javascript/module.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// import node packages\nimport React from 'react';\n\nfunction Flashcard(props) {\n return (\n <li>\n Question: <span>{this.props.question}</span><br />\n Answer: <span>{this.props.answer}</span>\n </li>\n );\n}\n\nex...
javascript
edit
0
1
mit
f3ce116a7cb1f7b84897596be33fab2632874910
subnotes/gemini,subnotes/gemini,subnotes/gemini
app/src/presenters/Flashcard.js
rejected_duplicate
Near-duplicate of sample 99402
true