1"use strict";(self.webpackChunklasso=self.webpackChunklasso||[]).push([[6106],{4645:(e,n,t)=>{t.d(n,{Iz:()=>o,OW:()=>r,il:()=>s,jb:()=>a,w3:()=>i});class a{}class s{}class i{}class o{}class r{}},5574:(e,n,t)=>{t.d(n,{l:()=>A});t(96540);var a=t(57156),s=t(34069),i=t(82007),o=t(44744),r=t(18653),l=t(25292),c=t(33551),m=t(55281),p=t(71543),d=t(58968),u=t(87324),h=t(49037),f=t(64263),g=t(75865),v=t(36941),y=t(58069),b=t(74848);const x={m_static_line_td:"Lines",m_static_loc_td:"LOC",m_static_methods_td:"Methods",m_static_complexity_td:"Complexity"},A=e=>{let{snippet:n}=e;return(0,b.jsxs)(a.A,{variant:"outlined",sx:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,b.jsx)(s.A,{avatar:(0,b.jsx)(g.A,{color:"primary"}),title:(0,b.jsxs)(i.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,b.jsx)("span",{children:n.name}),(0,b.jsx)(o.A,{label:n.docType?.toUpperCase()??n.unitType,size:"small",color:"secondary"})]}),subheader:(0,b.jsxs)(i.A,{direction:"row",spacing:1,children:[(0,b.jsx)(o.A,{icon:(0,b.jsx)(f.A,{}),size:"small",label:n.packagename}),(0,b.jsx)(o.A,{icon:(0,b.jsx)(u.A,{}),size:"small",color:"primary",label:n.groupId+":"+n.artifactId}),(0,b.jsx)(o.A,{size:"small",label:n.version})]}),action:(0,b.jsx)(r.A,{title:`Lucene Score: ${n.score.toFixed(2)}`,children:(0,b.jsx)(o.A,{icon:(0,b.jsx)(h.A,{fontSize:"small"}),color:"success",size:"small",label:n.score.toFixed(1)})})}),(0,b.jsxs)(l.A,{sx:{flexGrow:1,pt:0},children:[n.metaData?.meta_description_s?.length?(0,b.jsxs)(c.A,{variant:"body2",sx:{mb:1},children:[(0,b.jsx)(v.A,{fontSize:"inherit",sx:{mr:.5,verticalAlign:"middle"}}),n.metaData.meta_description_s[0]]}):null,n.metaData?.meta_url_s?.length?(0,b.jsx)(c.A,{variant:"caption",component:"div",sx:{mb:1},children:(0,b.jsx)(m.A,{href:n.metaData.meta_url_s[0],target:"_blank",rel:"noopener",children:n.metaData.meta_url_s[0]})}):null,(0,b.jsx)(c.A,{variant:"subtitle2",sx:{mt:1},children:"Signature (LQL):"}),(0,b.jsx)(y.A,{language:"java",children:n.lql?n.lql:"n/a"}),(0,b.jsx)(p.A,{sx:{my:1}}),(0,b.jsx)(i.A,{direction:"row",spacing:1,sx:{mb:2},children:Object.entries(x).map((e=>{let[t,a]=e;return void 0!==n.measures?.[t]&&(0,b.jsx)(o.A,{label:`${a}: ${n.measures[t]}`,color:"default",size:"small"},t)}))}),(0,b.jsx)(c.A,{variant:"subtitle2",sx:{mb:.5},children:"Source:"}),(0,b.jsx)(d.A,{sx:{maxHeight:350,overflow:"auto"},children:(0,b.jsx)(y.A,{language:"java",showLineNumbers:!0,children:n.content?n.content:"n/a"})}),(0,b.jsxs)(c.A,{variant:"caption",color:"text.secondary",sx:{mt:1,display:"block"},children:["ID: ",n.id," (Data Source: ",n.dataSource,")"]})]})]})}},12618:(e,n,t)=>{t.r(n),t.d(n,{default:()=>P});var a=t(96540),s=t(33551),i=t(26132),o=t(1489),r=t(43581),l=t(206),c=t(44939),m=t(82007),p=t(55281),d=t(63051),u=t(46831),h=t(28968),f=t(3246),g=t(28820),v=t(36870),y=t(37211),b=t(82241),x=t(15993),A=t(6106),j=t(68125),S=t(4645),w=t(60572),E=t(5574),k=t(27143),O=t(60438),C=t(42184),_=t(35090),q=t(71961),M=t(74848);const P=()=>{let e="",n="",t="",P="",T={};if("undefined"!=typeof window){const a=new URLSearchParams(window.location.search);e=a.get("filter")??"",n=a.get("query")??"",t=a.get("ds")??"",P=a.get("example")??"",e.split(",").forEach((e=>{const[n,t]=e.split(":");n&&t&&(T[n]=t)})),console.log(n),console.log(t),console.log(T),console.log(P)}const[L,D]=(0,a.useState)(n),[B,I]=(0,a.useState)(t||"mavenCentral2023"),[G,N]=(0,a.useState)(T),[H,z]=(0,a.useState)(P),[U,$]=(0,a.useState)(n||""),[R,J]=(0,a.useState)([]),[W,K]=(0,a.useState)(!1),[Q,V]=(0,a.useState)(!1),[F,X]=(0,a.useState)(1),[Z,Y]=(0,a.useState)(0),[ee,ne]=(0,a.useState)(!1),[te,ae]=(0,a.useState)([]),[se,ie]=(0,a.useState)(!1),oe=()=>ne(!1),re=async()=>{let e=new S.Iz;e.lql=U,e.filters=Object.entries(G).map((e=>{let[n,t]=e;return`${n}:${t}`})),e.strategy="class-simple";let n=B,t=new S.w3;t.query=e.lql,t.filters=e.filters,t.strategy=e.strategy,t.start=0,t.rows=100,K(!0),V(!0),X(1),console.log(JSON.stringify(t)),await _.A.loginDefault().then((e=>{console.log("Successfully logged in")}),(e=>{e.response&&e.response.data&&e.response.data.message||e.message||e.toString();console.log("Login attempt failed "+e)})),await w.A.queryImplementationsForDataSource(n,t).then((e=>{let n=e.data;Y(n.total);const t=(e=>{const n=Array.from(Object.values(e));n.sort(((e,n)=>e.score>n.score?-1:n.score>e.score?1:0));for(let[t,a]of n.entries());return n})(n.implementations);J(t),K(!1)}),(e=>{e.response&&e.response.data&&e.response.data.message||e.message||e.toString();console.log("query attempt failed "+e),K(!1)}))},le=Math.ceil(R.length/10),ce=R.slice(10*(F-1),10*F),me=(e,n)=>{X(n),window.scrollTo({top:0,behavior:"smooth"})};return(0,a.useEffect)((()=>
1{if(L&&re(),H){console.log("example "+H);const e=C.H.MAP[H];$(e.lql)}}),[]),(0,M.jsxs)(O.A,{children:[(0,M.jsxs)(k.A,{children:[(0,M.jsx)("title",{children:"Interface-driven Code Search"}),(0,M.jsx)("meta",{name:"description",content:"Interface-driven Code Search"})]}),(0,M.jsxs)(s.A,{sx:{margin:2},variant:"h5",component:"div",children:["Interface-driven Code Search",(0,M.jsx)(s.A,{variant:"h6",component:"div",children:"Interface-driven Code Search (Code Index: Snapshot of Maven Central)"})]}),(0,M.jsxs)(i.A,{maxWidth:"md",sx:{mt:4},children:[(0,M.jsxs)(o.Ay,{container:!0,spacing:2,alignItems:"center",justifyContent:"center",children:[(0,M.jsx)(o.Ay,{item:!0,xs:10,sm:8,children:(0,M.jsx)(r.A,{fullWidth:!0,variant:"outlined",placeholder:"Search code\u2026",value:U,onChange:e=>$(e.target.value),size:"small",multiline:!0,InputProps:{startAdornment:(0,M.jsx)(l.A,{position:"start",children:(0,M.jsx)(j.A,{color:"action"})})},onKeyPress:e=>{"Enter"===e.key&&re()}})}),(0,M.jsx)(o.Ay,{item:!0,children:(0,M.jsx)(c.A,{variant:"contained",color:"primary",onClick:re,disabled:W||!U.trim(),startIcon:(0,M.jsx)(j.A,{}),children:"Search"})}),(0,M.jsx)(o.Ay,{item:!0,children:(0,M.jsxs)(c.A,{variant:"outlined",color:"secondary",onClick:async()=>{ne(!0),ie(!0);try{const e=(await w.A.getDataSources()).data.dataSources,n=Object.values(e);ae(n)}catch(e){ae([])}ie(!1)},endIcon:(0,M.jsx)(q.A,{}),children:["Datasource: ",B]})}),(0,M.jsx)(o.Ay,{item:!0,children:(0,M.jsxs)(m.A,{direction:"row",spacing:1,alignItems:"center",sx:{mt:1,mb:3},children:[(0,M.jsxs)(s.A,{variant:"body2",color:"text.secondary",children:["Learn more about the ",(0,M.jsx)("b",{children:"LQL Query Language"}),":"]}),(0,M.jsx)(p.A,{href:"/web/docs/datastructures/lql",target:"_blank",rel:"noopener",underline:"hover",children:"Documentation"})]})})]}),(0,M.jsxs)(d.A,{open:ee,onClose:oe,fullWidth:!0,children:[(0,M.jsx)(u.A,{children:"Select a Datasource"}),(0,M.jsx)(h.A,{dividers:!0,children:se?(0,M.jsx)(f.A,{}):(0,M.jsxs)(g.A,{children:[te.map((e=>(0,M.jsx)(v.Ay,{disablePadding:!0,children:(0,M.jsx)(y.A,{onClick:()=>{return n=e.id,I(n),void ne(!1);var n},children:(0,M.jsx)(b.A,{primary:e.name,secondary:e.description,style:e.id===B?{fontWeight:"bold"}:{}})})},e.id))),0===te.length&&(0,M.jsx)(s.A,{color:"text.secondary",children:"No datasources found."})]})}),(0,M.jsx)(x.A,{children:(0,M.jsx)(c.A,{onClick:oe,color:"primary",children:"Close"})})]}),(0,M.jsxs)("div",{style:{minHeight:320,marginTop:40},children:[!W&&Q&&Z>0&&(0,M.jsxs)(s.A,{variant:"body2",color:"text.secondary",sx:{mb:2},children:[Z," result",1===Z?"":"s"," found"]}),!W&&R.length>10&&(0,M.jsx)(m.A,{alignItems:"center",sx:{mt:4},children:(0,M.jsx)(A.A,{count:le,page:F,onChange:me,color:"primary",shape:"rounded"})}),W&&(0,M.jsx)(f.A,{}),!W&&Q&&0===R.length&&(0,M.jsx)(s.A,{color:"text.secondary",align:"center",children:"No results found. Try a different query."}),(0,M.jsx)(o.Ay,{container:!0,spacing:3,sx:{mt:1},children:ce.map((e=>(0,M.jsx)(o.Ay,{item:!0,xs:12,children:(0,M.jsx)(E.l,{snippet:e})},e.id)))}),!W&&R.length>10&&(0,M.jsx)(m.A,{alignItems:"center",sx:{mt:4},children:(0,M.jsx)(A.A,{count:le,page:F,onChange:me,color:"primary",shape:"rounded"})})]})]}),(0,M.jsx)("br",{})]})}},35090:(e,n,t)=>{t.d(n,{A:()=>r});var a=t(94335);const s=t(60572).A.API_URL,i=(e,n)=>a.A.post(s+"auth/signin",{username:e,password:n}).then((e=>(e.data.token&&localStorage.setItem("user",JSON.stringify(e.data)),e.data))),o=()=>JSON.parse(localStorage.getItem("user")||"{}"),r={register:(e,n,t)=>a.A.post(s+"auth/signup",{username:e,email:n,password:t}),login:i,loginDefault:()=>i("lasso","lasso"),logout:()=>{localStorage.removeItem("user")},getCurrentUser:o,isLoggedIn:()=>!!o()?.username}},42184:(e,n,t)=>{t.d(n,{H:()=>a,z:()=>s});class a{static MAP={BASE64:{label:"Base64",lql:"Base64 {\n encode(byte[])->byte[]\n decode(java.lang.String)->byte[]\n}",sheets:[{name:"testEncode",signature:"()",body:'{"cells": {"A1": {}, "B1": "create", "C1": "Base64"}}\n{"cells": {"A2": "\\"SGVsbG8gV29ybGQh\\".getBytes()", "B2": "encode", "C2": "A1", "D2": "\\"Hello World!\\".getBytes()"}}',invocations:[]}]},BASE64_PARAMETERIZED:{label:"Base64 (Parameterized Sheets)",lql:"Base64 {\n encode(byte[])->byte[]\n decode(java.lang.String)->byte[]\n}",sheets:[{name:"testEncode",signature:"(p1=byte[], p2=byte[])",body:'{"cells":{"A1":{},"B1":"create","C1":"Base64"}}\n{"cells":{"A2":"?p2","B2":"encode","C2":"A1","D2":"?p1"}}',invocations:[{id:0,sequenceSheetName:"testEncode",signature:"",params:['"Hello World!".getBytes()','"SGVsbG8gV29ybGQh".getBytes()']},{id:1,sequenceSheetName:"testEncode",signature:"",params:['"Hello World".getBytes()','"SGVsbG8gV29ybGQ=".getBytes()']}]}]},STACK:{label:"Stack",lql:"Stack{\n push(java.lang.Object)->java.lang.Object\n pop()->java.lang.Object\n peek()->java.lang.Object\n size()->int\n}",sheets:[{name:"testPush",signature:"()",body:'{"cells":{"A1":{},"B1":"create","C1":"Stack"}}\n{"cells":{"A2":{},"B2":"push","C2":"A1","D2":"\\"Hello World!\\""}}\n{"cells":{"A3":"D2","B3":"peek","C3":"A1"}}\n{"cells":{"A4":"D2","B4":"pop","C4":"A1"}}\n{"cells":{"A5":0,"B5":"size","C5":"A1"}}',invocations:[]}]}}}class s{static MAP={HELLO_WORLD_QUICKSTART:{label:"Hello World (JDK Collections)",description:"Explore the 'Hello World' quickstart example",lsl:"dataSource 'lasso_quickstart'\nstudy(name: 'HelloWorld') {\n\n /* create stimulus matrix */\n action(name: 'create') {\n execute {\n // from JDK classes\n stimulusMatrix('Stack', \"\"\"Stack {\n push(java.lang.String)->java.lang.String\n size()->int }\"\"\",\n [\n implementation(\"1\", \"java.util.Stack\"),\n implementation(\"2\", \"java.util.ArrayDeque\"),\n implementation(\"3\", \"java.util.LinkedList\")\n ], [\n test(name: 'testPush()') {\n row '', 'create', 'Stack'\n row '', 'push', 'A1', '\"Hello World!\"'\n row '', 'size', 'A1'\n }])\n }\n }\n /* Execute stimulus matrix and obtain stimulus response matrix */\n action(name: 'filter', type: 'Arena') {\n dependsOn 'create'\n include 'Stack'\n profile('java17Profile') {\n scope('class') { type = 'class' }\n environment('java17') {\n image = 'maven:3.9-eclipse-temurin-17' // docker image (JDK 17)\n }\n }\n }\n}\n ",srmpath:"/web/srm/HELLO_WORLD_QUICKSTART.parquet",classifier:"quickstart, example"},BASE64_ENCODE_DECODE_MAVEN:{label:"Base64 Encode/Decode (Maven Artifacts)",description:"Explore how Maven artifacts can be used as part of stimulus matrices",lsl:"dataSource 'lasso_quickstart'\nstudy(name: 'Base64encodedecode') {\n\n action(name: 'create') {\n execute {\n // from known maven artifact (assuming maven repository is able to provide the artifact)\n stimulusMatrix('Base64', \"\"\"Base64{\n encode(byte[])->byte[]\n decode(java.lang.String)->byte[]\n }\n \"\"\", [\n implementation(\"1\", \"org.apache.commons.codec.binary.Base64\", \"commons-codec:commons-codec:1.15\"),\n ], [ // tests\n test(name: 'testEncode()') {\n row '', 'create', 'Base64'\n row '\"dXNlcjpwYXNz\".getBytes()', 'encode', 'A1', '\"user:pass\".getBytes()'\n },\n test(name: 'testEncode_padding()') {\n row '', 'create', 'Base64'\n row '\"SGVsbG8gV29ybGQ=\".getBytes()', 'encode', 'A1', '\"Hello World\".getBytes()'\n }])\n }\n }\n\n action(name: 'test', type: 'Arena') {\n features = ['cc'] // enable code coverage measurement (class scope)\n maxAdaptations = 1 // how many adaptations to try\n\n dependsOn 'create'\n include 'Base64'\n profile('java17Profile') {\n scope('class') { type = 'class' }\n environment('java17') {\n image = 'maven:3.9-eclipse-temurin-17' // docker image (JDK 17)\n }\n }\n }\n}\n ",srmpath:"/web/srm/BASE64_ENCODE_DECODE_MAVEN.parquet",classifier:"example"},BOUNDED_QUEUE_MUTATION:{label:"Mutation Testing with LASSO",description:"Explore how Mutation Testing can be used. The example demonstrates mutation testing based on an implementation of a bounded queue",lsl:"dataSource 'lasso_quickstart'\nstudy(name: 'BoundedQueue-Mutation') {\n\n action(name: 'select') {\n execute {\n // from JDK classes\n stimulusMatrix('BoundedQueue', \"\"\"MyBoundedQueue {\n MyBoundedQueue(int)\n enQueue(java.lang.Object)->void\n deQueue()->java.lang.Object\n isEmpty()->boolean\n isFull()->boolean\n }\n \"\"\",\n [\n implementation(\"1\", \"demo_examples.BoundedQueue\")\n ], [\n test(name: 'testEnqueue()') {\n row '', 'create', 'MyBoundedQueue', '10'\n row '', 'enQueue', 'A1', '\"Hello World!\"'\n row '', 'isEmpty', 'A1'\n row '', 'isFull', 'A1'\n row '', 'deQueue', 'A1'\n row '', 'isEmpty', 'A1'\n }\n ])\n }\n }\n\n action(name: 'test', type: 'Arena') { // filter by tests\n adapterStrategy = 'PassThroughAdaptationStrategy'\n features = [\"mutation\"]\n\n dependsOn 'select'\n include 'BoundedQueue'\n profile('java17Profile') {\n scope('class') { type = 'class' }\n environment('java17') {\n image = 'maven:3.9-eclipse-temurin-17' // docker image (JDK 17)\n }\n }\n }\n}\n ",srmpath:"/web/srm/BOUNDED_QUEUE_MUTATION.parquet",classifier:"example"}
1,OPENAI_GEN:{label:"Generate with OpenAI gpt4-o-mini",description:"Explore how OpenAI's GPT models can be used with LASSO to prompt for code solutions and tests. The functionality sought after is taken from the HumanEval benchmark (e.g., coding problem HumanEval_13_greatest_common_divisor). Note: We strictly advise against using your personal API keys for OpenAI in our LASSO Playground (Demo) Instance.",lsl:"dataSource 'lasso_quickstart'\nstudy(name: 'ChatGPT') {\n\n // target profile\n profile('java17Profile') {\n scope('class') { type = 'class' }\n environment('java17') {\n image = 'maven:3.9-eclipse-temurin-17'\n }\n }\n\n // load benchmark\n def humanEval = loadBenchmark(\"humaneval-java-reworded\")\n\n action(name: 'createStimulusMatrices') {\n execute {\n // create stimulus matrices for given problems\n def myProblems = [humanEval.abstractions['HumanEval_13_greatest_common_divisor']]\n myProblems.each { problem ->\n stimulusMatrix(problem.id, problem.lql, [/*impls*/], problem.tests, problem.dependencies) // id, interface, impls, tests, dependencies\n }\n }\n }\n\n action(name: 'generateCodeGpt', type: 'GenerateCodeOpenAI') {\n // pipeline specific\n dependsOn 'createStimulusMatrices'\n include '*'\n profile('java17Profile')\n\n // action configuration block\n apiKey = \"demo\" // see https://docs.langchain4j.dev/integrations/language-models/open-ai/\n model = \"gpt-4o-mini\"\n samples = 1\n\n // custom DSL command offered by the action (for each stimulus matrix, create one prompt to obtain impls)\n prompt { stimulusMatrix ->\n // can by for any prompts: FA, impls, models etc.\n def prompt = [:] // create prompt model\n prompt.promptContent = \"\"\"implement a java class with the following interface specification, but do not inherit a java interface: ```${stimulusMatrix.lql}```. Only output the java class and nothing else.\"\"\"\n prompt.id = \"lql_prompt\"\n return [prompt] // list of prompts is expected\n }\n }\n\n action(name: 'generateTestsGpt', type: 'GenerateTestsOpenAI') {\n // pipeline specific\n dependsOn 'generateCodeGpt'\n include '*'\n profile('java17Profile')\n\n // action configuration block\n apiKey = \"demo\" // see https://docs.langchain4j.dev/integrations/language-models/open-ai/\n model = \"gpt-4o-mini\"\n samples = 1\n\n prompt { stimulusMatrix ->\n def prompt = [:] // create prompt model\n prompt.promptContent = \"\"\"generate a junit test class to test the functionality of the following interface specification: ```${stimulusMatrix.lql}```. Assume that the specification is encapsulated in a class that uses the same naming as in the interface specification. Only output the JUnit test class and nothing else.\"\"\"\n prompt.id = \"lql_prompt\"\n return [prompt] // list of prompts is expected\n }\n }\n\n action(name: 'execute', type: 'Arena') {\n maxAdaptations = 1 // how many adaptations to try\n\n dependsOn 'generateTestsGpt'\n include '*'\n profile('java17Profile')\n }\n}\n ",srmpath:"/web/srm/OPENAI_GEN.parquet",classifier:"example"},OLLAMA_GEN:{label:"Generate with Ollama (llama3.1)",description:"Explore how Ollama and compatible models can be used with LASSO to prompt for code solutions and tests. The functionality sought after is taken from the HumanEval benchmark (e.g., coding problem HumanEval_13_greatest_common_divisor)",lsl:"dataSource 'lasso_quickstart'\nstudy(name: 'Ollama-Parallel') {\n\n // profile for execution\n profile('java17Profile') {\n scope('class') { type = 'class' }\n environment('java17') {\n image = 'maven:3.9-eclipse-temurin-17'\n }\n }\n\n // load benchmark\n def humanEval = loadBenchmark(\"humaneval-java-reworded\")\n\n action(name: 'createStimulusMatrices') {\n execute {\n // create stimulus matrices for given problems\n def myProblems = [humanEval.abstractions['HumanEval_13_greatest_common_divisor']]\n myProblems.each { problem ->\n stimulusMatrix(problem.id, problem.lql, [/*impls*/], problem.tests, problem.dependencies) // id, interface, impls, tests, dependencies\n }\n }\n }\n\n action(name: 'generateCodeLlama', type: 'GenerateCodeOllama') {\n // pipeline specific\n dependsOn 'createStimulusMatrices'\n include '*'\
1n profile('java17Profile')\n\n // action configuration block\n servers = [\"http://bagdana.informatik.uni-mannheim.de:11434\", \"http://dybbuk.informatik.uni-mannheim.de:11434\"]\n model = \"llama3.1:latest\"\n samples = 5 // FIXME how many to sample\n promptRequestThreads = 4 // parallel threads\n\n // custom DSL command offered by the action (for each stimulus matrix, create one prompt to obtain impls)\n prompt { stimulusMatrix ->\n // can by for any prompts: FA, impls, models etc.\n def prompt = [:] // create prompt model\n prompt.promptContent = \"\"\"implement a java class with the following interface specification, but do not inherit a java interface: ```${stimulusMatrix.lql}```. Only output the java class and nothing else.\"\"\"\n prompt.id = \"lql_prompt\"\n return [prompt] // list of prompts is expected\n }\n }\n\n action(name: 'generateTestsLlama', type: 'GenerateTestsOllama') {\n // pipeline specific\n dependsOn 'generateCodeLlama'\n include '*'\n profile('java17Profile')\n\n // action configuration block\n servers = [\"http://bagdana.informatik.uni-mannheim.de:11434\", \"http://dybbuk.informatik.uni-mannheim.de:11434\"]\n model = \"llama3.1:latest\"\n samples = 10\n promptRequestThreads = 4 // parallel threads\n\n prompt { stimulusMatrix ->\n def prompt = [:] // create prompt model\n prompt.promptContent = \"\"\"generate a junit test class to test the functionality of the following interface specification: ```${stimulusMatrix.lql}```. Assume that the specification is encapsulated in a class that uses the same naming as in the interface specification. Only output the JUnit test class and nothing else.\"\"\"\n prompt.id = \"lql_prompt\"\n return [prompt] // list of prompts is expected\n }\n }\n\n action(name: 'execute', type: 'Arena') { // run all collected stimulus sheets on all impls in arena\n maxAdaptations = 1 // how many adaptations to try\n\n dependsOn 'generateTestsLlama'\n include '*'\n profile('java17Profile')\n }\n}\n ",srmpath:"/web/srm/OLLAMA_GEN.parquet",classifier:"example"},OPENAI_GEN_SEARCH:{label:"Generate (gpt4-o-mini) + Code Search",description:"Explore how code code units from code generation and code search can be combined.",lsl:"// LSL generated\ndataSource 'lasso_quickstart' // default dataSource\ndataSource 'mavenCentral2023' // Maven Central\n\nstudy(name: 'SearchGenChatGPT') {\n\n // target profile\n profile('java17Profile') {\n scope('class') { type = 'class' }\n environment('java17') {\n image = 'maven:3.9-eclipse-temurin-17'\n }\n }\n\n action(name: 'createStimulusMatrix') {\n execute {\n stimulusMatrix('myAb', \"\"\"Base64 {\n encode(byte[])->byte[]\n decode(java.lang.String)->byte[]\n}\"\"\", [/*impls*/], [\n test(name: 'testEncode()') {\n row '', 'create', 'Base64'\n row '', 'encode', 'A1', '\"Hello World!\".getBytes()'\n }\n])\n }\n }\n\n action(name: 'generateCodeGpt', type: 'GenerateCodeOpenAI') {\n // pipeline specific\n dependsOn 'createStimulusMatrix'\n include '*'\n profile('java17Profile')\n\n // action configuration block\n apiKey = \"demo\" // see https://docs.langchain4j.dev/integrations/language-models/open-ai/\n model = \"gpt-4o-mini\"\n samples = 1\n\n // custom DSL command offered by the action (for each stimulus matrix, create one prompt to obtain impls)\n prompt { stimulusMatrix ->\n // can by for any prompts: FA, impls, models etc.\n def prompt = [:] // create prompt model\n prompt.promptContent = \"\"\"implement a java class with the following interface specification, but do not inherit a java interface: ```${stimulusMatrix.lql}```. Only output the java class and nothing else.\"\"\"\n prompt.id = \"lql_prompt\"\n return [prompt] // list of prompts is expected\n }\n }\n\n /* select class candidates using interface-driven code search */\n action(name: 'search', type: 'Search') {\n dependsOn 'generateCodeGpt'\n include '*'\
1n\n dataSource = 'mavenCentral2023' // search candidates in maven central (query.dataSource in DSL block also possible)\n\n query { stimulusMatrix ->\n def query = [:] // create query model\n query.queryContent = stimulusMatrix.lql\n query.rows = 10\n\n return [query] // list of queries is expected\n }\n }\n\n action(name: 'execute', type: 'Arena') {\n maxAdaptations = 1 // how many adaptations to try\n\n dependsOn 'search'\n include '*'\n profile('java17Profile')\n }\n}\n ",srmpath:"/web/srm/OPENAI_GEN_SEARCH.parquet",classifier:"example"},STACK_PARAMETERIZED:{label:"Parameterized Sequence Sheets",description:"Explore how sequence sheets can be parameterized (here using an example of Stack implementations)",lsl:"dataSource 'lasso_quickstart'\n// interface in LQL notation\ndef interfaceSpec = \"\"\"Stack {\n push(java.lang.String)->java.lang.String\n size()->int\n}\n\"\"\"\nstudy(name: 'Stack') {\n\n action(name: 'create') {\n stimulusMatrix('Stack', interfaceSpec, // abstraction details\n [ // implementations\n implementation(\"1\", \"java.util.Stack\"),\n implementation(\"2\", \"java.util.ArrayDeque\"),\n implementation(\"3\", \"java.util.LinkedList\")\n ],\n [ // tests\n test(name: 'testPush()') {\n row '', 'create', 'Stack'\n row '', 'push', 'A1', '\"Hi\"'\n row '', 'size', 'A1'\n },\n test(name: 'testPushParameterized(p1=java.lang.String)', p1: '\"Hello World!\"') {\n row '', 'create', 'Stack'\n row '', 'push', 'A1', '?p1'\n row '', 'size', 'A1'\n },\n test(name: 'testPushParameterized(p1=java.lang.String)', p1: '\"Bla blub!\"') // e.g., parameterized\n ]\n )\n }\n\n action(name: 'test', type: 'Arena') { // run all tests\n maxAdaptations = 1 // how many adaptations to try\n\n dependsOn 'create'\n include 'Stack'\n profile('java17Profile') {\n scope('class') { type = 'class' }\n environment('java17') {\n image = 'maven:3.9-eclipse-temurin-17' // docker image (JDK 17)\n }\n }\n }\n}\n ",srmpath:"/web/srm/STACK_PARAMETERIZED.parquet",classifier:"example"},STACK_TYPEAWARETEST:{label:"Type-aware Test Mutation",description:"Explore how existing sequence sheets can be mutated",lsl:"dataSource 'lasso_quickstart'\n// interface in LQL notation\ndef interfaceSpec = \"\"\"Stack {\n push(java.lang.String)->java.lang.String\n size()->int\n}\n\"\"\"\nstudy(name: 'Stack') {\n\n profile('java17Profile') {\n scope('class') { type = 'class' }\n environment('java17') {\n image = 'maven:3.9-eclipse-temurin-17' // docker image (JDK 17)\n }\n }\n\n action(name: 'select') {\n stimulusMatrix('Stack', interfaceSpec, // abstraction details\n [ // implementations\n implementation(\"1\", \"java.util.Stack\"),\n implementation(\"2\", \"java.util.ArrayDeque\"),\n implementation(\"3\", \"java.util.LinkedList\")\n ],\n [ // tests\n test(name: 'testPush()') {\n row '', 'create', 'Stack'\n row '', 'push', 'A1', '\"Hi\"'\n row '', 'size', 'A1'\n },\n test(name: 'testPushParameterized(p1=java.lang.String)', p1: '\"Hello World!\"') {\n row '', 'create', 'Stack'\n row '', 'push', 'A1', '?p1'\n row '', 'size', 'A1'\n },\n test(name: 'testPushParameterized(p1=java.lang.String)', p1: '\"Bla blub!\"') // e.g., parameterized\n ]\n )\n }\n\n action(name: 'typeAware', type: 'TypeAwareMutatorTestGen') { // add more tests\n noOfTests = 1 // create one mutation per test\n\n dependsOn 'select'\n include 'Stack'\n }\n\n action(name: 'test', type: 'Arena') { // run all tests\n maxAdaptations = 1 // how many adaptations to try\n\n dependsOn 'typeAware'\n include 'Stack'\n profile('java17Profile')\n }\n}\n ",srmpath:"/web/srm/STACK_TYPEAWARETEST.parquet",classifier:"example"},DGAI_LLM:{label:"Differential GAI with many Test Generators and LLMs (LLAMA and DeepSeek-R1)",description:"Explore how LASSO can be used to realized Differential GAI",lsl:"dataSource 'lasso_quickstart'\nstudy(name: 'DGAI') {\n\n // profile for execution\n profile('java17Profile') {\n scope('class') { type = 'class' }\n environment('java17') {\n image = 'maven:3.9-eclipse-temurin-17'\n }\n }\n\n // profile for execution\n profile('java11Profile') {\n scope('class') { type = 'class' }\n environment('java17') {\n image = 'maven:3.6.3-openjdk-11' // EvoSuite won't run in > JDK 11\n }\n }\n\n // load benchmark\n def humanEval = loadBenchmark(\"humaneval-java-reworded\")\n\n action(name: 'createStimulusMatrices') {\n execute {\n // create stimulus matrices for given problems\n def myProblems = [humanEval.abstractions['HumanEval_13_greatest_common_divisor']]\n myProblems.each { problem ->\n stimulusMatrix(problem.id, problem.lql, [/*impls*/], problem.tests) // id, interface, impls, tests\n }\n }\n }\n\n action(name: 'generateCodeLlama', type: 'GenerateCodeOllama') {\n // pipeline specific\n dependsOn 'createStimulusMatrices'\n include '*'\
1n profile('java11Profile') // evosuite 11\n\n // action configuration block\n ollamaBaseUrl = \"http://bagdana.informatik.uni-mannheim.de:11434\"\n model = \"llama3.1:latest\"\n samples = 10 // how many to sample\n javaVersion = \"11\" // because of EvoSuite ..\n\n prompt { stimulusMatrix ->\n def prompt = [:] // create prompt model\n prompt.promptContent = \"\"\"implement a java class with the following interface specification, but do not inherit a java interface: ```${stimulusMatrix.lql}```. Only output the java class and nothing else.\"\"\"\n prompt.id = \"lql_prompt\"\n return [prompt] // list of prompts is expected\n }\n }\n\n action(name: 'generateCodeDeepSeek', type: 'GenerateCodeOllama') {\n // pipeline specific\n dependsOn 'generateCodeLlama'\n include '*'\n profile('java11Profile') // evosuite 11\n\n // action configuration block\n ollamaBaseUrl = \"http://bagdana.informatik.uni-mannheim.de:11434\"\n model = \"deepseek-r1:32b\"\n samples = 10 // how many to sample\n javaVersion = \"11\" // because of EvoSuite ..\n\n prompt { stimulusMatrix ->\n def prompt = [:] // create prompt model\n prompt.promptContent = \"\"\"implement a java class with the following interface specification, but do not inherit a java interface: ```${stimulusMatrix.lql}```. Only output the java class and nothing else.\"\"\"\n prompt.id = \"lql_prompt\"\n return [prompt] // list of prompts is expected\n }\n }\n\n // add tests (mutates existing tests)\n action(name: 'typeAware', type: 'TypeAwareMutatorTestGen') { // add more tests\n noOfTests = 1 // create one mutation per test\n\n dependsOn 'generateCodeDeepSeek'\n include '*'\n }\n\n // add tests: randomly add new\n action(name: 'random', type: 'RandomTestGen') { // add more tests\n noOfTests = 5 // create 5 additional random tests\n shuffleSequence = false\n\n dependsOn 'typeAware'\n include '*'\n }\n\n action(name: 'generateTestsLlama', type: 'GenerateTestsOllama') {\n // pipeline specific\n dependsOn 'random'\n include '*'\n profile('java17Profile')\n\n // action configuration block\n ollamaBaseUrl = \"http://bagdana.informatik.uni-mannheim.de:11434\"\n model = \"llama3.1:latest\"\n samples = 10 // how many to sample\n\n prompt { stimulusMatrix ->\n def prompt = [:] // create prompt model\n prompt.promptContent = \"\"\"generate a junit test class to test the functionality of the following interface specification: ```${stimulusMatrix.lql}```. Assume that the specification is encapsulated in a class that uses the same naming as in the interface specification. Only output the JUnit test class and nothing else.\"\"\"\n prompt.id = \"lql_prompt\"\n return [prompt] // list of prompts is expected\n }\n }\n\n action(name: 'generateTestsDeepSeek', type: 'GenerateTestsOllama') {\n // pipeline specific\n dependsOn 'generateTestsLlama'\n include '*'\n profile('java17Profile')\n\n // action configuration block\n ollamaBaseUrl = \"http://bagdana.informatik.uni-mannheim.de:11434\"\n model = \"deepseek-r1:32b\"\n samples = 10 // how many to sample\n\n prompt { stimulusMatrix ->\n def prompt = [:] // create prompt model\n prompt.promptContent = \"\"\"generate a junit test class to test the functionality of the following interface specification: ```${stimulusMatrix.lql}```. Assume that the specification is encapsulated in a class that uses the same naming as in the interface specification. Only output the JUnit test class and nothing else.\"\"\"\n prompt.id = \"lql_prompt\"\n return [prompt] // list of prompts is expected\n }\n }
1\n\n // add tests: SBST\n action(name: 'evoSuite', type: 'EvoSuite') {\n searchBudget = 60 // we need this as upper bound for timeouts\n stoppingCondition = \"MaxTime\"\n //criterion = \"LINE:BRANCH:EXCEPTION:WEAKMUTATION:OUTPUT:METHOD:METHODNOEXCEPTION:CBRANCH\"\n cleanExecutables = false\n\n dependsOn 'generateTestsDeepSeek'\n include '*'\n profile('java11Profile')\n }\n\n action(name: 'execute', type: 'Arena') { // run all collected stimulus sheets in arena\n maxAdaptations = 1 // how many adaptations to try\n //features = [\"cc\", \"mutation\"]\n\n dependsOn 'evoSuite'\n include '*'\n profile('java17Profile')\n }\n}\n ",srmpath:"/web/srm/DGAI.parquet",classifier:"dgai, example"},BENCHMARK_CODELLM:{label:"Replication of HumanEval-J/MBPP-J Benchmark",description:"Explore how LASSO can be used to replicate studies and reuse their designs, here based on the example of HumanEval-J (MultiPL-E)",lsl:"dataSource 'lasso_quickstart'\nstudy(name: 'HumanEval-OriginalPrompt-ShowCode') {\n\n // profile for execution\n profile('java17Profile') {\n scope('class') { type = 'class' }\n environment('java17') {\n image = 'maven:3.9-eclipse-temurin-17'\n }\n }\n\n // load benchmark\n def humanEval = loadBenchmark(\"humaneval-java-reworded\")\n def mbpp = loadBenchmark(\"mbpp-java-reworded\")\n\n action(name: 'createStimulusMatrices') {\n execute {\n // create stimulus matrices for given problems\n humanEval.abstractions.values().each { problem ->\n stimulusMatrix(problem.id, problem.lql, [/*impls*/], problem.tests, problem.dependencies) // id, interface, impls, tests, dependencies\n }\n\n mbpp.abstractions.values().each { problem ->\n stimulusMatrix(problem.id, problem.lql, [/*impls*/], problem.tests, problem.dependencies) // id, interface, impls, tests, dependencies\n }\n }\n }\n\n action(name: 'generateCodeLlama', type: 'GenerateCodeOllama') {\n // pipeline specific\n dependsOn 'createStimulusMatrices'\n include '*'\n profile('java17Profile')\n\n // action configuration block \n servers = [\"http://bagdana.informatik.uni-mannheim.de:11434\", \"http://dybbuk.informatik.uni-mannheim.de:11434\"]\n model = \"llama3.1:latest\"\n samples = 10 // how many to sample\n javaVersion = \"17\" // because of EvoSuite ..\n\n promptRequestThreads = 4 // parallel threads\n\n prompt { stimulusMatrix ->\n def prompt = [:] // create prompt model\n // get original prompt from benchmark\n prompt.promptContent = humanEval.abstractions[stimulusMatrix.name].prompt\n prompt.id = \"lql_prompt\"\n return [prompt] // list of prompts is expected\n }\n }\n\n action(name: 'measureCoverage', type: 'Arena') { // run all collected stimulus sheets in arena\n maxAdaptations = 1 // how many adaptations to try\n features = [\"cc\"]\n\n dependsOn 'generateCodeLlama'\n include '*'\n profile('java17Profile')\n }\n\n action(name: 'generateTestsLlama', type: 'GenerateTestsOllama') {\n // pipeline specific\n dependsOn 'measureCoverage'\n include '*'\n profile('java17Profile')\n\n // action configuration block \n servers = [\"http://bagdana.informatik.uni-mannheim.de:11434\", \"http://dybbuk.informatik.uni-mannheim.de:11434\"]\n model = \"llama3.1:latest\"\n samples = 1 // how many to sample\n promptRequestThreads = 4 // parallel threads\n\n prompt { stimulusMatrix ->\n List prompts = stimulusMatrix.implementations.collect { impl ->\n def prompt = [:] // create prompt model\n prompt.promptContent = \"\"\"generate a junit test class to test the functionality of the following java class `${impl.code.name}` : ```${impl.code.content}```. Initialize the class and call its methods. Only output the JUnit test class and nothing else.\"\"\"\n prompt.id = \"lql_prompt\"\n return prompt\n }\n\n return prompts\n }\n }\n\n action(name: 'execute', type: 'Arena') { // run all collected stimulus sheets in arena\n maxAdaptations = 1 // how many adaptations to try\n features = [\"cc\"]\n\n dependsOn 'generateTestsLlama'\n include '*'\
1n profile('java17Profile')\n }\n}\n ",srmpath:"/web/srm/HUMANEVAL.parquet",classifier:"benchmark, replication, humaneval, mbpp, example"},EVOSUITE_LLM:{label:"Diversity-driven Test Generation with EvoSuite and HumanEval-J",description:"Explore how EvoSuite automated unit test generation can be used in LASSO with HumanEval-J (MultiPL-E) to realize diversity-driven test generation",lsl:"dataSource 'lasso_quickstart'\nstudy(name: 'Evosuite-LLM') {\n\n // profile for execution\n profile('java17Profile') {\n scope('class') { type = 'class' }\n environment('java17') {\n image = 'maven:3.9-eclipse-temurin-17'\n }\n }\n\n // profile for execution\n profile('java11Profile') {\n scope('class') { type = 'class' }\n environment('java17') {\n image = 'maven:3.6.3-openjdk-11' // EvoSuite won't run in > JDK 11\n }\n }\n\n // load benchmark\n def humanEval = loadBenchmark(\"humaneval-java-reworded\")\n\n action(name: 'createStimulusMatrices') {\n execute {\n // create stimulus matrices for given problems\n def myProblems = [humanEval.abstractions['HumanEval_13_greatest_common_divisor']]\n myProblems.each { problem ->\n stimulusMatrix(problem.id, problem.lql, [/*impls*/], problem.tests, problem.dependencies) // id, interface, impls, tests, dependencies\n }\n }\n }\n\n action(name: 'generateCodeLlama', type: 'GenerateCodeOllama') {\n // pipeline specific\n dependsOn 'createStimulusMatrices'\n include '*'\n profile('java11Profile') // evosuite 11\n\n // action configuration block\n servers = [\"http://bagdana.informatik.uni-mannheim.de:11434\"]\n model = \"llama3.1:latest\"\n samples = 3 // how many to sample\n javaVersion = \"11\" // because of EvoSuite ..\n\n prompt { stimulusMatrix ->\n def prompt = [:] // create prompt model\n prompt.promptContent = \"\"\"implement a java class with the following interface specification, but do not inherit a java interface: ```${stimulusMatrix.lql}```. Only output the java class and nothing else.\"\"\"\n prompt.id = \"lql_prompt\"\n return [prompt] // list of prompts is expected\n }\n }\n\n action(name: 'generateCodeDeepSeek', type: 'GenerateCodeOllama') {\n // pipeline specific\n dependsOn 'generateCodeLlama'\n include '*'\n profile('java11Profile') // evosuite 11\n\n // action configuration block\n servers = [\"http://bagdana.informatik.uni-mannheim.de:11434\"]\n model = \"deepseek-r1:32b\"\n samples = 3 // how many to sample\n javaVersion = \"11\" // because of EvoSuite ..\n\n prompt { stimulusMatrix ->\n def prompt = [:] // create prompt model\n prompt.promptContent = \"\"\"implement a java class with the following interface specification, but do not inherit a java interface: ```${stimulusMatrix.lql}```. Only output the java class and nothing else.\"\"\"\n prompt.id = \"lql_prompt\"\n return [prompt] // list of prompts is expected\n }\n }\n\n // add tests: SBST\n action(name: 'evoSuite', type: 'EvoSuite') {\n searchBudget = 30 // we need this as upper bound for timeouts\n stoppingCondition = \"MaxTime\"\n //criterion = \"LINE:BRANCH:EXCEPTION:WEAKMUTATION:OUTPUT:METHOD:METHODNOEXCEPTION:CBRANCH\"\n\n dependsOn 'generateCodeDeepSeek'\n include '*'\n profile('java11Profile')\n }\n\n action(name: 'test', type: 'Arena') { // run all collected stimulus sheets on all impls in arena\n maxAdaptations = 1 // how many adaptations to try\n //features = [\"cc\", \"mutation\"]\n\n dependsOn 'evoSuite'\n include '*'\n profile('java17Profile')\n }\n}\n ",srmpath:"/web/srm/EVOSUITE_humaneval.parquet",classifier:"evosuite, benchmark, humaneval, example"},CODECLONE_NICAD:{label:"Code Clone Detection with Nicad6.2",description:"Explore how Nicad's code clone detection can be used in LASSO to filter SRMs",lsl:"dataSource 'lasso_quickstart'\nstudy(name: 'CodeClone') {\n\n // profile for execution\n profile('java17Profile') {\n scope('class') { type = 'class' }\n environment('java17') {\n image = 'maven:3.9-eclipse-temurin-17'\n }\n }\n\n // load benchmark\n def humanEval = loadBenchmark(\"humaneval-java-reworded\")\n\n action(name: 'createStimulusMatrices') {\n execute {\n // create stimulus matrices for given problems\n def myProblems = [humanEval.abstractions['HumanEval_13_greatest_common_divisor']]\n myProblems.each { problem ->\n stimulusMatrix(problem.id, problem.lql, [/*impls*/], problem.tests, problem.dependencies) // id, interface, impls, tests, dependencies\n }\n }\n }\n\n action(name: 'generateCodeLlama', type: 'GenerateCodeOllama') {\n // pipeline specific\n dependsOn 'createStimulusMatrices'\n include '*'\
1n profile('java17Profile') // evosuite 11\n\n // action configuration block\n servers = [\"http://bagdana.informatik.uni-mannheim.de:11434\"]\n model = \"llama3.1:latest\"\n samples = 5 // how many to sample\n\n // custom DSL command offered by the action (for each stimulus matrix, create one prompt to obtain impls)\n prompt { stimulusMatrix ->\n // can by for any prompts: FA, impls, models etc.\n def prompt = [:] // create prompt model\n prompt.promptContent = \"\"\"implement a java class with the following interface specification, but do not inherit a java interface: ```${stimulusMatrix.lql}```. Only output the java class and nothing else.\"\"\"\n prompt.id = \"lql_prompt\"\n //prompt.model = \"llama3.1:latest\"\n return [prompt] // list of prompts is expected\n }\n }\n\n action(name: 'codeClones', type: 'Nicad6') {\n collapseClones = true // drop clones from stimulus matrix\n\n dependsOn 'generateCodeLlama'\n include '*'\n profile('nicad:6.2')\n }\n\n action(name: 'test', type: 'Arena') { // run all collected stimulus sheets on all impls in arena\n maxAdaptations = 1 // how many adaptations to try\n //features = [\"cc\", \"mutation\"]\n\n dependsOn 'codeClones'\n include '*'\n profile('java17Profile')\n }\n}\n ",srmpath:"/web/srm/CODECLONE_NICAD.parquet",classifier:"code clone, nicad, example"}}}},60572:(e,n,t)=>{t.d(n,{A:()=>o});var a=t(94335);function s(){const e=JSON.parse(localStorage.getItem("user")||"{}");return e&&e.token?(console.log("AUTHORIZED"),{Authorization:"Bearer "+e.token}):{}}const i="https://odisse.informatik.uni-mannheim.de/",o={getProfile:()=>a.A.get(i+"auth/me",{headers:s()}),execute:e=>a.A.post(i+"api/v1/lasso/execute",e,{headers:s()}),getHubScripts:()=>a.A.get(`${i}api/v1/lasso/hub`,{headers:s()}),getHubScriptsByUser:e=>a.A.get(`${i}api/v1/lasso/hub/user/${e}`,{headers:s()}),getHubScriptsByTag:e=>a.A.get(`${i}api/v1/lasso/hub/tag/${e}`,{headers:s()}),rank:e=>a.A.post(i+"api/v1/lasso/rank/apply",e,{headers:s()}),getScriptJobStatus:e=>a.A.get(`${i}api/v1/lasso/scripts/${e}`,{headers:s()}),queryScript:e=>{const n=e.executionId;return a.A.post(`${i}api/v1/lasso/scripts/${n}/query`,e,{headers:s()})},retrieveParquet:e=>a.A.get(i+"publicapi/v1/lasso/analytics/raw/srm/"+e+"_all.parquet",{responseType:"arraybuffer"}),retrieveParquetUrl:e=>i+"publicapi/v1/lasso/analytics/raw/srm/"+e+"_all.parquet",queryImplementationsForDataSource:(e,n)=>a.A.post(`${i}api/v1/lasso/datasource/${e}/query`,n,{headers:s()}),getDataSources:()=>a.A.get(`${i}api/v1/lasso/datasource/info`,{headers:s()}),getActions:()=>a.A.get(`${i}api/v1/lasso/info`,{headers:s()}),API_URL:i}}}]);
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.