messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { createStore, applyMiddleware, compose } from 'redux';\nimport thunk from 'redux-thunk';\nimport { default as fseReducer } from './mainReducer';\n\nconst generateStore = (initialState) => {\n if (process.env.NODE_ENV !== 'produ... | javascript | edit | 0 | 2 | mit | 9ee703406b68bd3a328f50fa66174947069fd0af | ffont/freesound-explorer,ffont/freesound-explorer,ffont/freesound-explorer | src/store/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nconst {\n computed,\n Mixin,\n String: { htmlSafe }\n} = Ember;\n\nexport default Mixin.create({\n attributeBindings: ['touchActionStyle:style'],\n touchActionStyle: computed(function() {\n // we ap... | javascript | edit | 0 | 6 | mit | d061986d20c2e1bc34aca3c7a4373a25ff095067 | runspired/ember-hammertime,runspired/ember-hammertime | addon/mixins/touch-action.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jslint indent: 2 plusplus: true*/\n/*global $: false, togglbutton: false*/\n\n'use strict';\n\ntogglbutton.render('.task_item .content:not(.toggl)', {observe: true}, function (elem) {\n var link, descFunc, projectFunc, container = $(... | javascript | edit | 0 | 7 | bsd-3-clause | c68eae36c432d63b4f235088efa073440cd14c5b | kretel/toggl-button,zbruh/blackboard-toggl,zbruh/blackboard-toggl,topdown/toggl-button,topdown/toggl-button,cuttlesoft/toggl-button,glensc/toggl-button,andreimoldo/toggl-button,eatskolnikov/toggl-button,bitbull-team/toggl-button,glensc/toggl-button,bitbull-team/toggl-button,glensc/toggl-button,kretel/toggl-button,eatsk... | src/scripts/content/todoist.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n env: {\n 'embertest': true\n },\n\n extends: [\n 'eslint:recommended',\n 'plugin:ember-suave/recommended'\n ],\n\n globals: {\n '$': true,\n 'addOfflineUsersForElectron': true,\n 'attachCustom... | javascript | edit | 0 | 0 | mit | 1c1dc9023b5cc1c4301a1e3e8c27ed0012bb62d7 | HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend | tests/.eslintrc.js | rejected_duplicate | Near-duplicate of sample 75548 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n semi: true,\n trailingComma: 'all',\n singleQuote: true,\n printWidth: 120,\n tabWidth: 2,\n };\n \n```\n\nApply this change: Use prettier default width = 80"
},
{
"role": "assistant",... | javascript | edit | 0 | 0 | mit | 4133063b72af148a4fb4bebce9f2de8425f352ed | pzavolinsky/ts-unused-exports,pzavolinsky/ts-unused-exports,pzavolinsky/ts-unused-exports | .prettierrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet express = require('express');\nlet app = express();\nlet http = require('http').Server(app);\n\n// app.get('/', (request, response) => {\n// response.send('<h1>CarPI UI</h1>');\n// });\napp.use(express.static('assets'));\n\nhttp... | javascript | edit | 0 | 1 | mit | b7d6db39a75628bbef6320a92dd9970ec1f1ee2d | bastuijnman/carpi,bastuijnman/carpi,bastuijnman/carpi | src/js/ui/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst models = require('../models/index')\nconst insecurity = require('../lib/insecurity')\n\nmodule.exports = function updateUserProfile () {\n return (req, res, next) => {\n const loggedInUser = insecurity.authenticatedUsers.get(r... | javascript | edit | 0 | 3 | mit | 35b4524e522259acc2f4cdd76ac43b202d37df94 | bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop | routes/updateUserProfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n nodemon = require('gulp-nodemon'),\n plumber = require('gulp-plumber'),\n livereload = require('gulp-livereload'),\n stylus = require('gulp-stylus');\n\ngulp.task('stylus', function () {\n gulp.src('./... | javascript | edit | null | null | mit | 048f16bf1e3904faa6fe15b3b2ebfb57e258ae8a | Beavr/fb-chatbot-boilerplate,mstroeck/beavr-bot-boilerplate,Beavr/fb-chatbot-boilerplate,mstroeck/beavr-bot-boilerplate | gulpfile.js | rejected_code_smell | Internal duplication: ~49% of the file is inside repeated 12+ line blocks | null |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar loadManyReferenceList = require('./builder').loadMany;\nvar dispatcher = require('../dispatcher');\n\n/**\n * Focus reference action.\n * @param {array} referenceNames - An array which contains the name of all the references to load... | javascript | edit | 0 | 2 | mit | 48b1df1d76759e7246aa579369c87e19dfc0daed | Jerom138/focus,Jerom138/focus,Jerom138/focus,KleeGroup/focus-core | reference/built-in-action.js | rejected_duplicate | Near-duplicate of sample 77013 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ASPC namespace\nvar ASPC = ASPC || {};\n\n/**\n * @module\n * @description Methods for the menu\n */\nASPC.menu = function () {\n\t/**\n\t * @private\n\t */\n\tvar my = {\n\t\tself: this,\n\t\tbind_qtip: function () {\n\t\t\tvar item... | javascript | edit | 0 | 3 | mit | 5c16a27151168255c4078e0ccea67392a8191ba0 | aspc/mainsite,aspc/mainsite,aspc/mainsite,aspc/mainsite | aspc/static/js/menu_image.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n up: (queryInterface, Sequelize) => {\n return queryInterface.addColumn(\n 'Transactions',\n 'UsingVirtualCardFromCollectiveId',\n {\n type: Sequelize.INTEGER,\n refe... | javascript | edit | 0 | 1 | mit | 2342a471e6a0817418472b4562592f2ec3fdf5cd | OpenCollective/opencollective-api,OpenCollective/opencollective-api,OpenCollective/opencollective-api | migrations/20181107133924-add-virtualcards-emitter-collective-to-transactions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Import the neccesary modules.\nimport mongoose from \"mongoose\";\n\n// The show schema used by mongoose.\nconst ShowSchema = new mongoose.Schema({\n _id: {\n type: String,\n required: true\n },\n imdb_id: String,\n tvdb_id... | javascript | edit | 0 | 0 | mit | 87b4c3450fd93d8427ae05e435a942316e2f3601 | popcorn-official/popcorn-api | src/models/Show.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { sortBy } = require('lodash')\n\nconst config = require('../../config')\nconst authorisedRequest = require('../lib/authorised-request')\nconst { filterDisabledOption } = require('../apps/filters')\nconst { transformObjectToOption... | javascript | edit | 0 | 7 | mit | 2c6f16ffed0896b22e9346944443e065e568cfca | uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend | src/lib/options.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([], function() {\n\n 'use strict';\n\n\treturn ['$scope', '$location', 'Rest', function($scope, $location, Rest) {\n\t\t\n\t\t\n\t\t$scope.calendar = Rest.admin.calendars.getFromUrl().loadRouteId();\n\n\t\tif (!$scope.calendar... | javascript | edit | 0 | 2 | mit | 3e60daf688e0002888f7624b56a304d018aef8d2 | gadael/gadael,gadael/gadael | public/js/controllers/admin/calendar-edit.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport '../App.css';\nimport SearchBar from './SearchBar.js';\nimport InfoBody from './InfoBody.js';\n\nclass AppBody extends Component {\n render() {\n return (\n <div className=\"App... | javascript | edit | 0 | 1 | mit | ee0819f54e8fc3bf1e3589076ec544284077011c | cthit/nickIT,cthit/nickIT,cthit/nickIT | react-app/src/components/AppBody.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n( function ( mw, $ ) {\n\n $( function () {\n\n // For some odd reason, these had fixed min-style:600px\n // That sucks. Removing it (they're handled at HitchwikiVector/resources/styles/forms.less instead)\n $(\".sf-select2-co... | javascript | edit | 0 | 3 | mit | 4ca0e4516a64e54ab9193581e9053409dc6a5bf7 | Hitchwiki/HitchwikiVector-extension,Hitchwiki/HitchwikiVector-extension | resources/js/ext.HitchwikiVector.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction configure(memory, network) {\n\n function write() {\n console.log('Write neural network to file system');\n return mapNetwork(network).then(writeFiles);\n }\n\n function mapNetwork(network) {\n var subjects = networ... | javascript | edit | 0 | 2 | isc | 4ab84da2663df76739178bc7c406325692f9dfba | connected-web/elda-ai | lib/neural/persistence-write.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar app = require(\"../js/app.js\");\napp.start(function(config) {\n\tconsole.log(\"\");\n\tvar bindAddress = config.address ? config.address : \"localhost\";\n\tconsole.log(\"Ready to go! Please point your browser to: http://\" + bindA... | javascript | edit | 0 | 2 | mit | 12efb87a23abf641e1836b19eb571aa60ca6f634 | heyheyhexi/MagicMirror,n8many/MagicMirror,roramirez/MagicMirror,n8many/MagicMirror,roramirez/MagicMirror,Tyvonne/MagicMirror,Tyvonne/MagicMirror,roramirez/MagicMirror,n8many/MagicMirror,n8many/MagicMirror,MichMich/MagicMirror,heyheyhexi/MagicMirror,n8many/MagicMirror,MichMich/MagicMirror,heyheyhexi/MagicMirror,heyheyhe... | serveronly/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst gulp = require(\"gulp\");\nconst fs = require(\"fs\");\nconst rename = require(\"gulp-rename\");\nconst sass = require(\"gulp-sass\");\nconst ts = require(\"gulp-typescript\");\n\ngulp.task(\"lib_ts\", function() {\n gulp.src(\... | javascript | edit | 0 | 1 | apache-2.0 | 07b4cb957dc7b2360538741db562b4d53ca8e2ef | mbraak/jqTree,mbraak/jqTree,mbraak/jqTree | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Listens for the app launching then creates the window\n *\n * @see http://developer.chrome.com/apps/app.runtime.html\n * @see http://developer.chrome.com/apps/app.window.html\n */\nwindow.chrome.app.runtime.onLaunched.addListene... | javascript | edit | 0 | 1 | apache-2.0 | b1e3fc844873bb90af0f8132a379c41744d75535 | GoogleChrome/chrome-app-samples,killerwilmer/chrome-app-samples,bthai2014/chrome-app-samples,gabrielduque/chrome-app-samples,oahziur/chrome-app-samples,bthai2014/chrome-app-samples,newuserjim/chrome-app-samples,tamdao/chrome-app-samples,bthai2014/chrome-app-samples,mchangeat/chrome-app-samples,thmavri/chrome-app-sample... | user-agent/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { inject, observer } from 'mobx-react'\nimport Window from './Window'\nimport DragPreview from './DragPreview'\n\n@inject('windowStore')\n@observer\nexport default class App extends React.Component {\n ... | javascript | edit | 0 | 2 | mit | f7c5eb1e93f8cb5f75fa23825cee0389faaf51d0 | xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2 | src/js/components/WindowList.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst gulp = require('gulp'),\n minify = require('gulp-minify'),\n cssmin = require('gulp-cssmin'),\n rename = require('gulp-rename'),\n postcss = require('gulp-postcss');\n\n// compress javascript files and move them to the... | javascript | edit | 0 | 1 | mit | 1fadd34935566fb5893ab124df0281f6a7b2b3dc | betaweb-be/scroll-top-widget,betaweb-be/scroll-top-widget | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nwindow.staticReadFileSync = function(path) {\n console.log('readFileSync', path);\n\n if (path.match(/^\\/file:.*template.js$/)) {\n // Workaround getting '/file:/Users/admin/games/voxeljs/webnpm/template.js' TODO: underlying bug... | javascript | edit | 0 | 3 | mit | ee0413ecb21e9408947cdf9dde1dfa9f8c0b3563 | deathcap/webnpm,deathcap/webnpm | webnpm.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// German\n\njQuery.extend( jQuery.fn.pickadate.defaults, {\n monthsFull: [ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember' ],\n monthsShort: [ 'Jan', 'Feb', 'M... | javascript | edit | 0 | 0 | mit | 114f5f8ea893c3eff52cb6a469e0eeea2c85babf | amsul/pickadate.js,amsul/pickadate.js | lib/translations/de_DE.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\n(function () {\n angular\n .module(\"argo\")\n .factory(\"environmentService\", environmentService);\n\n function environmentService() {\n var service = {\n getRequest: getRequest... | javascript | edit | 0 | 1 | mit | e0cf7dc6ca6130facfe2756c5a94c86db3027e20 | albertosantini/argo,albertosantini/argo | src/client/app/services/environment.service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nECMAScript = {\n compileForShell(command) {\n const babelOptions = Babel.getDefaultOptions();\n babelOptions.sourceMap = false;\n babelOptions.ast = false;\n return Babel.compile(command, babelOptions).code;\n }\n};\n\n```... | javascript | edit | 0 | 1 | mit | dab025e5148ed7fc9e230df4d03878eba690bfaa | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor | packages/ecmascript/ecmascript.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Set the baseUrl to brackets/src\nrequire.config({\n baseUrl: \"../src\"\n});\n\ndefine(function(require, exports, module) {\n // Utility dependency\n var SpecRunnerUtils = require(\"spec/SpecRunnerUtils.js\");\n\n // Uniq... | javascript | edit | 0 | 1 | mit | 9fc9651115d50d61594434f4fa2d5bb37aed89bf | macdg/brackets,Rajat-dhyani/brackets,humphd/brackets,ralic/brackets,srinivashappy/brackets,weebygames/brackets,SidBala/brackets,TylerL-uxai/brackets,busykai/brackets,agreco/brackets,ashleygwilliams/brackets,iamchathu/brackets,fronzec/brackets,massimiliano76/brackets,alexkid64/brackets,RobertJGabriel/brackets,fastrde/br... | test/SpecRunner.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport baseStyles from '../../../styles/resets/base.css.js'\nimport sequencesStyles from './sequences/index.css.js'\n\nconst css = `\n ${baseStyles}\n transition-property: all;\n transition-duration: 200ms;\n transition-ti... | javascript | edit | 0 | 0 | mit | cfcbe79dbabf1f477080221c7c0f748ae75748b6 | helpscout/blue,helpscout/blue,helpscout/blue | src/components/Animate/styles/Animate.css.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Patterns checkedflag - Add checked flag to checkbox labels\n *\n * Copyright 2013 Simplon B.V. - Wichert Akkerman\n */\ndefine([\n \"jquery\",\n \"../registry\",\n \"../utils\"\n], function($, patterns, utils) {\n va... | javascript | edit | 0 | 2 | bsd-3-clause | c58712ddedfd98ac9ab8e370963e8aa6af2e0ed2 | Patternslib/Patterns-archive,Patternslib/Patterns-archive,Patternslib/Patterns-archive | src/pat/select-option.js | rejected_duplicate | Near-duplicate of sample 95124 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { storiesOf, action } from '@kadira/storybook'\nimport Alert from 'fyndiq-component-alert'\n\nstoriesOf('Alert', module)\n .addWithInfo('default', () => (\n <Alert onClose={action('closed')}>Your me... | javascript | edit | 0 | 1 | mit | 547e53322615cd517673871d23c579e9e33ac3fa | fyndiq/fyndiq-ui,fyndiq/fyndiq-ui | packages/fyndiq-ui-test/stories/component-alert.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react'\n\nimport Spinner from '../Spinner'\n\nconst TodoList = ({ todos, isFetching }) => {\n if (isFetching) {\n return (\n <Spinner text='Loading' />\n )\n } else {\n return (\n <... | javascript | edit | 0 | 2 | mit | c1fafc0c9fdbad2e5f283009dc7944ffe61f8f0b | RSS-Dev/live-html,RSS-Dev/live-html,epicsharp/react-boilerplate,epicsharp/react-boilerplate | src/components/TodoList/TodoList.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nAccountsTemplates.configure({\n\n defaultLayout: 'defaultLayout',\n defaultContentRegion: 'main',\n\n // Behaviour\n confirmPassword: true,\n enablePasswordChange: true,\n forbidClientAccountCreation: false,\n overrideLoginErrors... | javascript | edit | 0 | 0 | mit | 5cfeb43a739a286ddb7b3c725e25b2e99d7ffe30 | anjneymidha/SpaceTalk,dannypaton/SpaceTalk,tamzi/SpaceTalk,bright-sparks/SpaceTalk,MarkBandilla/SpaceTalk,redanium/SpaceTalk,anjneymidha/SpaceTalk,lhaig/SpaceTalk,syrenio/SpaceTalk,thesobek/SpaceTalk,redanium/SpaceTalk,bright-sparks/SpaceTalk,TribeMedia/SpaceTalk,MarkBandilla/SpaceTalk,yanisIk/SpaceTalk,tamzi/SpaceTalk... | lib/accounts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('publicApp')\n .controller('GatewayAccountsCtrl', ['$scope', '$http','$location', function ($scope, $http, $location) {\n $scope.user = {}\n\n $http.get(\"http://localhost:4000/api/v1/sessions\").s... | javascript | edit | 0 | 2 | isc | 7b1b24f9b3272c26b7d66edc4d58df57980f4b09 | zealord/gatewayd,xdv/gatewayd,crazyquark/gatewayd,xdv/gatewayd,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd,crazyquark/gatewayd | public/app/scripts/controllers/gateway_accounts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.addEventListener(\"load\", function () {\n var pk = new Piklor(\".color-picker\", [\n \"#f44336\"\n , \"#e91e63\"\n , \"#3f51b5\"\n , \"#4caf50\"\n , \"#ffc107\"\n , \"#7... | javascript | edit | 0 | 1 | mit | 83e0a726475d6932b96a582b22867816a514fe9b | jillix/piklor.js,jillix/piklor.js | example/js/handlers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst Store = require('orbit-db-store')\nconst CounterIndex = require('./CounterIndex')\nconst Counter = require('crdts/src/G-Counter')\n\nclass CounterStore extends Store {\n constructor(ipfs, id, dbname, options = {})... | javascript | edit | 0 | 2 | mit | 733c6a41b930e50e408f9fc4b2b2a2c1cefc9011 | haadcode/orbit-db-counterstore,haadcode/orbit-db-counterstore | src/CounterStore.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport declare from 'dojo/_base/declare';\nimport lang from 'dojo/_base/lang';\nimport View from 'argos/View';\nimport _ChartMixin from './_ChartMixin';\n\n/**\n * @class crm.Views.Charts.GenericBar\n *\n * @extends argos.View\n * @mixi... | javascript | edit | 0 | 1 | apache-2.0 | cb3ef039b76d4aef873a578053eeea3cce7578ec | Saleslogix/argos-saleslogix,Saleslogix/argos-saleslogix,Saleslogix/argos-saleslogix,Saleslogix/argos-saleslogix | src/Views/Charts/GenericBar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nFamousFramework.scene('famous-tests:html-element-events', {\n behaviors: {\n '.container': {\n 'size': [200, 200],\n 'align': [0.5, 0.5],\n 'mount-point': [0.5, 0.5]\n }\n },\n eve... | javascript | edit | 0 | 1 | mit | 2716d6e9e933fe80d268dd1547ae1039d3fee97b | KraigWalker/framework,ildarsamit/framework,Famous/framework,SvitlanaShepitsena/framework,infamous/framework,colllin/famous-framework,SvitlanaShepitsena/shakou,SvitlanaShepitsena/framework,infamous/framework,tbossert/framework,woltemade/framework,infamous/famous-framework,SvitlanaShepitsena/shakou,SvitlanaShepitsena/rem... | lib/core-components/famous-tests/html-element-events/html-element-events.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport RequireLogin from './RequireLogin';\nimport LoadingIndicator from './LoadingIndicator';\n\nexport default class EventPage extends Component {\n static propTypes = {\n even... | javascript | edit | 0 | 2 | mit | 1cf4e7bca53c89aa12551116b2d5f8081a631315 | webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp | src/components/EventPage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel';\n\nimport {Emitter} from 'atom';\nimport Project from './project';\n\nexport default class Projects {\n constructor(db=null) {\n this.emitter = new Emitter();\n this.db = db;\n\n this.db.onUpdate(() => this.emitte... | javascript | edit | 0 | 3 | mit | d879bf1b3661f33d51c560540bf20d7c257335b1 | danielbrodin/atom-project-manager | lib/projects.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction Player(map, location) {\n this._map = map;\n this._location = location;\n\n var markerimage = new google.maps.MarkerImage(\n \"res/icon.png\",\n new google.maps.Size(48, 48));\n this._marker = new google.maps.Mark... | javascript | edit | 0 | 1 | mit | 460c44e9121f5bdc559d85ae424ca04660cccbce | mroshow/zombie-run,malizadehq/zombie-run,tropikhajma/zombie-run,waynecorbett/z,yucemahmut/zombie-run,tropikhajma/zombie-run,Arifsetiadi/zombie-run,mroshow/zombie-run,Arifsetiadi/zombie-run,waynecorbett/z,malizadehq/zombie-run,Arifsetiadi/zombie-run,yucemahmut/zombie-run,tropikhajma/zombie-run,yucemahmut/zombie-run,Arif... | ZombieRun4HTML5/js/player.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Types from '../Actions/Types'\nimport Immutable from 'seamless-immutable'\nimport createReducer from './CreateReducer'\n\nexport const INITIAL_STATE = Immutable({\n taxEnabled: true,\n taxRate: '6.75',\n shippingEnabled: true,... | javascript | edit | 0 | 1 | mit | 0ef0e4deaba8f48e7bb67367028ef930ff9efa5e | OTGApps/ReactCheckoutHelper,OTGApps/ReactCheckoutHelper,OTGApps/ReactCheckoutHelper | App/Reducers/SettingsReducer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\n/* eslint-disable require-await */\n/**\n * Metro configuration for React Native\n * https://github.com/facebook/react-native\n *\n * @format\n */\n\nconst path = require('path');\n\nconst { IS_CI } = process.env;\n\nconst s... | javascript | edit | 0 | 1 | mit | befa4e787103df0e6bffce46f55befd5efc8ab14 | mrtnzlml/native,mrtnzlml/native | metro.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { mergeSchemas, introspectSchema, makeRemoteExecutableSchema } from \"graphql-tools\"\nimport { createHttpLink } from \"apollo-link-http\"\nimport fetch from \"node-fetch\"\n\nimport localSchema from \"./schema\"\n\nexport defaul... | javascript | edit | 0 | 1 | mit | e6b24f527a59260aaf33d2606a6b9c3f7938b7b1 | mzikherman/metaphysics-1,mzikherman/metaphysics-1,mzikherman/metaphysics-1,artsy/metaphysics,mzikherman/metaphysics-1,craigspaeth/metaphysics,craigspaeth/metaphysics,artsy/metaphysics,artsy/metaphysics | mergedSchema.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use-strict';\n\n//////////////////////////////\n// Requires\n//////////////////////////////\n\nvar gulp = require('gulp');\nvar svgSprite = require('gulp-svg-sprite');\nvar rename = require('gulp-rename');\n\n// SVG Config\nvar config ... | javascript | edit | 0 | 1 | mit | e86ad1b8fe54269e865ecb78346b4c3a8f211388 | una/svg-icon-system-boilerplate,una/svg-icon-system-boilerplate | Gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar configuration = require('../config/configuration.json')\nvar utility = require('../public/utility')\n\nmodule.exports = function(redisClient, accountHashID, filter, callback) {\n var destinationTableName = configuration.Table... | javascript | edit | 0 | 3 | mit | 45bdd170ea00295dbbb13ca4a9c7331dedfb0b86 | Flieral/Logger-Service | logic/monitorListLogic.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst startsWithDot = /^\\./;\nconst moduleIdParts = /^((?:[a-z\\-]+!)*)(.*)$/;\n // ^ From the beginning of the string match:\n // ((?: 1.\n // [a-z\\-]+ A loader name, consisting of lowercase letters and hyph... | javascript | edit | 0 | 2 | mit | 103b482ba94724eafe155c210ab492cf99110e94 | tomekwi/isomorphic-ensure | module/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module dependencies.\n */\nvar mongoose = require('mongoose'),\n\tSchema = mongoose.Schema;\n\n/**\n * Wish Schema\n */\nvar WishSchema = new Schema({\n\tname: {\n\t\ttype: String,\n\t\tdefault: '',\n\t\trequire... | javascript | edit | 0 | 0 | mit | fda7e1ba72c58c7741ad7403851171492e3bb261 | santail/diilid.ee-admin,santail/diilid.ee-admin,santail/diilid.ee-admin | app/models/wish.server.model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass ExperimentsService {\n /*@ngInject*/\n constructor(projectsAPI) {\n this.projectsAPI = projectsAPI;\n }\n\n getAllForProject(projectID) {\n return this.projectsAPI(projectID).one('experiments').getList();... | javascript | edit | 0 | 1 | mit | cd2ec9c103568207e0561a06772ec81553662181 | 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/services/experiments-service.service.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Fix exporting pass & shaders\n\n\n\nFormer-commit-id: 681dc926bcc021550d8b4fc13fc0136652a43c2c"
},
{
"role": "assistant",
"content": "export * from './controls/FirstPersonControls';\nexport * from './controls/OrbitControlsMod... | javascript | new_file | 0 | 0 | mit | b72629954037ab28368c4c9cbea7006bcf9f86f2 | WhitestormJS/whs.js,WhitestormJS/whs.js | src/extras/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @ngdoc function\n * @name textSummaryApp.controller:MainCtrl\n * @description\n * # MainCtrl\n * Controller of the textSummaryApp\n */\nangular.module('textSummaryApp')\n .controller('MainCtrl', function ($scop... | javascript | edit | 0 | 1 | mit | d4d68ae81b679a7de2e3fb215789649e53149e7c | stcakova/text-summary,stcakova/text-summary | app/scripts/controllers/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ngirder.views.jobs_JobDetailsWidget = girder.View.extend({\n initialize: function (settings) {\n this.job = settings.job;\n },\n\n render: function () {\n this.$el.html(girder.templates.jobs_jobDetails({\n ... | javascript | edit | 0 | 2 | apache-2.0 | 731e295b8a4167f86e7870b2f0d97a189fc07ec1 | girder/girder,sutartmelson/girder,kotfic/girder,essamjoubori/girder,essamjoubori/girder,jbeezley/girder,Kitware/girder,RafaelPalomar/girder,Kitware/girder,RafaelPalomar/girder,sutartmelson/girder,Kitware/girder,jbeezley/girder,RafaelPalomar/girder,sutartmelson/girder,chrismattmann/girder,adsorensen/girder,kotfic/girder... | plugins/jobs/web_client/js/views/JobDetailsWidget.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nimport IntlMessageFormat from 'intl-messageformat';\nimport IntlRelativeFormat from 'intl-rela... | javascript | edit | 0 | 3 | bsd-3-clause | 4ea2ac31afdb8d615e55e97549fa6da794ca87e0 | ericf/react-intl | src/locale-data-registry.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ConversationV1 = require('watson-developer-cloud/conversation/v1');\n\nvar method = ConversationBot.prototype;\n\nfunction ConversationBot(room) {\n this.room = room;\n this.conversation = new ConversationV1({\n \"usern... | javascript | edit | 0 | 2 | mit | a497bb5250961cb45a26f7292f8c74e2881efd18 | nashkevin/Turing-Party,nashkevin/Turing-Party | game/bots/conversationv1.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\ndefine([\"angular\", \"app/services/LoginChecker\", \"app/services/FileLoader\", \"app/services/FigureUploader\", \"app/services/SnippetLoader\", \"app/services/TagLoader\", \"app/services/IdLoader\"], function() {\n\n\... | javascript | edit | 0 | 1 | mit | 97e30f5d0cb0a2aaf8a24e32cba57477228827db | ucam-cl-dtg/scooter,ucam-cl-dtg/scooter | app/js/app/services.js | rejected_duplicate | Near-duplicate of sample 83237 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (data) {\n var assertions = [\n 'ok', 'equal', 'notEqual',\n 'propEqual', 'notPropEqual',\n 'deepEqual', 'notDeepEqual',\n 'strictEqual', 'notStrictEqual',\n 'throws', 'expect'\n ];\n var asse... | javascript | edit | 0 | 1 | mit | d61d95fab6093b75a2e99f62ed83499d2b12bff6 | apsdehal/qunit-migrate | src/modifiers/assertions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n sass: {\n files: [\"scss/**/*.{scss,sass}\"],\n tasks: [\"lint:css\", \"sass:compile\", \"test:css\"]\n },\n js: {\n files: [\"js/**/*.js\", \"tests/**/*.js\"],\n tasks: [\"lint:js\", \"test:js\"]\n ... | javascript | edit | 0 | 0 | mit | 03fc267dfa4984841825cbd2f2c129696663d704 | sbsmith86/dosomething,mshmsh5000/dosomething-1,chloealee/dosomething,mshmsh5000/dosomething,sergii-tkachenko/phoenix,mshmsh5000/dosomething-1,angaither/dosomething,sbsmith86/dosomething,chloealee/dosomething,DoSomething/phoenix,angaither/dosomething,deadlybutter/phoenix,angaither/dosomething,DoSomething/dosomething,chl... | lib/themes/dosomething/paraneue_dosomething/tasks/options/watch.js | rejected_duplicate | Near-duplicate of sample 86928 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction resetPage() {\n // Prevent default behaviour of all form submits throught Florence\n $(document).on('submit', 'form', function(e) {\n e.preventDefault();\n console.log('Form submit stopped on: ', e);\n })... | javascript | edit | 0 | 1 | mit | a381530061bac21c7526c29c5a9b2df3ec60fb79 | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | src/main/web/florence/js/functions/_reset.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst babelify = require('babelify')\nconst envify = require('envify/custom')\nconst markdown = require('browserify-markdown')\nconst through = require('through2')\nconst YAML = require('yamljs')\n\nconst babelConfig = require('./babel-... | javascript | edit | 0 | 2 | mit | bccd2d9aac14edbdc9b40e55454c57ed71b1fe9e | conveyal/mastarm,conveyal/mastarm | lib/js-transform.js | rejected_duplicate | Near-duplicate of sample 69791 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst electron = require('electron');\nconst { remote } = require('electron');\nconst selfBrowserWindow = remote.getCurrentWindow();\n\nselfBrowserWindow.webContents.openDevTools({ mode: 'detach' });\nselfBrowserWindow.... | javascript | edit | 0 | 2 | mit | f87dce1de79a6d4ef074d30b26a5bc47267de403 | RocketChat/Rocket.Chat.Electron,RocketChat/Rocket.Chat.Electron,RocketChat/Rocket.Chat.Electron | src/public/jitsi-preload.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe('Splash page', function() {\n\n beforeEach(function() {\n browser.get('http://localhost:8088/');\n });\n\n it('should redirect to the worklist.', function() {\n expect(browser.getCurrentUrl()).toMatch(\".*?/work-it... | javascript | edit | 0 | 1 | apache-2.0 | eae2084697a9f875f4d554b6654a79cdc39883b2 | sanbornsen/fabric8-planner,almighty/almighty-ui,michaelkleinhenz/fabric8-planner,ldimaggi/fabric8-planner,sanbornsen/fabric8-planner,almighty/almighty-ui,fabric8io/fabric8-ui,pranavgore09/fabric8-planner,fabric8io/fabric8-planner,pmuir/fabric8-planner,nimishamukherjee/fabric8-planner,nimishamukherjee/fabric8-planner,pm... | src/tests/app.component.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n angular\n .module('drinks', ['ngAnimate', 'toastr'])\n .controller('DrinksListController', DrinksListController);\n\n DrinksListController.$inject = ['DrinksService', '$state' , '$scope', 'toa... | javascript | edit | 0 | 1 | mit | ff3787db8e7fb58297ca064b75fb506f59c5e278 | UF-SE-3B/SwampHead-Brewery,UF-SE-3B/SwampHead-Brewery,UF-SE-3B/SwampHead-Brewery | modules/drinks/client/controllers/list-drinks.client.controller.js | rejected_duplicate | Near-duplicate of sample 82560 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * nav-mesh\n *\n * Waits for a mesh to be loaded on the current entity, then sets it as the\n * nav mesh in the pathfinding system.\n */\nmodule.exports = AFRAME.registerComponent('nav-mesh', {\n init: function () {\n this.sys... | javascript | edit | 0 | 4 | mit | bd00317d2496d24c0296b6c67601f0f139051da9 | donmccurdy/sandbox-aframe | src/pathfinding/nav-mesh.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*! resol-vbus | Copyright (c) 2013-2014, Daniel Wippermann | MIT license */\n'use strict';\n\n\n\nvar Q = require('q');\n\n\n\nvar testUtils = {\n\n performAsyncTest: function(done, callback) {\n return Q.fcall(callback).then... | javascript | edit | 0 | 1 | mit | ab4901f38ac61f23df29fd2a7302beb216fc7771 | Thorsten71/resol-vbus,danielwippermann/resol-vbus | test/specs/test-utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar config = require('../../config');\nvar gulp = require('gulp');\nvar repeatString = require('../../lib/repeatString');\nvar sizereport = require('gulp-sizereport');\n\n// 6) Report sizes\ngulp.task('size-report', func... | javascript | edit | 0 | 1 | apache-2.0 | 34a741325452c8bf662ab20f7b0bccbfad3e0e1a | First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui | gulpfile.js/tasks/rev/sizereport.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nexports.port = process.env.ARGO_PORT || 8000;\n\nexports.staticFiles = \"./src/client/\";\nexports.apiUrl = \"/api\";\nexports.streamUrl = \"/stream\";\n\nexports.environment = process.env.OANDA_ENVIRONMENT || \"pract... | javascript | edit | 0 | 1 | mit | 08969bd0b94be215a7e84841a66639f56d09069b | albertosantini/argo,albertosantini/argo | src/server/routes/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\napp.get('/login', user.loginGet);\napp.post('/login', user.loginPost);\n//app.get('/logout', userController.logout);\n//app.get('/forgot', userController.getForgot);\n//app.post('/forgot', userController.postForgot);\n//app.get('/reset/... | javascript | edit | 0 | 0 | mit | 3a8733d7cc6c72f4a78f6fe5415607acc7d6844b | sahat/megaboilerplate,sahat/megaboilerplate,sahat/boilerplate,sahat/megaboilerplate,sahat/boilerplate | generators/authentication/modules/local/passport-routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Requires\nvar HttpRPCManager = require('./manager').HttpRPCManager;\n\n\nfunction setup(options, imports, register) {\n // Import\n var app = imports.server.app;\n\n // Construct\n var manager = new HttpRPCManager(app, '/... | javascript | edit | 0 | 1 | apache-2.0 | cac396a74ffb7da4a33c25397f5354b6a62d0d57 | rodrigues-daniel/codebox,code-box/codebox,indykish/codebox,lcamilo15/codebox,kustomzone/codebox,nobutakaoshiro/codebox,etopian/codebox,indykish/codebox,fly19890211/codebox,etopian/codebox,ronoaldo/codebox,ronoaldo/codebox,LogeshEswar/codebox,lcamilo15/codebox,code-box/codebox,fly19890211/codebox,blubrackets/codebox,sma... | lib/cb.httpRPC/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar angular\n , DashboardController\n , ChartController;\n\nangular.module('wharf', ['ui.router', 'wharf.controllers']);\n\nangular.module('wharf').config(function($stateProvider, $urlRouterProvider) {\n $stateProvid... | javascript | edit | 0 | 1 | mit | 9b556e5df90b76a67360ef556fb3e87460d54361 | davidcunha/wharf,davidcunha/wharf | lib/public/js/wharf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Proxy calls to wp.apiFetch within the page context.\n *\n * @link https://github.com/WordPress/gutenberg/blob/master/packages/api-fetch/README.md\n * @param {Object} options Options object passed to `wp.apiFetch`. See documentat... | javascript | edit | 0 | 2 | apache-2.0 | beec8f886a82558b41931dcdce0e43b00ace4926 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | tests/e2e/utils/wp-api-fetch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright 2011 eBay Software 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.\n * You may obtain a copy of the License at\n ... | javascript | edit | 0 | 5 | mit | 7e6a8d1a2ac227b163c188357ef570d393a42d04 | marko-js/marko,marko-js/marko | taglibs/core/RequireNode.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { Redirect, Route } from 'react-router';\n\nclass PrivateRoute extends Component {\n render() {\n const { \n component,\n ... | javascript | edit | 0 | 1 | mit | 81d205e5fb136e676bb6de536f0ad464c165d0be | mbchoa/presence,mbchoa/presence | src/components/PrivateRoute.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or a... | javascript | edit | 0 | 0 | mit | 3a8d3a2d6531ca296b7cf856a79470dd42b886eb | Dom-Mc/shareMark,Dom-Mc/shareMark,Dom-Mc/shareMark | app/assets/javascripts/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPT = PT || {};\n\nPT.downloadCsv = function(serverResponse){\n var survey = serverResponse.survey;\n var responses = serverResponse.responses;\n var a = document.createElement('a');\n var csvString = \"\";\n\n //Write title & promp... | javascript | edit | 0 | 5 | mit | 92ae4281c8f85354cc15456ea6b8da18929d3f88 | c4fcm/Promise-Tracker-Builder,c4fcm/Promise-Tracker-Builder,c4fcm/Promise-Tracker-Builder | app/assets/javascripts/csvDownload.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ad = require('../../ad');\nvar Network = require('../network.js');\n\n\n// Network that takes no inputs and returns a constant set of parameters\nfunction ConstantParamNetwork(dims, optname) {\n\tNetwork.call(this);\n\tthis.name = o... | javascript | edit | 0 | 2 | mit | 66caf96a95d6d1c154a880368e88413cac3f8297 | dritchie/adnn | nn/networks/misc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport function setBackupOption(backup, index) {\n\treturn {\n\t\ttype: 'SETTINGS_SET_BACKUP',\n\t\tpayload: {\n\t\t\tbackup,\n\t\t\tindex,\n\t\t},\n\t};\n}\n\nexport function setBackupOptionPath(path) {\n\treturn {\n\t\ttype: 'SETTINGS... | javascript | edit | 0 | 1 | mit | 6171de67a10a9831b8da6c3a69f92b8b70d0be50 | radencode/reflow-client,radencode/reflow-client,radencode/reflow,radencode/reflow | src/screens/rename/views/settings/actions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { exec } = require('@actions/exec');\nconst getWorkspaces = require('get-workspaces').default;\n\nasync function execWithOutput(command, args, options) {\n let myOutput = '';\n let myError = '';\n\n return {\n code: await ex... | javascript | edit | 0 | 1 | mit | 632153b03e3b6c1562c279002406752a322973d3 | davidkpiano/xstate,davidkpiano/xstate,davidkpiano/xstate | .github/actions/change-release-intent/main.js | rejected_duplicate | Near-duplicate of sample 78720 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('{{.ServiceName}}', [])\n.provider('{{.ServiceName}}', function($q) {\n\tvar provider = {};\n\n\tprovider.setUrl = function(url) {\n\t\tprovider.url = url;\n\t};\n\n\tprovider.$get = function() {\n\t\t//++\n\t};\n})\n\n``... | javascript | edit | 0 | 1 | bsd-2-clause | 9d2769c974e46ea3a46d26bbc7a2075c5bb8b462 | GeertJohan/ango,GeertJohan/ango | templates/ango-service.tmpl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Create a controller with name VacationsCtrl to bind to the html page.\nvacationAppControllers.controller('VacationTypeCtrl', function($scope, vacationTypeService) {\n\t// Refresh the grid, calling the appropriate service method.\n\t$... | javascript | edit | 0 | 1 | apache-2.0 | 9e88a91ae1fe192f11eb3122136bb981dec74022 | wpetit/vacation,wpetit/vacation | vacation-webapp/src/main/webapp/script/vacation-type/controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst mediaType = 'application/vnd.cignium.resource+json'\n\nexport async function request(method, href, data, config) {\n const request = {\n body: data && JSON.stringify(data),\n credentials: 'include',\n headers: new Header... | javascript | edit | 0 | 11 | mit | 27a3dffe7dc0aafd5afbc95dde72dcaf2b050077 | cignium/hypermedia-client,cignium/hypermedia-client | src/api/http.js | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport state from './state';\nimport getters from './getters';\nimport mutations from './mutations';\nimport actions from './actions';\n\nexport default {\n namespaced: true,\n state,\n getters,\n mutations,\n actions,\n};\n\n```\n... | javascript | edit | 0 | 0 | mit | 3f07a3dbed54789cc147dbed5ab3a222c385898e | nextgensparx/quantum-router,nextgensparx/quantum-router | src/store/modules/sms/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as Backbone from 'backbone';\nimport Items from '../collections/items';\nimport SearchBoxView from '../views/searchBox-view';\nimport SearchResultsView from '../views/searchResults-view';\nimport DocumentSet from '../helpers/se... | javascript | edit | 0 | 1 | mit | 721b89fe731527a79458278cc9b51e2c9d38531e | trevormunoz/katherine-anne,trevormunoz/katherine-anne,trevormunoz/katherine-anne | src/js/routers/app-router.js | rejected_duplicate | Near-duplicate of sample 97980 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2018 Google Inc.\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 License at\n//\n// https:/... | javascript | edit | 0 | 0 | apache-2.0 | 79186c785b8dbb405e99777af690161a376226e9 | google/j2cl,google/j2cl,google/j2cl,google/j2cl,google/j2cl | samples/helloworld/src/main/java/com/google/j2cl/samples/helloworld/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Trade from './trade.model';\nimport Book from '../book/book.model';\n\nfunction initTrade({ requester, book, comment }) {\n const query = { requester, book };\n const updates = { requester, book, comment };\n const options = {... | javascript | edit | 0 | 3 | mit | da346e9f72ce035dd4dfdff286e875989919c991 | ksmai/trade-book,ksmai/trade-book,ksmai/trade-book | src/server/trade/init-trade.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport filtersIcon from '../icons/filtersIcon.svg';\nimport effectsIcon from '../icons/effectsIcon.svg';\nimport MenuItemIconAbove from './MenuItemIconAbove';\nimport Toolbar from './Toolbar';\... | javascript | edit | 0 | 2 | mit | 609b5f1a871cd2cb46e98e745bbb32526fedc950 | shockry/editest,shockry/editest | src/components/MainNavbar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar classNames = require('classnames')\nvar React = require('react')\n\nrequire('./LessonMenu.css')\n\nvar LessonMenu = React.createClass({\n handleSelectLesson(index) {\n this.props.selectLesson(index)\n },\n render() {\n var ... | javascript | edit | 0 | 2 | mit | 97c2f1aa4b4029f8d596c303acf90c31bf2e1295 | zalmoxisus/react-lessons,insin/react-lessons,zalmoxisus/react-lessons,insin/react-lessons | src/components/LessonMenu.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/** index.js\n* @file: /config/index.js\n* @description: Handles passport authentication\n* @parameters: Object(app), Object(passport)\n* @exports: Passport authentication\n*/\nvar ObjectID = require('mongodb').ObjectID\nvar passport = ... | javascript | edit | 0 | 1 | unlicense | 0ba5cf81e9190ee03485328deeacb27377e3eb5e | Vegosvar/Vegosvar,Vegosvar/Vegosvar,Vegosvar/Vegosvar | src/config/passport/index.js | rejected_duplicate | Near-duplicate of sample 67878 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { connect } from 'react-redux'\nimport ModalShare from '../components/ModalShare'\nimport { showHideModal } from '../actions'\nimport { withRouter } from 'react-router'\n\nimport { BASE_HREF } from '../constants/AppConstants'\n\n... | javascript | edit | 0 | 1 | mit | 1afcf603862bb94cb3b591933ef34394b976d3b0 | DataSF/open-data-explorer,DataSF/open-data-explorer,DataSF/open-data-explorer | src/containers/ModalShare.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// State machine representing URI's\n//\n// Cleans up the logic of connecting via ports,\n// urls or file sockets.\n\nvar state = require('state');\n\n\nmodule.exports = state({\n // Possible states for the URI\n Initial: state('initi... | javascript | edit | 0 | 1 | mit | 8876561a6aa25b5610cab4b2f15b6bb3e4ca9f68 | AdrianRossouw/waif | uri.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { Link, IndexLink } from 'react-router';\n\nexport default class NavLink extends Component {\n constructor(props, context) {\n super(props, context);\n }\n\n render() {\n const ... | javascript | edit | 0 | 2 | mit | ca39704d859116e49a0e7582bdb4da0d1bdfef9b | IronCountySchoolDistrict/student-profile,IronCountySchoolDistrict/student-profile | src/scripts/student-profile/js/components/NavLink.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\r\nCopyright (c) Lightstreamer Srl\r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r... | javascript | edit | 0 | 2 | apache-2.0 | ea1f325bc178315c51fef755076da98a58a4b14e | Lightstreamer/Lightstreamer-example-Chat-adapter-node,Weswit/Lightstreamer-example-Chat-adapter-node | robustconnect.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by steve on 15/09/15.\n */\nimport React from 'react';\nvar utils = require('../utils');\nvar classNames = require('classnames');\nimport ValidationMixin from '../ValidationMixin';\n\nclass MuiNumber extends React.Compon... | javascript | edit | 0 | 2 | mit | 538eba46a493c254d44b364a051146dd387a990a | Codafication/react-schema-form,networknt/react-schema-form,Codafication/react-schema-form,networknt/react-schema-form | src/material-ui/MuiNumber.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst debug = require('debug')('calendar:routes:common');\n\nmodule.exports = {\n sendAppropriateResponse : function (req, res, output) {\n if (req.accepts('html')) {\n debug('sending html output');\n res.... | javascript | edit | 0 | 4 | mit | 39cc4accca3fed797ba0632b5fa9c4e1ed4290f0 | kollavarsham/calendar-api | routes/common.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('calendarApp')\n .controller('AppointmentmodalCtrl', function ($scope, $modalInstance, event, Config) {\n 'use strict';\n\n var z = 12;\n $scope.config = Config;\n $scope.event = even... | javascript | edit | 0 | 2 | mit | 5fc85fecbc8e5a6f4f913aa8920290939cb601c0 | mgwidmann/appointments,mgwidmann/appointments,mgwidmann/appointments,mgwidmann/appointments | app/assets/javascripts/appointments/modal/appointment.controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar UDF = require( '..' )\nvar BlockDevice = require( 'blockdevice' )\nvar util = require( 'util' )\nvar fs = require( 'fs' )\nvar path = require( 'path' )\n\nfunction inspect( value ) {\n return util.inspect( value, {\n depth: null... | javascript | edit | 0 | 2 | mit | b05c819fb4e9cf37c50a4a892a23f5957436b977 | jhermsmeier/node-udf | repl/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = [\n {\n name: '@storybook/addon-docs/react/preset',\n options: {\n configureJSX: true,\n },\n },\n];\n\n```\n\nApply this change: CLI: Add CRA preset to MDX template"
},
{
"role": "assistant",
... | javascript | edit | 0 | 0 | mit | 17b0495b1f398a65a290a49846d7afa4a414e353 | storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook | lib/cli/generators/REACT_SCRIPTS/template-mdx/.storybook/presets.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (req, res) {\n\tvar keystone = req.keystone;\n\tif (!keystone.security.csrf.validate(req)) {\n\t\treturn res.apiError(403, 'invalid csrf');\n\t}\n\treq.list.model.findById(req.params.id, function (err, item) {\... | javascript | edit | 0 | 3 | mit | d69caafc4844d904ca213797fccb9bded80c4630 | naustudio/keystone,sendyhalim/keystone,matthewstyers/keystone,Yaska/keystone,frontyard/keystone,ratecity/keystone,trentmillar/keystone,cermati/keystone,snowkeeper/keystone,linhanyang/keystone,Yaska/keystone,cermati/keystone,trentmillar/keystone,vokal/keystone,benkroeger/keystone,jstockwin/keystone,ONode/keystone,Yaska/... | admin/server/api/item/update.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar React = require('react'),\n App = require('./App');\n\nReact.render(<App />, document.body);\n```\n\nApply this change: Fix bug filename : App -> app"
},
{
"role": "assistant",
"content": "'use strict... | javascript | edit | 0 | 0 | mit | e9aa56d8bd74d9106921a7a3c57961da0d1eb6e1 | gaearon/react-hot-loader,gaearon/react-hot-loader | packages/react-hot-boilerplate/scripts/index.js | rejected_duplicate | Near-duplicate of sample 82812 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports = module.exports = function(parse, csrfProtection, loadState, authenticate, proceed) {\n \n /*\n return [\n require('body-parser').urlencoded({ extended: false }),\n ceremony.loadState('mfa'),\n authenticator.authent... | javascript | edit | 0 | 1 | mit | da51d67b681acffe70a1727875d3b9093de5d903 | authnomicon/nodex-aaa-login | app/otp/handlers/authenticate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * MapEmAll is licensed under the conditions of the MIT License (MIT)\n *\n * Copyright (c) 2015-2016 Philip Stöhrer\n * All rights reserved.\n *\n * See https://raw.githubusercontent.com/stophi-dev/MapEmAll/master/LICENSE for detai... | javascript | edit | 0 | 2 | mit | a48b3c263b019f6f8efac0b4531cbd01be2ae668 | stophi-dev/MapEmAll,stophi-dev/MapEmAll | src/bing/Bing.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Rollbar from 'rollbar';\n\nconst rollbar = new Rollbar({\n accessToken: 'POST_CLIENT_ITEM_TOKEN',\n captureUncaught: false,\n captureUnhandledRejections: false\n})\n\nmodule.exports = function tool(x) {\n rollbar.log('foobar ... | javascript | edit | 0 | 1 | mit | d7cf0bb4d6c70dc3ba5797b051b7e8cf6b9f7cbd | rollbar/rollbar.js | examples/no-conflict/tool.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.