[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-681881-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-681881-en":130,"doc-similar-681881":160},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","lancer-your-code-tell-me-what-you-need","Lancer - Your Code Tell Me What You Need","","Programming is a difficult, repetitive activity where developers repeatedly face similar problems and must write or recall equivalent code fragments. Lancer is a context-aware code-to-code recommendation tool that analyzes the intention of incomplete code in real time. Built on a Library-Sensitive Language Model (LSLM) and a BERT-based component, it recommends relevant, reusable code samples during development. Evaluation on 2,892 tasks shows strong improvement over prior approaches, with fast response suitable for interactive coding.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/lancer-your-code-tell-me-what-you-need/681881/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/lancer-your-code-tell-me-what-you-need/681881.png","ImageObject",300,407,{"name":42,"@type":43},"Franzy","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-10","2026-11-06",true,{"@type":52,"interactionType":53,"userInteractionCount":30},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"What problem does Lancer address in software development?","Question",{"text":62,"@type":63},"Lancer targets the challenge of finding appropriate code examples while programming, especially when the current code is incomplete and developers cannot accurately describe their intention in natural language.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"How does Lancer recommend code during real-time development?",{"text":67,"@type":63},"It analyzes the incomplete code’s intention using a Library-Sensitive Language Model (LSLM) and leverages language-model probability over token sequences to rank relevant, reusable code samples.",{"name":69,"@type":60,"acceptedAnswer":70},"What improvements does Lancer show compared with related tools?",{"text":71,"@type":63},"Across 2,892 programming tasks, the first recommendation from Lancer is related to the incomplete code for 45.4% of tasks, compared with 8.7%–25.3% for compared approaches, while returning recommendations in about 0.67 seconds on average.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},681881,1793955858,{"code":4,"msg":81,"data":82},"success",[83,87,91,95,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":84,"show_sort_weight":85,"slug":86},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":92,"show_sort_weight":93,"slug":94},"Exam",70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":96,"slug":129},19,"General","general",{"code":4,"msg":81,"data":131},{"doc_id":78,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":30,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":33,"language":139,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":12,"update_tm":79,"read_time":123,"preview_page_count":33,"preview_urls":143},2336478945519,"https://ap-avatar.wpscdn.com/davatar_085a072bc5b1113ac321206ff7593b45","Lancer: Your Code Tell Me What You Need  \nShufan Zhou, Beijun Shen*, Hao Zhong  \nSchool of Electronic Information and Electrical Engineering, Shanghai Jiao Tong University, Shanghai, China  \nfsfzhou567, bjshen, [zhonghao](zhonghaog@sjtu.edu.cn)[g](zhonghaog@sjtu.edu.cn)[@sjtu.edu.cn](zhonghaog@sjtu.edu.cn)  \nAbstract—Programming is typically a difﬁcult and repetitive task. Programmers encounter endless problems during programming, and they often need to write similar code over and over again. To prevent programmers from reinventing wheels thus increase their productivity, we propose a contextaware code-to-code recommendation tool named Lancer. With the support of a Library-Sensitive Language Model (LSLM) and the BERT model, Lancer is able to automatically analyze the intention of the incomplete code and recommend relevant and reusable code samples in real-time. A video demonstration of Lancer can be found at [https://youtu.be/tO9nhqZY35g](https://youtu.be/tO9nhqZY35g). Lancer is open source and the code is available at [https:](https:)//[github.com/sfzhou5678/Lancer](github.com/sfzhou5678/Lancer).  \nIndex Terms—Code recommendation, Code reuse, Language model  \nI. INTRODUCTION  \nIn software development activities, when programmers encounter problems, they often search code examples to learn how to handle such problems [1], [2] . Researchers [3], [4] have proposed some code search engines to retrieve code samples, and some recent approaches [5], [6] even allow free-form queries (i.e., how to generate an md5 hash) to search relevant code snippets. Alternatively, some clone detection techniques [7], [8] can locate similar code snippets of a given code sample. They allow programmers to reﬁne their code by learning its clones.  \nAlthough the above tools are useful, existing tools are still not smart enough to recommend relevant code samples during programming in real-time. For example, when a novice write the incomplete code shown in Figure 1, she may not know how to continue the programming task, and needs code samples to learn how to complete it. Since she is a novice and do not know the details, it is hard for her to use only natural language to accurately depict her intention. On the other hand, as the code is incomplete, clone detection techniques often cannot locate useful code samples. As a result, she has to ﬁnd the solution by herself, which is timeconsuming and error-prone. Here, even if an experienced programmer knows that a relevant code sample is useful, she can fail to remember its location, and has to reinvent the wheel. Therefore, locating appropriate code examples is still a serious challenge for programmers.  \nTo handle these challenges, we propose a recommendation tool named SLAMPA in our previous work [9], which can recommend code samples based on what is already written under development. However, as SLAMPA uses only deep learning technologies, it has the out-of-vocabulary (OOV)  \n*Corresponding author.  \npublic ImageData getJPEGDiagram() { Shell shell = new Shell() ;  \nGraphicalViewer viewer=new ScrollingGraphicalViewer() ; LayerManager lm = (LayerManager) viewer .  \ngetEditPartRegistry() .get(LayerManager . ID) ;  \n. . .  \n}  \nFig. 1. A piece of incomplete code.  \nproblem [10] . In addition, its accuracies are relatively low, and it is not fast enough to support real development.  \nIn this paper, we proposed Lancer to further improve the state of the art. Compared with SLAMPA, Lancer presentsa new language model called Library-Sensitive Language Model (LSLM), and new algorithms to rank samples. We constructed 2892 programming tasks, in which tools shall recommend related code for a piece of incomplete code. We compare Lancer with SLAMPA and two other clone detection tools such as SourcererCC and CCLearner, for their effectiveness of recommending related code samples. For 45.4% of our programming tasks, the ﬁrst recommended code sample of Lancer is related to the incomplete code, while the compared approaches c","cbCaieHlDlw9SUqC","https://ap.wps.com/l/cbCaieHlDlw9SUqC","pdf",247786,"English","# Introduction\n# Lancer\n## Code Parser\n## Intention Analyzer","[{\"question\":\"What problem does Lancer address in software development?\",\"answer\":\"Lancer targets the challenge of finding appropriate code examples while programming, especially when the current code is incomplete and developers cannot accurately describe their intention in natural language.\"},{\"question\":\"How does Lancer recommend code during real-time development?\",\"answer\":\"It analyzes the incomplete code’s intention using a Library-Sensitive Language Model (LSLM) and leverages language-model probability over token sequences to rank relevant, reusable code samples.\"},{\"question\":\"What improvements does Lancer show compared with related tools?\",\"answer\":\"Across 2,892 programming tasks, the first recommendation from Lancer is related to the incomplete code for 45.4% of tasks, compared with 8.7%–25.3% for compared approaches, while returning recommendations in about 0.67 seconds on average.\"}]","Lancer - Your Code Tell Me What You Need | PDF",[144,148,152,156],{"page_no":22,"url":145,"width":146,"height":147},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/5f5b7f4fccf0e917635fea65883ea0b5.webp",983,1272,{"page_no":26,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/a2f9d399b62d56f252852ae06b9aa912.webp",982,1270,{"page_no":30,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/a79fc87c8e96eec42c57a3ffcf64d819.webp",981,1269,{"page_no":33,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/1820d5d841b7326a5cf3e359b5f3a034.webp",980,1268,{"list":161,"token":11},[162,168,174,181,187,193,199,205,211,217],{"doc_id":163,"doc_title":164,"file_type":137,"home_preview_img_url":165,"slug":166,"view_count":105,"category_name":29,"create_tm":167},721656,"Agentic AI Bootcamp - Session 1 - Concepts, Hands-On, and Tools","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230024726388/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796191319&Signature=JT2ddZPXStDrWl6s9oFqbvfWrbA%3D","agentic-ai-bootcamp-session-1-concepts-hands-on-and-tools",1795063870,{"doc_id":169,"doc_title":170,"file_type":137,"home_preview_img_url":171,"slug":172,"view_count":33,"category_name":29,"create_tm":173},687485,"Migration Guide - MPLAB X IDE to MPLAB Tools for VS Code","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000648877/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796191319&Signature=eK%2Fb38ifkjs5xLUSffkeijHRTA8%3D","migration-guide-mplab-x-ide-to-mplab-tools-for-vs-code",1794083807,{"doc_id":175,"doc_title":176,"file_type":137,"home_preview_img_url":177,"slug":178,"view_count":179,"category_name":29,"create_tm":180},391898,"Technical Interview Tips - Suggestions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917711156/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796191319&Signature=uspehmv2DhAiUEjhp77oV2IGlwk%3D","technical-interview-tips-suggestions",11,1790359946,{"doc_id":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":101,"category_name":29,"create_tm":186},561220,"slideshare_2011_06_CG=Philips,BCP69-25_++SMD_Code_Book_2007_CG=Philips,BCP69-25_++SMD Code Book_2007","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947739785/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796191319&Signature=cAxEKV5mucmCTgOdcHUoxa67x10%3D","slideshare_2011_06_cgphilipsbcp69-25_smd_code_book_2007_cgphilipsbcp69-25_smd-code-book_2007",1791805297,{"doc_id":188,"doc_title":189,"file_type":137,"home_preview_img_url":190,"slug":191,"view_count":96,"category_name":29,"create_tm":192},682224,"Python PEP8 - The Style Guide for Python Code","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999427682/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796191319&Signature=z3w7yXmgy4HhCfmquYKnGpTkYkw%3D","python-pep8-the-style-guide-for-python-code",1793963024,{"doc_id":194,"doc_title":195,"file_type":137,"home_preview_img_url":196,"slug":197,"view_count":112,"category_name":29,"create_tm":198},81579,"Programming over Thinking: Efficient and Robust Multi-Constraint Planning","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808627462/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796191319&Signature=T6%2F8ZRb69U%2FUqhaiKa1QoWkIAIg%3D","programming-over-thinking-efficient-and-robust-multi-constraint-planning",1784174444,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":96,"category_name":29,"create_tm":204},696839,"Claude Code for Web Developers - Seven practical workflows for building and maintaining websites","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230009777862/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796191319&Signature=S01tPWQ9WRaBN67H8hNA9k%2BE2XI%3D","claude-code-for-web-developers-seven-practical-workflows-for-building-and-maintaining-websites",1794435033,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":33,"category_name":29,"create_tm":210},699580,"GitHub Copilot Tips & Tricks Vol. 2 - Best practices for developers to work more productively with GitHub Copilot - 2nd Edition, 2024","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011320318/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796191319&Signature=tBNzeahRTO4dhrQJaMu27pslUIg%3D","github-copilot-tips-tricks-vol-2-best-practices-for-developers-to-work-more-productively-with-github-copilot-2nd-edition-2024",1794479729,{"doc_id":212,"doc_title":213,"file_type":137,"home_preview_img_url":214,"slug":215,"view_count":110,"category_name":29,"create_tm":216},697991,"Learn to Code - HTML & CSS - Develop & Style Websites","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010150974/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796191319&Signature=W1U8gRLa9DUoujeE15DlV%2Fi8fcM%3D","learn-to-code-html-css-develop-style-websites",1794446750,{"doc_id":218,"doc_title":219,"file_type":137,"home_preview_img_url":220,"slug":221,"view_count":96,"category_name":29,"create_tm":222},706611,"Coding with Minecraft: 6-Functions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230014633163/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796191319&Signature=Eqv79Y17TAGGqEIX2wti7EsnIIU%3D","coding-with-minecraft-6-functions",1794693416]