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\nconst crypto = require('crypto');\n\nmodule.exports.alias = [\n\t'rate',\n\t'rank'\n];\n\nmodule.exports.command = function screenshot(message) {\n\tif (!message.input) return message.channel.createMessage(`I ${message.command} undefine...
javascript
edit
0
3
mit
9c030a0f429cfe6146c490382855bcb55b9fd964
moustacheminer/MSS-Discord,moustacheminer/MSS-Discord,moustacheminer/MSS-Discord
server/discord/cogs/rate/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// global_config.js\n\nvar Parse = require('parse/node').Parse,\n PromiseRouter = require('./PromiseRouter');\n\nvar router = new PromiseRouter();\n\nfunction updateGlobalConfig(req) {\n if (!req.auth.isMaster) {\n return Promise...
javascript
edit
0
3
bsd-3-clause
19777699c9b77392736f80b2b0d2331139cbdf61
alanphoon/parse-server-ap,ZoomInformation/parse-server,PinssibleLabs/parse-server,radu-geronimo/parse-server1,simonas-notcat/parse-server,lucianmat/parse-server,Isaack90/parse-server,PinssibleLabs/parse-server,yuzeh/parse-server,simonbengtsson/parse-server,montymxb/parse-server,aneeshd16/parse-server,rendongsc/parse-se...
src/global_config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar multi = require('./multi');\nvar parsePos = require('./parsePos');\n\nvar fieldTypeSelector = x => x.fieldType;\nvar columnFieldTypeSelector = x => x.column.fieldType;\nvar annotationSelector = ({fields, refGene}) =...
javascript
edit
0
1
apache-2.0
01be724d26aad567ae1d86f641d7b112cb211349
ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client
js/columnWidgets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\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 mo...
javascript
edit
0
0
mit
28b36a018f16bb471d7a896aefc23fba40353fc4
rwjblue/ember-debug-handlers-polyfill,rwjblue/ember-debug-handlers-polyfill
testem.js
rejected_duplicate
Near-duplicate of sample 84098
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar map;\nfunction initMap() {\n map = new google.maps.Map(document.getElementById('map'), {\n center: centerFinder(),\n zoom: 12\n });\n\n window.placesInfo.forEach(function(location_obj){\n return markerMaker(location_obj)...
javascript
edit
0
3
mit
aaf63bd17dd70cfba6046307ea4161afe7641ebf
Aslonski/Global-Host,Aslonski/Global-Host,Aslonski/Global-Host
app/assets/javascripts/maps.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet mock = jest.genMockFromModule('inline-style-prefixer');\n\nmodule.exports = mock;\n\n```\n\nApply this change: Fix test failure on Material UI" }, { "role": "assistant", "content": "'use strict';\n\nlet ...
javascript
edit
0
1
mit
52f6796d4f6da81d9381f753bfabde5550dd045b
ukatama/material-ui-skeleton,ukatama/material-ui-skeleton
__mocks__/inline-style-prefixer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$('#likes').click(function() {\n var catid;\n catid = $(this).attr('data-catid');\n $.get('/rango/like_category/', {category_id: catid}, function(data) {\n $('#like_count').html(data);\n $('#likes').hide();\n });\n});\n\n$('#s...
javascript
edit
0
1
mit
7678137224df6948b0333841eeb2c54dc5668437
apenchev/tangowithdjango,apenchev/tangowithdjango,apenchev/tangowithdjango
static/js/rango-ajax.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n \nclass HeaderImg extends React.Component {\n render() {\n return (\n <div className=\"header-img\">\n <img className=\"imgix-fluid\" data-src=\"//assets.imgix.net/examples/octopus.jpg?fit=cr...
javascript
edit
null
null
mit
3a78b371cb69bf85f6da47c1c546988478a51581
arpith/wordanddeedindia,arpith/wordanddeedindia
components/HeaderImg.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default (state = [], action) => {\n switch (action.type) {\n case \"FETCH_HOUSEHOLDS_SUCCESS\": {\n return action.households\n }\n case \"ADD_HOUSEHOLD_SUCCESS\": {\n return [...state, action.household]\n }...
javascript
edit
0
12
mit
81b7b00d748efe8fb2d8e184ebe4631f99b6cbb7
cernanb/personal-chef-react-app,cernanb/personal-chef-react-app
src/redux/modules/Households/reducer.js
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction getDatePicker() {\n var languageUA = {\n days: ['Неділя','Понеділок','Вівторок','Середа','Четвер','Пятниця','Субота'],\n daysShort: ['Нед','Пон','Вів','Сер','Чет','Пят','Суб'],\n daysMin: ['Нд','Пн','Вт'...
javascript
edit
0
1
mit
c1c4d8bdef41c7540595bbf7e2a66954b823904b
samitnuk/online_shop,samitnuk/online_shop,samitnuk/online_shop
static/js/datefields.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport Raven from 'raven-js';\n\nfunction addUserData(data) {\n if (!window.champaign) return;\n if (!window.champaign.personalization) return;\n const { location, member } = window.champaign.personalization;\n data.user =...
javascript
edit
0
6
mit
8f3c509724178471a21e9706fa471a3e1642e49f
SumOfUs/Champaign,SumOfUs/Champaign,SumOfUs/Champaign,SumOfUs/Champaign,SumOfUs/Champaign
app/javascript/packs/sentry.js
rejected_duplicate
Near-duplicate of sample 82413
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = (sequelize, DataTypes) => {\n const Message = sequelize.define('Message', {\n content: DataTypes.STRING,\n userId: DataTypes.INTEGER,\n groupId: DataTypes.INTEGER\n }, {\n classMethods: {\n associate:...
javascript
edit
0
1
mit
3c2d42f063f9d5f1dce106ddf3bb0ee69f8f23c1
3m3kalionel/PostIt,3m3kalionel/PostIt
server/models/message.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\n\nvar jobs = [];\n\nfs.readdirSync('runs').forEach(function(run_id) {\n var job = {}\n job.run_id = run_id;\n job.tasks = fs.readdirSync('runs/'+run_id);\n var stat = fs.statSync('runs/'+run_id);\n job.date...
javascript
edit
0
2
mit
d1f7da0ec6ac31080546cc163baa206a5145fe75
tdaede/awcy,tdaede/awcy,mdinger/awcy,mdinger/awcy,tdaede/awcy,tdaede/awcy,mdinger/awcy,mdinger/awcy,tdaede/awcy,mdinger/awcy,tdaede/awcy
generate_list.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar React = require(\"react\");\nvar { Link } = require(\"react-router\");\n\nclass Post extends React.Component {\n render () {\n var {\n post : {\n title: title,\n content: content,\n tags: tags,\n }...
javascript
edit
0
3
mit
749dcbeba3177f936bea336c9a5c901b3b75346e
micnigh/yet-another-isomorphic-blog,micnigh/yet-another-isomorphic-blog
shared/component/Post.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2017 Mathias Bynens. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n\n/*---\nauthor: Mathias Bynens\ndescription: >\n Unicode property escapes must be supported in character c...
javascript
edit
0
1
mit
69d23652cc6438d995609b1cd504b5baa6740287
mathiasbynens/unicode-property-escapes-tests
basic-tests/character-class.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar globals = require('lib/globals');\nexports.staticPageWindow = function(opts) {\n var instance = Ti.UI.createWindow({\n title: opts.title,\n backgroundColor: '#eeeeee'\n });\n \n var webView = Ti.UI.createWebView({\n url...
javascript
edit
0
1
apache-2.0
48ae3a82a97f4027d10279b5a784e0321bb5b117
jdwfly/slc-android
Resources/ui/common/staticPageWindow.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// getters are functions\nimport * as utils from '../utils'\n\nexport const areas = state => {\n return state.areas\n}\nexport const rows = state => {\n return state.rows\n}\nexport const columns = state => {\n return state.columns\n...
javascript
edit
0
3
mit
1da61c16b82900fa07d731060d58478d1d746431
louisbourque/grid-awesome,louisbourque/grid-awesome
src/store/getters.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nannotationApp.directive('formSelector', function() {\n return {\n restrict: 'E',\n replace: true,\n controller: function($scope, $element, $attrs) {\n var id = $scope.id;\n var form = $scope.form;\...
javascript
edit
0
2
mit
67f595d7b7a471c41ebafbe5d4d391afb5ec13b8
latin-language-toolkit/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa
app/js/directives/form_selector.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('offlineMode', [])\n\t.config(function ($httpProvider) {\n\t\t$httpProvider.interceptors.push('httpInterceptor');\n\t})\n\t.factory('httpInterceptor', function ($q) {\n\n\t\tvar OFFLINE = location.search....
javascript
edit
0
5
mit
44c9f9ee21bc6fe906c31249495fcb604792a722
MartinSandstrom/angular-apimock,MartinSandstrom/angular-apimock,seriema/angular-apimock,seriema/angular-apimock
app/scripts/services/offlinemode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { List, ListItem } from 'material-ui';\nimport { BaseViewComponent } from '../wrappers/index.js';\n\nclass RedditSubreddits extends BaseViewComponent {\n constructor(props) {\n super(props);\n }\n...
javascript
edit
0
1
mit
892ce40275c04dcd7e1c7817b90c5d17469928a6
yanglinz/reddio,yanglinz/reddio
src/_assets/scripts/components/app/reddit.subreddits.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('Services', function() {\n // Import the corresponding module\n beforeEach(module('foodfood'));\n\n describe('RestaurantAndRoute factory')\n var $httpBackend, Links;\n\n beforeEach(inject(function (_$httpBackend_, _Resta...
javascript
edit
0
1
mit
826f920d78ae2705760772665f5bc3abfced56e7
cchrispy/food,cchrispy/food
src/tests/client/services.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global angularModuleExtension*/\n(function () {\n 'use strict';\n\n angular.module('horizon.dashboard-app', [\n 'horizon.dashboard-app.utils',\n 'horizon.dashboard-app.login',\n 'horizon.framework',\n 'hz.api',\n 'ngC...
javascript
edit
0
1
apache-2.0
2556b4a9b3709b76017d2e551fe54412681ec599
Dark-Hacker/horizon,endorphinl/horizon-fork,mdavid/horizon,anthonydillon/horizon,karthik-suresh/horizon,redhat-openstack/horizon,noironetworks/horizon,FNST-OpenStack/horizon,Dark-Hacker/horizon,redhat-cip/horizon,ChameleonCloud/horizon,tellesnobrega/horizon,redhat-cip/horizon,endorphinl/horizon-fork,dan1/horizon-proto,...
horizon/static/dashboard-app/dashboard-app.module.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2017 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nMobileThrottling.NetworkPanelIndicator = class {\n constructor() ...
javascript
edit
0
4
bsd-3-clause
ae6479743794c60633113c9f7f4591ea5d21b0d8
dart-archive/devtools-frontend,dart-archive/devtools-frontend,ChromeDevTools/devtools-frontend,dart-archive/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,dart-archive/devtools-frontend,dart-archive/devtools-frontend,ChromeDevTools/devtools-frontend,...
front_end/mobile_throttling/NetworkPanelIndicator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Check if two strings are isomorphic\n\nfunction isIsomorphic(stringOne, stringTwo) {\n\t\n\t// check if strings are of the same length (if not, cannot be isomorphic)\n\tif (stringOne.length !== stringTwo.length) {\n\t\treturn false;\...
javascript
edit
0
5
mit
8143e0273c4ae38fd55b51e1ac60299e50b163e2
derekmpham/interview-prep,derekmpham/interview-prep
string/isomorphic.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2019, Frappe Technologies and contributors\n// For license information, please see license.txt\n\nfrappe.ui.form.on('Website Route Meta', {\n\trefresh: function(frm) {\n\t\tfrm.get_field('__newname').set_label('Route');...
javascript
edit
0
2
mit
598deb7c4ac6278985d8d42b7b0bfe5ddb02e7ce
saurabh6790/frappe,adityahase/frappe,StrellaGroup/frappe,mhbu50/frappe,mhbu50/frappe,mhbu50/frappe,almeidapaulopt/frappe,frappe/frappe,adityahase/frappe,mhbu50/frappe,adityahase/frappe,frappe/frappe,frappe/frappe,almeidapaulopt/frappe,saurabh6790/frappe,yashodhank/frappe,almeidapaulopt/frappe,StrellaGroup/frappe,yashod...
frappe/website/doctype/website_route_meta/website_route_meta.js
rejected_duplicate
Near-duplicate of sample 86929
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This script connects the app to the database\n\n// Load external dependencies\nvar mongoose = require('mongoose')\n\n// Load internal modules\nvar config = require('./config.js')\n\n// Connect to the database\n// The connection is ma...
javascript
edit
0
2
mit
6a479d8612581fa1d7f68b5ac00775e6be047018
sebthedev/PrincetonCourses,sebthedev/PrincetonCourses
controllers/database.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst _ = require('lodash');\nconst config = require('../config');\nconst errors = require('../errors');\nconst Service = require('./Service');\nconst ServiceNotFound = errors.ServiceNotFound;\nconst ServicePlanNotFound...
javascript
edit
0
2
apache-2.0
764b9228ca970cb568ac502c596fa1ad89440315
sauravmndl/service-fabrik-broker,sauravmndl/service-fabrik-broker,sauravmndl/service-fabrik-broker,sauravmndl/service-fabrik-broker
common/models/catalog.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('script!3Dmol/release/3Dmol.js');\nrequire('style/3dmol.styl');\n\nangular.module('chemPhyWebApp')\n .directive('chemPhyWeb3dmol', ['$http', '$log', function($http, $log) {\n\n return {\n scope: {},\n ...
javascript
edit
0
1
bsd-3-clause
a3d9360342319ce6aec55557ae190bd176e75408
OpenChemistry/mongochemclient,OpenChemistry/mongochemclient
app/components/3dmol/3dmol.directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar partial = require('es5-ext/lib/Function/prototype/partial')\n , isGitrepoRoot = require('./is-gitrepo-root')\n , findRoot = require('./find-root')\n\nmodule.exports = {\n\tgit: {\n\t\tfilename: '.gitign...
javascript
edit
0
1
mit
98516f5253260c743dafb54f0f6ae9fb8117d7bd
medikoo/node-ext
lib/fs/_ignorefile-modes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {CompositeDisposable} = require('atom')\n\nmodule.exports = ({\n subscriptions: null,\n\n activate (state) {\n this.subscriptions = new CompositeDisposable()\n this.subscriptions.add(atom.commands.add('atom-text-editor',\n...
javascript
edit
0
2
mit
1b980196a6fea73ffd69150d82456b64916f0e05
jasonrudolph/toggle-markdown-task
lib/toggle-markdown-task.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Initialize event emitter and add ability to register event handlers." }, { "role": "assistant", "content": "\"use strict\";\n\nvar EventEmitter = require('events').EventEmitter;\nvar util = require('util');\n\nfunction AlexaR...
javascript
new_file
0
5
apache-2.0
341581eacacb28da6d8ff5fd81cb15100a1b6d2a
rmtuckerphx/alexa-skills-kit-sdk-for-nodejs
alexa-sdk/lib/alexa.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n\tvar d = new Date();\n\tvar date_string = \n\t\td.getFullYear() \n\t\t+ '' \n\t\t+ ('0' + (d.getMonth() + 1)).slice(-2) \n\t\t+ '' \n\t\t+ ('0' + d.getDate()).slice(-2) \n\t\t+ '-' \n\t\t+ ('0' + d.getHours()).slice(-2) ...
javascript
edit
0
1
mit
f297163939809ad8b1ebb0402bf945dc66221834
teddywing/chrome-copy-urls-from-all-tabs,teddywing/chrome-copy-urls-from-all-tabs
page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = require('./fork')([\n // This core module of AST types captures ES5 as it is parsed today by\n // git://github.com/ariya/esprima.git#master.\n require(\"./def/core\"),\n\n // Feel free to add to or remove from this ...
javascript
edit
0
0
mit
1e61c50ea69edb62af7637faac4a6b3d89b0ed3a
benjamn/ast-types,benjamn/ast-types,benjamn/ast-types
main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmodule.exports = function processJSON (object) {\n // Temporary patch for bug with nested maps in Alpaca.\n // See https://github.com/gitana/alpaca/issues/444\n if (object.paths === undefined) {\n return object;\n }\n Object.k...
javascript
edit
0
3
mit
14a271b8660b56b8e9e1b2f0d05570669fa0fb91
apinf/openapi-designer,apinf/open-api-designer,apinf/open-api-designer,apinf/openapi-designer
jsonprocessor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require(\"fs\");\nvar path = require(\"path\");\n\ndescribe(\"Scenarios\", function() {\n var scenarios_diractory = path.join(__dirname, \"scenarios\");\n var folders = fs.readdirSync(scenarios_diractory);\n\n folders.forEac...
javascript
edit
0
2
mit
99dac1e58592f5801cabd886b167855f00b4fb0a
ConsenSys/truffle
packages/truffle/test/scenarios.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2014 The Virtual Vulcano authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that\n// can be found in the LICENSE.md file.\n\n'use strict';\n\nvar fs = require('fs'),\n _ = re...
javascript
edit
0
1
bsd-2-clause
436331a80df022af3413e2139791c15bc5eb73c0
ernestoalejo/virtual-vulcano,ernestoalejo/virtual-vulcano,ernestoalejo/virtual-vulcano
web/app/lib/creation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport chai from 'chai';\nimport Library from '../lib/library.js';\n\nchai.expect();\n\nconst expect = chai.expect;\n\nlet lib;\n\ndescribe('Given an instance of my library', function () {\n before(function () {\n lib = new Library(...
javascript
edit
0
1
mit
5c4bc6f0aec32fe16504c3b725af904239e7ce52
mitchwilson/lantern,mitchwilson/lantern
test/library.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nvar fs = require('fs');\nvar path = require('path');\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n baseURL: '/',\n locationType: ...
javascript
edit
0
4
mit
7a1b806497961021bf900d40671a6c16645b2da0
HeroicEric/ivy-codemirror,mshafir/ivy-codemirror,HeroicEric/ivy-codemirror,IvyApp/ivy-codemirror,IvyApp/ivy-codemirror,mshafir/ivy-codemirror,HeroicEric/ivy-codemirror,mshafir/ivy-codemirror
tests/dummy/config/environment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Entity, { printMessage, action, time, state } from \"Entity\";\nimport { isInInventory, removeItem } from \"inventory\";\n\nexport class OlderMan extends Entity {\n name() {\n return 'eldery man';\n }\n\n actions() {\n r...
javascript
edit
0
3
mit
9ab03088f43ef392a3a958a09b7819272040b814
TEAMBUTT/LD35
app/webpack/entities/circleBurger/diningArea/olderMan.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * External dependencies\n */\nimport { storiesOf } from '@storybook/react';\n\n/**\n * Internal dependencies\n */\nimport SettingsNotice, { TYPE_WARNING, TYPE_INFO, TYPE_SUGGESTION } from '../assets/js/components/settings-notice';...
javascript
edit
0
1
apache-2.0
533fbec9872fd1e6dfff44f0f415578c9cf07e1c
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
stories/notices.stories.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const setUrl = (router, country, filters) => {\n const { pre, suf, inf, lin, mod, reg } = filters;\n router.push({\n query: {\n country,\n v: '0.1', // url version\n p: btoa(unescape(encodeURIComponent(pre.joi...
javascript
edit
0
2
mit
b6b437fd66b031777d58e939945e798d7e39770b
bgrsquared/places,bgrsquared/places,bgrsquared/places
app/config/urlTools.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n/**\n * Configuration settings.\n */\nclientApp.config(function ($analyticsProvider) {\n\t$analyticsProvider.virtualPageviews(false);\n});\n\n```\n\nApply this change: Reduce number of supported file types for highlighting" }, { ...
javascript
edit
0
1
mit
28578523383d707f263cb4d631e7e2a707c719e9
paulhitz/DnB-REST-Client,paulhitz/DnB-REST-Client
js/app.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global describe, it, expect */\n\nvar pkg = require('..');\n\ndescribe('antenna', function() {\n \n it('should export object', function() {\n expect(pkg).to.be.an('object');\n });\n \n});\n\n```\n\nApply this change: Test case...
javascript
edit
0
1
mit
d0911805cbe8bb7048ee0a4d443fd1b506808b67
jaredhanson/antenna
test/package.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(app) {\n app.factory('SearchService', ['$rootScope', function($rs) {\n\n let searchResults = [];\n\n let searchListener = function(prop, searchArray, $input) {\n let inputStr;\n ...
javascript
edit
0
6
mit
741223495bb87142934400fc55a05ebdeb0d5d65
sendjmoon/GolfFourFriends,sendjmoon/GolfFourFriends
app/angular/services/search_service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nconst path = require('path');\nconst url = require('url');\nconst jade = require('jade');\n\nmodule.exports = function(route, data, options, err) {\n\n try {\n\n options = options || {};\n\n var routed = path.normaliz...
javascript
edit
0
6
cc0-1.0
1b98824b6533fc67d25e65d77d2a6c7a759b8959
sgarver/rotu,sgarver/rotu
rotu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n /**\n * This is the main entry point for your application, it's the first file\n * that runs in the main process.\n */\n entry: './src/index.ts',\n // Put your normal webpack config below here\n target: 'e...
javascript
edit
0
0
apache-2.0
87da5561a51fc2b64033b56bf618dbe20dcf619b
stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila
desktop/webpack.main.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require can.jquery-all\n\n(function(can, $) {\n\nif(!/^\\/systems/.test(window.location.pathname))\n return;\n\nvar system_id = /^\\/systems\\/(\\d+)/.exec(window.location.pathname)[1];\n\n$(function() {\n \n var $top_tree = $(\"#...
javascript
edit
0
2
apache-2.0
9d83877dbceb1d8464b5094b0e89e71e7ca4ca55
nortoncat/grc,Txlonghorn101/compliance-management,Txlonghorn101/compliance-management,google-code-export/compliance-management,rusintez/compliance-management,thamizarasu/compliance-management,jigneshphipl/compliance-management,Cayce2514/compliance-management,rusintez/compliance-management,Txlonghorn101/compliance-manag...
app/assets/javascripts/apps/systems.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { checkPermission } from '@waldur/issues/routes';\n\n// @ngInject\nexport default function routes($stateProvider) {\n $stateProvider\n .state('support.resources', {\n url: 'resources/',\n template: '<resource-global...
javascript
edit
0
1
mit
ae20c870d54657a274be9fda5225efcba4d33b5d
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
src/resource/support/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n plugins: ['typescript'],\n rules: {\n 'no-unused-vars': 0,\n 'typescript/no-unused-vars': 2,\n\n 'typescript/no-explicit-any': 2,\n },\n};\n\n```\n\nApply this change: fix: Add config for no use before d...
javascript
edit
0
0
mit
1aac82ce92f25903aeb44a43290dde343fc734fa
relekang/eslint-config-relekang
configs/typescript.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\n\nfunction formatDateString(date){\n if (date == null){\n return null;\n }\n return date.substr(0,4) + '-' + date.substr(4,2) + \"-\" + date.substr(6,2);\n}\nfunction sortRecordsOnDate(records...
javascript
edit
0
2
mit
ae55142ef04131093444c2456bcf273f37e17169
wmelani/bad-restaurants,wmelani/bad-restaurants
dataset/utilities/dateUtilities.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * InheritJS\n * https://github.com/Techniv/inheritjs\n *\n * Released under the MIT License.\n * https://github.com/Techniv/inheritjs/blob/master/LICENSE\n */\n\n\n\n\n(function(){\n\t/**\n\t * @param parent The parent constructor....
javascript
edit
0
4
mit
b8393e6622452ee443a2233e39f2a5764685c7e0
Techniv/inheritjs
libs/ineritjs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* global Connector */\n\nConnector.playerSelector = '#plex';\n\nConnector.artistSelector = '.grandparent-title';\n\nConnector.trackSelector = '.item-title';\n\nConnector.currentTimeSelector = '.player-position';\n\nCon...
javascript
edit
0
2
mit
73f82c861bc9ece63c21f73762e648750aad26ac
ex47/web-scrobbler,galeksandrp/web-scrobbler,ex47/web-scrobbler,carpet-berlin/web-scrobbler,david-sabata/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,usdivad/web-scrobbler,inverse/web-scrobbler,carpet-berlin/web-scrobbler,alexsh/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,david-sabata/web-scrobbler,inverse/web-s...
connectors/v2/plex.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nrequire(['ByteSource', 'AppleVolume'], function(ByteSource, AppleVolume) {\n \n 'use strict';\n \n function makeFileDrop(el, callback) {\n if (typeof el === 'string') {\n el = document.getElementById(el);\n if (!el) {...
javascript
edit
null
null
mit
c9cac3634998993eb288d70bf36caa8456083d1f
radishengine/drowsy,radishengine/drowsy
main.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass PromiseMessagesConfig {\n constructor(autoResetAfter) {\n this.autoResetAfter = autoResetAfter;\n }\n\n getAutoResetAfter() {\n return this.autoResetAfter;\n }\n\n willAutoReset() {\n return thi...
javascript
edit
0
1
mit
108ae8404eb8b0632dd3ea730391ea596c3fcc12
hshn/angular-promise-messages,hshn/angular-promise-messages
src/providers/promise-messages.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (finale) {\n if (typeof finale == 'function') {\n return finale\n } else {\n return function (error) {\n finale.error('uncaught', { stack: error.stack })\n }\n }\n}\n\n`...
javascript
edit
0
2
mit
602cc0baabb99e72de8fcf9621b3bec40248b79b
bigeasy/prolific,bigeasy/prolific
prolific.shuttle/uncaught.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n safe: function (thing, path, otherwise) {\n thing = (thing instanceof Object) ? thing : {};\n var props = path.split('.');\n if (props.length === 1) {\n return thing[props.shift()] || otherwise;\n ...
javascript
edit
0
5
mit
546414b6f7dd68b860ebb0a2afa761a3548bb2fc
mantacode/safe-obj
safe.js
rejected_duplicate
Near-duplicate of sample 92689
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport alt from \"alt-instance\"\nimport WalletUnlockActions from \"actions/WalletUnlockActions\"\nimport WalletDb from \"stores/WalletDb\"\n\nclass WalletUnlockStore {\n \n constructor() {\n this.bindActions(WalletUnlockAc...
javascript
edit
0
2
mit
8e51f8caeef9347a0ab8ea88b08e353021cb9a02
bitshares/bitshares-ui,bitshares/bitshares-ui,bitshares/bitshares-2-ui,BitSharesEurope/wallet.bitshares.eu,merivercap/bitshares-2-ui,valzav/graphene-ui,valzav/graphene-ui,BunkerChainLabsInc/freedomledger-wallet,BitSharesEurope/testnet.bitshares.eu,trendever/bitshares-ui,bitshares/bitshares-ui,trendever/bitshares-ui,Bit...
dl/src/stores/WalletUnlockStore.js
rejected_duplicate
Near-duplicate of sample 82698
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar dockerLambda = require('..')\n\nvar match = dockerLambda({event: {password: 'lambda-docker'}})\n\nconsole.log(match == 'Matches!' ? 'Match Passed' : 'Match Failed: ' + match)\n\n\nvar nonMatch = dockerLambda({event: {password: 'lamb...
javascript
edit
0
0
mit
f61b8721e65cf64c2297b24bd710dcf3c117c755
lambci/docker-lambda,lambci/docker-lambda,lambci/docker-lambda,lambci/docker-lambda,lambci/docker-lambda,lambci/docker-lambda,lambci/docker-lambda
examples/module-native/test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Converts argument to a value of type Object\n// http://es5.github.com/#x9.9\n\n'use strict';\n\nmodule.exports = function (value) {\n\tif (value == null) {\n\t\tthrow new TypeError(\"Cannot convert \" + value + \" to object\");\n\t}\...
javascript
edit
0
2
isc
4e8fad271614187e5d4ac19a7e777ff1fb4e1f76
medikoo/es5-ext
lib/to-object.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar expect = require('expect.js')\nvar Treasure = require('../lib/treasure')\nvar GlobalID = require('../lib/plugins/globalid')\nvar cookie = require('cookies-js')\n\ndescribe('Treasure GlobalID', function () {\n it('adds fetchGlobalID...
javascript
edit
0
1
apache-2.0
9d8e7b8f1105de1587d58910371e462f40db2242
treasure-data/td-js-sdk,treasure-data/td-js-sdk
test/treasure.globalid.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Resource } from '../api-resource';\n\nexport default new Resource({\n name: 'contentnode',\n fetchDescendantsCollection(id, getParams = {}) {\n return this.fetchDetailCollection('descendants', id, getParams);\n },\n fetc...
javascript
edit
0
1
mit
768caab1a18d54694640ec2b28f86bff8be01f1f
mrpau/kolibri,mrpau/kolibri,mrpau/kolibri,learningequality/kolibri,indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,DXCanas/kolibri,mrpau/kolibri,DXCanas/kolibri,lyw07/kolibri,indirectlylit/kolibri,lyw07/kolibri,lyw07/kolibri,lyw07/kolibri,DXCanas/kolibri,learningequality/kolib...
kolibri/core/assets/src/api-resources/contentNode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\n\nvar tslint = require('gulp-tslint');\n\nfunction lint(source) {\n\tgulp.src(['./' + source + '/**/*.ts', '!./source/typings/*.d.ts'])\n\t\t.pipe(tslint())\n\t\t.pipe(tslint.report('verbose'));\n}\n\nmodule...
javascript
edit
0
2
mit
54571a77b3e34654e0c7f3e360dd1ce8cd0bbadd
RenovoSolutions/Gulp-Typescript-Utilities,SonofNun15/Gulp-Typescript-Utilities
lint.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar AppController = Controller.createComponent(\"AppController\");\n\nAppController.defineMethod(\"initView\", function () {\n if (!this.view) return;\n\n this.explore = new Explore();\n new ExploreController(\n this.explore,\n ...
javascript
edit
0
2
mit
b399b2abedadb6f9cbe814080c568da7d0b7afd6
many-to-many/ica,sethlu/ica,many-to-many/ica,many-to-many/ica,sethlu/ica,sethlu/ica
scripts/AppController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require jquery\n//= require jquery_ujs\n//= require materialize-sprockets\n//= require turbolinks\n\n$(document).on('turbolinks:load', function (){\n $(\".button-collapse\").sideNav();\n});\n\n```\n\nApply this change: Fix bug na...
javascript
edit
0
1
mit
677e8b4b033e3983ad58a28d1dbd3d3436dca4ad
juanhenriquez/move-rails,juanhenriquez/move-rails,juanhenriquez/move-rails
app/assets/javascripts/user-feed.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n $(\"[data-iso-date]\").each(function(i, elem) {\n var elem = $(elem);\n var isoDate = elem.data(\"iso-date\");\n var relDate = moment(isoDate).fromNow();\n elem.find(\".formated-date\").tex...
javascript
edit
0
1
mit
62b4e95eef72186b66531115f1f6332fa01d3b39
prasmussen/glot-www,prasmussen/glot-www
static/js/date-format.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nclass PkgInfo {\n constructor() {\n this.cache = Object.create(null);\n this.cachePath = null;\n this.config = null;\n this.range = null;\n }\n};\n\nObject.setPrototypeOf(PkgInfo.prototype, null);\n\nmod...
javascript
edit
0
1
mit
798a5e7f52aef2a07031bd2725ffecbf955e462f
benjamn/reify,benjamn/reify
node/pkg-info.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('dotenv').config();\nrequire('console-stamp')(console);\n\n// Sentry\nif (process.env.SENTRY_DSN) {\n const raven = require('raven');\n raven.config(process.env.SENTRY_DSN).install();\n}\n\n```\n\nApply this change: Fix an...
javascript
edit
0
0
mit
f24262a0269749fa776957bc66306296b1765683
misenhower/splatoon2.ink,misenhower/splatoon2.ink,misenhower/splatoon2.ink
src/updater/bootstrap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular.module('app.feature.weather').factory('_owmWeatherFactory', [\n '$log', '$resource', 'WEATHER_SETTINGS',\n function($log, $resource, weatherSettings) {\n var owmSettings = weatherSe...
javascript
edit
0
5
mit
3ed8fb71235db0273c1d3ecb069528549949c44b
molehillrocker/mm-website,molehillrocker/mm-website
src/scripts/feature/weather/owm/owmWeatherFactory.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar page = require('webpage').create(),\n system = require('system'),\n url;\n\nif (system.args.length !== 2) {\n console.log('Usage: phantomjs auditor.js URL');\n phantom.exit();\n} else {\n url = system.args[1];\n page.open(...
javascript
edit
0
4
mit
0e7a94e25582f89b9884d8311ac0f46da124bab6
samullen/entree,accesslint/access_lint,accesslint/accesslint.rb
vendor/access-lint/bin/auditor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Controller.extend({\n procedures: function() {\n return this.get('model').sortBy('lastModified').reverse();\n }.property('<EMAIL>'),\n\n actions: {\n createProced...
javascript
edit
0
1
bsd-3-clause
e06a158aa1aa22814e6c159424b0a4a0bbcda54b
SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder
src-frontend/app/controllers/procedures/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst electron = require('electron');\n// Module to control application life.\nconst app = electron.app;\n// Module to create native browser window.\nconst BrowserWindow = electron.BrowserWindow;\n\nconst ipcMain = electron.ipcMain;\n\n...
javascript
edit
0
1
mit
531054c8983a09a579de8a7b1a97dfb3a1d60493
FRCScout/FRCScout,FRCScout/FRCScout,frc1418/VictiScout,frc1418/VictiScout
main.js
rejected_duplicate
Near-duplicate of sample 76754
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar banner = require('./');\nlet chai = require('chai');\nlet expect = chai.expect;\n\ndescribe('banner', () => {\n\n let filepath = 'test-target.js';\n\n context('without options (using defaults)', () => {\n let expectation = `/*!...
javascript
edit
0
1
mit
36041ac982fc24d395000caeb57ab951c84264ee
jonschlinkert/add-banner
test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\nconst fs = require(\"fs\");\n\nconst prettyDate = function(date) {\n\tconst months = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\",\n\t\t\"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n\n\treturn months[...
javascript
edit
0
2
mit
c9e3497e9edef5182d3a6ef34a421d769c75bc9c
thelounge/lounge-bot
util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\npull.component('clockRunKiller', function () {\n\n var s = this\n var g = s.generic\n var ls = s.localStorageAdapter\n\n return [\n kickOff\n , toggleRun\n ]\n\n /* Initializes a new counter */\n function kickOff () {\n ma...
javascript
edit
0
2
mit
19634b8dfae3b1ab4aaa5404c00d4a27f30799c2
Kriegslustig/Pomodoro,Kriegslustig/Pomodoro
js/clockRunKiller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('Member', function() {\n it('should create a new member', function() {\n browser.get('#/member-list');\n\n $('.btn-primary').click();\n\n element(by.model('item.name')).sendKeys('New member');\n\n $('.btn-primary')...
javascript
edit
0
1
mit
970095beeda0120df2572323097a25b2357a8e80
andresdominguez/protractor-meetup
test/e2e/member1-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Sample GENE_STRUCTURE\nvar chromosomeStructre = {\n\tweight1: 0,\n\tweight2: 0,\n\tweight3: 0,\n\tweight4: 0,\n\tweight5: 0\n};\n\n// Sample fitness function\nvar myFitnessFunction = function (chromosome) {\n\tvar score;\n\treturn sc...
javascript
edit
0
1
mit
d8e341ab3f03af72453f205012522793e176c04a
awadYehya/Genev.js,awadYehya/Genev.js
samples/example1.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Continuous delivery server\nconst { spawn } = require('child_process')\nconst { resolve } = require('path')\nconst { createServer } = require('http')\nconst { urlencoded } = require('body-parser')\n\nconst hostname = '127.0.0.1'\ncon...
javascript
edit
0
3
mit
71862222b23566b261cf19992bcba1340ba38d02
jsonnull/jsonnull.com,jsonnull/jsonnull.com,jsonnull/jsonnull.com
scripts/cd-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar data = {};\n\n$(function(){\n data = ko.mapping.fromJS(harpData);\n ko.applyBindings(data); \n});\n```\n\nApply this change: Update label on generic viewmodel" }, { "role": "assistant", "content": "// Define the Knocko...
javascript
edit
0
1
mit
9891a618518831de76bb29a071b44995e066eef5
nformux/prototype-boilerplate,nformux/prototype-boilerplate
public/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport { CompositeDisposable } from 'atom'\n\nexport type CoverageObject = {\n expressions: {\n covered_count: number,\n uncovered_count: number,\n }\n}\n\nclass CoverageView extends HTMLElement {\n tooltipDispos...
javascript
edit
null
null
mit
c03d55498fa8bf5faf9e3e06696907349fe1f06f
steelbrain/flow-ide
lib/coverage-view.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#! /usr/bin/env node\nvar cliConfig = require('../cli-config.json');\nvar semver = require('semver');\nvar execSync = require('child_process').execSync;\nvar installPackage = function (packageName) {\n execSync('npm install -g ' + pa...
javascript
edit
0
9
mit
fb3ab74aaeea417669b0f1d8fd0fb67b54552db8
appsngen/appsngen-cli,appsngen/appsngen-cli
commands/appsngen-cli-widget-create.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow strict\nimport React from 'react';\nimport Helmet from 'react-helmet';\nimport type { Node as ReactNode } from 'react';\nimport styles from './Layout.module.scss';\n\ntype Props = {\n children: ReactNode,\n title: string,\n ...
javascript
edit
null
null
mit
fcedb2194a9aca829e6d8ec4ef314fc8241d50c5
ochaloup/blog.chalda.cz,nicklanasa/nicklanasa.github.io,nicklanasa/nicklanasa.github.io,ochaloup/blog.chalda.cz,wpioneer/gatsby-starter-lumen,alxshelepenok/gatsby-starter-lumen,hb-gatsby/gatsby-starter-lumen,renegens/blog,renegens/blog,alxshelepenok/gatsby-starter-lumen
src/components/Layout/Layout.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction DocsModule(settings) {\n this.settings = settings;\n this.routes = [\n [/doc link ([a-z]+)#([a-zA-Z]+)( (v[0-9]+\\.[0-9]+\\.[0-9]+))?/, this.onLink]\n ]\n}\n\nexports.Module = DocsModule;\n\nDocsModule.prototype.onLink = ...
javascript
edit
0
2
mit
dbe9de1a46d9c955ee0651da844360b0511ea034
mmalecki/dmkbot,mmalecki/dmkbot
lib/modules/docs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport FormElement from 'ember-bootstrap/components/bs-form-element';\n\nconst {\n computed\n} = Ember;\n\nexport default function() {\n FormElement.reopen({\n classNameBindings: ['floatLabel:floating-la...
javascript
edit
0
4
mit
a463e6c6ff473cce55ed2e2ccede128a65444491
offirgolan/ember-bootstrap-floating-labels,offirgolan/ember-bootstrap-floating-labels
addon/initializers/form-element.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// Init the application configuration module for AngularJS application\nvar ApplicationConfiguration = (function() {\n // Init module configuration options\n var applicationModuleName = 'Codeaux';\n var applicationMo...
javascript
edit
0
2
mit
8b98a4a47c44aa205d3e29602094d6174fa9bb6d
Codeaux/Codeaux,Codeaux/Codeaux,Codeaux/Codeaux
public/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant...
javascript
edit
0
1
mit
7e189e5d5f6696d32924a54de2c66eca64f6100d
facebook/jscodeshift
parser/babylon.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\nvar BACKWARDS_REMOVAL_KEYS = [\n \"backspace\"\n];\nvar FORWARD_REMOVAL_KEYS = [\n \"del\",\n \"delete\"\n];\nvar keycode = require(\"keycode\");\n\nmodule.exports = function(e) {\n if (e.type === \"keydown\...
javascript
edit
0
6
bsd-3-clause
a4598b348b79a9110be134b85474379e372cc024
PolicyStat/edited
lib/textEditType.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst assert = require('chai').assert\nconst { getFolderSubjects } = require('../checkAnyDataPresent.js')\n\ndescribe('checkAnyDataPresent', () => {\n describe('getFolderSubjects()', () => {\n it('returns only unique subjects', () =...
javascript
edit
0
1
mit
4d338cd7b074ff22ad731c60c8ff6c92b175c3f2
Squishymedia/BIDS-Validator,nellh/bids-validator,Squishymedia/bids-validator,nellh/bids-validator,nellh/bids-validator
validators/__tests__/checkAnyDataPresent.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst url = require('url');\n\nmodule.exports = (fragmentName, fragmentUrl) => (request, response) => {\n const pathname = url.parse(request.url).pathname;\n switch (pathname) {\n case '/fragment.js':\n ...
javascript
edit
0
3
mit
309c63a2548400917835549682f49e5be9624dd8
rikkert/tailor,zalando/tailor
example/fragment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction cachedScript(url, options) {\n\n // Allow user to set any option except for dataType, cache, and url\n options = $.extend(options || {}, {\n dataType: \"script\",\n cache: true,\n url: url\n });\n\n // Use $.ajax(...
javascript
edit
0
3
mit
67c3ca8389c45b8feb3fca44dcd8f076ccc0000f
leotsarev/joinrpg-net,joinrpg/joinrpg-net,leotsarev/joinrpg-net,joinrpg/joinrpg-net,leotsarev/joinrpg-net,joinrpg/joinrpg-net,leotsarev/joinrpg-net,joinrpg/joinrpg-net
src/JoinRpg.WebComponents/wwwroot/component-interop.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction create_section_listing() {\n $('div#sidebar h3').click(function(e) {\n window.scrollTo(0, 0);\n });\n\n $('.section_title').each(function (i, e) {\n $(\"div#sidebar #section_listing\").append(\"<a id='\" + e.id + \"_li...
javascript
edit
0
3
mit
77b5f81b67df21dcd96d2aac235b6b11aca0d26c
yannvery/twist,radar/twist,radar/twist,doug-c/mttwist,RealSilo/twist,doug-c/mttwist,yannvery/twist,doug-c/mttwist,radar/twist,yannvery/twist,RealSilo/twist,RealSilo/twist
app/assets/javascripts/chapters.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {remote} from 'electron';\nimport settings from 'electron-settings';\n\nconst {dialog, getCurrentWindow} = remote;\n\ndocument.addEventListener('DOMContentLoaded', () => {\n settings.get('openOnStartup').then(val => {\n conso...
javascript
edit
0
2
mit
1d50764c006896615b18b782c2b401f1a42b38f4
wulkano/kap,albinekb/kap,albinekb/kap,albinekb/kap
app/src/renderer/js/preferences.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar profile = require('../profile.js');\n\nvar ctx = window.contextVars;\n\nnew profile.Names('#names', ctx.nameUrls, ['edit']);\nnew profile.Social('#social', ctx.socialUrls, ['edit']);\nnew profile.Jobs('#jobs', ctx.jobsUrls, ['edit']...
javascript
edit
0
0
apache-2.0
c4e1ea11fc93c416dfe42cf88b5c791739322ad3
amyshi188/osf.io,CenterForOpenScience/osf.io,ckc6cz/osf.io,billyhunt/osf.io,arpitar/osf.io,brianjgeiger/osf.io,petermalcolm/osf.io,alexschiller/osf.io,abought/osf.io,hmoco/osf.io,baylee-d/osf.io,doublebits/osf.io,cosenal/osf.io,Ghalko/osf.io,alexschiller/osf.io,HalcyonChimera/osf.io,TomHeatwole/osf.io,Nesiehr/osf.io,al...
website/static/js/pages/profile-settings-page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function maFilterButton() {\n return {\n restrict: 'E',\n scope: {\n filters: '&',\n enabledFilters: '=',\n enableFilter: '&'\n },\n link: function(scope) {\...
javascript
edit
0
2
mit
427e346de2308f73c41c6af0702a9a1cacdc2edf
manuelnaranjo/ng-admin,manuelnaranjo/ng-admin
src/javascripts/ng-admin/Crud/filter/maFilterButton.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @ngInject\nexport default class LanguageUtilsService {\n // @ngInject\n constructor($translate, $http, ENV) {\n this.$translate = $translate;\n this.$http = $http;\n this.ENV = ENV;\n }\n\n getCurrentLanguage() {\n re...
javascript
edit
0
2
mit
586542ec6597b034ea163375d00de40a60231861
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
app/scripts/components/i18n/language-utils-service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nexport default class AnnotationOverlayView {\n constructor({type, source, row, column, message}) {\n this.element = document.createElement('div');\n this.element.className = 'levels-view annotation-overlay';\n ...
javascript
edit
0
0
mit
3d67f6facb833cc5ca5d34c90389cedb6f18c6de
lakrme/atom-levels
lib/annotation-overlay-view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst gulp = require('gulp');\nconst babel = require('gulp-babel');\n\ngulp.task('cp', function() {\n gulp.src([\n 'app/**/!(*.js)',\n 'MIT-LICENSE.txt',\n 'README.md',\n ])\n .pipe(gulp.dest('dist'));\n});\n\ngulp...
javascript
edit
0
1
mit
5133f374f4d38841e26c4a308d03667af387d034
jacobSingh/tabwrangler,tabwrangler/tabwrangler,tabwrangler/tabwrangler,jacobSingh/tabwrangler,tabwrangler/tabwrangler
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base')\n , cursor = Base.cursor\n , color = Base.color;\n\n/**\n * Expose `TAP`.\n */\n\nexports = module.exports = TAP;\n\n/**\n * Initialize a new `TAP` reporter.\n *\n * ...
javascript
edit
0
1
mit
d4490b3e14cef78ad63559df3d8bf316723e25ee
youprofit/mocha,imsobear/mocha,pandeysoni/mocha,apkiernan/mocha,antoval/mocha,papandreou/mocha,phated/mocha,benvinegar/mocha,hoverduck/mocha,sul4bh/mocha,GabrielNicolasAvellaneda/mocha,adamgruber/mocha,nightwatchjs/mocha-nightwatch,glenjamin/mocha,michaelBenin/mocha,TimothyGu/mocha,GerHobbelt/mocha,wltsmrz/mocha,aaronc...
lib/reporters/tap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar react = require('gulp-react');\nvar git = require('gulp-git');\nvar fs = require('fs');\nvar shell = require('gulp-shell')\n\ngulp.task('brew', function () {\n if (fs.existsSync('homebrew')) {\n git....
javascript
edit
0
2
mit
83231cee0dc508f5a0012b9a5c1867da0a78b17e
zharley/ferment,zharley/ferment,zharley/ferment,zharley/ferment
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n\t'Modernizr',\n\t'jQuery',\n], function()\n{\n\t\n\tfunction Header()\n\t{\n\t\tthis._$body = $('body');\n\t\tthis._$win = $(window);\n\t\tthis._$header = $('.js-header');\n\t};\n\t\n\tHeader.prototype.init = function()\n\t{\...
javascript
edit
0
2
mit
bb585a0acf27623a865ce8b432fa6c323263ecbb
dl988/collra,dl988/collra,dl988/collra
js/blocks/header.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n_.extend(RouteController.prototype, {\n initialize: function (context, options) {\n this.request = context.options.request;\n this.response = context.options.response;\n },\n\n onRun: function () {\n this.response.end();\n ...
javascript
edit
0
1
mit
680e48f93ee238383ba614189d622626b73f542f
TechplexEngineer/iron-router,snamoah/iron-router,Sombressoul/iron-router,firdausramlan/iron-router,appoets/iron-router,assets1975/iron-router,Aaron1992/iron-router,appoets/iron-router,jg3526/iron-router,abhiaiyer91/iron-router,sean-stanley/iron-router,snamoah/iron-router,firdausramlan/iron-router,Hyparman/iron-router,t...
lib/server/route_controller.js
accepted
null
true