buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
protected void sliceBuffer(java.nio.ByteBuffer original) { int limit = (original.position()) + ((this.type.getSizeInBytes()) * (this.count)); this.data = ((java.nio.ByteBuffer) (original.slice().order(original.order()).limit(limit))); }
protected void sliceBuffer(java.nio.ByteBuffer original) { int limit = (this.type.getSizeInBytes()) * (this.count); this.data = ((java.nio.ByteBuffer) (original.slice().order(original.order()).limit(limit))); }
public void bind(com.jhj.expandablerecyclerviewexample.model.Parent data) { java.lang.String info = data.getInfo(); android.widget.TextView tv_info = getView(R.id.info); tv_info.setText(info); getView(R.id.dot).setBackgroundColor(data.getDot()); getView(R.id.arrow).setRotation((isExpanded() ? 180 : ...
public void bind(com.jhj.expandablerecyclerviewexample.model.Parent data) { java.lang.String info = data.getInfo(); android.widget.TextView tv_info = getView(R.id.info); tv_info.setText(info); getView(R.id.dot).setBackgroundColor(data.getDot()); getView(R.id.arrow).setRotation((isExpanded() ? 180 : ...
public void testInlineCommentWithinExtendCodeBlock() throws com.github.mustachejava.MustacheException, java.io.IOException, java.lang.InterruptedException, java.util.concurrent.ExecutionException { java.io.File root = getRoot("commentWithinExtendCodeBlock.html"); java.lang.System.out.println(("****** using root...
public void testInlineCommentWithinExtendCodeBlock() throws com.github.mustachejava.MustacheException, java.io.IOException, java.lang.InterruptedException, java.util.concurrent.ExecutionException { java.io.File root = getRoot("commentWithinExtendCodeBlock.html"); com.github.mustachejava.MustacheFactory c = new ...
public boolean onInterceptTouchEvent(android.support.v7.widget.RecyclerView recyclerView, android.view.MotionEvent motionEvent) { android.view.View child = recyclerView.findChildViewUnder(motionEvent.getX(), motionEvent.getY()); if ((child != null) && (mGestureDetector.onTouchEvent(motionEvent))) { Draw...
public boolean onInterceptTouchEvent(android.support.v7.widget.RecyclerView recyclerView, android.view.MotionEvent motionEvent) { android.view.View child = recyclerView.findChildViewUnder(motionEvent.getX(), motionEvent.getY()); if ((child != null) && (mGestureDetector.onTouchEvent(motionEvent))) { Draw...
public void recompute() { javafx.scene.layout.GridPane.setRowIndex(timetableBlock, ((int) (java.lang.Math.round(beginCount)))); gui.centerarea.TimelinesGridPane.setRowIndex(timetableBlock, ((int) (java.lang.Math.round(beginCount)))); gui.centerarea.TimelinesGridPane.setRowSpan(timetableBlock, ((int) (java.l...
public void recompute() { gui.centerarea.TimelinesGridPane.setRowIndex(timetableBlock, ((int) (java.lang.Math.round(beginCount)))); gui.centerarea.TimelinesGridPane.setRowSpan(timetableBlock, ((int) (java.lang.Math.round(((endCount) - (beginCount)))))); }
public java.lang.Boolean apply(org.openqa.selenium.WebDriver driver) { try { java.lang.String value = getLocationPreview().getPathAsString(); currentValue.setLength(0); currentValue.append(currentValue); return expectedContent.equals(value); } catch (org.openqa.selenium.NotFoundE...
public java.lang.Boolean apply(org.openqa.selenium.WebDriver driver) { try { java.lang.String value = getLocationPreview().getPathAsString(); currentValue.setLength(0); currentValue.append(value); return expectedContent.equals(value); } catch (org.openqa.selenium.NotFoundExceptio...
private int writeMessage(short[] pcmData, short[] dataBuffer, int msgStart, int msgLength) { if ((msgStart > 0) && ((msgStart + msgLength) < (mMusicFile.getSampleCount()))) { for (int i = 0; i < msgLength; ++i) { pcmData[(msgStart + i)] = dataBuffer[i]; } return ch.ethz.asl.dance...
private int writeMessage(short[] pcmData, short[] dataBuffer, int msgStart, int msgLength) { if (msgLength <= (pcmData.length)) { for (int i = 0; i < msgLength; ++i) { pcmData[(msgStart + i)] = dataBuffer[i]; } return ch.ethz.asl.dancebots.danceboteditor.utils.DanceBotError.NO_ER...
private static org.openbase.bco.dal.remote.service.AbstractServiceRemote instantiatServiceRemote(final java.lang.Class<? extends org.openbase.bco.dal.remote.service.AbstractServiceRemote> serviceRemoteClass) throws org.openbase.jul.exception.InstantiationException { try { org.openbase.bco.dal.remote.service...
private static org.openbase.bco.dal.remote.service.AbstractServiceRemote instantiatServiceRemote(final java.lang.Class<? extends org.openbase.bco.dal.remote.service.AbstractServiceRemote> serviceRemoteClass) throws org.openbase.jul.exception.InstantiationException { try { org.openbase.bco.dal.remote.service...
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View v, int pos, long id) { android.net.wifi.ScanResult sResult = rs.get(pos); dialog = new com.xpg.gokit.dialog.SetWifiDialog(this, sResult.SSID); dialog.setWifiListener(new com.xpg.gokit.dialog.listener.SetWifiListener() { ...
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View v, int pos, long id) { android.net.wifi.ScanResult sResult = rs.get(pos); dialog = new com.xpg.gokit.dialog.SetWifiDialog(this, sResult.SSID); dialog.setWifiListener(new com.xpg.gokit.dialog.listener.SetWifiListener() { ...
public java.lang.String next() { while (((tokenizer) == null) || (!(tokenizer.hasMoreTokens()))) { try { tokenizer = new java.util.StringTokenizer(reader.readLine()); } catch (IOException e) { throw new java.lang.RuntimeException(e); } } return tokenizer.next...
public java.lang.String next() { while (((tokenizer) == null) || (!(tokenizer.hasMoreTokens()))) { try { tokenizer = new java.util.StringTokenizer(reader.readLine()); } catch (java.io.IOException e) { throw new java.lang.RuntimeException(e); } } return tokeni...
public void testReleaseSameInstanceMultipleTimesThrows() throws java.lang.Exception { org.ehcache.internal.classes.ClassInstanceProvider<java.lang.String, java.lang.String> classInstanceProvider = new org.ehcache.internal.classes.ClassInstanceProvider<java.lang.String, java.lang.String>(null, null); classInstan...
public void testReleaseSameInstanceMultipleTimesThrows() throws java.lang.Exception { org.ehcache.internal.classes.ClassInstanceProvider<java.lang.String, java.lang.String> classInstanceProvider = new org.ehcache.internal.classes.ClassInstanceProvider<java.lang.String, java.lang.String>(null, null); classInstan...
public void savePreviewSetting(android.graphics.Bitmap preview) { previewImageNavDrawIV.setImageBitmap(preview); java.io.ByteArrayOutputStream stream = new java.io.ByteArrayOutputStream(); preview.compress(Bitmap.CompressFormat.PNG, 100, stream); byte[] byteArray = stream.toByteArray(); java.lang.St...
public void savePreviewSetting(android.graphics.Bitmap preview) { previewImageNavDrawIV.setImageBitmap(preview); java.io.ByteArrayOutputStream stream = new java.io.ByteArrayOutputStream(); preview.compress(Bitmap.CompressFormat.PNG, 100, stream); byte[] byteArray = stream.toByteArray(); java.lang.St...
public boolean onTouchEvent(android.view.MotionEvent event) { mScaleGestureDetector.onTouchEvent(event); if (!(onScale)) { if ((event.getAction()) == (android.view.MotionEvent.ACTION_DOWN)) { if (((mQualityView) != null) && (mQualityView.isShown())) { mQualityView.hide(); ...
public boolean onTouchEvent(android.view.MotionEvent event) { mScaleGestureDetector.onTouchEvent(event); if (!(onScale)) { if ((event.getAction()) == (android.view.MotionEvent.ACTION_DOWN)) { if (((mQualityView) != null) && (mQualityView.isShown())) { mQualityView.hide(); ...
public void onMilestoneReceived(com.ericmguimaraes.gaso.evaluation.Milestone milestone) { if (fuelDiference >= 0) { if (milestone == null) milestone = dao.createNewMilestone(0, lastFuelLevel, null); milestone.setDistanceRolled(((milestone.getDistanceRolled()) + (java.lang.Float....
public void onMilestoneReceived(com.ericmguimaraes.gaso.evaluation.Milestone milestone) { if (fuelDiference >= 0) { if (milestone == null) return ; milestone.setDistanceRolled(((milestone.getDistanceRolled()) + (java.lang.Float.parseFloat(distanceStr)))); milestone.setCo...
private void notifyTrigger(long nbPointsSinceLastTrigger, fr.isen.twinmx.model.GraphDirection direction) { if ((previousGraphDirection) != direction) { if (notifyTriggers) { this.dataSets.notifyTrigger(nbPointsSinceLastTrigger, direction); } }else { if (notifyTriggers) { ...
private void notifyTrigger(long nbPointsSinceLastTrigger, fr.isen.twinmx.model.GraphDirection direction) { if ((previousGraphDirection) != direction) { if (notifyTriggers) { this.dataSets.notifyTrigger(nbPointsSinceLastTrigger, direction); } }else { if (notifyTriggers) { ...
public void close() { try { if ((connection) != null) { org.academiadecodigo.bootcamp8.freespeech.server.utils.logger.Logger.getInstance().eventlogger(TypeEvent.DATABASE, LoggerMessages.DB_TERMINATE); connection.close(); } } catch (java.sql.SQLException ex) { org....
public void close() { try { if ((connection) != null) { org.academiadecodigo.bootcamp8.freespeech.server.utils.logger.Logger.getInstance().eventlogger(TypeEvent.DATABASE, LoggerMessages.DB_TERMINATE); connection.close(); } } catch (java.sql.SQLException ex) { java...
public static com.dabsquared.gitlabjenkins.trigger.handler.push.PushHookTriggerHandler newPushHookTriggerHandler(boolean triggerOnPush, com.dabsquared.gitlabjenkins.trigger.TriggerOpenMergeRequest triggerOpenMergeRequestOnPush, boolean skipWorkInProgressMergeRequest, boolean triggerOnPipelineEvent) { if (triggerOnP...
public static com.dabsquared.gitlabjenkins.trigger.handler.push.PushHookTriggerHandler newPushHookTriggerHandler(boolean triggerOnPush, com.dabsquared.gitlabjenkins.trigger.TriggerOpenMergeRequest triggerOpenMergeRequestOnPush, boolean skipWorkInProgressMergeRequest) { if (triggerOnPush || (triggerOpenMergeRequestO...
public void persistDigitalAssetMetadataInLocalStorage(com.bitdubai.fermat_dap_api.layer.all_definition.digital_asset.DigitalAssetMetadata digitalAssetMetadata, java.lang.String internalId) throws com.bitdubai.fermat_dap_api.layer.dap_transaction.common.exceptions.CantCreateDigitalAssetFileException { com.bitdubai.f...
public synchronized void persistDigitalAssetMetadataInLocalStorage(com.bitdubai.fermat_dap_api.layer.all_definition.digital_asset.DigitalAssetMetadata digitalAssetMetadata, java.lang.String internalId) throws com.bitdubai.fermat_dap_api.layer.dap_transaction.common.exceptions.CantCreateDigitalAssetFileException { c...
public void GameOver() { if (((com.example.yehia.guessthecolor.MainActivity.righCount) == 10) || ((com.example.yehia.guessthecolor.MainActivity.wrgCount) == 10)) { android.widget.Toast.makeText(this, (("GAME OVER YOUR SCORE IS EQUALE " + (((com.example.yehia.guessthecolor.MainActivity.righCount) / (com.exa...
public void GameOver() { if (((com.example.yehia.guessthecolor.MainActivity.righCount) >= 10) || ((com.example.yehia.guessthecolor.MainActivity.wrgCount) >= 10)) { android.widget.Toast.makeText(this, (("GAME OVER YOUR SCORE IS EQUALE " + (((com.example.yehia.guessthecolor.MainActivity.righCount) / (com.exa...
public void testDetectChangeConnInvalidLive() { graph.setConnectionData(SW, NW, com.github.rinde.rinsim.geom.LengthData.create(2.0)); boolean fail = false; try { graph.setConnectionData(SW, NW, com.github.rinde.rinsim.geom.LengthData.create(1.99)); } catch (final java.lang.IllegalArgumentExcepti...
public void testDetectChangeConnInvalidLive() { graph.setConnectionData(NW, SW, com.github.rinde.rinsim.geom.LengthData.create(2.0)); boolean fail = false; try { graph.setConnectionData(NW, SW, com.github.rinde.rinsim.geom.LengthData.create(1.99)); } catch (final java.lang.IllegalArgumentExcepti...
public org.springframework.web.servlet.ModelAndView list(org.springframework.web.servlet.ModelAndView mav, javax.servlet.http.HttpSession session, @org.springframework.web.bind.annotation.PathVariable(value = "currentPage") int currentPage) { logger.info(currentPage); com.henry.entity.User user = ((com.henry.en...
public org.springframework.web.servlet.ModelAndView list(org.springframework.web.servlet.ModelAndView mav, javax.servlet.http.HttpSession session, @org.springframework.web.bind.annotation.PathVariable(value = "currentPage") int currentPage) { com.henry.entity.User user = ((com.henry.entity.User) (session.getAttribu...
private static void loadFeatureSpace(java.lang.String filename) { try { java.io.BufferedReader r = new java.io.BufferedReader(new java.io.FileReader(filename)); java.lang.String indices = r.readLine(); for (java.lang.String index : indices.split(", ")) { project6867.MarioML.featu...
private static void loadFeatureSpace(java.lang.String filename) { try { java.io.BufferedReader r = new java.io.BufferedReader(new java.io.FileReader(filename)); java.lang.String indices = r.readLine(); java.lang.Integer i = 0; for (java.lang.String index : indices.split(", ")) { ...
public void addEpisode(int season, int episode, java.lang.String title, java.lang.String publishDate) { while ((seasons.size()) < (season - 1)) { seasons.add(new me.dilek.izlek.domain.Season(((seasons.size()) + 1))); } me.dilek.izlek.domain.Season s = seasons.get((season - 1)); s.addEpisode(epi...
public void addEpisode(int season, int episode, java.lang.String title, java.lang.String publishDate) { while ((seasons.size()) < season) { seasons.add(new me.dilek.izlek.domain.Season(season)); } me.dilek.izlek.domain.Season s = seasons.get((season - 1)); s.addEpisode(episode, title, publishDa...
public void setIsVIPChannel(java.lang.String isVIPChannel) { if (org.apache.commons.lang.StringUtils.isNotBlank(isVIPChannel)) { this.isVIPChannel = isVIPChannel; java.lang.System.setProperty(ClientConfig.SendMessageWithVIPChannelProperty, isVIPChannel); logger.info("setIsVIPChannel isVIPCha...
public void setIsVIPChannel(java.lang.String isVIPChannel) { if (org.apache.commons.lang.StringUtils.isNotBlank(isVIPChannel)) { this.isVIPChannel = isVIPChannel; java.lang.System.setProperty(ClientConfig.SendMessageWithVIPChannelProperty, isVIPChannel); logger.info("setIsVIPChannel isVIPCha...
static java.nio.file.Path convertFromActualToModulePath(org.terasology.module.filesystem.ModuleFileSystem fileSystem, java.nio.file.Path root, java.nio.file.Path actualPath) throws java.io.IOException { java.nio.file.Path actualRealPath = actualPath.toRealPath(); java.nio.file.Path relative = root.relativize(ac...
static java.nio.file.Path convertFromActualToModulePath(org.terasology.module.filesystem.ModuleFileSystem fileSystem, java.nio.file.Path root, java.nio.file.Path actualPath) throws java.io.IOException { java.nio.file.Path actualRealPath = actualPath.toRealPath(); java.nio.file.Path relative = root.toRealPath()....
public void prepareBeanMapper() { beanMapper = new io.beanmapper.BeanMapper(); beanMapper.addPackagePrefix(io.beanmapper.BeanMapper.class); beanMapper.addConverter(new io.beanmapper.core.converter.impl.LocalDateTimeToLocalDate()); beanMapper.addConverter(new io.beanmapper.core.converter.impl.LocalDateTo...
public void prepareBeanMapper() { beanMapper = new io.beanmapper.BeanMapper(); beanMapper.addPackagePrefix(io.beanmapper.BeanMapper.class); beanMapper.addConverter(new io.beanmapper.core.converter.impl.LocalDateTimeToLocalDate()); beanMapper.addConverter(new io.beanmapper.core.converter.impl.LocalDateTo...
public void onCompleted(org.json.JSONObject jsonObject, com.facebook.GraphResponse response) { android.util.Log.d("friend123", jsonObject.toString()); yolo.bachkhoa.com.smilealarm.Object.FriendObject friend = null; try { friend = new yolo.bachkhoa.com.smilealarm.Object.FriendObject(jsonObject.getStr...
public void onCompleted(org.json.JSONObject jsonObject, com.facebook.GraphResponse response) { android.util.Log.d("friend123", jsonObject.toString()); yolo.bachkhoa.com.smilealarm.Object.FriendObject friend = null; try { friend = new yolo.bachkhoa.com.smilealarm.Object.FriendObject(jsonObject.getStr...
public void rebuildDeck() { this.deck.addAll(discarded); Card c = deck.get(0); if (c instanceof Train) { this.shuffle = true; } shuffle(); this.discarded.clear(); }
public boolean rebuildDeck() { if ((this.discarded.size()) == 0) return false; this.deck.addAll(discarded); Card c = deck.get(0); if (c instanceof Train) { this.shuffle = true; } shuffle(); this.discarded.clear(); return true; }
public java.lang.String getPartitioningKey() { if (isOneKeyRequest) { return oneKey.toString(); }else { java.lang.String keyConcatenation = ""; for (fr.inria.jessy.store.ReadRequestKey<?> rk : multiKeys) { keyConcatenation.concat(rk.toString()); } return keyCo...
public java.lang.String getPartitioningKey() { if (isOneKeyRequest) { return oneKey.toString(); }else { java.lang.String keyConcatenation = ""; for (fr.inria.jessy.store.ReadRequestKey<?> rk : multiKeys) { keyConcatenation = keyConcatenation.concat(rk.toString()); } ...
public java.util.List<org.apache.sqoop.model.MJob> findJobs(java.sql.Connection conn) { java.sql.PreparedStatement stmt = null; try { stmt = conn.prepareStatement(crudQueries.getStmtSelectJobAllWithOrder()); return loadJobs(stmt, conn); } catch (java.sql.SQLException ex) { logExcepti...
public java.util.List<org.apache.sqoop.model.MJob> findJobs(java.sql.Connection conn) { try (java.sql.PreparedStatement stmt = conn.prepareStatement(crudQueries.getStmtSelectJobAllWithOrder())) { return loadJobs(stmt, conn); } catch (java.sql.SQLException ex) { logException(ex); throw ne...
private boolean jj_3R_14() { org.sbml.jsbml.text.parser.Token xsp; xsp = jj_scanpos; if (jj_3R_21()) { jj_scanpos = xsp; if (jj_3R_22()) { jj_scanpos = xsp; if (jj_3R_23()) { return true; } } } return false; }
private boolean jj_3R_14() { org.sbml.jsbml.text.parser.Token xsp; xsp = jj_scanpos; if (jj_3R_21()) { jj_scanpos = xsp; if (jj_3R_22()) { jj_scanpos = xsp; if (jj_3R_23()) return true; } } return false; }
public int ev14(int p) { position = p; java.lang.System.out.println("You stop to rest against a tree and a strange cat approaches you and looks hungry."); java.lang.System.out.println("(1) Turn away and walk off"); java.lang.System.out.println("(2) Look around for something to feed it"); choice = u....
public int ev14(int p) { position = p; java.lang.System.out.println("You stop to rest against a tree and a strange cat approaches you and looks hungry."); java.lang.System.out.println("(1) Turn away and walk off"); java.lang.System.out.println("(2) Look around for something to feed it"); choice = u....
public boolean incRank() { if (((classSkill) && ((rank) == 4)) || ((!(classSkill)) && ((rank) == 2))) return false; if (!(classSkill)) { if (!(halfPoint)) { halfPoint = true; return true; }else halfPoint = false; } (rank)++; r...
public boolean incRank() { if (((classSkill) && ((rank) == 4)) || ((!(classSkill)) && ((rank) == 2))) return false; (rank)++; return true; }
private void cacheAuthentication(final javax.servlet.http.HttpServletRequest request, final org.jasig.cas.client.jetty.CasAuthentication authentication) { final javax.servlet.http.HttpSession session = request.getSession(false); if (session != null) { session.setAttribute(org.jasig.cas.client.jetty.CasA...
private void cacheAuthentication(final javax.servlet.http.HttpServletRequest request, final org.jasig.cas.client.jetty.CasAuthentication authentication) { final javax.servlet.http.HttpSession session = request.getSession(true); if (session != null) { session.setAttribute(org.jasig.cas.client.jetty.CasAu...
public boolean execute(java.lang.String action, com.radlib.cordova.CordovaArgs args, com.radlib.cordova.CallbackContext callbackContext) throws org.json.JSONException { if (action.equals("connect")) { connectToBluetooth(); } if (action.equals("scan")) { scanNearbyBluetooth(); callbac...
public boolean execute(java.lang.String action, com.radlib.cordova.CordovaArgs args, com.radlib.cordova.CallbackContext callbackContext) throws org.json.JSONException { if (action.equals("scan")) { scanNearbyBluetooth(callbackContext); return true; }else if (action.equals("stop")) { ...
public javafx.geometry.BoundingBox getCellBoundingBox(int col, int row) { com.badlogic.gdx.math.Vector2 centre = cellCentres[row][col]; float halfCellSize = (cellSize) / 2; return new javafx.geometry.BoundingBox(((centre.x) - halfCellSize), ((centre.y) - halfCellSize), ((centre.x) + halfCellSize), ((centre....
public javafx.geometry.BoundingBox getCellBoundingBox(int col, int row) { com.badlogic.gdx.math.Vector2 centre = cellCentres[row][col]; float halfCellSize = (cellSize) / 2; return new javafx.geometry.BoundingBox(((centre.x) - halfCellSize), ((centre.y) - halfCellSize), cellSize, cellSize); }
public void onResume() { super.onResume(); loadData(); loadAnalysis(); tvName.setText(spUtil.getUsername()); tvPosition.setText(spUtil.getPosition().getPositionName()); showProfileImage(); }
public void onResume() { loadData(); loadAnalysis(); tvName.setText(spUtil.getUsername()); tvPosition.setText(spUtil.getPosition().getPositionName()); showProfileImage(); super.onResume(); }
public boolean executeUpdateStatement(java.lang.String query) { boolean result = false; if ((query != null) && (connectionIsOpen())) { try { nl.edu.avans.ivp4c2.datastorage.DatabaseConnection.DB_USER = "Barudi"; nl.edu.avans.ivp4c2.datastorage.DatabaseConnection.DB_PASS = "hhc2ba...
public boolean executeUpdateStatement(java.lang.String query) { boolean result = false; if ((query != null) && (connectionIsOpen())) { try { statement.executeUpdate(query); result = true; } catch (java.sql.SQLException e) { java.lang.System.out.println(e); ...
public void sendJoyState() { for (int i = 0; i < 2; i++) { if ((mProtoVersion) == 1) { mNet.sendState(mJoyControl, mJoyState); }else { byte[] data = new byte[]{ mProtoHeader.version , mProtoHeader.joyControl , mProtoHeader.joyState1 , mProtoHeader.joyState2 }; mNe...
public void sendJoyState() { if ((mNet) != null) { for (int i = 0; i < 2; i++) { if ((mProtoVersion) == 1) { mNet.sendState(mJoyControl, mJoyState); }else { byte[] data = new byte[]{ mProtoHeader.version , mProtoHeader.joyControl , mProtoHeader.joyStat...
private void start_game() { Card.initialise_hand(Dealer.hand); for (int i = 0; i < 2; i++) { Dealer.hand[i] = Dealer.draw_card(); (Dealer.cards_in_hand)++; } while (!(Dealer.game_finished)) { serve_players(); } Dealer.start_game = Definitions.NO; }
private void start_game() { Card.initialise_hand(Dealer.hand); Dealer.cards_in_hand = 0; for (int i = 0; i < 2; i++) { Dealer.hand[i] = Dealer.draw_card(); (Dealer.cards_in_hand)++; } while (!(Dealer.game_finished)) { serve_players(); } Dealer.start_game = Definition...
public void onScrolled(android.support.v7.widget.RecyclerView recyclerView, int dx, int dy) { super.onScrolled(recyclerView, dx, dy); if (dy > 0) { scrollDirection = com.chernandezgil.farmacias.Utilities.Constants.SCROLL_UP; android.util.Log.i("RecyclerView scrolled: ", "scroll up!"); an...
public void onScrolled(android.support.v7.widget.RecyclerView recyclerView, int dx, int dy) { super.onScrolled(recyclerView, dx, dy); if (dy > 0) { scrollDirection = com.chernandezgil.farmacias.Utilities.Constants.SCROLL_DOWN; android.util.Log.i("RecyclerView scrolled: ", "scroll down!"); ...
public java.util.List<ch.rasc.extdirectspring.demo.feed.FeedItem> readFeedItem(java.lang.String feedUrl) throws java.net.MalformedURLException { com.rometools.fetcher.impl.SyndFeedInfo info = this.feedCache.getFeedInfo(feedUrl); java.util.List<ch.rasc.extdirectspring.demo.feed.FeedItem> items = new java.util.Ar...
public java.util.List<ch.rasc.extdirectspring.demo.feed.FeedItem> readFeedItem(java.lang.String feedUrl) throws java.net.MalformedURLException { com.rometools.fetcher.impl.SyndFeedInfo info = this.feedCache.getFeedInfo(feedUrl); java.util.List<ch.rasc.extdirectspring.demo.feed.FeedItem> items = new java.util.Ar...
protected void publishResults(java.lang.CharSequence charSequence, com.example.jaroslavistok.personalmobileassistantformanagingdiabetes.adapters.FilterResults filterResults) { if ((filterResults.count) > 0) { clear(); addAll(((java.util.List<com.example.jaroslavistok.personalmobileassistantformanagi...
protected void publishResults(java.lang.CharSequence charSequence, com.example.jaroslavistok.personalmobileassistantformanagingdiabetes.adapters.FilterResults filterResults) { if ((filterResults.count) > 0) { clear(); addAll(((java.util.List<com.example.jaroslavistok.personalmobileassistantformanagi...
public void run() { try { java.util.Set<de.gaalop.gui.OutputFile> output; output = facade.compile(sourcePanel.getInputFile()); displayOutput(output); } catch (de.gaalop.gui.CompilationException ex) { log.error("Compilation exception", ex); statusBar.displayError(); ...
public void run() { try { java.util.Set<de.gaalop.gui.OutputFile> output; output = facade.compile(sourcePanel.getInputFile()); displayOutput(output); } catch (de.gaalop.gui.CompilationException ex) { log.error("Compilation exception", ex); statusBar.displayError(ex); ...
private boolean checkParamTypes(java.lang.Class[] writableParams, org.apache.tajo.common.TajoDataTypes[] tajoParams) { int i = 0; for (java.lang.Class writable : writableParams) { try { if (!(org.apache.tajo.plan.util.WritableTypeConverter.convertWritableToTajoType(writable).equals(tajoParam...
private boolean checkParamTypes(java.lang.Class[] writableParams, org.apache.tajo.common.TajoDataTypes[] tajoParams) { int i = 0; if ((writableParams.length) != (tajoParams.length)) { return false; } for (java.lang.Class writable : writableParams) { try { if (!(org.apache.taj...
public boolean onOptionsItemSelected(android.view.MenuItem item) { switch (item.getItemId()) { case R.id.action_scan : { break; } case R.id.action_list : { break; } case R.id.action_export : { ...
public boolean onOptionsItemSelected(android.view.MenuItem item) { switch (item.getItemId()) { case R.id.action_scan : { break; } case R.id.action_list : { android.content.Intent i = new android.content.Intent(this, com.google.andro...
public void buildEnvironmentFor(@javax.annotation.Nonnull hudson.model.Run run, @javax.annotation.Nonnull hudson.EnvVars envs, @javax.annotation.Nonnull hudson.model.TaskListener listener) throws java.io.IOException, java.lang.InterruptedException { org.jenkinsci.plugins.ghprb.GhprbParametersAction gpa = run.getAct...
public void buildEnvironmentFor(@javax.annotation.Nonnull hudson.model.Run run, @javax.annotation.Nonnull hudson.EnvVars envs, @javax.annotation.Nonnull hudson.model.TaskListener listener) throws java.io.IOException, java.lang.InterruptedException { org.jenkinsci.plugins.ghprb.GhprbParametersAction gpa = run.getAct...
public void removeChildren(io.github.zachohara.percussionpacker.cardentity.CardEntity parent, java.util.List<io.github.zachohara.percussionpacker.cardentity.CardEntity> children) { int parentIndex = this.createSpace(parent, children, (-1)); for (int i = (children.size()) - 1; i >= 0; i--) { this.remove(...
public void removeChildren(io.github.zachohara.percussionpacker.cardentity.CardEntity parent, java.util.List<io.github.zachohara.percussionpacker.cardentity.CardEntity> children) { int parentIndex = this.createSpace(parent, children.size(), children, (-1)); for (int i = (children.size()) - 1; i >= 0; i--) { ...
public java.util.List<shared.classes.CommandData> execute() { ServerFacade._instance.initializeCities(); ServerFacade._instance.addGameInfo(data); java.util.List<shared.classes.CommandData> result = new java.util.ArrayList<>(); result.add(new shared.classes.CommandData(CommandData.Type.GAMESTARTED, Serv...
public java.util.List<shared.classes.CommandData> execute() { ServerFacade._instance.initializeCities(); if ((ServerFacade._instance.getGameInfo(gameId)) == null) { ServerFacade._instance.addGameInfo(data); } java.util.List<shared.classes.CommandData> result = new java.util.ArrayList<>(); re...
public void testMedian(int[] nums1, int[] nums2, double expected) { double median = findMedianSortedArrays(nums1, nums2); if ((median - expected) >= 0.001) { java.lang.System.out.print(java.util.Arrays.toString(nums1)); java.lang.System.out.println(java.util.Arrays.toString(nums2)); java...
public void testMedian(int[] nums1, int[] nums2, double expected) { double median = findMedianSortedArrays(nums1, nums2); if (((median - expected) >= 0.001) || ((median - expected) >= 0.001)) { java.lang.System.out.print(java.util.Arrays.toString(nums1)); java.lang.System.out.println(java.util.A...
protected <T extends com.google.android.gms.common.api.Result> void setupFitnessPendingResult(com.google.android.gms.common.api.PendingResult<T> pendingResult, com.google.android.gms.common.api.ResultCallback<? super T> resultCallback) { if (((timeoutTime) != null) && ((timeoutUnit) != null)) { pendingResul...
protected final <T extends com.google.android.gms.common.api.Result> void setupFitnessPendingResult(com.google.android.gms.common.api.PendingResult<T> pendingResult, com.google.android.gms.common.api.ResultCallback<? super T> resultCallback) { if (((timeoutTime) != null) && ((timeoutUnit) != null)) { pendin...
private static java.lang.String makeTitle(java.util.Collection<com.intellij.openapi.vfs.VirtualFile> unregisteredRoots, java.util.Collection<com.intellij.openapi.vfs.VirtualFile> invalidRoots) { java.lang.String title; java.lang.String roots = com.intellij.openapi.util.text.StringUtil.pluralize("root", invalidR...
private static java.lang.String makeTitle(java.util.Collection<com.intellij.openapi.vfs.VirtualFile> unregisteredRoots, java.util.Collection<com.intellij.openapi.vfs.VirtualFile> invalidRoots) { java.lang.String title; if (unregisteredRoots.isEmpty()) { title = "Invalid Git " + (com.intellij.openapi.uti...
public boolean equals(java.lang.Object other) { if (other == null) throw new nullPointerException("equals() input null"); if ((this) == other) return true; if (!(other instanceof Rational)) return false; if ((compareTo(other)) == 0) return true; re...
public boolean equals(java.lang.Object other) { if (other.equals(null)) throw new java.lang.NullPointerException("equals() input null"); if ((this) == other) return true; if (!(other instanceof Rational)) return false; if ((compareTo(other)) == 0) return tr...
public void testGetCurrentUtcTimeAsIso8601() { java.text.SimpleDateFormat xmlDateUtc = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); xmlDateUtc.setTimeZone(java.util.TimeZone.getTimeZone("UTC")); java.lang.String expectedStr = xmlDateUtc.format(java.util.Calendar.getInstance(java.util.TimeZone...
public void testGetCurrentUtcTimeAsIso8601() { java.text.SimpleDateFormat xmlDateUtc = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); xmlDateUtc.setTimeZone(java.util.TimeZone.getTimeZone("UTC")); java.util.Calendar time = java.util.Calendar.getInstance(java.util.TimeZone.getTimeZone("UTC")); ...
public void onComplete(@android.support.annotation.NonNull com.google.android.gms.tasks.Task<com.google.firebase.auth.AuthResult> task) { android.util.Log.d(com.example.xie_xiao.myapplication.EmailPasswordActivity.TAG, ("createUserWithEmail:onComplete:" + (task.isSuccessful()))); sendEmailVerification(); if...
public void onComplete(@android.support.annotation.NonNull com.google.android.gms.tasks.Task<com.google.firebase.auth.AuthResult> task) { android.util.Log.d(com.example.xie_xiao.myapplication.EmailPasswordActivity.TAG, ("createUserWithEmail:onComplete:" + (task.isSuccessful()))); if (task.isSuccessful()) { ...
public void storeOntology(org.semanticweb.owlapi.model.OWLOntologyManager manager, org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.io.OWLOntologyDocumentTarget target, org.semanticweb.owlapi.model.OWLOntologyFormat ontologyFormat) throws java.io.IOException, org.semanticweb.owlapi.model.OWLOnt...
public void storeOntology(org.semanticweb.owlapi.model.OWLOntologyManager manager, org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.io.OWLOntologyDocumentTarget target, org.semanticweb.owlapi.model.OWLOntologyFormat ontologyFormat) throws java.io.IOException, org.semanticweb.owlapi.model.OWLOnt...
public javax.xml.stream.XMLEventReader handle(org.apache.http.client.methods.CloseableHttpResponse httpResponse) { javax.xml.stream.XMLInputFactory ifactory = javax.xml.stream.XMLInputFactory.newFactory(); ifactory.setProperty(javax.xml.stream.XMLInputFactory.IS_VALIDATING, false); try { return ifac...
public javax.xml.stream.XMLEventReader handle(org.apache.http.client.methods.CloseableHttpResponse httpResponse) { javax.xml.stream.XMLInputFactory ifactory = javax.xml.stream.XMLInputFactory.newFactory(); try { return ifactory.createXMLEventReader(httpResponse.getEntity().getContent(), encoding); }...
public static void replaceNullWithEmpty(javax.swing.JTable table) { for (int i = 0; i < (table.getColumnCount()); i++) { for (int j = 0; j < (table.getRowCount()); j++) { if (table.getValueAt(j, i).equals("null")) { table.setValueAt("", j, i); } } } }
public static void replaceNullWithEmpty(javax.swing.JTable table) { for (int i = 0; i < (table.getColumnCount()); i++) { for (int j = 0; j < (table.getRowCount()); j++) { if ((table.getValueAt(j, i)) != null) { if (table.getValueAt(j, i).equals("null")) { tabl...
private byte[] asByteArray(java.nio.ByteBuffer buffer) { buffer.rewind(); byte[] data = new byte[(buffer.limit()) - (buffer.position())]; for (int i = 0; i < (data.length); i++) { data[i] = buffer.get(i); } return data; }
private byte[] asByteArray(java.nio.ByteBuffer buffer) { byte[] data = new byte[(buffer.limit()) - (buffer.position())]; for (int i = 0; i < (data.length); i++) { data[i] = buffer.get(); } return data; }
public void onUpgrade(android.database.sqlite.SQLiteDatabase db, int oldVersion, int newVersion) { try { db.execSQL((((("ALTER TABLE " + (com.outsystems.android.core.DatabaseHandler.TABLE_LOGIN_APPLICATIONS)) + " ADD ") + (com.outsystems.android.core.DatabaseHandler.KEY_APPLICATION_PRELOADER)) + " NUMERIC")...
public void onUpgrade(android.database.sqlite.SQLiteDatabase db, int oldVersion, int newVersion) { try { db.execSQL((((("ALTER TABLE " + (com.outsystems.android.core.DatabaseHandler.TABLE_LOGIN_APPLICATIONS)) + " ADD ") + (com.outsystems.android.core.DatabaseHandler.KEY_APPLICATION_PRELOADER)) + " NUMERIC")...
public static void findViews(android.view.View view) { com.dsl14.lunchdecider.MainActivity.tSpinner = ((android.widget.Spinner) (view.findViewById(R.id.weatherSpinner))); com.dsl14.lunchdecider.MainActivity.tSpinner.setOnItemSelectedListener(com.dsl14.lunchdecider.MainActivity.wlistener); com.dsl14.lunchdec...
public static void findViews(android.view.View view) { com.dsl14.lunchdecider.MainActivity.tSpinner = ((android.widget.Spinner) (view.findViewById(R.id.weatherSpinner))); com.dsl14.lunchdecider.MainActivity.tSpinner.setOnItemSelectedListener(com.dsl14.lunchdecider.MainActivity.wlistener); com.dsl14.lunchdec...
public javax.ws.rs.core.Response crawlAll() { java.lang.String output = "Crawl the risk factors of all companies"; java.lang.String fail_output = "Fail to crawl risk factor for companies"; edu.cmu.sv.webcrawler.models.Crawler c = new edu.cmu.sv.webcrawler.models.Crawler(); edu.cmu.sv.webcrawler.models.S...
public javax.ws.rs.core.Response crawlAll() { java.lang.String output = "Crawl the risk factors of all companies"; java.lang.String fail_output = "Fail to crawl risk factor for companies"; edu.cmu.sv.webcrawler.models.Crawler c = new edu.cmu.sv.webcrawler.models.Crawler(); edu.cmu.sv.webcrawler.models.S...
protected boolean putServiceFunctionForwarder(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sff.rev140701.service.function.forwarders.ServiceFunctionForwarder sff) { boolean ret; org.opendaylight.sfc.provider.SfcProviderDebug.printTraceStart(org.opendaylight.sfc.provider.api.SfcProviderServiceFo...
protected boolean putServiceFunctionForwarder(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sff.rev140701.service.function.forwarders.ServiceFunctionForwarder sff) { boolean ret; org.opendaylight.sfc.provider.SfcProviderDebug.printTraceStart(org.opendaylight.sfc.provider.api.SfcProviderServiceFo...
public void update(graph.Node srcNode) { int neighborListSize = srcNode.neighborListSize(); for (int j = 0; j < neighborListSize; j++) { int dest = srcNode.getNeighbor(j); int destPartitionNumber = graphPartition.getPartitionNumber(dest); graph.NodePartition destPartition = graphPartitio...
public void update(graph.Node srcNode) { int neighborListSize = srcNode.neighborListSize(); for (int j = 0; j < neighborListSize; j++) { int dest = srcNode.getNeighbor(j); int destPartitionNumber = graphPartition.getPartitionNumber(dest); graph.NodePartition destPartition = graphPartitio...
public void calculateDAndEShares(int layer, int wire) { da = (circuitValues[(--layer)][wire]) ^ (ua); ea = (circuitValues[(--layer)][(wire++)]) ^ (va); }
public void calculateDAndEShares(int layer, int wire) { da = (circuitValues[(--layer)][wire]) ^ (ua); ea = (circuitValues[(--layer)][(++wire)]) ^ (va); }
public void testLowestHighIndexTwoToFour() { double[] values = new double[]{ 13.3 , 19.9 , 10 , 21 , 7.7 }; com.jasonlam604.stocktechnicals.util.LowestLow lowestLow = new com.jasonlam604.stocktechnicals.util.LowestLow(); lowestLow.find(values, 2, 4); org.junit.Assert.assertEquals(10.0, lowestLow.getValu...
public void testLowestHighIndexTwoToFour() { double[] values = new double[]{ 13.3 , 19.9 , 10 , 21 , 7.7 }; com.jasonlam604.stocktechnicals.util.LowestLow lowestLow = new com.jasonlam604.stocktechnicals.util.LowestLow(); lowestLow.find(values, 2, 2); org.junit.Assert.assertEquals(10.0, lowestLow.getValu...
private static void assertExceptionContains(java.lang.Throwable t, java.lang.String substring) { java.lang.String msg = org.apache.hadoop.util.StringUtils.stringifyException(t); org.junit.Assert.assertTrue(((("Exception should contain substring '" + substring) + "\':\n") + msg), msg.contains(substring)); or...
private static void assertExceptionContains(java.lang.Throwable t, java.lang.String substring) { java.lang.String msg = org.apache.hadoop.util.StringUtils.stringifyException(t); assertTrue(((("Exception should contain substring '" + substring) + "\':\n") + msg), msg.contains(substring)); org.apache.hadoop.i...
public void readVertexTest() { org.s1ck.gdl.GDLLoader loader = getLoaderFromGDLString("()"); validateCollectionSizes(loader, 0, 1, 0); validateCacheSizes(loader, 0, 1, 0); java.util.Optional<org.s1ck.gdl.model.Vertex> vertex = loader.getVertices().stream().findFirst(); assertTrue(vertex.isPresent())...
public void readVertexTest() { org.s1ck.gdl.GDLLoader loader = getLoaderFromGDLString("()"); validateCollectionSizes(loader, 0, 1, 0); validateCacheSizes(loader, 0, 0, 0); java.util.Optional<org.s1ck.gdl.model.Vertex> vertex = loader.getVertices().stream().findFirst(); assertTrue(vertex.isPresent())...
public void onEventBackgroundThread(@android.support.annotation.NonNull de.kuschku.libquassel.functions.types.HandshakeFunction func) { de.kuschku.util.AndroidAssert.assertNotNull(func); de.kuschku.util.AndroidAssert.assertNotNull(connection.getOutputExecutor()); java.util.Map<java.lang.String, de.kuschku.l...
public void onEventBackgroundThread(@android.support.annotation.NonNull de.kuschku.libquassel.functions.types.HandshakeFunction func) { de.kuschku.util.AndroidAssert.assertNotNull(connection.getOutputExecutor()); java.util.Map<java.lang.String, de.kuschku.libquassel.primitives.types.QVariant> variantMap = de.ku...
public static void findLongestWord(java.util.Scanner scanner) { java.lang.System.out.println(("This program will ask you to enter a sentence, and" + " then it will tell you the longest word in that sentence.")); java.lang.System.out.println("Please enter a sentence:"); java.lang.String string = scanner.next...
public static void findLongestWord(java.util.Scanner scanner) { java.lang.System.out.println(("This program will ask you to enter a sentence, and" + " then it will tell you the longest word in that sentence.")); java.lang.System.out.println("Please enter a sentence:"); scanner.nextLine(); java.lang.Stri...
public void testCanDeleteClaim() { java.lang.String name = "test"; java.util.Date sDate = new java.util.Date(123); java.util.Date eDate = new java.util.Date(456); ca.ualberta.cs.scandaloutraveltracker.Claim newClaim = new ca.ualberta.cs.scandaloutraveltracker.Claim(name, sDate, eDate); newClaim.setC...
public void testCanDeleteClaim() { ca.ualberta.cs.scandaloutraveltracker.ClaimList claimsList = ca.ualberta.cs.scandaloutraveltracker.ClaimList.getClaimList(); java.lang.String name = "test"; java.util.Date sDate = new java.util.Date(123); java.util.Date eDate = new java.util.Date(456); ca.ualberta....
public boolean validateEmail(java.lang.String email) { if (email == null) { this.errors.add("Email is required."); return false; } this.oldInput.put(((com.epam.danilchican.betting.tag.OldInputFormAttributeTag.PREFIX) + "email"), email); if (!(email.matches(com.epam.danilchican.betting.va...
public boolean validateEmail(java.lang.String email) { if (email == null) { this.errors.add("Email is required."); return false; } if (!(email.isEmpty())) { this.oldInput.put(((com.epam.danilchican.betting.tag.OldInputFormAttributeTag.PREFIX) + "email"), email); if (!(email.m...
public void placeTileAt(Model.Tile.BuildTile tile, Model.Utility.ILocation location) { buildMap.addTile(tile, location); for (Model.Utility.ILocation loc : location.getAdjacent()) { if (slotExistsAt(loc)) { this.updateSlot(loc); }else if ((!(buildMap.tileExistsAt(loc))) &...
public void placeTileAt(Model.Tile.BuildTile tile, Model.Utility.ILocation location) { buildMap.addTile(tile, location); for (Model.Utility.ILocation loc : location.getAdjacent()) { if (slotExistsAt(loc)) { this.updateSlot(loc); }else if (!(buildMap.tileExistsAt(loc))) { ...
public void initDeleteHead() { android.util.Log.d("testing", "addview1"); deleteHead = new com.apps.my.liener.BubbleHead(context, heightNew, widthMid, BubbleHead.HEAD_TYPE_DELETE, (-1)); deleteHead.setListener(this); deleteHead.initParams(0, ((int) ((heightNew) / 4))); deleteHead.switchToDelete(); ...
public void initDeleteHead() { android.util.Log.d("testing", "addview1"); deleteHead = new com.apps.my.liener.BubbleHead(context, heightNew, widthMid, BubbleHead.HEAD_TYPE_DELETE, (-1)); deleteHead.initParams(0, ((int) ((heightNew) / 4))); deleteHead.layoutParams.gravity = (android.view.Gravity.BOTTOM) ...
public void done(java.util.List<com.parse.ParseObject> list, com.parse.ParseException e) { progress.dismiss(); if (mSwipeRefreshLayout.isRefreshing()) { mSwipeRefreshLayout.setRefreshing(false); } if (e == null) { setPostMessageAdapter(list); }else { android.util.Log.d("parse...
public void done(java.util.List<com.parse.ParseObject> list, com.parse.ParseException e) { if (mSwipeRefreshLayout.isRefreshing()) { mSwipeRefreshLayout.setRefreshing(false); } if (e == null) { setPostMessageAdapter(list); }else { android.util.Log.d("parse query", "error with par...
private static void constructGridable(Gridder.Gridable... argrid) { javax.swing.JFrame builder = new javax.swing.JFrame("Builder"); javax.swing.JPanel pan = new javax.swing.JPanel(); builder.add(pan); builder.setSize(60, 60); builder.repaint(); builder.setVisible(true); }
private static void constructGridable() { javax.swing.JFrame builder = new javax.swing.JFrame("Builder"); javax.swing.JPanel pan = new javax.swing.JPanel(); builder.add(pan); builder.setSize(60, 60); builder.repaint(); builder.setVisible(true); }
public boolean placedOnNode(testProject.Node a) { try { for (testProject.Node n : nodes) { if ((((nodes.size()) > 1) && (a.getBounds().intersects(n.getBounds()))) && (n != a)) nodes.remove(n); return true; } return false; } catch (java...
public boolean placedOnNode(testProject.Node a) { try { for (testProject.Node n : nodes) { if ((((nodes.size()) > 1) && (n.getBounds().intersects(a.getBounds()))) && (n != a)) nodes.remove(n); return true; } return false; } catch (java...
private boolean hasOneOfThoseNodes(java.lang.String... texts) { for (java.lang.String text : texts) { if (text == null) continue; java.util.List<android.view.accessibility.AccessibilityNodeInfo> nodes = this.rootNodeInfo.findAccessibilityNodeInfosByText(text); if (!(node...
private boolean hasOneOfThoseNodes(java.lang.String... texts) { java.util.List<android.view.accessibility.AccessibilityNodeInfo> nodes; for (java.lang.String text : texts) { if (text == null) continue; nodes = this.rootNodeInfo.findAccessibilityNodeInfosByText(text); ...
public java.util.HashMap<java.lang.String, java.lang.String> unmarshal(be.nabu.utils.security.resources.KeyStoreManagerConfiguration.AliasPasswordEntry[] arg0) throws java.lang.Exception { java.util.HashMap<java.lang.String, java.lang.String> values = new java.util.HashMap<java.lang.String, java.lang.String>(); ...
public java.util.HashMap<java.lang.String, java.lang.String> unmarshal(be.nabu.utils.security.resources.KeyStoreManagerConfiguration.AliasPasswordEntry[] arg0) throws java.lang.Exception { java.util.HashMap<java.lang.String, java.lang.String> values = new java.util.HashMap<java.lang.String, java.lang.String>(); ...
public static play.mvc.Result problemListPage() { java.util.List<models.Problem> problems = Problem.find.where().or(com.avaje.ebean.Expr.eq("status", 0), com.avaje.ebean.Expr.eq("status", 3)).findList(); return ok(views.html.problem.list.render(problems)); }
public static play.mvc.Result problemListPage() { java.util.List<models.Problem> problems = Problem.find.where().or(com.avaje.ebean.Expr.eq("status", 0), com.avaje.ebean.Expr.eq("status", 3)).findList(); return ok(views.html.problem.list.render(problems, null)); }
public boolean getInformed(com.gmail.nossr50.datatypes.PlayerProfile PP) { switch (this) { case BLAST_MINING : return PP.getBlastMiningInformed(); case BERSERK : return PP.getBerserkInformed(); case SUPER_BREAKER : return PP.getSuperBreakerInformed(); ...
public boolean getInformed(com.gmail.nossr50.datatypes.PlayerProfile PP) { switch (this) { case BERSERK : return PP.getBerserkInformed(); case BLAST_MINING : return PP.getBlastMiningInformed(); case SUPER_BREAKER : return PP.getSuperBreakerInformed(); ...
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException { javax.servlet.http.HttpServletRequest req = ((javax.servlet.http.HttpServletRequest) (request)); javax.servlet.http.Htt...
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException { javax.servlet.http.HttpServletRequest req = ((javax.servlet.http.HttpServletRequest) (request)); javax.servlet.http.Htt...
public java.lang.String format(org.apache.flink.api.java.tuple.Tuple2<java.lang.Long, java.util.ArrayList<java.lang.String>> value) { java.lang.String s = ("{\"group\": " + (value.f0)) + ", \"member\": ["; boolean first = true; for (java.lang.String word : value.f1) { if (first) { first ...
public java.lang.String format(org.apache.flink.api.java.tuple.Tuple2<java.lang.Long, java.util.ArrayList<java.lang.String>> value) { java.lang.String s = ("{\"group\": " + (value.f0)) + ", \"member\": ["; boolean first = true; for (java.lang.String word : value.f1) { if (first) { first ...
protected org.eclipse.core.runtime.IStatus run(org.eclipse.core.runtime.IProgressMonitor monitor) { try { final java.util.Set<org.eclipse.osee.framework.skynet.core.artifact.Artifact> goals = new java.util.HashSet<org.eclipse.osee.framework.skynet.core.artifact.Artifact>(); new org.eclipse.osee.ats....
protected org.eclipse.core.runtime.IStatus run(org.eclipse.core.runtime.IProgressMonitor monitor) { try { final java.util.Set<org.eclipse.osee.framework.skynet.core.artifact.Artifact> goals = new java.util.HashSet<org.eclipse.osee.framework.skynet.core.artifact.Artifact>(); new org.eclipse.osee.ats....
public int boardEvaluation(player.Board board) { java.lang.System.out.println("Call boardEvaluation"); if (board.success(machineColor)) { return MACHINE_WIN; }else if (board.success(humanColor)) { return HUMAN_WIN; }else { return (board.connectedChipsNum(machi...
public int boardEvaluation(player.Board board) { if (board.success(machineColor)) { return MACHINE_WIN; }else if (board.success(humanColor)) { return HUMAN_WIN; }else { return (board.connectedChipsNum(machineColor)) - (board.connectedChipsNum(humanColor)); ...
private void init(org.stepic.droid.model.Lesson lesson, org.stepic.droid.model.Unit unit, org.stepic.droid.model.Section section) { stepAdapter = new org.stepic.droid.ui.adapters.StepFragmentAdapter(getActivity().getSupportFragmentManager(), stepsPresenter.getStepList(), lesson, unit, stepTypeResolver, section); ...
private void init(org.stepic.droid.model.Lesson lesson) { getActivity().setTitle(lesson.getTitle()); ((android.support.v7.app.AppCompatActivity) (getActivity())).setSupportActionBar(toolbar); ((android.support.v7.app.AppCompatActivity) (getActivity())).getSupportActionBar().setDisplayHomeAsUpEnabled(true); ...
private org.crosswire.common.util.IniSection load(byte[] buffer, org.crosswire.common.util.Filter<java.lang.String> keepers) throws java.io.IOException { org.crosswire.common.util.IniSection config = new org.crosswire.common.util.IniSection(); config.load(buffer, org.crosswire.jsword.book.sword.SwordBookMetaDat...
private org.crosswire.common.util.IniSection load(byte[] buffer, org.crosswire.common.util.Filter<java.lang.String> keepers) throws java.io.IOException { org.crosswire.common.util.IniSection config = new org.crosswire.common.util.IniSection(); config.load(buffer, org.crosswire.jsword.book.sword.SwordBookMetaDat...
public Item pop() throws java.util.EmptyStackException { if ((array[index]) == null) { throw new java.util.EmptyStackException(); } Item item = array[index]; array[index] = null; if ((index) == 0) { index = (array.length) - 1; }else { index = (index) - 1; } return...
public Item pop() throws java.util.EmptyStackException { if (((index) == (-1)) || ((array[index]) == null)) { throw new java.util.EmptyStackException(); } Item item = array[index]; array[index] = null; if ((index) == 0) { index = (array.length) - 1; }else { index = (index...
public javax.ws.rs.core.Response getWeatherInCities(@com.vlad.rest.QueryParam(value = "city") java.util.List<java.lang.String> cities) { java.util.Map<java.lang.String, java.lang.Object> headers = new java.util.HashMap<java.lang.String, java.lang.Object>(); headers.put("q", "ad"); headers.put("appid", com.v...
public javax.ws.rs.core.Response getWeatherInCities(@com.vlad.rest.QueryParam(value = "city") java.util.List<java.lang.String> cities) { java.lang.String s = ((java.lang.String) (getWeatherInCitiesTemplate.requestBodyAndHeaders(cities, null))); return javax.ws.rs.core.Response.status(200).type(MediaType.TEXT_PL...
private static void createConnection() { try { com.innopolis.courses.dmd.premasters.java4life.XMLParser.connection = java.sql.DriverManager.getConnection(((com.innopolis.courses.dmd.premasters.java4life.XMLParser.URL) + (com.innopolis.courses.dmd.premasters.java4life.XMLParser.DB_NAME)), com.innopolis.cours...
private static void createConnection() { try { com.innopolis.courses.dmd.premasters.java4life.XMLParser.connection = java.sql.DriverManager.getConnection(((com.innopolis.courses.dmd.premasters.java4life.XMLParser.URL) + (com.innopolis.courses.dmd.premasters.java4life.XMLParser.DB_NAME)), com.innopolis.cours...
private void animateTheShitter(float start, float end) { if (mEnabled) { android.animation.ObjectAnimator animator = android.animation.ObjectAnimator.ofFloat(this, View.TRANSLATION_Y, start, end); animator.setInterpolator(new android.view.animation.DecelerateInterpolator()); animator.setDura...
private void animateTheShitter(float start, float end) { android.animation.ObjectAnimator animator = android.animation.ObjectAnimator.ofFloat(this, View.TRANSLATION_Y, start, end); animator.setInterpolator(new android.view.animation.DecelerateInterpolator()); animator.setDuration(200); animator.start();...
private void removeTaskList(java.util.LinkedList<es.caib.seycon.ng.sync.engine.TaskHandler> tasksToRemove) throws es.caib.seycon.ng.exception.InternalErrorException, java.lang.Exception { for (es.caib.seycon.ng.sync.engine.TaskHandler taskToRemove : tasksToRemove) { if ((taskToRemove.getTimeout()) != null) ...
private void removeTaskList(java.util.LinkedList<es.caib.seycon.ng.sync.engine.TaskHandler> tasksToRemove) throws es.caib.seycon.ng.exception.InternalErrorException, java.lang.Exception { for (es.caib.seycon.ng.sync.engine.TaskHandler taskToRemove : tasksToRemove) { if ((taskToRemove.getTimeout()) != null) ...
private void startPost(java.lang.String postInfo) { android.util.Log.i(com.dante.girls.picture.PictureFragment.TAG, ("startPost: " + postInfo)); android.support.v4.app.FragmentTransaction transaction = context.getSupportFragmentManager().beginTransaction(); com.dante.girls.picture.PictureFragment fragment =...
private void startPost(java.lang.String postInfo) { android.util.Log.i(com.dante.girls.picture.PictureFragment.TAG, ("startPost: " + postInfo)); android.support.v4.app.FragmentTransaction transaction = context.getSupportFragmentManager().beginTransaction(); com.dante.girls.picture.PictureFragment fragment =...
private void addAlterFactors(datastructures.mt.MinimalTheory theory, int noOfAlterFactors) { java.lang.String factor = ""; for (int i = 0; i < noOfAlterFactors; i++) { int random = randomIndex(names.size()); int randomSec = randomNegativePositiv(); factor = names.get(random).get(randomSe...
private void addAlterFactors(datastructures.mt.MinimalTheory theory, int noOfAlterFactors) { java.lang.String factor = ""; for (int i = 0; i < noOfAlterFactors; i++) { int random = randomIndex(names.size()); factor = names.get(random).get(0); theory.addBundle(factor); names.remov...
public void initControllerEmails() throws org.json.JSONException { emailDAO = gppmds.wikilegis.dao.EmailDAO.getInstance(context); if (emailDAO.isDatabaseEmpty()) { emailDAO = ((gppmds.wikilegis.dao.EmailDAO) (gppmds.wikilegis.dao.JSONHelper.emailListFromJSON(gppmds.wikilegis.controller.RegisterUserContr...
public void initControllerEmails() throws org.json.JSONException { emailDAO = gppmds.wikilegis.dao.EmailDAO.getInstance(context); if (emailDAO.isDatabaseEmpty()) { gppmds.wikilegis.controller.RegisterUserController.emailList = gppmds.wikilegis.dao.JSONHelper.emailListFromJSON(gppmds.wikilegis.controller...
public void onClick(android.view.View v) { switch (v.getId()) { case R.id.accept : leave.setLeaveStatus(1); mDatabase.child(java.lang.String.valueOf(leave.getId())).setValue(leave); finish(); break; case R.id.reject : leave.setLeaveStatus(2...
public void onClick(android.view.View v) { switch (v.getId()) { case R.id.accept : leave.setLeaveStatus(1); break; case R.id.reject : leave.setLeaveStatus(2); break; } mDatabase.child(java.lang.String.valueOf(leave.getId())).setValue(leave); ...
public boolean validHash(int difficulty, int hash) { if (difficulty > 8) difficulty = 8; if (difficulty < 0) difficulty = 0; int shift = 32 - (4 * difficulty); int check = hash >> shift; if (check > 0) { return false; } return true; }
public boolean validHash(int difficulty, int hash) { if (difficulty <= 0) return true; else if (difficulty > 8) difficulty = 8; int shift = 32 - (4 * difficulty); int check = hash >> shift; if (check != 0) { return false; } return true; }
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (savedInstanceState == null) { getSupportActionBar().hide(); mViewPager = ((android.support.v4.view.ViewPager) (findViewById(R.id.viewpager))); ...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); getSupportActionBar().hide(); mViewPager = ((android.support.v4.view.ViewPager) (findViewById(R.id.viewpager))); mViewPager.setAdapter(new ladsoft.roulette.adap...
private void processDefiniteCandidateElement(org.apache.solr.handler.component.PivotFacet pf, org.apache.solr.handler.component.PivotFacetValue value) { for (int shard = pf.knownShards.nextSetBit(0); 0 <= shard; shard = pf.knownShards.nextSetBit((shard + 1))) { if (!(value.shardHasContributed(shard))) { ...
private void processDefiniteCandidateElement(org.apache.solr.handler.component.PivotFacet pf, org.apache.solr.handler.component.PivotFacetValue value) { for (int shard = pf.knownShards.nextSetBit(0); 0 <= shard; shard = pf.knownShards.nextSetBit((shard + 1))) { if (!(value.shardHasContributed(shard))) { ...
protected void checkForHighScore() { cs48.project.game.Space_Blasters.HighScores hs = new cs48.project.game.Space_Blasters.HighScores(); long[] scoreList = hs.getScoreList(); for (int i = 0; i < 10; i++) { if ((rm.getMainPlayer().getScore()) > (scoreList[i])) { writeNewHighScore(hs, i); ...
protected void checkForHighScore() { cs48.project.game.Space_Blasters.HighScores hs = new cs48.project.game.Space_Blasters.HighScores(); long[] scoreList = hs.getScoreList(); for (int i = 0; i < 10; i++) { if ((rm.getMainPlayer().getScore()) > (scoreList[i])) { writeNewHighScore(hs, i); ...