-
Notifications
You must be signed in to change notification settings - Fork 1
/
experiment_0000036.json
1 lines (1 loc) · 194 KB
/
experiment_0000036.json
1
[{"cap_original_tokens":["<SENTENCE_START>","{","<id>","entity","Name","Resolvers","<\/id>",".","<id>","put","<\/id>","(","<id>","resolver","<\/id>",",","<id>","entity","Name","Resolver","Map","Value","<\/id>",")",";","}","<SENTENCE_END\/>"],"file_name":"SessionFactoryImpl.java","formatted_lines":["{"," entityNameResolvers.put( resolver, ENTITY_NAME_RESOLVER_MAP_VALUE );","}"],"function_name":"registerEntityNameResolver","function_name_tokens":["register","entity","name","resolver"],"id_body_hash":"eb672fe400f2b669e94fa95fe6166869","id_same_identifier_list":[0,1,2,2,2,3,4,5,6,7,8,8,8,8,8,9,10,11,12],"option_correct":"registerEntityNameResolver","options":["registerEntityNameResolvers","getComp","registerEntityNameResolver","registerParameters","min","getSubclassTableSpan","addResolver"],"options_nlp":["register entity name resolvers","get comp","register entity name resolver","register parameters","min","get subclass table span","add resolver"],"options_random":["getComp","min","getSubclassTableSpan"],"options_tfidf":["addResolver","registerEntityNameResolvers","registerParameters"],"project_name":"hibernate-orm","source_code_string":"public void registerEntityNameResolver(EntityNameResolver resolver) {\n\t\tentityNameResolvers.put( resolver, ENTITY_NAME_RESOLVER_MAP_VALUE );\n\t}","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"entity","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"Name","start_char":10,"line":1},{"index_id":3,"token_group":2,"text":"Resolvers","start_char":14,"line":1},{"index_id":4,"token_group":2,"text":".","start_char":23,"line":1},{"index_id":5,"token_group":3,"text":"put","start_char":24,"line":1},{"index_id":6,"token_group":4,"text":"(","start_char":27,"line":1},{"index_id":7,"token_group":5,"text":"resolver","start_char":29,"line":1},{"index_id":8,"token_group":6,"text":",","start_char":37,"line":1},{"index_id":9,"token_group":7,"text":"entity","start_char":39,"line":1},{"index_id":10,"token_group":8,"text":"Name","start_char":46,"line":1},{"index_id":11,"token_group":8,"text":"Resolver","start_char":51,"line":1},{"index_id":12,"token_group":8,"text":"Map","start_char":60,"line":1},{"index_id":13,"token_group":8,"text":"Value","start_char":64,"line":1},{"index_id":14,"token_group":8,"text":")","start_char":70,"line":1},{"index_id":15,"token_group":9,"text":";","start_char":71,"line":1},{"index_id":16,"token_group":10,"text":"}","start_char":0,"line":2}],"tokens_list":["{","entity","Name","Resolvers",".","put","(","resolver",",","entity","Name","Resolver","Map","Value",")",";","}"],"uuid":"a215914c97479324268b532744851544"},{"cap_original_tokens":["<SENTENCE_START>","{","<id>","list","<\/id>","<","<id>","psi","Element","<\/id>",">","<id>","elements","<\/id>","=","<id>","container","Util","<\/id>",".","<id>","new","Array","List","<\/id>","(",")",";","if","(","<id>","editor","<\/id>","!=","null",")","{","<id>","psi","Reference","<\/id>","<id>","reference","<\/id>","=","<id>","target","Element","Util","<\/id>",".","<id>","find","Reference","<\/id>","(","<id>","editor","<\/id>",")",";","if","(","<id>","reference","<\/id>","!=","null",")","{","<id>","container","Util","<\/id>",".","<id>","add","If","Not","Null","<\/id>","(","<id>","elements","<\/id>",",","<id>","reference","<\/id>",".","<id>","get","Element","<\/id>","(",")",")",";","}","}","if","(","<id>","elements","<\/id>",".","<id>","is","Empty","<\/id>","(",")",")","{","<id>","container","Util","<\/id>",".","<id>","add","If","Not","Null","<\/id>","(","<id>","elements","<\/id>",",","<id>","common","Data","Keys","<\/id>",".","<id>","psi","Element","<\/id>",".","<id>","get","Data","<\/id>","(","<id>","data","Context","<\/id>",")",")",";","}","if","(","<id>","elements","<\/id>",".","<id>","is","Empty","<\/id>","(",")","&&","<id>","editor","<\/id>","==","null",")","{","final","<id>","project","<\/id>","<id>","project","<\/id>","=","<id>","common","Data","Keys","<\/id>",".","<id>","project","<\/id>",".","<id>","get","Data","<\/id>","(","<id>","data","Context","<\/id>",")",";","<id>","virtual","File","<\/id>","[","]","<id>","files","<\/id>","=","<id>","common","Data","Keys","<\/id>",".","<id>","virtual","File","Array","<\/id>",".","<id>","get","Data","<\/id>","(","<id>","data","Context","<\/id>",")",";","if","(","<id>","project","<\/id>","!=","null","&&","<id>","files","<\/id>","!=","null",")","{","for","(","<id>","virtual","File","<\/id>","<id>","file","<\/id>",":","<id>","files","<\/id>",")","{","<id>","container","Util","<\/id>",".","<id>","add","If","Not","Null","<\/id>","(","<id>","elements","<\/id>",",","<id>","psi","Manager","<\/id>",".","<id>","get","Instance","<\/id>","(","<id>","project","<\/id>",")",".","<id>","find","File","<\/id>","(","<id>","file","<\/id>",")",")",";","}","}","}","return","<id>","container","Util","<\/id>",".","<id>","map","Not","Null","<\/id>","(","<id>","elements","<\/id>",",","new","<id>","function","<\/id>","<","<id>","psi","Element","<\/id>",",","<id>","psi","Element","<\/id>",">","(",")","{","@","<id>","override","<\/id>","Public","<id>","psi","Element","<\/id>","<id>","fun","<\/id>","(","<id>","psi","Element","<\/id>","<id>","element","<\/id>",")","{","return","<id>","element","<\/id>","Instanceof","<id>","psi","File","<\/id>","&&","!","(","(","<id>","psi","File","<\/id>",")","<id>","element","<\/id>",")",".","<id>","get","View","Provider","<\/id>","(",")",".","<id>","is","Physical","<\/id>","(",")","?","null",":","<id>","adjust","Element","<\/id>","(","<id>","element","<\/id>",")",";","}","}",")",";","}","<SENTENCE_END\/>"],"file_name":"CopyReferenceAction.java","formatted_lines":["{"," List<PsiElement> elements = ContainerUtil.newArrayList();"," if (editor != null)"," {"," PsiReference reference = TargetElementUtil.findReference(editor);"," if (reference != null)"," {"," ContainerUtil.addIfNotNull(elements, reference.getElement());"," }"," }",""," if (elements.isEmpty())"," {"," ContainerUtil.addIfNotNull(elements,"," CommonDataKeys.PSI_ELEMENT.getData(dataContext));"," }",""," if (elements.isEmpty() && editor == null)"," {"," final Project project = CommonDataKeys.PROJECT.getData(dataContext);"," VirtualFile[] files = CommonDataKeys.VIRTUAL_FILE_ARRAY.getData(dataContext);"," if (project != null && files != null)"," {"," for (VirtualFile file : files)"," {"," ContainerUtil.addIfNotNull(elements,"," PsiManager.getInstance(project).findFile(file));"," }"," }"," }",""," return ContainerUtil.mapNotNull(elements,"," new Function<PsiElement, PsiElement>()"," {"," @Override"," public PsiElement fun(PsiElement element)"," {"," return element instanceof PsiFile &&"," !((PsiFile)element).getViewProvider().isPhysical() ? null : adjustElement("," element);"," }"," });","}"],"function_name":"getElementsToCopy","function_name_tokens":["get","elements","to","copy"],"id_body_hash":"541b344eb721de6a763e87a7e1b46ceb","id_same_identifier_list":[0,1,2,3,4,4,5,6,7,8,8,9,10,10,10,11,12,13,14,15,16,17,18,19,20,21,21,22,23,24,24,24,25,26,26,27,28,29,30,31,32,33,34,35,36,37,38,38,39,40,40,40,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,57,58,59,60,61,62,62,63,64,64,64,64,65,66,67,68,68,68,69,70,70,71,72,72,73,74,74,75,76,77,78,79,80,81,82,83,83,84,85,86,87,88,89,90,91,92,93,94,95,96,96,96,97,98,99,100,100,101,102,102,103,104,105,105,106,107,108,109,110,110,110,111,112,112,112,113,114,114,115,116,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,132,133,134,135,136,137,138,138,139,140,140,140,140,141,142,143,144,144,145,146,146,147,148,149,150,151,151,152,153,154,155,156,157,158,159,160,161,161,162,163,163,163,164,165,166,167,168,169,170,170,171,172,172,173,174,175,176,177,178,179,180,180,181,182,183,183,184,185,186,187,188,189,190,190,191,192,193,194,195,195,196,197,198,199,200,200,200,201,202,203,204,204,205,206,207,208,209,210,210,211,212,213,214,215,216,217,218,219,220],"option_correct":"getElementsToCopy","options":["getElementsToCopy","getParametersAndSettings","doRefactoring","getElements","getTextValue","getCopy","copy"],"options_nlp":["get elements to copy","get parameters and settings","do refactoring","get elements","get text value","get copy","copy"],"options_random":["getParametersAndSettings","doRefactoring","getTextValue"],"options_tfidf":["getElements","copy","getCopy"],"project_name":"intellij-community","source_code_string":"@NotNull\n private static List<PsiElement> getElementsToCopy(@Nullable final Editor editor, final DataContext dataContext) {\n List<PsiElement> elements = ContainerUtil.newArrayList();\n if (editor != null) {\n PsiReference reference = TargetElementUtil.findReference(editor);\n if (reference != null) {\n ContainerUtil.addIfNotNull(elements, reference.getElement());\n }\n }\n\n if (elements.isEmpty()) {\n ContainerUtil.addIfNotNull(elements, CommonDataKeys.PSI_ELEMENT.getData(dataContext));\n }\n\n if (elements.isEmpty() && editor == null) {\n final Project project = CommonDataKeys.PROJECT.getData(dataContext);\n VirtualFile[] files = CommonDataKeys.VIRTUAL_FILE_ARRAY.getData(dataContext);\n if (project != null && files != null) {\n for (VirtualFile file : files) {\n ContainerUtil.addIfNotNull(elements, PsiManager.getInstance(project).findFile(file));\n }\n }\n }\n\n return ContainerUtil.mapNotNull(elements, new Function<PsiElement, PsiElement>() {\n @Override\n public PsiElement fun(PsiElement element) {\n return element instanceof PsiFile && !((PsiFile)element).getViewProvider().isPhysical() ? null : adjustElement(element);\n }\n });\n }","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"list","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"<","start_char":8,"line":1},{"index_id":3,"token_group":3,"text":"psi","start_char":9,"line":1},{"index_id":4,"token_group":4,"text":"Element","start_char":12,"line":1},{"index_id":5,"token_group":4,"text":">","start_char":19,"line":1},{"index_id":6,"token_group":5,"text":"elements","start_char":21,"line":1},{"index_id":7,"token_group":6,"text":"=","start_char":30,"line":1},{"index_id":8,"token_group":7,"text":"container","start_char":32,"line":1},{"index_id":9,"token_group":8,"text":"Util","start_char":41,"line":1},{"index_id":10,"token_group":8,"text":".","start_char":45,"line":1},{"index_id":11,"token_group":9,"text":"new","start_char":46,"line":1},{"index_id":12,"token_group":10,"text":"Array","start_char":49,"line":1},{"index_id":13,"token_group":10,"text":"List","start_char":54,"line":1},{"index_id":14,"token_group":10,"text":"(","start_char":58,"line":1},{"index_id":15,"token_group":11,"text":")","start_char":59,"line":1},{"index_id":16,"token_group":12,"text":";","start_char":60,"line":1},{"index_id":17,"token_group":13,"text":"if","start_char":4,"line":2},{"index_id":18,"token_group":14,"text":"(","start_char":7,"line":2},{"index_id":19,"token_group":15,"text":"editor","start_char":8,"line":2},{"index_id":20,"token_group":16,"text":"!=","start_char":15,"line":2},{"index_id":21,"token_group":17,"text":"null","start_char":18,"line":2},{"index_id":22,"token_group":18,"text":")","start_char":22,"line":2},{"index_id":23,"token_group":19,"text":"{","start_char":4,"line":3},{"index_id":24,"token_group":20,"text":"psi","start_char":8,"line":4},{"index_id":25,"token_group":21,"text":"Reference","start_char":11,"line":4},{"index_id":26,"token_group":21,"text":"reference","start_char":21,"line":4},{"index_id":27,"token_group":22,"text":"=","start_char":31,"line":4},{"index_id":28,"token_group":23,"text":"target","start_char":33,"line":4},{"index_id":29,"token_group":24,"text":"Element","start_char":39,"line":4},{"index_id":30,"token_group":24,"text":"Util","start_char":46,"line":4},{"index_id":31,"token_group":24,"text":".","start_char":50,"line":4},{"index_id":32,"token_group":25,"text":"find","start_char":51,"line":4},{"index_id":33,"token_group":26,"text":"Reference","start_char":55,"line":4},{"index_id":34,"token_group":26,"text":"(","start_char":64,"line":4},{"index_id":35,"token_group":27,"text":"editor","start_char":65,"line":4},{"index_id":36,"token_group":28,"text":")","start_char":71,"line":4},{"index_id":37,"token_group":29,"text":";","start_char":72,"line":4},{"index_id":38,"token_group":30,"text":"if","start_char":8,"line":5},{"index_id":39,"token_group":31,"text":"(","start_char":11,"line":5},{"index_id":40,"token_group":32,"text":"reference","start_char":12,"line":5},{"index_id":41,"token_group":33,"text":"!=","start_char":22,"line":5},{"index_id":42,"token_group":34,"text":"null","start_char":25,"line":5},{"index_id":43,"token_group":35,"text":")","start_char":29,"line":5},{"index_id":44,"token_group":36,"text":"{","start_char":8,"line":6},{"index_id":45,"token_group":37,"text":"container","start_char":12,"line":7},{"index_id":46,"token_group":38,"text":"Util","start_char":21,"line":7},{"index_id":47,"token_group":38,"text":".","start_char":25,"line":7},{"index_id":48,"token_group":39,"text":"add","start_char":26,"line":7},{"index_id":49,"token_group":40,"text":"If","start_char":29,"line":7},{"index_id":50,"token_group":40,"text":"Not","start_char":31,"line":7},{"index_id":51,"token_group":40,"text":"Null","start_char":34,"line":7},{"index_id":52,"token_group":40,"text":"(","start_char":38,"line":7},{"index_id":53,"token_group":41,"text":"elements","start_char":39,"line":7},{"index_id":54,"token_group":42,"text":",","start_char":47,"line":7},{"index_id":55,"token_group":43,"text":"reference","start_char":49,"line":7},{"index_id":56,"token_group":44,"text":".","start_char":58,"line":7},{"index_id":57,"token_group":45,"text":"get","start_char":59,"line":7},{"index_id":58,"token_group":46,"text":"Element","start_char":62,"line":7},{"index_id":59,"token_group":46,"text":"(","start_char":69,"line":7},{"index_id":60,"token_group":47,"text":")","start_char":70,"line":7},{"index_id":61,"token_group":48,"text":")","start_char":71,"line":7},{"index_id":62,"token_group":49,"text":";","start_char":72,"line":7},{"index_id":63,"token_group":50,"text":"}","start_char":8,"line":8},{"index_id":64,"token_group":51,"text":"}","start_char":4,"line":9},{"index_id":65,"token_group":52,"text":"if","start_char":4,"line":11},{"index_id":66,"token_group":53,"text":"(","start_char":7,"line":11},{"index_id":67,"token_group":54,"text":"elements","start_char":8,"line":11},{"index_id":68,"token_group":55,"text":".","start_char":16,"line":11},{"index_id":69,"token_group":56,"text":"is","start_char":17,"line":11},{"index_id":70,"token_group":57,"text":"Empty","start_char":19,"line":11},{"index_id":71,"token_group":57,"text":"(","start_char":24,"line":11},{"index_id":72,"token_group":58,"text":")","start_char":25,"line":11},{"index_id":73,"token_group":59,"text":")","start_char":26,"line":11},{"index_id":74,"token_group":60,"text":"{","start_char":4,"line":12},{"index_id":75,"token_group":61,"text":"container","start_char":8,"line":13},{"index_id":76,"token_group":62,"text":"Util","start_char":17,"line":13},{"index_id":77,"token_group":62,"text":".","start_char":21,"line":13},{"index_id":78,"token_group":63,"text":"add","start_char":22,"line":13},{"index_id":79,"token_group":64,"text":"If","start_char":25,"line":13},{"index_id":80,"token_group":64,"text":"Not","start_char":27,"line":13},{"index_id":81,"token_group":64,"text":"Null","start_char":30,"line":13},{"index_id":82,"token_group":64,"text":"(","start_char":34,"line":13},{"index_id":83,"token_group":65,"text":"elements","start_char":35,"line":13},{"index_id":84,"token_group":66,"text":",","start_char":43,"line":13},{"index_id":85,"token_group":67,"text":"common","start_char":35,"line":14},{"index_id":86,"token_group":68,"text":"Data","start_char":41,"line":14},{"index_id":87,"token_group":68,"text":"Keys","start_char":45,"line":14},{"index_id":88,"token_group":68,"text":".","start_char":49,"line":14},{"index_id":89,"token_group":69,"text":"psi","start_char":50,"line":14},{"index_id":90,"token_group":70,"text":"Element","start_char":54,"line":14},{"index_id":91,"token_group":70,"text":".","start_char":61,"line":14},{"index_id":92,"token_group":71,"text":"get","start_char":62,"line":14},{"index_id":93,"token_group":72,"text":"Data","start_char":65,"line":14},{"index_id":94,"token_group":72,"text":"(","start_char":69,"line":14},{"index_id":95,"token_group":73,"text":"data","start_char":70,"line":14},{"index_id":96,"token_group":74,"text":"Context","start_char":74,"line":14},{"index_id":97,"token_group":74,"text":")","start_char":81,"line":14},{"index_id":98,"token_group":75,"text":")","start_char":82,"line":14},{"index_id":99,"token_group":76,"text":";","start_char":83,"line":14},{"index_id":100,"token_group":77,"text":"}","start_char":4,"line":15},{"index_id":101,"token_group":78,"text":"if","start_char":4,"line":17},{"index_id":102,"token_group":79,"text":"(","start_char":7,"line":17},{"index_id":103,"token_group":80,"text":"elements","start_char":8,"line":17},{"index_id":104,"token_group":81,"text":".","start_char":16,"line":17},{"index_id":105,"token_group":82,"text":"is","start_char":17,"line":17},{"index_id":106,"token_group":83,"text":"Empty","start_char":19,"line":17},{"index_id":107,"token_group":83,"text":"(","start_char":24,"line":17},{"index_id":108,"token_group":84,"text":")","start_char":25,"line":17},{"index_id":109,"token_group":85,"text":"&&","start_char":27,"line":17},{"index_id":110,"token_group":86,"text":"editor","start_char":30,"line":17},{"index_id":111,"token_group":87,"text":"==","start_char":37,"line":17},{"index_id":112,"token_group":88,"text":"null","start_char":40,"line":17},{"index_id":113,"token_group":89,"text":")","start_char":44,"line":17},{"index_id":114,"token_group":90,"text":"{","start_char":4,"line":18},{"index_id":115,"token_group":91,"text":"final","start_char":8,"line":19},{"index_id":116,"token_group":92,"text":"project","start_char":14,"line":19},{"index_id":117,"token_group":93,"text":"project","start_char":22,"line":19},{"index_id":118,"token_group":94,"text":"=","start_char":30,"line":19},{"index_id":119,"token_group":95,"text":"common","start_char":32,"line":19},{"index_id":120,"token_group":96,"text":"Data","start_char":38,"line":19},{"index_id":121,"token_group":96,"text":"Keys","start_char":42,"line":19},{"index_id":122,"token_group":96,"text":".","start_char":46,"line":19},{"index_id":123,"token_group":97,"text":"project","start_char":47,"line":19},{"index_id":124,"token_group":98,"text":".","start_char":54,"line":19},{"index_id":125,"token_group":99,"text":"get","start_char":55,"line":19},{"index_id":126,"token_group":100,"text":"Data","start_char":58,"line":19},{"index_id":127,"token_group":100,"text":"(","start_char":62,"line":19},{"index_id":128,"token_group":101,"text":"data","start_char":63,"line":19},{"index_id":129,"token_group":102,"text":"Context","start_char":67,"line":19},{"index_id":130,"token_group":102,"text":")","start_char":74,"line":19},{"index_id":131,"token_group":103,"text":";","start_char":75,"line":19},{"index_id":132,"token_group":104,"text":"virtual","start_char":8,"line":20},{"index_id":133,"token_group":105,"text":"File","start_char":15,"line":20},{"index_id":134,"token_group":105,"text":"[","start_char":19,"line":20},{"index_id":135,"token_group":106,"text":"]","start_char":20,"line":20},{"index_id":136,"token_group":107,"text":"files","start_char":22,"line":20},{"index_id":137,"token_group":108,"text":"=","start_char":28,"line":20},{"index_id":138,"token_group":109,"text":"common","start_char":30,"line":20},{"index_id":139,"token_group":110,"text":"Data","start_char":36,"line":20},{"index_id":140,"token_group":110,"text":"Keys","start_char":40,"line":20},{"index_id":141,"token_group":110,"text":".","start_char":44,"line":20},{"index_id":142,"token_group":111,"text":"virtual","start_char":45,"line":20},{"index_id":143,"token_group":112,"text":"File","start_char":53,"line":20},{"index_id":144,"token_group":112,"text":"Array","start_char":58,"line":20},{"index_id":145,"token_group":112,"text":".","start_char":63,"line":20},{"index_id":146,"token_group":113,"text":"get","start_char":64,"line":20},{"index_id":147,"token_group":114,"text":"Data","start_char":67,"line":20},{"index_id":148,"token_group":114,"text":"(","start_char":71,"line":20},{"index_id":149,"token_group":115,"text":"data","start_char":72,"line":20},{"index_id":150,"token_group":116,"text":"Context","start_char":76,"line":20},{"index_id":151,"token_group":116,"text":")","start_char":83,"line":20},{"index_id":152,"token_group":117,"text":";","start_char":84,"line":20},{"index_id":153,"token_group":118,"text":"if","start_char":8,"line":21},{"index_id":154,"token_group":119,"text":"(","start_char":11,"line":21},{"index_id":155,"token_group":120,"text":"project","start_char":12,"line":21},{"index_id":156,"token_group":121,"text":"!=","start_char":20,"line":21},{"index_id":157,"token_group":122,"text":"null","start_char":23,"line":21},{"index_id":158,"token_group":123,"text":"&&","start_char":28,"line":21},{"index_id":159,"token_group":124,"text":"files","start_char":31,"line":21},{"index_id":160,"token_group":125,"text":"!=","start_char":37,"line":21},{"index_id":161,"token_group":126,"text":"null","start_char":40,"line":21},{"index_id":162,"token_group":127,"text":")","start_char":44,"line":21},{"index_id":163,"token_group":128,"text":"{","start_char":8,"line":22},{"index_id":164,"token_group":129,"text":"for","start_char":12,"line":23},{"index_id":165,"token_group":130,"text":"(","start_char":16,"line":23},{"index_id":166,"token_group":131,"text":"virtual","start_char":17,"line":23},{"index_id":167,"token_group":132,"text":"File","start_char":24,"line":23},{"index_id":168,"token_group":132,"text":"file","start_char":29,"line":23},{"index_id":169,"token_group":133,"text":":","start_char":34,"line":23},{"index_id":170,"token_group":134,"text":"files","start_char":36,"line":23},{"index_id":171,"token_group":135,"text":")","start_char":41,"line":23},{"index_id":172,"token_group":136,"text":"{","start_char":12,"line":24},{"index_id":173,"token_group":137,"text":"container","start_char":16,"line":25},{"index_id":174,"token_group":138,"text":"Util","start_char":25,"line":25},{"index_id":175,"token_group":138,"text":".","start_char":29,"line":25},{"index_id":176,"token_group":139,"text":"add","start_char":30,"line":25},{"index_id":177,"token_group":140,"text":"If","start_char":33,"line":25},{"index_id":178,"token_group":140,"text":"Not","start_char":35,"line":25},{"index_id":179,"token_group":140,"text":"Null","start_char":38,"line":25},{"index_id":180,"token_group":140,"text":"(","start_char":42,"line":25},{"index_id":181,"token_group":141,"text":"elements","start_char":43,"line":25},{"index_id":182,"token_group":142,"text":",","start_char":51,"line":25},{"index_id":183,"token_group":143,"text":"psi","start_char":43,"line":26},{"index_id":184,"token_group":144,"text":"Manager","start_char":46,"line":26},{"index_id":185,"token_group":144,"text":".","start_char":53,"line":26},{"index_id":186,"token_group":145,"text":"get","start_char":54,"line":26},{"index_id":187,"token_group":146,"text":"Instance","start_char":57,"line":26},{"index_id":188,"token_group":146,"text":"(","start_char":65,"line":26},{"index_id":189,"token_group":147,"text":"project","start_char":66,"line":26},{"index_id":190,"token_group":148,"text":")","start_char":73,"line":26},{"index_id":191,"token_group":149,"text":".","start_char":74,"line":26},{"index_id":192,"token_group":150,"text":"find","start_char":75,"line":26},{"index_id":193,"token_group":151,"text":"File","start_char":79,"line":26},{"index_id":194,"token_group":151,"text":"(","start_char":83,"line":26},{"index_id":195,"token_group":152,"text":"file","start_char":84,"line":26},{"index_id":196,"token_group":153,"text":")","start_char":88,"line":26},{"index_id":197,"token_group":154,"text":")","start_char":89,"line":26},{"index_id":198,"token_group":155,"text":";","start_char":90,"line":26},{"index_id":199,"token_group":156,"text":"}","start_char":12,"line":27},{"index_id":200,"token_group":157,"text":"}","start_char":8,"line":28},{"index_id":201,"token_group":158,"text":"}","start_char":4,"line":29},{"index_id":202,"token_group":159,"text":"return","start_char":4,"line":31},{"index_id":203,"token_group":160,"text":"container","start_char":11,"line":31},{"index_id":204,"token_group":161,"text":"Util","start_char":20,"line":31},{"index_id":205,"token_group":161,"text":".","start_char":24,"line":31},{"index_id":206,"token_group":162,"text":"map","start_char":25,"line":31},{"index_id":207,"token_group":163,"text":"Not","start_char":28,"line":31},{"index_id":208,"token_group":163,"text":"Null","start_char":31,"line":31},{"index_id":209,"token_group":163,"text":"(","start_char":35,"line":31},{"index_id":210,"token_group":164,"text":"elements","start_char":36,"line":31},{"index_id":211,"token_group":165,"text":",","start_char":44,"line":31},{"index_id":212,"token_group":166,"text":"new","start_char":36,"line":32},{"index_id":213,"token_group":167,"text":"function","start_char":40,"line":32},{"index_id":214,"token_group":168,"text":"<","start_char":48,"line":32},{"index_id":215,"token_group":169,"text":"psi","start_char":49,"line":32},{"index_id":216,"token_group":170,"text":"Element","start_char":52,"line":32},{"index_id":217,"token_group":170,"text":",","start_char":59,"line":32},{"index_id":218,"token_group":171,"text":"psi","start_char":61,"line":32},{"index_id":219,"token_group":172,"text":"Element","start_char":64,"line":32},{"index_id":220,"token_group":172,"text":">","start_char":71,"line":32},{"index_id":221,"token_group":173,"text":"(","start_char":72,"line":32},{"index_id":222,"token_group":174,"text":")","start_char":73,"line":32},{"index_id":223,"token_group":175,"text":"{","start_char":4,"line":33},{"index_id":224,"token_group":176,"text":"@","start_char":8,"line":34},{"index_id":225,"token_group":177,"text":"override","start_char":9,"line":34},{"index_id":226,"token_group":178,"text":"Public","start_char":8,"line":35},{"index_id":227,"token_group":179,"text":"psi","start_char":15,"line":35},{"index_id":228,"token_group":180,"text":"Element","start_char":18,"line":35},{"index_id":229,"token_group":180,"text":"fun","start_char":26,"line":35},{"index_id":230,"token_group":181,"text":"(","start_char":29,"line":35},{"index_id":231,"token_group":182,"text":"psi","start_char":30,"line":35},{"index_id":232,"token_group":183,"text":"Element","start_char":33,"line":35},{"index_id":233,"token_group":183,"text":"element","start_char":41,"line":35},{"index_id":234,"token_group":184,"text":")","start_char":48,"line":35},{"index_id":235,"token_group":185,"text":"{","start_char":8,"line":36},{"index_id":236,"token_group":186,"text":"return","start_char":12,"line":37},{"index_id":237,"token_group":187,"text":"element","start_char":19,"line":37},{"index_id":238,"token_group":188,"text":"Instanceof","start_char":27,"line":37},{"index_id":239,"token_group":189,"text":"psi","start_char":38,"line":37},{"index_id":240,"token_group":190,"text":"File","start_char":41,"line":37},{"index_id":241,"token_group":190,"text":"&&","start_char":46,"line":37},{"index_id":242,"token_group":191,"text":"!","start_char":19,"line":38},{"index_id":243,"token_group":192,"text":"(","start_char":20,"line":38},{"index_id":244,"token_group":193,"text":"(","start_char":21,"line":38},{"index_id":245,"token_group":194,"text":"psi","start_char":22,"line":38},{"index_id":246,"token_group":195,"text":"File","start_char":25,"line":38},{"index_id":247,"token_group":195,"text":")","start_char":29,"line":38},{"index_id":248,"token_group":196,"text":"element","start_char":30,"line":38},{"index_id":249,"token_group":197,"text":")","start_char":37,"line":38},{"index_id":250,"token_group":198,"text":".","start_char":38,"line":38},{"index_id":251,"token_group":199,"text":"get","start_char":39,"line":38},{"index_id":252,"token_group":200,"text":"View","start_char":42,"line":38},{"index_id":253,"token_group":200,"text":"Provider","start_char":46,"line":38},{"index_id":254,"token_group":200,"text":"(","start_char":54,"line":38},{"index_id":255,"token_group":201,"text":")","start_char":55,"line":38},{"index_id":256,"token_group":202,"text":".","start_char":56,"line":38},{"index_id":257,"token_group":203,"text":"is","start_char":57,"line":38},{"index_id":258,"token_group":204,"text":"Physical","start_char":59,"line":38},{"index_id":259,"token_group":204,"text":"(","start_char":67,"line":38},{"index_id":260,"token_group":205,"text":")","start_char":68,"line":38},{"index_id":261,"token_group":206,"text":"?","start_char":70,"line":38},{"index_id":262,"token_group":207,"text":"null","start_char":72,"line":38},{"index_id":263,"token_group":208,"text":":","start_char":77,"line":38},{"index_id":264,"token_group":209,"text":"adjust","start_char":79,"line":38},{"index_id":265,"token_group":210,"text":"Element","start_char":85,"line":38},{"index_id":266,"token_group":210,"text":"(","start_char":92,"line":38},{"index_id":267,"token_group":211,"text":"element","start_char":23,"line":39},{"index_id":268,"token_group":212,"text":")","start_char":30,"line":39},{"index_id":269,"token_group":213,"text":";","start_char":31,"line":39},{"index_id":270,"token_group":214,"text":"}","start_char":8,"line":40},{"index_id":271,"token_group":215,"text":"}","start_char":4,"line":41},{"index_id":272,"token_group":216,"text":")","start_char":5,"line":41},{"index_id":273,"token_group":217,"text":";","start_char":6,"line":41},{"index_id":274,"token_group":218,"text":"}","start_char":0,"line":42}],"tokens_list":["{","list","<","psi","Element",">","elements","=","container","Util",".","new","Array","List","(",")",";","if","(","editor","!=","null",")","{","psi","Reference","reference","=","target","Element","Util",".","find","Reference","(","editor",")",";","if","(","reference","!=","null",")","{","container","Util",".","add","If","Not","Null","(","elements",",","reference",".","get","Element","(",")",")",";","}","}","if","(","elements",".","is","Empty","(",")",")","{","container","Util",".","add","If","Not","Null","(","elements",",","common","Data","Keys",".","psi","Element",".","get","Data","(","data","Context",")",")",";","}","if","(","elements",".","is","Empty","(",")","&&","editor","==","null",")","{","final","project","project","=","common","Data","Keys",".","project",".","get","Data","(","data","Context",")",";","virtual","File","[","]","files","=","common","Data","Keys",".","virtual","File","Array",".","get","Data","(","data","Context",")",";","if","(","project","!=","null","&&","files","!=","null",")","{","for","(","virtual","File","file",":","files",")","{","container","Util",".","add","If","Not","Null","(","elements",",","psi","Manager",".","get","Instance","(","project",")",".","find","File","(","file",")",")",";","}","}","}","return","container","Util",".","map","Not","Null","(","elements",",","new","function","<","psi","Element",",","psi","Element",">","(",")","{","@","override","Public","psi","Element","fun","(","psi","Element","element",")","{","return","element","Instanceof","psi","File","&&","!","(","(","psi","File",")","element",")",".","get","View","Provider","(",")",".","is","Physical","(",")","?","null",":","adjust","Element","(","element",")",";","}","}",")",";","}"],"uuid":"a0d99d3047629c3c4ff1924dd4f2760c"},{"cap_original_tokens":["<SENTENCE_START>","{","<id>","string","<\/id>","<id>","status","<\/id>",",","<id>","state","<\/id>",",","<id>","load","<\/id>",",","<id>","str","Owns","<\/id>",",","<id>","host","Id","<\/id>",",","<id>","rack","<\/id>",",","<id>","fmt","<\/id>",";","<id>","fmt","<\/id>","=","<id>","get","Format","<\/id>","(","<id>","has","Effective","Owns","<\/id>",",","<id>","is","Token","Per","Node","<\/id>",")",";","if","(","<id>","live","Nodes","<\/id>",".","<id>","contains","<\/id>","(","<id>","endpoint","<\/id>",")",")","<id>","status","<\/id>","=","\"U\"",";","else","if","(","<id>","unreachable","Nodes","<\/id>",".","<id>","contains","<\/id>","(","<id>","endpoint","<\/id>",")",")","<id>","status","<\/id>","=","\"D\"",";","else","<id>","status","<\/id>","=","\"?\"",";","if","(","<id>","joining","Nodes","<\/id>",".","<id>","contains","<\/id>","(","<id>","endpoint","<\/id>",")",")","<id>","state","<\/id>","=","\"J\"",";","else","if","(","<id>","leaving","Nodes","<\/id>",".","<id>","contains","<\/id>","(","<id>","endpoint","<\/id>",")",")","<id>","state","<\/id>","=","\"L\"",";","else","if","(","<id>","moving","Nodes","<\/id>",".","<id>","contains","<\/id>","(","<id>","endpoint","<\/id>",")",")","<id>","state","<\/id>","=","\"M\"",";","else","<id>","state","<\/id>","=","\"N\"",";","<id>","load","<\/id>","=","<id>","load","Map","<\/id>",".","<id>","contains","Key","<\/id>","(","<id>","endpoint","<\/id>",")","?","<id>","load","Map","<\/id>",".","<id>","get","<\/id>","(","<id>","endpoint","<\/id>",")",":","\"?\"",";","<id>","str","Owns","<\/id>","=","<id>","owns","<\/id>","!=","null","&&","<id>","has","Effective","Owns","<\/id>","?","new","<id>","decimal","Format","<\/id>","(","\"##0.0%\"",")",".","<id>","format","<\/id>","(","<id>","owns","<\/id>",")",":","\"?\"",";","<id>","host","Id","<\/id>","=","<id>","host","Id","Map","<\/id>",".","<id>","get","<\/id>","(","<id>","endpoint","<\/id>",")",";","try","{","<id>","rack","<\/id>","=","<id>","ep","Snitch","Info","<\/id>",".","<id>","get","Rack","<\/id>","(","<id>","endpoint","<\/id>",")",";","}","catch","(","<id>","unknown","Host","Exception","<\/id>","<id>","e","<\/id>",")","{","throw","new","<id>","runtime","Exception","<\/id>","(","<id>","e","<\/id>",")",";","}","<id>","string","<\/id>","<id>","endpoint","Dns","<\/id>","=","<id>","tokens","<\/id>",".","<id>","get","<\/id>","(","0",")",".","<id>","ip","Or","Dns","<\/id>","(",")",";","if","(","<id>","is","Token","Per","Node","<\/id>",")","<id>","system","<\/id>",".","<id>","out","<\/id>",".","<id>","printf","<\/id>","(","<id>","fmt","<\/id>",",","<id>","status","<\/id>",",","<id>","state","<\/id>",",","<id>","endpoint","Dns","<\/id>",",","<id>","load","<\/id>",",","<id>","str","Owns","<\/id>",",","<id>","host","Id","<\/id>",",","<id>","tokens","<\/id>",".","<id>","get","<\/id>","(","0",")",".","<id>","token","<\/id>",",","<id>","rack","<\/id>",")",";","else","<id>","system","<\/id>",".","<id>","out","<\/id>",".","<id>","printf","<\/id>","(","<id>","fmt","<\/id>",",","<id>","status","<\/id>",",","<id>","state","<\/id>",",","<id>","endpoint","Dns","<\/id>",",","<id>","load","<\/id>",",","<id>","tokens","<\/id>",".","<id>","size","<\/id>","(",")",",","<id>","str","Owns","<\/id>",",","<id>","host","Id","<\/id>",",","<id>","rack","<\/id>",")",";","}","<SENTENCE_END\/>"],"file_name":"Status.java","formatted_lines":["{"," String status, state, load, strOwns, hostID, rack, fmt;"," fmt = getFormat(hasEffectiveOwns, isTokenPerNode);"," if (liveNodes.contains(endpoint)) status = \"U\";"," else if (unreachableNodes.contains(endpoint)) status = \"D\";"," else status = \"?\";"," if (joiningNodes.contains(endpoint)) state = \"J\";"," else if (leavingNodes.contains(endpoint)) state = \"L\";"," else if (movingNodes.contains(endpoint)) state = \"M\";"," else state = \"N\";",""," load = loadMap.containsKey(endpoint) ? loadMap.get(endpoint) : \"?\";"," strOwns = owns != null &&"," hasEffectiveOwns ? new DecimalFormat(\"##0.0%\").format(owns) : \"?\";"," hostID = hostIDMap.get(endpoint);",""," try"," {"," rack = epSnitchInfo.getRack(endpoint);"," }"," catch (UnknownHostException e)"," {"," throw new RuntimeException(e);"," }",""," String endpointDns = tokens.get(0).ipOrDns();"," if (isTokenPerNode)"," System.out.printf(fmt, status, state, endpointDns, load, strOwns, hostID,"," tokens.get(0).token, rack);"," else"," System.out.printf(fmt, status, state, endpointDns, load, tokens.size(), strOwns,"," hostID, rack);","}"],"function_name":"printNode","function_name_tokens":["print","node"],"id_body_hash":"05c4ce4bae82049897a8725b27a43260","id_same_identifier_list":[0,1,2,3,4,5,6,7,8,9,9,10,11,11,12,13,14,15,16,17,18,19,19,20,21,21,21,22,23,23,23,23,24,25,26,27,28,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,106,107,108,108,109,110,111,112,113,113,114,115,116,117,118,119,120,121,122,122,123,124,125,126,127,128,128,128,129,130,131,131,132,133,134,135,136,137,138,139,140,141,142,143,143,144,145,145,145,146,147,148,149,150,151,152,153,154,155,156,156,156,157,158,158,159,160,161,162,163,164,165,166,166,166,167,168,169,170,171,172,172,173,174,175,176,177,178,179,179,180,181,182,183,184,185,186,187,188,188,188,189,190,191,192,193,194,194,194,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,208,209,210,211,212,212,213,214,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,241,242,243,244,245,246,247,248,249,250,251,251,252,253,253,254,255,256,257,258,259],"option_correct":"printNode","options":["makeNode","getAbstractType","begin","updateTTL","toNode","printOptions","printNode"],"options_nlp":["make node","get abstract type","begin","update ttl","to node","print options","print node"],"options_random":["updateTTL","getAbstractType","begin"],"options_tfidf":["toNode","printOptions","makeNode"],"project_name":"cassandra","source_code_string":"private void printNode(String endpoint, Float owns, List<HostStat> tokens, boolean hasEffectiveOwns, boolean isTokenPerNode)\n {\n String status, state, load, strOwns, hostID, rack, fmt;\n fmt = getFormat(hasEffectiveOwns, isTokenPerNode);\n if (liveNodes.contains(endpoint)) status = \"U\";\n else if (unreachableNodes.contains(endpoint)) status = \"D\";\n else status = \"?\";\n if (joiningNodes.contains(endpoint)) state = \"J\";\n else if (leavingNodes.contains(endpoint)) state = \"L\";\n else if (movingNodes.contains(endpoint)) state = \"M\";\n else state = \"N\";\n\n load = loadMap.containsKey(endpoint) ? loadMap.get(endpoint) : \"?\";\n strOwns = owns != null && hasEffectiveOwns ? new DecimalFormat(\"##0.0%\").format(owns) : \"?\";\n hostID = hostIDMap.get(endpoint);\n\n try\n {\n rack = epSnitchInfo.getRack(endpoint);\n } catch (UnknownHostException e)\n {\n throw new RuntimeException(e);\n }\n\n String endpointDns = tokens.get(0).ipOrDns();\n if (isTokenPerNode)\n System.out.printf(fmt, status, state, endpointDns, load, strOwns, hostID, tokens.get(0).token, rack);\n else\n System.out.printf(fmt, status, state, endpointDns, load, tokens.size(), strOwns, hostID, rack);\n }","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"string","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"status","start_char":11,"line":1},{"index_id":3,"token_group":3,"text":",","start_char":17,"line":1},{"index_id":4,"token_group":4,"text":"state","start_char":19,"line":1},{"index_id":5,"token_group":5,"text":",","start_char":24,"line":1},{"index_id":6,"token_group":6,"text":"load","start_char":26,"line":1},{"index_id":7,"token_group":7,"text":",","start_char":30,"line":1},{"index_id":8,"token_group":8,"text":"str","start_char":32,"line":1},{"index_id":9,"token_group":9,"text":"Owns","start_char":35,"line":1},{"index_id":10,"token_group":9,"text":",","start_char":39,"line":1},{"index_id":11,"token_group":10,"text":"host","start_char":41,"line":1},{"index_id":12,"token_group":11,"text":"Id","start_char":45,"line":1},{"index_id":13,"token_group":11,"text":",","start_char":47,"line":1},{"index_id":14,"token_group":12,"text":"rack","start_char":49,"line":1},{"index_id":15,"token_group":13,"text":",","start_char":53,"line":1},{"index_id":16,"token_group":14,"text":"fmt","start_char":55,"line":1},{"index_id":17,"token_group":15,"text":";","start_char":58,"line":1},{"index_id":18,"token_group":16,"text":"fmt","start_char":4,"line":2},{"index_id":19,"token_group":17,"text":"=","start_char":8,"line":2},{"index_id":20,"token_group":18,"text":"get","start_char":10,"line":2},{"index_id":21,"token_group":19,"text":"Format","start_char":13,"line":2},{"index_id":22,"token_group":19,"text":"(","start_char":19,"line":2},{"index_id":23,"token_group":20,"text":"has","start_char":20,"line":2},{"index_id":24,"token_group":21,"text":"Effective","start_char":23,"line":2},{"index_id":25,"token_group":21,"text":"Owns","start_char":32,"line":2},{"index_id":26,"token_group":21,"text":",","start_char":36,"line":2},{"index_id":27,"token_group":22,"text":"is","start_char":38,"line":2},{"index_id":28,"token_group":23,"text":"Token","start_char":40,"line":2},{"index_id":29,"token_group":23,"text":"Per","start_char":45,"line":2},{"index_id":30,"token_group":23,"text":"Node","start_char":48,"line":2},{"index_id":31,"token_group":23,"text":")","start_char":52,"line":2},{"index_id":32,"token_group":24,"text":";","start_char":53,"line":2},{"index_id":33,"token_group":25,"text":"if","start_char":4,"line":3},{"index_id":34,"token_group":26,"text":"(","start_char":7,"line":3},{"index_id":35,"token_group":27,"text":"live","start_char":8,"line":3},{"index_id":36,"token_group":28,"text":"Nodes","start_char":12,"line":3},{"index_id":37,"token_group":28,"text":".","start_char":17,"line":3},{"index_id":38,"token_group":29,"text":"contains","start_char":18,"line":3},{"index_id":39,"token_group":30,"text":"(","start_char":26,"line":3},{"index_id":40,"token_group":31,"text":"endpoint","start_char":27,"line":3},{"index_id":41,"token_group":32,"text":")","start_char":35,"line":3},{"index_id":42,"token_group":33,"text":")","start_char":36,"line":3},{"index_id":43,"token_group":34,"text":"status","start_char":38,"line":3},{"index_id":44,"token_group":35,"text":"=","start_char":45,"line":3},{"index_id":45,"token_group":36,"text":"\"U\"","start_char":47,"line":3},{"index_id":46,"token_group":37,"text":";","start_char":50,"line":3},{"index_id":47,"token_group":38,"text":"else","start_char":4,"line":4},{"index_id":48,"token_group":39,"text":"if","start_char":9,"line":4},{"index_id":49,"token_group":40,"text":"(","start_char":12,"line":4},{"index_id":50,"token_group":41,"text":"unreachable","start_char":13,"line":4},{"index_id":51,"token_group":42,"text":"Nodes","start_char":24,"line":4},{"index_id":52,"token_group":42,"text":".","start_char":29,"line":4},{"index_id":53,"token_group":43,"text":"contains","start_char":30,"line":4},{"index_id":54,"token_group":44,"text":"(","start_char":38,"line":4},{"index_id":55,"token_group":45,"text":"endpoint","start_char":39,"line":4},{"index_id":56,"token_group":46,"text":")","start_char":47,"line":4},{"index_id":57,"token_group":47,"text":")","start_char":48,"line":4},{"index_id":58,"token_group":48,"text":"status","start_char":50,"line":4},{"index_id":59,"token_group":49,"text":"=","start_char":57,"line":4},{"index_id":60,"token_group":50,"text":"\"D\"","start_char":59,"line":4},{"index_id":61,"token_group":51,"text":";","start_char":62,"line":4},{"index_id":62,"token_group":52,"text":"else","start_char":4,"line":5},{"index_id":63,"token_group":53,"text":"status","start_char":9,"line":5},{"index_id":64,"token_group":54,"text":"=","start_char":16,"line":5},{"index_id":65,"token_group":55,"text":"\"?\"","start_char":18,"line":5},{"index_id":66,"token_group":56,"text":";","start_char":21,"line":5},{"index_id":67,"token_group":57,"text":"if","start_char":4,"line":6},{"index_id":68,"token_group":58,"text":"(","start_char":7,"line":6},{"index_id":69,"token_group":59,"text":"joining","start_char":8,"line":6},{"index_id":70,"token_group":60,"text":"Nodes","start_char":15,"line":6},{"index_id":71,"token_group":60,"text":".","start_char":20,"line":6},{"index_id":72,"token_group":61,"text":"contains","start_char":21,"line":6},{"index_id":73,"token_group":62,"text":"(","start_char":29,"line":6},{"index_id":74,"token_group":63,"text":"endpoint","start_char":30,"line":6},{"index_id":75,"token_group":64,"text":")","start_char":38,"line":6},{"index_id":76,"token_group":65,"text":")","start_char":39,"line":6},{"index_id":77,"token_group":66,"text":"state","start_char":41,"line":6},{"index_id":78,"token_group":67,"text":"=","start_char":47,"line":6},{"index_id":79,"token_group":68,"text":"\"J\"","start_char":49,"line":6},{"index_id":80,"token_group":69,"text":";","start_char":52,"line":6},{"index_id":81,"token_group":70,"text":"else","start_char":4,"line":7},{"index_id":82,"token_group":71,"text":"if","start_char":9,"line":7},{"index_id":83,"token_group":72,"text":"(","start_char":12,"line":7},{"index_id":84,"token_group":73,"text":"leaving","start_char":13,"line":7},{"index_id":85,"token_group":74,"text":"Nodes","start_char":20,"line":7},{"index_id":86,"token_group":74,"text":".","start_char":25,"line":7},{"index_id":87,"token_group":75,"text":"contains","start_char":26,"line":7},{"index_id":88,"token_group":76,"text":"(","start_char":34,"line":7},{"index_id":89,"token_group":77,"text":"endpoint","start_char":35,"line":7},{"index_id":90,"token_group":78,"text":")","start_char":43,"line":7},{"index_id":91,"token_group":79,"text":")","start_char":44,"line":7},{"index_id":92,"token_group":80,"text":"state","start_char":46,"line":7},{"index_id":93,"token_group":81,"text":"=","start_char":52,"line":7},{"index_id":94,"token_group":82,"text":"\"L\"","start_char":54,"line":7},{"index_id":95,"token_group":83,"text":";","start_char":57,"line":7},{"index_id":96,"token_group":84,"text":"else","start_char":4,"line":8},{"index_id":97,"token_group":85,"text":"if","start_char":9,"line":8},{"index_id":98,"token_group":86,"text":"(","start_char":12,"line":8},{"index_id":99,"token_group":87,"text":"moving","start_char":13,"line":8},{"index_id":100,"token_group":88,"text":"Nodes","start_char":19,"line":8},{"index_id":101,"token_group":88,"text":".","start_char":24,"line":8},{"index_id":102,"token_group":89,"text":"contains","start_char":25,"line":8},{"index_id":103,"token_group":90,"text":"(","start_char":33,"line":8},{"index_id":104,"token_group":91,"text":"endpoint","start_char":34,"line":8},{"index_id":105,"token_group":92,"text":")","start_char":42,"line":8},{"index_id":106,"token_group":93,"text":")","start_char":43,"line":8},{"index_id":107,"token_group":94,"text":"state","start_char":45,"line":8},{"index_id":108,"token_group":95,"text":"=","start_char":51,"line":8},{"index_id":109,"token_group":96,"text":"\"M\"","start_char":53,"line":8},{"index_id":110,"token_group":97,"text":";","start_char":56,"line":8},{"index_id":111,"token_group":98,"text":"else","start_char":4,"line":9},{"index_id":112,"token_group":99,"text":"state","start_char":9,"line":9},{"index_id":113,"token_group":100,"text":"=","start_char":15,"line":9},{"index_id":114,"token_group":101,"text":"\"N\"","start_char":17,"line":9},{"index_id":115,"token_group":102,"text":";","start_char":20,"line":9},{"index_id":116,"token_group":103,"text":"load","start_char":4,"line":11},{"index_id":117,"token_group":104,"text":"=","start_char":9,"line":11},{"index_id":118,"token_group":105,"text":"load","start_char":11,"line":11},{"index_id":119,"token_group":106,"text":"Map","start_char":15,"line":11},{"index_id":120,"token_group":106,"text":".","start_char":18,"line":11},{"index_id":121,"token_group":107,"text":"contains","start_char":19,"line":11},{"index_id":122,"token_group":108,"text":"Key","start_char":27,"line":11},{"index_id":123,"token_group":108,"text":"(","start_char":30,"line":11},{"index_id":124,"token_group":109,"text":"endpoint","start_char":31,"line":11},{"index_id":125,"token_group":110,"text":")","start_char":39,"line":11},{"index_id":126,"token_group":111,"text":"?","start_char":41,"line":11},{"index_id":127,"token_group":112,"text":"load","start_char":43,"line":11},{"index_id":128,"token_group":113,"text":"Map","start_char":47,"line":11},{"index_id":129,"token_group":113,"text":".","start_char":50,"line":11},{"index_id":130,"token_group":114,"text":"get","start_char":51,"line":11},{"index_id":131,"token_group":115,"text":"(","start_char":54,"line":11},{"index_id":132,"token_group":116,"text":"endpoint","start_char":55,"line":11},{"index_id":133,"token_group":117,"text":")","start_char":63,"line":11},{"index_id":134,"token_group":118,"text":":","start_char":65,"line":11},{"index_id":135,"token_group":119,"text":"\"?\"","start_char":67,"line":11},{"index_id":136,"token_group":120,"text":";","start_char":70,"line":11},{"index_id":137,"token_group":121,"text":"str","start_char":4,"line":12},{"index_id":138,"token_group":122,"text":"Owns","start_char":7,"line":12},{"index_id":139,"token_group":122,"text":"=","start_char":12,"line":12},{"index_id":140,"token_group":123,"text":"owns","start_char":14,"line":12},{"index_id":141,"token_group":124,"text":"!=","start_char":19,"line":12},{"index_id":142,"token_group":125,"text":"null","start_char":22,"line":12},{"index_id":143,"token_group":126,"text":"&&","start_char":27,"line":12},{"index_id":144,"token_group":127,"text":"has","start_char":14,"line":13},{"index_id":145,"token_group":128,"text":"Effective","start_char":17,"line":13},{"index_id":146,"token_group":128,"text":"Owns","start_char":26,"line":13},{"index_id":147,"token_group":128,"text":"?","start_char":31,"line":13},{"index_id":148,"token_group":129,"text":"new","start_char":33,"line":13},{"index_id":149,"token_group":130,"text":"decimal","start_char":37,"line":13},{"index_id":150,"token_group":131,"text":"Format","start_char":44,"line":13},{"index_id":151,"token_group":131,"text":"(","start_char":50,"line":13},{"index_id":152,"token_group":132,"text":"\"##0.0%\"","start_char":51,"line":13},{"index_id":153,"token_group":133,"text":")","start_char":59,"line":13},{"index_id":154,"token_group":134,"text":".","start_char":60,"line":13},{"index_id":155,"token_group":135,"text":"format","start_char":61,"line":13},{"index_id":156,"token_group":136,"text":"(","start_char":67,"line":13},{"index_id":157,"token_group":137,"text":"owns","start_char":68,"line":13},{"index_id":158,"token_group":138,"text":")","start_char":72,"line":13},{"index_id":159,"token_group":139,"text":":","start_char":74,"line":13},{"index_id":160,"token_group":140,"text":"\"?\"","start_char":76,"line":13},{"index_id":161,"token_group":141,"text":";","start_char":79,"line":13},{"index_id":162,"token_group":142,"text":"host","start_char":4,"line":14},{"index_id":163,"token_group":143,"text":"Id","start_char":8,"line":14},{"index_id":164,"token_group":143,"text":"=","start_char":11,"line":14},{"index_id":165,"token_group":144,"text":"host","start_char":13,"line":14},{"index_id":166,"token_group":145,"text":"Id","start_char":17,"line":14},{"index_id":167,"token_group":145,"text":"Map","start_char":19,"line":14},{"index_id":168,"token_group":145,"text":".","start_char":22,"line":14},{"index_id":169,"token_group":146,"text":"get","start_char":23,"line":14},{"index_id":170,"token_group":147,"text":"(","start_char":26,"line":14},{"index_id":171,"token_group":148,"text":"endpoint","start_char":27,"line":14},{"index_id":172,"token_group":149,"text":")","start_char":35,"line":14},{"index_id":173,"token_group":150,"text":";","start_char":36,"line":14},{"index_id":174,"token_group":151,"text":"try","start_char":4,"line":16},{"index_id":175,"token_group":152,"text":"{","start_char":4,"line":17},{"index_id":176,"token_group":153,"text":"rack","start_char":8,"line":18},{"index_id":177,"token_group":154,"text":"=","start_char":13,"line":18},{"index_id":178,"token_group":155,"text":"ep","start_char":15,"line":18},{"index_id":179,"token_group":156,"text":"Snitch","start_char":17,"line":18},{"index_id":180,"token_group":156,"text":"Info","start_char":23,"line":18},{"index_id":181,"token_group":156,"text":".","start_char":27,"line":18},{"index_id":182,"token_group":157,"text":"get","start_char":28,"line":18},{"index_id":183,"token_group":158,"text":"Rack","start_char":31,"line":18},{"index_id":184,"token_group":158,"text":"(","start_char":35,"line":18},{"index_id":185,"token_group":159,"text":"endpoint","start_char":36,"line":18},{"index_id":186,"token_group":160,"text":")","start_char":44,"line":18},{"index_id":187,"token_group":161,"text":";","start_char":45,"line":18},{"index_id":188,"token_group":162,"text":"}","start_char":4,"line":19},{"index_id":189,"token_group":163,"text":"catch","start_char":4,"line":20},{"index_id":190,"token_group":164,"text":"(","start_char":10,"line":20},{"index_id":191,"token_group":165,"text":"unknown","start_char":11,"line":20},{"index_id":192,"token_group":166,"text":"Host","start_char":18,"line":20},{"index_id":193,"token_group":166,"text":"Exception","start_char":22,"line":20},{"index_id":194,"token_group":166,"text":"e","start_char":32,"line":20},{"index_id":195,"token_group":167,"text":")","start_char":33,"line":20},{"index_id":196,"token_group":168,"text":"{","start_char":4,"line":21},{"index_id":197,"token_group":169,"text":"throw","start_char":8,"line":22},{"index_id":198,"token_group":170,"text":"new","start_char":14,"line":22},{"index_id":199,"token_group":171,"text":"runtime","start_char":18,"line":22},{"index_id":200,"token_group":172,"text":"Exception","start_char":25,"line":22},{"index_id":201,"token_group":172,"text":"(","start_char":34,"line":22},{"index_id":202,"token_group":173,"text":"e","start_char":35,"line":22},{"index_id":203,"token_group":174,"text":")","start_char":36,"line":22},{"index_id":204,"token_group":175,"text":";","start_char":37,"line":22},{"index_id":205,"token_group":176,"text":"}","start_char":4,"line":23},{"index_id":206,"token_group":177,"text":"string","start_char":4,"line":25},{"index_id":207,"token_group":178,"text":"endpoint","start_char":11,"line":25},{"index_id":208,"token_group":179,"text":"Dns","start_char":19,"line":25},{"index_id":209,"token_group":179,"text":"=","start_char":23,"line":25},{"index_id":210,"token_group":180,"text":"tokens","start_char":25,"line":25},{"index_id":211,"token_group":181,"text":".","start_char":31,"line":25},{"index_id":212,"token_group":182,"text":"get","start_char":32,"line":25},{"index_id":213,"token_group":183,"text":"(","start_char":35,"line":25},{"index_id":214,"token_group":184,"text":"0","start_char":36,"line":25},{"index_id":215,"token_group":185,"text":")","start_char":37,"line":25},{"index_id":216,"token_group":186,"text":".","start_char":38,"line":25},{"index_id":217,"token_group":187,"text":"ip","start_char":39,"line":25},{"index_id":218,"token_group":188,"text":"Or","start_char":41,"line":25},{"index_id":219,"token_group":188,"text":"Dns","start_char":43,"line":25},{"index_id":220,"token_group":188,"text":"(","start_char":46,"line":25},{"index_id":221,"token_group":189,"text":")","start_char":47,"line":25},{"index_id":222,"token_group":190,"text":";","start_char":48,"line":25},{"index_id":223,"token_group":191,"text":"if","start_char":4,"line":26},{"index_id":224,"token_group":192,"text":"(","start_char":7,"line":26},{"index_id":225,"token_group":193,"text":"is","start_char":8,"line":26},{"index_id":226,"token_group":194,"text":"Token","start_char":10,"line":26},{"index_id":227,"token_group":194,"text":"Per","start_char":15,"line":26},{"index_id":228,"token_group":194,"text":"Node","start_char":18,"line":26},{"index_id":229,"token_group":194,"text":")","start_char":22,"line":26},{"index_id":230,"token_group":195,"text":"system","start_char":8,"line":27},{"index_id":231,"token_group":196,"text":".","start_char":14,"line":27},{"index_id":232,"token_group":197,"text":"out","start_char":15,"line":27},{"index_id":233,"token_group":198,"text":".","start_char":18,"line":27},{"index_id":234,"token_group":199,"text":"printf","start_char":19,"line":27},{"index_id":235,"token_group":200,"text":"(","start_char":25,"line":27},{"index_id":236,"token_group":201,"text":"fmt","start_char":26,"line":27},{"index_id":237,"token_group":202,"text":",","start_char":29,"line":27},{"index_id":238,"token_group":203,"text":"status","start_char":31,"line":27},{"index_id":239,"token_group":204,"text":",","start_char":37,"line":27},{"index_id":240,"token_group":205,"text":"state","start_char":39,"line":27},{"index_id":241,"token_group":206,"text":",","start_char":44,"line":27},{"index_id":242,"token_group":207,"text":"endpoint","start_char":46,"line":27},{"index_id":243,"token_group":208,"text":"Dns","start_char":54,"line":27},{"index_id":244,"token_group":208,"text":",","start_char":57,"line":27},{"index_id":245,"token_group":209,"text":"load","start_char":59,"line":27},{"index_id":246,"token_group":210,"text":",","start_char":63,"line":27},{"index_id":247,"token_group":211,"text":"str","start_char":65,"line":27},{"index_id":248,"token_group":212,"text":"Owns","start_char":68,"line":27},{"index_id":249,"token_group":212,"text":",","start_char":72,"line":27},{"index_id":250,"token_group":213,"text":"host","start_char":74,"line":27},{"index_id":251,"token_group":214,"text":"Id","start_char":78,"line":27},{"index_id":252,"token_group":214,"text":",","start_char":80,"line":27},{"index_id":253,"token_group":215,"text":"tokens","start_char":26,"line":28},{"index_id":254,"token_group":216,"text":".","start_char":32,"line":28},{"index_id":255,"token_group":217,"text":"get","start_char":33,"line":28},{"index_id":256,"token_group":218,"text":"(","start_char":36,"line":28},{"index_id":257,"token_group":219,"text":"0","start_char":37,"line":28},{"index_id":258,"token_group":220,"text":")","start_char":38,"line":28},{"index_id":259,"token_group":221,"text":".","start_char":39,"line":28},{"index_id":260,"token_group":222,"text":"token","start_char":40,"line":28},{"index_id":261,"token_group":223,"text":",","start_char":45,"line":28},{"index_id":262,"token_group":224,"text":"rack","start_char":47,"line":28},{"index_id":263,"token_group":225,"text":")","start_char":51,"line":28},{"index_id":264,"token_group":226,"text":";","start_char":52,"line":28},{"index_id":265,"token_group":227,"text":"else","start_char":4,"line":29},{"index_id":266,"token_group":228,"text":"system","start_char":8,"line":30},{"index_id":267,"token_group":229,"text":".","start_char":14,"line":30},{"index_id":268,"token_group":230,"text":"out","start_char":15,"line":30},{"index_id":269,"token_group":231,"text":".","start_char":18,"line":30},{"index_id":270,"token_group":232,"text":"printf","start_char":19,"line":30},{"index_id":271,"token_group":233,"text":"(","start_char":25,"line":30},{"index_id":272,"token_group":234,"text":"fmt","start_char":26,"line":30},{"index_id":273,"token_group":235,"text":",","start_char":29,"line":30},{"index_id":274,"token_group":236,"text":"status","start_char":31,"line":30},{"index_id":275,"token_group":237,"text":",","start_char":37,"line":30},{"index_id":276,"token_group":238,"text":"state","start_char":39,"line":30},{"index_id":277,"token_group":239,"text":",","start_char":44,"line":30},{"index_id":278,"token_group":240,"text":"endpoint","start_char":46,"line":30},{"index_id":279,"token_group":241,"text":"Dns","start_char":54,"line":30},{"index_id":280,"token_group":241,"text":",","start_char":57,"line":30},{"index_id":281,"token_group":242,"text":"load","start_char":59,"line":30},{"index_id":282,"token_group":243,"text":",","start_char":63,"line":30},{"index_id":283,"token_group":244,"text":"tokens","start_char":65,"line":30},{"index_id":284,"token_group":245,"text":".","start_char":71,"line":30},{"index_id":285,"token_group":246,"text":"size","start_char":72,"line":30},{"index_id":286,"token_group":247,"text":"(","start_char":76,"line":30},{"index_id":287,"token_group":248,"text":")","start_char":77,"line":30},{"index_id":288,"token_group":249,"text":",","start_char":78,"line":30},{"index_id":289,"token_group":250,"text":"str","start_char":80,"line":30},{"index_id":290,"token_group":251,"text":"Owns","start_char":83,"line":30},{"index_id":291,"token_group":251,"text":",","start_char":87,"line":30},{"index_id":292,"token_group":252,"text":"host","start_char":26,"line":31},{"index_id":293,"token_group":253,"text":"Id","start_char":30,"line":31},{"index_id":294,"token_group":253,"text":",","start_char":32,"line":31},{"index_id":295,"token_group":254,"text":"rack","start_char":34,"line":31},{"index_id":296,"token_group":255,"text":")","start_char":38,"line":31},{"index_id":297,"token_group":256,"text":";","start_char":39,"line":31},{"index_id":298,"token_group":257,"text":"}","start_char":0,"line":32}],"tokens_list":["{","string","status",",","state",",","load",",","str","Owns",",","host","Id",",","rack",",","fmt",";","fmt","=","get","Format","(","has","Effective","Owns",",","is","Token","Per","Node",")",";","if","(","live","Nodes",".","contains","(","endpoint",")",")","status","=","\"U\"",";","else","if","(","unreachable","Nodes",".","contains","(","endpoint",")",")","status","=","\"D\"",";","else","status","=","\"?\"",";","if","(","joining","Nodes",".","contains","(","endpoint",")",")","state","=","\"J\"",";","else","if","(","leaving","Nodes",".","contains","(","endpoint",")",")","state","=","\"L\"",";","else","if","(","moving","Nodes",".","contains","(","endpoint",")",")","state","=","\"M\"",";","else","state","=","\"N\"",";","load","=","load","Map",".","contains","Key","(","endpoint",")","?","load","Map",".","get","(","endpoint",")",":","\"?\"",";","str","Owns","=","owns","!=","null","&&","has","Effective","Owns","?","new","decimal","Format","(","\"##0.0%\"",")",".","format","(","owns",")",":","\"?\"",";","host","Id","=","host","Id","Map",".","get","(","endpoint",")",";","try","{","rack","=","ep","Snitch","Info",".","get","Rack","(","endpoint",")",";","}","catch","(","unknown","Host","Exception","e",")","{","throw","new","runtime","Exception","(","e",")",";","}","string","endpoint","Dns","=","tokens",".","get","(","0",")",".","ip","Or","Dns","(",")",";","if","(","is","Token","Per","Node",")","system",".","out",".","printf","(","fmt",",","status",",","state",",","endpoint","Dns",",","load",",","str","Owns",",","host","Id",",","tokens",".","get","(","0",")",".","token",",","rack",")",";","else","system",".","out",".","printf","(","fmt",",","status",",","state",",","endpoint","Dns",",","load",",","tokens",".","size","(",")",",","str","Owns",",","host","Id",",","rack",")",";","}"],"uuid":"cdc691f268961dee6ab66d1050337250"},{"cap_original_tokens":["<SENTENCE_START>","{","return","<id>","dummy","<\/id>","(",")",";","}","<SENTENCE_END\/>"],"file_name":"NoOpLoggingSystem.java","formatted_lines":["{"," return dummy();","}"],"function_name":"snapshot","function_name_tokens":["snapshot"],"id_body_hash":"250b8118476ee20c9b41cb15060c4e72","id_same_identifier_list":[0,1,2,3,4,5,6,7,8],"option_correct":"snapshot","options":["findUniqueSnapshotVersion","resolveUniqueSnapshotDependency","checkCanPublish","onNonError","withSearchUpwardsFlagSet","isNonUniqueSnapshot","snapshot"],"options_nlp":["find unique snapshot version","resolve unique snapshot dependency","check can publish","on non error","with search upwards flag set","is non unique snapshot","snapshot"],"options_random":["checkCanPublish","onNonError","withSearchUpwardsFlagSet"],"options_tfidf":["isNonUniqueSnapshot","findUniqueSnapshotVersion","resolveUniqueSnapshotDependency"],"project_name":"gradle","source_code_string":"public Snapshot snapshot() {\n return dummy();\n }","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"return","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"dummy","start_char":11,"line":1},{"index_id":3,"token_group":3,"text":"(","start_char":16,"line":1},{"index_id":4,"token_group":4,"text":")","start_char":17,"line":1},{"index_id":5,"token_group":5,"text":";","start_char":18,"line":1},{"index_id":6,"token_group":6,"text":"}","start_char":0,"line":2}],"tokens_list":["{","return","dummy","(",")",";","}"],"uuid":"89084737f0db8df982baa982e60a290e"},{"cap_original_tokens":["<SENTENCE_START>","{","<id>","dynamic","Query","<\/id>","<id>","dynamic","Query","<\/id>","=","<id>","dynamic","Query","Factory","Util","<\/id>",".","<id>","for","Class","<\/id>","(","<id>","layout","Branch","<\/id>",".","class",",","<id>","","Dynamic","Query","Class","Loader","<\/id>",")",";","<id>","dynamic","Query","<\/id>",".","<id>","set","Projection","<\/id>","(","<id>","projection","Factory","Util","<\/id>",".","<id>","property","<\/id>","(","\"layoutBranchId\"",")",")",";","<id>","dynamic","Query","<\/id>",".","<id>","add","<\/id>","(","<id>","restrictions","Factory","Util","<\/id>",".","<id>","in","<\/id>","(","\"layoutBranchId\"",",","new","<id>","object","<\/id>","[","]","{","<id>","random","Test","Util","<\/id>",".","<id>","next","Long","<\/id>","(",")","}",")",")",";","<id>","list","<\/id>","<","<id>","object","<\/id>",">","<id>","result","<\/id>","=","<id>","","Persistence","<\/id>",".","<id>","find","With","Dynamic","Query","<\/id>","(","<id>","dynamic","Query","<\/id>",")",";","<id>","assert","<\/id>",".","<id>","assert","Equals","<\/id>","(","0",",","<id>","result","<\/id>",".","<id>","size","<\/id>","(",")",")",";","}","<SENTENCE_END\/>"],"file_name":"LayoutBranchPersistenceTest.java","formatted_lines":["{"," DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(LayoutBranch.class,"," _dynamicQueryClassLoader);",""," dynamicQuery.setProjection(ProjectionFactoryUtil.property("," \"layoutBranchId\"));",""," dynamicQuery.add(RestrictionsFactoryUtil.in(\"layoutBranchId\","," new Object[] { RandomTestUtil.nextLong() }));",""," List<Object> result = _persistence.findWithDynamicQuery(dynamicQuery);",""," Assert.assertEquals(0, result.size());","}"],"function_name":"testDynamicQueryByProjectionMissing","function_name_tokens":["test","dynamic","query","by","projection","missing"],"id_body_hash":"d3f3f3e52a5c813c97bd8b592d654dc7","id_same_identifier_list":[0,1,2,2,3,3,4,5,5,5,5,6,7,7,8,9,9,10,11,12,13,13,13,13,13,14,15,16,16,17,18,18,19,20,20,20,21,22,23,24,25,26,27,28,28,29,30,31,32,32,32,33,34,35,36,37,38,39,40,41,42,43,43,43,44,45,45,46,47,48,49,50,51,52,53,54,55,56,57,58,58,59,60,60,60,60,61,62,62,63,64,65,66,67,67,68,69,70,71,72,73,74,75,76,77,78,79],"option_correct":"testDynamicQueryByProjectionMissing","options":["testDynamicQueryByProjectionExisting","getShoppingItemPricePersistence","testQueryByG_F_C","testDynamicQueryByProjectionMissing","getByG_A_NotST_PrevAndNext","before","testDynamicQueryByPrimaryKeyMissing"],"options_nlp":["test dynamic query by projection existing","get shopping item price persistence","test query by g f c","test dynamic query by projection missing","get by g a not st prev and next","before","test dynamic query by primary key missing"],"options_random":["getByG_A_NotST_PrevAndNext","before","getShoppingItemPricePersistence"],"options_tfidf":["testQueryByG_F_C","testDynamicQueryByPrimaryKeyMissing","testDynamicQueryByProjectionExisting"],"project_name":"liferay-portal","source_code_string":"@Test\n\tpublic void testDynamicQueryByProjectionMissing() throws Exception {\n\t\tDynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(LayoutBranch.class,\n\t\t\t\t_dynamicQueryClassLoader);\n\n\t\tdynamicQuery.setProjection(ProjectionFactoryUtil.property(\n\t\t\t\t\"layoutBranchId\"));\n\n\t\tdynamicQuery.add(RestrictionsFactoryUtil.in(\"layoutBranchId\",\n\t\t\t\tnew Object[] { RandomTestUtil.nextLong() }));\n\n\t\tList<Object> result = _persistence.findWithDynamicQuery(dynamicQuery);\n\n\t\tAssert.assertEquals(0, result.size());\n\t}","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"dynamic","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"Query","start_char":11,"line":1},{"index_id":3,"token_group":2,"text":"dynamic","start_char":17,"line":1},{"index_id":4,"token_group":3,"text":"Query","start_char":24,"line":1},{"index_id":5,"token_group":3,"text":"=","start_char":30,"line":1},{"index_id":6,"token_group":4,"text":"dynamic","start_char":32,"line":1},{"index_id":7,"token_group":5,"text":"Query","start_char":39,"line":1},{"index_id":8,"token_group":5,"text":"Factory","start_char":44,"line":1},{"index_id":9,"token_group":5,"text":"Util","start_char":51,"line":1},{"index_id":10,"token_group":5,"text":".","start_char":55,"line":1},{"index_id":11,"token_group":6,"text":"for","start_char":56,"line":1},{"index_id":12,"token_group":7,"text":"Class","start_char":59,"line":1},{"index_id":13,"token_group":7,"text":"(","start_char":64,"line":1},{"index_id":14,"token_group":8,"text":"layout","start_char":65,"line":1},{"index_id":15,"token_group":9,"text":"Branch","start_char":71,"line":1},{"index_id":16,"token_group":9,"text":".","start_char":77,"line":1},{"index_id":17,"token_group":10,"text":"class","start_char":78,"line":1},{"index_id":18,"token_group":11,"text":",","start_char":83,"line":1},{"index_id":19,"token_group":12,"text":"","start_char":84,"line":1},{"index_id":20,"token_group":13,"text":"Dynamic","start_char":13,"line":2},{"index_id":21,"token_group":13,"text":"Query","start_char":20,"line":2},{"index_id":22,"token_group":13,"text":"Class","start_char":25,"line":2},{"index_id":23,"token_group":13,"text":"Loader","start_char":30,"line":2},{"index_id":24,"token_group":13,"text":")","start_char":36,"line":2},{"index_id":25,"token_group":14,"text":";","start_char":37,"line":2},{"index_id":26,"token_group":15,"text":"dynamic","start_char":4,"line":4},{"index_id":27,"token_group":16,"text":"Query","start_char":11,"line":4},{"index_id":28,"token_group":16,"text":".","start_char":16,"line":4},{"index_id":29,"token_group":17,"text":"set","start_char":17,"line":4},{"index_id":30,"token_group":18,"text":"Projection","start_char":20,"line":4},{"index_id":31,"token_group":18,"text":"(","start_char":30,"line":4},{"index_id":32,"token_group":19,"text":"projection","start_char":31,"line":4},{"index_id":33,"token_group":20,"text":"Factory","start_char":41,"line":4},{"index_id":34,"token_group":20,"text":"Util","start_char":48,"line":4},{"index_id":35,"token_group":20,"text":".","start_char":52,"line":4},{"index_id":36,"token_group":21,"text":"property","start_char":53,"line":4},{"index_id":37,"token_group":22,"text":"(","start_char":61,"line":4},{"index_id":38,"token_group":23,"text":"\"layoutBranchId\"","start_char":35,"line":5},{"index_id":39,"token_group":24,"text":")","start_char":51,"line":5},{"index_id":40,"token_group":25,"text":")","start_char":52,"line":5},{"index_id":41,"token_group":26,"text":";","start_char":53,"line":5},{"index_id":42,"token_group":27,"text":"dynamic","start_char":4,"line":7},{"index_id":43,"token_group":28,"text":"Query","start_char":11,"line":7},{"index_id":44,"token_group":28,"text":".","start_char":16,"line":7},{"index_id":45,"token_group":29,"text":"add","start_char":17,"line":7},{"index_id":46,"token_group":30,"text":"(","start_char":20,"line":7},{"index_id":47,"token_group":31,"text":"restrictions","start_char":21,"line":7},{"index_id":48,"token_group":32,"text":"Factory","start_char":33,"line":7},{"index_id":49,"token_group":32,"text":"Util","start_char":40,"line":7},{"index_id":50,"token_group":32,"text":".","start_char":44,"line":7},{"index_id":51,"token_group":33,"text":"in","start_char":45,"line":7},{"index_id":52,"token_group":34,"text":"(","start_char":47,"line":7},{"index_id":53,"token_group":35,"text":"\"layoutBranchId\"","start_char":48,"line":7},{"index_id":54,"token_group":36,"text":",","start_char":64,"line":7},{"index_id":55,"token_group":37,"text":"new","start_char":4,"line":8},{"index_id":56,"token_group":38,"text":"object","start_char":8,"line":8},{"index_id":57,"token_group":39,"text":"[","start_char":14,"line":8},{"index_id":58,"token_group":40,"text":"]","start_char":15,"line":8},{"index_id":59,"token_group":41,"text":"{","start_char":17,"line":8},{"index_id":60,"token_group":42,"text":"random","start_char":19,"line":8},{"index_id":61,"token_group":43,"text":"Test","start_char":25,"line":8},{"index_id":62,"token_group":43,"text":"Util","start_char":29,"line":8},{"index_id":63,"token_group":43,"text":".","start_char":33,"line":8},{"index_id":64,"token_group":44,"text":"next","start_char":34,"line":8},{"index_id":65,"token_group":45,"text":"Long","start_char":38,"line":8},{"index_id":66,"token_group":45,"text":"(","start_char":42,"line":8},{"index_id":67,"token_group":46,"text":")","start_char":43,"line":8},{"index_id":68,"token_group":47,"text":"}","start_char":45,"line":8},{"index_id":69,"token_group":48,"text":")","start_char":46,"line":8},{"index_id":70,"token_group":49,"text":")","start_char":47,"line":8},{"index_id":71,"token_group":50,"text":";","start_char":48,"line":8},{"index_id":72,"token_group":51,"text":"list","start_char":4,"line":10},{"index_id":73,"token_group":52,"text":"<","start_char":8,"line":10},{"index_id":74,"token_group":53,"text":"object","start_char":9,"line":10},{"index_id":75,"token_group":54,"text":">","start_char":15,"line":10},{"index_id":76,"token_group":55,"text":"result","start_char":17,"line":10},{"index_id":77,"token_group":56,"text":"=","start_char":24,"line":10},{"index_id":78,"token_group":57,"text":"","start_char":25,"line":10},{"index_id":79,"token_group":58,"text":"Persistence","start_char":27,"line":10},{"index_id":80,"token_group":58,"text":".","start_char":38,"line":10},{"index_id":81,"token_group":59,"text":"find","start_char":39,"line":10},{"index_id":82,"token_group":60,"text":"With","start_char":43,"line":10},{"index_id":83,"token_group":60,"text":"Dynamic","start_char":47,"line":10},{"index_id":84,"token_group":60,"text":"Query","start_char":54,"line":10},{"index_id":85,"token_group":60,"text":"(","start_char":59,"line":10},{"index_id":86,"token_group":61,"text":"dynamic","start_char":60,"line":10},{"index_id":87,"token_group":62,"text":"Query","start_char":67,"line":10},{"index_id":88,"token_group":62,"text":")","start_char":72,"line":10},{"index_id":89,"token_group":63,"text":";","start_char":73,"line":10},{"index_id":90,"token_group":64,"text":"assert","start_char":4,"line":12},{"index_id":91,"token_group":65,"text":".","start_char":10,"line":12},{"index_id":92,"token_group":66,"text":"assert","start_char":11,"line":12},{"index_id":93,"token_group":67,"text":"Equals","start_char":17,"line":12},{"index_id":94,"token_group":67,"text":"(","start_char":23,"line":12},{"index_id":95,"token_group":68,"text":"0","start_char":24,"line":12},{"index_id":96,"token_group":69,"text":",","start_char":25,"line":12},{"index_id":97,"token_group":70,"text":"result","start_char":27,"line":12},{"index_id":98,"token_group":71,"text":".","start_char":33,"line":12},{"index_id":99,"token_group":72,"text":"size","start_char":34,"line":12},{"index_id":100,"token_group":73,"text":"(","start_char":38,"line":12},{"index_id":101,"token_group":74,"text":")","start_char":39,"line":12},{"index_id":102,"token_group":75,"text":")","start_char":40,"line":12},{"index_id":103,"token_group":76,"text":";","start_char":41,"line":12},{"index_id":104,"token_group":77,"text":"}","start_char":0,"line":13}],"tokens_list":["{","dynamic","Query","dynamic","Query","=","dynamic","Query","Factory","Util",".","for","Class","(","layout","Branch",".","class",",","","Dynamic","Query","Class","Loader",")",";","dynamic","Query",".","set","Projection","(","projection","Factory","Util",".","property","(","\"layoutBranchId\"",")",")",";","dynamic","Query",".","add","(","restrictions","Factory","Util",".","in","(","\"layoutBranchId\"",",","new","object","[","]","{","random","Test","Util",".","next","Long","(",")","}",")",")",";","list","<","object",">","result","=","","Persistence",".","find","With","Dynamic","Query","(","dynamic","Query",")",";","assert",".","assert","Equals","(","0",",","result",".","size","(",")",")",";","}"],"uuid":"590aaf8b60b1f03812c6eba77a3b6bdd"},{"cap_original_tokens":["<SENTENCE_START>","{","this",".","<id>","counter","Local","Service","<\/id>","=","<id>","counter","Local","Service","<\/id>",";","}","<SENTENCE_END\/>"],"file_name":"ExportImportServiceBaseImpl.java","formatted_lines":["{"," this.counterLocalService = counterLocalService;","}"],"function_name":"setCounterLocalService","function_name_tokens":["set","counter","local","service"],"id_body_hash":"4360e785cb9ede2206e097b85b2a7bb2","id_same_identifier_list":[0,1,2,3,4,4,4,5,6,6,6,7,8,9],"option_correct":"setCounterLocalService","options":["getFilterConfig","setCounterLocalService","getCounterLocalService","getSearchResults","getSocialActivityCounterLocalService","setSocialActivityCounterLocalService","setServiceContext"],"options_nlp":["get filter config","set counter local service","get counter local service","get search results","get social activity counter local service","set social activity counter local service","set service context"],"options_random":["getFilterConfig","setServiceContext","getSearchResults"],"options_tfidf":["setSocialActivityCounterLocalService","getSocialActivityCounterLocalService","getCounterLocalService"],"project_name":"liferay-portal","source_code_string":"public void setCounterLocalService(\n\t\tcom.liferay.counter.service.CounterLocalService counterLocalService) {\n\t\tthis.counterLocalService = counterLocalService;\n\t}","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"this","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":".","start_char":8,"line":1},{"index_id":3,"token_group":3,"text":"counter","start_char":9,"line":1},{"index_id":4,"token_group":4,"text":"Local","start_char":16,"line":1},{"index_id":5,"token_group":4,"text":"Service","start_char":21,"line":1},{"index_id":6,"token_group":4,"text":"=","start_char":29,"line":1},{"index_id":7,"token_group":5,"text":"counter","start_char":31,"line":1},{"index_id":8,"token_group":6,"text":"Local","start_char":38,"line":1},{"index_id":9,"token_group":6,"text":"Service","start_char":43,"line":1},{"index_id":10,"token_group":6,"text":";","start_char":50,"line":1},{"index_id":11,"token_group":7,"text":"}","start_char":0,"line":2}],"tokens_list":["{","this",".","counter","Local","Service","=","counter","Local","Service",";","}"],"uuid":"5c9704ccd9a17661dd2926f3bd081382"},{"cap_original_tokens":["<SENTENCE_START>","{","<id>","file","<\/id>","<id>","file","Dir","<\/id>","=","new","<id>","file","<\/id>","(","<id>","folder","<\/id>",")",";","return","<id>","file","Dir","<\/id>",".","<id>","is","Directory","<\/id>","(",")","&&","<id>","file","Dir","<\/id>",".","<id>","can","Write","<\/id>","(",")","&&","<id>","file","Dir","<\/id>",".","<id>","get","Usable","Space","<\/id>","(",")",">=","<id>","space","<\/id>",";","}","<SENTENCE_END\/>"],"file_name":"Runner.java","formatted_lines":["{"," File fileDir = new File(folder);"," return fileDir.isDirectory() && fileDir.canWrite() &&"," fileDir.getUsableSpace() >= space;","}"],"function_name":"isValidDir","function_name_tokens":["is","valid","dir"],"id_body_hash":"9361fcf37133c89583fa97a47e8a9754","id_same_identifier_list":[0,1,2,3,3,4,5,6,7,8,9,10,11,12,12,13,14,14,15,16,17,18,18,19,20,20,21,22,23,24,24,25,26,26,26,27,28,29,30,31,32,33],"option_correct":"isValidDir","options":["isValidDir","isFileValid","isValid","setFocusOwner","getCallArgumentTypes","isValidName","testInsideWhile"],"options_nlp":["is valid dir","is file valid","is valid","set focus owner","get call argument types","is valid name","test inside while"],"options_random":["getCallArgumentTypes","setFocusOwner","testInsideWhile"],"options_tfidf":["isValidName","isValid","isFileValid"],"project_name":"intellij-community","source_code_string":"private static boolean isValidDir(String folder, long space) {\n File fileDir = new File(folder);\n return fileDir.isDirectory() && fileDir.canWrite() && fileDir.getUsableSpace() >= space;\n }","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"file","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"file","start_char":9,"line":1},{"index_id":3,"token_group":3,"text":"Dir","start_char":13,"line":1},{"index_id":4,"token_group":3,"text":"=","start_char":17,"line":1},{"index_id":5,"token_group":4,"text":"new","start_char":19,"line":1},{"index_id":6,"token_group":5,"text":"file","start_char":23,"line":1},{"index_id":7,"token_group":6,"text":"(","start_char":27,"line":1},{"index_id":8,"token_group":7,"text":"folder","start_char":28,"line":1},{"index_id":9,"token_group":8,"text":")","start_char":34,"line":1},{"index_id":10,"token_group":9,"text":";","start_char":35,"line":1},{"index_id":11,"token_group":10,"text":"return","start_char":4,"line":2},{"index_id":12,"token_group":11,"text":"file","start_char":11,"line":2},{"index_id":13,"token_group":12,"text":"Dir","start_char":15,"line":2},{"index_id":14,"token_group":12,"text":".","start_char":18,"line":2},{"index_id":15,"token_group":13,"text":"is","start_char":19,"line":2},{"index_id":16,"token_group":14,"text":"Directory","start_char":21,"line":2},{"index_id":17,"token_group":14,"text":"(","start_char":30,"line":2},{"index_id":18,"token_group":15,"text":")","start_char":31,"line":2},{"index_id":19,"token_group":16,"text":"&&","start_char":33,"line":2},{"index_id":20,"token_group":17,"text":"file","start_char":36,"line":2},{"index_id":21,"token_group":18,"text":"Dir","start_char":40,"line":2},{"index_id":22,"token_group":18,"text":".","start_char":43,"line":2},{"index_id":23,"token_group":19,"text":"can","start_char":44,"line":2},{"index_id":24,"token_group":20,"text":"Write","start_char":47,"line":2},{"index_id":25,"token_group":20,"text":"(","start_char":52,"line":2},{"index_id":26,"token_group":21,"text":")","start_char":53,"line":2},{"index_id":27,"token_group":22,"text":"&&","start_char":55,"line":2},{"index_id":28,"token_group":23,"text":"file","start_char":11,"line":3},{"index_id":29,"token_group":24,"text":"Dir","start_char":15,"line":3},{"index_id":30,"token_group":24,"text":".","start_char":18,"line":3},{"index_id":31,"token_group":25,"text":"get","start_char":19,"line":3},{"index_id":32,"token_group":26,"text":"Usable","start_char":22,"line":3},{"index_id":33,"token_group":26,"text":"Space","start_char":28,"line":3},{"index_id":34,"token_group":26,"text":"(","start_char":33,"line":3},{"index_id":35,"token_group":27,"text":")","start_char":34,"line":3},{"index_id":36,"token_group":28,"text":">=","start_char":36,"line":3},{"index_id":37,"token_group":29,"text":"space","start_char":39,"line":3},{"index_id":38,"token_group":30,"text":";","start_char":44,"line":3},{"index_id":39,"token_group":31,"text":"}","start_char":0,"line":4}],"tokens_list":["{","file","file","Dir","=","new","file","(","folder",")",";","return","file","Dir",".","is","Directory","(",")","&&","file","Dir",".","can","Write","(",")","&&","file","Dir",".","get","Usable","Space","(",")",">=","space",";","}"],"uuid":"2a8122738db982473c0e53e19e7e41ef"},{"cap_original_tokens":["<SENTENCE_START>","{","return","<id>","my","Text","<\/id>",";","}","<SENTENCE_END\/>"],"file_name":"DefaultTemplate.java","formatted_lines":["{"," return myText;","}"],"function_name":"getText","function_name_tokens":["get","text"],"id_body_hash":"d3f2ba116dd7824ec8fedaf2f7379236","id_same_identifier_list":[0,1,2,3,3,4,5,6],"option_correct":"getText","options":["removeRegexpPatterns","clearCaretThread","getText1","setCanGroupByChangeList","getText","getTextFile","getText2"],"options_nlp":["remove regexp patterns","clear caret thread","get text 1","set can group by change list","get text","get text file","get text 2"],"options_random":["removeRegexpPatterns","clearCaretThread","setCanGroupByChangeList"],"options_tfidf":["getText2","getTextFile","getText1"],"project_name":"intellij-community","source_code_string":"@NotNull\n public String getText() {\n return myText;\n }","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"return","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"my","start_char":11,"line":1},{"index_id":3,"token_group":3,"text":"Text","start_char":13,"line":1},{"index_id":4,"token_group":3,"text":";","start_char":17,"line":1},{"index_id":5,"token_group":4,"text":"}","start_char":0,"line":2}],"tokens_list":["{","return","my","Text",";","}"],"uuid":"7d74d75a54fdb0a6f19b1631e1538906"},{"cap_original_tokens":["<SENTENCE_START>","{","<id>","inet","Socket","Address","<\/id>","<id>","addr","<\/id>","=","new","<id>","inet","Socket","Address","<\/id>","(","0",")",";","<id>","configuration","<\/id>","<id>","conf","<\/id>","=","new","<id>","configuration","<\/id>","(",")",";","<id>","localization","Protocol","<\/id>","<id>","instance","<\/id>","=","new","<id>","localization","Protocol","Test","Impl","<\/id>","(",")",";","<id>","server","<\/id>","<id>","server","<\/id>","=","null",";","try","{","<id>","server","<\/id>","=","<id>","rpc","Server","Factory","Pb","Impl","<\/id>",".","<id>","get","<\/id>","(",")",".","<id>","get","Server","<\/id>","(","<id>","localization","Protocol","<\/id>",".","class",",","<id>","instance","<\/id>",",","<id>","addr","<\/id>",",","<id>","conf","<\/id>",",","null",",","1",")",";","<id>","server","<\/id>",".","<id>","start","<\/id>","(",")",";","}","catch","(","<id>","yarn","Runtime","Exception","<\/id>","<id>","e","<\/id>",")","{","<id>","e","<\/id>",".","<id>","print","Stack","Trace","<\/id>","(",")",";","<id>","assert","<\/id>",".","<id>","fail","<\/id>","(","\"Failed to create server\"",")",";","}","finally","{","if","(","<id>","server","<\/id>","!=","null",")","{","<id>","server","<\/id>",".","<id>","stop","<\/id>","(",")",";","}","}","}","<SENTENCE_END\/>"],"file_name":"TestRPCFactories.java","formatted_lines":["{"," InetSocketAddress addr = new InetSocketAddress(0);"," Configuration conf = new Configuration();"," LocalizationProtocol instance = new LocalizationProtocolTestImpl();"," Server server = null;"," try"," {"," server ="," RpcServerFactoryPBImpl.get().getServer("," LocalizationProtocol.class, instance, addr, conf, null, 1);"," server.start();"," }"," catch (YarnRuntimeException e)"," {"," e.printStackTrace();"," Assert.fail(\"Failed to create server\");"," }"," finally"," {"," if (server != null)"," {"," server.stop();"," }"," }","}"],"function_name":"testPbServerFactory","function_name_tokens":["test","pb","server","factory"],"id_body_hash":"593495301a6a9a7fcb76933768aaad6f","id_same_identifier_list":[0,1,2,2,2,3,4,5,6,6,6,7,8,9,10,11,12,13,14,15,16,17,18,19,19,20,21,22,23,23,23,23,24,25,26,27,28,29,30,31,32,33,34,35,36,36,36,36,36,37,38,39,40,41,42,42,43,44,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,68,68,69,70,71,72,73,74,74,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],"option_correct":"testPbServerFactory","options":["testPbRecordFactory","testFactory","setIsJavaRecordReader","testLocalFileCorruption","testPbClientFactory","testPbServerFactory","dumpTreeRecursively"],"options_nlp":["test pb record factory","test factory","set is java record reader","test local file corruption","test pb client factory","test pb server factory","dump tree recursively"],"options_random":["setIsJavaRecordReader","dumpTreeRecursively","testLocalFileCorruption"],"options_tfidf":["testPbClientFactory","testPbRecordFactory","testFactory"],"project_name":"hadoop-common","source_code_string":"private void testPbServerFactory() {\n InetSocketAddress addr = new InetSocketAddress(0);\n Configuration conf = new Configuration();\n LocalizationProtocol instance = new LocalizationProtocolTestImpl();\n Server server = null;\n try {\n server = \n RpcServerFactoryPBImpl.get().getServer(\n LocalizationProtocol.class, instance, addr, conf, null, 1);\n server.start();\n } catch (YarnRuntimeException e) {\n e.printStackTrace();\n Assert.fail(\"Failed to create server\");\n } finally {\n if (server != null) {\n server.stop();\n }\n }\n }","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"inet","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"Socket","start_char":8,"line":1},{"index_id":3,"token_group":2,"text":"Address","start_char":14,"line":1},{"index_id":4,"token_group":2,"text":"addr","start_char":22,"line":1},{"index_id":5,"token_group":3,"text":"=","start_char":27,"line":1},{"index_id":6,"token_group":4,"text":"new","start_char":29,"line":1},{"index_id":7,"token_group":5,"text":"inet","start_char":33,"line":1},{"index_id":8,"token_group":6,"text":"Socket","start_char":37,"line":1},{"index_id":9,"token_group":6,"text":"Address","start_char":43,"line":1},{"index_id":10,"token_group":6,"text":"(","start_char":50,"line":1},{"index_id":11,"token_group":7,"text":"0","start_char":51,"line":1},{"index_id":12,"token_group":8,"text":")","start_char":52,"line":1},{"index_id":13,"token_group":9,"text":";","start_char":53,"line":1},{"index_id":14,"token_group":10,"text":"configuration","start_char":4,"line":2},{"index_id":15,"token_group":11,"text":"conf","start_char":18,"line":2},{"index_id":16,"token_group":12,"text":"=","start_char":23,"line":2},{"index_id":17,"token_group":13,"text":"new","start_char":25,"line":2},{"index_id":18,"token_group":14,"text":"configuration","start_char":29,"line":2},{"index_id":19,"token_group":15,"text":"(","start_char":42,"line":2},{"index_id":20,"token_group":16,"text":")","start_char":43,"line":2},{"index_id":21,"token_group":17,"text":";","start_char":44,"line":2},{"index_id":22,"token_group":18,"text":"localization","start_char":4,"line":3},{"index_id":23,"token_group":19,"text":"Protocol","start_char":16,"line":3},{"index_id":24,"token_group":19,"text":"instance","start_char":25,"line":3},{"index_id":25,"token_group":20,"text":"=","start_char":34,"line":3},{"index_id":26,"token_group":21,"text":"new","start_char":36,"line":3},{"index_id":27,"token_group":22,"text":"localization","start_char":40,"line":3},{"index_id":28,"token_group":23,"text":"Protocol","start_char":52,"line":3},{"index_id":29,"token_group":23,"text":"Test","start_char":60,"line":3},{"index_id":30,"token_group":23,"text":"Impl","start_char":64,"line":3},{"index_id":31,"token_group":23,"text":"(","start_char":68,"line":3},{"index_id":32,"token_group":24,"text":")","start_char":69,"line":3},{"index_id":33,"token_group":25,"text":";","start_char":70,"line":3},{"index_id":34,"token_group":26,"text":"server","start_char":4,"line":4},{"index_id":35,"token_group":27,"text":"server","start_char":11,"line":4},{"index_id":36,"token_group":28,"text":"=","start_char":18,"line":4},{"index_id":37,"token_group":29,"text":"null","start_char":20,"line":4},{"index_id":38,"token_group":30,"text":";","start_char":24,"line":4},{"index_id":39,"token_group":31,"text":"try","start_char":4,"line":5},{"index_id":40,"token_group":32,"text":"{","start_char":4,"line":6},{"index_id":41,"token_group":33,"text":"server","start_char":8,"line":7},{"index_id":42,"token_group":34,"text":"=","start_char":15,"line":7},{"index_id":43,"token_group":35,"text":"rpc","start_char":12,"line":8},{"index_id":44,"token_group":36,"text":"Server","start_char":15,"line":8},{"index_id":45,"token_group":36,"text":"Factory","start_char":21,"line":8},{"index_id":46,"token_group":36,"text":"Pb","start_char":28,"line":8},{"index_id":47,"token_group":36,"text":"Impl","start_char":30,"line":8},{"index_id":48,"token_group":36,"text":".","start_char":34,"line":8},{"index_id":49,"token_group":37,"text":"get","start_char":35,"line":8},{"index_id":50,"token_group":38,"text":"(","start_char":38,"line":8},{"index_id":51,"token_group":39,"text":")","start_char":39,"line":8},{"index_id":52,"token_group":40,"text":".","start_char":40,"line":8},{"index_id":53,"token_group":41,"text":"get","start_char":41,"line":8},{"index_id":54,"token_group":42,"text":"Server","start_char":44,"line":8},{"index_id":55,"token_group":42,"text":"(","start_char":50,"line":8},{"index_id":56,"token_group":43,"text":"localization","start_char":16,"line":9},{"index_id":57,"token_group":44,"text":"Protocol","start_char":28,"line":9},{"index_id":58,"token_group":44,"text":".","start_char":36,"line":9},{"index_id":59,"token_group":45,"text":"class","start_char":37,"line":9},{"index_id":60,"token_group":46,"text":",","start_char":42,"line":9},{"index_id":61,"token_group":47,"text":"instance","start_char":44,"line":9},{"index_id":62,"token_group":48,"text":",","start_char":52,"line":9},{"index_id":63,"token_group":49,"text":"addr","start_char":54,"line":9},{"index_id":64,"token_group":50,"text":",","start_char":58,"line":9},{"index_id":65,"token_group":51,"text":"conf","start_char":60,"line":9},{"index_id":66,"token_group":52,"text":",","start_char":64,"line":9},{"index_id":67,"token_group":53,"text":"null","start_char":66,"line":9},{"index_id":68,"token_group":54,"text":",","start_char":70,"line":9},{"index_id":69,"token_group":55,"text":"1","start_char":72,"line":9},{"index_id":70,"token_group":56,"text":")","start_char":73,"line":9},{"index_id":71,"token_group":57,"text":";","start_char":74,"line":9},{"index_id":72,"token_group":58,"text":"server","start_char":8,"line":10},{"index_id":73,"token_group":59,"text":".","start_char":14,"line":10},{"index_id":74,"token_group":60,"text":"start","start_char":15,"line":10},{"index_id":75,"token_group":61,"text":"(","start_char":20,"line":10},{"index_id":76,"token_group":62,"text":")","start_char":21,"line":10},{"index_id":77,"token_group":63,"text":";","start_char":22,"line":10},{"index_id":78,"token_group":64,"text":"}","start_char":4,"line":11},{"index_id":79,"token_group":65,"text":"catch","start_char":4,"line":12},{"index_id":80,"token_group":66,"text":"(","start_char":10,"line":12},{"index_id":81,"token_group":67,"text":"yarn","start_char":11,"line":12},{"index_id":82,"token_group":68,"text":"Runtime","start_char":15,"line":12},{"index_id":83,"token_group":68,"text":"Exception","start_char":22,"line":12},{"index_id":84,"token_group":68,"text":"e","start_char":32,"line":12},{"index_id":85,"token_group":69,"text":")","start_char":33,"line":12},{"index_id":86,"token_group":70,"text":"{","start_char":4,"line":13},{"index_id":87,"token_group":71,"text":"e","start_char":8,"line":14},{"index_id":88,"token_group":72,"text":".","start_char":9,"line":14},{"index_id":89,"token_group":73,"text":"print","start_char":10,"line":14},{"index_id":90,"token_group":74,"text":"Stack","start_char":15,"line":14},{"index_id":91,"token_group":74,"text":"Trace","start_char":20,"line":14},{"index_id":92,"token_group":74,"text":"(","start_char":25,"line":14},{"index_id":93,"token_group":75,"text":")","start_char":26,"line":14},{"index_id":94,"token_group":76,"text":";","start_char":27,"line":14},{"index_id":95,"token_group":77,"text":"assert","start_char":8,"line":15},{"index_id":96,"token_group":78,"text":".","start_char":14,"line":15},{"index_id":97,"token_group":79,"text":"fail","start_char":15,"line":15},{"index_id":98,"token_group":80,"text":"(","start_char":19,"line":15},{"index_id":99,"token_group":81,"text":"\"Failed to create server\"","start_char":20,"line":15},{"index_id":100,"token_group":82,"text":")","start_char":45,"line":15},{"index_id":101,"token_group":83,"text":";","start_char":46,"line":15},{"index_id":102,"token_group":84,"text":"}","start_char":4,"line":16},{"index_id":103,"token_group":85,"text":"finally","start_char":4,"line":17},{"index_id":104,"token_group":86,"text":"{","start_char":4,"line":18},{"index_id":105,"token_group":87,"text":"if","start_char":8,"line":19},{"index_id":106,"token_group":88,"text":"(","start_char":11,"line":19},{"index_id":107,"token_group":89,"text":"server","start_char":12,"line":19},{"index_id":108,"token_group":90,"text":"!=","start_char":19,"line":19},{"index_id":109,"token_group":91,"text":"null","start_char":22,"line":19},{"index_id":110,"token_group":92,"text":")","start_char":26,"line":19},{"index_id":111,"token_group":93,"text":"{","start_char":8,"line":20},{"index_id":112,"token_group":94,"text":"server","start_char":12,"line":21},{"index_id":113,"token_group":95,"text":".","start_char":18,"line":21},{"index_id":114,"token_group":96,"text":"stop","start_char":19,"line":21},{"index_id":115,"token_group":97,"text":"(","start_char":23,"line":21},{"index_id":116,"token_group":98,"text":")","start_char":24,"line":21},{"index_id":117,"token_group":99,"text":";","start_char":25,"line":21},{"index_id":118,"token_group":100,"text":"}","start_char":8,"line":22},{"index_id":119,"token_group":101,"text":"}","start_char":4,"line":23},{"index_id":120,"token_group":102,"text":"}","start_char":0,"line":24}],"tokens_list":["{","inet","Socket","Address","addr","=","new","inet","Socket","Address","(","0",")",";","configuration","conf","=","new","configuration","(",")",";","localization","Protocol","instance","=","new","localization","Protocol","Test","Impl","(",")",";","server","server","=","null",";","try","{","server","=","rpc","Server","Factory","Pb","Impl",".","get","(",")",".","get","Server","(","localization","Protocol",".","class",",","instance",",","addr",",","conf",",","null",",","1",")",";","server",".","start","(",")",";","}","catch","(","yarn","Runtime","Exception","e",")","{","e",".","print","Stack","Trace","(",")",";","assert",".","fail","(","\"Failed to create server\"",")",";","}","finally","{","if","(","server","!=","null",")","{","server",".","stop","(",")",";","}","}","}"],"uuid":"c01e122e12af2c86c0469ee8c8aa64c4"},{"cap_original_tokens":["<SENTENCE_START>","{","<id>","map","<\/id>","<","<id>","string","<\/id>",",","<id>","string","<\/id>",">","<id>","config","<\/id>","=","new","<id>","linked","Hash","Map","<\/id>","<",">","(",")",";","<id>","config","<\/id>",".","<id>","put","<\/id>","(","\"foo\"",",","\"scriptValue\"",")",";","<id>","config","<\/id>",".","<id>","put","<\/id>","(","\"foo_id\"",",","\"scriptValue\"",")",";","<id>","set","<\/id>","<","<id>","string","<\/id>",">","<id>","parameters","<\/id>","=","<id>","collections","<\/id>",".","<id>","singleton","<\/id>","(","\"foo\"",")",";","<id>","script","Parameter","Parser","<\/id>","<id>","param","Parser","<\/id>","=","new","<id>","script","Parameter","Parser","<\/id>","(","<id>","parameters","<\/id>",")",";","<id>","assert","That","<\/id>","(","<id>","param","Parser","<\/id>",".","<id>","get","Script","Parameter","Value","<\/id>","(","\"foo\"",")",",","<id>","null","Value","<\/id>","(",")",")",";","<id>","map","Params","<\/id>","<id>","params","<\/id>","=","new","<id>","map","Params","<\/id>","(","<id>","config","<\/id>",")",";","try","{","<id>","param","Parser","<\/id>",".","<id>","parse","Params","<\/id>","(","<id>","params","<\/id>",")",";","<id>","fail","<\/id>","(","\"Expected ScriptParseException\"",")",";","}","catch","(","<id>","script","Parse","Exception","<\/id>","<id>","e","<\/id>",")","{","<id>","assert","That","<\/id>","(","<id>","e","<\/id>",".","<id>","get","Message","<\/id>","(",")",",","<id>","is","<\/id>","(","\"Only one of [foo, foo_file, foo_id] is allowed.\"",")",")",";","}","}","<SENTENCE_END\/>"],"file_name":"ScriptParameterParserTests.java","formatted_lines":["{"," Map<String, String> config = new LinkedHashMap<>();"," config.put(\"foo\", \"scriptValue\");"," config.put(\"foo_id\", \"scriptValue\");"," Set<String> parameters = Collections.singleton(\"foo\");"," ScriptParameterParser paramParser = new ScriptParameterParser(parameters);"," assertThat(paramParser.getScriptParameterValue(\"foo\"), nullValue());"," MapParams params = new MapParams(config);"," try"," {"," paramParser.parseParams(params);"," fail(\"Expected ScriptParseException\");"," }"," catch(ScriptParseException e)"," {"," assertThat(e.getMessage(),"," is(\"Only one of [foo, foo_file, foo_id] is allowed.\"));"," }","}"],"function_name":"testParamsSingleParameterDelcaredTwiceInlineIndexed","function_name_tokens":["test","params","single","parameter","delcared","twice","inline","indexed"],"id_body_hash":"8a5896a73db664fe03b536418f849589","id_same_identifier_list":[0,1,2,3,4,5,6,7,8,9,10,11,11,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,48,48,49,49,50,51,52,52,52,53,54,55,56,57,57,58,59,59,60,61,61,61,61,62,63,64,65,66,66,67,68,69,70,71,71,72,73,74,75,75,76,77,78,79,80,81,82,82,83,84,84,85,86,87,88,89,90,91,92,93,94,95,96,97,97,97,98,99,100,101,101,102,103,104,105,105,106,107,108,109,110,111,112,113,114,115,116,117],"option_correct":"testParamsSingleParameterDelcaredTwiceInlineIndexed","options":["testParamsSingleParameterDelcaredTwiceFileInline","testParamsSingleParameterDelcaredTwiceInlineIndexed","bytes","testPercolateNonMatchingConstantScoreQuery","testParamsSingleParameterDelcaredTwiceInlineFile","testParamsSingleParameterDelcaredTwiceIndexedInline","testMvOrdinalsTrigger"],"options_nlp":["test params single parameter delcared twice file inline","test params single parameter delcared twice inline indexed","bytes","test percolate non matching constant score query","test params single parameter delcared twice inline file","test params single parameter delcared twice indexed inline","test mv ordinals trigger"],"options_random":["testPercolateNonMatchingConstantScoreQuery","testMvOrdinalsTrigger","bytes"],"options_tfidf":["testParamsSingleParameterDelcaredTwiceInlineFile","testParamsSingleParameterDelcaredTwiceIndexedInline","testParamsSingleParameterDelcaredTwiceFileInline"],"project_name":"elasticsearch","source_code_string":"public void testParamsSingleParameterDelcaredTwiceInlineIndexed() throws IOException {\n Map<String, String> config = new LinkedHashMap<>();\n config.put(\"foo\", \"scriptValue\");\n config.put(\"foo_id\", \"scriptValue\");\n Set<String> parameters = Collections.singleton(\"foo\");\n ScriptParameterParser paramParser = new ScriptParameterParser(parameters);\n assertThat(paramParser.getScriptParameterValue(\"foo\"), nullValue());\n MapParams params = new MapParams(config);\n try {\n paramParser.parseParams(params);\n fail(\"Expected ScriptParseException\");\n } catch(ScriptParseException e) {\n assertThat(e.getMessage(), is(\"Only one of [foo, foo_file, foo_id] is allowed.\"));\n }\n }","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"map","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"<","start_char":7,"line":1},{"index_id":3,"token_group":3,"text":"string","start_char":8,"line":1},{"index_id":4,"token_group":4,"text":",","start_char":14,"line":1},{"index_id":5,"token_group":5,"text":"string","start_char":16,"line":1},{"index_id":6,"token_group":6,"text":">","start_char":22,"line":1},{"index_id":7,"token_group":7,"text":"config","start_char":24,"line":1},{"index_id":8,"token_group":8,"text":"=","start_char":31,"line":1},{"index_id":9,"token_group":9,"text":"new","start_char":33,"line":1},{"index_id":10,"token_group":10,"text":"linked","start_char":37,"line":1},{"index_id":11,"token_group":11,"text":"Hash","start_char":43,"line":1},{"index_id":12,"token_group":11,"text":"Map","start_char":47,"line":1},{"index_id":13,"token_group":11,"text":"<","start_char":50,"line":1},{"index_id":14,"token_group":12,"text":">","start_char":51,"line":1},{"index_id":15,"token_group":13,"text":"(","start_char":52,"line":1},{"index_id":16,"token_group":14,"text":")","start_char":53,"line":1},{"index_id":17,"token_group":15,"text":";","start_char":54,"line":1},{"index_id":18,"token_group":16,"text":"config","start_char":4,"line":2},{"index_id":19,"token_group":17,"text":".","start_char":10,"line":2},{"index_id":20,"token_group":18,"text":"put","start_char":11,"line":2},{"index_id":21,"token_group":19,"text":"(","start_char":14,"line":2},{"index_id":22,"token_group":20,"text":"\"foo\"","start_char":15,"line":2},{"index_id":23,"token_group":21,"text":",","start_char":20,"line":2},{"index_id":24,"token_group":22,"text":"\"scriptValue\"","start_char":22,"line":2},{"index_id":25,"token_group":23,"text":")","start_char":35,"line":2},{"index_id":26,"token_group":24,"text":";","start_char":36,"line":2},{"index_id":27,"token_group":25,"text":"config","start_char":4,"line":3},{"index_id":28,"token_group":26,"text":".","start_char":10,"line":3},{"index_id":29,"token_group":27,"text":"put","start_char":11,"line":3},{"index_id":30,"token_group":28,"text":"(","start_char":14,"line":3},{"index_id":31,"token_group":29,"text":"\"foo_id\"","start_char":15,"line":3},{"index_id":32,"token_group":30,"text":",","start_char":23,"line":3},{"index_id":33,"token_group":31,"text":"\"scriptValue\"","start_char":25,"line":3},{"index_id":34,"token_group":32,"text":")","start_char":38,"line":3},{"index_id":35,"token_group":33,"text":";","start_char":39,"line":3},{"index_id":36,"token_group":34,"text":"set","start_char":4,"line":4},{"index_id":37,"token_group":35,"text":"<","start_char":7,"line":4},{"index_id":38,"token_group":36,"text":"string","start_char":8,"line":4},{"index_id":39,"token_group":37,"text":">","start_char":14,"line":4},{"index_id":40,"token_group":38,"text":"parameters","start_char":16,"line":4},{"index_id":41,"token_group":39,"text":"=","start_char":27,"line":4},{"index_id":42,"token_group":40,"text":"collections","start_char":29,"line":4},{"index_id":43,"token_group":41,"text":".","start_char":40,"line":4},{"index_id":44,"token_group":42,"text":"singleton","start_char":41,"line":4},{"index_id":45,"token_group":43,"text":"(","start_char":50,"line":4},{"index_id":46,"token_group":44,"text":"\"foo\"","start_char":51,"line":4},{"index_id":47,"token_group":45,"text":")","start_char":56,"line":4},{"index_id":48,"token_group":46,"text":";","start_char":57,"line":4},{"index_id":49,"token_group":47,"text":"script","start_char":4,"line":5},{"index_id":50,"token_group":48,"text":"Parameter","start_char":10,"line":5},{"index_id":51,"token_group":48,"text":"Parser","start_char":19,"line":5},{"index_id":52,"token_group":48,"text":"param","start_char":26,"line":5},{"index_id":53,"token_group":49,"text":"Parser","start_char":31,"line":5},{"index_id":54,"token_group":49,"text":"=","start_char":38,"line":5},{"index_id":55,"token_group":50,"text":"new","start_char":40,"line":5},{"index_id":56,"token_group":51,"text":"script","start_char":44,"line":5},{"index_id":57,"token_group":52,"text":"Parameter","start_char":50,"line":5},{"index_id":58,"token_group":52,"text":"Parser","start_char":59,"line":5},{"index_id":59,"token_group":52,"text":"(","start_char":65,"line":5},{"index_id":60,"token_group":53,"text":"parameters","start_char":66,"line":5},{"index_id":61,"token_group":54,"text":")","start_char":76,"line":5},{"index_id":62,"token_group":55,"text":";","start_char":77,"line":5},{"index_id":63,"token_group":56,"text":"assert","start_char":4,"line":6},{"index_id":64,"token_group":57,"text":"That","start_char":10,"line":6},{"index_id":65,"token_group":57,"text":"(","start_char":14,"line":6},{"index_id":66,"token_group":58,"text":"param","start_char":15,"line":6},{"index_id":67,"token_group":59,"text":"Parser","start_char":20,"line":6},{"index_id":68,"token_group":59,"text":".","start_char":26,"line":6},{"index_id":69,"token_group":60,"text":"get","start_char":27,"line":6},{"index_id":70,"token_group":61,"text":"Script","start_char":30,"line":6},{"index_id":71,"token_group":61,"text":"Parameter","start_char":36,"line":6},{"index_id":72,"token_group":61,"text":"Value","start_char":45,"line":6},{"index_id":73,"token_group":61,"text":"(","start_char":50,"line":6},{"index_id":74,"token_group":62,"text":"\"foo\"","start_char":51,"line":6},{"index_id":75,"token_group":63,"text":")","start_char":56,"line":6},{"index_id":76,"token_group":64,"text":",","start_char":57,"line":6},{"index_id":77,"token_group":65,"text":"null","start_char":59,"line":6},{"index_id":78,"token_group":66,"text":"Value","start_char":63,"line":6},{"index_id":79,"token_group":66,"text":"(","start_char":68,"line":6},{"index_id":80,"token_group":67,"text":")","start_char":69,"line":6},{"index_id":81,"token_group":68,"text":")","start_char":70,"line":6},{"index_id":82,"token_group":69,"text":";","start_char":71,"line":6},{"index_id":83,"token_group":70,"text":"map","start_char":4,"line":7},{"index_id":84,"token_group":71,"text":"Params","start_char":7,"line":7},{"index_id":85,"token_group":71,"text":"params","start_char":14,"line":7},{"index_id":86,"token_group":72,"text":"=","start_char":21,"line":7},{"index_id":87,"token_group":73,"text":"new","start_char":23,"line":7},{"index_id":88,"token_group":74,"text":"map","start_char":27,"line":7},{"index_id":89,"token_group":75,"text":"Params","start_char":30,"line":7},{"index_id":90,"token_group":75,"text":"(","start_char":36,"line":7},{"index_id":91,"token_group":76,"text":"config","start_char":37,"line":7},{"index_id":92,"token_group":77,"text":")","start_char":43,"line":7},{"index_id":93,"token_group":78,"text":";","start_char":44,"line":7},{"index_id":94,"token_group":79,"text":"try","start_char":4,"line":8},{"index_id":95,"token_group":80,"text":"{","start_char":4,"line":9},{"index_id":96,"token_group":81,"text":"param","start_char":8,"line":10},{"index_id":97,"token_group":82,"text":"Parser","start_char":13,"line":10},{"index_id":98,"token_group":82,"text":".","start_char":19,"line":10},{"index_id":99,"token_group":83,"text":"parse","start_char":20,"line":10},{"index_id":100,"token_group":84,"text":"Params","start_char":25,"line":10},{"index_id":101,"token_group":84,"text":"(","start_char":31,"line":10},{"index_id":102,"token_group":85,"text":"params","start_char":32,"line":10},{"index_id":103,"token_group":86,"text":")","start_char":38,"line":10},{"index_id":104,"token_group":87,"text":";","start_char":39,"line":10},{"index_id":105,"token_group":88,"text":"fail","start_char":8,"line":11},{"index_id":106,"token_group":89,"text":"(","start_char":12,"line":11},{"index_id":107,"token_group":90,"text":"\"Expected ScriptParseException\"","start_char":13,"line":11},{"index_id":108,"token_group":91,"text":")","start_char":44,"line":11},{"index_id":109,"token_group":92,"text":";","start_char":45,"line":11},{"index_id":110,"token_group":93,"text":"}","start_char":4,"line":12},{"index_id":111,"token_group":94,"text":"catch","start_char":4,"line":13},{"index_id":112,"token_group":95,"text":"(","start_char":9,"line":13},{"index_id":113,"token_group":96,"text":"script","start_char":10,"line":13},{"index_id":114,"token_group":97,"text":"Parse","start_char":16,"line":13},{"index_id":115,"token_group":97,"text":"Exception","start_char":21,"line":13},{"index_id":116,"token_group":97,"text":"e","start_char":31,"line":13},{"index_id":117,"token_group":98,"text":")","start_char":32,"line":13},{"index_id":118,"token_group":99,"text":"{","start_char":4,"line":14},{"index_id":119,"token_group":100,"text":"assert","start_char":8,"line":15},{"index_id":120,"token_group":101,"text":"That","start_char":14,"line":15},{"index_id":121,"token_group":101,"text":"(","start_char":18,"line":15},{"index_id":122,"token_group":102,"text":"e","start_char":19,"line":15},{"index_id":123,"token_group":103,"text":".","start_char":20,"line":15},{"index_id":124,"token_group":104,"text":"get","start_char":21,"line":15},{"index_id":125,"token_group":105,"text":"Message","start_char":24,"line":15},{"index_id":126,"token_group":105,"text":"(","start_char":31,"line":15},{"index_id":127,"token_group":106,"text":")","start_char":32,"line":15},{"index_id":128,"token_group":107,"text":",","start_char":33,"line":15},{"index_id":129,"token_group":108,"text":"is","start_char":19,"line":16},{"index_id":130,"token_group":109,"text":"(","start_char":21,"line":16},{"index_id":131,"token_group":110,"text":"\"Only one of [foo, foo_file, foo_id] is allowed.\"","start_char":22,"line":16},{"index_id":132,"token_group":111,"text":")","start_char":71,"line":16},{"index_id":133,"token_group":112,"text":")","start_char":72,"line":16},{"index_id":134,"token_group":113,"text":";","start_char":73,"line":16},{"index_id":135,"token_group":114,"text":"}","start_char":4,"line":17},{"index_id":136,"token_group":115,"text":"}","start_char":0,"line":18}],"tokens_list":["{","map","<","string",",","string",">","config","=","new","linked","Hash","Map","<",">","(",")",";","config",".","put","(","\"foo\"",",","\"scriptValue\"",")",";","config",".","put","(","\"foo_id\"",",","\"scriptValue\"",")",";","set","<","string",">","parameters","=","collections",".","singleton","(","\"foo\"",")",";","script","Parameter","Parser","param","Parser","=","new","script","Parameter","Parser","(","parameters",")",";","assert","That","(","param","Parser",".","get","Script","Parameter","Value","(","\"foo\"",")",",","null","Value","(",")",")",";","map","Params","params","=","new","map","Params","(","config",")",";","try","{","param","Parser",".","parse","Params","(","params",")",";","fail","(","\"Expected ScriptParseException\"",")",";","}","catch","(","script","Parse","Exception","e",")","{","assert","That","(","e",".","get","Message","(",")",",","is","(","\"Only one of [foo, foo_file, foo_id] is allowed.\"",")",")",";","}","}"],"uuid":"2f1d76ad2c7e64a97daa5a2eb3700df9"},{"cap_original_tokens":["<SENTENCE_START>","{","<id>","session","<\/id>","<id>","s","<\/id>","=","<id>","open","Session","<\/id>","(",")",";","<id>","transaction","<\/id>","<id>","tx","<\/id>","=","<id>","s","<\/id>",".","<id>","begin","Transaction","<\/id>","(",")",";","<id>","competition","<\/id>","<id>","competition","<\/id>","=","new","<id>","competition","<\/id>","(",")",";","<id>","competition","<\/id>",".","<id>","get","Competitors","<\/id>","(",")",".","<id>","add","<\/id>","(","new","<id>","competitor","<\/id>","(","\"Name\"",")",")",";","<id>","competition","<\/id>",".","<id>","get","Competitors","<\/id>","(",")",".","<id>","add","<\/id>","(","new","<id>","competitor","<\/id>","(",")",")",";","<id>","competition","<\/id>",".","<id>","get","Competitors","<\/id>","(",")",".","<id>","add","<\/id>","(","new","<id>","competitor","<\/id>","(",")",")",";","<id>","s","<\/id>",".","<id>","persist","<\/id>","(","<id>","competition","<\/id>",")",";","<id>","tx","<\/id>",".","<id>","commit","<\/id>","(",")",";","<id>","s","<\/id>",".","<id>","close","<\/id>","(",")",";","<id>","s","<\/id>","=","<id>","open","Session","<\/id>","(",")",";","<id>","tx","<\/id>","=","<id>","s","<\/id>",".","<id>","begin","Transaction","<\/id>","(",")",";","<id>","list","<\/id>","<id>","new","Comp","<\/id>","=","new","<id>","array","List","<\/id>","(",")",";","<id>","competitor","<\/id>","<id>","original","Competitor","<\/id>","=","(","<id>","competitor","<\/id>",")","<id>","competition","<\/id>",".","<id>","get","Competitors","<\/id>","(",")",".","<id>","get","<\/id>","(","0",")",";","<id>","original","Competitor","<\/id>",".","<id>","set","Name","<\/id>","(","\"Name2\"",")",";","<id>","new","Comp","<\/id>",".","<id>","add","<\/id>","(","<id>","original","Competitor","<\/id>",")",";","<id>","new","Comp","<\/id>",".","<id>","add","<\/id>","(","new","<id>","competitor","<\/id>","(",")",")",";","<id>","competition","<\/id>",".","<id>","set","Competitors","<\/id>","(","<id>","new","Comp","<\/id>",")",";","<id>","competition","<\/id>","<id>","competition","2","<\/id>","=","(","<id>","competition","<\/id>",")","<id>","s","<\/id>",".","<id>","merge","<\/id>","(","<id>","competition","<\/id>",")",";","<id>","tx","<\/id>",".","<id>","commit","<\/id>","(",")",";","<id>","s","<\/id>",".","<id>","close","<\/id>","(",")",";","<id>","assert","False","<\/id>","(","<id>","competition","<\/id>","==","<id>","competition","2","<\/id>",")",";","<id>","assert","False","<\/id>","(","<id>","competition","<\/id>",".","<id>","get","Competitors","<\/id>","(",")","==","<id>","competition","2","<\/id>",".","<id>","get","Competitors","<\/id>","(",")",")",";","<id>","assert","Equals","<\/id>","(","2",",","<id>","competition","2","<\/id>",".","<id>","get","Competitors","<\/id>","(",")",".","<id>","size","<\/id>","(",")",")",";","<id>","s","<\/id>","=","<id>","open","Session","<\/id>","(",")",";","<id>","tx","<\/id>","=","<id>","s","<\/id>",".","<id>","begin","Transaction","<\/id>","(",")",";","<id>","competition","<\/id>","=","(","<id>","competition","<\/id>",")","<id>","s","<\/id>",".","<id>","get","<\/id>","(","<id>","competition","<\/id>",".","class",",","<id>","competition","<\/id>",".","<id>","get","Id","<\/id>","(",")",")",";","<id>","assert","Equals","<\/id>","(","2",",","<id>","competition","<\/id>",".","<id>","get","Competitors","<\/id>","(",")",".","<id>","size","<\/id>","(",")",")",";","<id>","s","<\/id>",".","<id>","delete","<\/id>","(","<id>","competition","<\/id>",")",";","<id>","tx","<\/id>",".","<id>","commit","<\/id>","(",")",";","<id>","s","<\/id>",".","<id>","close","<\/id>","(",")",";","<id>","cleanup","<\/id>","(",")",";","}","<SENTENCE_END\/>"],"file_name":"MergeTest.java","formatted_lines":["{",""," Session s = openSession();"," Transaction tx = s.beginTransaction();"," Competition competition = new Competition();"," competition.getCompetitors().add( new Competitor( \"Name\" ) );"," competition.getCompetitors().add( new Competitor() );"," competition.getCompetitors().add( new Competitor() );"," s.persist( competition );"," tx.commit();"," s.close();","","",""," s = openSession();"," tx = s.beginTransaction();"," List newComp = new ArrayList();"," Competitor originalCompetitor = ( Competitor ) competition.getCompetitors().get( 0 );"," originalCompetitor.setName( \"Name2\" );"," newComp.add( originalCompetitor );"," newComp.add( new Competitor() );",""," competition.setCompetitors( newComp );",""," Competition competition2 = ( Competition ) s.merge( competition );"," tx.commit();"," s.close();",""," assertFalse( competition == competition2 );"," assertFalse( competition.getCompetitors() == competition2.getCompetitors() );"," assertEquals( 2, competition2.getCompetitors().size() );",""," s = openSession();"," tx = s.beginTransaction();"," competition = ( Competition ) s.get( Competition.class, competition.getId() );"," assertEquals( 2, competition.getCompetitors().size() );"," s.delete( competition );"," tx.commit();"," s.close();",""," cleanup();","}"],"function_name":"testMergeManyToManyWithCollectionDeference","function_name_tokens":["test","merge","many","to","many","with","collection","deference"],"id_body_hash":"f75236721e9c6a6ae307c03b42a0a583","id_same_identifier_list":[0,1,2,3,4,5,5,6,7,8,9,10,11,12,13,14,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,90,91,92,93,94,95,96,97,98,98,99,100,101,102,103,103,104,105,106,106,107,108,109,110,111,111,112,113,114,115,116,117,118,118,119,120,121,122,123,124,125,126,127,127,128,129,129,130,131,132,133,134,134,135,136,137,138,138,139,140,141,141,142,143,144,145,146,147,148,149,150,151,152,153,153,154,155,155,156,157,158,159,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,183,184,185,186,187,187,188,189,190,190,191,192,193,194,194,195,196,197,198,198,199,200,200,201,202,203,204,205,205,206,207,208,209,209,210,211,211,212,213,214,215,216,217,218,219,220,221,222,222,223,224,225,226,227,228,229,230,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,249,250,251,252,253,254,254,255,256,257,258,259,260,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293],"option_correct":"testMergeManyToManyWithCollectionDeference","options":["generateSettings","testManyToMany","isManyToManyWith","testMergeManyToManyWithCollectionDeference","testManyToManyCollectionSemantics","testHistoryOfReferencedCollection1","testRetrieveAuditedEntityWithEntityName"],"options_nlp":["generate settings","test many to many","is many to many with","test merge many to many with collection deference","test many to many collection semantics","test history of referenced collection 1","test retrieve audited entity with entity name"],"options_random":["generateSettings","testHistoryOfReferencedCollection1","testRetrieveAuditedEntityWithEntityName"],"options_tfidf":["testManyToMany","testManyToManyCollectionSemantics","isManyToManyWith"],"project_name":"hibernate-orm","source_code_string":"@SuppressWarnings( {\"unchecked\"})\n\t@Test\n\tpublic void testMergeManyToManyWithCollectionDeference() throws Exception {\n\t\t\n\t\tSession s = openSession();\n\t\tTransaction tx = s.beginTransaction();\n\t\tCompetition competition = new Competition();\n\t\tcompetition.getCompetitors().add( new Competitor( \"Name\" ) );\n\t\tcompetition.getCompetitors().add( new Competitor() );\n\t\tcompetition.getCompetitors().add( new Competitor() );\n\t\ts.persist( competition );\n\t\ttx.commit();\n\t\ts.close();\n\n\t\t\n\t\t\n\t\ts = openSession();\n\t\ttx = s.beginTransaction();\n\t\tList newComp = new ArrayList();\n\t\tCompetitor originalCompetitor = ( Competitor ) competition.getCompetitors().get( 0 );\n\t\toriginalCompetitor.setName( \"Name2\" );\n\t\tnewComp.add( originalCompetitor );\n\t\tnewComp.add( new Competitor() );\n\t\t\n\t\tcompetition.setCompetitors( newComp );\n\t\t\n\t\tCompetition competition2 = ( Competition ) s.merge( competition );\n\t\ttx.commit();\n\t\ts.close();\n\n\t\tassertFalse( competition == competition2 );\n\t\tassertFalse( competition.getCompetitors() == competition2.getCompetitors() );\n\t\tassertEquals( 2, competition2.getCompetitors().size() );\n\n\t\ts = openSession();\n\t\ttx = s.beginTransaction();\n\t\tcompetition = ( Competition ) s.get( Competition.class, competition.getId() );\n\t\tassertEquals( 2, competition.getCompetitors().size() );\n\t\ts.delete( competition );\n\t\ttx.commit();\n\t\ts.close();\n\n\t\tcleanup();\n\t}","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"session","start_char":4,"line":2},{"index_id":2,"token_group":2,"text":"s","start_char":12,"line":2},{"index_id":3,"token_group":3,"text":"=","start_char":14,"line":2},{"index_id":4,"token_group":4,"text":"open","start_char":16,"line":2},{"index_id":5,"token_group":5,"text":"Session","start_char":20,"line":2},{"index_id":6,"token_group":5,"text":"(","start_char":27,"line":2},{"index_id":7,"token_group":6,"text":")","start_char":28,"line":2},{"index_id":8,"token_group":7,"text":";","start_char":29,"line":2},{"index_id":9,"token_group":8,"text":"transaction","start_char":4,"line":3},{"index_id":10,"token_group":9,"text":"tx","start_char":16,"line":3},{"index_id":11,"token_group":10,"text":"=","start_char":19,"line":3},{"index_id":12,"token_group":11,"text":"s","start_char":21,"line":3},{"index_id":13,"token_group":12,"text":".","start_char":22,"line":3},{"index_id":14,"token_group":13,"text":"begin","start_char":23,"line":3},{"index_id":15,"token_group":14,"text":"Transaction","start_char":28,"line":3},{"index_id":16,"token_group":14,"text":"(","start_char":39,"line":3},{"index_id":17,"token_group":15,"text":")","start_char":40,"line":3},{"index_id":18,"token_group":16,"text":";","start_char":41,"line":3},{"index_id":19,"token_group":17,"text":"competition","start_char":4,"line":4},{"index_id":20,"token_group":18,"text":"competition","start_char":16,"line":4},{"index_id":21,"token_group":19,"text":"=","start_char":28,"line":4},{"index_id":22,"token_group":20,"text":"new","start_char":30,"line":4},{"index_id":23,"token_group":21,"text":"competition","start_char":34,"line":4},{"index_id":24,"token_group":22,"text":"(","start_char":45,"line":4},{"index_id":25,"token_group":23,"text":")","start_char":46,"line":4},{"index_id":26,"token_group":24,"text":";","start_char":47,"line":4},{"index_id":27,"token_group":25,"text":"competition","start_char":4,"line":5},{"index_id":28,"token_group":26,"text":".","start_char":15,"line":5},{"index_id":29,"token_group":27,"text":"get","start_char":16,"line":5},{"index_id":30,"token_group":28,"text":"Competitors","start_char":19,"line":5},{"index_id":31,"token_group":28,"text":"(","start_char":30,"line":5},{"index_id":32,"token_group":29,"text":")","start_char":31,"line":5},{"index_id":33,"token_group":30,"text":".","start_char":32,"line":5},{"index_id":34,"token_group":31,"text":"add","start_char":33,"line":5},{"index_id":35,"token_group":32,"text":"(","start_char":36,"line":5},{"index_id":36,"token_group":33,"text":"new","start_char":38,"line":5},{"index_id":37,"token_group":34,"text":"competitor","start_char":42,"line":5},{"index_id":38,"token_group":35,"text":"(","start_char":52,"line":5},{"index_id":39,"token_group":36,"text":"\"Name\"","start_char":54,"line":5},{"index_id":40,"token_group":37,"text":")","start_char":61,"line":5},{"index_id":41,"token_group":38,"text":")","start_char":63,"line":5},{"index_id":42,"token_group":39,"text":";","start_char":64,"line":5},{"index_id":43,"token_group":40,"text":"competition","start_char":4,"line":6},{"index_id":44,"token_group":41,"text":".","start_char":15,"line":6},{"index_id":45,"token_group":42,"text":"get","start_char":16,"line":6},{"index_id":46,"token_group":43,"text":"Competitors","start_char":19,"line":6},{"index_id":47,"token_group":43,"text":"(","start_char":30,"line":6},{"index_id":48,"token_group":44,"text":")","start_char":31,"line":6},{"index_id":49,"token_group":45,"text":".","start_char":32,"line":6},{"index_id":50,"token_group":46,"text":"add","start_char":33,"line":6},{"index_id":51,"token_group":47,"text":"(","start_char":36,"line":6},{"index_id":52,"token_group":48,"text":"new","start_char":38,"line":6},{"index_id":53,"token_group":49,"text":"competitor","start_char":42,"line":6},{"index_id":54,"token_group":50,"text":"(","start_char":52,"line":6},{"index_id":55,"token_group":51,"text":")","start_char":53,"line":6},{"index_id":56,"token_group":52,"text":")","start_char":55,"line":6},{"index_id":57,"token_group":53,"text":";","start_char":56,"line":6},{"index_id":58,"token_group":54,"text":"competition","start_char":4,"line":7},{"index_id":59,"token_group":55,"text":".","start_char":15,"line":7},{"index_id":60,"token_group":56,"text":"get","start_char":16,"line":7},{"index_id":61,"token_group":57,"text":"Competitors","start_char":19,"line":7},{"index_id":62,"token_group":57,"text":"(","start_char":30,"line":7},{"index_id":63,"token_group":58,"text":")","start_char":31,"line":7},{"index_id":64,"token_group":59,"text":".","start_char":32,"line":7},{"index_id":65,"token_group":60,"text":"add","start_char":33,"line":7},{"index_id":66,"token_group":61,"text":"(","start_char":36,"line":7},{"index_id":67,"token_group":62,"text":"new","start_char":38,"line":7},{"index_id":68,"token_group":63,"text":"competitor","start_char":42,"line":7},{"index_id":69,"token_group":64,"text":"(","start_char":52,"line":7},{"index_id":70,"token_group":65,"text":")","start_char":53,"line":7},{"index_id":71,"token_group":66,"text":")","start_char":55,"line":7},{"index_id":72,"token_group":67,"text":";","start_char":56,"line":7},{"index_id":73,"token_group":68,"text":"s","start_char":4,"line":8},{"index_id":74,"token_group":69,"text":".","start_char":5,"line":8},{"index_id":75,"token_group":70,"text":"persist","start_char":6,"line":8},{"index_id":76,"token_group":71,"text":"(","start_char":13,"line":8},{"index_id":77,"token_group":72,"text":"competition","start_char":15,"line":8},{"index_id":78,"token_group":73,"text":")","start_char":27,"line":8},{"index_id":79,"token_group":74,"text":";","start_char":28,"line":8},{"index_id":80,"token_group":75,"text":"tx","start_char":4,"line":9},{"index_id":81,"token_group":76,"text":".","start_char":6,"line":9},{"index_id":82,"token_group":77,"text":"commit","start_char":7,"line":9},{"index_id":83,"token_group":78,"text":"(","start_char":13,"line":9},{"index_id":84,"token_group":79,"text":")","start_char":14,"line":9},{"index_id":85,"token_group":80,"text":";","start_char":15,"line":9},{"index_id":86,"token_group":81,"text":"s","start_char":4,"line":10},{"index_id":87,"token_group":82,"text":".","start_char":5,"line":10},{"index_id":88,"token_group":83,"text":"close","start_char":6,"line":10},{"index_id":89,"token_group":84,"text":"(","start_char":11,"line":10},{"index_id":90,"token_group":85,"text":")","start_char":12,"line":10},{"index_id":91,"token_group":86,"text":";","start_char":13,"line":10},{"index_id":92,"token_group":87,"text":"s","start_char":4,"line":14},{"index_id":93,"token_group":88,"text":"=","start_char":6,"line":14},{"index_id":94,"token_group":89,"text":"open","start_char":8,"line":14},{"index_id":95,"token_group":90,"text":"Session","start_char":12,"line":14},{"index_id":96,"token_group":90,"text":"(","start_char":19,"line":14},{"index_id":97,"token_group":91,"text":")","start_char":20,"line":14},{"index_id":98,"token_group":92,"text":";","start_char":21,"line":14},{"index_id":99,"token_group":93,"text":"tx","start_char":4,"line":15},{"index_id":100,"token_group":94,"text":"=","start_char":7,"line":15},{"index_id":101,"token_group":95,"text":"s","start_char":9,"line":15},{"index_id":102,"token_group":96,"text":".","start_char":10,"line":15},{"index_id":103,"token_group":97,"text":"begin","start_char":11,"line":15},{"index_id":104,"token_group":98,"text":"Transaction","start_char":16,"line":15},{"index_id":105,"token_group":98,"text":"(","start_char":27,"line":15},{"index_id":106,"token_group":99,"text":")","start_char":28,"line":15},{"index_id":107,"token_group":100,"text":";","start_char":29,"line":15},{"index_id":108,"token_group":101,"text":"list","start_char":4,"line":16},{"index_id":109,"token_group":102,"text":"new","start_char":9,"line":16},{"index_id":110,"token_group":103,"text":"Comp","start_char":12,"line":16},{"index_id":111,"token_group":103,"text":"=","start_char":17,"line":16},{"index_id":112,"token_group":104,"text":"new","start_char":19,"line":16},{"index_id":113,"token_group":105,"text":"array","start_char":23,"line":16},{"index_id":114,"token_group":106,"text":"List","start_char":28,"line":16},{"index_id":115,"token_group":106,"text":"(","start_char":32,"line":16},{"index_id":116,"token_group":107,"text":")","start_char":33,"line":16},{"index_id":117,"token_group":108,"text":";","start_char":34,"line":16},{"index_id":118,"token_group":109,"text":"competitor","start_char":4,"line":17},{"index_id":119,"token_group":110,"text":"original","start_char":15,"line":17},{"index_id":120,"token_group":111,"text":"Competitor","start_char":23,"line":17},{"index_id":121,"token_group":111,"text":"=","start_char":34,"line":17},{"index_id":122,"token_group":112,"text":"(","start_char":36,"line":17},{"index_id":123,"token_group":113,"text":"competitor","start_char":38,"line":17},{"index_id":124,"token_group":114,"text":")","start_char":49,"line":17},{"index_id":125,"token_group":115,"text":"competition","start_char":51,"line":17},{"index_id":126,"token_group":116,"text":".","start_char":62,"line":17},{"index_id":127,"token_group":117,"text":"get","start_char":63,"line":17},{"index_id":128,"token_group":118,"text":"Competitors","start_char":66,"line":17},{"index_id":129,"token_group":118,"text":"(","start_char":77,"line":17},{"index_id":130,"token_group":119,"text":")","start_char":78,"line":17},{"index_id":131,"token_group":120,"text":".","start_char":79,"line":17},{"index_id":132,"token_group":121,"text":"get","start_char":80,"line":17},{"index_id":133,"token_group":122,"text":"(","start_char":83,"line":17},{"index_id":134,"token_group":123,"text":"0","start_char":85,"line":17},{"index_id":135,"token_group":124,"text":")","start_char":87,"line":17},{"index_id":136,"token_group":125,"text":";","start_char":88,"line":17},{"index_id":137,"token_group":126,"text":"original","start_char":4,"line":18},{"index_id":138,"token_group":127,"text":"Competitor","start_char":12,"line":18},{"index_id":139,"token_group":127,"text":".","start_char":22,"line":18},{"index_id":140,"token_group":128,"text":"set","start_char":23,"line":18},{"index_id":141,"token_group":129,"text":"Name","start_char":26,"line":18},{"index_id":142,"token_group":129,"text":"(","start_char":30,"line":18},{"index_id":143,"token_group":130,"text":"\"Name2\"","start_char":32,"line":18},{"index_id":144,"token_group":131,"text":")","start_char":40,"line":18},{"index_id":145,"token_group":132,"text":";","start_char":41,"line":18},{"index_id":146,"token_group":133,"text":"new","start_char":4,"line":19},{"index_id":147,"token_group":134,"text":"Comp","start_char":7,"line":19},{"index_id":148,"token_group":134,"text":".","start_char":11,"line":19},{"index_id":149,"token_group":135,"text":"add","start_char":12,"line":19},{"index_id":150,"token_group":136,"text":"(","start_char":15,"line":19},{"index_id":151,"token_group":137,"text":"original","start_char":17,"line":19},{"index_id":152,"token_group":138,"text":"Competitor","start_char":25,"line":19},{"index_id":153,"token_group":138,"text":")","start_char":36,"line":19},{"index_id":154,"token_group":139,"text":";","start_char":37,"line":19},{"index_id":155,"token_group":140,"text":"new","start_char":4,"line":20},{"index_id":156,"token_group":141,"text":"Comp","start_char":7,"line":20},{"index_id":157,"token_group":141,"text":".","start_char":11,"line":20},{"index_id":158,"token_group":142,"text":"add","start_char":12,"line":20},{"index_id":159,"token_group":143,"text":"(","start_char":15,"line":20},{"index_id":160,"token_group":144,"text":"new","start_char":17,"line":20},{"index_id":161,"token_group":145,"text":"competitor","start_char":21,"line":20},{"index_id":162,"token_group":146,"text":"(","start_char":31,"line":20},{"index_id":163,"token_group":147,"text":")","start_char":32,"line":20},{"index_id":164,"token_group":148,"text":")","start_char":34,"line":20},{"index_id":165,"token_group":149,"text":";","start_char":35,"line":20},{"index_id":166,"token_group":150,"text":"competition","start_char":4,"line":22},{"index_id":167,"token_group":151,"text":".","start_char":15,"line":22},{"index_id":168,"token_group":152,"text":"set","start_char":16,"line":22},{"index_id":169,"token_group":153,"text":"Competitors","start_char":19,"line":22},{"index_id":170,"token_group":153,"text":"(","start_char":30,"line":22},{"index_id":171,"token_group":154,"text":"new","start_char":32,"line":22},{"index_id":172,"token_group":155,"text":"Comp","start_char":35,"line":22},{"index_id":173,"token_group":155,"text":")","start_char":40,"line":22},{"index_id":174,"token_group":156,"text":";","start_char":41,"line":22},{"index_id":175,"token_group":157,"text":"competition","start_char":4,"line":24},{"index_id":176,"token_group":158,"text":"competition","start_char":16,"line":24},{"index_id":177,"token_group":159,"text":"2","start_char":27,"line":24},{"index_id":178,"token_group":159,"text":"=","start_char":29,"line":24},{"index_id":179,"token_group":160,"text":"(","start_char":31,"line":24},{"index_id":180,"token_group":161,"text":"competition","start_char":33,"line":24},{"index_id":181,"token_group":162,"text":")","start_char":45,"line":24},{"index_id":182,"token_group":163,"text":"s","start_char":47,"line":24},{"index_id":183,"token_group":164,"text":".","start_char":48,"line":24},{"index_id":184,"token_group":165,"text":"merge","start_char":49,"line":24},{"index_id":185,"token_group":166,"text":"(","start_char":54,"line":24},{"index_id":186,"token_group":167,"text":"competition","start_char":56,"line":24},{"index_id":187,"token_group":168,"text":")","start_char":68,"line":24},{"index_id":188,"token_group":169,"text":";","start_char":69,"line":24},{"index_id":189,"token_group":170,"text":"tx","start_char":4,"line":25},{"index_id":190,"token_group":171,"text":".","start_char":6,"line":25},{"index_id":191,"token_group":172,"text":"commit","start_char":7,"line":25},{"index_id":192,"token_group":173,"text":"(","start_char":13,"line":25},{"index_id":193,"token_group":174,"text":")","start_char":14,"line":25},{"index_id":194,"token_group":175,"text":";","start_char":15,"line":25},{"index_id":195,"token_group":176,"text":"s","start_char":4,"line":26},{"index_id":196,"token_group":177,"text":".","start_char":5,"line":26},{"index_id":197,"token_group":178,"text":"close","start_char":6,"line":26},{"index_id":198,"token_group":179,"text":"(","start_char":11,"line":26},{"index_id":199,"token_group":180,"text":")","start_char":12,"line":26},{"index_id":200,"token_group":181,"text":";","start_char":13,"line":26},{"index_id":201,"token_group":182,"text":"assert","start_char":4,"line":28},{"index_id":202,"token_group":183,"text":"False","start_char":10,"line":28},{"index_id":203,"token_group":183,"text":"(","start_char":15,"line":28},{"index_id":204,"token_group":184,"text":"competition","start_char":17,"line":28},{"index_id":205,"token_group":185,"text":"==","start_char":29,"line":28},{"index_id":206,"token_group":186,"text":"competition","start_char":32,"line":28},{"index_id":207,"token_group":187,"text":"2","start_char":43,"line":28},{"index_id":208,"token_group":187,"text":")","start_char":45,"line":28},{"index_id":209,"token_group":188,"text":";","start_char":46,"line":28},{"index_id":210,"token_group":189,"text":"assert","start_char":4,"line":29},{"index_id":211,"token_group":190,"text":"False","start_char":10,"line":29},{"index_id":212,"token_group":190,"text":"(","start_char":15,"line":29},{"index_id":213,"token_group":191,"text":"competition","start_char":17,"line":29},{"index_id":214,"token_group":192,"text":".","start_char":28,"line":29},{"index_id":215,"token_group":193,"text":"get","start_char":29,"line":29},{"index_id":216,"token_group":194,"text":"Competitors","start_char":32,"line":29},{"index_id":217,"token_group":194,"text":"(","start_char":43,"line":29},{"index_id":218,"token_group":195,"text":")","start_char":44,"line":29},{"index_id":219,"token_group":196,"text":"==","start_char":46,"line":29},{"index_id":220,"token_group":197,"text":"competition","start_char":49,"line":29},{"index_id":221,"token_group":198,"text":"2","start_char":60,"line":29},{"index_id":222,"token_group":198,"text":".","start_char":61,"line":29},{"index_id":223,"token_group":199,"text":"get","start_char":62,"line":29},{"index_id":224,"token_group":200,"text":"Competitors","start_char":65,"line":29},{"index_id":225,"token_group":200,"text":"(","start_char":76,"line":29},{"index_id":226,"token_group":201,"text":")","start_char":77,"line":29},{"index_id":227,"token_group":202,"text":")","start_char":79,"line":29},{"index_id":228,"token_group":203,"text":";","start_char":80,"line":29},{"index_id":229,"token_group":204,"text":"assert","start_char":4,"line":30},{"index_id":230,"token_group":205,"text":"Equals","start_char":10,"line":30},{"index_id":231,"token_group":205,"text":"(","start_char":16,"line":30},{"index_id":232,"token_group":206,"text":"2","start_char":18,"line":30},{"index_id":233,"token_group":207,"text":",","start_char":19,"line":30},{"index_id":234,"token_group":208,"text":"competition","start_char":21,"line":30},{"index_id":235,"token_group":209,"text":"2","start_char":32,"line":30},{"index_id":236,"token_group":209,"text":".","start_char":33,"line":30},{"index_id":237,"token_group":210,"text":"get","start_char":34,"line":30},{"index_id":238,"token_group":211,"text":"Competitors","start_char":37,"line":30},{"index_id":239,"token_group":211,"text":"(","start_char":48,"line":30},{"index_id":240,"token_group":212,"text":")","start_char":49,"line":30},{"index_id":241,"token_group":213,"text":".","start_char":50,"line":30},{"index_id":242,"token_group":214,"text":"size","start_char":51,"line":30},{"index_id":243,"token_group":215,"text":"(","start_char":55,"line":30},{"index_id":244,"token_group":216,"text":")","start_char":56,"line":30},{"index_id":245,"token_group":217,"text":")","start_char":58,"line":30},{"index_id":246,"token_group":218,"text":";","start_char":59,"line":30},{"index_id":247,"token_group":219,"text":"s","start_char":4,"line":32},{"index_id":248,"token_group":220,"text":"=","start_char":6,"line":32},{"index_id":249,"token_group":221,"text":"open","start_char":8,"line":32},{"index_id":250,"token_group":222,"text":"Session","start_char":12,"line":32},{"index_id":251,"token_group":222,"text":"(","start_char":19,"line":32},{"index_id":252,"token_group":223,"text":")","start_char":20,"line":32},{"index_id":253,"token_group":224,"text":";","start_char":21,"line":32},{"index_id":254,"token_group":225,"text":"tx","start_char":4,"line":33},{"index_id":255,"token_group":226,"text":"=","start_char":7,"line":33},{"index_id":256,"token_group":227,"text":"s","start_char":9,"line":33},{"index_id":257,"token_group":228,"text":".","start_char":10,"line":33},{"index_id":258,"token_group":229,"text":"begin","start_char":11,"line":33},{"index_id":259,"token_group":230,"text":"Transaction","start_char":16,"line":33},{"index_id":260,"token_group":230,"text":"(","start_char":27,"line":33},{"index_id":261,"token_group":231,"text":")","start_char":28,"line":33},{"index_id":262,"token_group":232,"text":";","start_char":29,"line":33},{"index_id":263,"token_group":233,"text":"competition","start_char":4,"line":34},{"index_id":264,"token_group":234,"text":"=","start_char":16,"line":34},{"index_id":265,"token_group":235,"text":"(","start_char":18,"line":34},{"index_id":266,"token_group":236,"text":"competition","start_char":20,"line":34},{"index_id":267,"token_group":237,"text":")","start_char":32,"line":34},{"index_id":268,"token_group":238,"text":"s","start_char":34,"line":34},{"index_id":269,"token_group":239,"text":".","start_char":35,"line":34},{"index_id":270,"token_group":240,"text":"get","start_char":36,"line":34},{"index_id":271,"token_group":241,"text":"(","start_char":39,"line":34},{"index_id":272,"token_group":242,"text":"competition","start_char":41,"line":34},{"index_id":273,"token_group":243,"text":".","start_char":52,"line":34},{"index_id":274,"token_group":244,"text":"class","start_char":53,"line":34},{"index_id":275,"token_group":245,"text":",","start_char":58,"line":34},{"index_id":276,"token_group":246,"text":"competition","start_char":60,"line":34},{"index_id":277,"token_group":247,"text":".","start_char":71,"line":34},{"index_id":278,"token_group":248,"text":"get","start_char":72,"line":34},{"index_id":279,"token_group":249,"text":"Id","start_char":75,"line":34},{"index_id":280,"token_group":249,"text":"(","start_char":77,"line":34},{"index_id":281,"token_group":250,"text":")","start_char":78,"line":34},{"index_id":282,"token_group":251,"text":")","start_char":80,"line":34},{"index_id":283,"token_group":252,"text":";","start_char":81,"line":34},{"index_id":284,"token_group":253,"text":"assert","start_char":4,"line":35},{"index_id":285,"token_group":254,"text":"Equals","start_char":10,"line":35},{"index_id":286,"token_group":254,"text":"(","start_char":16,"line":35},{"index_id":287,"token_group":255,"text":"2","start_char":18,"line":35},{"index_id":288,"token_group":256,"text":",","start_char":19,"line":35},{"index_id":289,"token_group":257,"text":"competition","start_char":21,"line":35},{"index_id":290,"token_group":258,"text":".","start_char":32,"line":35},{"index_id":291,"token_group":259,"text":"get","start_char":33,"line":35},{"index_id":292,"token_group":260,"text":"Competitors","start_char":36,"line":35},{"index_id":293,"token_group":260,"text":"(","start_char":47,"line":35},{"index_id":294,"token_group":261,"text":")","start_char":48,"line":35},{"index_id":295,"token_group":262,"text":".","start_char":49,"line":35},{"index_id":296,"token_group":263,"text":"size","start_char":50,"line":35},{"index_id":297,"token_group":264,"text":"(","start_char":54,"line":35},{"index_id":298,"token_group":265,"text":")","start_char":55,"line":35},{"index_id":299,"token_group":266,"text":")","start_char":57,"line":35},{"index_id":300,"token_group":267,"text":";","start_char":58,"line":35},{"index_id":301,"token_group":268,"text":"s","start_char":4,"line":36},{"index_id":302,"token_group":269,"text":".","start_char":5,"line":36},{"index_id":303,"token_group":270,"text":"delete","start_char":6,"line":36},{"index_id":304,"token_group":271,"text":"(","start_char":12,"line":36},{"index_id":305,"token_group":272,"text":"competition","start_char":14,"line":36},{"index_id":306,"token_group":273,"text":")","start_char":26,"line":36},{"index_id":307,"token_group":274,"text":";","start_char":27,"line":36},{"index_id":308,"token_group":275,"text":"tx","start_char":4,"line":37},{"index_id":309,"token_group":276,"text":".","start_char":6,"line":37},{"index_id":310,"token_group":277,"text":"commit","start_char":7,"line":37},{"index_id":311,"token_group":278,"text":"(","start_char":13,"line":37},{"index_id":312,"token_group":279,"text":")","start_char":14,"line":37},{"index_id":313,"token_group":280,"text":";","start_char":15,"line":37},{"index_id":314,"token_group":281,"text":"s","start_char":4,"line":38},{"index_id":315,"token_group":282,"text":".","start_char":5,"line":38},{"index_id":316,"token_group":283,"text":"close","start_char":6,"line":38},{"index_id":317,"token_group":284,"text":"(","start_char":11,"line":38},{"index_id":318,"token_group":285,"text":")","start_char":12,"line":38},{"index_id":319,"token_group":286,"text":";","start_char":13,"line":38},{"index_id":320,"token_group":287,"text":"cleanup","start_char":4,"line":40},{"index_id":321,"token_group":288,"text":"(","start_char":11,"line":40},{"index_id":322,"token_group":289,"text":")","start_char":12,"line":40},{"index_id":323,"token_group":290,"text":";","start_char":13,"line":40},{"index_id":324,"token_group":291,"text":"}","start_char":0,"line":41}],"tokens_list":["{","session","s","=","open","Session","(",")",";","transaction","tx","=","s",".","begin","Transaction","(",")",";","competition","competition","=","new","competition","(",")",";","competition",".","get","Competitors","(",")",".","add","(","new","competitor","(","\"Name\"",")",")",";","competition",".","get","Competitors","(",")",".","add","(","new","competitor","(",")",")",";","competition",".","get","Competitors","(",")",".","add","(","new","competitor","(",")",")",";","s",".","persist","(","competition",")",";","tx",".","commit","(",")",";","s",".","close","(",")",";","s","=","open","Session","(",")",";","tx","=","s",".","begin","Transaction","(",")",";","list","new","Comp","=","new","array","List","(",")",";","competitor","original","Competitor","=","(","competitor",")","competition",".","get","Competitors","(",")",".","get","(","0",")",";","original","Competitor",".","set","Name","(","\"Name2\"",")",";","new","Comp",".","add","(","original","Competitor",")",";","new","Comp",".","add","(","new","competitor","(",")",")",";","competition",".","set","Competitors","(","new","Comp",")",";","competition","competition","2","=","(","competition",")","s",".","merge","(","competition",")",";","tx",".","commit","(",")",";","s",".","close","(",")",";","assert","False","(","competition","==","competition","2",")",";","assert","False","(","competition",".","get","Competitors","(",")","==","competition","2",".","get","Competitors","(",")",")",";","assert","Equals","(","2",",","competition","2",".","get","Competitors","(",")",".","size","(",")",")",";","s","=","open","Session","(",")",";","tx","=","s",".","begin","Transaction","(",")",";","competition","=","(","competition",")","s",".","get","(","competition",".","class",",","competition",".","get","Id","(",")",")",";","assert","Equals","(","2",",","competition",".","get","Competitors","(",")",".","size","(",")",")",";","s",".","delete","(","competition",")",";","tx",".","commit","(",")",";","s",".","close","(",")",";","cleanup","(",")",";","}"],"uuid":"08620f9e279aca9d948708b8dae0cfe4"},{"cap_original_tokens":["<SENTENCE_START>","{","<id>","string","<\/id>","<id>","f","State","<\/id>","=","<id>","create","Function","<\/id>","(","<id>","keyspace","<\/id>",",","\"int, int\"",",","\"CREATE FUNCTION %s(a int, b int) \"","+","\"CALLED ON NULL INPUT \"","+","\"RETURNS int \"","+","\"LANGUAGE javascript \"","+","\"AS 'a + b;'\"",")",";","<id>","string","<\/id>","<id>","a","<\/id>","=","<id>","create","Aggregate","<\/id>","(","<id>","keyspace","<\/id>",",","\"int\"",",","\"CREATE AGGREGATE %s(int) \"","+","\"SFUNC \"","+","<id>","short","Function","Name","<\/id>","(","<id>","f","State","<\/id>",")","+","\" \"","+","\"STYPE int \"",")",";","<id>","assert","Invalid","Message","<\/id>","(","\"does not exist or is not a scalar function\"",",","\"CREATE AGGREGATE \"","+","<id>","keyspace","<\/id>","+","\".aggInv(int) \"","+","\"SFUNC \"","+","<id>","short","Function","Name","<\/id>","(","<id>","a","<\/id>",")","+","\" \"","+","\"STYPE int \"",")",";","<id>","assert","Invalid","Message","<\/id>","(","\"does not exist or is not a scalar function\"",",","\"CREATE AGGREGATE \"","+","<id>","keyspace","<\/id>","+","\".aggInv(int) \"","+","\"SFUNC \"","+","<id>","short","Function","Name","<\/id>","(","<id>","f","State","<\/id>",")","+","\" \"","+","\"STYPE int \"","+","\"FINALFUNC \"","+","<id>","short","Function","Name","<\/id>","(","<id>","a","<\/id>",")",")",";","}","<SENTENCE_END\/>"],"file_name":"AggregationTest.java","formatted_lines":["{",""," String fState = createFunction(KEYSPACE,"," \"int, int\","," \"CREATE FUNCTION %s(a int, b int) \" +"," \"CALLED ON NULL INPUT \" +"," \"RETURNS int \" +"," \"LANGUAGE javascript \" +"," \"AS 'a + b;'\");",""," String a = createAggregate(KEYSPACE,"," \"int\","," \"CREATE AGGREGATE %s(int) \" +"," \"SFUNC \" + shortFunctionName(fState) + \" \" +"," \"STYPE int \");",""," assertInvalidMessage(\"does not exist or is not a scalar function\","," \"CREATE AGGREGATE \" + KEYSPACE + \".aggInv(int) \" +"," \"SFUNC \" + shortFunctionName(a) + \" \" +"," \"STYPE int \");",""," assertInvalidMessage(\"does not exist or is not a scalar function\","," \"CREATE AGGREGATE \" + KEYSPACE + \".aggInv(int) \" +"," \"SFUNC \" + shortFunctionName(fState) + \" \" +"," \"STYPE int \" +"," \"FINALFUNC \" + shortFunctionName(a));","}"],"function_name":"testAggregatesReferencedInAggregates","function_name_tokens":["test","aggregates","referenced","in","aggregates"],"id_body_hash":"96ab194127bf187f8b8edbbc66bb3206","id_same_identifier_list":[0,1,2,3,3,4,5,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,25,26,27,28,29,30,31,32,33,34,35,35,35,36,37,37,38,39,40,41,42,43,44,45,45,45,46,47,48,49,50,51,52,53,54,55,56,57,57,57,58,59,60,61,62,63,64,65,66,67,67,67,68,69,70,71,72,73,74,75,76,77,78,79,79,79,80,81,81,82,83,84,85,86,87,88,89,90,90,90,91,92,93,94,95,96,97],"option_correct":"testAggregatesReferencedInAggregates","options":["testFilterIn","testEmptyIN","appendAndSync","compact","testAggregatesReferencedInAggregates","testINWithDuplicateValue","testIncrementalRepairWithSubrangesIsNotGlobal"],"options_nlp":["test filter in","test empty in","append and sync","compact","test aggregates referenced in aggregates","test in with duplicate value","test incremental repair with subranges is not global"],"options_random":["appendAndSync","testIncrementalRepairWithSubrangesIsNotGlobal","compact"],"options_tfidf":["testEmptyIN","testFilterIn","testINWithDuplicateValue"],"project_name":"cassandra","source_code_string":"@Test\n public void testAggregatesReferencedInAggregates() throws Throwable\n {\n\n String fState = createFunction(KEYSPACE,\n \"int, int\",\n \"CREATE FUNCTION %s(a int, b int) \" +\n \"CALLED ON NULL INPUT \" +\n \"RETURNS int \" +\n \"LANGUAGE javascript \" +\n \"AS 'a + b;'\");\n\n String a = createAggregate(KEYSPACE,\n \"int\",\n \"CREATE AGGREGATE %s(int) \" +\n \"SFUNC \" + shortFunctionName(fState) + \" \" +\n \"STYPE int \");\n\n assertInvalidMessage(\"does not exist or is not a scalar function\",\n \"CREATE AGGREGATE \" + KEYSPACE + \".aggInv(int) \" +\n \"SFUNC \" + shortFunctionName(a) + \" \" +\n \"STYPE int \");\n\n assertInvalidMessage(\"does not exist or is not a scalar function\",\n \"CREATE AGGREGATE \" + KEYSPACE + \".aggInv(int) \" +\n \"SFUNC \" + shortFunctionName(fState) + \" \" +\n \"STYPE int \" +\n \"FINALFUNC \" + shortFunctionName(a));\n }","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"string","start_char":4,"line":2},{"index_id":2,"token_group":2,"text":"f","start_char":11,"line":2},{"index_id":3,"token_group":3,"text":"State","start_char":12,"line":2},{"index_id":4,"token_group":3,"text":"=","start_char":18,"line":2},{"index_id":5,"token_group":4,"text":"create","start_char":20,"line":2},{"index_id":6,"token_group":5,"text":"Function","start_char":26,"line":2},{"index_id":7,"token_group":5,"text":"(","start_char":34,"line":2},{"index_id":8,"token_group":6,"text":"keyspace","start_char":35,"line":2},{"index_id":9,"token_group":7,"text":",","start_char":43,"line":2},{"index_id":10,"token_group":8,"text":"\"int, int\"","start_char":35,"line":3},{"index_id":11,"token_group":9,"text":",","start_char":45,"line":3},{"index_id":12,"token_group":10,"text":"\"CREATE FUNCTION %s(a int, b int) \"","start_char":35,"line":4},{"index_id":13,"token_group":11,"text":"+","start_char":71,"line":4},{"index_id":14,"token_group":12,"text":"\"CALLED ON NULL INPUT \"","start_char":35,"line":5},{"index_id":15,"token_group":13,"text":"+","start_char":59,"line":5},{"index_id":16,"token_group":14,"text":"\"RETURNS int \"","start_char":35,"line":6},{"index_id":17,"token_group":15,"text":"+","start_char":50,"line":6},{"index_id":18,"token_group":16,"text":"\"LANGUAGE javascript \"","start_char":35,"line":7},{"index_id":19,"token_group":17,"text":"+","start_char":58,"line":7},{"index_id":20,"token_group":18,"text":"\"AS 'a + b;'\"","start_char":35,"line":8},{"index_id":21,"token_group":19,"text":")","start_char":48,"line":8},{"index_id":22,"token_group":20,"text":";","start_char":49,"line":8},{"index_id":23,"token_group":21,"text":"string","start_char":4,"line":10},{"index_id":24,"token_group":22,"text":"a","start_char":11,"line":10},{"index_id":25,"token_group":23,"text":"=","start_char":13,"line":10},{"index_id":26,"token_group":24,"text":"create","start_char":15,"line":10},{"index_id":27,"token_group":25,"text":"Aggregate","start_char":21,"line":10},{"index_id":28,"token_group":25,"text":"(","start_char":30,"line":10},{"index_id":29,"token_group":26,"text":"keyspace","start_char":31,"line":10},{"index_id":30,"token_group":27,"text":",","start_char":39,"line":10},{"index_id":31,"token_group":28,"text":"\"int\"","start_char":31,"line":11},{"index_id":32,"token_group":29,"text":",","start_char":36,"line":11},{"index_id":33,"token_group":30,"text":"\"CREATE AGGREGATE %s(int) \"","start_char":31,"line":12},{"index_id":34,"token_group":31,"text":"+","start_char":59,"line":12},{"index_id":35,"token_group":32,"text":"\"SFUNC \"","start_char":31,"line":13},{"index_id":36,"token_group":33,"text":"+","start_char":40,"line":13},{"index_id":37,"token_group":34,"text":"short","start_char":42,"line":13},{"index_id":38,"token_group":35,"text":"Function","start_char":47,"line":13},{"index_id":39,"token_group":35,"text":"Name","start_char":55,"line":13},{"index_id":40,"token_group":35,"text":"(","start_char":59,"line":13},{"index_id":41,"token_group":36,"text":"f","start_char":60,"line":13},{"index_id":42,"token_group":37,"text":"State","start_char":61,"line":13},{"index_id":43,"token_group":37,"text":")","start_char":66,"line":13},{"index_id":44,"token_group":38,"text":"+","start_char":68,"line":13},{"index_id":45,"token_group":39,"text":"\" \"","start_char":70,"line":13},{"index_id":46,"token_group":40,"text":"+","start_char":74,"line":13},{"index_id":47,"token_group":41,"text":"\"STYPE int \"","start_char":31,"line":14},{"index_id":48,"token_group":42,"text":")","start_char":43,"line":14},{"index_id":49,"token_group":43,"text":";","start_char":44,"line":14},{"index_id":50,"token_group":44,"text":"assert","start_char":4,"line":16},{"index_id":51,"token_group":45,"text":"Invalid","start_char":10,"line":16},{"index_id":52,"token_group":45,"text":"Message","start_char":17,"line":16},{"index_id":53,"token_group":45,"text":"(","start_char":24,"line":16},{"index_id":54,"token_group":46,"text":"\"does not exist or is not a scalar function\"","start_char":25,"line":16},{"index_id":55,"token_group":47,"text":",","start_char":69,"line":16},{"index_id":56,"token_group":48,"text":"\"CREATE AGGREGATE \"","start_char":25,"line":17},{"index_id":57,"token_group":49,"text":"+","start_char":45,"line":17},{"index_id":58,"token_group":50,"text":"keyspace","start_char":47,"line":17},{"index_id":59,"token_group":51,"text":"+","start_char":56,"line":17},{"index_id":60,"token_group":52,"text":"\".aggInv(int) \"","start_char":58,"line":17},{"index_id":61,"token_group":53,"text":"+","start_char":74,"line":17},{"index_id":62,"token_group":54,"text":"\"SFUNC \"","start_char":25,"line":18},{"index_id":63,"token_group":55,"text":"+","start_char":34,"line":18},{"index_id":64,"token_group":56,"text":"short","start_char":36,"line":18},{"index_id":65,"token_group":57,"text":"Function","start_char":41,"line":18},{"index_id":66,"token_group":57,"text":"Name","start_char":49,"line":18},{"index_id":67,"token_group":57,"text":"(","start_char":53,"line":18},{"index_id":68,"token_group":58,"text":"a","start_char":54,"line":18},{"index_id":69,"token_group":59,"text":")","start_char":55,"line":18},{"index_id":70,"token_group":60,"text":"+","start_char":57,"line":18},{"index_id":71,"token_group":61,"text":"\" \"","start_char":59,"line":18},{"index_id":72,"token_group":62,"text":"+","start_char":63,"line":18},{"index_id":73,"token_group":63,"text":"\"STYPE int \"","start_char":25,"line":19},{"index_id":74,"token_group":64,"text":")","start_char":37,"line":19},{"index_id":75,"token_group":65,"text":";","start_char":38,"line":19},{"index_id":76,"token_group":66,"text":"assert","start_char":4,"line":21},{"index_id":77,"token_group":67,"text":"Invalid","start_char":10,"line":21},{"index_id":78,"token_group":67,"text":"Message","start_char":17,"line":21},{"index_id":79,"token_group":67,"text":"(","start_char":24,"line":21},{"index_id":80,"token_group":68,"text":"\"does not exist or is not a scalar function\"","start_char":25,"line":21},{"index_id":81,"token_group":69,"text":",","start_char":69,"line":21},{"index_id":82,"token_group":70,"text":"\"CREATE AGGREGATE \"","start_char":25,"line":22},{"index_id":83,"token_group":71,"text":"+","start_char":45,"line":22},{"index_id":84,"token_group":72,"text":"keyspace","start_char":47,"line":22},{"index_id":85,"token_group":73,"text":"+","start_char":56,"line":22},{"index_id":86,"token_group":74,"text":"\".aggInv(int) \"","start_char":58,"line":22},{"index_id":87,"token_group":75,"text":"+","start_char":74,"line":22},{"index_id":88,"token_group":76,"text":"\"SFUNC \"","start_char":25,"line":23},{"index_id":89,"token_group":77,"text":"+","start_char":34,"line":23},{"index_id":90,"token_group":78,"text":"short","start_char":36,"line":23},{"index_id":91,"token_group":79,"text":"Function","start_char":41,"line":23},{"index_id":92,"token_group":79,"text":"Name","start_char":49,"line":23},{"index_id":93,"token_group":79,"text":"(","start_char":53,"line":23},{"index_id":94,"token_group":80,"text":"f","start_char":54,"line":23},{"index_id":95,"token_group":81,"text":"State","start_char":55,"line":23},{"index_id":96,"token_group":81,"text":")","start_char":60,"line":23},{"index_id":97,"token_group":82,"text":"+","start_char":62,"line":23},{"index_id":98,"token_group":83,"text":"\" \"","start_char":64,"line":23},{"index_id":99,"token_group":84,"text":"+","start_char":68,"line":23},{"index_id":100,"token_group":85,"text":"\"STYPE int \"","start_char":25,"line":24},{"index_id":101,"token_group":86,"text":"+","start_char":38,"line":24},{"index_id":102,"token_group":87,"text":"\"FINALFUNC \"","start_char":25,"line":25},{"index_id":103,"token_group":88,"text":"+","start_char":38,"line":25},{"index_id":104,"token_group":89,"text":"short","start_char":40,"line":25},{"index_id":105,"token_group":90,"text":"Function","start_char":45,"line":25},{"index_id":106,"token_group":90,"text":"Name","start_char":53,"line":25},{"index_id":107,"token_group":90,"text":"(","start_char":57,"line":25},{"index_id":108,"token_group":91,"text":"a","start_char":58,"line":25},{"index_id":109,"token_group":92,"text":")","start_char":59,"line":25},{"index_id":110,"token_group":93,"text":")","start_char":60,"line":25},{"index_id":111,"token_group":94,"text":";","start_char":61,"line":25},{"index_id":112,"token_group":95,"text":"}","start_char":0,"line":26}],"tokens_list":["{","string","f","State","=","create","Function","(","keyspace",",","\"int, int\"",",","\"CREATE FUNCTION %s(a int, b int) \"","+","\"CALLED ON NULL INPUT \"","+","\"RETURNS int \"","+","\"LANGUAGE javascript \"","+","\"AS 'a + b;'\"",")",";","string","a","=","create","Aggregate","(","keyspace",",","\"int\"",",","\"CREATE AGGREGATE %s(int) \"","+","\"SFUNC \"","+","short","Function","Name","(","f","State",")","+","\" \"","+","\"STYPE int \"",")",";","assert","Invalid","Message","(","\"does not exist or is not a scalar function\"",",","\"CREATE AGGREGATE \"","+","keyspace","+","\".aggInv(int) \"","+","\"SFUNC \"","+","short","Function","Name","(","a",")","+","\" \"","+","\"STYPE int \"",")",";","assert","Invalid","Message","(","\"does not exist or is not a scalar function\"",",","\"CREATE AGGREGATE \"","+","keyspace","+","\".aggInv(int) \"","+","\"SFUNC \"","+","short","Function","Name","(","f","State",")","+","\" \"","+","\"STYPE int \"","+","\"FINALFUNC \"","+","short","Function","Name","(","a",")",")",";","}"],"uuid":"c7ea41f0dd1244afef382a45245a3d6d"},{"cap_original_tokens":["<SENTENCE_START>","{","return","(","(","(","long",")","<id>","work","Permits","<\/id>",")","<<","32",")","|","<id>","task","Permits","<\/id>",";","}","<SENTENCE_END\/>"],"file_name":"SEPExecutor.java","formatted_lines":["{"," return (((long) workPermits) << 32) | taskPermits;","}"],"function_name":"combine","function_name_tokens":["combine"],"id_body_hash":"eec236811e7f26c75374fc8ea34f7f9a","id_same_identifier_list":[0,1,2,3,4,5,6,7,8,8,9,10,11,12,13,14,14,15,16,17],"option_correct":"combine","options":["combine","testSimultaneousMove","testVersion","isSetEnd_token","createMetricName","testStateJumpToNormal","beforeTest"],"options_nlp":["combine","test simultaneous move","test version","is set end token","create metric name","test state jump to normal","before test"],"options_random":["isSetEnd_token","testVersion","createMetricName"],"options_tfidf":["beforeTest","testStateJumpToNormal","testSimultaneousMove"],"project_name":"cassandra","source_code_string":"private static long combine(int taskPermits, int workPermits)\n {\n return (((long) workPermits) << 32) | taskPermits;\n }","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"return","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"(","start_char":11,"line":1},{"index_id":3,"token_group":3,"text":"(","start_char":12,"line":1},{"index_id":4,"token_group":4,"text":"(","start_char":13,"line":1},{"index_id":5,"token_group":5,"text":"long","start_char":14,"line":1},{"index_id":6,"token_group":6,"text":")","start_char":18,"line":1},{"index_id":7,"token_group":7,"text":"work","start_char":20,"line":1},{"index_id":8,"token_group":8,"text":"Permits","start_char":24,"line":1},{"index_id":9,"token_group":8,"text":")","start_char":31,"line":1},{"index_id":10,"token_group":9,"text":"<<","start_char":33,"line":1},{"index_id":11,"token_group":10,"text":"32","start_char":36,"line":1},{"index_id":12,"token_group":11,"text":")","start_char":38,"line":1},{"index_id":13,"token_group":12,"text":"|","start_char":40,"line":1},{"index_id":14,"token_group":13,"text":"task","start_char":42,"line":1},{"index_id":15,"token_group":14,"text":"Permits","start_char":46,"line":1},{"index_id":16,"token_group":14,"text":";","start_char":53,"line":1},{"index_id":17,"token_group":15,"text":"}","start_char":0,"line":2}],"tokens_list":["{","return","(","(","(","long",")","work","Permits",")","<<","32",")","|","task","Permits",";","}"],"uuid":"b03d6dd463c8389722e7a583c4cd3328"},{"cap_original_tokens":["<SENTENCE_START>","{","return","<id>","get","Settings","<\/id>","(",")",";","}","<SENTENCE_END\/>"],"file_name":"RunConfigurationConfigurableAdapter.java","formatted_lines":["{"," return getSettings();","}"],"function_name":"getConfiguration","function_name_tokens":["get","configuration"],"id_body_hash":"9579633124374bf331b8ffea38345bbe","id_same_identifier_list":[0,1,2,3,3,4,5,6,7,8],"option_correct":"getConfiguration","options":["getConfiguration","getConfigurationType","scheduleFoldersResolveForAllProjects","getSelectedConfiguration","setShowErrors","registerEditor","getConfigurationSettings"],"options_nlp":["get configuration","get configuration type","schedule folders resolve for all projects","get selected configuration","set show errors","register editor","get configuration settings"],"options_random":["scheduleFoldersResolveForAllProjects","registerEditor","setShowErrors"],"options_tfidf":["getSelectedConfiguration","getConfigurationType","getConfigurationSettings"],"project_name":"intellij-community","source_code_string":"public T getConfiguration() {\n return getSettings();\n }","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"return","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"get","start_char":11,"line":1},{"index_id":3,"token_group":3,"text":"Settings","start_char":14,"line":1},{"index_id":4,"token_group":3,"text":"(","start_char":22,"line":1},{"index_id":5,"token_group":4,"text":")","start_char":23,"line":1},{"index_id":6,"token_group":5,"text":";","start_char":24,"line":1},{"index_id":7,"token_group":6,"text":"}","start_char":0,"line":2}],"tokens_list":["{","return","get","Settings","(",")",";","}"],"uuid":"5f4dd62e6e51149973c8af4ace975ebd"},{"cap_original_tokens":["<SENTENCE_START>","{","return","<id>","my","Current","Window","Button","<\/id>",".","<id>","is","Selected","<\/id>","(",")","&&","<id>","my","Add","Checkbox","<\/id>",".","<id>","is","Selected","<\/id>","(",")","&&","!","<id>","my","Hide","Replace","<\/id>",";","}","<SENTENCE_END\/>"],"file_name":"OpenOrAttachDialog.java","formatted_lines":["{"," return myCurrentWindowButton.isSelected() && myAddCheckbox.isSelected() &&"," !myHideReplace;","}"],"function_name":"isAttach","function_name_tokens":["is","attach"],"id_body_hash":"82b833c92cd458cb4071ad188478a1cf","id_same_identifier_list":[0,1,2,3,3,3,3,4,5,5,6,7,8,9,9,9,10,11,11,12,13,14,15,16,16,16,17,18,19],"option_correct":"isAttach","options":["isA","appendAccessors","isB","isAttach","testAnonymousClass3","testFormatOptimizeRearrangeWholeFile","is"],"options_nlp":["is a","append accessors","is b","is attach","test anonymous class 3","test format optimize rearrange whole file","is"],"options_random":["appendAccessors","testFormatOptimizeRearrangeWholeFile","testAnonymousClass3"],"options_tfidf":["is","isB","isA"],"project_name":"intellij-community","source_code_string":"public boolean isAttach() {\n return myCurrentWindowButton.isSelected() && myAddCheckbox.isSelected() && !myHideReplace;\n }","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"return","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"my","start_char":11,"line":1},{"index_id":3,"token_group":3,"text":"Current","start_char":13,"line":1},{"index_id":4,"token_group":3,"text":"Window","start_char":20,"line":1},{"index_id":5,"token_group":3,"text":"Button","start_char":26,"line":1},{"index_id":6,"token_group":3,"text":".","start_char":32,"line":1},{"index_id":7,"token_group":4,"text":"is","start_char":33,"line":1},{"index_id":8,"token_group":5,"text":"Selected","start_char":35,"line":1},{"index_id":9,"token_group":5,"text":"(","start_char":43,"line":1},{"index_id":10,"token_group":6,"text":")","start_char":44,"line":1},{"index_id":11,"token_group":7,"text":"&&","start_char":46,"line":1},{"index_id":12,"token_group":8,"text":"my","start_char":49,"line":1},{"index_id":13,"token_group":9,"text":"Add","start_char":51,"line":1},{"index_id":14,"token_group":9,"text":"Checkbox","start_char":54,"line":1},{"index_id":15,"token_group":9,"text":".","start_char":62,"line":1},{"index_id":16,"token_group":10,"text":"is","start_char":63,"line":1},{"index_id":17,"token_group":11,"text":"Selected","start_char":65,"line":1},{"index_id":18,"token_group":11,"text":"(","start_char":73,"line":1},{"index_id":19,"token_group":12,"text":")","start_char":74,"line":1},{"index_id":20,"token_group":13,"text":"&&","start_char":76,"line":1},{"index_id":21,"token_group":14,"text":"!","start_char":11,"line":2},{"index_id":22,"token_group":15,"text":"my","start_char":12,"line":2},{"index_id":23,"token_group":16,"text":"Hide","start_char":14,"line":2},{"index_id":24,"token_group":16,"text":"Replace","start_char":18,"line":2},{"index_id":25,"token_group":16,"text":";","start_char":25,"line":2},{"index_id":26,"token_group":17,"text":"}","start_char":0,"line":3}],"tokens_list":["{","return","my","Current","Window","Button",".","is","Selected","(",")","&&","my","Add","Checkbox",".","is","Selected","(",")","&&","!","my","Hide","Replace",";","}"],"uuid":"a5b1f39e3f7344d9f8766e028c2fd3f4"},{"cap_original_tokens":["<SENTENCE_START>","{","<id>","std","Out","<\/id>",".","<id>","set","Destination","<\/id>","(","<id>","std","Out","Destination","<\/id>",")",";","}","<SENTENCE_END\/>"],"file_name":"DefaultStandardOutputRedirector.java","formatted_lines":["{"," stdOut.setDestination(stdOutDestination);","}"],"function_name":"redirectStandardOutputTo","function_name_tokens":["redirect","standard","output","to"],"id_body_hash":"e5ff70eb40cdc075c3ed47752306a10f","id_same_identifier_list":[0,1,2,2,3,4,4,5,6,6,6,7,8,9,10],"option_correct":"redirectStandardOutputTo","options":["addStandardOutputListener","isDaemonIdleTimeoutConfigurable","redirectStandardOutputTo","groupsTasksByTaskGroupAndPassesTasksToTheRenderer","setStandardOutput","isVisibleClass","captureStandardOutput"],"options_nlp":["add standard output listener","is daemon idle timeout configurable","redirect standard output to","groups tasks by task group and passes tasks to the renderer","set standard output","is visible class","capture standard output"],"options_random":["isVisibleClass","groupsTasksByTaskGroupAndPassesTasksToTheRenderer","isDaemonIdleTimeoutConfigurable"],"options_tfidf":["addStandardOutputListener","setStandardOutput","captureStandardOutput"],"project_name":"gradle","source_code_string":"public void redirectStandardOutputTo(StandardOutputListener stdOutDestination) {\n stdOut.setDestination(stdOutDestination);\n }","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"std","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"Out","start_char":7,"line":1},{"index_id":3,"token_group":2,"text":".","start_char":10,"line":1},{"index_id":4,"token_group":3,"text":"set","start_char":11,"line":1},{"index_id":5,"token_group":4,"text":"Destination","start_char":14,"line":1},{"index_id":6,"token_group":4,"text":"(","start_char":25,"line":1},{"index_id":7,"token_group":5,"text":"std","start_char":26,"line":1},{"index_id":8,"token_group":6,"text":"Out","start_char":29,"line":1},{"index_id":9,"token_group":6,"text":"Destination","start_char":32,"line":1},{"index_id":10,"token_group":6,"text":")","start_char":43,"line":1},{"index_id":11,"token_group":7,"text":";","start_char":44,"line":1},{"index_id":12,"token_group":8,"text":"}","start_char":0,"line":2}],"tokens_list":["{","std","Out",".","set","Destination","(","std","Out","Destination",")",";","}"],"uuid":"2f3fbc02470b30fa43a4d9deb2394756"},{"cap_original_tokens":["<SENTENCE_START>","{","<id>","do","Test","Presentation","<\/id>","(","\"<html>List<String> param<\/html>\"",")",";","}","<SENTENCE_END\/>"],"file_name":"ParameterInfoTest.java","formatted_lines":["public void testGenericsOutsideCall() throws Exception {"," doTestPresentation(\"<html>List<String> param<\/html>\");","}"],"function_name":"testGenericsOutsideCall","function_name_tokens":["test","generics","outside","call"],"id_body_hash":"58ca804e57d495325b6a669fa489fd1c","id_same_identifier_list":[0,1,2,2,2,3,4,5,6,7,8],"option_correct":"testGenericsOutsideCall","options":["testGenerics","distance","addTextOccurrence","testGenericsInsideCall","processSetStaticDirectoryResponse","testGenericsOutsideCall","testGenerics1"],"options_nlp":["test generics","distance","add text occurrence","test generics inside call","process set static directory response","test generics outside call","test generics 1"],"options_random":["addTextOccurrence","distance","processSetStaticDirectoryResponse"],"options_tfidf":["testGenerics1","testGenerics","testGenericsInsideCall"],"project_name":"intellij-community","source_code_string":"public void testGenericsOutsideCall() throws Exception {\n doTestPresentation(\"<html>List<String> param<\/html>\");\n }","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":38,"line":0},{"index_id":1,"token_group":1,"text":"do","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"Test","start_char":6,"line":1},{"index_id":3,"token_group":2,"text":"Presentation","start_char":10,"line":1},{"index_id":4,"token_group":2,"text":"(","start_char":22,"line":1},{"index_id":5,"token_group":3,"text":"\"<html>List<String> param<\/html>\"","start_char":23,"line":1},{"index_id":6,"token_group":4,"text":")","start_char":62,"line":1},{"index_id":7,"token_group":5,"text":";","start_char":63,"line":1},{"index_id":8,"token_group":6,"text":"}","start_char":0,"line":2}],"tokens_list":["{","do","Test","Presentation","(","\"<html>List<String> param<\/html>\"",")",";","}"],"uuid":"11d5449d23a403712ce05a014bb8a460"},{"cap_original_tokens":["<SENTENCE_START>","{","if","(","<id>","sdk","To","Usersite","<\/id>",".","<id>","contains","Key","<\/id>","(","<id>","sdk","<\/id>",")",")","return","<id>","sdk","To","Usersite","<\/id>",".","<id>","get","<\/id>","(","<id>","sdk","<\/id>",")",";","return","false",";","}","<SENTENCE_END\/>"],"file_name":"PyPackageService.java","formatted_lines":["{"," if (sdkToUsersite.containsKey(sdk))"," return sdkToUsersite.get(sdk);"," return false;","}"],"function_name":"useUserSite","function_name_tokens":["use","user","site"],"id_body_hash":"26206b95dd3f8250366a6f048d718eac","id_same_identifier_list":[0,1,2,3,4,4,4,5,6,6,7,8,9,10,11,12,12,12,13,14,15,16,17,18,19,20,21,22,23],"option_correct":"useUserSite","options":["isUseUserManifest","getImportReferenceText","notifyUser","useUserSite","hasUnresolvedPlugins","use","assertPointersAreDisposed"],"options_nlp":["is use user manifest","get import reference text","notify user","use user site","has unresolved plugins","use","assert pointers are disposed"],"options_random":["getImportReferenceText","hasUnresolvedPlugins","assertPointersAreDisposed"],"options_tfidf":["use","isUseUserManifest","notifyUser"],"project_name":"intellij-community","source_code_string":"public boolean useUserSite(String sdk) {\n if (sdkToUsersite.containsKey(sdk))\n return sdkToUsersite.get(sdk);\n return false;\n }","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"if","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"(","start_char":7,"line":1},{"index_id":3,"token_group":3,"text":"sdk","start_char":8,"line":1},{"index_id":4,"token_group":4,"text":"To","start_char":11,"line":1},{"index_id":5,"token_group":4,"text":"Usersite","start_char":13,"line":1},{"index_id":6,"token_group":4,"text":".","start_char":21,"line":1},{"index_id":7,"token_group":5,"text":"contains","start_char":22,"line":1},{"index_id":8,"token_group":6,"text":"Key","start_char":30,"line":1},{"index_id":9,"token_group":6,"text":"(","start_char":33,"line":1},{"index_id":10,"token_group":7,"text":"sdk","start_char":34,"line":1},{"index_id":11,"token_group":8,"text":")","start_char":37,"line":1},{"index_id":12,"token_group":9,"text":")","start_char":38,"line":1},{"index_id":13,"token_group":10,"text":"return","start_char":8,"line":2},{"index_id":14,"token_group":11,"text":"sdk","start_char":15,"line":2},{"index_id":15,"token_group":12,"text":"To","start_char":18,"line":2},{"index_id":16,"token_group":12,"text":"Usersite","start_char":20,"line":2},{"index_id":17,"token_group":12,"text":".","start_char":28,"line":2},{"index_id":18,"token_group":13,"text":"get","start_char":29,"line":2},{"index_id":19,"token_group":14,"text":"(","start_char":32,"line":2},{"index_id":20,"token_group":15,"text":"sdk","start_char":33,"line":2},{"index_id":21,"token_group":16,"text":")","start_char":36,"line":2},{"index_id":22,"token_group":17,"text":";","start_char":37,"line":2},{"index_id":23,"token_group":18,"text":"return","start_char":4,"line":3},{"index_id":24,"token_group":19,"text":"false","start_char":11,"line":3},{"index_id":25,"token_group":20,"text":";","start_char":16,"line":3},{"index_id":26,"token_group":21,"text":"}","start_char":0,"line":4}],"tokens_list":["{","if","(","sdk","To","Usersite",".","contains","Key","(","sdk",")",")","return","sdk","To","Usersite",".","get","(","sdk",")",";","return","false",";","}"],"uuid":"95711b97f327c4ced63a1129586d6c65"},{"cap_original_tokens":["<SENTENCE_START>","{","return","<id>","schema","<\/id>",".","<id>","is","System","Keyspace","<\/id>","(","<id>","utf","8","Type","<\/id>",".","<id>","instance","<\/id>",".","<id>","compose","<\/id>","(","<id>","partition","Key","<\/id>",".","<id>","get","Key","<\/id>","(",")",")",")",";","}","<SENTENCE_END\/>"],"file_name":"SchemaKeyspace.java","formatted_lines":["{"," return Schema.isSystemKeyspace(UTF8Type.instance.compose("," partitionKey.getKey()));","}"],"function_name":"isSystemKeyspaceSchemaPartition","function_name_tokens":["is","system","keyspace","schema","partition"],"id_body_hash":"da8ed83d9a80e46038eb4d49768fe4f2","id_same_identifier_list":[0,1,2,3,4,5,5,5,6,7,7,7,8,9,10,11,12,13,13,14,15,15,16,17,18,19,20,21,22],"option_correct":"isSystemKeyspaceSchemaPartition","options":["keyspace","addView","validateKeyspaceNotSystem","testDeleteSingleColumnInViewPartitionKey","fillBBWithRandom","isSystemKeyspaceSchemaPartition","isSystemKeyspace"],"options_nlp":["keyspace","add view","validate keyspace not system","test delete single column in view partition key","fill bb with random","is system keyspace schema partition","is system keyspace"],"options_random":["fillBBWithRandom","addView","testDeleteSingleColumnInViewPartitionKey"],"options_tfidf":["keyspace","isSystemKeyspace","validateKeyspaceNotSystem"],"project_name":"cassandra","source_code_string":"private static boolean isSystemKeyspaceSchemaPartition(DecoratedKey partitionKey)\n {\n return Schema.isSystemKeyspace(UTF8Type.instance.compose(partitionKey.getKey()));\n }","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"return","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"schema","start_char":11,"line":1},{"index_id":3,"token_group":3,"text":".","start_char":17,"line":1},{"index_id":4,"token_group":4,"text":"is","start_char":18,"line":1},{"index_id":5,"token_group":5,"text":"System","start_char":20,"line":1},{"index_id":6,"token_group":5,"text":"Keyspace","start_char":26,"line":1},{"index_id":7,"token_group":5,"text":"(","start_char":34,"line":1},{"index_id":8,"token_group":6,"text":"utf","start_char":35,"line":1},{"index_id":9,"token_group":7,"text":"8","start_char":38,"line":1},{"index_id":10,"token_group":7,"text":"Type","start_char":39,"line":1},{"index_id":11,"token_group":7,"text":".","start_char":43,"line":1},{"index_id":12,"token_group":8,"text":"instance","start_char":44,"line":1},{"index_id":13,"token_group":9,"text":".","start_char":52,"line":1},{"index_id":14,"token_group":10,"text":"compose","start_char":53,"line":1},{"index_id":15,"token_group":11,"text":"(","start_char":60,"line":1},{"index_id":16,"token_group":12,"text":"partition","start_char":39,"line":2},{"index_id":17,"token_group":13,"text":"Key","start_char":48,"line":2},{"index_id":18,"token_group":13,"text":".","start_char":51,"line":2},{"index_id":19,"token_group":14,"text":"get","start_char":52,"line":2},{"index_id":20,"token_group":15,"text":"Key","start_char":55,"line":2},{"index_id":21,"token_group":15,"text":"(","start_char":58,"line":2},{"index_id":22,"token_group":16,"text":")","start_char":59,"line":2},{"index_id":23,"token_group":17,"text":")","start_char":60,"line":2},{"index_id":24,"token_group":18,"text":")","start_char":61,"line":2},{"index_id":25,"token_group":19,"text":";","start_char":62,"line":2},{"index_id":26,"token_group":20,"text":"}","start_char":0,"line":3}],"tokens_list":["{","return","schema",".","is","System","Keyspace","(","utf","8","Type",".","instance",".","compose","(","partition","Key",".","get","Key","(",")",")",")",";","}"],"uuid":"01185745383c5060702165099ab37ceb"},{"cap_original_tokens":["<SENTENCE_START>","{","<id>","static","Application","Context","<\/id>","<id>","ac","<\/id>","=","new","<id>","static","Application","Context","<\/id>","(",")",";","<id>","mutable","Property","Values","<\/id>","<id>","pvs","<\/id>","=","new","<id>","mutable","Property","Values","<\/id>","(",")",";","<id>","pvs","<\/id>",".","<id>","add","<\/id>","(","\"spouse\"",",","new","<id>","runtime","Bean","Reference","<\/id>","(","\"${ref}\"",")",")",";","<id>","ac","<\/id>",".","<id>","register","Singleton","<\/id>","(","\"tb\"",",","<id>","test","Bean","<\/id>",".","class",",","<id>","pvs","<\/id>",")",";","<id>","pvs","<\/id>","=","new","<id>","mutable","Property","Values","<\/id>","(",")",";","<id>","pvs","<\/id>",".","<id>","add","<\/id>","(","\"location\"",",","\"${myprop}\/test\/${myprop}\"",")",";","<id>","ac","<\/id>",".","<id>","register","Singleton","<\/id>","(","\"configurer\"",",","<id>","property","Placeholder","Configurer","<\/id>",".","class",",","<id>","pvs","<\/id>",")",";","try","{","<id>","ac","<\/id>",".","<id>","refresh","<\/id>","(",")",";","<id>","fail","<\/id>","(","\"Should have thrown BeanInitializationException\"",")",";","}","catch","(","<id>","bean","Initialization","Exception","<\/id>","<id>","ex","<\/id>",")","{","<id>","assert","True","<\/id>","(","<id>","ex","<\/id>",".","<id>","get","Message","<\/id>","(",")",".","<id>","contains","<\/id>","(","\"myprop\"",")",")",";","}","}","<SENTENCE_END\/>"],"file_name":"PropertyResourceConfigurerIntegrationTests.java","formatted_lines":["{"," StaticApplicationContext ac = new StaticApplicationContext();"," MutablePropertyValues pvs = new MutablePropertyValues();"," pvs.add(\"spouse\", new RuntimeBeanReference(\"${ref}\"));"," ac.registerSingleton(\"tb\", TestBean.class, pvs);"," pvs = new MutablePropertyValues();"," pvs.add(\"location\", \"${myprop}\/test\/${myprop}\");"," ac.registerSingleton(\"configurer\", PropertyPlaceholderConfigurer.class, pvs);"," try"," {"," ac.refresh();"," fail(\"Should have thrown BeanInitializationException\");"," }"," catch (BeanInitializationException ex)"," {",""," assertTrue(ex.getMessage().contains(\"myprop\"));"," }","}"],"function_name":"testPropertyPlaceholderConfigurerWithUnresolvableSystemPropertiesInLocation","function_name_tokens":["test","property","placeholder","configurer","with","unresolvable","system","properties","in","location"],"id_body_hash":"81030ab23e8ef3987dd942ad1cd291ce","id_same_identifier_list":[0,1,2,2,2,3,4,5,6,6,6,7,8,9,10,10,10,11,12,13,14,14,14,15,16,17,18,19,20,21,22,23,24,25,25,25,26,27,28,29,30,31,32,33,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,47,47,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,62,63,64,65,66,66,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,89,89,90,91,92,93,93,94,95,96,97,97,98,99,100,101,102,103,104,105,106,107,108,109],"option_correct":"testPropertyPlaceholderConfigurerWithUnresolvableSystemPropertiesInLocation","options":["testPropertyPlaceholderConfigurerWithNestedUnresolvableReference","testPropertyPlaceholderConfigurerWithSystemPropertiesInLocation","primitiveInteger","testPropertyPlaceholderConfigurerWithUnresolvableSystemPropertiesInLocation","testNotNullConstraintAfterInitialization","adaptInnerBeanName","testPropertyPlaceholderConfigurerWithSystemPropertyInLocation"],"options_nlp":["test property placeholder configurer with nested unresolvable reference","test property placeholder configurer with system properties in location","primitive integer","test property placeholder configurer with unresolvable system properties in location","test not null constraint after initialization","adapt inner bean name","test property placeholder configurer with system property in location"],"options_random":["testNotNullConstraintAfterInitialization","adaptInnerBeanName","primitiveInteger"],"options_tfidf":["testPropertyPlaceholderConfigurerWithNestedUnresolvableReference","testPropertyPlaceholderConfigurerWithSystemPropertyInLocation","testPropertyPlaceholderConfigurerWithSystemPropertiesInLocation"],"project_name":"spring-framework","source_code_string":"@Test\n\tpublic void testPropertyPlaceholderConfigurerWithUnresolvableSystemPropertiesInLocation() {\n\t\tStaticApplicationContext ac = new StaticApplicationContext();\n\t\tMutablePropertyValues pvs = new MutablePropertyValues();\n\t\tpvs.add(\"spouse\", new RuntimeBeanReference(\"${ref}\"));\n\t\tac.registerSingleton(\"tb\", TestBean.class, pvs);\n\t\tpvs = new MutablePropertyValues();\n\t\tpvs.add(\"location\", \"${myprop}\/test\/${myprop}\");\n\t\tac.registerSingleton(\"configurer\", PropertyPlaceholderConfigurer.class, pvs);\n\t\ttry {\n\t\t\tac.refresh();\n\t\t\tfail(\"Should have thrown BeanInitializationException\");\n\t\t}\n\t\tcatch (BeanInitializationException ex) {\n\t\t\t\n\t\t\tassertTrue(ex.getMessage().contains(\"myprop\"));\n\t\t}\n\t}","tokens_in_code":[{"index_id":0,"token_group":0,"text":"{","start_char":0,"line":0},{"index_id":1,"token_group":1,"text":"static","start_char":4,"line":1},{"index_id":2,"token_group":2,"text":"Application","start_char":10,"line":1},{"index_id":3,"token_group":2,"text":"Context","start_char":21,"line":1},{"index_id":4,"token_group":2,"text":"ac","start_char":29,"line":1},{"index_id":5,"token_group":3,"text":"=","start_char":32,"line":1},{"index_id":6,"token_group":4,"text":"new","start_char":34,"line":1},{"index_id":7,"token_group":5,"text":"static","start_char":38,"line":1},{"index_id":8,"token_group":6,"text":"Application","start_char":44,"line":1},{"index_id":9,"token_group":6,"text":"Context","start_char":55,"line":1},{"index_id":10,"token_group":6,"text":"(","start_char":62,"line":1},{"index_id":11,"token_group":7,"text":")","start_char":63,"line":1},{"index_id":12,"token_group":8,"text":";","start_char":64,"line":1},{"index_id":13,"token_group":9,"text":"mutable","start_char":4,"line":2},{"index_id":14,"token_group":10,"text":"Property","start_char":11,"line":2},{"index_id":15,"token_group":10,"text":"Values","start_char":19,"line":2},{"index_id":16,"token_group":10,"text":"pvs","start_char":26,"line":2},{"index_id":17,"token_group":11,"text":"=","start_char":30,"line":2},{"index_id":18,"token_group":12,"text":"new","start_char":32,"line":2},{"index_id":19,"token_group":13,"text":"mutable","start_char":36,"line":2},{"index_id":20,"token_group":14,"text":"Property","start_char":43,"line":2},{"index_id":21,"token_group":14,"text":"Values","start_char":51,"line":2},{"index_id":22,"token_group":14,"text":"(","start_char":57,"line":2},{"index_id":23,"token_group":15,"text":")","start_char":58,"line":2},{"index_id":24,"token_group":16,"text":";","start_char":59,"line":2},{"index_id":25,"token_group":17,"text":"pvs","start_char":4,"line":3},{"index_id":26,"token_group":18,"text":".","start_char":7,"line":3},{"index_id":27,"token_group":19,"text":"add","start_char":8,"line":3},{"index_id":28,"token_group":20,"text":"(","start_char":11,"line":3},{"index_id":29,"token_group":21,"text":"\"spouse\"","start_char":12,"line":3},{"index_id":30,"token_group":22,"text":",","start_char":20,"line":3},{"index_id":31,"token_group":23,"text":"new","start_char":22,"line":3},{"index_id":32,"token_group":24,"text":"runtime","start_char":26,"line":3},{"index_id":33,"token_group":25,"text":"Bean","start_char":33,"line":3},{"index_id":34,"token_group":25,"text":"Reference","start_char":37,"line":3},{"index_id":35,"token_group":25,"text":"(","start_char":46,"line":3},{"index_id":36,"token_group":26,"text":"\"${ref}\"","start_char":47,"line":3},{"index_id":37,"token_group":27,"text":")","start_char":55,"line":3},{"index_id":38,"token_group":28,"text":")","start_char":56,"line":3},{"index_id":39,"token_group":29,"text":";","start_char":57,"line":3},{"index_id":40,"token_group":30,"text":"ac","start_char":4,"line":4},{"index_id":41,"token_group":31,"text":".","start_char":6,"line":4},{"index_id":42,"token_group":32,"text":"register","start_char":7,"line":4},{"index_id":43,"token_group":33,"text":"Singleton","start_char":15,"line":4},{"index_id":44,"token_group":33,"text":"(","start_char":24,"line":4},{"index_id":45,"token_group":34,"text":"\"tb\"","start_char":25,"line":4},{"index_id":46,"token_group":35,"text":",","start_char":29,"line":4},{"index_id":47,"token_group":36,"text":"test","start_char":31,"line":4},{"index_id":48,"token_group":37,"text":"Bean","start_char":35,"line":4},{"index_id":49,"token_group":37,"text":".","start_char":39,"line":4},{"index_id":50,"token_group":38,"text":"class","start_char":40,"line":4},{"index_id":51,"token_group":39,"text":",","start_char":45,"line":4},{"index_id":52,"token_group":40,"text":"pvs","start_char":47,"line":4},{"index_id":53,"token_group":41,"text":")","start_char":50,"line":4},{"index_id":54,"token_group":42,"text":";","start_char":51,"line":4},{"index_id":55,"token_group":43,"text":"pvs","start_char":4,"line":5},{"index_id":56,"token_group":44,"text":"=","start_char":8,"line":5},{"index_id":57,"token_group":45,"text":"new","start_char":10,"line":5},{"index_id":58,"token_group":46,"text":"mutable","start_char":14,"line":5},{"index_id":59,"token_group":47,"text":"Property","start_char":21,"line":5},{"index_id":60,"token_group":47,"text":"Values","start_char":29,"line":5},{"index_id":61,"token_group":47,"text":"(","start_char":35,"line":5},{"index_id":62,"token_group":48,"text":")","start_char":36,"line":5},{"index_id":63,"token_group":49,"text":";","start_char":37,"line":5},{"index_id":64,"token_group":50,"text":"pvs","start_char":4,"line":6},{"index_id":65,"token_group":51,"text":".","start_char":7,"line":6},{"index_id":66,"token_group":52,"text":"add","start_char":8,"line":6},{"index_id":67,"token_group":53,"text":"(","start_char":11,"line":6},{"index_id":68,"token_group":54,"text":"\"location\"","start_char":12,"line":6},{"index_id":69,"token_group":55,"text":",","start_char":22,"line":6},{"index_id":70,"token_group":56,"text":"\"${myprop}\/test\/${myprop}\"","start_char":24,"line":6},{"index_id":71,"token_group":57,"text":")","start_char":50,"line":6},{"index_id":72,"token_group":58,"text":";","start_char":51,"line":6},{"index_id":73,"token_group":59,"text":"ac","start_char":4,"line":7},{"index_id":74,"token_group":60,"text":".","start_char":6,"line":7},{"index_id":75,"token_group":61,"text":"register","start_char":7,"line":7},{"index_id":76,"token_group":62,"text":"Singleton","start_char":15,"line":7},{"index_id":77,"token_group":62,"text":"(","start_char":24,"line":7},{"index_id":78,"token_group":63,"text":"\"configurer\"","start_char":25,"line":7},{"index_id":79,"token_group":64,"text":",","start_char":37,"line":7},{"index_id":80,"token_group":65,"text":"property","start_char":39,"line":7},{"index_id":81,"token_group":66,"text":"Placeholder","start_char":47,"line":7},{"index_id":82,"token_group":66,"text":"Configurer","start_char":58,"line":7},{"index_id":83,"token_group":66,"text":".","start_char":68,"line":7},{"index_id":84,"token_group":67,"text":"class","start_char":69,"line":7},{"index_id":85,"token_group":68,"text":",","start_char":74,"line":7},{"index_id":86,"token_group":69,"text":"pvs","start_char":76,"line":7},{"index_id":87,"token_group":70,"text":")","start_char":79,"line":7},{"index_id":88,"token_group":71,"text":";","start_char":80,"line":7},{"index_id":89,"token_group":72,"text":"try","start_char":4,"line":8},{"index_id":90,"token_group":73,"text":"{","start_char":4,"line":9},{"index_id":91,"token_group":74,"text":"ac","start_char":8,"line":10},{"index_id":92,"token_group":75,"text":".","start_char":10,"line":10},{"index_id":93,"token_group":76,"text":"refresh","start_char":11,"line":10},{"index_id":94,"token_group":77,"text":"(","start_char":18,"line":10},{"index_id":95,"token_group":78,"text":")","start_char":19,"line":10},{"index_id":96,"token_group":79,"text":";","start_char":20,"line":10},{"index_id":97,"token_group":80,"text":"fail","start_char":8,"line":11},{"index_id":98,"token_group":81,"text":"(","start_char":12,"line":11},{"index_id":99,"token_group":82,"text":"\"Should have thrown BeanInitializationException\"","start_char":13,"line":11},{"index_id":100,"token_group":83,"text":")","start_char":61,"line":11},{"index_id":101,"token_group":84,"text":";","start_char":62,"line":11},{"index_id":102,"token_group":85,"text":"}","start_char":4,"line":12},{"index_id":103,"token_group":86,"text":"catch","start_char":4,"line":13},{"index_id":104,"token_group":87,"text":"(","start_char":10,"line":13},{"index_id":105,"token_group":88,"text":"bean","start_char":11,"line":13},{"index_id":106,"token_group":89,"text":"Initialization","start_char":15,"line":13},{"index_id":107,"token_group":89,"text":"Exception","start_char":29,"line":13},{"index_id":108,"token_group":89,"text":"ex","start_char":39,"line":13},{"index_id":109,"token_group":90,"text":")","start_char":41,"line":13},{"index_id":110,"token_group":91,"text":"{","start_char":4,"line":14},{"index_id":111,"token_group":92,"text":"assert","start_char":8,"line":16},{"index_id":112,"token_group":93,"text":"True","start_char":14,"line":16},{"index_id":113,"token_group":93,"text":"(","start_char":18,"line":16},{"index_id":114,"token_group":94,"text":"ex","start_char":19,"line":16},{"index_id":115,"token_group":95,"text":".","start_char":21,"line":16},{"index_id":116,"token_group":96,"text":"get","start_char":22,"line":16},{"index_id":117,"token_group":97,"text":"Message","start_char":25,"line":16},{"index_id":118,"token_group":97,"text":"(","start_char":32,"line":16},{"index_id":119,"token_group":98,"text":")","start_char":33,"line":16},{"index_id":120,"token_group":99,"text":".","start_char":34,"line":16},{"index_id":121,"token_group":100,"text":"contains","start_char":35,"line":16},{"index_id":122,"token_group":101,"text":"(","start_char":43,"line":16},{"index_id":123,"token_group":102,"text":"\"myprop\"","start_char":44,"line":16},{"index_id":124,"token_group":103,"text":")","start_char":52,"line":16},{"index_id":125,"token_group":104,"text":")","start_char":53,"line":16},{"index_id":126,"token_group":105,"text":";","start_char":54,"line":16},{"index_id":127,"token_group":106,"text":"}","start_char":4,"line":17},{"index_id":128,"token_group":107,"text":"}","start_char":0,"line":18}],"tokens_list":["{","static","Application","Context","ac","=","new","static","Application","Context","(",")",";","mutable","Property","Values","pvs","=","new","mutable","Property","Values","(",")",";","pvs",".","add","(","\"spouse\"",",","new","runtime","Bean","Reference","(","\"${ref}\"",")",")",";","ac",".","register","Singleton","(","\"tb\"",",","test","Bean",".","class",",","pvs",")",";","pvs","=","new","mutable","Property","Values","(",")",";","pvs",".","add","(","\"location\"",",","\"${myprop}\/test\/${myprop}\"",")",";","ac",".","register","Singleton","(","\"configurer\"",",","property","Placeholder","Configurer",".","class",",","pvs",")",";","try","{","ac",".","refresh","(",")",";","fail","(","\"Should have thrown BeanInitializationException\"",")",";","}","catch","(","bean","Initialization","Exception","ex",")","{","assert","True","(","ex",".","get","Message","(",")",".","contains","(","\"myprop\"",")",")",";","}","}"],"uuid":"c5eed1ed3cb33d836092a6ad82b28eb5"}]