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```typescript\nimport { isWithinInterval } from 'date-fns';\n\nimport { BLACK_FRIDAY, PRODUCT_PAYER } from '../constants';\nimport { Subscription } from '../interfaces';\nimport { hasMailPlus, hasMailProfessional, hasVpnBasic, hasVpnPlus, hasAddons } ... | typescript | edit | 0 | 10 | mit | c4249ef30e8dadc3948fe4503f2fc20a29b467f6 | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | packages/shared/lib/helpers/blackfriday.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n///<reference path=\"./Interfaces/IFilter.ts\" />\n///<reference path=\"./Interfaces/IFilterFunction.ts\" />\n\nimport * as clone from 'lodash/clone';\n\nclass Filter<T> implements IFilter<T>\n{\n private filterFunctions: IFilterFuncti... | typescript | edit | 0 | 2 | mit | 7eea6ea0fea136bbd48bb9f60cb9015aed1df37e | harksys/HawkEye,harksys/HawkEye,harksys/HawkEye | src/js/Filter/Filter.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport 'babel-polyfill'\nimport React from 'react'\nimport { storiesOf } from '@storybook/react'\n\nimport ProgressStepContainer from 'src/common-ui/components/progress-step-container'\nimport OnboardingTooltip from 'src/overview/onboar... | typescript | edit | null | null | mit | 905da1ff6125b9bf887f7d219e0c81cdf6c45936 | WorldBrain/WebMemex,WorldBrain/WebMemex | src/dev/stories/index.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|--------------------------------------------------... | typescript | edit | 0 | 2 | bsd-3-clause | b6f86e341edb5cae5d9996ababd1fcc3988f2bd2 | jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab | packages/mathjax2-extension/src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as chalk from \"chalk\";\nimport * as tty from \"tty\";\n\n\n/**\n * Prints a message indicating Ctrl+C was pressed then exits the process.\n */\nexport function defaultCtrlCHandler(): void {\n console.log(`'${chalk.cyan(\"^... | typescript | edit | 0 | 3 | mit | 77f9a15ca37c6db333969182e788ae6ef6076590 | pandell/node-monitorctrlc,pandell/node-monitorctrlc | src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { git, envForAuthentication } from './core'\nimport { Repository } from '../../models/repository'\nimport { User } from '../../models/user'\n\n/** Fetch from the given remote. */\nexport async function fetch(repository: Repositor... | typescript | edit | 0 | 1 | mit | b5618bbbc731073b53d33585cc4125760cdf3cfd | say25/desktop,gengjiawen/desktop,j-f1/forked-desktop,j-f1/forked-desktop,shiftkey/desktop,BugTesterTest/desktops,hjobrien/desktop,BugTesterTest/desktops,desktop/desktop,gengjiawen/desktop,desktop/desktop,hjobrien/desktop,say25/desktop,say25/desktop,j-f1/forked-desktop,BugTesterTest/desktops,kactus-io/kactus,j-f1/forked... | app/src/lib/git/fetch.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport {ModelServiceRef, DatabaseConnectionRef, ModelsConfig} from \"./src/tokens\";\nexport {BaseModel} from \"./src/base_model\";\nexport {ModelCollectionObservable} from \"./src/model_collection.interface\";\nexport {ModelService} fr... | typescript | edit | 0 | 2 | mit | 66467a4647010cf28bf98b2668acc4b1c789008d | tomdegoede/obsrm | index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react'\n\nimport Repository from '../../models/repository'\nimport { Dispatcher } from '../../lib/dispatcher'\n\ninterface ICreateBranchProps {\n readonly repository: Repository\n readonly dispatcher: Dispatche... | typescript | edit | null | null | mit | 5b1c9c51d81856fb508789cbad95086f2151a613 | artivilla/desktop,BugTesterTest/desktops,hjobrien/desktop,gengjiawen/desktop,desktop/desktop,shiftkey/desktop,gengjiawen/desktop,gengjiawen/desktop,artivilla/desktop,BugTesterTest/desktops,hjobrien/desktop,shiftkey/desktop,say25/desktop,shiftkey/desktop,desktop/desktop,j-f1/forked-desktop,kactus-io/kactus,kactus-io/kac... | app/src/ui/create-branch/index.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Mutator } from './mutators/Mutator';\n\nimport { IdentifierMutator } from './mutators/IdentifierMutator';\nimport { ImportSpecifierMutator } from './mutators/ImportSpecifierMutator';\nimport { InterfaceDeclarationMutator } from... | typescript | edit | 0 | 0 | mit | d6f692535c4f28de5ed5aeab58481d9f808e4148 | fabiandev/ts-runtime,fabiandev/ts-runtime,fabiandev/ts-runtime | src/next/mutators.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { EventType } from './enums/event-type';\n\nexport interface Player extends Entity {\n\t//TODO: Remove these from the game engine & replace here\n\tgetDialogs: () => any\n\tgetCombatSchedule: () => any\n\tgetEquipment: () => any\... | typescript | edit | 0 | 0 | mit | baca5a865674c224a10174497d5366dfb631ed99 | Sundays211/VirtueRS3,Sundays211/VirtueRS3,Sundays211/VirtueRS3 | src/main/javascript/engine/models.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nmodule Scuffle {\n\texport class ConnectState extends Phaser.State {\n\t\tgame : Game\n\n\t\tcreate() {\n\t\t\tvar group = this.add.group()\n\t\t\tgroup.alpha = 0\n\n\t\t\tvar text = this.add.text(this.world.centerX, this.world.centerY,... | typescript | edit | 0 | 2 | apache-2.0 | 81ba488c3a2d3f9336b8e278c7b1159c1bc2c2ff | shockkolate/scuffle,shockkolate/scuffle,shockkolate/scuffle | public/ts/ConnectState.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Item } from '../models/item';\nimport { Trie } from '../models/trie';\nimport { ItemRepository } from '../repository/item-repository';\n\nexport class ItemService {\n private readonly repository: ItemRepository;\n\n const... | typescript | edit | 0 | 4 | isc | 02dfee06151467d6e0b4787d1a8eb1b86d979c7c | michaelbull/aurelia-hacker-news,michaelbull/aurelia-hacker-news,MikeBull94/aurelia-hacker-news,michaelbull/aurelia-hacker-news,MikeBull94/aurelia-hacker-news | src/services/item-service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n'use strict';\n\nimport { window } from 'vscode';\nimport { MimeUtility } from './mimeUtility';\nimport { format as JSONFormat } from \"jsonc-parser\";\nimport { EOL } from \"os\";\nconst pd = require('pretty-data').pd;\n\nexport class ... | typescript | edit | 0 | 11 | mit | aad99397b58b4c5a91c1dab2c5f67f58bb18346f | Huachao/vscode-restclient,Huachao/vscode-restclient | src/responseFormatUtility.ts | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * Wraps parsing of JSON, so that an error is logged, but no exception is thrown\n */\nexport function safeParseJson (value?: string|false|null) : {[k: string]: any}|null\n{\n try\n {\n if (value)\n {\n ... | typescript | edit | 0 | 0 | bsd-3-clause | c3eac4bf993119318f28c4c90d0b66b3d5704574 | Becklyn/mojave,Becklyn/mojave,Becklyn/mojave | json.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { PersistedStateKey, ImmutablePersistedStateKey } from '../types';\r\n\r\nexport const PERSISTED_STATE_WHITELIST: PersistedStateKey[] = [\r\n 'tab',\r\n 'account',\r\n 'hitBlocklist',\r\n 'hitDatabase',\r\n 'requesterBlockli... | typescript | edit | 0 | 0 | mit | d501bea6bbd85415f05093a520761fe50288cd1e | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | src/constants/settings.ts | rejected_duplicate | Near-duplicate of sample 114858 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { assignAll } from './assignAll';\n\nconst PROPERTY_EXCLUDES = [\n 'length',\n 'name',\n 'arguments',\n 'called',\n 'prototype'\n];\n\n/**\n * Wraps a constructor in a wrapper function and copies all static properties\n * an... | typescript | edit | 0 | 1 | mit | 73b85378c45357c1521a4c2116b3d81f45beb103 | steelsojka/lodash-decorators | src/utils/wrapConstructor.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/** Throw an error. */\nexport default function fatalError(msg: string): never {\n throw new Error(msg)\n}\n\n```\n\nApply this change: Add type helper for exhaustive checks"
},
{
"role": "assistant",
"content": "/** Throw ... | typescript | edit | 0 | 1 | mit | 23c5f39e8e408317362ebe33e9be6c180242b8b8 | shiftkey/desktop,kactus-io/kactus,BugTesterTest/desktops,say25/desktop,kactus-io/kactus,hjobrien/desktop,shiftkey/desktop,BugTesterTest/desktops,hjobrien/desktop,gengjiawen/desktop,artivilla/desktop,BugTesterTest/desktops,kactus-io/kactus,BugTesterTest/desktops,artivilla/desktop,desktop/desktop,artivilla/desktop,gengji... | app/src/lib/fatal-error.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as _ from 'underscore';\n\n// Excludes 0O1lIUV\nconst unmistakableChars = \"abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTWXYZ23456789\";\n\nexport const randomId = () => {\n if (webpackIsServer) {\n const crypto = require('cr... | typescript | edit | 0 | 4 | mit | 2e7e06ddf346601573351c83dd45722209ea3694 | Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2 | packages/lesswrong/platform/webpack/lib/random.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as debug from 'debug';\n\nimport { Client } from '../client';\nimport { BasiqPromise, ConnectionCreateOptions, ConnectionUpdateOptions } from '../interfaces';\nimport { Resource } from './resource';\n\nconst log = debug('basiq-... | typescript | edit | 0 | 1 | bsd-2-clause | 54e64cf64c03b35849035c2ba6952ae893960fd9 | FluentDevelopment/basiq-api | lib/resources/connections.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport FakeXMLHttpRequest from \"fake-xml-http-request\";\nimport { Params, QueryParams } from \"route-recognizer\";\ntype SetupCallback = (this: Server) => void;\ninterface SetupConfig {\n forcePassthrough: boolean;\n}\nexport type Co... | typescript | edit | 0 | 1 | mit | 49e60c2b64081638cf67d009ae6979ac04d1aacd | pretenderjs/pretender,trek/pretender,pretenderjs/pretender | index.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React, {SFC} from 'react'\nimport PropTypes from 'prop-types'\nimport _ from 'lodash'\nimport uuid from 'uuid'\n\nimport ReactTooltip from 'react-tooltip'\n\nimport {Source} from 'src/types'\n\ninterface Props {\n sourceOverride... | typescript | edit | null | null | mit | 038d267980b94e110767bdc820454a0a346ba4f7 | influxdata/influxdb,nooproblem/influxdb,influxdb/influxdb,nooproblem/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,influxdata/influxdb,nooproblem/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/inf... | ui/src/shared/components/SourceIndicator.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport babelPlugin from \"./babelPlugin\";\nimport handleEvalScript from \"./handleEvalScript\";\nimport getBabelOptions, { getAndResetLocs } from \"./getBabelOptions\";\n\nwindow[\"__fromJSEval\"] = function(code) {\n function compile... | typescript | edit | 0 | 1 | mit | d398bbdcb0cac623a4a0a84603d719aade418470 | mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS | packages/core/src/compileInBrowser.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {css} from 'lit';\n\nexport const modalStyles = css`\n dialog {\n padding: 0;\n border: 1px solid var(--border-color);\n borde... | typescript | edit | 0 | 0 | apache-2.0 | 909e7e7d2ec3b21f0a0b4f2cb8f6a875550b6dc9 | GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit | polygerrit-ui/app/styles/gr-modal-styles.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react';\r\nimport { Button } from '@shopify/polaris';\r\nimport { Tooltip } from '@blueprintjs/core';\r\nimport { TOpticonData, RequesterScores } from '../../types';\r\nimport { turkopticonBaseUrl } from '../../c... | typescript | edit | null | null | mit | 0c9b5540a1eae38322a26b396a7f06a6f076f9cf | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | src/components/SearchCard/TOpticonButton.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, Input } from '@angular/core';\nimport { Photo } from '../../../data.types';\nimport { FullscreenService } from '../../../shared/fullscreen.service';\n\n@Component({\n selector: 'post-photo',\n template: `\n ... | typescript | edit | 0 | 2 | mit | 68f8bf68b63cb5a6a6ac3e6ae477e597e70bcf79 | zoehneto/tumblr-reader,zoehneto/tumblr-reader,zoehneto/tumblr-reader | src/app/components/post-components/post-photo/post-photo.component.ts | rejected_duplicate | Near-duplicate of sample 115635 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { translate } from '@waldur/i18n';\nimport {\n createNameField,\n createDescriptionField,\n} from '@waldur/resource/actions/base';\nimport { UpdateResourceDialog } from '@waldur/resource/actions/UpdateResourceDialog';\n\nimport... | typescript | edit | null | null | mit | 7e2611109c0e32f10e750a8bed7988fedd5084ac | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | src/slurm/EditDialog.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as express from 'express';\nimport * as graphqlHTTP from 'express-graphql';\nimport * as url from 'url';\nimport { SchemaBuilder } from './SchemaBuilder';\n\nlet ELASTIC_BASEURL = 'http://localhost:9200';\n\nlet argv = process.... | typescript | edit | 0 | 1 | mit | c0576bda677c8838fd922453f568b7ddf6b6f84c | nripendra/node-elasticsearch-graphql | index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n///<reference path=\"../../../typings/globals/mysql/index.d.ts\"/>\nimport * as mysql from 'mysql';\n\nexport class UserFunctions {\n\n /**\n * Callback for responding with user details query from the Database as a JSON object\n ... | typescript | edit | 0 | 1 | mit | c94612aa3fc4016aa33e196f926e2b53ee148b1c | shavindraSN/examen,shavindraSN/examen,shavindraSN/examen | server/libs/api/user-functions.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from \"react\";\nimport * as PropTypes from \"prop-types\";\n\nexport interface DataProps {\n direction?: \"row\" | \"column\";\n disabled?: boolean;\n}\n\nexport interface SeparatorProps extends DataProps, React.HTM... | typescript | edit | null | null | mit | 5660399d1daadffebf7c40df7d7648c39758a39a | myxvisual/react-uwp,myxvisual/react-uwp | src/Separator/index.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { observable } from 'aurelia-framework';\nimport { activationStrategy } from 'aurelia-router';\nimport {\n HackerNewsApi,\n STORIES_PER_PAGE\n} from '../services/api';\n\nexport abstract class StoryList {\n stories: any[... | typescript | edit | 0 | 4 | isc | 4929cd85a148421ee6c506074c5bb07d3b8a4c3f | michaelbull/aurelia-hacker-news,michaelbull/aurelia-hacker-news,MikeBull94/aurelia-hacker-news,michaelbull/aurelia-hacker-news,MikeBull94/aurelia-hacker-news | src/pages/story-list.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {\n Record,\n String,\n Static,\n Null,\n Boolean,\n Number,\n Array,\n Undefined,\n} from \"runtypes\"\n\nexport const FeaturedLink = Record({\n id: String,\n _id: String,\n href: String,\n title: String,\n subtitle... | typescript | edit | 0 | 0 | mit | f1610692a8bbd86d90973307d3f55231acf92e61 | artsy/metaphysics,artsy/metaphysics,artsy/metaphysics | src/types/runtime/gravity/FeaturedLink.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\nimport * as React from 'react';\n\nlet shell: Electron.Shell = (window as any).require('electron').remote.shell;\n\nexport\nnames... | typescript | edit | null | null | bsd-3-clause | ce84c31af7b24a7c76a3859a3359c83771bc333c | nproctor/jupyterlab_app,nproctor/jupyterlab_app,nproctor/jupyterlab_app | src/browser/components/error/servererror.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {MixinViewModel} from \"./../view-models\";\n\nexport function isAllowedMixin(mixin: MixinViewModel) {\n switch (mixin.name) {\n case \"ModifierableNode\":\n case \"NamedNode\":\n case \"PropertyNamedNode... | typescript | edit | 0 | 12 | mit | ee2d63799cbd0890927353d000e923e7fef39d99 | dsherret/ts-simple-ast | code-generation/config/isAllowedMixin.ts | rejected_complexity | Cyclomatic complexity too high: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Copyright (c) 2016 Vadim Macagon\n// MIT License, see LICENSE file for full terms.\n\n// Various Utility Functions\n\n/**\n * Creates a new object that contains all the properties of the [[source]] object except the ones\n * given in... | typescript | edit | 0 | 2 | mit | 55225bd5cd2f1de36f2c9b6488cd66f5e3243a96 | debugworkbench/hydragon,debugworkbench/hydragon,debugworkbench/hydragon | app/src/common/utils.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport class <%= jsComponentName %>Page {\n navigateTo() {\n return browser.get('/');\n }\n \n getParagraphText() {\n return element(by.css('<%= jsComponentName %>-app p')).getText();\n }\n}\n\n```\n\nApply this change: fix(t... | typescript | edit | null | null | mit | 17cb4da5ea3bebe343b330f3571b95132a24315e | intellix/angular-cli,hollannikas/angular-cli,catull/angular-cli,geofffilippi/angular-cli,IgorMinar/angular-cli,DevIntent/angular-cli,escorp/angular-cli,fuitattila/angular-cli,intellix/angular-cli,vsavkin/angular-cli,jimitndiaye/angular-cli,ReToCode/angular-cli,IgorMinar/angular-cli,delasteve/angular-cli,IgorMinar/angul... | addon/ng2/blueprints/ng2/files/e2e/app.po.ts | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport \"hap-nodejs\"\n\nexport interface Homebridge {\n hap: HAPNodeJS.HAPNodeJS\n log: Logger\n registerAccessory(\n pluginName: string,\n accessoryName: string,\n constructor: AccessoryConstructor\n ): void\n}\n\nexport ... | typescript | edit | 0 | 0 | mit | 23ea12ac44f2c2f72e44d4fc8705c65980634e8b | JosephDuffy/homebridge-pc-volume,JosephDuffy/homebridge-pc-volume,JosephDuffy/homebridge-pc-volume | src/homebridge.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { isSameDay } from 'date-fns';\nimport * as React from 'react';\nimport { DayProps } from '../../types';\n\nimport { getDayComponent } from './getDayComponent';\n\nexport function Day(props: DayProps): JSX.Element | null {\n con... | typescript | edit | null | null | mit | d33d1720d64c62bc1dd4d26d5646d0016a192290 | gpbl/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker | packages/react-day-picker/src/components/Day/Day.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * @license\n * Copyright 2013 Palantir Technologies, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of ... | typescript | edit | 0 | 0 | apache-2.0 | ccc844c33220a9b009f067706f3bf0b3b5de045a | weswigham/tslint,andy-hanson/tslint,RyanCavanaugh/tslint,mprobst/tslint,palantir/tslint,weswigham/tslint,berickson1/tslint,nchen63/tslint,RyanCavanaugh/tslint,IllusionMH/tslint,andy-ms/tslint,bolatovumar/tslint,Pajn/tslint,nchen63/tslint,andy-ms/tslint,RyanCavanaugh/tslint,JoshuaKGoldberg/tslint,ScottSWu/tslint,YuichiN... | src/formatters/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class MapService {\n\n constructor() {\n }\n\n}\n```\n\nApply this change: Prepare a MapService with functions signatures"
},
{
"role": "assistant",
"con... | typescript | edit | 0 | 1 | mit | 55aefeadb0cef8609b499eb998558f03fad83225 | ABAPlan/abaplan-core,ABAPlan/abaplan-core,ABAPlan/abaplan-core | app/core/map.service.ts | rejected_duplicate | Near-duplicate of sample 115619 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport const AUTH0_APPKEY = 'CoDxjf3YK5wB9y14G0Ee9oXlk03zFuUF'\nexport const AUTH0_DOMAIN = 'odbrian.eu.auth0.com'\nexport const AUTH0_LOCKOPTIONS = {\n allowedConnections: ['google-oauth2'],\n allowForgotPassword: false,\n all... | typescript | edit | 0 | 0 | mit | 13e88a83d57a8bb742cf2e89e5916b588027a3e4 | OpenDirective/brian,OpenDirective/brian,OpenDirective/brian | src/config/client-config.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Analysis } from '../analysis';\nimport { SymbolInformation, CompletionItemKind, Location } from 'vscode-languageserver';\n\nexport function buildDocumentSymbols(uri: string, analysis: Analysis): SymbolInformation[] {\n const... | typescript | edit | 0 | 7 | mit | 3b92c1c949819b4b31ef1e4fc851555da27e6c82 | trixnz/vscode-lua,trixnz/vscode-lua | server/src/services/documentSymbolService.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport CeraonState from '../../State/CeraonState';\nimport CeraonAction from '../../Actions/CeraonAction';\n\nexport default function ceraonReducer(state: CeraonState, action: CeraonAction) : CeraonState {\n return state;\n}\n\n```\n\n... | typescript | edit | 0 | 2 | bsd-3-clause | 44f9ba9843ff0cd9e93031abee329bab31c5d91a | Rdbaker/Mealbound,Rdbaker/Mealbound,Rdbaker/Mealbound,Rdbaker/Mealbound,Rdbaker/Mealbound | CeraonUI/src/Store/Reducers/CeraonReducer.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from \"react\";\n\nconst styles = require(\"./banner.less\");\n\nexport function Banner() {\n return (\n <a className={styles.conference_banner} href=\"https://kotlinconf.com\">\n <div className={s... | typescript | edit | null | null | apache-2.0 | 6373683820fdd756375954e9180735db620fd92e | KotlinBy/awesome-kotlin,KotlinBy/awesome-kotlin,KotlinBy/awesome-kotlin,KotlinBy/awesome-kotlin | app/src/banner/banner.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {AudioPlayer} from \"./audio-player\";\nconst uuid = require(\"node-uuid\");\n\nexport class AlexaContext {\n private _applicationID: string;\n private _userID: string;\n private _audioPlayer: AudioPlayer;\n\n public ... | typescript | edit | 0 | 3 | apache-2.0 | 907f3a04d5af56ca9df8460b8aa7beb5a2b4b2f8 | bespoken/bst,bespoken/bst | lib/alexa/alexa-context.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport Wipable from './wipable';\n\nexport default class TaskGroup extends Wipable {\n taskGroup: Element;\n\n constructor(taskGroup: Element) {\n super();\n this.taskGroup = taskGroup;\n }\n\n // header.classList.contains(\"b... | typescript | edit | 0 | 2 | mit | b396ede44be06f5d8361b4e8266e64d9a9b4b226 | apiology/wip-limiter,apiology/wip-limiter,apiology/wip-limiter | src/task-group.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from \"react\";\n\nexport interface ButtonProps {\n text?: string;\n faClass?: string;\n onClick: React.MouseEventHandler<HTMLSpanElement>;\n onMouseOver?: React.MouseEventHandler<HTMLSpanElement>;\n}\n\nex... | typescript | edit | null | null | mit | 55d731ce1d06ddbc0c2e9efab475376f97c05ecb | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | client/Components/Button.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as Koa from \"koa\";\nimport * as bodyParser from \"koa-bodyparser\";\n\nconst app = new Koa();\n\napp.use(bodyParser({ strict: false }));\n\napp.listen(80)\n```\n\nApply this change: Use body parser request variables in tests"... | typescript | edit | 0 | 1 | mit | c60bff19df24f1a4c26fa940570e20724d5ded97 | abbasmhd/DefinitelyTyped,aciccarello/DefinitelyTyped,AgentME/DefinitelyTyped,jimthedev/DefinitelyTyped,benishouga/DefinitelyTyped,zuzusik/DefinitelyTyped,abbasmhd/DefinitelyTyped,arusakov/DefinitelyTyped,borisyankov/DefinitelyTyped,rolandzwaga/DefinitelyTyped,one-pieces/DefinitelyTyped,zuzusik/DefinitelyTyped,chrootsu/... | types/koa-bodyparser/koa-bodyparser-tests.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Zone } from './../zones/zone';\n\nexport class Program {\n id: number;\n name: string;\n scheduleItems: ProgramScheduleItem[];\n programScheduleType: ProgramScheduleType;\n startTimeHours: number;\n startTimeMinutes: numb... | typescript | edit | 0 | 1 | mit | 858526a70da00942118b4a75f6ed1e5ec35e34e1 | nzjoel1234/sprinkler,nzjoel1234/sprinkler,nzjoel1234/sprinkler,nzjoel1234/sprinkler | sprinkler/app/programs/program.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n///<reference path=\"./Messenger.ts\" />\n\nmodule Game {\n export class GameObject extends Messenger {\n /**\n * A native class that sends some useful events.\n *\n * @constructor\n * @extends Game.Messenger\n *... | typescript | edit | 0 | 1 | mit | b20f4d840811dc04cf85678931d9438e6e47b875 | eugene-bulkin/game-library,eugene-bulkin/game-library | src/Game/Object.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { hot } from 'react-hot-loader/root';\nimport React from 'react';\nimport { ProtonApp, StandardSetup } from 'react-components';\nimport locales from 'proton-shared/lib/i18n/locales';\nimport sentry from 'proton-shared/lib/helpers... | typescript | edit | null | null | mit | 7c1e5eb01a2a76c78debc587262c07d6165f652e | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | applications/drive/src/app/App.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Product } from '../models/merchant/Product';\nimport { Merchant } from '../models/merchant/Merchant';\nimport {ConnectionOptions, getConnectionManager} from 'typeorm';\nimport { createConnection } from 'typeorm';\nimport { Supp... | typescript | edit | 0 | 5 | mit | d5401e30f484c35b61482c2b2b838fe773393c3f | prettyflyit/legendary-bassoon,prettyflyit/legendary-bassoon | src/util/dbUtil.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/* eslint-disable @typescript-eslint/no-var-requires */\nimport { CultureInfo, IResourceManager, MustacheResourceManager, Resource, ResourceManager } from \"@manuth/resource-manager\";\nimport Files = require(\"./Files\");\n\n/**\n * Re... | typescript | edit | 0 | 2 | mit | 576e831b9823b80b6e70a05bdb54ba7c0675dd09 | manuth/MarkdownConverter,manuth/MarkdownConverter,manuth/MarkdownConverter | src/Properties/Resources.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as ts from 'typescript';\nimport { MutationContext } from '../context';\n\nexport abstract class Mutator {\n\n protected abstract kind: ts.SyntaxKind | ts.SyntaxKind[];\n\n protected abstract mutate(node: ts.Node, context?: M... | typescript | edit | 0 | 3 | mit | a15c186523161e5f550a4f9d732e2d761637d512 | fabiandev/ts-runtime,fabiandev/ts-runtime,fabiandev/ts-runtime | src/mutators/Mutator.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { requireProjectModule } from '../utilities/require-project-module';\nimport { join } from 'path';\n\nconst fs = require('fs');\nconst Task = require('../ember-cli/lib/models/task');\n\nexport interface RenderUniversalTaskOptions... | typescript | edit | 0 | 3 | mit | 03014187ce124740c2f6857686226614ff84f7f4 | manekinekko/angular-cli,manekinekko/angular-cli,mham/angular-cli,DevIntent/angular-cli,clydin/angular-cli,geofffilippi/angular-cli,nickroberts/angular-cli,filipesilva/angular-cli,nwronski/angular-cli,ocombe/angular-cli,beeman/angular-cli,ocombe/angular-cli,nickroberts/angular-cli,Brocco/angular-cli,maxime1992/angular-c... | packages/@angular/cli/tasks/render-universal.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {\n it,\n inject,\n beforeEachProviders\n} from '@angular/core/testing';\n\n// Load the implementations that should be tested\nimport { AppComponent } from './app.component';\n\ndescribe('App', () => {\n // provide our implem... | typescript | edit | 0 | 1 | mit | 95484050f0fe63f83f4f065f549def4b0c5f4544 | SBats/marvel-reading-stats-frontend,SBats/marvel-reading-stats-frontend,SBats/marvel-reading-stats-frontend | src/app/app.component.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\n@Component({\n selector: 'project-page',\n templateUrl: 'project-page.component.html'\n})\nexport class ProjectPage implement... | typescript | edit | 0 | 1 | mit | 4b5bb3a3818ab7295fa1fa1f9020bac34f137658 | todes1/parrot,anthonynsimon/parrot,anthonynsimon/parrot,anthonynsimon/parrot,anthonynsimon/parrot,todes1/parrot,todes1/parrot,todes1/parrot,anthonynsimon/parrot,anthonynsimon/parrot,todes1/parrot,todes1/parrot | app/src/app/pages/project/project-page.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { cleanup, act, RenderOptions, RenderResult } from 'react-testing-library'\n\nexport function renderHook<P, R>(\n callback: (...args: [P]) => R,\n options?: {\n initialProps?: P\n } & RenderOptions\n): {\n readonly result:... | typescript | edit | 0 | 1 | mit | a16d3a303bfcfdd08ed007e524198b061b89d6ef | testing-library/react-hooks-testing-library,testing-library/react-hooks-testing-library | index.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { versionIsAtLeast } from \"../../shared/utils\";\n\nexport class DartCapabilities {\n\tpublic static get empty() { return new DartCapabilities(\"0.0.0\"); }\n\n\tpublic version: string;\n\n\tconstructor(dartVersion: string) {\n\... | typescript | edit | 0 | 1 | mit | f334b339067bb70d91cdc793c1a524ffe3715cad | Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code | src/extension/sdk/capabilities.ts | rejected_duplicate | Near-duplicate of sample 114893 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {DocumentVariantStore} from '../document-variant-store';\n\ndescribe('DocumentVariantStore', () => {\n const mockApplication = {\n renderUri: () => Promise.resolve({a: 1})\n } as any;\n\n interface Variants {foo: boolean, b... | typescript | edit | 0 | 1 | bsd-2-clause | f537b741b0c902b4acd9a948e1fd6a566ad20966 | clbond/angular-ssr,clbond/angular-ssr,clbond/angular-ssr,clbond/angular-ssr | source/store/tests/document-variant-store.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Copyright (c) 2015 Vadim Macagon\n// MIT License, see LICENSE file for full terms.\n\nimport * as path from 'path';\nimport * as electron from 'electron';\nimport { IAppWindowConfig } from '../common/app-window-config';\nimport * as ... | typescript | edit | 0 | 1 | mit | 313efc7cf9ff553c192143e67029428aa2d274db | debugworkbench/hydragon,debugworkbench/hydragon,debugworkbench/hydragon | src/main-process/application-window.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as moment from 'moment'\nimport { Moment } from 'moment'\n\nexport const FORMAT = 'YYYY-MM-DD'\n\nfunction isValidDate(stringValue: string): boolean {\n return /^\\d{4}-\\d{2}-\\d{2}$/.test(stringValue) && moment(stringValue... | typescript | edit | 0 | 3 | mit | b31bc9162aa23e3c9ea79b7d6a614187203a8bf0 | ikr/react-period-of-stay-input,ikr/react-period-of-stay-input,ikr/react-period-of-stay-input | src/Day.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { spawn } from 'child_process';\n\n// This file is inspired by the Angular CLI (MIT License: https://angular.io/license).\n// See https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/tasks/repo-in... | typescript | edit | 0 | 4 | mit | 4fb444d6a11be3942bdf2934d226c2b952f39c17 | FoalTS/foal,FoalTS/foal,FoalTS/foal,FoalTS/foal | packages/cli/src/generate/utils/init-git-repo.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, OnInit } from '@angular/core';\n\nimport * as tl from 'spikes-ng2-components';\n\n@Component({\n selector: 'app-spikes-timeline-demo',\n templateUrl: './spikes-timeline-demo.component.html',\n styleUrls: ['./spike... | typescript | edit | 0 | 1 | mit | 31d2572b2756b8f33ef76f9654d08d37da0fed9a | SpikesBE/AngularComponents,SpikesBE/AngularComponents | demo/SpikesNgComponentsDemo/src/app/spikes-timeline-demo/spikes-timeline-demo.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport Dexie from 'dexie'\n\nexport interface IPullRequestRef {\n readonly repoId: number\n readonly ref: string\n readonly sha: string\n}\n\nexport interface IPullRequest {\n readonly id?: number\n readonly number: number\n reado... | typescript | edit | 0 | 1 | mit | 8448227cb2394787045e5a2f3ae457bbe9d77b15 | kactus-io/kactus,say25/desktop,shiftkey/desktop,artivilla/desktop,kactus-io/kactus,j-f1/forked-desktop,desktop/desktop,desktop/desktop,say25/desktop,j-f1/forked-desktop,say25/desktop,shiftkey/desktop,desktop/desktop,desktop/desktop,shiftkey/desktop,j-f1/forked-desktop,artivilla/desktop,say25/desktop,artivilla/desktop,k... | app/src/lib/databases/pull-request-database.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { async, ComponentFixture, TestBed } from '@angular/core/testing'\nimport { TranslateModule } from '@ngx-translate/core'\n\nimport { OAuthComponent } from './oauth.component'\n\ndescribe('OAuthComponent', () => {\n let component... | typescript | edit | 0 | 1 | mit | 88f7f552617e8ec2c32ce7683df56d5007b6f1fa | bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop | frontend/src/app/oauth/oauth.component.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// race-part.model.ts\n\nexport class RacePart {\n id: number;\n name: string;\n date: Date;\n about: string;\n entryFee: number;\n isRacing: boolean;\n image: string;\n imageDescription: string;\n};\n\n```\n\nApply this change:... | typescript | edit | 0 | 0 | mit | 6916e8d68a4b7c31da976028fb0835c5e3541f98 | var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training | A2/quickstart/src/app/models/race-part.model.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { TabOneComponent } from './component/tabone.component'\nimport { PendingComponent } from \"./component/pending.component\";\nimport {TabTwoComponent} from \"./component/... | typescript | edit | 0 | 0 | mit | d9f6049cac76661558d3698cc3f85bd0f9dd1fbe | blindacai/Angular2-Web,blindacai/Angular2-Web,blindacai/Angular2-Web | app/app.route.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for ... | typescript | edit | 0 | 4 | mit | ad97bd7493758e5337b9344a88d35102e0e719db | joaomoreno/vscode,microsoft/vscode,hoovercj/vscode,eamodio/vscode,hoovercj/vscode,Krzysztof-Cieslak/vscode,Microsoft/vscode,joaomoreno/vscode,eamodio/vscode,Microsoft/vscode,microsoft/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,the-ress/vscode,joaomoreno/vscode,the-ress/vscode,eamodio/vscode,the-ress/vscode,Micros... | extensions/typescript-language-features/src/utils/tsconfigProvider.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * Combine all reducers in this file and export the combined reducers.\n * If we were to do this in store.js, reducers wouldn't be hot reloadable.\n */\n\nimport { fromJS } from 'immutable';\nimport { combineReducers } from 'redux-... | typescript | edit | 0 | 3 | mit | 162a5bdd9707898f6b8b67fa130d66a6a2f0605d | StrikeForceZero/react-typescript-boilerplate,StrikeForceZero/react-typescript-boilerplate,StrikeForceZero/react-typescript-boilerplate | app/reducers.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Document} from 'idai-components-2';\nimport {DocumentDatastore} from '../../datastore/document-datastore';\n\n\nexport async function importCatalog(documents: Array<Document>,\n datastore: Docu... | typescript | edit | 0 | 4 | apache-2.0 | 3187fa53d492f99b9e834ac76b12e092d1984131 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | src/app/core/import/import/import-catalog.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { EventEmitter } from \"events\";\n\ntype ConstructorParams = {\n url: string;\n};\n\nexport default class {\n public readonly events = new EventEmitter();\n public enabled: boolean;\n private _status: string;\n\n constructo... | typescript | edit | 0 | 3 | mit | 096813cc74048dfc3c537fb40446d4e71a17a5e4 | frosas/lag,frosas/lag,frosas/lag | src/browser/offline-support/ServiceWorker.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport isEqual from 'lodash/isEqual'\nimport {useRouter} from 'next/router'\nimport {useCallback, useEffect, useState} from 'react'\n\nimport {routeTo} from '../router'\n\nexport default function useRouteTo(to: string, props: any = {}) ... | typescript | edit | 0 | 3 | mit | 243c682e2ddd6c87002ee4cce2b3d9f617eace74 | conveyal/analysis-ui,conveyal/analysis-ui,conveyal/analysis-ui | lib/hooks/use-route-to.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// NOTE: This code is borrowed under permission from:\n// https://github.com/microsoft/vscode-extension-samples/tree/main/helloworld-test-sample/src/test\n\n... | typescript | edit | 0 | 2 | mit | f5c6ed4c1d1136ae6a9d8b4e1f25f98819533730 | PowerShell/vscode-powershell | test/runTests.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage hostpool\n\nimport (\n\t\"github.com/bitly/go-hostpool\"\n)\n\nfunc ExampleNewEpsilonGreedy() {\n\thp := hostpool.NewEpsilonGreedy([]string{\"a\", \"b\"}, 0, &hostpool.LinearEpsilonValueCalculator{})\n\thostResponse := hp.Get()\n\thostn... | go | edit | 3 | 1 | mit | 1ad4f4db8f65ab38416858f6f5f904b338c3be0a | bitly/go-hostpool | example_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Routes, RouterModule} from '@angular/router';\nimport {HomeComponent} from \"./home/home.component\";\nimport {ModuleWithProviders} from \"@angular/core\";\nimport {LifecycleComponent} from \"./lifecycle/lifecycle.component\";\n... | typescript | edit | 0 | 0 | bsd-3-clause | ba6f13cbdf4d9bd9d883bd6ba452dcb75706c7e0 | UoA-eResearch/research-hub,UoA-eResearch/research-hub,UoA-eResearch/research-hub | src/app/app.routing.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/*\nCopyright 2017 Geoloep\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/lice... | typescript | edit | 0 | 2 | apache-2.0 | 8dd865dcd58dbba9d7fb02454d9702d7e9e246c8 | geoloep/krite,geoloep/krite,geoloep/krite | src/services/window.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { InlineSyntaxNode } from './InlineSyntaxNode'\n\n\nexport abstract class RichInlineSyntaxNode implements InlineSyntaxNode {\n constructor(public children: InlineSyntaxNode[]) { }\n\n INLINE_SYNTAX_NODE(): void { }\n protected... | typescript | edit | 0 | 1 | mit | 6268ba3ecc003016d0ad9524a8f99f813fe2db2d | start/up,start/up | src/SyntaxNodes/RichInlineSyntaxNode.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/cburkert/go-statusbar/reporters/battery\"\n\t\"github.com/cburkert/go-statusbar/reporters/volume\"\n)\n\nfunc main() {\n\tstatusBar := NewStatusBar(\" | \")\n\tstatusBar.AddReporter(volume.NewVolumeRepor... | go | edit | 6 | 1 | bsd-3-clause | 47ff444d91f46b89f40edf730bd8e5dcafebc4b3 | cburkert/go-statusbar,cburkert/go-statusbar | go-statusbar.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n . \"github.com/franela/goblin\"\n\n \"errors\"\n \"testing\"\n)\n\nfunc Test(t *testing.T) {\n g := Goblin(t)\n\n g.Describe(\"Run\", func() {\n extensionError := errors.New(\"run could not determine how to ru... | go | edit | 48 | 1 | mit | aa71c88daffcf29c4a3f0038e4767508b795cc93 | nicolasmccurdy/run | run_test.go | rejected_lint | Too many lint violations: 48 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage hugolib\n\nconst Version = \"0.13-DEV\"\n\nvar (\n\tCommitHash string\n\tBuildDate string\n)\n\nvar hugoInfo *HugoInfo\n\n// HugoInfo contains information about the current Hugo environment\ntype HugoInfo struct {\n\tVersion string\... | go | edit | 0 | 1 | apache-2.0 | 9712d06b3674f5e5cd5aeef6a4be1610a393f65f | ryanclarke/hugo,mdhender/hugo,gohugoio/hugo,bramp/hugo,halostatue/hugo,ifraixedes/hugo,gohugoio/hugo,tjyang/hugo,jygastaud/hugo,mayah/hugo,kujohn/hugo,jygastaud/hugo,tischda/hugo,fedelibre/hugo,mdhender/hugo,mayah/hugo,sprig/hugo,sprig/hugo,badoet/hugo,ffrizzo/hugo,MarkDBlackwell/hugo,fhergomez/hugo,tatsushid/hugo,Mark... | hugolib/hugo.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage bowling\n\nimport \"testing\"\n\nfunc TestGutterGame(t *testing.T) {\n\tgame := new(Game)\n\n\tfor i := 0; i < 20; i++ {\n\t\tgame.Roll(0)\t\t\n\t}\n\n\tscore := game.Score()\n\n\tif score != 0 {\n\t\tt.Error(\"Gutter game:\", \"Expecte... | go | edit | 0 | 2 | mit | 1836d32c638b5630267d5a1181ffeb4fcd806e1c | jehrhardt/bowling-game-go | bowling_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage refmt_test\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\n\t\"github.com/polydawn/refmt\"\n\t\"github.com/polydawn/refmt/obj/atlas\"\n)\n\nfunc ExampleJsonEncodeDefaults() {\n\ttype MyType struct {\n\t\tX string\n\t\tY int\n\t}\n\n\tMyType_Atla... | go | edit | 0 | 1 | mit | 8395d1b1d3047459e1c4dd5e1be54d646d7a9006 | polydawn/refmt,polydawn/go-xlate,polydawn/refmt,polydawn/go-xlate | example_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage hoverfly_test\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"io/ioutil\"\n\n\t\"github.com/SpectoLabs/hoverfly/functional-tests\"\n\t\"github.com/dghubble/sling\"\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\... | go | edit | 0 | 1 | apache-2.0 | 6b7b2316b534087ffe16f53d26bcbd7aca7bd909 | SpectoLabs/hoverfly,SpectoLabs/hoverfly | functional-tests/core/ft_api_v2_simulation_schema_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2016 The Prometheus Authors\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// http://www.a... | go | edit | 0 | 2 | apache-2.0 | e63845e3ce999aad47ffe235605b2414ea853a2a | prometheus/client_golang,m3db/prometheus_client_golang | prometheus/timer.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nCopyright 2018 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.... | go | edit | 0 | 0 | apache-2.0 | 200075926154dd2b7948961008ccb841401423b5 | kubernetes-retired/cluster-registry,kubernetes-retired/cluster-registry | hack/imports.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage api\n\nimport (\n\t\"testing\"\n)\n\nfunc TestValidateConfig(t *testing.T) {\n\n\tif New().validateConfig().Error() != \"Modulepath must be set before starting the API server\" {\n\t\tt.Error(\"validateConfig should return an error when... | go | edit | 9 | 4 | apache-2.0 | a558b299a1b3a9ffdbc8d9d5160ef23963a843b7 | jolshevski/chester | api/api_test.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"net/url\"\n\n\t\"code.cloudfoundry.org/cli/cf/api/resources\"\n\t\"code.cloudfoundry.org/cli/cf/configuration/coreconfig\"\n\t\"code.cloudfoundry.org/cli/cf/models\"\n\t\"code.cloudfoundry.... | go | edit | 0 | 1 | mit | d6b06458fa84f245464f98de315f2c511b141de4 | jabley/cf-metrics | src/cf-metrics/events.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage charts\n\nimport \"bytes\"\n\ntype ChartType string\n\nconst (\n\tUnknownChart ChartType = \"UnknownChart\"\n\tSimpleBar ChartType = \"SimpleBar\"\n\tSimpleLine ChartType = \"SimpleLine\"\n)\n\ntype DataType string\n\ntype DataType... | go | edit | 0 | 4 | mit | 394ffc062d6d43234d3cac89ca728d96dfc230b1 | lucapette/deloominator,lucapette/deloominator,lucapette/deloominator | pkg/charts/detect.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/voxelbrain/pixelpixel/pixelutils\"\n\t\"time\"\n)\n\nfunc main() {\n\twall, _ := pixelutils.PixelPusher()\n\tpixel := pixelutils.NewPixel()\n\tbigPixel := pixelutils.DimensionChanger(pixel, 5*... | go | edit | 0 | 2 | mit | 837fe23ceac180bd7c61482ed2c570e89b821cda | voxelbrain/pixelpixel,voxelbrain/pixelpixel,voxelbrain/pixelpixel,voxelbrain/pixelpixel,voxelbrain/pixelpixel,voxelbrain/pixelpixel | examples/clock/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Package main is used for testing of generated 'views' listing.\n// There is no way to include a new import dynamically, thus\n// we are running this test from generate_test.go\n// as a new command using exec package.\npackage main\n\nimport ... | go | edit | 0 | 4 | bsd-2-clause | 2cc1fc5e7c6e559c184f918513de3a6e22fdf6f3 | goaltools/goal,anonx/sunplate,anonx/sunplate,goaltools/goal,goaltools/goal,anonx/sunplate | generation/testdata/listing/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage wally\n\nimport (\n\t\"io/ioutil\"\n\t\"net/http\"\n\n\trdb \"github.com/dancannon/gorethink\"\n\t\"github.com/nylar/odlaw\"\n)\n\nfunc GrabUrl(url string) ([]byte, error) {\n\tresp, err := http.Get(url)\n\tif err != nil {\n\t\treturn [... | go | edit | 0 | 4 | unlicense | 9fdf576f310d92d9465e8681ecec628628feb3ce | nylar/wally | crawl.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage goDLX\n\n// Matrix is the fundamental unit in the Algorithm X implementation\n// as described in [Knuth, Donald (2000). \"Dancing Links\". _Millenial Perspectives in Computer Science_. P159 *187*.\n// Name and size only apply to columns... | go | edit | 0 | 1 | bsd-2-clause | c635ad51c2c6a3cb4bc769255e266696d99e1a18 | jessecarl/goDLX | dance.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// 13 december 2015\n\npackage ui\n\n// #cgo LDFLAGS: -L${SRCDIR} -lui -framework CoreFoundation -lpthread\n// #include <CoreFoundation/CoreFoundation.h>\n// #include <pthread.h>\n// extern void _CFRunLoopSetCurrent(CFRunLoopRef);\n// extern pt... | go | edit | 2 | 1 | mit | 7b025499c8ed3e22019d652267c2837a1ce97a62 | robbiev/ui,ProtonMail/ui,robbiev/ui,ProtonMail/ui,robbiev/ui,ProtonMail/ui | link_darwin.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n \"testing\"\n . \"github.com/franela/goblin\"\n)\n\nfunc Test(t *testing.T) {\n g := Goblin(t)\n\n g.Describe(\"Run\", func() {\n g.Describe(\".command_for_file\", func() {\n g.Describe(\"when a filename i... | go | edit | 12 | 1 | mit | 82f02e27af822ceac64d47a4fb4ecbab42716098 | nicolasmccurdy/run | run_test.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage chuper\n\nimport (\n\t\"net/url\"\n\n\t\"github.com/PuerkitoBio/fetchbot\"\n\t\"github.com/Sirupsen/logrus\"\n)\n\ntype Context interface {\n\tCache() Cache\n\tQueue() Enqueuer\n\tLog(fields map[string]interface{}) *logrus.Entry\n\tURL(... | go | edit | 27 | 3 | bsd-3-clause | c54349985f0d3bbe56108179554d2c9a775f2036 | sluceno/chuper,oli-g/chuper | context.go | rejected_lint | Too many lint violations: 27 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n//+build linux freebsd\n\npackage glfw3\n\n//#define GLFW_EXPOSE_NATIVE_X11\n//#define GLFW_EXPOSE_NATIVE_GLX\n//#include <X11/extensions/Xrandr.h>\n//#include \"glfw/include/GLFW/glfw3.h\"\n//#include \"glfw/include/GLFW/glfw3native.h\"\nimpor... | go | edit | 18 | 1 | bsd-3-clause | efce94709ca5cce17d45f384208040ae5626b256 | go-gl/glfw,go-gl/glfw,jonbuckley33/glfw3,jonbuckley33/glfw3,james4k/glfw,james4k/glfw,gonutz/glfw,gonutz/glfw,go-gl/glfw | native_linbsd.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage prompt\n\nimport (\n\t\"github.com/AlecAivazis/survey/v2\"\n\t\"log\"\n)\n\ntype Prompt interface {\n\tConfirm(string) bool\n}\n\nfunc NewPrompt() Prompt {\n\treturn prompt{}\n}\n\ntype prompt struct{}\n\nfunc NewPromptContext(interacti... | go | edit | 6 | 3 | mit | 8423dcea8dbfcee6a54850a4920bb1c5361f848d | thoughtworks/talisman,thoughtworks/talisman | prompt/survey.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage markdown\n\nimport (\n\t\"io/ioutil\"\n\t\"path\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestParse(t *testing.T) {\n\tm := new(Markdown)\n\tfiles, _ := ioutil.ReadDir(\"./data\")\n\tfor _, f := range files {\n\t\tfileName := f.Name()\... | go | edit | 3 | 4 | mit | 0cdad7e1e28ac667836d6ce6a864ac35bf1cb204 | jaceju/go-md | markdown_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage values_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/xgfone/go-tools/values\"\n)\n\nfunc TestSlice(t *testing.T) {\n\tms := []interface{}{\"test\"}\n\tss := []interface{}{11, \"aa\", values.SMap{\"abcd\": 11, \"ok\": false, \"slice\... | go | edit | 0 | 14 | apache-2.0 | 1c8957275019664aa87bde09c4231e72bcf53099 | xgfone/go-tools | values/sm_test.go | rejected_complexity | Cyclomatic complexity too high: 14 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage appui\n\nimport (\n\t\"io\"\n\n\t\"github.com/moncho/dry/ui\"\n\t\"github.com/nsf/termbox-go\"\n)\n\n//Stream shows the content of the given stream on screen\nfunc Stream(screen *ui.Screen, stream io.ReadCloser, keyboardQueue chan termb... | go | edit | 9 | 2 | mit | 311fc9f6a227748c2607e33994106643b6e6649c | moncho/dry,moncho/dry | appui/stream.go | rejected_lint | Too many lint violations: 9 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.