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\nvar path = require('path');\nvar eslint = require('gulp-eslint');\nvar merge = require('lodash/object/merge');\nvar shelljs = require('shelljs');\n\nfunction failLintBuild() {\n process.exit(1);\n}\n\nfunction scssLintExists() {\n ret... | javascript | edit | 0 | 4 | apache-2.0 | e5159760eea2faff47cc88518f5b4c3317b6b4ec | samogami/grommet,codeswan/grommet,phuson/grommet,HewlettPackard/grommet,davrodpin/grommet,HewlettPackard/grommet,samogami/grommet,Dinesh-Ramakrishnan/grommet,primozs/grommet,marlonpp/grommet-old,nanndoj/grommet,kylebyerly-hp/grommet,davrodpin/grommet,nickjvm/grommet,HewlettPackard/grommet,marlonpp/grommet-old,codeswan/... | src/utils/gulp/gulp-tasks-linters.js | rejected_duplicate | Near-duplicate of sample 80665 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright 2014 Workiva, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * ht... | javascript | edit | 0 | 1 | apache-2.0 | 17bc27925e2b02d4910cd6598af4bcbda7e4d8f0 | robertbaker/wGulp,Workiva/wGulp,Workiva/wGulp,jimhotchkin-wf/wGulp,jimhotchkin-wf/wGulp,robertbaker/wGulp,robertbaker/wGulp,jimhotchkin-wf/wGulp,Workiva/wGulp | src/tasks/watchBuild.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport 'babel-polyfill'\nimport fs from 'fs'\nimport path from 'path'\nimport jsdom from 'jsdom'\nimport dotenv from 'dotenv'\nimport chai, { expect } from 'chai'\nimport chaiImmutable from 'chai-immutable'\nimport sinon from 'sinon'\ni... | javascript | edit | 0 | 2 | mit | b5af356f623429c5472f968ad2a84da9b599a7c4 | ello/webapp,ello/webapp,ello/webapp | test/setup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar bcrypt = require('bcryptjs');\nvar router = require('express').Router();\nvar User = require('../models/user');\n\nrouter.post('/', function(req, res) {\n var salt = bcrypt.genSaltSync(10);\n\n var user = new User({\n username:... | javascript | edit | 0 | 1 | mit | 9752da995a819fad7859f0bce13f1370bfda9f7b | FretlessJS-2016-03/notely,FretlessJS-2016-03/notely | server/routes/user-routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\n\nrouter.get('/token', function (req, res) {\n res.redirect('/');\n});\n\nrouter.get('/*', function (req, res, next) {\n res.render('user/dashboard', { layout: 'user',... | javascript | edit | 0 | 1 | mit | a707369a96aa892764775146c0ca081c9b95c712 | Sekhmet/busy,busyorg/busy,ryanbaer/busy,Sekhmet/busy,busyorg/busy,ryanbaer/busy | routes/front.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar assert = require('assert');\n\ndescribe(\"Basic Test\", function(){\n it(\"Loads the basic demo page and sends values to server\", function(){\n browser.url('http://localhost:7888/src/e2e-tests/basic-demo-page?auto-activat... | javascript | edit | 0 | 1 | mit | 99a416385af062898d0709b64493dcb8859e9e27 | mattzeunert/glasswing,mattzeunert/glasswing,mattzeunert/glasswing | src/e2e-tests/basic.e2e.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright 2018 The AMP HTML Authors. All Rights Reserved.\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 o... | javascript | edit | 0 | 1 | apache-2.0 | a115c44bcc17d6e6956d9d07030c2bb79c8a8f42 | ampproject/amp-toolbox,google/amp-toolbox,google/amp-toolbox,ampproject/amp-toolbox,google/amp-toolbox,ampproject/amp-toolbox,ampproject/amp-toolbox | ssr-express/demo/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst mongoose = require('mongoose');\nconst shortid = require('shortid');\n\nconst paste = new mongoose.Schema({\n\t_id: { type: String, default: shortid.generate },\n\tpaste: { type: String },\n\texpiresAt: { type: Date, expires: 0, d... | javascript | edit | 0 | 0 | mit | b4ab5d7ff3556f9a40c425afaa4dab5601b37027 | JoeBiellik/paste,JoeBiellik/paste | models/paste.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n title: 'Information collection notice',\n body: 'The information in this application is collected by the Ministry of Health under section 26(a) of the Freedom of Information and Protection of Privacy Act and will ... | javascript | edit | 0 | 0 | apache-2.0 | 0f3369a02a6386d8bfb895de09faa9b1c168715d | bcgov/MyGovBC-MSP,bcgov/MyGovBC-MSP,bcgov/MyGovBC-MSP,bcgov/MyGovBC-MSP | src/app/components/msp/common/consent-modal/i18n/data/en/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport astring from 'astring';\n\n// Create a custom generator that inherits from Astring's default generator\nconst customGenerator = Object.assign({}, astring.defaultGenerator, {\n Literal(node, state) {\n if (node.raw != null) {\... | javascript | edit | 0 | 15 | mit | e2bff214c4773626816d3f58d19a2a84451c333d | laosb/hatp | src/astring_plugin/index.js | rejected_complexity | Cyclomatic complexity too high: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { execSync } = require('child_process');\nconst path = require('path');\n\nexecSync(`\n git config user.email \"<EMAIL>\" &&\n git config user.name \"Andrey Gubanov (his digital copy)\" &&\n git clone -b gh-pages https://... | javascript | edit | 0 | 0 | mit | 8a5185e85c1f6206ed59256b2a6c2e996af96a6b | matreshkajs/matreshka-router,finom/matreshka_router | tools/bundle-deploy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport $ from 'jquery';\n\nwindow.SNIPPET_CHOOSER_MODAL_ONLOAD_HANDLERS = {\n choose: function (modal) {\n function ajaxifyLinks(context) {\n $('a.snippet-choice', modal.body).on('click', function () {\n modal.loadUrl(th... | javascript | edit | 0 | 1 | bsd-3-clause | fc31a6711da30682e208cc257b567c136fe9a6b5 | wagtail/wagtail,wagtail/wagtail,rsalmaso/wagtail,wagtail/wagtail,thenewguy/wagtail,thenewguy/wagtail,zerolab/wagtail,rsalmaso/wagtail,wagtail/wagtail,rsalmaso/wagtail,thenewguy/wagtail,zerolab/wagtail,thenewguy/wagtail,rsalmaso/wagtail,zerolab/wagtail,zerolab/wagtail,wagtail/wagtail,rsalmaso/wagtail,thenewguy/wagtail,z... | client/src/entrypoints/snippets/snippet-chooser-modal.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//= require spree/braintree_hosted_form.js\n\n$(function() {\n var $paymentForm = $(\"#new_payment\"),\n $hostedFields = $(\"[data-braintree-hosted-fields]\");\n\n function onError (err) {\n var msg = err.name + \": \" + err.m... | javascript | edit | 0 | 3 | bsd-3-clause | fc610c08cd26d108ee1e48da4b19bd8c90cf570f | solidusio/solidus_paypal_braintree,solidusio/solidus_paypal_braintree,solidusio/solidus_paypal_braintree,solidusio/solidus_paypal_braintree | app/assets/javascripts/spree/backend/solidus_paypal_braintree.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @flow\n */\n\nimport React, {\n Component,\n Text,\n View,\n} from 'react-native';\n\nimport {registerView, unregisterView} from './ViewTracker'\n\n/**\n * Higher-order component that turns a built-in View component int... | javascript | edit | null | null | mit | 2aec558cb2518426284b0a6bca79ab87178a5ccb | alangpierce/LambdaCalculusPlayground,alangpierce/LambdaCalculusPlayground,alangpierce/LambdaCalculusPlayground | TrackedViews.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar diacritics = require('./diacritics');\n\nfunction nbSlug(name) {\n var diacriticsMap = {};\n\n for (var i = 0; i < diacritics.length; i++) {\n var letters = diacritics[i].letters;\n\n for (var j = 0; j < let... | javascript | edit | 0 | 5 | unlicense | 5b30c625b6d59e087341259174e78b97db07eb4a | nurimba/nb-slug,nurimba/nb-slug | lib/nb-slug.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nif (Meteor.isClient) {\n // This code only runs on the client\n Template.body.helpers({\n tasks: [\n { text: \"This is task 1\" },\n { text: \"This is task 2\" },\n { text: \"This is task 3\" }\n ]\n });\n}\n\n``... | javascript | edit | 0 | 1 | mit | 2a8170bd4f0ed6fad4dcd8441c2e8d162fbc4431 | chooie/meteor-todo | simple-todos.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport 'accordion/src/accordion.js';\n\n(function() {\n \"use strict\";\n\n document.querySelectorAll('.accordion').forEach(function(item) {\n new Accordion(item, {\n onToggle: function(target){\n ... | javascript | edit | 0 | 2 | mit | 55ab768d9fd5adf4fbefa3db2d121fdbe6c840f4 | waynestate/base-site,waynestate/base-site | resources/js/modules/accordion.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withRouter } from 'react-router';\nimport Link from 'react-router-dom/Link';\nimport queryString from 'query-string';\n\nconst SSOLanding = (props) => {\n const ... | javascript | edit | 0 | 3 | apache-2.0 | 39b2bb6cf1148bb0c63d19b52473c46e77c5c212 | folio-org/stripes-core,folio-org/stripes-core,folio-org/stripes-core | src/components/SSOLanding.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default function getCARTOData () {\n if (window.CartoConfig) {\n return window.CartoConfig.data;\n }\n\n return {\n user_data: window.user_data,\n organization_notifications: window.organization_notifications\n };\n}... | javascript | edit | 0 | 3 | bsd-3-clause | 5193f5908f8929b7908649950161d9531c04f8b1 | CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb | lib/assets/javascripts/new-dashboard/store/utils/getCARTOData.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst getOptions = require('./getOptions');\n\nmodule.exports = (options, jestRootDir) => {\n // Override outputName and outputDirectory with outputFile if outputFile is defined\n let output = options.o... | javascript | edit | 0 | 2 | apache-2.0 | c5ca7c86331bb349c4bd3ccd7d5c12cdce0fa924 | palmerj3/jest-junit | utils/getOutputPath.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { format } from 'date-fns';\nimport React from 'react'\nimport { Navigation } from './blocks/Navigation'\nimport styles from './Main.css'\n\nconst socialLinks = [\n {\n to: 'https://stackoverflow.com/story/usehotkey',\n... | javascript | edit | 0 | 1 | mit | 9730bfb3db49d210d496e2289bf90154ab497612 | usehotkey/my-personal-page,usehotkey/my-personal-page,usehotkey/my-personal-page,usehotkey/my-personal-page | scripts/components/Footer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\n\nimport admin from '../utils/admin';\n\nimport Concept from '../components/Concept';\n\nconst FlagView = React.createClass({\n componentWillMount() {\n this.props.... | javascript | edit | 0 | 1 | mit | c21d52d96ec21d9a43da3467ee66364619e1e3f4 | transparantnederland/relationizer,transparantnederland/relationizer,waagsociety/tnl-relationizer,transparantnederland/browser,transparantnederland/browser,waagsociety/tnl-relationizer | app/containers/FlagView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport THREE from 'three';\n\nexport function randomPointOnSphere( vector = new THREE.Vector3() ) {\n const theta = 2 * Math.PI * Math.random();\n const u = 2 * Math.random() - 1;\n const v = Math.sqrt( 1 - u * u );\n\n return vecto... | javascript | edit | 0 | 1 | mit | ad207a87639cef156201b8e2a208f38c51e93c50 | razh/flying-machines,razh/flying-machines | src/js/math.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(module, options){\n try{\n if(module[0] in {\".\":1}){\n module = process.cwd() + module.substr(1);\n }\n return require(module);\n }catch(e){ \n if (err.code !== \"MODULE_NOT_FOUND\" && opti... | javascript | edit | 0 | 6 | mit | 20c0f4d04aa9581a717741bb1be7f73167e358b0 | tony-o/node-optional,peerbelt/node-optional | optional.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport test from 'ava';\nimport {fromString, fromNull, fromStream} from '../helpers/pipe';\nimport fm from '../../lib/plugins/front-matter';\n\ntest('No Compile - null', t => {\n return fromNull(fm)\n .then(output => {\n t.is(o... | javascript | edit | 0 | 1 | mit | e057cdfb71ccd2f7d70157ccac728736fbcad450 | Snugug/gulp-armadillo,kellychurchill/gulp-armadillo | tests/plugins/front-matter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst babelLoaderMatcher = function(rule) {\n return rule.loader && rule.loader.indexOf(\"/babel-loader/\") != -1;\n}\n\nconst getLoader = function(rules, matcher) {\n var loader;\n\n rules.some(rule => {\n return loader = matcher... | javascript | edit | 0 | 4 | mit | 695f3c5607fae90b13fe6c85ffd6412afcaff0bf | timarney/react-app-rewired,timarney/react-app-rewired | packages/react-app-rewired/index.js | rejected_duplicate | Near-duplicate of sample 107293 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndraft.mixins.size = {\n // Get/set the element's width & height\n size(width, height) {\n return this.prop({\n width: draft.types.length(width),\n height: draft.types.length(height)\n // depth: draft.types.length(dep... | javascript | edit | 0 | 3 | mit | 11215560382e5c0b4484019dbf8541351337f7fb | D1SC0tech/draft.js,D1SC0tech/draft.js | src/mixins/size.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\"handlebars-compiler\"], function (Handlebars) {\n var buildMap = {},\n templateExtension = \".hbs\";\n\n return {\n\n // http://requirejs.org/docs/plugins.html#apiload\n load: function (name, parentRequire, onload... | javascript | edit | 0 | 1 | mit | 31fe75787678465efcfd10dafbb9c368f72d9758 | designeng/requirejs-hbs,designeng/requirejs-hbs,designeng/requirejs-hbs | hbs-builder.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fixBackground = function(){\n var backgroundImage = document.getElementById('page-background-img');\n if(window.innerHeight >= backgroundImage.height) {\n backgroundImage.style.height = '100%';\n ... | javascript | edit | 0 | 3 | mit | b24cd5018185dc2ef35598a7cae863322d89c8c7 | Pozo/elvira-redesign | app/scripts/fixBackground.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\nmodule.exports = {\n coverageDirectory: 'reports/coverage',\n coveragePathIgnorePatterns: [\n '/node_modules/',\n '/packages/mineral-ui-icons',\n '/website/'\n ],\n moduleNameMapper: {\n '.*react-docgen-load... | javascript | edit | 0 | 0 | apache-2.0 | 38080adc1302b88af2c5d19d70720b53d4f464a7 | mineral-ui/mineral-ui,mineral-ui/mineral-ui | jest.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nconst Landing = React.createClass({\n render () {\n return (\n <div className='landing'>\n <h1>svideo</h1>\n <input type='text' placeholder='Search' />\n <a>or Browse All</a>\n ... | javascript | edit | 0 | 1 | mit | f9b3837c53bb0572c95f2f48b6855250870ea2f1 | galaxode/ubiquitous-eureka,galaxode/ubiquitous-eureka | js/Landing.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar EDSN_THRESHOLD = 30;\n\nvar EdsnSwitch = (function(){\n var editing;\n var validBaseLoads = /^(base_load|base_load_edsn)$/;\n\n EdsnSwitch.prototype = {\n enable: function(){\n if(editing){\n swapEdsnBaseLoadSelect... | javascript | edit | 0 | 2 | mit | 680debc53973355b553155bdfae857907af0a259 | quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses | app/assets/javascripts/edsn.js | rejected_duplicate | Near-duplicate of sample 103951 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst visit = require('unist-util-visit');\nconst { kebabCase } = require('lodash');\n\nconst IGNORES = [\n\t'https://raw.githubusercontent.com/styleguidist/react-styleguidist/master/templates/DefaultExample.md',\n\t'https://github.com/... | javascript | edit | 0 | 5 | mit | 6321dc80f757cb1d83c4c06e277e0efcba5b853a | styleguidist/react-styleguidist,sapegin/react-styleguidist,styleguidist/react-styleguidist,styleguidist/react-styleguidist,sapegin/react-styleguidist | site/remark.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar vavaClass = require('./vava/class');\nvar vavaMethod = require('./vava/method');\nvar vavaType = require('./vava/type');\n\nexports.scope = require('./vava/scope');\n\n// TODO automate env assembly\nexports.env = {\n VavaClass : v... | javascript | edit | 0 | 0 | mit | 3063e971479ca50e3e7d96d89db26688f5f74375 | knuton/hobbes,knuton/hobbes,knuton/hobbes,knuton/hobbes | hobbes/vava.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global define*/\n/*jslint browser:true,white:true*/\ndefine([\n 'jquery',\n 'kb_common/html'\n], function ($, html) {\n 'use strict';\n // jQuery plugins that you can use to add and remove a \n // loading giff to a dom ... | javascript | edit | 0 | 1 | mit | b1a4e4275743dd30a19eb7005af386596c752eb9 | eapearson/kbase-ui-widget | src/kb/widget/legacy/helpers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nmodule.exports = {\n description: \"A basic React component\",\n\n generateReplacements(args) {\n let propTypes = \"\";\n let defaultProps = \"\";\n\n if(args.length) {\n propTypes =... | javascript | edit | 0 | 8 | mit | 24d6b502081b81eff9ce1775002015f59ee3ccba | reactcli/react-cli,reactcli/react-cli | blueprints/component/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar bodyParser = require('body-parser');\nvar express = require('express');\n\nvar database = require('../database');\nvar router = express.Router();\n\nrouter.get('/', function(req, res) {\n database.Question.find({}, function(err, ... | javascript | edit | 0 | 2 | apache-2.0 | 2e99a372b401cdfb8ecaaccffd3f8546c83c7da5 | skalmadka/TierUp,skalmadka/TierUp | api/question.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\nvar webpack = require('webpack')\n\nvar reactExternal = {\n root: 'React',\n commonjs2: 'react',\n commonjs: 'react',\n amd: 'react'\n}\n\nmodule.exports = {\n externals: {\n 'react': reactExternal\n },\n module:... | javascript | edit | 0 | 0 | mit | e32d3f94b994e4994f9ddd8fbee4db2ded2a7f4a | erikras/redux-form,erikras/redux-form | webpack.config.js | rejected_duplicate | Near-duplicate of sample 69656 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar key = require('../utils/key');\nvar sync = require('synchronize');\nvar request = require('request');\nvar _ = require('underscore');\n\n\n// The API that returns the in-email representation.\nmodule.exports = function(req, res) {\n... | javascript | edit | 0 | 4 | mit | 33e775c0e0e025847297c138261689dd5354a7d8 | kigster/wanelo-mixmax-link-resolver,kigster/wanelo-mixmax-link-resolver,mixmaxhq/giphy-example-link-resolver,germy/mixmax-metaweather | api/resolver.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar bowlingApp = angular.module('bowling', ['ngRoute']);\n\nbowlingApp.config(['$routeProvider',\n function($routeProvider) {\n $routeProvider.otherwise({\n redirectTo: '/main'\n });\n }])... | javascript | edit | 0 | 3 | mit | 8d27f66f4b4c61ddeb95e5107a616b937eb06dff | MeerkatLabs/bowling-visualization | app/core/app.js | rejected_duplicate | Near-duplicate of sample 79255 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Controller.extend({\n sitemap: {\n nodes: [\n {\n link: 'index',\n title: 'Home',\n children: null\n },\n {\n link: null,\n title: ... | javascript | edit | 0 | 0 | mit | 849ae9172c21704c61ae6a84affdef0a309fcb4b | Flexberry/flexberry-ember-demo,Flexberry/flexberry-ember-demo,Flexberry/flexberry-ember-demo | app/controllers/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Request adapter.\n *\n * @package cork\n * @author Andrew Sliwinski <<EMAIL>>\n */\n\n/**\n * Dependencies\n */\nvar _ = require('lodash'),\n async = require('async'),\n request = require('request');\n\n/**\n * Exe... | javascript | edit | 0 | 2 | mit | fe6247d1ade209f1ebb6ba537652569810c4d77a | thisandagain/cork | lib/adapter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar net = require('net');\nvar zombie = require('zombie');\n\n// Defaults\nvar ping = 'pong'\nvar browser = null;\nvar ELEMENTS = [];\n\n//\n// Store global client states indexed by ZombieProxyClient (memory address):\n//\n// {\n// 'C... | javascript | edit | 0 | 2 | mit | 421aba98815a8f3d99fa78daf1d6ec9315712966 | ryanpetrello/python-zombie,ryanpetrello/python-zombie | zombie/proxy/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * The core of BEM hint\n * ====================\n */\nvar vow = require('vow'),\n _ = require('lodash'),\n scan = require('./walk'),\n loadRules = require('./load-rules'),\n Configuration = require('./configuration'),\... | javascript | edit | 0 | 1 | mit | fcab433c54faeffbc59d0609a6f503e3a3237d6f | bemhint/bemhint,bemhint/bemhint,bem/bemhint,bem/bemhint | lib/bemhint.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Mongoat = require('mongodb');\nvar utilsHelper = require('../helpers/utils-helper');\nvar connect = Mongoat.MongoClient.connect;\nvar hooks = {\n before: {},\n after: {}\n};\n\nMongoat.Collection.prototype.before ... | javascript | edit | 0 | 2 | mit | 2de06af9887b6941f73a6610a5485d98cf7f353f | dial-once/node-mongoat | lib/mongoat.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar clone = require('clone'),\n mongoose = require('mongoose'),\n ObjectId = mongoose.Schema.Types.ObjectId;\n\nmodule.exports = function(schema, options) {\n options = options || {};\n options.collection = options.collectio... | javascript | edit | 0 | 5 | bsd-2-clause | 7bb5536b35b5f1bb90fde60abeb2f6cd7e410139 | jeresig/mongoose-version,saintedlama/mongoose-version | lib/version.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$().ready(() => {\n loadContentSection().then(() =>{ \n $(\"#loader\").addClass(\"hide\");\n $(\"#real-body\").removeClass(\"hide\");\n $(\"#real-body\").addClass(\"body\");\n\n $(\".keyword\").click(function() {\n $(t... | javascript | edit | 0 | 1 | apache-2.0 | 7b6d8f66fd1c2130d10ba7013136ecc3f25d6c3b | googleinterns/step36-2020,googleinterns/step36-2020,googleinterns/step36-2020 | src/main/webapp/scripts/main.js | rejected_duplicate | Near-duplicate of sample 104307 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { List, ListSubHeader, ListCheckbox } from 'react-toolbox/lib/list';\n\nconst SponsorAffinities = () => {\n return (\n <div>\n <List selectable ripple>\n <ListSubHeader captio... | javascript | edit | null | null | apache-2.0 | 40a96dbb0681ff912a64f8fdc3f542256dab1fd4 | Bernardo-MG/dreadball-toolkit-webpage,Bernardo-MG/dreadball-toolkit-webpage,Bernardo-MG/dreadball-toolkit-webpage,Bernardo-MG/dreadball-toolkit-webpage | src/main/js/components/views/builder/SponsorAffinities.js | rejected_code_smell | Internal duplication: ~294% of the file is inside repeated 12+ line blocks | null |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* exported defaults */\n\n/* Magic Mirror\n * Config Defauls\n *\n * By Michael Teeuw http://michaelteeuw.nl\n * MIT Licensed.\n */\n\nvar defaults = {\n\tport: 8080,\n\n\tlanguage: \"en\",\n\ttimeFormat: 24,\n\n\tmodules: [\n\t\t{\n\t... | javascript | edit | 0 | 0 | mit | c31d392e1972d6eaca952c21ba9349d30b31b012 | kthorri/MagicMirror,enith2478/spegel,aschulz90/MagicMirror,morozgrafix/MagicMirror,morozgrafix/MagicMirror,marcroga/sMirror,aghth/MagicMirror,ShivamShrivastava/Smart-Mirror,ConnorChristie/MagicMirror,berlincount/MagicMirror,wszgxa/magic-mirror,heyheyhexi/MagicMirror,gndimitro/MagicMirror,vyazadji/MagicMirror,ryanlawler... | js/defaults.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n* FUNCTION: moveProperty( source, prop, target )\n*\tMoves a property from one object to another object.\n*\n* @param {Object} source - source object\n* @param {String} prop - property to move\n* @param {Object} ta... | javascript | edit | 0 | 6 | apache-2.0 | 0c0878ac06febc05dd34f617c6a874e3a5d2ee49 | 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/move-property/lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// toggle display of all code cells' inputs\n\ndefine([\n 'jquery',\n 'base/js/namespace'\n], function(\n $,\n IPython\n) {\n \"use strict\";\n\n function set_input_visible(show) {\n IPython.notebook.metadata.hi... | javascript | edit | 0 | 3 | bsd-3-clause | 4aa3e40ae4a9b998025a010749be69da428cb9bb | ipython-contrib/IPython-notebook-extensions,ipython-contrib/IPython-notebook-extensions,jcb91/IPython-notebook-extensions,juhasch/IPython-notebook-extensions,ipython-contrib/IPython-notebook-extensions,juhasch/IPython-notebook-extensions,juhasch/IPython-notebook-extensions,jcb91/IPython-notebook-extensions,jcb91/IPytho... | src/jupyter_contrib_nbextensions/nbextensions/hide_input_all/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction demo($interval, demo) {\n return {\n restrict: 'E',\n template: '<div class=demo-container></div>',\n link: function(scope, element) {\n demo.setContainer(element[0].children[0]);\n setTimeout(function() {\n... | javascript | edit | 0 | 2 | apache-2.0 | fce51a7f4c2991773fff8d8070130a726f73879a | ninjadev/nin,ninjadev/nin,ninjadev/nin | nin/frontend/app/scripts/directives/demo.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright 2014 Workiva, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * ht... | javascript | edit | 0 | 2 | apache-2.0 | 85afadbe75bce0fd7069224c8065d99d6a663a2f | rich-nguyen/karma-jspm | src/adapter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\njQuery( document ).ready( function( $ ) {\n\n // Your JavaScript goes here\n jQuery('#content').fitVids();\n});\n```\n\nApply this change: Add .fitvids-responsive-iframe class for making iframes responsive"
},
{
"role": "assis... | javascript | edit | 0 | 1 | mit | 65294019c1d29baaa548e483e93c8c55bf4bbabb | CoderDojo/cd-theme,CoderDojo/cd-theme,CoderDojo/cd-theme,CoderDojo/cd-theme | static/site.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar geonames = require('geonames-stream');\nvar peliasConfig = require( 'pelias-config' ).generate();\nvar peliasAdminLookup = require( 'pelias-admin-lookup' );\nvar dbclient = require('pelias-dbclient');\nvar model = require( 'pelias-m... | javascript | edit | 0 | 2 | mit | c316a0757defcde769be70b5d8af5c51ef0ccb75 | pelias/geonames,pelias/geonames | task/import.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport class ExperimentStep {\n constructor(title, _type) {\n this.id = '';\n this.title = title;\n this._type = _type;\n this.steps = [];\n this.description = '';\n this.flags = {\n ... | javascript | edit | 0 | 1 | mit | 10ae414982b5cc8eb12c965d419ed5f8b1706fa0 | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | website/src/app/project/experiments/experiment/experiment.model.js | rejected_duplicate | Near-duplicate of sample 71065 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\nCopyright (c) 2013, Yahoo! Inc. All rights reserved.\nCode licensed under the BSD License:\nhttp://yuilibrary.com/license/\n*/\n\nmodule.exports = function(grunt) {\n // The `artifacts` directory will usually only ever in YUI's C... | javascript | edit | 0 | 5 | bsd-3-clause | 6bb0842748a92359d383445e1046bb622a6649e4 | yui/grunt-yui-contrib | tasks/build.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// Setting up route\nangular.module('core.admin.routes').config(['$stateProvider',\n function ($stateProvider) {\n $stateProvider\n .state('admin', {\n abstract: true,\n url: '/admin',\n te... | javascript | edit | 0 | 1 | mit | 261149bf0046fda82bb80dbe50fcc2f6233fe779 | CEN3031GroupA/US-Hackathon,CEN3031GroupA/US-Hackathon,CEN3031GroupA/US-Hackathon | modules/core/client/config/core-admin.client.routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { GraphQLList, GraphQLString } = require('graphql');\nconst mongoose = require('mongoose');\nconst { outputType } = require('../../types/Entries');\nconst getProjection = require('../../get-projection');\nconst getUserPermissions ... | javascript | edit | 0 | 3 | mit | 873e2e8a92b286e73375a0f3505615d63dde3d9e | JasonEtco/flintcms,JasonEtco/flintcms | server/graphql/queries/entries/multiple.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\... | javascript | edit | 0 | 0 | apache-2.0 | 7c3f65c9492218d91d2213e9c5d5ae88d5ae2772 | 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/math/base/dist/betaprime/lib/index.js | rejected_duplicate | Near-duplicate of sample 104647 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n---\nlayout: null\n---\n$(document).ready(function () {\n $('a.events-button').click(function (e) {\n if ($('.panel-cover').hasClass('panel-cover--collapsed')) return\n currentWidth = $('.panel-cover').width()\n if (currentWid... | javascript | edit | null | null | mit | a1b98bb9dad8a3a82fe750dc09d470e14fe233ec | GRPosh/GRPosh.github.io,GRPosh/GRPosh.github.io,GRPosh/GRPosh.github.io | js/main.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport axios from 'axios';\nimport { FETCHING_PROFILE, PROFILE_SUCCESS, PROFILE_FAILURE } from './types';\nimport { apiURL } from './userSignUp';\nimport setHeader from '../helpers/setheader';\n\nconst fetchingProfile = () => ({\n type... | javascript | edit | 0 | 2 | mit | e67f17f3430c9509f4d1ff07ddefc6baf05780ff | amarachukwu-agbo/hello-books,amarachukwu-agbo/hello-books | client/actions/profile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\"\n\nmodule.exports = function(callback) {\n\t//60fps translates to 16.6ms, round it down since setTimeout requires int\n\tvar time = 16\n\tvar last = 0, pending = null\n\tvar timeout = typeof requestAnimationFrame === \"fu... | javascript | edit | 0 | 5 | mit | 47b9aba68050230eeff0754f4076b7596cbe9eb9 | pygy/mithril.js,impinball/mithril.js,tivac/mithril.js,MithrilJS/mithril.js,barneycarroll/mithril.js,barneycarroll/mithril.js,tivac/mithril.js,impinball/mithril.js,pygy/mithril.js,lhorie/mithril.js,lhorie/mithril.js,MithrilJS/mithril.js | api/throttle.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// setup transform definition aliases\nimport {definition} from 'vega-dataflow';\ndefinition('Sort', definition('Collect'));\ndefinition('Formula', definition('Apply'));\n\nexport {default as parse} from './src/parse';\n\nexport {defaul... | javascript | edit | 0 | 0 | bsd-3-clause | 02634d0a7fd6cc63a59cf9d507f79186c5b055b7 | vega/vega-parser | index.js | rejected_duplicate | Near-duplicate of sample 72667 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// app.shoppingListService.js\n\n(function() {\n \"use strict\";\n\n angular.module(\"MyApp\")\n .service(\"ShoppingListService\", ShoppingListService);\n\n function ShoppingListService() {\n let service = this;\n\n // List ... | javascript | edit | 0 | 1 | mit | 1c3042481b75e305e993316256dc19f51fd41cf6 | var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training | SPAWithAngularJS/module2/customServices/js/app.shoppingListService.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n var headings = ['h6', 'h5', 'h4', 'h3', 'h2', 'h1'];\n var score = 0;\n var message = '';\n var sections = Array.prototype.slice.call(window.document.getElementsByTagName('section'));\n var totalSec... | javascript | edit | 0 | 2 | mit | a5add8048b2548c5f216d7afd9e0ebcb097f4fcc | sitespeedio/coach,sitespeedio/coach | lib/dom/accessibility/sections.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports.create = {\n\n\tSettings: [{\n\n\t\t\"site\": {\n\t\t\t\"name\": \"EStore Demo\"\n\t\t},\n \"payment.cod.active\": true\n\t}]\n\n};\n\n```\n\nApply this change: Fix no payment set by default error."
},
{
"... | javascript | edit | 0 | 0 | mit | 8e8a784f1318f367f2a633395429abff30566c64 | stunjiturner/estorejs,quenktechnologies/estorejs,stunjiturner/estorejs | updates/0.1.0-fr-settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Here is where you can define configuration overrides based on the execution environment.\n// Supply a key to the default export matching the NODE_ENV that you wish to target, and\n// the base configuration will apply your overrides b... | javascript | edit | 0 | 1 | mit | 18ac5c64a7da29e5bf25bc274c61ad6078bace86 | matthisk/es6console,matthisk/es6console | config/environments.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Game\ndefine([\n\t'stage',\n\t'models/ui',\n\t'utility'\n], function(Stage, UI, Utility) {\n\n\tconsole.log(\"game.js loaded\");\n\n\tvar Game = (function() {\n\t\t// Game canvas\n\t\tvar stage;\n\n\t\tvar gameUI;\n\n\t\treturn {\n\t... | javascript | edit | 0 | 2 | mit | a095b3f6f17687fb769670f236f4224556254edd | vicksonzero/TyphoonTycoon,vicksonzero/TyphoonTycoon,ericksli/TyphoonTycoon,jasonycw/TyphoonTycoon,ericksli/TyphoonTycoon,jasonycw/TyphoonTycoon | js/game.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst { expect } = require('chai');\n\nconst SshTransport = require('./ssh');\n\ndescribe('SshTransport', () => {\n it('should not use a private key if password is specified', () => {\n const options = getTransportO... | javascript | edit | 0 | 2 | mit | 82a4e6147a20b6583df43375e70b593a73cf0396 | megahertz/electron-simple-publisher | lib/transport/ssh.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nexport default class Text extends React.Component {\n\n static propTypes = {\n onChange: React.PropTypes.func,\n value: React.PropTypes.string,\n fieldType: React.PropTypes.string,\n passProps: ... | javascript | edit | 0 | 1 | mit | 1802e997a2d682ec3fc05d292e95fd64f3258b1b | orionsoft/parts | src/components/fields/Text/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Github API call according to their json-p dox\nfunction callGHAPI(url, callback) {\n var apiRoot = \"https://api.github.com/\";\n var script = document.createElement(\"script\");\n script.src = apiRoot + url + \"?callback=\"... | javascript | edit | 0 | 3 | mit | a08a2e797d2783defdd2551bf2ca203e54a3702b | Somsubhra/github-release-stats,Somsubhra/github-release-stats | js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/** @jsxImportSource theme-ui */\nimport { Box, Button } from 'theme-ui'\nimport Link from 'next/link'\nimport Sparkle from './sparkle'\nimport Spicy from './spicy'\n\n// email\n\nexport default function GuestbookCapture({ props }) {\n ... | javascript | edit | 0 | 1 | mit | 97889608f3e80095e139d3da69be2b24df6eacd7 | iammatthias/.com,iammatthias/.com,iammatthias/.com | components/guestbookCapture.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nexport default React.createClass({\n\n displayName: 'DataSetViewer',\n\n propTypes: {\n base: React.PropTypes.string,\n item: React.PropTypes.object,\n },\n\n openDataSet() {\n ... | javascript | edit | 0 | 2 | bsd-3-clause | 86773197f53aeb163de92fbd9f339d53903dd4c3 | Kitware/arctic-viewer,Kitware/in-situ-data-viewer,Kitware/in-situ-data-viewer,Kitware/arctic-viewer,Kitware/arctic-viewer | lib/viewer/DataSetView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport steem from 'steem'\n\nimport { Button } from 'semantic-ui-react'\n\nexport default class AccountFollow extends React.Component {\n constructor(props) {\n super(props)\n this.state = {\n pro... | javascript | edit | 0 | 3 | mit | 783a18b1ed4e3053861315eccfee5bf55a467c02 | aaroncox/chainbb,aaroncox/chainbb | services/frontend/src/components/elements/account/follow.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport 'babel-polyfill';\n\nrequire('normalize.css');\nrequire('reveal.js/css/reveal.css');\nrequire('reveal.js/css/theme/black.css');\nrequire('./index.css');\n\nimport reveal from 'reveal.js';\nimport setupMedimapWidgets from './medim... | javascript | edit | 0 | 0 | mit | cc63c5d48f48294163b1e9d01efa8b8fc00fce06 | jo12bar/medimap-viewer,jo12bar/medimap-viewer,jo12bar/medimap-viewer,jo12bar/medimap-viewer,jo12bar/medimap-viewer | client/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {map} from \"ramda\"\n\nimport mergeResource from \"../mergeResource\"\n\nexport default function refreshResources (): Function {\n return function thunk (dispatch: ReduxDispatchType, getState: GetStateType, {client}: {client: H... | javascript | edit | null | null | mit | 31fde45536d569f6629b4896d61b4f6093059f2c | lacqueristas/www,lacqueristas/www | source/@lacqueristas/signals/refreshResources/index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar mkdirp = require('mkdirp');\nvar existsSync = fs.existsSync || path.existsSync; // to support older nodes than 0.8\n\nvar CONFIG_FILE_NAME = 'config.json';\nvar Config = function(home) {\n this.home = home;... | javascript | edit | 0 | 2 | mit | 908c305b901b73e92cd0e1ef4fd0f76d1aa2ea72 | groonga/gcs-console | lib/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst HarmonyExportExpressionDependency\n\t= require( \"webpack/lib/dependencies/HarmonyExportExpressionDependency\" );\nconst HarmonyExportSpecifierDependency\n\t= require( \"webpack/lib/dependencies/HarmonyExportSpecifierDependency\" ... | javascript | edit | 0 | 5 | mit | 6b00187f384c2078cb06c5d8dab4d5ef48ca8953 | chhe/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,bastimeyer/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui,bastimeyer/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,streamlink/streamlink-twitch-gui,chhe/livestreamer-twitch-gui,bastimeyer/livestreamer-twitch-gui | src/web_loaders/ember-app-loader/get-module-exports.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport TaskDetail from './TaskDetail';\n\nimport MesosStateStore from '../../../../../../src/js/stores/MesosStateStore';\nimport ServiceBreadcrumbs from '../../components/ServiceBreadcrumbs';\nimport Page f... | javascript | edit | 0 | 2 | apache-2.0 | 4855e94ed7492a333597b4715a9d606cb74ab086 | dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui | plugins/services/src/js/pages/task-details/ServiceTaskDetailPage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar RestClient = require('carbon-client')\nvar util = require('util')\nvar fibrous = require('fibrous');\n\n/****************************************************************************************************\n * monkey patch the endpo... | javascript | edit | 0 | 3 | mit | 8262f90630783eb9329613aaf676b2b43c960dff | carbon-io/carbon-client-node,carbon-io/carbon-client-node | lib/CarbonClient.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports.init = function(genericAWSClient) {\n // Creates a CloudFormation API client\n var createCFNClient = function (accessKeyId, secretAccessKey, options) {\n options = options || {};\n\n var client = cfnClient({\n host:... | javascript | edit | 0 | 4 | mit | 0f2fc159b5c0622b20f34d9eed915c7563237a7a | mirkokiefer/aws-lib,livelycode/aws-lib,pnedunuri/aws-lib | lib/cfn.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nif (typeof(Alchemy) === 'undefined') {\n var Alchemy = {};\n}\n\n// Load jQuery on demand. Use this if jQuery is not present.\n// Found on http://css-tricks.com/snippets/jquery/load-jquery-only-if-not-present/\nAlchemy.loadjQuery = fun... | javascript | edit | 0 | 5 | bsd-3-clause | 370857a2c3d321b2fb1e7177de266b8422112425 | clst/alchemy_cms,mtomov/alchemy_cms,nielspetersen/alchemy_cms,mamhoff/alchemy_cms,thomasjachmann/alchemy_cms,heisam/alchemy_cms,Domenoth/alchemy_cms,kinsomicrote/alchemy_cms,mamhoff/alchemy_cms,thomasjachmann/alchemy_cms,cygnus6/alchemy_cms,IngoAlbers/alchemy_cms,robinboening/alchemy_cms,AlchemyCMS/alchemy_cms,cygnus6/... | app/assets/javascripts/alchemy/alchemy.jquery_loader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global require, describe, it */\n'use strict';\n\nvar expect = require('chai').expect;\nvar request = require('request');\n\nvar url = function(path) {\n return 'http://localhost:8000' + path;\n};\n\ndescribe('GET /', function() {\n... | javascript | edit | 0 | 1 | mit | ad03ed2e56b56f22fc0f148dd6e6027eab718591 | JulieMarie/Brainstorm,HRR2-Brainstorm/Brainstorm,JulieMarie/Brainstorm,ekeric13/Brainstorm,EJJ-Brainstorm/Brainstorm,EJJ-Brainstorm/Brainstorm,ekeric13/Brainstorm,plauer/Brainstorm,drabinowitz/Brainstorm | specs/server/ServerSpec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#! /usr/bin/env node\n\n/* global require, process */\n\nvar program = require('commander'),\n\tfs = require('fs'),\n\tcwd = process.cwd(),\n\tcliPath = cwd + '/node_modules/wee-core/cli.js';\n\n// Register version and init command\npro... | javascript | edit | 0 | 4 | apache-2.0 | 2d1dd9b1bbfd7b07bdcae40613899eab31c75f9a | weepower/wee-cli | lib/wee.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react'\nimport ListItem from 'material-ui/lib/lists/list-item'\nimport Checkbox from 'material-ui/lib/checkbox'\nimport ActionDelete from 'material-ui/lib/svg-icons/action/delete'\n\nconst Todo = ({ onC... | javascript | edit | 0 | 2 | mit | 63284bdb3177e678208650e0b738dc9876afa643 | rxlabs/tasty-todos,rxlabs/tasty-todos,rxlabs/tasty-todos | app/components/Todo.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n exports.init = function(params) {\n var fs = require('fs');\n var path = require('path');\n var service = params['service'];\n var shell = require('shelljs');\n\n if (!service) {\n ... | javascript | edit | 0 | 2 | mit | 7f08b0b8950ee9e4123b2d5332f2fcfe8616d771 | optbot/daemon-setup,optbot/daemon-setup | lib/daemon-setup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n DelveClient\n @description creates a singleton Delve client\n**/\n'use babel';\n\nconst DelveClient = require('delvejs');\n\nvar delveClient;\n\nconst connManager = {\n connect: function connect(host, port) {\n delveClient =... | javascript | edit | 0 | 2 | mit | 788c0adabe8a1501e8032e5b9d90afcc5c4927ab | tylerFowler/atom-delve | lib/delve-client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction maDashboardPanel($state) {\n return {\n restrict: 'E',\n scope: {\n collection: '&',\n entries: '&'\n },\n link: function(scope) {\n scope.gotoList = function () {... | javascript | edit | 0 | 1 | mit | a4187de0cd7c54363cc6225f72fe9093b8a8b4c8 | Benew/ng-admin,LuckeyHomes/ng-admin,ulrobix/ng-admin,maninga/ng-admin,manuelnaranjo/ng-admin,ronal2do/ng-admin,jainpiyush111/ng-admin,baytelman/ng-admin,manekinekko/ng-admin,eBoutik/ng-admin,marmelab/ng-admin,rifer/ng-admin,baytelman/ng-admin,rifer/ng-admin,bericonsulting/ng-admin,SebLours/ng-admin,SebLours/ng-admin,ah... | src/javascripts/ng-admin/Main/component/directive/maDashboardPanel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport parseL1ArticlePresenters from '../../../../lib/repository-mappers/figshare/parseL1ArticlePresenters';\n\nconst figshareL1Articles = require('./resources/figshareL1Articles.json');\nconst convertedArticles = parseL1ArticlePresent... | javascript | edit | 0 | 1 | mit | d4a57ac1e7516a75a3770e23a06241366a90dbcb | mozillascience/software-discovery-dashboard,mozillascience/software-discovery-dashboard | spec/lib/repository-mappers/figshare/parseL1ArticlePresenters-spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Vue from \"vue\";\nimport Vuex, {Store} from \"vuex\";\nimport state from \"./state\";\nimport * as mutations from \"./mutations\";\nimport * as getters from \"./getters\";\nimport * as actions from \"./actions\";\nimport {persis... | javascript | edit | 0 | 0 | mit | 5df003b17e805ea3c649330bd72fe3d0d7ad085d | sulcata/sulcalc,sulcata/sulcalc,sulcata/sulcalc | app/src/store/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//@flow\n\nimport { updateObject } from \"../../reducers/utils\";\n\nexport default (\n state: { breakpoints: { main: string } },\n action: { type: string, newLayout: string, component: string }\n) =>\n updateObject(state, {\n bre... | javascript | edit | null | null | mit | 672d4b454e02fe0cb894fdca00f6a151f7e522e4 | slightly-askew/portfolio-2017,slightly-askew/portfolio-2017 | src/data/ui/breakpoints/reducers.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar mongoose = require('mongoose'),\n\tutils = require('../utils'),\n\tUser = mongoose.model('User'),\n\tApplication = mongoose.model('Application'),\n\tSimpleApiKey = mongoose.model('SimpleApiKey'),\n\tOauthConsumer = ... | javascript | edit | 0 | 3 | apache-2.0 | 4893fe0778f0e6a3876d0c634d5437c3f7e6911d | Splaktar/hub,gdg-x/hub,gdg-x/hub,nassor/hub,fchuks/hub,nassor/hub,fchuks/hub,Splaktar/hub | lib/controllers/api/v1/users.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default Ember.Controller.extend({\n actions: {\n collapseLeft: function() {\n this.get('leftChild').collapse();\n },\n collapseRight: function() {\n this.get('rightChild').collapse();\n }\n }\n});\n\n```\n... | javascript | edit | 0 | 1 | mit | 1d894193ceebc30520ef2d18a6c15452f52a2e30 | BryanCrotaz/ember-split-view,BryanHunt/ember-split-view,BryanCrotaz/ember-split-view,BryanHunt/ember-split-view | tests/dummy/app/controllers/collapsible.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar nconf = require('nconf');\n\nnconf\n .env();\n\nnconf.defaults({\n 'RIPPLE_REST_API': 'http://localhost:5990',\n 'DATABASE_URL': 'postgres://postgres:password@localhost:5432/ripple_gateway',\n 'RIPPLE_DATAMODEL_ADAPTER': 'ripple... | javascript | edit | 0 | 0 | isc | d0f443c0b9c32a72faa67de95da03a01025c2ad0 | zealord/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,xdv/gatewayd,crazyquark/gatewayd,zealord/gatewayd,whotooktwarden/gatewayd,crazyquark/gatewayd | config/nconf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable import/no-unassigned-import */\n\nimport 'raf/polyfill'\nimport 'mock-local-storage'\n\nimport {configure} from 'enzyme'\nimport Adapter from 'enzyme-adapter-react-16'\n\nconfigure({adapter: new Adapter()})\n\n```\n\nA... | javascript | edit | 0 | 0 | mit | e9d0001580fcd7178334071d6ea9040da9df49a9 | sgmap/inspire,sgmap/inspire | jest.setup.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/1.0/config/configuration-file.html\n\nconst path = require('path');\n\nprocess.env.CHROME_BIN = require('puppeteer').executablePath();\n\nmodu... | javascript | edit | 0 | 1 | mit | 067d0b0d647385559f5008aa62c89b18688431c0 | kiswa/TaskBoard,kiswa/TaskBoard,kiswa/TaskBoard,kiswa/TaskBoard,kiswa/TaskBoard | karma.conf.js | rejected_duplicate | Near-duplicate of sample 69324 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n state: {\n isVisible: false,\n options: {\n text: '',\n autoDismiss: true,\n },\n },\n getters: {\n snackbarIsVisible(state) {\n return state.isVisible;\n },\n snackbarOptions(state... | javascript | edit | 0 | 1 | mit | 6cbd9e5ade62b19781fce3263aa8890242aa2804 | DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation | contentcuration/contentcuration/frontend/shared/vuex/snackbar/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport appModule from '../module.js';\n\n/**\n * @param {string} appBackgroundselectorTemplateUrl Url to backgroundselector template.\n * @return {angular.IDirective}\n * @ngInject\n */\nconst exports = function(appBackgroundselectorTem... | javascript | edit | 0 | 1 | mit | e6bfa9f7036d4ad51af84a9205616b4782a5db91 | Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3 | geoportal/geoportailv3_geoportal/static-ngeo/js/backgroundselector/BackgroundselectorDirective.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint no-use-before-define: 0 */\nimport _ from 'lodash';\nimport axios from 'axios';\n\nlet editor;\nlet monaco;\n\n// Worker always run and will never terminate\n// There is only one global editor instance never disposed in Rekit ... | javascript | edit | 0 | 3 | mit | a003149c2d98a236c320bd84c0e484a6cf62f370 | supnate/rekit | packages/rekit-studio/src/features/common/monaco/setupLinter.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.