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\nexports.names = ['reload'];\nexports.hidden = true;\nexports.enabled = true;\nexports.cdAll = 60;\nexports.cdUser = 60;\nexports.cdStaff = 60;\nexports.minRole = PERMISSIONS.MANAGER;\nexports.handler = function (data) {\n loadCommand... | javascript | edit | 0 | 1 | mit | 9a48444a052443c72b57a5ca57f54635d900d5e7 | avatarkava/beavisbot-dubtrack-fm,avatarkava/beavisbot-dubtrack-fm,avatarkava/BeavisBot,avatarkava/BeavisBot | commands/reload.js | rejected_duplicate | Near-duplicate of sample 68850 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n root: false,\n plugins: ['markdown'],\n globals: {\n expect: false\n },\n rules: {\n 'no-unused-vars': 0,\n 'no-undef': 0\n }\n};\n\n```\n\nApply this change: Switch to esprima and parse in tolerant m... | javascript | edit | 0 | 0 | mit | 0180745e31241aa17938edc84ae7708b88940bf3 | unexpectedjs/unexpected | documentation/.eslintrc.js | rejected_duplicate | Near-duplicate of sample 73022 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Component from '../Component';\n\nexport default function patchMithril(global) {\n const mo = global.m;\n\n const m = function(comp, ...args) {\n if (comp.prototype && comp.prototype instanceof Component) {\n return com... | javascript | edit | 0 | 5 | mit | 42ecee42a196d3e336ae6c0ac5c8a15c33ed51cc | flarum/core,malayladu/core,malayladu/core,datitisev/core,datitisev/core,Luceos/core,Luceos/core,flarum/core,malayladu/core,Luceos/core,flarum/core,datitisev/core,malayladu/core,datitisev/core,Luceos/core | js/lib/utils/patchMithril.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst _generate_wishlist = (max) => {\n let wishlist = [];\n for (let i=0; i<max; i++) {\n wishlist.push(faker.lorem.sentence());\n }\n return wishlist;\n};\n\nModules.server.generateWishlist = _generate_wishlist;\n\nMeteor.metho... | javascript | edit | 0 | 2 | mit | 3fc461c7427b9a883e4c2bb0230648fc2a77f425 | lnwKodeDotCom/WeWish,lnwKodeDotCom/WeWish | server/modules/generate-wishlist.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport nem from \"nem-sdk\";\n\nfunction PasswordInput() {\n 'ngInject';\n\n return {\n restrict:'E',\n scope: {\n \tcommon: '='\n },\n template: '<ng-include src=\"templatePasswordInput\"/>',\n ... | javascript | edit | 0 | 1 | mit | c6364cdec25535a69fc835f7f448870f81e9d698 | mizunashi/NanoWallet,mizunashi/NanoWallet | src/app/directives/passwordInput.directive.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Has Vowels\n * \n * hasVowel tests if the String calling the function has a vowels\n * \n * @param {void}\n * @return {Boolean} returns true or false indicating if the string\n * has a vowel or not\n */\nString.prototype.hasVowe... | javascript | edit | 0 | 1 | mit | e494ed7ba855be36cca325d398635e38f5bb7e0e | andela-oolutola/string-class,andela-oolutola/string-class | src/String.js | rejected_duplicate | Near-duplicate of sample 73455 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\npjax_config_page_require_auth(\"account/knowledgetest\", function(){\n return {\n onLoad: function() {\n KnowledgeTest.init();\n }\n };\n});\n\n\n```\n\nApply this change: Integrate with backend for status... | javascript | edit | 0 | 8 | apache-2.0 | 67eb5244817c1475a7f4832932cc59ae8daceded | junbon/binary-static-www2,junbon/binary-static-www2 | src/javascript/binary_japan/knowledge_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function () {\n var outputPath = \"./<%= outFolder %>/\";\n var src = \"./<%= srcFolder %>/\";\n\n var config = {\n vendor: {\n destPath: outputPath + \"js\",\n src: []\n },\... | javascript | edit | 0 | 1 | mit | 41f3e20cdd44942a0783739f31e7e261622d5113 | Kurtz1993/ngts-cli,Kurtz1993/ngts-cli,Kurtz1993/ngts-cli | templates/app/_gulpfile.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"The dynamic stylesheet language.\"\n});\n\nvar less = require('less');\nvar fs = require('fs');\n\nPackage.register_extension(\n \"less\", function (bundle, source_path, serve_path, where) {\n serve_... | javascript | edit | 0 | 2 | mit | e2eadee1d412885a701f2f7b25222d3762f696e2 | sclausen/meteor,qscripter/meteor,zdd910/meteor,zdd910/meteor,benstoltz/meteor,planet-training/meteor,framewr/meteor,benstoltz/meteor,kengchau/meteor,LWHTarena/meteor,johnthepink/meteor,judsonbsilva/meteor,somallg/meteor,chmac/meteor,lassombra/meteor,TribeMedia/meteor,Ken-Liu/meteor,sitexa/meteor,nuvipannu/meteor,shrop/... | packages/less/package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports._project = function(api, next){\n\n var mongoose = require('mongoose');\n\n var uri = process.env.MONGOLAB_URI\n || 'mongodb://localhost/forest';\n\n\n var orgSchema = {\n name: String,\n printers: [ mongoose.S... | javascript | edit | 0 | 2 | mit | abf757a2ee1b6f2c196627bd9b1c8f1374b04e3d | printerSystemCSI210/api-server | initializers/_project.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport './QuickStart.scss';\n\nconst QuickStart = () => (\n <div className=\"quick-start\">\n <h1>Documentation</h1>\n <p className=\"quick-start-hint\">New to Skygear?</p>\n <p>\n <form action... | javascript | edit | 0 | 1 | mit | 420127e99561a75e87e6ef77805063c514aaa039 | ben181231/skygear-doc,ben181231/skygear-doc,ben181231/skygear-doc | pages/home/QuickStart.js | rejected_duplicate | Near-duplicate of sample 76500 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst React = require('react')\n\nconst Search = React.createClass({\n propTypes: {\n value: React.PropTypes.string.isRequired,\n handleQueryChange: React.PropTypes.func.isRequired,\n },\n\n getInitialState () {\n return {\n... | javascript | edit | 0 | 2 | mit | 2e150a8214e181730cce297b2e0fcf3a7965cec0 | tinytacoteam/zazu,tinytacoteam/zazu | app/components/search.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPrism.languages.python= { \n\t'comment': {\n\t\tpattern: /(^|[^\\\\])#.*?(\\r?\\n|$)/g,\n\t\tlookbehind: true\n\t},\n\t'string': /\"\"\"[\\s\\S]+?\"\"\"|(\"|')(\\\\?.)*?\\1/g,\n\t'keyword' : /\\b(as|assert|break|class|continue|def|del|e... | javascript | edit | 0 | 0 | mit | 4166b2fdd2b701b67b7cad78eb1de9b7a1e52555 | Conaclos/prism,murtaugh/prism,codedogfish/prism,Golmote/prism,iwatakeshi/prism,iwatakeshi/prism,UnityTech/prism,MakeNowJust/prism,1st1/prism,RobLoach/prism,mcanthony/prism,desertjim/prism,danielberkompas/prism,UnityTech/prism,Golmote/prism,markcarver/prism,desertjim/prism,PrismJS/prism,mooreInteractive/prism,lgiraudel/... | components/prism-python.js | rejected_duplicate | Near-duplicate of sample 90167 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport preloadDataMixin from '../mixins/preload_data';\n\nexport default Ember.Route.extend(preloadDataMixin, {\n cordova: Ember.inject.service(),\n\n beforeModel() {\n Ember.run(() => this.controllerFor... | javascript | edit | 0 | 6 | mit | c30f509fe6de4b9a3c10327cf675e22b49ca2cc5 | crossroads/shared.goodcity,crossroads/shared.goodcity | app/routes/post_login.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('koastAdminApp.core.constants', [])\n .factory('constants', function() {\n return {\n adminPath: 'http://localhost:3000/admin',\n // TODO make this a server side configuration option and add... | javascript | edit | 0 | 1 | mit | 92ea30a750cc604cf72df36d8a18a95eb52946e6 | rangle/koast-admin-app | src/app/core/constants/constants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function( angular ) {\n 'use strict';\n\n angular.module('angular-humanize', []).\n filter('humanizeFilesize', function () {\n return function ( input, decimals, decPoint, thousandsSep ) {\n if ( isNaN(parseInt(input))... | javascript | edit | 0 | 6 | mit | 5593f17adeb3e8e0e8342aa807c97593ad87884c | sirap-group/angularjs-humanize,rbecheras/angularjs-humanize,rbecheras/angularjs-humanize,sirap-group/angularjs-humanize | src/angular-humanize.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar swig = require('swig');\n\nswig.setDefaults({\n cache: false\n});\n\nmodule.exports = function(data, locals){\n return swig.render(data.text, {\n locals: locals,\n filename: data.path\n });\n};\n```\n\nApply this change: Ma... | javascript | edit | 0 | 1 | mit | 6d75199c8a7c31556b6c08d66775ee2f875b8868 | G-g-beringei/hexo,delkyd/hexo,luodengxiong/hexo,elegantwww/hexo,DevinLow/DevinLow.github.io,ppker/hexo,SaiNadh001/hexo,zhangg/hexo,r4-keisuke/hexo,zongkelong/hexo,liuhongjiang/hexo,hugoxia/hexo,maominghui/hexo,fuchao2012/hexo,JasonMPE/hexo,aulphar/hexo,wangjordy/wangjordy.github.io,wenzhucjy/hexo,kennethlyn/hexo,zhi1on... | lib/plugins/renderer/swig.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Obtain ALL anchors on the page.\nvar links = document.links;\n\n// The previous/next urls if they exist.\nvar previous = findHref(\"prev\");\nvar next = findHref(\"next\");\n\n/**\n * Find the href for a given name.\n * @param {Strin... | javascript | edit | 0 | 5 | mit | 99a504052b88d736944dd507d36fa8e6b822660c | jawrainey/leftyrighty | content.js | rejected_duplicate | Near-duplicate of sample 94742 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Loaded ready states\nconst loadedStates = ['interactive', 'complete'];\n\n// Return Promise\nmodule.exports = (cb, doc) => new Promise(resolve => {\n\t// Allow doc to be passed in as the lone first param\n\tif (cb && typeof cb !== 'f... | javascript | edit | 0 | 5 | mit | 7b3d58e1a8f357954a131fcc313a1e11888fe849 | lukechilds/when-dom-ready | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function mutableProxyFactory(defaultTarget) {\n let mutableHandler;\n let mutableTarget;\n\n function setTarget(target) {\n if (!(target instanceof Object)) {\n throw new Error(`Target \"${target}\" is not an... | javascript | edit | 0 | 3 | mit | 5ca3f353dabbd9f0d44277f8ecba6a895a4a4468 | Griffingj/mutable-proxy | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { map } from 'lodash';\nimport { displayUserInfo, displayCityState } from '../../helpers';\n\nconst UserInformation = (props) => (\n <div>\n {props.user.length ?\n <div className=\"container -... | javascript | edit | 0 | 4 | mit | 1a596251f5d13bdf38b010a010b02a3fcaefd053 | DoSomething/rogue,DoSomething/rogue,DoSomething/rogue | resources/assets/components/Users/UserInformation.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nimport assign from 'lodash.assign';\nimport ResultList from './result-list';\n\nconst requiredDefaults = {\n page: 1,\n per_page: 20,\n};\n\nconst pixabayjs = {\n _auth: {},\n\n _makeConfig: function(url, opts) {\n ... | javascript | edit | 0 | 1 | mit | acbd27582dd9c9ff1572fe06d37d740452a6631d | yola/pixabayjs | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nexports.NOT_IMPLEMENTED = function (target, nameForErrorMessage) {\n return function () {\n var raise = target ? target.raise : this.raise;\n raise.call(this, \"error\", \"NOT IMPLEMENTED\" + (nameForErrorMessa... | javascript | edit | 0 | 6 | mit | 770088f5505b3e26347373909f03c000a63e6374 | janusnic/jsdom,Ye-Yong-Chi/jsdom,mbostock/jsdom,AshCoolman/jsdom,selam/jsdom,mzgol/jsdom,nicolashenry/jsdom,kevinold/jsdom,nicolashenry/jsdom,sebmck/jsdom,susaing/jsdom,evanlucas/jsdom,snuggs/jsdom,mzgol/jsdom,Joris-van-der-Wel/jsdom,beni55/jsdom,kevinold/jsdom,cpojer/jsdom,aduyng/jsdom,evdevgit/jsdom,aduyng/jsdom,tmpv... | lib/jsdom/browser/utils.js | rejected_duplicate | Near-duplicate of sample 70135 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport postcss from 'postcss';\nimport Core from 'css-modules-loader-core';\nimport Parser from 'css-modules-loader-core/lib/parser';\nimport FileSystemLoader from 'css-modules-loader-core/lib/file... | javascript | edit | 0 | 3 | mit | 5804f9be7d4fbe5a5347cd65c15d4d66dfef6cfd | css-modules/postcss-modules,outpunk/postcss-modules | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar saikuWidgetComponent = BaseComponent.extend({\n\n\tupdate : function() {\n\t\tvar myself=this;\n\t\tvar htmlId = \"#\" + myself.htmlObject;\n\t\tif (myself.saikuFilePath.substr(0,1) == \"/\") {\n\t\t\tmyself.saikuFilePath = myself.s... | javascript | edit | 0 | 6 | apache-2.0 | 876213b3cbce67e0272a66e10cd269a34c5e7190 | newenter/saiku,OSBI/saiku,qixiaobo/saiku-self,newenter/saiku,newenter/saiku,qixiaobo/saiku-self,OSBI/saiku,OSBI/saiku,OSBI/saiku,OSBI/saiku,customme/saiku,customme/saiku,customme/saiku,qixiaobo/saiku-self,newenter/saiku,qixiaobo/saiku-self,customme/saiku | saiku-bi-platform-plugin-p5/src/main/plugin/components/saikuWidget/SaikuWidgetComponent.js | rejected_duplicate | Near-duplicate of sample 75978 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('babel/register')({\n ignore: false,\n only: /.+(?:(?:\\.es6\\.js)|(?:.jsx))$/,\n extensions: ['.js', '.es6.js', '.jsx' ],\n sourceMap: true,\n});\n\n// lib\nrequire('./lib/titleCase');\nrequire('./lib/formatDifference');\n\... | javascript | edit | 0 | 0 | mit | 06fa595c5552c3584815d86175663a12d6ead5fa | uzi/reddit-mobile,curioussavage/reddit-mobile,madbook/reddit-mobile,DogPawHat/reddit-mobile,uzi/reddit-mobile,uzi/reddit-mobile,DogPawHat/reddit-mobile,madbook/reddit-mobile,curioussavage/reddit-mobile,madbook/reddit-mobile | test/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* German translation for the jQuery Timepicker Addon */\n/* Written by Michał Pena */\n(function($) {\n\t$.timepicker.regional['pl'] = {\n\t\ttimeOnlyTitle: 'Wybierz godzinę',\n\t\ttimeText: 'Czas',\n\t\thourText: 'Godzina',\n\t\tminut... | javascript | edit | 0 | 1 | mit | 95ee51ea2400d8a30b61adce05b0288652235ec7 | Jaspersoft/jQuery-Timepicker-Addon,Youraiseme/jQuery-Timepicker-Addon,Jaspersoft/jQuery-Timepicker-Addon,pyonnuka/jQuery-Timepicker-Addon,gaissa/jQuery-Timepicker-Addon,brenosilver/jQuery-Timepicker-Addon,pyonnuka/jQuery-Timepicker-Addon,ssyang0102/jQuery-Timepicker-Addon,brenosilver/jQuery-Timepicker-Addon,trentrichar... | localization/jquery-ui-timepicker-pl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar PluginDependency = require('../../models/pluginDependency');\nvar resolveVersion = require('../resolveVersion');\n\ndescribe('resolveVersion', function() {\n it('must skip resolving and return non-semver versions', function(done)... | javascript | edit | 0 | 1 | apache-2.0 | e2e0ca3f0585ab245bae91c7a48178454fe96a44 | strawluffy/gitbook,GitbookIO/gitbook,gencer/gitbook,gencer/gitbook,tshoper/gitbook,tshoper/gitbook | lib/plugins/__tests__/resolveVersion.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { join } from 'path'\nimport assert from 'yeoman-assert'\nimport helpers from 'yeoman-test'\nimport pify from 'pify'\nimport test from 'ava'\n\ntest('generates expected files', async t => {\n await pify(helpers.testDirectory)(jo... | javascript | edit | 0 | 1 | mit | e3c9a45adf6d1d339dee4f370752b3271117bc53 | wyze/generator-wyze-nm | test/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2015-2017 Steven Soloff\n *\n * This is free software: you can redistribute it and/or modify it under the\n * terms of the MIT License (https://opensource.org/licenses/MIT).\n * This software comes with ABSOLUTELY N... | javascript | edit | 0 | 1 | mit | f1ff39a9ddc93b1c24c080b536e608c75dad0d32 | ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js | test/server/middleware/correlation-id.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n var getRecipeEvent = function(apiRequest){\n $('.container').on('click', '.recipe-container', function(event) {\n var $target = $(event.target);\n var recipeId = $target.closest('.recipe-container')[0].dataset.recipeid;\n api... | javascript | edit | 0 | 1 | mit | 80a66fe8bc8faf3a556486c212d0b7a7beae55fd | danasselin/line-cook,danasselin/line-cook,nyc-rock-doves-2015/line-cook,danasselin/line-cook,nyc-rock-doves-2015/line-cook,danasselin/line-cook,danasselin/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,danasselin/line-cook,nyc-rock-doves-2015/line-cook,danasselin/lin... | workshop/www/js/ClickListeners.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport OsfAdapter from './osf-adapter';\nimport Ember from 'ember';\n\nexport default OsfAdapter.extend({\n findHasMany(store, snapshot, url, relationship) {\n var id = snapshot.id;\n var type = snapshot.modelName;\n\n ... | javascript | edit | 0 | 0 | apache-2.0 | b05662b9ef789d58867ce62de041ce59434107c7 | baylee-d/ember-osf,CenterForOpenScience/ember-osf,baylee-d/ember-osf,jamescdavis/ember-osf,binoculars/ember-osf,CenterForOpenScience/ember-osf,jamescdavis/ember-osf,binoculars/ember-osf | addon/adapters/user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Gulp = require('gulp'),\n\n Linoleum = require('linoleum');\n\nvar $jsFiles = Linoleum.jsFiles;\nLinoleum.jsFiles = function() {\n return $jsFiles().concat('tasks/*.js', 'index.js');\n};\n\nrequire('./index');\n\nGulp.task('buil... | javascript | edit | 0 | 1 | mit | b501809dc65e10454c15a871301b9791ac53202d | kpdecker/linoleum-node | Gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Create `window.describe` etc. for our BDD-like tests.\nmocha.setup({ui: 'bdd'});\nmocha.reporter('html');\n\n// Create another global variable for simpler syntax.\nwindow.expect = chai.expect;\n\n```\n\nApply this change: Add chai.sh... | javascript | edit | 0 | 0 | apache-2.0 | 95e83e97d10964c5463dcded647d096bbdb5acbf | despairblue/scegratoo | test/vendor/scripts/test-helper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $(\".delete-comment\").click(function(){\n var form = $(this).parent().find('form');\n form.submit();\n });\n \n $(\".redirection-button\").click(function(){\n var path =... | javascript | edit | 0 | 1 | mit | a1c9b93751265f56e22dd32537763ea79486a05f | kboard/kboard,cjh5414/kboard,hyesun03/k-board,guswnsxodlf/k-board,cjh5414/kboard,kboard/kboard,hyesun03/k-board,guswnsxodlf/k-board,kboard/kboard,cjh5414/kboard,guswnsxodlf/k-board,hyesun03/k-board,darjeeling/k-board | kboard/static/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This is a karma config file. For more details see\n// http://karma-runner.github.io/0.13/config/configuration-file.html\n// we are also using it with karma-webpack\n// https://github.com/webpack/karma-webpack\n\nvar webpackConfig... | javascript | edit | 0 | 1 | mit | 42ace408bcf62cb0c3bb873f9ab00323f923c21e | nus-mtp/sashimi-note,nus-mtp/sashimi-note,nus-mtp/sashimi-note | sashimi-webapp/test/unit/karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport type { RelativeUserInfo } from '../types/user-types';\nimport type { RelativeMemberInfo } from '../types/thread-types';\n\nimport ashoat from '../facts/ashoat';\nimport friends from '../facts/friends';\n\nfunction str... | javascript | edit | null | null | bsd-3-clause | 4f3e6ab6c46b4332bab3d61f6fa75cda3c5579fa | Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal | lib/shared/user-utils.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst meetOrSliceTypes = {\n meet: 0,\n slice: 1,\n none: 2,\n};\n\nconst alignEnum = [\n \"xMinYMin\",\n \"xMidYMin\",\n \"xMaxYMin\",\n \"xMinYMid\",\n \"xMidYMid\",\n \"xMaxYMid\",\n \"xMinYMax\",\n \... | javascript | edit | 0 | 7 | mit | fe85f9e66d9dcf5a05a5eb989e10740c4aea254e | magicismight/react-native-svg,magicismight/react-native-svg,react-native-community/react-native-svg,react-native-community/react-native-svg,msand/react-native-svg,react-native-community/react-native-svg,magicismight/react-native-svg,magicismight/react-native-svg,msand/react-native-svg,magicismight/react-native-svg,magi... | lib/extract/extractViewBox.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Main Module for searchthedocs demo\ndefine(function (require) {\n var _ = require('underscore'),\n $ = require('jquery'),\n SearchTheDocsView = require('searchthedocs/src/searchthedocs');\n\n var searchthedocs_main = function... | javascript | edit | 0 | 1 | mit | b980aa73e21676414e9ac75d7138483d1de922a6 | searchthedocs/searchthedocs-rtd,searchthedocs/searchthedocs-rtd | app/static/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport SimpleSchema from 'simpl-schema';\n\n/*\n\nLook for type name in a few different places\nNote: look into simplifying this\n\n*/\nexport const isIntlField = fieldSchema => {\n const typeProperty = fieldSchema.type;\n let type;\n... | javascript | edit | 0 | 3 | mit | 466e2bc2a8defac8a75bab7c1c65854ff480c551 | Discordius/Telescope,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2 | packages/vulcan-lib/lib/modules/intl.js | rejected_duplicate | Near-duplicate of sample 67678 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport moment from 'moment';\n\nimport { Posts } from '../../api/collections';\n\nconst seedPosts = () => {\n const post = Posts.findOne();\n\n if (!post) {\n for (let i = 0; i < 50; i++) {\n Posts.insert({\n userId: 'Q... | javascript | edit | 0 | 3 | apache-2.0 | 6f608f696783634589b6e610ab95ef0b885dfa6e | evancorl/portfolio,evancorl/skate-scenes,evancorl/skate-scenes,evancorl/portfolio,evancorl/portfolio,evancorl/skate-scenes | imports/server/seed-data/seed-posts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar dbr = require('./build/Release/dbr');\nvar v4l2camera = require(\"v4l2camera\");\nvar barcodeTypes = 0x3FF | 0x2000000 | 0x8000000 | 0x4000000; // 1D, QRCODE, PDF417, DataMatrix\n\nvar cam = new v4l2camera.Camera(\"/dev/video0\");\n... | javascript | edit | 0 | 2 | mit | 692a9dfa1c13cfae5c7e93866339fb5c88e65a47 | dynamsoftlabs/raspberry-pi-nodejs-barcode-reader-,dynamsoftlabs/raspberry-pi-nodejs-barcode-reader-,dynamsoftlabs/raspberry-pi-nodejs-barcode-reader-,dynamsoftlabs/raspberry-pi-nodejs-barcode-reader- | camera_barcode_reader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst authHandler = require('./auth-handler'),\n sessionHandler = require('./session-handler');\n\nfunction connectionHandler(client, clientInfo){\n\tlet user = {};\n\tuser.keys = [];\n\n\tclient.on('authentication', (context) => {... | javascript | edit | 0 | 1 | isc | a351adb9a02fd9979e5785af2d5caf48065a2eff | hashbang/new.hashbang.sh,hashbang/new.hashbang.sh | lib/ssh/connection-handler.js | rejected_duplicate | Near-duplicate of sample 82222 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Sentences should be preceded by a space\n\nvar tokenize = require(\"../tokenize\");\nvar levels = require(\"../levels\");\nvar english = require(\"tokenize-english\")(tokenize);\n\nmodule.exports = tokenize.check(\n // Tokenize as... | javascript | edit | 0 | 4 | apache-2.0 | 5650e40da0f98008a86ab01d69325ad36882e539 | GitbookIO/rousseau | lib/en/sentence-start.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { createStore, applyMiddleware } from 'redux'\nimport { Provider } from 'react-redux'\nimport createSagaMiddleware from 'redux-saga'\nimport 'tachyons/css/tachyons.min.css'\n\nimport { ShellContainer } ... | javascript | edit | 0 | 1 | mit | 4222aea93590baa17473526144b09a85ec1ed4e7 | joelgeorgev/file-hash-verifier,joelgeorgev/file-hash-verifier | src/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nconst symbol = require('../utilities/symbol');\n\nlet experiments = {\n MODULE_UNIFICATION: symbol('module-unification'),\n};\n\nObject.freeze(experiments);\n\nmodule.exports = experiments;\n\n```\n\nApply this change: D... | javascript | edit | 0 | 0 | mit | 46b38f990afb4d6af0d45b5467f2f089b556eedf | balinterdi/ember-cli,ember-cli/ember-cli,sivakumar-kailasam/ember-cli,raycohen/ember-cli,mike-north/ember-cli,kellyselden/ember-cli,HeroicEric/ember-cli,mike-north/ember-cli,fpauser/ember-cli,patocallaghan/ember-cli,Turbo87/ember-cli,HeroicEric/ember-cli,Turbo87/ember-cli,patocallaghan/ember-cli,jrjohnson/ember-cli,gfv... | lib/experiments/index.js | rejected_duplicate | Near-duplicate of sample 77500 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\njQuery(document).ready( function($) {\n\t\n\tfunction resizeTree() {\n\t $('#fileTree').height($(window).height());\n\t // window.top.console.debug('resize', $(window).width(), $(window).height());\n\t}\n \n function onFileC... | javascript | edit | 0 | 1 | mit | 611eb17e6d61dd98c3864652e4543c5c76d697aa | marcuswestin/alderaan,marcuswestin/alderaan | js/bespin/tree/init.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n actions: {\n setKontaktinfoGruppeById: function (id) {\n var model = this.get('model');\n if (Ember.typeOf(model.setKontaktinfoGruppeById) === 'functi... | javascript | edit | 0 | 2 | mit | 0a9db3c329175d3db9ad75553f0c07e6d2fecf9e | Turistforeningen/Hytteadmin,Turistforeningen/Hytteadmin | client/app/components/dnt-hytteadmin-editor-section-kontakt.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @fileoverview WebGL.js - Set up WebGL context\n * @author Ben Brooks (<EMAIL>)\n * @version 1.0\n */\n\n/**\n * Initialise the WebGL context and return it\n * @params canvas - HTML5 Canvas element\n */\nfunction initWebGL(canvas... | javascript | edit | 0 | 4 | mit | 709a282e95f0bbe4fe45616780e8f7032a5fb83f | bbrks/webgl-orrery,bbrks/webgl-orrery | res/WebGL.js | rejected_duplicate | Near-duplicate of sample 87192 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\nvar args = ['jar', 'username', 'password']\n\nraw function login (jar, username, password)\n\nexported function login ()\n check number of arguments if necessary\n options object: login(arguments[0])\n individual arguments:\n... | javascript | edit | 0 | 7 | mit | aa1677defe0e68126efb362a1184310b5cd5cb93 | sentanos/roblox-js,FroastJ/roblox-js,OnlyTwentyCharacters/roblox-js | lib/util/wrap.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar build = require('./build/build.js'),\n version = require('./src/polarmap.js').version;\n\ndesc('Combine and compress PolarMap source files');\ntask('build', {async: true}, function (compsBase32, buildName) {\n var v;\n\n jake.e... | javascript | edit | 0 | 1 | bsd-2-clause | f0d80b076312e97f2233816ee6767df8ca7a434a | GeoSensorWebLab/polarmap.js,GeoSensorWebLab/polarmap.js,johan--/polarmap.js,johan--/polarmap.js | Jakefile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {\n getDashboards as getDashboardsAJAX,\n updateDashboard as updateDashboardAJAX,\n} from 'src/dashboards/apis'\n\nexport function loadDashboards(dashboards, dashboardID) {\n return {\n type: 'LOAD_DASHBOARDS',\n payload... | javascript | edit | 0 | 1 | mit | 9eeffb7b18e741e58a73c2abd011fd4bfa846029 | influxdb/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,li-ang/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,nooproblem/influxdb,nooproblem/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdata/influxdb,influxdata/influxd... | ui/src/dashboards/actions/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n //var route = Routing.generate('seen_userCardication', { id: {{ userCard.id }} });\n\n var $content = $('.userCardContent');\n var array = {};\n\n $('.userCardBlock').hide();\n\n $('.user... | javascript | edit | 0 | 1 | unlicense | 079e9063578db0363413deba7314a74238025873 | ariescdi/documentio,ariescdi/documentio | src/AppBundle/Resources/js/userCard.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// import Vue from 'vue'\n// import Hello from '@/components/Hello'\n\ndescribe('this test runner', () => {\n it('needs at least one test', () => {\n expect(true).to.equal(true)\n })\n})\n\n// describe('Hello.vue', () => {\n // it... | javascript | edit | 0 | 1 | mit | 0ee36fe6aa1911214d87bb5ca85f34a62f150580 | code-for-nashville/parcel,code-for-nashville/parcel,code-for-nashville/parcel | frontend/test/unit/specs/Hello.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\rvar cobs = require('../..'),\r fs = require('fs');\r\rvar runtime = {\r display: function() {\r var result = '';\r if (arguments && arguments.length)\r for (var k = 0; k < arguments.length; k++)\r ... | javascript | edit | null | null | mit | 6dafca6cf94bf82053d9218998f5cf960659f98b | ajlopez/CobolScript | samples/factorial/run.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n name: 'webpack-images',\n configure () {\n return {\n module: {\n loaders: [\n {\n test: /\\.(png|jpg|gif)$/,\n loader: 'url-loader?limit=8192&name=[name]-[hash].[ext]'\... | javascript | edit | 0 | 1 | mit | a72154e507b42bcd12feaabbea9602eb6c64d1a4 | saguijs/sagui,saguijs/sagui | src/configure/webpack/plugins/images.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Run the code contained in the file manager, by compiling everything and\n * executing the main class, then display the result.\n */\n/* global FileManager */\n\nfunction runCodeCheerp() {\n // Get the main class's actual name.... | javascript | edit | 0 | 3 | mit | aa968b2abf4171ea0b07a6a543d4c5631024346e | mrbdahlem/MyCode.run,mrbdahlem/MyCode.run | runcheerp.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction generateResults\n(\n recognitionResults,\n q,\n context\n)\n{\n var resultList = recognitionResults['com.solveforall.recognition.lang.chinese.Chinese'];\n\n if (!resultList)\n {\n return null;\n }\n \n return [{\n ... | javascript | edit | 0 | 2 | apache-2.0 | 40d0ad7a897cff8ff1aa60a22f74ee120e9f4bc6 | jtsay362/solveforall-example-plugins,jtsay362/solveforall-example-plugins | src/answer_generators/mdbg/generator.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar dbm = global.dbm || require('db-migrate');\nvar type = dbm.dataType;\n\nexports.up = function(db, callback) {\n db.createTable('users', {\n id: {\n type: 'int',\n primaryKey: true,\n unsigned: true,\n notNull... | javascript | edit | 0 | 1 | mit | 4ee5af4f741025379c648461f40f3943251dbd84 | meddle0x53/react-koa-gulp-postgres-passport-example,meddle0x53/react-webpack-koa-postgres-passport-example,meddle0x53/react-webpack-koa-postgres-passport-example,meddle0x53/react-koa-gulp-postgres-passport-example | migrations/20150824191630-add-users.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport classNames from 'classnames/dedupe';\nimport {Link} from 'react-router';\nimport React from 'react';\n\nclass PageHeaderTabs extends React.Component {\n render() {\n let {props: {tabs}} = this;\n\n let tabElements = tabs.m... | javascript | edit | 0 | 1 | apache-2.0 | c0e375921363a2581a5b3819078e01fe172b560d | dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui | src/js/components/NewPageHeaderTabs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (stackName, id) {\n\tif (typeof id === 'string') {\n\t\tid = this.idByFront(stackName, id)\n\t}\n\tthis.stacks[stackName][id].wrong += 1\n}\n\n```\n\nApply this change: Make f.gotWrong() work with actual arrays... | javascript | edit | 0 | 2 | isc | 7958aeaebae2e082e4b38bbde1196ea2689c92cc | jamescostian/flashcardz | lib/stats/got-wrong.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright (c) 2015-2016 Yuya Ochiai\n// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\n/**\n * Default user preferences. End-users can change these parameters by editi... | javascript | edit | 0 | 0 | apache-2.0 | ac8c692c45e343eda9a576fb40f29317be92bf52 | mattermost/desktop,yuya-oc/electron-mattermost,yuya-oc/electron-mattermost,mattermost/desktop,yuya-oc/electron-mattermost,mattermost/desktop,mattermost/desktop,yuya-oc/desktop,yuya-oc/desktop,mattermost/desktop,yuya-oc/desktop | src/common/config/defaultPreferences.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Qux = (function () {\n 'use strict';\n\n function Qux () {\n this.events = {};\n }\n\n var uid = -1;\n\n Qux.prototype.publish = function (ev, data) {\n if (typeof this.events[ev] === 'undefined') {\n return false;\n... | javascript | edit | 0 | 4 | mit | 1fb5dd1b4ea489bb3de3942352480bced07e5938 | ultranaut/qux | src/qux.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar DisplayLeaderboard = require('./display-leaderboard');\nconst $ = require('jquery');\n\nfunction DisplayMessage(){\n this.element = $('#post-game');\n}\n\nDisplayMessage.prototype.showWinMessage = function(){\n var div = this.elem... | javascript | edit | 0 | 2 | mit | 33a3ba258d43af45e24370eaea2589aaae67f400 | plato721/lights-out,plato721/lights-out | lib/display-message.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst LifeforcePlugin = require(\"../utils/LifeforcePlugin.js\");\n\nclass SlackBot extends LifeforcePlugin {\n constructor(restifyserver, logger, name) {\n super(restifyserver, logger, name);\n this.apiMap = [\n ... | javascript | edit | 0 | 2 | mit | b9f1d530476f25baf38feeac29634be6a3b74a89 | repkam09/repka-lifeforce,repkam09/repka-lifeforce,repkam09/repka-lifeforce | plugins/slack.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nvar expect = require('expect.js')\nvar fs = require('fs')\nvar path = require('path')\nvar sshConfig = require('..')\n\n\ndescribe('ssh-config', function() {\n var fixture = fs.readFileSync(path.join(__dirname, 'fixture... | javascript | edit | 0 | 1 | mit | cb5581744dc7503b29b52996c741723552e89c7f | dotnil/ssh-config | test/test.ssh-config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport 'react-native';\nimport React from 'react';\nimport App from '../App';\n\n// Note: test renderer must be required after react-native.\nimport renderer from 'react-test-renderer';\n\nit('renders correctly', () => {\n const tree =... | javascript | edit | 0 | 1 | mit | 3375cd1c123c1748a60aa99a642d9c6e662e65e1 | pH200/cycle-react | examples/native/hello/__tests__/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport Colours from '../../modules/colours';\n\nconst Colour = (props) => {\n var colour = props.colour;\n\n if (props.format === 'rgb') {\n var rgb = Colours.hexToRgb(colour.substring(1, 7));\n\n c... | javascript | edit | 0 | 2 | mit | f853cacdb9479d302e30e59c2e190b77f9a81cc0 | arkon/ColourNTP,arkon/ColourNTP | src/scripts/components/colour/Colour.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst rethinkDB = require('rethinkdb');\nconst program = require('commander');\nconst log = require('./log');\n\nvar worldDB = 'labyrinth';\n\n\nif (require.main === module) {\n program\n .version('0.0.1')\n .option(... | javascript | edit | 0 | 2 | mit | 6d5ab9cfe13a7f6126e8eb15d1b31a33bea75923 | nobus/Labyrinth,nobus/Labyrinth | server/worldGenerator.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar fs = require('fs');\n\nvar version = JSON.parse(fs.readFileSync(\"./package.json\")).version;\nvar tag = \"truecar/gluestick:\" + version;\n\nvar dockerfile = [\n \"# DO NOT MODIFY\",\n ... | javascript | edit | 0 | 0 | mit | 9ee199d4d6e08e8a2c7b12fee4c0b1b62dc5bc37 | TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick | docker/generate-dockerfile.js | rejected_duplicate | Near-duplicate of sample 87834 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar childProcess = require('child_process');\nvar fs = require('fs');\n\nprocess.chdir('examples');\nchildProcess.execSync('npm install', { stdio: 'inherit' });\nchildProcess.execSync('npm run update', { stdio: 'inherit' });\nprocess.ch... | javascript | edit | 0 | 0 | bsd-3-clause | c429bbab8a4ac3d9d637af8bc8cb10759ea65f5a | jupyter/jupyter-js-notebook,jupyter/jupyter-js-notebook,blink1073/jupyter-js-notebook,jupyter/jupyter-js-notebook,blink1073/jupyter-js-notebook,blink1073/jupyter-js-notebook,blink1073/jupyter-js-notebook,jupyter/jupyter-js-notebook,blink1073/jupyter-js-notebook,jupyter/jupyter-js-notebook | scripts/buildexamples.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { assert } from 'chai';\nimport citySuggestionFormatter from 'helpers/citySuggestionFormatter';\n\ndescribe('citySuggestionFormatter', () => {\n context('for a suggestion without name', () => {\n const suggestion = { zips: [1... | javascript | edit | 0 | 1 | apache-2.0 | e30e1eef1f324382992e8164c78bdb093100a890 | iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend | test/helpers/citySuggestionFormatter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar log = require('util/log');\n\nfunction attachMiddleware(maxSize) {\n return function bodyDecoder(req, res, next) {\n var cl, bodyLen = 0;\n req.buffer = '';\n cl = req.headers['content-length'];\n\n if (cl) {\n cl ... | javascript | edit | 0 | 3 | apache-2.0 | 03278cc191d9dea00ad8406a3e57c6c05f82eec0 | cloudkick/cast,cloudkick/cast,cloudkick/cast,cloudkick/cast | lib/http/middleware/body-size-limiter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar chai = require('chai');\nvar Bluebird = require('bluebird');\nvar chaiAsPromised = require('chai-as-promised');\nvar localStorageService = require('../local-storage-service');\nvar expect = chai.expect;\n\nchai.use(chaiAsPromised);\... | javascript | edit | 0 | 2 | mit | cd54817b284878f7f23f82454558af1d4c84ff0a | webkom/vote,webkom/vote,webkom/vote,webkom/vote | features/step_definitions/electionSteps.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n'use strict'\nvar meow = require('meow')\nvar hacktoberFest = require('./main.js')\n\nconst cli = meow({\n flags: {\n year: {\n type: 'number',\n alias: 'y',\n default: 0,\n },\n help: {\n... | javascript | edit | 0 | 1 | mit | be765c9052ebd6d38663d13bf1468fc0fa6201ad | MatejMecka/HacktoberfestStats | cli.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express'), app = express(), swig = require('swig');\nvar bodyParser = require('body-parser');\nvar https = require('https'), config = require('./config');\n\napp.engine('html', swig.renderFile);\n\napp.set('view e... | javascript | edit | 0 | 3 | mit | cf96d6eb1814efa7330b71432920b928c0191bb6 | iveysaur/PiCi | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Observable } from 'rxjs/Observable';\nimport { LOCATION_CHANGE } from 'react-router-redux';\nimport { ajax } from 'rxjs/observable/dom/ajax';\nimport * as ActionTypes from '../actionTypes';\n\nexport default function searchUser... | javascript | edit | 0 | 2 | mit | c2dfec82e9d5a3157c9c82de5e74407fc584d94d | redux-observable/redux-observable,blesh/redux-observable,jesinity/redux-observable,redux-observable/redux-observable,jesinity/redux-observable,redux-observable/redux-observable,jesinity/redux-observable,blesh/redux-observable | examples/navigation/epics/searchUsers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Slack = require('slack-node');\napiToken = process.env.SLACK_TOKEN;\nslack = new Slack(apiToken);\n\nvar channel = process.argv[2] ? \"#\"+process.argv[2] : '#kollegorna-ivan';\n\nconsole.log(channel);\n\nvar postMessage = function ... | javascript | edit | 0 | 1 | mit | 7a0e7e56f7d70974c0c906085c884b76aac9bf3e | kollegorna/weatherbot | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ForgotValidator = Ember.Object.create({\n check: function (model) {\n var data = model.getProperties('email'),\n validationErrors = [];\n\n if (!validator.isEmail(data.email)) {\n validationErr... | javascript | edit | 0 | 2 | mit | d86711e09d4a5c8b10c46b3e67a08027b448b3de | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost | ghost/admin/validators/forgotten.js | rejected_duplicate | Near-duplicate of sample 69067 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction startup() {\n var myPanel = document.getElementById(\"my-panel\");\n myPanel.label = \"Tor Enabled\";\n myPanel.style.color = \"green\";\n}\n\nfunction onClickHandler(event) {\n switch(event.which) {\n case 1:\n ale... | javascript | edit | 0 | 2 | bsd-2-clause | 2f2c6b69381473552c09f85823f245e9dc5eead9 | DigiThinkIT/TorBirdy,ioerror/torbirdy,viggyprabhu/torbirdy,kartikm/torbirdy,DigiThinkIT/TorBirdy,infertux/torbirdy,u451f/torbirdy,u451f/torbirdy,kartikm/torbirdy,viggyprabhu/torbirdy,ioerror/torbirdy,infertux/torbirdy | chrome/content/overlay.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { createStore, combineReducers, compose } from 'redux';\nimport { provide } from 'react-redux';\nimport * as reducers from './_reducers';\nimport { devTools, persistState } from 'redux-devtools';\nimpo... | javascript | edit | 0 | 1 | mit | 13dae0065fa4b26ef2e8d445ba28bf7f48b00b67 | binary-com/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,qingweibinary/binary-next-gen,nuruddeensalihu/binary-next-gen,qingweibinary/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary... | app/root.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\r\n\r\nexport default DS.RESTAdapter.extend({\r\n namespace: 'api',\r\n\r\n // /**\r\n // Get all employees from API\r\n // @method download\r\n // @return {Promise} resolves to `RecordArray`\r\n ... | javascript | edit | 0 | 0 | mit | 1c9c2763e16d9c176fab4a45616dbc8d4e5c02ac | msm-app-devs/intranet-app,msm-app-devs/intranet-app | app/adapters/employee.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst BaseRepository = require('@gfcc/mongo-tenant-repository/BaseRepository');\n\nclass ReleaseNotesRepository extends BaseRepository {\n getSchemaDefinition() {\n const MixedType = this.getSchemaTypes().Mixed;\n\n... | javascript | edit | 0 | 2 | mit | 2679bf719318c6eeacbdf4fc8726f6129ebcda52 | release-notes/release-notes-hub,release-notes/release-notes-hub | repositories/ReleaseNotesRepository.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport const osxMenu = (app, window, openAbout) => (\n [{\n label: 'Daedalus',\n submenu: [{\n label: 'About',\n click() {\n openAbout();\n },\n }, {\n label: 'Quit',\n accelerator: 'Command+Q',... | javascript | edit | 0 | 1 | apache-2.0 | 343eb4ac8db46106418cb60d820d6ec33990e07e | input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus | source/main/menus/osx.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar noop = require('es5-ext/function/noop')\n , callable = require('es5-ext/object/valid-callable')\n , d = require('d')\n , DOMInput = require('../_composite')\n\n , getPrototypeOf = Object.getPrototypeO... | javascript | edit | 0 | 3 | mit | 2ae2e456c3cdfce40640e8b6827b43c733e09393 | medikoo/dbjs-dom | input/composites/_observable.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This file is here, in part, so that users whose code editors are\n// set to automatically format files with Prettier have a config to detect.\n// Many users only run Prettier when a config is present, so this file makes\n// sure one ... | javascript | edit | 0 | 0 | apache-2.0 | 82fa80d83d69ef63d7f1642234d88c75b8d026c6 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | .prettierrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar extractJSON = require('./extract-json');\n\nfunction getPreWithSource() {\n var childNodes = document.body.childNodes;\n var pre = childNodes[0];\n if (childNodes.length === 1 && pre.tagName === \"PRE\") return pre\n return null... | javascript | edit | 0 | 6 | mit | dcc5abe8709cf7ec9dfd0a30ed187d79b801e9a1 | tulios/json-viewer,tulios/json-viewer | extension/src/json-viewer/check-if-json.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Service from 'ember-service';\nimport { scheduleOnce } from 'ember-runloop';\nimport Ember from 'ember';\n\nconst ADDED_QUEUE = Ember.A();\nconst REMOVED_QUEUE = Ember.A();\n\nexport default Service.extend({\n portals: null,\n\n... | javascript | edit | 0 | 2 | mit | d0797bff3ff553a701f775e1925e576563690ae7 | minutebase/ember-portal,minutebase/ember-portal | addon/services/portal.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nmodule.exports = {\n help: (message, config) => {\n const p = config.prefix;\n message.channel.send(\n`\\`\\`\\`diff\n++ MUSIC COMMANDS ++\n${p}play URL - Plays a song at a YouTube URL.\n${p}stop - Interrupts the ... | javascript | edit | 0 | 1 | mit | a75fc69d414f94a2ebf1d5762a1e5f5c4e6fe43f | Rafer45/soup | commands/help_commands.js | rejected_duplicate | Near-duplicate of sample 88928 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst $ = require('jquery');\n\nfateBus.subscribe(module, 'fate.init', function() {\n GM_addStyle(GM_getResourceText('fateOfAllFoolsCSS'));\n});\n\n// Remove the subclass icons\nfateBus.subscribe(module, 'fate.refresh', function() {\n ... | javascript | edit | 0 | 1 | mit | a6971d097a2362f091a598a4b0443f3f76ddf443 | rslifka/fate_of_all_fools,rslifka/fate_of_all_fools | app/beautification.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Opening the first window and controller\nAlloy.Globals.openWindow(Alloy.Globals.menuOptions[0]);\n\n// From the slide-menu widget trigger this event to open every menu section\nTi.App.addEventListener('openSection', function(option) ... | javascript | edit | 0 | 2 | apache-2.0 | 1ece057bddc68153a3e1d5984f513497aa476d27 | dotCMS/dotcms-mobile-app,dotCMS/dotcms-mobile-app | app/controllers/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/* Controllers */\n\nvar cvAppControllers = angular.module('cvAppControllers', []);\n\ncvAppControllers.controller('HomeController', ['$scope', function($scope) {\n\t$scope.name = 'Elias';\n}]);\n\ncvAppControllers.cont... | javascript | edit | 0 | 1 | mit | 9a25d927548fe618d2e0f4b7294185c61fe8bf7a | RegularSvensson/cvApp,RegularSvensson/cvApp | app/js/controllers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport AuthenticatedRoute from 'ghost/routes/authenticated';\nimport PaginationRouteMixin from 'ghost/mixins/pagination-route';\nimport styleBody from 'ghost/mixins/style-body';\n\nvar paginationSettings,\n UsersIndexRoute;\n\npagina... | javascript | edit | 0 | 3 | mit | 9015ec8e6c39f21a57f54612fd9dc651e374534d | acburdine/Ghost-Admin,dbalders/Ghost-Admin,airycanon/Ghost-Admin,JohnONolan/Ghost-Admin,kevinansfield/Ghost-Admin,TryGhost/Ghost-Admin,acburdine/Ghost-Admin,kevinansfield/Ghost-Admin,TryGhost/Ghost-Admin,JohnONolan/Ghost-Admin,airycanon/Ghost-Admin,dbalders/Ghost-Admin | routes/settings/users/index.js | rejected_duplicate | Near-duplicate of sample 71417 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n bind : function (app) {\n\n app.get('/', function (req, res) {\n res.render('index');\n });\n\n // demo URL - essentially describing what the URL structure could be\n app.get('/property/PL20_7HE/25... | javascript | edit | 0 | 1 | mit | 27cad60ff3ec93e202e54fb1831a3254f70c3753 | LandRegistry/property-page-html-prototypes,LandRegistry/property-page-html-prototypes | app/routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* Russian translation for the jQuery Timepicker Addon */\n/* Written by Trent Richardson */\n(function($) {\n\t$.timepicker.regional['ru'] = {\n\t\ttimeOnlyTitle: 'Выберите время',\n\t\ttimeText: 'Время',\n\t\thourText: 'Часы',\n\t\tmi... | javascript | edit | 0 | 1 | mit | 26776afeb2568ea1a930b3d7d30141015c28aa57 | nicofrand/jQuery-Timepicker-Addon,ssyang0102/jQuery-Timepicker-Addon,trentrichardson/jQuery-Timepicker-Addon,gaissa/jQuery-Timepicker-Addon,ristovskiv/jQuery-Timepicker-Addon,ssyang0102/jQuery-Timepicker-Addon,nicofrand/jQuery-Timepicker-Addon,Youraiseme/jQuery-Timepicker-Addon,brenosilver/jQuery-Timepicker-Addon,breno... | localization/jquery-ui-timepicker-ru.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport titleScreen from 'titlescreen';\nimport Scene from 'scene';\nimport state from 'state';\nimport loop from 'loop';\nimport { updateInputs } from 'controls';\nimport { render } from 'ui';\nimport { clear } from 'pura/canvas/tuple';... | javascript | edit | 0 | 2 | mit | 7545e8064f5bcd05dfeefa446abe4529a4720cb6 | HyphnKnight/js13k-2017,HyphnKnight/js13k-2017 | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from \"ember\";\n\nlet alias = Ember.computed.alias;\nlet computed = Ember.computed;\n\nexport default Ember.Service.extend({\n cookies: alias('_fastbootInfo.cookies'),\n headers: alias('_fastbootInfo.headers'),\n host: ... | javascript | edit | 0 | 1 | mit | 420d98ab2e5120c45fd9a39f92308268fd04b92d | habdelra/ember-cli-fastboot,rwjblue/ember-cli-fastboot,josemarluedke/ember-cli-fastboot,kratiahuja/ember-cli-fastboot,kratiahuja/ember-cli-fastboot,ember-fastboot/ember-cli-fastboot,josemarluedke/ember-cli-fastboot,habdelra/ember-cli-fastboot,ember-fastboot/ember-cli-fastboot,tildeio/ember-cli-fastboot,rwjblue/ember-cl... | app/services/fastboot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function (err, data, pkgPath) {\n\tif (err) {\n\t\treturn 'Debug output: ' + JSON.stringify(Buffer.isBuffer(data) ? data.toString() : data) + '\\n' + err;\n\t}\n\n\tvar pipeWrap = function (items) {\n\t... | javascript | edit | 0 | 3 | apache-2.0 | a3b6923b20154acd28f2df99a01a08416074194a | dap/nsp-formatter-remarkup | src/formatter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nimport React, { Component } from 'react';\n\n// Bootstrap\nimport { Grid, Row, Col, Navbar, NavItem, Nav } from 'react-bootstrap';\n\nexport default class Header extends Component {\n render() {\n return(\n <Na... | javascript | edit | 0 | 1 | mit | dbd401be6bae38cf3590891b5a71f4c71c23cfdb | codeforamerica/nyc-january-project,codeforamerica/nyc-january-project | src/components/Header.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Rule to apply.\n *\n * @typedef {Object} Rule\n * @property {string} message - Rule message to be shown on violation.\n * @property {RuleChecker} check - Function that checks for violations.\n */\n\n\n/**\n * Rule checker functi... | javascript | edit | 0 | 0 | mit | 3c625f29e98160e6c0c047e348caac8c102c0e94 | eush77/js-comment-check | src/rules.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.