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\nmodule.exports = {\n browserSync: {\n server: {\n // Serve up our build folder\n baseDir: './examples/dist'\n }\n },\n browserify: {\n // A separate bundle will be generated for each\n...
javascript
edit
0
0
mit
34880ddb1ab9da3b644995ed996615804fa7f0fa
doggan/compojs,doggan/compojs
gulp/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\nimport SiteKitRegistry from 'assets/js/googlesitekit/data';\n\nif ( typeof global.googlesitekit === 'undefined' ) {\n\tglobal.googlesitekit = {};\n}\n\nif ( typeo...
javascript
edit
0
0
apache-2.0
05c89b84fe2261be535fdb7566fb5932f5373d87
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
assets/js/googlesitekit-data.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('<%=angularAppName%>')\n .config(function ($stateProvider) {\n $stateProvider\n .state('configuration', {\n parent: 'admin',\n url: '/configuration',\n ...
javascript
edit
0
1
apache-2.0
b1a59cd1f45b50ec0358f1c06592258253bac216
pascalgrimaud/generator-jhipster,jkutner/generator-jhipster,vivekmore/generator-jhipster,erikkemperman/generator-jhipster,gmarziou/generator-jhipster,sohibegit/generator-jhipster,jhipster/generator-jhipster,Tcharl/generator-jhipster,hdurix/generator-jhipster,duderoot/generator-jhipster,mraible/generator-jhipster,jkutne...
app/templates/src/main/webapp/scripts/app/admin/configuration/_configuration.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Checker = require('../../../lib/checker');\nvar assert = require('assert');\n\ndescribe('rules/require-line-feed-at-file-end', function() {\n var checker;\n beforeEach(function() {\n checker = new Checker();\n ch...
javascript
edit
0
1
mit
2731c84d773ecba53f60129f9df3ce7c452f91f4
existentialism/node-jscs,hzoo/node-jscs,hafeez-syed/node-jscs,indexzero/node-jscs,jscs-dev/node-jscs,bjdixon/node-jscs,pm5/node-jscs,jamesreggio/node-jscs,ptarjan/node-jscs,kaicataldo/node-jscs,alawatthe/node-jscs,ficristo/node-jscs,kaicataldo/node-jscs,bengourley/node-jscs,lukeapage/node-jscs,ValYouW/node-jscs,mcantho...
test/specs/rules/require-line-feed-at-file-end.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* -*- Mode: js; js-indent-level: 2; indent-tabs-mode: nil; tab-width: 2 -*- */\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\n/*\n * Copyright 2013 Mozilla Foundation\n *\n * Licensed under the Apache License, Ve...
javascript
edit
0
6
apache-2.0
666ecdb4f9dad13fed329b188b0de98cbab3f3d8
yurydelendik/shumway,mozilla/shumway,yurydelendik/shumway,mozilla/shumway,mozilla/shumway,yurydelendik/shumway,tschneidereit/shumway,mbebenita/shumway,yurydelendik/shumway,mozilla/shumway,mozilla/shumway,yurydelendik/shumway,tschneidereit/shumway,tschneidereit/shumway,mozilla/shumway,mbebenita/shumway,mozilla/shumway,m...
src/flash/display/Shape.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('zone.js/dist/zone-node');\nrequire('reflect-metadata');\nconst express = require('express');\nconst fs = require('fs');\n\nconst { platformServer, renderModuleFactory } = require('@angular/platform-server');\nconst { ngExpressE...
javascript
edit
0
1
mit
b108b0286b23c68c663991442099c15af4eed207
sebastienbarbier/sebastienbarbier.com,sebastienbarbier/sebastienbarbier.com,sebastienbarbier/sebastienbarbier.com,sebastienbarbier/sebastienbarbier.com
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar bebop = require(\"../.\");\n\nvar drone = bebop.createClient();\n\ndrone.connect(function() {\n drone.GPSSettings.resetHome();\n drone.WifiSettings.outdoorSetting(1);\n\n drone.on(\"PositionChanged\", function(...
javascript
edit
0
1
mit
92584915936d96adb5f9ccecbe60ac9fd541453d
hybridgroup/node-bebop
examples/gps.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component} from \"react\";\nimport {\n View,\n Text\n} from \"react-native\";\n\nimport PageFrame from \"../components/PageFrame\";\nimport EventDetailView from \"../components/EventDetailView\";\n\nexport default class...
javascript
edit
0
1
mit
7a286e33c1ea1eeb72903af368d46bce2ec887e4
ottobonn/roots
screens/EventDetailScreen.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar logger = require('morgan');\nvar bodyParser = require('body-parser');\nvar session = require('express-session'); // compatible stores at https://github.com/expressjs/session#compatible-session-stor...
javascript
edit
0
0
mit
f86f229533dc409bae560b32bcae35ed87844922
Temmermans/iot-device-simulator,Temmermans/iot-device-simulator
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport config from '../../config';\n\nfunction formatUrl(path) {\n const adjustedPath = path[0] !== '/' ? '/' + path : path;\n const apiPath = `/api/${config.apiVersion}${adjustedPath}`;\n\n return apiPath;\n}\n\nclass ApiAjax {\n c...
javascript
edit
0
3
mit
ee38f11006f69dd03298b736ae79b8ea6444e42b
coopdevs/katuma-web,coopdevs/katuma-web
src/helpers/api/apiAjax.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n@module ember\n@submodule ember-htmlbars\n*/\n\nimport Ember from \"ember-metal/core\";\nimport { isGlobal } from \"ember-metal/path_cache\";\nimport SimpleStream from \"ember-metal/streams/simple-stream\";\n\nexport default functi...
javascript
edit
0
7
mit
0d0c17d669983fb14f67de1af551d434b698f4ca
jherdman/ember.js,schreiaj/ember.js,XrXr/ember.js,trek/ember.js,pixelhandler/ember.js,nipunas/ember.js,johnnyshields/ember.js,lazybensch/ember.js,tiegz/ember.js,green-arrow/ember.js,jayphelps/ember.js,femi-saliu/ember.js,tildeio/ember.js,trek/ember.js,rfsv/ember.js,jamesarosen/ember.js,Trendy/ember.js,kmiyashiro/ember....
packages/ember-htmlbars/lib/hooks/get-root.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nimport MultiTask from 'chiffchaff-multi'\nimport PipeTask from 'chiffchaff-pipe'\nimport defaults from 'defaults'\nimport EventRegistry from 'event-registry'\n\nconst toTaskIterator = (sources, destination) => (function ...
javascript
edit
0
2
mit
430ecde27e749a093c52872b0f93b62fd499bace
zentrick/chiffchaff,zentrick/chiffchaff
packages/chiffchaff-concat/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst intialState = [\n { name: 'hotels', query: 'hotel' },\n { name: 'points of interest', query: 'point of interest' },\n { name: 'museums', query: 'museum' },\n { name: 'nightlife', query: 'night club' },\n { name: 'restaurants'...
javascript
edit
0
2
mit
02bb3dec4c0007ae0733aa33419b87ea0a2a1288
theredspoon/trip-raptor,Tropical-Raptor/trip-raptor
src/client/scripts/reducers/branchTitles_reducer.js
rejected_duplicate
Near-duplicate of sample 98069
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* globals MarkdownFilePaths: false */\n// MarkdownFilePaths are created in run.js and passed through webpack\n\nimport React from 'react';\nimport { Route, IndexRoute } from 'react-router';\nimport Landing from './pages/home/index';\ni...
javascript
edit
0
1
mit
e7c7edde0f4c5351cbd62e6b00c009f2e436c8e7
ben181231/skygear-doc,ben181231/skygear-doc,ben181231/skygear-doc
routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as types from '../constants/ActionTypes'\n\nexport function selectKey(id) {\n return { type: types.SELECT_KEY, id }\n}\n\nexport function toggleCompose() {\n return { type: types.TOGGLE_COMPOSE }\n}\n\nexport function showCom...
javascript
edit
0
1
mit
fb626e46ae3531f5d9727672f74bbc5be0ee2ef4
henryboldi/felony,tobycyanide/felony,henryboldi/felony,tobycyanide/felony
src/actions/UIActions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nMeteor.publish('allPosts', function () {\n \"use strict\";\n var result = Posts.find({}, {\n limit: 50,\n fields: {\n oldChildren: false\n }\n });\n return result;\n});\n\nMeteor.publish('comments', function (id) {\n ...
javascript
edit
0
1
mit
d24721fcd6a7cccc9c6098f256fb5fc9bbe11f56
rrevanth/news,rrevanth/news
server/posts/publishPosts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.TOKEN = ‘TOKEN HERE’;\nexports.SESSION_SECRET = ‘SESSION SECRET HERE’;\nexports.CLIENT_ID = ‘CLIENT ID HERE’;\nexports.CLIENT_SECRET = ‘CLIENT SECRET HERE’;\n\n```\n\nApply this change: Remove fancy quotations, thanks Gmail" }...
javascript
edit
0
0
mit
e284067b2cbeec5fd313dcafe8e17d187e3067c4
EvgenyKarataev/github-plus-university,jdavis/github-plus-university,EvgenyKarataev/github-plus-university
secret.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nelation.require([], function() {\n elation.component.add('janusweb.translators.blank', function() {\n this.exec = function(args) {\n return new Promise(function(resolve, reject) {\n var roomdata = {\n room: {\n ...
javascript
edit
0
1
mit
f36fad425eee83b479bb0745b8308fa957ff4c5b
jbaicoianu/janusweb,jbaicoianu/janusweb,jbaicoianu/janusweb
scripts/translators/blank.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(\"game-manager\", [\"game\"], function(Game) {\n function GameManager() {\n this.games = this.load() || [];\n this.next_id = this.getNextId();\n }\n\n GameManager.prototype = {\n addGame: function() ...
javascript
edit
0
3
mit
cdfdf89781544ee9fb279fb0d007c1ea32be5d29
lethosor/clue-solver,lethosor/clue-solver
game-manager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Generated by CoffeeScript 1.6.3\n(function() {\n var clicks, io, tones;\n\n io = require('socket.io').listen(process.env.PORT || 8888);\n\n clicks = [];\n\n tones = io.of('/tones').on('connection', function(socket) {\n socket....
javascript
edit
0
2
mit
e59a9f57bcc8b164f010c56d7cfd00304532151a
mgarbacz/adventure-tone-socket
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global wp, _, kirki */\nwp.customize.controlConstructor['kirki-repeater'] = wp.customize.kirkiDynamicControl.extend( {\n\tinitKirkiControl: function() {\n\t\tvar control = this,\n\t\t rowDefaults = {};\n\n\t\t_.each( control.p...
javascript
edit
0
2
mit
a38fc2ae352996e3401e903bd39475326d7fc8c5
aristath/kirki-controls,aristath/kirki-controls
js/repeater.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * util/core.spec.js\n *\n * @author Rock Hu <<EMAIL>>\n * @license MIT\n */\n import Endpoints from '../../src/config/endpoints.json';\n import API from '../../src/config/api.json';\n\n\nvar Sinon = require(...
javascript
edit
0
1
mit
91ba7311f555c7e7fc3a972d893654654893fc95
imoplol/league-api
test/index/core.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet PROTO_PATH = __dirname + \"/wkrpt401.proto\"\n\nlet grpc = require('grpc');\nlet proto = grpc.load(PROTO_PATH).wkrpt401;\n\nfunction getBestPersonality(call, callback) {\n let userData = call.request;\n let name = userData.name;\n...
javascript
edit
0
3
mit
e29963ef0d90c42e0d96fcda39e25b10a8a0583c
lloydtorres/wkrpt401-grpc
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar zlib = require('zlib');\nvar inherits = require('util').inherits;\n\nvar util = require('./');\n\nfunction DeflateRawChecksum(options) {\n zlib.DeflateRaw.call(this, options);\n\n this.checksum = util.crc32.createCRC32();\n this....
javascript
edit
0
2
mit
cf4765a1df10adf26ef8f85429be6cdbce7e3e5b
djchie/node-archiver,lotterfriends/node-archiver,yavorski/node-archiver,soyuka/node-archiver,haledeng/node-archiver,soyuka/node-archiver,archiverjs/node-archiver
lib/util/DeflateRawChecksum.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar example = require(\"washington\")\nvar assert = require(\"assert\")\n\nexample(\"Async: by default\")\n\nexample(\"Endpoint: match with glob style wildcards\")\n\nexample(\"Repeater: Repeat events back and forth on repeater ven...
javascript
edit
0
0
isc
2d66d246d15a87427a65af64e9152013536e8b24
xaviervia/sydney,xaviervia/sydney
sidney.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*! Parker v0.0.0 - MIT license */\n\n'use strict';\n\nvar _ = require('underscore');\n\nfunction CssRule(raw) {\n this.raw = raw;\n}\n\nCssRule.prototype.getSelectors = function () {\n return getSelectors(getSelectorBlock(this.ra...
javascript
edit
0
1
mit
f7a0cba8a99686f9c1e697a106df62bda90caf56
tzi/parker,seanislegend/parker,researchgate/parker,joshuacc/parker,tpgmartin/parker,caolan/parker,katiefenn/parker
lib/CssRule.js
rejected_duplicate
Near-duplicate of sample 85026
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule('bulk_docs', {\n setup : function () {\n this.name = 'test' + genDBName();\n }\n});\n\nasyncTest('Testing bulk docs', function() {\n pouch.open(this.name, function(err, db) {\n var docs = makeDocs(5);\n db.bulkDocs({d...
javascript
edit
0
2
apache-2.0
c508e7e79b0413d45884ab5b7c0ad6401bead806
crissdev/pouchdb,greyhwndz/pouchdb,elkingtonmcb/pouchdb,h4ki/pouchdb,lukevanhorn/pouchdb,tyler-johnson/pouchdb,mainerror/pouchdb,yaronyg/pouchdb,shimaore/pouchdb,ramdhavepreetam/pouchdb,seigel/pouchdb,willholley/pouchdb,ntwcklng/pouchdb,adamvert/pouchdb,Dashed/pouchdb,Charlotteis/pouchdb,patrickgrey/pouchdb,mikeymckay/...
tests/test.bulk_docs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (sequelize, DataTypes) {\n const Rating = sequelize.define('Rating', {\n id: {\n primaryKey: true,\n type: DataTypes.UUID,\n defaultValue: DataTypes.UUIDV4\n },\n value: {\n type: ...
javascript
edit
0
1
apache-2.0
25914bfe922ce8f17231bdaebecfef247dc82d0a
cesarandreu/bshed,cesarandreu/bshed
models/rating.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require ./select_button_view\n//= require ./text_field_view\n\nFlame.ComboBoxView = Flame.SelectButtonView.extend({\n classNames: ['flame-combo-box-view'],\n childViews: 'textView buttonView'.w(),\n handlebars: undefined,\n...
javascript
edit
0
1
mit
612a6c84313f137d173c9fe4cf4b73dd34241b87
lalnuo/flame.js,lalnuo/flame.js,lalnuo/flame.js,renotoaster/flame.js,renotoaster/flame.js,mattijauhiainen/flame.js,flamejs/flame.js,mattijauhiainen/flame.js
views/combo_box_view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n\n var addItem = function() {\n $('.mainList').append('<li class=\"listItem\"><input id=\"check\" class=\"checkBox\" type=\"checkbox\"><input class=\"textInp\" type=\"text\" placeholder=\"...\"></...
javascript
edit
0
1
mit
07ee9f58931cdfbc7ba2f44e07ddf7fcc6bdc732
halverson/teenytiny_TodoList,halverson/teenytiny_TodoList
js/ListScript.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use-strict';\n\nvar path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n context: __dirname,\n\n entry: {\n app: [\n 'webpack-hot-middleware/client',\n 'babel-polyfill',\n './js/index'\...
javascript
edit
0
0
mit
dababa35a06c68d4676271df4f54fbce8f55357d
tough-griff/redux-react-router-todomvc,tough-griff/redux-react-router-todomvc
webpack.config.dev.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport path from 'path'\nimport webpack from 'webpack'\n\nimport { WDS_PORT, isProd } from './src/shared/config'\n\nexport default {\n entry: [\n 'react-hot-loader/patch',\n './src/client',\n ],\n output: {\n fil...
javascript
edit
0
0
mit
caf77a3b517ef08bed2c8aa830fb6752f7aa1267
verekia/js-stack-boilerplate,verekia/js-stack-boilerplate
webpack.config.babel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { hierarchy } from 'd3-hierarchy';\n\nexport default class Clusters {\n constructor () {\n this.data = {\n children: [\n {\n cluster: 'non-anomalous',\n value: 0\n },\n {\n ...
javascript
edit
0
2
apache-2.0
eac12c07f01aee95a3c911af3e149c77ccba1714
ronichoudhury-work/bsides2017,ronichoudhury-work/bsides2017
src/util/Clusters.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar uuid = require('node-uuid');\n\n/**\n * A list containing todo items\n * @param {String} name The name of the list\n * @param {Array} todos An array of todo names\n */\nvar List = function(id, name, todos)...
javascript
edit
0
3
mit
f19b5d4c12ac7ad0dd0460ce48b32fd58f1d4044
flysonic10/todo-or-node-todo,flysonic10/todo-or-node-todo
models/list.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar co6 = require('co6');\nvar fs = co6.promisifyAll(require('fs'));\nvar os = require('os');\nvar parse = require('./parse');\nvar server = require('../server');\n\n/*\n * Run the command line application.\n */\nco6.main...
javascript
edit
0
4
mit
b4d56eea1001e04b8424786430da7b6258e4e1a0
kenpeter/mangarack.js,kenpeter/mangarack.js
lib/cli/index.js
rejected_duplicate
Near-duplicate of sample 86589
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport UserDefinition from '../UserDefinition';\n\ndescribe('runtime', () => {\n test('user defined identity function', () => {\n const def = new UserDefinition(null, {\n inputs: [\n {tempo: 'step'},\n ...
javascript
edit
0
1
mit
6af3ea3ac41f290fb3d45bfe99b30964c6ba3b0a
rsimmons/rindel3,rsimmons/rindel3,rsimmons/rindel3
dynamic-runtime/src/__tests__/runtime-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar cp = require('child_process');\n\n //callback(err, exit, lastline);\nmodule.exports = function(cmd, options, chain){\n if(Array.isArray(options))\n options = { args : options} ;\n\n options = options || {};\...
javascript
edit
0
4
mit
e973b120563004860450f421014fb636db2ebd1a
131/nyks
child_process/passthru.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/*jslint nomen: true, stupid: true*/\n\nmodule.exports = function (grunt) {\n grunt.registerTask('integration-test', 'Run integration tests', [\n 'docker-integration-test'\n ]);\n\n grunt.registerMultiTa...
javascript
edit
0
2
apache-2.0
40192b460ea0a23a71d832ea808a942165024d7f
sagiegurari/node-go-require,sagiegurari/node-go-require
project/build/project.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// app.shoppingListDirective.js\n\n(function() {\n \"use strict\";\n\n angular.module(\"ShoppingListDirectiveApp\")\n .directive(\"shoppingList\", ShoppingList);\n\n function ShoppingList() {\n const templateUrl = \"../template...
javascript
edit
0
1
mit
652a8f72ce8969d5dd271cf77ec6f229d39a2ebc
var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training
SPAWithAngularJS/module3/directives/controllersInsideDirective/js/app.shoppingListDirective.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst webpack = require('webpack')\nconst marked = require('marked')\n\nconst renderer = new marked.Renderer()\nconst USE_PREFETCH = process.env.NODE_ENV !== 'test'\n\nmodule.exports = {\n webpack: config => {\n // Add in prefetch c...
javascript
edit
0
1
mit
c3cd298946d680f9c157f1e5b4c5036328d5a599
CarlRosell/glamorous-website,kentcdodds/glamorous-website,CarlRosell/glamorous-website
next.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* global Connector */\n\nConnector.playerSelector = '.container';\n\nConnector.artistTrackSelector = '.line1._navigateNowPlaying';\n\nConnector.isPlaying = function () {\n\treturn $('#tuner').hasClass('playing');\n};\n...
javascript
edit
0
1
mit
dcf39735169df6b4694c4686659f23a766614dc6
david-sabata/web-scrobbler,alexesprit/web-scrobbler,usdivad/web-scrobbler,alexesprit/web-scrobbler,Paszt/web-scrobbler,ex47/web-scrobbler,inverse/web-scrobbler,usdivad/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,carpet-berlin/web-scrobbler,ex47/web-scrobbler,david-sabata/web-scrobb...
connectors/v2/tunein.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar eat = require('eat');\nvar User = require('../models/User');\nvar clc = require('cli-color');\n\nmodule.exports = function(secret) {\n\treturn function(req, res, next) {\n\t\tvar token = req.cookies.token || req.hea...
javascript
edit
0
4
mit
69eb06a4ebe6ca9c8bb1a64bb8d63d9062dc3f4d
mb4ms/event-site,mb4ms/event-site,mrbgit/event-site,mrbgit/event-site
lib/eat_auth.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('Test environment should have descriptive \"Test\" mark', function () {\n it('Check the user page \"Test\" mark', function () {\n cy.visit('https://test-osale.toidupank.ee/')\n cy.get('.page-header > h2:nth-child(2)').sh...
javascript
edit
0
1
mit
bef85414a04b2d66e0f9bc7beea4ccaf14c952b0
mrts/foodbank-campaign,mrts/foodbank-campaign,mrts/foodbank-campaign,mrts/foodbank-campaign
tests/cypress/cypress/integration/test_environment_marker_spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Component from '@ember/component';\nimport {computed} from '@ember/object';\nimport {inject as service} from '@ember/service';\n\nexport default Component.extend({\n router: service(),\n config: service(),\n ghostPaths: ...
javascript
edit
0
1
mit
d35692b08851b2ec761a8e1550e56ff060a4cce7
TryGhost/Ghost-Admin,TryGhost/Ghost-Admin
app/components/gh-billing-update-button.js
rejected_duplicate
Near-duplicate of sample 95879
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default class LivePaginator {\n constructor(rowsFetcher, { page = 1, itemsPerPage = 20 } = {}) {\n this.page = page;\n this.itemsPerPage = itemsPerPage;\n this.rowsFetcher = rowsFetcher;\n this.rowsFetcher(this.page,...
javascript
edit
0
3
bsd-2-clause
08b59c448503ca1eadc2e3f2cc54533121630932
chriszs/redash,44px/redash,moritz9/redash,44px/redash,denisov-vlad/redash,chriszs/redash,denisov-vlad/redash,chriszs/redash,44px/redash,denisov-vlad/redash,alexanderlz/redash,getredash/redash,getredash/redash,denisov-vlad/redash,getredash/redash,moritz9/redash,getredash/redash,chriszs/redash,denisov-vlad/redash,alexand...
client/app/lib/pagination/live-paginator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {Link} from 'react-router-dom';\n\nclass NavbarUserInfo extends React.Component {\n constructor(props) {\n super(props);\n }\n logOut() {\n\n }\n render() {\n if (!this.props.secret) {\n ...
javascript
edit
0
2
mit
fc428673ce7aff6a9acb0d8b1afdca6d247c7a27
HoldYourBreath/Library,HoldYourBreath/Library,HoldYourBreath/Library,HoldYourBreath/Library
library_js/src/components/navbar_user_info.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar SCREEN_WIDTH = 0;\r\nvar SCREEN_HEIGHT = 0;\r\nvar PLAYER_RADIUS = 12;\r\nvar PLAYER_SPEED = 4;\r\nvar FRICTION = 0.8;\r\nvar LEVELS = [\r\n { l: 48, t: 24, r: 752, b: 576 }\r\n];\r\n\r\nvar gInput = {}\r\nvar gPlayer = {}\r\nvar g...
javascript
edit
0
1
mit
157020ca0df20540c022b213949ee4d75132052b
peternatewood/shmup,peternatewood/shmup,peternatewood/shmup
base.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require(\"fs\");\nvar path = require(\"path\");\n\nmodule.exports = function runLoader(loader, directory, filename, arg, callback) {\n\tvar async = true;\n\tvar loaderContext = {\n\t\tasync: function() {\n\t\t\tasync = true;\n\...
javascript
edit
0
1
mit
3428fab81b3416bea57f07ae8c6d243d7000d6d1
pugjs/pug-loader
test/fakeModuleSystem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst mongoose = require('mongoose');\nconst helpers = require('../lib/helpers');\n\n/**\n * Schema.\n */\nconst userSchema = new mongoose.Schema({\n _id: String,\n topic: String,\n campaignId: Number,\n});\n\n/**\n ...
javascript
edit
0
1
mit
ee59402b26e18f676a8e2a16bf3e75e676a8c66a
DoSomething/gambit,DoSomething/gambit
models/User.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.QuestionnaireHandler = {\n initialiseSections: function($sectionContainer, $contentContainer) {\n var insertIntoContainer = function(data) { $contentContainer.html(data); };\n\n $sectionContainer.find('.section-link').clic...
javascript
edit
0
1
bsd-3-clause
f4c5bf9d681aa416c23d710bfe8878a9220c0dd6
unepwcmc/ORS,unepwcmc/ORS,unepwcmc/ORS,unepwcmc/ORS,unepwcmc/ORS
app/assets/javascripts/respondent/modules/questionnaire_handler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport { EventEmitter } from 'events';\n\n/**\n * Plugin Interface\n * @class\n */\nexport default class {\n\n /**\n * Construct the plugin.\n * @param {object} plugin\n */\n constructor(plugin) {\n // Proces...
javascript
edit
0
1
isc
c7d5e1985eed22d981f434ed426dfd94efb48498
ManiaJS/plugins,ManiaJS/plugins,ManiaJS/plugins
plugin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njQuery(document).ready(function ($) {\n\n\tvar slideCount = $('#slider ul li').length;\n\tvar slideWidth = $('#slider ul li').width();\n\tvar slideHeight = $('#slider ul li').height();\n\tvar sliderUlWidth = slideCount * slideWidth;\n\n...
javascript
edit
0
2
bsd-3-clause
321aa9ffda8094a6a1358da50d116e19a384d94d
NIAEFEUP/Website-NIAEFEUP
public/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport styled from '@emotion/styled';\n\nconst Content = styled.div`\n width: 100%;\n max-width: 580px;\n padding: 20px 25px;\n border-radius: 3px;\n margin: 0 auto 60px;\n background: rgba(0, 0, 0, 0.0...
javascript
edit
0
2
bsd-3-clause
db7be64b7a8a066a0a0eca6047e302d285a4c4a7
mirego/mirego-open-web,mirego/mirego-open-web
src/components/Intro.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('underscore'),\n Hand = require('pokersolver').Hand;\n\n\nvar extractHandFromGame = function(game_state){\n return ['As', 'Ac'];\n};\n\nmodule.exports = {\n\n VERSION: \"Default JavaScript folding player\",\n\n bet...
javascript
edit
0
2
mit
d67a24d51e4b1714f2321f8725dc572553d0e1c1
ddanciu/poker-player-hilarious-eagle
player.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst resourceVmsList = {\n controller: ProjectVirtualMachinesListController,\n controllerAs: 'ListController',\n templateUrl: 'views/partials/filtered-list.html',\n};\n\nexport default resourceVmsList;\n\nfunction ProjectVirtualMach...
javascript
edit
0
2
mit
7156ec87fbbec8aec7c9c354e8fb7646777170b4
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
app/scripts/components/resource/list/resource-vms-list.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jslint node:true */\n\"use strict\";\nvar path = require('path');\nvar express = require('express');\nvar server = express();\nvar faye = require('faye');\nvar bayeux = new faye.NodeAdapter({\n mount: '/meet',\n timeout: 45\n}...
javascript
edit
0
1
mit
6431a67dde0b74a284087f2dd6c6889c9cbc4de6
sococo/sococo-rtc,sococo/sococo-rtc
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('getFolders()', function() {\n it('should return the correct list of folders', function() {\n var objects = [\n { Key: '/' },\n { Key: 'test/' },\n { Key: 'test/test/' },\n { Key: 'test/a/b' },\n { ...
javascript
edit
null
null
mit
b369652ed5114e432953b485b9c8f24ba5a2afc7
etopian/dodgercms,ChrisZieba/dodgercms,ChrisZieba/dodgercms,etopian/dodgercms
test/s3-test.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true, browser: false */\n'use strict';\n\n// CREATE HTTP SERVER AND PROXY\n\nvar app = require('express')();\nvar proxy = require('http-proxy').createProxyServer({});\n\nproxy.on('error', function(e) {\n console...
javascript
edit
0
1
mit
d0d41805bedf8df217feca03e565df33f6473eb8
scbd/chm.cbd.int,scbd/chm.cbd.int,scbd/chm.cbd.int
server.js
rejected_duplicate
Near-duplicate of sample 96393
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(Pebble, window) {\n var settings = {};\n\n Pebble.addEventListener(\"ready\", function(e) {\n settings = window.localStorage.getItem(\"settings\");\n if(settings !== \"\") {\n var options = JSON.parse(settings);\n...
javascript
edit
0
2
bsd-3-clause
7241a9852cc0a5b44b280663e5fad31390f0f567
rexmac/pebble-chronocode,jojoman3/Test,jojoman3/Test,rexmac/pebble-chronocode,jojoman3/Test,rexmac/pebble-chronocode,rexmac/pebble-chronocode,jojoman3/Test
src/js/pebble-js-app.js
rejected_duplicate
Near-duplicate of sample 92121
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar restify = require('restify');\nvar builder = require('botbuilder');\n\n// Get secrets from server environment\nvar botConnectorOptions = { \n appId: process.env.MICROSOFT_APP_ID, \n appSecret: process.env.MICROSOFT_APP_PASSWOR...
javascript
edit
0
1
mit
9e1703e71d1bcd0eaa51d6eabd13fa04be95873c
suancarloj/cheapandbot,suancarloj/cheapandbot
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(\n // serve up dynamic content\n\n function ()\n {\n // this code returns a web page with a word, ignoring the path\n\n \"use strict\";\n\n var http = require( 'http' );\n var rword = require('./get...
javascript
edit
0
2
mit
df3678a76187799e7aa4c0bec65d0efa873a7907
peterorum/random,peterorum/random,peterorum/random
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { expect } from 'chai'\nimport types from '../../src/constants/actionTypes'\nimport { onClickMenuButton } from '../../src/actions/nav'\n\ndescribe('actions/nav.js', () => {\n it('should toggle sidebar menu when click on menu but...
javascript
edit
0
1
mit
204d48dba743903b4b72e23a108e6a77ce4ccb02
nomkhonwaan/nomkhonwaan.github.io
tests/actions/nav.js
rejected_duplicate
Near-duplicate of sample 76102
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global QUnit*/\nimport Emblem from '../../emblem';\n\nexport function compilesTo( emblem, handlebars, message ) {\n var output = Emblem.compile(emblem);\n if (!message) {\n var maxLenth = 40;\n var messageEmblem = emblem.repla...
javascript
edit
0
3
mit
671db2df7f329ed0a23cd4d7f974cdc196e34e93
patricklx/emblem.js,patricklx/emblem.js,thec0keman/emblem.js,machty/emblem.js,machty/emblem.js,thec0keman/emblem.js,patricklx/emblem.js,bvellacott/emblem.js,NichenLg/emblem.js,machty/emblem.js,bvellacott/emblem.js,NichenLg/emblem.js,bvellacott/emblem.js,thec0keman/emblem.js,NichenLg/emblem.js
tests/support/integration-assertions.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: 'bookmeister',\n environment: environment,\n baseURL: '/',\n locationType: 'auto',\n bookmeisterServer: '',\n EmberENV:...
javascript
edit
0
4
isc
d8c6d3dd082d625c4ac816c4f8d204abe713428b
mikl/bookmeister,mikl/bookmeister
webapp/config/environment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\ndescribe('Controller: AuthenticationCtrl', function () {\n\n // load the controller's module\n beforeEach(module('dockstore.ui'));\n\n var AuthenticationCtrl,\n scope;\n\n // Initialize the controller and a mock ...
javascript
edit
0
1
apache-2.0
453055d9b8142adaeb75f0e84cc4d3ce9e7f66f1
ga4gh/dockstore-ui,ga4gh/dockstore-ui,ga4gh/dockstore-ui
test/spec/controllers/authentication.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Breaks for some reason\n/* eslint comma-dangle: [\"error\", {\"functions\":\n \"arrays\": \"always-multiline\",\n \"objects\": \"always-multiline\",\n \"imports\": \"always-multiline\",\n \"exports\": \"always-multiline\",\n \"f...
javascript
edit
0
4
mit
361998317f9ba9db5b4aa3b4193a1b277bd773de
dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4
webpack.production.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#import \"assertions.js\"\n#import \"uiautomation-ext.js\"\n#import \"lang-ext.js\"\n#import \"screen.js\"\n#import \"test.js\"\n\n```\n\nApply this change: Fix order of import statements" }, { "role": "assistant", "content"...
javascript
edit
null
null
mit
37d42c1a1147575ab2cfae8fe71ba4bc9ef4c647
Banno/tuneup_js,Northern01/tuneup_js,Northern01/tuneup_js,alexvollmer/tuneup_js,giginet/tuneup_js,songxiang321/ios-monkey,alexvollmer/tuneup_js,songxiang321/ios-monkey,Banno/tuneup_js,MYOB-Technology/tuneup_js,misfitdavidl/tuneup_js,giginet/tuneup_js,misfitdavidl/tuneup_js,MYOB-Technology/tuneup_js
tuneup.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst test = require('ava')\nconst path = require('path')\nconst { readdirSync, readFileSync } = require('fs')\nconst { compile, format } = require('../')\nconst fixtures = path.join(__dirname, 'fixtures')\nconst fixture = file => path....
javascript
edit
0
2
mit
94f4752a0a5ad07c38aa68cc79fef954a2379d1d
rrdelaney/ReasonablyTyped,ReasonablyTyped/ReasonablyTyped,ReasonablyTyped/ReasonablyTyped,rrdelaney/ReasonablyTyped
test/compile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar path = require(\"path\"),\n assert = require(\"assert\"),\n\n imports = require(\"../imports\");\n\ndescribe(\"postcss-css-modules\", function() {\n describe(\"imports\", function() {\n it(\"shou...
javascript
edit
0
1
mit
075d715f6a3703268fb73eee973f1a90e86887ee
tivac/modular-css
test/imports.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar zlib = require('zlib')\n\n\nfunction gzip (req, value) {\n req.on('response', function (res) {\n if (req._redirect) return\n var encoding = value || res.headers['content-encoding'] || 'identity'\n\n var decompress = null...
javascript
edit
0
6
apache-2.0
5f0d4efdc74ec48da7021c35b931def3eac71082
request/core
node_modules/gzip-stream.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport cheerio from 'cheerio';\nimport sinon from 'sinon';\nimport { expect } from 'chai';\n\nimport HtmlMetaAnalyserPlugin from '../../../src/plugin/html-meta-analyser/plugin';\n\ndescribe('HtmlMetaAnalyser Plugin', () => {\n it('sh...
javascript
edit
0
1
mit
0b6bda09ba1c979d81e789b423c77c4ed4c15079
developr-at/floob
test/plugin/html-meta-analyser/plugin.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nself.onmessage = function(e) {\n var fileReader = new FileReader();\n\n fileReader.onloadend = function(chunk) {\n postMessage({bin: (fileReader.result || chunk.srcElement || chunk.target).split(',')[1], chunkId: e.data.currentChun...
javascript
edit
0
3
bsd-3-clause
8920b74b1564eb90bd6579b50f8d8292569343ea
VeliovGroup/Meteor-Files
worker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport config from '../config/environment';\n\nexport function initialize(_container, application ) {\n const { metricsAdapters } = config;\n\n application.register('config:metrics', metricsAdapters, { instantiate: false });\n applic...
javascript
edit
0
1
mit
010b2a09d07305bf8f87974d279d51a71102c879
opsb/ember-metrics,poteto/ember-metrics,opsb/ember-metrics,denneralex/ember-metrics,denneralex/ember-metrics,poteto/ember-metrics
app/initializers/metrics.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport {\n JSON_AUTHORIZATION_HEADERS,\n JSON_POST_AUTHORIZATION_HEADERS\n} from \"../constants/requests\";\nimport { LOGOUT_URL } from \"../constants/urls\";\n\nexport const getFetch = url => {\n return...
javascript
edit
0
2
mit
95bcfa2e70a5112c87a424e3c1f74ce1b6e6e65d
jeffshek/betterself,jeffshek/betterself,jeffshek/betterself,jeffshek/betterself
assets/js/utils/fetch_utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst knex = require('knex');\n\nconst postgres = knex({\n client: 'postgres',\n\n connection: {\n user: 'postgres',\n host: 'localhost',\n database: 'postgres'\n }\n});\n\nconst mysql = knex({\n client: 'mysql',\n\n conne...
javascript
edit
0
1
mit
fd378860b2275f1b0764df5ba8880039d5a07ec6
Vincit/objection.js,Vincit/objection.js,Vincit/objection.js
setup-test-db.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Expand environment variables\n * Example:\n * Assuming $NEXRENDER_ASSETS is set to /Users/max/nexrender in the current process\n * an input of file://$NEXRENDER_ASSETS/projects/project2.aep\n * would output: file:///Users/max/ne...
javascript
edit
0
2
mit
695d933e197591d7972b944c62634cf2dae9c347
Inlife/noxrender,Inlife/nexrender
packages/nexrender-core/src/helpers/path.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport gql from 'graphql-tag';\n\nexport default gql`\n mutation createChannelMutation($title: String!) {\n create_channel(input: { title: $title }) {\n channel {\n id: slug\n href\n title\n }\n }\n...
javascript
edit
0
0
mit
30128899a7eb1f7a80a62f42c3e0f48a1a42fc94
aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell
react/components/Onboarding/components/Channels/components/CreateChannel/mutations/createChannel.js
rejected_duplicate
Near-duplicate of sample 90730
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n test_page: 'tests/index.html?hidepassed',\n disable_watching: true,\n launch_in_ci: [\n 'Chrome'\n ],\n launch_in_dev: [\n 'Chrome'\n ],\n browser_args: {\n Chrome: {\n ci: [\n // --no-sa...
javascript
edit
0
0
mit
0d7f2303ae7c8395a5f71a49694488e75eef55f6
kpfefferle/ember-octicons,kpfefferle/ember-octicons,kpfefferle/ember-cli-octicons,kpfefferle/ember-cli-octicons
testem.js
rejected_duplicate
Near-duplicate of sample 79152
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction switchTrend(val) {\n var trends = document.getElementsByClassName('trends');\n var i = 0;\n var updatedCurrentSlide = false;\n while(i < trends.length && !updatedCurrentSlide) {\n if(trends[i].style.display === 'block') ...
javascript
edit
0
4
apache-2.0
eeb1cd2452254f470ab3427da1756eb0828914a7
googleinterns/step19-2020,googleinterns/step19-2020,googleinterns/step19-2020
project/src/main/webapp/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready( function () {\n// $('table').dragtable({\n// dragHandle:'.th-inner'\n//// dragaccept:'th-inner'\n// });\n// $('table').DataTable( {\n//// dom: 'Bfrtip',\n// dom: 'BHt',\n// ...
javascript
edit
0
1
bsd-3-clause
4e443077f233b0598d9ffe9d16cf868252a6acf3
weijia/django-auto-filter,weijia/django-auto-filter,weijia/django-auto-filter
django_auto_filter/static/js/django_auto_filter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(){\n 'use strict';\n \n var gulp = require('gulp');\n var paths = require('./_paths');\n var ignore = require('gulp-ignore');\n var rimraf = require('gulp-rimraf');\n\n // clean out assets folder\n gulp.task('clean-pre...
javascript
edit
0
1
mit
d643b37ec079ab8ac429cb1f256413d2a29c24cc
ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend
tasks/gulp/clean-pre.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (module) {\n module.controller(\"AccountSettingsController\", AccountSettingsController);\n\n AccountSettingsController.$inject = [\"mcapi\", \"User\", \"toastr\"];\n\n /* @ngInject */\n function AccountSettingsCon...
javascript
edit
0
1
mit
61ad1b4ae14fa79062c05fd7f27b3b9a4ec9ee73
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/app/application/core/account/settings/settings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {\n History,\n Song\n} = require('../models')\nconst _ = require('lodash')\n\nmodule.exports = {\n async index (req, res) {\n try {\n const userId = req.user.id\n const histories = await History.findAll({\n ...
javascript
edit
0
2
mit
573c116d1a9928600b8273987af58ec50d8f804f
codyseibert/tab-tracker,codyseibert/tab-tracker
server/src/controllers/HistoriesController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport annotations from '../src/annotations';\n\ndescribe('A test', function () {\n\n it('will test something', function () {\n expect(annotations).to.be.an('object');\n });\n\n});\n\n```\n\nApply this change: Correct path ...
javascript
edit
0
1
bsd-3-clause
0f4f943f76e1e7f92126b01671f3fee496ad380c
Emigre/openseadragon-annotations
test/annotationsSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport postcss from 'postcss';\nimport test from 'ava';\n\nimport plugin from './';\n\nfunction run(t, input, output) {\n return postcss([ plugin ]).process(input)\n .then( result => {\n t.is(result.css, output);...
javascript
edit
0
1
mit
f52802ee28b3434b2608b4b43a30f841ea54cb89
keukenrolletje/postcss-lowvision
test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport bind from \"lib/helper/graphql/normalizeParams\"\nimport BadRequest from \"lib/error/http/BadRequest\"\nimport waterfall from \"lib/helper/array/runWaterfall\"\nimport db from \"lib/db/connection\"\n\nimport {get, remove} from \"...
javascript
edit
null
null
mit
1f319b223e46cf281e19c3546b17e13e49c1ff10
octet-stream/ponyfiction-js,octet-stream/ponyfiction-js
src/api/resolve/mutation/auth/confirmEmail.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport function parseQuery (query) {\n const chunks = query.split(/([#.])/);\n let tagName = '';\n let id = '';\n const classNames = [];\n\n for (var i = 0; i < chunks.length; i++) {\n const chunk = chunks[i];\n if (chunk ===...
javascript
edit
0
1
mit
c7d7289fbace750769cd3694cdfcfebd4ca5d123
redom/redom
esm/parse-query.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst MapErrorCodeToView = {\n 404: 'frontend.404',\n};\n\n/**\n * This class handles all exceptions thrown during\n * the HTTP request lifecycle.\n *\n * @class ExceptionHandler\n */\nclass ExceptionHandler {\n _getYo...
javascript
edit
0
2
mit
bd1ea6fceceacb3f5e71e75c51fb434ddc370208
ToxWebsite/tox.chat
app/Exceptions/Handler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar specHelper = require('./specHelper');\n\ndescribe('The strategy api', function () {\n var request;\n\n before(function () { request = specHelper.setupMockServer(); });\n after(specHelper.tearDownMockServer);\n\n it('gets...
javascript
edit
0
1
apache-2.0
63b3c56cc5c654bdd581f407abf5d6dc475dadac
Unleash/unleash,Unleash/unleash,Unleash/unleash,finn-no/unleash,Unleash/unleash,finn-no/unleash,finn-no/unleash
test/strategyApiSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport assign from '../util/assign';\nimport init from './init';\nimport registry from '../global/registry';\n\nvar specialMap = {\n caption: 'table',\n dd: 'dl',\n dt: 'dl',\n li: 'ul',\n tbody: 'table',\n td: 'tr',\n thead: 'ta...
javascript
edit
0
3
mit
4d7ac21f6f89c71bdd3bde76a1fe9f0aa4bec5a7
antitoxic/skatejs,skatejs/skatejs,chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs
src/api/create.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar db = require('../models/db');\n\ndb.User\n .build({\n username: 'johndoe',\n email: '<EMAIL>',\n name: 'John Doe',\n password: 'password',\n })\n .digest()\n .genApiKey()\n .save()\n .success(function(user){\n c...
javascript
edit
null
null
apache-2.0
7c39e26deb567dbb3edc87a60ba8653f39e778f1
tessel/oauth,tessel/oauth,tessel/oauth
seeds/users.js
rejected_code_smell
Internal duplication: ~65% of the file is inside repeated 12+ line blocks
null
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst glob = require('glob').sync;\n\nlet paths = glob('tests/*');\n\npaths = paths.concat([\n 'lib',\n 'blueprints',\n]);\n\nrequire('mocha-eslint')(paths, {\n timeout: 10000,\n slow: 1000,\n});\n\n```\n\nApply thi...
javascript
edit
0
0
mit
5a03074df9a1dddb85557209961a43a8687f2290
Turbo87/ember-cli,elwayman02/ember-cli,thoov/ember-cli,asakusuma/ember-cli,jgwhite/ember-cli,cibernox/ember-cli,jgwhite/ember-cli,mike-north/ember-cli,thoov/ember-cli,HeroicEric/ember-cli,cibernox/ember-cli,kategengler/ember-cli,jgwhite/ember-cli,jrjohnson/ember-cli,mike-north/ember-cli,fpauser/ember-cli,cibernox/ember...
tests/unit/lint-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport R from 'ramda';\nimport capitalize from './capitalize.js';\nimport uncapitalize from './uncapitalize.js';\nimport spaceCase from './space-case.js';\n\n// a -> a\nconst camelCase = R.compose(\n uncapitalize,\n R.join(''),\n R.m...
javascript
edit
0
0
mit
ded16b8fc8f518ce0ac3c484dc00003124356fca
restrung/restrung-js
src/camel-case.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst isFunction = require(\"lodash/isFunction\")\nconst isString = require(\"lodash/isString\")\nconst clickable = require(\"../reaks/clickable\")\nconst hFlex = require(\"../reaks/hFlex\")\nconst label = require(\"../reaks/label\")\nc...
javascript
edit
0
4
mit
64a8e58cc88b79faee2f6ce2c0044775d6f8643c
KAESapps/uiks,KAESapps/uiks
reaks-material/selectButton.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n stripPrefix: 'dist/',\n staticFileGlobs: [\n 'dist/*.html',\n 'dist/manifest.json',\n 'dist/*.png',\n 'dist/**/!(*map*)'\n ],\n dontCacheBustUrlsMatching: /\\.\\w{8}\\./,\n swFilePath: 'dist/service...
javascript
edit
0
0
mit
ef6f1f71017ffe5c751975b9cd8c0a5de483b8c3
subramaniashiva/quotes-pwa,subramaniashiva/quotes-pwa
app/sw-precache-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// This script runs in non-isolated environment(vk.com itself)\n// for accessing to `window.ap` which sends player events\n\nconst INFO_ID = 0;\nconst INFO_TRACK = 3;\nconst INFO_ARTIST = 4;\n\nwindow.webScrobblerInject...
javascript
edit
0
3
mit
37c5e2d057a03c0424800524981c96c486a362e7
inverse/web-scrobbler,david-sabata/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,Paszt/web-scrobbler,alexesprit/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,galeksandrp/web-scrobbler,alexesprit/web-scrobbler,usdivad/web-scrobbler,carpet-berlin/web-scrobbler,carpet-berlin/web-scrobbler,david-sabata/web-scrobbler,ga...
connectors/v2/vk-dom-inject.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Load hd images on mediu zoom" }, { "role": "assistant", "content": "import mediumZoom from '@/config/medium-zoom';\n\nwindow.addEventListener('DOMContentLoaded', () => {\n const zoomer = mediumZoom();\n\n zoomer.addEventLis...
javascript
new_file
0
2
mit
8e1963be0915d74b745f5dd0dcf7113ea55060f9
tuelsch/bolg,tuelsch/bolg
src/gallery.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// !! This module implements the ProseMirror editor. It contains\n// functionality related to editing, selection, and integration with\n// the browser. `ProseMirror` is the class you'll want to instantiate\n// and interact with when usi...
javascript
edit
0
0
mit
a1b419354da262498f34083e8afd199e199425e3
kiejo/prosemirror,tzuhsiulin/prosemirror,salzhrani/prosemirror,mattberkowitz/prosemirror,tzuhsiulin/prosemirror,adrianheine/prosemirror,salzhrani/prosemirror,jacwright/prosemirror,mattberkowitz/prosemirror,jacwright/prosemirror,tzuhsiulin/prosemirror,kiejo/prosemirror,salzhrani/prosemirror,kiejo/prosemirror,adrianheine...
src/edit/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular\n .module('app.layout')\n .directive('pvTopNav', pvTopNav);\n\n /* @ngInject */\n function pvTopNav () {\n var directive = {\n bindToController: true,...
javascript
edit
0
2
apache-2.0
6a2c1b42097e15074d14f52f9ad12640d047bd04
Poniverse/Poniverse.net
src/client/app/layout/pv-top-nav.directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\n/**\n * A section wrapper.\n *\n * This is a standalone section wrapper used for layout.\n *\n * == How to use a Section in a component:\n *\n * In your file\n *\n * import Section from 'carbon/lib/compon...
javascript
edit
0
1
apache-2.0
0fac7d46e3f14735939adf240675ace77ca47e52
Sage/carbon,Sage/carbon,Sage/carbon
src/components/section/section.js
accepted
null
true