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
/ generateRangeURL Input: Instance ID of the Data Center startRange starting range (targetID) endRange ending range (targetID) Returns: URL which can be used to retrieve the details of all targets in the range from the data center instance Additional info: the details of the last 10,000 targets are cached in the database instance
private String generateRangeURL(Integer instanceID, Integer startRange, Integer endRange) { return "http://" + databaseInstances[instanceID] + "/range?start_range=" + Integer.toString(startRange) + "&end_range=" + Integer.toString(endRange); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getRange()\n\t{\n\t\tint start = randInt(0, 9);\n\t\tint end = randInt(0, 9);\t\t\n\t\tint startNode = start<=end?start:end;\n\t\tint endNode = start>end?start:end;\n\t\tSystem.out.println(\"Start : \"+startNode+\" End : \"+endNode);\n\t}", "private String generateURL(Integer instanceID, String key) ...
[ "0.5516599", "0.5477237", "0.5441002", "0.5312919", "0.5297739", "0.5290284", "0.5273656", "0.5250896", "0.52021384", "0.5087766", "0.50804836", "0.5076426", "0.5041433", "0.5027427", "0.50074774", "0.4982546", "0.49763733", "0.49494335", "0.49341545", "0.49011123", "0.490079...
0.8428174
0
/ processRequest calls the retrieveDetails function with the targetID
private void processRequest(String targetID, HttpServerRequest req) throws Exception { String result = retrieveDetails(targetID); if(result != null) req.response().end(result); else req.response().end("No resopnse received"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processRequestRange(String targetID, HttpServerRequest req) throws Exception {\n\t\tString result = retrieveDetails(targetID);\n\t\tif(result != null)\n\t\t\treq.response().end(result);\n\t\telse\n\t\t\treq.response().end(\"No resopnse received\");\n\t}", "RequestDetail getRequestDetail(String reque...
[ "0.64813447", "0.6210238", "0.5954467", "0.58514464", "0.5678795", "0.5585127", "0.55485505", "0.5519924", "0.5509859", "0.54636854", "0.5438041", "0.53597003", "0.5308958", "0.5233769", "0.51931703", "0.5142915", "0.5137236", "0.5129423", "0.51143575", "0.51057935", "0.50878...
0.7494852
0
/ processRequest calls the retrieveDetails function with the targetID
private void processRequestRange(String targetID, HttpServerRequest req) throws Exception { String result = retrieveDetails(targetID); if(result != null) req.response().end(result); else req.response().end("No resopnse received"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processRequest(String targetID, HttpServerRequest req) throws Exception {\n\t\tString result = retrieveDetails(targetID);\n\t\tif(result != null)\n\t\t\treq.response().end(result);\t\n\t\telse\n\t\t\treq.response().end(\"No resopnse received\");\n\t}", "RequestDetail getRequestDetail(String requestI...
[ "0.7494852", "0.6210238", "0.5954467", "0.58514464", "0.5678795", "0.5585127", "0.55485505", "0.5519924", "0.5509859", "0.54636854", "0.5438041", "0.53597003", "0.5308958", "0.5233769", "0.51931703", "0.5142915", "0.5137236", "0.5129423", "0.51143575", "0.51057935", "0.508789...
0.64813447
1
/ start starts the server
public void start() { init(); if(!checkBackend()){ vertx.createHttpServer().requestHandler(new Handler<HttpServerRequest>() { public void handle(HttpServerRequest req) { String query_type = req.path(); req.response().headers().set("Content-Type", "text/plain"); if(query_type.equals("/target")){ String key = req.params().get("targetID"); try { processRequest(key,req); } catch (Exception e) { e.printStackTrace(); } } else { String key = "1"; try { processRequestRange(key,req); } catch (Exception e) { e.printStackTrace(); } } } }).listen(80); } else { System.out.println("Please make sure that both your DCI are up and running"); System.exit(0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startServer() {\n server.start();\n }", "public void start() {\n System.err.println(\"Server will listen on \" + server.getAddress());\n server.start();\n }", "public void startServer() {\n URLClassLoader loader = createClasspath(opts);\n X_Process.runInClassloade...
[ "0.8236902", "0.8140875", "0.7955583", "0.78855824", "0.77104306", "0.76807594", "0.75656575", "0.74897015", "0.7470355", "0.74228793", "0.73692364", "0.73079437", "0.7285652", "0.725726", "0.7237218", "0.71233374", "0.7119357", "0.70979005", "0.7096115", "0.70844036", "0.707...
0.70328444
24
Creates inventory list ActionPage
public InventoryList() { super("Inventory List"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void open()\n {\n if (totalPages == 1) {\n Inventory inventory = Bukkit.createInventory(null, calcSize(contents.size()), title);\n int slot = 0;\n for (ItemStack item : contents)\n {\n inventory.setItem(slot++, item);\n ...
[ "0.61611086", "0.59754837", "0.58649784", "0.57118154", "0.57014376", "0.56532353", "0.56223476", "0.55656105", "0.5532279", "0.5490786", "0.5483672", "0.54825354", "0.547241", "0.53718823", "0.5364771", "0.53580076", "0.53453165", "0.5344859", "0.5344031", "0.5341725", "0.53...
0.60068196
1
Inheritance'da data turu olarak class ismi kullanimi Bir class'da obje uretirken data turu olarak class'in kendisini veya parent(lar)ini kullanabiliriz. Olusturdugumuz obje ile variable kullanmamiz gerekirse, hangi degeri alacagini anlamak icin once Data turu olan class'a gideriz orada aradigimiz variable varsa kullaniriz, yoksa parent(lar)ina bakariz, yukari dogru giderken ilk buldugumuz degeri kullaniriz
public static void main(String[] args) { Formen fr1=new Formen(); // fr1 objesini kullanarak hangi class'larin variable'lari gorebilirim fr1.sorumluOldBolum="Marangozhane"; fr1.maas=10000; System.out.println(fr1.isim + " " + fr1.sorumluOldBolum+ " " + fr1.maas); // Emrullah Marangozhane 10000 Isci fr2=new Formen(); // Data turu olarak Isci secildigi icin fr2.bolum="Kaynak atolyesi"; System.out.println(fr2.isim + " " + fr2.bolum+ " " + fr2.maas); // Mesut Kaynak atolyesi 5000 Personel fr3=new Formen(); System.out.println(fr3.isim); // Emre }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n// subClass[] classes = new subClass[1];\n// System.out.println(superClass.value);\n// System.out.println(subClass.value);\n subClass s = new subClass();\n s.lala();\n// superClass p = s;\n// System.out.println(s==p);\n// ...
[ "0.5818728", "0.5661976", "0.5648935", "0.55788314", "0.55303323", "0.5485945", "0.54833245", "0.5460548", "0.5436008", "0.54163337", "0.5398448", "0.539367", "0.53507495", "0.53430045", "0.53160816", "0.5305262", "0.5293073", "0.5287589", "0.52759016", "0.5260863", "0.525622...
0.0
-1
define which file View it connects
Individual createIndividual();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface FileView {\n\n /**\n * 设置标题\n * @param preText 前标题\n * @param nowText 现标题\n */\n void setTitle(String preText, String nowText);\n\n /**\n * 给列表设置适配器\n * @param adapter 适配器\n */\n void setAdapter(DocumentFileAdapter adapter);\n\n /**\n * 获取适配器\n * ...
[ "0.6749045", "0.62781495", "0.6185447", "0.6185447", "0.61815673", "0.61109865", "0.60923547", "0.6064689", "0.60560083", "0.60503227", "0.60503227", "0.6028298", "0.5997347", "0.59966916", "0.5961132", "0.5910298", "0.58937615", "0.5878092", "0.58315486", "0.5795221", "0.575...
0.0
-1
Stores reference to the locator
@Override public void setDocumentLocator(Locator locator) { this.locator = locator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLocatorCurrent(String locatorCurrent) {\n\t\t\r\n\t}", "@Override\n public void setDocumentLocator(Locator locator) {\n mLocator = locator;\n }", "public void setDocumentLocator(Locator locator) {\n _locator = locator;\n }", "public Locator getLocator() {\n/* 155 */ return t...
[ "0.64177454", "0.63231105", "0.62911934", "0.62708664", "0.62224334", "0.61331075", "0.6094367", "0.6057534", "0.6045174", "0.59329563", "0.5926464", "0.58114", "0.579222", "0.579222", "0.5782978", "0.5565061", "0.5481701", "0.5432543", "0.5423356", "0.5400668", "0.5319951", ...
0.6126304
6
Character data handler Text content may be delivered within multiple events, not just one
@Override public void characters( char[] chars, int start, int length ) throws SAXException { String s = new String(chars, start, length).trim(); if (s.length() > 0) { buffer.append(s); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void handleCharacterData() {\n\t\tif (!buffer.isEmpty()) {\n\t\t\tbyte[] data = buffer.toArray();\n\t\t\tbuffer.clear();\n\t\t\thandler.handleString(new String(data));\n\t\t}\n\t}", "void onCharacter(Terminal terminal, char data);", "public void dispatchCharactersEvents(ContentHandler ch) throws SAXExc...
[ "0.7437922", "0.680807", "0.65631604", "0.6427471", "0.63837945", "0.6252196", "0.62050736", "0.61927307", "0.61534685", "0.61454016", "0.6103222", "0.6101527", "0.60504013", "0.6037382", "0.6022723", "0.59605545", "0.59478986", "0.5937961", "0.5918167", "0.58833057", "0.5881...
0.0
-1
Namespace declaration beginning handler
@Override public void startPrefixMapping( String prefix, String uri ) throws SAXException { // ... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void start_ns(Object parser, String prefix, String uri) {\n Array.array_push(this.ns_decls, new Array<Object>(new ArrayEntry<Object>(prefix), new ArrayEntry<Object>(uri)));\r\n }", "void declarePrefix(String prefix, String namespace);", "@Override\n\tpublic void namespace() {\n\t\t\n\t}", "p...
[ "0.6988053", "0.68727237", "0.6829428", "0.676507", "0.67320794", "0.6436777", "0.63859385", "0.6358939", "0.63231003", "0.6216725", "0.62088436", "0.6181238", "0.61573917", "0.60833985", "0.60687876", "0.60377854", "0.60058796", "0.5965146", "0.5965146", "0.5955164", "0.5949...
0.60457355
15
Namespace declaration end handler
@Override public void endPrefixMapping(String prefix) throws SAXException { // ... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void end_ns(Object parser, String prefix) {\n }", "@Override\n\tpublic void namespace() {\n\t\t\n\t}", "public abstract void endElement( String namespaceURI, String sName, String qName );", "private void handleNamespaceDeclaration() throws IOException {\r\n if (this.tempMapping != null) {\r\n ...
[ "0.7775529", "0.6951016", "0.6914183", "0.68888396", "0.670573", "0.6596569", "0.65955734", "0.65955734", "0.6591384", "0.6566755", "0.65552896", "0.65102357", "0.6484893", "0.64578164", "0.6411796", "0.63605535", "0.62877876", "0.6266254", "0.6258617", "0.6179189", "0.609660...
0.6504659
12
Ignorable whitespace characters handler
@Override public void ignorableWhitespace( char[] chars, int start, int length ) throws SAXException { // ... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ignorableWhitespace(char[] ch, int start, int length) { }", "@Override\r\n public void ignorableWhitespace(char[] ch, int start, int length)\r\n throws SAXException {\n }", "@Override\n\t\tpublic void ignorableWhitespace(char[] ch, int start, int length)\n\t\t\t\tthrows SAXException {\...
[ "0.7785353", "0.7630658", "0.7618639", "0.75434303", "0.75434303", "0.7330418", "0.72767407", "0.7255472", "0.7220993", "0.7001952", "0.6844234", "0.68300176", "0.6775519", "0.6763478", "0.67536473", "0.67518586", "0.67055154", "0.659149", "0.6510401", "0.64774257", "0.645981...
0.77202684
1
The clientside stub for the RPC service.
@RemoteServiceRelativePath("greet") public interface GreetingService extends RemoteService { Boolean greetServer(Osoba person) throws IllegalArgumentException; List<Osoba> getOsoba() throws IllegalArgumentException; List<Osoba> fetchPage(int start, int length) throws IllegalArgumentException; Long fetchCount() throws IllegalArgumentException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Stub createStub();", "IMember getServerStub();", "public interface RpcClient {\r\n\r\n\t/**\r\n\t * Initializes this RpcClient\r\n\t */\r\n\tpublic void initialize();\r\n\t\r\n\t/**\r\n\t * Sends the specified object and waits for a response message (or) the specified timeout to occur. Keeps the connection ope...
[ "0.684073", "0.6785052", "0.6462027", "0.64237046", "0.6226662", "0.6219779", "0.6145802", "0.61184007", "0.6094014", "0.6092081", "0.6046717", "0.6046717", "0.6046717", "0.60165495", "0.5962826", "0.5927603", "0.5925951", "0.5909489", "0.5864903", "0.5864903", "0.5864903", ...
0.5828692
26
(0.65ms, 52.5MB) > (3.26ms, 52MB)
public static int[] solution(String[] genres, int[] plays) { int[] answer = {}; Map<String, Integer> total = new HashMap<>(); for (int i = 0; i < genres.length; i++) { total.put(genres[i], total.getOrDefault((genres[i]), 0) + plays[i]); } List<String> list = new ArrayList<>(total.keySet()); Collections.sort(list, (o1, o2) -> total.get(o2).compareTo(total.get(o1))); List<Integer> answerList = new ArrayList<>(); for (String str : list) { int[] play = new int[2]; int maxIdx = -1; int secondIdx = -1; int maxValue = 0; int secondValue = 0; for (int i = 0; i < plays.length; i++) { if (genres[i].equals(str)) { if (secondValue < plays[i] && plays[i] <= maxValue) { secondValue = plays[i]; secondIdx = i; } else if (maxValue < plays[i]) { secondValue = maxValue; secondIdx = maxIdx; maxIdx = i; maxValue = plays[i]; } } } answerList.add(maxIdx); if(secondValue != 0) answerList.add(secondIdx); } answer = new int[answerList.size()]; int index = 0; for(int i : answerList) answer[index++] = i; return answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testPerformance() {\n \t}", "private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}", "private static void testLongLoop() {\n test(1000 * 1000 * 1000);\n //uncomment the following line to see the hand-written cache performance\n //testManual( 10...
[ "0.6023085", "0.5982408", "0.5950374", "0.5950374", "0.5889459", "0.5876667", "0.58704734", "0.57830584", "0.5782474", "0.57475656", "0.57355666", "0.5733644", "0.5714246", "0.5657022", "0.5594215", "0.5560327", "0.5552504", "0.5518406", "0.55035686", "0.55013317", "0.5497115...
0.0
-1
/ JADX WARNING: Removed duplicated region for block: B:73:0x0188 / JADX WARNING: Removed duplicated region for block: B:76:0x0193 / JADX WARNING: Removed duplicated region for block: B:79:0x019e
public static java.util.Map<java.lang.String, java.lang.String> getImeiAndMeid() { /* java.lang.String r0 = "PhoneInfoUtil" java.util.HashMap r1 = new java.util.HashMap r1.<init>() r2 = 0 java.lang.StringBuilder r3 = new java.lang.StringBuilder // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r3.<init>() // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.String r4 = "android api: " r3.append(r4) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } int r4 = android.os.Build.VERSION.SDK_INT // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r3.append(r4) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.String r4 = "\n" r3.append(r4) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.String r3 = r3.toString() // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r3) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } android.content.Context r3 = com.tencent.p605ep.commonbase.api.AppContext.getAppContext() // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.String r4 = "phone" java.lang.Object r3 = r3.getSystemService(r4) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } android.telephony.TelephonyManager r3 = (android.telephony.TelephonyManager) r3 // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } int r4 = android.os.Build.VERSION.SDK_INT // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r5 = 21 if (r4 >= r5) goto L_0x0039 r4 = r2 r8 = r4 goto L_0x0182 L_0x0039: int r4 = android.os.Build.VERSION.SDK_INT // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r5 = 26 r6 = 0 r7 = 1 if (r4 >= r5) goto L_0x00b3 java.lang.String r4 = r3.getDeviceId(r6) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } boolean r5 = android.text.TextUtils.isEmpty(r4) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r6 = 14 if (r5 != 0) goto L_0x0059 int r5 = r4.length() // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } if (r5 != r6) goto L_0x0056 r5 = r2 r8 = r4 goto L_0x005b L_0x0056: r8 = r2 r5 = r4 goto L_0x005b L_0x0059: r5 = r2 r8 = r5 L_0x005b: java.lang.StringBuilder r9 = new java.lang.StringBuilder // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } r9.<init>() // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } java.lang.String r10 = "\ngetDeviceId(0): " r9.append(r10) // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } r9.append(r4) // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } java.lang.String r4 = r9.toString() // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r4) // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } java.lang.String r3 = r3.getDeviceId(r7) // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } boolean r4 = android.text.TextUtils.isEmpty(r3) // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } if (r4 != 0) goto L_0x0084 int r4 = r3.length() // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } if (r4 != r6) goto L_0x0082 r4 = r2 r8 = r3 goto L_0x0085 L_0x0082: r4 = r3 goto L_0x0085 L_0x0084: r4 = r2 L_0x0085: java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch:{ SecurityException -> 0x00a7, all -> 0x00a5 } r6.<init>() // Catch:{ SecurityException -> 0x00a7, all -> 0x00a5 } java.lang.String r7 = "\ngetDeviceId(1): " r6.append(r7) // Catch:{ SecurityException -> 0x00a7, all -> 0x00a5 } r6.append(r3) // Catch:{ SecurityException -> 0x00a7, all -> 0x00a5 } java.lang.String r3 = r6.toString() // Catch:{ SecurityException -> 0x00a7, all -> 0x00a5 } com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r3) // Catch:{ SecurityException -> 0x00a7, all -> 0x00a5 } boolean r3 = android.text.TextUtils.equals(r5, r4) // Catch:{ SecurityException -> 0x00a7, all -> 0x00a5 } if (r3 == 0) goto L_0x00a2 r4 = r8 goto L_0x0146 L_0x00a2: r2 = r5 goto L_0x0182 L_0x00a5: r3 = move-exception goto L_0x00ab L_0x00a7: r3 = move-exception goto L_0x00b0 L_0x00a9: r3 = move-exception r4 = r2 L_0x00ab: r2 = r5 goto L_0x0173 L_0x00ae: r3 = move-exception r4 = r2 L_0x00b0: r2 = r5 goto L_0x017f L_0x00b3: java.lang.Class r4 = r3.getClass() // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.String r5 = "getMeid" java.lang.Class[] r8 = new java.lang.Class[r7] // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.Class r9 = java.lang.Integer.TYPE // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r8[r6] = r9 // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.reflect.Method r4 = r4.getMethod(r5, r8) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r4.setAccessible(r7) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.Object[] r5 = new java.lang.Object[r7] // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.Integer r8 = java.lang.Integer.valueOf(r6) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r5[r6] = r8 // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.Object r4 = r4.invoke(r3, r5) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.String r4 = (java.lang.String) r4 // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } r5.<init>() // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.String r8 = "\napi 26+, meid: " r5.append(r8) // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } r5.append(r4) // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.String r5 = r5.toString() // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r5) // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.Class r5 = r3.getClass() // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.String r8 = "getImei" java.lang.Class[] r9 = new java.lang.Class[r7] // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.Class r10 = java.lang.Integer.TYPE // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } r9[r6] = r10 // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.reflect.Method r5 = r5.getMethod(r8, r9) // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } r5.setAccessible(r7) // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.Object[] r8 = new java.lang.Object[r7] // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.Integer r9 = java.lang.Integer.valueOf(r6) // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } r8[r6] = r9 // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.Object r8 = r5.invoke(r3, r8) // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.String r8 = (java.lang.String) r8 // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.Object[] r9 = new java.lang.Object[r7] // Catch:{ SecurityException -> 0x0162, all -> 0x015c } java.lang.Integer r7 = java.lang.Integer.valueOf(r7) // Catch:{ SecurityException -> 0x0162, all -> 0x015c } r9[r6] = r7 // Catch:{ SecurityException -> 0x0162, all -> 0x015c } java.lang.Object r3 = r5.invoke(r3, r9) // Catch:{ SecurityException -> 0x0162, all -> 0x015c } java.lang.String r3 = (java.lang.String) r3 // Catch:{ SecurityException -> 0x0162, all -> 0x015c } java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ SecurityException -> 0x0155, all -> 0x014e } r5.<init>() // Catch:{ SecurityException -> 0x0155, all -> 0x014e } java.lang.String r6 = "\napi 26+, imei1: " r5.append(r6) // Catch:{ SecurityException -> 0x0155, all -> 0x014e } r5.append(r8) // Catch:{ SecurityException -> 0x0155, all -> 0x014e } java.lang.String r5 = r5.toString() // Catch:{ SecurityException -> 0x0155, all -> 0x014e } com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r5) // Catch:{ SecurityException -> 0x0155, all -> 0x014e } java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ SecurityException -> 0x0155, all -> 0x014e } r5.<init>() // Catch:{ SecurityException -> 0x0155, all -> 0x014e } java.lang.String r6 = "\napi 26+, imei2: " r5.append(r6) // Catch:{ SecurityException -> 0x0155, all -> 0x014e } r5.append(r3) // Catch:{ SecurityException -> 0x0155, all -> 0x014e } java.lang.String r5 = r5.toString() // Catch:{ SecurityException -> 0x0155, all -> 0x014e } com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r5) // Catch:{ SecurityException -> 0x0155, all -> 0x014e } boolean r5 = android.text.TextUtils.equals(r8, r3) // Catch:{ SecurityException -> 0x0155, all -> 0x014e } if (r5 == 0) goto L_0x014a r5 = r8 L_0x0146: r8 = r4 r4 = r2 goto L_0x00a2 L_0x014a: r2 = r8 r8 = r4 r4 = r3 goto L_0x0182 L_0x014e: r2 = move-exception r11 = r3 r3 = r2 r2 = r8 r8 = r4 r4 = r11 goto L_0x0173 L_0x0155: r2 = move-exception r11 = r3 r3 = r2 r2 = r8 r8 = r4 r4 = r11 goto L_0x017f L_0x015c: r3 = move-exception r11 = r4 r4 = r2 r2 = r8 r8 = r11 goto L_0x0173 L_0x0162: r3 = move-exception r11 = r4 r4 = r2 r2 = r8 r8 = r11 goto L_0x017f L_0x0168: r3 = move-exception r8 = r4 r4 = r2 goto L_0x0173 L_0x016c: r3 = move-exception r8 = r4 r4 = r2 goto L_0x017f L_0x0170: r3 = move-exception r4 = r2 r8 = r4 L_0x0173: r3.printStackTrace() java.lang.String r5 = "getImeiAndMeid" com.tencent.p605ep.commonbase.api.Log.m31488w(r0, r5, r3) goto L_0x0182 L_0x017c: r3 = move-exception r4 = r2 r8 = r4 L_0x017f: r3.printStackTrace() L_0x0182: boolean r3 = android.text.TextUtils.isEmpty(r8) if (r3 != 0) goto L_0x018d java.lang.String r3 = "meid" r1.put(r3, r8) L_0x018d: boolean r3 = android.text.TextUtils.isEmpty(r2) if (r3 != 0) goto L_0x0198 java.lang.String r3 = "imei1" r1.put(r3, r2) L_0x0198: boolean r3 = android.text.TextUtils.isEmpty(r4) if (r3 != 0) goto L_0x01a3 java.lang.String r3 = "imei2" r1.put(r3, r4) L_0x01a3: java.lang.StringBuilder r3 = new java.lang.StringBuilder r3.<init>() java.lang.String r5 = "meid: " r3.append(r5) r3.append(r8) java.lang.String r3 = r3.toString() com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r3) java.lang.StringBuilder r3 = new java.lang.StringBuilder r3.<init>() java.lang.String r5 = "imei1: " r3.append(r5) r3.append(r2) java.lang.String r2 = r3.toString() com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r2) java.lang.StringBuilder r2 = new java.lang.StringBuilder r2.<init>() java.lang.String r3 = "imei2: " r2.append(r3) r2.append(r4) java.lang.String r2 = r2.toString() com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r2) return r1 */ throw new UnsupportedOperationException("Method not decompiled: com.tencent.p605ep.commonbase.utils.PhoneInfoUtil.getImeiAndMeid():java.util.Map"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test (timeout=180000)\n public void testDegenerateRegions() throws Exception {\n TableName table = TableName.valueOf(\"tableDegenerateRegions\");\n try {\n setupTable(table);\n assertNoErrors(doFsck(conf,false));\n assertEquals(ROWKEYS.length, countRows());\n\n // Now let's mess it up, ...
[ "0.60376674", "0.588679", "0.58575296", "0.5767759", "0.5725728", "0.5559633", "0.5535541", "0.5514388", "0.5461028", "0.54601413", "0.5419855", "0.5357236", "0.5352923", "0.5319562", "0.5308847", "0.5292986", "0.5278772", "0.5268306", "0.52547765", "0.52541333", "0.52282286"...
0.0
-1
TODO: Add checks on input validity (see below) Note: so far assumes that the given level is the one to which the field belongs (which should be true but isn't guaranteed (?))
public String setField(BooleanFieldEditor field, Composite parent) { String level = field.getPreferencesLevel(); // If the level is "project" and project == null then just set // the field here (as a special case). // Note: without some project selected the field should not be // editable. Field will have to be set back to editable when // (and probably where) a project is selected. We might take // care of this elsewhere but, until that is verified, keep // doing it here. // Note also: loadWithInheritance (which calls setField(..)) // won't know that project == null and will try to set the field // from some higher level if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) { if (parent == null) { System.err.println("PreferencesUtilities.setField(): parent is null"); } if (parent.isDisposed()) { System.err.println("PreferencesUtilities.setField(): parent is disposed"); } // Don't have a null boolean value to set field to, // but would like to show it as "cleared" somehow // (presumably "false" shows as empty field.setFieldValueFromOutside(false); if (!parent.isDisposed()) { field.getChangeControl().setEnabled(false); field.getChangeControl().setBackground(colorBluish); } // Pretend that this was set at the project level? // (It was certainly cleared at that level) return IPreferencesService.PROJECT_LEVEL; } // Otherwise, we have a legitimate level, so set normally String levelFromWhichSet = field.loadWithInheritance(); // Note: You can evidently load a field even when its control // is disposed. In that case (evidently) you can change the // text in the field but not the background color. if (parent != null && !parent.isDisposed()) { if (level != null && level.equals(levelFromWhichSet)) { field.getChangeControl().setBackground(colorWhite); } else if (level != null && field.getChangeControl().getEnabled()) { field.getChangeControl().setBackground(colorBluish); } } else { // If composite.isDisposed(), then both field.getTextControl(composite) // and field.getTextControl() will return null; if needed, a text control // must be obtained from somewhere else--but I have no idea where that // might be. Not sure why composite.isDisposed() here in the first place, // especially considering that the field can be set } return levelFromWhichSet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level){\n\t\tthis.level = level;\n\t}", "public void setLevel(String level) {\n this.level = level == null ? null : level....
[ "0.6141118", "0.6141118", "0.6063639", "0.5997443", "0.5997443", "0.5997443", "0.5997443", "0.5974696", "0.587552", "0.58468944", "0.58358794", "0.58099204", "0.5779636", "0.5779636", "0.5771478", "0.5771478", "0.5771478", "0.5771478", "0.5771478", "0.5746632", "0.57180554", ...
0.0
-1
TODO: Add checks on input validity (see below) Note: so far assumes that the given level is the one to which the field belongs (which should be true but isn't guaranteed (?))
public String setField(ComboFieldEditor field, Composite parent) { String level = field.getPreferencesLevel(); // If the level is "project" and project == null then just set // the field here (as a special case). if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) { if (parent.isDisposed()) { System.err.println("PreferencesUtilities.setField(): composite is disposed"); } // Updating a radio field with a null value should // cause the first button to be selected field.setFieldValueFromOutside(null); if (!parent.isDisposed()) { // Assume that editability on the project level is set // appropriately by a project-selection listener //field.getTextControl(composite).setEditable(false); field.getComboBoxControl().setBackground(colorWhite); Control[] children = field.getComboBoxControl().getChildren(); if (children != null) { for (int i = 0; i < children.length; i++) { Button button = (Button) children[i]; button.setBackground(PreferencesUtilities.colorWhite); } } } // Pretend that this was set at the project level? // (It was certainly cleared at that level) return IPreferencesService.PROJECT_LEVEL; } // Otherwise, we have a legitimate level, so set normally String levelFromWhichSet = field.loadWithInheritance(); // Note: You can evidently load a field even when it's control // is disposed. In that case you can (evidently) change the // text in the field but not the background color. if (!parent.isDisposed()) { // Needed if color is set in loadWithInheritance()? // (Should the color be set in loadWithInheritance()? // if (field.isInherited()) { // field.getComboBoxControl(composite).setBackground(colorBluish); // } else { // field.getComboBoxControl(composite).setBackground(colorWhite); // } } else { // If composite.isDisposed(), then both field.getTextControl(composite) // and field.getTextControl() will return null; if needed, a text control // must be obtained from somewhere else--but I have no idea where that // might be. Not sure why composite.isDisposed() here in the first place, // especially considering that the field can be set } return levelFromWhichSet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level){\n\t\tthis.level = level;\n\t}", "public void setLevel(String level) {\n this.level = level == null ? null : level....
[ "0.61418784", "0.61418784", "0.6063864", "0.59983546", "0.59983546", "0.59983546", "0.59983546", "0.5976141", "0.5874746", "0.5848736", "0.5834868", "0.5810041", "0.5780163", "0.5780163", "0.57720494", "0.57720494", "0.57720494", "0.57720494", "0.57720494", "0.5747575", "0.57...
0.0
-1
TODO: Add checks on input validity (see below) Note: so far assumes that the given level is the one to which the field belongs (which should be true but isn't guaranteed (?))
public String setField(RadioGroupFieldEditor field, Composite composite) { String level = field.getPreferencesLevel(); // If the level is "project" and project == null then just set // the field here (as a special case). if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) { if (composite.isDisposed()) { System.err.println("PreferencesUtilities.setField(): composite is disposed"); } // Updating a radio field with a null value should // cause the first button to be selected field.setFieldValueFromOutside(null); if (!composite.isDisposed()) { // Assume that editability on the project level is set // appropriately by a project-selection listener //field.getTextControl(composite).setEditable(false); field.getRadioBoxControl().setBackground(colorBluish); Button[] radioButtons = field.getRadioButtons(); if (radioButtons != null) { for (int i = 0; i < radioButtons.length; i++) { Button button = (Button) radioButtons[i]; button.setBackground(colorBluish); } } } // Pretend that this was set at the project level? // (It was certainly cleared at that level) return IPreferencesService.PROJECT_LEVEL; } // Otherwise, we have a legitimate level, so set normally String levelFromWhichSet = field.loadWithInheritance(); // Note: You can evidently load a field even when it's control // is disposed. In that case (evidently) you can change the // text in the field but not the background color. if (!composite.isDisposed()) { // Needed if color is set in loadWithInheritance()? // (Should the color be set in loadWithInheritance()? // if (field.isInherited()) { // field.getRadioBoxControl(composite).setBackground(colorBluish); // } else { // field.getRadioBoxControl(composite).setBackground(colorWhite); // } } else { // If composite.isDisposed(), then both field.getTextControl(composite) // and field.getTextControl() will return null; if needed, a text control // must be obtained from somewhere else--but I have no idea where that // might be. Not sure why composite.isDisposed() here in the first place, // especially considering that the field can be set } return levelFromWhichSet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level){\n\t\tthis.level = level;\n\t}", "public void setLevel(String level) {\n this.level = level == null ? null : level....
[ "0.6141255", "0.6141255", "0.6063384", "0.59978324", "0.59978324", "0.59978324", "0.59978324", "0.5974642", "0.58750933", "0.584789", "0.5834927", "0.58100253", "0.5779621", "0.5779621", "0.577152", "0.577152", "0.577152", "0.577152", "0.577152", "0.5746758", "0.5717426", "...
0.0
-1
TODO: Add checks on input validity (see below) Note: so far assumes that the given level is the one to which the field belongs (which should be true but isn't guaranteed (?))
public String setField(StringFieldEditor field, Composite composite) { String level = field.getPreferencesLevel(); // If the level is "project" and project == null then just set // the field here (as a special case). if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) { if (composite.isDisposed()) { System.err.println("PreferencesUtilities.setField(): composite is disposed"); } field.setFieldValueFromOutside(null); if (!composite.isDisposed()) { // Assume that editability on the project level is set // appropriately by a project-selection listener //field.getTextControl(composite).setEditable(false); field.getTextControl(composite).setBackground(colorBluish); } // Pretend that this was set at the project level? // (It was certainly cleared at that level) return IPreferencesService.PROJECT_LEVEL; } // Otherwise, we have a legitimate level, so set normally String levelFromWhichSet = field.loadWithInheritance(); // Note: You can evidently load a field even when it's control // is disposed. In that case (evidently) you can change the // text in the field but not the background color. if (!composite.isDisposed()) { /* if (level != null && level.equals(levelFromWhichSet)) { field.getTextControl(composite).setBackground(colorWhite); } else if (level != null && field.getTextControl(composite).getEditable()) { field.getTextControl(composite).setBackground(colorBluish); } */ if (field.isInherited()) { field.getTextControl(composite).setBackground(colorBluish); } else { field.getTextControl(composite).setBackground(colorWhite); } } else { // If composite.isDisposed(), then both field.getTextControl(composite) // and field.getTextControl() will return null; if needed, a text control // must be obtained from somewhere else--but I have no idea where that // might be. Not sure why composite.isDisposed() here in the first place, // especially considering that the field can be set } return levelFromWhichSet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level){\n\t\tthis.level = level;\n\t}", "public void setLevel(String level) {\n this.level = level == null ? null : level....
[ "0.6143391", "0.6143391", "0.6065555", "0.5999067", "0.5999067", "0.5999067", "0.5999067", "0.5975304", "0.58767766", "0.5848699", "0.5837367", "0.5811583", "0.5781813", "0.5781813", "0.5773865", "0.5773865", "0.5773865", "0.5773865", "0.5773865", "0.5748354", "0.57204026", ...
0.0
-1
TODO: Add checks on input validity (see below) Note: so far assumes that the given level is the one to which the field belongs (which should be true but isn't guaranteed (?))
public String setField(FontFieldEditor field, Composite parent) { String level = field.getPreferencesLevel(); // If the level is "project" and project == null then just set // the field here (as a special case). // Note: without some project selected the field should not be // editable. Field will have to be set back to editable when // (and probably where) a project is selected. We might take // care of this elsewhere but, until that is verified, keep // doing it here. // Note also: loadWithInheritance (which calls setField(..)) // won't know that project == null and will try to set the field // from some higher level if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) { if (parent == null) { System.err.println("PreferencesUtilities.setField(): parent is null"); } if (parent.isDisposed()) { System.err.println("PreferencesUtilities.setField(): parent is disposed"); } field.setFieldValueFromOutside(null); if (!parent.isDisposed()) { field.getChangeControl().setEnabled(false); // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change... field.getChangeControl().setBackground(colorBluish); } // Pretend that this was set at the project level? // (It was certainly cleared at that level) return IPreferencesService.PROJECT_LEVEL; } // Otherwise, we have a legitimate level, so set normally String levelFromWhichSet = field.loadWithInheritance(); // Note: You can evidently load a field even when its control // is disposed. In that case (evidently) you can change the // text in the field but not the background color. if (parent != null && !parent.isDisposed()) { // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change... if (level != null && level.equals(levelFromWhichSet)) { field.getChangeControl().setBackground(colorWhite); } else if (level != null && field.getChangeControl().getEnabled()) { field.getChangeControl().setBackground(colorBluish); } } else { // If composite.isDisposed(), then both field.getTextControl(composite) // and field.getTextControl() will return null; if needed, a text control // must be obtained from somewhere else--but I have no idea where that // might be. Not sure why composite.isDisposed() here in the first place, // especially considering that the field can be set } return levelFromWhichSet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level){\n\t\tthis.level = level;\n\t}", "public void setLevel(String level) {\n this.level = level == null ? null : level....
[ "0.6141118", "0.6141118", "0.6063639", "0.5997443", "0.5997443", "0.5997443", "0.5997443", "0.5974696", "0.587552", "0.58468944", "0.58358794", "0.58099204", "0.5779636", "0.5779636", "0.5771478", "0.5771478", "0.5771478", "0.5771478", "0.5771478", "0.5746632", "0.57180554", ...
0.0
-1
TODO: Add checks on input validity (see below) Note: so far assumes that the given level is the one to which the field belongs (which should be true but isn't guaranteed (?))
public String setField(ColorFieldEditor field, Composite parent) { String level = field.getPreferencesLevel(); // If the level is "project" and project == null then just set // the field here (as a special case). // Note: without some project selected the field should not be // editable. Field will have to be set back to editable when // (and probably where) a project is selected. We might take // care of this elsewhere but, until that is verified, keep // doing it here. // Note also: loadWithInheritance (which calls setField(..)) // won't know that project == null and will try to set the field // from some higher level if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) { if (parent == null) { System.err.println("PreferencesUtilities.setField(): parent is null"); } if (parent.isDisposed()) { System.err.println("PreferencesUtilities.setField(): parent is disposed"); } field.setFieldValueFromOutside(null); if (!parent.isDisposed()) { field.getColorSelector().setEnabled(false); // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change... field.getLabelControl(parent).setBackground(colorBluish); } // Pretend that this was set at the project level? // (It was certainly cleared at that level) return IPreferencesService.PROJECT_LEVEL; } // Otherwise, we have a legitimate level, so set normally String levelFromWhichSet = field.loadWithInheritance(); // Note: You can evidently load a field even when its control // is disposed. In that case (evidently) you can change the // text in the field but not the background color. if (parent != null && !parent.isDisposed()) { // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change... if (level != null && level.equals(levelFromWhichSet)) { field.getLabelControl(parent).setBackground(colorWhite); } else if (level != null && field.getLabelControl(parent).getEnabled()) { field.getLabelControl(parent).setBackground(colorBluish); } } else { // If composite.isDisposed(), then both field.getTextControl(composite) // and field.getTextControl() will return null; if needed, a text control // must be obtained from somewhere else--but I have no idea where that // might be. Not sure why composite.isDisposed() here in the first place, // especially considering that the field can be set } return levelFromWhichSet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level){\n\t\tthis.level = level;\n\t}", "public void setLevel(String level) {\n this.level = level == null ? null : level....
[ "0.61418784", "0.61418784", "0.6063864", "0.59983546", "0.59983546", "0.59983546", "0.59983546", "0.5976141", "0.5874746", "0.5848736", "0.5834868", "0.5810041", "0.5780163", "0.5780163", "0.57720494", "0.57720494", "0.57720494", "0.57720494", "0.57720494", "0.5747575", "0.57...
0.0
-1
RMF 1/10/2009 Not sure this is at all necessary... but does it hurt? The X10DT PrefUtils did this...
protected void initializeField(FieldEditor pe, PreferencePage page) { if (page instanceof IPropertyChangeListener) { pe.setPropertyChangeListener((IPropertyChangeListener)page); } pe.setPreferenceStore(page.getPreferenceStore()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean func_70041_e_() { return false; }", "protected boolean func_70814_o() { return true; }", "public void method_4270() {}", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", ...
[ "0.53851527", "0.5343515", "0.51335764", "0.5048092", "0.49782336", "0.49721843", "0.4903862", "0.48984244", "0.48917782", "0.48908904", "0.48448518", "0.48353723", "0.48340094", "0.48340094", "0.48321527", "0.48187134", "0.48151392", "0.47745642", "0.47685242", "0.47420067", ...
0.0
-1
System.err.println("SPU.makeNewBooleanField() starting for key = " + key);
public BooleanFieldEditor makeNewBooleanField( PreferencePage page, PreferencesTab tab, IPreferencesService service, String level, String key, String text, String toolTip, Composite parent, boolean isEnabled, boolean isEditable, boolean emptyValueAllowed, boolean emptyValue, boolean isRemovable) { Composite fieldHolder = new Composite(parent, SWT.NONE); fieldHolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); BooleanFieldEditor field = new BooleanFieldEditor(page, tab, service, level, key, text, fieldHolder); field.setToolTipText(toolTip); if (level != null && level.equals(IPreferencesService.PROJECT_LEVEL) && service.getProject() != null) { setField(field, fieldHolder); addBooleanPropertyChangeListeners(service, level, field, key, fieldHolder); } else { setField(field, fieldHolder); addBooleanPropertyChangeListeners(service, level, field, key, fieldHolder); } field.getChangeControl().setEnabled(isEnabled); // boolean controls have no setEditable() method // also cannot be empty //field.setEmptyValueAllowed(false); if (level == null) field.setRemovable(false); else if (level.equals(IPreferencesService.DEFAULT_LEVEL)) field.setRemovable(false); else field.setRemovable(isRemovable); initializeField(field, page); return field; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private CheckBoolean() {\n\t}", "public void setProcessed (boolean Processed)\n{\nset_Value (\"Processed\", new Boolean(Processed));\n}", "void setBoolean(String key, boolean val);", "public void setRequiresTaxCertificate (boolean RequiresTaxCertificate)\n{\nset_Value (COLUMNNAME_RequiresTaxCertificate, Bool...
[ "0.61063576", "0.603974", "0.58433026", "0.5814604", "0.58066183", "0.58066183", "0.58066183", "0.58066183", "0.5731943", "0.5729617", "0.5713581", "0.57119983", "0.56394386", "0.56314385", "0.5631269", "0.5631269", "0.5631269", "0.56295735", "0.5620997", "0.5594865", "0.5591...
0.5799826
8
Note: for a RadioGroupFieldEditor, the Radio Box plays the role of fieldHolder, and that is created by the Radio Group. It appears to work to use the parent as the container of the field here. Not sure if this may still be unnecessary
public ComboFieldEditor makeNewComboField( PreferencePage page, PreferencesTab tab, IPreferencesService service, String level, String name, String labelText, String toolTip, int numColumns, String[] valueList, String[] labelList, Composite parent, boolean isEnabled, boolean isRemovable) { Composite fieldHolder = new Composite(parent, SWT.NONE); fieldHolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); boolean onProjectLevelWithNullProject = level != null && level.equals(IPreferencesService.PROJECT_LEVEL) && service.getProject() == null; //boolean notOnARealLevel = level == null; //boolean onAFunctioningLevel = !onProjectLevelWithNullProject && !notOnARealLevel; ComboFieldEditor field = new ComboFieldEditor(page, tab, service, level, name, labelText, valueList, labelList, numColumns, fieldHolder, isEnabled, isRemovable); field.setToolTipText(toolTip); //Composite comboControl = field.getComboBoxControl(parent); //Composite radioBoxControlParent = field.getComboBoxControl(parent).getParent(); if (!onProjectLevelWithNullProject) { setField(field, fieldHolder); addComboPropertyChangeListeners(service, level, field, name, fieldHolder); } else { //setField(field, parent); //addStringPropertyChangeListeners(service, level, field, key, fieldHolder); } field.setEnabled(isEnabled, fieldHolder); if (level == null) field.setRemovable(false); // can never remove from a field that doesn't have a stored value else if (level.equals(IPreferencesService.DEFAULT_LEVEL)) field.setRemovable(false); // can never remove from Default level else field.setRemovable(isRemovable); return field; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String setField(RadioGroupFieldEditor field, Composite composite) {\n\n String level = field.getPreferencesLevel();\n\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n if (IPreferencesService.PROJECT_LEVEL.equals(level) ...
[ "0.653358", "0.6381856", "0.62743634", "0.5990106", "0.58887154", "0.5727767", "0.57120097", "0.5703587", "0.56511146", "0.5562403", "0.55408525", "0.5538235", "0.54571944", "0.5422784", "0.5408032", "0.5360472", "0.53255415", "0.53146666", "0.5289325", "0.52547747", "0.52160...
0.0
-1
Note: for a RadioGroupFieldEditor, the Radio Box plays the role of fieldHolder, and that is created by the Radio Group. It appears to work to use the parent as the container of the field here. Composite fieldHolder = new Composite(parent, SWT.NONE); fieldHolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
public RadioGroupFieldEditor makeNewRadioGroupField( PreferencePage page, PreferencesTab tab, IPreferencesService service, String level, String name, String labelText, String toolTip, int numColumns, String[] values, String[] labels, Composite parent, boolean useGroup, boolean isEnabled, boolean isRemovable) { boolean onProjectLevelWithNullProject = level != null && level.equals(IPreferencesService.PROJECT_LEVEL) && service.getProject() == null; boolean notOnARealLevel = level == null; boolean onAFunctioningLevel = !onProjectLevelWithNullProject && !notOnARealLevel; RadioGroupFieldEditor field = new RadioGroupFieldEditor( page, tab, service, level, name, labelText, numColumns, values, labels, parent, useGroup); field.setToolTipText(toolTip); //Composite radioBoxControl = field.getRadioBoxControl(parent); //Composite radioBoxControlParent = field.getRadioBoxControl(parent).getParent(); if (!onProjectLevelWithNullProject) { setField(field, parent); addRadioGroupPropertyChangeListeners(service, level, field, name, parent); } else { //setField(field, parent); //addStringPropertyChangeListeners(service, level, field, key, fieldHolder); } // Set the enabled state // Assumes that RadioGroups use the Group representation for the button box; // if a Group is not used, then fill out the elxe branches below accordingly if (onProjectLevelWithNullProject || notOnARealLevel) { if (useGroup) { Group radioGroup = (Group) field.getRadioBoxControl(); radioGroup.setEnabled(false); } else { // do something else as appropriate to the representation } field.setEnabled(false, parent); } else if (onAFunctioningLevel) { if (useGroup) { Group radioGroup = (Group) field.getRadioBoxControl(); radioGroup.setEnabled(isEnabled); } else { // do something else as appropriate to the representation } field.setEnabled(isEnabled, parent); } if (level == null) field.setRemovable(false); // can never remove from a field that doesn't have a stored value else if (level.equals(IPreferencesService.DEFAULT_LEVEL)) field.setRemovable(false); // can never remove from Default level else field.setRemovable(isRemovable); return field; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String setField(RadioGroupFieldEditor field, Composite composite) {\n\n String level = field.getPreferencesLevel();\n\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n if (IPreferencesService.PROJECT_LEVEL.equals(level) ...
[ "0.71095717", "0.61426526", "0.6068514", "0.6004979", "0.59971845", "0.5839324", "0.5826389", "0.569249", "0.56682444", "0.5639574", "0.56268966", "0.56154037", "0.5566035", "0.5556295", "0.5543362", "0.5530603", "0.5491002", "0.5488758", "0.5488138", "0.54518723", "0.5411516...
0.6668513
1
System.err.println("SPU.makeNewStringField() starting for key = " + key);
public StringFieldEditor makeNewModifiedMarkField( PreferencePage page, PreferencesTab tab, IPreferencesService service, String level, String key, String text, Composite parent // boolean isEnabled, boolean isEditable, // boolean hasSpecialValue, String specialValue, // boolean emptyValueAllowed, String emptyValue, // boolean isRemovable ) { Composite fieldHolder = new Composite(parent, SWT.NONE); fieldHolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // boolean onProjectLevelWithNullProject = // level != null && level.equals(IPreferencesService.PROJECT_LEVEL) && service.getProject() == null; // boolean notOnARealLevel = level == null; // boolean onAFunctioningLevel = !onProjectLevelWithNullProject && !notOnARealLevel; StringFieldEditor field = new StringFieldEditor(page, tab, service, level, key + "Marker", "", 1, fieldHolder); // if (!onProjectLevelWithNullProject) { // setField(field, fieldHolder); // addStringPropertyChangeListeners(service, level, field, key, fieldHolder); // } else { // //setField(field, fieldHolder); // //addStringPropertyChangeListeners(service, level, field, key, fieldHolder); // } // //field.getTextControl().setEnabled(isEnabled); // if (onProjectLevelWithNullProject || notOnARealLevel) { // //System.out.println("SPU.makeNewStringField(..): disabling all"); // field.getTextControl().setEnabled(false); // field.getTextControl().setEditable(false); // field.setEnabled(false, field.getParent()); // } else if (onAFunctioningLevel) { // //System.out.println("SPU.makeNewStringField(..): setting all to " + isEnabled); // field.getTextControl().setEnabled(isEnabled); // field.getTextControl().setEditable(isEditable); // field.setEnabled(isEnabled, field.getParent()); // } // // if (hasSpecialValue) // field.setSpecialValue(specialValue); // else // field.setNoSpecialValue(); // field.setEmptyValueAllowed(emptyValueAllowed); // if (level == null) field.setRemovable(false); // can never remove from a field that doesn't have a stored value // else if (level.equals(IPreferencesService.DEFAULT_LEVEL)) field.setRemovable(false); // can never remove from Default level // else field.setRemovable(isRemovable); //System.err.println("SPU.makeNewStringField() ending for key = " + key); return field; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void rebuildKey() {\r\n\r\n final StringBuffer sb = new StringBuffer();\r\n\r\n sb.append(getClassField().getCanonicalName());\r\n for (final Object k : this.keyPartList) {\r\n sb.append(k.toString()).append('|');\r\n }\r\n this.key = sb.toString();\r\n }", ...
[ "0.6112467", "0.5840598", "0.58028156", "0.57344896", "0.5668754", "0.56683165", "0.56586", "0.56549907", "0.56494343", "0.563262", "0.5628146", "0.5609847", "0.560172", "0.56004155", "0.5582382", "0.55530614", "0.55471146", "0.5546123", "0.55456924", "0.55414987", "0.5531903...
0.0
-1
/ Elements relating to project selection (As of 13 Sep 2006 these are only needed in the project preferences tab, so I have not made versions of them publicly available in the utilities class. They might be represented here if and when there is a need for creating project selection/deselection links in other places.)
public Control[] createDefaultAndApplyButtons(Composite parent, final PreferencesTab buttonHolder) { Composite buttonBar = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 0; layout.marginHeight = 0; layout.marginWidth = 0; layout.makeColumnsEqualWidth = false; buttonBar.setLayout(layout); GridData bbgd = new GridData(SWT.END); buttonBar.setLayoutData(bbgd); //contributeButtons(buttonBar); boolean createDefaultAndApplyButton = true; if (createDefaultAndApplyButton) { layout.numColumns = layout.numColumns + 2; String[] labels = JFaceResources.getStrings(new String[] { "defaults", "apply" }); //$NON-NLS-2$//$NON-NLS-1$ //int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH); Button defaultsButton = new Button(buttonBar, SWT.PUSH); defaultsButton.setText(labels[0]); Dialog.applyDialogFont(defaultsButton); //GridData GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); Point minButtonSize = defaultsButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); //data.widthHint = Math.max(widthHint, minButtonSize.x); defaultsButton.setLayoutData(data); defaultsButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { buttonHolder.performDefaults(); } }); Button applyButton = new Button(buttonBar, SWT.PUSH); applyButton.setText(labels[1]); Dialog.applyDialogFont(applyButton); data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); minButtonSize = applyButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); //data.widthHint = Math.max(widthHint, minButtonSize.x); applyButton.setLayoutData(data); applyButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { buttonHolder.performApply(); } }); //applyButton.setEnabled(true); //isValid()); Dialog.applyDialogFont(buttonBar); } else { /* Check if there are any other buttons on the button bar. * If not, throw away the button bar composite. Otherwise * there is an unusually large button bar. */ if (buttonBar.getChildren().length < 1) buttonBar.dispose(); } return buttonBar.getChildren(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onSelectProject();", "private void updateProjectList() {\n\t\tfinal MultipleSelectionModel<Project> selectionModel = selectionList.getSelectionModel();\n\t\tfinal Object[] selectedIndices = selectionModel.getSelectedIndices().toArray();\n\t\tselectionModel.clearSelection();\n\t\tfor (final Object i : select...
[ "0.62593496", "0.60788053", "0.60299516", "0.59126574", "0.58246714", "0.58228344", "0.5781721", "0.5704147", "0.5672387", "0.56357723", "0.5621095", "0.56061524", "0.5583107", "0.55706286", "0.55666196", "0.55590945", "0.5559053", "0.55301553", "0.54911244", "0.54787457", "0...
0.0
-1
/ For laying out grid data in widgets for preferences pages (or anything else)
public static void fillGridPlace(Composite composite, int num) { for (int i = 1; i <= num; i++) { Label label = new Label(composite, SWT.NONE); label.setText("This space intentionally left blank"); label.setVisible(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addGrid() {\n\n\t\tList<ColumnConfig> configs = new LinkedList<ColumnConfig>();\n\n\t\tColumnConfig column = new ColumnConfig(InheritedComponentInstanceSelModelData.PROPERTY_ID, messages\n\t\t\t.columnHeaderId(), 15);\n\t\tcolumn.setSortable(false);\n\t\tcolumn.setRenderer(idCellRenderer);\n\t\tconfig...
[ "0.63404715", "0.6264389", "0.6035254", "0.58990145", "0.5898381", "0.5872382", "0.5861516", "0.5842921", "0.58288693", "0.58217806", "0.58146626", "0.58025587", "0.57508314", "0.5682693", "0.5674435", "0.5662778", "0.56549674", "0.5637848", "0.5631005", "0.55838037", "0.5574...
0.0
-1
use getStatements for now, hasStatement has a bug and always returns false
protected boolean datasetExists(URI dataset) { return Db.getStatements(dataset, RDF.TYPE, Sparql.namespaced("dcat","Dataset"),true,dataset).size() == 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasStatement();", "boolean getMissingStatement();", "boolean getMissingStatement();", "boolean getMissingStatement();", "boolean getMissingStatement();", "public boolean hasStatement() {\n return statement_ != null;\n }", "boolean getOwnStatement();", "public boolean hasStatement() {\...
[ "0.79508233", "0.7339252", "0.7339252", "0.7339252", "0.7339252", "0.71041876", "0.6944442", "0.68240654", "0.6622105", "0.64683765", "0.64570326", "0.62541735", "0.6243669", "0.6104028", "0.6104028", "0.6104028", "0.6104028", "0.6093687", "0.6008787", "0.6008787", "0.6008787...
0.0
-1
/public static final String SELECT_REF_LOGS = "SELECT DISTINCT U.Name, COUNT() as VisitorCount FROM pavankon_marrker_reg.users U " + "INNER JOIN pavankon_marrker_reg.reflog REF on U.refCode = REF.refCode " + "GROUP BY U.phno, U.refCode, U.Name ORDER BY VisitorCount DESC LIMIT 5";
public boolean isRefCodeExists(String refCode) { // TODO Auto-generated method stub // doGet(request, response); PreparedStatement pst; ResultSet rs; boolean exists = false; try { pst = RegDataBaseManager.startDatabaseOperation(SELECT_USER); pst.setString(1, refCode); rs = RegDataBaseManager.getDatabaseOprationResult(pst, SELECT_USER); if(rs.next()){ exists = true; } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return exists; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void executeQueries5()\n\t{\n\t\tString hql = \"Select s.name from School as s INNER JOIN SchoolClass as sc on s.id = sc.school_id GROUP by s.name HAVING count(sc.school_id) >1 \";\n\t\tQuery query = session.createQuery(hql);\n\t\tList results = query.list();\n\n\t\tSystem.out.println(results);\n\t}", "A...
[ "0.5664905", "0.5375259", "0.52676725", "0.51992047", "0.51747566", "0.51549625", "0.513696", "0.5126509", "0.5105845", "0.5038713", "0.5024835", "0.5020769", "0.49804518", "0.4969226", "0.49491066", "0.49467558", "0.4945214", "0.49265632", "0.49219507", "0.4915816", "0.49102...
0.0
-1
TODO Autogenerated method stub doGet(request, response);
public String putNewRefCodeAndSendInvitations(ArrayList<String> validEmails, User user) throws MessagingException { String randomId = SessionIdentifierGenerator.nextSessionId(); PreparedStatement pst; EmailHelper emailHelper = new EmailHelper(); try { for(int index = 0;index < validEmails.size(); index++){ pst = RegDataBaseManager.startDatabaseOperation(INSERT_USER); pst.setString(1, randomId+"-"+validEmails.get(index)); pst.setString(2, randomId); pst.setString(3, validEmails.get(index)); RegDataBaseManager.getDatabaseOprationResult(pst); emailHelper.sendInvitationEmail(validEmails.get(index), randomId, user); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return randomId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metGet(request, response);\n }", "public void doGet( )\n {\n \n }", "@Override\r\n protected void doGet(HttpServletRequest request, Http...
[ "0.77921194", "0.7785038", "0.77386624", "0.7688511", "0.7688511", "0.7677467", "0.76748466", "0.76568663", "0.76506066", "0.7636746", "0.7602038", "0.7601963", "0.7601963", "0.7601963", "0.75951284", "0.75951284", "0.75728214", "0.7562868", "0.7562868", "0.75579035", "0.7542...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine(), " "); int tc = Integer.parseInt(st.nextToken()); int n, half, remainder; int[] answer = new int[2]; boolean[] primes = filterPrime(); Collections.sort(primeList); for (int t = 0; t < tc; t++) { st = new StringTokenizer(br.readLine(), " "); n = Integer.parseInt(st.nextToken()); half = n / 2; for (int num : primeList) { if (num > half) break; remainder = n - num; if (primes[remainder]) continue; answer[0] = num; answer[1] = remainder; } for (int ans : answer) { System.out.print(ans + " "); } System.out.println(); } }
{ "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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
Listener that notifies when different radio lists was updated or when there was an error retrieving the radio list
public interface RadioListRetrievedListener { public void onRadioListRetrieved(final List<Radio> radios); public void onError(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface LastPlayedRetrievedListener {\n\n public void onLastPlayedRetrieved(final List<Radio> radios);\n }", "public void onLoadMenuRadioSelected();", "private void setRadioOnCheckedChangedEvent() {\n ((RadioButton) findViewById(R.id.radio_akb48)).setOnCheckedChangeListener(this);\n ...
[ "0.67605525", "0.6233974", "0.6195641", "0.6095475", "0.5831984", "0.5794867", "0.5763938", "0.5704236", "0.5635665", "0.5623923", "0.56214726", "0.55701107", "0.55685204", "0.5557654", "0.5555343", "0.5549107", "0.5527899", "0.5527885", "0.55271274", "0.5520233", "0.5520233"...
0.74377465
0
Listener that notifies when different radio lists was updated
public interface FavoritesRetrievedListener { public void onFavoritesRetrieved(final List<Radio> radios); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface RadioListRetrievedListener {\n\n public void onRadioListRetrieved(final List<Radio> radios);\n\n public void onError();\n }", "public interface LastPlayedRetrievedListener {\n\n public void onLastPlayedRetrieved(final List<Radio> radios);\n }", "private void setRadio...
[ "0.69039154", "0.66157365", "0.6430671", "0.62133574", "0.6197986", "0.61825615", "0.61281174", "0.60929596", "0.60809493", "0.6074434", "0.60484457", "0.60276616", "0.59680426", "0.59680426", "0.59680426", "0.59680426", "0.5866658", "0.58467203", "0.5820176", "0.5812669", "0...
0.6070621
10
Listener that notifies when different radio lists was updated
public interface LastPlayedRetrievedListener { public void onLastPlayedRetrieved(final List<Radio> radios); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface RadioListRetrievedListener {\n\n public void onRadioListRetrieved(final List<Radio> radios);\n\n public void onError();\n }", "private void setRadioOnCheckedChangedEvent() {\n ((RadioButton) findViewById(R.id.radio_akb48)).setOnCheckedChangeListener(this);\n ((Radi...
[ "0.69039154", "0.6430671", "0.62133574", "0.6197986", "0.61825615", "0.61281174", "0.60929596", "0.60809493", "0.6074434", "0.6070621", "0.60484457", "0.60276616", "0.59680426", "0.59680426", "0.59680426", "0.59680426", "0.5866658", "0.58467203", "0.5820176", "0.5812669", "0....
0.66157365
1
Notifies when the data from the database has changed, so then the listeners can trigger an update
public void onDataChanged();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void dataChanged() {\n\t\tif (wijzigInfo)\n\t\t\twijzigInfo();\n\n\t\tsetChanged();\n\t\tnotifyObservers(\"dataChanged\");\n\t}", "public void onDataChanged(){}", "void onDataChanged();", "public void notifyChangementJoueurs();", "@Override\n public void onDataChanged() {\n\n }...
[ "0.7728549", "0.7466266", "0.74483913", "0.71606606", "0.6953101", "0.69478965", "0.69478965", "0.6869286", "0.6844533", "0.6791709", "0.6784726", "0.6784077", "0.6737685", "0.6722587", "0.66521466", "0.6627685", "0.660116", "0.6591614", "0.6569187", "0.6540799", "0.6519971",...
0.7587523
1
Requests the list of data from the server
public void provide(@NonNull final RadioListRetrievedListener listener) { final Long timeBefore = System.currentTimeMillis(); ServerDataProvider dataProvider = new ServerDataProvider(); dataProvider.provideRadioList( new RadioListRetrievedListener() { @Override public void onError() { listener.onError(); } @Override public void onRadioListRetrieved(List<Radio> radios) { final Long timeElapsedForAddDevice = System.currentTimeMillis() - timeBefore; final String timeAddDevice = String.format("%1$,.5f", (double) timeElapsedForAddDevice / 1000); Log.d(LOG_TAG, "time for retrieving " + timeAddDevice); Observable<List<Radio>> radiosObservable = requestFromServerAndSync(radios); radiosObservable.subscribeOn(Schedulers.newThread()).observeOn( AndroidSchedulers.mainThread()).subscribe( new Subscriber<List<Radio>>() { @Override public void onCompleted() { // nothing } @Override public void onError(Throwable e) { listener.onError(); } @Override public void onNext(List<Radio> radios) { final Long timeElapsedForAddDevice = System.currentTimeMillis() - timeBefore; final String timeAddDevice = String.format("%1$,.5f", (double) timeElapsedForAddDevice / 1000); Log.d(LOG_TAG, "time for all " + timeAddDevice); listener.onRadioListRetrieved(radios); } }); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void getRequests();", "public void loadData(){\n JsonArrayRequest request = new JsonArrayRequest(\"http://www.efstratiou.info/projects/newsfeed/getList.php\", netListener, errorListener);\n\n //submit request\n ArticlesApp.getInstance().getRequestQueue().add(request);\n\n }", "void getD...
[ "0.6996128", "0.68806434", "0.68802446", "0.6859786", "0.67214596", "0.65951973", "0.64411354", "0.64369315", "0.63755834", "0.63571113", "0.62790924", "0.62724084", "0.6251636", "0.620998", "0.6150496", "0.6143791", "0.61211115", "0.6116631", "0.61029196", "0.6082218", "0.60...
0.0
-1
Returns the list of radios that are not in the database or that have been updated Making the method protected to test it
protected List<Radio> getNewUpdatedRadios(@NonNull final List<Radio> radios, @NonNull final List<Radio> dbRadios) { List<Radio> newOrUpdatedRadios = new ArrayList<Radio>(radios); // radios that have been retrieved from the BE, exist in the database but we don't know // their ID and the radio from the database HashMap<Radio, Radio> existingRadiosMap = new HashMap<Radio, Radio>(); List<Radio> updatedRadios = new ArrayList<Radio>(); for (Radio dbRadio : dbRadios) { Radio existingRadio = null; for (Radio radio : radios) { // if title and category are equal, we consider the radios equal if (radio.getTitle().equals(dbRadio.getTitle()) && radio.getGenre().equals (dbRadio.getGenre())) { existingRadio = radio; if(!(radio.getDescription().equals(dbRadio.getDescription()) && radio.getCategory().equals(dbRadio.getCategory()) && radio.getImageUrl().equals(dbRadio.getImageUrl()) && radio.getURL().equals(dbRadio.getURL()))){ Log.d(LOG_TAG, "radio: " + radio.toString()); Log.d(LOG_TAG, "db radio: " + dbRadio.toString()); updatedRadios.add(radio); } break; } } if (existingRadio != null) { existingRadiosMap.put(existingRadio, dbRadio); } } // if from the list of radios we remove all the radios that exist already // we get the list of new radios newOrUpdatedRadios.removeAll(existingRadiosMap.keySet()); //for every updated radio, update the id, is favorite and last play date // according to the value from the database // like this we don't loose the info that we saved in the DB // add the key set of the existing map to the list of new radios. for (Radio radio : updatedRadios) { Radio dbRadio = existingRadiosMap.get(radio); radio.setId(dbRadio.getId()); radio.setFavorite(dbRadio.isFavorite()); radio.setPlayedDate(dbRadio.getPlayedDate()); newOrUpdatedRadios.add(radio); } return newOrUpdatedRadios; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Radio> getRadioList(){\n return this.radioList;\n }", "public List<Drawing> getChangedDrawings() {\n// Set<String> changedDrawingNames = new HashSet<String>();\n// for (Drawing drawing : _changedDrawings) {\n// changedDrawingNames.add(drawing.getName());\n// ...
[ "0.59271103", "0.53232694", "0.52921385", "0.5246834", "0.5229222", "0.52242345", "0.52166027", "0.5148891", "0.51343215", "0.50816894", "0.50419116", "0.50417465", "0.5018384", "0.5011803", "0.50058126", "0.49815622", "0.49487075", "0.49294788", "0.49290103", "0.4925897", "0...
0.67769724
0
Created by omgimbot on 7/19/2019.
public interface IDokterHewanView { void initView(); void showLoadingIndicator(); void hideLoadingIndicator(); void onDataReady(DokterHewans result); void onHubWa(String noHp); void onRequestFailed(String rm); void onNetworkError(String cause); void goToDashboard(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\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}", "@Override\r\n\t...
[ "0.61307436", "0.5980111", "0.5954083", "0.58332896", "0.5748223", "0.5748223", "0.5706672", "0.5705224", "0.5674853", "0.56513876", "0.562191", "0.5600847", "0.5598736", "0.5587748", "0.5587748", "0.5587748", "0.5587748", "0.5587748", "0.5587748", "0.557957", "0.5565883", ...
0.0
-1
System.out.println("ask " + page + " page"); System.out.println("filters : " + "firstname = " + firstName + " lastname = " + lastName + " code = " + code + " library = " + library + " department = " + department); System.out.println("sort order : " + sortOrders.toString());
@Transactional public List<Student> fetch(int page, int limit, String firstName, String lastName, String code, String library, String department, List<StudentSort> sortOrders) { EntityManager entityManager = entityManagerFactory.createEntityManager(); entityManager.getTransaction().begin(); CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder(); CriteriaQuery<Student> query = criteriaBuilder.createQuery(Student.class); Root<Student> root = query.from(Student.class); Join<Student, Library> studentLibraryJoin = root.join("library"); Join<Student, Department> studentDepartmentJoin = root.join("department"); query.select(root); List<Predicate> predicates = new ArrayList<>(); if (firstName != null) { predicates.add(criteriaBuilder.like(criteriaBuilder.lower(root.get("firstName")), "%" + firstName.toLowerCase() + "%")); } if (lastName != null) { predicates.add(criteriaBuilder.like(criteriaBuilder.lower(root.get("lastName")), "%" + lastName.toLowerCase() + "%")); } if (code != null) { predicates.add(criteriaBuilder.equal(root.get("code"), Integer.parseInt(code))); } if (library != null) { predicates.add(criteriaBuilder.like(criteriaBuilder.lower(studentLibraryJoin.get("address")), "%" + library.toLowerCase() + "%")); } if (department != null) { predicates.add(criteriaBuilder.or( criteriaBuilder.like(criteriaBuilder.lower(studentDepartmentJoin.get("faculty")), "%" + department.toLowerCase() + "%"), criteriaBuilder.like(criteriaBuilder.lower(studentDepartmentJoin.get("university")), "%" + department.toLowerCase() + "%"))); } query.where(criteriaBuilder.and(predicates.toArray(new Predicate[predicates.size()]))); if (!sortOrders.isEmpty()) { if (sortOrders.get(0).isDescending()) { if (sortOrders.get(0).getPropertyName().equals("department")) { query.orderBy(criteriaBuilder.desc(studentDepartmentJoin.get("university")), criteriaBuilder.desc(studentDepartmentJoin.get("faculty"))); } else { if (sortOrders.get(0).getPropertyName().equals("library")) { query.orderBy(criteriaBuilder.desc(studentLibraryJoin.get("address"))); } else query.orderBy(criteriaBuilder.desc(root.get(sortOrders.get(0).getPropertyName()))); } } else { if (sortOrders.get(0).getPropertyName().equals("department")) { query.orderBy(criteriaBuilder.asc(studentDepartmentJoin.get("university")), criteriaBuilder.asc(studentDepartmentJoin.get("faculty"))); } else { if (sortOrders.get(0).getPropertyName().equals("library")) { query.orderBy(criteriaBuilder.asc(studentLibraryJoin.get("address"))); } else query.orderBy(criteriaBuilder.asc(root.get(sortOrders.get(0).getPropertyName()))); } } } else query.orderBy(criteriaBuilder.asc(root.get("id"))); List<Student> result = entityManager.createQuery(query).setFirstResult(page * limit).setMaxResults(limit).getResultList(); entityManager.getTransaction().commit(); entityManager.close(); //System.out.println(result); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sort()\n {\n com.jayway.restassured.response.Response response= given().relaxedHTTPSValidation().when().get(\"http://18.222.188.206:3333/accounts?_sort=title&_order=asc\");\n response.then().assertThat().statusCode(200);\n System.out.println(\"The accounts that are sorted accord...
[ "0.63823026", "0.6307124", "0.606328", "0.58922654", "0.58478403", "0.58048016", "0.57379", "0.5723631", "0.5714745", "0.569929", "0.5695729", "0.56884235", "0.5677539", "0.5674051", "0.5671962", "0.5646494", "0.56265974", "0.56098086", "0.5578281", "0.5574898", "0.5527455", ...
0.0
-1
Fragment2 f = new Fragment2();
@Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View view = inflater.inflate(R.layout.fragment1,container,false); btnnavfrag1=(Button) view.findViewById(R.id.btnnavfrag1); aboutusbutton2 = (Button)view.findViewById(R.id.aboutusbutton2); Log.d(TAG,"onCreateView: started."); btnnavfrag1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Toast.makeText(getActivity(),"Going To Fragment 1",Toast.LENGTH_SHORT).show(); ((MainActivity)getActivity()).setViewPager(1); // new Handler().postDelayed(new Runnable() { // @Override // public void run() { // slide = AnimationUtils.loadAnimation(view.getContext(),R.anim.slide); // aboutusbutton2 = (Button)view.findViewById(R.id.aboutusbutton2); // aboutusbutton2.setAnimation(slide); // } // }, 5000); } }); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Fragment2 newInstance() {\n Fragment2 fragment = new Fragment2();\n return fragment;\n }", "public MainFragment2() {\r\n super();\r\n }", "public FragmentMy() {\n }", "@Override\n public void onClick(View v) {\n fragment = fragmentManager....
[ "0.7899438", "0.7460012", "0.70462996", "0.68839544", "0.6812196", "0.68110144", "0.66358614", "0.66043484", "0.6595967", "0.6567652", "0.65025455", "0.64907026", "0.6470883", "0.6462279", "0.64291793", "0.64183736", "0.637858", "0.6370246", "0.6364591", "0.6353952", "0.63509...
0.0
-1
Toast.makeText(getActivity(),"Going To Fragment 1",Toast.LENGTH_SHORT).show();
@Override public void onClick(View v) { ((MainActivity)getActivity()).setViewPager(1); // new Handler().postDelayed(new Runnable() { // @Override // public void run() { // slide = AnimationUtils.loadAnimation(view.getContext(),R.anim.slide); // aboutusbutton2 = (Button)view.findViewById(R.id.aboutusbutton2); // aboutusbutton2.setAnimation(slide); // } // }, 5000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View view) {\n Toast.makeText( getActivity(), \"Fragment Second's\", Toast.LENGTH_SHORT ).show();\n\n\n }", "@Override\n public void onClick(View v) {\n\n String msg = fragmentCallback.getMsgFromActivity(\"null\");\n ...
[ "0.82731616", "0.7294103", "0.72557056", "0.7145437", "0.7052633", "0.7039421", "0.7005832", "0.6963483", "0.68367445", "0.6834603", "0.6834603", "0.6813486", "0.6789885", "0.6768063", "0.6736456", "0.67238945", "0.67101425", "0.6705777", "0.6690564", "0.6686207", "0.6681246"...
0.0
-1
Append all the strings from the map of arrays.
private String getFileContents () { final String s = m_buffers.values ()// .stream ()// .flatMap (List::stream)// .collect (Collectors.joining ()); return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void encodeEmbeddedStringArrays(XMLStreamReader reader, Map<String, Integer> mapping, ByteArrayOutputStream baos) throws XMLStreamException {\n Map<String, List<String>> valuesByFeature = new HashMap<>();\n while (reader.hasNext()) {\n if (reader.getEventType() == XMLStreamConstant...
[ "0.6125948", "0.571079", "0.5691951", "0.56434786", "0.5625016", "0.5616952", "0.5566656", "0.5562437", "0.55545324", "0.55366874", "0.5503386", "0.54832405", "0.54639506", "0.540362", "0.53912765", "0.5313736", "0.5279431", "0.5277867", "0.5253774", "0.52120423", "0.519495",...
0.0
-1
Custom components // Appens a label with hyperlink behaviour that streches from the default label column to the end of the form
public void appendLabelAsLink(String url, String text) { JLabel label = UISupport.createLabelLink(url, text); append(null, null, label, null, DEFAULT_LABEL_COLUMN, getColumnSpanToTheEnd(DEFAULT_LABEL_COLUMN)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void labelEdit2MouseClicked(MouseEvent e) {\n }", "@Override\n\tpublic void setComponentLabel(String label) {\n\t\t\n\t}", "public abstract String getManipulatorLinkLabel();", "public void linkLabels(boolean b) { link_labels_cb.setSelected(b); }", "@Override\n\t\tpublic void addLabel(Label label...
[ "0.63563895", "0.62092096", "0.6133756", "0.6073409", "0.6048496", "0.5856931", "0.57907593", "0.5723428", "0.57132864", "0.57113963", "0.56897146", "0.5682033", "0.5675362", "0.5674744", "0.5647891", "0.564085", "0.563949", "0.5613854", "0.55845207", "0.5577934", "0.5559698"...
0.53519857
44
Appends a heading with bold text that streches from the default label column to the end of the form
public void appendHeading(String text) { JLabel label = new JLabel(text); Font font = label.getFont(); Font fontBold = new Font(font.getName(), Font.BOLD, font.getSize()); label.setFont(fontBold); append(null, null, label, null, DEFAULT_LABEL_COLUMN, getColumnSpanToTheEnd(DEFAULT_LABEL_COLUMN)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Builder addHeadline(Text value);", "Builder addHeadline(String value);", "public JLabel buildDefaultHeader(){\n JLabel returnHeader = new JLabel();\n returnHeader.setHorizontalAlignment(SwingConstants.LEFT);\n returnHeader.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 48)); // Great font...
[ "0.6213087", "0.6065601", "0.59825665", "0.594188", "0.58561313", "0.57472324", "0.5730623", "0.57186145", "0.5673993", "0.5609892", "0.5566236", "0.552778", "0.5466493", "0.5463555", "0.5442176", "0.5441018", "0.5430609", "0.5405808", "0.5383491", "0.5371128", "0.53688115", ...
0.7291041
0
Appends a label and a text field to the form
public JTextField appendTextField(String label, String tooltip) { return appendTextField(label, label, tooltip, defaultTextFieldColumns); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addTextFieldsAndLabels(){\n this.add(this.firstLabel);\n this.add(firstNameField);\n this.add(this.secondLabel);\n this.add(lastNameField);\n }", "public DynaForm addField(String label, StatefullComponent input) {\n\t\treturn null;\r\n\t}", "public void addField (Stri...
[ "0.71438986", "0.67995256", "0.6744355", "0.65417683", "0.6393691", "0.6324196", "0.63220704", "0.62856793", "0.6249823", "0.6179614", "0.612649", "0.60866386", "0.6073442", "0.6063173", "0.6002967", "0.5901218", "0.58940077", "0.58753246", "0.5837438", "0.5817812", "0.581427...
0.62011325
9
Appends a label and a text field to the form
public JTextField appendTextField(String label, String name, String tooltip, int textFieldColumns) { JTextField textField = new JUndoableTextField(); textField.setName(name); textField.setColumns(textFieldColumns); setToolTip(textField, tooltip); textField.getAccessibleContext().setAccessibleDescription(tooltip); JTextComponentPopupMenu.add(textField); append(label, textField); return textField; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addTextFieldsAndLabels(){\n this.add(this.firstLabel);\n this.add(firstNameField);\n this.add(this.secondLabel);\n this.add(lastNameField);\n }", "public DynaForm addField(String label, StatefullComponent input) {\n\t\treturn null;\r\n\t}", "public void addField (Stri...
[ "0.71438986", "0.67995256", "0.6744355", "0.65417683", "0.6393691", "0.6324196", "0.63220704", "0.62856793", "0.6249823", "0.62011325", "0.6179614", "0.612649", "0.60866386", "0.6073442", "0.6063173", "0.6002967", "0.5901218", "0.58940077", "0.58753246", "0.5837438", "0.58178...
0.5717158
31
Appends a vararg of PropertyComponents to a single row in the form. It's assumed that every other column contains a component and the others are used for spacing including the initial column.
public void appendInOneRow(PropertyComponent... propertyComponents) { Preconditions.checkArgument(propertyComponents.length * 2 <= layout.getColumnCount() - 1, "There is not enough room for the components to be added"); int currentColumn = DEFAULT_COMPONENT_COLUMN; for (int i = 0; i < propertyComponents.length; i++) { PropertyComponent propertyComponent = propertyComponents[i]; if (i == 0) { append(null, null, propertyComponent.getComponent(), "left,center", currentColumn, DEFAULT_COLUMN_SPAN); } else { addComponentToRow(null, propertyComponent.getComponent(), "left,center", currentColumn, getRowCount(), DEFAULT_COLUMN_SPAN); } currentColumn += 2; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GridBagPanel addRow(Component... components)\n {\n if (myGBC.gridx == GridBagConstraints.RELATIVE)\n {\n setGridx(0);\n }\n if (myGBC.gridy == GridBagConstraints.RELATIVE)\n {\n setGridy(0);\n }\n\n for (Component component : componen...
[ "0.62272453", "0.56777745", "0.54478115", "0.54266554", "0.5352006", "0.53233594", "0.52415204", "0.51894957", "0.51114315", "0.50481474", "0.5036867", "0.49761295", "0.496511", "0.49518", "0.49274367", "0.48925474", "0.48785102", "0.48713046", "0.48658317", "0.4863996", "0.4...
0.7728175
0
Returns a column span that stretched to the last component column if using a custom layout. It's assumed that every other column contains a component and the others are used for spacing including the initial column.
private int getColumnSpanToTheEnd(int startingColumn) { return layout.getColumnCount() - startingColumn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getColspan() \n {\n return 1;\n }", "com.google.monitoring.dashboard.v1.ColumnLayout getColumnLayout();", "public int getColspan() \n {\n int colspan = 1;\n List subHeadings = getSubHeadings();\n if (subHeadings != null && subHeadings....
[ "0.62655926", "0.5955244", "0.57205427", "0.54964185", "0.54833156", "0.5398529", "0.5364975", "0.5277151", "0.525338", "0.5252973", "0.523312", "0.5173234", "0.5160762", "0.5141505", "0.50771064", "0.50166345", "0.49325514", "0.49300614", "0.4898353", "0.48919043", "0.489164...
0.6251664
1
Private constructor, so we have a "static" class
private ZipCodes() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "private Utils()\n {\n // Private constructor to prevent instantiation\n }", "private Instantiation(){}", "private Util() { }", "private Utils() {\n\t}", "private Utils() {\n\t}", "private Util...
[ "0.7914253", "0.7711476", "0.76667684", "0.758598", "0.7528477", "0.7528477", "0.74957746", "0.74957746", "0.74957746", "0.74957746", "0.74600226", "0.74480695", "0.7422396", "0.7387467", "0.73829556", "0.73829556", "0.7368829", "0.72891563", "0.7289124", "0.7288877", "0.7288...
0.0
-1
Parses the zip code source data set and loads it into the object for external consumption
private static void populateZipcodeList() { // only load the data once... if (ZipCodes.zipCodesList.size() > 0) { return; } List<String> headers = null; List<String> values = null; String line = null; // create handle the source data file InputStream stream = ZipCodes.class.getResourceAsStream("zipCodes.csv"); BufferedReader buffer = new BufferedReader(new InputStreamReader(stream)); try { // pull header row headers = Arrays.asList(buffer.readLine().split(",")); // add data rows while((line = buffer.readLine()) != null) { HashMap<String, String> zip = new HashMap<String, String>(); values = Arrays.asList(line.split(",")); for (int i = 0; i < headers.size(); i++) { zip.put(headers.get(i), values.get(i)); } ZipCodes.zipCodesList.add(zip); } stream.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadZipFile(String zipFileName, String classIndex)\n {\n InputStream trainSource = null, testSource = null;\n //The instance file is a zipped file containing a file called 'train' and one called 'test'\n try {\n ZipFile zipFile = new ZipFile(zipFileName);\n ...
[ "0.61863923", "0.61178416", "0.6114287", "0.5819864", "0.56209713", "0.5560692", "0.5541159", "0.54852074", "0.54165006", "0.5361476", "0.5351527", "0.5314139", "0.5292805", "0.52516925", "0.5237551", "0.5208377", "0.5200513", "0.5198668", "0.5194507", "0.5194507", "0.518643"...
0.6789053
0
XXX should it be always existing directory ?
@Override public File getServletTempDirectory(String moduleContextPath) { ApplicationDescriptor desc = getApplicationDescriptor(moduleContextPath); if (desc == null) { return null; } String domainDir = deploymentManager.getInstanceProperties().getProperty(WLPluginProperties.DOMAIN_ROOT_ATTR); assert domainDir != null; // FIXME can we get this via JMX ? File tmpPath = new File(new File(domainDir), "servers" + File.separator + desc.getServerName() + File.separator + "tmp" // NOI18N + File.separator + "_WL_user" + File.separator + desc.getName()); // NOI18N if (tmpPath.exists() && tmpPath.isDirectory()) { File[] subDirs = tmpPath.listFiles(); if (subDirs != null) { for (File subdir : subDirs) { // FIXME multiple subdirs - what does that mean File servletDir = new File(subdir, "jsp_servlet"); // NOI18N if (servletDir.exists() && servletDir.isDirectory()) { // FIXME make simpler return servletDir.getParentFile(); } } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean isDir() { return true; }", "public void createDirectory() {\r\n\t\tpath = env.getProperty(\"resources\") + \"/\" + Year.now().getValue() + \"/\";\r\n\t\tFile file = new File(path);\r\n\t\tif (!file.exists())\r\n\t\t\tfile.mkdirs();\r\n\t}", "private File createDirectoryIfNotExist...
[ "0.7180107", "0.7130218", "0.7025914", "0.6949223", "0.6929893", "0.6916693", "0.69085807", "0.6773511", "0.67468315", "0.67393565", "0.67259735", "0.6710807", "0.6704752", "0.6700187", "0.6686928", "0.66765475", "0.66733027", "0.66417366", "0.66330934", "0.66272306", "0.6604...
0.0
-1
add all available move to moves checking all the combinations for x moves in any direction of direction_x and y moves in any direction of direction_x
private void availableMoveHelper(ArrayList<int[]> moves, int[] direction_x, int[] direction_y, int start_x, int start_y, Board board){ for(int x : direction_x){ for(int y : direction_y){ int check_x = start_x+x; int check_y = start_y+y; if(this.isValid(check_x, check_y, board)){ int[] cur_pos = {check_x, check_y}; moves.add(cur_pos); } } } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void calculatePossibleMoves(Tile orig, List<Tile> availableSpots) {\n for (Tile spot : orig.getConnectedTiles()) {\n if (spot != null) {\n if (!availableSpots.contains(spot)) {\n availableSpots.add(spot);\n this.calculatePossibleMoves(s...
[ "0.63341177", "0.632843", "0.6328174", "0.6283492", "0.62733054", "0.6268708", "0.6265706", "0.62650836", "0.61345", "0.61161554", "0.60775656", "0.60215616", "0.60141027", "0.60123366", "0.59679705", "0.59578323", "0.5954753", "0.5950584", "0.594763", "0.5937482", "0.592654"...
0.7742792
0
Constructor for a folder controller without filter and custom link model for editor
public FolderRunController(VFSContainer rootContainer, boolean displayWebDAVLink, UserRequest ureq, WindowControl wControl) { this(rootContainer, displayWebDAVLink, false, ureq, wControl, null, null, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FolderRunController(VFSContainer rootContainer, boolean displayWebDAVLink, boolean displaySearch, UserRequest ureq, WindowControl wControl,\n VFSItemFilter filter, CustomLinkTreeModel customLinkTreeModel, Long courseNodeId) {\n\n super(ureq, wControl);\n\n folderContainer = this.cre...
[ "0.65062547", "0.6417196", "0.62646836", "0.609172", "0.5828411", "0.57684606", "0.568672", "0.5685265", "0.5685154", "0.55619836", "0.5559189", "0.5558462", "0.5555603", "0.5528017", "0.5505438", "0.54977405", "0.5494695", "0.54744285", "0.54685116", "0.5457049", "0.54427993...
0.5829698
4
Constructor for a folder controller without filter and custom link model for editor.
public FolderRunController(VFSContainer rootContainer, boolean displayWebDAVLink, boolean displaySearch, UserRequest ureq, WindowControl wControl) { this(rootContainer, displayWebDAVLink, displaySearch, ureq, wControl, null, null, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Folder(){\n\t super(\"Folder\");\n\t }", "public FolderRunController(VFSContainer rootContainer, boolean displayWebDAVLink, boolean displaySearch, UserRequest ureq, WindowControl wControl,\n VFSItemFilter filter, CustomLinkTreeModel customLinkTreeModel, Long courseNodeId) {\n\n su...
[ "0.65679634", "0.64876616", "0.62902087", "0.6253773", "0.59337974", "0.5816012", "0.5751649", "0.5657592", "0.56135744", "0.55845654", "0.5518267", "0.5511441", "0.55072004", "0.5468747", "0.5456878", "0.5427991", "0.5423787", "0.5386335", "0.5385718", "0.5385718", "0.537564...
0.5931336
5
Constructor for a folder controller with an optional file filter and an optional custom link model for editor. Use this one if you don't wan't to display all files in the file browser or if you want to use a custom link tree model in the editor.
public FolderRunController(VFSContainer rootContainer, boolean displayWebDAVLink, boolean displaySearch, UserRequest ureq, WindowControl wControl, VFSItemFilter filter, CustomLinkTreeModel customLinkTreeModel, Long courseNodeId) { super(ureq, wControl); folderContainer = this.createVelocityContainer("run"); editQuotaButton = LinkFactory.createButtonSmall("editQuota", folderContainer, this); BusinessControl bc = getWindowControl().getBusinessControl(); // --- subscription --- VFSSecurityCallback secCallback = VFSManager.findInheritedSecurityCallback(rootContainer); if (secCallback != null && secCallback instanceof Subscribed) { subsContext = ((Subscribed) secCallback).getSubscriptionContext(); // if null, then no subscription is desired if (subsContext != null && (rootContainer instanceof OlatRelPathImpl)) { String data = ((OlatRelPathImpl) rootContainer).getRelPath(); PublisherData pdata = new PublisherData(OresHelper.calculateTypeName(FolderModule.class), data); csController = new ContextualSubscriptionController(ureq, getWindowControl(), subsContext, pdata); folderContainer.put("subscription", csController.getInitialComponent()); } } if (!ureq.getUserSession().getRoles().isGuestOnly() && displaySearch) { SearchServiceUIFactory searchUIFactory = CoreSpringFactory.getBean(SearchServiceUIFactory.class); searchC = searchUIFactory.createInputController(ureq, wControl, DisplayOption.STANDARD, null); listenTo(searchC); // register for auto-dispose folderContainer.put("searchcomp", searchC.getInitialComponent()); } folderComponent = new FolderComponent(ureq, "foldercomp", rootContainer, filter, customLinkTreeModel, courseNodeId); folderComponent.addListener(this); folderContainer.put("foldercomp", folderComponent); if (WebDAVManager.getInstance().isEnabled() && displayWebDAVLink) folderContainer.contextPut("webdavlink", FolderManager.getWebDAVLink()); selTree = new SelectionTree("seltree", getTranslator()); selTree.addListener(this); folderContainer.put("seltree", selTree); // jump to either the forum or the folder if the business-launch-path says so. ContextEntry ce = bc.popLauncherContextEntry(); if (ce != null) { // a context path is left for me if (log.isDebugEnabled()) log.debug("businesscontrol (for further jumps) would be:" + bc); OLATResourceable ores = ce.getOLATResourceable(); if (log.isDebugEnabled()) log.debug("OLATResourceable=" + ores); String typeName = ores.getResourceableTypeName(); // typeName format: 'path=/test1/test2/readme.txt' // First remove prefix 'path=' String path = typeName.substring("path=".length()); if (path.endsWith(":0")) { path = path.substring(0, path.length() - 2); } activate(ureq, path); } enableDisableQuota(ureq); putInitialPanel(folderContainer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Folder(){\n\t super(\"Folder\");\n\t }", "public FolderRunController(VFSContainer rootContainer, boolean displayWebDAVLink, boolean displaySearch, UserRequest ureq, WindowControl wControl) {\n this(rootContainer, displayWebDAVLink, displaySearch, ureq, wControl, null, null, null);\n }", ...
[ "0.6126168", "0.60133433", "0.5888688", "0.581972", "0.56900454", "0.55986893", "0.54856426", "0.54769677", "0.5463864", "0.54363614", "0.53648716", "0.5349223", "0.5314127", "0.52463883", "0.52192664", "0.5118095", "0.511562", "0.510074", "0.5084364", "0.5083974", "0.5078169...
0.6588566
0
ISSUE OLAT6899 (implemented this method)
private void checkFileSystemResource(UserRequest ureq) { if (FolderCommandStatus.STATUS_FAILED == FolderCommandHelper.sanityCheck(getWindowControl(), folderComponent)) { folderComponent.updateChildren(); } VFSItem item = VFSManager.resolveFile(folderComponent.getRootContainer(), ureq.getModuleURI()); if (FolderCommandStatus.STATUS_FAILED == FolderCommandHelper.sanityCheck2(getWindowControl(), folderComponent, ureq, item)) { folderComponent.setCurrentContainerPath(folderComponent.getCurrentContainerPath()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "public void mo12628c() {\n }", "protected boolean func_70814_o() { return true; }", "public void method_4270() {}", "public void mo38117a() {\n ...
[ "0.6516273", "0.64858717", "0.6303609", "0.6299263", "0.6070817", "0.6050737", "0.6036984", "0.60342354", "0.5934041", "0.58489984", "0.5845846", "0.57999593", "0.57937723", "0.5792218", "0.57830656", "0.57801753", "0.57620007", "0.5761659", "0.57606924", "0.57576233", "0.575...
0.0
-1
Special treatment of forms with multiple submit actions.
private String getFormAction(UserRequest ureq) { // cannot avoid rawtype warning @SuppressWarnings("rawtypes") Enumeration params = ureq.getHttpReq().getParameterNames(); while (params.hasMoreElements()) { String key = (String) params.nextElement(); if (key.startsWith(ACTION_PRE)) { return key.substring(ACTION_PRE.length()); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void Submit() {\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbtnSubmit_click(e);\n\t\t\t}", "protected void onSubmitAction(IModel<StringWrapper> model, AjaxRequestTarget target, Form<?> form) {\n }", "protected abstract void onSubmit(AjaxRequestTar...
[ "0.62268746", "0.620842", "0.61730975", "0.60581434", "0.6056579", "0.60513455", "0.5917207", "0.5915395", "0.5880971", "0.5870653", "0.5829244", "0.57977176", "0.57242763", "0.5681519", "0.56622213", "0.5596626", "0.55583555", "0.5552459", "0.555244", "0.5535296", "0.5532861...
0.0
-1
TODO Autogenerated method stub
@Override public int getCustomerIdCustomerDistribution(int CostomerorId) { List<?> resultList = null; String sql1= "SELECT DISTINCT company_id FROM companiesusers where user_id='"+CostomerorId+"'"; resultList= dao.executeSQLQuery(sql1); Object l = resultList.get(0); int Customer_ID = Integer.valueOf(String.valueOf(l)); return Customer_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
Constructor that initializes all the fields of interest.
public AcronymData( String sf, List< AcronymExpansion > lfs ) { super(); this.sf = sf; this.lfs = lfs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void initializeFields() {\n\n\t}", "@Override public void init()\n\t\t{\n\t\t}", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDe...
[ "0.7349124", "0.73166907", "0.725653", "0.72478336", "0.7219402", "0.7206356", "0.7148521", "0.710388", "0.70930225", "0.7041319", "0.70057225", "0.69995844", "0.69920874", "0.6990103", "0.6988649", "0.6984672", "0.6984489", "0.69724894", "0.69724894", "0.69724894", "0.696617...
0.0
-1
Constructor that initialises an AcronymExpansion object from its parameters.
public AcronymExpansion( String lf, int freq, int since ) { this.lf = lf; this.freq = freq; this.since = since; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public\n AcronymData( String sf, List< AcronymExpansion > lfs )\n {\n super();\n\n this.sf = sf;\n this.lfs = lfs;\n }", "private VersionExpansionParser(String expansion) {\n\n this.expansionString = expansion;\n\n }", "void setAcronym(String v) {\n if (v =...
[ "0.65859956", "0.60644424", "0.5837043", "0.5712467", "0.5696095", "0.55140215", "0.54177946", "0.54177946", "0.54177946", "0.5397571", "0.53642434", "0.53522646", "0.532392", "0.52770525", "0.5235553", "0.52306294", "0.516207", "0.50914985", "0.5078045", "0.50579137", "0.505...
0.64781064
1
/ Getters and setters to access AcronymExpansion.
public String getLf() { return lf; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAcronym() {\n return acronym;\n }", "public String getAcronym();", "void setAcronym(String v) {\n if (v == null) {\n throw new IllegalArgumentException(\"Acronym is missing\");\n }\n acronym = v;\n }", "@Override\r\n\tpublic char getAcronym() {\r\...
[ "0.75659174", "0.7522655", "0.68429637", "0.65276855", "0.6282281", "0.6153687", "0.6117691", "0.58999413", "0.58976406", "0.57221544", "0.5705191", "0.55846924", "0.55061156", "0.5500733", "0.5402748", "0.5354003", "0.53216535", "0.51670474", "0.5130964", "0.5085256", "0.505...
0.0
-1
Main Method deals with the user and then passes the input to calculator
public static void main(String[] args) { runTests(); Scanner scan = new Scanner(System.in); System.out.println("Hello, I am a calculator."); while(true){ System.out.println(" Please enter a math problem to begin."); String formula = scan.nextLine(); if (formula.toLowerCase().equals("stop")) { System.out.println("Stopping"); break; } else if(formula.equals("Exit") || formula.equals("exit")) { System.out.println("Exiting"); break; } Calculator calc = new Calculator(); String result = calc.computeResult(formula); if(result == "paren"){ System.out.println("You have unfinished parentheses. Please try your equation again"); } else { int resultAsNum = Integer.parseInt(result); System.out.println("Result = " + resultAsNum); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n Calculator calc=new Calculator();\r\n double operand1,operand2,result=0;\r\n operand1=calc.getOperand1();\r\n operand2=calc.getOperand2();\r\n String op;\r\n op=calc.getOperator();\r\n try\r\n {\r\n ...
[ "0.7317997", "0.7315513", "0.72664356", "0.7265855", "0.7249422", "0.71873087", "0.7098547", "0.7097521", "0.70871675", "0.7082267", "0.707698", "0.69979954", "0.69906425", "0.69877625", "0.6969975", "0.6958036", "0.6934311", "0.68931407", "0.68838996", "0.6863338", "0.681097...
0.7251913
4
Test the calculator class
public static void runTests() { Result result = JUnitCore.runClasses(TestCalculator.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void testCalculations() {\n double addition = calculator.add(10, 2);\n double subtraction = calculator.sub(10, 2);\n double multiplication = calculator.mul(10, 2);\n double division = calculator.div(10, 2);\n\n //Then\n assertEquals(12, addition);\n asser...
[ "0.773926", "0.7714007", "0.7268784", "0.72357774", "0.7072081", "0.7013514", "0.69922036", "0.69623727", "0.69127214", "0.6875183", "0.6702622", "0.6673031", "0.6640333", "0.6624947", "0.6611172", "0.65983874", "0.6561454", "0.65502", "0.65389585", "0.6511362", "0.6509231", ...
0.6130971
53
Listen for Camunda events "create a task" and check if configured external task topic is registered. If is registered then fetch and lock the external task and call the registered method.
protected void onTaskEvent(final String processDefinitionKey, final FlowElement bpmnElement) { final String topic = getTopic(bpmnElement); if (topic == null) { return; // an activity which has not an external task implementation } final String key = getInternalKey(processDefinitionKey, topic); if (!registrations.containsKey(key)) { return; // a topic not yet registered } /* * Fetch and lock needs to be done in a separate transaction. Additionally at * the moment of task creation the External Task is not yet visible to other * threads and we need wait for the current transaction to complete. */ doAfterTransaction(() -> processAsynchronously(() -> fetchAndLockExternalTasks(key))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Task createTask();", "Task createTask();", "Task createTask();", "void onTaskStart();", "void startTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<java.lang.Boolean> callback );", "public void startTaskTriggerCheckerThread() {\n new Thread(new Runnable() {\n @Override...
[ "0.57907057", "0.57907057", "0.57907057", "0.5662524", "0.564398", "0.56352556", "0.554131", "0.540853", "0.54034513", "0.53979695", "0.536918", "0.5365689", "0.5359947", "0.53410333", "0.53395396", "0.5280404", "0.5190614", "0.51887786", "0.5182885", "0.5165455", "0.5144992"...
0.5865319
0
/ Fetch and lock any external tasks available usually only the current one if called in the context of a task event processing.
protected void fetchAndLockExternalTasks(final String key) { final String topic = getTopicFromInternalKey(key); final String processDefinitionKey = getProcessDefinitionKeyFromInternalKey(key); final ExternalTaskSyncProcessingRegistrationImpl<?> registration = registrations.get(key); final List<LockedExternalTask> externalTasks = getExternalTaskService() .fetchAndLock(Integer.MAX_VALUE, getWorkerId()) .topic(topic, registration.getLockTimeout()) .processDefinitionKey(processDefinitionKey) .variables(registration.getVariablesToFetch()) .execute(); if ((externalTasks == null) || externalTasks.isEmpty()) { return; } /* * Processing each task needs to be done in a separate transaction because * completing the external task might be faster than committing the transaction * of "fetchAndLock". Additionally at the moment of task locking this status * is not yet visible to other threads and we need wait for the current * transaction to complete. */ doAfterTransaction(() -> externalTasks.forEach(task -> processAsynchronously(() -> runRegisteredProcessor( task.getProcessDefinitionKey(), task.getTopicName(), task.getId(), task.getBusinessKey(), task.getProcessInstanceId(), task.getActivityId(), task.getExecutionId(), task.getLockExpirationTime(), task.getVariables(), task.getRetries())))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void requestExtraSync()\n {\n executor.requestExtraSync();\n }", "public void acquireDeferredLock() {\r\n return;\r\n }", "final Runnable pollLocalTask() {\n return locallyDeqTask();\n }", "Thread getLocker();", "public void doIdleTasks();", "Task poll();", "publ...
[ "0.5763012", "0.5738082", "0.5694092", "0.5688409", "0.56249493", "0.55770916", "0.54829884", "0.5464126", "0.5462928", "0.5462897", "0.5450895", "0.5435722", "0.54274917", "0.53986466", "0.5382111", "0.5341005", "0.52744055", "0.5273055", "0.5273035", "0.52728045", "0.526638...
0.7514898
0
Call by Camunda's Job Executor once a async processor times out
@Override public void execute(final AsyncProcessorTimeoutJobHandlerConfiguration configuration, final ExecutionEntity execution, final CommandContext commandContext, final String tenantId) { final String externalTaskId = configuration.getExternalTaskId(); final ExternalTask externalTask = getExternalTaskService() .createExternalTaskQuery() .externalTaskId(externalTaskId) .locked() .singleResult(); // already completed or not yet locked if (externalTask == null) { return; } // timeout timer belongs to expired external task execution if (!externalTask.getLockExpirationTime().equals(configuration.getLockTimeout())) { return; } // external task lock already expired - ignore timer if (externalTask.getLockExpirationTime().before(new Date())) { return; } final String key = getInternalKey(externalTask.getProcessDefinitionKey(), externalTask.getTopicName()); final ExternalTaskAsyncProcessingRegistrationImpl<?, ?> registration = (ExternalTaskAsyncProcessingRegistrationImpl<?, ?>) registrations .get(key); getExternalTaskService() .handleFailure(externalTaskId, getWorkerId(), registration.getResponseTimeoutExpiredMessage(), 0, 0l); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void handleTimeoutTask();", "@Override\n protected void handleExecuteTimeoutException(final TimeoutException timeoutEx) {\n officeProcessManager.restartDueToTaskTimeout();\n }", "private void setupTimeoutJob() {\n eventLoopGroup.scheduleAtFixedRate(() -> {\n\n /*\n * We canno...
[ "0.67577577", "0.60412526", "0.58513635", "0.57576454", "0.5721326", "0.5686809", "0.56752783", "0.56066537", "0.55408895", "0.54884905", "0.5431239", "0.54281336", "0.5395267", "0.53628284", "0.5361915", "0.534412", "0.5341606", "0.53317547", "0.5323514", "0.52879894", "0.52...
0.5414489
12
The DomQuery path relative from the recordelement to the element that contains a record identifier value.
public String getIdPath() { if (null != this.idPath) { return this.idPath; } ValueExpression _ve = getValueExpression("idPath"); if (_ve != null) { return (String) _ve.getValue(getFacesContext().getELContext()); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getXpath() { \n\t\treturn getXpathElement().getValue();\n\t}", "public StringDt getPathElement() { \n\t\tif (myPath == null) {\n\t\t\tmyPath = new StringDt();\n\t\t}\n\t\treturn myPath;\n\t}", "java.lang.String getXpath();", "public StringDt getXpathElement() { \n\t\tif (myXpath == null) {\n...
[ "0.59084386", "0.58214384", "0.58074903", "0.57114995", "0.5578162", "0.55265164", "0.5460741", "0.544423", "0.54314166", "0.5422687", "0.5422428", "0.5414134", "0.5337783", "0.533049", "0.5311801", "0.52659166", "0.5250176", "0.52352655", "0.5203987", "0.51854587", "0.512808...
0.59810317
0
Set the value of the idPath property.
public void setIdPath(String idPath) { this.idPath = idPath; this.handleConfig("idPath", idPath); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPath(String path)\n {\n try\n {\n // Tokenize the path\n pathArray = getPathResolved(path);\n \n // Set path property\n this.path = path;\n }\n catch (NumberFormatException nfe)\n {\n // Reset path proper...
[ "0.6722523", "0.6698633", "0.65574396", "0.6483086", "0.6422922", "0.6299272", "0.6283867", "0.6283867", "0.6283867", "0.6282176", "0.6267779", "0.6254481", "0.62485975", "0.62485975", "0.62421954", "0.6235351", "0.6235351", "0.6235351", "0.6231369", "0.62262", "0.6216508", ...
0.85469705
0
The DomQuery path to the repeated element whichcontains record information.
public String getRecord() { if (null != this.record) { return this.record; } ValueExpression _ve = getValueExpression("record"); if (_ve != null) { return (String) _ve.getValue(getFacesContext().getELContext()); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public StringDt getPathElement() { \n\t\tif (myPath == null) {\n\t\t\tmyPath = new StringDt();\n\t\t}\n\t\treturn myPath;\n\t}", "public String getPath() throws Exception {\n\t\t/*\n\t\t * return \"/news-oppsRecord\" + doc.selectSingleNode\n\t\t * (\"/metadataFieldInfo/field/@path\").getText();\n\t\t */\n\t\tre...
[ "0.5381393", "0.5324266", "0.5227182", "0.51436865", "0.50704396", "0.50648814", "0.49796855", "0.4897287", "0.48715135", "0.48607168", "0.48159325", "0.48159325", "0.48159325", "0.48024845", "0.47932732", "0.4719699", "0.4705023", "0.47041905", "0.47022805", "0.46871537", "0...
0.0
-1
Set the value of the record property.
public void setRecord(String record) { this.record = record; this.handleConfig("record", record); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRecord(Record record) {\n this.record = record;\n }", "public void setRecord(final ORecordInternal<?> iRecord) {\r\n\t\t// SAVES THE RECORD\r\n\t\tthis.record = iRecord;\r\n\t}", "public void SetRecord(int index, Record rec){\n\t}", "public void setCurrentRecord(final Record record) ...
[ "0.76860374", "0.68386626", "0.65444696", "0.65301144", "0.6492677", "0.6443248", "0.6375923", "0.63284355", "0.63105994", "0.6135533", "0.6088649", "0.6039952", "0.59947497", "0.5957199", "0.59295356", "0.59170866", "0.5851235", "0.57779455", "0.5716958", "0.57139015", "0.57...
0.75064516
1
The DomQuery path to the success attribute usedby forms.
public String getSuccessProperty() { if (null != this.successProperty) { return this.successProperty; } ValueExpression _ve = getValueExpression("successProperty"); if (_ve != null) { return (String) _ve.getValue(getFacesContext().getELContext()); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getXpath();", "public String getXpath() { \n\t\treturn getXpathElement().getValue();\n\t}", "public String getXPath() {\n\t\treturn this.builder.toString();\n\t}", "public String getXMLquery() {\n return localQuerytool.getXML();\n }", "public final String attributeNameRef ()\r\n...
[ "0.5009124", "0.49349982", "0.4768785", "0.4759581", "0.47481984", "0.46854618", "0.46762338", "0.4599682", "0.45246553", "0.45000958", "0.44749805", "0.4466716", "0.446219", "0.444673", "0.44395685", "0.44286463", "0.44184795", "0.4388816", "0.43867823", "0.4362172", "0.4352...
0.0
-1
Set the value of the successProperty property.
public void setSuccessProperty(String successProperty) { this.successProperty = successProperty; this.handleConfig("successProperty", successProperty); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSuccess(boolean value) {\r\n this.success = value;\r\n }", "public void setSuccess(boolean success) {\n this.success = success;\n }", "public void setSuccess(boolean success) {\n this.success = success;\n }", "private void setSuccess(boolean value) {\n \n ...
[ "0.7531059", "0.741079", "0.741079", "0.7387937", "0.7387937", "0.7387937", "0.7309768", "0.7156466", "0.7066562", "0.69191456", "0.68706495", "0.6831058", "0.6802845", "0.67962277", "0.6789181", "0.6739903", "0.66774845", "0.66774845", "0.66774845", "0.66768324", "0.6516288"...
0.85985637
0
The DomQuery path from which to retrieve thetotal number of records in the dataset. This is only needed if the whole dataset is not passed in one go, but is being paged from the remote server.
public String getTotalProperty() { if (null != this.totalProperty) { return this.totalProperty; } ValueExpression _ve = getValueExpression("totalProperty"); if (_ve != null) { return (String) _ve.getValue(getFacesContext().getELContext()); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumXPathSegments() {\n return xPath.size();\n }", "int getQueryItemsCount();", "public int getXpathCount(final String xpath);", "int getQueriesCount();", "public int getQueryLength()\n\t{\n\t\treturn myQueryLength;\n\t}", "public static int getRecordNum(IQueryResult queryResult) {\r\n ...
[ "0.58986044", "0.5722803", "0.5546459", "0.5518654", "0.55163324", "0.54544973", "0.543106", "0.5354017", "0.5346001", "0.52614677", "0.52614677", "0.52614677", "0.52614677", "0.52614677", "0.5241554", "0.5235784", "0.52356046", "0.52339375", "0.52100986", "0.5167465", "0.516...
0.0
-1
Set the value of the totalProperty property.
public void setTotalProperty(String totalProperty) { this.totalProperty = totalProperty; this.handleConfig("totalProperty", totalProperty); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTotal(int value) {\n this.total = value;\n }", "public void setTotal(int total) {\n this.total = total;\n }", "public void setTotal(Double total);", "public void setTotal(float total) {\n this.total = total;\n }", "public void setTotal(Double total) {\n t...
[ "0.74636453", "0.74550736", "0.7453624", "0.73906136", "0.7333152", "0.7333152", "0.7333152", "0.7210713", "0.7108104", "0.7021252", "0.68748707", "0.68707573", "0.67595106", "0.67595106", "0.6743784", "0.6627823", "0.6567815", "0.6531689", "0.6486399", "0.64802045", "0.64716...
0.8197842
0
A remoteInterface for the ContextListener. Copyright (c) 20022019 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information The DSOL project is distributed under a threeclause BSDstyle license, which can be found at
public interface RemoteContextListenerInterface extends Remote { /** * Called when an object has been added. * <p> * The binding of the newly added object can be obtained using <tt>evt.getNewBinding()</tt>. * @param evt NamingEvent; The nonnull event. * @see NamingEvent#OBJECT_ADDED * @throws RemoteException on network failure */ public void objectAdded(NamingEvent evt) throws RemoteException; /** * Called when an object has been removed. * <p> * The binding of the newly removed object can be obtained using <tt>evt.getOldBinding()</tt>. * @param evt NamingEvent; The nonnull event. * @see NamingEvent#OBJECT_REMOVED * @throws RemoteException on network failure */ public void objectRemoved(NamingEvent evt) throws RemoteException; /** * Called when an object has been renamed. * <p> * The binding of the renamed object can be obtained using <tt>evt.getNewBinding()</tt>. Its old binding (before the * rename) can be obtained using <tt>evt.getOldBinding()</tt>. One of these may be null if the old/new binding was * outside the scope in which the listener has registered interest. * @param evt NamingEvent; The nonnull event. * @see NamingEvent#OBJECT_RENAMED * @throws RemoteException on network failure */ public void objectRenamed(NamingEvent evt) throws RemoteException; /** * Called when an object has been changed. * <p> * The binding of the changed object can be obtained using <tt>evt.getNewBinding()</tt>. Its old binding (before the * change) can be obtained using <tt>evt.getOldBinding()</tt>. * @param evt NamingEvent; The nonnull naming event. * @see NamingEvent#OBJECT_CHANGED * @throws RemoteException on network failure. */ public void objectChanged(NamingEvent evt) throws RemoteException; /** * Called when a naming exception is thrown while attempting to fire a <tt>NamingEvent</tt>. * @param evt NamingExceptionEvent; The nonnull event. * @throws RemoteException on network exception * @throws RemoteException on network failure */ void namingExceptionThrown(NamingExceptionEvent evt) throws RemoteException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface DeviceContextChangeListener {\n\n /**\n * Notification about start phase in device context, right after successful handshake\n * @param nodeId\n * @param success or failure\n */\n void deviceStartInitializationDone(final NodeId nodeId, final boolean success);\n\n /**\n ...
[ "0.6282508", "0.61442053", "0.60622835", "0.6035497", "0.60127395", "0.59687066", "0.5964633", "0.59441787", "0.59408283", "0.5929878", "0.58980024", "0.5876103", "0.58744496", "0.5864304", "0.58525306", "0.5851713", "0.5836189", "0.57959366", "0.57663286", "0.57533294", "0.5...
0.7296971
0
Called when an object has been added. The binding of the newly added object can be obtained using evt.getNewBinding().
public void objectAdded(NamingEvent evt) throws RemoteException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void add(GObject object);", "@Override\r\n\tpublic void insertObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "public void newBinding(BGMEvent e);", "@Override\n public boolean add(T1 o) //Modify to take in Authenication ID for future logging function\n {\n if(super.add(o)) {\n ...
[ "0.6716261", "0.6614098", "0.61712337", "0.6065266", "0.6052514", "0.594738", "0.59345555", "0.57551545", "0.5746784", "0.57268745", "0.57093763", "0.56869966", "0.5683473", "0.5682268", "0.5674519", "0.5640305", "0.5617637", "0.5589043", "0.55886173", "0.55857617", "0.556737...
0.7387639
0
Called when an object has been removed. The binding of the newly removed object can be obtained using evt.getOldBinding().
public void objectRemoved(NamingEvent evt) throws RemoteException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void deleteObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "public void remove(GObject object);", "@Override\npublic void remove(VirtualComponent comp, ObjectAdapter childAdapter) {\n\t\n}", "public void componentRemoved(GPaintable object);", "@Override\npublic void remove(ObjectAdapte...
[ "0.66654915", "0.6567474", "0.63814586", "0.6348833", "0.6326159", "0.6171055", "0.60668164", "0.60642797", "0.6049484", "0.6032508", "0.6019427", "0.6012087", "0.5995252", "0.5979112", "0.5978224", "0.59715384", "0.59595346", "0.594379", "0.59390455", "0.5935723", "0.5919091...
0.7699693
0
Called when an object has been renamed. The binding of the renamed object can be obtained using evt.getNewBinding(). Its old binding (before the rename) can be obtained using evt.getOldBinding(). One of these may be null if the old/new binding was outside the scope in which the listener has registered interest.
public void objectRenamed(NamingEvent evt) throws RemoteException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void objectChanged(NamingEvent evt) throws RemoteException;", "public void onNameChange(String newName) {\n\t\t\n\t}", "public void objectRemoved(NamingEvent evt) throws RemoteException;", "@Override\n public void rename(Name oldName, Name newName) throws NamingException {\n validSupportName...
[ "0.76042384", "0.6159553", "0.6122957", "0.6104385", "0.60249686", "0.6000069", "0.5941421", "0.5854349", "0.57199645", "0.5614832", "0.5610989", "0.55839944", "0.5558595", "0.5500921", "0.5470511", "0.5439371", "0.5419576", "0.5400927", "0.53915936", "0.5386495", "0.5361914"...
0.8071628
0
Called when an object has been changed. The binding of the changed object can be obtained using evt.getNewBinding(). Its old binding (before the change) can be obtained using evt.getOldBinding().
public void objectChanged(NamingEvent evt) throws RemoteException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void boundObjectChanged(Object componentValue) {\r\n this.boundObjectChanged(true, componentValue);\r\n }", "public void objectChanged(ObjectChangeEvent e) {\n\t\tString key = e.getAttributeName();\n\t\tStructure s = (Structure) attributes.get(key);\n\t\tif (s!=null) {\n\t\t\tStructure change...
[ "0.6602734", "0.65115213", "0.6335603", "0.61497706", "0.60487884", "0.60157", "0.59836274", "0.59205735", "0.59066045", "0.5869145", "0.58513725", "0.58417183", "0.5811243", "0.5798291", "0.57971734", "0.5779994", "0.57761675", "0.5765888", "0.5765122", "0.5753008", "0.57262...
0.7319324
0
Called when a naming exception is thrown while attempting to fire a NamingEvent.
void namingExceptionThrown(NamingExceptionEvent evt) throws RemoteException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ReservedNameException(String message, String name){\r\n super(message);\r\n this.name = name;\r\n }", "public void objectRenamed(NamingEvent evt) throws RemoteException;", "public ReservedNameException(String name){\r\n this(\"Reserved name: \" + name, name);\r\n }", "public...
[ "0.611637", "0.5857806", "0.57941765", "0.5718765", "0.57083786", "0.5694052", "0.5649545", "0.56438184", "0.56181806", "0.56140095", "0.55591995", "0.55413324", "0.55405277", "0.5537667", "0.55144405", "0.5465519", "0.5444873", "0.543717", "0.5433064", "0.5419959", "0.540257...
0.86277056
0
TODO Autogenerated method stub
@Override public Product update(Product entity) { 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
Set the managed object reference type, and value to ServiceInstance.
private void initSvcInstRef() { SVC_INST_REF.setType(SVC_INST_NAME); SVC_INST_REF.setValue(SVC_INST_NAME); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void setServiceType(String serviceType);", "void setClassOfService(ClassOfService serviceClass);", "public void set(String serverId,T object)\r\n\t{\r\n\t\tinstances.put(serverId, object);\r\n\t}", "public void setService(Service value) {\n\t\tthis._service = value;\n\t}", "public void setT...
[ "0.62541187", "0.61381406", "0.608214", "0.6029017", "0.5930166", "0.5818731", "0.576544", "0.5761448", "0.5757189", "0.5707279", "0.56359833", "0.5631953", "0.56137913", "0.55771106", "0.55771106", "0.55771106", "0.5561273", "0.5561273", "0.55448127", "0.5519622", "0.5509091...
0.59235597
5
Establishes session with the virtual center server.
public void connect() throws Exception { HostnameVerifier hv = new HostnameVerifier() { @Override public boolean verify(String urlHostName, SSLSession session) { return true; } }; trustAllHttpsCertificates(); HttpsURLConnection.setDefaultHostnameVerifier(hv); // These following methods have to be called in this order. initSvcInstRef(); initVimPort(); initServiceContent(); vimPort.login(serviceContent.getSessionManager(), user, password, null); initPropertyCollector(); initRootFolder(); isConnected = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupSession() {\n // TODO Retreived the cached Evernote AuthenticationResult if it exists\n// if (hasCachedEvernoteCredentials) {\n// AuthenticationResult result = new AuthenticationResult(authToken, noteStoreUrl, webApiUrlPrefix, userId);\n// session = new EvernoteSession(inf...
[ "0.6914366", "0.5867453", "0.5837169", "0.58340204", "0.5803412", "0.5792027", "0.57096034", "0.56795895", "0.56343967", "0.5627246", "0.55962694", "0.5579245", "0.55741113", "0.5554197", "0.55447865", "0.5537781", "0.54947895", "0.54880846", "0.54652715", "0.54392934", "0.54...
0.5273168
36
Disconnects the user session.
public void disconnect() { if (isConnected) { try { vimPort.logout(serviceContent.getSessionManager()); } catch (Exception e) { logger.trace("Failed to logout esx: " + host, e); } } isConnected = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void disconnect(){\n Session session = (Session)_sessionRef.get();\n if(session != null && session.isConnected()){\n session.disconnect();\n _sessionRef.set(null);\n }\n }", "void onDisconnect(User user);", "public void disconnect() {\n SharedPreferences prefs = Prefere...
[ "0.7676334", "0.70841783", "0.70200306", "0.7017205", "0.6953847", "0.6778077", "0.677226", "0.6692579", "0.66910416", "0.66815346", "0.6568488", "0.655676", "0.6547329", "0.6497375", "0.6457881", "0.64420754", "0.6440378", "0.64235955", "0.64054984", "0.6404522", "0.639988",...
0.7174336
1
version string is initially null
private Object[] waitForValues(ManagedObjectReference objmor, String[] filterProps, String[] endWaitProps, Object[][] expectedVals) throws Exception { String version = ""; Object[] endVals = new Object[endWaitProps.length]; Object[] filterVals = new Object[filterProps.length]; PropertyFilterSpec spec = new PropertyFilterSpec(); ObjectSpec oSpec = new ObjectSpec(); oSpec.setObj(objmor); oSpec.setSkip(Boolean.FALSE); spec.getObjectSet().add(oSpec); PropertySpec pSpec = new PropertySpec(); pSpec.getPathSet().addAll(Arrays.asList(filterProps)); pSpec.setType(objmor.getType()); spec.getPropSet().add(pSpec); ManagedObjectReference filterSpecRef = vimPort.createFilter(propCollector, spec, true); boolean reached = false; UpdateSet updateset = null; List<PropertyFilterUpdate> filtupary = null; List<ObjectUpdate> objupary = null; List<PropertyChange> propchgary = null; while (!reached) { updateset = vimPort.waitForUpdates(propCollector, version); if (updateset == null || updateset.getFilterSet() == null) { continue; } version = updateset.getVersion(); // Make this code more general purpose when PropCol changes later. filtupary = updateset.getFilterSet(); for (PropertyFilterUpdate filtup : filtupary) { objupary = filtup.getObjectSet(); for (ObjectUpdate objup : objupary) { if (objup.getKind() == ObjectUpdateKind.MODIFY || objup.getKind() == ObjectUpdateKind.ENTER || objup.getKind() == ObjectUpdateKind.LEAVE) { propchgary = objup.getChangeSet(); for (PropertyChange propchg : propchgary) { updateValues(endWaitProps, endVals, propchg); updateValues(filterProps, filterVals, propchg); } } } } Object expctdval = null; // Check if the expected values have been reached and exit the loop // if done. // Also exit the WaitForUpdates loop if this is the case. for (int chgi = 0; chgi < endVals.length && !reached; chgi++) { for (int vali = 0; vali < expectedVals[chgi].length && !reached; vali++) { expctdval = expectedVals[chgi][vali]; reached = expctdval.equals(endVals[chgi]) || reached; } } } // Destroy the filter when we are done. vimPort.destroyPropertyFilter(filterSpecRef); return filterVals; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "@Override\n public String ...
[ "0.7833991", "0.7833991", "0.7833991", "0.7833991", "0.7833991", "0.7833991", "0.7833991", "0.7833991", "0.7686232", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75...
0.0
-1
1. for no user 2. for denied user 3. exeisting user but failed login Creates new form Main
public Login() { initComponents(); txtAccountStatus.setVisible(false); showDate(); // Class para sa Date showTime(); // Class para sa Time }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void login() {\n if (usrField.getText().equals(\"\") || passwordField.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(rootPane,\n \"YOU MUST ENTER USER AND PASSWORD\",\n \"ERROR\",\n JOptionPane.WARNING_MESSAGE);\n ...
[ "0.6972043", "0.6832474", "0.67763215", "0.67534477", "0.66707385", "0.6629764", "0.6614548", "0.6606724", "0.65959996", "0.65527606", "0.65458906", "0.6523314", "0.65168685", "0.64969814", "0.6467351", "0.6461694", "0.641923", "0.64168316", "0.6413755", "0.64009506", "0.6397...
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() { jPanel1 = new javax.swing.JPanel(); sprtrDateTime = new javax.swing.JSeparator(); lblTime = new javax.swing.JLabel(); lblDate = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); lblUsername = new javax.swing.JLabel(); lblPassword = new javax.swing.JLabel(); txtPassword = new javax.swing.JPasswordField(); txtUsername = new javax.swing.JTextField(); cmdCancel = new javax.swing.JButton(); cmdLogin = new javax.swing.JButton(); txtAccountStatus = new javax.swing.JTextField(); lblBackround = new javax.swing.JLabel(); txtWew = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Barangay Records System: Login"); setMaximumSize(new java.awt.Dimension(860, 500)); setResizable(false); jPanel1.setLayout(null); jPanel1.add(sprtrDateTime); sprtrDateTime.setBounds(10, 450, 210, 20); lblTime.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N lblTime.setForeground(new java.awt.Color(0, 102, 255)); lblTime.setText("Time"); jPanel1.add(lblTime); lblTime.setBounds(20, 450, 210, 30); lblDate.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N lblDate.setForeground(new java.awt.Color(0, 102, 255)); lblDate.setText("Date"); jPanel1.add(lblDate); lblDate.setBounds(20, 420, 210, 30); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 210, Short.MAX_VALUE) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 60, Short.MAX_VALUE) ); jPanel1.add(jPanel2); jPanel2.setBounds(10, 420, 210, 60); lblUsername.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N lblUsername.setText("Username:"); jPanel1.add(lblUsername); lblUsername.setBounds(540, 340, 70, 30); lblPassword.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N lblPassword.setText(" Password:"); jPanel1.add(lblPassword); lblPassword.setBounds(540, 380, 70, 30); txtPassword.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jPanel1.add(txtPassword); txtPassword.setBounds(620, 380, 180, 30); txtUsername.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jPanel1.add(txtUsername); txtUsername.setBounds(620, 340, 180, 30); cmdCancel.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N cmdCancel.setText("Cancel"); cmdCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cmdCancelActionPerformed(evt); } }); jPanel1.add(cmdCancel); cmdCancel.setBounds(720, 420, 80, 40); cmdLogin.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N cmdLogin.setText("Login"); cmdLogin.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cmdLoginActionPerformed(evt); } }); jPanel1.add(cmdLogin); cmdLogin.setBounds(620, 420, 80, 40); txtAccountStatus.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtAccountStatusActionPerformed(evt); } }); jPanel1.add(txtAccountStatus); txtAccountStatus.setBounds(490, 290, 30, 20); lblBackround.setIcon(new javax.swing.ImageIcon(getClass().getResource("/barangaysystem/image/LoginUI.jpg"))); // NOI18N jPanel1.add(lblBackround); lblBackround.setBounds(0, 0, 860, 500); txtWew.setText("jLabel1"); jPanel1.add(txtWew); txtWew.setBounds(320, 50, 34, 14); jLabel2.setText("jLabel2"); jPanel1.add(jLabel2); jLabel2.setBounds(320, 70, 34, 14); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 860, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE) ); getAccessibleContext().setAccessibleDescription(""); pack(); setLocationRelativeTo(null); }
{ "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.7321342", "0.7292121", "0.7292121", "0.7292121", "0.72863305", "0.7249828", "0.7213628", "0.7209084", "0.7197292", "0.71912086", "0.7185135", "0.7159969", "0.7148876", "0.70944786", "0.70817256", "0.7057678", "0.69884527", "0.69786763", "0.69555986", "0.69548863", "0.69453...
0.0
-1
Push element x to the back of queue.
public void push(int x) { inStack.push(x); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void push(int x) {\n queue.addLast(x);\n }", "public void push(int x) {\n queue.addLast(x);\n }", "public void push(int x) {\n if (!reverseQueue.isEmpty()) {\n normalQueue.offer(reverseQueue.poll());\n }\n normalQueue.offer(x);\n }", "publ...
[ "0.82624036", "0.8259673", "0.81935894", "0.81571823", "0.80487853", "0.8009802", "0.7990561", "0.79842633", "0.79804295", "0.7975267", "0.7919498", "0.78962463", "0.7856843", "0.78444326", "0.7841012", "0.77275115", "0.7722426", "0.7722426", "0.76359296", "0.76308316", "0.76...
0.6589431
72
Removes the element from in front of queue.
public void pop() { readyForPop(); outStack.pop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remove() {\n\t\tprocess temp = queue.removeFirst();\n\t}", "public void pop() {\n queue.remove();\n }", "public void dequeue()\n\t{\n\t\tq.removeFirst();\n\t}", "public void pop() {\n queue.remove(0);\n }", "public long remove(){\n\t\t\r\n\t\t\tlong temp = queueArray...
[ "0.74406934", "0.7374841", "0.7309438", "0.727601", "0.72067803", "0.72031546", "0.7092046", "0.7080782", "0.7052602", "0.7033634", "0.70175695", "0.69679564", "0.6967259", "0.6959936", "0.6959073", "0.6958906", "0.6947531", "0.69337666", "0.6920043", "0.689548", "0.6879026",...
0.0
-1
Get the front element.
public int peek() { readyForPop(); return outStack.peek(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getFront() throws Exception {\n\t\tif(data[front]!=null)\n\t\t\n\t\t return data[front];\n\t\treturn null;\n\t}", "public int getFront() {\n return !isEmpty() ? elements[last - 1] : -1;\n }", "@Override\n\tpublic E getFront() {\n\t\treturn data[front];\n\t}", "public T getFront();"...
[ "0.7788042", "0.77603334", "0.77359986", "0.770913", "0.7659393", "0.7649537", "0.76232344", "0.7567912", "0.7567317", "0.75489664", "0.754895", "0.75468546", "0.75373614", "0.75340813", "0.7465325", "0.7453483", "0.73273367", "0.7313527", "0.7309557", "0.73002553", "0.719587...
0.0
-1
Return whether the queue is empty.
public boolean empty() { return inStack.empty() && outStack.empty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean is_empty() {\n\t\tif (queue.size() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isEmpty() {\n return this.queue.size() == 0;\n }", "boolean isEmpty() {\n return queue.isEmpty();\n }", "public boolean isEmpty() {\n\t\treturn que...
[ "0.9052639", "0.8951558", "0.8884992", "0.88849777", "0.88849777", "0.8866142", "0.8851901", "0.88444257", "0.88393325", "0.8804962", "0.8804962", "0.8804962", "0.8804962", "0.8804962", "0.8804962", "0.8804962", "0.8736885", "0.8736885", "0.8736885", "0.8736885", "0.8736885",...
0.0
-1
get counts by different color.
@GET @Path("color") @Produces(MediaType.APPLICATION_JSON) public Response getCounts(@QueryParam("color") String type) { JSONObject commitCounts = db.getCounts(type); List<Integer> counts = new ArrayList<>(); List<String> pnames = projectDb.listAllProjectNames(); String status = ""; for (String pname : pnames) { int count = commitCounts.optInt(pname); counts.add(count); } StatusEnum statusEnum = StatusEnum.getStatusEnum(type); switch (statusEnum) { case BUILD_SUCCESS: status = "success"; break; case COMPILE_FAILURE: status = "compile failure"; break; case CHECKSTYLE_FAILURE: status = "checkstyle failure"; break; case UNIT_TEST_FAILURE: status = "JUnit failure"; break; case INITIALIZATION: status = "not build"; break; default: break; } JSONObject ob = new JSONObject(); ob.put("data", counts); ob.put("name", status); return Response.ok().entity(ob.toString()).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getColoredProbesCount(int colorIndex);", "int getNumColors();", "public native int getTotalColors() throws MagickException;", "public native int getNumberColors() throws MagickException;", "public int getColoredExperimentsCount(int colorIndex);", "public int getColorCount(int idx) {\n \t\t\tre...
[ "0.72069883", "0.70684564", "0.6848518", "0.68331414", "0.6763019", "0.6493675", "0.6481149", "0.6464001", "0.63204235", "0.6311411", "0.6126773", "0.59865046", "0.59711987", "0.59711987", "0.5936294", "0.5929207", "0.59066683", "0.58328384", "0.5785318", "0.5773661", "0.5752...
0.6466323
7
get commit result by stuId and hw.
@GET @Path("result") @Produces(MediaType.TEXT_PLAIN) public Response getCommitResultByStudentAndHw(@QueryParam("proName") String proName, @QueryParam("userName") String userName) { int id = userDb.getUser(userName).getId(); CommitResult commitResult = db.getCommitResultByStudentAndHw(id, proName); String circleColor = "circle " + commitResult.getStatus(); String result = userName + "_" + proName + "," + circleColor + "," + (commitResult.getCommit() + 1); return Response.ok().entity(result).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCommitResult(String userName, String proName) {\n int id = userDb.getUser(userName).getId();\n return db.getCommitResultByStudentAndHw(id, proName).getStatus();\n }", "public Commit findCommit(String hash) {\r\n Query<Commit> commitQuery = datastore.find(Commit.class);\r\n commitQue...
[ "0.63204", "0.5670476", "0.56401485", "0.55103254", "0.5509402", "0.55078536", "0.5431899", "0.5313572", "0.5311796", "0.5243043", "0.522123", "0.51231986", "0.50842345", "0.5052723", "0.49969205", "0.49862888", "0.4956169", "0.49192423", "0.48864165", "0.48610637", "0.485193...
0.60920817
1
get all commit result.
@GET @Path("all") @Produces(MediaType.TEXT_PLAIN) public Response getCommitResult() { JSONArray array = new JSONArray(); JSONObject result = new JSONObject(); List<User> users = userDb.listAllUsers(); for (User user : users) { JSONObject ob = db.getCommitResultByStudent(user.getId()); array.put(ob); } result.put("result", array); return Response.ok().entity(result.toString()).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Commit> getAllCommits() {\r\n return datastore.createQuery(Commit.class)\r\n .field(\"vcs_system_id\").equal(vcSystem.getId())\r\n .asList();\r\n }", "private ArrayList getCommitteList() {\r\n /**\r\n * This sends the functionType as 'G' to the servlet indicating to\r...
[ "0.6325058", "0.60665834", "0.5885102", "0.58463204", "0.584473", "0.57539904", "0.57397664", "0.57228905", "0.5689331", "0.56708384", "0.5605492", "0.5560056", "0.5512259", "0.55087614", "0.5493862", "0.54619884", "0.54529005", "0.5443253", "0.5405001", "0.53920037", "0.5363...
0.73824984
0
get commit result by stuId and hw.
public String getCommitResult(String userName, String proName) { int id = userDb.getUser(userName).getId(); return db.getCommitResultByStudentAndHw(id, proName).getStatus(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET\n @Path(\"result\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response getCommitResultByStudentAndHw(@QueryParam(\"proName\") String proName,\n @QueryParam(\"userName\") String userName) {\n int id = userDb.getUser(userName).getId();\n\n CommitResult commitResult = db.getCommitResultByStudentAn...
[ "0.60919976", "0.56708086", "0.5639327", "0.55102175", "0.55086607", "0.5507639", "0.543109", "0.5312019", "0.5311535", "0.5242895", "0.5219726", "0.5122393", "0.5084045", "0.5052188", "0.4995716", "0.49849793", "0.4954477", "0.49173304", "0.4887534", "0.4861879", "0.48512194...
0.63202727
0
update stu project commit record.
@POST @Path("update") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public Response updateCommitResult(@FormParam("user") String userName, @FormParam("proName") String proName) { JSONObject ob = new JSONObject(); if (!userName.equals("root")) { JenkinsService jenkinsService = new JenkinsService(); StudentDashChoosePro stuDashChoPro = new StudentDashChoosePro(); int lastCommitNum = jenkinsService.getProjectCommitCount(proName, userName); int commitCount = lastCommitNum - 1; String proType = projectDb.getAssignmentType(proName); String buildApiJson = stuDashChoPro.getBuildApiJson(lastCommitNum, userName, proName); String strDate = stuDashChoPro.getCommitTime(buildApiJson); String[] dates = strDate.split(" "); String status = stuDashChoPro.getCommitStatus(lastCommitNum, userName, proName, buildApiJson, proType); int id = userDb.getUser(userName).getId(); boolean check = db.checkJenkinsJobTimestamp(id, proName); if (check) { db.updateJenkinsCommitCount(id, proName, commitCount, status); } else { db.insertJenkinsCommitCount(id, proName, commitCount, status); } db.updateJenkinsJobTimestamp(id, proName, strDate); boolean inDb = commitRecordDb.checkRecord(id, proName, dates[0], dates[1]); if (inDb) { commitRecordDb.updateRecordStatus(id, proName, status, dates[0], dates[1]); } else { commitRecordDb.insertCommitRecord(id, proName, status, dates[0], dates[1]); } updateCommitRecordState(); ob.put("userName", userName); ob.put("proName", proName); ob.put("commitCount", commitCount); ob.put("dates", dates[0]); ob.put("dates1", dates[1]); ob.put("status", status); } return Response.ok().entity(ob.toString()).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int updateByPrimaryKey(UserOperateProject record);", "int updateByPrimaryKey(Project record);", "public boolean updateProject(Project project);", "int updateByPrimaryKey(ProjGroup record);", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n\tpublic ProyectoDO update(ProyectoDO project) throws C...
[ "0.6724816", "0.65556616", "0.63477445", "0.63081247", "0.628779", "0.62567055", "0.6151761", "0.61502886", "0.61387277", "0.61206794", "0.60627425", "0.6055018", "0.60458237", "0.60319483", "0.5945332", "0.59377754", "0.593634", "0.5933434", "0.5909056", "0.58477217", "0.583...
0.6146496
8
update Commit_Record_State DB's data.
public void updateCommitRecordState() { List<String> lsNames = new ArrayList<>(); lsNames = projectDb.listAllProjectNames(); for (String name : lsNames) { Map<String, Integer> map = commitRecordDb.getCommitRecordStateCounts(name); int bs = 0; int ini = 0; int utf = 0; int csf = 0; int cpf = 0; if (map.containsKey(StatusEnum.BUILD_SUCCESS.getTypeName())) { bs = map.get(StatusEnum.BUILD_SUCCESS.getTypeName()); } if (map.containsKey(StatusEnum.INITIALIZATION.getTypeName())) { ini = map.get(StatusEnum.INITIALIZATION.getTypeName()); } if (map.containsKey(StatusEnum.UNIT_TEST_FAILURE.getTypeName())) { utf = map.get(StatusEnum.UNIT_TEST_FAILURE.getTypeName()); } if (map.containsKey(StatusEnum.CHECKSTYLE_FAILURE.getTypeName())) { csf = map.get(StatusEnum.CHECKSTYLE_FAILURE.getTypeName()); } if (map.containsKey(StatusEnum.COMPILE_FAILURE.getTypeName())) { cpf = map.get(StatusEnum.COMPILE_FAILURE.getTypeName()); } int ccs = 0; ccs = bs + utf + csf + cpf; boolean check; check = crsdb.checkCommitRecordStatehw(name); if (check) { crsdb.updateCommitRecordState(name, bs, csf, cpf, utf, ini, ccs); } else { crsdb.addCommitRecordState(name, bs, csf, cpf, utf, ini, ccs); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void commit()\n\t{\n\t\t_Status = DBRowStatus.Unchanged;\n\t}", "void committed() {\n\t\t\tfor (Entry<Integer, Object> entry : newData.entrySet())\n\t\t\t\toriginalData.put(entry.getKey(), entry.getValue());\n\t\t\treset();\n\t\t\taction = RowAction.UPDATE;\n\t\t}", "public void updateRecord() throws...
[ "0.69194263", "0.6584306", "0.6575718", "0.63218546", "0.6248577", "0.6151959", "0.6148879", "0.60799986", "0.6066856", "0.6048001", "0.6014509", "0.6010325", "0.59958357", "0.5990655", "0.59722483", "0.5963134", "0.5955959", "0.5953004", "0.5935319", "0.59234977", "0.5922538...
0.7507856
0
delete build result of hw.
public void deleteResult(String hw) { IDatabase database = new MySqlDatabase(); Connection connection = database.getConnection(); db.deleteResult(hw); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cleanAutomationResults() {\n \tLOG.info(\"Deleting unneccessary automation results.\");\n \t\n \t// Stop the graph database because it gets deleted\n \tDBUtil.closeGraph();\n \t\n \t// Remove clustering results\n \tFileUtil.deleteFileOrDirectory(clArgs.clusteringOutDir);\n ...
[ "0.6379832", "0.60214525", "0.59558034", "0.59180135", "0.5882501", "0.5835209", "0.58107793", "0.5794409", "0.56863505", "0.5678449", "0.5657575", "0.56394815", "0.56394815", "0.56394815", "0.56394815", "0.5611113", "0.5611113", "0.5611113", "0.5574046", "0.55452466", "0.553...
0.7049606
0
returns id of the problem
public int getProblemId() { return problemId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getProblemId() {\n return this.problemId;\n }", "public Problem(String id) {\n\t\t this.id=id;\n\t }", "public void setProblemId(String id) {\n this.problemId = id;\n }", "public int getProblemId(String title) {\n int problemId = -1;\n String query = \"select ...
[ "0.7462552", "0.69851935", "0.6771313", "0.670854", "0.6513685", "0.6513685", "0.6513685", "0.6499365", "0.6499365", "0.64950657", "0.63764083", "0.63764083", "0.63764083", "0.63764083", "0.63764083", "0.63764083", "0.63764083", "0.63764083", "0.63764083", "0.63764083", "0.63...
0.77793604
0