messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2020\n */\nimport moment from 'moment';\n\nimport { UIDatabase } from '../database';\nimport { FRIDGE_ACTIONS } from '../actions/FridgeActions';\n\nconst initialState = () => {\...
javascript
edit
0
4
mit
f9efd3ba4b435a46a47aec284a30abe83efb9e6a
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/reducers/FridgeReducer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { scrollIt } from 'utils/scroll';\n\nclass ScrollToHighlightIndex extends PureComponent {\n // eslint-disable-line react/prefer-stateless-function\n c...
javascript
edit
0
3
mit
d4673dcb8a1b07edec917c390311b20b22fd91c7
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
app/javascript/app/components/scroll-to-highlight-index/scroll-to-highlight-index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction localizeHtmlPage() {\n\t//Localize by replacing __MSG_***__ meta tags\n\tvar objects = document.querySelectorAll('.message');\n\tfor (var j = 0; j < objects.length; j++) {\n\t\tvar obj = objects[j];\n\n\t\tvar valStrH = obj.inn...
javascript
edit
0
3
mit
98cb394af2d4244c85ddaf2e5ef02fa4e1c9c2c1
codefisher/mozbutton_sdk,codefisher/mozbutton_sdk
templates/localise.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar shell = require('shelljs');\n\nif (exec('git status --porcelain').output != '') {\n console.error('Git working directory not clean.');\n process.exit(2);\n}\n\nvar versionIncrement = process.argv[process.argv.length -1];\n\nif (ve...
javascript
edit
0
2
isc
d34f4ef6b96090913839b158423d912bd18a585f
saintedlama/git-visit
release.js
rejected_duplicate
Near-duplicate of sample 95067
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//\n// Copyright (c) 2016-2017 DrSmugleaf\n//\n\n\"use strict\"\nrequire(\"dotenv\").config({ path: __dirname + \"/../.env\" })\nconst constants = require(\"../libs/util/constants\")\nconst client = require(\"../banterbot\").client\n\nb...
javascript
edit
0
1
apache-2.0
717f919a0ddc00e989889ac1957209f758d3ce96
DrSmugleaf/Banter-Bot,DrSmugleaf/Banter-Bot
test/banterbot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from \"ember\";\n\nexport default Ember.Component.extend({\n didInsertElement: function() {\n // show the dialog\n this.$('.modal').modal('show');\n\n // send the according action after it has been hidden again\n ...
javascript
edit
0
1
apache-2.0
1a43f902beb82336e9f66dc75b1768721dc419c0
uboot/stromx-web,uboot/stromx-web,uboot/stromx-web
frontend/app/components/modal-dialog.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction isDevOrSandpit () {\n var hostname = window.location.hostname;\n var env = {};\n\n if(hostname.indexOf('develop') > -1) {\n env.name = 'develop'\n }\n\n if(hostname.indexOf('sandpit') > -1) {\n env....
javascript
edit
0
3
mit
6bfdb7fc09ad70b20fa4864fdde18db311fa3db9
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
src/main/web/florence/js/functions/_environment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { throttle } from \"underscore\";\n\nexport const requestGarbageCollection =\n // For this global function to be defined, the --expose-gc flag must\n // have been passed to node at the bottom of the ../../meteor script,\n // p...
javascript
edit
0
0
mit
1389db463184fcccbded21eec2ba2c61c6d16d91
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
tools/utils/gc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('myApp')\n.factory('ctrlPanelService', ['$rootScope', 'userService', 'locationService','transactionService',\nfunction($rootScope, $userService, locationService, transactionService) {\n\n\tvar settings = { users: null, us...
javascript
edit
0
1
mit
f7108b212c596ba5c3f2bbf0184d186714130e93
godspeedyoo/Breeze-Mapper,godspeedyoo/Breeze-Mapper,godspeedyoo/Breeze-Mapper
app/assets/javascripts/ng-app/services/control-panel-service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $(document).on('change', '.question-answered-box', function(){\n the_id = $(this).data('the-id')\n text_answer_field = $(this).closest('.text-answer').find('.text-answer-field')\n matrix_answer...
javascript
edit
0
2
bsd-3-clause
2c1b060470eb3cb5b9c876a3fe64ccebc1bdbcab
unepwcmc/ORS,unepwcmc/ORS,unepwcmc/ORS,unepwcmc/ORS,unepwcmc/ORS
app/assets/javascripts/respondent/question_answered.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n // Autoprefixer\n autoprefixer: {\n // https://github.com/postcss/autoprefixer#browsers\n browsers: [\n 'Explorer >= 10',\n 'ExplorerMobile >= 10',\n 'Firefox >= 30',\n 'Chrome >= 34',\n ...
javascript
edit
0
0
mit
8a60c3bd25bd166d3e4c8a1bf6beb825bd84df81
StartPolymer/polymer-static-app,StartPolymer/polymer-static-app
gulp/psk-config.js
rejected_duplicate
Near-duplicate of sample 82740
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nApp = Ember.Application.create();\n\n// Add routes here\nApp.Router.map(function() {\n \n // Atoms (Components)\n this.resource('atoms', function() {\n\n // Sub-routes here\n this.route('hs-button');\n });\n\n // Molecules (M...
javascript
edit
0
2
mit
701feebf107a55a5720aca2ee52d40d421647cbc
jneurock/pattern-lib
js/app/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint node:true */\n\"use strict\";\n\nvar request = require('request');\n\nvar reddit = {\n top: function (subreddit, callback) {\n var url = \"http://www.reddit.com/r/\" + subreddit + \"/top.json\";\n var currentTime = (new ...
javascript
edit
0
4
mit
68f46c73a0de920803aebb9db5b78a28e458ea9e
netherwarhead/netherwarhead,netherwarhead/baconytics2,netherwarhead/netherwarhead,netherwarhead/baconytics2,netherwarhead/baconytics2,netherwarhead/netherwarhead
lib/api/reddit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2010 Kevin Decker (http://www.incaseofstairs.com/)\n * See LICENSE for license information\n */\nvar HistoryHandler = (function() {\n\tvar currentHash, callbackFn;\n\n\tfunction loadHash() {\n\t\treturn decodeURICom...
javascript
edit
0
1
bsd-3-clause
d76319bf9ba2d629fd21c1cd5ac90f0f5b8a9981
leonardohipolito/border-image-generator,kpdecker/border-image-generator,kpdecker/border-image-generator,leonardohipolito/border-image-generator
history-handler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Mirage, {faker} from 'ember-cli-mirage';\n\nexport default Mirage.Factory.extend({\n});\n\n```\n\nApply this change: Update factory blueprint to pass JSHint\n\nJSHint complains about unused {faker} import in default factory." }...
javascript
edit
0
0
mit
5af993b0c7a5abbf3aca3816458cc8b73055a158
cs3b/ember-cli-mirage,LevelbossMike/ember-cli-mirage,lazybensch/ember-cli-mirage,jherdman/ember-cli-mirage,ballPointPenguin/ember-cli-mirage,cs3b/ember-cli-mirage,ballPointPenguin/ember-cli-mirage,jherdman/ember-cli-mirage,cibernox/ember-cli-mirage,lependu/ember-cli-mirage,mixonic/ember-cli-mirage,jerel/ember-cli-mirag...
blueprints/factory/files/app/mirage/factories/__name__.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* ************************************************************************\n\n widgets\n\n Copyright:\n 2009 Deutsche Telekom AG, Germany, http://telekom.com\n\n ********************************************************************...
javascript
edit
0
1
mit
f6596240ba68ce13c08254cb864f0f353320e313
unify/unify,unify/unify,unify/unify,unify/unify,unify/unify,unify/unify
application/widgets/source/class/widgets/view/Start.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint no-console:0 */\n// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/java...
javascript
edit
0
0
mit
72e9f05a844f38eb03611625f5bc639c3c2a5f20
apvale/apvale.github.io,apvale/apvale.github.io,apvale/apvale.github.io
app/javascript/packs/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2011 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\n/**\n * This view displays information on the HTTP cache.\n * ...
javascript
edit
0
3
bsd-3-clause
80d3bccc16c15681292e67edd69ec1631a4c63d1
PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,rogerwang/chromium,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,M4sse/chromium.src,ondra-novak/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,axinging...
chrome/browser/resources/net_internals/http_cache_view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst common = require('./../server/common');\n\nexport class DungeonBluePrints {\n constructor (number, worldSize, locationSize) {\n this.number = number;\n this.worldSize = worldSize;\n this.locationSize = l...
javascript
edit
0
4
mit
679962935ae5303bde46ca18a216b14504e2327c
nobus/Labyrinth,nobus/Labyrinth
worldGenerator/DungeonBluePrints.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\n\nmodule.exports = {\n entry: \"./src/index.tsx\",\n\n output: {\n filename: \"bundle.js\",\n path: path.resolve(__dirname, \"public/\")\n },\n\n resolve: {\n // Add '.ts' ...
javascript
edit
0
0
mit
bd7bd1f25231434489d425613f41e1bda888a291
tadashi-aikawa/owlora,tadashi-aikawa/owlora,tadashi-aikawa/owlora
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.onload = function() {\n sectionShow();\n blogController();\n};\n\nfunction sectionShow() {\n var sectionControls = {'home_btn': 'home', 'about_btn': 'about', 'projects_btn': 'projects', 'blog_btn': 'blog'}\n document.getEleme...
javascript
edit
null
null
mit
64019f0ffd4582e8bb047e261152c9a034bfe378
jorgerc85/jorgerc85.github.io,jorgerc85/jorgerc85.github.io
index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst td = require('testdouble');\n\nconst MakeDir = require('../../../src/utils/make-dir');\n\nconst fs = require('fs');\nconst path = require('path');\n\ndescribe('MakeDir', () => ...
javascript
edit
0
1
mit
22e747a989a343402fe54193b2780ef3d91c5d4a
isleofcode/splicon
node-tests/unit/utils/make-dir-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @emails oncall+react_native\n * @format...
javascript
edit
0
1
bsd-3-clause
c5a54ec1b1de01baf05788b0602e20d41ebfc767
hammerandchisel/react-native,hoangpham95/react-native,janicduplessis/react-native,exponent/react-native,hammerandchisel/react-native,hoangpham95/react-native,exponentjs/react-native,facebook/react-native,hammerandchisel/react-native,myntra/react-native,javache/react-native,pandiaraj44/react-native,hammerandchisel/react...
packages/babel-plugin-inline-view-configs/__tests__/index-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.onload = function() {\n\n var tabs = function() {\n var args = models.application.arguments;\n var current = $(\"#\"+args[0]);\n var sections = $(\".section\");\n sections.hide();\n current.s...
javascript
edit
0
1
mit
6d40c5a2511368407c86e4f9fc39850d3f2a74c2
hassy/music_hipster
js/musichipster.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('../../index.js');\nvar scope = require('./Tadpoles');\nscope.view.exportFrames({\n\tamount: 200,\n\tdirectory: __dirname,\n\tonComplete: function() {\n\t\tconsole.log('Done exporting.');\n\t},\n\tonProgress: function(event) {\n...
javascript
edit
0
1
mit
c67b8acd4ee31cd4f8285cd21185727d191d23ce
superjudge/paper.js,proofme/paper.js,ClaireRutkoske/paper.js,iconexperience/paper.js,mcanthony/paper.js,legendvijay/paper.js,Olegas/paper.js,lehni/paper.js,fredoche/paper.js,JunaidPaul/paper.js,lehni/paper.js,luisbrito/paper.js,baiyanghese/paper.js,Olegas/paper.js,JunaidPaul/paper.js,mcanthony/paper.js,baiyanghese/pape...
examples/Node.js/exportTadpoles.js
rejected_duplicate
Near-duplicate of sample 94591
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\nvar path = require('path');\n\nmodule.exports = {\n context: __dirname + '/app',\n entry: './index.js',\n\n output: {\n path: __dirname + '/bin',\n publicPath: '/',\n filename: 'bundle.js',...
javascript
edit
0
0
mit
0cae8b6bebd3f28a92084289951b944bed35c937
oliverbenns/pong,oliverbenns/pong
webpack.config.js
rejected_duplicate
Near-duplicate of sample 100689
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\n\nmodule.exports = {\n devtool: 'inline-source-map',\n entry: './src/index.js',\n module: {\n rules: [\n {\n test: /\\.(js|vue)$/,\n loader: 'eslint-loader',\n enforce: 'pre...
javascript
edit
0
0
isc
219c639530f7e72ac12980291d03b2e9a2808d3e
muxy/extensions-js,muxy/extensions-js,muxy/extensions-js
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst webpack = require('webpack');\nconst CleanWebpackPlugin = require('clean-webpack-plugin');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\n\nconst project = require('./project.config.json...
javascript
edit
0
0
mit
cdce8405c85996b5362ef05fc4c715725e640394
ibleedfilm/fcc-react-project,ibleedfilm/recipe-box,ibleedfilm/fcc-react-project,ibleedfilm/recipe-box
webpack.config.prod.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ngoog.provide('app_scaleline_directive');\n\ngoog.require('app');\ngoog.require('ngeo_control_directive');\ngoog.require('ol.control.ScaleLine');\n\n(function() {\n var module = angular.module('app');\n\n module.directive('appScaleline...
javascript
edit
0
1
mit
93d9d4bba873aba0af6c4419b7c731ebd187797c
geoportallux/geoportailv3-gisgr,geoportallux/geoportailv3-gisgr,Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3,geoportallux/geoportailv3-gisgr,Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3,geoportallux/geoportailv3-gisgr,Geoportail-Luxembourg/geoportailv3
geoportailv3/static/js/scalelinedirective.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright 2015, Government of Canada.\n * All rights reserved.\n *\n * This source code is licensed under the MIT license.\n *\n * @providesModule User\n */\n\nvar Cookie = require('react-cookie');\nvar Events = require('./Event...
javascript
edit
0
1
mit
bc864168d477192120b67ff32f71d07ea1674d76
igboyes/virtool,igboyes/virtool,virtool/virtool,virtool/virtool
client/src/js/dispatcher/user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\nvar BundleTracker = require('webpack-bundle-tracker');\nvar path = require(\"path\");\n\nmodule.exports = {\n context: __dirname,\n \n entry: [\n './ditto/static/chat/js/base.js',\n ...
javascript
edit
0
0
bsd-3-clause
fb03f18dd8bbf6634e8b9fa69ffc32cb1a71d719
Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto
webpack.prod.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = require('jquery-detached').getJQuery();\nvar jsModules = require('@jenkins-cd/js-modules');\n\n$(document).ready(function () {\n var tryBlueOcean = $('<div class=\"try-blueocean header-callout\">Try Blue Ocean UI ...</div>');...
javascript
edit
0
1
mit
26e3988ea21f5dea1e47cefe51eb546ea6a06f64
kzantow/blueocean-plugin,kzantow/blueocean-plugin,tfennelly/blueocean-plugin,alvarolobato/blueocean-plugin,jenkinsci/blueocean-plugin,tfennelly/blueocean-plugin,jenkinsci/blueocean-plugin,jenkinsci/blueocean-plugin,jenkinsci/blueocean-plugin,ModuloM/blueocean-plugin,tfennelly/blueocean-plugin,alvarolobato/blueocean-plu...
blueocean-web/src/main/js/try.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nvar msal = require('@azure/msal-node');\n\nconst msalConfig = {\n auth: {\n clientId: \"6c04f413-f6e7-4690-b372-dbdd08...
javascript
edit
0
1
mit
36fd7e3ea6bdaf58995bc1c9da9522c4c0911dee
AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication...
samples/msal-node-samples/standalone-samples/device-code/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar NS = {};\n\n\n// MODULES //\n\nvar getKeys = require( 'object-keys' ).shim();\nNS.RE_EOL = require( '@stdlib/regexp/eol' );\nNS.RE_EXTNAME = require( '@stdlib/regexp/extname' );\nNS.RE_EXTNAME_POSIX = require( '@std...
javascript
edit
0
2
apache-2.0
d09cd9ef89e9860c7b972cba9fcb1736f4de17c7
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/repl/lib/context/regexp/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-docker-config',\n\n contentFor: function(type, config) {\n if (type === 'head') {\n return '<script type=\"text/javascript\">window.DynamicENV = '...
javascript
edit
0
7
mit
c1928257ac5233ad15866c5d4675ebdf7f552203
pk4media/ember-cli-docker-config,pk4media/ember-cli-docker-config
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function($) {\n $(document).ready(function() {\n\n $('#template-entry-hidden').load(\"entry.template.html\");\n\n $('#btn-load-project').click(function(){\n var project = $('#project-name').val();\n $.getJSON(project, ...
javascript
edit
0
3
bsd-3-clause
2efd96c382e193197acbbc30c0e0d6be135cd09c
nc6/tabula-viewer
lib/js/tabulate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Cell used for showing an AmountEntry\n *\n * Copyright 2015 Ethan Smith\n */\n\nvar Marionette = require('backbone.marionette');\n\nvar AmountEntryCell = Marionette.ItemView.extend({\n tagName: 'td',\n render: function() {\n...
javascript
edit
0
2
mit
feab634e3d57c84f1e76ee6d00f13b2e99050b94
onebytegone/banknote-client,onebytegone/banknote-client
src/view/table/cell/AmountEntryCell.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Eris = require(\"eris\");\nconst config = require(\"./cfg\");\n\nconst bot = new Eris.Client(config.token, {\n getAllUsers: true,\n restMode: true,\n});\n\nmodule.exports = bot;\n\n```\n\nApply this change: Disable getAllUsers f...
javascript
edit
0
0
mit
2beadbe92492133a4b643ec257ab40910e520031
Dragory/modmailbot
src/bot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar dbm = require('db-migrate');\nvar type = dbm.dataType;\n\nexports.up = function(db, callback) {\n db.createTable('ripple_addresses', {\n id: { type: 'int', primaryKey: true, autoIncrement: true },\t \t\n user_id: { type: 'int...
javascript
edit
0
1
isc
f937a7643eb831c8ab4d5f4b2356a1ec2335acfa
xdv/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,xdv/gatewayd,crazyquark/gatewayd,whotooktwarden/gatewayd,crazyquark/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd
db/migrations/20131219233339-ripple-addresses.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst renderWay = require('./renderWay');\nconst predict = require('./predict');\n\nmodule.exports = (model, dispatch) => {\n const prediction = predict(model);\n return renderWay(prediction, {\n label: 'prediction',\n numbers: ...
javascript
edit
0
1
mit
9b6a769d4c96ea4834c3659c957d0d84b6eb41cc
axelpale/lately,axelpale/lately
example/drummer/src/createPredictedFutureElem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('current-user module', function() {\n\n var currentUser;\n beforeEach(module('current-user'));\n\n beforeEach(inject(function(_currentUser_) {\n currentUser = _currentUser_;\n }));\n\n describe('currentUser', function()...
javascript
edit
0
1
mit
e7004fd93bd36390c4d644f1ec0cd66e267ff61a
christse02/project,christse02/project
app/shared/current_user/currentUser.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Remove concourse elements\n// @namespace cloudpipeline.digital\n// @description Strips away some of the cruft from the concourse pipeline view when showing it on monitoring screens.\n// @include ...
javascript
edit
0
2
mit
ee71493015ea0a949d6f9dcc77e641ffc77659f0
alphagov/paas-cf,alphagov/paas-cf,jimconner/paas-cf,jimconner/paas-cf,alphagov/paas-cf,jimconner/paas-cf,jimconner/paas-cf,jimconner/paas-cf,alphagov/paas-cf,alphagov/paas-cf,jimconner/paas-cf,alphagov/paas-cf,alphagov/paas-cf,jimconner/paas-cf,alphagov/paas-cf
misc/chrome_plugins/clean_concourse_pipeline/src/inject.user.js
rejected_duplicate
Near-duplicate of sample 102815
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass ElectronInterface extends SiteInterface {\n constructor() {\n super();\n }\n}\n```\n\nApply this change: Add style to Electron Interface" }, { "role": "assistant", "content": "class ElectronInterface exten...
javascript
edit
0
1
mit
8c6d9d92092b13a86b6cec85be8141757e2da8a4
ukahoot/ukahoot,ukahoot/ukahoot.github.io,ukahoot/ukahoot.github.io,ukahoot/ukahoot.github.io,ukahoot/ukahoot,ukahoot/ukahoot,ukahoot/ukahoot
site/src/electron/ElectronInterface.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Creates a new 2 dimensional Vector.\n * \n * @constructor\n * @this {Circle}\n * @param {number} x The x value of the new vector.\n * @param {number} y The y value of the new vector.\n */\nfunction Vector2(x, y) {\n if (typeo...
javascript
edit
0
3
mit
62f3a153dd791bcd8ff30b54aaa2b7c0d8254156
zedutchgandalf/OpenJGL,zedutchgandalf/OpenJGL
src/utils/math.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass ElementHolder {\n element;\n\n getElement() { return this.element; }\n\n makeFilterCapturedThis() {\n var capturedThis = this;\n return function (x) {\n return x == capturedThis.element;\n }\n }\n\n makeFilterLo...
javascript
edit
0
1
apache-2.0
415a858d32c7cb29bd81bebc2a2d22ff3b088030
bjlxj2008/traceur-compiler,renie/traceur-compiler,mathiasbynens/traceur-compiler,astralfoxy/mirai-traceur,johnjbarton/traceur-compiler,bazaarvoice/traceur-compiler,rwaldron/traceur-compiler,bjlxj2008/traceur-compiler,pandoraui/traceur-compiler,ericmckean/traceur-compiler,sebmck/traceur-compiler,wilsonokibe/traceur-comp...
test/feature/Classes/NameBinding.js
rejected_duplicate
Near-duplicate of sample 73647
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar mocha = require('../lib/mocha');\n\n\nmodule.exports = function (grunt) {\n grunt.registerMultiTask('mochacli', 'Run Mocha server-side tests.', function () {\n var options = this.options();\n if (!o...
javascript
edit
0
2
mit
2282d93db4422eac35ad3f8a65ed60e6c821eee7
Rowno/grunt-mocha-cli
tasks/mochacli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// TODO docs, see data/breakpoint.js\ndefine(function(require, exports, module) {\n \n var Data = require(\"./data\");\n \n function File(options) {\n this.data = options || {};\n if (!this.data.items)\n ...
javascript
edit
0
4
mit
22d6877b66c928bda0e53fbe4c43a3bdf50f01d2
c9/c9.ide.test
data/file.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { cancelTimers, end, getCurrentRunLoop, hasScheduledTimers } from '@ember/runloop';\n\nfunction RunLoopAssertion(env) {\n this.env = env;\n}\n\nRunLoopAssertion.prototype = {\n reset: function() {},\n inject: function() {},\n ...
javascript
edit
0
4
mit
5b3a341d2d53223775d7e09ab11819a5d433290f
kellyselden/ember.js,GavinJoyce/ember.js,mfeckie/ember.js,emberjs/ember.js,kellyselden/ember.js,Turbo87/ember.js,sandstrom/ember.js,stefanpenner/ember.js,bekzod/ember.js,kellyselden/ember.js,tildeio/ember.js,qaiken/ember.js,mixonic/ember.js,stefanpenner/ember.js,fpauser/ember.js,elwayman02/ember.js,fpauser/ember.js,giv...
packages/internal-test-helpers/lib/ember-dev/run-loop.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global describe, it, beforeEach */\n\nimport React from 'react'\nimport { expect } from 'chai'\nimport { sizeClassNames } from '../src/js/util'\n\ndescribe('Util', () => {\n describe('sizeClassNames', () => {\n it('should return ...
javascript
edit
0
1
mit
6e3621cb2032e7bf9e6a5ad977efecd70798f8b7
frig-js/frigging-bootstrap,frig-js/frigging-bootstrap
test/util.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(){\n // todo: remove depsu to elementBottomIsAlmostVisible\n var nextPage = function(elem) {\n var e = ($.isFunction(elem)) ? elem() : elem\n return Rx.Observable.interval(200).where(function() { return elementBottomIs...
javascript
edit
0
2
mit
2d105c1489e2648a4a5036bce8a4d0059da3eb82
jrosti/ontrail,jrosti/ontrail,jrosti/ontrail,jrosti/ontrail,jrosti/ontrail
resources/public/js/rx.ontrail.pager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Helmet from 'react-helmet';\nimport styles from './styles';\n\nfunction calculateViewportFromWindow() {\n if (window.innerWidth >= 544) return 'sm';\n if (window.innerWidth >= 768) return 'md';\n if...
javascript
edit
0
6
mit
ab5f7faeb6b09693c6804b011113ebe6bb8e9cd1
line64/landricks-components
src/components/LandingCanvas/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif ('serviceWorker' in navigator) {\n navigator.serviceWorker.register('./service-worker.js', {scope: './'})\n .catch(function(error) {\n alert('Error registering service worker:'+error);\n });\n} else {\n alert('service wo...
javascript
edit
0
1
mit
a73508bdc6301e616eb15a7f3ee88a5eb982e466
marco-c/broccoli-serviceworker,jkleinsc/broccoli-serviceworker
lib/registration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2014-2020 Bjoern Kimminich.\n * SPDX-License-Identifier: MIT\n */\n\nconst models = require('../models/index')\nconst insecurity = require('../lib/insecurity')\nconst utils = require('../lib/utils')\nconst cache = r...
javascript
edit
0
5
mit
3cebd82a19df42814f79725c8ab168ca50ff2b2e
bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop
routes/updateUserProfile.js
rejected_duplicate
Near-duplicate of sample 97808
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst socketio = require('socket.io')\nconst data = require('../data/tasks')\nlet counter = 0\nexports.listen = function (server) {\n io = socketio.listen(server)\n io.sockets.on('connection', function (socket) {\n console.log('Con...
javascript
edit
0
1
mit
1ebfe684c986124dd8fbf7a951b1c8e8ae94f371
geekskool/taskMaster,geekskool/taskMaster
lib/socketServer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar run = require('./runner');\n\nvar defaults = {\n opensslPath : '/usr/bin/openssl',\n padding : 'pkcs'\n};\n\nfunction verifyOptions (options) {\n if (!fs.existsSync(options.opensslPath)) {\n ...
javascript
edit
0
5
bsd-2-clause
5cf61c9fb5cb120e1531ac636e12727aee3768a6
ragnar-johannsson/rsautl
lib/rsautl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport resolve from 'rollup-plugin-node-resolve';\nimport eslint from 'rollup-plugin-eslint';\nimport babel from 'rollup-plugin-babel';\nimport commonjs from 'rollup-plugin-commonjs';\nimport replace from 'rollup-plugin-replace';\nimpor...
javascript
edit
0
0
mit
43590c27a485c93298bd89be4a1fe84e32aae30b
springload/react-accessible-accordion,springload/react-accessible-accordion,springload/react-accessible-accordion
rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Smoke-test the default \n */\nvar assert = require('chai').assert;\n\nvar breakWords = require('../../build/intermediate').wordBreakers['uax29'];\nconst SHY = '\\u00AD';\n\ndescribe('The default word breaker', function () {\n i...
javascript
edit
0
1
apache-2.0
4817ef6d6d10db74bc67a3f07c8db75bb2e3dd6e
tavultesoft/keymanweb,tavultesoft/keymanweb
common/predictive-text/unit_tests/headless/default-word-breaker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nproduct\n.config(function ($routeProvider) {\n $routeProvider\n .when('/', {\n templateUrl: 'components/chooseLanguage/chooseLanguage.tpl.html'\n ,controller: 'ChooseLanguageCtrl'\n ,resolve: {...
javascript
edit
0
1
mit
206175481008af3ad074840a80f41816dcc2991c
stevenrojasv21/product-list-steven-rojas,stevenrojasv21/product-list-steven-rojas,stevenrojasv21/product-list-steven-rojas
public/app/components/chooseLanguage/chooseLanguage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by sujithkatakam on 3/15/16.\n */\n\nfunction pagination() {\n var monkeyList = new List('test-list', {\n valueNames: ['name'],\n page: 4,\n innerWindow: 4,\n plugins: [ ListPagination({}) ...
javascript
edit
0
1
apache-2.0
5f079cbed8904f50c273aa5a017172081d91021f
sujithktkm/sujithktkm.github.io,sujithktkm/sujithktkm.github.io
js/projects.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst DrawCard = require('../../drawcard.js');\n\nclass RaiseTheAlarm extends DrawCard {\n setupCardAbilities(ability) {\n this.action({\n title: 'Flip a dynasty card',\n condition: context => this.game.i...
javascript
edit
0
3
mit
1eeb1d49f7214732754b359bea00025d11395e4b
gryffon/ringteki,jeremylarner/ringteki,gryffon/ringteki,gryffon/ringteki,jeremylarner/ringteki,jeremylarner/ringteki
server/game/cards/02.2-FHaG/RaiseTheAlarm.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst passport = require('passport');\nconst BdApiStrategy = require('passport-bdapi').Strategy;\n\nmodule.exports = (config, app, passport, models) => {\n passport.use(new BdApiStrategy({\n apiURL: config.a...
javascript
edit
0
2
mit
c91d95333da23c09b5f9df9e5a591b2d007ea531
leMaik/EduCraft-Editor,leMaik/EduCraft-Editor,leMaik/EduCraft-Editor,leMaik/EduCraft-Editor
server/auth/craftenforum.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @module App Main Application Module \n */\n'use strict';\n\nconst express = require('express');\nconst app = express();\nconst api = require('./api/api.router');\n\napp.use('/', express.static('public'));\napp.use('/api', api);\...
javascript
edit
0
0
mit
51be095bab5e4c8b34b8e2dda0bd56a565d43bad
agroupp/test-api,agroupp/test-api
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport { connect } from 'react-redux'\nimport PropTypes from 'prop-types'\n\nimport Sidebar from '../../../components/Sidebar'\nimport TopicList from '../../../components/TopicList'\nimport './H...
javascript
edit
0
1
mit
55a86b726335b4dbc2fa45b43e82c6245fdfed82
AdrielLimanthie/carousell-reddit,AdrielLimanthie/carousell-reddit
src/routes/Home/components/HomeView.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//extend webpack.config.js\nvar config = require('./webpack.config');\nvar path = require('path');\n\n//for more info, look into webpack.config.js\n//this will add a new object into default settings\n// config.entry = [\n// 'webpack/h...
javascript
edit
0
0
isc
a9817a7d8b33fa27072d5f5a55cfc49e00eada71
terryx/react-webpack,terryx/react-webpack
webpack.development.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2014 Hewlett-Packard Development Company, L.P.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License. You may obtain\n * a copy...
javascript
edit
0
1
apache-2.0
c1439e9e07786a46290a550304f3c9014a1b3d06
ColdrickSotK/storyboard-webclient,ColdrickSotK/storyboard-webclient,ColdrickSotK/storyboard-webclient
src/app/projects/controller/project_list_controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst chai = require('chai');\nconst sinon = require('sinon');\nconst sinonChai = require('sinon-chai');\n\n// Require and load .env vars\nrequire('./dotenv');\n\n// Configure chai to use Sinon-Chai\nchai.should();\nchai.use(sinonChai);...
javascript
edit
0
0
bsd-3-clause
dbf22af2728160fbe45245c9a779dec2f634cbe4
kriansa/amelia,kriansa/amelia,kriansa/amelia,kriansa/amelia
app/assets/javascripts/tests/helpers/common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst buildBaseCss = require(`./_build-base-css.js`);\nconst buildBaseHtml = require(`./_build-base-html.js`);\nconst buildPackageCss = require(`./_build-package-css.js`);\nconst buildPackageHtml = require(`./_build-package-html.js`);\n...
javascript
edit
0
1
mit
b260f27e0176f2615236e78e06c8af045f5b0680
avalanchesass/avalanche-website,avalanchesass/avalanche-website
scripts/build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Prop from 'props/prop';\nimport canvas from 'canvas';\nimport mouse from 'lib/mouse';\n// http://stackoverflow.com/questions/16628184/add-onclick-and-onmouseover-to-canvas-element\n\nexport default class Clickable extends Prop {\...
javascript
edit
0
4
mit
e5985521ee1fd0960dcc6af004e5dd831857685d
oliverbenns/pong,oliverbenns/pong
app/props/clickable.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('mean.icu').service('context', function ($injector, $q) {\n var mainMap = {\n task: 'tasks',\n user: 'people',\n project: 'projects',\n discussion: 'discussions',\n o...
javascript
edit
0
10
mit
c8a608cf64c5fb9ce0f24beee53b7acccfc4cd03
linnovate/icu,linnovate/icu,linnovate/icu
packages/custom/icu/public/components/data/context/context.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n/**\n * Part of GDL gdl-frontend.\n * Copyright (C) 2017 GDL\n *\n * See LICENSE\n */\n\nimport * as React from 'react';\n\nimport { fetchBook } from '../../fetch';\nimport type { BookDetails, Context } from '../../types';\nim...
javascript
edit
null
null
apache-2.0
4b765f32e63599995bef123d47fd9ddd39bdb235
GlobalDigitalLibraryio/gdl-frontend,GlobalDigitalLibraryio/gdl-frontend
pages/books/read.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar debug = require('debug')('rose');\nvar mongoose = require('mongoose');\n\nvar mongoURI = process.env.MONGOLAB_URI || 'mongodb://localhost/mydb';\ndebug('Connecting to MongoDB at ' + mongoURI + '...');\nmongoose.connect(mongoURI);\n\...
javascript
edit
0
1
mit
8b5dbe8dd8ade5517f64fe1787362bbc1981aef0
nickmccurdy/rose,nicolasmccurdy/rose,nicolasmccurdy/rose,nickmccurdy/rose
lib/feature.js
rejected_duplicate
Near-duplicate of sample 67598
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Arrays also come with the standard methods every and some. Both take a predicate function that, when called with an array element as argument, returns true or false. Just like && returns a true value only when the expressions on both...
javascript
edit
0
3
mit
2a8cd200a67562a32fcce6dd01e253985e94d18a
OperationCode/eloquent-js
05/jjhampton-ch5-every-some.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport log from './lib/log';\n\nlet socket = root.io.connect('');\n\nsocket.on('connect', () => {\n log.debug('socket.io: connected');\n});\nsocket.on('error', () => {\n log.error('socket.io: error');\n socket.destroy();\n});\n...
javascript
edit
0
1
mit
01e2d7f7a2a533d6eebd750096ccb542e5c524ae
cheton/cnc.js,cheton/cnc,cncjs/cncjs,cheton/cnc,cncjs/cncjs,cheton/piduino-grbl,cheton/cnc,cheton/cnc.js,cheton/cnc.js,cheton/piduino-grbl,cncjs/cncjs,cheton/piduino-grbl
web/lib/socket.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar app = module.exports = require('appjs').createApp({CachePath: '/Users/dbartlett/.cache1'});\n\napp.serveFilesFrom(__dirname + '/content');\n\nvar window = app.createWindow({\n width : 640,\n height : 460,\n icons : __dirname + ...
javascript
edit
0
3
mit
59ae7095d382380d0a14871a1a571fb7c99b31f6
tempbottle/appjs,SaravananRajaraman/appjs,yuhangwang/appjs,appjs/appjs,appjs/appjs,imshibaji/appjs,tempbottle/appjs,yuhangwang/appjs,modulexcite/appjs,yuhangwang/appjs,SaravananRajaraman/appjs,eric-seekas/appjs,eric-seekas/appjs,eric-seekas/appjs,SaravananRajaraman/appjs,appjs/appjs,SaravananRajaraman/appjs,modulexcite...
examples/hello-world/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function (t, a) {\n\tvar mayanEndOfTheWorld = new Date(2012, 11, 21, 1, 1);\n\n\ta.deep(t(mayanEndOfTheWorld, 'America/Guatemala').valueOf(),\n\t\tnew Date(2012, 11, 20, 18, 1).valueOf());\n\ta.deep(t(m...
javascript
edit
0
1
mit
1dcc6eab08d4df0e01427402503c5e26808e58ca
egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations
test/utils/to-date-time-in-time-zone.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\nvar BrowserSyncPlugin = require('browser-sync-webpack-plugin');\n\nmodule.exports = {\n context: __dirname,\n\n entry: './src/whoami.js',\n\n output: {\n path: './dist',\n filename: 'whoami.m...
javascript
edit
0
0
mit
dd6f17e4f57e799a6200dec3f339f5ccba75de8d
andersonba/whoami.js
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\n\nvar CurrentUser = require('../Architecture/CurrentUser').CurrentUser;\nvar WebService = require('../Architecture/WebService').WebService;\nvar MongoAdapter = require('../Adapter...
javascript
edit
0
1
mit
10c19dabd1178de4f561327e348c3c114b54ea67
rootsher/server-side-portal-framework
Web/Application.js
rejected_duplicate
Near-duplicate of sample 84816
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nimport 'babel-polyfill';\n\nimport { existsSync } from 'fs';\nimport { resolve } from 'path';\nimport merge from 'lodash.merge';\nimport TipsBot from './Tipsbot';\n\nconst tokenPath = resolve(__dirname, '..', '..', 'token.js');\nconst...
javascript
edit
0
8
mit
d7983d0ed5f18fb64e046fb4aefa718c7cdd2a8b
simon-johansson/tipsbot
src/bot/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//Memberlist JavaScript\n\nfunction hookUpMemberlistControls() {\n\t$(\"#orderBy,#order,#sex,#power\").change(function(e) {\n\t\trefreshMemberlist();\n\t});\n\n\t$(\"#submitQuery\").click(function() {\n\t\trefreshMemberlist();\n\t});\n\...
javascript
edit
0
2
bsd-2-clause
61d51a215bed8e447a528c8a65a9d2ba92453790
Jceggbert5/ABXD,ABXD/ABXD,carlosfortes/ABXD,carlosfortes/ABXD,carlosfortes/ABXD,Jceggbert5/ABXD,Jceggbert5/ABXD,ABXD/ABXD,ABXD/ABXD
js/memberlist.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fs = require('fs');\n\nvar program = require('commander');\n\nprogram\n .option('-f, --file [filename]', 'Changelog filename', 'CHANGELOG.md')\n .parse(process.argv);\n\nfunction chlgInit(file, callback) {\n file...
javascript
edit
0
3
mit
b6d411f8cd7a895394227ec6b1b3e226a69bb5e6
fldubois/changelog-cli
lib/chlg-init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar links;\n\nfunction getLinks() {\n// Scrape the links from primary nav of the website\n var links = document.querySelectorAll('.nav-link.t-nav-link');\n return Array.prototype.map.call(links, function (...
javascript
edit
0
2
mit
56583e9cb09dfbcea6da93af4d10268b51b232e9
jadu/pulsar,jadu/pulsar,jadu/pulsar
js/casper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global window*/\nvar isBrowser = typeof window !== 'undefined' &&\n typeof window.FormData !== 'undefined';\n\n// use native FormData in a browser\nvar FD = isBrowser?\n window.FormData :\n require('form-data');\n...
javascript
edit
0
5
mit
599c023798d96766d4552ad3619b95f5e84f8ed3
lakenen/node-box-view
lib/form-data.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* ========================================================================\n * Ratchet: modals.js v2.0.2\n * http://goratchet.com/components#modals\n * ========================================================================\n * Copyri...
javascript
edit
0
5
mit
626e52c243ee1e82988d4650cbb22d3d8c304ed6
jackyzonewen/ratchet,hashg/ratchet,AndBicScadMedia/ratchet,mazong1123/ratchet-pro,Joozo/ratchet,calvintychan/ratchet,asonni/ratchet,aisakeniudun/ratchet,youprofit/ratchet,Diaosir/ratchet,wallynm/ratchet,vebin/ratchet,mbowie5/playground2,arnoo/ratchet,AladdinSonni/ratchet,youzaiyouzai666/ratchet,ctkjose/ratchet-1,liangx...
js/modals.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst R = require('ramda')\n\nexport default async () => {\n console.log('1...2...3...')\n return R.range(1, 4)\n // return [1, 2, 3]\n}\n\n```\n\nApply this change: Remove the console log from a fixture." }, { "role": "assis...
javascript
edit
0
1
mit
a69af39c3d2f4b1ec80a08bd6abe70e2a431b083
infinitered/gluegun,infinitered/gluegun,infinitered/gluegun
packages/staplegun/test/fixtures/good-plugins/threepack/three.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
6
mit
65a9b66c2d9f30bad14a06b0646737ec86799f39
facebook/jscodeshift,fkling/jscodeshift
src/matchNode.js
rejected_duplicate
Near-duplicate of sample 108302
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar hostname = location.hostname.replace(/^www\\./, '');\n\nvar style = document.createElement('link');\nstyle.rel = 'stylesheet';\nstyle.href = chrome.extension.getURL('styles/' + hostname + '.css');\ndocument.documentElement.insertBef...
javascript
edit
0
0
mit
eef93ee29ecec1f150dc8af0e9277709a39daaed
p3lim/dotjs-universal,p3lim/dotjs-universal
dotjs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport constant from './constant';\nimport freeze from './freeze';\nimport is from './is';\nimport _if from './if';\nimport ifElse from './ifElse';\nimport map from './map';\nimport omit from './omit';\nimport reject from './reject';\ni...
javascript
edit
0
0
mit
b20135c356901cd16f8fd94f3ac05af4ab464005
substantial/updeep,substantial/updeep
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar path = require('path');\nvar BinWrapper = require('bin-wrapper');\nvar pkg = require('../package.json');\n\nvar url = 'https://raw.githubusercontent.com/jihchi/giflossy-bin/v' + pkg.version + '/vendor/';\n\nmodule.exp...
javascript
edit
0
0
mit
f3735c9b214ea8bbe2cf3619409952fedb1eb7ac
jihchi/giflossy-bin
lib/index.js
rejected_duplicate
Near-duplicate of sample 107904
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'lodash';\nimport {Graph, alg} from 'graphlib';\n\nconst dijkstra = alg.dijkstra;\n\nexport function setupGraph(relationships) {\n let graph = new Graph({\n directed: true\n });\n _.each(relationships, function (rela...
javascript
edit
0
2
mit
d0b8c473fa886a208dcdfa4fd8bc97fc4c1b6770
siddharthkchatterjee/graph-resolver
lib/graph.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"About Expects\", function() {\n\n //We shall contemplate truth by testing reality, via spec expectations. \n it(\"should expect true\", function() {\n expect(false).toBeTruthy(); //This should be true\n });\n\n //To u...
javascript
edit
0
1
mit
7ca1d708a9a9c22e596e9c4a64db74115994d54a
DhiMalo/javascript-koans,GMatias93/javascript-koans,JosephSun/javascript-koans,existenzial/javascript-koans,GMatias93/javascript-koans,darrylnu/javascript-koans,JosephSun/javascript-koans,DhiMalo/javascript-koans,existenzial/javascript-koans,GMatias93/javascript-koans,darrylnu/javascript-koans,darrylnu/javascript-koans...
koans/AboutExpects.js
rejected_duplicate
Near-duplicate of sample 71488
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar config = require('../config/configuration.js');\n\nfunction htmlReplace(str) {\n return str.replace(/<\\/?[a-z1-9]+(\\s+[a-z]+=[\"'](.*)[\"'])*\\/?>/g, ' ').replace(/ +/g, ' ').replace(/ ?\\n ?/g, '\\n').trim();\n}...
javascript
edit
0
6
mit
fec0c1ca4048c3590396cd5609cb3085e6c61bf5
AnyFetch/embedmail-hydrater.anyfetch.com
lib/index.js
rejected_duplicate
Near-duplicate of sample 96985
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Factory, faker } from 'ember-cli-mirage';\n\nexport default Factory.extend({\n fund: () => faker.random.arrayElement([\"WNYC\", \"WQXR\", \"Radiolab\"]),\n orderPrice: () => faker.random.arrayElement([60, 72, 120, 12, 90, 100...
javascript
edit
0
1
mit
6eea14a4d3291b3d6e1088a6cd4eacda056ce56a
nypublicradio/nypr-account-settings,nypublicradio/nypr-account-settings
tests/dummy/mirage/factories/pledge.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport class OHIFPlugin {\n // TODO: this class is still under development and will\n // likely change in the near future\n constructor () {\n this.name = \"Unnamed plugin\";\n this.description = \"No description ...
javascript
edit
0
6
mit
f6b82baae39560c733160d292dcbcec043b5edb3
OHIF/Viewers,OHIF/Viewers,OHIF/Viewers
Packages/ohif-viewerbase/client/lib/classes/plugins/OHIFPlugin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmodule.exports = {\n Urls: {\n vault_base_url: '',\n base_url: process.env.BASE_URL || process.env.HUBOT_ROOT_URL\n },\n Strings: {\n sorry_dave: 'I\\'m sorry %s, I\\'m afraid I can\\'t do that.'\n },\n};\n\n```\n\nApply ...
javascript
edit
0
0
mit
78a75ddd6de442e9e821a1bb09192d17635ff1b6
uWhisp/hubot-db-heimdall,uWhisp/hubot-db-heimdall
config/default.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\nvar path = require('path');\nvar exec = require('child_process').exec;\n\nvar LOG_TYPES = [\n\t\"ERROR\", \"WARNING\"\n];\n\n\nmodule.exports = function(filepath, options, callback) {\n\tif (!callback) {\n\t\...
javascript
edit
0
3
apache-2.0
c19fc02c3ea90da940bb39a9f59f0c9b06632175
GitbookIO/node-epubcheck
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nutils = {\n startsAtMomentWithOffset: function (game) {\n var offset = game.location.utc_offset;\n if (! Match.test(offset, UTCOffset)) {\n offset: -8; // Default to California\n }\n // UTC offsets returned by Google P...
javascript
edit
0
2
mit
bd13b83b42ac2e552010f228f20fa7f5e67b896a
pushpickup/pushpickup,pushpickup/pushpickup,pushpickup/pushpickup
lib/utils.js
rejected_duplicate
Near-duplicate of sample 73667
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst mongoose = require('mongoose');\nconst Schema = mongoose.Schema;\n\nmodule.exports = new Schema({\n merge_request: {\n id: Number,\n url: String,\n target_branch: String,\n source_branch: String,\n created_at: Stri...
javascript
edit
0
0
mit
fdee590648c6fdad1d6b19ef83bb9ce4b33fb0dc
NSAppsTeam/nickel-bot
src/merge-request-schema.js
rejected_duplicate
Near-duplicate of sample 91639
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif (self.importScripts) {\n importScripts('/resources/testharness.js');\n importScripts('worker-helpers.js');\n}\n\nasync_test(function(test) {\n if (Notification.permission != 'granted') {\n assert_unreached('No permiss...
javascript
edit
0
2
bsd-3-clause
d61bbefb46b2c9c07a9d3ac6a119de73054966f4
primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs
LayoutTests/http/tests/notifications/resources/update-event-test.js
rejected_duplicate
Near-duplicate of sample 82383
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport React from 'react';\nimport { Route, IndexRoute } from 'react-router';\nimport App from './containers/App';\nimport VerticalTree from './containers/VerticalTree';\n\n\nexport default (\n <Route path=\"/\" component={Ap...
javascript
edit
0
0
mit
3691387bdf33e6c02899371de63497baea3ab807
ivtpz/brancher,ivtpz/brancher
app/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('pingPongOutput', function() {\n it(\"is the number for most input numbers\", function() {\n expect(pingPongOutput(2)).to.equal(2);\n });\n\n it(\"is 'ping' for numbers divisible by 3\", function() {\n expect(pingPongO...
javascript
edit
0
1
mit
26aca19bd633c7c876099d39b8d688d51bb7e773
JeffreyRuder/ping-pong-app,JeffreyRuder/ping-pong-app
spec/specs.js
accepted
null
true