-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcorpus.json
More file actions
62 lines (62 loc) · 11 KB
/
Copy pathcorpus.json
File metadata and controls
62 lines (62 loc) · 11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
[
{"text": "#!/usr/bin/env python", "code": "import sys", "position": "docstring-head", "scope": "module", "language": "python", "comment_type": "line", "kind": "Shebang"},
{"text": "#!/bin/bash", "code": "set -e", "position": "docstring-head", "scope": "module", "language": "bash", "comment_type": "line", "kind": "Shebang"},
{"text": "# noqa: E501", "code": "import os", "position": "leading", "scope": "module", "language": "python", "comment_type": "line", "kind": "LinterDirective"},
{"text": "// @ts-ignore", "code": "const x = 1;", "position": "leading", "scope": "module", "language": "typescript", "comment_type": "line", "kind": "LinterDirective"},
{"text": "# pyright: ignore", "code": "x: int = 1", "position": "leading", "scope": "module", "language": "python", "comment_type": "line", "kind": "LinterDirective"},
{"text": "// eslint-disable-next-line", "code": "const a = 1;", "position": "leading", "scope": "module", "language": "javascript", "comment_type": "line", "kind": "LinterDirective"},
{"text": "# type: ignore", "code": "from app import client", "position": "leading", "scope": "module", "language": "python", "comment_type": "line", "kind": "LinterDirective"},
{"text": "# shellcheck disable=SC2086", "code": "echo \"$flag\"", "position": "leading", "scope": "module", "language": "bash", "comment_type": "line", "kind": "LinterDirective"},
{"text": "// nolint:golint", "code": "package main", "position": "leading", "scope": "module", "language": "go", "comment_type": "line", "kind": "LinterDirective"},
{"text": "// clippy::too_many_arguments", "code": "pub fn configure() {}", "position": "leading", "scope": "module", "language": "rust", "comment_type": "line", "kind": "LinterDirective"},
{"text": "/* istanbul ignore next */", "code": "module.exports = api;", "position": "leading", "scope": "module", "language": "javascript", "comment_type": "block", "kind": "LinterDirective"},
{"text": "// SPDX-License-Identifier: MIT", "code": "package main", "position": "docstring-head", "scope": "module", "language": "go", "comment_type": "line", "kind": "LicenseHeader"},
{"text": "// Copyright (c) 2024 Example Corp. All rights reserved.", "code": "package main", "position": "docstring-head", "scope": "module", "language": "go", "comment_type": "line", "kind": "LicenseHeader"},
{"text": "# given", "code": "import pytest", "position": "leading", "scope": "module", "language": "python", "comment_type": "line", "kind": "BddStep"},
{"text": "// when & then", "code": "package main", "position": "leading", "scope": "module", "language": "go", "comment_type": "line", "kind": "BddStep"},
{"text": "// workaround: the SDK panics on empty input", "code": "pub fn decode(raw: &str) -> Result<()> { Ok(()) }", "position": "leading", "scope": "module", "language": "rust", "comment_type": "line", "kind": "NonObviousIntent"},
{"text": "// Why: the offset is 1-based, not 0-based", "code": "package main", "position": "leading", "scope": "module", "language": "go", "comment_type": "line", "kind": "NonObviousIntent"},
{"text": "# because SQLite locks the whole file, batch the writes", "code": "for chunk in chunks:", "position": "leading", "scope": "module", "language": "python", "comment_type": "line", "kind": "NonObviousIntent"},
{"text": "// to avoid the TOCTOU race, open before checking", "code": "pub fn open(path: &str) -> Result<File> { Ok(File::open(path)?) }", "position": "leading", "scope": "module", "language": "rust", "comment_type": "line", "kind": "NonObviousIntent"},
{"text": "# !NOTE: keep 8MB below 32-bit overflow", "code": "size = 8 * 1024 * 1024", "position": "leading", "scope": "module", "language": "python", "comment_type": "line", "kind": "NonObviousIntent"},
{"text": "// @author Jane Doe", "code": "pub fn main() {}", "position": "leading", "scope": "module", "language": "rust", "comment_type": "line", "kind": "Attribution"},
{"text": "// ref: https://github.com/systemfsoftware/comment-checker", "code": "func main() {}", "position": "leading", "scope": "module", "language": "go", "comment_type": "line", "kind": "Attribution"},
{"text": "\"\"\"Fetches a user.\n Args:\n id: the user id.\n \"\"\"", "code": "return fetch_user(user_id)", "position": "docstring-head", "scope": "function", "language": "python", "comment_type": "docstring", "kind": "PublicApiDoc"},
{"text": "/**\n * @param {string} name\n * @returns {number}\n */", "code": "function add(a, b) { return a + b; }", "position": "leading", "scope": "function", "language": "javascript", "comment_type": "docstring", "kind": "PublicApiDoc"},
{"text": "/** Returns the sum.\n * @param a first addend\n * @return a+b\n */", "code": "int add(int a, int b) { return a + b; }", "position": "docstring-head", "scope": "function", "language": "java", "comment_type": "docstring", "kind": "PublicApiDoc"},
{"text": "// THIS FILE IS AUTO-GENERATED - DO NOT EDIT", "code": "package main", "position": "docstring-head", "scope": "module", "language": "go", "comment_type": "line", "kind": "GeneratedFile"},
{"text": "// adds one to one", "code": "let x = x + 1;", "position": "leading", "scope": "module", "language": "rust", "comment_type": "line", "kind": "RestatesCode"},
{"text": "// this will be true", "code": "let enabled = true;", "position": "leading", "scope": "module", "language": "rust", "comment_type": "line", "kind": "RestatesCode"},
{"text": "# Send a notification", "code": "send_notification(recipient, subject)", "position": "leading", "scope": "module", "language": "python", "comment_type": "line", "kind": "RestatesCode"},
{"text": "## Returns the square of x", "code": "def square(x) = x * x", "position": "leading", "scope": "module", "language": "ruby", "comment_type": "line", "kind": "RestatesCode"},
{"text": "# section: argument parsing helpers", "code": "def parse_args():", "position": "leading", "scope": "module", "language": "python", "comment_type": "line", "kind": "RestatesCode"},
{"text": "\"\"\"This is a module docstring.\"\"\"", "code": "import os", "position": "docstring-head", "scope": "module", "language": "python", "comment_type": "docstring", "kind": "RestatesCode"},
{"text": "\"\"\"Fetch the user.\"\"\"", "code": "return fetch_user(user_id)", "position": "docstring-head", "scope": "function", "language": "python", "comment_type": "docstring", "kind": "RestatesCode"},
{"text": "// fmt.Println(\"debug\")", "code": "func main() {}", "position": "leading", "scope": "module", "language": "go", "comment_type": "line", "kind": "CommentedOutCode"},
{"text": "# print(x) # debug", "code": "total = 0", "position": "leading", "scope": "module", "language": "python", "comment_type": "line", "kind": "CommentedOutCode"},
{"text": "// x = x + 1", "code": "var x int", "position": "leading", "scope": "module", "language": "go", "comment_type": "line", "kind": "CommentedOutCode"},
{"text": "// TODO: FIX THIS", "code": "func main() {}", "position": "leading", "scope": "module", "language": "go", "comment_type": "line", "kind": "VacuousTodo"},
{"text": "// TODO: fix this later", "code": "func main() {}", "position": "leading", "scope": "module", "language": "go", "comment_type": "line", "kind": "VacuousTodo"},
{"text": "# TODO: handle the empty-list edge case", "code": "def process(items):", "position": "leading", "scope": "module", "language": "python", "comment_type": "line", "kind": "VacuousTodo"},
{"text": "// FIXME: crashes on Windows paths", "code": "pub fn read() {}", "position": "leading", "scope": "module", "language": "rust", "comment_type": "line", "kind": "VacuousTodo"},
{"text": "// Changed from old_value to new_value", "code": "func main() {}", "position": "leading", "scope": "module", "language": "go", "comment_type": "line", "kind": "AgentMemo"},
{"text": "# Modified to use new implementation", "code": "def render():", "position": "leading", "scope": "module", "language": "python", "comment_type": "line", "kind": "AgentMemo"},
{"text": "// Updated from v1 to v2", "code": "func main() {}", "position": "leading", "scope": "module", "language": "go", "comment_type": "line", "kind": "AgentMemo"},
{"text": "// Refactored for better performance", "code": "func main() {}", "position": "leading", "scope": "module", "language": "go", "comment_type": "line", "kind": "AgentMemo"},
{"text": "// Added new validation logic", "code": "func main() {}", "position": "leading", "scope": "module", "language": "go", "comment_type": "line", "kind": "AgentMemo"},
{"text": "// Removed deprecated function", "code": "func main() {}", "position": "leading", "scope": "module", "language": "go", "comment_type": "line", "kind": "AgentMemo"},
{"text": "// Implemented new feature", "code": "func main() {}", "position": "leading", "scope": "module", "language": "go", "comment_type": "line", "kind": "AgentMemo"},
{"text": "// This is a comment", "code": "const total = 42;", "position": "leading", "scope": "module", "language": "javascript", "comment_type": "line", "kind": "RestatesCode"},
{"text": "// This is a Go comment", "code": "package main", "position": "leading", "scope": "module", "language": "go", "comment_type": "line", "kind": "RestatesCode"},
{"text": "/* This is a block comment */", "code": "const x = 1;", "position": "leading", "scope": "module", "language": "typescript", "comment_type": "block", "kind": "RestatesCode"},
{"text": "// counter", "code": "counter += 1;", "position": "leading", "scope": "module", "language": "rust", "comment_type": "line", "kind": "RestatesCode"},
{"text": "// increment the counter", "code": "counter += 1;", "position": "leading", "scope": "module", "language": "rust", "comment_type": "line", "kind": "RestatesCode"},
{"text": "// returns the user", "code": "pub fn user(id: u64) -> User", "position": "leading", "scope": "module", "language": "rust", "comment_type": "line", "kind": "RestatesCode"},
{"text": "# increments the counter", "code": "counter += 1", "position": "inline", "scope": "module", "language": "python", "comment_type": "line", "kind": "RestatesCode"},
{"text": "# throttle to avoid the rate limit", "code": "sleep(delay)", "position": "leading", "scope": "module", "language": "python", "comment_type": "line", "kind": "NonObviousIntent"},
{"text": "# Returns: the user", "code": "def user(id); end", "position": "leading", "scope": "module", "language": "ruby", "comment_type": "line", "kind": "PublicApiDoc"},
{"text": "# loop the result", "code": "print(\"for the win\")", "position": "leading", "scope": "module", "language": "python", "comment_type": "line", "kind": "RestatesCode"},
{"text": "# loop over each item", "code": "for item in items: dispatch(item)", "position": "leading", "scope": "function", "language": "python", "comment_type": "line", "kind": "NarratesControlFlow"},
{"text": "# iterate the results", "code": "for result in results: emit(result)", "position": "leading", "scope": "function", "language": "python", "comment_type": "line", "kind": "NarratesControlFlow"},
{"text": "# retry the loop to avoid the rate limit", "code": "for attempt in attempts: send(request)", "position": "leading", "scope": "function", "language": "python", "comment_type": "line", "kind": "NonObviousIntent"}
]