query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
TODO Autogenerated method stub
public Remote getPort(Class arg0) throws ServiceException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public Remote getPort(QName arg0, Class arg1) throws ServiceException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public Iterator getPorts() throws ServiceException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public QName getServiceName() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public TypeMappingRegistry getTypeMappingRegistry() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public URL getWSDLDocumentLocation() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
============= Receiver code that receives data over a socket ==============
public TerminalScanReceiver() { super(StorageLevel.MEMORY_ONLY()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void receiveData() throws IOException;", "public abstract void RecvData(int sock, String Data) throws LowLinkException, TransportLayerException;", "public void packetReceiver(Socket socket);", "@Override\r\n\t\t\tpublic void run() {\n\r\n\t\t\t\twhile (!socket.isClosed()) {\r\n\r\n\t\t\t\t\tString lin...
[ "0.75057566", "0.7505373", "0.7133966", "0.7032547", "0.6919413", "0.6867136", "0.6827808", "0.6818984", "0.67401785", "0.67195934", "0.6719219", "0.6706773", "0.66780573", "0.6672065", "0.6633285", "0.6584011", "0.6568354", "0.655838", "0.6544904", "0.6529201", "0.6526655", ...
0.0
-1
Start the thread that receives data over a connection
public void onStart() { new Thread() { @Override public void run() { receive(); } }.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onStart() {\n\t\tnew Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tinitConnection();\n\t\t\t\treceive();\n\t\t\t}\n\t\t}.start();\n\t}", "@Override\r\n\tpublic void run() {\r\n\t\t\r\n\t\tLog.d(TAG, \"begin ConnectedThread job\");\r\n\t\t\r\n\t\t// Receive buffer\r\n\t\tbyte[] buffe...
[ "0.7296005", "0.72307897", "0.71298987", "0.70653087", "0.695616", "0.69068813", "0.69004625", "0.68982774", "0.68918693", "0.6867195", "0.68508196", "0.6845326", "0.68371564", "0.6823336", "0.6806058", "0.68054354", "0.6802425", "0.6771163", "0.67671317", "0.6750269", "0.674...
0.69813836
4
There is nothing much to do as the thread calling receive() is designed to stop by itself isStopped() returns false
public void onStop() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isStopped();", "private void receive() {\n receive = new Thread(\"Receive\") {\n public void run() {\n while (running) {\n byte[] data = new byte[1024];\n DatagramPacket packet = new DatagramPacket(data, data.length);\n ...
[ "0.6587857", "0.6514347", "0.64679724", "0.64283496", "0.63355595", "0.62870586", "0.6276333", "0.6276024", "0.6244422", "0.62226605", "0.62096304", "0.61659944", "0.6112653", "0.61062056", "0.6094674", "0.6093071", "0.60847783", "0.6083764", "0.60729593", "0.6059304", "0.605...
0.0
-1
Create a socket connection and receive data until receiver is stopped
private void receive() { try{ while(true){ super.store(generateSimulateData()); System.out.println("模拟接收数据"); Thread.sleep(10000); } }catch(Exception ex){ ex.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void receive() {\n receive = new Thread(\"Receive\") {\n public void run() {\n while (running) {\n byte[] data = new byte[1024];\n DatagramPacket packet = new DatagramPacket(data, data.length);\n try {\n ...
[ "0.6765155", "0.67037886", "0.6659245", "0.6506788", "0.6489337", "0.64738077", "0.64663345", "0.6435698", "0.6424155", "0.63715667", "0.63713306", "0.63208234", "0.62999254", "0.6295777", "0.62770975", "0.62697583", "0.626149", "0.6253985", "0.62508345", "0.62452", "0.621085...
0.0
-1
Creates a new instance of MessageArgsTableModel
public MessageArgsTableModel() { int PRE_POPULATED_SIZE = 10; argList = new ArrayList<>(); for (int i = 0; i < PRE_POPULATED_SIZE; i++) { argList.add(""); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ByaTableModel() {\n\t}", "public DebugTableModel() {\r\n }", "public JTable create() {\n\n Object[] colName = null;\n int columnsNumber = 0;\n\n columnsNumber = 2;\n colName = new Object[columnsNumber];\n\n colName[0] = MessagesManager.get(\"name\");\n colNam...
[ "0.6077491", "0.5923667", "0.5874408", "0.5866467", "0.5781911", "0.5683022", "0.5661194", "0.5608904", "0.5574445", "0.5544361", "0.55077595", "0.55048937", "0.54693997", "0.5462226", "0.54445434", "0.54313123", "0.53963524", "0.5390453", "0.53780824", "0.5312975", "0.527712...
0.7811818
0
// TODO Autogenerated method stub //System.out.println("abinaya");
public static void main(String[] args) { prin(); Javabasics objjb = new Javabasics(); objjb.print(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void haha(){\n System.out.println(\"thavasi\");\n }", "private void sysout() {\nSystem.out.println(\"pandiya\");\n}", "@Override\n\tpublic void falar() {\n\t\tSystem.out.println(\"Kuack\");\n\t}", "void vorbereiten(){\n\t\tSystem.out.println(\"vorbereiten \");\n\t}", "private void syso() {\n...
[ "0.81770056", "0.7723615", "0.75318056", "0.7342318", "0.7252836", "0.721343", "0.7213425", "0.7206224", "0.71989954", "0.7168648", "0.71494347", "0.7111762", "0.71026707", "0.70948964", "0.70564353", "0.7016302", "0.7001499", "0.6992975", "0.69430864", "0.6933612", "0.689581...
0.0
-1
========================================================================= Takes wikitext and preprocesses the wikitext (without performing expansion). The following steps are performed: Validation Preprocessing (for inclusion/viewing) Entity substitution Optional: Expansion
public CompiledPage preprocess( PageId pageId, String wikitext, boolean forInclusion, ExpansionCallback callback) throws CompilerException { if (pageId == null) throw new NullPointerException(); PageTitle title = pageId.getTitle(); CompilerLog log = new CompilerLog(); log.setTitle(title.getFullTitle()); log.setRevision(pageId.getRevision()); LazyPreprocessedPage pprAst; try { EntityMap entityMap = new EntityMap(); String validatedWikitext = validate(title, wikitext, entityMap, log); LazyPreprocessedPage ppAst = preprocess(title, validatedWikitext, forInclusion, entityMap, log); pprAst = ppAst; if (callback != null) pprAst = expand(callback, title, ppAst, entityMap, null, false, log); } catch (CompilerException e) { e.attachLog(log); throw e; } catch (Throwable e) { throw new CompilerException("Compilation failed!", e, log); } return new CompiledPage( new Page(pprAst.getContent()), pprAst.getWarnings(), log); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processContentEn() {\n if (this.content == null || this.content.equals(\"\")) {\r\n _logger.error(\"{} - The sentence is null or empty\", this.traceId);\r\n }\r\n\r\n // process input using ltp(Segmentation, POS, DP, SRL)\r\n this.nlp = new NLP(this.content, this...
[ "0.6197842", "0.5737171", "0.55343705", "0.55089176", "0.5482881", "0.5455454", "0.54147065", "0.5405619", "0.5397318", "0.5397318", "0.5397318", "0.5397318", "0.53022665", "0.52693456", "0.52439266", "0.5222501", "0.5167544", "0.5163304", "0.5107296", "0.5072902", "0.5068012...
0.50269026
24
Takes wikitext and parses the wikitext for viewing. The following steps are performed: Validation Preprocessing (for viewing) Entity substitution Optional: Expansion Parsing Entity substitution
public CompiledPage parse( PageId pageId, String wikitext, ExpansionCallback callback) throws CompilerException { if (pageId == null) throw new NullPointerException(); PageTitle title = pageId.getTitle(); CompilerLog log = new CompilerLog(); log.setTitle(title.getFullTitle()); log.setRevision(pageId.getRevision()); LazyParsedPage pAst; try { EntityMap entityMap = new EntityMap(); String validatedWikitext = validate(title, wikitext, entityMap, log); LazyPreprocessedPage ppAst = preprocess(title, validatedWikitext, false, entityMap, log); LazyPreprocessedPage pprAst = ppAst; if (callback != null) pprAst = expand(callback, title, ppAst, entityMap, null, false, log); pAst = parse(title, pprAst, entityMap, log); } catch (CompilerException e) { e.attachLog(log); throw e; } catch (Throwable e) { throw new CompilerException("Compilation failed!", e, log); } return new CompiledPage( new Page(pAst.getContent()), pAst.getWarnings(), log); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processContentEn() {\n if (this.content == null || this.content.equals(\"\")) {\r\n _logger.error(\"{} - The sentence is null or empty\", this.traceId);\r\n }\r\n\r\n // process input using ltp(Segmentation, POS, DP, SRL)\r\n this.nlp = new NLP(this.content, this...
[ "0.6156943", "0.5916274", "0.5893522", "0.5769842", "0.5622992", "0.558947", "0.5577122", "0.5531779", "0.5446922", "0.54033804", "0.53683174", "0.5294928", "0.5266639", "0.52584416", "0.5242405", "0.5222163", "0.52220505", "0.5200042", "0.5185533", "0.516881", "0.5161882", ...
0.45858774
91
Takes wikitext and parses the wikitext for viewing. The following steps are performed: Validation Preprocessing (for viewing) Entity substitution Optional: Expansion Parsing Entity substitution Postprocessing
public CompiledPage postprocess( PageId pageId, String wikitext, ExpansionCallback callback) throws CompilerException { if (pageId == null) throw new NullPointerException(); PageTitle title = pageId.getTitle(); CompilerLog log = new CompilerLog(); log.setTitle(title.getFullTitle()); log.setRevision(pageId.getRevision()); LazyParsedPage pAst; try { EntityMap entityMap = new EntityMap(); String validatedWikitext = validate(title, wikitext, entityMap, log); LazyPreprocessedPage ppAst = preprocess(title, validatedWikitext, false, entityMap, log); LazyPreprocessedPage pprAst = ppAst; if (callback != null) pprAst = expand(callback, title, ppAst, entityMap, null, false, log); pAst = parse(title, pprAst, entityMap, log); pAst = postprocess(title, pAst, log); } catch (CompilerException e) { e.attachLog(log); throw e; } catch (Throwable e) { throw new CompilerException("Compilation failed!", e, log); } return new CompiledPage( new Page(pAst.getContent()), pAst.getWarnings(), log); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processContentEn() {\n if (this.content == null || this.content.equals(\"\")) {\r\n _logger.error(\"{} - The sentence is null or empty\", this.traceId);\r\n }\r\n\r\n // process input using ltp(Segmentation, POS, DP, SRL)\r\n this.nlp = new NLP(this.content, this...
[ "0.6201405", "0.589367", "0.58061355", "0.5791681", "0.5702356", "0.5678113", "0.55663943", "0.5532644", "0.5498211", "0.54692274", "0.5457174", "0.53920287", "0.53110975", "0.53109646", "0.53030616", "0.52891606", "0.52843595", "0.52536577", "0.5221708", "0.5178143", "0.5154...
0.47934064
51
========================================================================= This function is only called by preprocessor frames to pull in pages for transclusion or redirection. It takes wikitext and parses the wikitext for inclusion or viewing. The following steps are performed: Validation Preprocessing (for inclusion/viewing) Entity substitution Expansion
protected CompiledPage preprocessAndExpand( ExpansionCallback callback, PageId pageId, String wikitext, boolean forInclusion, EntityMap entityMap, Map<String, AstNode> arguments, ExpansionFrame rootFrame, ExpansionFrame parentFrame) throws CompilerException { if (pageId == null) throw new NullPointerException(); if (wikitext == null) throw new NullPointerException(); PageTitle title = pageId.getTitle(); CompilerLog log = new CompilerLog(); log.setTitle(title.getFullTitle()); log.setRevision(pageId.getRevision()); LazyPreprocessedPage pprAst; try { String validatedWikitext = validate(title, wikitext, entityMap, log); LazyPreprocessedPage ppAst = preprocess(title, validatedWikitext, forInclusion, entityMap, log); pprAst = expand( callback, title, ppAst, entityMap, arguments, forInclusion, rootFrame, parentFrame, log); } catch (CompilerException e) { e.attachLog(log); throw e; } catch (Throwable e) { throw new CompilerException("Compilation failed!", e, log); } return new CompiledPage( new Page(pprAst.getContent()), pprAst.getWarnings(), log); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void processPages(PDPageTree pages) throws IOException {\n\n List<ObjectRef> pageRefs = new ArrayList<>();\n //STEP 1: get the page refs\n findPages(pdDocument.getPages().getCOSObject().getItem(COSName.KIDS), pageRefs);\n //confirm the right number of pages was ...
[ "0.5662973", "0.54631287", "0.5404181", "0.53999245", "0.539933", "0.5367749", "0.5348841", "0.5273833", "0.51852137", "0.51468724", "0.50948894", "0.5080133", "0.5069219", "0.4990334", "0.49632734", "0.49574718", "0.49162382", "0.4904332", "0.48819873", "0.48783344", "0.4844...
0.56656456
0
Preprocesses validated wikitext and substitutes entities.
private LazyPreprocessedPage preprocess( PageTitle title, String validatedWikitext, boolean forInclusion, EntityMap entityMap, ContentNode parentLog) throws CompilerException { PreprocessorLog log = new PreprocessorLog(); parentLog.getContent().add(log); log.setForInclusion(forInclusion); StopWatch stopWatch = new StopWatch(); stopWatch.start(); try { LazyPreprocessor preprocessor = new LazyPreprocessor(wikiConfig); LazyPreprocessedPage preprocessedAst = (LazyPreprocessedPage) preprocessor.parseArticle( validatedWikitext, title.getFullTitle(), forInclusion); return preprocessedAst; } catch (xtc.parser.ParseException e) { log.getContent().add(new ParseException(e.getMessage())); throw new CompilerException("Preprocessing failed!", e); } catch (Throwable e) { logger.error("Preprocessing failed!", e); StringWriter w = new StringWriter(); e.printStackTrace(new PrintWriter(w)); log.getContent().add(new UnhandledException(e, w.toString())); throw new CompilerException("Preprocessing failed!", e); } finally { stopWatch.stop(); log.setTimeNeeded(stopWatch.getElapsedTime()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processContentEn() {\n if (this.content == null || this.content.equals(\"\")) {\r\n _logger.error(\"{} - The sentence is null or empty\", this.traceId);\r\n }\r\n\r\n // process input using ltp(Segmentation, POS, DP, SRL)\r\n this.nlp = new NLP(this.content, this...
[ "0.60502416", "0.5769483", "0.56554335", "0.55572337", "0.554582", "0.5532467", "0.5488755", "0.5488755", "0.5488755", "0.5488755", "0.5456424", "0.5431741", "0.5380289", "0.5351636", "0.5302748", "0.52596414", "0.5220891", "0.5214609", "0.5211199", "0.52102447", "0.5200294",...
0.4869755
32
Starts the expansion process of a preprocessed page with the preprocessed page as root of the expansion process.
private LazyPreprocessedPage expand( ExpansionCallback callback, PageTitle title, LazyPreprocessedPage ppAst, EntityMap entityMap, LinkedHashMap<String, AstNode> arguments, boolean forInclusion, ContentNode parentLog) throws CompilerException { return expand( callback, title, ppAst, entityMap, arguments, forInclusion, null, null, parentLog); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected CompiledPage preprocessAndExpand(\n\t ExpansionCallback callback,\n\t PageId pageId,\n\t String wikitext,\n\t boolean forInclusion,\n\t EntityMap entityMap,\n\t Map<String, AstNode> arguments,\n\t ExpansionFrame rootFrame,\n\t ExpansionFrame parentF...
[ "0.56001973", "0.55557406", "0.55117196", "0.5220115", "0.5134528", "0.5066738", "0.4977499", "0.48120797", "0.4781387", "0.4772974", "0.47208568", "0.4704169", "0.46980783", "0.46980783", "0.46677345", "0.46538433", "0.46323854", "0.46284458", "0.46248245", "0.4619657", "0.4...
0.59526074
0
Starts the expansion process of a preprocessed page.
private LazyPreprocessedPage expand( ExpansionCallback callback, PageTitle title, LazyPreprocessedPage ppAst, EntityMap entityMap, Map<String, AstNode> arguments, boolean forInclusion, ExpansionFrame rootFrame, ExpansionFrame parentFrame, ContentNode parentLog) throws CompilerException { PpResolverLog log = new PpResolverLog(); parentLog.getContent().add(log); if (arguments == null) arguments = new HashMap<String, AstNode>(); StopWatch stopWatch = new StopWatch(); stopWatch.start(); try { ExpansionFrame frame; if (rootFrame != null) { frame = new ExpansionFrame( this, callback, title, entityMap, arguments, forInclusion, rootFrame, parentFrame, ppAst.getWarnings(), log); } else { frame = new ExpansionFrame( this, callback, title, entityMap, ppAst.getWarnings(), log); } LazyPreprocessedPage expanded = (LazyPreprocessedPage) frame.expand(ppAst); return expanded; } catch (Throwable e) { logger.error("Resolution failed!", e); StringWriter w = new StringWriter(); e.printStackTrace(new PrintWriter(w)); log.getContent().add(new UnhandledException(e, w.toString())); throw new CompilerException("Resolution failed!", e); } finally { stopWatch.stop(); log.setTimeNeeded(stopWatch.getElapsedTime()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startContent() {\n iTextContext.pageNumber().startMainMatter();\n }", "private LazyPreprocessedPage expand(\n\t ExpansionCallback callback,\n\t PageTitle title,\n\t LazyPreprocessedPage ppAst,\n\t EntityMap entityMap,\n\t LinkedHashMap<String, AstNode> arg...
[ "0.59388196", "0.59241074", "0.5800829", "0.5785093", "0.57142055", "0.5620554", "0.5425743", "0.54217523", "0.52921385", "0.526845", "0.52362645", "0.5218579", "0.52119", "0.5202978", "0.5141135", "0.51153296", "0.5107414", "0.5081298", "0.50664496", "0.50664496", "0.5066449...
0.55447936
6
Parses a preprocessed page and substitutes entities.
private LazyParsedPage parse( PageTitle title, LazyPreprocessedPage ppAst, EntityMap entityMap, ContentNode parentLog) throws CompilerException { ParserLog log = new ParserLog(); parentLog.getContent().add(log); StopWatch stopWatch = new StopWatch(); stopWatch.start(); try { PreprocessedWikitext preprocessedWikitext = PreprocessorToParserTransformer.transform( ppAst, entityMap, true); LazyParser parser = new LazyParser(wikiConfig); LazyParsedPage parsedAst = (LazyParsedPage) parser.parseArticle( preprocessedWikitext, title.getTitle()); parsedAst.getWarnings().addAll(ppAst.getWarnings()); return parsedAst; } catch (xtc.parser.ParseException e) { log.getContent().add(new ParseException(e.getMessage())); throw new CompilerException("Parsing failed!", e); } catch (Throwable e) { logger.error("Parsing failed!", e); StringWriter w = new StringWriter(); e.printStackTrace(new PrintWriter(w)); log.getContent().add(new UnhandledException(e, w.toString())); throw new CompilerException("Parsing failed!", e); } finally { stopWatch.stop(); log.setTimeNeeded(stopWatch.getElapsedTime()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void process(Page page) {\n PageStore.prePage = page.getHtml().toString();\n }", "@Override\n\tpublic void process(Page page) {\n\t\t\n\t}", "public void process(Page page) {\n\t\t\t\tgetContent(page);\n\t\t\t}", "protected void page () throws HTMLParseException {\r\n w...
[ "0.66664255", "0.6190152", "0.6033476", "0.58750385", "0.57559055", "0.5581218", "0.5572146", "0.5566908", "0.55580235", "0.55273014", "0.54997677", "0.5488561", "0.5476644", "0.5441978", "0.5418276", "0.5406624", "0.5406624", "0.5406624", "0.5406624", "0.5307978", "0.5253149...
0.5571765
7
The default view of a question in the quiz creator
public QuizCreatorView() { answerInput1.setText(""); answerInput2.setText(""); answerInput3.setText(""); answerInput4.setText(""); optionsGroup = new ButtonGroup(); optionsGroup.add(OptionA); optionsGroup.add(OptionB); optionsGroup.add(OptionC); optionsGroup.add(OptionD); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String init() {\n\t\tif (question == null) {\n\t\t\treturn indexView;\n\t\t}\n\t\treturn \"\";\n\t}", "public QuestionModel getDefaultQuestion() {\n\t\treturn questionList.get(0);\n\t}", "public String viewAction(long id) {\n quiz = quizEJB.getQuizById(id);\n return \"quiz.xhtml\";\n }"...
[ "0.69674885", "0.61653924", "0.6074775", "0.60687137", "0.6056943", "0.60542214", "0.6026235", "0.6006747", "0.5944213", "0.5890796", "0.58550847", "0.5804639", "0.5716986", "0.5700818", "0.5675621", "0.5666096", "0.5660063", "0.5632518", "0.56234735", "0.56120026", "0.559875...
0.59243745
9
Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
private void $$$setupUI$$$() { panel_ProfessorApp = new JPanel(); panel_ProfessorApp.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1)); final JPanel panel1 = new JPanel(); panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); panel_ProfessorApp.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); questionNumberLabel = new JLabel(); questionNumberLabel.setText("Question 1"); panel1.add(questionNumberLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); QuestionInput = new JTextArea(); QuestionInput.setText(""); panel_ProfessorApp.add(QuestionInput, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false)); final JPanel panel2 = new JPanel(); panel2.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1)); panel_ProfessorApp.add(panel2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); answerInput1 = new JTextField(); answerInput1.setText("Answer Text"); panel2.add(answerInput1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); answerInput2 = new JTextField(); answerInput2.setText("Answer Text"); panel2.add(answerInput2, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); answerInput3 = new JTextField(); answerInput3.setText("Answer Text"); panel2.add(answerInput3, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); answerInput4 = new JTextField(); answerInput4.setText("Answer Text"); panel2.add(answerInput4, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); OptionA = new JRadioButton(); OptionA.setText("A"); panel2.add(OptionA, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); OptionB = new JRadioButton(); OptionB.setText("B"); panel2.add(OptionB, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); OptionC = new JRadioButton(); OptionC.setText("C"); panel2.add(OptionC, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); OptionD = new JRadioButton(); OptionD.setText("D"); panel2.add(OptionD, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final JPanel panel3 = new JPanel(); panel3.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1)); panel_ProfessorApp.add(panel3, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); nextButton = new JButton(); nextButton.setText("Next"); panel3.add(nextButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final Spacer spacer1 = new Spacer(); panel3.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false)); saveButton = new JButton(); saveButton.setText("Save"); panel3.add(saveButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); ButtonGroup buttonGroup; buttonGroup = new ButtonGroup(); buttonGroup.add(OptionA); buttonGroup.add(OptionB); buttonGroup.add(OptionC); buttonGroup.add(OptionD); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "@Override\n\tpublic void guiTinNhan() {\n\n\t}", "@Override\n\tprotected void setValueOnUi() {\n\n\t}", "@Override\n public void initGUI() {\n\n }", "private void $$$setupUI$$$() {\n ST = ...
[ "0.6945711", "0.6945711", "0.67775035", "0.6600435", "0.6543906", "0.6495166", "0.6455184", "0.6454877", "0.6438183", "0.64098823", "0.6362733", "0.63262373", "0.62928987", "0.6284876", "0.62815857", "0.6250616", "0.62096184", "0.6169255", "0.61455745", "0.6137502", "0.613750...
0.0
-1
TODO Autogenerated method stub
public void setAlarm() { id.toAlarm(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Retourne le nombre de ligne affecte par l'ajout
public int ajouter(Activite activite) { int rowAffected = super.executeUpdate(String.format( "INSERT INTO activite(nom, detail, dateDebut, dateFin, heureDebut, heureFin)" + "VALUES ('%s', '%s', '%s', '%s', '%s', '%s')", activite.getNom(), activite.getDetail(), activite.getDateDebut(), activite.getDateFin(), activite.getHeureDebut(), activite.getHeureFin() )); return rowAffected; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int enAttente() {\n\t\treturn nbmsg;\n\t}", "public int getNoOfRelevantLines() { return this.noOfRelevantLines; }", "private int numOnglet(){\n int selIndex = jTabPane_Accueil.getSelectedIndex();\n return selIndex;\n }", "public int number_of_lines() {\r\n\t\treturn line_index.size() ...
[ "0.64481974", "0.61774606", "0.5947751", "0.58409655", "0.57334197", "0.56842166", "0.565416", "0.5602513", "0.56001085", "0.5581155", "0.5567902", "0.55664325", "0.5539962", "0.5455634", "0.5452461", "0.5435421", "0.54218876", "0.5415605", "0.5415122", "0.5413209", "0.540431...
0.0
-1
recursion describes when a method/function calls itself in its implementation
public static void addOne(int x) { // i want to keep adding one to x // until x is 10 // you can do a while loop, or you can do a for loop System.out.println(x); if (x < 10) { addOne(x + 1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void p(){\n System.out.println(\"My recursion example 1\");\n p();\n }", "static void recursive(SootMethod method){\r\n \tvisited.put(method.getSignature(),true);\r\n \tIterator <MethodOrMethodContext> target_1=new Targets(cg.edgesOutOf(method));\r\n \r\n \tif(target_1!=null){\r\...
[ "0.68401325", "0.6828552", "0.6730225", "0.6638348", "0.65532345", "0.6201839", "0.61692923", "0.6138372", "0.60736877", "0.6062668", "0.60094225", "0.5862496", "0.57639414", "0.5703706", "0.5686687", "0.56665456", "0.5655776", "0.56365454", "0.5599599", "0.5579719", "0.55425...
0.0
-1
Installs Garbage collector event that increments counter for each collection.
public static void install(final TaskInputOutputContext context) { if (handlerInstalled) { LOG.debug("GC handler already installed"); return; } synchronized (GCMonitoring.class) { if (handlerInstalled) { return; } LOG.debug("installing GC handler"); handlerInstalled = true; GCMonitoring instance = new GCMonitoring(); List<GarbageCollectorMXBean> gcbeans = java.lang.management.ManagementFactory.getGarbageCollectorMXBeans(); for (GarbageCollectorMXBean gcbean : gcbeans) { LOG.debug("Registering to GC bean:" + gcbean); NotificationEmitter emitter = (NotificationEmitter) gcbean; NotificationListener listener = makeListener(instance, context); emitter.addNotificationListener(listener, null, null); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void runGarbageCollection()\n {\n // see if we need to run the collector...\n //----------------------------------------\n if (bRunCollector())\n {\n String sStaleDuration = \"\";\n int iStaleDuration = 0;\n \n try\n ...
[ "0.64879483", "0.64799714", "0.63705295", "0.601352", "0.57589006", "0.5526497", "0.5517205", "0.54808307", "0.54694784", "0.5384901", "0.53117347", "0.5304652", "0.5289047", "0.5264701", "0.52548057", "0.5217465", "0.52076995", "0.5185102", "0.51681167", "0.5158581", "0.5134...
0.54951626
7
In general, if this method returns true for two distinct C3P0ProxyConnections, it indicates a c3p0 bug. Once a proxy Connection is close()ed, it should not permit any sort of operation. Prior to Connection close(), there should be at most one valid proxy Connection associated with a given physical Connection.
public static boolean samePhysicalConnection( C3P0ProxyConnection con1, C3P0ProxyConnection con2 ) throws SQLException { try { Object out = con1.rawConnectionOperation( IPCFP, null, new Object[] { C3P0ProxyConnection.RAW_CONNECTION, con2 } ); return ((Boolean) out).booleanValue(); } catch (Exception e) { e.printStackTrace(); throw SqlUtils.toSQLException( e ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected boolean closeConnection(String connectionOwnerKey)\r\n\t\tthrows DSPException {\n\t\tif (StringUtils.isNullOrEmpty(connectionOwnerKey)\r\n\t\t\t&& DataStoreContext.isReusableDataStoreContext()) {\r\n\t\t\t// TODO: Log error - the call should not reach here\r\n\t\t\t// , the checks should h...
[ "0.63613087", "0.62061375", "0.61008835", "0.5948042", "0.580913", "0.57645553", "0.57408905", "0.57209593", "0.5692303", "0.5639969", "0.5633724", "0.56161267", "0.55101156", "0.54751706", "0.54663247", "0.5464868", "0.54535824", "0.5442075", "0.5440176", "0.542596", "0.5424...
0.63558125
1
TODO: Delete item from list
@Override public void onClick(View v) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void deleteItem() {\n\t\taPList.remove();\r\n\t}", "public void deleteItem(ActionEvent actionEvent) {\n // find the list that the item belongs in\n // removeItem() from its parenting list\n }", "@Override\n\tpublic void deleteItem(Object toDelete) {}", "@Override\n\t\tp...
[ "0.85112876", "0.7739133", "0.7692827", "0.75185037", "0.7471983", "0.7393248", "0.737645", "0.7353746", "0.73497194", "0.73453885", "0.7269308", "0.71792984", "0.716405", "0.71390647", "0.7125159", "0.7063365", "0.7049601", "0.70286787", "0.7025161", "0.6999571", "0.6999432"...
0.0
-1
TODO Autogenerated method stub
@Override public List<CursoAsignatura> listar() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public Optional<CursoAsignatura> listarId(int id) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public int save(CursoAsignatura ca) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void delete(int id) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Do something with the result here
@Override public void handleResult(Result rawResult) { Toast.makeText(this,rawResult.getText(),Toast.LENGTH_LONG).show(); // Toast.makeText(this,rawResult.getBarcodeFormat().toString(),Toast.LENGTH_LONG).show(); if (rawResult.getText().equals("admin")) { Intent intent = new Intent(ScannerActivity.this, ExamPage.class); startActivity(intent); finish(); } else { Toast.makeText(this,"Wrong QR Code",Toast.LENGTH_LONG).show(); Intent intent = new Intent(ScannerActivity.this, ScannerActivity.class); startActivity(intent); finish(); } SharedPreferences sp = getSharedPreferences("PREF_NAME", Context.MODE_PRIVATE); String qrText = sp.getString("QR_Code", String.valueOf(-1)); Toast.makeText(this,qrText,Toast.LENGTH_LONG).show(); Log.v("Scan", rawResult.getText()); // Prints scan results Log.v("Scan", rawResult.getBarcodeFormat().toString()); // Prints the scan format (qrcode, pdf417 etc.) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void ComputeResult(Object result);", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "@Override\n \tpublic Object getResult() {\n \t\treturn result;\n \t}", "Result getResult();", "public void setResult() {\n }", "void mo24178a(ResultData resultdata);", "V result() throws Exception;", "pub...
[ "0.7276043", "0.70556283", "0.70493454", "0.7012322", "0.6800602", "0.6772198", "0.67579854", "0.6736088", "0.67356104", "0.67345554", "0.6721033", "0.6720543", "0.6691392", "0.66840917", "0.66544855", "0.6641104", "0.6641104", "0.6641104", "0.6637591", "0.66330343", "0.65645...
0.0
-1
Use the application context, which will ensure that you don't accidentally leak an Activity's context. See this article for more information:
public static FieldGuideDatabase getInstance(Context ctx) { if (mInstance == null) { mInstance = new FieldGuideDatabase(ctx.getApplicationContext()); } return mInstance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Activity getContext() {\n return contextWeakReference.get();\n }", "public static Context getAppContext() {\n return mContext;\n }", "private Context getContext() {\n return mContext;\n }", "private Context getContext() {\n return mContext;\n }", "public st...
[ "0.7450419", "0.7265197", "0.7242151", "0.7242151", "0.7192599", "0.71887004", "0.71683455", "0.7133464", "0.7133464", "0.7084064", "0.7042796", "0.6963435", "0.6941001", "0.6937693", "0.6885214", "0.68333215", "0.682995", "0.6794881", "0.6727338", "0.67211115", "0.66428316",...
0.0
-1
Performs a database query.
private Cursor query(String tables, String[] columns, String selection, String[] selectionArgs, String groupBy, String orderBy) { /* * The SQLiteBuilder provides a map for all possible columns requested * to actual columns in the database, creating a simple column alias * mechanism by which the ContentProvider does not need to know the real * column names */ SQLiteQueryBuilder builder = new SQLiteQueryBuilder(); builder.setTables(tables); Cursor cursor = builder.query(mDatabaseOpenHelper.getReadableDatabase(), columns, selection, selectionArgs, groupBy, null, orderBy); if (cursor == null) { Log.w(TAG, "No data available from the query"); return null; } else if (!cursor.moveToFirst()) { Log.w(TAG, "No data available from the query"); cursor.close(); return null; } Log.d(TAG, "Returning " + cursor.getCount() + " records"); return cursor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Query query();", "void runQueries();", "public abstract ResultList executeQuery(DatabaseQuery query);", "private void executeQuery() {\n }", "Query queryOn(Connection connection);", "ResultSet runSQL(String query) {\n try {\n return connection.prepareStatement(query).executeQuery();\...
[ "0.7636167", "0.70980203", "0.695933", "0.6812034", "0.67661244", "0.6430422", "0.64062285", "0.632048", "0.6315168", "0.63119686", "0.6260086", "0.6256128", "0.6237437", "0.6226796", "0.61848885", "0.61839455", "0.617273", "0.61486346", "0.6135229", "0.60870165", "0.60856587...
0.0
-1
Returns a Cursor positioned at the species detail specified by rowId
public Cursor getSpeciesDetails(String identifier, String[] columns) { String selection = BaseColumns._ID + " = ?"; String[] selectionArgs = new String[] { identifier }; Log.d(TAG, "Getting species details for: " + identifier); return query(SPECIES_TABLE_NAME, columns, selection, selectionArgs, null, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Cursor fetchById(long rowId) {\n\t\tCursor cursor = db.query(tableName, fields, fields[0] + \" = \" + rowId, null, null, null, null);\n\t\tif (cursor != null) {\n\t\t\tcursor.moveToFirst();\n\t\t}\n\t\treturn cursor;\n\t}", "public Cursor fetchPreg(long rowId) throws SQLException {\n\n Cursor mCurs...
[ "0.7119913", "0.6931847", "0.6833526", "0.6732264", "0.6713878", "0.64774424", "0.64530206", "0.6366142", "0.6325639", "0.62926775", "0.6277708", "0.6229189", "0.6225522", "0.6133958", "0.6125395", "0.61127734", "0.6038288", "0.6038201", "0.6019151", "0.60160005", "0.5999178"...
0.5172191
56
Starts a thread to load the database table with words
private void loadFieldGuideData() { new Thread(new Runnable() { public void run() { try { Log.d(TAG, "Loading data via loadData()"); loadData(); } catch (IOException e) { throw new RuntimeException(e); } catch (JSONException e) { throw new RuntimeException(e); } } }).start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadStateDatabase() {\n new Thread( new Runnable() {\n public void run() {\n try {\n loadStates();\n } catch ( final IOException e ) {\n throw new RuntimeException( e );\n }...
[ "0.646914", "0.6232113", "0.59667283", "0.586673", "0.5818426", "0.5817052", "0.5776084", "0.57476985", "0.5736809", "0.56584555", "0.56373584", "0.562386", "0.5571357", "0.5530334", "0.55205894", "0.5467379", "0.54672974", "0.54671776", "0.5448674", "0.5424202", "0.54191136"...
0.51036566
49
RuntimeException type of exception that the compiler dont forces u to treat; Exception the compiler forces u to treat this type of exception; Type serializable needs to have a version number ID: seriazable classes need can be converted to bytes(...);
public DomainException(String msg) { super(msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ByteArrayConversionException() {\n super();\n }", "public RuntimeMBeanException(RuntimeException paramRuntimeException, String paramString) {\n/* 66 */ super(paramString);\n/* 67 */ this.runtimeException = paramRuntimeException;\n/* */ }", "public WrappedRuntimeException(Exception...
[ "0.6132802", "0.60258186", "0.5978802", "0.59517217", "0.5942518", "0.5898292", "0.5765943", "0.5761527", "0.5729902", "0.5675424", "0.56165856", "0.5594187", "0.55198485", "0.5503609", "0.54509294", "0.541228", "0.5367348", "0.53530896", "0.5352402", "0.5351858", "0.5346869"...
0.0
-1
Creates new form AdminPanel
public AdminPanel() { Object paint[][] = {}; jtModel = new DefaultTableModel(paint,columnNames) { @Override public boolean isCellEditable(int row, int column) { return false; } @Override public Class getColumnClass(int column) { switch (column) { case 2: /* This is for the price column sorting */ return Integer.class; default: return String.class;//This is for the name column sorting. } } }; initComponents(); jt.getTableHeader().setResizingAllowed(false); jt.getTableHeader().setReorderingAllowed(false); TableRowSorter<TableModel> sorting = new TableRowSorter<>(jt.getModel()); jt.setRowSorter(sorting); // These column can't be sorted. sorting.setSortable(0, false); sorting.setSortable(3, false); sorting.setSortable(4, false); sorting.setSortable(5, false); sorting.setSortable(6, false); sorting.setSortable(7, false); sorting.setSortable(8, false); addFile(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createAdminPanel() {\n username = new JTextField(8);\n password = new JPasswordField(8);\n JPanel loginArea = adminLoginPanels();\n JPanel buttons = adminLoginButtons();\n loginFrame = new JFrame();\n loginFrame.setLayout(new BorderLayout());\n loginFra...
[ "0.6713568", "0.6207267", "0.61880684", "0.6089925", "0.6038003", "0.60357803", "0.60243505", "0.59518546", "0.59221596", "0.5855683", "0.58510786", "0.5826542", "0.5812991", "0.5804792", "0.57977474", "0.5796036", "0.5789724", "0.57805145", "0.5779931", "0.57758266", "0.5774...
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jRadioButtonMenuItem1 = new javax.swing.JRadioButtonMenuItem(); bg = new javax.swing.ButtonGroup(); jMenuItem3 = new javax.swing.JMenuItem(); jMenu3 = new javax.swing.JMenu(); framePanel = new javax.swing.JPanel(); inputPanel = new javax.swing.JPanel(); tfName = new javax.swing.JTextField(); tfPaintId = new javax.swing.JTextField(); add = new javax.swing.JButton(); clear = new javax.swing.JButton(); tfQuantity = new javax.swing.JTextField(); bCombo = new javax.swing.JComboBox<>(); paintID1 = new javax.swing.JLabel(); name1 = new javax.swing.JLabel(); color1 = new javax.swing.JLabel(); brand1 = new javax.swing.JLabel(); price1 = new javax.swing.JLabel(); typeCombo = new javax.swing.JComboBox<>(); type1 = new javax.swing.JLabel(); rwCombo = new javax.swing.JComboBox<>(); rw = new javax.swing.JLabel(); medium = new javax.swing.JRadioButton(); high = new javax.swing.JRadioButton(); mild = new javax.swing.JRadioButton(); quality1 = new javax.swing.JLabel(); tfColor = new javax.swing.JTextField(); tfPrice = new javax.swing.JTextField(); quantity1 = new javax.swing.JLabel(); detailPanel = new javax.swing.JPanel(); jLabel10 = new javax.swing.JLabel(); btnDelete = new javax.swing.JButton(); btnEdit = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); jt = new javax.swing.JTable(); searchPanel = new javax.swing.JPanel(); jLabel9 = new javax.swing.JLabel(); searchValueTF = new javax.swing.JTextField(); btnSearch = new javax.swing.JButton(); searchCombo = new javax.swing.JComboBox<>(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); save = new javax.swing.JMenuItem(); custPanel = new javax.swing.JMenuItem(); btnExit = new javax.swing.JMenuItem(); about = new javax.swing.JMenu(); subAbout = new javax.swing.JMenuItem(); help = new javax.swing.JMenuItem(); jRadioButtonMenuItem1.setSelected(true); jRadioButtonMenuItem1.setText("jRadioButtonMenuItem1"); jMenuItem3.setText("jMenuItem3"); jMenu3.setText("jMenu3"); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Hyolmo Paint Store"); setName("jFrameAdmin"); // NOI18N setResizable(false); framePanel.setBackground(new java.awt.Color(223, 238, 253)); inputPanel.setBackground(new java.awt.Color(252, 252, 252)); inputPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); add.setText("Add"); add.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addActionPerformed(evt); } }); clear.setText("Clear"); clear.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clearActionPerformed(evt); } }); bCombo.setForeground(new java.awt.Color(51, 51, 255)); bCombo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select", "Asian Paint", "Kensai Nerolac", "Pashupati Paint", "Apollo Paint" })); paintID1.setText("Paint ID:"); name1.setText("Name"); color1.setText("Color"); brand1.setText("Brand"); price1.setText("Price"); typeCombo.setForeground(new java.awt.Color(0, 0, 255)); typeCombo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select", "Wall Paint", "House Paint", "Spray Paint", "Auto Mobiles" })); type1.setText("Type"); rwCombo.setForeground(new java.awt.Color(0, 51, 255)); rwCombo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select", "Epoxy", "Calcium", "Acrylic" })); rw.setText("Raw Material"); bg.add(medium); medium.setText("Medium"); bg.add(high); high.setText("High"); bg.add(mild); mild.setText("Mild"); quality1.setText("Quality"); quantity1.setText("Quantity"); javax.swing.GroupLayout inputPanelLayout = new javax.swing.GroupLayout(inputPanel); inputPanel.setLayout(inputPanelLayout); inputPanelLayout.setHorizontalGroup( inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(inputPanelLayout.createSequentialGroup() .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, inputPanelLayout.createSequentialGroup() .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(inputPanelLayout.createSequentialGroup() .addGap(19, 19, 19) .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(name1) .addComponent(paintID1, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(49, 49, 49) .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(tfPaintId, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE) .addComponent(tfName))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, inputPanelLayout.createSequentialGroup() .addComponent(rw) .addGap(42, 42, 42) .addComponent(rwCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(inputPanelLayout.createSequentialGroup() .addGap(54, 54, 54) .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(brand1, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(price1))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, inputPanelLayout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(color1, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18))) .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(tfPrice, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE) .addComponent(bCombo, 0, 215, Short.MAX_VALUE) .addComponent(tfColor))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, inputPanelLayout.createSequentialGroup() .addContainerGap() .addComponent(add, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(clear, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(66, 66, 66))) .addGap(30, 30, 30) .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(type1, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(quality1) .addComponent(quantity1)) .addGap(39, 39, 39) .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, inputPanelLayout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(high) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(medium) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(mild, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(typeCombo, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(tfQuantity)) .addGap(29, 29, 29)) ); inputPanelLayout.setVerticalGroup( inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(inputPanelLayout.createSequentialGroup() .addGap(22, 22, 22) .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(typeCombo) .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(brand1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(bCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(tfPaintId, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(type1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(paintID1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(inputPanelLayout.createSequentialGroup() .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(price1) .addComponent(tfName, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(tfPrice, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(name1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(color1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(rwCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(rw, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(tfColor, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(clear, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(add, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(inputPanelLayout.createSequentialGroup() .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(tfQuantity, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(quantity1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(inputPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(medium) .addComponent(mild) .addComponent(high)) .addComponent(quality1, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(48, 48, 48)) ); detailPanel.setBackground(new java.awt.Color(255, 255, 255)); detailPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabel10.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel10.setText("Details:"); btnDelete.setText("Delete"); btnDelete.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnDeleteActionPerformed(evt); } }); btnEdit.setText("Update"); btnEdit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEditActionPerformed(evt); } }); jt.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jt.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jt.setForeground(new java.awt.Color(0, 0, 255)); jt.setModel(jtModel); jt.setGridColor(new java.awt.Color(0, 0, 0)); jt.setRowHeight(30); jt.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jtMouseClicked(evt); } }); jScrollPane2.setViewportView(jt); javax.swing.GroupLayout detailPanelLayout = new javax.swing.GroupLayout(detailPanel); detailPanel.setLayout(detailPanelLayout); detailPanelLayout.setHorizontalGroup( detailPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(detailPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(detailPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane2) .addGroup(detailPanelLayout.createSequentialGroup() .addGap(14, 14, 14) .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 680, Short.MAX_VALUE) .addComponent(btnEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnDelete, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); detailPanelLayout.setVerticalGroup( detailPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(detailPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(detailPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, detailPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(btnDelete, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 335, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); searchPanel.setBackground(new java.awt.Color(255, 255, 255)); searchPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabel9.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel9.setText("Find By Name/Brand:"); btnSearch.setText("Search"); btnSearch.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSearchActionPerformed(evt); } }); searchCombo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Product ID", "Price", "Brand" })); javax.swing.GroupLayout searchPanelLayout = new javax.swing.GroupLayout(searchPanel); searchPanel.setLayout(searchPanelLayout); searchPanelLayout.setHorizontalGroup( searchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(searchPanelLayout.createSequentialGroup() .addGap(20, 20, 20) .addComponent(jLabel9) .addGap(50, 50, 50) .addComponent(searchCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(42, 42, 42) .addComponent(searchValueTF, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(80, 80, 80) .addComponent(btnSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE) .addContainerGap()) ); searchPanelLayout.setVerticalGroup( searchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(searchPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(searchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(btnSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE) .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(searchValueTF, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(searchCombo)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout framePanelLayout = new javax.swing.GroupLayout(framePanel); framePanel.setLayout(framePanelLayout); framePanelLayout.setHorizontalGroup( framePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(framePanelLayout.createSequentialGroup() .addContainerGap() .addGroup(framePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(searchPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(detailPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(inputPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); framePanelLayout.setVerticalGroup( framePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(framePanelLayout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(inputPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(searchPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(detailPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(17, 17, 17)) ); jMenuBar1.setBorder(null); jMenuBar1.setName(""); // NOI18N jMenu1.setText("File"); save.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK)); save.setText("Save"); save.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveActionPerformed(evt); } }); jMenu1.add(save); custPanel.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B, java.awt.event.InputEvent.CTRL_MASK)); custPanel.setText("Customer Panel"); custPanel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { custPanelActionPerformed(evt); } }); jMenu1.add(custPanel); btnExit.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK)); btnExit.setText("Exit"); btnExit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnExitActionPerformed(evt); } }); jMenu1.add(btnExit); jMenuBar1.add(jMenu1); about.setText(" About"); subAbout.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK)); subAbout.setText("About "); subAbout.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { subAboutActionPerformed(evt); } }); about.add(subAbout); help.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK)); help.setText("Help"); help.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { helpActionPerformed(evt); } }); about.add(help); jMenuBar1.add(about); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(framePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(framePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73208135", "0.7291972", "0.7291972", "0.7291972", "0.7287118", "0.72494483", "0.7214677", "0.72086734", "0.7197058", "0.71912485", "0.7185818", "0.71596724", "0.71489036", "0.7094215", "0.7082007", "0.70579666", "0.6988024", "0.6978225", "0.6955616", "0.6955434", "0.694586...
0.0
-1
//GENEND:initComponents to add in JTable
private void addActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addActionPerformed add(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ARCTable() {\n initComponents();\n table = new MyJTable();\n tableScrollPane.setViewportView(table);\n }", "private void initComponent() {\n\t\t// Create Table Model (rows, columns...)\n\t\ttableur = new DefaultTableModel();\n\t\t// Add title column\n\t\ttableur.addColumn(fileNumbe...
[ "0.7800868", "0.7678735", "0.7626001", "0.75820327", "0.7552147", "0.75517416", "0.7513352", "0.7512483", "0.73573434", "0.73411417", "0.7323721", "0.7253802", "0.72468495", "0.72462815", "0.7206039", "0.72052056", "0.720464", "0.7167837", "0.71605504", "0.7144345", "0.714361...
0.0
-1
GENLAST:event_clearActionPerformed to Select a particular item
private void jtMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtMouseClicked selectDetailWithMouse(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void btn_clearitemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_clearitemActionPerformed\n //Code to remove only item detailsdsfsdf\n txt_iniId.setText(\"\");\n cbo_iniName.setSelectedItem(0);\n txt_inQty.setText(\"\");\n }", "public void selectItem...
[ "0.70120066", "0.69862473", "0.69284016", "0.6717095", "0.664304", "0.6641891", "0.6632706", "0.6605646", "0.65447134", "0.65401125", "0.65390146", "0.63935953", "0.63870084", "0.63649136", "0.6323729", "0.6322483", "0.6306573", "0.62956107", "0.6293801", "0.62926644", "0.628...
0.0
-1
GENLAST:event_jtMouseClicked to delete index
public void toDeletIndex() { try { //DefaultTableModel model=(DefaultTableModel)jt.getModel(); //jt.getModel(); int num=Integer.parseInt(JOptionPane.showInputDialog(rootPane,"Enter the row number")); jtModel.removeRow(num-1); JOptionPane.showMessageDialog(rootPane,"Successfully deleted selected row number " +num); } catch(NumberFormatException ex) { JOptionPane.showMessageDialog(rootPane,"Enter integer not alphabet"); } catch(ArrayIndexOutOfBoundsException ex) { JOptionPane.showMessageDialog(rootPane,"This row dosent exist"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void delete (int index);", "private void toDelete() {\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No paint detail has been currently added\");\n }\n else\n {\n String[] choices={\"Delete First Row\",\"Delete Last Row\",\"Delete With I...
[ "0.7139126", "0.70314825", "0.67585397", "0.67578816", "0.6701447", "0.6693487", "0.66568094", "0.66300076", "0.66300076", "0.66058594", "0.6563702", "0.65483826", "0.6469664", "0.646224", "0.6426563", "0.6425344", "0.6421734", "0.6412499", "0.640285", "0.63926965", "0.639014...
0.67803293
2
GENLAST:event_custPanelActionPerformed To save the file
private void saveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveActionPerformed toSave(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsaveFile();\n\t\t\t}", "@Override\n\tpublic void actionPerformed (ActionEvent e)\n\t{\n\t\n\t\t// Create the File Save dialog.\n\t\tFileDialog fd = new FileDialog(\n\t\t\tAppContext.cartogramWizard, \n\t\t\t\"Save Computation Report As...\", ...
[ "0.7734016", "0.75014573", "0.7446818", "0.74432725", "0.73747116", "0.73527575", "0.7322843", "0.7192904", "0.71382093", "0.71199644", "0.71042", "0.7090001", "0.7071987", "0.70126927", "0.6950616", "0.6935624", "0.69007266", "0.6855498", "0.68500113", "0.68279064", "0.68227...
0.72294384
7
GENLAST:event_btnExitActionPerformed It will count the row of JTable
public int toCount() { int count=jt.getRowCount(); return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int getJTableNumberOfRows() {\n\n\t\tint count = 0; /* create a integer object for rows count */\n\t\tConnection connection = null;\n\t\tStatement statement = null;\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(DATABASE_URL, UserName_SQL, Password_SQL);\n\t\t\tstatement = connection.createStat...
[ "0.70017624", "0.6796478", "0.6620771", "0.66158754", "0.66158754", "0.66158754", "0.66158754", "0.66158754", "0.66158754", "0.66158754", "0.6611008", "0.65827936", "0.65499634", "0.6540624", "0.64922994", "0.6432249", "0.6413549", "0.6403884", "0.6393546", "0.63693106", "0.6...
0.6353952
20
to add quality details which will return the value
private String getQuality() { if(high.isSelected()) { return "High"; } else if(medium.isSelected()) { return "Medium"; } else if(mild.isSelected()) { return "Mild"; } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getQuality();", "public float getQuality();", "public int getQuality() {\n return quality;\n }", "public int getQuality() {\n return quality;\n }", "public int getQuality() {\n return quality;\n }", "public double getQuality() {\n return quality;\n ...
[ "0.8202828", "0.7865988", "0.78026843", "0.78026843", "0.78026843", "0.7762862", "0.7437929", "0.7432808", "0.7176327", "0.71567315", "0.71372837", "0.71372837", "0.7088715", "0.7056557", "0.70319784", "0.702232", "0.7003056", "0.6955419", "0.6930181", "0.6925352", "0.6870215...
0.7260918
8
It will clear all the Textfiled
private void toClear() { tfPaintId.setText(""); tfName.setText(""); tfPrice.setText(""); tfColor.setText(""); rwCombo.setSelectedIndex(0); bCombo.setSelectedIndex(0); typeCombo.setSelectedIndex(0); tfQuantity.setText(""); bg.clearSelection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void clear() {\n\t\ttxtId.setText(\"\");\n\t\ttxtAlert.setText(\"\");\n\t\ttxtNbMax.setText(\"\");\n\t\t\n\t}", "private void clearAllTextField() {\n ManufactureTxt.setText(\"\");\n ManuYearTxt.setText(\"\");\n SeatNumTxt.setText(\"\");\n SerialNumTxt.setText(\"\");\n M...
[ "0.83206624", "0.8294102", "0.8254999", "0.8241177", "0.82144374", "0.81868726", "0.8088251", "0.8036174", "0.8034334", "0.7994028", "0.7979017", "0.7972536", "0.79270357", "0.7886122", "0.78826714", "0.78671086", "0.7857441", "0.783649", "0.78083473", "0.7791349", "0.7790828...
0.76958275
27
This function will add detials in JTable
private void add() { //"Product ID","Name","Price","Colour","RawMaterial","Brand","Type","Quality","Quantity" String paintId,name,colour,rawMaterial,brand,type,quality; int quantity,price; if(tfPaintId.getText().isEmpty()) { JOptionPane.showMessageDialog(rootPane,"Please! Enter the Paint ID"); } else if(tfName.getText().isEmpty()) { JOptionPane.showMessageDialog(rootPane,"Please! Enter the Product name"); } else if(rwCombo.getSelectedItem().toString().equals("Select")) { JOptionPane.showMessageDialog(rootPane,"Please! Select the raw materials used"); } else if(bCombo.getSelectedItem().toString().equals("Select")) { JOptionPane.showMessageDialog(rootPane,"Please! select the brand you want"); } else if(tfPrice.getText().isEmpty()) { JOptionPane.showMessageDialog(rootPane,"Please! Enter the price"); } else if(tfColor.getText().isEmpty()) { JOptionPane.showMessageDialog(rootPane,"Please! Enter the colour"); } else if(typeCombo.getSelectedItem().toString().equals("Select")) { JOptionPane.showMessageDialog(rootPane,"Select something from paint type"); } else if(getQuality()==null) { JOptionPane.showMessageDialog(rootPane,"Quality is not selected"); } else if(tfQuantity.getText().isEmpty()) { JOptionPane.showMessageDialog(rootPane,"Please! Enter the quantity"); } else { try { paintId = tfPaintId.getText(); name=tfName.getText(); price=Integer.valueOf(tfPrice.getText()); colour=tfColor.getText(); rawMaterial=rwCombo.getSelectedItem().toString(); brand=bCombo.getSelectedItem().toString(); type=typeCombo.getSelectedItem().toString(); quality=getQuality(); quantity=Integer.valueOf(tfQuantity.getText()); boolean exist=false; for (int i=0; i<toCount(); i++) { if(jtModel.getValueAt(i,0).equals(paintId)) { exist = true; break; } else { } } if(!exist) { jtModel.addRow(new Object[]{paintId,name,price,colour,rawMaterial,brand,type,quality,quantity}); JOptionPane.showMessageDialog(rootPane,"Paint detail successfully added"); toClear(); } else { JOptionPane.showMessageDialog(rootPane,"Paint ID should be unique."); } } catch(NumberFormatException ex) { JOptionPane.showMessageDialog(rootPane, "Expected Integer but entered other character at price or quantity."); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Titular\");\n cabecalho.add(\"Data de Nascimento\");\n\n...
[ "0.67286724", "0.66751325", "0.663905", "0.6631858", "0.65546274", "0.6503003", "0.64864695", "0.6480156", "0.63959736", "0.6393253", "0.63898665", "0.63831013", "0.63529426", "0.6292415", "0.6279764", "0.6224238", "0.62162125", "0.62138015", "0.61820596", "0.61731386", "0.61...
0.0
-1
End of variables declaration//GENEND:variables Display the .txt file in JTable
public void addFile() { try { //JFileChooser jf=new JFileChooser(); //jf.showOpenDialog(null); // String fp=jf.getSelectedFile().getAbsolutePath(); File file2=new File("trial.txt"); BufferedReader br=new BufferedReader(new FileReader (file2)); Object[] tableLines=br.lines().toArray(); for (Object tableLine : tableLines) { String line = tableLine.toString().trim(); String[] dataRow=line.split(","); jtModel.addRow(dataRow); jtModel.setValueAt(Integer.valueOf(dataRow[2]), jtModel.getRowCount()-1, 2); } br.close(); } catch(Exception ex) { JOptionPane.showMessageDialog(rootPane,"Nothing was selected"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buildTable() {\n rowData = new Object[4];\n infoTable = new JTable();\n tableModel = new DefaultTableModel();\n tableModel.setColumnIdentifiers(columnNames);\n infoTable.setModel(tableModel);\n String line;\n \n try {\n FileInputStream...
[ "0.6958581", "0.649773", "0.6400067", "0.6299498", "0.6123295", "0.60948503", "0.6044121", "0.6033374", "0.6014293", "0.59963524", "0.59483325", "0.5930581", "0.5907319", "0.58948576", "0.58914083", "0.5866483", "0.58387303", "0.5830527", "0.58005786", "0.5783319", "0.5776958...
0.6923112
1
This method will close the program.
public void toExit() { int sure=JOptionPane.showConfirmDialog(rootPane,"Are you sure to Exit?"); if(sure==JOptionPane.YES_OPTION) { System.exit(0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void closeProgram()\n {\n window.close();\n }", "public void close() {\n System.exit(0);\n }", "public void exitProgram() {\n System.out.println(\"Closing Ranking....\");\n ScannerInputs.closeScanner();\n System.exit(0);\n }", "public void exitProgram() {\n\...
[ "0.8360869", "0.7946999", "0.7539718", "0.7523235", "0.7481823", "0.74721014", "0.74715036", "0.74112296", "0.721856", "0.7170127", "0.7113988", "0.7081755", "0.7030141", "0.6998089", "0.69932926", "0.6964223", "0.69324744", "0.6926639", "0.68619066", "0.6845216", "0.68447876...
0.0
-1
This method will take back to customer Panel.
private void backToCustomer() { new CustomerPanel().setVisible(true); this.setVisible(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Secured(\"@\")\n public void doBackPage() {\n infoOrderDetail = false;\n haveDepositPrice = false;\n orderStockTag.resetOrderStock();\n }", "private void goBack() {\n View.clearViews();\n View.cambiar(\"operador.cliente\", new RegistrarClientes(operador));\n }", "private void...
[ "0.6669712", "0.6652661", "0.66271967", "0.6608291", "0.6549293", "0.64491737", "0.64159393", "0.641241", "0.6362106", "0.63550377", "0.633105", "0.63034743", "0.6275819", "0.6247041", "0.6209265", "0.6177392", "0.6170174", "0.61608046", "0.61573803", "0.6135988", "0.6120247"...
0.78751796
0
This method will write back to that .txt file.
private void toSave() { File file4=new File("trial.txt"); try { String row; BufferedWriter bw=new BufferedWriter(new FileWriter(file4)); for(int i=0;i<jt.getRowCount();i++) { row = ""; for(int j=0;j<jt.getColumnCount();j++) { row += (jt.getValueAt(i, j) +","); } row = row.substring(0, row.length()-1); //System.out.println(row); bw.write(row); bw.newLine(); } bw.close(); JOptionPane.showMessageDialog(rootPane,"Details saved succesfully"); } catch(Exception ex) { JOptionPane.showMessageDialog(rootPane,"Exception occured"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void save() {\n\t\tWriteFile data = new WriteFile( this.name + \".txt\" );\n\t\ttry {\n\t\t\t data.writeToFile(this.toString());\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"Couldn't print to file\");\n\t\t}\n\t}", "@Override\n public void writeDataToTxtFile() {\n\n }", "public ...
[ "0.72260505", "0.71449405", "0.6854727", "0.68528485", "0.6847532", "0.66589856", "0.6559203", "0.6557837", "0.6554788", "0.6540643", "0.65273976", "0.64871085", "0.6486883", "0.64812076", "0.6447853", "0.6446415", "0.6421534", "0.63908815", "0.6361345", "0.6347869", "0.63314...
0.6146189
35
This method will delete the row
private void toDelete() { if(toCount()==0) { JOptionPane.showMessageDialog(rootPane,"No paint detail has been currently added"); } else { String[] choices={"Delete First Row","Delete Last Row","Delete With Index"}; int option=JOptionPane.showOptionDialog(rootPane, "How would you like to delete data?", "Delete Data", WIDTH, HEIGHT,null , choices, NORMAL); if(option==0) { jtModel.removeRow(toCount()-toCount()); JOptionPane.showMessageDialog(rootPane,"Successfully deleted first row"); } else if(option==1) { jtModel.removeRow(toCount()-1); JOptionPane.showMessageDialog(rootPane,"Successfully deleted last row"); } else if(option==2) { toDeletIndex(); } else { } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteRow() throws SQLException\n {\n m_rs.deleteRow();\n }", "public void actionPerformed(ActionEvent e) {\n model.deleteRow();\n }", "public native void deleteRow(int row) /*-{\n\t\tvar jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();\n\t\tjso...
[ "0.75971216", "0.75470424", "0.74872404", "0.7397116", "0.7396533", "0.7376787", "0.7376787", "0.7373064", "0.7328737", "0.72546554", "0.71825296", "0.71783584", "0.71778935", "0.7177639", "0.7134619", "0.7124204", "0.71224046", "0.710592", "0.70564586", "0.70230293", "0.6953...
0.7171436
14
this method will update and delete the particular selected row.
private void selectDetailWithMouse() { int selectedRowIndex=jt.convertRowIndexToModel(jt.getSelectedRow()); String[] choices={"Update Row","Delete","Cancel"}; int option=JOptionPane.showOptionDialog(rootPane, "Product ID: "+jtModel.getValueAt(selectedRowIndex, 0).toString()+"\n"+"Product Name: "+jtModel.getValueAt(selectedRowIndex,1), "View Data", WIDTH, HEIGHT,null , choices, NORMAL); if(option==0) { tfPaintId.setText(jtModel.getValueAt(selectedRowIndex,0).toString()); tfName.setText(jtModel.getValueAt(selectedRowIndex, 1).toString()); tfPrice.setText(jtModel.getValueAt(selectedRowIndex, 2).toString()); tfColor.setText(jtModel.getValueAt(selectedRowIndex, 3).toString()); tfQuantity.setText(jtModel.getValueAt(selectedRowIndex, 8).toString()); rwCombo.setSelectedItem(jtModel.getValueAt(selectedRowIndex, 4)); typeCombo.setSelectedItem(jtModel.getValueAt(selectedRowIndex, 6)); bCombo.setSelectedItem(jtModel.getValueAt(selectedRowIndex, 5)); switch(jtModel.getValueAt(selectedRowIndex, 7).toString()) { case "High": high.setSelected(true); break; case "Mild": mild.setSelected(true); break; case "Medium": medium.setSelected(true); break; } } else if(option==1) { jtModel.removeRow(selectedRowIndex); JOptionPane.showMessageDialog(rootPane," Detail successfully deleted"); } else { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteRow(int selectedRow){\r\n BudgetSubAwardBean budgetSubAwardBean = (BudgetSubAwardBean)data.get(selectedRow);\r\n if(budgetSubAwardBean.getAcType() == null || budgetSubAwardBean.getAcType().equals(TypeConstants.UPDATE_RECORD)){\r\n budgetSubAwardBean.setAcType(TypeConstan...
[ "0.77516", "0.74133444", "0.7310846", "0.7132183", "0.6999333", "0.67715883", "0.67296344", "0.6673643", "0.6637245", "0.6623526", "0.659551", "0.659551", "0.6585734", "0.65584606", "0.6542161", "0.65098256", "0.6453465", "0.6438111", "0.64379084", "0.6402964", "0.63993615", ...
0.6369485
26
This method will search for the coloumn index from its name.
private int getSearchIndex() { String selected = searchCombo.getSelectedItem().toString(); for(int i = 0; i<columnNames.length; i++) { if(selected.equals(columnNames[i])) { return i; } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getColumnIndex(String name);", "@Override\n public int findColumn(final String columnName) {\n for (int index = 0; index < _columns.size(); index++) {\n if (_columns.get(index).compareTo(columnName) == 0) {\n return index;\n }\n }\n return -1;\n }", "int getColumnIndex (String c...
[ "0.74611855", "0.7194375", "0.7016336", "0.66594887", "0.66594887", "0.665217", "0.665217", "0.665217", "0.6629026", "0.657483", "0.657483", "0.65541935", "0.6527966", "0.65148926", "0.6477213", "0.6337101", "0.63285476", "0.6297527", "0.6276535", "0.61842704", "0.61576957", ...
0.6390447
15
This method will search for the entered value in array.
private void searchFor(int colIndex, String value) { if(colIndex == 2) { try { Integer.valueOf(value); } catch(NumberFormatException e) { JOptionPane.showMessageDialog(null,"Expected integer"); return; } } ArrayList<String[]> jtData = getTableRowData(); sortBubble(jtData, colIndex); int valueIndex = searchBinary(jtData, colIndex, value); if (valueIndex == -1) { JOptionPane.showMessageDialog(null, "Not found"); } else { displayPaintInfo(jtData.get(valueIndex)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args){\n int arrayLength = -1;\r\n \r\n while(arrayLength <=0){\r\n System.out.print(\"Enter an integer for the number of elements of your array.\");\r\n arrayLength = console.nextInt();\r\n }\r\n \r\n int[] array = new int[arrayLength];\r\n \r\n f...
[ "0.7449326", "0.679125", "0.66145474", "0.6580026", "0.6578243", "0.64844805", "0.64809775", "0.64446235", "0.64007425", "0.63451004", "0.633462", "0.6234016", "0.62269795", "0.6131768", "0.6106405", "0.6070417", "0.60621214", "0.6058776", "0.6046371", "0.60235786", "0.601589...
0.5837823
24
Creating and adding data in arraylist
private ArrayList<String[]> getTableRowData() { int numRow, numCol; ArrayList<String[]> data = new ArrayList<>(); numRow = jtModel.getRowCount(); numCol = jtModel.getColumnCount(); String[] row; for(int i = 0; i< numRow; i++) { row = new String[numCol]; for(int j = 0; j< numCol; j++) { row[j] = jtModel.getValueAt(i, j).toString(); } data.add(row); } return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addData() {\n Details d1 = new Details(\"Arpitha\", \"+91-9448907664\", \"25/05/1997\");\n Details d2 = new Details(\"Abhijith\", \"+91-993602342\", \"05/10/1992\");\n details.add(d1);\n details.add(d2);\n }", "public void createListData()\n {\n List<SinhVien...
[ "0.6781279", "0.6750182", "0.65485126", "0.64831907", "0.6442077", "0.63915205", "0.63493586", "0.6332302", "0.63281727", "0.6293871", "0.6279271", "0.6271021", "0.6253244", "0.62422264", "0.62416995", "0.621308", "0.6200115", "0.6199605", "0.61745435", "0.6158262", "0.613824...
0.0
-1
Sort the array using bubble sorting.
private void sortBubble(ArrayList<String[]> jtData, int col) { String first, second; for(int i=0; i < jtData.size();i++) { for(int j=1; j < (jtData.size()-i); j++) { first = jtData.get(j-1)[col]; second = jtData.get(j)[col]; if(col == 2) { // Price is integer int x = Integer.valueOf(first); int y = Integer.valueOf(second); if(x < y) { Collections.swap(jtData, j, j-1); } } else if (first.compareToIgnoreCase(second) > 0) { // For Strings Collections.swap(jtData, j, j-1); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void bubbleSort() {\n boolean unordered = false;\n do {\n unordered = false;\n for (int i = 0; i < array.length - 1; i++) {\n if (((Comparable) array[i]).compareTo(array[i + 1]) > 0) {\n T temp = array[i + 1];\n array[i + 1] = array[i];\n array[i] = temp;\n ...
[ "0.8332054", "0.8211548", "0.7853043", "0.772414", "0.7704909", "0.7658165", "0.7606062", "0.7598816", "0.7591859", "0.7585766", "0.757032", "0.7523012", "0.7510214", "0.74936545", "0.7471898", "0.746424", "0.7457841", "0.74410856", "0.74227154", "0.74198246", "0.7419017", ...
0.67948395
62
This method will print the arraylist in console
private void showArray(ArrayList<String[]> arr) { for(String[] row: arr){ for(String x: row){ System.out.print(x + "\t\t"); } System.out.println(); } System.out.println("------------------------------------"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print()\n {\n for (int i=0; i<list.length; i++)\n System.out.println(i + \":\\t\" + list[i]);\n }", "private void displayArrays(ArrayList list){}", "public void printData(){\n for(int i=0; i<list.size(); i++){\n System.out.print(list.get(i) + \" \");\n }\n System.out.p...
[ "0.7651011", "0.7648134", "0.75763464", "0.74323744", "0.7379018", "0.7307797", "0.7292304", "0.7219552", "0.717175", "0.71425337", "0.7130579", "0.7126584", "0.70902973", "0.706946", "0.70560765", "0.7012622", "0.7006285", "0.6982291", "0.69728255", "0.6926321", "0.6912511",...
0.7060709
14
This method will update the selected row.
private void toEdit() { int i=jt.getSelectedRow(); if(toCount()==0) { JOptionPane.showMessageDialog(rootPane,"No data has been added to the details"); } else if(i==-1) { JOptionPane.showMessageDialog(rootPane,"No item has been selected for the update"); } else { if(tfPaintId.getText().isEmpty()) { JOptionPane.showMessageDialog(rootPane,"Please! Enter the Paint ID"); } else if(tfName.getText().isEmpty()) { JOptionPane.showMessageDialog(rootPane,"Please! Enter the Product name"); } else if(rwCombo.getSelectedItem().toString().equals("Select")) { JOptionPane.showMessageDialog(rootPane,"Please! Select the raw materials used"); } else if(bCombo.getSelectedItem().toString().equals("Select")) { JOptionPane.showMessageDialog(rootPane,"Please! select the brand you want"); } else if(tfPrice.getText().isEmpty()) { JOptionPane.showMessageDialog(rootPane,"Please! Enter the price"); } else if(tfColor.getText().isEmpty()) { JOptionPane.showMessageDialog(rootPane,"Please! Enter the colour"); } else if(typeCombo.getSelectedItem().toString().equals("Select")) { JOptionPane.showMessageDialog(rootPane,"Select something from paint type"); } else if(getQuality()==null) { JOptionPane.showMessageDialog(rootPane,"Quality is not selected"); } else if(tfQuantity.getText().isEmpty()) { JOptionPane.showMessageDialog(rootPane,"Please! Enter the quantity"); } else { try { jtModel.setValueAt(tfPaintId.getText(),i,0); jtModel.setValueAt(tfName.getText(),i,1); jtModel.setValueAt(Integer.valueOf(tfPrice.getText()),i,2); jtModel.setValueAt(tfColor.getText(),i,3); jtModel.setValueAt(rwCombo.getSelectedItem(),i,4); jtModel.setValueAt(bCombo.getSelectedItem(),i,5); jtModel.setValueAt(typeCombo.getSelectedItem(),i,6); jtModel.setValueAt(getQuality(),i,7); jtModel.setValueAt(Integer.valueOf(tfQuantity.getText()),i,8); JOptionPane.showMessageDialog(rootPane,"Successfully updated the data in details"); toClear(); } catch(Exception ex) { JOptionPane.showMessageDialog(rootPane,"Excepted integer but entered another character at price or quantity."); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateSelection() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.out.println(\"btnUpdate\");\n\t\t\t\tint i = table.getSelectedRow();\n\t\t\t\tif (i >= 0) {\n\t\t\t\t\tSystem.out.println(\"row-update-select\" + i);\n\t\t\t\t\tSystem.out.println(\"row-upd...
[ "0.71582675", "0.7064201", "0.6986963", "0.6941872", "0.6933481", "0.6846358", "0.6822106", "0.6817472", "0.67116684", "0.66329926", "0.65691954", "0.6562548", "0.65613824", "0.6546707", "0.6530762", "0.6504571", "0.6504571", "0.64985543", "0.649457", "0.63827604", "0.6373469...
0.62845707
25
this method will open pdf file for about.
private void popAbout() { try { //File file=new File(filepath); Desktop.getDesktop().open(new java.io.File("about.pdf")); } catch (IOException ex) { JOptionPane.showMessageDialog(rootPane,"File not found or supported"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void popHelp() {\n try {\n //File file=new File(filepath);\n Desktop.getDesktop().open(new java.io.File(\"help.pdf\"));\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(rootPane,\"File not found or supported\");\n }\n }", "private void...
[ "0.6737086", "0.65742207", "0.65269184", "0.6440809", "0.64085096", "0.63848823", "0.63628376", "0.6304479", "0.6265345", "0.62604505", "0.6258198", "0.6164074", "0.612713", "0.61138856", "0.6086409", "0.5968854", "0.5957355", "0.59398884", "0.5910773", "0.58832586", "0.58743...
0.78418213
0
this method will open pdf file for Help.
private void popHelp() { try { //File file=new File(filepath); Desktop.getDesktop().open(new java.io.File("help.pdf")); } catch (IOException ex) { JOptionPane.showMessageDialog(rootPane,"File not found or supported"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void jBtnHelpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnHelpActionPerformed\n // TODO add your handling code here:\n if (Desktop.isDesktopSupported()) {\n try {\n File myFile = new File(\"help.txt\");\n Desktop.getDesktop().open(myFile);\n ...
[ "0.7735319", "0.75172824", "0.69957644", "0.6876686", "0.64818794", "0.64294505", "0.6385626", "0.6382948", "0.63724065", "0.6153353", "0.6094183", "0.6065573", "0.60525954", "0.601025", "0.5999101", "0.59760547", "0.59611785", "0.5922065", "0.59090084", "0.5880736", "0.58800...
0.81847245
0
for flag, landing is 0, take off is 1
public Point(int time, int flag) { this.time = time; this.flag = flag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void switchOffFlag(int flag) {\r\n\t\tsim40.memory[Simulator.STATUS_ADDRESS] = ~(~sim40.memory[Simulator.STATUS_ADDRESS] | (1<<flag));\r\n\t}", "private void switchOnFlag(int flag) {\r\n\t\tsim40.memory[Simulator.STATUS_ADDRESS]|= (1<<flag);\r\n\t}", "public boolean isLegOut()\n{\n if (jumpState == ...
[ "0.6176251", "0.6116983", "0.6065997", "0.57808733", "0.5770442", "0.57644755", "0.5752118", "0.57457423", "0.570759", "0.57044506", "0.5667836", "0.56666553", "0.565929", "0.5659123", "0.5636012", "0.5621863", "0.5559673", "0.55135435", "0.5512996", "0.5508715", "0.5497586",...
0.0
-1
Action Listener for button
@Override public void actionPerformed(ActionEvent e) { if (e.getSource() == submit) { int score = answerCheck(); try { Submit submitButton = new Submit(userid, user.getText(), totalScore.getText(), score); setVisible(false); } catch (SQLException ex) { Logger.getLogger(Play.class.getName()).log(Level.SEVERE, null, ex); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void enablButtonListener();", "public void buttonClicked();", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tJButton btn = (JButton) e.getSource();\n\t lev_no = (int) btn.getClientProperty(\"column\") + 3 * ((int) btn.getClientProperty(\"row\"));\n\t\t\tselect.setVisible(false);\n\t...
[ "0.77375287", "0.7534994", "0.73342276", "0.7313117", "0.7291331", "0.7275364", "0.7263127", "0.7249275", "0.7249275", "0.7249275", "0.7249275", "0.72486305", "0.724562", "0.7217411", "0.7216276", "0.7200492", "0.7200286", "0.71916664", "0.71845084", "0.71845084", "0.71845084...
0.0
-1
For answer checking and counting game score.
public int answerCheck() { int score = -36; // 36 squares already filled in game. char[][] userAnswer = new char[9][9]; for (int i = 0; i < 9; i++) { for (int j = 0; j < 9; j++) { userAnswer[i][j] = index[i][j].getText().charAt(0); } } for (int i = 0; i < 9; i++) { for (int j = 0; j < 9; j++) { if(answer[i][j] == userAnswer[i][j]){ score++; } } } return score; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int computeScore() {\n int score = 0;\n for (int i = 0; i < MainActivity.DEFAULT_SIZE; i++) {\n TextView answerView = (TextView) findViewById(MainActivity.NAME_VIEWS[i]);\n String answer = answerView.getText().toString();\n String solution = getQuizCountries()...
[ "0.7496431", "0.7440643", "0.72333467", "0.7207126", "0.7206139", "0.7111497", "0.69787043", "0.69036585", "0.69011766", "0.69011766", "0.69002914", "0.6897225", "0.68864757", "0.6865306", "0.6836751", "0.6810332", "0.68055516", "0.68027353", "0.67964756", "0.6795791", "0.678...
0.70208555
6
Created by hugo on 1/22/16.
public interface SearchUserView { void showMessage(String message); void showProgressIndicator(); void hideProgressIndicator(); void showUsers(List<User> users); void startUserDetailsActivity(String username); Context getContext(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public fina...
[ "0.5952657", "0.5904876", "0.58965737", "0.5777314", "0.5701104", "0.5701104", "0.566421", "0.56508887", "0.5630734", "0.56237745", "0.5620713", "0.56109595", "0.56108606", "0.55940515", "0.55881554", "0.5575716", "0.55548257", "0.55482453", "0.5544936", "0.5538272", "0.55309...
0.0
-1
Test of encrypt method, of class Crypto.
@Test public void testEncrypt() throws Exception { System.out.println("encrypt"); String seed = ""; String cleartext = ""; String expResult = ""; String result = Crypto.encrypt(seed, cleartext); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testEncrypt()\r\n {\r\n System.out.println(\"encrypt\");\r\n String input = \"Hello how are you?\";\r\n KeyMaker km = new KeyMaker();\r\n SecretKeySpec sks = new SecretKeySpec(km.makeKeyDriver(\"myPassword\"), \"AES\");\r\n EncyptDecrypt instance = new...
[ "0.8136862", "0.75770295", "0.75458914", "0.73905766", "0.72637564", "0.72331953", "0.7183118", "0.7131244", "0.7053811", "0.7040405", "0.7035396", "0.70022935", "0.6876742", "0.685927", "0.6855389", "0.67885196", "0.67624384", "0.6756386", "0.66828865", "0.66560614", "0.6655...
0.83639693
0
Test of decrypt method, of class Crypto.
@Test public void testDecrypt() throws Exception { System.out.println("decrypt"); String seed = ""; String encrypted = ""; String expResult = ""; String result = Crypto.decrypt(seed, encrypted); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testDecrypt()\r\n {\r\n System.out.println(\"decrypt\");\r\n String input = \"0fqylTncsgycZJQ+J5pS7v6/fj8M/fz4bavB/SnIBOQ=\";\r\n KeyMaker km = new KeyMaker();\r\n SecretKeySpec sks = new SecretKeySpec(km.makeKeyDriver(\"myPassword\"), \"AES\");\r\n En...
[ "0.8240913", "0.7780352", "0.7598784", "0.7242583", "0.7037228", "0.6987527", "0.688776", "0.6871873", "0.68228567", "0.6771486", "0.66644937", "0.6545095", "0.65263474", "0.6524514", "0.648626", "0.6464579", "0.6450357", "0.6441873", "0.6427253", "0.63712853", "0.63608485", ...
0.84106624
0
Test of toHex method, of class Crypto.
@Test public void testToHex_String() { System.out.println("toHex"); String txt = ""; String expResult = ""; String result = Crypto.toHex(txt); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testFromHex() {\n System.out.println(\"fromHex\");\n String hex = \"\";\n String expResult = \"\";\n String result = Crypto.fromHex(hex);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail....
[ "0.79971147", "0.7571973", "0.748612", "0.7261664", "0.6909193", "0.6856248", "0.68255866", "0.6566911", "0.64269215", "0.63029885", "0.6211425", "0.6113202", "0.6025854", "0.60250723", "0.59859276", "0.59672326", "0.5938996", "0.5933515", "0.5922233", "0.5870849", "0.5857477...
0.80246377
0
Test of fromHex method, of class Crypto.
@Test public void testFromHex() { System.out.println("fromHex"); String hex = ""; String expResult = ""; String result = Crypto.fromHex(hex); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testToHex_String() {\n System.out.println(\"toHex\");\n String txt = \"\";\n String expResult = \"\";\n String result = Crypto.toHex(txt);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail...
[ "0.72850317", "0.69650483", "0.6867656", "0.6581343", "0.6549225", "0.650478", "0.63511515", "0.63037324", "0.61848927", "0.61652714", "0.61503094", "0.6129225", "0.6118742", "0.60595906", "0.60431415", "0.60272574", "0.59995", "0.5930524", "0.5929355", "0.59036386", "0.58904...
0.8494838
0
Test of toByte method, of class Crypto.
@Test public void testToByte() { System.out.println("toByte"); String hexString = ""; byte[] expResult = null; byte[] result = Crypto.toByte(hexString); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testToHex_byteArr() {\n System.out.println(\"toHex\");\n byte[] buf = null;\n String expResult = \"\";\n String result = Crypto.toHex(buf);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fai...
[ "0.6742011", "0.6476061", "0.63524246", "0.6322485", "0.6279421", "0.61941034", "0.6147805", "0.6094473", "0.60599387", "0.5974516", "0.59715104", "0.5942498", "0.59272057", "0.5899346", "0.5824341", "0.582243", "0.58186203", "0.58186203", "0.57942307", "0.5768116", "0.575337...
0.8435078
0
Test of toHex method, of class Crypto.
@Test public void testToHex_byteArr() { System.out.println("toHex"); byte[] buf = null; String expResult = ""; String result = Crypto.toHex(buf); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testToHex_String() {\n System.out.println(\"toHex\");\n String txt = \"\";\n String expResult = \"\";\n String result = Crypto.toHex(txt);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail...
[ "0.80246377", "0.79971147", "0.7571973", "0.7261664", "0.6909193", "0.6856248", "0.68255866", "0.6566911", "0.64269215", "0.63029885", "0.6211425", "0.6113202", "0.6025854", "0.60250723", "0.59859276", "0.59672326", "0.5938996", "0.5933515", "0.5922233", "0.5870849", "0.58574...
0.748612
3
with any HTTP ClientServer
public static String uploadByHttpClient(String toUrl, File[] files, String[] names) { // HttpClient httpclient = new DefaultHttpClient(); // try { // HttpPost httppost = new HttpPost(toUrl); // // MultipartEntity reqEntity = new MultipartEntity(); // for (int i = 0; i < files.length; i++) // reqEntity.addPart(names[i], new FileBody(files[i])); //// reqEntity.addPart("filename", new StringBody(file.getName())); // // httppost.setEntity(reqEntity); // System.out.println("executing request " + httppost.getRequestLine()); // HttpResponse response = httpclient.execute(httppost); // // //response // System.out.println(response.getStatusLine()); // HttpEntity resEntity = response.getEntity(); // if (resEntity != null) { // return getContent(resEntity.getContent()); // } // } catch(IOException e){ // e.printStackTrace(); // } finally { // // When HttpClient instance is no longer needed, // // shut down the connection manager to ensure // // immediate deallocation of all system resources // httpclient.getConnectionManager().shutdown(); // } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static HttpClient createClient() {\n return HttpClients.createMinimal();\n }", "public interface Client {\n\n\t/**\n\t * @throws Http2Exception\n\t */\n\tvoid init() throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean start() throws Http2Exception;\n\n\t/**\n\...
[ "0.62571096", "0.6183197", "0.61613446", "0.6148492", "0.6110891", "0.61091226", "0.6078195", "0.6058254", "0.60320276", "0.6030281", "0.60160786", "0.60077906", "0.593916", "0.5920629", "0.59196067", "0.59120476", "0.5898727", "0.58909196", "0.5885971", "0.58779347", "0.5865...
0.0
-1
with any HTTP ClientServer
public static String uploadUseFormFile(String toUrl, File[] files, String[] names) { String end = "\r\n"; String twoHyphens = "--"; String boundary = "*****jerry2"; HttpURLConnection conn = null; InputStream is = null; DataOutputStream ds = null; try { URL url = new URL(toUrl); conn = (HttpURLConnection) url.openConnection(); conn.setDoOutput(true); conn.setDoInput(true); conn.setChunkedStreamingMode(0); conn.setRequestMethod("POST"); conn.setRequestProperty("Connection", "Keep-Alive"); conn.setRequestProperty("Charset", "UTF-8"); conn.setRequestProperty("Content-length", String.valueOf(getLength(files))); conn.setRequestProperty("Content-type", "multipart/form-data; boundary="+boundary); /* Content-type: multipart/form-data; boundary=AaB03x --AaB03x content-disposition: form-data; name="pics"; filename="file1.txt" Content-Type: text/plain ... contents of file1.txt ... --AaB03x-- */ ds = new DataOutputStream(conn.getOutputStream()); for (int i = 0; i < files.length; i++) { is = new FileInputStream(files[i]); ds.writeBytes(twoHyphens + boundary + end); ds.writeBytes("content-disposition: form-data; name=\""+names[i]+"\"; filename=\""+files[i].getName()+"\""+end); ds.writeBytes(end); byte[] buf = new byte[128]; int len = -1; while ((len=is.read(buf)) != -1) ds.write(buf, 0, len); ds.writeBytes(end); } ds.writeBytes(twoHyphens + boundary + twoHyphens + end); ds.flush(); //response System.out.println("code="+conn.getResponseCode()+",msg="+conn.getResponseMessage()); return getContent(conn.getInputStream()); } catch (IOException e1) { e1.printStackTrace(); } finally{ try { if (is != null) is.close(); if (ds != null) ds.close(); } catch (IOException e) { e.printStackTrace(); } conn.disconnect(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static HttpClient createClient() {\n return HttpClients.createMinimal();\n }", "public interface Client {\n\n\t/**\n\t * @throws Http2Exception\n\t */\n\tvoid init() throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean start() throws Http2Exception;\n\n\t/**\n\...
[ "0.62571096", "0.6183197", "0.61613446", "0.6148492", "0.6110891", "0.61091226", "0.6078195", "0.6058254", "0.60320276", "0.6030281", "0.60160786", "0.60077906", "0.593916", "0.5920629", "0.59196067", "0.59120476", "0.5898727", "0.58909196", "0.5885971", "0.58779347", "0.5865...
0.0
-1
This test demonstrates the recognition of the words 'jackson cook' as forename and surname even though each individual word would have been recognized as city or profession respectively.
@Test public void testNamedEntityRecognitionWithoutCounterNeuron() { Model m = new Model(null, 1); // number of threads Neuron forenameCategory = m.createNeuron("C-forename"); Neuron surnameCategory = m.createNeuron("C-surname"); Neuron suppressingN = m.createNeuron("SUPPR"); // The word input neurons which do not yet possess a relational id. HashMap<String, Neuron> inputNeurons = new HashMap<>(); String[] words = new String[] { "mr.", "jackson", "cook", "was", "born", "in", "new", "york" }; for(String word: words) { Neuron in = m.createNeuron("W-" + word); inputNeurons.put(word, in); } // The entity neurons represent the concrete meanings of the input words. // The helper function 'initAndNeuron' computes the required bias for a // conjunction of the inputs. Neuron cookSurnameEntity = m.initNeuron( m.createNeuron("E-cook (surname)"), 3.0, // adjusts the bias new Input() // Requires the word to be recognized .setNeuron(inputNeurons.get("cook")) .setWeight(10.0f) // This input requires the input activation to have an // activation value of at least 0.9 .setBiasDelta(0.9) .setRelativeRid(0) // references the current word .setRecurrent(false) .setRangeMatch(EQUALS) .setRangeOutput(true), new Input() // The previous word needs to be a forename .setNeuron(forenameCategory) .setWeight(10.0f) .setBiasDelta(0.9) .setRelativeRid(-1) // references the previous word .setRecurrent(true) // this input is a positive feedback loop .setRangeMatch(NONE) .setRangeOutput(false), // This neuron may be suppressed by the E-cook (profession) neuron, but there is no // self suppression taking place even though 'E-cook (surname)' is also contained // in the suppressingN. new Input() .setNeuron(suppressingN) .setWeight(-20.0f) .setBiasDelta(1.0) .setRecurrent(true) // this input is a negative feedback loop .setRangeMatch(CONTAINS) ); Neuron cookProfessionEntity = m.initNeuron( m.createNeuron("E-cook (profession)"), 3.0, new Input() .setNeuron(inputNeurons.get("cook")) .setWeight(15.0f) .setBiasDelta(0.9) .setRecurrent(false) .setRangeMatch(EQUALS) .setRangeOutput(true), new Input() .setNeuron(suppressingN) .setWeight(-20.0f) .setBiasDelta(1.0) .setRecurrent(true) .setRangeMatch(CONTAINS) ); Neuron jacksonForenameEntity = m.initNeuron( m.createNeuron("E-jackson (forename)"), 3.0, new Input() .setNeuron(inputNeurons.get("jackson")) .setWeight(10.0f) .setBiasDelta(0.9) .setRelativeRid(0) .setRecurrent(false) .setRangeMatch(EQUALS) .setRangeOutput(true), new Input() .setNeuron(surnameCategory) .setWeight(10.0f) .setBiasDelta(0.9) .setRelativeRid(1) .setRecurrent(true) .setRangeMatch(NONE), new Input() .setNeuron(suppressingN) .setWeight(-20.0f) .setBiasDelta(1.0) .setRecurrent(true) .setRangeMatch(CONTAINED_IN) ); Neuron jacksonCityEntity = m.initNeuron( m.createNeuron("E-jackson (city)"), 3.0, new Input() .setNeuron(inputNeurons.get("jackson")) .setWeight(12.0f) .setBiasDelta(0.9) .setRecurrent(false) .setRangeMatch(EQUALS) .setRangeOutput(true), new Input() .setNeuron(suppressingN) .setWeight(-20.0f) .setBiasDelta(1.0) .setRecurrent(true) .setRangeMatch(CONTAINED_IN) ); m.initNeuron( forenameCategory, 0.0, new Input() // In this example there is only one forename considered. .setNeuron(jacksonForenameEntity) .setWeight(10.0f) .setBiasDelta(0.0) .setRelativeRid(0) .setRangeMatch(EQUALS) .setRangeOutput(true) ); m.initNeuron( surnameCategory, -0.001, new Input() .setNeuron(cookSurnameEntity) .setWeight(10.0f) .setBiasDelta(0.0) .setRelativeRid(0) .setRangeMatch(EQUALS) .setRangeOutput(true) ); m.initNeuron( suppressingN, -0.001, new Input().setNeuron(cookProfessionEntity) .setWeight(10.0f) .setBiasDelta(0.0) .setRangeMatch(EQUALS) .setRangeOutput(true), new Input() .setNeuron(cookSurnameEntity) .setWeight(10.0f) .setBiasDelta(0.0) .setRangeMatch(EQUALS) .setRangeOutput(true), new Input() .setNeuron(jacksonCityEntity) .setWeight(10.0f) .setBiasDelta(0.0) .setRangeMatch(EQUALS) .setRangeOutput(true), new Input() .setNeuron(jacksonForenameEntity) .setWeight(10.0f) .setBiasDelta(0.0) .setRangeMatch(EQUALS) .setRangeOutput(true) ); // Now that the model is complete, start processing an actual text. Document doc = m.createDocument("mr. jackson cook was born in new york "); int i = 0; int wordPos = 0; for(String w: doc.getContent().split(" ")) { int j = i + w.length(); // Feed the individual words as inputs into the network. inputNeurons.get(w).addInput(doc, i, j, wordPos); i = j + 1; wordPos++; } // Search for the best interpretation of this text. doc.process(); System.out.println(doc.neuronActivationsToString(true, false, true)); System.out.println(); System.out.println("Final Interpretation: " + doc.bestInterpretation.toString()); System.out.println(); System.out.println("Activations of the Surname Category:"); for(Activation act: surnameCategory.getFinalActivations(doc)) { System.out.print(act.key.r + " "); System.out.print(act.key.rid + " "); System.out.print(act.key.o + " "); System.out.print(act.key.n.neuron.get().label + " "); System.out.print(act.finalState.value); } doc.clearActivations(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testFullTextSearch_on_a_field() {\n ReadResponse resp = factual.fetch(TABLE,\n new Query().field(\"name\").search(\"Fried Chicken\"));\n\n for (String name : resp.mapStrings(\"name\")) {\n assertTrue(name.toLowerCase().contains(\"frie\")\n || name.toLowerCase().conta...
[ "0.61838347", "0.5956542", "0.5750134", "0.5739621", "0.57008326", "0.56824017", "0.5663054", "0.5659901", "0.562404", "0.56079394", "0.5602404", "0.5570307", "0.55477506", "0.55388266", "0.552417", "0.551308", "0.54795873", "0.54785854", "0.5461597", "0.5461019", "0.54609394...
0.6375532
0
This test demonstrates the recognition of the words 'jackson cook' as forename and surname even though each individual word would have been recognized as city or profession respectively.
@Test public void testNamedEntityRecognitionWithCounterNeuron() { Model m = new Model(null, 1); // number of threads Neuron forenameCategory = m.createNeuron("C-forename"); Neuron surnameCategory = m.createNeuron("C-surname"); Neuron suppressingN = m.createNeuron("SUPPR"); // The following three neurons are used to assign each word activation // a relational id (rid). Here, the relational id specifies the // word position within the sentence. Neuron spaceN = m.createNeuron("SPACE"); Neuron startSignal = m.createNeuron("START-SIGNAL"); Neuron ctNeuron = m.initCounterNeuron(m.createNeuron("RID Counter"), spaceN, // clock signal false, // direction of the clock signal (range end counts) startSignal, // start signal true, // direction of the start signal (range begin counts) false // direction of the counting neuron ); // initCounterNeuron is just a convenience method which creates an ordinary neuron // with some input synapses. // The word input neurons which do not yet possess a relational id. HashMap<String, Neuron> inputNeurons = new HashMap<>(); // The word input neurons with a relational id. HashMap<String, Neuron> relNeurons = new HashMap<>(); String[] words = new String[] { "mr.", "jackson", "cook", "was", "born", "in", "new", "york" }; for(String word: words) { Neuron in = m.createNeuron("W-" + word); Neuron rn = m.initRelationalNeuron( m.createNeuron("WR-" + word), ctNeuron, // RID Counting neuron in, // Input neuron false // Direction of the input neuron ); inputNeurons.put(word, in); relNeurons.put(word, rn); } // The entity neurons represent the concrete meanings of the input words. // The helper function 'initAndNeuron' computes the required bias for a // conjunction of the inputs. Neuron cookSurnameEntity = m.initNeuron( m.createNeuron("E-cook (surname)"), 3, // adjusts the bias new Input() // Requires the word to be recognized .setNeuron(relNeurons.get("cook")) .setWeight(10.0f) // This input requires the input activation to have an // activation value of at least 0.9 .setBiasDelta(0.9) .setRelativeRid(0) // references the current word .setRecurrent(false) .setRangeMatch(EQUALS) .setRangeOutput(true), new Input() // The previous word needs to be a forename .setNeuron(forenameCategory) .setWeight(10.0f) .setBiasDelta(0.9) .setRelativeRid(-1) // references the previous word .setRecurrent(true) // this input is a positive feedback loop .setRangeMatch(NONE), // This neuron may be suppressed by the E-cook (profession) neuron, but there is no // self suppression taking place even though 'E-cook (surname)' is also contained // in the suppressingN. new Input() .setNeuron(suppressingN) .setWeight(-20.0f) .setBiasDelta(1.0) .setRecurrent(true) // this input is a negative feedback loop .setRangeMatch(CONTAINS) ); Neuron cookProfessionEntity = m.initNeuron( m.createNeuron("E-cook (profession)"), 3, new Input() .setNeuron(relNeurons.get("cook")) .setWeight(15.0f) .setBiasDelta(0.9) .setRecurrent(false) .setRangeMatch(EQUALS) .setRangeOutput(true), new Input() .setNeuron(suppressingN) .setWeight(-20.0f) .setBiasDelta(1.0) .setRecurrent(true) .setRangeMatch(CONTAINS) ); Neuron jacksonForenameEntity = m.initNeuron( m.createNeuron("E-jackson (forename)"), 3, new Input() .setNeuron(relNeurons.get("jackson")) .setWeight(10.0f) .setBiasDelta(0.9) .setRelativeRid(0) .setRecurrent(false) .setRangeMatch(EQUALS) .setRangeOutput(true), new Input() .setNeuron(surnameCategory) .setWeight(10.0f) .setBiasDelta(0.9) .setRelativeRid(1) .setRecurrent(true) .setRangeMatch(NONE), new Input() .setNeuron(suppressingN) .setWeight(-20.0f) .setBiasDelta(1.0) .setRecurrent(true) .setRangeMatch(CONTAINED_IN) ); Neuron jacksonCityEntity = m.initNeuron( m.createNeuron("E-jackson (city)"), 3, new Input() .setNeuron(relNeurons.get("jackson")) .setWeight(12.0f) .setBiasDelta(0.9) .setRecurrent(false) .setRangeMatch(EQUALS) .setRangeOutput(true), new Input() .setNeuron(suppressingN) .setWeight(-20.0f) .setBiasDelta(1.0) .setRecurrent(true) .setRangeMatch(CONTAINED_IN) ); m.initNeuron(forenameCategory, -0.001, new Input() // In this example there is only one forename considered. .setNeuron(jacksonForenameEntity) .setWeight(10.0f) .setBiasDelta(0.0) .setRelativeRid(0) .setRangeMatch(EQUALS) .setRangeOutput(true) ); m.initNeuron(surnameCategory, -0.001, new Input() .setNeuron(cookSurnameEntity) .setWeight(10.0f) .setBiasDelta(0.0) .setRelativeRid(0) .setRangeMatch(EQUALS) .setRangeOutput(true) ); m.initNeuron(suppressingN, -0.001, new Input() .setNeuron(cookProfessionEntity) .setWeight(10.0f) .setBiasDelta(0.0) .setRangeMatch(EQUALS) .setRangeOutput(true), new Input() .setNeuron(cookSurnameEntity) .setWeight(10.0f) .setBiasDelta(0.0) .setRangeMatch(EQUALS) .setRangeOutput(true), new Input() .setNeuron(jacksonCityEntity) .setWeight(10.0f) .setBiasDelta(0.0) .setRangeMatch(EQUALS) .setRangeOutput(true), new Input() .setNeuron(jacksonForenameEntity) .setWeight(10.0f) .setBiasDelta(0.0) .setRangeMatch(EQUALS) .setRangeOutput(true) ); // Now that the model is complete, start processing an actual text. Document doc = m.createDocument("mr. jackson cook was born in new york ", 0); // The start signal is used as a starting point for relational id counter. startSignal.addInput(doc, 0, 1, 0); // iteration, begin, end, relational id int i = 0; for(String w: doc.getContent().split(" ")) { int j = i + w.length(); // The space is used as a clock signal to increase the relational id. spaceN.addInput(doc, j, j + 1); // Feed the individual words as inputs into the network. inputNeurons.get(w).addInput(doc, i, j); i = j + 1; } // Search for the best interpretation of this text. doc.process(); System.out.println(doc.neuronActivationsToString(true, false, true)); System.out.println(); System.out.println("Selected Option: " + doc.bestInterpretation.toString()); System.out.println(); System.out.println("Activations of the Surname Category:"); for(Activation act: surnameCategory.getFinalActivations(doc)) { System.out.print(act.key.r + " "); System.out.print(act.key.rid + " "); System.out.print(act.key.o + " "); System.out.print(act.key.n.neuron.get().label + " "); System.out.print(act.finalState.value); } doc.clearActivations(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testNamedEntityRecognitionWithoutCounterNeuron() {\n Model m = new Model(null, 1); // number of threads\n\n Neuron forenameCategory = m.createNeuron(\"C-forename\");\n Neuron surnameCategory = m.createNeuron(\"C-surname\");\n Neuron suppressingN = m.createNeuron(\...
[ "0.6376453", "0.61833465", "0.57489777", "0.57396966", "0.57002735", "0.56823343", "0.5662533", "0.5660057", "0.5623393", "0.56075776", "0.56031716", "0.55711484", "0.5548709", "0.55393547", "0.55245787", "0.5513841", "0.5480229", "0.54784125", "0.5462393", "0.54615086", "0.5...
0.59572935
2
public abstract boolean isPageLoaded(String pageURL);
public void OpenUrl(WebDriver driver, String urlValue) { driver.get(urlValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void thePageIsLoaded() {\r\n this.page.isLoaded();\r\n }", "boolean hasPage();", "boolean hasPage();", "@Override\r\n\tpublic boolean isPageLoaded() {\n\t\treturn false;\r\n\t}", "boolean hasPage(String page);", "boolean isLoaded();", "@Test(priority = 1)\n public void testIsPageLoa...
[ "0.76160747", "0.75579035", "0.75579035", "0.7307511", "0.7207734", "0.71114373", "0.71110165", "0.7110152", "0.70572144", "0.7026688", "0.6926468", "0.6861921", "0.66280675", "0.662294", "0.6589345", "0.65680206", "0.65541834", "0.6547013", "0.6520814", "0.6513487", "0.64957...
0.0
-1
Sleep this thread, reinterrupting on a InterruptedException.
public static void sleep(long millis) { run(() -> Thread.sleep(millis)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sleep() {\n try {\n Thread.sleep(3000L);\n }\n catch (Exception ignored) {\n Log.trace(\"Sleep got interrupted.\");\n }\n }", "public void sleep()\n\t{\n\t\ttry\n\t\t{\n\t\t\tThread.sleep(getMilliseconds());\n\t\t}\n\t\tcatch (InterruptedException...
[ "0.7336998", "0.70528466", "0.7044742", "0.70249116", "0.68856305", "0.68383473", "0.6711265", "0.66871256", "0.6611916", "0.66088116", "0.66027856", "0.65901625", "0.6564761", "0.6532065", "0.6497756", "0.64967895", "0.6480851", "0.64228237", "0.64080477", "0.6405643", "0.63...
0.0
-1
Sleep this thread, reinterrupting on a InterruptedException.
public static void sleep(Duration duration) { sleep(duration.toMillis()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sleep() {\n try {\n Thread.sleep(3000L);\n }\n catch (Exception ignored) {\n Log.trace(\"Sleep got interrupted.\");\n }\n }", "public void sleep()\n\t{\n\t\ttry\n\t\t{\n\t\t\tThread.sleep(getMilliseconds());\n\t\t}\n\t\tcatch (InterruptedException...
[ "0.7336998", "0.70528466", "0.7044742", "0.70249116", "0.68856305", "0.68383473", "0.6711265", "0.66871256", "0.6611916", "0.66088116", "0.66027856", "0.65901625", "0.6564761", "0.6532065", "0.6497756", "0.64967895", "0.6480851", "0.64228237", "0.64080477", "0.6405643", "0.63...
0.0
-1
Reinterrupt the current thread if a runnable throws a InterruptedException.
public static void run(InterruptibleRunnable runnable) { try { runnable.run(); } catch (InterruptedException e) { LOGGER.info("Interrupted", e); Thread.currentThread().interrupt(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final void interruptTask() {\n/* 82 */ Thread currentRunner = this.runner;\n/* 83 */ if (currentRunner != null) {\n/* 84 */ currentRunner.interrupt();\n/* */ }\n/* 86 */ this.doneInterrupting = true;\n/* */ }", "public void interrupt() {\n interrupted.set(true);\n ...
[ "0.6961229", "0.687138", "0.67235976", "0.6551349", "0.64707106", "0.6407882", "0.64024293", "0.6368885", "0.6324804", "0.6314834", "0.63043743", "0.6304185", "0.6257988", "0.6238979", "0.61783266", "0.61659294", "0.61659294", "0.61524904", "0.61367226", "0.61367226", "0.6136...
0.6567515
3
Repeatedly call a runnable until the thread has been interrupted.
@SuppressWarnings("squid:S2221" /* Stack traces would be lost otherwise */) public static void repeat(InterruptibleRunnable runnable) { try { while (!Thread.interrupted()) { run(runnable); } } catch (Exception e) { LOGGER.error("{} died unexpectedly", Thread.currentThread().getName(), e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tsleep(dauer);\n\t\t\tt.interrupt();\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t}", "public static void run(InterruptibleRunnable runnable) {\n try {\n runnable.run();\n } catch (InterruptedException e) {\n LOGGER.info(\...
[ "0.6902571", "0.63681656", "0.63658065", "0.6350517", "0.63404125", "0.6207948", "0.6190328", "0.61690545", "0.61608064", "0.61362725", "0.60588074", "0.603792", "0.6026022", "0.5985611", "0.59838665", "0.59730494", "0.59328026", "0.5920737", "0.5882888", "0.58648103", "0.585...
0.743843
0
Created by mainza1992 on 08/10/2017.
public interface IRequestInterface { @GET(API_CONSTANTS.SANFRAN_API) Observable<List<ParkingModel>> getParkingList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "...
[ "0.58945704", "0.5816213", "0.57561386", "0.5727036", "0.5702443", "0.5702443", "0.5690912", "0.5689891", "0.5681307", "0.5626138", "0.5621689", "0.5599227", "0.5591405", "0.5551018", "0.55292666", "0.5526214", "0.5524874", "0.5498767", "0.5492891", "0.5489722", "0.5481001", ...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public Object call() throws Exception { int max = Integer.MIN_VALUE; for (int i = start;i<end;i++){ if (data[i]>max)max = data[i]; } return max; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Initialize our new UI component
@Override protected void init(VaadinRequest request) { final TextFieldMultiline component = new TextFieldMultiline(); component.setCaption("Caption"); component.setInputPrompt("Enter multiline here"); component.setResetButtonEnabled(true); // component.setEnabled(true); // Initialize our new UI component final TextFieldMultiline disabledComponent = new TextFieldMultiline(); disabledComponent.setCaption("Caption (disabled)"); disabledComponent.setInputPrompt("Enter multiline here"); List<String> list = new ArrayList<>(); list.add("ABC"); list.add("DEF"); disabledComponent.setValue(list); disabledComponent.setEnabled(false); Button btnClear = new Button("clear"); btnClear.addClickListener(e -> component.clear()); // Show it in the middle of the screen final VerticalLayout layout = new VerticalLayout(); layout.setStyleName("demoContentLayout"); layout.setSizeFull(); final HorizontalLayout hLayout = new HorizontalLayout(); hLayout.addComponent(component); hLayout.addComponent(btnClear); hLayout.setSpacing(true); hLayout.setComponentAlignment(btnClear, Alignment.BOTTOM_RIGHT); layout.addComponent(hLayout); layout.setComponentAlignment(hLayout, Alignment.MIDDLE_CENTER); layout.addComponent(disabledComponent); layout.setComponentAlignment(disabledComponent, Alignment.MIDDLE_CENTER); setContent(layout); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UI() {\n initComponents();\n }", "private void initUI() {\n }", "public void init()\n {\n buildUI(getContentPane());\n }", "protected void initialize()\n {\n uiFactory.configureUIComponent(this, UI_PREFIX);\n\n initializeFields();\n initializeLabels();...
[ "0.8051734", "0.80307454", "0.79322994", "0.7798693", "0.776069", "0.7695912", "0.768819", "0.76034015", "0.75913465", "0.75913465", "0.7584113", "0.75382036", "0.7505128", "0.7486792", "0.74551654", "0.7448896", "0.7442558", "0.7436078", "0.74053717", "0.7397952", "0.7389507...
0.0
-1
Whether or not new bots are allowed to spawn. Initializes necessary data and recursively sets up a bot repository for the AdaptiveClassLoader to load from. Also sets the spawn delay between bots to a low value if the bots are being spawned locally.
BotQueue( ThreadGroup group, BotAction botAction ) { super( group, "BotQueue" ); repository = new Vector<File>(); m_group = group; m_lastSpawnTime = 0; m_botAction = botAction; directory = new File( m_botAction.getCoreData().getGeneralSettings().getString( "Core Location" )); int delay = m_botAction.getGeneralSettings().getInt( "SpawnDelay" ); if( delay == 0 ) SPAWN_DELAY = 20000; else SPAWN_DELAY = delay; if ( m_botAction.getGeneralSettings().getString( "Server" ).equals("localhost") || m_botAction.getGeneralSettings().getString( "Server" ).equals("127.0.0.1")) SPAWN_DELAY = 100; resetRepository(); m_botTypes = Collections.synchronizedMap( new HashMap<String, Integer>() ); m_botStable = Collections.synchronizedMap( new HashMap<String, ChildBot>() ); m_spawnQueue = Collections.synchronizedList( new LinkedList<ChildBot>() ); m_botTypes.put( "hubbot", new Integer( 1 )); if( repository.size() == 0 ) { Tools.printLog( "There are no bots to load. Did you set the Core Location parameter in setup.cfg improperly?" ); } else { System.out.println( "Looking through " + directory.getAbsolutePath() + " for bots. " + (repository.size() - 1) + " child directories." ); System.out.println(); System.out.println("=== Loading bots ... ==="); } m_loader = new AdaptiveClassLoader( repository, getClass().getClassLoader() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void spawnBot( String className, String login, String password, String messager ) {\n CoreData cdata = m_botAction.getCoreData();\n long currentTime;\n\n String rawClassName = className.toLowerCase();\n BotSettings botInfo = cdata.getBotConfig( rawClassName );\n\n ...
[ "0.7001371", "0.63297087", "0.61439025", "0.60479987", "0.5689258", "0.5558519", "0.544724", "0.5433248", "0.5370056", "0.5325601", "0.530101", "0.5281433", "0.5274631", "0.5258843", "0.52207375", "0.5215851", "0.5204297", "0.5189778", "0.51790637", "0.5174633", "0.5170193", ...
0.6540891
1
Clears the current repository and adds the core location and all subdirectories to the current bot repository.
public void resetRepository() { repository.clear(); addDirectories( directory ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteDir() throws Exception\n{\n if(_repo!=null) _repo.close(); _repo = null;\n _gdir.delete();\n _gdir.setProp(GitDir.class.getName(), null);\n}", "public void cleanUpRepository()\r\n {\r\n\t\t// delete the repository\r\n\t\trepositoryService.deleteRepository(repository);\r\n\t\t\r\n\t\...
[ "0.58742905", "0.5775248", "0.57573754", "0.5342745", "0.5247495", "0.51191086", "0.50585777", "0.50507015", "0.50391287", "0.5026639", "0.50256956", "0.49561208", "0.49105874", "0.48951545", "0.48770857", "0.48742235", "0.4823234", "0.48083678", "0.47898403", "0.47878194", "...
0.7102041
0
Returns the total number of bots of a given class.
int getNumberOfBots( String className ) { Integer number = m_botTypes.get( className ); if( number == null ) { return 0; } else { return number.intValue(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getBotCount(String className) {\n Integer currentBotCount = m_botTypes.get( className.toLowerCase() );\n\n if( currentBotCount == null ) {\n currentBotCount = new Integer( 0 );\n m_botTypes.put( className.toLowerCase(), currentBotCount );\n }\n\n return cu...
[ "0.753537", "0.73746854", "0.5971059", "0.57545614", "0.57348984", "0.5719084", "0.57058936", "0.5664923", "0.5596776", "0.55594325", "0.5555599", "0.55479145", "0.554403", "0.55060005", "0.54924667", "0.54924667", "0.54924667", "0.54872906", "0.54778594", "0.54778594", "0.54...
0.7886265
0
Displays the contents of the current bot spawning queue in PM to the specified player.
void listWaitingList( String messager ) { int i; ChildBot bot; ListIterator<ChildBot> iterator; m_botAction.sendSmartPrivateMessage( messager, "Waiting list:" ); for( iterator = m_spawnQueue.listIterator(), i = 1; iterator.hasNext(); i++ ) { bot = iterator.next(); m_botAction.sendSmartPrivateMessage( messager, i + ": " + bot.getBot().getBotName() + ", created by " + bot.getCreator() + "." ); } m_botAction.sendSmartPrivateMessage( messager, "End of list" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String gotoQueue() {\n\t\tselectedPlaylist = PlaylistMng.QUEUE_NAME;\n\t\tpassivePlaylist = playlistMng.getPlaylist(PlaylistMng.QUEUE_NAME);\n\t\treturn \"queue\";\n\t}", "public static void display() {\n System.out.println();\t \n System.out.println(\"Contents of the queue are: \" + queue);\...
[ "0.6134932", "0.5945381", "0.5784654", "0.57228947", "0.57205915", "0.56788117", "0.56294525", "0.5599203", "0.55972296", "0.5570299", "0.55000854", "0.5474358", "0.54584396", "0.5448799", "0.5445229", "0.5425216", "0.5407449", "0.54030603", "0.540066", "0.5380085", "0.537160...
0.0
-1
Lists the number of bots of each currently spawned type to the specified player in PM. If for some reason the count is 0 or less, the result is not displayed.
void listBotTypes( String messager ) { Iterator<String> i; Integer number; String className; m_botAction.sendSmartPrivateMessage( messager, "Listing bot types:" ); for( i = m_botTypes.keySet().iterator(); i.hasNext(); ) { className = i.next(); number = m_botTypes.get( className ); if( number.intValue() > 0 ) m_botAction.sendSmartPrivateMessage( messager, className + ": " + number ); } m_botAction.sendSmartPrivateMessage( messager, "End of list" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getTotalBotCount() {\n int t = 0;\n\n for (Integer i : m_botTypes.values())\n t += i;\n\n return t;\n }", "public int playersCount(){\r\n\t\treturn players.size();\r\n\t}", "public int countPlayers(){\n return players.size();\n }", "int getNumberOfBots( String...
[ "0.6429145", "0.6385277", "0.636076", "0.6283052", "0.61960155", "0.60910517", "0.6077063", "0.59944385", "0.59927064", "0.59886", "0.5981696", "0.5981696", "0.5947837", "0.58922833", "0.5887985", "0.5881792", "0.5875385", "0.58445835", "0.5828176", "0.58166265", "0.5806971",...
0.5264173
61
Lists the login names of all bots of a particular class name to the specified player in PM.
void listBots( String className, String messager ) { Iterator<ChildBot> i; ChildBot bot; String rawClassName = className.toLowerCase(); if( rawClassName.compareTo( "hubbot" ) == 0 ) { m_botAction.sendSmartPrivateMessage( messager, "There is only one true master, and that is me." ); } else if( getNumberOfBots( className ) == 0 ) { m_botAction.sendSmartPrivateMessage( messager, "No bots of that type." ); } else { m_botAction.sendSmartPrivateMessage( messager, className + ":" ); for( i = m_botStable.values().iterator(); i.hasNext(); ) { bot = i.next(); if( bot != null ) if( bot.getClassName().compareTo( className ) == 0 ) m_botAction.sendSmartPrivateMessage( messager, bot.getBot().getBotName() + " (in " + bot.getBot().getBotAction().getArenaName() + "), created by " + bot.getCreator()); } m_botAction.sendSmartPrivateMessage( messager, "End of list" ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showWaitingPlayerList(List<String> waitingPlayerUsernames);", "public void printAllPlayers(){\n for (Player player : players){\n player.printPlayerInfo();\n }\n }", "public void sendNameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tStrin...
[ "0.60973644", "0.5764923", "0.5752954", "0.5705262", "0.56926584", "0.5672428", "0.55967623", "0.55275327", "0.5496806", "0.5495307", "0.54756457", "0.5454306", "0.54287785", "0.5420627", "0.5394267", "0.5363511", "0.53344667", "0.53042245", "0.529522", "0.52925175", "0.52908...
0.580522
1
Increments the count of a particular class of bots with a specified value.
void addToBotCount( String className, int valueToAdd ) { Integer newBotCount; Integer oldBotCount; oldBotCount = m_botTypes.get( className ); if( oldBotCount != null ) { if( oldBotCount.intValue() + valueToAdd >= 0 ) { newBotCount = new Integer( oldBotCount.intValue() + valueToAdd ); m_botTypes.put( className, newBotCount ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getBotCount(String className) {\n Integer currentBotCount = m_botTypes.get( className.toLowerCase() );\n\n if( currentBotCount == null ) {\n currentBotCount = new Integer( 0 );\n m_botTypes.put( className.toLowerCase(), currentBotCount );\n }\n\n return cu...
[ "0.6256783", "0.59537345", "0.59445804", "0.58983797", "0.58927715", "0.5855795", "0.5849012", "0.58479583", "0.5845743", "0.5845345", "0.5844566", "0.5839629", "0.5827852", "0.58078927", "0.57339567", "0.57326394", "0.56919944", "0.5669051", "0.56599677", "0.5650567", "0.563...
0.7563123
0
Returns the total number of bots spawned and active from this core
int getTotalBotCount() { int t = 0; for (Integer i : m_botTypes.values()) t += i; return t; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getAgentsCount() {\n if (agentsBuilder_ == null) {\n return agents_.size();\n } else {\n return agentsBuilder_.getCount();\n }\n }", "public int getAgentsCount() {\n return agents_.size();\n }", "@Exported\n public int getNumberOfOnlineSlaves() {\n int c...
[ "0.65842646", "0.648257", "0.64650524", "0.6444905", "0.6439537", "0.63721806", "0.6233609", "0.6218681", "0.6184182", "0.6159715", "0.6149244", "0.6147055", "0.60686755", "0.6066953", "0.6053215", "0.60492396", "0.60489047", "0.60423553", "0.60024965", "0.5987081", "0.596878...
0.7336248
0
Returns the next free bot number of a class of bots, given the bot's settings.
int getFreeBotNumber( BotSettings botInfo ) { int i; String name; int maxBots; int result = -1; maxBots = botInfo.getInt( "Max Bots" ); for( i = 1; i <= maxBots && result == -1; i++ ) { name = botInfo.getString( "Name" + i ); if( m_botStable.get( name ) == null ) { result = i; } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getNumberOfBots( String className ) {\n Integer number = m_botTypes.get( className );\n\n if( number == null ) {\n return 0;\n } else {\n return number.intValue();\n }\n }", "int getBotCount(String className) {\n Integer currentBotCount...
[ "0.64191306", "0.62275165", "0.57148093", "0.56567293", "0.56036717", "0.55188245", "0.5437864", "0.5397426", "0.5324201", "0.5213197", "0.50960976", "0.50787735", "0.50586027", "0.5033041", "0.50085473", "0.5002748", "0.49774167", "0.49716356", "0.49657577", "0.4953406", "0....
0.76598173
0
Returns the count of bots that are spawned for the specified bot type (className)
int getBotCount(String className) { Integer currentBotCount = m_botTypes.get( className.toLowerCase() ); if( currentBotCount == null ) { currentBotCount = new Integer( 0 ); m_botTypes.put( className.toLowerCase(), currentBotCount ); } return currentBotCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getNumberOfBots( String className ) {\n Integer number = m_botTypes.get( className );\n\n if( number == null ) {\n return 0;\n } else {\n return number.intValue();\n }\n }", "int getTotalBotCount() {\n int t = 0;\n\n for (Integer i : ...
[ "0.792605", "0.60882455", "0.5625093", "0.5619367", "0.5554781", "0.5408492", "0.5384369", "0.5373985", "0.53650707", "0.53579855", "0.5339003", "0.53282505", "0.53256613", "0.5319775", "0.5315454", "0.5299278", "0.52971303", "0.5194875", "0.5161499", "0.5150685", "0.51089895...
0.7605613
1
Removes a bot with no information provided.
String removeBot( String name ) { try { return removeBot( name, "no longer running; removed from BotQueue stable" ); } catch ( NullPointerException e ) { return "nullbot"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeListener(BotListener l);", "String removeBot( String name, String msg ) {\n if( name == null )\n return \"had no name associated; no removal action taken\";\n\n ChildBot deadBot = m_botStable.remove( name );\n\n if( deadBot != null ) {\n try {\n ...
[ "0.60386765", "0.601302", "0.58126456", "0.57292116", "0.571181", "0.5692967", "0.54493976", "0.54415977", "0.5375141", "0.53221214", "0.5315133", "0.5255716", "0.5216033", "0.51543367", "0.51408005", "0.51398134", "0.5129534", "0.5120913", "0.50780666", "0.50341445", "0.5005...
0.6265092
0
Given the login name of a bot, removes it from the system.
String removeBot( String name, String msg ) { if( name == null ) return "had no name associated; no removal action taken"; ChildBot deadBot = m_botStable.remove( name ); if( deadBot != null ) { try { Session deadSesh = deadBot.getBot(); if( deadSesh != null ) { if( deadSesh.getBotAction() != null ) { deadSesh.getBotAction().cancelTasks(); } if( msg != null ) { if( !msg.equals("") ) { deadSesh.disconnect( msg ); } else { deadSesh.disconnect( "(empty DC message)" ); } } else { deadSesh.disconnect( "(null DC message)" ); } } // Decrement count for this type of bot addToBotCount( deadBot.getClassName(), (-1) ); deadBot = null; return "has disconnected normally"; } catch( NullPointerException e ) { Tools.printStackTrace(e); m_botAction.sendChatMessage( 1, name + " had a disconnection problem/was already DC'd (null pointer exception thrown)"); } } return "not found in bot stable (possibly already disconnected)"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void logout(){\n player.setName(\"(bot) \" + player.getName());\n botMode = true;\n System.out.println(\"bot made\");\n login = false;\n }", "String removeBot( String name ) {\n try {\n return removeBot( name, \"no longer running; removed from BotQueue sta...
[ "0.6842523", "0.6809979", "0.6189975", "0.60779524", "0.6049902", "0.60280037", "0.60093427", "0.59961104", "0.595608", "0.58985853", "0.5871943", "0.5827961", "0.5796051", "0.57878107", "0.5731672", "0.57255673", "0.57191086", "0.57152367", "0.5709245", "0.5700412", "0.56984...
0.647409
2
Removes all bots of a given type. For debug purposes, or the impatient.
void hardRemoveAllBotsOfType( String className, String initiator ) { String rawClassName = className.toLowerCase(); Integer numBots = m_botTypes.get( rawClassName ); LinkedList<String> names = new LinkedList<String>(); for( ChildBot c : m_botStable.values() ) if( c != null ) { if(c.getClassName().equals( rawClassName )) names.add( c.getBot().getBotName() ); } for( String name : names ) { removeBot( name, "!removetype by " + initiator ); m_botAction.sendChatMessage( 1, name + " logged off. (!removetype initiated.)" ); } if( numBots != null && numBots.intValue() != 0 ) m_botTypes.put( rawClassName, new Integer(0) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void shutdownAllBots() {\n LinkedList<String> names = new LinkedList<String>();\n\n for( ChildBot c : m_botStable.values() ) {\n if( c != null ) {\n names.add( c.getBot().getBotName() );\n }\n }\n\n for( String name : names ) {\n removeBot...
[ "0.66647846", "0.563157", "0.55758256", "0.549912", "0.54369503", "0.52673686", "0.5255099", "0.5249097", "0.5240985", "0.5236156", "0.52330387", "0.5148012", "0.5112498", "0.5084305", "0.5082743", "0.50632787", "0.50628364", "0.501771", "0.5014742", "0.5009805", "0.50091", ...
0.71044636
0
Shuts down (removes) all bots.
void shutdownAllBots() { LinkedList<String> names = new LinkedList<String>(); for( ChildBot c : m_botStable.values() ) { if( c != null ) { names.add( c.getBot().getBotName() ); } } for( String name : names ) { removeBot( name, "core shutdown" ); m_botAction.sendChatMessage( 1, name + " logged off. (Core shutdown.)" ); } m_botTypes.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cleanToAll() {\n\t\tfor(ClientThread player: players) {\n\t\t\tplayer.send(new Package(\"CLEAN\",null));\n\t\t}\n\t}", "public final void stopAll() {\n for (BotTaskInterface bt : TASKS) {\n LOG.info(\"Stoping BotTask {}\", bt.getName());\n bt.stop();\n }\n E...
[ "0.65954435", "0.6505667", "0.63876814", "0.63800967", "0.6279772", "0.6270437", "0.6223515", "0.62069666", "0.61049294", "0.6099938", "0.6063899", "0.60287386", "0.60021156", "0.59954333", "0.5960201", "0.5930068", "0.5919716", "0.59098226", "0.58953744", "0.58864975", "0.58...
0.8182887
0
Shuts down (removes) all idle bots.
boolean shutdownIdleBots() { boolean allBotsIdle = true; LinkedList<String> names = new LinkedList<String>(); for( ChildBot c : m_botStable.values() ) { if( c != null ) { if( c.getBot().getSubspaceBot().isIdle() ) names.add( c.getBot().getBotName() ); else allBotsIdle = false; } } for( String name : names ) { removeBot( name, "idle bot shutdown" ); m_botAction.sendChatMessage( 1, name + " logged off. (Idle bot shutdown.)" ); } return allBotsIdle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void shutdownAllBots() {\n LinkedList<String> names = new LinkedList<String>();\n\n for( ChildBot c : m_botStable.values() ) {\n if( c != null ) {\n names.add( c.getBot().getBotName() );\n }\n }\n\n for( String name : names ) {\n removeBot...
[ "0.7806945", "0.67678726", "0.64651686", "0.63249767", "0.6322893", "0.6264588", "0.6200217", "0.6120975", "0.59848946", "0.5966605", "0.5948636", "0.5912749", "0.5898507", "0.5873065", "0.58707947", "0.5866721", "0.58559567", "0.5851815", "0.5831936", "0.5821976", "0.5813952...
0.7169081
1