buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void addFootView(android.view.View view, boolean isNotify) { if (view == null) { throw new java.lang.NullPointerException("the foot view can not be null"); } foots.add(view); (mType)--; footList.add(mType); if (isNotify) { com.xiaojinzi.code.util.recyclerView.CommonRecycle...
public void addFootView(android.view.View view, boolean isNotify) { if (view == null) { throw new java.lang.NullPointerException("the foot view can not be null"); } foots.add(view); (mType)--; footList.add(mType); if (isNotify) { int position = getItemCount(); com.xiaojin...
public void submitNew() { ftTodoList.Note add = new ftTodoList.Note(Note.INV_ID, group, name, description, false, ""); if (!(groupNames.contains(group))) { groupNames.add(group); } try { ftTodoList.DatabaseManager.insertNote(add); selected = group; updateNotes(); } ca...
public void submitNew() { ftTodoList.Note add = new ftTodoList.Note(Note.INV_ID, group, name, description, ""); try { ftTodoList.DatabaseManager.insertNote(add); selected = group; updateNotes(); } catch (java.sql.SQLException e) { e.printStackTrace(); } }
public void sendLineToAll(java.lang.String line, final com.richardchien.android.bluetoothcommunicator.listener.SendListener listener) { for (final android.bluetooth.BluetoothDevice device : mConnections.keySet()) { mConnections.get(device).writeLine(line); if ((mOnLoseConnectionListener) != null) { ...
public void sendLineToAll(java.lang.String line, final com.richardchien.android.bluetoothcommunicator.listener.SendListener listener) { for (final android.bluetooth.BluetoothDevice device : mConnections.keySet()) { mConnections.get(device).writeLine(line); if (listener != null) { mHandle...
public static java.lang.String getPrettyTimeString(double timeSpentAtWork) { if (timeSpentAtWork > 0) { int hours = ((int) ((timeSpentAtWork / 60) / 60)); int minutes = ((int) ((timeSpentAtWork / 60) % 60)); return (((hours + "h") + " ") + minutes) + "m"; }else if (timeSpentAtWor...
public static java.lang.String getPrettyTimeString(java.lang.Double timeSpentAtWork) { if (timeSpentAtWork == null) { return "No data"; } if (timeSpentAtWork > 0) { int hours = ((int) ((timeSpentAtWork / 60) / 60)); int minutes = ((int) ((timeSpentAtWork / 60) % 60)); return ...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); fakeData(); if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction().add(R.id.container, new com.grishman.rssfeed.fragments.FeedFrag...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction().add(R.id.container, new com.grishman.rssfeed.fragments.FeedFragment()).commit()...
public void changeToToday() { changeDay(todaysDay); changeMonth(todaysMonth); changeYear(todaysYear); calendar.set(java.util.Calendar.DATE, todaysDay); calendar.set(java.util.Calendar.MONTH, todaysMonth); calendar.set(java.util.Calendar.YEAR, todaysYear); java.lang.System.out.println(todaysD...
public void changeToToday() { changeDay(todaysDay); changeMonth(todaysMonth); changeYear(todaysYear); calendar.set(java.util.Calendar.DATE, todaysDay); calendar.set(java.util.Calendar.MONTH, todaysMonth); calendar.set(java.util.Calendar.YEAR, todaysYear); update(); }
public static java.util.Queue<sample.token> parseIntExpr(java.util.Queue<sample.token> tokenStack) { tokenStack = sample.parser.match("DIGIT", tokenStack); sample.token current = tokenStack.peek(); if (current.getTokenType().equals("PLUS")) { tokenStack = sample.parser.parseExpr(tokenStack); } ...
public static java.util.Queue<sample.token> parseIntExpr(java.util.Queue<sample.token> tokenStack) { tokenStack = sample.parser.match("DIGIT", tokenStack); sample.token current = tokenStack.peek(); if (current.getTokenType().equals("PLUS")) { tokenStack.remove(); tokenStack = sample.parser.p...
public void deleteGroup(@javax.ws.rs.PathParam(value = "groupId") final java.lang.String groupId) throws java.io.IOException, java.sql.SQLException, org.apache.solr.client.solrj.SolrServerException, org.ndexbio.model.exceptions.NdexException, org.ndexbio.model.exceptions.ObjectNotFoundException { org.ndexbio.rest.s...
public void deleteGroup(@javax.ws.rs.PathParam(value = "groupId") final java.lang.String groupId) throws java.io.IOException, java.sql.SQLException, org.apache.solr.client.solrj.SolrServerException, org.ndexbio.model.exceptions.NdexException, org.ndexbio.model.exceptions.ObjectNotFoundException { try (org.ndexbio.c...
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) { java.lang.System.out.println(requestCode); java.lang.System.out.println(resultCode); if ((requestCode == 3) || (requestCode == 1)) { int RESULT_NEXT = 10; if (resultCode == (RESULT_OK)) { ...
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) { if ((requestCode == 3) || (requestCode == 1)) { int RESULT_NEXT = 10; if (resultCode == (RESULT_OK)) { }else if (resultCode == RESULT_NEXT) { android.content.Intent dat...
private void facebookRegister() { callbackManager = CallbackManager.Factory.create(); com.facebook.login.widget.LoginButton loginButton = ((com.facebook.login.widget.LoginButton) (findViewById(R.id.login_button))); loginButton.setReadPermissions("public_profile", "email", "user_birthday", "user_about_me", "...
private void facebookRegister() { callbackManager = CallbackManager.Factory.create(); com.facebook.login.widget.LoginButton loginButton = ((com.facebook.login.widget.LoginButton) (findViewById(R.id.login_button))); loginButton.setReadPermissions(java.util.Arrays.asList("public_profile", "email", "user_birth...
public void visitFieldInsn(final int opcode, final java.lang.String owner, final java.lang.String name, final java.lang.String desc) { if ((mv) != null) { mv.visitFieldInsn(opcode, owner, name, desc); } execute(opcode, 0, desc, name); }
public void visitFieldInsn(final int opcode, final java.lang.String owner, final java.lang.String name, final java.lang.String desc) { if ((mv) != null) { mv.visitFieldInsn(opcode, owner, name, desc); } execute(opcode, 0, 0, desc, name); }
public void onClick(android.content.DialogInterface dialog, int which) { try { com.wireless.common.ShoppingCart.instance().addFood(of); refreshDisplay(of.asFood(), layout, true); } catch (com.wireless.exception.BusinessException e) { android.widget.Toast.makeText(getActivity(), e.getMess...
public void onClick(android.content.DialogInterface dialog, int which) { try { com.wireless.common.ShoppingCart.instance().addFood(of); refreshDisplay(of.asFood(), layout, position); } catch (com.wireless.exception.BusinessException e) { android.widget.Toast.makeText(getActivity(), e.get...
public void testInlineCountInvalid() throws java.lang.Exception { org.apache.olingo.odata2.core.ep.AtomEntityProvider ser = createAtomEntityProvider(); org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties properties = org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties.serviceRoot(org.apache....
public void testInlineCountInvalid() throws java.lang.Exception { org.apache.olingo.odata2.core.ep.AtomEntityProvider ser = createAtomEntityProvider(); org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties properties = org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties.serviceRoot(org.apache....
public treinsimulator.Trein geefEersteTrein(int tijd, treinsimulator.Station st) { for (int vertrek : treinen.keySet()) { if ((treinsimulator.Klok.incrementeer(vertrek, tijd)) >= (treinsimulator.Klok.getTijd())) { return treinen.get(vertrek); } } return null; }
public treinsimulator.Trein geefEersteTrein(int tijd) { for (int vertrek : treinen.keySet()) { if ((treinsimulator.Klok.incrementeer(vertrek, tijd)) >= (treinsimulator.Klok.getTijd())) { return treinen.get(vertrek); } } return null; }
public static boolean isExceptionHandled(@org.jetbrains.annotations.NotNull com.intellij.psi.PsiModifierListOwner psiModifierListOwner, com.intellij.psi.PsiClassType exceptionClassType) { final com.intellij.psi.PsiAnnotation psiAnnotation = com.intellij.codeInsight.AnnotationUtil.findAnnotation(psiModifierListOwner...
public boolean isExceptionHandled(@org.jetbrains.annotations.NotNull com.intellij.psi.PsiModifierListOwner psiModifierListOwner, com.intellij.psi.PsiClassType exceptionClassType) { final com.intellij.psi.PsiAnnotation psiAnnotation = com.intellij.codeInsight.AnnotationUtil.findAnnotation(psiModifierListOwner, de.pl...
public TT getWriteLock() { try { lock.lock(); while ((writeToken) != null) writeReleased.awaitUninterruptibly(); writeToken = new uk.ac.ebi.mg.rwarbiter.RWArbiter.ReadWriteToken(); if ((readReqs) > 0) readReleased.awaitUninterruptibly(); ...
public TT getWriteLock() { try { lock.lock(); while ((writeToken) != null) writeReleased.awaitUninterruptibly(); writeToken = factory.createToken(); if ((readReqs) > 0) readReleased.awaitUninterruptibly(); return writeToken; } fin...
public void restaurantAdded(java.lang.String rId) { android.util.Log.d("restaurant added", ("Rid: " + rId)); newpostFragment = new in.foodtalk.android.fragment.newpost.CheckIn(); android.os.Bundle bundle = new android.os.Bundle(); bundle.putString("rId", rId); newpostFragment.setArguments(bundle); ...
public void restaurantAdded(java.lang.String rId) { android.util.Log.d("restaurant added", ("Rid: " + rId)); newpostFragment = new in.foodtalk.android.fragment.newpost.CheckIn(); android.os.Bundle bundle = new android.os.Bundle(); bundle.putString("rId", rId); newpostFragment.setArguments(bundle); ...
public android.view.View getView(int position, android.view.View convertView, android.view.ViewGroup parent) { if (convertView == null) { convertView = new wuxian.me.filepicker.view.DocumentView(mContext); } wuxian.me.filepicker.view.DocumentView docView = ((wuxian.me.filepicker.view.DocumentView) (...
public android.view.View getView(int position, android.view.View convertView, android.view.ViewGroup parent) { if (convertView == null) { convertView = new wuxian.me.filepicker.view.DocumentView(mContext); } wuxian.me.filepicker.view.DocumentView docView = ((wuxian.me.filepicker.view.DocumentView) (...
private void sendShare() { android.content.Intent shareIntent = new android.content.Intent(); shareIntent.setAction(Intent.ACTION_SEND); shareIntent.putExtra(Intent.EXTRA_SUBJECT, R.string.share_subject); shareIntent.putExtra(Intent.EXTRA_TEXT, java.lang.String.format(getResources().getString(R.string.s...
private void sendShare() { android.content.Intent shareIntent = new android.content.Intent(); shareIntent.setAction(Intent.ACTION_SEND); shareIntent.putExtra(Intent.EXTRA_SUBJECT, getResources().getString(R.string.share_subject)); shareIntent.putExtra(Intent.EXTRA_TEXT, java.lang.String.format(getResour...
private void process(backtype.storm.tuple.Tuple input, java.util.List<java.lang.String> hashTags) { twitter4j.Status tweet = ((twitter4j.Status) (input.getValue(1))); for (java.lang.String tag : hashTags) { if (tweet.getText().contains(tag)) _collector.emit(new backtype.storm.tuple.Values(in...
private void process(backtype.storm.tuple.Tuple input, java.util.List<java.lang.String> hashTags) { twitter4j.Status tweet = ((twitter4j.Status) (input.getValue(1))); for (java.lang.String tag : hashTags) { if (tweet.getText().toLowerCase().contains(tag)) { _collector.emit(new backtype.storm...
public void removeDimension(int id) { mcjty.rftoolsdim.dimensions.description.DimensionDescriptor descriptor = dimensions.get(id); dimensions.remove(id); dimensionToID.remove(descriptor); dimensionInformation.remove(id); if (net.minecraftforge.common.DimensionManager.isDimensionRegistered(id)) { ...
public void removeDimension(int id) { mcjty.rftoolsdim.dimensions.description.DimensionDescriptor descriptor = dimensions.get(id); dimensions.remove(id); dimensionToID.remove(descriptor); dimensionInformation.remove(id); if (net.minecraftforge.common.DimensionManager.isDimensionRegistered(id)) { ...
public static int getIntAt(java.lang.String s, java.lang.String key, int fallback) { try { return java.lang.Integer.valueOf((s + " ").split(key)[1].split("\\D")[0]); } catch (java.lang.Exception e) { return fallback; } }
public static int getIntAt(java.lang.String s, java.lang.String key, int fallback) { try { return java.lang.Integer.parseInt((s + " ").split(key)[1].split("\\D")[0]); } catch (java.lang.Exception e) { return fallback; } }
protected com.fasterxml.jackson.dataformat.xml.JsonGenerator _createGenerator(com.fasterxml.jackson.dataformat.xml.ObjectWriteContext writeCtxt, com.fasterxml.jackson.core.io.IOContext ioCtxt, java.io.Writer out) throws java.io.IOException { return new com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator(writeCt...
protected com.fasterxml.jackson.dataformat.xml.JsonGenerator _createGenerator(com.fasterxml.jackson.dataformat.xml.ObjectWriteContext writeCtxt, com.fasterxml.jackson.core.io.IOContext ioCtxt, java.io.Writer out) throws java.io.IOException { return new com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator(writeCt...
private static void addConfigAlkahestCraftingRecipe(net.minecraftforge.common.config.ConfigCategory category, java.lang.String item, java.lang.Integer meta, java.lang.Integer yield, java.lang.Integer cost) { net.minecraftforge.common.config.Property prop = new net.minecraftforge.common.config.Property(((item + "|")...
private static void addConfigAlkahestCraftingRecipe(net.minecraftforge.common.config.ConfigCategory category, java.lang.String item, java.lang.Integer meta, java.lang.Integer yield, java.lang.Integer cost) { net.minecraftforge.common.config.Property prop = new net.minecraftforge.common.config.Property(((item + "|")...
public static <T extends java.lang.Comparable<? super T>> T select(T[] array, java.util.Comparator<? super T> c, int k) { return array[io.marmot.laboratory.algorithm.KthSelector.select(array, c, 0, ((array.length) - 1), k)]; }
public static <T extends java.lang.Comparable<? super T>> T select(T[] array, java.util.Comparator<? super T> c, int k) { return array[io.marmot.laboratory.algorithm.KthSelector.select(array, c, 0, ((array.length) - 1), (k - 1))]; }
public void run() { while (isInterrupted()) { uni.data.FetcherThread.logger.info("Starting fetch..."); fetcher.fetch(); uni.data.FetcherThread.logger.info("Finished fetch."); try { java.lang.Thread.sleep(interval); } catch (java.lang.InterruptedException e) { ...
public void run() { while (!(isInterrupted())) { uni.data.FetcherThread.logger.info("Starting fetch..."); fetcher.fetch(); uni.data.FetcherThread.logger.info("Finished fetch."); try { java.lang.Thread.sleep(interval); } catch (java.lang.InterruptedException e) { ...
public void paint(java.awt.Graphics2D g, pt.lsts.neptus.renderer2d.StateRenderer2D renderer) { synchronized(dataDisplay) { if (firstPaint) { java.lang.System.out.println("FIRST PAINT"); int posX = (-((pt.lsts.neptus.hyperspectral.HyperspectralRealTime.MAX_FREQ) / 2)) + ((pt.lsts.nept...
public void paint(java.awt.Graphics2D g, pt.lsts.neptus.renderer2d.StateRenderer2D renderer) { synchronized(dataDisplay) { if (firstPaint) { int posX = (-((pt.lsts.neptus.hyperspectral.HyperspectralRealTime.MAX_FREQ) / 2)) + ((pt.lsts.neptus.hyperspectral.HyperspectralRealTime.FRAME_HEIGHT) / 2)...
private void updatePersistentStore() { try { java.io.FileOutputStream fileOutputStream = new java.io.FileOutputStream(mFile); java.io.ObjectOutputStream objectOutputStream = new java.io.ObjectOutputStream(fileOutputStream); objectOutputStream.writeObject(mInMemoryQueue); timber.log.T...
private void updatePersistentStore() { try { java.io.FileOutputStream fileOutputStream = new java.io.FileOutputStream(mFile); java.io.ObjectOutputStream objectOutputStream = new java.io.ObjectOutputStream(fileOutputStream); objectOutputStream.writeObject(mInMemoryQueue); timber.log.T...
public void navigateParamGroup(org.opentravel.schemacompiler.model.TLParamGroup paramGroup) { if ((canVisit(paramGroup)) && (visitor.visitParamGroup(paramGroup))) { navigateDocumentation(paramGroup.getDocumentation()); for (org.opentravel.schemacompiler.model.TLParameter parameter : paramGroup.getPa...
public void navigateParamGroup(org.opentravel.schemacompiler.model.TLParamGroup paramGroup) { if ((canVisit(paramGroup)) && (visitor.visitParamGroup(paramGroup))) { java.util.List<org.opentravel.schemacompiler.model.TLParameter> parameters = new java.util.ArrayList(paramGroup.getParameters()); navig...
protected java.lang.Object valueForProperty(java.beans.PropertyDescriptor descriptor, java.lang.Object item) { try { java.lang.Object value = descriptor.getReadMethod().invoke(item); if (value instanceof java.util.Optional) { java.util.Optional optional = ((java.util.Optional) (value)); ...
protected java.lang.Object valueForProperty(java.beans.PropertyDescriptor descriptor, java.lang.Object item) { try { java.lang.Object value = descriptor.getReadMethod().invoke(item); if (value instanceof java.util.Optional) { java.util.Optional optional = ((java.util.Optional) (value)); ...
public boolean onOptionsItemSelected(android.view.MenuItem item) { switch (item.getItemId()) { case R.id.action_save : selectSaveSchedule(); return selectSaveSchedule(); case R.id.action_delete : selectDeleteSchedule(); return true; case R.id.a...
public boolean onOptionsItemSelected(android.view.MenuItem item) { switch (item.getItemId()) { case R.id.action_save : return selectSaveSchedule(); case R.id.action_delete : selectDeleteSchedule(); return true; case R.id.action_cancel : android...
private javax.swing.JPanel makeMessagePanel() { javax.swing.JPanel panel = new javax.swing.JPanel(); panel.setBackground(allnetui.ConversationPanel.backgroundColor); panel.setLayout(new javax.swing.BoxLayout(panel, javax.swing.BoxLayout.Y_AXIS)); panel.add(javax.swing.Box.createRigidArea(new java.awt.Di...
private javax.swing.JPanel makeMessagePanel() { javax.swing.JPanel panel = new javax.swing.JPanel(); panel.setBackground(allnetui.ConversationPanel.backgroundColor); panel.setLayout(new javax.swing.BoxLayout(panel, javax.swing.BoxLayout.Y_AXIS)); panel.add(javax.swing.Box.createRigidArea(new java.awt.Di...
private java.util.Map<java.lang.Integer, jp.co.tabocom.teratermstation.model.Login> getLoginMap() { if ((this.loginMap) != null) { return this.loginMap; } if ((this.category) != null) { return this.category.getLoginMap(); } return getParent().getLoginMap(); }
private java.util.Map<java.lang.Integer, jp.co.tabocom.teratermstation.model.Login> getLoginMap() { if (((this.loginMap) != null) && (!(this.loginMap.isEmpty()))) { return this.loginMap; } if ((this.category) != null) { return this.category.getLoginMap(); } return getParent().getLogi...
public boolean isItemValueDate(java.lang.String aName) { aName = aName.toLowerCase(); java.util.List<?> v = getItemValue(aName); if ((v.size()) == 0) return false; else { java.lang.Object o = v.get(0); return o instanceof java.util.Date; } }
public boolean isItemValueDate(java.lang.String aName) { java.util.List<?> v = getItemValue(aName); if ((v.size()) == 0) return false; else { java.lang.Object o = v.get(0); return o instanceof java.util.Date; } }
public void multiplechoicemultiple() { android.widget.LinearLayout tfbox = ((android.widget.LinearLayout) (findViewById(R.id.TrueFalseOption))); android.widget.TableLayout mcbox = ((android.widget.TableLayout) (findViewById(R.id.MultipleChoice))); tfbox.setVisibility(View.GONE); mcbox.setVisibility(View...
public void multiplechoicemultiple(android.view.View view) { android.widget.LinearLayout tfbox = ((android.widget.LinearLayout) (findViewById(R.id.TrueFalseOption))); android.widget.TableLayout mcbox = ((android.widget.TableLayout) (findViewById(R.id.MultipleChoice))); tfbox.setVisibility(View.GONE); mc...
protected void onPostExecute(java.util.List<xyz.yluo.ruisiapp.data.ForumListData> simpledatas) { datas.clear(); datas.addAll(simpledatas); adapter.notifyDataSetChanged(); refreshLayout.postDelayed(new java.lang.Runnable() { @java.lang.Override public void run() { refreshLayou...
protected void onPostExecute(java.util.List<xyz.yluo.ruisiapp.data.ForumListData> simpledatas) { if ((simpledatas.size()) > 0) { datas.clear(); datas.addAll(simpledatas); adapter.notifyDataSetChanged(); } refreshLayout.postDelayed(new java.lang.Runnable() { @java.lang.Overrid...
public boolean canImport(javax.swing.JComponent comp, java.awt.datatransfer.DataFlavor[] transferFlavors) { java.lang.System.out.println("Something Happened 1"); if (comp instanceof com.zerulus.hub.MyTree) { for (int i = 0; i < (transferFlavors.length); i++) { if (!(transferFlavors[i].equals...
public boolean canImport(javax.swing.JComponent comp, java.awt.datatransfer.DataFlavor[] transferFlavors) { if (comp instanceof com.zerulus.hub.MyTree) { for (int i = 0; i < (transferFlavors.length); i++) { if (!(transferFlavors[i].equals(java.awt.datatransfer.DataFlavor.javaFileListFlavor))) { ...
public static java.lang.String formatDateForCurrent(java.lang.String source) { if (source.contains(com.emc.storageos.services.util.TimeUtils.DATE_TIME_PATTERN)) { java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat(com.emc.storageos.services.util.TimeUtils.DATE_TIME_FORMAT); java....
public static java.lang.String formatDateForCurrent(java.lang.String source) { if (source.contains(com.emc.storageos.services.util.TimeUtils.DATE_TIME_PATTERN)) { java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat(com.emc.storageos.services.util.TimeUtils.DATE_TIME_FORMAT); java....
public javax.swing.JComboBox getAppearanceEditorBox(int row) { javax.swing.JComboBox editCombo = editorMap.get(this.getValueAt(row, jmri.jmrit.beantable.SYSNAMECOL)); if (editCombo == null) { editCombo = new javax.swing.JComboBox(getRowVector(row)); editorMap.put(this.getValueAt(row, jmri.jmrit....
public javax.swing.JComboBox getAppearanceEditorBox(int row) { javax.swing.JComboBox editCombo = editorMap.get(this.getValueAt(row, jmri.jmrit.beantable.SYSNAMECOL)); if (editCombo == null) { javax.swing.JComboBox<java.lang.String> editCombo = new javax.swing.JComboBox<java.lang.String>(getRowVector(row...
public void testConversionToEureka2xDataCenterInfo() throws java.lang.Exception { com.netflix.eureka2.registry.datacenter.AwsDataCenterInfo v2DataCenterInfo = SampleAwsDataCenterInfo.UsEast1a.build(); com.netflix.appinfo.AmazonInfo v1DataCenterInfo = com.netflix.eureka2.eureka1.utils.Eureka1ModelConverters.toEu...
public void testConversionToEureka2xDataCenterInfo() throws java.lang.Exception { com.netflix.eureka2.registry.datacenter.AwsDataCenterInfo v2DataCenterInfo = SampleAwsDataCenterInfo.UsEast1a.build(); com.netflix.appinfo.AmazonInfo v1DataCenterInfo = toEureka1xDataCenterInfo(v2DataCenterInfo); com.netflix.e...
public void onRClick(me.geocraft.shops.citizens.NPCRightClickEvent event) { if (((event.isCancelled()) || (!(event.getNPC().equals(getNPC())))) || (!(onClick))) { return ; } me.geocraft.shops.citizens.Player buyer = event.getClicker(); if (canTrade(buyer)) trade(buyer); else { ...
public void onRClick(me.geocraft.shops.citizens.NPCRightClickEvent event) { if ((!(event.getNPC().equals(getNPC()))) || (!(onClick))) { return ; } me.geocraft.shops.citizens.Player buyer = event.getClicker(); if (canTrade(buyer)) trade(buyer); else { buyer.sendMessage("\u00a7...
public static com.jordan30001.twitch.api.video.Video newVideoInstance(com.jordan30001.twitch.TwitchAPI api, java.lang.String id) { try { com.jordan30001.twitch.utils.HTTPSClient.URLData urlData = com.jordan30001.twitch.utils.HTTPSClient.getURLData(java.lang.String.format("%s/videos/%s", api.getBaseURL(), id...
public com.jordan30001.twitch.api.video.Video newVideoInstance(java.lang.String id) { try { com.jordan30001.twitch.utils.HTTPSClient.URLData urlData = com.jordan30001.twitch.utils.HTTPSClient.getURLData(java.lang.String.format("%s/videos/%s", api.getBaseURL(), id), "", "", "", 200, 404); return new ...
private synchronized com.bank.rmi.Response checkBalance(com.bank.rmi.GetBalanceRequest clientRequest) { com.bank.rmi.BalanceResponse response = null; if (com.bank.rmi.RmiBankServerImpl.accounts.containsKey(clientRequest.getUid())) { response = new com.bank.rmi.BalanceResponse(com.bank.rmi.RmiBankServerI...
private synchronized com.bank.rmi.Response checkBalance(com.bank.rmi.GetBalanceRequest clientRequest) { com.bank.rmi.BalanceResponse response = null; if (com.bank.rmi.RmiBankServerImpl.accounts.containsKey(clientRequest.getUid())) { response = new com.bank.rmi.BalanceResponse(com.bank.rmi.RmiBankServerI...
public void success(java.util.List<cs499.knowsie.data.Tweet> tweets, retrofit.client.Response response) { updateList.addAll(tweets); updateListAdapter.notifyDataSetChanged(); tweetMaxID = tweets.get(((tweets.size()) - 1)).getID(); }
public void success(java.util.List<cs499.knowsie.data.Tweet> tweets, retrofit.client.Response response) { updateList.addAll(tweets); updateListAdapter.notifyDataSetChanged(); if (!(tweets.isEmpty())) { tweetMaxID = tweets.get(((tweets.size()) - 1)).getID(); } }
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) { android.widget.TextView et = ((android.widget.TextView) (parent.findViewById(R.id.txtTitle))); mListener.onRecipeSelected(et.getText().toString()); }
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) { android.widget.TextView et = ((android.widget.TextView) (view.findViewById(R.id.txtTitle))); mListener.onRecipeSelected(et.getText().toString()); }
private void resolveSignInError() { if (mConnectionResult.hasResolution()) { try { mIntentInProgress = true; startIntentSenderForResult(mConnectionResult.getResolution().getIntentSender(), Constants.SIGN_IN_REQUEST, null, 0, 0, 0); } catch (android.content.IntentSender e) { ...
private void resolveSignInError() { if (((mConnectionResult) != null) && (mConnectionResult.hasResolution())) { try { mIntentInProgress = true; startIntentSenderForResult(mConnectionResult.getResolution().getIntentSender(), Constants.SIGN_IN_REQUEST, null, 0, 0, 0); } catch (...
protected void rangedAttack(com.badlogic.gdx.math.Vector2 direction, int damage) { if (isStunned()) { return ; } if ((rangedAttackTimer) > (com.superduckinvaders.game.entity.Character.RANGED_ATTACK_COOLDOWN)) { rangedAttackTimer = 0.0F; faceAttackTimer = 0.0F; fireAt(directio...
protected boolean rangedAttack(com.badlogic.gdx.math.Vector2 direction, int damage) { if (isStunned()) { return false; } if ((rangedAttackTimer) > (com.superduckinvaders.game.entity.Character.RANGED_ATTACK_COOLDOWN)) { rangedAttackTimer = 0.0F; faceAttackTimer = 0.0F; fireAt(...
public boolean startClusterService() { if (!(this.isClusterServiceRunning())) { this.clusterComm.initCommunications(); try { this.clusterComm.sendMessage(new pt.ulisboa.tecnico.amorphous.internal.cluster.messages.JoinCluster(this.NodeId)); } catch (pt.ulisboa.tecnico.amorphous.in...
public boolean startClusterService() { if (!(this.isClusterServiceRunning())) { this.clusterComm.initCommunications(); try { this.clusterComm.sendMessage(new pt.ulisboa.tecnico.amorphous.internal.cluster.messages.JoinCluster(this.NodeId, true)); } catch (pt.ulisboa.tecnico.amorph...
public void addMark(hu.inf.unideb.rft.ejournal.vo.StudentVo student, hu.inf.unideb.rft.ejournal.vo.SubjectVo subject, int grade) { hu.inf.unideb.rft.ejournal.vo.MarkVo mark = new hu.inf.unideb.rft.ejournal.vo.MarkVo(); mark.setTeacher(current.getTeacher()); mark.setStudent(student); mark.setValue(grade)...
public void addMark(hu.inf.unideb.rft.ejournal.vo.StudentVo student, hu.inf.unideb.rft.ejournal.vo.SubjectVo subject, int grade) { hu.inf.unideb.rft.ejournal.vo.MarkVo mark = new hu.inf.unideb.rft.ejournal.vo.MarkVo(); mark.setTeacher(current.getTeacher().getTeacher()); mark.setStudent(student); mark.se...
public io.robe.admin.hibernate.entity.User update(@io.robe.auth.RobeAuth io.robe.auth.Credentials credentials, @io.robe.admin.resources.PathParam(value = "id") java.lang.String id, @javax.validation.Valid io.robe.admin.hibernate.entity.User model) { if (!(id.equals(model.getOid()))) { throw new io.robe.admi...
public io.robe.admin.hibernate.entity.User update(@io.robe.auth.RobeAuth io.robe.auth.Credentials credentials, @io.robe.admin.resources.PathParam(value = "id") java.lang.String id, @javax.validation.Valid io.robe.admin.hibernate.entity.User model) { if (!(id.equals(model.getOid()))) { throw new io.robe.admi...
public simfinder.FieldValue[] getBlankFields() { a = new simfinder.FieldValue[fields.length]; for (int i = 0; i < (a.length); i++) { a[i] = new simfinder.FieldValue(fields[i].getHeader()); } return a; }
public simfinder.FieldValue[] getBlankFields() { simfinder.FieldValue[] a = new simfinder.FieldValue[fields.length]; for (int i = 0; i < (a.length); i++) { a[i] = new simfinder.FieldValue(fields[i]); } return a; }
public void actionPerformed(java.awt.event.ActionEvent event) { if (event.getSource().equals(values_save_path_button)) { browseFeatureValuesSavePath(); }else { if (event.getSource().equals(definitions_save_path_button)) { browseFeatureDefinitionsSavePath(); }else { ...
public void actionPerformed(java.awt.event.ActionEvent event) { if (event.getSource().equals(values_save_path_button)) browseFeatureValuesSavePath(); else { if (event.getSource().equals(definitions_save_path_button)) browseFeatureDefinitionsSavePath(); else { if (...
protected static void writeToCache(java.lang.Object o) throws java.io.IOException { java.io.File file = new java.io.File(((com.xushuzhan.quiltnews.cache.CacheFileManger.CACHE_DIR) + (o.getClass().getSimpleName()))); com.google.gson.Gson gson = new com.google.gson.Gson(); java.lang.String in = gson.toJson(o)...
protected static void writeToCache(java.lang.Object o) throws java.io.IOException { java.io.File file = new java.io.File(((com.xushuzhan.quiltnews.cache.CacheFileManger.CACHE_DIR) + (o.getClass().getSimpleName()))); com.google.gson.Gson gson = new com.google.gson.Gson(); java.lang.String in = gson.toJson(o)...
public int compareTo(models.Record other) { if (((this.created) != null) && ((other.created) != null)) { return -(this.created.compareTo(other.created)); }else { return super.compareTo(other); } }
public int compareTo(models.Record other) { if (((this.created) != null) && ((other.created) != null)) { return -(this.created.compareTo(other.created)); }else if (((this.created) == null) && ((other.created) == null)) { return super.compareTo(other); }else if ((t...
public it.musichub.server.library.model.Song getSong(java.nio.file.Path filePath) { if ((songs) != null) { for (it.musichub.server.library.model.Song s : songs) { try { if (java.nio.file.Files.isSameFile(s.getFile().toPath(), filePath)) return s; ...
public it.musichub.server.library.model.Song getSong(java.nio.file.Path filePath) { if ((songs) != null) { for (it.musichub.server.library.model.Song s : songs) { try { if (java.nio.file.Files.isSameFile(s.getFile().toPath(), filePath)) return s; ...
public hudson.model.Action getProjectAction(hudson.model.AbstractProject<?, ?> project) { if ((!(project.getBuilds().isEmpty())) || (!(project.getActions().isEmpty()))) { org.evosuite.jenkins.actions.BuildAction buildAction = project.getLastBuild().getAction(org.evosuite.jenkins.actions.BuildAction.class); ...
public hudson.model.Action getProjectAction(hudson.model.AbstractProject<?, ?> project) { if (!(project.getBuilds().isEmpty())) { org.evosuite.jenkins.actions.BuildAction buildAction = project.getLastBuild().getAction(org.evosuite.jenkins.actions.BuildAction.class); if (buildAction != null) { ...
public void orderCookieButton(int toOrderId) { if ((cs.findCookie(toOrderId).getCount()) < (orderCount)) { addMessage("Vorrat reicht nicht aus"); }else { bs.addBestellposten(order.getId(), toOrderId, orderCount); addMessage("Zur Bestellung hinzugefügt"); } }
public void orderCookieButton(int toOrderId) { if ((cs.findCookie(toOrderId).getCount()) < (orderCount)) { addMessage("Vorrat reicht nicht aus"); }else { bs.addBestellposten(order.getId(), toOrderId, orderCount); addMessage("Zur Bestellung hinzugefügt"); orderCount = 0; } }
private void mutate() { java.util.Random r = new java.util.Random(); java.lang.Integer pathIndex = r.nextInt(java.lang.Math.abs(((this.path.size()) - 1))); java.lang.Integer replaceIndex = r.nextInt(((this.operators.size()) - 1)); path.set(pathIndex, operators.get(replaceIndex)); }
private void mutate() { java.util.Random r = new java.util.Random(); java.lang.Integer pathIndex = r.nextInt(java.lang.Math.abs(((this.path.size()) - 1))); java.lang.Integer replaceIndex = r.nextInt(java.lang.Math.abs(((this.operators.size()) - 1))); path.set(pathIndex, operators.get(replaceIndex)); }
private javax.ws.rs.core.Response handleError(final java.lang.Throwable e) { if (e instanceof javax.ws.rs.WebApplicationException) { javax.ws.rs.WebApplicationException webE = ((javax.ws.rs.WebApplicationException) (e)); return webE.getResponse(); } java.io.StringWriter writer = new java.io....
private javax.ws.rs.core.Response handleError(final java.lang.Throwable e) { if (e instanceof javax.ws.rs.WebApplicationException) { javax.ws.rs.WebApplicationException webE = ((javax.ws.rs.WebApplicationException) (e)); return webE.getResponse(); } java.io.StringWriter writer = new java.io....
public static void main(java.lang.String[] args) { Test.factory = javax.persistence.Persistence.createEntityManagerFactory(Test.PERSISTENCE_UNIT_NAME); javax.persistence.EntityManager em = Test.factory.createEntityManager(); Person.Person p = new Person.Person(11, "Cao", "Zhi"); em.getTransaction().begi...
public static void main(java.lang.String[] args) { Test.factory = javax.persistence.Persistence.createEntityManagerFactory(Test.PERSISTENCE_UNIT_NAME); javax.persistence.EntityManager em = Test.factory.createEntityManager(); em.getTransaction().begin(); em.getTransaction().commit(); em.close(); }
private java.lang.String updateTask(int ID) { tasks.get(ID).updateDetails(commandDetails); determineTaskType(tasks.get(ID)); Task updatedTask = tasks.get(ID); CommandDetails updatedDetails = new CommandDetails(CommandDetails.COMMANDS.UPDATE, updatedTask.getDescription(), updatedTask.getStartDate(), upda...
private java.lang.String updateTask(int ID) { tasks.get(ID).updateDetails(commandDetails); Task updatedTask = tasks.get(ID); CommandDetails updatedDetails = new CommandDetails(CommandDetails.COMMANDS.UPDATE, updatedTask.getDescription(), updatedTask.getStartDate(), updatedTask.getDeadline(), ID); histor...
private final void addHitToBuffer(org.elasticsearch.search.SearchHit hit) { java.util.Map<java.lang.String, java.lang.Object> keyValues = hit.sourceAsMap(); java.lang.String url = ((java.lang.String) (keyValues.get("url"))); if (beingProcessed.containsKey(url)) { return ; } com.digitalpebble...
private final boolean addHitToBuffer(org.elasticsearch.search.SearchHit hit) { java.util.Map<java.lang.String, java.lang.Object> keyValues = hit.sourceAsMap(); java.lang.String url = ((java.lang.String) (keyValues.get("url"))); if (beingProcessed.containsKey(url)) { return false; } com.digit...
void invoke(org.concordion.integration.junit4.ConcordionFrameworkMethod concordionFrameworkMethod, java.lang.Object target) throws java.lang.Exception { org.concordion.api.Fixture fixture = createFixture(target); java.lang.String example = concordionFrameworkMethod.getExampleName(); if ((failFastException) ...
void invoke(org.concordion.integration.junit4.ConcordionFrameworkMethod concordionFrameworkMethod, java.lang.Object target) throws java.lang.Exception { org.concordion.api.Fixture fixture = createFixture(target); java.lang.String example = concordionFrameworkMethod.getExampleName(); if ((failFastException) ...
public void init(java.awt.Point[] carPosition, java.awt.Point[] environment1Position, java.awt.Point[] environment2Position, float edgeOfStreet, int parkingPlaceType) { this.carPosition = carPosition; this.environment1Position = environment1Position; this.environment2Position = environment2Position; thi...
public void init(java.awt.Point[] carPosition, java.awt.Point[] environment1Position, java.awt.Point[] environment2Position, float edgeOfStreet, int parkingPlaceType) { this.carPosition = carPosition; this.environment1Position = environment1Position; this.environment2Position = environment2Position; thi...
protected java.lang.Boolean compute() { java.math.BigInteger tmp = to.subtract(from); if ((tmp.compareTo(forkjoin.prime.PureForkJoin.lengthForThread)) <= 0) { return computeDirectly(); } java.math.BigInteger middle = to.divide(Utils.two); forkjoin.prime.PureForkJoin leftJoin = new forkjoin.p...
protected java.lang.Boolean compute() { java.math.BigInteger tmp = to.subtract(from); if ((tmp.compareTo(forkjoin.prime.PureForkJoin.lengthForThread)) <= 0) { return computeDirectly(); } java.math.BigInteger middle = to.add(from).divide(Utils.two); forkjoin.prime.PureForkJoin leftJoin = new ...
public short getMapIdAtReverseY(int index) { int col = index % (columnCount); int row = index / ((rowCount) - 1); java.lang.System.out.println(((((col + " : ") + row) + " (") + index)); return getMapIdAt(col, (((rowCount) - row) - 1)); }
public short getMapIdAtReverseY(int index) { int x = index % (columnCount); int y = index / (columnCount); java.lang.System.out.println(((((x + " : ") + (((rowCount) - y) - 1)) + " (") + index)); return getMapIdAt(x, (((rowCount) - y) - 1)); }
public double getAverageHumid() { if ((!(changed)) && ((avgTemp) == null)) return avgHumid; double total = 0; for (int i = 0; i < (this.size); i++) { total += secs[i].getHumid(); } return total / (size); }
public double getAverageHumid() { if ((!(changed)) && ((avgHumid) != null)) return avgHumid; double total = 0; for (int i = 0; i < (this.size); i++) { total += secs[i].getHumid(); } return total / (size); }
public void onInitializationSuccess(com.google.android.youtube.player.YouTubePlayer.Provider provider, com.google.android.youtube.player.YouTubePlayer player, boolean restored) { youtubePlayer = player; youtubePlayer.setFullscreenControlFlags(YouTubePlayer.FULLSCREEN_FLAG_CONTROL_ORIENTATION); youtubePlayer...
public void onInitializationSuccess(com.google.android.youtube.player.YouTubePlayer.Provider provider, com.google.android.youtube.player.YouTubePlayer player, boolean restored) { youtubePlayer = player; youtubePlayer.setFullscreenControlFlags(YouTubePlayer.FULLSCREEN_FLAG_CONTROL_ORIENTATION); if ((videoId)...
private int getBucketIndex(double value) { if (((java.lang.Double.compare(value, minV)) < 0) || ((java.lang.Double.compare(value, maxV)) > 0)) { return -1; } return ((int) (java.lang.Math.floor(((value - (minV)) / (step))))); }
private int getBucketIndex(double value) { if (((java.lang.Double.compare(value, minV)) < 0) || ((java.lang.Double.compare(value, maxV)) >= 0)) { return -1; } return ((int) (java.lang.Math.floor(((value - (minV)) / (step))))); }
private void startLoading() { if ((this.currentRequest) != null) { this.currentRequest.cancel(); } this.messages.clear(); this.currentRequest = com.vkclient.supports.RequestCreator.getHistory(this.COUNT, this.profileId); this.currentRequest.executeWithListener(this.getHistoryRequest); }
private void startLoading() { if ((this.currentRequest) != null) { this.currentRequest.cancel(); } this.currentRequest = com.vkclient.supports.RequestCreator.getHistory(this.COUNT, this.profileId); this.currentRequest.executeWithListener(this.getHistoryRequest); }
public java.lang.Boolean delete(java.lang.String fileName) { try { java.lang.String path = ((folderPath) + (java.io.File.pathSeparator)) + fileName; boolean success = new java.io.File(path).delete(); if (!success) { log.error("fail to delete file {}", fileName); throw...
public java.lang.Boolean delete(java.lang.String fileName) { try { boolean success = new java.io.File(fileName).delete(); if (!success) { log.error("fail to delete file {}", fileName); throw new my.yrzy.common.exception.ServiceException("file.delete.fail"); } ...
public boolean add(database.Picture pic) { android.content.ContentValues values = new android.content.ContentValues(); values.put("source", pic.getSource()); values.put("name", pic.getName()); values.put("called", pic.getCalled()); values.put("inarow", pic.getInarow()); return (database.insert(T...
public boolean add(database.Picture pic) { android.content.ContentValues values = new android.content.ContentValues(); values.put("source", pic.getSource()); values.put("name", pic.getName()); values.put("called", pic.getCalled()); values.put("inarow", pic.getInarow()); return (database.insert(T...
public synchronized void buildEmailAndSend(java.lang.String toAddress, java.lang.String fromAddress, java.lang.String subject, java.lang.String msgBody) { org.springframework.mail.SimpleMailMessage Msg = new org.springframework.mail.SimpleMailMessage(); Msg.setFrom(fromAddress); Msg.setTo(toAddress); Ms...
public synchronized void buildEmailAndSend(java.lang.String toAddress, java.lang.String fromAddress, java.lang.String subject, java.lang.String msgBody) { org.springframework.mail.SimpleMailMessage message = new org.springframework.mail.SimpleMailMessage(); message.setFrom(fromAddress); message.setTo(toAddr...
public void afterEachTest() { try { factory.closeFile(fileId); } catch (ncsa.hdf.hdf5lib.exceptions.HDF5LibraryException e) { org.junit.Assert.fail((((((getClass().getName()) + " error: ") + " Could not close HDF file \"") + (file.getPath())) + "\".")); } if ((file) != null) { if...
public void afterEachTest() { try { factory.closeFile(fileId); } catch (ncsa.hdf.hdf5lib.exceptions.HDF5LibraryException e) { org.junit.Assert.fail((((((getClass().getName()) + " error: ") + " Could not close HDF file \"") + (file.getPath())) + "\".")); } if ((file) != null) { if...
public void shouldFailToResumeWithResultCancelled() throws java.lang.Exception { org.mockito.Mockito.verifyNoMoreInteractions(callback); com.auth0.android.provider.WebAuthProvider.init(account).useCodeGrant(false).start(activity, callback, com.auth0.android.provider.WebAuthProviderTest.REQUEST_CODE); androi...
public void shouldFailToResumeWithResultCancelled() throws java.lang.Exception { org.mockito.Mockito.verifyNoMoreInteractions(callback); com.auth0.android.provider.WebAuthProvider.init(account).useCodeGrant(false).start(activity, callback, com.auth0.android.provider.WebAuthProviderTest.REQUEST_CODE); androi...
public void testRenameFamily() { abs.setfamily(var); abs.setnext(null); var.setnext(null); var.setfamily(null); assertTrue(abs.canRenameFamily(1, 2)); assertEquals(2, var.getColor()); assertEquals(2, abs.getColor()); }
public void testRenameFamily() { abs.setfamily(var); abs.setnext(null); var.setnext(null); var.setfamily(null); assertEquals(2, var.getColor()); assertEquals(2, abs.getColor()); }
public void visit(regalloc.VMemWrite vMemWrite) { regalloc.VMemRef.Global ref = ((regalloc.VMemRef.Global) (vMemWrite.dest)); def.add(ref.base.toString()); if (vMemWrite.source instanceof regalloc.VVarRef) { use.add(vMemWrite.source.toString()); } }
public void visit(regalloc.VMemWrite vMemWrite) { regalloc.VMemRef.Global ref = ((regalloc.VMemRef.Global) (vMemWrite.dest)); use.add(ref.base.toString()); if (vMemWrite.source instanceof regalloc.VVarRef) { use.add(vMemWrite.source.toString()); } }
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) { if (resultCode == (RESULT_OK)) { java.lang.String newEditText = data.getExtras().getString("newEditedData"); android.util.Log.d("SimpleToDoApp", ((("*************Request code: " + requestCode) + " with Da...
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) { if (resultCode == (RESULT_OK)) { java.lang.String newEditText = data.getExtras().getString("newEditedData"); android.util.Log.d("SimpleToDoApp", ((("*************Request code: " + requestCode) + " with Da...
public static void save(se.liu.ida.timha404.aleev379.tddd78.punchtower.gamestate.StateTower tower) { se.liu.ida.timha404.aleev379.tddd78.punchtower.SaveFile save = new se.liu.ida.timha404.aleev379.tddd78.punchtower.SaveFile(se.liu.ida.timha404.aleev379.tddd78.punchtower.SaveLoad.SAVE_FILE); tower.saveToFile(sav...
public static void save(se.liu.ida.timha404.aleev379.tddd78.punchtower.gamestate.StateTower tower, java.lang.String filename) { se.liu.ida.timha404.aleev379.tddd78.punchtower.SaveFile save = new se.liu.ida.timha404.aleev379.tddd78.punchtower.SaveFile(filename); tower.saveToFile(save); try { save.sav...
public java.security.KeyStore getKeyStore() { org.apache.ofbiz.base.component.ComponentResourceHandler rh = this.createResourceHandler(); if (rh != null) { try { return org.apache.ofbiz.base.util.KeyStoreUtil.getStore(rh.getURL(), this.getPassword(), this.getType()); } catch (java.la...
public java.security.KeyStore getKeyStore() { org.apache.ofbiz.base.component.ComponentResourceHandler rh = this.createResourceHandler(); try { return org.apache.ofbiz.base.util.KeyStoreUtil.getStore(rh.getURL(), this.getPassword(), this.getType()); } catch (java.lang.Exception e) { org.apac...
public void onClick(android.view.View v) { android.content.Intent i = new android.content.Intent(this, com.example.andykhuu.apcomputerscienceprep.SolutionActivity.class); if ((selected) == (correctAnswer)) { i.putExtra("CORRECT", true); }else if ((selected) != (correctAnswer)) { ...
public void onClick(android.view.View v) { android.content.Intent i = new android.content.Intent(this, com.example.andykhuu.apcomputerscienceprep.SolutionActivity.class); if ((selected) == (correctAnswer)) { i.putExtra("CORRECT", true); }else if ((selected) != (correctAnswer)) { ...
public void testArgs_invalidOption() throws org.apache.commons.cli.ParseException { org.apache.commons.cli.CommandLineParser parser = new org.apache.commons.cli.DefaultParser(); try { parser.parse(options, new java.lang.String[]{ "abc" , "-i" , "-xyz" }); org.junit.Assert.fail(); } catch (or...
public void testArgs_invalidOption() throws org.apache.commons.cli.ParseException { org.apache.commons.cli.CommandLineParser parser = new org.apache.commons.cli.DefaultParser(); try { parser.parse(options, new java.lang.String[]{ "-i" , "-xyz" }); org.junit.Assert.fail(); } catch (org.apache...
public static void main(java.lang.String[] args) { boogy.ejada.MH_User2 user = new boogy.ejada.MH_User2(); user.setName("Mohamed Hassan"); org.hibernate.SessionFactory sessionFactory = new org.hibernate.cfg.Configuration().configure().buildSessionFactory(); org.hibernate.Session session = sessionFactory...
public static void main(java.lang.String[] args) { org.hibernate.SessionFactory sessionFactory = new org.hibernate.cfg.Configuration().configure().buildSessionFactory(); org.hibernate.Session session = sessionFactory.openSession(); session.beginTransaction(); session.getTransaction().commit(); sessi...
public void getMazeByName(java.lang.String name) { algorithms.mazeGenerators.Maze3d maze = hashMaze.get(name); if (maze == null) { setChanged(); notifyObservers(("Not exist maze by name: " + name)); }else { setChanged(); notifyObservers(maze); } }
public void getMazeByName(java.lang.String name) { algorithms.mazeGenerators.Maze3d maze = null; if ((name.length()) == 0) maze = hashMaze.get(this.name); else maze = hashMaze.get(name); if (maze == null) { setChanged(); notifyObservers(("Not exist maze by name: " + ...
public void initAllObjects(java.util.ArrayList<gui.components.Visible> viewObjects) { addButtons(); progress1 = getProgress(); label1 = new gui.components.TextLabel(130, 230, 300, 40, "Let's play Simon!"); moveSequence1 = new java.util.ArrayList<gui.simon.MoveInterfaceKristyT>(); lastSelectedButton ...
public void initAllObjects(java.util.ArrayList<gui.components.Visible> viewObjects) { addButtons(viewObjects); progress1 = getProgress(); label1 = new gui.components.TextLabel(130, 230, 300, 40, "Let's play Simon!"); moveSequence1 = new java.util.ArrayList<gui.simon.MoveInterfaceKristyT>(); lastSele...
public void placeLakeTile(int id) { hf.game.items.LakeTile lake = entities.get(id).getLake(); if (((id == 221) && (lake != null)) && (!(lake.isFaceUp()))) { placeStartLake(lake); }else { if (((selectedCard) != null) && ((selectedCard.getCardType()) == (hf.game.common.CardType.LAKETILE))) ...
public void placeLakeTile(int id) { hf.game.items.LakeTile lake = entities.get(id).getLake(); if (((id == 221) && (lake != null)) && (!(lake.isFaceUp()))) { placeStartLake(lake, id); }else { if (((selectedCard) != null) && ((selectedCard.getCardType()) == (hf.game.common.CardType.LAKETILE)))...
public com.google.android.gms.cast.framework.CastOptions getCastOptions(android.content.Context context) { com.google.android.gms.cast.framework.media.NotificationOptions notificationOptions = new com.google.android.gms.cast.framework.media.NotificationOptions.Builder().setActions(java.util.Arrays.asList(MediaInten...
public com.google.android.gms.cast.framework.CastOptions getCastOptions(android.content.Context context) { com.google.android.gms.cast.framework.media.NotificationOptions notificationOptions = new com.google.android.gms.cast.framework.media.NotificationOptions.Builder().setActions(java.util.Arrays.asList(MediaInten...
public int compareTo(FindKPairsWithSmallestSums.SumBundle sb) { if ((this.sum) < (sb.sum)) { return -1; }else if ((this.sum) == (sb.sum)) { return 0; }else { return 1; } }
public int compareTo(FindKPairsWithSmallestSums.SumBundle sb) { if ((this.sum) > (sb.sum)) { return -1; }else if ((this.sum) == (sb.sum)) { return 0; }else { return 1; } }
public void calculateBudget(org.kuali.coeus.common.budget.impl.calculator.Budget budget) { java.util.List<org.kuali.coeus.common.budget.framework.period.BudgetPeriod> budgetPeriods = budget.getBudgetPeriods(); for (org.kuali.coeus.common.budget.framework.period.BudgetPeriod budgetPeriod : budgetPeriods) { ...
public void calculateBudget(org.kuali.coeus.common.budget.impl.calculator.Budget budget) { java.util.List<org.kuali.coeus.common.budget.framework.period.BudgetPeriod> budgetPeriods = budget.getBudgetPeriods(); for (org.kuali.coeus.common.budget.framework.period.BudgetPeriod budgetPeriod : budgetPeriods) { ...
protected com.github.mikephil.charting.utils.Highlight getStackedHighlight(int xIndex, int dataSet, double yValue) { com.github.mikephil.charting.data.BarEntry entry = mData.getDataSetByIndex(dataSet).getEntryForXIndex(xIndex); int stackIndex = entry.getClosestIndexAbove(((float) (yValue))); com.github.mike...
protected com.github.mikephil.charting.utils.Highlight getStackedHighlight(int xIndex, int dataSet, double yValue) { com.github.mikephil.charting.data.BarEntry entry = mData.getDataSetByIndex(dataSet).getEntryForXIndex(xIndex); if (entry != null) { int stackIndex = entry.getClosestIndexAbove(((float) (y...
double deadband(double rawValue, double deadspace) { if (rawValue > deadspace) { return (rawValue - deadspace) / deadspace; } if (rawValue < (-deadspace)) { return (rawValue + deadspace) / deadspace; } return 0; }
double deadband(double rawValue, double deadspace) { if (rawValue > deadspace) { return (rawValue - deadspace) / (1 - deadspace); } if (rawValue < (-deadspace)) { return (rawValue + deadspace) / (1 - deadspace); } return 0; }
private java.lang.String getLineDate() { try { if ((m_props.getProperty("clock.date")) == "") { return Formats.SIMPLEDATE.formatValue(new java.util.Date()); }else { formatter = new java.text.SimpleDateFormat(m_props.getProperty("clock.date")); return formatter.for...
private java.lang.String getLineDate() { try { if (((m_props.getProperty("clock.date")) == "") || ((m_props.getProperty("clock.date")) == null)) { return Formats.SIMPLEDATE.formatValue(new java.util.Date()); }else { formatter = new java.text.SimpleDateFormat(m_props.getProper...
public void connect(com.hypersocket.client.rmi.Connection c) throws java.rmi.RemoteException { checkValidConnect(c); if (com.hypersocket.client.service.ClientServiceImpl.log.isInfoEnabled()) { com.hypersocket.client.service.ClientServiceImpl.log.info(((("Scheduling connect for connection id " + (c.getId...
public void connect(com.hypersocket.client.rmi.Connection c) throws java.rmi.RemoteException { checkValidConnect(c); if (com.hypersocket.client.service.ClientServiceImpl.log.isInfoEnabled()) { com.hypersocket.client.service.ClientServiceImpl.log.info(((("Scheduling connect for connection id " + (c.getId...
public void onClick(android.view.View v) { if (buttonExp.isSelected()) { equationText += "<sup>6</sup>"; exponent[exponentIndex] = 6; (exponentIndex)++; updateButtonStatusAfterExponent(); }else { equationText += "6"; } eqTextView.setText(android.text.Html.fromHtml...
public void onClick(android.view.View v) { if ((buttonExp.isSelected()) == true) { equationText += "<sup>6</sup>"; exponent[exponentIndex] = 6; (exponentIndex)++; updateButtonStatusAfterExponent(); }else { equationText += "6"; } eqTextView.setText(android.text.Htm...
public int add(BSTNode newNode) { if (newNode.dateOfBirth.isAfter(this.dateOfBirth)) { if ((left) == null) { left = newNode; }else left.add(newNode); }else if (newNode.dateOfBirth.isBefore(this.dateOfBirth)) { if ((right) == null) { ...
public int add(BSTNode newNode) { if (newNode.dateOfBirth.isAfter(this.dateOfBirth)) { if ((left) == null) { left = newNode; }else return left.add(newNode); }else if (newNode.dateOfBirth.isBefore(this.dateOfBirth)) { if ((right) == null) { ...
private void getAmenityList(javax.servlet.http.HttpServletRequest request, java.io.PrintWriter out) { com.google.gson.Gson gson = new com.google.gson.Gson(); controller.AmenityDAO dao = new controller.AmenityDAO(); java.util.List<java.lang.String> list = new java.util.ArrayList<>(); for (controller.Amen...
private void getAmenityList(javax.servlet.http.HttpServletRequest request, java.io.PrintWriter out) { com.google.gson.Gson gson = new com.google.gson.Gson(); controller.AmenityDAO dao = new controller.AmenityDAO(); java.util.List<java.lang.String> list = new java.util.ArrayList<>(); for (controller.Amen...
public void displayUsername() { final com.google.firebase.auth.FirebaseUser firebaseUser = com.google.firebase.auth.FirebaseAuth.getInstance().getCurrentUser(); assert firebaseUser != null; android.view.View header = navigationView.getHeaderView(0); android.widget.TextView mUsernameTextField = ((android...
public void displayUsername() { final com.google.firebase.auth.FirebaseUser firebaseUser = com.google.firebase.auth.FirebaseAuth.getInstance().getCurrentUser(); assert firebaseUser != null; android.view.View header = navigationView.getHeaderView(0); android.widget.TextView mUsernameTextField = ((android...
public void setFileWriteMode(int filewritemode) throws java.lang.Exception { gda.device.detector.areadetector.v17.impl.NDFileImpl.logger.info(("Setting file-write-mode to: " + filewritemode)); try { if ((config) != null) { gda.device.detector.areadetector.v17.impl.NDFileImpl.EPICS_CONTROLLER...
public void setFileWriteMode(int filewritemode) throws java.lang.Exception { gda.device.detector.areadetector.v17.impl.NDFileImpl.logger.info(("Setting file-write-mode to: " + filewritemode)); try { if ((config) != null) { gda.device.detector.areadetector.v17.impl.NDFileImpl.EPICS_CONTROLLER...
public org.grpcvsrest.raggr.datasource.Content next() { if (done) { return null; } int contentId = lastContentId.incrementAndGet(); org.grpcvsrest.raggr.datasource.Content result = datasource.fetch(contentId); if ((result.getNextId()) == null) { done = true; } return result; ...
public org.grpcvsrest.raggr.datasource.Content next() { if (done) { return null; } int contentId = lastContentId.incrementAndGet(); org.grpcvsrest.raggr.datasource.Content result = datasource.fetch(contentId); if (result == null) { done = true; } return result; }
public com.louiscarrese.clopecounter.model.Jour addClope(com.louiscarrese.clopecounter.model.Jour jour) { io.realm.Realm realm = io.realm.Realm.getInstance(this.context); realm.beginTransaction(); com.louiscarrese.clopecounter.model.Clope clope = new com.louiscarrese.clopecounter.model.Clope(); clope.se...
public com.louiscarrese.clopecounter.model.Jour addClope(com.louiscarrese.clopecounter.model.Jour jour) { io.realm.Realm realm = io.realm.Realm.getInstance(this.context); realm.beginTransaction(); com.louiscarrese.clopecounter.model.Clope clope = new com.louiscarrese.clopecounter.model.Clope(); clope.se...