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\nexport default [\n {\n weight: 10,\n type: 'textfield',\n input: true,\n placeholder: 'Panel Title',\n label: 'Title',\n key: 'title',\n tooltip: 'The title text that appears in the header of this panel.'\n },\n ...
javascript
edit
0
0
mit
413642773139e4d18c3c07193a873f98136fbad8
formio/formio.js,formio/formio.js,formio/formio.js
src/components/panel/editForm/Panel.edit.display.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport PlayersStats from './PlayersStats'\n\ntest('should add player stat to collection', () => {\n // given\n let repository = new PlayersStats([])\n let playerStats = { id: 1, data: 'some-data' }\n\n // when\n let added = reposit...
javascript
edit
0
1
mit
c3f8a9bed2417d96a88890d43c16e2323cbea730
chagasaway/nba-players-scrapper
src/repositories/PlayersStats.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n angular\n .module('app.core')\n .run(function($rootScope, $state) {\n return $rootScope.$on('$stateChangeStart', function() {\n return $rootScope.$state = ...
javascript
edit
0
1
mit
0d50135bf62bcb3bd2e8d5a978ecb4c2f1599d1d
MAustinMMDP/web-brownie,MAustinMMDP/web-brownie
src/client/app/core/core.routes.js
rejected_duplicate
Near-duplicate of sample 95942
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createStore, applyMiddleware } from 'redux'\n\nimport rootReducer from '../reducers'\nimport thunkMiddleware from 'redux-thunk'\nimport createLogger from 'redux-logger'\n\nconst loggerMiddleware = createLogger()\n\nexport defau...
javascript
edit
0
2
mit
b02b5ddc87d50fd64808f54d026c3e5675fd9973
UCSD/campus-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/now-mobile,UCSD/now-mobile,UCSD/now-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/campus-mobile
app/store/configureStore.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst ts = require('ts-node')\n\nexports.config = {\n baseUrl: 'http://localhost:3000',\n specs: ['test-e2e/**/*.spec.ts'],\n directConnect: true,\n capabilities: {\n 'browserName': 'chrome',\n 'chromeOptions': {\n 'args'...
javascript
edit
0
1
mit
b06754b77fa01e847b959f823fe9d19c44b1aaa4
jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr
ui/protractor.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function ( $ ) {\n\n $.fn.onFocusLeave = function(cb) {\n\n return this.each(function() {\n\n var $this = $(this),\n timeout;\n\n $(this).on('focusout', function(e) {\n time...
javascript
edit
0
1
mit
80b744b2af3964abf6d1c26991bebd4070cbc19d
ianmcburnie/jquery-focusexit-js
jquery.focusleave.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfoam.CLASS({\n package: 'foam.apploader',\n name: 'ModelRefines',\n refines: 'foam.core.Model',\n methods: [\n {\n name: 'getClassDeps',\n code: function() {\n var deps = this.requires ?\n this.require...
javascript
edit
0
2
apache-2.0
90423ebf435d8c3dbb66af12729ad9d2a0475a0c
jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2
src/foam/apploader/ModelRefines.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmodule.exports = {\n factcheck: (message, _, msg) => {\n const bool1 = (Math.random() > 0.5);\n const bool2 = (Math.random() > 0.5);\n let str;\n\n if (msg) {\n str = `${message.author}'s clai...
javascript
edit
0
3
mit
3c48a5d5af10d9b9d6a13fcde859b1d7d91f70e5
Rafer45/soup
commands/randomness_commands.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar expect = require('chai').expect;\n\ndescribe('let', function() {\n it('variables declared with let are accessible within nested blocks', function() {\n 'use strict';\n let foo = 'bar';\n\n if (true) {\n expect(foo).to...
javascript
edit
0
2
mit
6489f67e37a39828a2553c0913c4f1ee5b201835
chrisneave/es2015-demo
test/let_tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n/* eslint-disable indent */\n\nmodule.exports = function(tx) {\n var body = tx.get('body');\n\n tx.create({\n id: 'title',\n type: 'heading',\n level: 1,\n content: 'Input Element'\n });\n body.show('title...
javascript
edit
0
1
mit
d4aea530dd9588dd23cfb0a914be138626a4bd43
philschatz/substance-editor,substance/examples,substance/examples,philschatz/substance-editor,substance/demos,substance/demos
input/fixture.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from './template';\n\nexport default Ember.Component.extend({\n layout: layout,\n tagName: 'i',\n classNames: ['fa'],\n classNameBindings: ['nameComputed'],\n\n // Constructors\n classPref...
javascript
edit
0
1
mit
4c2fefb8422f93ef861fe171bcc73273de577153
revelation/ember-cli-revelation-ui,revelation/ember-cli-revelation-ui
addon/pods/components/rui-icon/component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif (!shiv) {\n throw(new Error(\"Don't load this file directly! Use shiv.load()\"));\n}\n\nshiv.test(\n \"shiv.map\",\n function() {\n return shiv.map([1,2,3], function(x) { return x * 2; });\n },\n function(res) {\n return (...
javascript
edit
0
3
mit
d9a3ed959f61ddf0af6a393305486cfd02ac988d
michiel/shivjs
js/shiv-test-util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// import { take, call, put, select } from 'redux-saga/effects';\nimport { REQUEST_TOPICS } from './constants';\nimport { takeLatest } from 'redux-saga';\nimport { call } from 'redux-saga/effects';\n\nexport function fetchTopicsFromServ...
javascript
edit
0
2
mit
f5ae5d64c43915af9e2da0ab1f1c08c94b7249e1
GeertHuls/react-async-saga-example,GeertHuls/react-async-saga-example
app/containers/NavigationContainer/sagas.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst logger = require('./logger');\n\nmodule.exports = (\n userService,\n themeService,\n clientService\n) => {\n return (templateName, getView, postHandler) => async (request, reply, source, error) => {\n if (error && error.out...
javascript
edit
0
8
mit
e033432500d70b2a0ea04fd0548a665d6ec4bf2f
synapsestudios/oidc-platform,synapsestudios/oidc-platform,synapsestudios/oidc-platform,synapsestudios/oidc-platform
api/src/lib/form-handler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { assert } from 'chai';\nimport getPetionSupportable from 'selectors/petitionSupportable';\n\ndescribe('getPetionSupportable', () => {\n context('with a new petition', () => {\n const actual = getPetionSupportable({});\n c...
javascript
edit
0
1
apache-2.0
85ad5225fc04a59340e9abb25272ebe906bf8c01
iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend
test/selectors/petitionSupportable.js
rejected_duplicate
Near-duplicate of sample 91026
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as types from './types';\n\nexport function updateField(key, value) {\n return {\n type: types.SETTING_UPDATE,\n payload: {\n key,\n value,\n },\n };\n}\n\n```\n\nApply this change: Add actions for handling...
javascript
edit
0
1
mit
33b118bba40c4cd86e6bef67d375422e9bb02490
reblws/tab-search,reblws/tab-search
src/actions/settings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('native-promise-only');\nvar axios = require('axios');\n\nvar Axios = function(settings) {\n return new Promise(function(resolve, reject) {\n var options = {\n method: settings.type.toLowerCase(),\n url: settings.u...
javascript
edit
0
4
mit
8c69a9c5faf7d8a6238be02fca5b026e33dede48
hoppula/vertebrae,hoppula/vertebrae
adapters/axios.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar deepForceUpdate = require('./deepForceUpdate');\n\nvar isRequestPending = false;\n\nmodule.exports = function requestForceUpdateAll(getRootInstances, React) {\n if (isRequestPending) {\n return;\n }\n\n /**\n * Forces deep r...
javascript
edit
0
4
mit
469dc586285709a67cd2b1ebc0470df9baba5a90
gaearon/react-hot-loader,gaearon/react-hot-loader
packages/react-proxy/modules/requestForceUpdateAll.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { module, test } from 'qunit';\nimport { setupRenderingTest } from 'ember-qunit';\nimport { render } from '@ember/test-helpers';\nimport hbs from 'htmlbars-inline-precompile';\n\nmodule('Integration | Component | froala-content',...
javascript
edit
0
1
mit
d87500c1aadbfb56a059a8855c79448a11ed9d99
Panman8201/ember-froala-editor,froala/ember-froala-editor,froala/ember-froala-editor,Panman8201/ember-froala-editor
tests/integration/components/froala-content-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('<%=angularAppName%>')\n .directive('jhSocial', function($translatePartialLoader, $translate, $filter, SocialService) {\n return {\n restrict: 'E',\n scope: {\n ...
javascript
edit
null
null
apache-2.0
4e1b78d76157761c251ecdf10cf6126ea03479e5
yongli82/generator-jhipster,rkohel/generator-jhipster,dimeros/generator-jhipster,danielpetisme/generator-jhipster,Tcharl/generator-jhipster,Tcharl/generator-jhipster,maniacneron/generator-jhipster,sendilkumarn/generator-jhipster,erikkemperman/generator-jhipster,atomfrede/generator-jhipster,ziogiugno/generator-jhipster,...
app/templates/src/main/webapp/scripts/app/account/social/directive/_social.directive.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 Task = require('../Task'),\n gulp = require('gulp'),\n mocha = require('gulp-mocha'),\n fs = require('fs');\n\nclass DocTask extends Task {\n\n constructor(buildManager) {\n super(buildManager...
javascript
edit
0
2
mit
231c2560393d2766e924fed02b4a2268aa6e1dc7
mtfranchetto/smild,mtfranchetto/smild,mtfranchetto/smild
lib/tasks/extra/DocTask.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global malarkey:false, toastr:false, moment:false */\nimport config from './index.config';\n\nimport routerConfig from './index.route';\n\nimport runBlock from './index.run';\nimport MainController from './main/main.controller';\nimp...
javascript
edit
0
1
mit
82c9a371707bd8d85b1f6ebf0004bdfccde4f231
tekerson/ng-bookmarks,tekerson/ng-bookmarks
src/app/index.module.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ProjectConfigurationRepository from '../domain/project-configuration-repository'\n\nimport fs from 'fs'\n\nconst repository = new ProjectConfigurationRepository()\n\n/**\n * @param {string} path The path to todo.conf.yml\n */\nex...
javascript
edit
0
3
mit
dc90ee7975d4210e4818d3818e97fe019886c81f
kt3k/view-todo,kt3k/view-todo
src/app/get-projects.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Module for interacting with zoltar\n\nconst rp = require('request-promise-native')\nconst buildUrl = require('build-url')\n\nasync function get (url) {\n return rp(url, { json: true })\n}\n\nasync function gets (url) {\n return rp(...
javascript
edit
0
7
mit
76813e0e74d12a2ec47830b811fd143f0f1a6781
reichlab/flusight,reichlab/flusight,reichlab/flusight
zoltar/zoltar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(){\n\n'use strict';\n\nangular.module('secondLead.common')\n .factory('Auth', ['$http', 'store', function($http, store) {\n\treturn {\n\t isAuthenticated: function() {\n\t return store.get('jwt');\n\t },\n\n\t login: fu...
javascript
edit
0
1
mit
c3888cc45823cb0bb5112b8e20eaacbf7ff58d7b
ac-adekunle/secondlead,ac-adekunle/secondlead,ac-adekunle/secondlead
app/assets/javascripts/angular/common/services/auth-service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular.module('app.states')\n .run(appRun);\n\n /** @ngInject */\n function appRun(routerHelper) {\n routerHelper.configureStates(getStates());\n }\n\n function getStates() {\n return {\...
javascript
edit
0
1
apache-2.0
9c1679acb901b50436faae810bb158f601212467
ManageIQ/manageiq,lpichler/manageiq,jameswnl/manageiq,skateman/manageiq,skateman/manageiq,syncrou/manageiq,mfeifer/manageiq,durandom/manageiq,agrare/manageiq,gerikis/manageiq,d-m-u/manageiq,NickLaMuro/manageiq,branic/manageiq,KevinLoiseau/manageiq,NaNi-Z/manageiq,andyvesel/manageiq,fbladilo/manageiq,andyvesel/manageiq,...
spa_ui/self_service/client/app/states/marketplace/details/details.state.js
rejected_duplicate
Near-duplicate of sample 78570
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass MockPromise {\n constructor(returnSuccess, result) {\n this.returnSuccess = returnSuccess;\n this.result = result || (returnSuccess ? 'my data': 'my error')\n }\n\n then(success, failure) {\n if (t...
javascript
edit
0
3
mit
ce58e8eb67d354f624a4965e965fdf0c047433bf
JonPSmith/AspNetReactSamples,JonPSmith/AspNetReactSamples,JonPSmith/AspNetReactSamples
ReactTests/mocks/MockPromise.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction scrollToBottom() {\n var $messages = $('#messages');\n\n if ($messages.length > 0) {\n $messages.scrollTop($messages[0].scrollHeight);\n }\n}\n\n$(document).ready(scrollToBottom);\n\n```\n\nApply this change: Fix scrollTo...
javascript
edit
0
2
mit
fa025070c1eeb7e751b4b7210cce4e088781e2bc
JulianNicholls/BuffetCar-5,JulianNicholls/BuffetCar-5,JulianNicholls/BuffetCar-5
app/assets/javascripts/messages.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.ContactManager = {\n Models: {},\n Collections: {},\n Views: {},\n\n start: function(data) {\n var contacts = new ContactManager.Collections.Contacts(data.contacts),\n router = new ContactManager.Router();\n\n ro...
javascript
edit
0
2
mit
0159ff31725252f1a04451c297258e17872a4a01
giastfader/backbone-contact-manager,EaswarRaju/angular-contact-manager,SomilKumar/backbone-contact-manager,vinnu-313/backbone-contact-manager,dmytroyarmak/backbone-contact-manager,SomilKumar/backbone-contact-manager,hrundik/angular-contact-manager,hrundik/angular-contact-manager,giastfader/backbone-contact-manager,hrun...
app/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction adjustStyle() {\n var width = 0;\n // get the width.. more cross-browser issues\n if (window.innerHeight) {\n width = window.innerWidth;\n } else if (document.documentElement && document.documentElement.clien...
javascript
edit
0
6
mit
4deeb7ddc71647bafc1f932e6590d9b58e6b7af3
SHoar/lynda_essentialJStraining
Resize/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// State\nimport { getters, state } from './../../store/index.js';\nimport getActiveToolsForElement from './../../store/getActiveToolsForElement.js';\nimport addNewMeasurement from './addNewMeasurement.js';\nimport baseAnnotationTool fr...
javascript
edit
0
5
mit
f4679665a92b2a34277179615aabd02f2be1db22
cornerstonejs/cornerstoneTools,cornerstonejs/cornerstoneTools,chafey/cornerstoneTools,cornerstonejs/cornerstoneTools
src/eventDispatchers/touchEventHandlers/touchStartActive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"About Promises\", function () {\n\n describe(\"Asynchronous Flow\", function () {\n\n it(\"should understand promise usage\", function () {\n\n function isZero(number) {\n return new Promise(function(resolve, ...
javascript
edit
0
1
mit
43d771162f5993035a231857d02e97d94e74c3a6
tawashley/es6-javascript-koans,tawashley/es6-javascript-koans,tawashley/es6-javascript-koans
koans/AboutPromises.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport config from '../config'\nimport server from '../server/main'\nimport _debug from 'debug'\n\nconst debug = _debug('app:bin:server')\nconst port = config.server_port\nconst host = config.server_host\n\nserver.listen(port)\ndebug(`S...
javascript
edit
0
0
mit
974405ece1e52023ee05c962bb6dc9991e248e58
tonyxiao/segment-debugger,jaronoff97/listmkr,tonyxiao/segment-debugger,pptang/ggm,JohanGustafsson91/React-JWT-Authentication-Redux-Router,VladGne/Practice2017,Vaishali512/mysampleapp,okmttdhr/aupa,chozandrias76/responsive-sesame-test,gohup/react_testcase,GreGGus/MIMApp,EngineerMostafa/CircleCI,flftfqwxf/react-redux-sta...
bin/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function() {\n\n return function(resource) {\n var dv = new DataView(resource.data.buffer, resource.data.byteOffset, resource.data.byteLength);\n var entryCount = dv.getInt16(6, false) + 1;\n if (entryCount < 0) {\n ...
javascript
edit
null
null
mit
c78de429e9f6c4d6ecf32ff0cc768a8ef8d0e917
radishengine/drowsy,radishengine/drowsy
mac/resources/open_wctb.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar\n fs = require('fs'),\n Builder = require('component-builder'),\n rimraf = require('rimraf'),\n config = require('../config'),\n utils = require('./utils'),\n component = require('./component'),\n opt...
javascript
edit
0
4
mit
afcb675b6681611867be57c523a58b0ba4d831b4
web-audio-components/web-audio-components-service
lib/componentHelper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function() {\n \"use strict\";\n\n // In development, we concatenate jQuery to the app.js build\n // so that it is exposed as a global for Drupal scripts (rather\n // than loading it normally.)\n\n return jQuery;\n});\n\n```...
javascript
edit
0
1
mit
95b588e256df806c6353bd130c2f8340a9893cae
mshmsh5000/dosomething,sbsmith86/dosomething,angaither/dosomething,mshmsh5000/dosomething-1,sbsmith86/dosomething,DoSomething/phoenix,mshmsh5000/dosomething-1,chloealee/dosomething,angaither/dosomething,angaither/dosomething,sergii-tkachenko/phoenix,angaither/dosomething,mshmsh5000/dosomething-1,deadlybutter/phoenix,jo...
lib/themes/dosomething/paraneue_dosomething/js/jquery.dev.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { TANK_RADIUS } from '../../simulation/constants';\n\nclass TankBody extends React.Component {\n\n constructor(props) {\n super(props);\n this.radius = props.radius || TANK_RADIUS;\n this.mat...
javascript
edit
0
4
mit
d4bc885cc31cf92aafd4fef846a015c58a7e5cbe
ourvrisrealerthanyours/tanks,elliotaplant/tanks,ourvrisrealerthanyours/tanks,elliotaplant/tanks
client/reactComponents/TankBody.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* \n * Copyright 2016 Space Dynamics Laboratory - Utah State University Research Foundation.\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....
javascript
edit
0
1
apache-2.0
a5820158db8a23a61776a545e9e3f416b3568dd2
jbottel/openstorefront,jbottel/openstorefront,jbottel/openstorefront,jbottel/openstorefront
server/openstorefront/openstorefront-web/src/main/webapp/client/scripts/component/savedSearchLinkInsertWindow.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function (grunt) {\n grunt.registerTask('release', 'Create and tag a release',\n function () {\n grunt.task.run(['checkbranch:master', 'compile', 'bump']);\n }\n );\n};\n\...
javascript
edit
0
2
mit
820dc2d669d10d1fe125b4581ed5db9e4249b551
elmarquez/threejs-cad,elmarquez/threejs-cad
conf/grunt/grunt-release.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Component from '@ember/component';\nimport layout from '../templates/components/cs-active-composition-panel';\nimport { task, timeout } from 'ember-concurrency';\nimport scrollToBounds from '../scroll-to-bounds';\nimport { inject...
javascript
edit
0
2
mit
37a1762d76945cca5a0bf184fc42ef9ed6dba0f7
cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack
packages/tools/addon/components/cs-active-composition-panel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert');\n\nvar assertCalled = module.exports = function (cb) {\n var index = assertCalled.wanted.push({ callback: cb, error: new Error() });\n return function () {\n wanted.splice(index - 1, 1);\n cb.appl...
javascript
edit
0
3
mit
e08a21c9a4e067e692dd35e82ffde8608b3f3044
mmalecki/assert-called
lib/assert-called.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createStyleSheet } from '../../styles';\n\n/**\n * The style of the avatar and participant view UI (components).\n */\nexport const styles = createStyleSheet({\n /**\n * Avatar style.\n */\n avatar: {\n fle...
javascript
edit
0
0
apache-2.0
739298c7826ea6109b8a2632d54c8d867f7d03cc
jitsi/jitsi-meet,bgrozev/jitsi-meet,gpolitis/jitsi-meet,jitsi/jitsi-meet,bgrozev/jitsi-meet,jitsi/jitsi-meet,bgrozev/jitsi-meet,bgrozev/jitsi-meet,bgrozev/jitsi-meet,jitsi/jitsi-meet,bgrozev/jitsi-meet,gpolitis/jitsi-meet,jitsi/jitsi-meet,jitsi/jitsi-meet,jitsi/jitsi-meet,gpolitis/jitsi-meet,gpolitis/jitsi-meet,gpoliti...
react/features/base/participants/components/styles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.run = async function(payload) {\n const claimEnabled = this.cfg.issues.commands.assign.claim.aliases.length;\n\n if (payload.action !== \"added\" || !claimEnabled) return;\n\n const newMember = payload.member.login;\n const ...
javascript
edit
0
6
apache-2.0
d15d9e09ec0b338d52d6db33ae91b4b96d6190df
synicalsyntax/zulipbot
src/events/memberAdd.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n all: {\n files: [\n { expand: true, src: ['config.json'], dest: 'dist' },\n { expand: true, src: ['javascript.json'], dest: 'dist' },\n { expand: true, cwd: 'src/config/', ...
javascript
edit
0
0
apache-2.0
d61d559936d5a7168e86e928a024cabd53abea60
junbon/binary-static-www2,einhverfr/binary-static,massihx/binary-static,einhverfr/binary-static,borisyankov/binary-static,massihx/binary-static,animeshsaxena/binary-static,borisyankov/binary-static,brodiecapel16/binary-static,borisyankov/binary-static,einhverfr/binary-static,massihx/binary-static,animeshsaxena/binary-s...
build/copy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nexport const raw = (strings, ...values) => {\n return strings[0].replace(/^[ \\t\\r]+/gm, \"\");\n};\n\n```\n\nApply this change: :memo: Add TODO about moving string helper to underscore-plus" }, { "role": "assi...
javascript
edit
0
1
mit
31925ae17346c45902d2762cd91dcd2d1d52bfeb
atom/toggle-quotes
lib/string-helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path'),\n fs = require('fs'),\n log4js = require('log4js');\n\nvar config = {\n DNODE_PORT: 0xC5EA,\n SEARCH_REPO: path.join(__dirname, \"../../linux\"),\n SEARCH_REF: \"v3.0\",\n SEARCH_ARGS: [],\n ...
javascript
edit
0
1
bsd-2-clause
bf37fb0886485102fe832c67909aae07ae6daaf8
wfxiang08/livegrep,lekkas/livegrep,lekkas/livegrep,lekkas/livegrep,paulproteus/livegrep,paulproteus/livegrep,lekkas/livegrep,paulproteus/livegrep,wfxiang08/livegrep,wfxiang08/livegrep,wfxiang08/livegrep,paulproteus/livegrep,wfxiang08/livegrep,paulproteus/livegrep,paulproteus/livegrep,lekkas/livegrep,wfxiang08/livegrep,...
web/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.config = {\n sauceUser: process.env.SAUCE_USERNAME,\n sauceKey: process.env.SAUCE_ACCESS_KEY,\n\n capabilities: {\n 'browserName': 'chrome',\n 'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,\n 'build': process.en...
javascript
edit
0
0
bsd-3-clause
949d26db4397a375e2587a68ea66f099fbe4f3ba
CodeForBrazil/streetmix,codeforamerica/streetmix,macGRID-SRN/streetmix,kodujdlapolski/streetmix,magul/streetmix,kodujdlapolski/streetmix,magul/streetmix,kodujdlapolski/streetmix,CodeForBrazil/streetmix,codeforamerica/streetmix,CodeForBrazil/streetmix,macGRID-SRN/streetmix,magul/streetmix,macGRID-SRN/streetmix,codeforam...
test/integration/saucelabs.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable global-require */\nrequire('@webcomponents/template');\n\nif (!window.customElements) require('@webcomponents/custom-elements');\nif (!document.body.attachShadow) require('@webcomponents/shadydom');\n\nrequire('@webcom...
javascript
edit
0
0
mit
32fbe3dc4686e413886911f5d373137648f08614
hybridsjs/hybrids
packages/shim/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('organization-menu', 'Integration | Component | organization menu', {\n integration: true\n});\n\ntest('it ren...
javascript
edit
0
1
mit
5c714a27bbfb28922771db47a249efbd24dfae31
jderr-mx/code-corps-ember,code-corps/code-corps-ember,jderr-mx/code-corps-ember,eablack/code-corps-ember,eablack/code-corps-ember,code-corps/code-corps-ember
tests/integration/components/organization-menu-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('chai').assert;\nvar nodemock = require('nodemock');\n\nvar utils = require('./test-utils');\n\nvar express = require('express');\nvar socketAdaptor = require('../lib/socket-adaptor');\nvar Connection = require('../...
javascript
edit
0
2
mit
5bab1d44e4d2667a0997bd72002a22385aeae8fd
droonga/express-droonga,droonga/express-droonga,KitaitiMakoto/express-droonga,KitaitiMakoto/express-droonga
test/socket-api.test.js
rejected_duplicate
Near-duplicate of sample 89883
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['events/lib/emitter'],\nfunction(Emitter) {\n\n describe(\"Emitter\", function() {\n \n it('should alias addListener to on', function() {\n expect(Emitter.prototype.addListener).to.be.equal(Emitter.prototype.on);\n ...
javascript
edit
0
1
mit
4643995ca77ef4ed695d337da9fc36fdf7918749
anchorjs/events,anchorjs/events
test/events.emitter.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n\n \"use strict\"\n\n window.GOVUK = window.GOVUK || {};\n\n window.GOVUK.Transactions = {\n trackStartPageTabs : function (e) {\n var pagePath = e.target.href;\n GOVUK.analytics.trackEvent('startpages', ...
javascript
edit
0
2
mit
cd810325efa67beac2cd339cd0bb5beeced14ec1
alphagov/frontend,alphagov/frontend,alphagov/frontend,alphagov/frontend
app/assets/javascripts/transactions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// refactoring from https://github.com/leonid-shevtsov/cacheable-flash-jquery\nvar Flash = new Object();\n\nFlash.data = {};\n\nFlash.transferFromCookies = function() {\n var data = JSON.parse(unescape($.cookie(\"flash\")));\n if(!dat...
javascript
edit
0
4
mit
7bad2ae5ca65ef0572fa90ce46f6a20964b6e8ff
khoan/cacheable-flash,nickurban/cacheable-flash,ndreckshage/cacheable-flash,efigence/cacheable-flash,ekampp/cacheable-flash,pivotal/cacheable-flash,nickurban/cacheable-flash,ekampp/cacheable-flash,pedrocarrico/cacheable-flash,wandenberg/cacheable-flash,pivotal/cacheable-flash,pboling/cacheable-flash,khoan/cacheable-fla...
vendor/assets/javascripts/flash.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst config = require('../../../knexfile').web\nconst knex = require('knex')(config)\nmodule.exports = function (id, type) {\n var table = 'team_caseload_overview'\n var whereObject = {}\n if (id !== undefined) {\n whereObject.id...
javascript
edit
0
2
mit
32c16f42c6198803de75354cf29538c89ea060a1
ministryofjustice/wmt-web,ministryofjustice/wmt-web
app/services/data/get-team-caseload.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar log = require('./logger').log;\nvar process = require('process');\n\nvar options = require('./options-handler').options;\n\nexports.init = function(callback) {\n mongoose.connect(options['databa...
javascript
edit
0
1
mit
c78dbbec9ad549b8a850abce62f3a4757540eae8
MisterTea/TidalWave,MisterTea/TidalWave,MisterTea/TidalWave,MisterTea/TidalWave,MisterTea/TidalWave,MisterTea/TidalWave
server/mongoose-handler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mercury = require(\"mercury\")\n\nvar frameList = require(\"./views/frame-list\")\nvar frameEditor = require(\"./views/frame-editor\")\nvar frameData = require(\"./data/frames\")\n\n// Load the data\nvar initialFrameData = frameData...
javascript
edit
0
1
mit
20905777baa711def48620d16507222b9ef50761
Raynos/mercury,eriser/mercury,staltz/mercury,staltz/mercury,eightyeight/mercury,beni55/mercury,mpal9000/mercury,jxson/mercury,vlad-x/mercury,martintietz/mercury,tommymessbauer/mercury
concepts/frame-list/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconsole.log(\"Hello Console!\");\nhost = window.location.host.split(\":\")[0];\nconsole.log(host);\nvar conn;\n$(document).ready(function () {\n conn = new WebSocket(\"ws://\"+host+\":8888/ws\");\n conn.onclose = function(evt) {\n...
javascript
edit
0
1
mit
3c4d2080e1602fbeafcfbc71befbb591a186b2b1
quintenpalmer/attempt,quintenpalmer/attempt,quintenpalmer/attempt,quintenpalmer/attempt
webserver/static/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {Readable} from \"stream\"\n\nimport File from \"lib/File\"\nimport getFieldPath from \"lib/util/getFieldPath\"\n\nconst onFile = (options, cb) => (fieldname, stream, filename, enc, mime) => {\n try {\n const path = getFieldP...
javascript
edit
0
2
mit
e9b97e39609d9b592e8c8af0cc00e036d6326cc1
octet-stream/then-busboy,octet-stream/then-busboy
src/lib/listener/onFile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default [\n {\n day: 20,\n month: 7,\n year: 2017,\n date: '20 Julho 2017',\n location: 'Fundação Calouste Gulbenkian, Lisboa',\n name: 'Concerto pela Orquestra Gulbenkian, Dia do Fundador',\n description:'A...
javascript
edit
0
0
mit
5d9441a2eabc8206c3fcca0728bd218d40ed1e0f
joaojusto/jose-gomes-landing-page
Data/Events.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('canvas-block-filter',\n 'Integration | Component | canvas block filter', {\n integration: t...
javascript
edit
0
1
apache-2.0
43f89d6a8a19f87d57ee74b30b7f0e664a958a2f
usecanvas/web-v2,usecanvas/web-v2,usecanvas/web-v2
tests/integration/components/canvas-block-filter/component-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Event tracker (analytics)\n */\n\nvar module = angular.module('tracker', []);\n\nmodule.factory('rpTracker', ['$rootScope', function ($scope) {\n var track = function (event,properties) {\n if (Options.mixpanel && Options.mi...
javascript
edit
0
4
isc
9552b9842af3f5335cdcca132e37fbde591c41a4
Madsn/ripple-client,arturomc/ripple-client,darkdarkdragon/ripple-client-desktop,darkdarkdragon/ripple-client,xdv/ripple-client,mrajvanshy/ripple-client-desktop,h0vhannes/ripple-client,xdv/ripple-client,yongsoo/ripple-client-desktop,darkdarkdragon/ripple-client-desktop,mrajvanshy/ripple-client,h0vhannes/ripple-client,wa...
src/js/services/tracker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nminerva.views.JobsPanel = minerva.View.extend({\n\n initialize: function () {\n var columnEnum = girder.views.jobs_JobListWidget.prototype.columnEnum;\n var columns = columnEnum.COLUMN_STATUS_ICON |\n ...
javascript
edit
0
1
apache-2.0
e902c3b71a0ff79ebcb2424098197604d40ed21b
Kitware/minerva,Kitware/minerva,Kitware/minerva
web_external/js/views/body/JobsPanel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from '../templates/components/page-pagination';\n\nexport default Ember.Component.extend({\n layout: layout,\n keys: ['first', 'prev', 'next', 'last'],\n sortedLinks: Ember.computed('keys', '...
javascript
edit
0
3
mit
fb73e6394654a38439387994556680215a93c0b3
mu-semtech/ember-data-table,erikap/ember-data-table,erikap/ember-data-table,mu-semtech/ember-data-table
addon/components/page-pagination.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n// Takes a mockOnStreamAvailable function which when given a webrtcstream returns a new stream\n// to replace it with.\nmodule.exports = function mockGetUserMedia(mockOnStreamAvailable) {\n let oldGetUserMedia;\n if (navigator.getUs...
javascript
edit
0
8
mit
ff552ff6677bbc93ab7a750184dfd79109c1a837
aullman/opentok-camera-filters,aullman/opentok-camera-filters
src/mock-get-user-media.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Linux machines should use Docker's default gateway IP address to connect to.\nlet hostname = '172.17.0.2';\n\n// On MacOS and Windows, `host.docker.internal` is available to point to the\n// host and run backstopjs against.\n\n// If ...
javascript
edit
0
1
apache-2.0
2ecfcc3c05a3bdda467113b00748c32b3fb4db25
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
tests/backstop/detect-target-host.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n$(function() {\n\n var grappelli = !!$('#bookmarks');\n var parentSelector = grappelli ? 'div.items' : 'tbody';\n\n // Hide the exta inlines.\n $(parentSelector + ' > *:not(.has_original)').hide();\n // Re-show inlines ...
javascript
edit
0
5
bsd-2-clause
3a5424c8966c899461191654e8b1de3e99dd2914
dustinrb/mezzanine,tuxinhang1989/mezzanine,ZeroXn/mezzanine,scarcry/snm-mezzanine,nikolas/mezzanine,biomassives/mezzanine,gradel/mezzanine,adrian-the-git/mezzanine,damnfine/mezzanine,wbtuomela/mezzanine,guibernardino/mezzanine,wbtuomela/mezzanine,Cicero-Zhao/mezzanine,molokov/mezzanine,PegasusWang/mezzanine,cccs-web/me...
mezzanine/core/media/js/collapse_inline.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('ncsaas')\n .constant('MODE', {\n modeName: 'modePortal',\n toBeFeatures: [\n 'localSignup',\n 'localSignin',\n 'team',\n 'monitoring',\n 'backups',\n 'templates',\n ...
javascript
edit
0
0
mit
fac9a134cafcecd5b2ef52d4c1a99123f9df0ff9
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
app/scripts/configs/modes/portal.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n\nvar Common = module.exports = {};\n\n\n// iterates through all object keys-value pairs calling iterator on each one\n// example: $$.each(objOrArr, function (val, key) { /* ... */ });\nCommon.each = function each(obj, ...
javascript
edit
0
6
mit
94d2f1a72a525e0a36cd247b299150a87445d2e4
nodeca/pointer
lib/nrouter/common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function(){\n var yourSound = new Audio('notification.ogg');\n yourSound.loop = true;\n $('.start button').click(function(ev){\n $('.start').toggleClass('hidden');\n $(\".example\").TimeCircles({\n \"...
javascript
edit
0
2
mit
c6578b2bb3652c65bcc5b0342efefde11aad034e
dplesca/getup
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// Toogle asset images - zome in and out\n$(function() {\n\n var Snackbar = window.Snackbar;\n Snackbar.init();\n\n var AssetPage = window.AssetPage;\n AssetPage.init();\n\n // We only want zooming on asset's prima...
javascript
edit
0
2
mit
32383c5d18a74120da107a708abfee60a601bb27
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder
app/scripts/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n'use strict';\n\nconst fs = require('fs');\nconst minimist = require('minimist');\nconst pkg = require('./package.json');\nconst oust = require('.');\n\nconst argv = minimist(process.argv.slice(2));\n\nfunction pr...
javascript
edit
0
2
apache-2.0
e7ed223545ffa3fea6d996eb2920908275a69cc9
addyosmani/oust,addyosmani/oust
cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar exec = require('child_process').exec;\nvar temp = require('temp');\nvar fs = fs = require('fs');\nvar log = require('./logger');\n\nexports.head = function (path, callback) {\n\texec('git --git-dir=' + path + \".git log -1 --prett...
javascript
edit
0
2
mit
421230533c619e98a5dca0ce8374b176bdc10663
finik/bombastic,finik/bombastic,finik/bombastic
git.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction minifyJson(data) {\n return JSON.stringify(JSON.parse(data));\n}\n\nexport function minifyJsonFile(readFileFn, fileName) {\n return minifyJson(readFileFn(fileName));\n}\n```\n\nApply this change: Refactor it out into a class....
javascript
edit
0
1
mit
88305e481396644d88a08605ba786bd1dce35af6
cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki
src/scripts/json-minify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env browser */\n\nconst fs = window.require('fs');\n\nconst fetchInitialState = () => {\n const data = fs.readFileSync('.config/db', 'utf-8');\n if (data) {\n return JSON.parse(data);\n }\n return {};\n};\nconst update ...
javascript
edit
0
2
mit
084a1d1d7139d96540648a9938749a9d36d2efa4
mkermani144/wanna,mkermani144/wanna
desktop/src/lib/database.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nimport childProcess from 'child_process';\nimport fs from 'fs-extra';\nimport moment from 'moment';\n\nconst today = new Date();\nconst path = `pages/posts/${moment(today).format('YYYY-MM-DD')}.md`;\n\n/**\n * Set W...
javascript
edit
0
2
mit
f5128b1e6c2581a5a1b33977914a23195ac4ad3d
ideyuta/sofar
scripts/entry.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar faker = require('faker');\nvar _ = require('lodash');\n\n/**\n * Generate a list of random users.\n * @return {Array<{\n * name: string,\n * email: string,\n * phone: string\n * }>}\n */\nvar getUsers = function() {\n return ...
javascript
edit
0
1
mit
00c45bc2e33b6c1236d87c6572cfee3610410bb5
andresdominguez/protractor-codelab,andresdominguez/protractor-codelab
server/fake-users.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar db = require('../../models');\nvar config = require('../../config.js');\nvar authHelper = require('../../lib/auth-helper');\n\nmodule.exports = function (app, options) {\n app.get('/user/tokens', auth...
javascript
edit
0
2
bsd-3-clause
ba5f567a44a5d7325f894c42e48f696f6925907b
ebu/cpa-auth-provider
routes/user/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"env\": {\n \"browser\": true,\n \"commonjs\": true,\n \"es6\": true\n },\n \"extends\": \"eslint:recommended\",\n \"installedESLint\": true,\n \"parserOptions\": {\n \"ec...
javascript
edit
0
0
bsd-3-clause
85a1333dbd1382da6176352f35481e245c846a8e
rlorenzo/tmlpstats,rlorenzo/tmlpstats,rlorenzo/tmlpstats,rlorenzo/tmlpstats,tmlpstats/tmlpstats,tmlpstats/tmlpstats,tmlpstats/tmlpstats,rlorenzo/tmlpstats,tmlpstats/tmlpstats
src/.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction TcpReader(callback) {\n this.callback = callback;\n this.buffer = \"\";\n};\n\nTcpReader.prototype.read = function(data) {\n this.buffer = this.buffer.concat(data);\n size = this.payloadSize( this.buffer );\n while ( size ...
javascript
edit
0
3
bsd-3-clause
55d69b6528833130d4f1e0118368b9a5ed9f587a
noam-io/lemma-javascript,noam-io/lemma-javascript
src/TcpReader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction ddg_spice_google_plus (api_result) {\n \"use strict\";\n\n if(!api_result || !api_result.items || api_result.items.length === 0) {\n return Spice.failed(\"googleplus\");\n }\n\n Spice.add({\n id: 'goog...
javascript
edit
0
5
apache-2.0
03d9bb448c252addcd98b3a0b0317fc2884c0c31
Kr1tya3/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,stennie/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,echosa/zero...
share/spice/google_plus/google_plus.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright © 2013-2014 Esko Luontola <www.orfjackal.net>\n// This software is released under the Apache License 2.0.\n// The license text is at http://www.apache.org/licenses/LICENSE-2.0\n\n'use strict';\n\nvar SECOND = 1000;\nvar MIN...
javascript
edit
0
0
apache-2.0
80a6031cae11d28b7056ae9178e5f7d4ec9cea62
orfjackal/pa-mentor,orfjackal/pa-mentor,orfjackal/pa-mentor
server/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nimport React from 'react';\nimport { ContextualHelp } from './bootstrap/contextual_help';\n\n/**\n * Method to render a mouseover explanation for the variant title\n */\nexport function renderVariantTitleExplanation() {\n...
javascript
edit
0
1
mit
7788c984c07d81af3f819a93dac8f663f93063b8
ClinGen/clincoded,ClinGen/clincoded,ClinGen/clincoded,ClinGen/clincoded,ClinGen/clincoded
src/clincoded/static/libs/render_variant_title_explanation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ServiceURL = \"/api/\";\nangular.module('Wegas', [\n 'ui.router',\n 'wegas.service.auth',\n 'wegas.behaviours.tools',\n 'public',\n 'private'\n])\n.config(function ($stateProvider, $urlRouterProvider) {\n $statePro...
javascript
edit
0
4
mit
3a02688886a40dbb922c034811bbdf5399c06929
Heigvd/Wegas,ghiringh/Wegas,ghiringh/Wegas,Heigvd/Wegas,Heigvd/Wegas,Heigvd/Wegas,Heigvd/Wegas,ghiringh/Wegas
src/app/wegas.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Sets up the routes.\n * @param {object} app - Express app\n */\nmodule.exports.setup = function (app) {\n\n /**\n * @swagger\n * /:\n * get:\n * responses:\n * ...
javascript
edit
0
1
mit
139065ee61c1c1322879785fe546fc8374a671e2
zeornelas/jsdoc-express-with-swagger,zeornelas/jsdoc-express-with-swagger,devlouisc/jsdoc-express-with-swagger,devlouisc/jsdoc-express-with-swagger
example/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar test = require('test');\n\ntest.assert(require('dot-slash') === 10, 'main with \"./\"');\ntest.assert(require('js-ext') === 20, 'main with \".js\" extension');\ntest.assert(require('no-ext') === 30, 'main with no extension');\ntest....
javascript
edit
0
0
bsd-3-clause
9ab9b55982f39de1b9866ee9ba86e4bbd7d2050d
kriskowal/mr,kriskowal/mr
spec/main/program.js
rejected_duplicate
Near-duplicate of sample 97080
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nfunction applyProperties(text, properties) {\n // TODO: support more than 1 property\n const property = properties[0];\n return React.createElement('p', null, [\n React.createElement('span', null, tex...
javascript
edit
0
3
mit
22f07bfd0bd4c2928f6c641ccab91750b0c88f5b
OpenWebslides/OpenWebslides,OpenWebslides/OpenWebslides,OpenWebslides/OpenWebslides,OpenWebslides/OpenWebslides
client/lib/convert-to-print/convert-items/paragraphToReact.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\ndescribe('LeafletMap Ext Component', function() {\n describe('Basics', function() {\n var Map = vrs.ux.touch.LeafletMap;\n\n it('provides new mapping events', function() {\n var map = new Map();\n\n expect(...
javascript
edit
0
0
mit
371b5cffd0e20c540b01d00076ec38ccc0bda504
vrsource/vrs.ux.touch,vrsource/vrs.ux.touch,vrsource/vrs.ux.touch,vrsource/vrs.ux.touch
spec/leaflet_spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n var params = window.location.search.substring(1)\n .split( '&' )\n .reduce(function( object, param ) {\n var pair = param.split( '=' ).map( decodeURIComponent );\n object[ pair[0] ] = ...
javascript
edit
0
3
mit
92b65306960142124ca97a6816bd4ce8596714d3
razh/osc-dev
app/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar MAX = 1000;\n\nfunction Node( number ){\n this.number = 0;\n this.parent = null;\n this.left = null;\n this.right = null;\n this.depth = 0;\n\n if( number === undefined ){\n this.number = Ma...
javascript
edit
0
7
mit
ee424745693facc1e23c5896e30a25253c99adab
takecode/SampleTree
app/js/tree.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport 'bootstrap/dist/css/bootstrap.min.css';\nimport 'nvd3/build/nv.d3.min.css';\nimport 'react-select/dist/react-select.min.css';\nimport 'fixed-data-table/dist/fixed-data-table.min.css';\nimport ReactDOM from 'react-dom';\nimport Re...
javascript
edit
0
0
mit
3b9144acc0031957a1e824d15597a8605cd0be86
NuCivic/react-dashboard,NuCivic/react-dash,NuCivic/react-dashboard,NuCivic/react-dashboard,NuCivic/react-dash,NuCivic/react-dash
examples/index.js
rejected_duplicate
Near-duplicate of sample 68644
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nlet generator = require('yeoman-generator');\nlet utils = require('generator-react-webpack/utils/all');\nlet path = require('path');\n\nmodule.exports = generator.NamedBase.extend({\n\n constructor: function() {\n gen...
javascript
edit
0
3
mit
c64492441b8bcac86b1dbc29d40fcb84fb31a51a
stylesuxx/generator-react-webpack-redux,stylesuxx/generator-react-webpack-redux
generators/reducer/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default class DataProcessor {\n\n static dataToPoints(data, width, height, limit) {\n\n if (limit && limit < data.length) {\n data = data.slice(data.length - limit);\n }\n\n let max = this.max(d...
javascript
edit
0
4
mit
bc97c558b40592bbec42753baf72911f59bc8da6
timoxley/react-sparklines,codevlabs/react-sparklines,Jonekee/react-sparklines,okonet/react-sparklines,samsface/react-sparklines,goodeggs/react-sparklines,kidaa/react-sparklines,shaunstanislaus/react-sparklines,rkichenama/react-sparklines,DigitalCoder/react-sparklines,geminiyellow/react-sparklines,rkichenama/react-spark...
src/DataProcessor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['render',\n 'events',\n 'class'],\nfunction(render, Emitter, clazz) {\n \n function Application() {\n Application.super_.call(this);\n this.render = render;\n this.controller = undefined;\n }\n clazz.i...
javascript
edit
0
2
mit
3bfdcb7e7ab642d26498c7b08ec7d014a008c4a6
sailjs/application
application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n // Don't commit this file to your public repos. This config is for first-run\n exports.creds = {\n mongoose_auth_local: 'mongodb://localhost/tasklist', // Your mongo auth uri goes here\n audience: 'http://localhost:8888/', // ...
javascript
edit
0
0
apache-2.0
8287ca26fd538a3bc9ec68d0dc6cd81a3ff1cda3
AzureADSamples/WebAPI-Nodejs
node-server/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\n\nfunction createMethodWrapper(app, verb) {\n var original = app[verb];\n\n return function (route, handler) {\n var hasSentResponse = false;\n\n original.call(app, route, function ...
javascript
edit
0
2
bsd-3-clause
b948fe73af2929c0d8a8665eacdaf2de1a94637e
alexjeffburke/unexpected-couchdb
lib/createMockCouchAdapter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\n'use strict';\n\nfunction getTaskConfig(projectConfig) {\n\tvar taskConfig = {\n\t\tserver: {\n\t\t\tbaseDir: taskConfig.baseDir\n\t\t}\n\t};\n\n\treturn taskConfig;\n}\n\nmodule.exports = getTaskConfig;\n\n``...
javascript
edit
0
1
mit
4e2ac67d7fc85ec38bc9404a350fcb2126fb0511
cartridge/cartridge-local-server
_config/task.local-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass MCShowSampleComponentController {\n /*@ngInject*/\n constructor($stateParams, samplesService, toast, $mdDialog) {\n this.projectId = $stateParams.project_id;\n this.samplesService = samplesService;\n thi...
javascript
edit
0
2
mit
04a105ad84d36f040234b5d1d53d93566a17bb9b
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/src/app/global.components/mc-show-sample.component.js
rejected_duplicate
Near-duplicate of sample 86821
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nZepto(function($) {\n prettyPrint();\n\n var $frameLines = $('[id^=\"frame-line-\"]');\n var $activeLine = $('.frames-container .active');\n var $activeFrame = $('.active[id^=\"frame-code-\"]').show();\n var $container = $('.de...
javascript
edit
0
2
mit
b575a80c0bf801a2b32c35f27cb71ca5fe7a71c6
UnderDogg/whoops,emilkje/whoops,oligriffiths/whoops,emilkje/whoops,stefen/whoops,michabbb-backup/whoops,staabm/whoops,staabm/whoops,michabbb-backup/whoops,UnderDogg/whoops,Vmak11/whoops,filp/whoops,stefen/whoops,Vmak11/whoops,oligriffiths/whoops,nonconforme/whoops,nonconforme/whoops,filp/whoops
src/Whoops/Resources/js/whoops.base.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// module Web.Firebase.Authentication.Eff\n\n\nexports._onAuth = function (callback, firebase) {\n var cbEffect = function(data) {\n return cbEffect(data)(); // ensure effect gets used\n };\n return function() {\n...
javascript
edit
0
1
mit
53b5893362dfe65bb47e6824a171b9ede1c5f1da
mostalive/purescript-firebase,mostalive/purescript-firebase,mostalive/purescript-firebase
src/Web/Firebase/Authentication/Eff.js
rejected_duplicate
Near-duplicate of sample 93749
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\n\nimport './index.css';\n\nconst SearchResults = React.createClass({\n propTypes: {\n displayOptions: PropTypes.object.isRequired,\n },\n\n render() {\n const { options, selectionIndex...
javascript
edit
0
2
mit
70f438378cbadf23f176d5d8bfc1272f1e06a1ad
waagsociety/tnl-relationizer,transparantnederland/relationizer,transparantnederland/browser,transparantnederland/relationizer,transparantnederland/browser,waagsociety/tnl-relationizer
app/components/SearchResults/index.js
accepted
null
true