messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nimport cookie from 'react-cookies'\n\nexport const getToken = () => {\n return cookie.load('ritoplzToken')\n}\n\nexport const setToken = token => {\n return cookie.save('ritoplzToken', token, { path: '/' })\n}\n\nexpor... | javascript | edit | 0 | 1 | mit | bc0d8678061587e41cbddca89051ad6938827173 | Ritoplz/ritoplz | services/auth.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This is a manifest file used by the runner for JavaScript unit tests.\n// It is not used in the main application.\n//\n//= require govuk_toolkit\n//\n//= require_tree ./\n//= require_tree ./views\n\n```\n\nApply this change: Remove t... | javascript | edit | 0 | 0 | mit | a13896a0799b9d04105c6d32aaf7be03f19d7e1a | alphagov/frontend,alphagov/frontend,alphagov/frontend,alphagov/frontend | app/assets/javascripts/all.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar app = angular.module('openFDA', [\n 'templates', 'ngRoute', 'ngResource', 'directives', 'angular-flash.service',\n 'angular-flash.flash-alert-directive', 'ui.bootstrap'\n]);\n\napp.config([\n'$routeProvider', 'flashProvider', ... | javascript | edit | 0 | 4 | mit | aaf3227912ac99f8d44291d96535d614334257f3 | STSILABS/open-fda,STSILABS/fda-sandbox,STSILABS/fda-sandbox,STSILABS/open-fda,STSILABS/open-fda,STSILABS/open-fda,STSILABS/fda-sandbox,STSILABS/fda-sandbox,STSILABS/fda-sandbox,STSILABS/open-fda | app/assets/javascripts/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default class Notifier {\n constructor() {\n window.notification = window.Notification || window.mozNotification || window.webkitNotification;\n\n if ('undefined' === typeof window.notification) {\n alert('Web notific... | javascript | edit | 0 | 4 | mit | f24c1dae376e6c12c943a175376f506b16cf7f93 | aasare/panadora | frontend/services/notifier.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 keptSecurely: function (){\n //have they filled in the secure method?\n return !! (this.model.get('statement.secureMethodOne'));\n }.property('model.stateme... | javascript | edit | 0 | 1 | mit | 72f569fe57b27804db12e38794d00998e95cebba | Br3nda/priv-o-matic,OPCNZ/priv-o-matic,OPCNZ/priv-o-matic,Br3nda/priv-o-matic | app/components/step-statement.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/***\n\tIntro Screen Controller\n\tResponsible for handling the intro screen controls\n***/\ndefine(['require', 'jsclass/min/core', 'client/base/controller', 'client/models/model_top_images', 'client/configuration'], function (require) ... | javascript | edit | 0 | 1 | mit | 7b95e963a94c7046572f68701cdd842f8658cde2 | xaroth8088/tournament-of-lulz,xaroth8088/tournament-of-lulz,xaroth8088/tournament-of-lulz,xaroth8088/tournament-of-lulz | web_clients/javascript_mvc/www/js/client/widgets/screen_intro/controller_screen_intro.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n ... | javascript | edit | null | null | bsd-3-clause | a1c479fb3be674511131b46f856bc9b197a38cda | exponent/react-native,exponent/react-native,facebook/react-native,javache/react-native,exponentjs/react-native,hammerandchisel/react-native,hoastoolshop/react-native,javache/react-native,myntra/react-native,pandiaraj44/react-native,javache/react-native,hoangpham95/react-native,facebook/react-native,arthuralee/react-nat... | flow-github/metro.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nconst Projects = ({ projects, toggle, update }) => {\n return (\n <ul\n className=\"list-unstyled\"\n style={{ marginBottom: '0' }}\n >\n {projects.map(project => (\n <li\n ... | javascript | edit | 0 | 1 | mit | fc3fec00b7dfcb6d4d1b1c57af9ea54cc171b922 | nadavspi/UnwiseConnect,nadavspi/UnwiseConnect,nadavspi/UnwiseConnect | src/components/Tickets/ToggleProjects/Projects.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction parallax() {\n var scrolled = $(window).scrollTop();\n if (scrolled < 500) {\n $('.blog-header').css('background-position', '0px ' + (0.2 * scrolled) + 'px');\n }\n}\n$(window).scroll(parallax);\n\n(funct... | javascript | edit | 0 | 2 | mit | 8ee32a7857855f3901005c53725be4d171aa8fa3 | matachi/hesitant,matachi/hesitant | src/js/script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar pagination = require('hexo-pagination');\nvar _ = require('lodash');\n\nhexo.extend.generator.register('category', function(locals){\n var config = this.config;\n var categories = locals.data.categories;\n if (config.category_gen... | javascript | edit | 0 | 3 | mit | 9cc2bb7d69e0ed155a019a8bee9a1cb9b67274b2 | ahaasler/hexo-theme-colos,ahaasler/hexo-theme-colos | scripts/generators.js | rejected_duplicate | Near-duplicate of sample 76702 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Parse = require('parse/react-native')\nconst Person = require('./person-model')\n\nParse.initialize('hackathon')\nParse.serverURL = 'http://192.168.1.137:8080/parse'\n\nfunction updateLocation(uniqueId, isInOffice) {\n const inst... | javascript | edit | 0 | 1 | mit | 68baca90a0d16b9af30f1525962f5b3f65098be5 | catalinmiron/PeopleInTheOffice,catalinmiron/PeopleInTheOffice,catalinmiron/PeopleInTheOffice | src/lib/parse-main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by stas on 24.01.16.\n */\n'use strict';\n\nplayzoneServices.factory('WebsocketService', function($websocket) {\n var listeners = [];\n // Open a WebSocket connection\n var dataStream = $websocket('ws://localhos... | javascript | edit | 0 | 4 | mit | 23ef8a2a0b275820c40f1870f2e31716783e52db | StasPiv/playzone,StasPiv/playzone,StasPiv/playzone | frontend/js/services/websocket.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module(\"sim/Simulation.js\", [\n \"sim/model/Player.js\",\n \"sim/ui/ActionBar.js\",\n \"sim/ui/Explore.js\",\n \"sim/ui/Rest.js\",\n \"sim/ui/Status.js\"\n ]).\n controller(\"Simulation\", Simula... | javascript | edit | 0 | 2 | mit | a212b39506a5846b0e898e1c2ae270d8bf1f72a4 | PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge | src/sim/Simulation.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n var errorCallback, getPosition, hideAddressAndZip, hideGeoLoc, successCallback;\n\n successCallback = function(position) {\n $('input#latitude').val(position.coords.latitude);\n return $('input#longitude').val(position.coor... | javascript | edit | 0 | 2 | mit | 72688cd96a101fd22294682be1077fb7d4a821e4 | joofsh/geofsh,joofsh/geofsh | vendor/assets/javascripts/geofsh.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('resourceSolver', [])\n.provider('resourceSolver', function ResourceSolver() {\n var baseUrl = '';\n\n this.setBaseUrl = function(url) {\n baseUrl = url;\n };\n\n this.$get = function($rootScope, $state) {\n\n $... | javascript | edit | 0 | 2 | mit | 34a6f5595edb266a438a235c6d32cd3dfd7b8d19 | jbmikk/resource-solver | src/resourceSolver.js | rejected_duplicate | Near-duplicate of sample 94225 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nmodule.exports = function (grunt) {\n configuration.selenium.forEach(function (browser) {\n grunt.registerTask(browser, \"exec:test\" + browser.charAt(0).toUpperCase() + browser.substr(1) + \"Verbose\");\n ... | javascript | edit | 0 | 1 | mit | f0723ce126dd00f97957ed48d6c98b5579d66a28 | ArnaudBuchholz/gpf-js,ArnaudBuchholz/gpf-js | grunt/tasks/browsers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n babel = require('gulp-babel'),\n runSequence = require('run-sequence'),\n rename = require('gulp-rename'),\n electron = require('gulp-atom-electron'),\n del = require('del');\n\ngulp.task('transpile:a... | javascript | edit | 0 | 1 | mit | 6ebdd270e5f8993fe1d77314845856e3db81903f | thomasdarimont/electron-angular-es6,thomasdarimont/electron-angular-es6 | app/Gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'rsg-components/Styled';\n\nconst styles = ({ fontFamily, color, space, fontSize }) => ({\n\troot: {\n\t\tpadding: [[space[1], space[2], space[1], space... | javascript | edit | 0 | 1 | mit | b58425f3ef2799e501fe781fefce50c15d9c2008 | styleguidist/react-styleguidist,sapegin/react-styleguidist,sapegin/react-styleguidist,bluetidepro/react-styleguidist,styleguidist/react-styleguidist,styleguidist/react-styleguidist | src/rsg-components/Editor/EditorLoaderRenderer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n dbname: 'yamb-test',\n storage: require('./storage')\n};\n```\n\nApply this change: Add yapi option for tests"
},
{
"role": "assistant",
"content": "var options = {\n dbname: 'yamb-test',\n storage: ... | javascript | edit | 0 | 0 | mit | a9268ef0178dd84930861bb3769bc8481bfe3722 | yamb/yamb | test/_data/options.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nbuttonCodeToChar = {1: \"Left\", 2: \"Middle\", 3: \"Right\"};\nbuttonCharToCode = {\"Left\": 1, \"Middle\": 2, \"Right\": 3};\n\nfunction Mouse() {\n // It'd be good to get this info on construction\n this.x = -1;\n this.y = -... | javascript | edit | 0 | 4 | mit | 82ceb59a8062b6ce2e9fb87c5b32ac70a49e4f3d | Tactique/jswars | assets/js/Mouse.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar connect = require(\"./lib/connect/lib/connect\"),\n express = require(\"express\"),\n http = require(\"http\"),\n url = require(\"url\");\n\nvar app = express.createServer();\n\napp.configure(function(){\n app.use(app.ro... | javascript | edit | 0 | 3 | bsd-3-clause | 3f61a55aac6cecbc9cfcfe2cfbe08db2bba1679e | leonardohipolito/gradient-scanner,kpdecker/gradient-scanner,leonardohipolito/gradient-scanner | server/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * User.js\n *\n * @description :: TODO: You might write a short summary of how this model works and what it represents here.\n * @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models\n */\n\nmodule.export... | javascript | edit | 0 | 0 | mit | 5c5173224b66e58b367cff220c64f55a40f1d891 | YannBertrand/SimpleSailsChatroom,YannBertrand/SimpleSailsChatroom | api/models/User.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar copay = require('copay');\nvar _ = require('underscore');\nvar config = defaultConfig;\nvar localConfig = JSON.parse(localStorage.getItem('config'));\n\nif (localConfig) {\n var cmv = copay.version.split('.')[1];\n... | javascript | edit | 0 | 2 | mit | 2a2542f6d05a389b64fcd8529e2888e330add996 | Groestlcoin/GroestlPay,DigiByte-Team/copay,DigiByte-Team/copay,cmgustavo/copay,habibmasuro/copay,BitGo/copay,jameswalpole/copay,tanojaja/copay,kleetus/copay,bankonme/copay,philosodad/copay,LedgerHQ/copay,julianromera/copay,ionux/copay,dabura667/copay,startcoin-project/startwallet,jmaurice/copay,tanojaja/copay,mzpolini/... | js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar trexControllers = angular.module('trexControllers', []);\n\ntrexControllers.controller('ProjectListCtrl', ['$scope', 'Project',\n function($scope, Project) {\n $scope.projects = Project.query();\n\n $scope.order = \... | javascript | edit | 0 | 2 | mit | d28dc71b21a579f72aceaf460dd53a7abb849d47 | bjoernricks/trex,bjoernricks/trex | trex/static/js/controllers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\r\n summary: \"Meteor unit testing framework for packages\"\r\n});\r\n\r\nPackage.on_use(function (api, where) {\r\n api.use([\"coffeescript\",\"tinytest\",\"test-helpers\",\"chai\",\"sinon\",\"underscore\"]);\r... | javascript | edit | 0 | 1 | mit | 870f574218335a18eefb227dbce56dc1b9275599 | practicalmeteor/meteor-munit,awatson1978/clinical-verification | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by dungvn3000 on 3/14/14.\n * The model automatic update mapping field when set associations table.\n */\n\nExt.define('sunerp.model.BaseModel', {\n extend: 'Ext.data.Model',\n set: function (fieldName, newValue) {... | javascript | edit | 0 | 3 | apache-2.0 | fdb17b80fa156931f09c6c8e0142a6fd04d93ad3 | SunriseSoftVN/sunerp,SunriseSoftVN/sunerp,SunriseSoftVN/sunerp | app/assets/js/model/BaseModel.js | rejected_duplicate | Near-duplicate of sample 87513 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint mocha: true */\n'use strict';\n\nconst assert = require('assert');\nconst sendgrid = require('../lib/sendgrid');\n\nlet nodes;\nlet send = sendgrid.sendgrid.send;\n\nbeforeEach(function() {\n sendgrid.sendgrid.send = function... | javascript | edit | 0 | 1 | mit | 7de22ced013b3897f13b4b9c4741a43af51318ca | Starefossen/jenkins-monitor | test/sendgrid.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Converter = require('..');\nvar fs = require('fs');\n\n\n\ndescribe.only('Test JCAMP converter of GCMS', function () {\n\n var result = Converter.convert(fs.readFileSync(__dirname + '/data/misc/gcms.jdx').toStrin... | javascript | edit | 0 | 1 | mit | a3e8194ab2d2e87dc1e6408a6672898566a2b25e | cheminfo/jcampconverter,cheminfo-js/jcampconverter,cheminfo/jcampconverter,cheminfo-js/jcampconverter | test/testGCMS.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('zeus.results', [])\n.controller('ResultsController', function($scope, Results, $routeParams) {\n $scope.results = [];\n $scope.loaded = false;\n $scope.pages = 1;\n var search = $routeParams.search;\n Results.multiS... | javascript | edit | 0 | 2 | mit | 720326f91ab7d12fb1e435606961f79fcbcc192f | ALeo23/Zeus-HatersGonaHate,ALeo23/Zeus-HatersGonaHate,Zeus-HatersGonaHate/Zeus-HatersGonaHate,Zeus-HatersGonaHate/Zeus-HatersGonaHate,ALeo23/Zeus-HatersGonaHate,Zeus-HatersGonaHate/Zeus-HatersGonaHate | client/app/results/results.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst graphqlTester = require('graphql-tester')\nconst expressGraphql = require('express-graphql')\nconst {expect} = require('chai')\nconst cookieSession = require('cookie-session')\nconst express = require('express')\nco... | javascript | edit | 0 | 1 | mit | 2d3b8510bf2d48a6917718f4da9743a30a638ab6 | kasbah/git-clone-server,kasbah/git-clone-server | test/test_app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs')\nconst util = require('util')\nconst path = require('path')\n\nclass FsUtils {\n static get chmod() {\n return util.promisify(fs.chmod)\n }\n\n static get readFile() {\n return util.promisify(fs.readFil... | javascript | edit | 0 | 3 | apache-2.0 | 31b913c020d0240676f9f1f0c996a3c0182ea59d | Mindsers/configfile | src/shared/utils/fs.utils.js | rejected_duplicate | Near-duplicate of sample 79896 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default class Socket {\n constructor(on_message) {\n this.on_message = on_message;\n this.init();\n }\n\n init() {\n let loc = location;\n this.ws = new WebSocket('ws:'+loc.hostname+':'+loc.po... | javascript | edit | 0 | 1 | mit | 128bcec2f6a26b6187bf0f1ac2c69633e7b04716 | bpa/cyborg-rally,bpa/cyborg-rally,bpa/cyborg-rally | js/Socket.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(config, models, views, routers, utils, templates) {\n\nviews.NewPost = Backbone.View.extend({\n id: 'new_post',\n\n events: {\n 'submit #new_post_form': 'createPost'\n },\n\n createPost: function() {\n var that = thi... | javascript | edit | 0 | 1 | bsd-3-clause | 67499d95433aa7bc9820ed2c46d8d0f023fbb9fb | xxdavidxx11/prose,dereklieu/prose,simoneau/prose,xxdavidxx11/prose,sudarshanReddykurri/prose,VictoriaLa/prose,danieldelhoyo/prose,mcanthony/prose,prose/prose,simoneau/prose,another-dave/prose,leohmoraes/prose,dereklieu/prose,another-dave/prose,nexocentric/prose,edgemaster/prose,prose/prose,dereklieu/prose,phillipadsmit... | _includes/views/new_post.js | rejected_duplicate | Near-duplicate of sample 81066 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport mongoose from 'mongoose';\n\nexport default function(url) {\n return new Promise((resolve, reject) => {\n mongoose.connect(url, {\n server: {\n auto_reconnect: true,\n socketOptions: {\n keepAlive:... | javascript | edit | 0 | 1 | mit | 12a4bd6fc4d9716308cc85e9fcbd1e161fb21a88 | dcslack/restle,dylnslck/restle | lib/db.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 v... | javascript | edit | 0 | 5 | mit | 65735c5eedd7671e54aa3c4fab5caa9e3f25c6f7 | alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend | app/assets/javascripts/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n // JavaScript Olympics\n\n// I paired [by myself, with:] on this challenge.\n\n// This challenge took me [#] hours.\n\n\n// Warm Up\n\n\n\n\n// Bulk Up\n\n\n\n\n// Jumble your words\n\n\n\n\n// 2,4,6,8\n\n\n\n\n// \"We built this city\... | javascript | edit | 0 | 3 | mit | 83159408ff24b8020599bd51301a016940949d48 | Srossmanreich/phase-0,Srossmanreich/phase-0,Srossmanreich/phase-0 | week-7/javascript_olympics.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default ['$scope', '$http', '$uibModalInstance', function($scope, $http, $uibModalInstance) {\n\n // get stages in parent controller\n console.log('create-stage scope', $scope.$parent.$stages)\n\n $http\n .get('/api/stage-t... | javascript | edit | 0 | 3 | mit | 35bd8fe4b946efc17da7f5c057d4450a0e141732 | shrunyan/mc-core,andyfleming/mc-core,andyfleming/mc-core,shrunyan/mc-core | ui/assets/js/controllers/modals/create-stage.js | rejected_duplicate | Near-duplicate of sample 78963 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as utils from 'base/utils';\nimport Dialog from '../_dialog';\nimport Vzb from 'vizabi';\n\n/*\n * Size dialog\n */\n\nvar About = Dialog.extend({\n\n/**\n * Initializes the dialog component\n * @param config component configur... | javascript | edit | 0 | 1 | bsd-3-clause | 087cbb000f13f8a0e2bffaddf578b7514a489384 | Gapminder/vizabi,sergey-filipenko/vizabi,buchslava/vizabi,vizabi/vizabi,sergey-filipenko/vizabi,buchslava/vizabi,sergey-filipenko/vizabi,dab2000/vizabi,dab2000/vizabi,vizabi/vizabi,dab2000/vizabi,buchslava/vizabi,Gapminder/vizabi,Gapminder/vizabi | src/components/dialogs/about/about.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Controller.extend({\n init () {\n Ember.run.schedule('afterRender', () => {\n componentHandler.upgradeAllRegistered();\n });\n },\n\n currency: function () {\n let curr... | javascript | edit | 0 | 2 | mit | 62d4fd3cbb3337c11604790a58083efd817964b9 | pe1te3son/spendings-tracker,pe1te3son/spendings-tracker | app/controllers/home/settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel'\n\n/* @flow */\n\nimport type { Range, Point, TextEditor } from 'atom'\n\nexport type Message = {\n location: {\n file: string,\n position: Range,\n },\n source: ?{\n file: string,\n position?: Point,\n },\n ... | javascript | edit | null | null | mit | 23bc8bf5801b6596ecaf300f3ed31039402d0fe7 | AtomLinter/Linter,steelbrain/linter,atom-community/linter | lib/types.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar close = document.querySelectorAll('.close');\nvar modal = document.querySelector('.modal');\nvar modalAbout = document.getElementById('modal-about');\n\ncontact.addEventListener('click', function() {\n modal.style.visibility = 'vis... | javascript | edit | 0 | 1 | mit | 8ce527fa4fad05d2bf4c098c9452bdd9ec23016c | daltonmenezes/daltonmenezes.github.io,daltonmenezes/daltonmenezes.github.io,daltonmenezes/daltonmenezes.github.io | assets/js/modal.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Create towns and subjects on server start."
},
{
"role": "assistant",
"content": "module.exports = {\n 'url': process.env.DATABASE_URL || 'mongodb://localhost/edu_events'\n};\n\n//Create towns\nvar Town = require('../app/m... | javascript | new_file | 0 | 3 | mit | 37f44eff4853d872eeb37303161c231d16703613 | darinnn/Edu-Events,darinnn/Edu-Events | config/database.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar argv = require('yargs')\n .option('c', {\n alias: 'client',\n type: 'array'\n })\n .option('s', {\n alias: 'search',\n type: 'string'\n })\n .option('f', {\n alias: 'file',\n type: 'string'\n })\n .argv;\n\n... | javascript | edit | 0 | 2 | mit | 5135bb3c01989edafb3583db68f93284292168c9 | samuelreichert/feevale-servidor-sistemas-distribuidos | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar lumbar = require('../lumbar');\n\nfunction combineResources(context, callback) {\n var resources = context.resources || [];\n if (!resources.length) {\n return callback();\n }\n\n context.outputFile(function(callback) {\n ... | javascript | edit | 0 | 4 | mit | 2380dc0eefac75155b825b8907ca235122cf5db2 | walmartlabs/lumbar | lib/plugins/many-to-one-output.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @license\n * grunt-template-progeny\n * Copyright 2014 Luis Aleman <https://github.com/Lalem001/>\n */\n(function (module) {\n\tmodule.exports = function (grunt) {\n\t\tvar progeny = require('progeny').Sync({rootPath: '.'});\n\n... | javascript | edit | 0 | 1 | mit | 55dcc4b80b937c314fda4631ffa7e193bb268396 | Lalem001/grunt-template-progeny | index.js | rejected_duplicate | Near-duplicate of sample 68445 | true |
[
{
"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 | 36a0e73f381083ea34cf8220807d4e660b1ba3c6 | react-native-community/react-native-svg,magicismight/react-native-svg,magicismight/react-native-art-svg,magicismight/react-native-svg,react-native-community/react-native-svg,msand/react-native-svg,magicismight/react-native-svg,magicismight/react-native-art-svg,magicismight/react-native-svg,react-native-community/react-... | lib/extract/extractViewBox.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jslint node : true, nomen: true, plusplus: true, vars: true, eqeq: true,*/\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 obt... | javascript | edit | 0 | 4 | apache-2.0 | 3c1f77e12a64dd63f3879b91307e2fb11a0b3333 | bimedia-fr/architect-knex | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst chalk = require(\"chalk\");\n\n\n/**\n * Main Kaba class\n */\nclass Kaba\n{\n /**\n *\n */\n constructor ()\n {\n }\n}\n\n\n// export a single instance\nmodule.exports = new Kaba();\n\n```\n\nApply this change... | javascript | edit | 0 | 1 | bsd-3-clause | 99de001789f668f1dbfe4b283100df518edb8c34 | Becklyn/kaba,Becklyn/kaba | kaba/kaba.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar rump = module.exports = require('rump');\nvar configs = require('./configs');\nvar originalAddGulpTasks = rump.addGulpTasks;\n\nrump.addGulpTasks = function(options) {\n originalAddGulpTasks(options);\n require('.... | javascript | edit | 0 | 1 | mit | b0ab9b795de3585523e6e9bce50fa8b304ad5e19 | rumps/styles,rumps/rump-styles | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\n\nmodule.exports = function(ast, filePath, plugins) {\n var errors = [],\n warnings = [];\n\n _.each(plugins, function(plugin){\n var results,\n array;\n\n if (plugin.severity === 2) ... | javascript | edit | 0 | 6 | mit | fb2876902f23c74e909f1721d00fd1009942f7dd | brendanlacroix/polish-css | lib/polish-test-file.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction randomId() {\n return 'v-' + Math.random().toString(36).slice(-8);\n}\n\nfunction prepareMxDbmsProductVue(data) {\n return new Vue({\n el: '#mx_dbms_product_form',\n data: data,\n methods: {\n addDataType: funct... | javascript | edit | 0 | 1 | mit | 33a0011fbf0873804879122fb847c1c8b792d5bd | pinzolo/redmine_mx,pinzolo/redmine_mx,pinzolo/redmine_mx,pinzolo/redmine_mx | assets/javascripts/redmine_mx.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar CALLBACK_NAME = '__googleMapsApiOnLoadCallback'\n\nvar OPTIONS_KEYS = ['channel', 'client', 'key', 'language', 'region', 'v']\n\nvar promise = null\n\nmodule.exports = function (options) {\n options = options || {}\n\n if (!promis... | javascript | edit | 0 | 4 | mit | 8c797668eaf06d30a81a3880582e22ba42c83801 | yuanqing/load-google-maps-api | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// GENERATED BY grunt make_dir_module.\nexport var dir = {};\nexport default dir;\nimport m0 from \"wash/exe/cat\";\ndir[\"cat\"] = m0;\nimport m1 from \"wash/exe/clear\";\ndir[\"clear\"] = m1;\nimport m2 from \"wash/exe/cp\";\ndir[\"cp... | javascript | edit | 0 | 0 | apache-2.0 | fd502c8a6a0753e3325781eb57619e52800eb3ce | chromium/axiom,rpaquay/axiom,mcanthony/axiom | lib/wash/exe_modules.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n// First, import everything we need (I assume that you installed Flick via the above command).\nvar connect = require( 'connect' ),\n shell = require( 'shelljs' ),\n flick = require( '..' ),\n handler = flick( { whitelist: { ... | javascript | edit | 0 | 2 | mit | c25494be02969937a21c3330713e0582a0dbf351 | romac/node-flick | examples/git-pull.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Load our letter icon generator\nvar materialLetterIcons = require('../generator') || require('material-letter-icons');\n\n// Generate the letter icons and export them to dist/\nmaterialLetterIcons.generateIcons(function(err) {\n /... | javascript | edit | 0 | 2 | apache-2.0 | 5e1d6d2f0efd263f663d724c57398fd963a3eae2 | eladnava/material-letter-icons | examples/generate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function inclusionFilter(packages) {\n return function(packageName) {\n if (packages.length === 0) { return true; }\n\n return packages.map(function(pkg) {\n return pkg.name;\n }).indexOf(packageName) > -... | javascript | edit | 0 | 2 | mit | 82bf4dcbf24e39b7ddfe78b37fb172627ced2777 | ivanvanderbyl/ember-d3,brzpegasus/ember-d3,brzpegasus/ember-d3,ivanvanderbyl/ember-d3 | lib/inclusion-filter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\n/* @flow */\n\nimport type {Exec$Options} from './types'\n\nexport function validate(filePath: string, parameters: Array<string>, options: Exec$Options) {\n\n}\n\n```\n\nApply this change: :new: Implement a rock solid va... | javascript | edit | null | null | mit | 3bf584fcef01104488624fc0d1f46077858f4e3e | steelbrain/exec | src/helpers.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar transportList = require('./transport-list');\n\nmodule.exports = require('./main')(transportList);\n\n```\n\nApply this change: Add back in _sockjs_onload since some servers might depend upon that for iframe bootstr... | javascript | edit | 0 | 0 | mit | 5abe7ab5daaf33fd2853304fea0f21cd6fed21b5 | Chovans/sockjs-client,f5io/sockjs-client,sockjs/sockjs-client,woosoobar/sockjs-client,sockjs/sockjs-client,jmptrader/sockjs-client,arusakov/sockjs-client,modulexcite/sockjs-client,woosoobar/sockjs-client,the1sky/sockjs-client,the1sky/sockjs-client,Chovans/sockjs-client,JohnKossa/sockjs-client,bulentv/sockjs-client,f5io... | lib/entry.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Taken from:\n// https://github.com/necolas/react-native-web/blob/master/src/apis/StyleSheet/normalizeValue.js\nconst unitlessNumbers = {\n boxFlex: true,\n boxFlexGroup: true,\n columnCount: true,\n flex: true,\n flexGrow: true,... | javascript | edit | 0 | 3 | mit | 3fbf61d08e07965ddfbb12b23dd4850e6ba99904 | lelandrichardson/react-primitives,lelandrichardson/react-primitives,lelandrichardson/react-primitives,lelandrichardson/react-primitives,ktj/react-primitives | src/StyleSheet/normalizeValue.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar buildFile = require('./build-file')\nvar runGitCommand = require('./helpers/run-git-command')\n\nvar COMMITHASH_COMMAND = 'rev-parse HEAD'\nvar VERSION_COMMAND = 'describe --always'\n\nfunction GitRevisionPlugin (options) {\n this.... | javascript | edit | 0 | 8 | mit | 4904db703c1613567bfe9ca2a91e962ecadba749 | pirelenito/git-revision-webpack-plugin,pirelenito/git-revision-webpack-plugin,pirelenito/git-revision-webpack-plugin | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar angular = require('angular');\nvar bluebird = require('bluebird');\n\nangular\n .module('mwl.bluebird', [])\n .constant('Bluebird', bluebird)\n .config(function($provide, Bluebird) {\n\n //Make bluebird API co... | javascript | edit | 0 | 3 | mit | 971b958dd1bbc6230dcf0b781d65d00a8d2e7a75 | mattlewis92/angular-bluebird-promises,lucastschmidt/angular-bluebird-promises,mattlewis92/angular-bluebird-promises,lucastschmidt/angular-bluebird-promises | src/angular-bluebird-promises.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport axios from 'axios'\n\nconst apiBase = 'https://api.hackclub.com/'\nconst methods = ['GET', 'PUT', 'POST', 'PATCH', 'DELETE']\n\nconst generateMethod = method => (path, options = {}) => {\n // authToken is shorthand for Authoriza... | javascript | edit | 0 | 7 | mit | 4e6260f3e1367b83856b9d0d736dd9ff115e686c | hackclub/website,hackclub/website,hackclub/website | src/api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Internal method, used by iteration functions.\n// Calls a function for each key-value pair found in object\n// Optionally takes compareFn to iterate object in specific order\n\n'use strict';\n\nvar isCallable = require('./is-callable... | javascript | edit | 0 | 3 | isc | 198003a3cd1e1b47e6139540a2dcc374ea6a1dab | medikoo/es5-ext | object/_iterate.js | rejected_duplicate | Near-duplicate of sample 89880 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Component, Children, PropTypes } from \"react\";\nimport withSideEffect from \"react-side-effect\";\n\nclass BodyAttributes extends Component {\n render() {\n return Children.only(this.props.children);\n }\n}\n\nBodyAttrib... | javascript | edit | 0 | 2 | mit | 4ba4b9004e96941a0a9b6c6d0348ca4ca2b317ae | TrueCar/gluestick-shared,TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick | src/components/BodyAttributes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Regular expression to classify if a valid IPv4 or IPv6 address is local.\n * Note: does not validate that the string is a valid IPv4 or IPv6 address.\n * Note: assumes the local IP address uses the private class A address range.... | javascript | edit | 0 | 0 | apache-2.0 | 434ab499a90eddf4397bbe28c047238836ab5074 | wikimedia/hyperswitch | lib/regex.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {isFunction, isUndefined} from 'lodash/lang';\nimport {setHeader} from 'focus-core/application';\nimport {component as Empty} from '../../common/empty';\n\nmodule.exports = {\n\n /**\n * Updates the cartridge using the car... | javascript | edit | 0 | 3 | mit | 4debbf90e52367f2fa6ab59005c762b3542de648 | KleeGroup/focus-components,KleeGroup/focus-components | src/page/mixin/cartridge-behaviour.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction updateMasonry() {\n var $container = $('.row').masonry();\n $container.imagesLoaded(function () {\n $container.masonry();\n });\n}\n$(window).load(function () {\n updateMasonry();\n});\n\n$(\".input-group inp... | javascript | edit | 0 | 2 | mit | 20f2d8267bae0dd3afc53f350dc81ce2a940cb79 | SetOnesCap/development,SetOnesCap/development | src/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport ExecutorAbstract from '../ExecutorAbstract';\n\nclass PromiseExecutor extends ExecutorAbstract {\n //-----------------------------------\n // Constructor\n //-----------------------------------\n /**\n * Constructor for a n... | javascript | edit | 0 | 1 | mit | 35c9845f4381f2b39d992c834a6dae4516ac4f69 | jung-digital/ringa,joshjung/ringa,jung-digital/ringa | src/executors/PromiseExecutor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nngGridDirectives.directive('ngHeaderCell', ['$compile', function($compile) {\n var ngHeaderCell = {\n scope: false,\n compile: function() {\n return {\n pre: function($scope, iElement) {\n ... | javascript | edit | 0 | 1 | mit | f4302673b4b80282847eaa85bd90cec9dcbcd569 | angular-ui/ng-grid-legacy,ppossanzini/ui-grid,FugleMonkey/ng-grid,angular-ui/ng-grid-legacy,ppossanzini/ui-grid,ppossanzini/ui-grid,FugleMonkey/ng-grid,angular-ui/ng-grid-legacy,FugleMonkey/ng-grid | src/directives/ng-header-cell.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar events = require('events')\nvar util = require('util')\nvar web3 = require('web3')\nvar request = require('request')\nvar async = require('async')\n\n\nfunction RPC (options) {\n this.url = ['http://', options.host || 'localhost'... | javascript | edit | 0 | 3 | mit | 9ad8e6661ad9786e3b8dcd1c1ec31f6958c3f340 | cryptoblock/contract,cryptoblock/contract-tools | lib/rpc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n var locale = 'en' !== LOCALE ? LOCALE : '';\n\n var init;\n (init = function () {\n $('input[type=\"text\"].datetime').each(function () {\n var $input = $(this);\n ... | javascript | edit | 0 | 2 | mit | 8f7971d87f76e99a30ff9674223fc0d1cf234380 | DarvinStudio/DarvinAdminBundle,DarvinStudio/DarvinAdminBundle,DarvinStudio/DarvinAdminBundle | Resources/public/scripts/date-time-pickers-init.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright 2015 Hewlett-Packard Development Company, L.P.\n * Licensed under the MIT License (the \"License\"); you may not use this file except in compliance with the License.\n */\n\ndefine([\n 'find/app/find-pages',\n 'fi... | javascript | edit | 0 | 1 | mit | 436d552e8e338c71d9b5803bda1a54db71fefd2b | LinkPowerHK/find,LinkPowerHK/find,hpe-idol/find,hpe-idol/find,hpautonomy/find,hpe-idol/find,hpe-idol/java-powerpoint-report,LinkPowerHK/find,hpautonomy/find,hpautonomy/find,hpe-idol/java-powerpoint-report,LinkPowerHK/find,hpe-idol/find,hpautonomy/find,hpautonomy/find,LinkPowerHK/find,hpe-idol/find | find-idol/src/main/public/static/js/find/idol/public/idol-pages.js | rejected_duplicate | Near-duplicate of sample 70387 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar chai = require('chai');\nvar chaihttp = require('chai-http');\nvar expect = require('chai').expect;\n\nchai.use(chaihttp);\n\nrequire('../../../server');\n\n\ndescribe('Yelp search route', function() {\n\n it('shou... | javascript | edit | 0 | 1 | mit | 5b585265608be77a91d1033f6796d1e9de7165f6 | Localhost3000/along-the-way | test/mocha/api/express-routes-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar paths = require( './paths' );\n\nmodule.exports = {\n\n\toptions: {\n\t\tlivereload: true,\n\t},\n\tstyles: {\n\t\t// Which files to watch (all .less files recursively in the less directory)\n\t\tfiles: paths.styles,\n\t\ttasks: [ '... | javascript | edit | 0 | 0 | mit | 09e2aed59a16b390c3339f8063bf66aa143de3d4 | athletics/make-model,athletics/make-model | base-project/grunt/watch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember'\nimport _ from 'lodash/lodash'\n\nexport default Ember.Component.extend({\n classNames: ['frost-pods'],\n classNameBindings: ['orientation'],\n\n orientation: 'vertical',\n\n podNames: Ember.computed('podSt... | javascript | edit | 0 | 2 | mit | 7dda590c364fbace901e8b0cff322aacc8fc4803 | ciena-frost/ember-frost-pods,ciena-frost/ember-frost-pods,ciena-frost/ember-frost-pods | addon/components/frost-pods.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst sysout = console.log;\nfunction toFile(log) {\n fs.appendFile(\"./latest.log\", log, () => {});\n}\nconst out = log => {\n sysout(log);\n toFile(log);\n};\nconsole.log = log => {\n let d = ne... | javascript | edit | 0 | 1 | mit | d0cbf2ab23789a927f4e9acfb514c4e339008b54 | Lunar-Skies/Hamster | logging.js | rejected_duplicate | Near-duplicate of sample 71491 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @module ember-flexberry\n */\n\nimport OlvInputCellComponent from 'ember-flexberry/components/object-list-view-input-cell';\n\nexport default OlvInputCellComponent.extend({\n actions: {\n fileChange: function(options) {\n ... | javascript | edit | 0 | 1 | mit | bada625158ea760e76166910632cc1b95cad92e3 | Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry | addon/components/object-list-view-flexberry-file-cell.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar promisify = require(\"promisify-node\");\nvar fs = promisify(\"fs\");\nvar exec = promisify(\"child_process\").exec; \n\nbefore(function(done) {\n var url = \"https://github.com/nodegit/nodegit\";\n\n fs.exists(\"test/repos\").the... | javascript | edit | 0 | 1 | mit | 63e3b1f8fced28d7a15a0f588ef3ae1127bd1daa | jfremy/nodegit,srajko/nodegit,Naituw/nodegit,taylorzane/nodegit,tannewt/nodegit,saper/nodegit,danawoodman/nodegit,IonicaBizauKitchen/nodegit,kenprice/nodegit,heavyk/nodegit,srajko/nodegit,saper/nodegit,Naituw/nodegit,taylorzane/nodegit,StephanieMak/nodegit,bengl/nodegit,cwahbong/nodegit,nodegit/test,cbargren/nodegit,sr... | test/runner.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { reads, and } from '@ember/object/computed';\nimport LinkComponent from '@ember/routing/link-component';\nimport layout from '../templates/components/paper-link'\n\nimport FocusableMixin from 'ember-paper/mixins/focusable-mixin'... | javascript | edit | 0 | 2 | mit | 39849899379a40f90620f94faa383f6d46ed99fe | Subtletree/ember-paper-link,Subtletree/ember-paper-link | addon/components/paper-link.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(window) {\n 'use strict';\n\n window.modular = {\n Module: window.parent.app.ModularModule,\n };\n\n window.addEventListener('load', function() {\n setTimeout(function() {\n window.postMessage(window.name, locat... | javascript | edit | 0 | 1 | mit | 386a680ac487775bc5d4076e2883627f96def122 | ionstage/modular,ionstage/modular | js/modular-module.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\n\n//Custom all purpose dashboard button\nclass DashButton extends React.Component {\n\n render() {\n return (\n <div className=\"DashButton\">\n <a\n ... | javascript | edit | 0 | 3 | mit | 2c6a9d4a0d066fc3350708aa0b56fb13902b68e8 | studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights | app/assets/javascripts/school_administrator_dashboard/dashboard_components/DashButton.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\napp.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {\n var rp = $routeProvider;\n\n rp.when('/', {\n templateUrl: '/html/home.html',\n controller: 'HomeCtrl',\n });\n\n ... | javascript | edit | 0 | 3 | isc | 62fd976ad5fc70dc8b1f30a56075b271be05ffe3 | cdunklau/alexandria,cdunklau/alexandria,bertjwregeer/alexandria,bertjwregeer/alexandria,cdunklau/alexandria | alexandria/static/js/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'dispatch:phoneformat.js',\n summary: 'phoneformat.js packaged for meteor',\n version: '1.5.4',\n git: 'https://github.com/DispatchMe/phoneformat.js.git'\n});\n\nPackage.onUse(function (api) {\n api.versi... | javascript | edit | 0 | 1 | mit | 2b783a0962703556db7086f511fed6e097e73b8c | DispatchMe/phoneformat.js,DispatchMe/phoneformat.js | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n name: \"froatsnook:sleep\",\n summary: \"Fiber-friendly sleep statements (server only)\",\n version: \"1.0.1\",\n git: \"https://github.com/froatsnook/sleep\"\n});\n\nPackage.onUse(function(api) {\n a... | javascript | edit | 0 | 1 | mit | 174a622c91f6f9fe4dbe838aa2b524f70bd8bd1b | froatsnook/meteor-sleep | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar intervalTracker = {};\n\nvar customizeGitShoes = function(){\n if (jQuery(\"#feedback-container\")[0]) {\n // Move gitShoes to the left side\n jQuery(\"#feedback-container\").css('right', 'none').css('left','30px');\n jQue... | javascript | edit | 0 | 2 | mit | d82f682c463dae081f014c194206a3da80f596ae | amcaplan/flatiron_showcase,amcaplan/flatiron_showcase,amcaplan/flatiron_showcase | app/assets/javascripts/gitshoes_customization.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2019 Google LLC\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 | 2 | apache-2.0 | 9f739fb962c69666a98d7216d4307f8307a9ec01 | googleinterns/step62-2020,googleinterns/step62-2020,googleinterns/step62-2020,googleinterns/step62-2020,googleinterns/step62-2020 | project/src/main/webapp/script.js | rejected_duplicate | Near-duplicate of sample 75117 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, {Component, PropTypes} from \"react\";\n\nimport _ from \"lodash\";\n\nclass JSArrMap extends React.Component {\n constructor(){\n super();\n }\n render(){\n const{rowCount, columnCount, pixelCount, xPos, yPos, re... | javascript | edit | 0 | 3 | mit | 2181f297c88dff5fd1fe7f4fa10b708caa1be2e7 | CharlieGreenman/pixelLight,CharlieGreenman/pixelLight | app/js/components/code-box/js-view/js-arr-map.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\napp = app || {};\n\napp.QuestionView = Backbone.View.extend({\n\n events: {\n 'submit .question_form': 'submitQuestion',\n },\n\n initializeTemplates: function(){\n _.templateSettings = { interpolate: /\\{\\{(.+?)\\}\\}/g };\n ... | javascript | edit | 0 | 2 | cc0-1.0 | 987f75dd66053f075911f7caa1c07fdeceefc384 | red-spotted-newts-2014/food-overflow,red-spotted-newts-2014/food-overflow | app/assets/javascripts/global/views/questions.js | rejected_duplicate | Near-duplicate of sample 77668 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nexport default class Post extends React.Component {\n render() {\n return (\n <div className='post'>\n <textarea placeholder='Say something about this page'></textarea>\n... | javascript | edit | 0 | 2 | mit | d6730f0e91ec9a4d8fc3eac2871b229af547df36 | Julzso23/player.me-one-click-share,Julzso23/player.me-one-click-share | components/Post.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction showOriFancybox(status) {\n unsafeWindow.jQuery.fancybox({\n 'type': 'inline',\n 'content': '#update',\n 'autoScale': false,\n 'autoDimensions': false,\n 'width': '800',\n 'height': ... | javascript | edit | 0 | 1 | apache-2.0 | db2fba2aebb939c56050c9df1a56319c03ae5ede | alex-degtyarev/oggetto_redmine_improvements,obukhow/oggetto_redmine_improvements,alex-degtyarev/oggetto_redmine_improvements,obukhow/oggetto_redmine_improvements | js/ori_helper_2.0.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst openTutorial = () => {\n return { type: 'OPEN_TUTORIAL' };\n};\n\nconst closeTutorial = () => {\n return { type: 'CLOSE_TUTORIAL' };\n};\n\nconst viewNext = () => {\n return { type: 'VIEW_NEXT' };\n};\n\nconst viewPrevious = ()... | javascript | edit | 0 | 1 | mit | b3ca1b3a54e10e94720e3e89e90bf0afaaa7e41e | ivtpz/brancher,ivtpz/brancher | app/actions/tutorialActions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (env) {\n \"use strict\";\n env.ddg_spice_wikinews = function(api_result){\n\n if (api_result.error) {\n return Spice.failed('wikinews');\n }\n\n DDG.require('moment.js', function(){\n ... | javascript | edit | 0 | 2 | apache-2.0 | b16c288a646cbeae0d867c0bbe99795c05edcd12 | Queeniebee/zeroclickinfo-spice,mayo/zeroclickinfo-spice,lerna/zeroclickinfo-spice,deserted/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,mr-karan/zeroclicki... | share/spice/wikinews/wikinews.js | rejected_duplicate | Near-duplicate of sample 98725 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module('arethusa.core').factory('StateChange', [\n '$parse',\n function($parse) {\n function getToken(state, tokenOrId) {\n if (angular.isObject(tokenOrId)) {\n return tokenOrId;\n } else... | javascript | edit | 0 | 2 | mit | 12c400ad6134139c0e9e36309c871ce034af63ef | alpheios-project/arethusa,Masoumeh/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa | app/js/arethusa.core/state_change.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar streamURL = \"http://half-shot.uk:8000/status-json.xsl\";\nvar player = document.querySelector(\"audio#stream_player\");\nvar streamended = true;\nvar player_interval;\n\nfunction getStream(){\n var rstatus = new Request(streamURL)... | javascript | edit | 0 | 4 | mit | 1a1f2e6a66224a023187dc44bb1c15c58e5b278a | Half-Shot/half-shot.uk,Half-Shot/half-shot.uk | source/rootcontent/src/player.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nTemplate.messageInput.events({\n\n 'submit form': function (event, template) {\n\n event.preventDefault();\n\n var messageInput = event.currentTarget.elements['message'];\n\n if (messageInput.value === \"\") retu... | javascript | edit | 0 | 3 | mit | 7cd68c3a5f898133479856d7c7e2535d300d1aad | bluereefltd/onehourchat,bluereefltd/onehourchat | client/templates/messageInput.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport React from 'react'\nimport {Text} from '../../../common-adapters'\nimport {globalColors} from '../../../styles'\nimport MessageWrapper from './wrapper'\n\nimport type {Props} from './text'\n\nconst MessageText = (props:... | javascript | edit | null | null | bsd-3-clause | cb0264466e49841da254c13ce8db247b8e7c74a4 | keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client | shared/chat/conversation/messages/text.native.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst opn = require('opn');\nconst AccountManager = require('../account-manager');\nconst {handleResponseData, parseSetCookies, findCookie} = require('../utils');\n\nconst BaseStep = require('./base-step');\n\nmodule.ex... | javascript | edit | 0 | 3 | bsd-3-clause | 705db3c2888e88c78b6bcc78095ec5cb1c106ce2 | kiteco/kite-installer | lib/install/login.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable no-process-exit */\nrequire('babel/register');\nrequire('dotenv').load();\n\nvar Rx = require('rx');\nvar app = require('../server/server');\n\nvar Nonprofits = app.models.Challenge;\nvar nonprofits = require('./nonpro... | javascript | edit | 0 | 2 | bsd-3-clause | 8726ea8108a189bc542ac6fc98275398009c8fcf | jonathanihm/freeCodeCamp,FreeCodeCamp/FreeCodeCamp,HKuz/FreeCodeCamp,FreeCodeCamp/FreeCodeCamp,jonathanihm/freeCodeCamp,BhaveshSGupta/FreeCodeCamp,BhaveshSGupta/FreeCodeCamp,raisedadead/FreeCodeCamp,HKuz/FreeCodeCamp,pahosler/freecodecamp,raisedadead/FreeCodeCamp,otavioarc/freeCodeCamp,pahosler/freecodecamp,otavioarc/f... | nonprofits.js | rejected_duplicate | Near-duplicate of sample 70707 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar React = require('react');\nvar urllite = require('urllite');\nvar renderResponseToString = require('../renderResponseToString');\n\n\nvar connectMiddleware = function(Router) {\n return function(req, res, next) {\n // Get the pa... | javascript | edit | 0 | 2 | mit | 31144bfb0d73f59392d005860b5552f806b55566 | matthewwithanm/monorouter | lib/contrib/connectMiddleware.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport readme from './README.md';\n\nexport default {\n readme,\n meta: {\n title: 'Component sizing'\n }\n};\n\n```\n\nApply this change: chore(docs): Adjust title for sizing reference"
},
{
"role": "assistant",... | javascript | edit | 0 | 0 | mit | 316012b6d08755b39e3983fb10f2d6a1332df572 | sschadwick/bootstrap-vue,bootstrap-vue/bootstrap-vue,bootstrap-vue/bootstrap-vue,sschadwick/bootstrap-vue,tmorehouse/bootstrap-vue,tmorehouse/bootstrap-vue,sschadwick/bootstrap-vue | docs/reference/sizes/index.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.