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\nimport stampit from 'stampit';\nimport {Meta, Model} from './base';\n\nconst ApiKeyMeta = Meta({\n name: 'apiKey',\n pluralName: 'apiKeys',\n endpoints: {\n 'detail': {\n 'methods': ['delete', 'get'],\n 'path': '/v1/inst...
javascript
edit
0
0
mit
7da241808bb335551bd4a822c6970561b859ab76
Syncano/syncano-server-js
src/models/apikey.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { parsePost } from '../parsers/PostParser'\n\nclass PostsAsGrid extends React.Component {\n static propTypes = {\n posts: React.PropTypes.object,\n json: React.PropTypes.object,\n currentUser:...
javascript
edit
0
5
mit
35cbf16ff15966ecddc02abd040f8c46fe824a0d
ello/webapp,ello/webapp,ello/webapp
src/components/posts/PostsAsGrid.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar WebSocket = require('ws');\nvar reHttpSignalhost = /^http(.*)$/;\nvar reTrailingSlash = /\\/$/;\n\nfunction connect(signalhost) {\n // if we have a http/https signalhost then do some replacement magic to push across\n // to ws imp...
javascript
edit
0
2
apache-2.0
49cb1ee49686ea320689ae97ce94c5d593cccdbb
eightyeight/rtc-signaller,rtc-io/rtc-signaller
ws-connect.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\nCopyright 2019 New Vector Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.o...
javascript
edit
0
2
apache-2.0
36ffbef010db6d60a4dbc9b6c4eab9ad4ebbcf7b
matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk
src/components/views/elements/Field.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Reporter = require('../reporter');\n\nvar lcovRecord = function(data) {\n var str = \"\",\n lineHandled = 0,\n lineFound = 0,\n fileName = data.fileName;\n\n if(this.options.lcovOptions && this.options.lcovOptions.r...
javascript
edit
0
4
mit
a6972191cf167266225ddcedc1c12ce94297ef1c
yagni/ember-cli-blanket,elwayman02/ember-cli-blanket,jschilli/ember-cli-blanket,calderas/ember-cli-blanket,dwickern/ember-cli-blanket,yagni/ember-cli-blanket,calderas/ember-cli-blanket,notmessenger/ember-cli-blanket,jschilli/ember-cli-blanket,elwayman02/ember-cli-blanket,mike-north/ember-cli-blanket,sglanzer/ember-cli-...
lib/reporters/lcov-reporter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar schema = require('signalk-schema');\n\nfunction BaseWidget(id, options, streamBundle, instrumentPanel) {\n this.instrumentPanel = instrumentPanel;\n}\n\nBaseWidget.prototype.setActive = function(value) {\n this.options.active = va...
javascript
edit
0
4
apache-2.0
24e687564a18b651d57f7f49ae5c79ff935fb95a
SignalK/instrumentpanel,SignalK/instrumentpanel
lib/ui/widgets/basewidget.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global describe, it*/\n/*\n * mochify.js\n *\n * Copyright (c) 2014 Maximilian Antoni <<EMAIL>>\n *\n * @license MIT\n */\n'use strict';\n\nvar assert = require('assert');\nvar run = require('./fixture/run');\n\n\ndescribe('stack',...
javascript
edit
0
1
mit
e17572851a8351fdf7210db5aed7c6c9784c2497
mantoni/mochify.js,jhytonen/mochify.js,mantoni/mochify.js,mantoni/mochify.js,jhytonen/mochify.js,Heng-xiu/mochify.js,Swaagie/mochify.js,Swaagie/mochify.js,boneskull/mochify.js,boneskull/mochify.js,Heng-xiu/mochify.js
test/stack-test.js
rejected_duplicate
Near-duplicate of sample 75162
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Settings from './Settings';\n\n/**\n * Plugin to show app settings in results list\n * @param {String} term\n */\nconst settingsPlugin = (term, callback) => {\n if (!term.match(/^(show\\s+)?(settings...
javascript
edit
0
2
mit
e178e5a5213b07650fa4c9ce1fc32c25c3d7af12
KELiON/cerebro,KELiON/cerebro
main/plugins/settings/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst withOffline = require(\"next-offline\");\n\nconst nextConfig = {\n target: \"serverless\",\n future: {\n webpack5: true,\n },\n workboxOpts: {\n swDest: \"static/service-worker.js\",\n runtimeCaching: [\n {\n ...
javascript
edit
0
0
bsd-2-clause
3af7d2e005748a871efe4d2dd278d11dfc82950f
overshard/isaacbythewood.com,overshard/isaacbythewood.com
next.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ready = function() {\n\t$('#FontSize a').click(function() {\n\t\t$('.content').css(\"font-size\", this.dataset.size);\n\t});\n\n\t$('#FontFamily a').click(function(){\n\t\t$('.content').css(\"font-family\", this.innerHTML);\n\t});\n...
javascript
edit
0
5
mit
5b20639101d8da9031641fa9565970bcdc67b441
mk12/great-reads,mk12/great-reads,mk12/great-reads
app/assets/javascripts/books.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n if ($('small.error').length > 0) {\n $('html, body').animate({\n scrollTop: ($('small.error').first().offset().top)\n },500);\n }\n});\n```\n\nApply this change: Improve scrolling to error feature" }, {...
javascript
edit
0
2
mit
39b78875d513f19cd5ba3b6eeeafe244d6980953
airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core
app/assets/javascripts/forms.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\n\nmodule.exports = function (context, xmlZipBlob) {\n context.log('Node.js blob trigger function processed blob:', xmlZipBlob);\n context.log(`typeof xmlZipBlob:`, typeof xmlZipBlob);\n\n fs.writeFile('...
javascript
edit
0
2
mit
a5b130aaeb84c5dc2b26fddba87805c4d9a8915d
mattmazzola/sc2iq-azure-functions
xmlToJson/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = require('../../config/config.js');\nvar express = require('express');\nvar router = express.Router();\nvar mongoose = require('mongoose');\nvar Observation = mongoose.model('Observation');\nvar realtime = require('../realti...
javascript
edit
0
3
mit
add6c9550f0968e0efe196747997887ed8921c33
MichaelRohrer/OpenAudit,IoBirds/iob-server,MichaelRohrer/OpenAudit,IoBirds/iob-server
app/controllers/observations.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n (function() {\n function timecode() {\n return function(seconds) {\n var seconds = Number.parseFloat(seconds);\n \n if (Number.isNaN(seconds)) {\n return '-:--';\n ...
javascript
edit
0
1
apache-2.0
6916f08a1d587d64db47aa9068c0389d08aa5e1c
orlando21/ng-bloc-jams,orlando21/ng-bloc-jams
app/scripts/filters/timecode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst html = require('choo/html');\nconst callcount = require('./callcount.js');\nconst chai = require('chai');\nconst expect = chai.expect;\n\n// Skip a test if the browser does not support locale-based number formatting\nfunction ifLo...
javascript
edit
0
3
mit
f6c1c6a4bf04d64c97c06fd57cc14f584fc530f5
5calls/5calls,5calls/5calls,5calls/5calls,5calls/5calls
static/js/components/callcount_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction startTime() {\n var today=new Date();\n var h=checkTime(today.getHours());\n var m=checkTime(today.getMinutes());\n var s=checkTime(today.getSeconds());\n var timeString = s%2===0 ? h + \":\" + m + \":\" + s : h ...
javascript
edit
0
2
mit
d08cf84a589a20686ed431e8c8134697ee3c004c
SalomonSmeke/old-site,SalomonSmeke/old-site,SalomonSmeke/old-site
js/home.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { computed } from '@ember/object';\nimport Navbar from 'ember-bootstrap/components/base/bs-navbar';\n\nexport default Navbar.extend({\n classNameBindings: ['breakpointClass', 'backgroundClass'],\n\n type: 'light',\n\n /**\n ...
javascript
edit
0
0
mit
d1b9a635f976403db95e86b7cbbdbd03daadc44a
jelhan/ember-bootstrap,jelhan/ember-bootstrap,kaliber5/ember-bootstrap,kaliber5/ember-bootstrap
addon/components/bs4/bs-navbar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nDDG.require('maps',function(){\n ddg_spice_maps_maps = function(response) {\n \n if (!response || !response.length) { return Spice.failed('maps'); }\n\n // OSM sends back a bunch of places, just want the first on...
javascript
edit
0
2
apache-2.0
11bab5733e1f0292ff06b0accc1fc6cc25cd29b6
whalenrp/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,lernae/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-s...
share/spice/maps/maps/maps_maps.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar list = document.createElement('ul');\nvar info = document.createElement('p');\nvar html = document.querySelector('html');\n\ninfo.textContent = 'Below is a dynamic list. Click anywhere outside the list to add a new list item. Click ...
javascript
edit
0
1
cc0-1.0
d0d1e2f8beee81818d0905c9e86c1d0f59ee2e31
mdn/learning-area,mdn/learning-area,mdn/learning-area,mdn/learning-area
html/introduction-to-html/the-html-head/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport DataLoader from 'dataloader';\nimport client from 'util/client';\n\nexport default () =>\n new DataLoader(async categoryQueries => {\n const body = [];\n\n categoryQueries.forEach(({ id, first, before, after }) => {\n ...
javascript
edit
0
8
mit
e2276933cf61b229ed63e6fe69010586468af649
MrOrz/rumors-api,MrOrz/rumors-api,cofacts/rumors-api
src/graphql/dataLoaders/articleCategoriesByCategoryIdLoaderFactory.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from \"ember\";\nexport default Ember.Mixin.create({\n /**\n * For use with the inventory-type ahead. When an inventory item is selected, resolve the selected\n * inventory item into an actual model object and s...
javascript
edit
0
2
mit
62af16add5c5e9456b543787a136226c892ea229
HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend
app/mixins/inventory-selection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar listeners = {};\n\nexports.addEventListener = function(name, func) {\n\tif (!listeners[name]) {\n\t\tlisteners[name] = [];\n\t}\n\tlisteners[name].push(func);\n\treturn exports;\n};\n\nexports.hasEventListeners = function(name) {\n\...
javascript
edit
0
4
apache-2.0
584bdf23880938277f952bb8e59b33c697bd5974
appcelerator-titans/abcsWriter
Resources/lib/events.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar queue = require('queue-async');\nvar _ = require('underscore');\n\nfunction MapConfigNamedLayersAdapter(overviewsApi) {\n this.overviewsApi = overviewsApi;\n}\n\nmodule.exports = MapConfigNamedLayersAdapter;\n\nMapConfigNamedLaye...
javascript
edit
0
4
bsd-3-clause
ed9b3e12309fa37080541f96f11e4c1ab2fb8cf1
CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb
lib/cartodb/models/mapconfig_overviews_adapter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n(function() {\n\n angular.module('ncsaas')\n .directive('sidebar', ['$state', sidebar]);\n\n function sidebar($state, $uibModal) {\n return {\n restrict: 'E',\n scope: {\n items: '=',\n c...
javascript
edit
0
1
mit
15cdaec26ef23fac04c6055dc93398dd55cb65d4
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
app/scripts/directives/sidebar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { connect } from 'react-redux';\nimport { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { setConfig } from 'widget-editor';\n\nimport { browserHistory } from 'react-router';\nimport actions from './auth-a...
javascript
edit
0
3
mit
243f8dc177fbcf33c2fa67c0df2f177e3d53e6ad
resource-watch/prep-app,resource-watch/prep-app
app/scripts/modules/auth/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n semi: false,\n tabWidth: 2,\n singleQuote: true,\n proseWrap: 'always',\n}\n\n```\n\nApply this change: Configure prettier to format mdx" }, { "role": "assistant", "content": "module.exports = {\n s...
javascript
edit
0
0
mit
ee492f36b4d945945bb88a6dcbc64c5b6ef602d1
dtjv/dtjv.github.io
.prettierrc.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Make tooltips work when tabbing\n\nFixed the tooltips on IE, and changed the background colour to be\nnicer on Firefox.\n\nPatch by: Haoyu Bai <<EMAIL>>\n\n--HG--\nextra : convert_revision : svn%3A32761e7d-7263-4528-b7be-7235b26367ec/tru...
javascript
new_file
0
1
apache-2.0
d961c6fbb923c2f9faa3e64e5ddbef83a93afa63
MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging
app/soc/content/js/tips-081027.js
rejected_duplicate
Near-duplicate of sample 94441
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar tag = document.createElement('script');\ntag.src = \"https://www.youtube.com/iframe_api\";\nvar firstScriptTag = document.getElementsByTagName('script')[0];\nfirstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\n\nvar player...
javascript
edit
0
1
mit
0202747e5620276e90c907bfbd14905891f744a5
frankhale/electron-with-express
public/javascripts/youtube-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport chai from 'chai';\nimport irc from 'irc';\nimport discord from 'discord.js';\nimport Bot from '../lib/bot';\nimport config from './fixtures/single-test-config.json';\nimport caseConfig from './fixtures/case-sensitivity-config.jso...
javascript
edit
0
1
mit
2ae9e370b6b3c4ef87275471f50f1db007dbfb23
reactiflux/discord-irc
test/channel-mapping.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* application entry point */\n\n// require mithril globally for convenience\nwindow.m = require('mithril');\n\n// cordova plugins polyfills for browser\nif (!window.cordova) require('./cordovaPolyfills.js');\n\nvar utils = require('./u...
javascript
edit
0
3
mit
5c0ff1bf885ac5a40dddd67b9e9733ee120e4361
btrent/lichobile,btrent/lichobile,garawaa/lichobile,garawaa/lichobile,btrent/lichobile,garawaa/lichobile,btrent/lichobile
project/src/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n normalizeEntityName: function() {},\n\n afterInstall: function(options) {\n // We assume that handlebars, ember, and jquery already exist\n return this.addBowerPackagesToProject([\n {\n // Antisc...
javascript
edit
0
1
bsd-3-clause
87a986ae375e5c44edb4b7c8a2653e21d5f60310
artych/ember-table,winweb/ember-table,morten-holm/ember-table,kaikoehn/ember-table,ilovezy/ember-table,winweb/ember-table,hedgeserv/ember-table,Gaurav0/ember-table,fuse-mars/ember-table,artych/ember-table,morten-holm/ember-table,hedgeserv/ember-table,kaikoehn/ember-table,remerge/ember-table,remerge/ember-table,fuse-mar...
blueprints/ember-table/index.js
rejected_duplicate
Near-duplicate of sample 94517
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n* Questions.js\n*\n* @description :: TODO: You might write a short summary of how this model works and what it represents here.\n* @docs :: http://sailsjs.org/#!documentation/models\n*/\n\nmodule.exports = {\n\n attributes:...
javascript
edit
0
0
mit
96f88d87967b29d338f5baf984691ba7f7e9110d
Xignal/Backend
Web/api/models/Questions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This just dumps out an ast for your viewing pleasure.\n\ninclude(\"dumpast.js\");\n\nfunction process_js(ast) {\n dump_ast(ast);\n}\n\n```\n\nApply this change: [ViewSource] Make jshydra output match dehydra's." }, { "role":...
javascript
edit
0
5
mit
5bd0512b74cb30edd82b8aa4d2c8ea55f8944a56
srenatus/dxr,jonasfj/dxr,pelmers/dxr,jay-z007/dxr,jay-z007/dxr,jbradberry/dxr,jbradberry/dxr,pelmers/dxr,kleintom/dxr,jonasfj/dxr,erikrose/dxr,pombredanne/dxr,nrc/dxr,gartung/dxr,pombredanne/dxr,pelmers/dxr,nrc/dxr,jay-z007/dxr,KiemVM/Mozilla--dxr,gartung/dxr,erikrose/dxr,jay-z007/dxr,KiemVM/Mozilla--dxr,jbradberry/dxr...
viewsource/js/static/ast.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\n\nconst Quote = ({quote}) => (\n <div>\n <p>{quote.value}</p>\n <p>{quote.author}</p>\n </div>\n)\n\nQuote.propTypes = {\n quote: PropTypes.object.isRequired\n}\n\nexport default Q...
javascript
edit
0
1
mit
67f62b161eb997b77e21a2c1bedd6748baa97908
subramaniashiva/quotes-pwa,subramaniashiva/quotes-pwa
app/components/quotes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n/*eslint-disable no-var */\nvar path = require('path');\nvar spawner = require('child_process');\n\nexports.getFullPath = function(script){\n return path.join(__dirname, script);\n};\n\n// Respawn ensuring prop...
javascript
edit
0
5
mit
c82e4c18c64c3f86e3865484b4b1a01de6f026a5
SockDrawer/SockBot
lib/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst validate = (values) => {\n const errors = {};\n if (!values.title || values.title.trim() === '') {\n errors.title = 'Book title is required';\n }\n if (!values.author || values.author.trim() === '') {\n errors.author = '...
javascript
edit
0
15
mit
92b0f90d0962114f54ec58babcc6017018a1263b
amarachukwu-agbo/hello-books,amarachukwu-agbo/hello-books
client/helpers/validations/book.js
rejected_complexity
Cyclomatic complexity too high: 15
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular\n .module('app')\n .factory('apiService', [\n '$http',\n function($http) {\n return {\n client: $http.get('/api/bower'),\n server: $http.get('/api/package')\n };\n }\n ])\n;\n\n```\n\nApply th...
javascript
edit
0
1
mit
f9ea5ab178f8326b79c177889a5266a2bd4af91b
ericclemmons/ericclemmons.github.io,ericclemmons/ericclemmons.github.io
client/app/scripts/services/api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar test = require('ava');\nvar unescapeCss = require('../lib/unescape-css');\n\ntest('should unescape plain chars', function (t) {\n t.is(unescapeCss('Romeo \\\\+ Juliette'), 'Romeo + Juliette');\n});\n\ntest('should unescape ASCII ch...
javascript
edit
0
1
mit
8070c9f13209b80b1881fc83de027b3895656046
assetsjs/postcss-assets,borodean/postcss-assets
test/unescape-css.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function ($) {\n\n $.fn.dragster = function (options) {\n var settings = $.extend({\n enter: $.noop,\n leave: $.noop\n }, options);\n\n return this.each(function () {\n var first...
javascript
edit
0
5
mit
7c8a1b33bad96e772921a24ced0343d756dcae34
catmanjan/jquery-dragster
jquery.dragster.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar args = arguments[0] || {};\n\nif (args.hasOwnProperty('itemIndex')) {\n // Edit mode\n var myModel = Alloy.Collections.tasks.at(args.itemIndex);\n $.text.value = myModel.get('text');\n} else {\n // Add mode\n var myModel = Allo...
javascript
edit
0
2
mit
439cfd0b85a8a2416aeac40607bfddad86ef9773
HazemKhaled/TiTODOs,HazemKhaled/TiTODOs
app/controllers/form.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\nCopyright 2015, 2016 OpenMarket Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.ap...
javascript
edit
0
1
apache-2.0
67efb8bde264e3ea0823e40558d29dd89120c0c9
vector-im/riot-web,vector-im/riot-web,vector-im/vector-web,vector-im/vector-web,vector-im/vector-web,martindale/vector,vector-im/vector-web,vector-im/riot-web,vector-im/riot-web,vector-im/vector-web,vector-im/riot-web,vector-im/riot-web,martindale/vector
src/components/views/messages/MessageTimestamp.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n \n $('.side-nav-container').hover(function() {\n $(this).addClass('is-showed');\n $('.kudo').addClass('hide');\n }, function() {\n $(this).removeClass('is-showed');\n $('.kudo').removeClas...
javascript
edit
0
3
cc0-1.0
350209bd9bebca2d9365e531d87ecdf53758026d
cybertk/cybertk.github.io,margaritis/svbtle-jekyll,orlando/svbtle-jekyll,margaritis/margaritis.github.io,orlando/svbtle-jekyll,margaritis/margaritis.github.io,margaritis/margaritis.github.io,cybertk/cybertk.github.io,margaritis/svbtle-jekyll
assets/javascripts/js.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// The rules ultimately override any rules defined in legacy/rules/style.js\nmodule.exports = {\n rules: {\n // Enforce function expressions\n // http://eslint.org/docs/rules/func-style\n 'func-style': ['error', ...
javascript
edit
0
0
mit
50a084e7894ae1b3586709cf488bd2260cbeb615
eventbrite/javascript
packages/eslint-config-eventbrite/rules/style.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Run in: http://adventofcode.com/day/10\n */\n\n;(function () {\n let input = document.querySelector('.puzzle-input').textContent\n\n console.log(\n 'Day09/first:',\n first(input)\n )\n\n console.log(\n 'Day09/second:...
javascript
edit
0
1
mit
75cb05b23b6267665a59e1cc3d53ac6abdd2e11d
stefanmaric/scripts,stefanmaric/scripts
adventofcode/day10.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { ActionConstants as actions } from '../actions'\nimport { NETWORK_MAIN, NETWORK_TEST } from '../actions/network'\n\nexport default function network(state = {}, action) {\n switch (action.type) {\n case actions.network....
javascript
edit
0
6
mit
f683c19b98c6f2a87ea4c97e55854f871fae5763
ixje/neon-wallet-react-native,ixje/neon-wallet-react-native,ixje/neon-wallet-react-native
app/reducers/network.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\ndescribe('controllers', function() {\n var httpBackend, scope, createController;\n beforeEach(module('polyflix'));\n\n beforeEach(inject(function($rootScope, $httpBackend, $controller) {\n httpBackend = $httpBacke...
javascript
edit
0
1
mit
0c009ce0f6c647b3e514f1e4efeefb30c929120e
ryanbradynd05/polyflix,ryanbradynd05/polyflix,ryanbradynd05/polyflix,ryanbradynd05/polyflix,ryanbradynd05/polyflix
client/angular/src/app/controllers/movies.controller.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { join } = require('path')\nconst { writeFile } = require('fs').promises\nconst { default: players } = require('../lib/players')\n\nconst generateSinglePlayers = async () => {\n for (const { key, name } of players) {\n const f...
javascript
edit
0
2
mit
088438040d865c219cd602cc59bfb66d2b6f2486
CookPete/react-player,CookPete/react-player
scripts/pre-publish.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n name: '255kb:cordova-disable-select',\n version: '1.0.2',\n summary: 'Disables user selection and iOS magnifying glass / longpress menu in Cordova applications.',\n git: 'https://github.com/255kb/cordova...
javascript
edit
0
1
mit
5240db9f7366808a612e6ad722b16e63ba23baa6
255kb/cordova-disable-select
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\r\n\r\nconst Game = require('./game');\r\n\r\n// todo: this class got refactored away to almost nothing. does it still have value?\r\n// hmm, yes, since we are decorating it\r\n\r\nclass GameEngine {\r\n constructor(repos...
javascript
edit
0
1
mit
f05b9ad8b3c8f7bb201fccbbb0267c01e7eabbbf
dshaneg/text-adventure,dshaneg/text-adventure
lib/game-engine.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nangular.module('com.module.sandbox')\n .controller('SandboxFormsCtrl', function ($scope, CoreService) {\n\n var now = new Date();\n\n $scope.formOptions = {};\n\n $scope.formData = {\n name: null,\n de...
javascript
edit
0
1
mit
3f425c1e15751fd8ea7d857b417a2932208b4366
TNick/loopback-angular-admin,igormusic/referenceData,gxr1028/loopback-angular-admin,shalkam/loopback-angular-admin,igormusic/referenceData,colmena/colmena,jingood2/loopbackadmin,Jeff-Lewis/loopback-angular-admin,colmena/colmena-cms,telemed-duth/eclinpro,senorcris/loopback-angular-admin,colmena/colmena-cms,shalkam/loopb...
client/app/modules/sandbox/controllers/sandbox.forms.ctrl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst is = require('is');\nconst url = require('url');\n/**\n * Returns an object containing the required properties to make an\n * http request.\n * @module DELETE/sanitizeArguments\n * @param {array} a - Arguments\n * @return {object}...
javascript
edit
0
7
mit
bc19de3950abae46adf992dfa77ee890e8ed6aa9
opensoars/ezreq
src/DELETE/sanitizeArguments/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { moduleForComponent, skip } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\nimport notificationsStub from 'wherehows-web/tests/stubs/services/notifications';\nimport userStub from 'wherehows-web/tests/stubs/s...
javascript
edit
0
1
apache-2.0
af31fac9ce0fcc39d6d8e079cc9c534261c2d455
mars-lan/WhereHows,linkedin/WhereHows,linkedin/WhereHows,camelliazhang/WhereHows,mars-lan/WhereHows,camelliazhang/WhereHows,camelliazhang/WhereHows,camelliazhang/WhereHows,alyiwang/WhereHows,theseyi/WhereHows,linkedin/WhereHows,mars-lan/WhereHows,theseyi/WhereHows,alyiwang/WhereHows,theseyi/WhereHows,camelliazhang/Wher...
wherehows-web/tests/integration/components/datasets/containers/dataset-acl-access-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport redux from 'npm:redux';\nimport reducers from '../reducers/index';\nimport enhancers from '../enhancers/index';\nimport optional from '../reducers/optional';\nimport middlewareConfig from '../middlewar...
javascript
edit
0
3
mit
b463c1709faf3da73b907dc842d83aa2709a1e77
ember-redux/ember-redux,dustinfarris/ember-redux,dustinfarris/ember-redux,toranb/ember-redux,toranb/ember-redux,ember-redux/ember-redux
app/services/redux.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Invocation from './invocation';\nimport StatusLine from './status_line';\n\nexport default React.createClass({\n getInitialState() {\n return {vcsData: {\n isRepository: true,\n ...
javascript
edit
0
5
mit
93fa682de8cd2ed950432c64c32c352579cfa7cd
Young55555/black-screen,rocky-jaiswal/black-screen,over300laughs/black-screen,rocky-jaiswal/black-screen,smaty1/black-screen,drew-gross/black-screen,noikiy/black-screen,toxic88/black-screen,AnalogRez/black-screen,RyanTech/black-screen,alessandrostone/black-screen,mzgnr/black-screen,jbhannah/black-screen,jassyboy/black-...
views/board.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember'\n\nimport AFField, { DEFAULT_CONFIG as FIELD_DEFAULT_CONFIG } from '../components/af-field'\n\nimport i18n from '../mixins/i18n'\nimport loc from '../mixins/loc'\nimport restless from '../mixins/restless'\nimpo...
javascript
edit
0
3
mit
74eed05c7175e7fe96d54286f7feaaf68fcc3085
dough-com/ember-ambitious-forms,dough-com/ember-ambitious-forms
addon/services/ember-ambitious-forms.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n $(\"#advanced_search_toggler\").click(function(e){\n $('body').append('<div class=\"as-form-overlay\">')\n $(\"#advanced_search_toggler\").toggleClass('is-opened')\n $(\"#advanced_search_form\")...
javascript
edit
0
1
mit
29de57f99e6946e6db7257d650b860eaf2f58a7d
cartolari/carnival,dsakuma/carnival,dsakuma/carnival,Vizir/carnival,dsakuma/carnival,cartolari/carnival,dsakuma/carnival,Vizir/carnival,cartolari/carnival,Vizir/carnival,cartolari/carnival,Vizir/carnival,cartolari/carnival,Vizir/carnival,dsakuma/carnival
app/assets/javascripts/carnival/advanced_search.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component, PropTypes} from 'react';\nimport t from 'tcomb-form';\n\nfunction renderInput(locals) {\n\n const onChange = function (event) {\n locals.onChange(event.target.value);\n };\n\n const triggerRealInputChange...
javascript
edit
0
1
apache-2.0
d718fa64b1b3ab4fc0aa9c678faf15477a205dce
First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui
app/assets/javascripts/views/components/Editor/fields/virtualKeyboard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\na * b;\n10*5;\n10 * 5;\n10e5*5;\n\n10 * (5 + 10);\n10*(5 + 10);\n\n```\n\nApply this change: Add test for two variables being multiplied who lack a space in between." }, { "role": "assistant", "content": "a * b;\na*b;\n10*5;...
javascript
edit
0
0
mit
11c687b1d5bb1eb5a09c7efb6086ee6d3f536d0e
Mark-Simulacrum/attractifier,Mark-Simulacrum/pretty-generator
tests/test-files/preserve-simple-binary-expressions/input.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Globals we expose on the window object for manual debugging with the Chrome\n * console.\n *\n * TODO: Consider disabling this for release builds.\n *\n * @flow\n */\n\nimport * as actions from './actions'\nimport store from './...
javascript
edit
null
null
mit
41abdbad1fc8af309a852770478a0a517c0a6395
alangpierce/LambdaCalculusPlayground,alangpierce/LambdaCalculusPlayground,alangpierce/LambdaCalculusPlayground
DebugGlobals.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(global) {\n \"use strict\";\n\n var default_i18n = new Jed({\n locale_data: TRANSLATIONS,\n domain: \"indico\"\n });\n\n global.i18n = default_i18n;\n global.$T = _.bind(default_i18n.gettext, defau...
javascript
edit
0
1
mit
49500617b9ffe668dd4883c9190cac4c1ca15781
ThiefMaster/indico,OmeGak/indico,mvidalgarcia/indico,indico/indico,ThiefMaster/indico,DirkHoffmann/indico,pferreir/indico,DirkHoffmann/indico,mvidalgarcia/indico,ThiefMaster/indico,pferreir/indico,indico/indico,mic4ael/indico,pferreir/indico,mic4ael/indico,mic4ael/indico,DirkHoffmann/indico,OmeGak/indico,mvidalgarcia/i...
indico/htdocs/js/utils/i18n.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar users = require('./user-dump'),\n\tPromise = require('bluebird')\n\nmodule.exports = {\n\tget : Get,\n\tadd : Add\n};\n\n\nfunction Get(request,reply) {\n\t\n\tsetTimeout(function() {\n\t\treply.data = users;\n\t\treply.continue();\...
javascript
edit
0
1
mit
59745c5117613e7822056fe75ceb502ef702853d
Pranay92/hapi-next
example/user/controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\ndescribe('Sign up page', function () {\n\n\tvar watchButton;\n\n\tbeforeEach(function () {\n\t\twatchButton = element('.btn-primary');\n\t});\n\n\tit('should have Watch/Unwatch disabled by default', function() {\n\t\tex...
javascript
edit
0
1
mit
0939f9e32aa620132b444799f864056a097ead2d
seriema/npmalerts-web,seriema/npmalerts-web
test/e2e/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component, PropTypes} from 'react'\nimport classnames from 'classnames'\nimport {Scrollbars} from 'react-custom-scrollbars'\n\nclass FancyScrollbar extends Component {\n constructor(props) {\n super(props)\n }\n\n s...
javascript
edit
0
1
mit
7a7a6905f01aa99f5ff2c75cee165cf691dde8eb
mark-rushakoff/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdata/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,li-ang/influxdb,nooproblem/influxdb,li-ang/influxdb,mark-rushakoff/influxdb,nooproblem...
ui/src/shared/components/FancyScrollbar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into including all the files listed below.\n// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically\n// be included in the compiled file accessible f...
javascript
edit
0
0
mit
eca69d314c990f7523742277cd104ef5371a49d2
Soluciones/kpi,Soluciones/kpi,Soluciones/kpi
test/dummy/app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\"\n\nconst mocha = require('mocha');\nconst expect = require('chai').expect;\nconst fs = require('fs');\nconst mri = require('../src/mri');\n\ndescribe(\"Detect CSharp functions\", function(){\n it(\"should detect functi...
javascript
edit
0
1
mit
1c84ae2c3ebe985ed1e5348cd4ee2cdb4aee1be3
vgaltes/CrystalGazer,vgaltes/CrystalGazer
test/mriTests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nvar rule = require('../../../lib/rul...
javascript
edit
0
0
mit
ad3279b9d7642dbe53e951ea7d7131e637c4e589
Turbo87/eslint-plugin-ember-internal
tests/lib/rules/no-const-outside-module-scope.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * This is the default (fallback) configuration file for the web application.\n */\n\n// Create empty CONFIG object as fallback if it does not exist.\nvar CONFIG = CONFIG || {};\n\n// Default configuration.\nvar DEFAULT_CONFIG = {}...
javascript
edit
0
0
apache-2.0
b2403270ce82fdae09db5e07b07ea6f92bb955d6
aarpon/obit_shared_core_technology,aarpon/obit_shared_core_technology,aarpon/obit_shared_core_technology
core-plugins/shared/1/as/webapps/project-viewer/html/js/config/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP\n\nimport React, { Component } from 'react';\nimport Spinning from 'grommet/components/icons/Spinning';\nimport DocsArticle from '../../components/DocsArticle';\nimpor...
javascript
edit
0
2
apache-2.0
fa126551f8dafa5171aca253e6add5ecc7b928b5
grommet/grommet-docs,grommet/grommet-docs
src/docs/components/SpinningDoc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (Como) {\n var models = {},\n // include underscore utility-belt\n _ = require('/lib/Underscore/underscore.min');\n\n _.each(Como.config.models, function (m) {\n var _m = require('/ap...
javascript
edit
0
1
apache-2.0
02f49e650e067a9dac49998bf2ddfdcf38b23eb8
geekzy/tiapp-como
Resources/lib/Como/Models.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction routerConfig ($stateProvider, $urlRouterProvider) {\n 'ngInject';\n $stateProvider\n // Holding page\n .state('holding-page', {\n url: '/',\n views: {\n 'content': {\n templateUrl: 'app/holding...
javascript
edit
0
1
mit
0e91b9b2a063a22bf1033777452c8c87cb399829
RobEasthope/lazarus,RobEasthope/lazarus
src/app/index.route.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add a more useful comment" }, { "role": "assistant", "content": "var persist = require('./lib/persist');\n\n/**\n * @param String db MongoDB connection string\n * @param Array data\n * @return promise\n * This module makes us...
javascript
new_file
0
0
mit
657ea31a8373be43b33d80cfe58915e294ec21ea
imgges/persist
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n name: 'app.session',\n\n initialize(container, application) {\n application.inject('controller', 'session', 'service:session');\n application.inject('route', 'session', 'service:session');\n }\n...
javascript
edit
0
1
apache-2.0
ce7365ee16191777ad76d4009e2e0d21cde204fe
Susurrus/crates.io,achanda/crates.io,achanda/crates.io,steveklabnik/crates.io,achanda/crates.io,rust-lang/crates.io,steveklabnik/crates.io,Susurrus/crates.io,steveklabnik/crates.io,rust-lang/crates.io,rust-lang/crates.io,achanda/crates.io,steveklabnik/crates.io,Susurrus/crates.io,rust-lang/crates.io,Susurrus/crates.io
app/initializers/session.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(prompts) {\n // This method will only show prompts that haven't been supplied as options. This makes the generator more composable.\n const filteredPrompts = [];\n const props = new Map();\n...
javascript
edit
0
2
mit
0e3db15aa1c142c5028a0da35f0da42a237aa306
artefact-group/yeoman-option-or-prompt
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.register = function(plugin, options, next) {\n\n // Wait 10 seconds for existing connections to close then exit.\n var stop = function() {\n plugin.servers[0].stop({\n timeout: 10 * 1000\n }, function() {\n p...
javascript
edit
0
1
mit
c631ca483da85d04ef13afcf9e9c0f78a74cfc61
KyleAMathews/hapi-death
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\n\nmodule.exports = function (source) {\n if (this.cacheable) {\n this.cacheable();\n }\n\n var filename = path.basename(this.resourcePath),\n matches = 0,\n processedSource;\n\n processedSou...
javascript
edit
0
3
mit
8044a284695bb16567d50c4bb58a965f7d181bfe
gaearon/react-hot-loader,gaearon/react-hot-loader
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function () {\n StructureSpawn.prototype.createCustomCreep = \n function(energy, roleName) {\n var numberOfParts = Math.floor(energy / 350);\n var body = [];\n for (let i = 0; i < numberOf...
javascript
edit
0
8
mit
f2bbd2ed9f3a7cac8075d1ddb1b294c5069b0589
Raltrwx/Ralt-Screeps
prototype.spawn.js
rejected_duplicate
Near-duplicate of sample 76372
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar shell = require('shelljs')\n\nif (exec('git status --porcelain').stdout) {\n console.error('Git working directory not clean. Please commit all chances to release a new package to npm.')\n process.exit(2)\n}\n\nvar versionIncrement...
javascript
edit
0
2
mit
7c3bcda4f834cfab2fdd4caa32b59ea6c8082176
mafintosh/mongojs
release.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Forest tables\n\n$(document).on('mouseenter', '.forest-table tbody tr', function() {\n var $row = $(this);\n\n $row.addClass('active');\n\n $(document).one('turbolinks:before-cache.forestTables', function() {\n $row.removeClass...
javascript
edit
0
7
mit
29aae66080fcdff0fe62486d445c6a3a9aeff406
dylanfisher/forest,dylanfisher/forest,dylanfisher/forest
app/assets/javascripts/forest/admin/partials/forest_tables.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n////\tExternal Links\n// Open external links in a new tab.\n$(function () {\n\t$('a').each(function () {\n\t\tif ( $(this).href.indexOf(window.location.host) == -1 ) {\n\t\t\t$(this).attr('target', '_blank');\n\t\t}\n\t});\n});\n\n```\n...
javascript
edit
0
2
mit
446503cb5c27964f693b0d931b52ff18f862b159
eustasy/puff-core,eustasy/puff-core,eustasy/puff-core
assets/js/external-links.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
1d46cc1e616d64cdae5b29e9f777c309b3ea08f7
var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training
SPAWithAngularJS/module3/directives/controllersInsideDirective/js/app.shoppingListDirective.js
rejected_duplicate
Near-duplicate of sample 101601
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\n\nvar clean = require('gulp-clean');\nvar zip = require('gulp-zip');\n\nvar bases = {\n root: 'dist/'\n};\n\nvar paths = [\n 'core/actions/*',\n 'core/common/**',\n 'admin/**',\n '!admin/confi...
javascript
edit
0
1
mit
5b7eda2be2c50e4aab45b862c2f9cde0d31c2dfe
ssigg/ticketbox-server-php,ssigg/ticketbox-server-php,ssigg/ticketbox-server-php
gulpfile.js
rejected_duplicate
Near-duplicate of sample 74672
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require(\"lodash\");\nvar Bacon = require(\"baconjs\");\n\nvar Interact = module.exports;\n\nInteract.ask = function (question) {\n var readline = require(\"readline\").createInterface({\n input: process.stdin,\n output: ...
javascript
edit
0
2
apache-2.0
e4e9561be08162dc7d00ce5cf38f55b52cad5863
CleverCloud/clever-tools,CleverCloud/clever-tools,CleverCloud/clever-tools
src/models/interact.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n var cogClass = function () {};\n cogClass.prototype.exec = function (params, request, response) {\n var oops = this.sys.apiError;\n var sys = this.sys;\n var userID = params.id;\n var u...
javascript
edit
0
2
unlicense
8695e857ae870b1e991cd511ffd70101969876cc
fbennett/newswriter
api/feed/pending/matchExec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// TODO Just add fallbacks to config.js\nvar path = require('path')\n\nmodule.exports = {\n port: 8080,\n address: '127.0.0.1',\n\n session_secret: 'asdf',\n\n database: {\n host: 'mongodb://127.0.0.1/', // MongoDB host\n name...
javascript
edit
0
0
unlicense
77726d201de27f48485de497ff706ccea11becc2
Vegosvar/Vegosvar,Vegosvar/Vegosvar,Vegosvar/Vegosvar
src/config/config.default.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Fix test input file with incorrect contets" }, { "role": "assistant", "content": "module.exports = {\n\tname: 'commonjs.legacy.index_json/commonjs.legacy.index_json.js'\n};\n" } ]
javascript
new_file
0
0
apache-2.0
7cf8e87de3aac94d6371799c1bc23c117df06b8d
mano-mykingdom/titanium_mobile,ashcoding/titanium_mobile,cheekiatng/titanium_mobile,mano-mykingdom/titanium_mobile,mano-mykingdom/titanium_mobile,cheekiatng/titanium_mobile,ashcoding/titanium_mobile,cheekiatng/titanium_mobile,cheekiatng/titanium_mobile,ashcoding/titanium_mobile,ashcoding/titanium_mobile,ashcoding/titan...
ti_mocha_tests/modules/commonjs/commonjs.legacy.index_json/1.0.0/commonjs.legacy.index_json.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire('es6-promise').polyfill();\n\nvar debug = require('../helper/debug')('fn-quantiles');\nvar LazyFiltersResult = require('../model/lazy-filters-result');\nvar fnBuckets = require('./fn-buckets');\n\nmodule.exports...
javascript
edit
0
1
bsd-3-clause
dda231347aeba1e692ddbf31d10897d6499cd44b
CartoDB/turbo-cartocss
src/fn/fn-buckets-quantiles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable ember/no-computed-properties-in-native-classes */\nimport Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\n\nexport default class CoursePublicationCheckComponent extends Compon...
javascript
edit
0
1
mit
9034a21f2762b6b01d6dc45a9f049e60cf3d7439
ilios/common,ilios/common
addon/components/course-publicationcheck.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from '../templates/components/floating-mobile-buttons';\n\nexport default Ember.Component.extend({\n layout,\n tagName: 'ul',\n classNames: ['floating-buttons'],\n classNameBindings: ['activ...
javascript
edit
0
5
mit
5d9f0dbd9e287ad320f020238ab6d3e66ffb2f49
yontxu/ember-floating-mobile-buttons,yontxu/ember-floating-mobile-buttons
addon/components/floating-mobile-buttons.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { expect } from 'chai';\nimport { mount } from 'enzyme';\nimport Toolbar from '../index';\n\ndescribe('Toolbar', () => {\n it('allows children to override the content', (done) => {\n ...
javascript
edit
0
1
mit
2fa1bad5ac36807f47c184c31c36f0ecc050cea9
draft-js-plugins/draft-js-plugins,dagopert/draft-js-plugins,nikgraf/draft-js-plugin-editor,nikgraf/draft-js-plugin-editor,draft-js-plugins/draft-js-plugins,dagopert/draft-js-plugins,nikgraf/draft-js-plugin-editor,draft-js-plugins/draft-js-plugins,dagopert/draft-js-plugins,draft-js-plugins/draft-js-plugins
draft-js-inline-toolbar-plugin/src/components/Toolbar/__test__/Toolbar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport R from 'ramda';\nimport uncapitalize from './uncapitalize.js';\nimport pascalCase from './pascal-case.js';\n\n// a -> a\nconst camelCase = R.compose(uncapitalize, pascalCase);\n\nexport default camelCase;\n\n```\n\nApply this cha...
javascript
edit
0
0
mit
8f0b0267da395ce2824122496408b4c3ac014a3d
restrung/restrung-js
src/camel-case.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n\ngreat.Artist = Backbone.Model.extend({\n});\n\n\ngreat.ArtistsCollection = Backbone.PageableCollection.extend({\n model: great.Artist,\n comparator: \"name\",\n url: \"/great/music/artists/\",\n mode: \"...
javascript
edit
0
0
mit
bf5b8c20974dfe7d16dde885aa02ec39471e652a
Julian/Great,Julian/Great,Julian/Great
great/static/js/models/artist.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n console.log( \"ready!\" );\n\n var gameForeground = $('#gameForeground')[0];\n var gameFront = $('#gameFront')[0];\n var gameBack = $('#gameBack')[0];\n var gameText = $('#gameText')[0];\n...
javascript
edit
0
1
apache-2.0
6a5598ed7f1cf85502d58e7a9b774d31419ff79c
pabloalba/kam-fu,pabloalba/kam-fu
js/kamfu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { compose, createStore, applyMiddleware } from 'redux'\nimport persistState from 'redux-localstorage'\nimport thunk from 'redux-thunk'\n\nimport RootReducer from 'reducers/RootReducer'\n\nexport default createStore(\n RootReduce...
javascript
edit
0
0
mit
0ca2b8e525a81eedb21af53b1ac2213b8efa4dd8
RailsRoading/wissle,RailsRoading/wissle,RailsRoading/wissle
web/src/store.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = require('../config.json');\nvar modIDs = config.modIDs;\n\n/**\n * A single Facebook post or comment.\n * @class\n */\nvar Post = module.exports = function (id) {\n\n /** @member {string} */\n this.id = id;\n\n /** @memb...
javascript
edit
0
3
bsd-3-clause
5c2e5defbe12f099b627ac83302e1caa818d0093
HHDesign/hackbot,rhallie15/hackbot,kern/hackbot,kern/hackbot,samuelcouch/hackbot,rubinovitz/hackbot
lib/Post.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njQuery(function($) {\n\t$('#tipue_search_input').tipuesearch({\n\t\t'mode': 'static',\n\t\t'contentLocation': '/search_index'\n\t});\n\n\t$(\"form.no-pageload input\").keypress(function(e){\n\t\tvar k = e.keyCode || e.which;\n\t\tif(k =...
javascript
edit
0
3
bsd-3-clause
dc5f805dcea6d0c1dd27a98cadbf2290a323ea87
adrexia/silverstripe-staticsearch,adrexia/silverstripe-staticsearch
javascript/staticsearch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require(\"lodash\");\nvar EventEmitter = require(\"events\").EventEmitter;\nvar util = require(\"util\");\nvar ItemCollection = require(\"./itemcollection\");\n\nfunction Deck(options) {\n if (!(this instanceof Deck)) { return ...
javascript
edit
0
4
mit
48b850d5ba1cdda06a55b8ae5d2727c5c8b4bde4
pellucidanalytics/decks,pellucidanalytics/decks
lib/deck.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\nconst FS = require('fs')\nconst Path = require('path')\nconst {View} = require('./view')\nconst callsite = require('callsite')\nimport {guessName, installPackages, packagesToInstall} from './helpers'\n\n// Renamed for backw...
javascript
edit
0
6
mit
bc80e82a05c0a7b19e538ff3773f8966e1bf28f8
steelbrain/package-deps,openlawlibrary/package-deps,steelbrain/package-deps
lib/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar shell = require('shelljs');\nvar cmd = require('./cmd');\n\n// Execute msbuild.exe with passed arguments\nmodule.exports = function exec(args) {\n process.exit(shell.exec(cmd(args)).code);\n}\n\n```\n\nApply this...
javascript
edit
0
2
mit
0ffa589122d21ab32099ec377ddbab6be15a593a
TimMurphy/npm-nuget
lib/exec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar Class = require(\"./Class\");\n\nvar CompileError = exports.CompileError = Class.extend({\n\n\tinitialize: function () {\n\t\tswitch (arguments.length) {\n\t\tcase 2: // token, text\n\t\t\tthis._filename = argumen...
javascript
edit
0
3
mit
763e147ba669365e5f38f5b27c0dc1367087c031
mattn/JSX,jsx/JSX,jsx/JSX,dj31416/JSX,dj31416/JSX,mattn/JSX,jsx/JSX,jsx/JSX,dj31416/JSX,dj31416/JSX,jsx/JSX,dj31416/JSX
lib/util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { expect } from 'chai';\nimport Immutable from 'immutable';\nimport { createReducer } from 'rook/lib/redux/createStore';\nimport reducers from '../modules';\nconst reducer = createReducer(reducers.random);\n\ndescribe('redux', ()...
javascript
edit
0
1
mit
581b1239c070873fbede643c04b654067d5468a5
apazzolini/rook-starter
src/redux/__tests__/random.test.js
accepted
null
true