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#! /usr/bin/env node\n\nvar fs = require('fs-promise');\nvar compiler = require('./compiler');\n\nfs.lstat('tomahawk/resolver.js').then(function(stats) {\n if(!stats.isFile()) {\n throw new Error();\n }\n}, function () {\n ...
javascript
edit
0
2
mit
2d1084f6db1b4d3ceb62beb0fa76766713e92aee
dschmidt/tomahawkcc
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { timer as d3Timer } from 'd3-timer';\n\nexport default function PeriodicJS(opts) {\n\n\tconst { duration, displaySelector, callback } = opts;\n\tlet timer;\n\n\tfunction displayTimeLeft(time) {\n\n\t\t// find the current display...
javascript
edit
0
2
mit
47a314dc3d23bfd37ea489afb04f25e3d47e38e5
gabrielflorit/periodic-js,BostonGlobe/periodic.js
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require('util');\n\n\nvar DECLARATION = 'window.__env__ = window.__env__ || {};\\n',\n TEMPLATE = function(name) {\n var tmpl = 'window.__env__[\\'%s\\'] = \\'%s\\';\\n'\n return util.format(tmpl, name, process.e...
javascript
edit
0
2
mit
c9780cd5c4800106557d328b0877640ac6831596
jsok/karma-env-preprocessor
index.js
rejected_duplicate
Near-duplicate of sample 91978
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nFeature('Render The Map');\n\nScenario('CartoDB loads the leaflet map', function* (I) {\n\n I.amOnPage('/test/examples/leaflet.html');\n\n I.seeInTitle('CartoDB.js example');\n\n let cartodbType = yield I.executeScript(function () ...
javascript
edit
0
1
mit
230bdf1fbd7110f1cf809688403a0acf098c204d
atd/cartodb.js,atd/cartodb.js
test/acceptance/leaflet_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n name: require('./package').name,\n\n config(environment, appConfig) {\n const addonConfig = appConfig['emberKeyboard'] || {};\n\n if ('disableInputsInitializer' in addonConfig) {\n this...
javascript
edit
0
4
mit
112e2fc54c744755d1b47ecf1622b89e1209225e
null-null-null/ember-keyboard,null-null-null/ember-keyboard
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require(\"path\");\nconst rootDir = path.normalize(path.join(__dirname, \"..\"));\nconst tester = path.join(rootDir, \"node_modules\", \"vscode\", \"bin\", \"test\");\nconst cp = require(\"child_process\");\nlet tests = pro...
javascript
edit
0
3
mit
3073f3759a336a6505ea253624f430c142d655ae
kimushu/rubic-vscode,kimushu/rubic-vscode,kimushu/rubic-vscode,kimushu/rubic-vscode
tools/run-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport { NativeAppEventEmitter, NativeModules } from 'react-native';\nconst ReactNativeBluetooth = NativeModules.ReactNativeBluetooth;\n\nconst didChangeState = (callback) => {\n var subscription = NativeAppEventEmitte...
javascript
edit
0
2
apache-2.0
b96ee1ec36e834da8922ed5a6d9df76da23739e4
sogilis/react-native-bluetooth-manager,sogilis/react-native-bluetooth,sogilis/react-native-bluetooth,sogilis/react-native-bluetooth-manager,sogilis/react-native-bluetooth-manager,sogilis/react-native-bluetooth-manager,sogilis/react-native-bluetooth,sogilis/react-native-bluetooth
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint node:true*/\nmodule.exports = {\n description: ''\n\n // locals: function(options) {\n // // Return custom template variables here.\n // return {\n // foo: options.entity.options.foo\n // };\n // }\n\n beforeI...
javascript
edit
0
1
mit
4862268f87de2920062c559b7b8f79ea585cdeac
mu-semtech/ember-mu-login,mu-semtech/ember-mu-login
blueprints/ember-mu-login/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function () {\n // Dutch\n return {\n errorLoading: function () {\n return 'De resultaten konden niet worden geladen.';\n },\n inputTooLong: function (args) {\n var overChars = args.input.length - args.maximu...
javascript
edit
0
3
mit
eee70fd9af5a97149513cc434d06a22b78f4196e
ZaArsProgger/select2,khallaghi/select2,fk/select2,inway/select2,jkgroupe/select2,binary-koan/select2,goodwall/select2,MAubreyK/select2,select2/select2,Currency-One/select2-v4,goodwall/select2,stretch4x4/select2,alexlondon07/select2,bottomline/select2,AhmedMoosa/select2,theyec/select2,ZaArsProgger/select2,NabiKAZ/select...
src/js/select2/i18n/nl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport store from '../store.js';\nimport { restart } from '../actions/name-actions';\nimport { selectGender } from '../actions/gender-actions';\nimport M...
javascript
edit
0
2
apache-2.0
1037242c6bad75240d147ac5333fa12f2ba45f62
johnbrowe/barnanavn,johnbrowe/barnanavn,johnbrowe/barnanavn
src/components/Restart.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\n\n// Load .env for development environments\nrequire('dotenv').load();\n\nexports.initLocals = function(req, res, next) {\n\n var locals = res.locals;\n\n locals.user = req.user;\n locals.buy = {\n ...
javascript
edit
0
3
mit
28d67a89ac7f1e4d3cabd241612d1e3fa496bfdd
jsconfuy/site-2016,jsconfuy/site-2016,jsconfuy/site-2015,jsconfuy/site-2015
routes/middleware.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// These URL paths will be transformed to CN mirrors.\nvar mirrors = {\n \"//developers.google.com\" : \"//developers.google.cn\",\n \"//firebase.google.com\" : \"//firebase.google.cn\",\n \"//developer.android.com\" : \"//develope...
javascript
edit
0
5
apache-2.0
50f298f5172fd8f3ff01718296af81a3e6fa652d
chenzhuo914/google-cn-devsites-extension
config.js
rejected_duplicate
Near-duplicate of sample 82127
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n\n var url = grunt.option('url') || 'http://localhost:3000';\n\n // Project configuration.\n grunt.initConfig({\n bowercopy: {\n options: {\n clean: false\n ...
javascript
edit
0
3
mit
7921c20c88fee0c8d784cf5182de75ac4f1a0ef2
nquocnghia/TicTacToe-multiplayer
html/tictactoe/Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global Raven */\n\nimport config from '../config/environment';\nimport Ember from 'ember';\n\nexport function initialize() {\n var _onerror;\n\n Raven.config(config.sentry.dsn, {\n whitelistUrls: config.sentry.whitelistUrls\n }...
javascript
edit
0
2
mit
b1ae2e8ff0c5491f873909f14c628fd3a4474c34
hussfelt/ember-cli-sentry,pifantastic/ember-cli-sentry,hussfelt/ember-cli-sentry,dschmidt/ember-cli-sentry,pifantastic/ember-cli-sentry,damiencaselli/ember-cli-sentry,tmayr/ember-cli-sentry,damiencaselli/ember-cli-sentry,dschmidt/ember-cli-sentry,tmayr/ember-cli-sentry
app/initializers/raven-setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('progressButtonDemo', ['progressButton'])\n\t.controller('ProgressButtonsCtrl', function($scope, $interval) {\n\t\t$scope.buttons = [\n\t\t\t{ value: 0.0 },\n\t\t\t{ value: 0.0 },\n\t\t\t{ value: 0.0 }\n\t\t]\n\n\t\t$scop...
javascript
edit
0
3
bsd-2-clause
7fa455e8220fffbec376038e3a665bbfc284d7d3
SonicHedgehog/angular-progress-button,SonicHedgehog/angular-progress-button
example/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar DGT = require('..');\nvar board = new DGT.Board('/dev/ttyUSB0');\n\nboard.on('ready', function() {\n console.log('Serial No:', board.serialNo);\n console.log('Version:', board.versionNo);\n console.log('-----');\n});\n\nboard.on(...
javascript
edit
0
1
mit
d02c83294abd5415fb1c0ba11c3a6e3786b39be1
fnogatz/node-dgtchess
examples/basic.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmd.headers = ({storage: {state}, detect}) => {\n\n var callback = ({method, url, responseHeaders}) => {\n if (method !== 'GET') {\n return {responseHeaders}\n }\n\n var header = responseHeaders.find(({name}) => /content...
javascript
edit
0
10
mit
3fe1cf8a2430a1bc64ade5e9101a2c62c02ace87
simov/markdown-viewer,simov/markdown-viewer,simov/markdown-viewer
background/headers.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Update sourcemappingurl declaration in example" }, { "role": "assistant", "content": "function add(a,b){\"use strict\";return a+b}function multiply(a,b){\"use strict\";return a*b}function divide(a,b){\"use strict\";try{return...
javascript
new_file
0
2
bsd-3-clause
220ab799adbee20c79b3cf4853e249ca864073a5
getsentry/raven-js,housinghq/main-raven-js,getsentry/raven-js,Mappy/raven-js,Mappy/raven-js,getsentry/raven-js,housinghq/main-raven-js,housinghq/main-raven-js,getsentry/raven-js,Mappy/raven-js
example/file.min.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst defer = () => {\n let state = false // Resolved or not\n let value\n const callbacks = []\n const resolve = val => {\n if (state) {\n return\n }\n\n state = true\n value = val\n callbacks.forEach(cb => {\n ...
javascript
edit
0
3
mit
e5ef8ec9b33738d0a7526f3cb7f0cee33edc5d75
DanSnow/vue-recaptcha,DanSnow/vue-recaptcha,DanSnow/vue-recaptcha,DanSnow/vue-recaptcha
src/defer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar etcdApp = angular.module('etcdApp', ['ngRoute', 'etcdResource', 'timeRelative'])\n .config(['$routeProvider', function ($routeProvider) {\n //read localstorage\n var previous_path = localStorage.getItem('etcd...
javascript
edit
0
3
apache-2.0
26f02ee1d137d48aa51b17d9ab34a2cf569c471d
philips/nya
app/scripts/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('quakeStatsApp')\n .controller('MainCtrl', ['$scope',\n function ($scope) {\n }]);\n\n```\n\nApply this change: Tidy Up: JSHint clean up" }, { "role": "assistant", "content": "'us...
javascript
edit
0
1
mit
51869f3736dfaf86b930e893095ddd56800cddff
mbarzeev/quake-stats,mbarzeev/quake-stats
app/scripts/controllers/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n$(() => {\n // This code will be executed when the user visits /login and\n // dev_login.html is rendered.\n if ($(\"[data-page-id='dev-login']\").length > 0) {\n if (window.location.hash.substring(0, ...
javascript
edit
0
3
apache-2.0
737d796e1c22f9623629533528666d6fc8dbeb11
rht/zulip,kou/zulip,kou/zulip,hackerkid/zulip,showell/zulip,showell/zulip,hackerkid/zulip,hackerkid/zulip,eeshangarg/zulip,punchagan/zulip,andersk/zulip,rht/zulip,kou/zulip,eeshangarg/zulip,eeshangarg/zulip,rht/zulip,kou/zulip,kou/zulip,rht/zulip,zulip/zulip,showell/zulip,zulip/zulip,andersk/zulip,punchagan/zulip,eesha...
static/js/portico/dev-login.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmodule(\"About Operators (topics/about_operators.js)\");\n\ntest(\"addition\", function() {\n var result = 0;\n //starting i at 0, add i to result and increment i by 1 until i is equal to 5\n for (var i = 0; i <= 5; i++) {\n res...
javascript
edit
0
2
mit
9da169936480a70c4ceb72c866d11d59a913f269
supportbeam/javascript_koans,supportbeam/javascript_koans
topics/about_operators.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { fieldInstanceBoost, scoreInstanceBoost } from 'sajari'\n\nimport Base from './Base.js'\nimport Components from './constants/QueryComponentConstants.js'\n\nconst IndexBoost = props => {\n const { data...
javascript
edit
0
1
mit
de5db62d85ae039e85345e354c851136f91dae9c
sajari/sajari-sdk-react,sajari/sajari-sdk-react
src/api/IndexBoost.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default (history, catchAllHandler) => {\n return next => (reducer, initialState) => {\n const store = next(reducer, initialState);\n\n return {\n ...store,\n dispatch(action) {\n const { type, meta } = act...
javascript
edit
0
9
mit
00ff08a356297f55340090cbb2c390b8a2671350
johanneslumpe/redux-react-router-transitions,johanneslumpe/redux-history-transitions,johanneslumpe/redux-react-router-transitions,johanneslumpe/redux-history-transitions
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst makersList = require('../../fixtures/makers');\nmodule.exports = (related, options) => {\n // If any of these roles match, see more button will link to\n // search page with 'maker' filter selected as the person\n // If not, it...
javascript
edit
0
3
mit
c20ef8fffd632a65d8066d1f0b2ef3f0252fd8e3
TheScienceMuseum/collectionsonline,TheScienceMuseum/collectionsonline
templates/helpers/ifcreator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Return Promise\nconst imageMerge = (sources = []) => new Promise(resolve => {\n\t// Load sources\n\tconst images = sources.map(src => new Promise(resolve => {\n\t\tconst img = new Image();\n\t\timg.onload = () => resolve(img);\n\t\ti...
javascript
edit
0
1
mit
fca880fb2a71c775a718b7a7f1d7d75d005a2d60
lukechilds/merge-images
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\r\n\r\nexport default class Input {\r\n\tconstructor(element, canvas) {\r\n\t\tthis.pressedKeys = {};\r\n\t\tthis.framePressedKeys = {};\r\n\t\tthis.previousPressedKeys = {};\r\n\t\telement.addEventListener('keydown', (e) ...
javascript
edit
0
4
mit
553193db39f64370f896ad369492fe23031f6173
paul-maxime/yaje.js
src/input.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright 2015 The AMP HTML Authors. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy o...
javascript
edit
0
2
apache-2.0
24234d0ed33bb0e80b3015a2389f58b85e98575f
interspacejp/amphtml,Gregable/amphtml,yieldbot/amphtml,ithinkihaveacat/amphtml,sharethrough/amphtml,fullspeed-sp/amphtml,fullspeed-sp/amphtml,ampproject/amphtml,luciancrasovan/amphtml,jdelhommeau/amphtml,zhucl/amphtml,BenDz/amphtml,adtechnology/amphtml,burtcorp/amphtml,shawnbuso/amphtml,aghassemi/amphtml,jridgewell/amp...
ads/openadstream.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"Buttercup.vendor\", function() {\n\n\t\"use strict\";\n\n\tdescribe(\"iocane\", function() {\n\n it(\"derives the correct password\", function(done) {\n window.Buttercup.vendor.iocane.derivation.deriveFromPa...
javascript
edit
0
2
mit
aa02445f61511d3f02f459c7691d592e15737961
perry-mitchell/buttercup-core-web,buttercup-pw/buttercup-core-web
tests/Buttercup.vendor.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\n// This is a class of a component\n// To create an instance of this class use <App />\nconst App = function() {\n return <div>Hi</div>;\n}\n\n// Render App inside an elem...
javascript
edit
0
1
mit
95f54ab73fd49b939e97a12b0e3dbda4416cb153
RobGThai/ReduxTutorial,RobGThai/ReduxTutorial
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Request = require('request');\nconst env2 = require('env2');\nconst HapiCookie = require('hapi-auth-cookie');\n\nenv2('./config.env');\n\nmodule.exports = {\n path: '/welcome',\n method: 'GET',\n handler: (req, rep) => {\n c...
javascript
edit
0
2
mit
31a08e11908545fb7bc9e2b832c4f0cdb5596c7e
The-Authenticators/gitpom,The-Authenticators/gitpom
src/routes/welcome.js
rejected_duplicate
Near-duplicate of sample 84082
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar crypto = require('crypto')\n , qs = require('querystring')\n ;\n\nfunction sha1 (key, body) {\n return crypto.createHmac('sha1', key).update(body).digest('base64')\n}\n\nfunction rfc3986 (str) {\n return encodeURIComponent(str)\...
javascript
edit
0
1
apache-2.0
b5fa773994de1799cf53491db7f5f3ba32825b20
Aloomaio/request,neo-z/request,udp/request,robu3/request,udp/request,rbramwell/request,not001praween001/request,ryanwholey/request,IbpTeam/node-request,faradayio/request,zhouweiming/request,paulomcnally/request,manishnakar/request,kmulvey/request,lxe/request,rbramwell/request,LoicMahieu/request,manishnakar/request,Loic...
oauth.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('Bot class', function () {\n\n beforeEach(function () {\n s.util.loadModels = function(options) {\n var toLoad = options.models.length;\n\n // Hold models\n var models = {};\n\n var loaded = function(nam...
javascript
edit
0
1
bsd-2-clause
124628a8a9495c07e4b943bf33250ca425f3833b
satellite-game/Satellite,satellite-game/Satellite,satellite-game/Satellite
tests/client/unit/s.BotSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport sequelize from '../config/sequelize';\nimport DataTypes from 'sequelize';\nimport Officer from './officer';\n\nexport default sequelize.define('committees', {\n name: {\n type: DataTypes.STRING,\n allowNull: false,\n pr...
javascript
edit
0
1
mit
18312bdbffca5370ed1b42742b03175712de1fa7
rit-sse/node-api,rit-sse/node-api,rit-sse/node-api
models/committee.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'fireplace-app',\n environment: environment,\n baseURL: '/fireplace-app',\n locationType: 'auto',\n contentSecurityPolicy:...
javascript
edit
0
4
bsd-3-clause
a06281ba4b018c9130bae374c528aeabeec37a9c
knshetty/fireplace-app,knshetty/fireplace-app
config/environment.js
rejected_duplicate
Near-duplicate of sample 69089
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport test from 'ava';\nimport Keyv from '../';\n\ntest('Keyv is a class', t => {\n\tt.is(typeof Keyv, 'function');\n\tt.throws(() => Keyv()); // eslint-disable-line new-cap\n\tt.notThrows(() => new Keyv());\n});\n\ntest('Keyv accepts ...
javascript
edit
0
1
mit
7a179d73ace07b772dcba246569027862a19ce00
lukechilds/keyv
test/unit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire('../helper');\n\nconst server = require('../../app/server')();\nconst assert = require('../support/assert');\nconst qs = require('querystring');\n\nconst QUERY = `SELECT 14 as foo`;\nconst API_KEY = 1234;\nconst...
javascript
edit
0
1
bsd-3-clause
9f4adbc3de54b0e47591783ad46da30fc14495ad
CartoDB/CartoDB-SQL-API,CartoDB/CartoDB-SQL-API
test/acceptance/handle-query.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nuser_pref('browser.console.showInPanel', true);\nuser_pref('browser.dom.window.dump.enabled', true);\nuser_pref('browser.firstrun.show.localepicker', false);\nuser_pref('browser.firstrun.show.uidiscovery', false);\nuser...
javascript
edit
0
0
apache-2.0
2d27cb1da63e0a024e92847376066623ef926e28
bh213/pdf.js,Snuffleupagus/pdf.js,mysterlune/pdf.js,1and1/pdf.js,Rob--W/pdf.js,EvilTrev/pdf.js,1and1/pdf.js,dsprenkels/pdf.js,tinderboxhq/pdf.js,datalanche/pdf.js,MultivitaminLLC/pdf.js,fkaelberer/pdf.js,mysterlune/pdf.js,nawawi/pdf.js,showpad/mozilla-pdf.js,xavier114fch/pdf.js,macroplant/pdf.js,tinderboxhq/pdf.js,skal...
test/resources/firefox/user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n\"use strict\";\n\ndescribe('Footer component', () => {\n let element = undefined;\n let $rootScope = undefined;\n let $compile = undefined;\n\n let mod = angular.module('tests.footer', []).service('Authentication', functi...
javascript
edit
0
3
mit
d887b30564bc19f3fa6080cfde3d10b1208081a2
monomelodies/monad,monomelodies/monad
tests/components/footer.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar webpack = require('webpack');\nvar _ = require('lodash');\n\nmodule.exports = function(options) {\n var config = {\n entry: [\n './src/js/main.js'\n ],\n output: {\n path: path.join(_...
javascript
edit
0
1
mit
470dc9834e913fcdae012ca64196d77fd96ac699
ianobermiller/nuclearmail,ianobermiller/nuclearmail
getWebpackConfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar db = require('../../models');\nvar config = require('../../config.js');\nvar authHelper = require('../../lib/auth-helper');\n\nmodule.exports = function (app, options) {\n\n app.get('/user/tokens',\n authHelpe...
javascript
edit
0
2
bsd-3-clause
0286f6f2e1813c9f534ae4113cb1040f7646f74a
ebu/cpa-auth-provider
routes/user/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Continuous delivery server\nconst { spawn } = require('child_process')\nconst { resolve } = require('path')\nconst { createServer } = require('http')\nconst { urlencoded } = require('body-parser')\n\nconst hostname = '127.0.0.1'\ncon...
javascript
edit
0
3
mit
446194ffb550cfbd825bfc00edaf2c5f62d61ee8
jsonnull/jsonnull.com,jsonnull/jsonnull.com,jsonnull/jsonnull.com
scripts/cd-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar d = require('d')\n\n , create = Object.create, setPrototypeOf = Object.setPrototypeOf;\n\nmodule.exports = function () {\n\tvar set, iterator, result, SubSet;\n\tif (typeof Set !== 'function') return false;\n\tif (...
javascript
edit
0
16
isc
603a928f3979ae11561df7f987f508a1a5124733
medikoo/es6-set
is-implemented.js
rejected_complexity
Cyclomatic complexity too high: 16
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Returns the bounding box of the specified text\n * @param {string} text - specifies the text\n * @returns {Array<number>}\n */\nexport const textBoundingBox = (text) => {\n return [text.length * 8, 17]; // Inconsolata font pr...
javascript
edit
0
2
mit
df849e239fb86c321242f0edc98fdd2fb2b1fa92
dudeteam/dude-graph-es6
src/renderer/utils/measure.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nRequests = new Mongo.Collection('requests');\n\nMeteor.methods({\n addRequest: function(requestAttributes) {\n check(Meteor.userId(), String);\n\n // TODO add more checks\n\n var request = _.extend(requestAttributes, {\n ...
javascript
edit
0
1
mit
bcdbd1fc17a13011c45242923585ead0b4d5307f
PUMATeam/puma,PUMATeam/puma
lib/collections/requests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport JobStatus from 'girder_plugins/jobs/JobStatus';\n\nJobStatus.registerStatus({\n WORKER_FETCHING_INPUT: {\n value: 820,\n text: 'Fetching input',\n icon: 'icon-download',\n color: '#89d2e2'\n },\n...
javascript
edit
0
0
apache-2.0
ae34140794738226dcdffd1951090a51a27bb59d
Kitware/girder,girder/girder,jbeezley/girder,girder/girder,kotfic/girder,manthey/girder,RafaelPalomar/girder,Xarthisius/girder,jbeezley/girder,adsorensen/girder,Kitware/girder,Xarthisius/girder,RafaelPalomar/girder,Xarthisius/girder,adsorensen/girder,girder/girder,kotfic/girder,adsorensen/girder,data-exp-lab/girder,Xar...
plugins/worker/web_client/JobStatus.js
rejected_duplicate
Near-duplicate of sample 79460
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTemplate.newPost.events({\n 'submit': function () {\n \"use strict\";\n event.preventDefault();\n var title = $('form .title').val();\n var url = $('form .url').val();\n Meteor.call('newPost', {\n title: title,\n ...
javascript
edit
0
2
mit
2292157d30e0c5d612a7ad7aa74f9e2b23bb7c61
rrevanth/news,rrevanth/news
client/views/newPost/newPost.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst db = require('./postgresql');\n\nconst { VOTING_FINISHED } = require('../../common/actionTypes/issues');\n\nconst Question = db.sequelize.models.issue;\n\nasync function addIssue(issue) {\n return Question.create(issue);\n}\n\nfu...
javascript
edit
0
2
mit
3937bd1802915e21bd860509ab5a7c4692c601b9
dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta
server/models/issue.accessors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */\n\ndescribe('Real Racing Telemetry Client App', function() {\n\n describe('Car list view', function() {\n\n beforeEach(function() {\n browser.get('htt...
javascript
edit
0
1
mit
f37d41006ada0f2f509d0abd9117e2edc3fe4ec8
optimized4u/real-racing-telemetry-client,optimized4u/real-racing-telemetry-client
test/e2e/scenarios.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar pingPong = function(userNumber) {\n if ((userNumber % 3 === 0) || (userNumber % 5 === 0)) {\n return true;\n } else {\n return false;\n }\n};\n\n```\n\nApply this change: Add beginning of code for user interface logic" },...
javascript
edit
0
3
mit
129d14040fda1f05f65581c99d43dd31d213892c
kcmdouglas/pingpong,kcmdouglas/pingpong
js/scripts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar nconf = require('nconf');\nvar toS3 = require('couch-to-s3');\nvar cred = require('./lib/cred.js');\n\nnconf.file('dev', 'config-dev.json').argv().env().file('config.json');\nnconf.defaults({\n\t\"dbUrl\": \...
javascript
edit
0
2
bsd-2-clause
156432eab24eb71df238670ddcd2a03eeb13a8ca
exclsr/backup-couchdb-to-s3
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Slickdeals Don't Track Me!\n// @version 1.1\n// @description Replaces outgoing Slickdeals tracking links with direct links.\n// @match http://slickdeals.net/f/*\n// @namespace https://github.co...
javascript
edit
0
4
mit
ae6a077b74fa85722e6284f8c916278681fe69d0
gg/slickdeals-dont-track-me
slickdeals-dont-track-me.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar SpotifyWebApi = require(\"../\");\n\n/*\n * This example shows how to search for a track. The endpoint is documented here:\n * https://developer.spotify.com/web-api/search-item/\n\n * Please note that this endpoint does not require ...
javascript
edit
0
2
mit
8bff1c1b92bb06869e472e8226eeedc6affcaee1
JMPerez/spotify-web-api-node,christophior/spotify-web-api-node,erezny/spotify-web-api-node,thelinmichael/spotify-web-api-node,UnbounDev/spotify-web-api-node,jlewallen/spotify-web-api-node
examples/search-for-tracks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ngetBestName = function(result){\n var bestName = \"\";\n if(typeof result[\"scientificName\"] !== \"undefined\"){\n bestName = result[\"scientificName\"];\n }\n if(typeof result[\"vernacularNames\"] !== \"undefined\" ...
javascript
edit
0
5
mit
c7c7bb6e838aceb8e4537e9f74f3c291136bbcbe
molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec
src/webroot/js/organismDetails.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Events provides abstract event messaging.\n *\n * @constructor\n * @param {Object} provider [description]\n */\nfunction Events(provider) {\n this.provider = provider;\n}\n\n/**\n * Returns a topic.\n *\n * @pa...
javascript
edit
0
2
mit
c3d432b4820e25fb6b0cfe49574fefca14d523ad
restorecommerce/chassis-srv,restorecommerce/chassis-srv
lib/events/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n[\n {\"name\": \"Leo Blokhuis\", \"hour\": 0},\n {\"name\": \"Rick van Velthuijzen\", \"hour\": 2},\n {\"name\": \"Frank van 't Hof\", \"hour\": 4},\n {\"name\": \"Emmely de Wild\", \"hour\": 6},\n {\"name\": \"Jan-Willem...
javascript
edit
0
0
mit
6d8e1aa93e403aa3a209fb06054a291d95eb3aa3
Willem3141/top2000-viewer,Willem3141/top2000-viewer,Willem3141/top2000-viewer
top2019/presenters.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n This file is generated and updated by Sencha Cmd. You can edit this file as\n needed for your application, but these edits will have to be merged by\n Sencha Cmd when upgrading.\n*/\n\n// DO NOT DELETE - this directive is ...
javascript
edit
0
0
apache-2.0
ee9097b481a075f2040d741ff91ba054dafdc166
NLeSC/eEcology-Annotation-UI,NLeSC/eEcology-Annotation-UI,NLeSC/eEcology-Annotation-UI
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Register JSON utilities\n */\n\nfunction registerJSON (cli, options, done) {\n cli.fs.registerSerializer('json', function (obj, opts) {\n if (opts.pretty) {\n return JSON.stringify(obj, null, 2)\n } else {\n ret...
javascript
edit
0
3
mit
65c4e8a8c825537fb45cf2d542da0691699517cd
msamblanet/connect-cli,anvilresearch/connect-cli,EternalDeiwos/connect-cli
lib/plugins/json.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport cx from 'clsx';\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nconst {\n useImperativeHandle,\n useRef,\n} = React;\n\nconst TextField = React.forwardRef(({\n className,\n type = 'text',\n icon,\n ...pr...
javascript
edit
0
2
mit
2b9e3b49e3698a408ba2dd4ee13f65d0e89d7d3c
u-wave/web,u-wave/web
src/components/Form/TextField.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n var $tabs = $('#search-results-tabs'),\n $searchForm = $('.js-search-hash');\n\n if($tabs.length > 0){\n $tabs.tabs({ 'defaultTab' : getDefaultSearchTabIndex(), scrollOnload: true });\n }\n\n function getDef...
javascript
edit
0
3
mit
a8ad3e5b430b876cdddad074a9f9f12eeac7debc
alphagov/frontend,alphagov/frontend,alphagov/frontend,alphagov/frontend
app/assets/javascripts/search.js
rejected_duplicate
Near-duplicate of sample 78930
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable */\nif (typeof global !== 'undefined') {\n // Node.js injections for Mocha tests\n global.chai = require('chai');\n global.path = require('path');\n global.noflo = require('../../src/lib/NoFlo');\n global.flowtrac...
javascript
edit
0
0
mit
f585ee33a2437300cd2ead17ed12f554c515064a
noflo/noflo
spec/utils/inject.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nFlowRouter.route('/', {\n name: 'home',\n action() {\n GAnalytics.pageview(); \n BlazeLayout.render('MainLayout')\n }\n});\n\nFlowRouter.route('/cases', {\n name: 'cases',\n action() {\n GAnalytics.pa...
javascript
edit
0
2
apache-2.0
a7f699ee7a304bbe1f35fd002e2803d6992577ad
easycase17/easycase,easycase17/easycase
lib/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function ({ $axios }) {\n $axios.defaults.baseURL = process.env.API_URL || 'https://5jojq7ahg5.execute-api.us-east-1.amazonaws.com/prod';\n $axios.defaults.headers.post['Content-Type'] = 'application/json';\n}\n\n```\n\...
javascript
edit
0
2
mit
a3e34856dbad3c7afff672eecb232a45d42a919d
joshukraine/ofreport.com,joshukraine/ofreport.com
plugins/axios.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n setTimeout(function() {\n var button = $(\"a.js-nav-week\")[0];\n if (button) {\n button.click();\n }\n }, 500);\n});\n\n```\n\nApply this change: Copy over previous rows in harvest" },...
javascript
edit
0
2
mit
c21b5edfc8401c3dd06779390ecdf0082969e01f
keith/dotfiles,keith/dotfiles,keith/dotfiles,keith/dotfiles,keith/dotfiles,keith/dotfiles
js/harvestapp.com.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar AWS = require('../core');\n\nAWS.util.update(AWS.EC2.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.removeListener('extractError', AWS.EventListeners.Qu...
javascript
edit
0
3
apache-2.0
3260ffd5c91d2f3e91c15e28534b0c61fe2346ba
chrisradek/aws-sdk-js,jmswhll/aws-sdk-js,misfitdavidl/aws-sdk-js,Blufe/aws-sdk-js,mohamed-kamal/aws-sdk-js,grimurjonsson/aws-sdk-js,mapbox/aws-sdk-js,aws/aws-sdk-js,jeskew/aws-sdk-js,prestomation/aws-sdk-js,grimurjonsson/aws-sdk-js,jeskew/aws-sdk-js,mohamed-kamal/aws-sdk-js,prestomation/aws-sdk-js,AdityaManohar/aws-sdk...
lib/services/ec2.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n;(function(){//IFEE\n\nangular.module('brewKeeper')\n .controller('createNewRecipe', function($scope, $http, $location){\n $scope.recipe = { }\n $scope.recipe.orientation = \"Standard\";\n\n $scope.submit=function(){\n va...
javascript
edit
0
1
mit
4fb0d3b34512364a180ab5b0af6911863924738a
ahartz1/brew-keeper-gui,ahartz1/brew-keeper-gui,Brew-Keeper/brew-keeper-gui,Brew-Keeper/brew-keeper-gui,ahartz1/brew-keeper-gui,Brew-Keeper/brew-keeper-gui
src/js/new-recipe.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\n\nvar inputFile = process.argv[2];\nvar outputFile = process.argv[3];\n\nif(!inputFile || !outputFile){\n\n printUsage();\n}\n\n/**\n *\n * If user have not input the path of text file(for input) or json file...
javascript
edit
0
3
apache-2.0
c1dff12360b51513a8a7a333b8ac38398cc27c30
dollars0427/SQLwatcher
config/convertsql.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport camelCase from './camel-case.js';\n\nconst isCamelCase = (a) => {\n const match = /(^[a-z]+)([A-Z][a-z]+)+/g.exec(a);\n return (match) ? match[0] === a : false;\n};\n\nexport default isCamelCase;\n\n```\n\nApply this change: Re...
javascript
edit
0
2
mit
3b7aa6a63a77b500d3c7d51e4817878f0cd8d476
restrung/restrung-regex
src/is-camel-case.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar parse = require('json-to-ast');\n\nexports._parse = function (result) {\n return function (s) {\n try {\n var ast = parse(s, { verbose: false });\n return result.success(ast);\n ...
javascript
edit
0
2
apache-2.0
b090c70f3afafe577c850c4102a492a5651f096c
quicktype/quicktype,quicktype/quicktype,quicktype/quicktype,quicktype/quicktype,quicktype/quicktype
src/Data/JSON/AST.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function() {\n return function({ addUtilities, variants }) {\n addUtilities(\n {\n '.float-right': { float: 'right' },\n '.float-left': { float: 'left' },\n '.float-none': { float: 'none' },\...
javascript
edit
0
1
mit
ee6241a3b767f87136617b0d5451732ef134d2bd
tailwindlabs/tailwindcss,tailwindcss/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss
src/plugins/float.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Write a function arrayToList that builds up a data structure like the previous one when given [1, 2, 3] as argument, and write a listToArray function that produces an array from a list. Also write the helper functions prepend, which ...
javascript
edit
0
2
mit
7478d12892be5aa18759a3531bf7902599d8973c
OperationCode/eloquent-js
04/jjhampton-ch4-linked-list.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport path from 'path';\n\nexport default {\n module: {\n loaders: [{\n test: /\\.jsx?$/,\n loaders: ['babel-loader'],\n exclude: /node_modules/\n }, {\n test: /\\.json$/,\n loader: 'json-loader'\n }]...
javascript
edit
0
0
mit
1e70558243e745ddf51e06a1c4b8db8edbf06a46
billyvg/pokemon-journal,billyvg/pokemon-journal
webpack.config.base.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport { hashHistory, Router, Route, Link, withRouter } from 'react-router'\n\nimport Layout from './screens/layout'\nimport Login from './screens/login'\nimport Logout from './screens/logout'\n...
javascript
edit
0
2
mit
ba692b0bc11f0f0afcc6fbaea4e52b8a79a5c09c
panelando/panelando,panelando/panelando
app/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {\n isPlainObject,\n isFunction,\n isEmpty,\n assign,\n} = require('lodash')\n\nconst { buildPagination } = require('../../../lib/pagination')\n\n/**\n * @param {object} [options] {object}\n * @param {string} [options.searchTe...
javascript
edit
0
4
mit
86e918461dc88522ecb546c74bf543bb0da181a5
uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2
src/modules/api/transformers/api-response-to-collection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global browser:readonly */\n\n\"use strict\";\n\nfunction parseReceivedHeader(headerStr, regexp) {\n const capturedSubstr = headerStr.match(new RegExp(regexp));\n if (capturedSubstr === null || typeof capturedSubstr[1] === \"un...
javascript
edit
0
3
bsd-3-clause
94f96da108d2be39238b868a28c4948b39e279d0
moisseev/received,moisseev/received
background.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n \"use strict\"\n var root = this,\n $ = root.jQuery;\n\n if (typeof root.GOVUK === 'undefined') {\n root.GOVUK = {};\n }\n\n root.GOVUK.Tagging = {\n ready: function(options) {\n $('.js-tag-list').s...
javascript
edit
0
2
mit
1b5b16dc6083f42a0d736e9456414c303ef3c411
alphagov/transition,alphagov/transition,alphagov/transition
app/assets/javascripts/tagging.js
rejected_duplicate
Near-duplicate of sample 75240
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { User } from '../models/user';\n\nexport default function addEditedPhoto(req, res) {\n return User.find({ _id: req.params.id })\n .then(([u]) => {\n u.editedPhoto = req.body.link;\n u.memory = req.body.memory;\n u.sta...
javascript
edit
0
2
mit
08c6a560ce146080646571ad5a2a0afce573e686
encore-rit/encore-api,encore-rit/encore-api
api/controllers/addEditedPhoto.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport RiakObjectRoute from '../route';\n\nexport default RiakObjectRoute.extend({\n actions: {\n /**\n * Adds an element to the HLL list.\n * @event addSetElement\n * @param {String} item\n */\n addElement: funct...
javascript
edit
0
1
apache-2.0
eccbbe571d05fb36beb1f3d16a457dcd39484ae2
basho-labs/riak-explorer-gui,basho-labs/riak-explorer-gui,basho-labs/riak-explorer-gui,basho-labs/riak-explorer-gui
app/pods/riak-object/hll/route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Spacing, Text, TextArea } from 'react-elemental';\n\nconst SampleTextArea = () => (\n <div>\n <Spacing size=\"huge\" bottom>\n <Text size=\"gamma\" color=\"primary\" uppercase>\n Text...
javascript
edit
0
1
mit
2a318077b60b80c45ff63a4d16dcc6b6ae38aa0f
LINKIWI/react-elemental
sample/components/text-area.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// nth-child pseudo selector\nModernizr.addTest('nthchild', function(){\n\n return Modernizr.testStyles(\"#modernizr div {width:1px} #modernizr div:nth-child(2n) {width:2px;}\", function (elem) {\n var elems = elem.getElementsByTagN...
javascript
edit
0
3
mit
c9645f1d6e5c8b6af4709c46c31a11792e87bfc3
Modernizr/Modernizr,Modernizr/Modernizr
feature-detects/css-nthchild.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// # Place all the behaviors and hooks related to the matching controller here.\n// # All this logic will automatically be available in application.js.\n// # You can use CoffeeScript in this file: http://coffeescript.org/\n\n$(document)...
javascript
edit
0
1
mit
7124a95c4d8b3b7af048d56ecc23ac1d5b5169b0
user512/write-in-mvp,robertbaker13/write-in-mvp,robertbaker13/write-in-mvp,user512/write-in-mvp,robertbaker13/write-in-mvp,user512/write-in-mvp
app/assets/javascripts/welcome.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Correct import of Ember Data model blueprint\n\nAs suggested by @fsmanuel in #128 and #131." }, { "role": "assistant", "content": "var ModelBlueprint;\n\ntry {\n ModelBlueprint = require('ember-data/blueprints/model');\n} ca...
javascript
new_file
0
0
apache-2.0
5069787060f4119a85a4cbc8bb3860e7208e3663
nolanlawson/ember-pouch,pouchdb-community/ember-pouch,nolanlawson/ember-pouch,pouchdb-community/ember-pouch
blueprints/pouch-model/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Sets up the core\n */\nvar async = require('async');\n\nfunction setup(client, keyspace, next) {\n\n var tables =['CREATE TABLE ' + keyspace + '.applications (name text, apptoken uuid, PRIMARY KEY (name))'];\n\n var helpers = ...
javascript
edit
0
2
mit
df8ca134c099d75231b7ab2af169b2296761f383
gajjargaurav/seguir,tes/seguir,cliftonc/seguir
setup/setupSeguir.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar\n path = require('path'),\n stream = require('stream'),\n lib = require('../lib'),\n Matryoshka = lib.Matryoshka,\n Extract = lib.Extract;\n\nMatryoshka.collectLanguages().then(function (languages) {\n\n var files = Ob...
javascript
edit
0
1
unlicense
a9aba2dbe18ab51be5c4e4b986044f0f31386bd8
nodar-chkuaselidze/matryoshka
test/transformers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar router = require(\"express\").Router();\nvar db = require(\"./db\");\n\nrouter.get(\"/\", function (req, res) {\n var o = {\n map: function () {\n if (this.parents.length === 1) {\n for (var i = 0; i < this.files.len...
javascript
edit
0
4
mit
e8c98318e3c3238b5cd2435761892c48203553e8
bjornarg/dev-dashboard,bjornarg/dev-dashboard
git/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('app.task')\n .controller('TaskListContentController', TaskListContentController);\n\n/*@ngInject*/\nfunction TaskListContentController($state, taskService) {\n var vm = this;\n vm.tasks = undefined;\n vm.edit...
javascript
edit
0
1
mit
f5c12b860bfa1c0cd2e677bf9af688ce760f5928
Dramloc/angular-material-boilerplate,Dramloc/angular-material-boilerplate
app/task/task.list.content.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport {\n setSyncProgress,\n incrementSyncProgress,\n setSyncError,\n setSyncTotal,\n setSyncProgressMessage,\n setSyncIsSyncing,\n setSyncCompletionTime,\n} from './SyncActions';\n\n```\n\nApply this change: Add export of user ...
javascript
edit
0
0
mit
21af16a660e14fadbcd768d52e843a4f4a5cac6a
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/actions/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmodule.exports.examples = [\n {\n \"incoming\": 'select A as [Yuba dubba]',\n \"expected\": 'SELECT A AS [Yuba dubba];'\n },\n {\"incoming\": 'select Column1, Column2 from ATable at', \"expected\": \"SELECT Column1,\\n Colum...
javascript
edit
0
0
isc
fc84bc84941ef907e7b155fed573d4fb052960c3
zelanko/format-tsql
spec/sql-examples.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\n\nexport default DS.Transform.extend({\n deserialize: function(serialized) {\n var map = {\n 0: 'New',\n 2: 'Published',\n 4: 'Opened',\n 6: 'Restricted',\n 8: 'Closed',\n ...
javascript
edit
0
1
bsd-2-clause
25a846ea3acd0b877cb236903a708c10d2d5222d
barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web
app/transforms/session-status.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar instances = require('./../taillard');\nvar NEH = require('./../neh');\nvar seed = require('./../seed-random');\n\n// Iterate over filtered Taillard instances\nvar filteredInstances = instances.filter(50, 20);\nfor(var i = 0; i < fil...
javascript
edit
0
0
mit
af74dcd92c72a6694fcce3a00421245e8013bb09
manfredbork/flowshop
examples/instances.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nimport React from 'react-lite'\n\nexport default class ButtonBar extends React.Component {\n\n constructor(props) {\n super(props);\n }\n\n // Event Handlers\n handleClickConnection(e) {\n console.log('Click Co...
javascript
edit
0
2
mit
41584a97e5e7475c9682f9fa5bc9213c3cb20fe3
andreimoldo/ruby-debugger,andreimoldo/ruby-debugger
lib/components/ui/button_bar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * Start Bootstrap - Agnecy Bootstrap Theme (http://startbootstrap.com)\n * Code licensed under the Apache License v2.0.\n * For details, see http://www.apache.org/licenses/LICENSE-2.0.\n */\n\n// Highlight the top nav as scrolling...
javascript
edit
0
2
apache-2.0
826b469871ad53ab7e727669e19ec5900d2d3a7d
RapidRiverSoftware/rapidriversoftware.github.io,RapidRiverSoftware/rapidriversoftware.github.io,RapidRiverSoftware/rapidriversoftware.github.io,RapidRiverSoftware/rapidriversoftware.github.io
assets/js/agency.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar User = function(baseUrl) {\n var self = this;\n this.baseUrl = baseUrl;\n this.username = '';\n this.password = '';\n this.errorThrown = '';\n this.onAuthUpdate = function() {\n // as long as the frontend and backend are se...
javascript
edit
0
2
mit
c6c2c3e4dd69a41e1abe0d827406e464aa109008
TehMillhouse/odie-client,fsmi/odie-client,TehMillhouse/odie-client,TehMillhouse/odie-client,fsmi/odie-client,fsmi/odie-client
js/vm/user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\n\nlet Prompt = DS.Model.extend({\n step: DS.belongsTo('step'),\n\n question: DS.attr('string'), //our prompt\n answer: DS.attr('string'), // their answer\n clause: DS.attr('string')\n});\n\nlet data = [...
javascript
edit
0
0
mit
4af9b2129765bc4a8f79fea78ce5adb980d79f58
Br3nda/priv-o-matic,Br3nda/priv-o-matic,OPCNZ/priv-o-matic,OPCNZ/priv-o-matic
app/models/prompt.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(app) {\n var express = require('express');\n var inputObserversRouter = express.Router();\n inputObserversRouter.get('/', function(req, res) {\n res.send({\"input-observers\":[\n {\n id: 0,\n ...
javascript
edit
0
1
apache-2.0
950ecde0707f8971c96da199738c126148f93511
uboot/stromx-web,uboot/stromx-web,uboot/stromx-web
frontend/server/mocks/input-observers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes, Component } from 'react';\nimport shouldPureComponentUpdate from 'react-pure-render/function';\nimport Label from 'binary-components/lib/Label';\nimport NumericInput from 'binary-components/lib/NumericInput';\...
javascript
edit
0
1
mit
a10364dafddde0316c89076b0158a53f265fa414
binary-com/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-next-gen,nazaninreihani/binary-next-gen,binary-com/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,nuruddeensalihu/binary-next-gen
src/payout-picker/StakeCard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { typography, color } from 'react-native-material-design-styles';\n\n/**\n * Paper style color\n * @type {object}\n */\nexport const COLOR = color;\n\n/**\n * Paper style typography\n * @type {object}\n */\nexport const TYPO = ty...
javascript
edit
0
0
mit
891f978962b4109fd616188a095ad2ccfb67b122
xvonabur/react-native-material-ui,react-native-material-design/react-native-material-design,blovato/sca-mobile-components,xotahal/react-native-material-ui,ajaxangular/react-native-material-ui,mobileDevNativeCross/react-native-material-ui,thomasooo/react-native-material-design,kenma9123/react-native-material-ui
lib/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nParse.Cloud.afterSave(\"UserComment\", function(installationId, master, object, user) {\n var createdBy = object.get(\"createdBy\");\n push(\"New comment from \" + createdBy);\n response.success();\n});\n\nvar push = function(a...
javascript
edit
0
1
bsd-3-clause
d24f6d7ea48171bbe60ed464e30fb99209186172
aclissold/Proxima,aclissold/Proxima,aclissold/Proxima,aclissold/Proxima
cloud/cloud/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n // read manifest\n $.get('manifest.json', function(manifest) {\n window.config = manifest.properties;\n \n // load HTML and append to body canvas\n var document_html = manifest.html[0],\n ...
javascript
edit
0
1
bsd-3-clause
e1931151d52beb51733f852ab1077a87656180d4
vidalab/d3three,vidalab/d3three,vidalab/d3three
vida_template.js
accepted
null
true