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(function () {\n 'use strict';\n\n var extends = require('./extends');\n\n exports = module.exports = function (guido) {\n guido.use(extends);\n };\n})();\n\n```\n\nApply this change: Fix in default processors setter module" },...
javascript
edit
0
1
mit
d0711bc2d3ede5c767f53698cd6011626152af4e
mkretschek/guido
lib/processor/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport TeaserGrid from 'components/TeaserGrid';\nimport Container from 'components/Container';\nimport BlockContainer from 'components/BlockContainer';\nimport Section from 'components/Section';\nimport Headi...
javascript
edit
0
1
apache-2.0
466885629604d1c8d1d6ce3a4a47635199d3ff88
iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend
src/components/HomepagePetitions/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nfunction createColorTextureFromSteps()\nconst map = ColorRamp.createColorTexture(this.refs.colorbar, (i) =>\n ColorRamp.map(this.props.steps, i))\n\nfunction createColorTexture (canvas, colorFunction = () => 'transparent') {\n // c...
javascript
edit
0
1
mit
0c23d02f2bed28dfe8b1f6e3fbc9f5a778e62a5a
Artsdatabanken/ecomap,Artsdatabanken/ecomap,bjornreppen/ecomap,bjornreppen/ecomap
src/graphics/color/createTexture.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\ndefine([\n './_Global'\n ], function baseCoreUt...
javascript
edit
0
2
mit
b9ac71032d03c8606ba39cca1a47d0c8339f6c1f
grork/winjs,PaulWells/winjs,ladyinblack/winjs,IveWong/winjs,rigdern/winjs,PaulWells/winjs,PaulWells/winjs,gautamsi/winjs,rigdern/winjs,GREYFOXRGR/winjs,edrohler/winjs,jmptrader/winjs,jmptrader/winjs,gautamsi/winjs,Guadzilah/winjs,KevinTCoughlin/winjs,CensoredUser/winjs,kevinwsbr/winjs,GREYFOXRGR/winjs,edrohler/winjs,ed...
src/js/WinJS/Core/_BaseCoreUtils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { namespace } from './consts';\n\nexport function debug() {\n Ember.Logger.debug(namespace, ...arguments);\n}\n```\n\nApply this change: Move from Ember.Logger to console\n\nEmber.Logger is deprecated...
javascript
edit
0
2
mit
532ff6314ad15d8829cc17667ad20348275b5c7c
rhyek/ember-master-tab,rhyek/ember-master-tab
addon/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global fetch */\nmodule.exports = function(callback) {\n console.log(\"Fetch tutorials.\");\n fetch('/getListOfTutorials')\n .then(function(data) {\n return data.json();\n }).then(function(tutorialPaths) {\n ...
javascript
edit
0
2
mit
28770adb8a68f18c6ba798d332ee7fddc9a65107
fhinkel/InteractiveShell,antonleykin/InteractiveShell,fhinkel/InteractiveShell,fhinkel/InteractiveShell,antonleykin/InteractiveShell,antonleykin/InteractiveShell,fhinkel/InteractiveShell
src/frontend/fetchTutorials.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n\n var app = angular.module('bbUniqueModule', []);\n\n\n app.directive('bbUnique', ['$q',function($q){\n //allows us to cache template before we run link\n\n return {\n restrict: 'A',\n ...
javascript
edit
0
4
mit
dc16c4385b41a4b4f703196350c0fbb6b9740748
benjaminmbrown/angular-directives-study,benjaminmbrown/angular-directives-study
bb-unique-directive/bbUniqueModule.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar DB_USERS = require(process.env.APP_DB_USERS),\n\n passport = require(\"passport\"),\n LocalStrategy = require('passport-local').Strategy;\n\nmodule.exports = function() {\n passport.use('local-login', new LocalStrategy({\n ...
javascript
edit
0
4
mit
2e4b6c8fdf35d6e827eae2d32823504a28af7cc1
Chillybyte/GlobalComments,Chillybyte/GlobalComments
server/auth/strategies/local-login.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n // or devtool: 'eval' to debug issues with compiled output:\n devtool: 'cheap-module-eval-source-map',\n entry: [\n // necessary for hot reload...
javascript
edit
0
0
cc0-1.0
2124f2565a652afe0bfaec590b887786e270350c
kidylee/Front-end-boilerplate,laere/grocery-app,laere/diversion-2,amitayh/react-redux-test,laere/grocery-app,osener/redux-purescript-example,Neil-G/InspectionLog,laere/scape,gaearon/react-transform-boilerplate,amitayh/react-redux-test,mtomcal/react-transform-boilerplate,breath103/watchmen,JakeElder/m-s,kidylee/Front-en...
webpack.config.dev.js
rejected_duplicate
Near-duplicate of sample 69448
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport BottomNavigation from '@material-ui/core/BottomNavigation';\nimport BottomNavigationAction from '@material-ui/core/BottomNavigationAction';\n\nimport React, { Component } from 'react';\n\nimport './index.css'\nimport kitwareLogo ...
javascript
edit
0
1
bsd-3-clause
055bd0f5f9c711e28cc7c0bf1dc6c0bcc8b205f8
OpenChemistry/materialsdatabank,OpenChemistry/materialsdatabank,OpenChemistry/materialsdatabank,OpenChemistry/materialsdatabank
client/src/components/footer/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport getBindingKey from './_getbindingkey';\nimport bindNode from '../../bindnode';\nimport lookForBinder from '../../lookforbinder';\n\n// a binder for instance of Attr\nconst attributeBinder = {\n setValue(value) {\n this....
javascript
edit
0
8
mit
dd5039f72d2c3529f628a4b38f212d4d6a2bc3e6
finom/matreshka,matreshkajs/matreshka,matreshkajs/matreshka,finom/matreshka
src/parsebindings/_processattribute/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport { actionCreatorName, actionCreatorRequestName, actionCreatorSuccessName, actionCreatorFailedName } from './utils'\nimport type { Schema } from './types'\n\nexport const generateActionCreator = (name: string, type: str...
javascript
edit
null
null
mit
6f5328d894252be60458a514fd56b12d5b6144bc
drivr/react-native-grpc-bridge-generator,drivr/react-native-grpc-bridge-generator
src/react-action-creator-generator.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\ngetBestName = function(result){\n var bestName = \"\";\n if(typeof result[\"scientificName\"] !== \"undefined\"){\n bestName = result[\"scientificName\"];\n }\n if(typeof result[\"vernacularNames\"] !== \"undefined\" ...
javascript
edit
0
5
mit
b9e1f3e71f276a0a51b5de0c507f26b8ffb2bdbf
molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec
src/webroot/js/helpers/organismDetails.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n baseURL: '/',\n locationType: 'auto',\n EmberENV: {\n FEATURES: {\n // ...
javascript
edit
0
4
mit
4d8e07834076a5f4e4d61f775761d73e8f779321
lynnetye/ember-trix-editor,lynnetye/ember-trix-editor
tests/dummy/config/environment.js
rejected_duplicate
Near-duplicate of sample 69089
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst should = require('should');\n\nconst refResolver = require('./../../lib/ref_resolver');\n\nconst schema = require('./schema.json');\n\ndescribe('RefResolver', () => {\n\n it('should resolve refs in schema synchro...
javascript
edit
0
1
mit
75f5e52178788359d1d5c0307fb5d13b48b068b8
5minds/nconfetti
tests/ref_resolver/test_simple.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Always provide req.data.global, a virtual page\n// for sitewide content such as a footer displayed on all pages\n\nmodule.exports = {\n construct: function(self, options) {\n self.pageServe = function(req, callback) {\n retu...
javascript
edit
0
2
mit
73dc63fc29ccd8eb4efe2ddc09aa29d2931b2c59
punkave/apostrophe,punkave/apostrophe
lib/modules/apostrophe-global/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { expect } from '../spec_helper'\nimport { AUTHENTICATION, PROFILE } from '../../src/constants/action_types'\nimport { pushSubscriptionSaga } from '../../src/sagas/push_subscription'\nimport { isLoggedInSelector } from '../../src...
javascript
edit
0
1
mit
4fcb26b30264fb869f60946b78e58c02c023c925
ello/webapp,ello/webapp,ello/webapp
test/sagas/push_subscription_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright 2016 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the Licens...
javascript
edit
0
3
apache-2.0
50b905a35ed3dac70d7998ba6769d4f1aad781d5
pvorb/platon,pvorb/platon,pvorb/platon
src/main/javascript/utils/find-thread-url-elements.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(){\n \"use strict\";\n var POLLING_INTERVAL = 3 * 1000;\n var POLLING_URL = \"/polling/alerts\";\n\n $(function(){\n var alert = new Vue({\n el: \"#alert\",\n data: {\n \"alerts\": []\n },\n\n ...
javascript
edit
0
2
apache-2.0
4baf45c36ad82b5309a8045afd5b452cbbe481db
fluent/fluentd-ui,mt0803/fluentd-ui,fluent/fluentd-ui,fluent/fluentd-ui,mt0803/fluentd-ui,mt0803/fluentd-ui
app/assets/javascripts/alert.js
rejected_duplicate
Near-duplicate of sample 67921
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet UserRecipes = require(`${__dirname}/../schemas.js`).UserRecipes;\n\nmodule.exports = {\n signup: (req, res) => {\n\n },\n\n login: (req, res) => {\n\n },\n\n logout: (req, res) => {\n\n },\n\n //Gets all the recipes that belo...
javascript
edit
0
2
mit
af24b81702878965722355b1f4cef63580ea974d
JAC-Labs/SkilletHub,JAC-Labs/SkilletHub
server/controllers/usersController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert');\nvar seeds = require('../seeds');\nvar Feature = require('../feature');\n\ndescribe('Feature', function () {\n before(function (done) {\n seeds(done);\n });\n\n describe('schema', function () {\n ...
javascript
edit
0
1
mit
6070eacc01e93e3dd5eb4662d6be41aa5155f1b3
nicolasmccurdy/rose,nickmccurdy/rose,nicolasmccurdy/rose,nickmccurdy/rose
test/feature.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nfunction renderWaiting(element) { \n\tdocument.getElementById(element).innerHTML = \"<i class='icon-spinner icon-spin'>\"\n}\n\nfunction unrenderWaiting() {\n\t$(\".icon-spinner\").hide()\n}\n\nfunction renderError(element, error, det...
javascript
edit
0
2
bsd-3-clause
0786e2f7dfad739ca41ee6a408312fe4dd7e5d26
machiavellian/machiavelli,machiavellian/machiavelli,machiavellian/machiavelli,machiavellian/machiavelli,glasnt/machiavelli,glasnt/machiavelli,glasnt/machiavelli,glasnt/machiavelli
app/assets/javascripts/graphs/util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction handleApiError(response) {\n\n if(!response || response.status === 200)\n return;\n\n if(response.status === 403 || response.status === 401) {\n logout();\n }\n else {\n console.log('An error has occurred, please c...
javascript
edit
0
5
mit
cc18a6d0fdb83a05a7e47c52fc0405ba63082616
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
src/main/web/florence/js/functions/_handleApiError.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n ecmaVersion: 2020,\n sourceType: \"module\",\n ecmaFeatures: {\n jsx: true\n }\n },\n settings: {\n ...
javascript
edit
0
0
apache-2.0
73c2a1d0ae61f1c3e9016782d275640c806289d1
dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web
ui/.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n\n // var turbolinks = require('turbolinks')\n\n $(\"#walk-me-home\").on(\"click\", function(e){\n e.preventDefault();\n\n $.ajax({\n url: \"http://172.16.50.232:8080/start\",\n crossDoma...
javascript
edit
0
1
mit
a3e8dc617849edcbd7ed2c6ca9807c122ef94793
ShawnTe/guardian,ShawnTe/guardian,ShawnTe/guardian
app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 67322
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTemplate.postSubmit.events({\n 'submit form': function (event) {\n event.preventDefault();\n console.log('submitted');\n\n var post = {\n url: $(event.target).find('[name=url]').val(),\n tit...
javascript
edit
null
null
mit
2c197cc48a9ec51c7456d5fc6e43ae4f65659e8e
meteorcrowd/telescope,meteorcrowd/telescope
client/templates/posts/post_submit.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Basic engine support.\n */\n\nrequire('../lib/setModuleDefaults');\n\nvar config = require('config');\nvar engineConfig = config.engines || {};\n\n/**\n * Return a function that creates a plugin:\n */\n\nmodule.exports = functio...
javascript
edit
0
8
mit
82f07f32b79db3321419854ebfebcf4977f9e0f0
markbirbeck/adapter-template
adapters/generic.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from \"react\";\nimport ReactDOM from \"react-dom\";\n\nexport default class ResultItem extends Component {\n componentDidUpdate() {\n if (this.props.selected) {\n ReactDOM.findDOMNode(this).scrollIn...
javascript
edit
0
3
mit
86ff4c83bc75b4f0d9892d22c8f4c9361a79871d
cthit/playIT-python,cthit/playIT-python,cthit/playIT-python,cthit/playIT-python
frontend/src/components/ResultItem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require jquery\n//= require novnc-rails\n//= require_tree ../locale\n//= require gettext/all\n\n$(function() {\n var host = window.location.hostname;\n var encrypt = window.location.protocol === 'https:';\n var port = encrypt ? 4...
javascript
edit
0
3
apache-2.0
d9efbb1c15cb38c22d8ab3ba02f1d604a97e1525
ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic
app/assets/javascripts/remote_consoles/vnc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n\tvar cordova = require('cordova'),\n\t\tfileOpener2 = require('./FileOpener2');\n\n\tmodule.exports = {\n\n\t open: function (successCallback, errorCallback, args) {\n\t Windows.Storage.StorageFile.getFileFromPathAsync(args...
javascript
edit
0
2
mit
728824228d99775ac51cccfef67399930385076d
marceldurchholz/bb180scanner,napolitano/cordova-plugin-file-opener3,pwlin/cordova-plugin-file-opener2,pwlin/cordova-plugin-file-opener2,napolitano/cordova-plugin-file-opener3,napolitano/cordova-plugin-file-opener3,marceldurchholz/bb180scanner
src/windows/fileOpener2Proxy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { set } from \"@ember/object\";\nimport Route from \"@ember/routing/route\";\nimport InfiniteScrollOffsetMixin from \"ui/routes/-mixins/routes/infinite-scroll/offset\";\nimport FilterLanguagesMixin from \"ui/routes/-mixins/routes...
javascript
edit
0
1
mit
c42f06a5502bd72d951b6f4258652ae2150aa5e2
bastimeyer/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,streamlink/streamlink-twitch-gui,chhe/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,bastimeyer/livestreamer-twitch-gui,bastimeyer/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui
src/app/ui/routes/games/game/route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { connect } from 'react-redux';\nimport shareIcon from 'assets/icons/share.svg';\nimport facebookIcon from 'assets/icons/facebook.svg';\nimport twitterIcon from 'assets/icons/twitter.svg';\nimport mailIcon from 'assets/icons/mail...
javascript
edit
0
2
mit
4c2cf5d93da371634d93f196ce489f486eea53b0
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
app/javascript/app/components/share-menu/share-menu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Password support for accounts\",\n version: \"1.1.8-rc.0\"\n});\n\nPackage.onUse(function(api) {\n api.use('npm-bcrypt@=0.7.8_2');\n\n api.use([\n 'accounts-base',\n 'srp',\n 'sha',\n 'ejs...
javascript
edit
0
1
mit
201e0f11f6f573f809006ee6eb0e641f156e6f87
mjmasn/meteor,DAB0mB/meteor,jdivy/meteor,DAB0mB/meteor,DAB0mB/meteor,nuvipannu/meteor,lorensr/meteor,chasertech/meteor,Hansoft/meteor,nuvipannu/meteor,chasertech/meteor,4commerce-technologies-AG/meteor,4commerce-technologies-AG/meteor,lorensr/meteor,chasertech/meteor,mjmasn/meteor,mjmasn/meteor,chasertech/meteor,4comme...
packages/accounts-password/package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst mlModelPath = chrome.runtime.getURL('assets/model/model.json');\nconst tokenizerPath = chrome.runtime.getURL('assets/tokenizer.json');\n\n/** The entry point of the Chrome Extension. */\nasync function main() {\n // Load tokenize...
javascript
edit
0
3
apache-2.0
5176eecf9c95596151e86f173e59f2820b337ec1
googleinterns/amaranth,googleinterns/amaranth
amaranth-chrome-ext/src/content.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from \"react\"\n\nconst GitHubEditLink = ({ baseUrl, fileName, ...props }) => {\n const url = baseUrl + fileName\n\n return (\n <section {...props}>\n { \"Bài viết sai chính tả? Có điểm chưa rõ ràng...
javascript
edit
0
1
mit
b285713cf6fc5f81f1a211283a95cf17c5801101
thangngoc89/blog
src/components/GithubEditLink/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global showdown */\nimport Ember from 'ember';\nimport hbs from 'htmlbars-inline-precompile';\n\nconst { computed, get, Handlebars } = Ember;\n\nconst ShowdownComponent = Ember.Component.extend({\n layout: hbs`{{html}}`,\n markdown...
javascript
edit
0
3
mit
c80630704d96379369888252f5258fa5d5f45a32
gcollazo/ember-cli-showdown,gcollazo/ember-cli-showdown
addon/components/markdown-to-html.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar vow = require('vow');\n\nvar ApiMethod = require('../lib/api-method');\nvar ApiError = require('../lib/api-error');\n\n/**\n * @typedef {Object} BatchApiMethod\n * @property {String} method Method name.\n * @property {Object} params...
javascript
edit
0
3
mit
8d9a29380eee6060ba16b2a054f22987715871ce
baby-loris/bla,baby-loris/bla
api/batch.api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n verbose: true,\n collectCoverage: true,\n collectCoverageFrom: [\n 'libs/**/*.{js,jsx}',\n 'source/**/*.{js,jsx}',\n ],\n roots: [\n '<rootDir>/tests/',\n ],\n moduleNameMapper: {\n '^.+\\\\.(css|...
javascript
edit
0
0
mit
e9aef649b1353382de5fea86b4805ae5414f418d
NAlexandrov/yaw,NAlexandrov/yaw
jest.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction addslashes (str) {\n // http://kevin.vanzonneveld.net\n // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // + improved by: Ates Goral (http://magnetiq.com)\n // + improved by: marrtins\n...
javascript
edit
0
1
mit
3c11107f551e703982ebf8e7af2be0b7ccfe3d4e
FlorinDragotaExpertvision/phpjs,Mazbaul/phpjs,FlorinDragotaExpertvision/phpjs,janschoenherr/phpjs,janschoenherr/phpjs,mojaray2k/phpjs,hirak/phpjs,w35l3y/phpjs,kvz/phpjs,imshibaji/phpjs,J2TeaM/phpjs,MartinReidy/phpjs,revanthpobala/phpjs,FlorinDragotaExpertvision/phpjs,strrife/phpjs,mojaray2k/phpjs,janschoenherr/phpjs,da...
functions/strings/addslashes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst testInfo = require('ember-cli-test-info');\nconst stringUtils = require('ember-cli-string-utils');\n\nconst useTestFrameworkDetector = require('../test-framework-detector');\n\nmodule.exports = useTestFrameworkDet...
javascript
edit
0
1
mit
5f4d47353b97ccb30c9ade1ab555d959a8037786
sandstrom/ember.js,kennethdavidbuck/ember.js,intercom/ember.js,fpauser/ember.js,cibernox/ember.js,fpauser/ember.js,kellyselden/ember.js,runspired/ember.js,bekzod/ember.js,elwayman02/ember.js,thoov/ember.js,sly7-7/ember.js,Turbo87/ember.js,thoov/ember.js,miguelcobain/ember.js,mike-north/ember.js,karthiick/ember.js,Gavin...
blueprints/initializer-test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n\n 'use strict';\n\n require('./karma.conf')({\n\n set: function(base) {\n\n base.browsers = [\n 'Firefox',\n 'Opera',\n 'PhantomJS',\n 'Safari'\n ];\n\n ...
javascript
edit
0
1
mit
09d29617c57f8c68f2764eec253020d0af0a602a
JamieMason/Jasmine-Matchers,JamieMason/Jasmine-Matchers
karma-local.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n/*\n NOT a general purpose escaper! Only valid when *content* of a tag, not within an attribute.\n */\nfunction escape(code) {\n return code\n .replace(\"&\", \"&amp;\", \"g\")\n .replace(\"<\", \"&l...
javascript
edit
0
6
apache-2.0
ace0704df863837929a7e499e20c1530fcdccc4f
lucaswerkmeister/ColorTrompon,lucaswerkmeister/ColorTrompon
js/lowlight.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Backbone from 'backbone';\nimport Geppetto from 'backbone.geppetto';\n\nclass BaseView extends Backbone.View {\n\tconstructor(options) {\n\t\tsuper(options);\n\n\t\tif (!options.context || !(options.context instanceof Geppetto.Co...
javascript
edit
0
3
mit
ec27293afccf0fb5cbd1c1bdafc053cae0b7f3dd
moccu/picnic,moccu/picnic
src/core/views/Base.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/*\n * All app specific configuration\n */\n\nconst config = {};\n\nconfig.gameLocation = {\n country : 'Sweden',\n lat : '59.751429',\n lon : '15.198645'\n};\n\nconfig.historyLines = 30;\n\nconfig.chunkLength = 10;\...
javascript
edit
0
0
apache-2.0
f06fbb8544144ed44bf83ae0e46d32785876dcf2
yxeri/roleTerminal,stanislavb/roleOOC,yxeri/roleTerminal,yxeri/roleOOC,yxeri/roleOOC,yxeri/roleTerminal,stanislavb/roleOOC,yxeri/roleOOC
config/appConfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['jquery', 'underscore', 'backbone'], function($, _, Backbone) {\n\n {{body}}\n\n});\n\n```\n\nApply this change: Fix AMD editors that must have backbone forms\n\nWithout this, there's a race condition\n\nThis is how the AMD fix...
javascript
edit
0
1
mit
abdf308bb9b1309bb8b6dc9fd9afbc64cc790e88
GabeIsman/backbone-forms,wesvetter/backbone-forms,fonji/backbone-forms,dmil/backbone-forms,ldong/backbone-forms,exussum12/backbone-forms,goodwall/backbone-forms,nareshv/backbone-forms,ldong/backbone-forms,bryce-gibson/backbone-forms,goodwall/backbone-forms,fonji/backbone-forms,nareshv/backbone-forms,CashStar/backbone-f...
scripts/build-templates/simple.amd.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar rarity = require('rarity');\n\n/**\n * Upload `event` (containing event data) onto AnyFetch.\n *\n *\n * @param {Object} event Event to upload, plus anyfetchClient\n * @param {Object} anyfetchClient Client for uploa...
javascript
edit
0
4
mit
ae44d3aa4d60eb172199dea1022020435c771bf4
AnyFetch/gcalendar-provider.anyfetch.com
lib/helpers/upload.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global Chart */\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n tagName: 'canvas',\n attributeBindings: ['width', 'height'],\n\n didInsertElement() {\n this._super(...arguments);\n let context = this...
javascript
edit
0
3
mit
9898284da8d218449cde9b591cae1b5c3b7ab67d
aomra015/ember-cli-chart,aomran/ember-cli-chart,aomra015/ember-cli-chart,aomran/ember-cli-chart
addon/components/ember-chart.js
rejected_duplicate
Near-duplicate of sample 68063
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar fs = require(\"fs\");\nvar path = require(\"path\");\nvar Sequelize = require(\"sequelize\");\nvar env = /*process.env.NODE_ENV || */\"production\";\nvar config = require(path.join(__dirname, ...
javascript
edit
0
2
mit
b21a418df57e5f0e31583859d9d53f6936090187
oopartians/oopartsgames,oopartians/oopartsgames
models/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport {render} from 'react-dom'\nimport {equal, ok} from 'assert'\nimport uniqueName from './uniqueName'\n\ndescribe('uniqueName', () => {\n describe('no name specified', () => {\n it('has unique id', () ...
javascript
edit
0
1
mit
c7d18968ded6d09171e0d5729eba47b64c93e1fd
klarna/higher-order-components,klarna/higher-order-components
src/uniqueName.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nchrome.runtime.onInstalled.addListener(details => {\n console.log('previousVersion', details.previousVersion);\n});\n\nchrome.tabs.onUpdated.addListener(tabId => {\n chrome.pageAction.show(tabId);\n});\n\nconsole.log(...
javascript
edit
0
1
mit
cdaf0a2b89d4989dbaa3744acf2acb5a659da4b8
adorableio/version-one-shot,adorableio/version-one-shot
app/scripts.babel/background.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {ipcRenderer, webFrame} = require('electron')\n\nwindow.foo = 3\n\nwebFrame.executeJavaScript('window.preloadExecuteJavaScriptProperty = 1234;')\n\nwindow.addEventListener('message', (event) => {\n ipcRenderer.send('isolated-worl...
javascript
edit
0
1
mit
7f6283352f9f1b9c2579a416c93726355c010356
rajatsingla28/electron,thompsonemerson/electron,brenca/electron,Floato/electron,seanchas116/electron,rajatsingla28/electron,tonyganch/electron,rajatsingla28/electron,renaesop/electron,tonyganch/electron,joaomoreno/atom-shell,twolfson/electron,gerhardberger/electron,bpasero/electron,wan-qy/electron,shiftkey/electron,two...
spec/fixtures/api/isolated-preload.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['./node', './joinId', './imports'], function (\n node, joinId, imports) {\n\n return function (requestedFiles, nodes) {\n var is = imports(requestedFiles, nodes);\n\n var trees = [];\n r...
javascript
edit
0
1
mit
97adfe5fe4f4fb2c1a874c047ce380dc3f13fcac
xygroup/node-capnp-plugin
context/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fs from \"fs-extra\";\nimport path from \"path\";\nimport inquirer from \"inquirer\";\nimport sha1 from \"sha1\";\nimport readFileSyncStrip from \"../lib/readFileSyncStrip\";\nimport logger from \"../lib/logger\";\nimport { warn ...
javascript
edit
0
3
mit
310cb4a12eab84902166cf8847166c3640d3e60c
TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick
src/auto-upgrade/updateBabelConfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Modify URL @2ch\n// @namespace curipha\n// @description Modify texts starting with \"ttp://\" to anchor and redirect URIs to direct link\n// @include http://*.2ch.net/*\n// @include ...
javascript
edit
0
6
unlicense
9a0fed8a0fb6c13b530989fa09091f1ebcad3627
curipha/userscripts,curipha/userscripts
modifyurl@2ch.user.js
rejected_duplicate
Near-duplicate of sample 78105
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */\nimport { configure } from '@storybook/react';\nimport { setOptions } from '@storybook/addon-options';\nimport 'react-chromatic/storybook-ad...
javascript
edit
0
1
mit
6d3aa7e45f33006be0aaa2e070a8da7c2417741a
kadirahq/react-storybook,rhalff/storybook,rhalff/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,rhalff/storybook,storybooks/storybook,rhalff/storybook,storybooks/story...
examples/official-storybook/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar metaRouter = require('../');\nvar DataHolder = require('raptor-async/DataHolder');\n\nmodule.exports = function match(routes) {\n var matcher;\n var matcherDataHolder;\n\n if (typeof routes === 'string') {\n matcherD...
javascript
edit
0
2
isc
77b62d86bc9dc92293db45d5568468407a58c43a
patrick-steele-idem/meta-router
middleware/match.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Password support for accounts\",\n version: \"1.3.6\"\n});\n\nPackage.onUse(function(api) {\n api.use('npm-bcrypt', 'server');\n\n api.use([\n 'accounts-base',\n 'srp',\n 'sha',\n 'ejson',...
javascript
edit
0
1
mit
0ae3e5ff4cfbd9fa0f23cc56589084beb495e259
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
packages/accounts-password/package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar loadTodos = function() {\n $.ajax({\n url: \"/graphql?query={todoList{id,text,done}}\"\n }).done(function(data) {\n console.log(data);\n var dataParsed = JSON.parse(data);\n var todos = dataParsed.data.todoList;\n\n ...
javascript
edit
0
3
mit
bac5e65bf28e4645d30ef6620a1d11d98b214e79
equinux/graphql,graphql-go/graphql
examples/todo/static/assets/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport coreUtils from '@opentripplanner/core-utils'\nimport { ClassicLegIcon } from '@opentripplanner/icons'\nimport React from 'react'\n\nimport ItinerarySummary from '../../narrative/default/itinerary-summary'\n\nconst { formatDuratio...
javascript
edit
0
1
mit
8e014aa80b2cb546a96a59a5c675cf679f87d05e
opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux
lib/components/user/monitored-trip/trip-summary.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Twitch Auto Theater\n// @version 1.0.3\n// @updateURL https://raw.githubusercontent.com/domosapien/Twitch-Auto-Theater/master/twitch-auto-theater.js\n// @downloadURL https://raw.githubusercon...
javascript
edit
0
4
mit
eefa7ffefa842d9777e08155988f82b284738b38
domosapien/Twitch-Auto-Theater
twitch-auto-theater.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 classNameBindings: [':as-calendar-header'],\n tagName: 'header',\n\n isInCurrentWeek: Ember.computed.oneWay('model.isInCurrentWeek'),\n model: null,\n title: '...
javascript
edit
0
2
mit
fc25bde0a52f59ada7b5dcf34a1db6bbf4f87437
Subtletree/ember-calendar,Subtletree/ember-calendar,Subtletree/ember-calendar,Subtletree/ember-calendar
addon/components/as-calendar/header.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @fileoverview Run the bootstrap service\n */\n\nvar port = 3020,\n system = require('system'),\n page = require('webpage').create(),\n server = require('./server').create(port),\n util = require('./util'),\n modul...
javascript
edit
0
2
mit
802d7e0b127f3b8769a2ae41c140624f894e3e84
Livefyre/lfbshtml,Livefyre/lfbshtml,Livefyre/lfbshtml
src/phantom/bootstrapper.js
rejected_duplicate
Near-duplicate of sample 81496
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst mountComponent = (Component, props = {}, el = null) =>\n new Component({\n propsData: props,\n }).$mount(el);\n\nexport const createComponentWithStore = (Component, store, propsData = {}) =>\n new Component({\n store,\n ...
javascript
edit
0
2
mit
97572d4223092a75fd9dbd1c72c947d933c6d520
iiet/iiet-git,stoplightio/gitlabhq,mmkassem/gitlabhq,axilleas/gitlabhq,jirutka/gitlabhq,jirutka/gitlabhq,stoplightio/gitlabhq,dreampet/gitlab,stoplightio/gitlabhq,axilleas/gitlabhq,iiet/iiet-git,jirutka/gitlabhq,dreampet/gitlab,mmkassem/gitlabhq,jirutka/gitlabhq,iiet/iiet-git,dreampet/gitlab,dreampet/gitlab,axilleas/gi...
spec/javascripts/helpers/vue_mount_component_helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * CSS Modal Plugin for HTML5 Video (play/pause)\n * Author: Anselm Hannemann\n * Date: 2014-02-04\n */\n\n(function (global) {\n\n\t'use strict';\n\n\tvar CSSModal = global.CSSModal;\n\n\t// If CSS Modal is still undefined, throw a...
javascript
edit
0
3
mit
a75ce12bd186e13ce9ee335a3f6f17862fe3d51e
joerodrig3/css-modal,shawinder/css-modal,0111001101111010/css-modal,joerodrig3/css-modal,ableco/css-modal,shawinder/css-modal,ableco/css-modal,drublic/css-modal,drublic/css-modal
plugins/html5video.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add default and placeholder value for save trip modal." }, { "role": "assistant", "content": "// Default and placeholder values for form fields.\nexport const ACTIVITY_TITLE_PLACEHOLDER = 'What will you be doing?';\nexport co...
javascript
new_file
0
0
apache-2.0
b5c84e7b6c87d0c893c4994041f4086206107df1
googleinterns/SLURP,googleinterns/SLURP,googleinterns/SLURP
frontend/src/constants/messages.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport PropTypes from 'prop-types';\nimport React, { Fragment } from 'react';\n\n\n/**\n * The Search Results component\n *\n * @disable-docs\n */\nconst SearchResults = ( page ) => {\n\n\treturn (\n\t\t\t<div className=\"container-flui...
javascript
edit
0
2
mit
50531c2c63d4e0291bcbbf2037dd3dae4b3a3115
govau/service-manual
src/search/searchresults.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n normalizeEntityName: function() {},\n\n afterInstall: function() {\n return this.addBowerPackageToProject('fullcalendar', '^2.7.3').then(function () {\n return this.addBowerPackageToProject('fullcalendar-s...
javascript
edit
0
1
mit
7f7856a5e5d33ea5c771bee72134f274d4f97746
scoutforpets/ember-fullcalendar,scoutforpets/ember-fullcalendar
blueprints/ember-fullcalendar/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = process.cwd();\nvar Graphriend = require(path + '/app/controllers/Graphriend.server.js');\nvar sess;\n\nmodule.exports = function (app) {\n\n\tfunction isLoggedIn (req, res, next) {\n\t\tsess = req.session;\n...
javascript
edit
0
3
mit
f59505b4453971f6638da581e2961d789cc2a7b4
mirabalj/graphriend,mirabalj/graphriend
app/routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n!function(exports) {\n 'use strict';\n\n // Gets textures from URLs.\n // Keeps LRU cache so that textures are rebound as infrequently as possible.\n // How to implement LRU cache:\n // * Check if raster texture maps to id in textu...
javascript
edit
0
1
mit
fdee3899be6aa188bea7ccac1b0fc7e3b3df7876
reissbaker/gamekernel,reissbaker/gamekernel
public/demo/graphics-components/texturemap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport SelectMenu from 'components/common/ui/SelectMenu.react';\nimport stores from 'stores';\n\nexport default React.createClass({\n\n // We probably won't keep state here \n // and instead will be bas...
javascript
edit
0
1
apache-2.0
e58cf6f7719ad54d9f3fdb28e7ab7b03b763688a
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
troposphere/static/js/components/projects/resources/instance/details/sections/AllocationSourceSection.react.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { inject as service } from '@ember/service';\nimport config from '../config/environment';\n\nexport default Ember.Route.extend({\n queryParams: {\n rd: {\n refreshModel: true\n }\n },\n r...
javascript
edit
0
6
mit
eb7b95c92e784c667a42803a6706a93e72155b5f
whole-tale/dashboard,whole-tale/dashboard,whole-tale/dashboard
app/routes/login.js
rejected_duplicate
Near-duplicate of sample 81062
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nWebApp.connectHandlers.use(\"/package\", function(request, response) {\n var url = `https://atmospherejs.com/a/packages/findByNames\\\n?names=${request.url.split('/')[1]}`;\n var opts = {headers: {'Accept': 'application/json'}};\n HT...
javascript
edit
0
4
mit
17f052a0d77ecd2e61d1c57634e73c9c2d47a4ae
sungwoncho/meteor-icon,sungwoncho/meteor-icon
server/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('materialscommons').component('mcExperimentTaskDetails', {\n templateUrl: 'app/project/experiments/experiment/components/tasks/mc-experiment-task-details.html',\n controller: MCExperimentTaskDetailsComponentControll...
javascript
edit
0
2
mit
0b91890a5588f6e559aab5f6dc8abee2dd6efc96
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/src/app/project/experiments/experiment/components/tasks/mc-experiment-task-details.component.js
rejected_duplicate
Near-duplicate of sample 83471
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport test from 'ava';\nimport inView from '../src/in-view';\n\ntest('inView.offset returns the offset', t => {\n t.deepEqual(inView.offset(0), {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n });\n});...
javascript
edit
0
1
mit
5a2d909b3a7ec4e05a046d57e83c059061a94fe5
kudago/in-view,camwiegert/in-view
test/in-view.offset.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport styles from 'styles/Input';\n\nclass Input extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n value: props.value\n };\n }\n\n render(...
javascript
edit
0
2
mit
87bb881aa2e9d3f351f05d694e23eeed19e2dbac
denysdovhan/victory-or-betrayal
app/components/Input.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// TODO: should the baseScore be stored, and updated at vote time?\n\n// This interface should change and become more OO, this'll do for now\nvar Scoring = {\n // re-run the scoring algorithm on a single object\n updateObject: functio...
javascript
edit
0
2
mit
ed4082d98d9cfeaeb4845bb21bf03fbdb76bee9b
vlipco/startupcol-telescope,vlipco/startupcol-telescope
server/vote.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nexport function roundValue(value: number | string | void): number | string {\n if (typeof value !== 'number') {\n return '—';\n }\n const parsedValue = parseFloat(value.toString());\n const sizes = ['', ' K'...
javascript
edit
null
null
mit
cf970b2f1be3764641657a82adc51bc3da51790f
moira-alert/web2.0,moira-alert/web2.0,moira-alert/web2.0,moira-alert/web2.0
src/helpers.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar webpackSettings = require('../../webpack-helper');\n\nmodule.exports = webpackSettings({\n entry: './js/app',\n output: {\n filename: './js/app.min.js',\n path: path.resolve('./js')\n },\n reso...
javascript
edit
0
0
apache-2.0
28fa05687b037ff6bbc5c3afdf028224e2f93876
cgvarela/tungstenjs,wayfair/tungstenjs,wayfair/tungstenjs
examples/todomvc-es6/webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Generated by CoffeeScript 1.4.0\n(function() {\n var $;\n\n $ = jQuery;\n\n $(function() {});\n\n if ($('th.default-sort').data()) {\n $('table.sortable').tablesort().data('tablesort').sort($(\"th.default-sort\"), \"desc\");\n...
javascript
edit
0
2
apache-2.0
a555611cc61e170731af449dfd695b64af469cb0
grandich/puppetboard,tparkercbn/puppetboard,johnzimm/puppetboard,grandich/puppetboard,tparkercbn/puppetboard,mterzo/puppetboard,puppet-community/puppetboard,puppet-community/puppetboard,johnzimm/puppetboard,voxpupuli/puppetboard,voxpupuli/puppetboard,johnzimm/xx-puppetboard,johnzimm/puppetboard,tparkercbn/puppetboard,v...
puppetboard/static/js/tables.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nHTMLCollection.prototype.eltEach = function(f) {\n for (var i = 0; i < this.length; i++) f(this[i]);\n}\n\n/* Just create a ton of closures. The background script will only hold on\n * to the ones representing shortened URLs. This sa...
javascript
edit
0
5
mit
344d59b373c49d889001c163e0c5f79ef4288807
decklin/explode
explode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\nCopyright 2015 OpenMarket Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.o...
javascript
edit
0
1
apache-2.0
fc333067c2fd4eadfa0e25fa92a21c126c8bce5f
matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk
src/CasLogic.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\ndescribe('Dependency tree', function(){\n beforeEach(function() {\n browser.get('/app/#/staging2?doc=1&s=1');\n });\n\n describe('Sentence 1', function() {\n beforeEach(function() {\n });\n\n it('displa...
javascript
edit
0
4
mit
592844122cbf23f8445bd84189ffb365c066c11d
Masoumeh/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa
spec-e2e/tree_spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env mocha */\nconst assert = require('assert')\nconst cm = require('cucumber-messages').io.cucumber.messages\nconst Gherkin = require('../src/Gherkin')\n\ndescribe('Gherkin', () => {\n it('parses gherkin from the file system'...
javascript
edit
0
1
mit
d9cfc0f2a4cce7242ee1c50fa7903c7349942ef4
cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin,cucumber/gherkin
javascript/test/GherkinTest.js
rejected_duplicate
Near-duplicate of sample 75506
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ghost from 'ghostjs'\nimport assert from 'assert'\n\nimport localServer from './fixtures/server.js'\n\ndescribe('ghost#usePage', () => {\n\n before(localServer)\n after(localServer.stop)\n\n it('we can switch pages using usePa...
javascript
edit
0
1
mit
63644f5638a1c42dca779c683df998749fa892eb
KevinGrandon/ghostjs,KevinGrandon/ghostjs
ghostjs-examples/test/use_page_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Args\nexports.required = ['jar'];\n\n// Define\nexports.func = function (args) {\n var cookies = args.jar.getCookies('https://www.roblox.com');\n for (var key in cookies) {\n if (cookies.hasOwnProperty(key) && cookies[key].key =...
javascript
edit
0
5
mit
71cbc6c9602234f00279e7ff4eb6a8bb282d23b1
OnlyTwentyCharacters/roblox-js,sentanos/roblox-js,FroastJ/roblox-js
lib/util/getSession.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n$(document).ready(function() {\n\n var container = document.getElementById(\"queue\");\n\n\n function plusRenderer (instance, td, row, col, prop, value, cellProperties) {\n\n var plusIcon =\n '<svg class=\"icon icon--plus\" ...
javascript
edit
0
1
cc0-1.0
dda1c3d11fce53825c73e6d7e0c43115d57aaf63
NCBI-Hackathons/Metadata_categorization,NCBI-Hackathons/Metadata_categorization,NCBI-Hackathons/Metadata_categorization,NCBI-Hackathons/Metadata_categorization,NCBI-Hackathons/Metadata_categorization,NCBI-Hackathons/Metadata_categorization,NCBI-Hackathons/Metadata_categorization
django/metadata_categorization/metadata_categorization/static/metadata_categorization/metadata.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global window */\nimport BitFlux from './bitflux';\n\nvar seed = window.location.search.split('seed=')[1];\nif (seed) {\n Math.seedrandom(seed);\n}\n\nBitFlux.app()\n .fetchCoinbaseProducts(true)\n .run('#app-container');\n\n...
javascript
edit
0
0
mit
cc86bdf49424cfb8a35f3a8f7259897e6dadf6d8
jleft/BitFlux,ScottLogic/d3fc-showcase,ScottLogic/BitFlux,ScottLogic/d3fc-showcase,rjmcneill/d3fc-showcase,djmiley/d3fc-showcase,jleft/BitFlux,jdhodges/d3fc-showcase,jdhodges/d3fc-showcase,ScottLogic/d3fc-showcase,jleft/d3fc-showcase,ScottLogic/BitFlux,djmiley/d3fc-showcase,jleft/d3fc-showcase,rjmcneill/d3fc-showcase,d...
src/assets/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nimport React, { PropTypes } from 'react';\n\nconst AppWrapper = (props) => (\n <div>\n {props.children}\n </div>\n);\n\nAppWrapper.propTypes = {\n children: PropTypes.any,\n};\n\nexport default AppWrapper;\n\n```\n\nApply this c...
javascript
edit
0
1
mit
ee836603b6753856ee3bb20c38df8482fe2b9508
brewsoftware/hang-ten,brewsoftware/hang-ten
client/screens/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport IconAdd from 'react-icons/lib/md/add-circle'\nimport React from 'react'\n\nimport Stats from '../Stats'\nimport Hit from '../Hit'\n\nimport './style.scss'\n\nfunction renderHasMore (refine, searching) {\n return (\n <footer c...
javascript
edit
0
1
mit
8eec7138a327a2e2c98a1c08bab874b518857347
windtoday/windtoday-app,windtoday/windtoday-marketplace,windtoday/windtoday-marketplace
src/app/Hits/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst mix = require('laravel-mix')\nconst tailwind = require('./../lib/index.js')\nconst config = require('./tailwind.js')\nconst fs = require('fs')\n\n\nfs.writeFileSync('./tailwind.json', JSON.stringify(config))\n\nmix.setPublicPath('...
javascript
edit
0
0
mit
d47412f9beb684e9a8ae7d32b5c50f0b71116c78
tailwindcss/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss
docs/webpack.mix.js
rejected_duplicate
Near-duplicate of sample 82218
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\nCopyright 2016 OpenMarket Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.o...
javascript
edit
0
1
apache-2.0
f2e62ff439097fd2e313f9d3ea25a5992ff904b1
vector-im/vector-web,vector-im/vector-web,vector-im/vector-web,vector-im/riot-web,vector-im/riot-web,vector-im/vector-web,vector-im/riot-web,martindale/vector,vector-im/riot-web,martindale/vector,vector-im/riot-web,vector-im/vector-web,vector-im/riot-web
src/components/structures/HomePage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar del = require('del');\n\nvar DISTRIBUTION_DIRECTORY = \"lib\";\n\n/**\n * Gets a path relative to the distribution directory\n * Pass in any number of paths and they will be joined up.\n */\nfunction get...
javascript
edit
0
1
mit
89d4767c7e7a8460382ad432b54c99abc8603a57
anyWareSculpture/anyware,anyWareSculpture/anyware
gulp-utils/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from './react-es6';\n\nexport default = {\n propTypes: {\n container: React.PropTypes.object.isRequired\n },\n\n getDefaultProps: function () {\n return {\n container: document.body\n };\n },\n\n componen...
javascript
edit
null
null
mit
3d523320c125701bf7f2adf5b7ad0fe9786a8a12
mengmenglv/react-bootstrap,thealjey/react-bootstrap,aforty/react-bootstrap,react-bootstrap/react-bootstrap,omerts/react-bootstrap,egauci/react-bootstrap,cgvarela/react-bootstrap,cassus/react-bootstrap,zanjs/react-bootstrap,westonplatter/react-bootstrap,insionng/react-bootstrap,pombredanne/react-bootstrap,Sipree/react-b...
src/OverlayMixin.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst renderer = require('../renderer')\n\ndescribe ('Renderer', () => {\n var loadContentCallback\n\n beforeEach(() => {\n loadContentCallback = jasmine.createSpy('loadContentCallback')\n })\n\n it('converts a markdown file', (d...
javascript
edit
0
1
unlicense
d0821163a059c3a02e7551790346fc56a536a460
pfertyk/mauve,pfertyk/mauve
spec/simple.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.registerTask('sniff', ['jscs:main']);\n grunt.registerTask('lint', ['jshint', 'jscs:main', 'y_u_no_bundle']);\n grunt.registerTask('test', ['lint', 'karma:single']);\n\n grunt.registerTask(...
javascript
edit
0
1
mit
0f7e7351c9d34d1ac6866e3cb449f1a7e657926c
hzoo/grunt-behance,mrjoelkemp/grunt-behance
tasks/aliases.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular\n .module('ngSharepoint', [])\n .run(['$sp', '$spLoader', function($sp, $spLoader) {\n if ($sp.getAutoload()) {\n if ($sp.getConnectionMode() === 'JSOM') {\n $spLoader.loadScript('//ajax.as...
javascript
edit
0
5
apache-2.0
70be3f4cc8a091da46e886123c7f0f8cb43db9e0
maxjoehnk/ngSharepoint
src/modules/ngSharepoint/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport hass from '../util/home-assistant-js-instance';\n\nimport Polymer from '../polymer';\nimport nuclearObserver from '../util/bound-nuclear-behavior';\n\nrequire('./partial-base');\n\nconst {\n configGetters,\n errorLogActions,\n}...
javascript
edit
0
2
apache-2.0
f1005e94e91f5e0f0417e84409f2e66b550c0145
sdague/home-assistant-polymer,sdague/home-assistant-polymer
src/layouts/partial-dev-info.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\"jquery\"], function(jquery) {\n return {\n // Convert an array to a comma separated string.\n arrayToString: function(array) {\n var arrayString;\n jquery.each(array, function(index, arra...
javascript
edit
0
7
apache-2.0
fa0455c7ce3e2fe9155cb62baaa470dfa46a2b8a
Esri/ago-assistant,ecaldwell/ago-assistant,ecaldwell/ago-assistant,nheminger/ago-assistant,Esri/ago-assistant,nheminger/ago-assistant
src/js/portal/util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http:...
javascript
edit
0
0
bsd-3-clause
3c2cb3b502e67faccfc7d4576859a07fdf80ab94
webcomponents/polyfills,webcomponents/polyfills,webcomponents/polyfills
src/native-methods.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Compiles CoffeeScript source to JavaScript.\n//\n// input - string containing contents of the file\n// filename - name of file, used to report errors\n//\n// Returns { output: <compiled JavaScript> } or { exception: <exception messag...
javascript
edit
0
2
apache-2.0
5c9ac6776f8d1986a502add7c3f21e29440d127f
apache/tapestry-5,apache/tapestry-5,apache/tapestry-5,apache/tapestry-5,apache/tapestry-5
tapestry-webresources/src/main/resources/org/apache/tapestry5/webresources/internal/invoke-coffeescript.js
accepted
null
true