messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport config from '../config/environment';\nimport { getContext, generateError } from 'ember-cli-bugsnag/utils/errors';\n\nvar currentEnv = config.environment;\n\nexport default {\n name: 'bugsnag-error-se... | javascript | edit | 0 | 6 | mit | bab744bf11fce2f83da86c45534aad57240eaf5b | BBVAEngineering/ember-cli-bugsnag,rlivsey/ember-cli-bugsnag,binhums/ember-cli-bugsnag,BBVAEngineering/ember-cli-bugsnag,twokul/ember-cli-bugsnag,twokul/ember-cli-bugsnag,rlivsey/ember-cli-bugsnag,binhums/ember-cli-bugsnag | app/instance-initializers/bugsnag.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n $(\"#viewAllTab\").on(\"click\",function(){\n $('[data-toggle=\"tab\"]').parent().removeClass(\"active\");\n $(\"#viewAllTab\").parent().addClass(\"active\");\n $(\"#viewAllTab\").... | javascript | edit | 0 | 3 | bsd-3-clause | 1ffe30fb4bef9e0e6dbf4d53ef5008db6e955783 | vivo-project/VIVO,vivo-project/VIVO,vivo-project/VIVO,vivo-project/VIVO | webapp/src/main/webapp/themes/tenderfoot/js/propertyGroupControls-bootstrap.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nexports.on = function(logs) {\n var redis = mainevent.requireModule('redis').createInstance();\n redis.connect();\n redis.client.publish('InsertLog', JSON.stringify(logs), function() {\n redis.client.end();\n });... | javascript | edit | 0 | 1 | mit | 97a178995f3c5bc89da4fb6a90bf53b39c81156a | codeactual/mainevent | app/modules/redis/InsertLogPubSub.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(global) {\n\n var getAge = function(birthday) {\n if (! (birthday instanceof Date) ) {\n \tbirthday = new Date(birthday);\n }\n var ageDifMs = Date.now() - birthday.getTime();\n var ageDate = ... | javascript | edit | 0 | 3 | mit | 2def91cba3919f76445af09da14c14c93189fb52 | winfinit/age-calculator.js,winfinit/age-calculator.js | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nFamousFramework.scene('famous-tests:webgl:custom-shader:vertex', {\n behaviors: {\n '$camera': {\n 'set-depth': 1000\n },\n '.sphere': {\n 'size': [200, 200],\n 'align': [0.5, 0.5... | javascript | edit | 0 | 0 | mit | b708082716cc80f3544e6218344b80d412c24ebe | infamous/framework,SvitlanaShepitsena/shakou,infamous/famous-framework,SvitlanaShepitsena/remax-banner,tbossert/framework,Famous/framework,infamous/framework,SvitlanaShepitsena/framework,SvitlanaShepitsena/shakou,SvitlanaShepitsena/remax-banner,Famous/framework,colllin/famous-framework,KraigWalker/framework,colllin/fam... | lib/core-components/famous-tests/webgl/custom-shader/vertex/vertex.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright 2018 ThoughtWorks, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * ... | javascript | edit | 0 | 1 | apache-2.0 | fd24eca0c72a0ee07b65286908b2cbb02ad8a806 | marques-work/gocd,varshavaradarajan/gocd,jyotisingh/gocd,ind9/gocd,arvindsv/gocd,kierarad/gocd,Skarlso/gocd,tomzo/gocd,Skarlso/gocd,tomzo/gocd,ind9/gocd,varshavaradarajan/gocd,bdpiparva/gocd,bdpiparva/gocd,tomzo/gocd,gocd/gocd,arvindsv/gocd,ibnc/gocd,kierarad/gocd,bdpiparva/gocd,naveenbhaskar/gocd,GaneshSPatil/gocd,ibn... | server/webapp/WEB-INF/rails.new/webpack/single_page_apps/artifact_stores.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar scrollbarSize;\nvar doc = global.document && global.document.documentElement;\n\nfunction getScrollbarSize() {\n if (typeof scrollbarSize !== 'undefined') return scrollbarSize;\n\n var dummyScroller = document.createElement('div')... | javascript | edit | 0 | 4 | mit | 60e346fff16799eb5c22124be334e7b96b05fe5e | davidtheclark/no-scroll,davidtheclark/no-scroll | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport AutoAffix from 'react-overlays/lib/AutoAffix';\nimport Alert from 'react-bootstrap/lib/Alert';\n\nclass StickyAlert extends Component {\n static pro... | javascript | edit | 0 | 3 | mit | 73dc92d06868f027a82c89e3a9a40910f8f89696 | DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager | client/src/components/utils/StickyAlert.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = require('path');\nvar isglob = require('is-glob');\n\nmodule.exports = function globParent(str) {\n\twhile (isglob(path.basename(str))) str = path.dirname(str);\n\treturn str;\n};\n\n```\n\nApply this change:... | javascript | edit | 0 | 2 | isc | f4ca75839d36615a502d4f4cced066ada403b6f4 | jonschlinkert/glob-parent | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n parser: 'babel-eslint',\n extends: 'airbnb',\n globals: {\n before: true,\n beforeEach: true,\n after: true,\n afterEach: true,\n describe: true,\n it: true,\n },\n rules: {\n 'arrow-body-s... | javascript | edit | 0 | 0 | mit | 5318ef8d2be34156e62621ecd1ba8759bc1c1ece | crewmeister/eslint-config-crewmeister | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar glob = require(\"glob\");\nvar path = require(\"path\");\n\nmodule.exports = function (content, sourceMap) {\n var resourceDir = path.dirname(this.resourcePath);\n var pattern = content.trim();\n var files = gl... | javascript | edit | 0 | 3 | mit | 9db115e0d91fe82f79246e05a4c9364d10c5d41f | seanchas116/glob-loader | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar stemmer;\n\n/**\n * Module dependencies.\n */\n\nstemmer = require('stemmer');\n\n/**\n * `changetextinside` handler;\n *\n * @this Node\n */\n\nfunction onchangetextinside() {\n var value;\n\n value = this.to... | javascript | edit | 0 | 2 | mit | da571f8c9bef6f91b7225d87e715d0781ad822bc | wooorm/retext-porter-stemmer | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst core = require(\"sdk/view/core\");\nconst hotkeys = require(\"sdk/hotkeys\");\nconst tabs = require(\"sdk/tabs\");\nconst windows = require(\"sdk/windows\").browserWindows;\n\nconst helpers = require(\"./lib/helpers\");\nconst sta... | javascript | edit | 0 | 1 | mit | 33ed657284bf02589f604446daaec020a1fa3251 | sblask/firefox-open-tabs-next-to-current | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar postcssCached = require('postcss-cached');\nvar through = require('through2');\nvar applySourceMap = require('vinyl-sourcemaps-apply');\nvar gulpUtil = require('gulp-util');\n\nmodule.exports = function(options) {\n ... | javascript | edit | 0 | 4 | mit | cb91bd142484cab9585200dd19fcb6b69ed514c9 | vinsonchuong/gulp-postcss-cached | index.js | rejected_duplicate | Near-duplicate of sample 83722 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel';\n\nimport { documentParser, MJMLValidator } from 'mjml'\nimport container from './container'\n\nexport default {\n activate() {\n require('atom-package-deps').install();\n },\n\n deactivate() {\n },\n\n provideLinte... | javascript | edit | 0 | 1 | mit | 737c5400ae8ff3011e3b811c7ec79434f3f63fbb | mjmlio/atom-linter-mjml | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar properties = {\n server: '',\n port: 9000,\n password: '',\n ssl: false,\n nick: ''\n};\n\nvar weechat = require('weechat');\nvar notify = require('osx-notifier');\n\nvar raise_notification = function(from, messa... | javascript | edit | 0 | 4 | mit | d4793988f51b929876fcc1b0774e6c8aeb4d81c3 | eirsyl/weechat-notifier | index.js | rejected_duplicate | Near-duplicate of sample 97774 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Stopwatch = require('timer-stopwatch');\n\nfunction Hangman(timeLimit) {\n if (!timeLimit) { timeLimit = 60000; }\n var timer = new Stopwatch(timeLimit, {\n refreshRate: Math.floor(timeLimit / 10) || 10\n });\... | javascript | edit | 0 | 5 | isc | ed7182d4675838e2bc9e1792aa416d311cb2599a | es128/node-hangman | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar React = require('react')\nconst { Component, PropTypes } = React\n\nclass ActionCableProvider extends Component {\n getChildContext () {\n return {\n cable: this.props.cable\n }\n }\n\n render () {\n return this.pro... | javascript | edit | 0 | 3 | mit | 2feef49584ed29c871d4905dced9a6cf24a1feec | cpunion/react-actioncable-provider | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * data-driven\n * Copyright(c) 2013 Fluent Software Solutions Ltd <<EMAIL>>\n * MIT Licensed\n */\n\n module.exports = function(data, fn) {\n var mochaIt = it\n var mochaBefore = before\n\n data.forEach(function(testData)... | javascript | edit | 0 | 4 | mit | 13ec919005fc628b83098f001498635bb66feb67 | fluentsoftware/data-driven,danbehar/data-driven | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar postcss = require('postcss');\n\nmodule.exports = postcss.plugin('postcss-optional-comments', function() {\n\n return function (root) {\n root.walkDecls(function(decl){\n if (decl.prop.match(/^\\/\\/![\\s]?.+`/)... | javascript | edit | 0 | 3 | mit | 147048da1bd147af6c217f4db8ac31539b650dd3 | CodeTheory/postcss-optional-comments | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-hot-loader',\n serverMiddleware: function (config){\n if (config.options.environment === 'development') {\n var lsReloader = require... | javascript | edit | 0 | 4 | mit | 58500781c021ea4e11773d2391283fb1b96e4431 | toranb/ember-cli-hot-loader,toranb/ember-cli-hot-loader | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Trim string\n *\n * @param {String} str\n * @api private\n */\n\nfunction trim(str) {\n str = str\n .replace(/^url\\s?\\(/, '')\n .replace(/\\)$/, '')\n .replace(/^(\"|\\')/, '')\n ... | javascript | edit | 0 | 1 | mit | 1edc45e22f2234c33885b401aad0d5f7989fe93e | kevva/parse-import | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.onload = function() {\n sectionShow();\n};\n\nfunction sectionShow() {\n var sectionControls = {'home_btn': 'home', 'about_btn': 'about', 'projects_btn': 'projects', 'blog_btn': 'blog'}\n document.getElementById('menu').addEve... | javascript | edit | 0 | 2 | mit | a27733f1f65d5d4adf8c3ef0a87e8997bc213f65 | jorgerc85/jorgerc85.github.io,jorgerc85/jorgerc85.github.io | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar assign = require('object-assign');\nvar chalk = require('chalk');\nvar ProgressBar = require('progress');\n\n/**\n * Progress bar download plugin\n *\n * @param {Object} res\n * @api public\n */\n\nmodule.exports = ... | javascript | edit | 0 | 2 | mit | 2cf11989576a18d8c8ba63d392a1ce96af13bbeb | kevva/download-status | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar testBase = require('./_test-base');\n\nvar BillForward = testBase.BillForward;\n\ncontext(testBase.getContext(), function () {\n\tdescribe('Account', function () {\n\t\tdescribe('#new', function () {\n\t\t\tcontext('Blank Entity', f... | javascript | edit | 0 | 1 | mit | 9adae6c57f68b277f1520d14fb353238b63f1f9f | billforward/bf-node,billforward/bf-node,billforward/bf-node | test/BillForward/syntax/Account-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport ApolloClient, { createNetworkInterface } from 'apollo-client';\nimport { printRequest } from 'apollo-client/transport/networkInterface';\nimport qs from 'qs';\n\nfunction buildApolloClient(baseUrl) {\n const networkInterface = c... | javascript | edit | 0 | 4 | bsd-3-clause | 8568259061e5bb5f7523b82521355f7e1802e812 | silverstripe/silverstripe-admin,silverstripe/silverstripe-admin,silverstripe/silverstripe-admin | client/src/boot/buildApolloClient.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['jquery'], function ($) {\n return {\n init: function (wrapper, util, params, callback) {\n const vsn = \"1.0.0.0\";\n $.ajax({\n dataType: \"script\",\n cache: true,... | javascript | edit | 0 | 2 | mit | 1f9f2401118b8b59134bd238453c3ea7b8164e84 | nvisionative/Dnn.Platform,RichardHowells/Dnn.Platform,mitchelsellers/Dnn.Platform,nvisionative/Dnn.Platform,bdukes/Dnn.Platform,dnnsoftware/Dnn.AdminExperience.Extensions,EPTamminga/Dnn.Platform,valadas/Dnn.Platform,EPTamminga/Dnn.Platform,robsiera/Dnn.Platform,EPTamminga/Dnn.Platform,bdukes/Dnn.Platform,robsiera/Dnn.P... | src/Modules/Prompt/Dnn.PersonaBar.Prompt/admin/personaBar/scripts/Prompt.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { beforeEach, afterEach, describe } from 'mocha';\nimport Ember from 'ember';\nimport { getContext } from 'ember-test-helpers';\n\nexport function createModule(Constructor, name, description, callbacks, tests, method) {\n var mo... | javascript | edit | 0 | 4 | apache-2.0 | 1102bf41cb7c6f627c91d048b796a8e9f7c26f92 | alexgb/ember-mocha,Robdel12/ember-mocha,emberjs/ember-mocha,switchfly/ember-mocha,cowboyd/ember-mocha,jeffreybiles/ember-mocha,emberjs/ember-mocha,SaladFork/ember-mocha,jeffreybiles/ember-mocha,jeffreybiles/ember-mocha,alexgb/ember-mocha,switchfly/ember-mocha,SaladFork/ember-mocha,switchfly/ember-mocha,Robdel12/ember-m... | lib/ember-mocha/mocha-module.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable @typescript-eslint/no-var-requires */\nconst http = require('http');\nconst express = require('express');\nconst url = require('url');\nconst next = require('next');\nconst { pathnameToLanguage } = require('./scripts/l... | javascript | edit | 0 | 4 | mit | b2b1d12b210f02f8d6c8e327592d58c58926535f | suitejs/suite | docs/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([], function () {\n /**\n * Rockabox JSHook class, it will setup custom hooks set in the Placement js\n * for Load, Init, View initial, Engagement and Click.\n *\n * @param {object} advert The Advert class... | javascript | edit | 0 | 2 | mit | 4a241b60ff72311188287730c087d547728bd997 | rockabox/Auxilium.js | src/utils/js-hooks.js | rejected_duplicate | Near-duplicate of sample 79971 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { PropTypes } from 'react';\n\nexport function navigatorPropTypes (params) {\n return PropTypes.shape({\n state: PropTypes.shape({\n params: PropTypes.shape(params)\n }).isRequired,\n navigate: PropTypes.func.isReq... | javascript | edit | 0 | 1 | mit | 74e811027648f5157defcefc17cda3340a40bd79 | varmais/profitti,varmais/profitti | src/helpers/PropTypes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(function() {\n var DataChartController = function($rootScope, $q, HubResource, HubSelectionService) {\n var self = this\n this.isLoaded = false\n\n // Fake promise to get around ig data source\n thi... | javascript | edit | 0 | 1 | mit | 7924254ebd28e259d45e7790c2b5412f0ddf6c85 | tenevdev/idiot,tenevdev/idiot | public/app/project-detail/data-visualization/data-chart-controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Page to create/About Us\n\nimport React from 'react';\n\nconst AboutUs = (props) => {\n return (\n <div>\n <h1>AboutUs page</h1>\n </div>\n );\n};\n\nexport default AboutUs;\n```\n\nApply this change: Add link to github ... | javascript | edit | 0 | 1 | mit | 1eb308db211b7cea88a8e524605674b01a0d1037 | 5-gwoap/adopt-a-family,5-gwoap/adopt-a-family | src/components/AboutUs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar themeIcons = null;\nvar themeLink = null;\n\n\nvar loadTheme = function (src) {\n themeLink.href = src;\n};\n\n\nvar putIcon = (function () {\n var newIcon = function () {\n var div = document.createElement('di... | javascript | edit | 0 | 3 | mit | 9d777cd1caf0456534a0b17bcbbd780d514edba6 | eush77/html-formulae-app | src/js/themes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar gulp = require(\"gulp\");\nvar argv = require(\"yargs\").argv;\nvar gutil = require(\"gulp-util\");\nvar bump = require(\"gulp-bump\");\nvar path = require(\"path\");\nvar fs = require(\"fs\");\nvar $ = require(\"... | javascript | edit | 0 | 4 | mit | 2140e2ef29ea1a33f78c6f593a08d6aae15e03d7 | klarkc/gulp-github-automator | tasks/bump-version.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel';\n\nlet {jsdom} = require('jsdom');\n\nglobal.document = jsdom('<!doctype html><html><body></body></html>');\nglobal.window = document.defaultView;\nglobal.navigator = window.navigator;\nglobal.location = window.location;\n\... | javascript | edit | 0 | 1 | mit | 90aa0d7147c48fd2f8ea06e4d211b8c8a3802310 | MaxMEllon/comelon,MaxMEllon/comelon | test/views/Main_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global describe, it */\n'use strict';\nvar path = require('path');\nvar yeoman = require('yeoman-generator');\n\ndescribe('yui generator', function () {\n var TMP_DIR = path.join(__dirname, 'temp');\n var APP_DIR = path.join(__d... | javascript | edit | 0 | 1 | mit | 8e7a7dff1a0b6e9b9f5dccbf8b6dadd96ff77fc9 | zillow/generator-yui-library | test/test-creation.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n((req) => {\n const { spawn } = req('child_process');\n\n describe('Server Binary Test', () => {\n const config = req('./fixtures/karma_single.conf.js');\n before(() => {\n config.files = config.files.concat([\n 'tes... | javascript | edit | 0 | 5 | mit | a9cd008ca41ec2ac01e1d90ab471de40a781a534 | Forumouth/gulp-karma-runner | tests/test_svr_bin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\nimport Ember from 'ember';\nimport config from '../config/environment';\n\nvar csrfTokenRequest;\n\nexport default Ember.Object.extend({\n init: function() {\n // Since the CSRF token is used for all other backend r... | javascript | edit | 0 | 2 | isc | 38047f6b2e55cfb1c3ca07c940bc8df4d54a0d6a | mikl/bookmeister,mikl/bookmeister | frontend/app/services/drupal-auth.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { get } from 'lodash';\nimport { prefixFileUrlWithBackendUrl } from 'strapi-helper-plugin';\n\nimport CardPreview from '../CardPreview';\nimport Flex from '../Flex'... | javascript | edit | 0 | 3 | mit | 0e3fdfc0ca36085086930579ea18297d7c23a164 | wistityhq/strapi,wistityhq/strapi | packages/strapi-plugin-upload/admin/src/components/InputMedia/InputFilePreview.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n baseURL: '/',\n locationType: 'auto',\n EmberENV: {\n FEATURES: {\n // ... | javascript | edit | 0 | 4 | mit | 9273b2c8332f7c7c16add91bb064a74938dc27f7 | mfeckie/ember-cli-indexed-db-adapter,mfeckie/ember-cli-indexed-db-adapter | tests/dummy/config/environment.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(\"#todoSubmitButton\").click(function(e) {\n e.preventDefault();\n $.post(\"/eval\", { evalInput: $(\"#evalInput\").val() } ,\n function(response) {\n $(\"#display\").html(response);\n })\n .done(function()... | javascript | edit | 0 | 2 | mit | df0479c901fcca29511ec3cbb996e827a1d98ea2 | Pance/todo-repl-webapp | resources/public/js/eval.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar render = require('../application/render');\nvar Backbone = require('backbone');\nmodule.exports = Backbone.Router.extend({\n /**\n * Render the compoennt into the page content.\n */\n _pageContent(component, options){\n ret... | javascript | edit | 0 | 5 | mit | 2d836425e9a2057c71f81cd91ca0da5ca01cd815 | Jerom138/focus,Jerom138/focus,Jerom138/focus,KleeGroup/focus-core | router/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n//This JS file simply bootstraps the app from the root component when the window loads\n\nvar AppRoot = require('./components/AppRoot.jsx');\nvar Home = require('./components/Home.jsx');\nvar React = require('react');\n... | javascript | edit | 0 | 1 | mit | 3816d80fe0740d7fd2a0bd1e34a5e9ecdf868184 | chad-autry/react-bp,chad-autry/react-bp,chad-autry/react-bp | src/bootStrap.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function () {\n\t\tvar date = new Date();\n\t\tvar d = date.getDate();\n\t\tvar m = date.getMonth();\n\t\tvar y = date.getFullYear();\n\t\t\n\t\t$('#calendar-holder').fullCalendar({\n\t\t\theader: {\n\t\t\t\tleft: 'prev, next',\n\t\t\... | javascript | edit | 0 | 1 | mit | 8f6dfaf2808a48aed8c4fb99731d3bb176b7360b | ScienceSoft-Inc/calendar-bundle,buddhikajay/calendar-bundle,ScienceSoft-Inc/calendar-bundle,Th3Mouk/calendar-bundle,adesigns/calendar-bundle,Th3Mouk/calendar-bundle,buddhika-jay/calendar-bundle,adesigns/calendar-bundle,buddhikajay/calendar-bundle,adesigns/calendar-bundle,Toasterson/calendar-bundle,Th3Mouk/calendar-bund... | Resources/public/js/calendar-settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path') \nvar fs = require('fs-extra')\nvar spawn = require('cross-spawn')\n\nmodule.exports = function(root, appName) {\n var selfPath = path.join(root, 'node_modules', 'jsonnull-project-scripts')\n\n var appPackag... | javascript | edit | 0 | 2 | mit | e1016147596427290bd4297203a99449206f91e9 | jsonnull/project-scripts | scripts/init.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { h } from 'preact'\nimport InfoIcon from '../icons/InfoIcon'\nimport DescriptionIcon from '../icons/DescriptionIcon'\n\nfunction Footer({\n title,\n date,\n showTitle,\n showInfo,\n onTitleClick,\n onToggleClick\n}) {\n c... | javascript | edit | null | null | bsd-2-clause | ec289fd479b68b6236e52d7e130d169fc0c6173a | Nafta7/the-pod,Nafta7/the-pod | app/components/Footer.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst request = require('request');\n\nconst nuget = './nuget.exe';\n\nconsole.info(`Downloading 'nuget.exe'...`);\nconsole.info();\n\nrequest\n .get('https://dist.nuget.org/win-x86-commandline/latest/nuget... | javascript | edit | 0 | 2 | mit | 680680e60688119fc5fd21258c0a94e19e83774f | TimMurphy/npm-nuget | scripts/download-nuget.js | rejected_duplicate | Near-duplicate of sample 80763 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\nvar poststylus = require('poststylus');\n\nmodule.exports = {\n\tdevtool: 'source-map',\n\tentry: __dirname + '/src',\n\toutput: {\n\t\tpath: 'public/builds/',\n\t\tfilename: 'bundle.js'\n\t},\n\tmodul... | javascript | edit | 0 | 0 | apache-2.0 | 8ef0e59a97e087857d3ed7e87da5445c151242af | orangechat/webapp,orangechat/webapp | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst webpack = require('webpack');\nconst path = require('path');\nconst fs = require('fs');\nconst webpackMerge = require('webpack-merge');\n\nconst defaultConfig = {\n target: 'node',\n entry: {\n 'bundle.node': './src/index.js'... | javascript | edit | 0 | 0 | bsd-3-clause | a9a68fcd2b7ff898d93d257b7c65282b57bdaef8 | MapCreatorEU/m4n-api,MapCreatorEU/m4n-api | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env phantomjs\n/**\n * PhantomJS-based web performance metrics collector\n *\n * Usage:\n * ./phantomas.js\n * --url=<page to check>\n * [--format=json|csv|plain]\n * [--timeout=5]\n * ]--viewport=<width>x<height... | javascript | edit | 0 | 0 | bsd-2-clause | 4c99ee7a875f9eb3ac7662b22766e9351b2197bb | macbre/phantomas,gmetais/phantomas,ingoclaro/phantomas,ingoclaro/phantomas,gmetais/phantomas,william-p/phantomas,gmetais/phantomas,ingoclaro/phantomas,william-p/phantomas,macbre/phantomas,william-p/phantomas,macbre/phantomas | phantomas.js | rejected_duplicate | Near-duplicate of sample 70466 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar exec = require('child_process').exec;\nvar util = require('util');\nvar fs = require('fs');\nvar rimraf = require('rimraf');\n\nvar repos = [\n 'https://github.com/syngan/vim-vimlint',\n 'https://github.com/ynkdir... | javascript | edit | 0 | 4 | mit | a33c07ec2b2ad84ae1738ba4dbf1858f21e771bc | pine613/node-vimlint | setup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\n\ngulp.task('compile', function () {\n return gulp.src('./scss/*.scss')\n .pipe(sass().on('error', sass.logError))\n .pipe(gulp.dest('./dist/'));\n})... | javascript | edit | 0 | 1 | mit | 69fd17c26676ba77dc4352a11f059b92df1245c0 | aoimedia/Amazium,aoimedia/Amazium,OwlyStuff/Amazium,catchamonkey/amazium,OwlyStuff/Amazium,MikeBallan/Amazium | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n uglify = require('gulp-uglify'),\n prefix = require('gulp-autoprefixer'),\n minifyCSS = require('gulp-minify-css'),\n umd_wrap = require('gulp-wrap-umd'),\n stylus = require('g... | javascript | edit | 0 | 1 | mit | 40450c65322ff2f00a4c6dcc3fc1aeab2b982fcb | avorio/ouibounce,kevinweber/wbounce,iamlos/ouibounce,olhapi/ouibounce,DavideDaniel/ouibounce,iamlos/wbounce,trishasalas/ouibounce,carlsednaoui/ouibounce,dahal/ouibounce,avorio/ouibounce,haveal/wbounce,sebastien-fauvel/ouibounce,haveal/wbounce,sebastien-fauvel/ouibounce,DavideDaniel/ouibounce,olhapi/ouibounce,anthony-le... | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nW.WebviewAdvanced = function() {\n var win = UI.Win({\n title:'Better Web View'\n });\n \n var webview = Ti.UI.createWebView({\n url:'http://www.nytimes.com'\n });\n \n return win;\n}\n\n```\n\nApply this change: Add advanc... | javascript | edit | 0 | 6 | apache-2.0 | 9b4f0e418b60c136dac27644ae95d3f724e74443 | danielhanold/DannySink | Resources/windows/webview_advanced.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {NAVIGATE} from './actions'\nimport {loadRegionByCode} from './region'\n\n/* Action creators */\nexport function navigate(match = {}) {\n return dispatch => {\n const {params} = match\n if (params.region) {\n dispatch... | javascript | edit | 0 | 2 | mit | 493f77885ca21a669e88e1e91b0249421ac5719c | bengler/imdikator,bengler/imdikator | actions/navigate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (Shreds) { 'use strict';\n var name = 'feeds';\n var container = $('.span-fixed-sidebar');\n\n Shreds.components.push(name);\n Shreds[name] = {\n init: function () { },\n render: function (context, url) {\n cont... | javascript | edit | 0 | 2 | mit | 21d80a417983b060831e7e3c0b009eec4473be59 | fudanchii/shreds,fudanchii/shreds,fudanchii/shreds | app/assets/javascripts/feeds.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Sfx = {\n sounds: { },\n\n preload: function() {\n this.load('pickup_donut');\n this.load('pickup_veggie');\n this.load('omnom');\n this.load('burp');\n this.load('running');\n this.lo... | javascript | edit | 0 | 2 | mit | 2269784e3711a165c9dbfb52313a07fdfb3e2bfd | burningtomatoes/DonutAdventure | src/core/sfx.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire('dotenv').load();\nconst _ = require('lodash');\nconst Slack = require('slack-client');\nconst responses = require('./responses.js');\n\nconst slackToken = process.env.SLACK_TOKEN;\nconst slackChannel = process.... | javascript | edit | 0 | 7 | mit | a4ce6b695e841eb1e3b676408e97614ab80fde9d | dpca/koffee-kustodian | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar result = 0; \nfor (var i = 2; i < process.argv.length; i++) {\n\tresult += Number(process.argv[i]);\n};\n\nconsole.log(result)\n```\n\nApply this change: Complete Lesson 2 - Read a file"
},
{
"role": "assistant",
"conten... | javascript | edit | 0 | 0 | apache-2.0 | 51fea8ec6bc126fb6d724c76ae84f416e7d51c02 | Ashtonians-Academy/nodeschool.io-learnyounode | program.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar config = {\n channels: [ '#kokarn' ],\n server: 'irc.freenode.net',\n botName: 'KokBot'\n },\n irc = require( 'irc' ),\n bot = new irc.Client( config.server, config.botName, {\n ch... | javascript | edit | 0 | 1 | mit | 8bce467d01b1c4d0c5b35cc3bb707071c92085de | kokarn/KokBot | bot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * MediaErrorHandler Component Stories.\n *\n * Site Kit by Google, Copyright 2022 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 Lic... | javascript | edit | 0 | 1 | apache-2.0 | f100c717fe5370c8c04cb57eefebb32710b397b4 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | assets/js/components/MediaErrorHandler/index.stories.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * DNet eBusiness Suite. Copyright: Nan21 Electronics SRL. All rights reserved.\n * Use is subject to license terms.\n */\nExt.define(\"e4e.dc.command.DcEditInCommand\", {\n\textend : \"e4e.dc.command.AbstractDcSyncCommand\",\n\n\t... | javascript | edit | 0 | 2 | apache-2.0 | a4bf60559bab0e91e66c4dcc79fbcad3509f9e76 | seava/seava.lib.e4e | seava.e4e.impl/src/main/resources/webapp/js/e4e/dc/command/DcEditInCommand.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar childProcess = require('child_process');\nvar rimraf = require('rimraf');\nvar jscs = require('jscs');\nvar fs = require('fs');\nvar os = require('os');\n\nvar tmpDir = process.cwd() + '/'; //os.tmpDir();\n\nmodule.exports.check = f... | javascript | edit | 0 | 1 | mit | ffb2d0b4eec9691daced7f48745fc874808ba257 | jwilsson/cs-checker,jwilsson/cs-checker | lib/checker.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default function(app, files) {\n const login = \"Gaurav0\";\n const gist_id = \"35de43cb81fc35ddffb2\";\n const commit = \"f354c6698b02fe3243656c8dc5aa0303cc7ae81c\";\n\n files.push({\n filename: \"initializers.setup-test.... | javascript | edit | 0 | 1 | mit | 37aa2c5f5f29cad068af525c6a941a76c34829af | pangratz/ember-twiddle,vikram7/ember-twiddle,vikram7/ember-twiddle,Gaurav0/ember-twiddle,ember-cli/ember-twiddle,ember-cli/ember-twiddle,ember-cli/ember-twiddle,Gaurav0/ember-twiddle,Gaurav0/ember-twiddle,knownasilya/ember-twiddle,knownasilya/ember-twiddle,pangratz/ember-twiddle,knownasilya/ember-twiddle,pangratz/ember... | tests/helpers/run-gist.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst BASEURL = \"http://0.0.0.0:3000\";\n\n$(function(){\n $(\"#get-btn\").click(function(){\n console.log(\"GET\");\n $.get(\"http://mean-quote-machine.herokuapp.com/get_random_quote\", function(data) {\n v... | javascript | edit | 0 | 1 | mit | e6ec3db66293376c13410d9602878d0b8c835e37 | flygare/Minopt,flygare/Minopt,flygare/Minopt | Website/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar m = require('mithril');\nvar attachFastClick = require('fastclick');\nvar GameComponent = require('./components/game');\n\nm.mount(document.getElementById('app'), GameComponent);\nattachFastClick(document.body);\n\n... | javascript | edit | 0 | 0 | mit | 117790494171529fb3a742816b626adc6a15baa1 | caleb531/connect-four | app/scripts/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* globals Demo, console, require */\n\nDemo = {\n\tinput: {},\n\tcomponents: {},\n\trenderer: {}\n};\n\n\nDemo.loader = (function() {\n\t'use strict';\n\n\tfunction loadScripts(sources, onComplete, message) {\n\t\trequire(sources, func... | javascript | edit | 0 | 1 | mit | 21d14f17981c405437c8b3314f941b0d50e8ce38 | ProfPorkins/GameTech,ProfPorkins/GameTech,ProfPorkins/GameTech | JavaScript/DynamicLoading/scripts/loader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst logger = require('logger');\nconst weapon = require('weapon.js');\n\nclass ItemDatabase {\n\n constructor(itemType) {\n this.itemType = itemType;\n this.itemMap = new Map();\n fateBus.subscribe(module, 'fate.'+this.itemT... | javascript | edit | 0 | 2 | mit | 6055c542aacf2d4c77d3a69f0dc3cb7dc7a1dca1 | rslifka/fate_of_all_fools,rslifka/fate_of_all_fools | app/itemDatabase.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * Wef\n * Copyright (c) 2011 Pablo Escalada\n * MIT Licensed\n */\n\n/**\n * wef module\n */\n(function(global) {\n var wef = {\n version: \"0.0.1\"\n };\n\n //registering global variable\n if(global.wef) {\n ... | javascript | edit | 0 | 5 | mit | 173ef9f80ca7a96b6fa8f3435b9c3c53c97466d0 | diesire/wef,diesire/wef,diesire/wef | src/wef.core.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// auth constants\nexport const AUTH_USER = 'AUTH_USER';\nexport const UNAUTH_USER = 'UNAUTH_USER';\nexport const AUTH_ERROR = 'AUTH_ERROR';\nexport const SET_USER_DATA = 'SET_USER_DATA';\nexport const SET_CREDIT_CARDS = 'SET_CREDIT_CAR... | javascript | edit | 0 | 0 | mit | e865434a82098dae8d1ddf089034b549ed0bcd30 | GiancarlosIO/ecommerce-book-app,GiancarlosIO/ecommerce-book-app,GiancarlosIO/ecommerce-book-app | app/javascript/app/constants/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nTinytest.add(\"stylus - presence\", function(test) {\n\n var div = document.createElement('div');\n UI.insert(UI.render(Template.stylus_test_presence), div);\n div.style.display = 'block';\n document.body.appendChild(div);\n\n va... | javascript | edit | 0 | 1 | mit | f9277043dea042872edd74e42965bd59736ce1f4 | oliverhuangchao/meteor-stylus,mgs/meteor-stylus,mquandalle/meteor-stylus | stylus_tests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Token = require('../models/token').model;\nvar Bitcoin = require('../lib/bitcoin');\nvar config = require('../lib/config');\n\nmodule.exports = function(manager, req, res, next) {\n\n var token = req.params.token;\n if (!token) {\... | javascript | edit | 0 | 2 | isc | e3333f538bdac8d45f755f3a3aa8b9293fa3a6a6 | codius/codius-host,codius/codius-host | routes/get_token_metadata.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport configSchema from './config-schema'\nimport {toggleQuotes} from './toggle-quotes'\n\nexport default {\n config: configSchema,\n\n activate: () => {\n this.subscription = atom.commands.add('atom-text-editor', 'toggle-quotes:t... | javascript | edit | null | null | mit | 833a6225320e5b1fe4cf0d1a8357d9894de1097a | atom/toggle-quotes | lib/main.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Index = () => (\n <div>\n <p>Hello Next.js</p>\n </div>\n)\n\nexport default Index\n\n```\n\nApply this change: Add client side link action"
},
{
"role": "assistant",
"content": "// This is the Link API\nimport Li... | javascript | edit | 0 | 1 | mit | 134c46f14ba5e3149832c8ac9374ec3acccda93d | yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program | next/pages/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport DS from 'ember-data';\n<%if(projections) {%>import { Projection } from 'ember-flexberry-data';<%}%>\nexport let Model = Ember.Mixin.create({\n<%= model %>\n});<%if(parentModelName) {%>\nexport let defi... | javascript | edit | null | null | mit | 576cfdb81a47fb8274cf9059a2f7572f9bdf0f64 | Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry | blueprints/flexberry-model/files/__root__/mixins/regenerated/models/__name__.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(){\n'use strict';\n\nangular\n .module('secondLead', \n \t['ngDragDrop', \n \t'ui.bootstrap',\n \t'ui.router', \n \t'gridster',\n \t'restangular',\n 'angularUtils.directives.dirPagination',\n 'secondLead.common',\n... | javascript | edit | 0 | 1 | mit | 889e44327320fb73c7ffa5d5d34f54a8f7d58a97 | ac-adekunle/secondlead,ac-adekunle/secondlead,ac-adekunle/secondlead | app/assets/javascripts/angular/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\r\nmodule.exports = function(app) {\r\n var fintech = require('../controllers/fintechController');\r\n\r\n // fintech Routes\r\n app.route('/tickers')\r\n .get(fintech.list_ticker_price);\r\n\r\n app.route('/testSav... | javascript | edit | 0 | 1 | mit | 2a86e3b21722f92b01d845668c2ca1fac716cd49 | sunnyhuang2008/FintechAPI,sunnyhuang2008/FintechAPI | api/routes/fintechRoutes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* Magic Mirror\n * Node Helper: MotionEye\n *\n * By Cato Antonsen (https://github.com/CatoAntonsen)\n * MIT Licensed.\n */\n\nvar NodeHelper = require(\"node_helper\");\n\n\nmodule.exports = NodeHelper.create({\n\tstart: function() {\... | javascript | edit | 0 | 3 | mit | f23d310049b20280b88ebd07d7f2eb87d02ab4b3 | CatoAntonsen/MMM-MotionEye | node_helper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar app = angular\n .module('seenitApp', [\n 'ngAnimate',\n 'ngCookies',\n 'ngResource',\n 'ngRoute',\n 'ngSanitize',\n 'ngTouch'\n ])\n .config(function ($routeProvider, $locationProvider) {\n $... | javascript | edit | 0 | 2 | mit | 7669de047ef5a2187f77146d4fb2d29242b2660a | kshvmdn/seen-it | app/scripts/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { InputGroup, InputGroupAddon, InputGroupText } from 'reactstrap';\nimport fieldHolder from 'components/FieldHolder/FieldHolder';\n\nconst TextCheckboxGroupField = (props) => {\n const { children } = ... | javascript | edit | 0 | 2 | bsd-3-clause | 84ab525449f96c842157fc8d437066fa11fc993d | dnadesign/silverstripe-elemental,dnadesign/silverstripe-elemental | client/src/components/TextCheckboxGroupField/TextCheckboxGroupField.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow strict-local */\nimport differenceInSeconds from 'date-fns/difference_in_seconds';\n\nimport type { Dispatch, GetState, Narrow } from '../types';\nimport * as api from '../api';\nimport { PRESENCE_RESPONSE } from '../actionCons... | javascript | edit | null | null | apache-2.0 | 2e06e54041df649e3deff84eb34a193f24795e12 | vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile | src/users/usersActions.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction Game(){\n this.$track = $('#racetrack');\n this.finishLine = this.$track.width() - 54;\n}\n\nfunction Player(id){\n this.player = $('.player')[id - 1];\n this.position = 10;\n}\n\nPlayer.prototype.move = function(){\n this... | javascript | edit | 0 | 3 | mit | 6771946d46816e3a6a8f8736a457c427669c78cc | SputterPuttRedux/basic-javascript-racer,SputterPuttRedux/basic-javascript-racer | assets/js/racer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* ===============================================================================\n************ Infinite Scroll ************\n=============================================================================== */\nfunction handleInfini... | javascript | edit | 0 | 6 | mit | f06f6ec4bd2e0367fdc15f4db216e6979993f064 | hanziwang/Framework7,luistapajos/Lista7,itstar4tech/Framework7,crazyurus/Framework7,wjb12/Framework7,stonegithubs/Framework7-Plus,akio46/Framework7,elma-cao/Framework7,jeremykenedy/Framework7,NichenLg/Framework7,pandoraui/Framework7,Janusorz/Framework7,nolimits4web/Framework7,gagustavo/Framework7,xpyctum/Framework7,mak... | src/js/infinite-scroll.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { StyleSheet, Dimensions } from 'react-native';\n\nexport default StyleSheet.create({\n mainContainer: {\n // flex: 3,\n width: Dimensions.get('window').width * .97,\n height: Dimensions.get('window').height * .95,\n ... | javascript | edit | 0 | 0 | mit | 4ff9dd275307d6d42ec8dfee579715b1b37d6bb6 | fridl8/cold-bacon-client,fridl8/cold-bacon-client,fridl8/cold-bacon-client | containers/styles/GameplayScreenStyle.js | rejected_duplicate | Near-duplicate of sample 97460 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar addTextLabel = require(\"./add-text-label\"),\n addHtmlLabel = require(\"./add-html-label\"),\n addSVGLabel = require(\"./add-svg-label\");\n\nmodule.exports = addLabel;\n\nfunction addLabel(root, node, location) {\n var lab... | javascript | edit | 0 | 6 | mit | f4d8a835403b59d909e780d5fe9634a984249478 | 9n/dagre-d3,dagrejs/dagre-d3,dominiek/dagre-d3,9n/dagre-d3,dagrejs/dagre-d3,cbfx/dagre-d3,cpettitt/dagre-d3,dominiek/dagre-d3,dominiek/dagre-d3,cbfx/dagre-d3,9n/dagre-d3,cpettitt/dagre-d3,cbfx/dagre-d3,cpettitt/dagre-d3 | lib/label/add-label.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar assert = require('assert');\nvar LogEntries = require('le_node');\n\nfunction log () {\n // seneca custom log handlers\n\n if (process.env.LOGENTRIES_ENABLED === 'true') {\n assert.ok(process.env.LOGENTRIES_DEBUG... | javascript | edit | 0 | 0 | mit | 6c93d19484c542e3449d6a726ec52f74030bcaf2 | bmatthews68/cp-badges-service,CoderDojo/cp-badges-service,bmatthews68/cp-badges-service,CoderDojo/cp-badges-service | config/seneca-options.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n user: process.env.MONGO_USER || '',\n password: process.env.MONGO_PASSWORD || '',\n host: process.env.MONGO_HOST || 'localhost',\n port: process.env.MONGO_PORT || '27017',\n database: process.env.MONGO_DB || '',\... | javascript | edit | 0 | 0 | mit | d36102412b0d15f63e0830fff291ce8469f3e7ef | cjessett/buoyfeed | src/server/mongoConfig.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar addHeadingAnchors = {\n\n init: function (selector) {\n this.target = document.querySelector(selector);\n if (this.target) {\n this.addAnchorsToHeadings();\n }\n },\n\n addAnchorsToHeadings: function () {\n var h... | javascript | edit | 0 | 2 | mit | bd1d846880a51cb629d487ac4f01e5704612df12 | PolicyStat/ckeditor-plugin-autoid-headings,PolicyStat/ckeditor-plugin-autoid-headings | add_heading_anchors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst OFF = 0;\nconst WARN = 1;\nconst ERROR = 2;\n\nmodule.exports = {\n extends: \"../.eslintrc.js\",\n rules: {\n \"arrow-parens\": [ ERROR, \"as-needed\" ],\n \"no-confusing-arrow\": [ OFF ],\n \"no-use-before-define\": [... | javascript | edit | 0 | 0 | mit | af7fd6c14c2d32b78e35531d72bee275e2d95eb4 | rethinkdb/horizon,deadcee/horizon,deadcee/horizon,deadcee/horizon,rethinkdb/horizon,rethinkdb/horizon,rethinkdb/horizon | client/.eslintrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env/node\n\n/*\n\n Provide a command-line interface for `reconfigure`.\n ___ greeting, usage ___ en_US ___\n usage: node.bin.js\n\n ___ serve, usage ___ en_US ___\n usage: node bin.js reconfigure server\n\n options:\n ... | javascript | edit | 0 | 5 | mit | 06b4f67f2393be80f0c3cd3e4734d325ac15ae9c | demarius/reconfigure,bigeasy/reconfigure,demarius/reconfigure,bigeasy/reconfigure | bin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst app = express();\nconst manipulateString = require('./stringManipulator');\n\napp.get('/:unix(\\\\d+)', (req, res) => {\n res.send(manipulateString(req.params.unix));\n});\n\napp.listen(8000);... | javascript | edit | 0 | 1 | mit | 7691059774b41fd7c911865586a9074ab8a285db | mkermani144/freecodecamp-projects,mkermani144/freecodecamp-projects | backend/timestamp-microservice/src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var v = isArray( [] );\n* // returns true\n* @example\n* v... | javascript | edit | 0 | 1 | apache-2.0 | fc346cf5958f310e5d55effcb5228fbcc895a3d1 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | lib/node_modules/@stdlib/utils/is-array/lib/is_array.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['util'], function(util) {\n 'use strict';\n\n\tvar Parser = function () {\n\t}\n\n\tParser.prototype.parse = function () {\n\t\tconsole.log('Error: Pure virtual parse called!');\n\t\treturn {};\n\t}\n\n\tParser.prototype.prep... | javascript | edit | 0 | 3 | mit | 39979ccb430d762171a5c6b13e95470e101618c9 | fumyuun/visualtrace | scripts/parser/parser.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 tz: jstz.determine().name(),\n search: null,\n interval: 'day',\n prefix: '0/',\n region: 'world',\n start_at: moment().subtract(29, 'days').format('YYYY-MM-... | javascript | edit | 0 | 2 | mit | a54f2261b6e9fb96f1945fb8cfeda86db79afd6d | apinf/api-umbrella,apinf/api-umbrella,NREL/api-umbrella,NREL/api-umbrella,apinf/api-umbrella,apinf/api-umbrella,NREL/api-umbrella,NREL/api-umbrella,apinf/api-umbrella | src/api-umbrella/admin-ui/app/controllers/stats/base.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst config = require('collections-online/lib/config');\nconst cip = require('../services/cip');\n\nconst CROWD_TAGS = '{73be3a90-a8ef-4a42-aa8f-d16ca4f55e0a}';\n\nfunction saveToCip(catalog, id, values) {\n return cip.setFieldValues(... | javascript | edit | 0 | 2 | mit | e5cd3df4ec94dd86eea827fbb94f2dd949043958 | CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder | controllers/motif-tag.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Modify CLI to copy index.html"
},
{
"role": "assistant",
"content": "#!/usr/bin/env node\n\n// Copy over the index.html\nvar fs = require(\"fs\");\nvar path = require(\"path\");\nfs.createReadStream(path.join(__dirname, \"ind... | javascript | new_file | 0 | 0 | mit | d2276322b44b06ac8a6a6d0894c2d38aaf155754 | curran/example-viewer,curran/example-viewer | cli.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction Prefetch() {\n this.hooks();\n}\n\nPrefetch.prototype.hooks = function () {\n var links = document.querySelectorAll('a');\n\n for (var n = 0; n < links.length; n++) {\n\n links[n].addEventListener('mousedown', f... | javascript | edit | 0 | 3 | apache-2.0 | 5711d4bb9fa6a4a3bc05a0b666a6923a08461039 | Jarzon/prefetch.js | client/prefetch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nimport env from '../env'\nconst full = (process.type !== 'renderer' && env.name !== 'test')\n\nimport pathmaker from '../util/pathmaker'\nimport mklog from '../util/log'\nconst loggerOpts = {\n sinks: {}\n}\nif (full) {\n loggerOpts... | javascript | edit | 0 | 0 | mit | ea7ee71c1ce86ad2528bcf38fbae809927100d71 | itchio/itchio-app,itchio/itch,itchio/itch,itchio/itch,leafo/itchio-app,itchio/itchio-app,itchio/itchio-app,leafo/itchio-app,itchio/itch,itchio/itch,leafo/itchio-app,itchio/itch | appsrc/logger/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport BaseRoute from '../_base';\n\nexport default BaseRoute.extend({\n model: function() {\n return this.modelFor('page');\n },\n setupController: function(controller, page) {\n this.set('title', [page.get('treatise.title'), ... | javascript | edit | 0 | 4 | mit | 9bb3b78061aea385b86ae3c052f596d6b3b4cf78 | artzte/fightbook-app | app/routes/page/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.