buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
protected void onSaveInstanceState(android.os.Bundle outState) { super.onSaveInstanceState(outState); if (((chapters) != null) && (!(chapters.isEmpty()))) { outState.putParcelableArrayList(org.gdg.frisbee.android.chapter.MainActivity.ARG_CHAPTERS, chapters); } if ((mViewPagerAdapter) != null) { ...
protected void onSaveInstanceState(android.os.Bundle outState) { super.onSaveInstanceState(outState); if (!(chapters.isEmpty())) { outState.putParcelableArrayList(org.gdg.frisbee.android.chapter.MainActivity.ARG_CHAPTERS, chapters); } if ((mViewPagerAdapter) != null) { outState.putString...
private void reviewAmplitudeEvent(java.lang.String reviewId, java.lang.String action) { java.util.HashMap<java.lang.String, java.lang.String> properties = new java.util.HashMap<java.lang.String, java.lang.String>(); properties.put(StaticConstants.ACTION, action); properties.put(StaticConstants.REVIEW_ID, re...
private void reviewAmplitudeEvent(java.lang.String reviewId, java.lang.String action) { java.util.HashMap<java.lang.String, java.lang.String> properties = new java.util.HashMap<java.lang.String, java.lang.String>(); properties.put(StaticConstants.ACTION, action); properties.put(StaticConstants.REVIEW_ID, re...
public long createQuiz(com.UndefinedParameter.app.core.Quiz quiz, long groupID) { long rvalue = quizDAO.createQuiz(quiz.getCreatorId(), com.UndefinedParameter.app.core.InputUtils.sanitizeInput(quiz.getName()), quiz.getDifficulty(), quiz.getRating(), com.UndefinedParameter.app.core.InputUtils.sanitizeInput(quiz.getD...
public long createQuiz(com.UndefinedParameter.app.core.Quiz quiz, long groupID) { long rvalue = quizDAO.createQuiz(quiz.getCreatorId(), com.UndefinedParameter.app.core.InputUtils.sanitizeInput(quiz.getName()), quiz.getDifficulty(), quiz.getRating(), com.UndefinedParameter.app.core.InputUtils.sanitizeInput(quiz.getD...
public java.lang.String[] getValues() { int columnNumber = tblContent.getColumnCount(); java.lang.System.out.println(columnNumber); java.lang.String[] result = new java.lang.String[columnNumber]; for (int i = 0; i < columnNumber; i++) { result[i] = ((java.lang.String) (tblContent.getModel().getV...
public java.lang.String[] getValues() { int columnNumber = tblContent.getColumnCount(); java.lang.String[] result = new java.lang.String[columnNumber]; for (int i = 0; i < columnNumber; i++) { result[i] = ((java.lang.String) (tblContent.getModel().getValueAt(0, i))); } return result; }
public void testgetCountByName() { org.junit.Assert.assertTrue(((clusterConfigDao.getCountByName("test")) == 0)); org.smartdata.model.ClusterConfig clusterConfig = new org.smartdata.model.ClusterConfig(1, "test", "test1"); clusterConfigDao.insert(clusterConfig); org.junit.Assert.assertTrue(((clusterConf...
public void testgetCountByName() { org.junit.Assert.assertTrue(((clusterConfigDao.getCountByName("test")) == 0)); org.smartdata.model.ClusterConfig clusterConfig = new org.smartdata.model.ClusterConfig(1, "test", "test1"); clusterConfigDao.insert(clusterConfig); org.junit.Assert.assertTrue(((clusterConf...
public void testGetControllerNonSingleton() { io.craigmiller160.locus.LocusController locusController = new io.craigmiller160.locus.LocusController(); io.craigmiller160.locus.util.LocusStorage storage = getStorage(); storage.addControllerType("ControllerOne", io.craigmiller160.locus.sample.ControllerOne.cla...
public void testGetControllerNonSingleton() { io.craigmiller160.locus.util.LocusStorage storage = getStorage(); io.craigmiller160.locus.LocusController locusController = new io.craigmiller160.locus.LocusController(storage); storage.addControllerType("ControllerOne", io.craigmiller160.locus.sample.Controller...
public static com.playposse.egoeater.storage.PairingParcelable getNextPairing(android.content.ContentResolver contentResolver) { android.database.Cursor cursor = contentResolver.query(PipelineTable.CONTENT_URI, PipelineTable.COLUMN_NAMES, ((com.playposse.egoeater.contentprovider.EgoEaterContract.PipelineTable.ARE_P...
public static com.playposse.egoeater.storage.PairingParcelable getNextPairing(android.content.ContentResolver contentResolver) { android.database.Cursor cursor = contentResolver.query(PipelineTable.CONTENT_URI, PipelineTable.COLUMN_NAMES, null, null, ((com.playposse.egoeater.contentprovider.EgoEaterContract.Pipelin...
public float getDrivingDistance(com.example.desent.desent.utils.TimeScale timeScale) { float distance = 0; android.content.SharedPreferences pref = android.preference.PreferenceManager.getDefaultSharedPreferences(context); if (pref.getBoolean("pref_key_car_owner", false)) { switch (timeScale) { ...
public float getDrivingDistance(com.example.desent.desent.utils.TimeScale timeScale) { float distance = 0; android.content.SharedPreferences pref = android.preference.PreferenceManager.getDefaultSharedPreferences(context); if (pref.getBoolean("pref_key_car_owner", false)) { switch (timeScale) { ...
public void init() { final mbeb.opengldefault.game.OptionsMenu options = new mbeb.opengldefault.game.OptionsMenu(); mbeb.ld38.SharedData data = new mbeb.ld38.SharedData(new mbeb.ld38.HealthBarGUI()); data.overworld = new mbeb.ld38.overworld.OverWorld(); addGameState(GameStateIdentifier.INTRO, new mbeb.o...
public void init() { final mbeb.opengldefault.game.OptionsMenu options = new mbeb.opengldefault.game.OptionsMenu(); mbeb.ld38.SharedData data = new mbeb.ld38.SharedData(new mbeb.ld38.HealthBarGUI()); data.overworld = new mbeb.ld38.overworld.OverWorld(); addGameState(GameStateIdentifier.INTRO, new mbeb.o...
public void onBindViewHolder(group8.matchtracker.adapters.PlayerListAdapter.ViewHolder holder, int position) { group8.matchtracker.data.Player currentPlayer = group8.matchtracker.adapters.PlayerListAdapter.mPlayers.get(position); holder.mPlayerId = currentPlayer.getId(); holder.mNameTextView.setText(current...
public void onBindViewHolder(group8.matchtracker.adapters.PlayerListAdapter.ViewHolder holder, int position) { group8.matchtracker.data.Player currentPlayer = group8.matchtracker.adapters.PlayerListAdapter.mPlayers.get(position); holder.mPlayerId = currentPlayer.getId(); holder.mNameTextView.setText(current...
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) { int numHeaders = mMenuListView.getHeaderViewsCount(); if (position < numHeaders) { return ; } int numFooters = mMenuListView.getFooterViewsCount(); int menuItemsCount = mMenuListAda...
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) { int numHeaders = mMenuListView.getHeaderViewsCount(); if (position < numHeaders) { return ; } int menuItemsCount = mMenuListAdapter.getCount(); if ((position - numHeaders) >= menuIt...
public boolean isItemValidForSlot(int index, net.minecraft.item.ItemStack stack) { return ((index > 0) && (index < (getSizeInventory()))) && ((stack == null) || ((stack.getItem()) == (com.github.blackjak34.compute.DoesNotCompute.punchCardStack))); }
public boolean isItemValidForSlot(int index, net.minecraft.item.ItemStack stack) { return ((index >= 0) && (index < (getSizeInventory()))) && ((stack == null) || ((stack.getItem()) == (com.github.blackjak34.compute.DoesNotCompute.punchCardStack))); }
private com.google.gcloud.dns.testing.LocalDnsHelper.Response handleChangeCreate(com.sun.net.httpserver.HttpExchange exchange, java.lang.String projectId, java.lang.String zoneName, java.lang.String query) throws java.io.IOException { java.lang.String[] fields = com.google.gcloud.dns.testing.OptionParsers.parseGetO...
private com.google.gcloud.dns.testing.LocalDnsHelper.Response handleChangeCreate(com.sun.net.httpserver.HttpExchange exchange, java.lang.String projectId, java.lang.String zoneName, java.lang.String query) throws java.io.IOException { java.lang.String requestBody = com.google.gcloud.dns.testing.LocalDnsHelper.decod...
public void render(scibby.graphics.Screen screen) { screen.fillRect(getAbsolutePosition().getX(), getAbsolutePosition().getY(), width, height, bColour); screen.fillRect(getAbsolutePosition().getX(), getAbsolutePosition().getY(), ((int) (getFill())), height, fColour); }
public void render(scibby.graphics.Screen screen) { screen.fillRect(getAbsolutePosition().getX(), getAbsolutePosition().getY(), width, height, bColour, true); screen.fillRect(getAbsolutePosition().getX(), getAbsolutePosition().getY(), ((int) (getFill())), height, fColour, true); }
public void onCreate(@android.support.annotation.Nullable android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null) { java.util.HashMap<java.lang.String, java.util.ArrayList<android.graphics.Point>> data = ((java.util.HashMap<java.lang.String, java.util....
public void onCreate(@android.support.annotation.Nullable android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null) { java.util.HashMap<java.lang.String, java.util.ArrayList<android.graphics.Point>> data = ((java.util.HashMap<java.lang.String, java.util....
private org.eclipse.kura.net.NetConfigIP4 getIP4config(org.eclipse.kura.core.net.WifiInterfaceConfigImpl wifiInterfaceConfig) { org.eclipse.kura.net.NetConfigIP4 netConfigIP4 = null; if (wifiInterfaceConfig != null) { loop : for (org.eclipse.kura.net.wifi.WifiInterfaceAddressConfig wifiInterfaceAddressC...
private org.eclipse.kura.net.NetConfigIP4 getIP4config(org.eclipse.kura.core.net.WifiInterfaceConfigImpl wifiInterfaceConfig) { if (wifiInterfaceConfig == null) { return null; } org.eclipse.kura.net.NetConfigIP4 netConfigIP4 = null; loop : for (org.eclipse.kura.net.wifi.WifiInterfaceAddressConfi...
private static boolean existQuote(java.lang.String symbol) { boolean exists = false; try { yahoofinance.Stock stock = yahoofinance.YahooFinance.get(symbol); if ((com.udacity.stockhawk.util.GeneralUtils.isValid(stock)) && (com.udacity.stockhawk.util.GeneralUtils.hasHistory(stock, com.udacity.stoc...
private static boolean existQuote(java.lang.String symbol) { boolean exists = false; try { yahoofinance.Stock stock = yahoofinance.YahooFinance.get(symbol); if ((com.udacity.stockhawk.util.GeneralUtils.isValid(stock)) && (com.udacity.stockhawk.util.GeneralUtils.hasHistory(stock, com.udacity.stoc...
public void cleanupDeletedPrimitives() { beginUpdate(); try { org.openstreetmap.josm.data.osm.bool changed = cleanupDeleted(nodes.iterator()); if (cleanupDeleted(ways.iterator())); { changed = true; } if (cleanupDeleted(relations.iterator())) { cha...
public void cleanupDeletedPrimitives() { beginUpdate(); try { boolean changed = cleanupDeleted(nodes.iterator()); if (cleanupDeleted(ways.iterator())) { changed = true; } if (cleanupDeleted(relations.iterator())) { changed = true; } if (cha...
static expression.While parse() { expression.While whileELSE = null; scanner.get(); scanner.get(); scanner.get(); scanner.get(); scanner.get(); expression.Compare compare = expression.Compare.parse(); expression.Token t = scanner.getCurrentToken(); if (!(t instanceof expression.LeftB...
static expression.While parse() { expression.While whileELSE = null; scanner.get(); expression.Compare compare = expression.Compare.parse(); expression.Token t = scanner.getCurrentToken(); if (!(t instanceof expression.LeftBracketToken)) { java.lang.System.out.println("Error: While Parsing")...
public double chao84() { if (((n) < 2) || ((f[1]) == 0)) return c; return (c) + ((((f[0]) * (f[0])) / 2) / (f[1])); }
public double chao84() { if ((n) == 0) return 0; if ((f[1]) == 0) return c; return (c) + ((((f[0]) * (f[0])) / 2) / (f[1])); }
public void testVerificationByHashedEmail() { try { tdbh = new TestDBHandler(); com.codecool.faceCode.classes.User sampleUser = manager.getUserByID(2); java.lang.String sampleEmail = sampleUser.getEmail(); tdbh.addVerification(sampleUser); boolean result = tdbh.verifyUserByID...
public void testVerificationByHashedEmail() throws java.lang.Exception { tdbh = new TestDBHandler(); com.codecool.faceCode.classes.User sampleUser = manager.getUserByID(2); java.lang.String sampleEmail = sampleUser.getEmail(); tdbh.addVerification(sampleUser); boolean result = tdbh.verifyUserByID(ma...
public void onItemClicked(int mPosition, com.gnest.remember.data.SelectableMemo mMemo, android.widget.TextView mTextView) { if (isMultiChoiceEnabled()) { updateSelectedList(mPosition, mMemo); if ((mSelectedList.size()) < 2) { mListener.setShareButtonVisibility(true); }else { ...
public void onItemClicked(int mPosition, com.gnest.remember.data.SelectableMemo mMemo) { if (isMultiChoiceEnabled()) { updateSelectedList(mPosition, mMemo); if ((mSelectedList.size()) < 2) { mListener.setShareButtonVisibility(true); }else { mListener.setShareButtonVis...
public void getCampus(javafx.scene.control.ChoiceBox<java.lang.String> cb, javafx.scene.control.TextArea ta, javafx.scene.layout.BorderPane bp) { if (cb.getValue().equals("Brownsville")) { bp.setStyle("-fx-background-image: url(itemsReq/BROW.png); -fx-background-size: cover; -fx-background-repeat: no-repeat...
public void getCampus(javafx.scene.control.ChoiceBox<java.lang.String> cb, javafx.scene.control.TextArea ta, javafx.scene.layout.BorderPane bp) { switch (cb.getValue()) { case "Brownsville" : bp.setStyle("-fx-background-image: url(itemsReq/BROW.png); -fx-background-size: cover; -fx-background-re...
private void goToLastChild() { java.util.ArrayList<com.yayitsandrew.hivemind.ThoughtNode> children = _curr.children; if ((children.size()) == 0) { if (getCurrentThought().equals("")) { growChild(); } return ; } if ((_curr.lastVisitedChild) != null) { _curr = _...
private void goToLastChild() { java.util.ArrayList<com.yayitsandrew.hivemind.ThoughtNode> children = _curr.children; if ((children.size()) == 0) { if (!(getCurrentThought().equals(""))) { growChild(); } return ; } if ((_curr.lastVisitedChild) != null) { _curr ...
public void onViewCreated(android.view.View view, @android.support.annotation.Nullable android.os.Bundle savedInstanceState) { butterknife.ButterKnife.bind(this, view); mDialogLabel.setText(getString(R.string.interpretation_text)); mInterpretationText.setText(mInterpretation.getText()); mInterpretation ...
public void onViewCreated(android.view.View view, @android.support.annotation.Nullable android.os.Bundle savedInstanceState) { butterknife.ButterKnife.bind(this, view); mInterpretation = new com.raizlabs.android.dbflow.sql.language.Select().from(org.dhis2.android.dashboard.api.models.Interpretation.class).where...
public boolean hasVault() { org.bukkit.plugin.Plugin plugin = getServer().getPluginManager().getPlugin("Vault"); return !(((plugin == null) || (!(plugin instanceof net.milkbowl.vault.Vault))) || (!(this.getConfig().getBoolean("economy.enable", true)))); }
public boolean hasVault() { org.bukkit.plugin.Plugin plugin = getServer().getPluginManager().getPlugin("Vault"); return !((plugin == null) || (!(this.getConfig().getBoolean("economy.enable", true)))); }
private void notifyAllClients(mt.Order order) throws mt.exception.ServerException { mt.server.MicroServer.LOGGER.log(java.util.logging.Level.INFO, "Notifying clients about the new order..."); if ((order.getNumberOfUnits()) < 10) { return ; } if (order == null) { throw new mt.exception.Se...
private void notifyAllClients(mt.Order order) throws mt.exception.ServerException { mt.server.MicroServer.LOGGER.log(java.util.logging.Level.INFO, "Notifying clients about the new order..."); if (order == null) { throw new mt.exception.ServerException("There was no order in the message"); } for ...
private java.util.Set<java.lang.String> getServiceNamesInStack(long environmentId) { java.util.Set<java.lang.String> servicesInEnv = new java.util.HashSet<java.lang.String>(); java.util.List<? extends io.cattle.platform.core.model.Service> services = objectManager.find(io.cattle.platform.core.model.Service.clas...
private java.util.Set<java.lang.String> getServiceNamesInStack(long environmentId) { java.util.Set<java.lang.String> servicesInEnv = new java.util.HashSet<java.lang.String>(); java.util.List<? extends io.cattle.platform.core.model.Service> services = objectManager.find(io.cattle.platform.core.model.Service.clas...
private void setBackButton() { android.widget.Button button = ((android.widget.Button) (getActivity().findViewById(R.id.button_1))); button.setText("Close"); button.setOnClickListener(new android.view.View.OnClickListener() { public void onClick(android.view.View v) { getActivity().finis...
private void setBackButton() { android.widget.Button button = ((android.widget.Button) (getActivity().findViewById(R.id.button_1))); if (button != null) { button.setText("Close"); button.setOnClickListener(new android.view.View.OnClickListener() { public void onClick(android.view.Vie...
public void onCreate() { super.onCreate(); com.oliverbud.android.imagelist.Application.App.context = getApplicationContext(); objectGraph = dagger.ObjectGraph.create(getModules().toArray()); objectGraph = objectGraph.plus(new com.oliverbud.android.imagelist.Networking.NetworkModule(), new com.oliverbud....
public void onCreate() { super.onCreate(); com.oliverbud.android.imagelist.Application.App.context = getApplicationContext(); objectGraph = dagger.ObjectGraph.create(getModules().toArray()); objectGraph = objectGraph.plus(new com.oliverbud.android.imagelist.Networking.NetworkModule()); objectGraph.i...
private static org.pentaho.agilebi.modeler.LogicalTable findCorrespondingOlapTable(org.pentaho.agilebi.modeler.LogicalTable relationalTable, org.pentaho.agilebi.modeler.LogicalModel olapModel) { for (org.pentaho.agilebi.modeler.LogicalTable table : olapModel.getLogicalTables()) { if (table.getPhysicalTable(...
protected static org.pentaho.agilebi.modeler.LogicalTable findCorrespondingOlapTable(org.pentaho.agilebi.modeler.LogicalTable relationalTable, org.pentaho.agilebi.modeler.LogicalModel olapModel) { for (org.pentaho.agilebi.modeler.LogicalTable table : olapModel.getLogicalTables()) { if (table.getPhysicalTabl...
public com.example.andrew.prokhor.eyecare.ui.adapters.ExpandableCursorRecyclerViewAdapter.MyParentViewHolder onCreateParentViewHolder(android.view.ViewGroup parentViewGroup) { android.util.Log.d(com.example.andrew.prokhor.eyecare.ui.adapters.ExpandableCursorRecyclerViewAdapter.LOG_TAG, "onCreateParentViewHolder()")...
public com.example.andrew.prokhor.eyecare.ui.adapters.ExpandableCursorRecyclerViewAdapter.MyParentViewHolder onCreateParentViewHolder(android.view.ViewGroup parentViewGroup) { android.util.Log.d(com.example.andrew.prokhor.eyecare.ui.adapters.ExpandableCursorRecyclerViewAdapter.LOG_TAG, "onCreateParentViewHolder()")...
public void goForward(double distance) { x = (x) + (distance * (java.lang.Math.cos(java.lang.Math.toRadians(angle)))); y = (x) + (distance * (java.lang.Math.sin(java.lang.Math.toRadians(angle)))); }
public void goForward(double distance) { x = (x) + (distance * (java.lang.Math.cos(java.lang.Math.toRadians(angle)))); y = (y) + (distance * (java.lang.Math.sin(java.lang.Math.toRadians(angle)))); }
private de.lampware.racing.istats.model.ResultCollection createFromDataObject(com.google.gson.JsonObject dataObject) { com.google.gson.JsonArray jsonResults = dataObject.getAsJsonArray(de.lampware.racing.istats.json.ResultCollectionFactory.RESULTS_KEY); java.util.List<de.lampware.racing.istats.model.Result> res...
private java.util.List<de.lampware.racing.istats.model.Result> createFromDataObject(com.google.gson.JsonObject dataObject) { com.google.gson.JsonArray jsonResults = dataObject.getAsJsonArray(de.lampware.racing.istats.json.ResultCollectionFactory.RESULTS_KEY); return java.util.stream.StreamSupport.stream(jsonRes...
private void updateUI() { try { actions.clear(); actions.addAll(eu.power_switch.database.handler.DatabaseHandler.getAlarmActions(eu.power_switch.shared.constants.SleepAsAndroidConstants.SLEEP_AS_ANDROID_ALARM_EVENT.getById(spinnerEventType.getSelectedItemPosition()))); } catch (java.lang.Excepti...
private void updateUI() { actions.clear(); try { actions.addAll(eu.power_switch.database.handler.DatabaseHandler.getAlarmActions(eu.power_switch.shared.constants.SleepAsAndroidConstants.SLEEP_AS_ANDROID_ALARM_EVENT.getById(spinnerEventType.getSelectedItemPosition()))); } catch (java.lang.Exception e...
public boolean[] binaryRep() { java.lang.String bin = java.lang.Integer.toBinaryString(size); int length = bin.length(); boolean[] arr = new boolean[length]; for (int i = length - 1; i >= 0; i--) { arr[((length - 1) - i)] = ((bin.charAt(i)) == '1') ? true : false; } return arr; }
public boolean[] binaryRep() { java.lang.String bin = java.lang.Integer.toBinaryString(size); java.lang.System.out.println(bin); int length = bin.length(); boolean[] arr = new boolean[length]; for (int i = length - 1; i >= 0; i--) { arr[((length - 1) - i)] = ((bin.charAt(i)) == '1') ? true :...
protected java.awt.Rectangle getBoundaries(bibliothek.gui.dock.station.StationChildHandle item) { java.awt.Rectangle result = getBoundaries(item.getDockable().getComponent()); java.awt.Rectangle title = null; if ((item.getTitle()) != null) { title = getBoundaries(item.getTitle().getComponent()); ...
protected java.awt.Rectangle getBoundaries(bibliothek.gui.dock.station.StationChildHandle item) { java.awt.Rectangle result = getBoundaries(item.getDockable().getComponent()); java.awt.Rectangle title = null; if ((item.getTitle()) != null) { title = getBoundaries(item.getTitle().getComponent()); ...
private java.lang.String normalize(java.lang.String inStr) { java.lang.String str = inStr.trim().toLowerCase(); if (((str.indexOf('-')) != (-1)) && ((str.indexOf(' ')) != (-1))) { if (isHyphenIgnored()) { str = str.replace('-', ' '); }else { str = str.replace(" - ", " ");...
private java.lang.String normalize(java.lang.String inStr) { java.lang.String str = inStr.trim(); if (((str.indexOf('-')) != (-1)) && ((str.indexOf(' ')) != (-1))) { if (isHyphenIgnored()) { str = str.replace('-', ' '); }else { str = str.replace(" - ", " "); } ...
private void setupPanel() { this.setLayout(baseLayout); this.add(fibonacciButton); this.add(factorialButton); this.add(inputField); this.add(resultsArea); resultsArea.setWrapStyleWord(true); resultsArea.setLineWrap(true); resultsArea.setEditable(false); this.setBackground(java.awt.Co...
private void setupPanel() { this.setLayout(); this.add(fibonacciButton); this.add(factorialButton); this.add(inputField); this.add(resultsArea); resultsArea.setWrapStyleWord(true); resultsArea.setLineWrap(true); resultsArea.setEditable(false); this.setBackground(java.awt.Color.CYAN);...
public static jmri.util.PhysicalLocation getBeanPhysicalLocation(jmri.NamedBean b) { java.lang.String s = ((java.lang.String) (b.getProperty(jmri.util.PhysicalLocation.NBPropertyKey))); if ((s == null) || (s.equals(""))) { return jmri.util.PhysicalLocation.Origin; }else { return jmri.util.Ph...
public static jmri.util.PhysicalLocation getBeanPhysicalLocation(jmri.NamedBean b) { java.lang.String s = ((java.lang.String) (b.getProperty(jmri.util.PhysicalLocation.NBPropertyKey))); if ((s == null) || (s.isEmpty())) { return jmri.util.PhysicalLocation.Origin; }else { return jmri.util.Phy...
private int getWidth() { mWidth = 0; for (fr.wcs.battlegeek.ui.Block block : mBlocks) { if ((block.getX()) > (mWidth)) mWidth = ((int) (block.getX())); } return mWidth; }
public int getWidth() { mWidth = 0; for (fr.wcs.battlegeek.ui.Block block : mBlocks) { if ((block.getX()) > (mWidth)) mWidth = ((int) (block.getX())); } return mWidth; }
protected void updateSeries(org.jfree.data.time.TimeSeries series, java.util.List<org.jfree.data.time.TimeSeriesDataItem> buffer) { series.setNotify(false); synchronized(buffer1) { for (org.jfree.data.time.TimeSeriesDataItem dataItem : buffer1) { series.add(dataItem); } buffe...
protected void updateSeries(org.jfree.data.time.TimeSeries series, java.util.List<org.jfree.data.time.TimeSeriesDataItem> buffer) { series.setNotify(false); synchronized(buffer) { for (org.jfree.data.time.TimeSeriesDataItem dataItem : buffer) { series.add(dataItem); } buffer....
private void saveGroups(org.apache.oro.text.regex.MatchResult result, java.lang.String namep, org.apache.jmeter.threads.JMeterVariables vars) { if (result != null) { for (int x = 0; x < (result.groups()); x++) { vars.put(((namep + "_g") + x), result.group(x)); } } }
private void saveGroups(org.apache.oro.text.regex.MatchResult result, java.lang.String namep, org.apache.jmeter.threads.JMeterVariables vars) { for (int x = 0; x < (result.groups()); x++) { vars.put(((namep + "_g") + x), result.group(x)); } }
public java.lang.String toString() { final java.lang.String current = ((m_current.get()) != null) ? m_current.toString() : "no current task"; final java.lang.String queue = ((m_queue.size()) > 0) ? m_queue.toString() : "[queue empty]"; final java.lang.String toReturn = (current + " ") + queue; return to...
public java.lang.String toString() { final java.lang.String current = ((m_current.get()) != null) ? m_current.get().toString() : "no current task"; final java.lang.String queue = ((m_queue.size()) > 0) ? m_queue.toString() : "[queue empty]"; final java.lang.String toReturn = (current + " ") + queue; ret...
public static org.kiteq.binding.manager.BindingManager getInstance(java.lang.String zkAddr) { org.kiteq.binding.manager.BindingManager bindingManager = org.kiteq.binding.manager.BindingManager.instances.get(zkAddr); if (bindingManager == null) { synchronized(zkAddr.intern()) { if (bindingMan...
public static org.kiteq.binding.manager.BindingManager getInstance(java.lang.String zkAddr) { org.kiteq.binding.manager.BindingManager bindingManager = org.kiteq.binding.manager.BindingManager.instances.get(zkAddr); if (bindingManager == null) { synchronized(zkAddr.intern()) { bindingManager...
public void propertyChange(java.beans.PropertyChangeEvent evt) { java.lang.String evtName = evt.getPropertyName(); edu.chl.calendarplusplus.model.IContactGroup cg = ((edu.chl.calendarplusplus.model.IContactGroup) (evt.getNewValue())); if (evtName.equalsIgnoreCase("EditContractGroupClicked")) { java....
public void propertyChange(java.beans.PropertyChangeEvent evt) { java.lang.String evtName = evt.getPropertyName(); if (evtName.equalsIgnoreCase("EditContractGroupClicked")) { edu.chl.calendarplusplus.model.IContactGroup cg = ((edu.chl.calendarplusplus.model.IContactGroup) (evt.getNewValue())); j...
public static boolean checkMissingInRow(int i, int j, de.halemba.elements.Field[][] grid) { for (int k = 0; k < 9; k++) { if ((grid[k][j].getNumber()) == i) { return false; } } return true; }
public static boolean checkMissingInRow(int i, int j, de.halemba.elements.Field[][] grid) { for (int k = 0; k < 9; k++) { if ((grid[j][k].getNumber()) == i) { return false; } } return true; }
private java.lang.String calc(java.lang.String input) { java.lang.String reverse = ""; for (int i = (input.length()) - 1; i >= 0; i--) { reverse = reverse + (input.charAt(i)); return reverse; } }
private java.lang.String calc(java.lang.String input) { java.lang.String reverse = ""; for (int i = (input.length()) - 1; i >= 0; i--) { reverse = reverse + (input.charAt(i)); } return reverse; }
private void addEdgeEdger2(java.util.TreeSet<org.nschmidt.ldparteditor.data.Vertex> h1, java.util.TreeSet<org.nschmidt.ldparteditor.data.Vertex> h2) { for (org.nschmidt.ldparteditor.data.Vertex v1 : h1) { for (org.nschmidt.ldparteditor.data.Vertex v2 : h2) { if (isNeighbour(v1, v2)) { ...
private void addEdgeEdger2(java.util.TreeSet<org.nschmidt.ldparteditor.data.Vertex> h1, java.util.TreeSet<org.nschmidt.ldparteditor.data.Vertex> h2) { for (org.nschmidt.ldparteditor.data.Vertex v1 : h1) { for (org.nschmidt.ldparteditor.data.Vertex v2 : h2) { if (isNeighbour(v1, v2)) { ...
public boolean onKeyUp(int keyCode, android.view.KeyEvent event) { if (((keyCode == (android.view.KeyEvent.KEYCODE_MENU)) && ((mReactInstanceManager) != null)) && (BuildConfig.DEBUG)) { mReactInstanceManager.showDevOptionsDialog(); return true; } return super.onKeyUp(keyCode, event); }
public boolean onKeyUp(int keyCode, android.view.KeyEvent event) { if ((keyCode == (android.view.KeyEvent.KEYCODE_MENU)) && ((mReactInstanceManager) != null)) { mReactInstanceManager.showDevOptionsDialog(); return true; } return super.onKeyUp(keyCode, event); }
public void ElfoVerdeAtira42FlechasEXpFica84() { ElfosVerdes teste = new ElfosVerdes("Arthur"); for (int i = 0; i < 42; i++) teste.atirarFlechaDeVidro(new Dwarf()); assertEquals(84, teste.getExperiencia()); }
public void ElfoVerdeAtira42FlechasEXpFica84() { ElfosVerdes teste = new ElfosVerdes(); for (int i = 0; i < 42; i++) teste.atirarFlechaDeVidro(new Dwarf()); assertEquals(84, teste.getExperiencia()); }
public boolean execute() { if (super.getReceiver().hasCashAccount(this.accountName)) { Transaction.CashAcct removal = null; for (Transaction.CashAcct account : super.getReceiver().getCashAccounts()) { if (account.getName().equalsIgnoreCase(this.accountName)) { super.getRe...
public boolean execute() { if (super.getReceiver().hasCashAccount(this.accountName)) { Transaction.CashAcct removal = null; for (Transaction.CashAcct account : super.getReceiver().getCashAccounts()) { if (account.getName().equalsIgnoreCase(this.accountName)) { removal = a...
protected void onCreate(android.os.Bundle savedInstanceState) { getDelegate().installViewFactory(); getDelegate().onCreate(savedInstanceState); super.onCreate(savedInstanceState); setContentView(R.layout.activity_settings); setSupportActionBar(((android.support.v7.widget.Toolbar) (findViewById(R.id....
protected void onCreate(android.os.Bundle savedInstanceState) { getDelegate().installViewFactory(); getDelegate().onCreate(savedInstanceState); super.onCreate(savedInstanceState); setContentView(R.layout.activity_settings); setSupportActionBar(((android.support.v7.widget.Toolbar) (findViewById(R.id....
public void setFollowGPS(boolean follow) { android.util.Log.d("Main", ((("setFollowGPS from " + (followGPS)) + " to ") + follow)); if ((followGPS) != follow) { followGPS = follow; if (follow) { setShowGPS(true); } map.setFollowGPS(follow); triggerMenuInvalidat...
public void setFollowGPS(boolean follow) { if ((followGPS) != follow) { followGPS = follow; if (follow) { setShowGPS(true); } map.setFollowGPS(follow); triggerMenuInvalidation(); } if (follow && ((lastLocation) != null)) { android.util.Log.d("Main"...
public static void DFS(int[][] G) { boolean[] visited = new boolean[G.length]; for (int i = 0; i < (G.length); i++) { visited[i] = true; } DFS.recursiveDFS(G, visited, 0); }
public static void DFS(int[][] G) { int[] visited = new int[G.length]; for (int i = 0; i < (G.length); i++) { visited[i] = 0; } DFS.recursiveDFS(G, visited, 0); }
public boolean hasPerms(org.bukkit.entity.Player player, java.lang.String perm, java.lang.String world) { if ((net.slipcor.classranks.handlers.HandleVaultPerms.permission) == null) { java.lang.System.out.println("no VAULT not instance !"); return false; } if (plugin.config.isDefaultrankallwo...
public boolean hasPerms(org.bukkit.entity.Player player, java.lang.String perm, java.lang.String world) { if ((net.slipcor.classranks.handlers.HandleVaultPerms.permission) == null) { java.lang.System.out.println("no VAULT not instance !"); return false; } if (plugin.config.isDefaultrankallwo...
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) { java.util.HashMap<java.lang.String, java.lang.String> c = ((java.util.HashMap<java.lang.String, java.lang.String>) (parent.getItemAtPosition(position))); java.lang.String artist = c.get("name"); if...
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) { java.util.HashMap<java.lang.String, java.lang.String> c = ((java.util.HashMap<java.lang.String, java.lang.String>) (parent.getItemAtPosition(position))); java.lang.String artist = c.get("name"); if...
public void actionPerformed(java.awt.event.ActionEvent e) { if ((com.elementaryengineers.fwc.db.FWCConfigurator.getCurrentPage()) != (Page.MY_ACCOUNT)) { if ((myAccount) == null) { myAccount = new com.elementaryengineers.fwc.panel.Account(); pnCard.add(myAccount, "Account"); ...
public void actionPerformed(java.awt.event.ActionEvent e) { if ((com.elementaryengineers.fwc.db.FWCConfigurator.getCurrentPage()) != (Page.MY_ACCOUNT)) { if ((myAccount) == null) { myAccount = new com.elementaryengineers.fwc.panel.Account(); pnCard.add(myAccount, "Account"); ...
public void onResponse(okhttp3.Call call, final okhttp3.Response response) throws java.io.IOException { if (!(response.isSuccessful())) { onFailure(call, new java.io.EOFException(response.body().string())); return ; } mActivity.runOnUiThread(new java.lang.Runnable() { @java.lang.Over...
public void onResponse(okhttp3.Call call, final okhttp3.Response response) throws java.io.IOException { if (!(response.isSuccessful())) { onFailure(call, new java.io.IOException(response.body().string())); return ; } mActivity.runOnUiThread(new java.lang.Runnable() { @java.lang.Overr...
public void run() { int distance; while (true) { us.fetchSample(usData, 0); distance = ((int) ((usData[0]) * 100.0)); cont.processUSData(distance); try { java.lang.Thread.sleep(50); } catch (java.lang.Exception e) { } } }
public void run() { while (true) { us.fetchSample(usData, 0); distance = ((int) ((usData[0]) * 100.0)); cont.processUSData(distance); try { java.lang.Thread.sleep(50); } catch (java.lang.Exception e) { } } }
public static ru.evotor.framework.core.action.event.receipt.discount.ReceiptDiscountEventResult create(@android.support.annotation.Nullable android.os.Bundle bundle) { if (bundle == null) { return null; } java.math.BigDecimal discount = ru.evotor.framework.core.action.datamapper.BundleUtils.getMoney...
public static ru.evotor.framework.core.action.event.receipt.discount.ReceiptDiscountEventResult create(@android.support.annotation.Nullable android.os.Bundle bundle) { if (bundle == null) { return null; } java.math.BigDecimal discount = ru.evotor.framework.core.action.datamapper.BundleUtils.getMoney...
public void onClick(android.view.View v) { printAllPersistent(); if ((mApp) != null) if (mApp.getPackageName().toString().equals(mContext.getPackageName())) android.support.design.widget.Snackbar.make(mContainer, mContext.getString(R.string.error_hide_lens_launcher), Snackbar.LENGTH_LONG).sh...
public void onClick(android.view.View v) { if ((mApp) != null) if (mApp.getPackageName().toString().equals(mContext.getPackageName())) android.support.design.widget.Snackbar.make(mContainer, mContext.getString(R.string.error_hide_lens_launcher), Snackbar.LENGTH_LONG).show(); else ...
public void printInfo() { if ((this.teaching.size()) != 0) { java.lang.System.out.println("[Teaching courses]"); for (RegCourse i : this.teaching) { java.lang.System.out.println((((i.getCourseCode()) + " - ") + (i.getCourseName()))); } } }
public void printInfo() { super.printInfo(); if ((this.teaching.size()) != 0) { java.lang.System.out.println("[Teaching courses]"); for (RegCourse i : this.teaching) { java.lang.System.out.println((((i.getCourseCode()) + " - ") + (i.getCourseName()))); } } }
public int compareTo(final de.interactive_instruments.etf.dal.dao.PreparedDtoCollection o) { if (!(o instanceof de.interactive_instruments.etf.dal.dao.PreparedDtoCollection)) { return -1; } final de.interactive_instruments.etf.dal.dao.basex.BsxPreparedDtoCollection bsxO = ((de.interactive_instrument...
public int compareTo(final de.interactive_instruments.etf.dal.dao.PreparedDtoCollection o) { if (!(o instanceof de.interactive_instruments.etf.dal.dao.PreparedDtoCollection)) { return -1; } final de.interactive_instruments.etf.dal.dao.basex.BsxPreparedDtoCollection bsxO = ((de.interactive_instrument...
public void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); if ((Build.VERSION.SDK_INT) >= (Build.VERSION_CODES.KITKAT)) { android.view.View decorView = this.getWindow().getDecorView(); decorView.setSystemUiVisibility((((android.view.View.SYSTEM_UI_FLAG_HIDE_...
public void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); if ((Build.VERSION.SDK_INT) >= (Build.VERSION_CODES.KITKAT)) { android.view.View decorView = this.getWindow().getDecorView(); decorView.setSystemUiVisibility(((android.view.View.SYSTEM_UI_FLAG_HIDE_N...
public void drawGraph(final int id, final int radius) { this.getChildren().clear(); new java.lang.Thread() { public void run() { try { parsing.Parser.getThread().join(); } catch (java.lang.InterruptedException e) { e.printStackTrace(); ...
public void drawGraph(final int id, final int radius) { this.getChildren().clear(); new java.lang.Thread(() -> { try { parsing.Parser.getThread().join(); } catch (java.lang.InterruptedException e) { e.printStackTrace(); } drawGraphUtil(id, radius); })....
public void shouldTrapJavascriptErrorAndWrapThemInErrors() { smartrics.rest.client.RestResponse response = createResponse(); smartrics.rest.fitnesse.fixture.support.JavascriptWrapper h = new smartrics.rest.fitnesse.fixture.support.JavascriptWrapper(); try { h.evaluateExpression(response, "some erron...
public void shouldTrapJavascriptErrorAndWrapThemInErrors() throws java.lang.Exception { smartrics.rest.client.RestResponse response = createResponse(); smartrics.rest.fitnesse.fixture.support.JavascriptWrapper h = new smartrics.rest.fitnesse.fixture.support.JavascriptWrapper(); try { h.evaluateExpre...
private void generateFrameLayout() { int currentOffset = 0; for (firm.nodes.Node n : nodeList) { edu.kit.ipd.pp.minijavac.codegen.Mode mode = n.getMode(); if (((mode == (firm.Mode.getIs())) || (mode == (firm.Mode.getBs()))) || (mode == (firm.Mode.getP()))) { frameSlots.put(n, current...
private void generateFrameLayout() { int currentOffset = 0; for (firm.nodes.Node n : nodeList) { edu.kit.ipd.pp.minijavac.codegen.Mode mode = n.getMode(); if (((mode.equals(firm.Mode.getIs())) || (mode.equals(firm.Mode.getBs()))) || (mode.equals(firm.Mode.getP()))) { frameSlots.put(n...
public int compare(scala.Tuple2<java.lang.Double, scala.Tuple2<java.lang.Integer, java.util.List<java.lang.Integer>>> score_1, scala.Tuple2<java.lang.Double, scala.Tuple2<java.lang.Integer, java.util.List<java.lang.Integer>>> score_2) { if ((score_1._1) < (score_2._1)) return -1; if ((score_1._1) >...
public int compare(scala.Tuple2<java.lang.Double, scala.Tuple2<java.lang.Integer, java.util.List<java.lang.Integer>>> score_1, scala.Tuple2<java.lang.Double, scala.Tuple2<java.lang.Integer, java.util.List<java.lang.Integer>>> score_2) { if ((score_1._1) > (score_2._1)) return -1; if ((score_1._1) <...
public void onClick(android.view.View view) { if (!(timeSlots.isTaken())) { holder.timeButton.setPressed(true); startActivity(new android.content.Intent(getActivity(), com.byteshaft.doctor.patients.CreateAppointmentActivity.class)); }else { com.byteshaft.doctor.utils.Helpers.showSnackBar...
public void onClick(android.view.View view) { if (!(timeSlots.isTaken())) { startActivity(new android.content.Intent(getActivity(), com.byteshaft.doctor.patients.CreateAppointmentActivity.class)); }else { com.byteshaft.doctor.utils.Helpers.showSnackBar(getView(), R.string.time_slot_booked); ...
private float getGearMaxSpeed() { Bus.Bus.GearPosition gear = bus.getGearPosition(); if (gear == (Bus.GearPosition.NEUTRAL)) { return GEAR_N_MAX_SPEED; } if (gear == (Bus.GearPosition.REVERSE)) { return GEAR_R_MAX_SPEED; } if (gear == (Bus.GearPosition.PARK)) { return GEA...
public float getGearMaxSpeed() { Bus.Bus.GearPosition gear = bus.getGearPosition(); if (gear == (Bus.GearPosition.NEUTRAL)) { return GEAR_N_MAX_SPEED; } if (gear == (Bus.GearPosition.REVERSE)) { return GEAR_R_MAX_SPEED; } if (gear == (Bus.GearPosition.PARK)) { return GEAR...
protected void onPreBindViewHolder(android.database.Cursor cursor, de.aw.awlib.recyclerview.AWLibViewHolder holder) { int indexID = cursor.getColumnIndex(getString(R.string._id)); if (indexID != (-1)) { long id = cursor.getLong(indexID); holder.setID(id); } }
protected void onPreBindViewHolder(android.database.Cursor cursor, de.aw.awlib.recyclerview.AWLibViewHolder holder) { onPreBindViewHolder(holder); int indexID = cursor.getColumnIndex(getString(R.string._id)); if (indexID != (-1)) { long id = cursor.getLong(indexID); holder.setID(id); } }
public static <T> T arrayGet(T[] array, int index) { return ((T) (com.questdb.misc.Unsafe.getUnsafe().getObject(array, ((com.questdb.misc.Unsafe.OBJ_OFFSET) + (index << (com.questdb.misc.Unsafe.OBJ_SCALE)))))); }
public static <T> T arrayGet(T[] array, int index) { assert (index > (-1)) && (index < (array.length)); return ((T) (com.questdb.misc.Unsafe.getUnsafe().getObject(array, ((com.questdb.misc.Unsafe.OBJ_OFFSET) + (index << (com.questdb.misc.Unsafe.OBJ_SCALE)))))); }
protected void executeWithTarget(simpleserver.Player player, java.lang.String message, java.lang.String name) { simpleserver.Server server = player.getServer(); mute(server, name); server.adminLog(((("Admin " + (player.getName())) + " muted player:\t ") + name)); }
protected void executeWithTarget(simpleserver.Player player, java.lang.String message, java.lang.String target) { simpleserver.Server server = player.getServer(); mute(server, target); server.adminLog(((("Admin " + (player.getName())) + " muted player:\t ") + target)); }
if ((recordingSettings.getDirectoryToSave()) != (file.getParent())) { guiConfig.setDirectoryToSave(recordingSettings.getDirectoryToSave()); eventHandler.startRecording(recordingSettings, file); } }
if ((file == null) || ((recordingSettings.getDirectoryToSave()) != (file.getParent()))) { guiConfig.setDirectoryToSave(recordingSettings.getDirectoryToSave()); eventHandler.startRecording(recordingSettings, file); } }
private void addLineItem(discountstrategy.LineItem newItem) { discountstrategy.LineItem[] temp = new discountstrategy.LineItem[(lineItems.length) + 1]; java.lang.System.arraycopy(lineItems, 0, temp, 0, lineItems.length); temp[lineItems.length] = newItem; lineItems = temp; }
private void addLineItem(discountstrategy.LineItem newItem) { discountstrategy.LineItem[] temp = new discountstrategy.LineItem[lineItems.length]; java.lang.System.arraycopy(lineItems, 0, temp, 0, ((lineItems.length) - 1)); temp[((lineItems.length) - 1)] = newItem; lineItems = temp; }
private void assertNearCacheInvalidation_whenMaxSizeExceeded(com.hazelcast.config.NearCacheConfig config) { final com.hazelcast.core.IMap<java.lang.Integer, java.lang.Integer> map = getNearCachedMapFromClient(config); populateNearCache(map, com.hazelcast.client.map.impl.nearcache.ClientMapNearCacheTest.MAX_CACH...
protected void assertNearCacheInvalidation_whenMaxSizeExceeded(com.hazelcast.config.NearCacheConfig config) { final com.hazelcast.core.IMap<java.lang.Integer, java.lang.Integer> map = getNearCachedMapFromClient(config); populateNearCache(map, com.hazelcast.client.map.impl.nearcache.ClientMapNearCacheTest.MAX_CA...
public io.grpc.internal.ReadableBuffers.ByteReadableBufferWrapper readBytes(int length) { checkReadable(length); java.nio.ByteBuffer buffer = bytes.duplicate(); bytes.position(((bytes.position()) + length)); buffer.limit(((bytes.position()) + length)); return new io.grpc.internal.ReadableBuffers.Byt...
public io.grpc.internal.ReadableBuffers.ByteReadableBufferWrapper readBytes(int length) { checkReadable(length); java.nio.ByteBuffer buffer = bytes.duplicate(); buffer.limit(((bytes.position()) + length)); bytes.position(((bytes.position()) + length)); return new io.grpc.internal.ReadableBuffers.Byt...
public void remove(final net.anfoya.mail.gmail.model.GmailTag tag) throws net.anfoya.mail.gmail.GMailException { try { labelService.remove(labelService.get(tag.getId())); } catch (final net.anfoya.mail.gmail.service.LabelException e) { throw new net.anfoya.mail.gmail.GMailException(("remove tag ...
public void remove(final net.anfoya.mail.gmail.model.GmailTag tag) throws net.anfoya.mail.gmail.GMailException { try { labelService.remove(tag.getId()); } catch (final net.anfoya.mail.gmail.service.LabelException e) { throw new net.anfoya.mail.gmail.GMailException(("remove tag " + (tag.getName()...
public java.lang.String buildCollectorFile(edu.cornell.kfs.concur.batch.businessobject.ConcurStandardAccountingExtractFile saeFileContents, edu.cornell.kfs.concur.batch.report.ConcurStandardAccountingExtractBatchReportData reportData) { if (saeFileContents == null) { throw new java.lang.IllegalArgumentExcep...
public java.lang.String buildCollectorFile(edu.cornell.kfs.concur.batch.businessobject.ConcurStandardAccountingExtractFile saeFileContents, edu.cornell.kfs.concur.batch.report.ConcurStandardAccountingExtractBatchReportData reportData) { if (saeFileContents == null) { throw new java.lang.IllegalArgumentExcep...
public void addGenreToFilm_ByGenreAndFilm() { film = new am.aca.entity.Film(); director = new am.aca.dao.impljdbc.DirectorDaoJdbc().addDirector("Matt Ross", false); film.setTitle("Captain Fantastic"); film.addDirector(director); film.addGeners(Genre.DRAMA); filmDao.addFilm(film); assertTrue(...
public void addGenreToFilm_ByGenreAndFilm() { director = new am.aca.dao.impljdbc.DirectorDaoJdbc().addDirector("Matt Ross", false); film.setTitle("Captain Fantastic"); film.addDirector(director); film.addGeners(Genre.DRAMA); filmDao.addFilm(film); assertTrue(filmDao.addGenreToFilm(film.getGeners...
public void onDataChange(com.firebase.client.DataSnapshot snapshot) { java.lang.Boolean playerSaved = snapshot.child(authorizedPlayer.getPushId()).exists(); if (!playerSaved) { firebasePlayersRef.child(authorizedPlayer.getPushId()).setValue(authorizedPlayer); } java.lang.String playerId = shared...
public void onDataChange(com.firebase.client.DataSnapshot snapshot) { java.lang.Boolean playerSaved = snapshot.child(authorizedPlayer.getPushId()).exists(); if (!playerSaved) { firebasePlayersRef.child(authorizedPlayer.getPushId()).setValue(authorizedPlayer); } java.lang.String playerId = shared...
public void addTodoTaskToDB(iu.i527.shalaka.todolistapp.ToDoTask task) { android.database.sqlite.SQLiteDatabase db = this.getWritableDatabase(); android.content.ContentValues values = new android.content.ContentValues(); values.put(ToDoListContract.ToDoList.COLUMN_NAME_TASK_DESCRIPTION, task.getTask_descrip...
public void addTodoTaskToDB(iu.i527.shalaka.todolistapp.ToDoTask task) { android.database.sqlite.SQLiteDatabase db = getWritableDatabase(); android.content.ContentValues values = new android.content.ContentValues(); values.put(ToDoListContract.ToDoList.COLUMN_NAME_TASK_DESCRIPTION, task.getTask_description(...
public void keyReleased(java.awt.event.KeyEvent keyEvent) { java.lang.System.out.println(("keyReleased:" + (keyEvent.getKeyChar()))); keyEvent.getSource(); char key = keyEvent.getKeyChar(); switch (key) { case hu.oe.nik.szfmv17t.automatedcar.hmi.HMI.STEER_LEFT_KEY : steeringWheel.ste...
public void keyReleased(java.awt.event.KeyEvent keyEvent) { java.lang.System.out.println(("keyReleased:" + (keyEvent.getKeyChar()))); char key = keyEvent.getKeyChar(); switch (key) { case hu.oe.nik.szfmv17t.automatedcar.hmi.HMI.STEER_LEFT_KEY : steeringWheel.steerLeft(); brea...
public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) { com.moyersoftware.contender.util.Util.Log(("data change: " + (dataSnapshot.toString()))); if (!(dataSnapshot.exists())) { android.widget.Toast.makeText(this, "Game not found", Toast.LENGTH_SHORT).show(); finish();...
public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) { com.moyersoftware.contender.util.Util.Log(("data change: " + (dataSnapshot.toString()))); if (!(dataSnapshot.exists())) { android.widget.Toast.makeText(this, "Game not found", Toast.LENGTH_SHORT).show(); finish();...
private void inspectClassNames(java.lang.Class classObj) { java.lang.System.out.println(("Full Class Name: " + (classObj.getName()))); java.lang.System.out.println(("Class Name: " + (classObj.getSimpleName()))); java.lang.System.out.println(("Declaring Class Name: " + (classObj.getDeclaringClass()))); i...
private void inspectClassNames(java.lang.Class classObj) { java.lang.System.out.println(("Full Class Name: " + (classObj.getName()))); java.lang.System.out.println(("Class Name: " + (classObj.getSimpleName()))); java.lang.System.out.println(("Declaring Class Name: " + (classObj.getDeclaringClass()))); j...
public void processStateLinks(final java.util.Set<java.lang.String> stateLinks) throws io.subutai.core.hubmanager.api.HubPluginException { for (java.lang.String link : stateLinks) { java.util.regex.Matcher environmentDataMatcher = io.subutai.core.hubmanager.impl.proccessors.VehsProccessor.ENVIRONMENT_PEER_D...
public void processStateLinks(final java.util.Set<java.lang.String> stateLinks) throws io.subutai.core.hubmanager.api.HubPluginException { for (java.lang.String link : stateLinks) { java.util.regex.Matcher environmentDataMatcher = io.subutai.core.hubmanager.impl.proccessors.VehsProccessor.ENVIRONMENT_PEER_D...
private void adjustLayout(android.widget.RelativeLayout content) { android.widget.RelativeLayout.LayoutParams contentParams = new android.widget.RelativeLayout.LayoutParams(content.getLayoutParams().width, content.getLayoutParams().height); contentParams.addRule(RelativeLayout.BELOW, mRootView.getId()); con...
private void adjustLayout(android.widget.RelativeLayout content) { if (content != null) { android.widget.RelativeLayout.LayoutParams contentParams = new android.widget.RelativeLayout.LayoutParams(content.getLayoutParams().width, content.getLayoutParams().height); contentParams.addRule(RelativeLayout...
private void hideKeyboard() { android.view.View view = this.getCurrentFocus(); if (view != null) { android.view.inputmethod.InputMethodManager inputManager = ((android.view.inputmethod.InputMethodManager) (this.getSystemService(Context.INPUT_METHOD_SERVICE))); inputManager.hideSoftInputFromWindo...
public void hideKeyboard() { android.view.View view = this.getCurrentFocus(); if (view != null) { android.view.inputmethod.InputMethodManager inputManager = ((android.view.inputmethod.InputMethodManager) (this.getSystemService(Context.INPUT_METHOD_SERVICE))); inputManager.hideSoftInputFromWindow...
public static java.awt.image.BufferedImage getScaledImage(java.awt.image.BufferedImage srcImg, int w, int h) { java.awt.image.BufferedImage resizedImg = srcImg; try { resizedImg = net.coobird.thumbnailator.Thumbnails.of(srcImg).size(w, h).asBufferedImage(); } catch (java.io.IOException ex) { ...
public static java.awt.image.BufferedImage getScaledImage(java.awt.image.BufferedImage srcImg, int w, int h) { java.awt.image.BufferedImage resizedImg = srcImg; if ((w < 1) || (h < 1)) { return resizedImg; } try { resizedImg = net.coobird.thumbnailator.Thumbnails.of(srcImg).size(w, h).as...
public boolean remove(K key, V value) { if (!(containsKey(key))) return false; java.util.Set<V> valueList = get(key); boolean found = valueList.remove(value); if (valueList.isEmpty()) { remove(key); } return found; }
public boolean remove(final java.lang.Object key, final java.lang.Object value) { if (!(containsKey(key))) return false; final java.util.Set<V> valueList = get(key); final boolean found = valueList.remove(value); if (valueList.isEmpty()) { remove(key); } return found; }
public boolean deletePlayArea(java.lang.String name) { if (!(containsPlayAreaByName(name))) return false; try { db.delete(copyPlayArea(getPlayArea(name))); } catch (java.lang.Exception e) { return false; } return true; }
public boolean deletePlayArea(java.lang.String name) { if (!(containsPlayAreaByName(name))) return false; try { db.delete(copyPlayArea(getPlayArea(name), false)); } catch (java.lang.Exception e) { return false; } return true; }
public com.google.devtools.build.lib.remote.RemoteProtocol.ContentDigest uploadFileContents(com.google.devtools.build.lib.vfs.Path file) throws java.io.IOException, java.lang.InterruptedException { if (!(file.exists())) { return null; } com.google.devtools.build.lib.remote.RemoteProtocol.ContentDige...
public com.google.devtools.build.lib.remote.RemoteProtocol.ContentDigest uploadFileContents(com.google.devtools.build.lib.vfs.Path file) throws java.io.IOException, java.lang.InterruptedException { if (!(file.exists())) { return null; } com.google.devtools.build.lib.remote.RemoteProtocol.ContentDige...
private void writeDateToDB(java.lang.Integer arduinoId) { com.golubets.monitor.environment.dao.ArduinoDao arduinoDao = ((com.golubets.monitor.environment.dao.ArduinoDao) (com.golubets.monitor.environment.util.DaoApplicationContext.getInstance().getContext().getBean("arduinoDao"))); com.golubets.monitor.environm...
private void writeDateToDB() { com.golubets.monitor.environment.dao.ArduinoDao arduinoDao = ((com.golubets.monitor.environment.dao.ArduinoDao) (com.golubets.monitor.environment.util.DaoApplicationContext.getInstance().getContext().getBean("arduinoDao"))); com.golubets.monitor.environment.dao.DataDao dataDao = (...
public static int pow(int base, int exp) { if (exp == 0) return 1; if (exp == 1) return base; if (exp == 2) return base * base; if (exp == 3) return (base * base) * base; int result = 1; while (exp) { if (exp & 1) result *= ...
public static int pow(int base, int exp) { if (exp == 0) return 1; if (exp == 1) return base; if (exp == 2) return base * base; if (exp == 3) return (base * base) * base; int result = 1; while (exp != 0) { if ((exp & 1) == 1) ...
public void closeTCPSocket(java.net.Socket socket) { java.util.ArrayList<java.net.Socket> list = mTCPSockets.get(socket.getInetAddress().getHostAddress()); list.remove(socket); try { socket.close(); } catch (java.io.IOException e) { e.printStackTrace(); } java.lang.System.err.pri...
public void closeTCPSocket(java.net.Socket socket) { if ((socket != null) && ((mTCPSockets) != null)) { java.util.ArrayList<java.net.Socket> list = mTCPSockets.get(socket.getInetAddress().getHostAddress()); list.remove(socket); try { socket.close(); } catch (java.io.IOExc...
public void join() { nachos.threads.Lib.debug(nachos.threads.KThread.dbgThread, ("Joining to thread: " + (toString()))); nachos.threads.Lib.assertTrue(((this) != (nachos.threads.KThread.currentThread))); if ((nachos.threads.KThread.currentThread.status) == (nachos.threads.KThread.statusFinished)) { ...
public void join() { nachos.threads.Lib.debug(nachos.threads.KThread.dbgThread, ("Joining to thread: " + (toString()))); nachos.threads.Lib.assertTrue(((this) != (nachos.threads.KThread.currentThread))); if ((status) == (nachos.threads.KThread.statusFinished)) { return ; }else { nachos.t...
protected void configure() { bind(net.vazem.jdbc.IConnector.class).to(net.vazem.jdbc.impl.Connector.class); bind(net.vazem.observe.Observer.class).to(net.vazem.util.AMessageReceiver.class); bind(net.vazem.util.AMessageReceiver.class).to(net.vazem.util.CsvMessageReceiver.class); bind(net.vazem.gui.AFrame...
protected void configure() { bind(net.vazem.observe.Observer.class).to(net.vazem.util.AMessageReceiver.class); bind(net.vazem.util.AMessageReceiver.class).to(net.vazem.util.CsvMessageReceiver.class); bind(net.vazem.gui.AFrame.class).to(net.vazem.gui.CsvFrame.class); bind(net.vazem.observe.Observable.cla...
private void fill() throws java.io.IOException { if ((catchSize) == 0) { catchSize = in.read(cb); charIndex = 0; }else { cb[0] = cb[((catchLength) - 1)]; catchSize = (in.read(cb, 1, ((catchLength) - 1))) + 1; charIndex = 0; } }
private void fill() throws java.io.IOException { if ((catchSize) == 0) { catchSize = in.read(cb); charIndex = 0; }else { cb[0] = cb[((catchSize) - 1)]; catchSize = (in.read(cb, 1, ((catchLength) - 1))) + 1; charIndex = 0; } }
public void run() { if ((currentY) > (startY + (swipeThreshold))) { ((com.main.toledo.gymtrackr.DetailActivity) (getActivity())).previous(); removeListener(); } if ((currentY) < (startY - (swipeThreshold))) { ((com.main.toledo.gymtrackr.DetailActivity) (getActivity())).next(); ...
public void run() { if ((currentY) > (startY + (swipeThreshold))) { ((com.main.toledo.gymtrackr.DetailActivity) (getActivity())).previous(); } if ((currentY) < (startY - (swipeThreshold))) { ((com.main.toledo.gymtrackr.DetailActivity) (getActivity())).next(); } }