buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
private java.util.ArrayList<java.lang.Integer> getSelectedDays() { days.clear(); for (int i = 0; i < (tgWeekDays.length); i++) { if (tgWeekDays[i].isChecked()) { days.add(java.lang.Integer.parseInt(tgWeekDays[i].getTag().toString())); android.util.Log.e("tag added", tgWeekDays[i]...
private java.util.ArrayList<java.lang.Integer> getSelectedDays() { days.clear(); for (int i = 0; i < (tgWeekDays.length); i++) { if (tgWeekDays[i].isChecked()) { days.add(java.lang.Integer.parseInt(tgWeekDays[i].getTag().toString())); } } return days; }
public boolean updateInvalidLocationTest() { boolean failure; failure = conn.updateTagInDatabase(upc1, firstSerials[0], new edu.auburn.eng.sks0024.rfid_connector_test.ReaderLocation(locations[0], locations[1]), c); failure &= conn.updateTagInDatabase(upc2, firstSerials[1], new edu.auburn.eng.sks0024.rfid_co...
public boolean updateInvalidLocationTest() { boolean failure; failure = conn.updateTagInDatabase(upc1, firstSerials[0], new edu.auburn.eng.sks0024.rfid_connector_test.ReaderLocation(locations[0], locations[1]), c); failure &= conn.updateTagInDatabase(upc2, firstSerials[1], new edu.auburn.eng.sks0024.rfid_co...
public void initialHarvest() { java.util.Iterator<player.Player> players = model.getPlayerIterator(); while (players.hasNext()) { player.Player p = players.next(); model.Construction.VertexBuilding firstBuilding = p.getBuilding(1); model.harvest(firstBuilding); } }
public void initialHarvest() { java.util.Iterator<player.Player> players = model.getPlayerIterator(); while (players.hasNext()) { player.Player p = players.next(); model.Construction.VertexBuilding firstBuilding = p.getBuilding(0); model.harvest(firstBuilding); } }
public RecyclableObject getRecyclable(java.lang.Class cls, java.lang.Object... args) { for (RecyclableObject r : recyclables) { if (r.isSafeToRecycle()) { r.onRecycle(args); return r; } } try { RecyclableObject obj = ((RecyclableObject) (recyclableClass.newIns...
public RecyclableObject getRecyclable(java.lang.Class cls, java.lang.Object... args) { for (RecyclableObject r : recyclables) { if (r.isSafeToRecycle()) { r.onRecycle(args); return r; } } try { RecyclableObject obj = ((RecyclableObject) (cls.newInstance())); ...
private synchronized void initEventLoop() { if ((eventloop) == null) { eventloop = new java.util.concurrent.ScheduledThreadPoolExecutor(1, new java.util.concurrent.ThreadFactory() { public java.lang.Thread newThread(java.lang.Runnable runnable) { java.lang.Thread thread = new jav...
private synchronized void initEventLoop() { if ((eventloop) != null) { return ; } eventloop = new java.util.concurrent.ScheduledThreadPoolExecutor(1, new java.util.concurrent.ThreadFactory() { public java.lang.Thread newThread(java.lang.Runnable runnable) { java.lang.Thread threa...
private void toggleProgressIfGroupsShowing() { if (org.grassroot.android.services.GroupService.isFetchingGroups) { android.util.Log.d(TAG, "group service is fetching, hence showing ..."); showProgress(); }else if ((groupListRowAdapter) == null) { android.util.Log.d(TAG, "grou...
private void toggleProgressIfGroupsShowing() { if (org.grassroot.android.services.GroupService.isFetchingGroups) { android.util.Log.d(TAG, "group service is fetching, hence showing ..."); showProgress(); }else if ((groupListRowAdapter) == null) { android.util.Log.d(TAG, "grou...
static void loadDataValues(android.content.Context context, org.hisp.dhis.android.sdk.network.DhisApi dhisApi) throws org.hisp.dhis.android.sdk.network.APIException { org.hisp.dhis.android.sdk.persistence.Dhis2Application.getEventBus().post(new org.hisp.dhis.android.sdk.events.UiEvent(UiEvent.UiEventType.SYNCING_ST...
static void loadDataValues(android.content.Context context, org.hisp.dhis.android.sdk.network.DhisApi dhisApi) throws org.hisp.dhis.android.sdk.network.APIException { org.hisp.dhis.android.sdk.persistence.Dhis2Application.getEventBus().post(new org.hisp.dhis.android.sdk.events.UiEvent(UiEvent.UiEventType.SYNCING_ST...
private java.lang.Object readResolve() { if ((properties) == null) { properties = new hudson.util.DescribableList<hudson.tools.ToolProperty<?>, hudson.tools.ToolPropertyDescriptor>(hudson.model.Saveable.NOOP); } for (hudson.tools.ToolProperty<?> p : properties) { _setTool(p, this); } ...
public java.lang.Object readResolve() { if ((properties) == null) { properties = new hudson.util.DescribableList<hudson.tools.ToolProperty<?>, hudson.tools.ToolPropertyDescriptor>(hudson.model.Saveable.NOOP); } for (hudson.tools.ToolProperty<?> p : properties) { _setTool(p, this); } ...
public codeu.chat.common.Interests newInterest(codeu.chat.util.Uuid userid, codeu.chat.util.Uuid interest, codeu.chat.util.Time creationTime) { final codeu.chat.common.User foundUser = model.userById().first(userid); if (foundUser != null) { model.add(userid, interest); codeu.chat.server.Control...
public codeu.chat.common.Interests newInterest(codeu.chat.util.Uuid userid, codeu.chat.util.Uuid interest, codeu.chat.util.Time creationTime) { final codeu.chat.common.User foundUser = model.userById().first(userid); if (foundUser != null) { model.add(userid, interest, creationTime); codeu.chat....
private void Reset(boolean transmit) throws java.lang.Exception { pipelineserver.stage.Var.Var.reset(); Runnable = true; for (int i = 0; i < (codeLen); i++) { memory[i] = code[i]; } if (transmit) { Refresh(); } }
private void Reset() throws java.lang.Exception { pipelineserver.stage.Var.Var.reset(); Runnable = true; for (int i = 0; i < (codeLen); i++) { memory[i] = code[i]; } Refresh(); }
public boolean isOpen(int i, int j) { if ((i <= 0) || (i > (n))) { throw new java.lang.IndexOutOfBoundsException("row index i out of bounds"); } if ((j <= 0) || (j > (n))) { throw new java.lang.IndexOutOfBoundsException("column index j out of bounds"); } if ((grid[(i - 1)][(j - 1)]) ...
public boolean isOpen(int i, int j) { if ((i <= 0) || (i > (n))) { throw new java.lang.IndexOutOfBoundsException("row index i out of bounds"); } if ((j <= 0) || (j > (n))) { throw new java.lang.IndexOutOfBoundsException("column index j out of bounds"); } return (grid[(i - 1)][(j - 1)...
public void onAuthStateChanged(@android.support.annotation.NonNull com.google.firebase.auth.FirebaseAuth firebaseAuth) { com.google.firebase.auth.FirebaseUser user = firebaseAuth.getCurrentUser(); if (user != null) { android.util.Log.d(com.example.sjors.sjors_witteveen_pset6.SignInActivity.TAG, ("onAuth...
public void onAuthStateChanged(@android.support.annotation.NonNull com.google.firebase.auth.FirebaseAuth firebaseAuth) { com.google.firebase.auth.FirebaseUser user = firebaseAuth.getCurrentUser(); if (user != null) { android.util.Log.d(com.example.sjors.sjors_witteveen_pset6.SignInActivity.TAG, ("onAuth...
private boolean matchesNameFilter(com.mfranklin.fridgeapp.data_model.FoodItem item) { android.util.Log.d("FoodItemAdapter", "filtering on name"); if (((nameFilter) == null) || ((nameFilter.length()) == 0)) return true; java.lang.String[] nameWords = item.type.name.split("\\s+"); for (java.l...
private boolean matchesNameFilter(com.mfranklin.fridgeapp.data_model.FoodItem item) { if (((nameFilter) == null) || ((nameFilter.length()) == 0)) return true; java.lang.String[] nameWords = item.type.name.split("\\s+"); for (java.lang.String nameWord : nameWords) if (nameWord.toLowerCas...
public void actionPerformed(java.awt.event.ActionEvent e) { javax.swing.JComboBox bx = ((javax.swing.JComboBox) (e.getSource())); java.lang.String x = ((java.lang.String) (bx.getSelectedItem())); calGUI.AddView.updateDays(dayList, x); }
public void actionPerformed(java.awt.event.ActionEvent e) { javax.swing.JComboBox bx = ((javax.swing.JComboBox) (e.getSource())); java.lang.String x = ((java.lang.String) (bx.getSelectedItem())); if (x != null) { calGUI.AddView.updateDays(dayList, x); } }
public static void main(java.lang.String[] args) { int screenH = 640; int screenW = 1024; try { org.newdawn.slick.AppGameContainer appgc; appgc = new org.newdawn.slick.AppGameContainer(new example.SimpleSlickGame("Breakout")); appgc.setDisplayMode(screenW, screenH, true); app...
public static void main(java.lang.String[] args) { int screenH = 640; int screenW = 1024; try { org.newdawn.slick.AppGameContainer appgc; appgc = new org.newdawn.slick.AppGameContainer(new example.SimpleSlickGame("Breakout")); appgc.setDisplayMode(screenW, screenH, false); ap...
private void successInstance() { try { end(); addPropertiesSuccess(); addPropertiesProcessingTime(); writePropertiesToLog(this.auditor, org.apache.log4j.Level.INFO); } catch (java.lang.Exception e) { logger.error(("Failed logging Scheduler transaction success: " + (e.getM...
protected void successInstance() { try { end(); addPropertiesSuccess(); addPropertiesProcessingTime(); writePropertiesToLog(this.auditor, org.apache.log4j.Level.INFO); } catch (java.lang.Exception e) { logger.error(("Failed logging Scheduler transaction success: " + (e.ge...
public void refreshMyBookings() { android.app.Activity _activity = getActivity(); android.app.FragmentManager fm = mActivity.getFragmentManager(); android.app.Fragment currentFragment = fm.findFragmentByTag(MainActivity.MY_BOOKINGS_FRAGMENT_TAG); final android.app.FragmentTransaction ft = fm.beginTransa...
public void refreshMyBookings() { android.app.FragmentManager fm = mActivity.getFragmentManager(); android.app.Fragment currentFragment = fm.findFragmentByTag(MainActivity.MY_BOOKINGS_FRAGMENT_TAG); final android.app.FragmentTransaction ft = fm.beginTransaction(); ft.detach(currentFragment); ft.atta...
protected void bleCharacteristicIndication(java.lang.String address, java.lang.String uuid, int status) { android.content.Intent intent = new android.content.Intent(com.hypercryptic.bleware.BLEService.BLE_CHARACTERISTIC_INDICATION); intent.putExtra(com.hypercryptic.bleware.BLEService.EXTRA_ADDR, address); i...
public void bleCharacteristicIndication(java.lang.String address, java.lang.String uuid, int status) { android.content.Intent intent = new android.content.Intent(com.hypercryptic.bleware.BLEService.BLE_CHARACTERISTIC_INDICATION); intent.putExtra(com.hypercryptic.bleware.BLEService.EXTRA_ADDR, address); inte...
public static fts.bean.Page getPage(java.lang.StringBuilder sb) { java.lang.String pageContent = sb.toString().replaceAll("<style\\b[^>]*>([\\s\\S]*?)</style>", "").replaceAll("<script\\b[^>]*>([\\s\\S]*?)</script>", "").replaceAll("<[^>]*>", " ").replaceAll("(\\s+)", " ").trim(); return new fts.bean.Page("", f...
public static fts.bean.Page getPage(java.lang.String url, java.lang.StringBuilder sb) { java.lang.String pageContent = sb.toString().replaceAll("<style\\b[^>]*>([\\s\\S]*?)</style>", "").replaceAll("<script\\b[^>]*>([\\s\\S]*?)</script>", "").replaceAll("<[^>]*>", " ").replaceAll("(\\s+)", " ").trim(); return n...
private void writeArticleAction(java.lang.String arg) { com.csci5448.accounts.JournalistAccount currentAccount = com.csci5448.control.Controller.getCurrentAccount(com.csci5448.accounts.JournalistAccount.class); if (!(currentAccount.isProfessionVerified())) { java.lang.System.out.println(("\tYour profess...
private void writeArticleAction(java.lang.String arg) { com.csci5448.accounts.JournalistAccount currentAccount = com.csci5448.control.Controller.getCurrentAccount(com.csci5448.accounts.JournalistAccount.class); if (!(currentAccount.isProfessionVerified())) { java.lang.System.out.println(("\tYour profess...
protected java.lang.Object doInBackground(java.lang.Object... arg0) { int wordBookId = java.lang.Integer.parseInt(((java.lang.String) (arg0[0]))); java.util.List<edu.iedu.flashcard.dao.domain.Word> test = edu.iedu.flashcard.service.WordService.getWordList(wordBookId); wordList.addAll(test); adapter.noti...
protected java.lang.Object doInBackground(java.lang.Object... arg0) { int wordBookId = ((int) (arg0[0])); java.util.List<edu.iedu.flashcard.dao.domain.Word> test = edu.iedu.flashcard.service.WordService.getWordList(wordBookId); wordList.addAll(test); adapter.notifyDataSetChanged(); return null; }
public void enqueue(Item item) { if (item == null) { throw new java.lang.NullPointerException(); } if (((tail) + 1) == (queue.length)) { queue = doubleArray(queue); } queue[((tail)++)] = item; }
public void enqueue(Item item) { if (item == null) { throw new java.lang.NullPointerException(); } if (((tail) + 1) == (queue.length)) { queue = doubleArray(queue); } queue[(++(tail))] = item; }
public java.lang.String startGame(@com.collegeboard.assessment.guesser.spring.RequestParam int bound, @com.collegeboard.assessment.guesser.spring.RequestParam int bound2) { org.json.JSONObject jsonObject = new org.json.JSONObject(); try { guesser = new com.collegeboard.assessment.guesser.Guesser(bound, ...
public java.lang.String startGame(@com.collegeboard.assessment.guesser.spring.RequestParam int bound, @com.collegeboard.assessment.guesser.spring.RequestParam int bound2) { org.json.JSONObject jsonObject = new org.json.JSONObject(); try { guesser = new com.collegeboard.assessment.guesser.Guesser(bound, ...
public <Arguments extends ceylon.language.Sequential<? extends java.lang.Object>> ceylon.language.Sequential<? extends ceylon.language.meta.model.FunctionModel<Type, Arguments>> getDeclaredCallableConstructors(com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor reified$Arguments, @com.redhat.ceylon.compiler.ja...
public <Arguments extends ceylon.language.Sequential<? extends java.lang.Object>> ceylon.language.Sequential<? extends ceylon.language.meta.model.FunctionModel<Type, Arguments>> getDeclaredCallableConstructors(com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor reified$Arguments, @com.redhat.ceylon.compiler.ja...
public java.lang.String[] getAllNames() { java.lang.System.out.println(searchTable); java.lang.String[] names = new java.lang.String[searchTable.size()]; java.util.Enumeration<java.lang.String> keys = searchTable.keys(); int i = 0; while (keys.hasMoreElements()) { names[i] = keys.nextElement...
public java.lang.String[] getAllNames() { java.lang.String[] names = new java.lang.String[searchTable.size()]; java.util.Enumeration<java.lang.String> keys = searchTable.keys(); int i = 0; while (keys.hasMoreElements()) { names[i] = keys.nextElement(); i++; } return names; }
private boolean isBEqual(Utilities.Instruction i) { if (((bInstruction) != null) && ((i.bInstruction) != null)) return bInstruction.isDuplicate(i.bInstruction); if (((bConstant) != null) && ((i.bConstant) != null)) return bConstant.equals(i.bConstant); return false; }
private boolean isBEqual(Utilities.Instruction i) { if (((bInstruction) != null) && ((i.bInstruction) != null)) return ((bInstruction) == (i.bInstruction)) || (bInstruction.isDuplicate(i.bInstruction)); if (((bConstant) != null) && ((i.bConstant) != null)) return bConstant.equals(i.bConstan...
public static boolean allLetters(java.lang.String string) { if ((string == null) || (com.example.miljanrakita.shoppingapplication.Util.Util.isEmpty(string))) return false; char[] arr = string.toCharArray(); for (char c : arr) if (!(((c >= 'a') && (c < 'z')) || ((c >= 'A') && (c <= 'Z'))...
public static boolean allLetters(java.lang.String string) { if ((string == null) || (com.example.miljanrakita.shoppingapplication.Util.Util.isEmpty(string))) return false; char[] arr = string.toCharArray(); for (char c : arr) if (!(((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')...
private stroom.index.server.IndexShardWriter getIndexShardWriter() throws stroom.index.server.IndexException { indexShardWriter = indexShardCache.get(indexShardKey); if ((indexShardWriter) == null) { throw new stroom.index.server.IndexException((("Unable to get writer for index '" + (indexShardKey.getIn...
private stroom.index.server.IndexShardWriter getIndexShardWriter() throws stroom.index.server.IndexException { final stroom.index.server.IndexShardWriter indexShardWriter = indexShardCache.get(indexShardKey); if (indexShardWriter == null) { throw new stroom.index.server.IndexException((("Unable to get w...
public void testExcecutionOfLpSolve() throws java.io.FileNotFoundException, javax.script.ScriptException { com.acuo.common.model.ids.ClientId clientId = com.acuo.common.model.ids.ClientId.fromString("999"); java.util.Set<java.lang.String> msIds = com.google.common.collect.ImmutableSet.of("msp38"); java.lang...
public void testExcecutionOfLpSolve() throws java.io.FileNotFoundException, javax.script.ScriptException { com.acuo.common.model.ids.ClientId clientId = com.acuo.common.model.ids.ClientId.fromString("999"); java.util.Set<java.lang.String> msIds = com.google.common.collect.ImmutableSet.of("msp38"); java.lang...
public void onActivityResult(int requestCode, int resultCode, android.content.Intent data) { if (requestCode == (com.eleith.calchoochoo.utils.IntentKeys.STOP_SEARCH_RESULT)) { android.os.Bundle bundle = data.getExtras(); java.lang.String stopId = bundle.getString(BundleKeys.STOP); if (result...
public void onActivityResult(int requestCode, int resultCode, android.content.Intent data) { if (requestCode == (com.eleith.calchoochoo.utils.IntentKeys.STOP_SEARCH_RESULT)) { if (data != null) { android.os.Bundle bundle = data.getExtras(); java.lang.String stopId = bundle.getString(...
public void receive(audio.squelch.SquelchState state) { audio.AudioModule.mLog.debug(("Squelch State:" + state)); if ((state == (audio.squelch.SquelchState.SQUELCH)) && ((mAudioPacketListener) != null)) { mAudioPacketListener.receive(new audio.AudioPacket(AudioPacket.Type.END, mAudioMetadata.copyOf()));...
public void receive(audio.squelch.SquelchState state) { if ((state == (audio.squelch.SquelchState.SQUELCH)) && ((mAudioPacketListener) != null)) { mAudioPacketListener.receive(new audio.AudioPacket(AudioPacket.Type.END, mAudioMetadata.copyOf())); } mSquelchState = state; }
protected void replaceFirstNode(ru.datastructure.ycache.Node<K, V> node) { if ((getHead()) == null) { setHead(node); setTail(node); }else { getHead().prev = node; node.next = getHead(); setHead(node); } }
protected void replaceFirstNode(ru.datastructure.ycache.Node<K, V> node) { if ((getHead()) == node) { return ; } if ((getHead()) == null) { setHead(node); setTail(node); }else { getHead().prev = node; node.next = getHead(); setHead(node); } }
public void testBeelineHiveConfVariable() throws java.lang.Throwable { java.util.List<java.lang.String> argList = getBaseArgs(org.apache.hive.beeline.TestBeeLineWithArgs.miniHS2.getBaseJdbcURL()); argList.add("--hiveconf"); argList.add("test.hive.table.name=dummy"); final java.lang.String SCRIPT_TEXT = ...
public void testBeelineHiveConfVariable() throws java.lang.Throwable { java.util.List<java.lang.String> argList = getBaseArgs(org.apache.hive.beeline.TestBeeLineWithArgs.miniHS2.getBaseJdbcURL()); argList.add("--hiveconf"); argList.add("test.hive.table.name=dummy"); final java.lang.String SCRIPT_TEXT = ...
private void checkSystemMode() { android.content.SharedPreferences sp = getSharedPreferences(Def.SHARE_PREFERENCE, Context.MODE_PRIVATE); java.lang.String system_mode = sp.getString(Def.SP_SYSTEM_MODE, Def.RECORDING_MODE); if (!(android.text.TextUtils.equals(system_mode, "uvc"))) { mMenuLoadingIndic...
private void checkSystemMode() { android.content.SharedPreferences sp = getSharedPreferences(Def.SHARE_PREFERENCE, Context.MODE_PRIVATE); java.lang.String system_mode = sp.getString(Def.SP_SYSTEM_MODE, Def.RECORDING_MODE); if (!(android.text.TextUtils.equals(system_mode, Def.RECORDING_MODE))) { mMen...
private javax.swing.tree.DefaultMutableTreeNode createDirStructure(java.io.File parent) { javax.swing.tree.DefaultMutableTreeNode parentNode = new javax.swing.tree.DefaultMutableTreeNode(parent.getName()); if (parent.isDirectory()) { for (java.io.File file : parent.listFiles()) { javax.swing...
private javax.swing.tree.DefaultMutableTreeNode createDirStructure(java.io.File parent) { javax.swing.tree.DefaultMutableTreeNode parentNode = new javax.swing.tree.DefaultMutableTreeNode(parent.getName()); if (parent.isDirectory()) { for (java.io.File file : parent.listFiles()) { javax.swing...
private java.lang.String changeLevelToString(int logLevel) { java.lang.String level = ""; switch (logLevel) { case android.util.Log.DEBUG : level = "DEBUG"; break; case android.util.Log.INFO : level = "INFO"; break; case android.util.Log.WA...
private java.lang.String changeLevelToString(int logLevel) { java.lang.String level = "Undefined"; switch (logLevel) { case android.util.Log.DEBUG : level = "DEBUG"; break; case android.util.Log.INFO : level = "INFO"; break; case android.ut...
private de.aphol.java.neuronet.network.components.ActingNeuron getRandomNeuron() { int targetNeuronLayerIndex = this.randomGenerator.nextInt(this.hiddenNeuronTable.size()); if (targetNeuronLayerIndex == (this.hiddenNeuronTable.size())) { return getRandomOutputNeuron(); }else { return getRand...
private de.aphol.java.neuronet.network.components.ActingNeuron getRandomNeuron() { int targetNeuronLayerIndex = this.randomGenerator.nextInt(((this.hiddenNeuronTable.size()) + 1)); if (targetNeuronLayerIndex == (this.hiddenNeuronTable.size())) { return getRandomOutputNeuron(); }else { return...
public <A extends abs.backend.java.lib.types.ABSValue> java.util.List<A> convert(ABS.StdLib.List<A> absList) { java.util.List<A> list = new java.util.ArrayList<A>(); if (absList.isCons()) { ABS.StdLib.List_Cons<A> cons = absList.toCons(); list.add(cons.getArg0()); absList = cons.getArg1(...
public <A extends abs.backend.java.lib.types.ABSValue> java.util.List<A> convert(ABS.StdLib.List<A> absList) { java.util.List<A> list = new java.util.ArrayList<A>(); while (absList.isCons()) { ABS.StdLib.List_Cons<A> cons = absList.toCons(); list.add(cons.getArg0()); absList = cons.getAr...
public final hu.akarnokd.rxjava2.basetypes.Solo<T> doAfterNext(hu.akarnokd.rxjava2.basetypes.Consumer<? super T> onAfterNext) { hu.akarnokd.rxjava2.basetypes.ObjectHelper.requireNonNull(onAfterNext, "onAfterNext is null"); return hu.akarnokd.rxjava2.basetypes.Solo.onAssembly(new hu.akarnokd.rxjava2.basetypes.So...
public final hu.akarnokd.rxjava2.basetypes.Solo<T> doAfterNext(hu.akarnokd.rxjava2.basetypes.Consumer<? super T> onAfterNext) { hu.akarnokd.rxjava2.basetypes.ObjectHelper.requireNonNull(onAfterNext, "onAfterNext is null"); return hu.akarnokd.rxjava2.basetypes.Solo.onAssembly(new hu.akarnokd.rxjava2.basetypes.So...
private java.util.ArrayList<org.rstudio.studio.client.common.dependencies.model.Dependency> dataImportSavDependencies() { java.util.ArrayList<org.rstudio.studio.client.common.dependencies.model.Dependency> deps = new java.util.ArrayList<org.rstudio.studio.client.common.dependencies.model.Dependency>(); deps.add...
private java.util.ArrayList<org.rstudio.studio.client.common.dependencies.model.Dependency> dataImportSavDependencies() { java.util.ArrayList<org.rstudio.studio.client.common.dependencies.model.Dependency> deps = new java.util.ArrayList<org.rstudio.studio.client.common.dependencies.model.Dependency>(); deps.add...
private void insertNewDailyEvent() { if (isStart) { event = new com.hiwhitley.potatoandtomato.bean.DailyEvent(); event.setName(titleText); event.setStartTime(com.hiwhitley.potatoandtomato.utils.CalendarUtils.getNowTime(com.hiwhitley.potatoandtomato.activity.TimerClockActivity.DATE_FORMAT)); ...
private void insertNewDailyEvent() { if (isStart) { event = new com.hiwhitley.potatoandtomato.bean.DailyEvent(); event.setName(titleText); event.setStartTime(com.hiwhitley.potatoandtomato.utils.CalendarUtils.getNowTime(com.hiwhitley.potatoandtomato.activity.TimerClockActivity.DATE_FORMAT)); ...
public gate.Resource init() { setLayout(new java.awt.BorderLayout()); textArea = new javax.swing.JTextPane() { private static final long serialVersionUID = 3279170264365877569L; { this.setEditorKitForContentType("text/xml", new gate.gui.schema.SimpleSchemaViewer.XmlEditorKit()); ...
public gate.Resource init() { setLayout(new java.awt.BorderLayout()); textArea = new javax.swing.JTextPane(); textArea.setEditorKitForContentType("text/xml", new gate.gui.schema.SimpleSchemaViewer.XmlEditorKit()); textArea.setContentType("text/xml"); textArea.setEditable(false); javax.swing.JScr...
public static java.lang.Runnable getCustomAskRunnable(java.lang.String message, java.lang.String[] buttons, int[] values, int defaultChoice, boolean global, net.rim.device.api.script.ScriptableFunction callback) { net.rim.device.api.ui.component.Dialog d = new net.rim.device.api.ui.component.Dialog(message, buttons...
public static java.lang.Runnable getCustomAskRunnable(java.lang.String message, java.lang.String[] buttons, int defaultChoice, boolean global, net.rim.device.api.script.ScriptableFunction callback) { net.rim.device.api.ui.component.Dialog d = new net.rim.device.api.ui.component.Dialog(message, buttons, null, defaul...
public java.util.Collection<org.ndexbio.model.object.network.Namespace> getNamespacesFromNetworkDoc(com.orientechnologies.orient.core.record.impl.ODocument networkDoc, org.ndexbio.model.object.network.Network network) { java.util.ArrayList<org.ndexbio.model.object.network.Namespace> namespaces = new java.util.Array...
public java.util.Collection<org.ndexbio.model.object.network.Namespace> getNamespacesFromNetworkDoc(com.orientechnologies.orient.core.record.impl.ODocument networkDoc) { java.util.ArrayList<org.ndexbio.model.object.network.Namespace> namespaces = new java.util.ArrayList<>(); for (com.orientechnologies.orient.co...
private DistanceObject[] sortDistanceObjects(DistanceObject[] dObj, int objCount) { java.util.Arrays.sort(dObj, 0, (objCount - 1), new DistanceObjectComparator()); for (int i = 0; i < objCount; i++) { CBIRQueryMapper.logger.info((((dObj[i].getKey()) + "\t") + (dObj[i].getValue()))); } return dOb...
private DistanceObject[] sortDistanceObjects(DistanceObject[] dObj, int objCount) { java.util.Arrays.sort(dObj, 0, objCount, new DistanceObjectComparator()); for (int i = 0; i < objCount; i++) { CBIRQueryMapper.logger.info((((dObj[i].getKey()) + "\t") + (dObj[i].getValue()))); } return dObj; }
private void reportProgress(int delta) { progress.getAndAdd(delta); int p = (((int) ((((double) (progress.get())) / ((double) (maxProgress))) * 100)) / 10) * 10; if ((p > (lastProgress)) && (p < 100)) { lastProgress = p; java.lang.System.out.print((p + "% ")); } }
private void reportProgress(int delta) { progress.getAndAdd(delta); int p = (((int) ((((double) (progress.get())) / ((double) (maxProgress))) * 100)) / 10) * 10; if ((p > (lastProgress.get())) && (p < 100)) { lastProgress.set(p); java.lang.System.out.print((p + "% ")); } }
VerticalViewPager.ItemInfo addNewItem(int position, int index) { VerticalViewPager.ItemInfo ii = new VerticalViewPager.ItemInfo(); ii.position = position; ii.object = mAdapter.instantiateItem(this, position); ii.widthFactor = mAdapter.getPageWidth(position); ii.heightFactor = mAdapter.getPageHeight(...
VerticalViewPager.ItemInfo addNewItem(int position, int index) { VerticalViewPager.ItemInfo ii = new VerticalViewPager.ItemInfo(); ii.position = position; ii.object = mAdapter.instantiateItem(this, position); ii.heightFactor = mAdapter.getPageHeight(position); if ((index < 0) || (index >= (mItems.si...
public int greatestCommonDivisor(int a, int b) { int rem; if (a > b) { rem = a % b; if (rem != 0) { return greatestCommonDivisor(a, rem); } return b; }else { rem = b % a; if (rem != 0) { return greatestCommonDivisor(b, rem); } ...
public int greatestCommonDivisor(int a, int b) { if (a == 0) { return b; } if (b == 0) { return a; } if (a > b) { return greatestCommonDivisor(b, (a % b)); } return greatestCommonDivisor(a, (b % a)); }
public double[] regress() { final double slope = (sumXY) / (sumXX); if (hasIntercept) { return new double[]{ ((sumY) - (slope * (sumX))) / (n) , slope }; } return new double[]{ slope }; }
public double[] regress() { final double slope = ((sumXY) == 0) ? 0 : (sumXY) / (sumXX); if (hasIntercept) { return new double[]{ ((sumY) - (slope * (sumX))) / (n) , slope }; } return new double[]{ slope }; }
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_shopping_cart); com.andreakim.artsupplies.ArtSuppliesAssetHelper db = com.andreakim.artsupplies.ShoppingCartActivity.getInstance(this); btnMain = ((android.widget.Button) ...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_shopping_cart); btnMain = ((android.widget.Button) (findViewById(R.id.cart_btn_bk_main))); btnMain.setOnClickListener(new android.view.View.OnClickListener() { @ja...
private void sweep() { for (int clusterId = 0; clusterId < (clusters.size()); clusterId++) { softsat.inference.MCSat mcsat = new softsat.inference.MCSat(clusterId, clusters.get(clusterId)); mcsat.sample(); } }
private void sweep() { for (int clusterId = 0; clusterId < (clusters.size()); clusterId++) { softsat.inference.MCSat mcsat = new softsat.inference.MCSat(clusterId, clusters.get(clusterId)); mcsat.sample(0); } }
public void addSelectionInterval(int index0, int index1) { super.addSelectionInterval(index0, index1); java.util.Set<T> proxies = sel_model.getSelected(); for (int i = index0; i <= index1; i++) { T proxy = model.getProxy(i); if (proxy != null) proxies.add(proxy); } ...
public void addSelectionInterval(int index0, int index1) { super.addSelectionInterval(index0, index1); java.util.Set<T> proxies = sel_model.getSelected(); for (int i = index0; i <= index1; i++) { T proxy = model.getProxy(i, false); if (proxy != null) proxies.add(proxy); ...
public com.aspectran.core.context.builder.AssistantLocal replicate() { com.aspectran.core.context.builder.AssistantLocal al = new com.aspectran.core.context.builder.AssistantLocal(((replicatedCount) + 1)); al.setDescription(al.getDescription()); com.aspectran.core.context.builder.DefaultSettings ds = al.get...
public com.aspectran.core.context.builder.AssistantLocal replicate() { com.aspectran.core.context.builder.AssistantLocal al = new com.aspectran.core.context.builder.AssistantLocal(((replicatedCount) + 1)); al.setDescription(getDescription()); com.aspectran.core.context.builder.DefaultSettings ds = getDefaul...
public <T> T get(java.lang.String name, java.lang.String value, final java.lang.Class<T> clazz) { com.robert.dbsplit.util.SqlUtil.SqlRunningBean srb = com.robert.dbsplit.util.SqlUtil.generateSelectSql(name, value, clazz); T bean = this.queryForObject(srb.getSql(), srb.getParams(), new org.springframework.jdbc.c...
public <T> T get(java.lang.String name, java.lang.Object value, final java.lang.Class<T> clazz) { com.robert.dbsplit.util.SqlUtil.SqlRunningBean srb = com.robert.dbsplit.util.SqlUtil.generateSelectSql(name, value, clazz); T bean = this.queryForObject(srb.getSql(), srb.getParams(), new org.springframework.jdbc.c...
public boolean craft(adventure.Item item, adventure.Inventory inv) { if (!(canCraft(item, inv))) return false; adventure.Recipe r = getRecipe(item); for (int i = 0; i < (r.input.length); i++) { inv.remove(r.input[i].name, 1); } inv.add(r.output, 1); return true; }
public static boolean craft(adventure.Item item, adventure.Inventory inv) { if (!(adventure.Recipe.canCraft(item, inv))) return false; adventure.Recipe r = adventure.Recipe.getRecipe(item); for (int i = 0; i < (r.input.length); i++) { inv.remove(r.input[i].name, 1); } inv.add(r....
public void clearRow(int row) { if ((row < 0) || (row >= (height))) { throw new java.lang.IllegalArgumentException("Invalid row dimension!"); }else { for (int column = 0; column <= (width); column++) { puzzle[row][column] = Puzzle.Colors.VOID; } } }
public void clearRow(int row) { if ((row < 0) || (row >= (height))) { throw new java.lang.IllegalArgumentException("Invalid row dimension!"); }else { for (int column = 0; column < (width); column++) { puzzle[row][column] = Puzzle.Colors.VOID; } } }
public void testGetMinXWorld() throws java.lang.Exception { bbox.addHitBox(new com.almasb.fxgl.physics.HitBox("ARM", new javafx.geometry.Point2D(20, 0), com.almasb.fxgl.physics.BoundingShape.box(40, 40))); org.junit.Assert.assertEquals(20, bbox.getMinXWorld(), 0); position.translateX(100); org.junit.Ass...
public void testGetMinXWorld() throws java.lang.Exception { bbox.addHitBox(new com.almasb.fxgl.physics.HitBox("ARM", new javafx.geometry.Point2D(20, 0), com.almasb.fxgl.physics.BoundingShape.box(40, 40))); assertEquals(20, bbox.getMinXWorld(), 0); position.translateX(100); assertEquals(120, bbox.getMinX...
public void handler(java.net.InetAddress addr, byte[] msg) { if ((msg[0]) == 255) stopServer(); try { message = new TrivaGameServer.TrivaMessage(addr, msg); setChanged(); notifyObservers(); } catch (java.net.UnknownHostException e) { e.printStackTrace(); } }
public void handler(java.net.InetAddress addr, byte[] msg) { if ((msg[0]) == 255) stopServer(); try { message = new TrivaGameServer.TrivaMessage(addr, msg); synchronized(this) { setChanged(); notifyObservers(); } } catch (java.net.UnknownHostExcep...
public static void main(java.lang.String[] args) { com.sardina.ReversePolishCalc rpc = new com.sardina.ReversePolishCalc(); java.lang.String rpnExpression = "2.5,4.8,+"; double expectedResult = 7.3; double actualResult = rpc.calculate(rpnExpression); java.lang.System.out.println(" "); java.lang....
public static void main(java.lang.String[] args) { com.sardina.ReversePolishCalc rpc = new com.sardina.ReversePolishCalc(); java.lang.String rpnExpression = "2.5,4.8,+"; double expectedResult = 7.3; double actualResult = rpc.calculate(rpnExpression); com.sardina.Main.checkResult(rpnExpression, expec...
public java.lang.String getKeywordnInString(java.lang.String userInput, int startOfDesc, int endOfDesc) { java.lang.StringBuilder result = new java.lang.StringBuilder(); char[] userInputCharArr = userInput.toCharArray(); for (int c = 0; c < (userInputCharArr.length); c++) { if ((c >= startOfDesc) &&...
public java.lang.String getKeywordnInString(java.lang.String userInput, int startOfDesc, int endOfDesc) { java.lang.StringBuilder result = new java.lang.StringBuilder(); if (userInput == null) { return null; } char[] userInputCharArr = userInput.toCharArray(); for (int c = 0; c < (userInputC...
public net.sf.json.JSONObject toJsonObj() { net.sf.json.JSONObject obj = new net.sf.json.JSONObject(); obj.accumulate("id", id); obj.accumulate("date", date); obj.accumulate("dbp", dbp); obj.accumulate("sbp", sbp); obj.accumulate("heartrate", heartrate); obj.accumulate("dosed", dosed); r...
public net.sf.json.JSONObject toJsonObj() { net.sf.json.JSONObject obj = new net.sf.json.JSONObject(); if ((id) != null) { obj.accumulate("id", id); } obj.accumulate("date", date); obj.accumulate("dbp", dbp); obj.accumulate("sbp", sbp); obj.accumulate("heartrate", heartrate); obj...
public void read(java.io.DataInput in) throws java.io.IOException { org.apache.avro.io.DatumReader<org.apache.avro.generic.GenericRecord> reader = new org.apache.avro.generic.GenericDatumReader<org.apache.avro.generic.GenericRecord>(avroSchema); org.apache.avro.io.Decoder decoder = org.apache.avro.io.DecoderFac...
public void read(java.io.DataInput in) throws java.io.IOException { org.apache.avro.io.DatumReader<org.apache.avro.generic.GenericRecord> reader = new org.apache.avro.generic.GenericDatumReader<org.apache.avro.generic.GenericRecord>(avroSchema); assert in instanceof java.io.InputStream; org.apache.avro.io.D...
public int read(byte[] bytes, int offset, int length) throws java.io.IOException { try { int count = file.read(bytes, offset, length); this.seekPosition += count; return count; } catch (org.sleuthkit.datamodel.TskCoreException ex) { throw new java.io.IOException(); } }
public int read(byte[] bytes, int offset, int length) throws java.io.IOException { try { int count = file.read(bytes, ((seekPosition) + offset), length); this.seekPosition += count; return count; } catch (org.sleuthkit.datamodel.TskCoreException ex) { throw new java.io.IOExceptio...
public net.minecraft.item.ItemStack recalculatePath(mekanism.common.base.ILogisticalTransporter transporter, int min) { mekanism.common.content.transporter.TransporterPathfinder.Destination newPath = mekanism.common.content.transporter.TransporterPathfinder.getNewBasePath(transporter, this, min); if (newPath ==...
public net.minecraft.item.ItemStack recalculatePath(mekanism.common.base.ILogisticalTransporter transporter, int min) { mekanism.common.content.transporter.TransporterPathfinder.Destination newPath = mekanism.common.content.transporter.TransporterPathfinder.getNewBasePath(transporter, this, min); if (newPath ==...
public void setUp() throws java.lang.Exception { scheduleConfig = new org.opensrp.scheduler.ScheduleConfig("/schedules/schedule-config.xls"); scheduleService = new org.opensrp.scheduler.HealthSchedulerService(actionService, schService, scheduleConfig); org.mockito.MockitoAnnotations.initMocks(this); fsp...
public void setUp() throws java.lang.Exception { scheduleConfig = new org.opensrp.scheduler.ScheduleConfig("/schedules/schedule-config.xls"); org.mockito.MockitoAnnotations.initMocks(this); fsp = new org.opensrp.service.formSubmission.FormSubmissionProcessor(ziggyService, formSubmissionRouter, formEntityCon...
public void setUp() { goConfigService = org.mockito.Mockito.mock(com.thoughtworks.go.server.service.GoConfigService.class); contextFactory = org.mockito.Mockito.mock(org.springframework.security.ldap.SpringSecurityContextSource.class); securityConfig = org.mockito.Mockito.mock(com.thoughtworks.go.config.Sec...
public void setUp() { goConfigService = mock(com.thoughtworks.go.server.service.GoConfigService.class); contextFactory = mock(org.springframework.security.ldap.SpringSecurityContextSource.class); securityConfig = mock(com.thoughtworks.go.config.SecurityConfig.class); ldapTemplate = mock(org.springframew...
public static void main(java.lang.String[] args) { int port = 30000; if ((args.length) < 1) { port = java.lang.Integer.parseInt(args[0]); } server.Server si = new server.Server(port); si.startServer(); }
public static void main(java.lang.String[] args) { int port = 30000; if ((args.length) > 0) { port = java.lang.Integer.parseInt(args[0]); } server.Server si = new server.Server(port); si.startServer(); }
public void things4() { android.support.test.espresso.Espresso.onView(android.support.test.espresso.matcher.ViewMatchers.withId(R.id.fab)).perform(android.support.test.espresso.action.ViewActions.click()); android.support.test.espresso.Espresso.onView(android.support.test.espresso.matcher.ViewMatchers.withId(R....
public void things4() { android.support.test.espresso.Espresso.onView(android.support.test.espresso.matcher.ViewMatchers.withId(R.id.fab)).perform(android.support.test.espresso.action.ViewActions.click()); android.support.test.espresso.Espresso.onView(android.support.test.espresso.matcher.ViewMatchers.withId(R....
protected void setReadPending(final boolean readPending) { if (isRegistered()) { io.netty.channel.EventLoop eventLoop = eventLoop(); if (eventLoop.inEventLoop()) { setReadPending0(readPending); }else { eventLoop.execute(new io.netty.util.internal.OneTimeTask() { ...
protected void setReadPending(final boolean readPending) { if (isRegistered()) { io.netty.channel.EventLoop eventLoop = eventLoop(); if (eventLoop.inEventLoop()) { setReadPending0(readPending); }else { eventLoop.execute(new io.netty.util.internal.OneTimeTask() { ...
public java.lang.Long call() throws java.lang.Exception { StopWatch swTotal = new StopWatch(); swTotal.start(); for (int i = 0; i < (numQueries); i++) { doQuery(i); } doSomeComputation(); long totalTime = swTotal.getTime(); java.lang.System.out.println((((("Request " + (workerNumber)...
public java.lang.Long call() throws java.lang.Exception { for (int i = 0; i < (this.numQueries); i++) { doQuery(i); } doSomeComputation(); long totalTime = swTotal.getTime(); java.lang.System.out.println((((("Request " + (this.workerNumber)) + " took ") + (this.swTotal.getTime())) + " millis...
public void add(com.badalchowdhary.datastructures.Node node) { if ((head) == null) { head = node; return ; } com.badalchowdhary.datastructures.Node currentNode = head; while ((currentNode.getNext()) != null) { currentNode = currentNode.getNext(); } currentNode.setNext(no...
public void add(com.badalchowdhary.datastructures.Node node) { if ((head) == null) { head = node; (count)++; return ; } com.badalchowdhary.datastructures.Node currentNode = head; while ((currentNode.getNext()) != null) { currentNode = currentNode.getNext(); } cur...
public static void setup() { org.graphast.query.route.shortestpath.BidirectionalDijkstraTest.graphHopperExample = new org.graphast.graphgenerator.GraphGenerator().generateGraphHopperExample(); org.graphast.query.route.shortestpath.BidirectionalDijkstraTest.graphHopperExample2 = new org.graphast.graphgenerator.G...
public static void setup() { org.graphast.query.route.shortestpath.BidirectionalDijkstraTest.graphHopperExample = new org.graphast.graphgenerator.GraphGenerator().generateGraphHopperExample(); org.graphast.query.route.shortestpath.BidirectionalDijkstraTest.graphHopperExample2 = new org.graphast.graphgenerator.G...
public void setScoreChoices() { java.util.List<java.lang.String> list = new java.util.ArrayList<>(); for (int i = minScore; i <= (maxScore); i++) { if (i != 0) { list.add(java.lang.String.valueOf(i)); } } this.scoreChoices = list; }
public void setScoreChoices() { java.util.List<java.lang.String> list = new java.util.ArrayList<>(); for (int i = java.lang.Float.valueOf(minScore).intValue(); i <= (java.lang.Float.valueOf(maxScore)); i++) { if (i != 0) { list.add(java.lang.String.valueOf(i)); } } this.score...
public boolean onActivate(org.bukkit.entity.Player player, java.lang.String worldName) { if (com.endercrest.voidspawn.ConfigManager.getInstance().isWorldSpawnSet(worldName)) { com.endercrest.voidspawn.TeleportManager.getInstance().teleportSpawn(player); return true; }else { player.sendMe...
public boolean onActivate(org.bukkit.entity.Player player, java.lang.String worldName) { if (com.endercrest.voidspawn.ConfigManager.getInstance().isWorldSpawnSet(worldName)) { return com.endercrest.voidspawn.TeleportManager.getInstance().teleportSpawn(player); }else { player.sendMessage(com.ende...
protected void logConfig(java.io.PrintStream logger, java.lang.String prefix) { super.logConfig(logger, prefix); logger.println(((prefix + "Mode: ") + (model.getMode().toString()))); logger.println(((prefix + "Data model: ") + (shouldUseDefaultDataModel() ? "<default>" : model.getDataModel()))); logger....
protected void logConfig(java.io.PrintStream logger, java.lang.String prefix) { super.logConfig(logger, prefix); logger.println(((prefix + "Mode: ") + (model.getMode().toString()))); logger.println(((prefix + "Data model: ") + (model.getDataModel().toString()))); logger.println(((prefix + "Performance m...
public boolean onOptionsItemSelected(android.view.MenuItem item) { int id = item.getItemId(); if (id == (R.id.action_settings)) { startActivity(new android.content.Intent(this, com.example.android.project1.app.SettingsActivity.class)); return true; }else if (id == (R.id.action_refres...
public boolean onOptionsItemSelected(android.view.MenuItem item) { int id = item.getItemId(); if (id == (R.id.action_settings)) { startActivity(new android.content.Intent(this, com.example.android.project1.app.SettingsActivity.class)); return true; } return super.onOptionsItemSelected(it...
public void testFindByMessageAuthor() { in.shekhar.forumapp.domain.Message message = new in.shekhar.forumapp.domain.Message("test_user", "hello world"); messageRepository.save(message); java.util.List<in.shekhar.forumapp.domain.Message> messages = messageRepository.findByMessageAuthor("test_user"); asse...
public void testFindByMessageAuthor() { in.shekhar.forumapp.domain.Message message = new in.shekhar.forumapp.domain.Message("test_user", "hello world"); messageRepository.save(message); java.util.List<in.shekhar.forumapp.domain.Message> messages = messageRepository.findByMessageAuthor("test_user"); asse...
public void run() { try { rUBERn.ClientBase base = new rUBERn.ClientBase(); rUBERn.Matrix theMatrix = new rUBERn.Matrix(base); rUBERn.MatrixGUI window = new rUBERn.MatrixGUI(theMatrix); window.Main.setVisible(true); javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.g...
public void run() { try { rUBERn.ClientBase base = new rUBERn.ClientBase(); rUBERn.Matrix theMatrix = new rUBERn.Matrix(base); rUBERn.MatrixGUI window = new rUBERn.MatrixGUI(theMatrix); window.Main.setVisible(true); } catch (java.lang.Exception e) { e.printStackTrace(); ...
public void handleEverythingWithCarsAndStoppingAndGoingAndTargetSpeedAndEverything(simulator.models.CarManager car, simulator.models.StopLight light) { car.moveCarForward(); double carPosition = car.getPosition(); if (carPosition >= (light.getPosition())) { java.lang.System.out.println("a"); ...
public void handleEverythingWithCarsAndStoppingAndGoingAndTargetSpeedAndEverything(simulator.models.CarManager car, simulator.models.StopLight light) { car.moveCarForward(); double carPosition = car.getPosition(); if (carPosition >= (light.getPosition())) { java.lang.System.out.print("a"); i...
public void waitAndSend(int dx, int dy) { new java.lang.Thread(() -> { waiting = true; try { java.lang.Thread.sleep(33); new InputReader.MouseMoveEvent(dx, dy).send(); robot.mouseMove(((width) / 2), ((height) / 2)); } catch (java.lang.InterruptedException ...
public void waitAndSend(int dx, int dy) { new java.lang.Thread(() -> { waiting = true; try { java.lang.Thread.sleep(33); new InputReader.MouseMoveEvent(dx, dy).send(); robot.mouseMove(((width) / 2), ((height) / 2)); } catch (java.lang.InterruptedException ...
public static void main(java.lang.String[] args) { { @java.lang.SuppressWarnings(value = "resource") java.util.Scanner sc = new java.util.Scanner(java.lang.System.in); java.lang.System.out.println("Enter maximum integer to be checked:"); assignment4.Assignment4.max = sc.nextInt(); ...
public static void main(java.lang.String[] args) { { @java.lang.SuppressWarnings(value = "resource") java.util.Scanner sc = new java.util.Scanner(java.lang.System.in); java.lang.System.out.println("Enter maximum integer to be checked:"); assignment4.Assignment4.max = sc.nextInt(); ...
private void initializeParameters(boolean force) throws org.eclipse.core.runtime.CoreException { if (((projectLoc) != null) && (!force)) { return ; } org.eclipse.core.resources.IProject project = getProject(); projectLoc = org.rascalmpl.uri.ProjectURIResolver.constructProjectURI(project.getFullP...
private void initializeParameters(boolean force) throws org.eclipse.core.runtime.CoreException { if (((projectLoc) != null) && (!force)) { return ; } org.eclipse.core.resources.IProject project = getProject(); projectLoc = org.rascalmpl.uri.ProjectURIResolver.constructProjectURI(project.getFullP...
public javax.ws.rs.core.Response submitCmdlet(@org.smartdata.server.rest.FormParam(value = "actionType") java.lang.String actionType, @org.smartdata.server.rest.FormParam(value = "args") java.lang.String args) { java.lang.String arg = (actionType + ' ') + args; try { return new org.smartdata.server.rest...
public javax.ws.rs.core.Response submitCmdlet(java.lang.String args) { try { return new org.smartdata.server.rest.message.JsonResponse(Response.Status.CREATED, smartEngine.getCmdletManager().submitCmdlet(args)).build(); } catch (java.lang.Exception e) { org.smartdata.server.rest.CmdletRestApi.lo...
public void copyFrom(net.minecraft.inventory.IInventory inventory) { for (int i = 0; i < (inventory.getSizeInventory()); i++) if (i < (getSizeInventory())) { net.minecraft.item.ItemStack stack = inventory.getStackInSlot(i); if (stack != (net.minecraft.item.ItemStack.EMPTY)) ...
public void copyFrom(net.minecraft.inventory.IInventory inventory) { for (int i = 0; i < (inventory.getSizeInventory()); i++) if (i < (getSizeInventory())) { net.minecraft.item.ItemStack stack = inventory.getStackInSlot(i); if (!(stack.isEmpty())) setInventorySlotCont...
private void calculateMoney() { double workWeek = 0.28; double moneyEarnedLong = (((((lifeGained) * (salary)) * workWeek) / 365) / 24) / 60; moneyEarned = com.sebastianboyd.fitness.MainActivity.round(moneyEarnedLong, 2); android.util.Log.v(com.sebastianboyd.fitness.MainActivity.TAG, java.lang.String.val...
private void calculateMoney() { double workWeek = 0.28; double moneyEarnedLong = (((((lifeGained) * (salary)) * workWeek) / 365) / 24) / 60; moneyEarned = com.sebastianboyd.fitness.MainActivity.round(moneyEarnedLong, 2); }
public boolean startRound() { boolean ante = player.anteUp(); if (ante) { if ((roundCount) > 0) { collectTrash(); } (roundCount)++; firstTurn = true; playerTurn = true; tie = false; lastMoves = moves; moves = 0; noWinner = true;...
public boolean startRound() { boolean ante = player.anteUp(); if (ante) { (roundCount)++; firstTurn = true; playerTurn = true; tie = false; lastMoves = moves; moves = 0; noWinner = true; playerWin = false; deal(); }else { noWinn...
public void EncapsulateManyToOne() { io.beanmapper.House house = createHouse(); io.beanmapper.ResultManyToOne result = beanMapper.map(house, io.beanmapper.ResultManyToOne.class); org.junit.Assert.assertEquals("housename", result.getName()); org.junit.Assert.assertEquals("denneweg", result.getStreet()); ...
public void EncapsulateManyToOne() { io.beanmapper.House house = createHouse(); io.beanmapper.ResultManyToOne result = beanMapper.map(house, io.beanmapper.ResultManyToOne.class); assertEquals("housename", result.getName()); assertEquals("denneweg", result.getStreet()); assertEquals(1, result.getNumb...
public void renewLease(java.lang.String clientName) throws java.io.IOException, org.apache.hadoop.security.AccessControlException { java.util.Collection<org.apache.giraffa.FileLease> leases = leaseManager.renewLease(clientName); for (org.apache.giraffa.FileLease lease : leases) { org.apache.giraffa.INod...
public void renewLease(java.lang.String clientName) throws java.io.IOException, org.apache.hadoop.security.AccessControlException { java.util.Collection<org.apache.giraffa.FileLease> leases = leaseManager.renewLease(clientName); if ((leases == null) || (leases.isEmpty())) return ; for (org.apac...
public static final byte[] toByteArray(java.lang.Object obj) { byte[] bytes = null; java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); try { java.io.ObjectOutputStream oos = new java.io.ObjectOutputStream(bos); oos.writeObject(obj); oos.flush(); bytes = ...
public static final byte[] toByteArray(java.lang.Object obj) { if (obj == null) return null; byte[] bytes = null; java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); try { java.io.ObjectOutputStream oos = new java.io.ObjectOutputStream(bos); oos.writeObj...
private void loadFavoriteMovies() { showLoadProgressBar(); final android.database.Cursor cursor = getContentResolver().query(MovieEntry.CONTENT_URI, null, null, null, null); if ((null != cursor) && ((cursor.getCount()) != 0)) { mAdapter.setMovies(cursor); showMoviesList(); }else { ...
private void loadFavoriteMovies() { showLoadProgressBar(); final android.database.Cursor cursor = getContentResolver().query(MovieEntry.CONTENT_URI, null, null, null, null); mAdapter.setMovies(cursor); if ((null != cursor) && ((cursor.getCount()) != 0)) { showMoviesList(); }else { sh...
public void setConfig(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @javax.ws.rs.PathParam(value = "namespace-id") java.lang.String namespaceId, @javax.ws.rs.PathParam(value = "stream") java.lang.String stream) throws java.lang.Exception { co.cask.cdap.proto.id.Stream...
public void setConfig(org.jboss.netty.handler.codec.http.HttpRequest request, co.cask.http.HttpResponder responder, @javax.ws.rs.PathParam(value = "namespace-id") java.lang.String namespaceId, @javax.ws.rs.PathParam(value = "stream") java.lang.String stream) throws java.lang.Exception { co.cask.cdap.proto.id.Stream...
public static java.lang.String getFileSuffix(java.lang.String fileName) { java.lang.String[] fileNameSplitInfo = fileName.split("\\."); java.lang.String suffix = null; if ((fileNameSplitInfo.length) >= 1) { suffix = fileNameSplitInfo[((fileNameSplitInfo.length) - 1)]; } return suffix; }
public static java.lang.String getFileSuffix(java.lang.String fileName) { java.lang.String suffix = null; if (fileName == null) { return suffix; } java.lang.String[] fileNameSplitInfo = fileName.split("\\."); if ((fileNameSplitInfo.length) >= 1) { suffix = fileNameSplitInfo[((fileNam...
public com.alliander.osgp.adapter.ws.schema.smartmetering.monitoring.ActualMeterReadsGasResponse getActualMeterReadsGasResponse(@com.alliander.osgp.adapter.ws.endpointinterceptors.OrganisationIdentification final java.lang.String organisationIdentification, @org.springframework.ws.server.endpoint.annotation.RequestPayl...
public com.alliander.osgp.adapter.ws.schema.smartmetering.monitoring.ActualMeterReadsGasResponse getActualMeterReadsGasResponse(@com.alliander.osgp.adapter.ws.endpointinterceptors.OrganisationIdentification final java.lang.String organisationIdentification, @org.springframework.ws.server.endpoint.annotation.RequestPayl...
public void displayIntro() { io.zipcoder.zealotscasino.UserInput.display("--------------------Zealot's Casino--------------------"); double startWallet = io.zipcoder.zealotscasino.UserInput.getDoubleInput("How much money do you want to start your wallet with?"); try { player = new io.zipcoder.zealot...
public void displayIntro() { io.zipcoder.zealotscasino.UserInput.display("--------------------Zealot's Casino--------------------"); double startWallet = io.zipcoder.zealotscasino.UserInput.getDoubleInput("How much money do you want to start your wallet with?"); try { java.lang.System.out.println(st...
private boolean drainQueuesIfNeeded() { while (true) { if (getEmitLock()) { int emitted = 0; try { emitted = drainScalarValueQueue(); drainChildrenQueues(); } finally { boolean moreToDrain = releaseEmitLock(); ...
private boolean drainQueuesIfNeeded() { while (true) { if (getEmitLock()) { int emitted = 0; try { emitted = drainScalarValueQueue(); drainChildrenQueues(); } finally { boolean moreToDrain = releaseEmitLock(); ...
public void handle(javafx.scene.input.MouseEvent event) { if ((GameGUI.shipManipulator.getShipListLength()) == 5) { if (GameGUI.gameHelper.getP1Rolled()) { GameGUI.disableButtons(); GameGUI.gameHelper.sendReady(); GameGUI.setP1Ready(); }else { new Erro...
public void handle(javafx.scene.input.MouseEvent event) { if ((GameGUI.shipManipulator.getShipListLength()) == 5) { if (GameGUI.gameHelper.getP1Rolled()) { GameGUI.disableButtons(); GameGUI.gameHelper.sendReady(); GameGUI.setP1Ready(true); }else { new ...
public void focusLost(java.awt.event.FocusEvent e) { if (((editObj.sLicense) == null) || (!(editObj.sLicense.equals(jTextDesc.getText())))) { editObj.sDescription = jTextDesc.getText().trim(); FireObjectModified(); } }
public void focusLost(java.awt.event.FocusEvent e) { if (((editObj.sDescription) == null) || (!(editObj.sDescription.equals(jTextDesc.getText())))) { editObj.sDescription = jTextDesc.getText().trim(); FireObjectModified(); } }
private java.lang.Long getUserIdIfExist(com.codeproj.traininghandler.dto.TrainingExcelDto item) { java.lang.String email = item.getEmail(); if (org.apache.commons.lang3.StringUtils.isEmpty(email)) { java.lang.String cleanedPhoneNo = com.codeproj.traininghandler.util.ThStringUtils.cleanPhoneNumber(item.g...
public java.lang.Long getUserIdIfExist(com.codeproj.traininghandler.dto.TrainingExcelDto item) { java.lang.String email = item.getEmail(); if (org.apache.commons.lang3.StringUtils.isEmpty(email)) { java.lang.String cleanedPhoneNo = com.codeproj.traininghandler.util.ThStringUtils.cleanPhoneNumber(item.ge...
public static boolean setLanguage(java.lang.String localeCode) { boolean languageChanged = false; android.content.res.Configuration config = com.ichi2.anki.AnkiDroidApp.getInstance().getResources().getConfiguration(); java.util.Locale newLocale = com.ichi2.utils.LanguageUtil.getLocale(localeCode); if (!...
public static void setLanguage(java.lang.String localeCode) { android.content.res.Configuration config = com.ichi2.anki.AnkiDroidApp.getInstance().getResources().getConfiguration(); java.util.Locale newLocale = com.ichi2.utils.LanguageUtil.getLocale(localeCode); config.locale = newLocale; com.ichi2.anki...
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException { try { java.lang.String username = request.getParameter("LoginUserName"); java.lang.String password = request.getParameter...
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException { try { java.lang.String username = request.getParameter("LoginUserName"); java.lang.String password = request.getParameter...