1"use strict";(self.webpackChunkrewrite_docs=self.webpackChunkrewrite_docs||[]).push([["10700"],{33638:function(e,r,s){s.r(r),s.d(r,{frontMatter:()=>h,toc:()=>u,default:()=>j,metadata:()=>t,assets:()=>p,contentTitle:()=>o});var t=JSON.parse('{"id":"recipes/picnic/errorprone/refasterrules/assortedrulesrecipes","title":"`AssortedRules` Refaster recipes","description":"tech.picnic.errorprone.refasterrules.AssortedRulesRecipes","source":"@site/docs/recipes/picnic/errorprone/refasterrules/assortedrulesrecipes.md","sourceDirName":"recipes/picnic/errorprone/refasterrules","slug":"/recipes/picnic/errorprone/refasterrules/assortedrulesrecipes","permalink":"/recipes/picnic/errorprone/refasterrules/assortedrulesrecipes","draft":false,"unlisted":false,"editUrl":"https://github.com/openrewrite/rewrite-docs/edit/master/docs/recipes/picnic/errorprone/refasterrules/assortedrulesrecipes.md","tags":[],"version":"current","frontMatter":{"title":"`AssortedRules` Refaster recipes","sidebar_label":"`AssortedRules` Refaster recipes"},"sidebar":"docs","previous":{"title":"Refaster template `AssortedRules.StreamGenerate`","permalink":"/recipes/picnic/errorprone/refasterrules/assortedrulesrecipes$streamgeneraterecipe"},"next":{"title":"Refaster template `BigDecimalRules.BigDecimalOne`","permalink":"/recipes/picnic/errorprone/refasterrules/bigdecimalrulesrecipes$bigdecimalonerecipe"}}'),i=s(74848),c=s(84429),n=s(84109),l=s(93703),a=s(70440),d=s(48416);let h={title:"`AssortedRules` Refaster recipes",sidebar_label:"`AssortedRules` Refaster recipes"},o="AssortedRules Refaster recipes",p={},u=[{value:"Recipe source",id:"recipe-source",level:2},{value:"Definition",id:"definition",level:2},{value:"Used by",id:"used-by",level:2},{value:"Usage",id:"usage",level:2},{value:"See how this recipe works across multiple open-source repositories",id:"see-how-this-recipe-works-across-multiple-open-source-repositories",level:2},{value:"Data Tables",id:"data-tables",level:2},{value:"Source files that had results",id:"source-files-that-had-results",level:3},{value:"Source files that had search results",id:"source-files-that-had-search-results",level:3},{value:"Source files that errored on a recipe",id:"source-files-that-errored-on-a-recipe",level:3},{value:"Recipe performance",id:"recipe-performance",level:3}];function x(e){let r={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,c.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.header,{children:(0,i.jsxs)(r.h1,{id:"assortedrules-refaster-recipes",children:[(0,i.jsx)(r.code,{children:"AssortedRules"})," Refaster recipes"]})}),"\n",(0,i.jsx)(r.p,{children:(0,i.jsx)(r.strong,{children:"tech.picnic.errorprone.refasterrules.AssortedRulesRecipes"})}),"\n",(0,i.jsx)(r.p,{children:(0,i.jsxs)(r.em,{children:["Assorted Refaster rules that do not (yet) belong in one of the other classes with more topical Refaster rules. ",(0,i.jsx)(r.a,{href:"https://error-prone.picnic.tech/refasterrules/AssortedRules",children:"Source"}),"."]})}),"\n",(0,i.jsx)(r.h2,{id:"recipe-source",children:"Recipe source"}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.a,{href:"https://github.com/search?type=code&q=tech.picnic.errorprone.refasterrules.AssortedRulesRecipes",children:"GitHub: search?type=code&q=tech.picnic.errorprone.refasterrules.AssortedRulesRecipes"}),",\n",(0,i.jsx)(r.a,{href:"https://github.com/openrewrite/rewrite-third-party/issues",children:"Issue Tracker"}),",\n",(0,i.jsx)(r.a,{href:"https://artifacts.codegenomeproject.org/maven/org/openrewrite/recipe/rewrite-third-party/",children:"Code Genome Project"})]}),"\n",(0,i.jsx)(r.admonition,{type:"info",children:(0,i.jsx)(r.p,{children:"This recipe is composed of more than one recipe. If you want to customize the set of recipes this is composed of, you can find and copy the GitHub source for the recipe from the link above."})}),"\n",(0,i.jsxs)(r.p,{children:["This recipe is available under the ",(0,i.jsx)(r.a,{href:"https://www.apache.org/licenses/LICENSE-2.0",children:"Apache License Version 2.0"}),"."]}),"\n",(0,i.jsx)(r.h2,{id:"definition",children:"Definition"}),"\n",(0,i.jsxs)(n.A,{groupId:"recipeType",children:[(0,i.jsx)(l.A,{value:"recipe-list",label:"Recipe List",children:(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsx)(r.li,{children:(0,i.jsxs)(r.a,{href:"../../../picnic/errorprone/refasterrules/assortedrulesrecipes$checkindexexpressionrecipe",children:["Refaster template ",(0,i.jsx)(r.code,{children:"AssortedRules.CheckIndexExpression"})]})}),"\n",(0,i.jsx)(r.li,{children:(0,i.jsxs)(r.a,{href:"../../../picnic/errorprone/refasterrules/assortedrulesrecipes$iteratorsgetnextrecipe",children:["Refaster template ",(0,i.jsx)(r.code,{children:"AssortedRules.IteratorsGetNext"})]})}),"\n",(0,i.jsx)(r.li,{children:(0,i.jsxs)(r.a,{href:"../../../picnic/errorprone/refasterrules/assortedrulesrecipes$orrecipe",children:["Refaster template ",(0,i.jsx)(r.code,{children:"AssortedRules.Or"})]})}),"\n",(0,i.jsx)(r.li,{children:(0,i.jsxs)(r.a,{href:"../../../picnic/errorprone/refasterrules/assortedrulesrecipes$streamgeneraterecipe",children:["Refaster template ",(0,i.jsx)(r.code,{children:"AssortedRules.StreamGenerate"})]})}),"\n",(0,i.jsx)(r.li,{children:(0,i.jsxs)(r.a,{href:"../../../picnic/errorprone/refasterrules/assortedrulesrecipes$iterablesisemptyrecipe",children:["Refaster template ",(0,i.jsx)(r.code,{children:"AssortedRules.IterablesIsEmpty"})]})}),"\n",(0,i.jsx)(r.li,{children:(0,i.jsxs)(r.a,{href:"../../../picnic/errorprone/refasterrules/assortedrulesrecipes$splittersplittostreamrecipe",children:["Refaster template ",(0,i.jsx)(r.code,{children:"AssortedRules.SplitterSplitToStream"})]})}),"\n"]})}),(0,i.jsx)(l.A,{value:"yaml-recipe-list",label:"Yaml Recipe List",children:(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-yaml",children:"---\ntype: specs.openrewrite.org/v1beta/recipe\nname: tech.picnic.errorprone.refasterrules.AssortedRulesRecipes\ndisplayName: `AssortedRules` Refaster recipes\ndescription: |\n Assorted Refaster rules that do not (yet) belong in one of the other classes with more topical Refaster rules. [Source](https://error-prone.picnic.tech/refasterrules/AssortedRules).\nrecipeList:\n - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$CheckIndexExpressionRecipe\n - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$IteratorsGetNextRecipe\n - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$OrRecipe\n - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$StreamGenerateRecipe\n - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$IterablesIsEmptyRecipe\n - tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$SplitterSplitToStreamRecipe\n\n"})})})]}),"\n",(0,i.jsx)(r.h2,{id:"used-by",children:"Used by"}),"\n",(0,i.jsx)(r.p,{children:"This recipe is used as part of the following composite recipes:"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsx)(r.li,{children:(0,i.jsx)(r.a,{href:"/recipes/picnic/errorprone/refasterrules/allrefasterrules",children:"All Picnic Refaster rules"})}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,i.jsx)(a.A,{recipeName:"tech.picnic.errorprone.refasterrules.AssortedRulesRecipes",displayName:"`AssortedRules` Refaster recipes",groupId:"org.openrewrite.recipe",artifactId:"rewrite-third-party",versionKey:"VERSION_ORG_OPENREWRITE_RECIPE_REWRITE_THIRD_PARTY",hasDataTables:!0}),"\n",(0,i.jsx)(r.h2,{id:"see-how-this-recipe-works-across-multiple-open-source-repositories",children:"See how this recipe works across multiple open-source repositories"}
1),"\n","\n",(0,i.jsx)(d.A,{link:"https://app.moderne.io/recipes/tech.picnic.errorprone.refasterrules.AssortedRulesRecipes"}),"\n",(0,i.jsx)(r.p,{children:"The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories."}),"\n",(0,i.jsxs)(r.p,{children:["Please ",(0,i.jsx)(r.a,{href:"https://moderne.io/product",children:"contact Moderne"})," for more information about safely running the recipes on your own codebase in a private SaaS."]}),"\n",(0,i.jsx)(r.h2,{id:"data-tables",children:"Data Tables"}),"\n",(0,i.jsxs)(n.A,{groupId:"data-tables",children:[(0,i.jsxs)(l.A,{value:"org.openrewrite.table.SourcesFileResults",label:"SourcesFileResults",children:[(0,i.jsx)(r.h3,{id:"source-files-that-had-results",children:"Source files that had results"}),(0,i.jsx)(r.p,{children:(0,i.jsx)(r.strong,{children:"org.openrewrite.table.SourcesFileResults"})}),(0,i.jsx)(r.p,{children:(0,i.jsx)(r.em,{children:"Source files that were modified by the recipe run."})}),(0,i.jsxs)(r.table,{children:[(0,i.jsx)(r.thead,{children:(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.th,{children:"Column Name"}),(0,i.jsx)(r.th,{children:"Description"})]})}),(0,i.jsxs)(r.tbody,{children:[(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Source path before the run"}),(0,i.jsxs)(r.td,{children:["The source path of the file before the run. ",(0,i.jsx)(r.code,{children:"null"})," when a source file was created during the run."]})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Source path after the run"}),(0,i.jsxs)(r.td,{children:["A recipe may modify the source path. This is the path after the run. ",(0,i.jsx)(r.code,{children:"null"})," when a source file was deleted during the run."]})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Parent of the recipe that made changes"}),(0,i.jsx)(r.td,{children:"In a hierarchical recipe, the parent of the recipe that made a change. Empty if this is the root of a hierarchy or if the recipe is not hierarchical at all."})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Recipe that made changes"}),(0,i.jsx)(r.td,{children:"The specific recipe that made a change."})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Estimated time saving"}),(0,i.jsx)(r.td,{children:"An estimated effort that a developer to fix manually instead of using this recipe, in unit of seconds."})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Cycle"}),(0,i.jsx)(r.td,{children:"The recipe cycle in which the change was made."})]})]})]})]}),(0,i.jsxs)(l.A,{value:"org.openrewrite.table.SearchResults",label:"SearchResults",children:[(0,i.jsx)(r.h3,{id:"source-files-that-had-search-results",children:"Source files that had search results"}),(0,i.jsx)(r.p,{children:(0,i.jsx)(r.strong,{children:"org.openrewrite.table.SearchResults"})}),(0,i.jsx)(r.p,{children:(0,i.jsx)(r.em,{children:"Search results that were found during the recipe run."})}),(0,i.jsxs)(r.table,{children:[(0,i.jsx)(r.thead,{children:(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.th,{children:"Column Name"}),(0,i.jsx)(r.th,{children:"Description"})]})}),(0,i.jsxs)(r.tbody,{children:[(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Source path of search result before the run"}),(0,i.jsx)(r.td,{children:"The source path of the file with the search result markers present."})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Source path of search result after run the run"}),(0,i.jsxs)(r.td,{children:["A recipe may modify the source path. This is the path after the run. ",(0,i.jsx)(r.code,{children:"null"})," when a source file was deleted during the run."]})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Result"}),(0,i.jsx)(r.td,{children:"The trimmed printed tree of the LST element that the marker is attached to."})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Description"}),(0,i.jsx)(r.td,{children:"The content of the description of the marker."})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Recipe that added the search marker"}),(0,i.jsx)(r.td,{children:"The specific recipe that added the Search marker."})]})]})]})]}),(0,i.jsxs)(l.A,{value:"org.openrewrite.table.SourcesFileErrors",label:"SourcesFileErrors",children:[(0,i.jsx)(r.h3,{id:"source-files-that-errored-on-a-recipe",children:"Source files that errored on a recipe"}),(0,i.jsx)(r.p,{children:(0,i.jsx)(r.strong,{children:"org.openrewrite.table.SourcesFileErrors"})}),(0,i.jsx)(r.p,{children:(0,i.jsx)(r.em,{children:"The details of all errors produced by a re
1cipe run."})}),(0,i.jsxs)(r.table,{children:[(0,i.jsx)(r.thead,{children:(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.th,{children:"Column Name"}),(0,i.jsx)(r.th,{children:"Description"})]})}),(0,i.jsxs)(r.tbody,{children:[(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Source path"}),(0,i.jsx)(r.td,{children:"The file that failed to parse."})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Recipe that made changes"}),(0,i.jsx)(r.td,{children:"The specific recipe that made a change."})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Stack trace"}),(0,i.jsx)(r.td,{children:"The stack trace of the failure."})]})]})]})]}),(0,i.jsxs)(l.A,{value:"org.openrewrite.table.RecipeRunStats",label:"RecipeRunStats",children:[(0,i.jsx)(r.h3,{id:"recipe-performance",children:"Recipe performance"}),(0,i.jsx)(r.p,{children:(0,i.jsx)(r.strong,{children:"org.openrewrite.table.RecipeRunStats"})}),(0,i.jsx)(r.p,{children:(0,i.jsx)(r.em,{children:"Statistics used in analyzing the performance of recipes."})}),(0,i.jsxs)(r.table,{children:[(0,i.jsx)(r.thead,{children:(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.th,{children:"Column Name"}),(0,i.jsx)(r.th,{children:"Description"})]})}),(0,i.jsxs)(r.tbody,{children:[(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"The recipe"}),(0,i.jsx)(r.td,{children:"The recipe whose stats are being measured both individually and cumulatively."})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Source file count"}),(0,i.jsx)(r.td,{children:"The number of source files the recipe ran over."})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Source file changed count"}),(0,i.jsx)(r.td,{children:"The number of source files which were changed in the recipe run. Includes files created, deleted, and edited."})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Cumulative scanning time (ns)"}),(0,i.jsx)(r.td,{children:"The total time spent across the scanning phase of this recipe."})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Max scanning time (ns)"}),(0,i.jsx)(r.td,{children:"The max time scanning any one source file."})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Cumulative edit time (ns)"}),(0,i.jsx)(r.td,{children:"The total time spent across the editing phase of this recipe."})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"Max edit time (ns)"}),(0,i.jsx)(r.td,{children:"The max time editing any one source file."})]})]})]})]})]})]})}function j(e={}){let{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(x,{...e})}):x(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.