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// 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 | 1 | mit | 37a999a30881eaabf0736a1f8e8b686e8cbca912 | drodriguez56/lotifyMe,drodriguez56/lotifyMe,drodriguez56/lotifyMe | app/assets/javascripts/application.js | rejected_duplicate | Near-duplicate of sample 70935 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n // setup html editor\n var imgUploadHtml = $('#html-editor-image-upload-tab').html();\n\n if (imgUploadHtml) {\n var options = {\n \"html\": true,\n customTemplates: {\n image: f... | javascript | edit | 0 | 2 | mit | c5c549fc70a28baaf704740e84e44f4ab4f15b47 | nnamon/coursemology.org,allenwq/coursemology.org,Coursemology/coursemology.org,nusedutech/coursemology.org,Coursemology/coursemology.org,Coursemology/coursemology.org,dariusf/coursemology.org,allenwq/coursemology.org,nusedutech/coursemology.org,allenwq/coursemology.org,nnamon/coursemology.org,nnamon/coursemology.org,al... | app/assets/javascripts/html_editor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nvar mergeTrees = require('broccoli-merge-trees');\nvar pickFiles = require('broccoli-static-compiler');\nvar compileES6 = require('broccoli-es6-concatenator');\nvar templateCompiler = require('broccoli-ember-h... | javascript | edit | 0 | 0 | mit | 4d7bbbbfb0c9fdbc7e77fc7ae8e025e95a0ece0e | ef4/liquid-fire,chadhietala/liquid-fire,jayphelps/liquid-fire,runspired/liquid-fire,totallymike/liquid-fire,ember-animation/liquid-fire-velocity,knownasilya/liquid-fire,twokul/liquid-fire,byelipk/liquid-fire,acorncom/liquid-fire,ember-animation/ember-animated,ember-animation/liquid-fire-velocity,chadhietala/liquid-fire... | packaging/Brocfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$( document ).on('DOMNodeInserted', 'pre', function(eventObject) {\n\tvar thisElement = $(this);\n\n\tif(!thisElement.hasClass('language-abap')) {\n\t\tchangingPres = true;\n\n\t\tthisElement.addClass('language-abap');\n\n\t\tvar newHtm... | javascript | edit | 0 | 2 | mit | bc98504aa6a794945ca44f07d2586baf86f56014 | dellagustin/SAP_Note_Enhancer,dellagustin/SAP_Note_Enhancer | extensionFiles/sap_ci_launchpad_enhancer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $(\"a.load_reviews\").on(\"click\", function(e){\n//Send AJAX LOW-LEVEL get request\n $.ajax({\n method: \"GET\",\n url: this.href\n }).done(function(response) {\n//get response\n $(\"div.rev... | javascript | edit | 0 | 1 | mit | 54bc79c166071243b191489da1f1cc17acea3386 | jffernan/rails-my-restaurant-review,jffernan/rails-my-restaurant-review,jffernan/rails-my-restaurant-review | app/assets/javascripts/restaurants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst resolve = require('resolve');\n\nfunction loadPlugin(plugin, paths) {\n if (typeof plugin === 'string') {\n // Apply the plugin with default options if passing only a string\n return loadPlugin({ name: plug... | javascript | edit | 0 | 9 | mit | e1c73ad7cd88d20b46e521ed4fc766079d0798b9 | jaredpalmer/razzle,jaredpalmer/razzle | packages/razzle/config/loadPlugins.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport DayPicker from '../../../src';\n\nimport styles from '../styles/cssmodules.css';\n\nexport default function CSSModules() {\n return (\n <DayPicker\n classNames={styles}\n enableOutsideDay... | javascript | edit | 0 | 3 | mit | eafefb302c6b02820a6dc326a71d13035ddef449 | gpbl/react-day-picker,saenglert/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker | examples/src/examples/CSSModules.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Internal counter for added top hits aggregations.\n * @type {Number}\n */\nlet count = 0;\n\n/**\n * Construct a Top hits aggregation.\n *\n * @param {Object} opts Options to include in the aggregation (maybe empty).\n * @para... | javascript | edit | 0 | 2 | mit | f2439aaa7d24585fad3751c3b75c258c8e85ab2b | node-packages/bodybuilder,ShareIQ/bodybuilder,ShareIQ/bodybuilder,danpaz/bodybuilder,arielshad/bodybuilder,danpaz/bodybuilder,npatmaja/bodybuilder,danpaz/bodybuilder,evgenypoyarkov/bodybuilder,node-packages/bodybuilder,npatmaja/bodybuilder,evgenypoyarkov/bodybuilder,arielshad/bodybuilder | src/aggregations/top-hits-aggregation.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Export javascript style and css style vendor prefixes.\n * Based on \"transform\" support test.\n */\n\nimport isBrowser from 'is-browser'\n\nlet js = ''\nlet css = ''\n\n// We should not do anything if required serverside.\nif ... | javascript | edit | 0 | 0 | mit | afcd3ac9a441b65b74b75c09cce407654d6bad6b | jsstyles/css-vendor,cssinjs/css-vendor,cssinjs/css-vendor,jsstyles/css-vendor | src/prefix.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint no-console: off */\nimport build from \"./scripts/build\"\nimport start from \"./scripts/start\"\nimport bootstrap from \"./scripts/bootstrap\"\n\nconst ARGSPOS_SCRIPT = 2\nconst ARGSPOS_ARGUMENTS = 3\n\nvar script = process.a... | javascript | edit | 0 | 1 | mit | f4a656d1c678fbbc1a8f77f029d3baf96f4d719b | sebastian-software/edgestack,sebastian-software/advanced-boilerplate | src/script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2018 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * @implements {Common.Runnable}\n */\nexport class WorkerMai... | javascript | edit | 0 | 6 | bsd-3-clause | 2b54391d72e260a675c2327ec38b48a48d30ecef | ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend | front_end/worker_main/WorkerMain.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst uuid = require('uuid');\nconst express = require('express');\nconst router = express.Router();\nconst Promise = require('bluebird');\nconst logger = require('../../logger');\n\nconst { getPathwayJson } = require('./generate-pathwa... | javascript | edit | 0 | 2 | mit | 20f31e8ab519315224ee7418a5091538843c0a8d | PathwayCommons/app-ui,PathwayCommons/app-ui,PathwayCommons/app-ui | src/server/routes/pathways/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$j(document).ready(function () {\n 'use strict';\n if (window.location.pathname.indexOf('lunchtransactions.html') === -1) {\n var newLaunchBox = $j('#ptgNewLaunchBox');\n\n // Removes Older Launch link\n newLaunchBo... | javascript | edit | 0 | 2 | apache-2.0 | 181df669f4df839ff3d1e99c2f292550b71b2076 | IronCountySchoolDistrict/pt-gradebook,IronCountySchoolDistrict/pt-gradebook | src/scripts/pt-gradebook/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function($){\n \"use strict\";\n\n var url = \"http://devitconf.org/\";\n\n var devit = {\n\n init: function () {\n devit.getSocialCounts();\n devit.setCurrentYear();\n },\n\n getSocialCounts: function () {\n ... | javascript | edit | 0 | 4 | mit | ac30d9a83d6cc033d3ae89a9717660e31a67d919 | skgtech/devit,skgtech/devit,skgtech/devit | app/js/devit-custom.js | rejected_duplicate | Near-duplicate of sample 74265 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * syndicate-g\n * https://github.com/petarov/syndicate-g\n *\n * The MIT License (MIT)\n * Copyright (c) 2013 Petar Petrov\n */\n\"use strict\";\n\nvar _ = require('underscore')._;\nvar Redis = require('redis');\n\nvar cli;\n\n/**\... | javascript | edit | 0 | 3 | mit | 0a22a15ce8d3fe79b3f2a84e51072581ae0c5ad3 | petarov/syndicate-g,petarov/syndicate-g,vexelon-dot-net/syndicate-g,vexelon-dot-net/syndicate-g | lib/cache/redis.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @ngdoc function\n * @name websocketTesterApp.controller:MainCtrl\n * @description\n * # MainCtrl\n * Controller of the websocketTesterApp\n */\nangular.module('websocketTesterApp')\n .controller('MainCtrl', fun... | javascript | edit | 0 | 2 | apache-2.0 | 776f5419913eced458695fd543c87c6a350a2313 | alexcreasy/websocket-tester,alexcreasy/websocket-tester | app/scripts/controllers/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { takeEvery, all, put, select } from 'redux-saga/effects';\nimport { fetchDataAction } from 'controllers/fetch';\nimport { activeProjectSelector } from 'controllers/user';\nimport { URLS } from 'common/urls';\nimport { NAMESPACE,... | javascript | edit | 0 | 1 | apache-2.0 | 194487892ec8d2128de4c6a921cee4509d330dcf | reportportal/service-ui,reportportal/service-ui,reportportal/service-ui | app/src/controllers/administrate/events/sagas.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// for use with `d3-playbooks-riot-components`\n\nexport default ({\n data,\n yCol,\n getColor\n}, {getLabel}) => {\n if (!getLabel) getLabel = q => Math.round(q)\n return getColor.quantiles().map(q => {\n return {\n label:... | javascript | edit | 0 | 2 | mit | fdf2b50cc43beea27da5144be9d790db8c90c568 | simonwoerpel/d3-playbooks-maps,simonwoerpel/d3-playbooks-maps | src/utils/legend/get_legend_items.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as constants from \"./constants\";\n\nlet initNum = 1;\nfunction Attractor(game, center) {\n this.type = \"attractor\";\n this.id = initNum;\n this.isAlive = true;\n\n this.game = game;\n this.center = center;\n ... | javascript | edit | 0 | 1 | mit | d49981d73fdf5396853cd82203c700ca550f55ac | Mark-Simulacrum/gravity-simulator,Mark-Simulacrum/gravity-simulator | public/javascript/Attractor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport RenderSuccess from './index.render'\nimport {connect} from 'react-redux'\nimport {sawPaperKey} from '../../../actions/signup'\nimport {navigateUp} from '../../../actions/route-tree'\n\n// $FlowIssue\nexport default conn... | javascript | edit | null | null | bsd-3-clause | e05de007e55dd778e8c65cad2f4f94a99dd6e325 | 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/login/signup/success/index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global describe, it, expect */\nimport { Tab, Tabs, TabList, TabPanel } from '../main';\nimport TabComponent from '../components/Tab';\nimport TabListComponent from '../components/TabList';\nimport TabsComponent from '../components/T... | javascript | edit | 0 | 1 | mit | f9a1dc6dfb27d653623d54bff8d95b5481c3f718 | mzabriskie/react-tabs,neeharv/react-tabs,reactjs/react-tabs,rackt/react-tabs,reactjs/react-tabs | src/__tests__/main-test.js | rejected_duplicate | Near-duplicate of sample 73962 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n This is the client side JavaScript.\n This is a VERY basic client. It is little more than the 'hello world' of chatrooms!\n \n Good improvements would be:\n to prevent the user from sending empty messages\n to force the use... | javascript | edit | 0 | 1 | mit | c9019a4f87c5857edf4c178fcef89961cf1ac9e7 | YorkshireKev/chatroom.js | public/chatroom.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { moduleForModel, test } from 'ember-qunit';\n\nmoduleForModel('event', 'Unit | Serializer | event', {\n needs: [\n 'serializer:event',\n 'serializer:user',\n 'serializer:event-topic',\n 'model:event-type',\n 'mod... | javascript | edit | 0 | 1 | apache-2.0 | da65c4d30640fec7bddba075d2ee1706159d3151 | harshitagupta30/open-event-frontend,CosmicCoder96/open-event-frontend,ritikamotwani/open-event-frontend,geekyd/open-event-frontend,harshitagupta30/open-event-frontend,ritikamotwani/open-event-frontend,harshitagupta30/open-event-frontend,geekyd/open-event-frontend,geekyd/open-event-frontend,CosmicCoder96/open-event-fron... | tests/unit/serializers/event-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function($) {\n\nvar plugin = \"Echo.StreamServer.Controls.Stream.Item.Plugins.Reply\";\n\nEcho.Tests.module(plugin, {\n\t\"meta\": {\n\t\t\"className\": plugin\n\t}\n});\n\nEcho.Tests.pluginRenderersTest(plugin, {\n\t\"query\": \"chil... | javascript | edit | 0 | 1 | apache-2.0 | 73fbab3f739e3c936d83207797a73d90c9caed85 | EchoAppsTeam/js-sdk,EchoAppsTeam/js-sdk | tests/unit/streamserver/plugins/reply.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint bitwise: true,\n curly: true,\n eqeqeq: true,\n esversion: 6,\n forin: true,\n freeze: true,\n latedef: nofunc,\n noarg: true,\n nocomma: true,\n ... | javascript | edit | 0 | 2 | mit | df06110a88709a5d821791bd49f28803fcadeebb | ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js | gulpfile.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 | 0 | mit | 4b89104f07c87009dbb130ff6d513cb8f1886eca | alphagov/signonotron2,alphagov/signonotron2,alphagov/signonotron2,alphagov/signonotron2 | vendor/assets/javascripts/application.js | rejected_duplicate | Near-duplicate of sample 85414 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar del = require('del');\nvar ts = require('gulp-typescript');\nvar mocha = require('gulp-mocha');\n\nvar tsProject = ts.createProject('tsconfig.json');\n\ngulp.task('clean:build', function () {\n return d... | javascript | edit | 0 | 1 | mit | 440c00e72834fa58390e8f620cfe012e3664925e | nitintutlani/scraper,nitintutlani/scraper | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar tsc = require('gulp-tsc');\nvar tape = require('gulp-tape');\nvar tapSpec = require('tap-spec');\nvar del = require('del');\n\ngulp.task(\"test:clean\", function(done) {\n del(['build-test/**']).then(fu... | javascript | edit | 0 | 1 | mit | 5794d440214600359131cdef5f24e23d34995ae5 | Jameskmonger/isaac-crypto | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n ts = require('gulp-typescript'),\n sourcemaps = require('gulp-sourcemaps'),\n del = require('del'),\n shell = require('gulp-shell');\n\ngulp.task('ts', ['clean'], function () {\n var tsProjec... | javascript | edit | 0 | 1 | mit | a4af957ab8e8048c3799312d9f25243b7533fe31 | lionelg3/WSRpc,lionelg3/WSRpc,lionelg3/WSRpc | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter;\nvar mixin = require('merge-descriptors');\n\nfunction Command() {\n this.actions = [];\n\n mixin(this, EventEmitter.prototype, false);\n}\n\nCommand.prototype._findA... | javascript | edit | 0 | 3 | mit | 296c3e26c8aa534be0f5e3d143914632489da555 | lund5000/slacktion | lib/slack-slash.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function( $ ) {\n\tfunction setHeaderHeight() {\n\t\t$( '#screen-fill' ).css( 'height', $( window ).height() - 50 );\n\t}\n\n\t$( window ).load( setHeaderHeight );\n\t$( window ).resize( setHeaderHeight );\n} )( jQuery );\n\n```\n\nApp... | javascript | edit | 0 | 1 | mit | 8c5762b7cc7439e1f6fa585efbfd83f48af6543a | Automattic/socket.io-website,davidcelis/socket.io-website,Automattic/socket.io-website,davidcelis/socket.io-website,Automattic/socket.io-website | js/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar CompositeDisposable, Synesthesia;\n\nCompositeDisposable = require('atom').CompositeDisposable;\nvar T = require('timbre');\n\nmodule.exports = Synesthesia = {\n activate: function() {\n this.subscriptions = new CompositeDisposa... | javascript | edit | 0 | 2 | mit | 2b32cef6333be2c98a10f5c0a2ad202eef3ec3d6 | dchacke/synesthesia | lib/synesthesia.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar canvas = new fabric.Canvas('draughts-canvas');\ncanvas.setBackgroundColor(\"#ffffff\");\nvar mousePos;\nvar board;\nvar Color = net.brehaut.Color; //TODO move to bower\nvar hoverAnimationTime = 100;\nvar colorAnimationTime = 300;\nv... | javascript | edit | 0 | 2 | mit | 6240fe8a06fb724977963c828b70642287d5f053 | misko321/draughts,misko321/draughts | public/draughts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar JSONDumper = function() {\n\tthis.onBrowserLog = function(browser, log, type) {\n\t\tif( type != \"dump\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar objectMerge = require( 'object-merge' );\n\t\tvar fs = require( 'fs' );\n\n\t\tvar logObj... | javascript | edit | 0 | 4 | apache-2.0 | 65fc9bdc183cebf8268cab7e7dbe0886bea3b235 | Brightspace/karma-json-log-test-configurer | json-dumper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\nvar cors = require('./cors');\nvar HttpError = require('./errors').HttpError;\nvar db = require('../libs/db');\n\nrouter.use(cors);\n\nrouter.get('/', function(req, res,... | javascript | edit | 0 | 3 | mit | dbd8550ffab707d25f1b2a9921bb4c94932d4e5a | mark86092/WorkTimeSurvey-backend | routes/workings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from \"react\";\n\nconst Template = ({ children }) => (\n <html lang=\"en\">\n\n <head>\n <meta charSet=\"utf-8\" />\n <meta httpEquiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\n <meta name=\"vi... | javascript | edit | 0 | 1 | mit | 06507dd05e25be56cef3cada52e0521dcd00bd6a | hihuz/sb | src/components/Template.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nConsole = {}\n\nConsole.puts = function(str, no_newline) {\n var text = (str + (no_newline ? \"\" : \"\\n\")).escapeHTML();\n span = document.createElement(\"span\");\n span.innerHTML = text.replace(/\\n/g,\"<br>\").replace(/ /... | javascript | edit | 0 | 2 | mit | 09306c347f53630d2f5b32ac57c6c17958739635 | biwascheme/biwascheme.github.io,yhara/biwascheme,yhara/biwascheme,masatake/biwascheme,biwascheme/biwascheme,biwascheme/biwascheme,masatake/biwascheme,biwascheme/biwascheme.github.io,biwascheme/biwascheme | src/console/web-console.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nimport OsfAgnosticAuthControllerMixin from 'ember-osf/mixins/osf-agnostic-auth-controller';\n\nimport {\n getAuthUrl\n} from 'ember-osf/utils/auth';\n\nexport default Ember.Controller.extend(OsfAgnosticA... | javascript | edit | 0 | 1 | apache-2.0 | 06c0bf8b66653e6f6118ccde31ca3d8d213bd685 | caneruguz/share-analytics,caneruguz/share-analytics,caneruguz/share-analytics | client/app/controllers/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n({\n /**\n * Verify the correct AppCache events are received and are in the right order, without an error event. This case\n * covers when we have not seen the page before and must download resources.\n */\n testAppCa... | javascript | edit | 0 | 1 | apache-2.0 | 9cb60dfedf5adfbe65e109cd70917d323a047763 | badlogicmanpreet/aura,SalesforceSFDC/aura,lcnbala/aura,lhong375/aura,madmax983/aura,SalesforceSFDC/aura,navyliu/aura,badlogicmanpreet/aura,lcnbala/aura,forcedotcom/aura,navyliu/aura,DebalinaDey/AuraDevelopDeb,lcnbala/aura,forcedotcom/aura,TribeMedia/aura,madmax983/aura,navyliu/aura,TribeMedia/aura,forcedotcom/aura,igor... | aura-impl/src/test/components/appCache/appCacheEvents/appCacheEventsTest.js | rejected_duplicate | Near-duplicate of sample 78695 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable no-unused-vars */\nclass Service {\n constructor (options) {\n this.options = options || {};\n }\n\n find (params) {\n console.log('params ==>', params)\n const { availableVideos } = params;\n let result... | javascript | edit | 0 | 2 | mit | 66096d9627077809d35af680ea0e431e195a328f | andreafalzetti/watch-gate,andreafalzetti/watch-gate | src/services/catalog/catalog.class.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nJARS.internal('ConfigTransforms/CheckCircularDeps', function() {\n 'use strict';\n\n /**\n * @memberof JARS.internals.ConfigTransforms\n *\n * @param {boolean} value\n *\n * @return {boolean}\n */\n func... | javascript | edit | 0 | 1 | mit | a744c536b4375eadb1d709f37cffd20cfb1fe753 | HROH/JAR | src/internals/ConfigTransforms/CheckCircularDeps.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine('soundMatrixConstants', function () {\n 'use strict';\n\n var matrix = [\n [false, false, false, false, false, false, false, false],\n [false, false, false, false, false, false, false, false],\n [false,... | javascript | edit | 0 | 1 | mit | bdbd2097f4f1403839472355c1879d216485fe3d | erikdrobne/animal-band,erikdrobne/animal-band | src/components/sound-matrix/soundMatrixConstants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nexports.config = {\n directConnect: true,\n\n allScriptsTimeout: 80000,\n\n specs: [\n 'test/e2e/*.js'\n ],\n\n capabilities: {\n 'browserName': 'chrome'\n },\n\n baseUrl: 'http://localhost:3000',\n\n frame... | javascript | edit | 0 | 1 | mit | e085416451d897c00f99d5da4d17c26a90d05c9a | bkimminich/juice-shop,bonze/juice-shop,bonze/juice-shop,bonze/juice-shop,bonze/juice-shop,m4l1c3/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,m4l1c3/juice-shop,m4l1c3/juice-shop,m4l1c3/juice-shop,bkimminich/juice-shop,bonze/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,m4l1c3/juice-shop | protractor.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Graphite = require('graphite');\nvar Measured = require('measured');\n\nvar reportInterval = 5000;\nvar graphiteHost = process.env.GRAPHITE_HOST || null;\nvar graphitePort = process.env.GRAPHITE_PORT || 2003;\nvar envName = process.... | javascript | edit | 0 | 3 | mit | 52839aa89a6e50dec804f537ced08323a873e664 | jonathan-fielding/polyfill-service,kdzwinel/polyfill-service,JakeChampion/polyfill-service,mcshaz/polyfill-service,mcshaz/polyfill-service,kdzwinel/polyfill-service,JakeChampion/polyfill-service,jonathan-fielding/polyfill-service,jonathan-fielding/polyfill-service,kdzwinel/polyfill-service,mcshaz/polyfill-service | service/metrics.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* Copyright © 2015 PointSource, LLC. All rights reserved. */\n/*\n * Use the node-cors library to enable CORS on all express.js apps and endpoints.\n *\n * All config options are passed directly to the cors library.\n * See https://git... | javascript | edit | 0 | 1 | mit | 40946a8e0fa132421205c8b7dea225f23f41196b | BlueOakJS/blueoak-server | middleware/cors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * A rate-limiting Throttle model, by IP address\n *\n */\nvar mongoose = require('mongoose')\nvar ipRegex = require('ip-regex')\nvar Schema = mongoose.Schema\nmongoose.Promise = global.Promise\n/**\n * Register the Throttle model\... | javascript | edit | 0 | 1 | mit | 0a682a0ab8c3c56de570e694473f5e3c4754a5d0 | GreenPioneer/mongo-throttle,andjosh/mongo-throttle | models/throttle.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar HSCard = function(card) {\n this.id = card.id;\n this.cost = card.cost;\n this.attack = card.attack;\n this.health = card.health;\n this.quality = card.quality;\n this.name = card.name;\n this.description = card.description;\... | javascript | edit | 0 | 1 | apache-2.0 | dc58d3072b923df53997732f80218bf94108a578 | jirwin/node-wowhead | lib/hs-card.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport { NavLink } from 'react-router-dom';\nimport './Sidenav.less';\n\nconst Sidenav = ({ username }) =>\n (<div>\n {... | javascript | edit | 0 | 2 | mit | f192b727bfac82bd9de0878fe4b9a570453006a9 | busyorg/busy,ryanbaer/busy,ryanbaer/busy,busyorg/busy | src/components/Navigation/Sidenav.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nlet angular = require('angular');\n\nmodule.exports = angular.module('spinnaker.pipelines.stage.determineTargetReferenceStage', [])\n .config(function(pipelineConfigProvider) {\n pipelineConfigProvider.registerStag... | javascript | edit | 0 | 1 | apache-2.0 | 00eb90c85e98e585e9f9006e5aebc61795fe6d26 | duftler/deck,zanthrash/deck-1,ajordens/deck,HaishiBai/deck,icfantv/deck,spinnaker/deck,ajordens/deck,kenzanlabs/deck,sgarlick987/deck,zanthrash/deck-1,sgarlick987/deck,spinnaker/deck,kenzanlabs/deck,sgarlick987/deck,duftler/deck,icfantv/deck,ajordens/deck,icfantv/deck,HaishiBai/deck,icfantv/deck,zanthrash/deck-old,spin... | app/scripts/modules/pipelines/config/stages/determineTargetReference/determineTargetReference.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar play = require('../engine/play');\nvar Player = function(game, name) {\n this.name = name;\n this.inventory = null;\n this.chosen = false;\n}\n\nPlayer.prototype.populateInventory = function (constructSprite) {\n this.inventory ... | javascript | edit | 0 | 1 | mit | fe9daf51bf7b47905d466a3df9ea9d3800fde67c | sirugh/not-chef-gamejam2015,sirugh/not-chef-gamejam2015,smcclellan/not-chef-gamejam2015,smcclellan/not-chef-gamejam2015 | app/model/Player.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react'\nimport { connect } from 'react-redux'\nimport { TileLayer } from 'react-leaflet'\n\nclass RoutesOverlay extends Component {\n static propTypes = {\n }\n\n render () {\n return (... | javascript | edit | 0 | 4 | mit | 6a64eb49ce2a47b4757dadd87082f6df60ea652c | opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux | lib/components/map/routes-overlay.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Template } from 'meteor/templating';\n\nimport '/imports/ui/components/ticket/ticket.js';\n\nimport './queue-table.html';\n\nTemplate.QueueTable.helpers({\n noActiveTickets(queue) {\n return queue.activeTickets().count() ==... | javascript | edit | 0 | 4 | mit | f944e3c7d338a5298b665adb8f91b172a90d9023 | athyuttamre/signmeup,gregcarlin/signmeup,gregcarlin/signmeup,etremel/signmeup,etremel/signmeup,signmeup/signmeup,etremel/signmeup,signmeup/signmeup,athyuttamre/signmeup,gregcarlin/signmeup | app/imports/ui/components/queue-table/queue-table.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global Ghost, _ */\n(function () {\n 'use strict';\n //id:0 is used to issue PUT requests\n Ghost.Models.Settings = Ghost.ProgressModel.extend({\n url: Ghost.paths.apiRoot + '/settings/?type=blog,theme,app',\n i... | javascript | edit | 0 | 2 | mit | 8cc7e4d04641f996f997ade2716eaad2b49a2ba8 | acburdine/Ghost-Admin,JohnONolan/Ghost-Admin,airycanon/Ghost-Admin,dbalders/Ghost-Admin,TryGhost/Ghost-Admin,airycanon/Ghost-Admin,TryGhost/Ghost-Admin,kevinansfield/Ghost-Admin,kevinansfield/Ghost-Admin,JohnONolan/Ghost-Admin,dbalders/Ghost-Admin,acburdine/Ghost-Admin | models/settings.js | rejected_duplicate | Near-duplicate of sample 71683 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction Scratch3ControlBlocks(runtime) {\n /**\n * The runtime instantiating this block package.\n * @type {Runtime}\n */\n this.runtime = runtime;\n}\n\n/**\n * Retrieve the block primitives implemented by this packa... | javascript | edit | 0 | 3 | bsd-3-clause | 2cd6bf93bb95cd7ba17582b01d7889bc78adfbd6 | LLK/scratch-vm,TheBrokenRail/scratch-vm,TheBrokenRail/scratch-vm,LLK/scratch-vm,LLK/scratch-vm | src/blocks/scratch3_control.js | rejected_duplicate | Near-duplicate of sample 73439 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport ip from 'ip';\n\nimport leftpad from './left-pad';\n\nconst app = express();\nconst port = process.env.PORT || 3000;\n\napp.get('/', (req, res, next) => {\n let str = req.query.str;\n c... | javascript | edit | 0 | 2 | mit | 004242986b464de87b68cb5578cc615ccae3f326 | melonmanchan/left-pad-services,melonmanchan/left-pad-services,melonmanchan/left-pad-services,melonmanchan/left-pad-services,melonmanchan/left-pad-services,melonmanchan/left-pad-services,melonmanchan/left-pad-services,melonmanchan/left-pad-services | node/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { extend } from 'flarum/extend';\nimport LinkButton from 'flarum/components/LinkButton';\nimport IndexPage from 'flarum/components/IndexPage';\nimport DiscussionList from 'flarum/components/DiscussionList';\n\nexport default func... | javascript | edit | 0 | 3 | mit | 68dc51ce59a606ed42cd574b191f4b80e82daf29 | flarum/subscriptions,flarum/subscriptions,flarum/subscriptions | js/src/forum/addSubscriptionFilter.js | rejected_duplicate | Near-duplicate of sample 82288 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { shallow, mount } from 'enzyme';\nimport React from 'react';\nimport assert from 'assert';\nimport ComboEditor from './editor';\nimport { workflow } from '../../../pages/dev-classifier/mock-data';\n\nconst task = {\n type: 'com... | javascript | edit | 0 | 1 | apache-2.0 | 3a00d034b184423c7c17d2edee7392a95afb8788 | jelliotartz/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,zooniverse/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,jelliotartz/Panoptes-Front-End,jelliotartz/Panoptes-Front-End | app/classifier/tasks/combo/editor.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nimport chai, { expect } from 'chai';\nimport sinon from 'sinon';\nimport { default as sinonChai } from 'sinon-chai';\nimport 'sinon-as-promised';\n\nrequire('../../../angular-test-helper');\nrequire('browser/main');\n\n... | javascript | edit | 0 | 1 | apache-2.0 | 95d1497aa560f7bb01069fb1cc191607edec51dd | dgolovin/developer-platform-install,dgolovin/developer-platform-install,redhat-developer-tooling/developer-platform-install,redhat-developer-tooling/developer-platform-install | test/unit/pages/location/controller-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport mergeWith from \"lodash/mergeWith\";\n\nexport default function (dest?: Object, src?: Object): ?Object {\n if (!dest || !src) return;\n\n return mergeWith(dest, src, function (a, b) {\n if (b && Array.isArray(... | javascript | edit | null | null | mit | 25d22ba40eb665de9d8587c40d1b3cb68fb90c2b | forivall/tacoscript,forivall/tacoscript | packages/comal/src/helpers/merge.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar siteUrl = 'http://example.org';\n\ncasper.test.setUp(function globalSetUp() {\n phantom.clearCookies();\n});\n\n```\n\nApply this change: Declare environment as a variable"
},
{
"role": "assistant",
"content": "var\n ... | javascript | edit | 0 | 1 | mit | 4f6a314f85f2ac8b387cc52b2fec482bede09923 | fabschurt/wp-tweaks,fabschurt/wp-tweaks,fabschurt/wp-tweaks | tests/functional/common.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*****************************************************************************/\n/* PagesNew: Event Handlers and Helpersss .js*/\n/*****************************************************************************/\nTemplate.PagesNew.events(... | javascript | edit | 0 | 1 | mit | d2ac7ff6449841033a0b110b0601a30a761953c7 | bojicas/letterhead,bojicas/letterhead | client/views/pages/pages_new/pages_new.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport queryString from 'query-string'\nimport events from '../core/events'\nimport * as constants from '../constants'\nimport { actions } from '../store/actions'\nimport ReconnectingWebSocket from 'reconnectingwebsocket'\n\nconst {\n ... | javascript | edit | 0 | 1 | mit | 755c0c6c0a115ec42b4b76bde64df19e43bd6939 | onfido/onfido-sdk-core | src/connect/socket.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$( document ).on('turbolinks:load', function() {\r\n\tif ($('#desktopTest').is(':hidden')) {\r\n\t \t$('.desktop').attr(\"hidden\", true);\r\n\t\t} else {\r\n\t\t\t\t$('.mobile').attr(\"hidden\", true);\r\n\t\t}\r\n})\n```\n\nApply t... | javascript | edit | 0 | 2 | mit | 1e34a7a545e590b26944df79f7de84de54b65b34 | yvoloshin/Strength-tracker,yvoloshin/Strength-tracker,yvoloshin/Strength-tracker | app/assets/javascripts/screen_size.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Karma configuration file, see link for more information\n// https://karma-runner.github.io/0.13/config/configuration-file.html\n\nmodule.exports = function (config) {\n config.set({\n basePath: '../../',\n frameworks... | javascript | edit | 0 | 1 | mit | 4ca9403dbdcff3c09fe19e6228ff19b679ff8672 | kreuzerk/primeNG-advanced-growl,kreuzerk/primeNG-advanced-growl,kreuzerk/primeNG-advanced-growl | test/karma.conf.js | rejected_duplicate | Near-duplicate of sample 69468 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst DrawCard = require('../../drawcard.js');\n\nclass WholenessOfTheWorld extends DrawCard {\n setupCardAbilities() {\n this.wouldInterrupt({\n title: 'Keep a claimed ring',\n when: {\n o... | javascript | edit | 0 | 1 | mit | 8065d9a0273271fbc807e3f5c66919c5d103ad24 | jeremylarner/ringteki,gryffon/ringteki,jeremylarner/ringteki,gryffon/ringteki,jeremylarner/ringteki,gryffon/ringteki | server/game/cards/03-DotV/WholenessOfTheWorld.js | rejected_duplicate | Near-duplicate of sample 78667 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs-extra'),\n Path = require('path');\n\nvar _settings = { // Private storage of settings\n global: {},\n local: {}\n },\n _currPath; // Path to the settings.json file\n\nvar Settings = {\n\n ... | javascript | edit | 0 | 3 | mit | 2e13301ffaa758c5e2954785ae258201ab97a7cd | ChiefOfGxBxL/Ice-Sickle,ChiefOfGxBxL/Ice-Sickle | classes/Settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {exec} from 'child_process';\n\nimport semver from 'semver';\n\nconst {major, minor, patch} = semver.parse(atom.appVersion);\nconst atomVersion = `${major}.${minor}.${patch}`;\nconst requiredVersion = '>=1.14.0';\n\nimport GitPro... | javascript | edit | 0 | 1 | mit | c8beaccd9ec2d213915a559e2efbd3ef99e5c998 | atom/github,atom/github,atom/github | test/git-prompt-server.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.onerror = function(message, url, line) {\n $.ajax('/api/Error', {\n data: {\n message: message,\n url: url,\n line: line\n }\n });\n};\n\n```\n\nApply this change: Fix for fail... | javascript | edit | 0 | 2 | bsd-3-clause | 0f8269236553c431ad68f22d2f82939911bf5fea | developmentseed/bones,developmentseed/bones,Wiredcraft/bones,Wiredcraft/bones | assets/debug.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nTemplate.postsList.helpers({\n posts: function() {\n return Posts.find();\n }\n});\n```\n\nApply this change: Sort posts by submitted timestamp.\n\nchapter7-8"
},
{
"role": "assistant",
"content": "Template.postsList.he... | javascript | edit | 0 | 1 | mit | d1d813bf161eb28dc95852d519cf8fe274b3d12a | scimusmn/sd-waw,scimusmn/sd-waw | client/views/posts/posts_list.js | rejected_duplicate | Near-duplicate of sample 71801 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict'\n\nconst join = require('path').join\nconst minimist = require('minimist')\nconst GitAddAndCommit = require(join(__dirname, '../'))\n\nconst CLI_OPTIONS = ['caseSensitive', 'help', 'interactive']\n\nlet... | javascript | edit | 0 | 9 | mit | cc98cc760cd3a04b649ab1ff64e5bfdb7a2c3a7c | slammayjammay/git-add-and-commit | src/bin/gac.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Bahasa translation for bootstrap-datetimepicker\n * Azwar Akbar <<EMAIL>>\n */\n;(function($){\n\t$.fn.datetimepicker.dates['id'] = {\n\t\tdays: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\", \"Mi... | javascript | edit | 0 | 1 | apache-2.0 | 3920a72867e503371aff9b440ae7989c8189f74d | ETroll/bootstrap-datetimepicker,pixeljunkie/bootstrap-datetimepicker,ljx213101212/bootstrap-datetimepicker,yake987/bootstrap-datetimepicker,andrewblake1/bootstrap-datetimepicker,rento41/bootstrap-datetimepicker,AuspeXeu/bootstrap-datetimepicker,smalot/bootstrap-datetimepicker,lincome/bootstrap-datetimepicker-1,Youraise... | js/locales/bootstrap-datetimepicker.id.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Bootstrap\n * (sails.config.bootstrap)\n *\n * An asynchronous bootstrap function that runs before your Sails app gets lifted.\n * This gives you an opportunity to set up your data model, run jobs, or perform some special logic.... | javascript | edit | 0 | 2 | mit | 4e136883d55b4473f69dae4b6be871ebe872698f | TheConnMan/jukebot,TheConnMan/jukebot,TheConnMan/jukebot | config/bootstrap.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * util-events.js - The minimal events support\n */\n\nvar events = data.events = {}\n\n// Bind event\nseajs.on = function(name, callback) {\n var list = events[name] || (events[name] = [])\n list.push(callback)\n return seajs\n... | javascript | edit | 0 | 8 | mit | 7b8f6b28a26e5ee305a7537954e9864749835f18 | PUSEN/seajs,kaijiemo/seajs,eleanors/SeaJS,moccen/seajs,coolyhx/seajs,Gatsbyy/seajs,jishichang/seajs,liupeng110112/seajs,LzhElite/seajs,Lyfme/seajs,twoubt/seajs,zaoli/seajs,JeffLi1993/seajs,kaijiemo/seajs,wenber/seajs,mosoft521/seajs,uestcNaldo/seajs,longze/seajs,tonny-zhang/seajs,judastree/seajs,eleanors/SeaJS,seajs/se... | src/util-events.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global ga */\n\nvar errorTracking = (function() {\n\n 'use strict';\n\n // http://blog.gospodarets.com/track_javascript_angularjs_and_jquery_errors_with_google_analytics/\n var _sendErrorsToGoogleAnalytics = function () {\n\n w... | javascript | edit | 0 | 6 | mit | 94da1848ceddbb94f5854b7b0d1f5c4da72bf5ff | davidensinger/webworke.rs,davidensinger/webworke.rs,davidensinger/webworke.rs | app/scripts/_modules/error-tracking.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add two functions to io_rpc_brower.js\n - convStrToIntArr\n Convert string to integer array\n Used for mapping char* in C/C++ to JS\n Example: convStrToIntArr(\"hello\")\n - convIntArrToStr\n convert integer array to string"
},... | javascript | new_file | 0 | 2 | bsd-3-clause | 11d325318b173b8646108b3960a74eb4e3277886 | ilc-opensource/io-js,ilc-opensource/io-js,ilc-opensource/io-js,ilc-opensource/io-js,ilc-opensource/io-js | lib/companion/io_rpc_browser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Patterns gallery - A simple gallery\n *\n * Copyright 2013 Simplon B.V. - Wichert Akkerman\n */\ndefine([\n \"jquery\",\n \"../registry\",\n \"photoswipe\"\n], function($, patterns) {\n var gallery = {\n name:... | javascript | edit | 0 | 1 | bsd-3-clause | 9964565a9fadfab2a27cceeedc8a41199f764d08 | janga1997/Patterns,janga1997/Patterns,garbas/Patterns,garbas/Patterns,janga1997/Patterns,garbas/Patterns | src/pat/gallery.js | rejected_duplicate | Near-duplicate of sample 67283 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n function RelatedLinksAppController($scope) {\n var vm = this;\n\n vm.relations = $scope.model.viewModel; \n var currentVariant = _.find($scope.content.variants, function... | javascript | edit | 0 | 4 | mit | 23c53edfd344badca6a411d0843181f1326bad6b | dawoe/umbraco-nexu,dawoe/umbraco-nexu,dawoe/umbraco-nexu | src/Our.Umbraco.Nexu.Web/App_Plugins/Nexu/controllers/related-links-app-controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global console */\n\nvar EditorControllerMixin = Ember.Mixin.create({\n //## Computed post properties\n isPublished: Ember.computed.equal('status', 'published'),\n isDraft: Ember.computed.equal('status', 'draft'),\n /**\n... | javascript | edit | 0 | 3 | mit | 274f1ba90717466bdca2732e935a6cd2e28c22c1 | daihuaye/Ghost,ryansukale/ux.ryansukale.com,Coding-House/Ghost,no1lov3sme/Ghost,greenboxindonesia/Ghost,letsjustfixit/Ghost,codeincarnate/Ghost,shrimpy/Ghost,kmeurer/Ghost,bosung90/Ghost,mayconxhh/Ghost,stridespace/Ghost,skmezanul/Ghost,trunk-studio/Ghost,BayPhillips/Ghost,SachaG/bjjbot-blog,thomasalrin/Ghost,notno/Gho... | core/client/mixins/editor-base-controller.js | rejected_duplicate | Near-duplicate of sample 74203 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n var clientid;\n jive.tile.onOpen(function(config, options, other, container ) {\n osapi.jive.corev3.systemExtProps.get({}).execute(function (resp) {\n if( resp && resp.content ) {\n ... | javascript | edit | 0 | 7 | apache-2.0 | cdff44b030343c8e46e6b1034cd60fb1a36a072d | jivesoftware/jive-sdk,jivesoftware/jive-sdk,jivesoftware/jive-sdk | jive-sdk-service/generator/examples/todo/tiles/todoActivity/public/javascripts/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(module) {\n module.directive(\"displayFileContents\", displayFileContentsDirective);\n function displayFileContentsDirective() {\n return {\n restrict: \"E\",\n controller: 'DisplayFileConten... | javascript | edit | 0 | 4 | mit | b830e5050fdb016f77822e59d6d6551ddc9e33ca | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | website/app/application/core/projects/project/files/display-file-contents-directive.js | rejected_duplicate | Near-duplicate of sample 91891 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function($, BLCAdmin) {\n \n // Add utility functions for products to the BLCAdmin object\n BLCAdmin.product = {\n \n refreshSkusGrid : function($container, listGridUrl) {\n BLC.ajax({\n ... | javascript | edit | 0 | 3 | apache-2.0 | 2cb5cd8a7fd3eecb17af879709143afa0977aebb | cengizhanozcan/BroadleafCommerce,liqianggao/BroadleafCommerce,cloudbearings/BroadleafCommerce,lgscofield/BroadleafCommerce,wenmangbo/BroadleafCommerce,wenmangbo/BroadleafCommerce,zhaorui1/BroadleafCommerce,zhaorui1/BroadleafCommerce,shopizer/BroadleafCommerce,macielbombonato/BroadleafCommerce,bijukunjummen/BroadleafCom... | admin/broadleaf-admin-module/src/main/resources/admin_style/js/admin/catalog/product.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @title Slack Notification on User Signup\n * @overview Slack notification on user signup.\n * @gallery true\n * @category webhook\n *\n * This rule sends a message to a slack channel on every user signup.\n *\n */\n\nfunction sl... | javascript | edit | 0 | 5 | mit | f160efffcfe12f9cedd69001fc505ef6b7652b58 | auth0/rules,auth0/rules,auth0/rules | src/rules/slack.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\n\n// 5) Update asset references in HTML\ngulp.task('update-html', function () {\n\tvar config = require('../../config'),\n\t\tpath = require('path'),\n\t\trevReplace = require('gulp-rev-replace')\n\n\tvar ma... | javascript | edit | 0 | 1 | mit | a32d4d156c6e4ec3a3670a9350dc0073f09017f5 | t2t2/obs-remote-tablet,t2t2/obs-tablet-remote,t2t2/obs-remote-tablet,dx9s/obs-tablet-remote,dx9s/obs-tablet-remote,mikhailswift/obs-tablet-remote,mikhailswift/obs-tablet-remote,t2t2/obs-tablet-remote | gulpfile.js/tasks/rev/update-html.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { _ } from 'azk';\nimport { UIProxy } from 'azk/cli/ui';\nimport { example_system } from 'azk/generator/rules';\n\nexport class Suggestion extends UIProxy {\n constructor(...args) {\n super(...args);\n\n // Readable name f... | javascript | edit | 0 | 1 | apache-2.0 | ce141f9d9a235a99db367c6470bea8e3d91ffd8f | agendor/azk,saitodisse/azk,Klaudit/azk,nuxlli/azk,heitortsergent/azk,marcusgadbem/azk,juniorribeiro/azk,teodor-pripoae/azk,gullitmiranda/azk,Klaudit/azk,agendor/azk,saitodisse/azk,juniorribeiro/azk,teodor-pripoae/azk,fearenales/azk,nuxlli/azk,slobo/azk,fearenales/azk,renanmpimentel/azk,marcusgadbem/azk,azukiapp/azk,ren... | src/generator/suggestions/rails41.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//See gh-tabs-manager.js for use\nvar TabPane = Ember.Component.extend({\n classNameBindings: ['active'],\n\n tabsManager: Ember.computed(function () {\n return this.nearestWithProperty('isTabsManager');\n }),\n\n tab... | javascript | edit | 0 | 2 | mit | 097c78aad19bc68ac756b2a280865a081298e81d | neynah/GhostSS,AileenCGN/Ghost,liftup/ghost,jeonghwan-kim/Ghost,ManRueda/Ghost,netputer/Ghost,pollbox/ghostblog,situkangsayur/Ghost,tandrewnichols/ghost,fredeerock/atlabghost,rafaelstz/Ghost,kmeurer/GhostAzureSetup,SachaG/bjjbot-blog,cicorias/Ghost,ITJesse/Ghost-zh,pathayes/FoodBlog,jiachenning/Ghost,Bunk/Ghost,Thorste... | core/client/components/gh-tab-pane.js | rejected_duplicate | Near-duplicate of sample 80533 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\r\n], function (\r\n) {\r\n \r\n return {\r\n \"id\": \"schema/ExampleSchema\",\r\n \"description\": \"A simple model for testing\",\r\n \"$schema\": \"http://json-schema.org/draft-03/schema\",\r\n ... | javascript | edit | 0 | 0 | apache-2.0 | aec9071070507e2d1951798ecbc74db465a7ea5b | atsid/schematic-js,atsid/schematic-js | src/examples/schema/ExampleSchema.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar adjAdjAnimal = require(\"../lib/index\");\n\nvar expect = require(\"chai\").expect;\n\ndescribe(\"the library\", function () {\n\tdescribe(\"getting a default id\", function () {\n\t\tvar result;\n\n\t\tbefore(fun... | javascript | edit | 0 | 1 | mit | c5270a7d130582bda0dc83e64a402d05480d5d8c | a-type/adjective-adjective-animal,gswalden/adjective-adjective-animal,a-type/adjective-adjective-animal | test/index_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n title: 'Hello World',\n description: 'Simple Hello World application with common elements for a scene',\n tags: 'Cube',\n public: false,\n scripts: [\n // 'http://127.0.0.1:8080/build/three.js', // For three.j... | javascript | edit | 0 | 0 | unlicense | 32e1ec5ce328aaa405c30714eecbe83812b8657a | kevanstannard/three-experiments,kevanstannard/three-experiments,kevanstannard/three,kevanstannard/three,kevanstannard/three-experiments | src/experiments/hello-world/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar transitionEnd = \"webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend\";\n\n$.fn.addClassAfter = function(className) {\n\tvar that = this;\n\tsetTimeout(function(){\n\t\tthat.addClass(className);\n\t},1);... | javascript | edit | 0 | 1 | mit | aebf4659761dd694dba689430fe22351cda8ccdc | vitto/jquery-after-css-transition | jquery.after-css-transition-1.0.0.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//----------------------------------------------------------------------------//\nvar express = require('express');\nvar router = express.Router();\nvar pg = require('pg');\nvar connectionString = require('../modules/db-config.module');... | javascript | edit | 0 | 2 | mit | d2238b3625e43fb3065bdb327497112e981e0dff | STEMentor/STEMentor,STEMentor/STEMentor | server/routes/profile.route.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'underscore',\n 'backbone',\n 'models/core/BaseModel',\n], function(_, Backbone, BaseModel) {\n\n var TestSuiteModel = BaseModel.extend({\n\n defaults: {\n id: null,\n project_id: 1,\n... | javascript | edit | 0 | 3 | mit | e4c913fcdfa6f21d2746992d0d3b241971988ae4 | nestor-qa/nestor,kinow/nestor,nestor-qa/nestor,kinow/nestor,nestor-qa/nestor,nestor-qa/nestor,kinow/nestor,kinow/nestor | public/js/models/testsuite/TestSuiteModel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs'),\n\tpage = new WebPage(),\n\taddress, output, size;\n\npage.settings.userAgent = 'Portrayal (https://github.com/engagedc/portrayal) 1.0.0';\n \nif (phantom.args.length < 2 || phantom.args.length > 3) {\n\tconsole.... | javascript | edit | 0 | 2 | mit | 6f31dd5920a715e634bce348394f70729378c7fb | nicekiwi/Portrayal,nicekiwi/Portrayal | src/Engage/Portrayal/rasterize.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n* Copyright 2016 PT Inovação e Sistemas SA\n* Copyright 2016 INESC-ID\n* Copyright 2016 QUOBIS NETWORKS SL\n* Copyright 2016 FRAUNHOFER-GESELLSCHAFT ZUR FOERDERUNG DER ANGEWANDTEN FORSCHUNG E.V\n* Copyright 2016 ORANGE SA\n* Copyri... | javascript | edit | 0 | 0 | apache-2.0 | b3978e4368f84ddd97c16d34afca4a32905a8ce8 | reTHINK-project/dev-hyperty-toolkit,reTHINK-project/dev-hyperty-toolkit,reTHINK-project/dev-hyperty-toolkit | src/hyperty-chat/communication.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction setRotation() {\n var speed = document.getElementById(\"test-rot-speed\").value;\n drawer.api.setRotation(parseInt(speed));\n}\n\nfunction printState() {\n drawer.api.addChange(function(state) {\n alert(state);\... | javascript | edit | 0 | 2 | apache-2.0 | bc77ddc6f4bee3327e9b34aec6fa0d2c847a8a34 | maxi-k/drawer | resources/public/js/helpers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Norwegian translation for bootstrap-datepicker\n **/\n;(function($){\n $.fn.datepicker.dates['no'] = {\n days: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],\n daysShort: ['Søn','Man','Tir','Ons','To... | javascript | edit | 0 | 1 | apache-2.0 | f63066d979f9a85f087be3da1c3dedf58a7c4bf3 | kiwiupover/bootstrap-datepicker,menatoric59/bootstrap-datepicker,abnovak/bootstrap-sass-datepicker,keiwerkgvr/bootstrap-datepicker,vsn4ik/bootstrap-datepicker,NFC-DITO/bootstrap-datepicker,rocLv/bootstrap-datepicker,dswitzer/bootstrap-datepicker,i-am-kenny/bootstrap-datepicker,inway/bootstrap-datepicker,janusnic/bootst... | js/locales/bootstrap-datepicker.no.js | rejected_duplicate | Near-duplicate of sample 99022 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst React = require(\"react\")\n\n\nconst myStyle = {\n \"color\": \"blue\"\n}\n\nexport default React.createClass({\n getInitialState() {\n return {value: 0}\n },\n\n componentDidMount() {\n const self = this\n tick()\n\... | javascript | edit | 0 | 1 | mit | 16ea641d1dd2133c8e14a0293c9b6c5034750cd1 | milankinen/livereactload | examples/01-basic-usage/src/counter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {createReducer} from \"common/utils/reducerUtils\";\n\nimport {DATA_LOADED} from \"features/tools/toolConstants\";\n\nimport schema from \"app/schema\"\n\nconst initialState = schema.getDefaultState();\n\nexport function loadData... | javascript | edit | 0 | 1 | mit | 36324ea46ae1f0fcda44816c3820c255a82aa5a8 | markerikson/project-minimek,markerikson/project-minimek | src/app/reducers/entitiesReducer.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 | 1 | mit | 9edd71055cbfaf44e07f344afe135026d23c6cc4 | lanzanasto/hash_notes,lanzanasto/hash_notes,lanzanasto/hash_notes | app/assets/javascripts/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n exec: function (msg, args) {\n userQuery(args || msg.author.id, msg, true).then(u => {\n bot.createMessage(msg.channel.id, {\n embed: {\n author: {\n ... | javascript | edit | 0 | 3 | mit | 458645b50af285d4dd7a5918685e547bc3604068 | TTtie/TTtie-Bot,TTtie/TTtie-Bot,TTtie/TTtie-Bot | commands/getavatar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { app } from \"electron\";\n\nexport default menus => {\n if (process.platform !== \"darwin\") {\n menus.unshift({\n label: app.getName(),\n submenu: [\n { role: \"about\" },\n ... | javascript | edit | 0 | 2 | mit | 45627aeda59a9642f7c5954e79c67d59053b59a3 | BunqCommunity/BunqDesktop,BunqCommunity/BunqDesktop,BunqCommunity/BunqDesktop,BunqCommunity/BunqDesktop | src/menu/darwin_menu_templates.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.