buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public java.util.List<com.YCPCS.Whiteboard.Model.Lecture> getAllUserLectures(int userId) { java.util.List<com.YCPCS.Whiteboard.Model.Relationship> rels = com.YCPCS.Whiteboard.Database.DatabaseProvider.getInstance().getTarget("user", "lecture", userId); java.util.List<com.YCPCS.Whiteboard.Model.Lecture> lectures...
public java.util.List<com.YCPCS.Whiteboard.Model.Lecture> getAllUserLectures(int userId) { java.util.List<com.YCPCS.Whiteboard.Model.Relationship> rels = com.YCPCS.Whiteboard.Database.DatabaseProvider.getInstance().getTarget("user", "lecture", userId); java.util.List<com.YCPCS.Whiteboard.Model.Lecture> lectures...
public boolean onOptionsItemSelected(android.view.MenuItem item) { switch (item.getItemId()) { case R.id.action_settings : musicSrv.printCurrSong(); break; case R.id.action_create_marker : createMarker(); break; case R.id.action_end : ...
public boolean onOptionsItemSelected(android.view.MenuItem item) { switch (item.getItemId()) { case R.id.action_create_marker : createMarker(); break; case R.id.action_end : stopService(playIntent); musicSrv = null; java.lang.System.exit(0)...
public void buildAllDocuments() { java.lang.String word; for (java.util.Iterator<java.lang.String> it = documents.keySet().iterator(); it.hasNext();) { word = it.next(); documents.get(word).calculateTfIdf(this); } }
public void buildAllDocuments() { java.lang.String url; for (java.util.Iterator<java.lang.String> it = documents.keySet().iterator(); it.hasNext();) { url = it.next(); documents.get(url).calculateTfIdf(this); } }
public void testCase3_5() throws java.lang.Exception { expectedException.expect(com.hcmut.smarthome.utils.ConflictConditionException.class); java.lang.String input = new com.hcmut.smarthome.utils.ScriptBuilder().begin().If(com.hcmut.smarthome.service.test.ScenarioValidatorTest.TSENSOR_5, com.hcmut.smarthome.uti...
public void testCase3_5() throws java.lang.Exception { java.lang.String input = new com.hcmut.smarthome.utils.ScriptBuilder().begin().If(com.hcmut.smarthome.service.test.ScenarioValidatorTest.TSENSOR_5, com.hcmut.smarthome.utils.ConstantUtil.NOT_EQUAL, 35.5F).If(com.hcmut.smarthome.service.test.ScenarioValidatorTes...
private java.lang.String getMetadataUrl(org.w3c.dom.Document doc) { java.lang.String metadataUrl = ""; try { org.w3c.dom.Element elem = ((org.w3c.dom.Element) (org.auscope.portal.core.util.DOMUtil.compileXPathExpr(org.auscope.portal.core.services.responses.wms.GetCapabilitiesRecord_1_1_1.METADATAURLREXP...
private java.lang.String getMetadataUrl(org.w3c.dom.Document doc) { java.lang.String metadataUrl = ""; try { org.w3c.dom.Element elem = ((org.w3c.dom.Element) (org.auscope.portal.core.util.DOMUtil.compileXPathExpr(org.auscope.portal.core.services.responses.wms.GetCapabilitiesRecord_1_1_1.METADATAURLREXP...
private java.lang.String valueOf(java.lang.Object object) { if (object == null) { throw new java.lang.RuntimeException("Can't save null"); }else if (object instanceof java.util.Date) { java.util.Date date = ((java.util.Date) (object)); return java.lang.String.valueOf(date...
private java.lang.String valueOf(java.lang.Object object) { if (object == null) { throw new java.lang.RuntimeException("Can't save null"); }else if (object instanceof java.util.Date) { java.util.Date date = ((java.util.Date) (object)); return java.lang.String.valueOf(date...
public void testWriteBytes() throws java.io.IOException { byte[] output = adapter.writeBytes(allTypes); org.assertj.core.api.Assertions.assertThat(output.length).isEqualTo(TestAllTypesData.expectedOutput.length); org.assertj.core.api.Assertions.assertThat(okio.ByteString.of(output)).isEqualTo(okio.ByteStrin...
public void testWriteBytes() throws java.io.IOException { byte[] output = adapter.writeBytes(allTypes); org.assertj.core.api.Assertions.assertThat(output.length).isEqualTo(TestAllTypesData.expectedOutput.size()); org.assertj.core.api.Assertions.assertThat(okio.ByteString.of(output)).isEqualTo(TestAllTypesDa...
public void run(int param) throws com.awprog.scroidv2.AlphaScript.ErrorDialog.ScriptException { getParams().setReturn(((((com.awprog.scroidv2.AlphaScript.BooleanData) (getParams().inLeft)).getValue()) || (((com.awprog.scroidv2.AlphaScript.BooleanData) (getParams().inRight)).getValue()))); }
public void run(int param) throws com.awprog.scroidv2.AlphaScript.ErrorDialog.ScriptException { getParams().setReturn(((((com.awprog.scroidv2.AlphaScript.BooleanData) (getParams().inLeft)).getValue()) && (((com.awprog.scroidv2.AlphaScript.BooleanData) (getParams().inRight)).getValue()))); }
public sg.ncl.service.authentication.domain.Credentials updateStatus(@javax.validation.constraints.NotNull final sg.ncl.service.authentication.domain.Credentials credentials) { sg.ncl.service.authentication.validation.Validator.checkStatus(credentials); final sg.ncl.service.authentication.data.jpa.CredentialsEn...
public sg.ncl.service.authentication.domain.Credentials updateStatus(@javax.validation.constraints.NotNull final java.lang.String id, @javax.validation.constraints.NotNull final sg.ncl.service.authentication.domain.Credentials credentials) { sg.ncl.service.authentication.validation.Validator.checkStatus(credentials...
public boolean positionWithinBoardBounds(com.alanihre.chess.Point position) { return ((((position.getX()) < (getWidth())) && ((position.getX()) > 0)) && ((position.getY()) < (getHeight()))) && ((position.getY()) > 0); }
public boolean positionWithinBoardBounds(com.alanihre.chess.Point position) { return ((((position.getX()) < (getWidth())) && ((position.getX()) >= 0)) && ((position.getY()) < (getHeight()))) && ((position.getY()) >= 0); }
private void ValidateBook(java.lang.String isbn, library.Book book) { if (isbn != (book.getIsbn())) { throw new javax.validation.ConstraintViolationException("ISBN does not match book's ISBN.", null); } library.BooksResource.validator.validate(book); java.util.Set<javax.validation.ConstraintViol...
private void ValidateBook(java.lang.String isbn, library.Book book) { if (isbn != (book.getIsbn())) { throw new javax.validation.ConstraintViolationException("ISBN does not match book's ISBN.", null); } library.BooksResource.validator.validate(book); java.util.Set<javax.validation.ConstraintViol...
void appendToFile(java.io.File file, long actualArrivalTimestamp) { java.lang.String predictionLine = ((((((name) + ",") + (bus.Utils.convertTimestampToDate(predictionTimestamp))) + ",") + (bus.Utils.convertTimestampToDate(actualArrivalTimestamp))) + ",") + (actualArrivalTimestamp - (predictedTimestamp)); bus.U...
void appendToFile(java.io.File file, long actualArrivalTimestamp) { java.lang.String predictionLine = ((((((name) + ",") + (bus.Utils.convertTimestampToDate(predictionTimestamp))) + ",") + (bus.Utils.convertTimestampToDate(predictedTimestamp))) + ",") + (bus.Utils.convertTimestampToDate(actualArrivalTimestamp)); ...
private void setResultContent() { android.content.Intent resultIntent = new android.content.Intent(); mContent = mContentEditText.getText().toString(); resultIntent.putExtra(com.quartzodev.buddybook.AnnotationActivity.ARG_CONTENT, mContent); mFirebaseDatabaseHelper.updateBookAnnotation(mFirebaseAuth.get...
private void setResultContent() { android.content.Intent resultIntent = new android.content.Intent(); mContent = mContentEditText.getText().toString().trim(); resultIntent.putExtra(com.quartzodev.buddybook.AnnotationActivity.ARG_CONTENT, mContent); mFirebaseDatabaseHelper.updateBookAnnotation(mFirebaseA...
private void refreshRecyclerViewForDate(@android.support.annotation.NonNull java.util.Date date) { if (db.hasExpensesForDay(date)) { expensesViewAdapter.setDate(date, db); recyclerView.setVisibility(View.VISIBLE); recyclerViewPlaceholder.setVisibility(View.GONE); }else { recycler...
private void refreshRecyclerViewForDate(@android.support.annotation.NonNull java.util.Date date) { expensesViewAdapter.setDate(date, db); if (db.hasExpensesForDay(date)) { recyclerView.setVisibility(View.VISIBLE); recyclerViewPlaceholder.setVisibility(View.GONE); }else { recyclerView...
public static org.liveSense.core.session.SessionFactory getInstance(long defaultSessionTimeout, long sessionTimeoutCheckInterval, long sessionCloseTimeout, long factoryCloseTimeout) { if ((org.liveSense.core.session.SessionFactoryImpl.factory) == null) { org.liveSense.core.session.SessionFactoryImpl.log.inf...
public static org.liveSense.core.session.SessionFactory getInstance(long defaultSessionTimeout, long sessionTimeoutCheckInterval, long sessionCloseTimeout) { if ((org.liveSense.core.session.SessionFactoryImpl.factory) == null) { org.liveSense.core.session.SessionFactoryImpl.log.info("Creating liveSense Sess...
private io.grpc.examples.movieservice.Movie getMovieBlockingStub(io.grpc.examples.movieservice.MovieRequest request) { io.grpc.examples.movieservice.Movie movie; try { movie = blockingStub.getMovieDetails(request); return movie; } catch (io.grpc.StatusRuntimeException e) { io.grpc.ex...
private io.grpc.examples.movieservice.Movie getMovieBlockingStub(io.grpc.examples.movieservice.MovieRequest request) { io.grpc.examples.movieservice.Movie movie; try { movie = blockingStub.getMovieDetails(request); return movie; } catch (io.grpc.StatusRuntimeException e) { io.grpc.ex...
private static void loadEntryBookWithSampleDeletedEntries(seedu.multitasky.model.EntryBook entryBook) { for (seedu.multitasky.model.entry.Entry entry : seedu.multitasky.testutil.SampleEntries.getSampleDeletedEntries()) { try { entryBook.addEntry(seedu.multitasky.model.util.EntryBuilder.build(ent...
private static void loadEntryBookWithSampleDeletedEntries(seedu.multitasky.model.EntryBook entryBook) { for (seedu.multitasky.model.entry.Entry entry : seedu.multitasky.testutil.SampleEntries.getSampleDeletedEntries()) { try { entryBook.addEntry(entry); } catch (seedu.multitasky.model.en...
protected void split(java.util.List<T> list, cn.com.deepdata.es_adapter.adapter.AdapterContext ctx) { for (T ele : list) { try { cn.com.deepdata.es_adapter.adapter.DataListSplitter.getDataQueue().put(new cn.com.deepdata.es_adapter.model.DataWrapper(ele, ctx.getNextAdapterClazz())); } cat...
protected void split(java.util.List<T> list, cn.com.deepdata.es_adapter.adapter.AdapterContext ctx) { for (T ele : list) { while (true) { try { cn.com.deepdata.es_adapter.adapter.DataListSplitter.getDataQueue().put(new cn.com.deepdata.es_adapter.model.DataWrapper(ele, ctx.getNext...
public assignment2.Peg[] buildSecretCode(int length) { assignment2.Peg[] code = new assignment2.Peg[length]; java.lang.String scode = assignment2.SecretCodeGenerator.getInstance().getNewSecretCode(); for (int i = 0; i < length; i++) { code[i] = new assignment2.Peg(scode.charAt(i), i); } retu...
private assignment2.Peg[] buildSecretCode(int length) { assignment2.Peg[] code = new assignment2.Peg[length]; java.lang.String scode = assignment2.SecretCodeGenerator.getInstance().getNewSecretCode(); for (int i = 0; i < length; i++) { code[i] = new assignment2.Peg(scode.charAt(i), i); } ret...
public boolean onLongClick(android.view.View view) { if (!(mMultiSelector.isSelectable())) { mMultiSelector.setSelectable(true); mMultiSelector.setSelected(this, true); folderInterface.changeFabAction("delete", ((com.example.abhilashmirji.virtualfileexplorer.FolderObject) (view.getTag()))); ...
public boolean onLongClick(android.view.View view) { if (!(mMultiSelector.isSelectable())) { mMultiSelector.setSelectable(true); mMultiSelector.setSelected(this, true); folderInterface.changeFabAction("delete", ((com.example.abhilashmirji.virtualfileexplorer.FolderObject) (view.getTag()))); ...
public boolean onOptionsItemSelected(android.view.MenuItem item) { switch (item.getItemId()) { case R.id.action_add_cancel : finish(); return true; case R.id.action_add_complete : createMood(emotion, situation, trigger); setResult(com.cmput301w17t08.mo...
public boolean onOptionsItemSelected(android.view.MenuItem item) { switch (item.getItemId()) { case R.id.action_add_cancel : finish(); return true; case R.id.action_add_complete : createMood(emotion, situation, trigger); return true; } return s...
public void testInstallFlow() { java.lang.String dpnId = "openflow:1"; java.lang.String tableId1 = "12"; org.opendaylight.genius.mdsalutil.FlowEntity testFlow1 = createFlowEntity(dpnId, tableId1); mdSalMgr.installFlow(testFlow1); org.junit.Assert.assertEquals(1, flowFwder.getDataChgCount()); jav...
public void testInstallFlow() throws java.lang.Exception { java.lang.String dpnId = "openflow:1"; java.lang.String tableId1 = "12"; org.opendaylight.genius.mdsalutil.FlowEntity testFlow1 = createFlowEntity(dpnId, tableId1); mdSalMgr.installFlow(testFlow1).get(); org.junit.Assert.assertEquals(1, flow...
public void onCreate(android.os.Bundle savedInstanceState) { if ((savedInstanceState != null) && (savedInstanceState.containsKey("movies"))) { movies = savedInstanceState.getParcelableArrayList("movies"); }else { fetchMovieData(); } this.recreated = true; super.onCreate(savedInstance...
public void onCreate(android.os.Bundle savedInstanceState) { if ((savedInstanceState != null) && (savedInstanceState.containsKey("movies"))) { movies = savedInstanceState.getParcelableArrayList("movies"); }else { fetchMovieData(); } super.onCreate(savedInstanceState); }
public domain.Item generateItem2(int i) { this.updater = ms.getUpdater(); domain.Item item = new domain.Item(i); logic.ItemGenerator.itemlist.add(item); generateUpgrades(item, ms); generateAchievments(item, updater, ac); return item; }
public domain.Item generateItem2(int i) { this.updater = ms.getUpdater(); domain.Item item = new domain.Item(i); generateUpgrades(item, ms); generateAchievments(item, updater, ac); logic.ItemGenerator.itemlist.add(item); return item; }
public static java.util.HashMap<lisp.Symbol, lisp._Sexpr> getScope() { java.util.HashMap<lisp.Symbol, lisp._Sexpr> scope = new java.util.HashMap<lisp.Symbol, lisp._Sexpr>(); java.util.ListIterator<context.Context> listIterator = context.Contexts.contexts.listIterator(); while (listIterator.hasNext()) { ...
public static java.util.HashMap<lisp.Symbol, lisp._Sexpr> getScope() { java.util.HashMap<lisp.Symbol, lisp._Sexpr> scope = new java.util.HashMap<lisp.Symbol, lisp._Sexpr>(); java.util.ListIterator<context.Context> listIterator = context.Contexts.contexts.listIterator(); while (listIterator.hasNext()) { ...
public boolean contains(double x, double y) { if ((((x < ((this.x) + (radius))) && (x > ((this.x) - (radius)))) && (y < ((this.y) + (radius)))) && (y > ((this.y) - (radius)))) return true; else return false; }
public boolean contains(double x, double y) { if (((((this.x) - x) * ((this.x) - x)) + (((this.y) - y) * ((this.y) - y))) < ((this.radius) * (this.radius))) return true; else return false; }
public common.messages.KVMessage put(java.lang.String key, java.lang.String value) throws java.lang.Exception { common.messages.MessageType request = new common.messages.MessageType("put", "", key, value); if ((request.error) != null) { throw new java.lang.Exception(request.error); } connectToRe...
public common.messages.KVMessage put(java.lang.String key, java.lang.String value) throws java.lang.Exception { common.messages.MessageType request = new common.messages.MessageType("put", "", key, value); if ((request.error) != null) { throw new java.lang.Exception(request.error); } if (!(conne...
private void showLoading() { mIsLoading = true; mRefreshView.setVisibility(View.GONE); mLoading.setVisibility(View.VISIBLE); if ((mPage) == 0) { mObservationsGrid.setVisibility(View.GONE); mObservationsGridEmpty.setVisibility(View.GONE); mLoadingObservationsGrid.setVisibility(Vie...
private void showLoading() { mIsLoading = true; mRefreshView.setVisibility(View.GONE); mLoading.setVisibility(View.VISIBLE); if ((mPage) == 1) { mObservationsGrid.setVisibility(View.GONE); mObservationsGridEmpty.setVisibility(View.GONE); mLoadingObservationsGrid.setVisibility(Vie...
public void updateSettings() { android.content.ContentResolver resolver = mContext.getContentResolver(); mShowCombinedVolumes = (Settings.System.getInt(mContext.getContentResolver(), Settings.System.ENABLE_VOLUME_OPTIONS, 0)) == 1; if (!(mShowCombinedVolumes)) { mMoreButton.setVisibility(View.GONE);...
public void updateSettings() { android.content.ContentResolver resolver = mContext.getContentResolver(); mShowCombinedVolumes = (Settings.System.getInt(resolver, Settings.System.ENABLE_VOLUME_OPTIONS, 0)) == 1; if (!(mShowCombinedVolumes)) { mMoreButton.setVisibility(View.GONE); mDivider.set...
public void globalChecking(java.util.ArrayList<BasicElement.PositionInPanel> allPos, int selfNumber) { for (int i = 0; i < (allPos.size()); i++) { if ((i != selfNumber) & (pos.isOverlapping(allPos.get(i)))) { currentState.stateString.clear(); currentState.stateString.add("collis"); ...
public void globalChecking(java.util.ArrayList<BasicElement.PositionInPanel> allPos, int selfNumber) { for (int i = 0; i < (allPos.size()); i++) { if ((i != selfNumber) && (pos.isOverlapping(allPos.get(i)))) { currentState.stateString.clear(); currentState.stateString.add("collis"); ...
public static java.lang.String north(java.lang.String south) { java.util.List<java.lang.String> stations = user.Stations.getStations(); int index = stations.indexOf(south); if (index > 1) { return stations.get((index - 1)); }else { return "" + ((java.lang.Integer.valueOf(south)) + 1); ...
public static java.lang.String north(java.lang.String south) { java.util.List<java.lang.String> stations = user.Stations.getStations(); int index = stations.indexOf(south); if (index > 0) { return stations.get((index - 1)); }else { return "" + ((java.lang.Integer.valueOf(south)) + 1); ...
public boolean find(java.lang.String name) { boolean contains = false; placeHolder = head; for (int i = 0; i < (size); i++) { int equals = placeHolder.getName().compareToIgnoreCase(name); if (equals == 0) contains = true; placeHolder = placeHolder.getNext(); ...
public boolean find(java.lang.String name) { boolean contains = false; placeHolder = head; for (int i = 0; i < ((size) - 1); i++) { int equals = placeHolder.getName().compareToIgnoreCase(name); if (equals == 0) contains = true; placeHolder = placeHolder.getNext()...
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case REQ_CODE_SPEECH_INPUT : { if ((resultCode == (RESULT_OK)) && (null != data)) { ...
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case REQ_CODE_SPEECH_INPUT : { if ((resultCode == (RESULT_OK)) && (null != data)) { ...
public emerald.portal.ConfigureNew_ProductStep1 clickSaveButton() { core.Actions.click(common.DriverManager.getDriver(DriverType.LOOP), emerald.portal.ConfigureNew.btnConfigureNewForm(ConfigureNew_Button.SAVE)); core.Wait.waitFor(common.DriverManager.getDriver(DriverType.LOOP), ConfigureNew_ProductStep1.pageFra...
public emerald.portal.ConfigureNew_ProductStep1 clickSaveButton() { core.Actions.click(common.DriverManager.getDriver(DriverType.LOOP), emerald.portal.ConfigureNew.btnConfigureNewForm(ConfigureNew_Button.SAVE)); core.Wait.waitFor(common.DriverManager.getDriver(DriverType.LOOP), ConfigureNew_ProductStep1.pageFra...
public java.lang.String editPatient(@javax.validation.Valid @com.healthserviceapp.areas.patient.controllers.ModelAttribute com.healthserviceapp.areas.patient.models.bindingModels.EditPatientBindingModel editPatientBindingModel, @com.healthserviceapp.areas.patient.controllers.PathVariable java.lang.Long id, org.springfr...
public java.lang.String editPatient(@com.healthserviceapp.areas.patient.controllers.PathVariable java.lang.Long id, @javax.validation.Valid @com.healthserviceapp.areas.patient.controllers.ModelAttribute com.healthserviceapp.areas.patient.models.bindingModels.EditPatientBindingModel editPatientBindingModel, org.springfr...
public static void init(com.feed_the_beast.ftbl.api.IFTBLibRegistry reg) { java.lang.String id = (com.feed_the_beast.ftbu.FTBUFinals.MOD_ID) + ".world"; reg.addConfig(id, "chunk_claiming", com.feed_the_beast.ftbu.config.FTBUConfigWorld.CHUNK_CLAIMING); reg.addConfig(id, "chunk_loading", com.feed_the_beast.f...
public static void init(com.feed_the_beast.ftbl.api.IFTBLibRegistry reg) { java.lang.String id = (com.feed_the_beast.ftbu.FTBUFinals.MOD_ID) + ".world"; reg.addConfig(id, "chunk_claiming", com.feed_the_beast.ftbu.config.FTBUConfigWorld.CHUNK_CLAIMING); reg.addConfig(id, "chunk_loading", com.feed_the_beast.f...
public void showError(java.lang.String msg) { if (msg == null) { errorPanel.clear(); } errorPanel.clear(); java.lang.String[] lines = msg.split("\n"); for (java.lang.String item : lines) { errorPanel.add(new com.google.gwt.user.client.ui.Label(item)); } }
public void showError(java.lang.String msg) { if (msg == null) { errorPanel.clear(); return ; } errorPanel.clear(); java.lang.String[] lines = msg.split("\n"); for (java.lang.String item : lines) { errorPanel.add(new com.google.gwt.user.client.ui.Label(item)); } }
public void onGlobalLayout() { if ((Build.VERSION.SDK_INT) >= (Build.VERSION_CODES.JELLY_BEAN)) { currentHeader.getViewTreeObserver().removeOnGlobalLayoutListener(this); }else { currentHeader.getViewTreeObserver().removeGlobalOnLayoutListener(this); } int newDimen = currentDimension(); ...
public void onGlobalLayout() { if ((Build.VERSION.SDK_INT) >= (Build.VERSION_CODES.JELLY_BEAN)) { view.getViewTreeObserver().removeOnGlobalLayoutListener(this); }else { view.getViewTreeObserver().removeGlobalOnLayoutListener(this); } if ((currentHeader) == null) return ; ...
public void onTextChanged(java.lang.CharSequence cs, int arg1, int arg2, int arg3) { mSearchQuery = cs.toString(); mAdapter = ((com.lastsoft.plog.MainActivity) (mActivity)).initPlayAdapter(mSearchQuery, fromDrawer, playListType); mRecyclerView.setAdapter(mAdapter); }
public void onTextChanged(java.lang.CharSequence cs, int arg1, int arg2, int arg3) { if ((mActivity) != null) { mSearchQuery = cs.toString(); mAdapter = ((com.lastsoft.plog.MainActivity) (mActivity)).initPlayAdapter(mSearchQuery, fromDrawer, playListType); mRecyclerView.setAdapter(mAdapter);...
public void onSuccess(@javax.annotation.Nullable final com.greenaddress.greenapi.LoginData result) { final android.content.SharedPreferences.Editor editor = getSharedPreferences("pin", com.greenaddress.greenbits.ui.MODE_PRIVATE).edit(); editor.putInt("counter", 0); editor.apply(); if ((getCallingActivit...
public void onSuccess(@javax.annotation.Nullable final com.greenaddress.greenapi.LoginData result) { final android.content.SharedPreferences.Editor editor = getSharedPreferences("pin", com.greenaddress.greenbits.ui.MODE_PRIVATE).edit(); editor.putInt("counter", 0); editor.apply(); if ((getCallingActivit...
protected void onResume() { super.onResume(); mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_GAME); isAYOActive = false; android.widget.TextView tv = ((android.widget.TextView) (findViewById(R.id.accelerometer_values))); tv.setText(""); currRecordInd = 0; ac...
protected void onResume() { super.onResume(); mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_GAME); isAYOActive = false; currRecordInd = 0; accel_count = 0; cycle = false; idle_count = 0; accel_data = new float[MAX_RECORDS]; }
public java.lang.String home(org.springframework.ui.Model model) { org.springframework.security.core.Authentication auth = org.springframework.security.core.context.SecurityContextHolder.getContext().getAuthentication(); java.lang.String username = auth.getName(); de.unileipzig.bis.rbs.testApp.model.User us...
public java.lang.String home(org.springframework.ui.Model model) { java.lang.String username = this.getAuthentication().getName(); de.unileipzig.bis.rbs.testApp.model.User user = userRepository.findByUsername(username); java.lang.String name = "Guest"; if (user != null) { name = user.getName(); ...
public void testCreate() { com.janantoniak.GameOfLife.Ground ground = new com.janantoniak.GameOfLife.Ground(10, 10); org.junit.Assert.assertNotNull(ground); for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { org.junit.Assert.assertNotNull(ground.getCell(i, j)); org...
public void testCreate() { com.janantoniak.GameOfLife.Ground ground = new com.janantoniak.GameOfLife.Ground(10, 10); for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { org.junit.Assert.assertNotNull(ground.getCell(i, j)); org.junit.Assert.assertEquals(ground.isAlive(i,...
private void animateSetPosition(net.offbeatpioneer.retroengine.core.sprites.ISpriteGroup group, android.graphics.PointF position) { java.util.List<net.offbeatpioneer.retroengine.core.sprites.AbstractSprite> childs = getChildrensFromSpriteGroup(group); for (net.offbeatpioneer.retroengine.core.sprites.AbstractSpr...
private void animateSetPosition(net.offbeatpioneer.retroengine.core.sprites.ISpriteGroup group, android.graphics.PointF position) { java.util.List<net.offbeatpioneer.retroengine.core.sprites.AbstractSprite> childs = getChildrensFromSpriteGroup(group); for (net.offbeatpioneer.retroengine.core.sprites.AbstractSpr...
public void run() { mIsLongpressed = true; if (isPressed()) { if (isLongClickable()) { performLongClick(); }else { sendEvent(KeyEvent.ACTION_DOWN, KeyEvent.FLAG_LONG_PRESS); sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_LONG_CLICKED); } p...
public void run() { mIsLongpressed = true; if (isPressed()) { if (isLongClickable()) { performLongClick(); }else { sendEvent(KeyEvent.ACTION_DOWN, KeyEvent.FLAG_LONG_PRESS); sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_LONG_CLICKED); } s...
public void drawGallery(int questionNumber, int part) { scale = 60; galleryNumber = questionNumber; galleryPoints = reader.getData(questionNumber, part); f.setTitle(((("Shots on Jaz - Part: " + part) + " Question: ") + questionNumber)); setPolygon(galleryPoints); guardList.clear(); pathList....
public void drawGallery(int questionNumber, int part) { scale = 60; galleryNumber = questionNumber; galleryPoints = reader.getData(questionNumber, part); f.setTitle(((("Shots on Jaz - Part: " + part) + " Question: ") + questionNumber)); setPolygon(galleryPoints); guardList.clear(); }
public static java.lang.String subscribe(org.json.JSONObject json_filter, int handler_callback) throws org.json.JSONException { org.json.JSONObject root = new org.json.JSONObject(); root.put("name", "subscribe"); root.put("query", json_filter.toString()); root.put("id", handler_callback); return roo...
public static java.lang.String subscribe(org.json.JSONObject json_filter, int handler_callback) throws org.json.JSONException { org.json.JSONObject root = new org.json.JSONObject(); root.put("name", "subscribe"); root.put("query", json_filter); root.put("id", handler_callback); return root.toString(...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); needToShowProgress = false; setContentView(R.layout.activity_comments); boolean gotData = getDataFromIntentOrState(savedInstanceState); if (!gotData) { android.util.Log.e(ru.hookahlocator.hook...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); needToShowProgress = false; setContentView(R.layout.activity_comments); boolean gotData = getDataFromIntentOrState(savedInstanceState); if (!gotData) { android.util.Log.e(ru.hookahlocator.hook...
public RecyclerView.ViewHolder onCreateViewHolder(android.view.ViewGroup parent, int viewType) { if (viewType == (me.itangqi.buildingblocks.view.adapter.DailyListAdapter.ITEM_TYPE_IMAGE)) { android.util.Log.d(me.itangqi.buildingblocks.view.adapter.DailyListAdapter.TAG, "item view created"); return n...
public RecyclerView.ViewHolder onCreateViewHolder(android.view.ViewGroup parent, int viewType) { if (viewType == (me.itangqi.buildingblocks.view.adapter.DailyListAdapter.ITEM_TYPE_IMAGE)) { return new me.itangqi.buildingblocks.view.adapter.DailyListAdapter.ImageViewHolder(mLayoutInflater.inflate(R.layout.it...
public void start() throws java.lang.Exception { restClient.testConnection(); com.quest.forge.rest.tunnel.client.TunnelClient.logger.info(("Successfully verified rest service " + (restClient.getBaseURL()))); wsClient = new org.eclipse.jetty.websocket.client.WebSocketClient(); wsClient.start(); java....
public void start() throws java.lang.Exception { com.quest.forge.rest.tunnel.client.TunnelClient.logger.info(("Successfully verified rest service " + (restClient.getBaseURL()))); wsClient = new org.eclipse.jetty.websocket.client.WebSocketClient(); wsClient.start(); java.net.URI tunnelServerUri = new jav...
public void run() { android.util.Log.d(wisc.drivesense.activity.MainActivity.TAG, "No GPS, resetting speed display."); tvSpeed.setText("--.--"); Units.userFacingDouble distance = wisc.drivesense.utility.Units.largeDistance(boundTripService.getCurtrip().getDistance(), metricUnits); tvTotalDistance.setTex...
public void run() { android.util.Log.d(wisc.drivesense.activity.MainActivity.TAG, "No GPS, resetting speed display."); tvSpeed.setText("--.--"); if (((boundTripService) != null) && ((boundTripService.getCurtrip()) != null)) { Units.userFacingDouble distance = wisc.drivesense.utility.Units.largeDista...
public void deleteArchivedProcessInstance_by_id_should_throw_exception_when_parent_still_active() throws java.lang.Exception { final long archivedProcessInstanceId = 42L; doReturn(java.util.Collections.singletonList(mock(org.bonitasoft.engine.core.process.instance.model.archive.SAProcessInstance.class))).when(p...
public void deleteArchivedProcessInstance_by_id_should_throw_exception_when_parent_still_active() throws java.lang.Exception { final long archivedProcessInstanceId = 42L; doReturn(java.util.Collections.singletonList(mock(org.bonitasoft.engine.core.process.instance.model.archive.SAProcessInstance.class))).when(p...
private java.lang.String toString(org.jdom.Element rootElement) { java.lang.String xml = null; org.jdom.Document document = new org.jdom.Document(); document.setRootElement(rootElement); try { org.jdom.output.XMLOutputter outputter = new org.jdom.output.XMLOutputter(); outputter.setForma...
private java.lang.String toString(final org.jdom.Element rootElement) { final org.jdom.output.XMLOutputter outputter = new org.jdom.output.XMLOutputter(); outputter.setFormat(org.jdom.output.Format.getCompactFormat()); final org.jdom.Document document = new org.jdom.Document(); document.setRootElement(r...
public static void main(java.lang.String[] args) { shafin.ml.tfidf.service.SearchService service = new shafin.ml.tfidf.service.SearchService(); long init = new java.util.Date().getTime(); java.util.List<shafin.ml.tfidf.dto.ArticleDto> docs = service.searchCollection("বাংলাদেশের কৃষি"); long end = new ja...
public static void main(java.lang.String[] args) { long init = new java.util.Date().getTime(); long end = new java.util.Date().getTime(); long diff = end - init; java.lang.System.out.println(("time taken: " + diff)); }
public void saveClaim(ca.ualberta.cmput301w15t13.Models.Claim claim) { this.isNetworkConnected(); if (persistanceController.DataManager.isNetworkAvailable()) { new persistanceModel.SaveASyncTask().execute(claim.getclaimID()); } local.saveClaims(ca.ualberta.cmput301w15t13.Controllers.ClaimListSin...
public void saveClaim(ca.ualberta.cmput301w15t13.Models.Claim claim) { if (persistanceController.DataManager.isNetworkAvailable()) { new persistanceModel.SaveASyncTask().execute(claim.getclaimID()); } local.saveClaims(ca.ualberta.cmput301w15t13.Controllers.ClaimListSingleton.getClaimList().getClaimA...
public synchronized void rewriteField(java.util.List<java.lang.String> newLines) { if ((newLines.size()) == 0) { logOutputField.setText(""); } this.lines = new java.util.ArrayList<view.OutputArrayElement>(); for (java.lang.String line : newLines) { java.lang.String out = ""; out ...
private synchronized void rewriteField(java.util.List<java.lang.String> newLines) { if ((newLines.size()) == 0) { logOutputField.setText(""); } this.lines = new java.util.ArrayList<view.OutputArrayElement>(); for (java.lang.String line : newLines) { java.lang.String out = ""; out...
public void fixFiles() { java.lang.String extension = ".csv"; java.util.List<java.lang.String> names = com.alphatica.genotick.data.DataUtils.listFiles(extension); if (names == null) { throw new com.alphatica.genotick.data.DataException(("Unable to list files in " + (path))); } for (java.lang...
public void fixFiles() { java.lang.String extension = ".csv"; java.util.List<java.lang.String> names = com.alphatica.genotick.data.DataUtils.listFiles(extension, path); if (names == null) { throw new com.alphatica.genotick.data.DataException(("Unable to list files in " + (path))); } for (jav...
public synchronized void start() { if (mierzwa.rafal.smartmouse2.BluetoothChatService.D) android.util.Log.d(mierzwa.rafal.smartmouse2.BluetoothChatService.TAG, "start"); if ((mConnectThread) != null) { mConnectThread.cancel(); mConnectThread = null; } if ((mConnectedThread) ...
public synchronized void start() { if (mierzwa.rafal.smartmouse2.BluetoothChatService.D) android.util.Log.d(mierzwa.rafal.smartmouse2.BluetoothChatService.TAG, "start"); if ((mConnectThread) != null) { mConnectThread.cancel(); mConnectThread = null; } if ((mConnectedThread) ...
public void doCorrection() { switch (fo.correctionOptions.correctionSpherAbb.toLowerCase()) { case "none" : break; case "bartz2014" : BartzCorrector(TrackspotResults.AMPLITUDE); break; case "frame-wise tracks" : case "frame-wise total" : ca...
private void doCorrection() { switch (fo.correctionOptions.correctionSpherAbb.toLowerCase()) { case "none" : break; case "bartz2014" : BartzCorrector(TrackspotResults.AMPLITUDE); break; case "frame-wise tracks" : case "frame-wise total" : c...
public void insert(java.lang.String collectionName, java.util.HashMap<java.lang.String, java.lang.Object> values, im.delight.android.ddp.ResultListener listener) { if (listener != null) { mMeteor.insert(collectionName, values); }else { if (listener != null) { if (this.hasNetworkConne...
public void insert(java.lang.String collectionName, java.util.HashMap<java.lang.String, java.lang.Object> values, im.delight.android.ddp.ResultListener listener) { if (listener != null) { if (this.hasNetworkConnection) { mMeteor.insert(collectionName, values, listener); }else { ...
public void init(int numPacks) { int counter = 0; for (Card card : cards) { if (counter >= 52) counter = 0; card = Deck.masterPack[counter]; counter++; topCard = (52 * numPacks) - 1; } }
public void init(int numPacks) { int counter = 0; for (int i = 0; i < (cards.length); ++i) { if (counter >= 52) counter = 0; cards[i] = Deck.masterPack[counter]; counter++; } topCard = (52 * numPacks) - 1; }
protected double calculateNodeNameCost(partial.code.grapa.delta.graph.DeltaNode leftNode, partial.code.grapa.delta.graph.DeltaNode rightNode) { double distance = 0; if ((mode) == (partial.code.grapa.delta.graph.GraphComparator.CONCRETE)) { stringComparator.getUnNormalisedSimilarity(leftNode.getComparedL...
protected double calculateNodeNameCost(partial.code.grapa.delta.graph.DeltaNode leftNode, partial.code.grapa.delta.graph.DeltaNode rightNode) { double distance = 0; if ((mode) == (partial.code.grapa.delta.graph.GraphComparator.CONCRETE)) { distance = stringComparator.getUnNormalisedSimilarity(leftNode.g...
private void move(java.util.ArrayList from, java.util.ArrayList to, java.lang.Object toMove) { for (int i = 0; i < (to.size()); i++) { if (to.get(i).equals(toMove)) { to.remove(i); from.add(toMove); return ; } } }
private void move(java.util.ArrayList from, java.util.ArrayList to, java.lang.Object toMove) { for (int i = 0; i < (from.size()); i++) { if (from.get(i).equals(toMove)) { from.remove(i); to.add(toMove); return ; } } }
public void swipe(com.yuyakaido.android.cardstackview.SwipeDirection direction, android.animation.AnimatorSet set) { executePreSwipeTask(); performSwipe(direction, set, new android.animation.AnimatorListenerAdapter() { @java.lang.Override public void onAnimationEnd(android.animation.Animator ani...
public void swipe(final com.yuyakaido.android.cardstackview.SwipeDirection direction, android.animation.AnimatorSet set) { executePreSwipeTask(); performSwipe(direction, set, new android.animation.AnimatorListenerAdapter() { @java.lang.Override public void onAnimationEnd(android.animation.Animat...
public void init(com.badlogic.gdx.math.Vector2 position, com.badlogic.gdx.math.Vector2 size) { if (uk.co.redfruit.gdx.skyisfalling.utils.Constants.DEBUG) { Gdx.app.log(uk.co.redfruit.gdx.skyisfalling.game.objects.Explosion.TAG, ("Explosion length: " + (animation.getAnimationDuration()))); } this.pos...
public void init(com.badlogic.gdx.math.Vector2 position, com.badlogic.gdx.math.Vector2 size) { if (uk.co.redfruit.gdx.skyisfalling.utils.Constants.DEBUG) { Gdx.app.log(uk.co.redfruit.gdx.skyisfalling.game.objects.Explosion.TAG, ("Explosion length: " + (animation.getAnimationDuration()))); } this.pos...
public <A extends java.lang.annotation.Annotation> java.util.Collection<java.lang.reflect.Method> getTriggers(java.lang.Class<A> annotationClass, java.lang.String fieldName) { java.util.Collection<java.lang.reflect.Method> methods = fieldsToTriggers.getCollection(org.apache.commons.lang3.tuple.Pair.of(annotationCla...
public <A extends java.lang.annotation.Annotation> java.util.Collection<java.lang.reflect.Method> getTriggers(java.lang.Class<A> annotationClass, java.lang.String fieldName) { java.util.Collection<java.lang.reflect.Method> methods = fieldsToTriggers.get(org.apache.commons.lang3.tuple.Pair.of(annotationClass, fieldN...
public void divideStores(java.util.ArrayList<misc.Location> validStores, misc.Location base) { if ((validStores.size()) < 2) return ; if (base == null) return ; if ((numOfDrivers) == 1) divideByOne(validStores, base); if ((numOfDrivers) == 2) divideByTwo(va...
public void divideStores(java.util.ArrayList<misc.Location> validStores, misc.Location base) { if ((validStores.size()) < 1) return ; if (base == null) return ; if ((numOfDrivers) == 1) divideByOne(validStores, base); if ((numOfDrivers) == 2) divideByTwo(va...
public void classifica() { int i = elencoGiocatori.size(); while (i > 0) { classificaFinale.addElement(elencoGiocatori.get(ilPiuPovero())); elencoGiocatori.remove(elencoGiocatori.get(ilPiuPovero())); i--; } }
private void classifica() { int i = elencoGiocatori.size(); while (i > 0) { classificaFinale.addElement(elencoGiocatori.get(ilPiuPovero())); elencoGiocatori.remove(elencoGiocatori.get(ilPiuPovero())); i--; } }
void merge(joshua.decoder.hypergraph.WordAlignmentState astate) { if (((astate.isComplete()) && ((stack.size()) > 0)) && (!(stack.peek().isComplete()))) { joshua.decoder.hypergraph.WordAlignmentState parentState = stack.pop(); parentState.substituteIn(astate); merge(parentState); }else {...
private void merge(final joshua.decoder.hypergraph.WordAlignmentState state) { if (((!(stack.isEmpty())) && (state.isComplete())) && (!(stack.peek().isComplete()))) { final joshua.decoder.hypergraph.WordAlignmentState parentState = stack.pop(); parentState.substituteIn(state); merge(parentSt...
public trees.rstartree.Node overflowTreatment(int level, trees.rstartree.Node node, trees.rstartree.Node newNode) { trees.rstartree.Node nn = null; java.lang.System.out.println(((level + " ") + (overflowsDone))); if ((level != 0) && (!(overflowsDone.get(level)))) { overflowsDone.set(level, true); ...
public trees.rstartree.Node overflowTreatment(int level, trees.rstartree.Node node, trees.rstartree.Node newNode) { trees.rstartree.Node nn = null; if ((level != 0) && (!(overflowsDone.get(level)))) { overflowsDone.set(level, true); reInsert(node, newNode, level); }else { nn = node.s...
private void onInput(final orwell.proxy.zmq.ZmqMessageBOM zmqMessageBOM) { orwell.proxy.ProxyRobots.logback.debug("Setting controller Input to robot"); final java.lang.String routingId = zmqMessageBOM.getRoutingId(); if (robotsMap.isRobotRegistered(routingId)) { applyInputOnRobot(zmqMessageBOM, rout...
private void onInput(final orwell.proxy.zmq.ZmqMessageBOM zmqMessageBOM) { final java.lang.String routingId = zmqMessageBOM.getRoutingId(); if (robotsMap.isRobotRegistered(routingId)) { applyInputOnRobot(zmqMessageBOM, routingId); }else { orwell.proxy.ProxyRobots.logback.info((("RoutingID " ...
public org.soippo.entity.User saveUser(org.soippo.entity.User user) throws org.soippo.exceptions.UserValidationException { if (((user.getId()) != null) && ((userRepository.findOne(user.getId())) == null)) { if (!(checkUniqueEmail(user.getEmail()))) { throw new org.soippo.exceptions.NotUniqueEmai...
public org.soippo.entity.User saveUser(org.soippo.entity.User user) throws org.soippo.exceptions.UserValidationException { if (((user.getId()) != null) && ((userRepository.findOne(user.getId())) == null)) { if (!(checkUniqueEmail(user.getEmail()))) { throw new org.soippo.exceptions.NotUniqueEmai...
public static java.io.FileReader download(java.lang.String fileName, com.amazon.proposalcalculator.enums.ProductName productName) throws java.io.IOException { com.amazon.proposalcalculator.reader.PriceListDownloader.LOGGER.info(java.lang.String.format("Downloading price list for %s. This might take a while...", pro...
public static java.io.FileReader download(java.lang.String fileName, com.amazon.proposalcalculator.enums.ProductName productName) throws java.io.IOException { com.amazon.proposalcalculator.reader.PriceListDownloader.LOGGER.info(java.lang.String.format("Downloading price list for %s. This might take a while...", pro...
public void onClick(android.view.View v) { container.removeAllViewsInLayout(); if ((sort_mode) == true) { change_image_sort = ((android.widget.ImageButton) (findViewById(R.id.sort_toolbar))); change_image_sort.setImageResource(R.drawable.ic_sort_a_to_z); sort_mode = false; }else ...
public void onClick(android.view.View v) { container.removeAllViewsInLayout(); if ((sort_mode) == true) { change_image_sort = ((android.widget.ImageButton) (findViewById(R.id.sort_toolbar))); change_image_sort.setImageResource(R.drawable.ic_sort_a_to_z); sort_mode = false; }else ...
private char checkNull(int _randomNum) { char result = 'Y'; switch (_randomNum % 4) { case 1 : result = up; case 2 : result = down; case 3 : result = left; case 4 : result = right; } return result; }
private char checkNull(int _randomNum) { char result = 'Y'; switch (_randomNum % 4) { case 0 : result = up; case 1 : result = down; case 2 : result = left; case 3 : result = right; } return result; }
public int compareTo(capstat.model.ChalmersAge other) { capstat.model.Birthday otherBirthday = other.getBirthday(); int birthdayCompare = this.birthday.compareTo(otherBirthday); if (birthdayCompare != 0) return birthdayCompare; capstat.model.Admittance otherAdmittance = other.getAdmittance(...
public int compareTo(capstat.model.ChalmersAge other) { capstat.model.Admittance otherAdmittance = other.getAdmittance(); int admittanceCompare = this.admittance.compareTo(otherAdmittance); if (admittanceCompare != 0) return admittanceCompare; capstat.model.Birthday otherBirthday = other.ge...
private void offsetPreviousSnapshot(float translateX) { android.view.View view = getPreviousActivityContentView(); if (view == null) { throw new java.lang.NullPointerException("NullPointerException"); } if ((view != null) && ((mSlideFrameLayout) != null)) { if (!(mPreviousActivitySlideFo...
private void offsetPreviousSnapshot(float translateX) { android.view.View view = getPreviousActivityContentView(); if (view == null) { throw new java.lang.NullPointerException("NullPointerException"); } if ((mSlideFrameLayout) != null) { if (!(mPreviousActivitySlideFollow)) { ...
private double getProfitRate(double rfactor) { if (rfactor < 1.2) { return 0.7; }else if (rfactor > 2.5) { return 0.25; }else if ((rfactor > 1.2) && (rfactor < 2.5)) { return 0.25 + (((2.5 - rfactor) / (2.5 - 1.2)) * 0.45); } ...
private double getProfitRate(double rfactor) { if (rfactor < 1.2) { return 0.7; }else if (rfactor > 2.5) { return 0.25; }else if ((rfactor >= 1.2) && (rfactor <= 2.5)) { return 0.25 + (((2.5 - rfactor) / (2.5 - 1.2)) * 0.45); } ...
protected net.anomalyxii.werewolves.parser.PlayerInstance instanceForCharacter(java.lang.Character character) { net.anomalyxii.werewolves.parser.Vitality vitality = getVitalityForCharacter(character); net.anomalyxii.werewolves.parser.User user = getUserFromCharacter(character); if (isCharacterBeingControlle...
public net.anomalyxii.werewolves.parser.PlayerInstance instanceForCharacter(java.lang.Character character) { net.anomalyxii.werewolves.parser.Vitality vitality = getVitalityForCharacter(character); net.anomalyxii.werewolves.parser.User user = getUserFromCharacter(character); if (isCharacterBeingControlled(c...
public void testCheckCollectionFilesPost() { java.lang.System.out.println("testCheckCollectionFilesPost"); org.restheart.handlers.RequestContext context = createContext("/db/fs.files", "POST"); assertEquals(context.getType(), RequestContext.TYPE.FILES_BUCKET); assertEquals(context.getMethod(), RequestCo...
public void testCheckCollectionFilesPost() { java.lang.System.out.println("testCheckCollectionFilesPost"); org.restheart.handlers.RequestContext context = createContext("/db/fs.files", "POST"); assertEquals(context.getType(), RequestContext.TYPE.FILES_BUCKET); assertEquals(context.getMethod(), RequestCo...
private void resolveStoragePartitions(org.apache.lens.cube.parse.CubeQueryContext cubeql) throws org.apache.lens.server.api.error.LensException { java.util.Iterator<org.apache.lens.cube.parse.Candidate> candidateIterator = cubeql.getCandidates().iterator(); while (candidateIterator.hasNext()) { org.apac...
private void resolveStoragePartitions(org.apache.lens.cube.parse.CubeQueryContext cubeql) throws org.apache.lens.server.api.error.LensException { java.util.Iterator<org.apache.lens.cube.parse.Candidate> candidateIterator = cubeql.getCandidates().iterator(); while (candidateIterator.hasNext()) { org.apac...
public static java.lang.String subBytesToHex(byte[] bytes, int start, int end) { int length = end - start; byte[] sub_array = new byte[length]; for (int i = 0; i < length; i++) { sub_array[i] = bytes[i]; } return com.scanner.bth.bluetoothscanner.BeaconParser.bytesToHex(sub_array); }
public static java.lang.String subBytesToHex(byte[] bytes, int start, int end) { int length = end - start; byte[] sub_array = new byte[length]; for (int i = 0; i < length; i++) { sub_array[i] = bytes[(i + start)]; } return com.scanner.bth.bluetoothscanner.BeaconParser.bytesToHex(sub_array); ...
public void showProgress(java.lang.String msg, boolean cancelable, boolean outsideCancelAble) { if ((mProgress) == null) { mProgress = new android.app.ProgressDialog(mContext); mProgress.setProgressStyle(ProgressDialog.STYLE_SPINNER); mProgress.setTitle("提示"); } mProgress.setCancelab...
public void showProgress(java.lang.String msg, boolean cancelable, boolean outsideCancelAble) { if ((mProgress) == null) { mProgress = new android.app.ProgressDialog(mContext); mProgress.setProgressStyle(ProgressDialog.STYLE_SPINNER); } mProgress.setCancelable(cancelable); mProgress.setC...
public void sum() throws java.lang.Exception { PlayGround playGround = new PlayGround(); java.util.List<java.lang.Integer> numbers; numbers = java.util.Arrays.asList(4, 5, 4, 3, 2); assertEquals(((long) (18)), ((long) (playGround.sum(numbers)))); }
public void sum() throws java.lang.Exception { PlayGround playGround = new PlayGround(); java.util.List<java.lang.Integer> numbers; numbers = java.util.Arrays.asList(4, 5, 4, 3, 2); assertEquals(18, playGround.sum(numbers)); }
public static void main(java.lang.String[] args) { int a = 2; int b = 5; int c = 10; DebugThree2.add(a, b); DebugThree2.add(b, c); subtract(c, a); }
public static void main(java.lang.String[] args) { int a = 2; int b = 5; int c = 10; DebugThree2.add(a, b); DebugThree2.add(b, c); DebugThree2.subtract(c, a); }
public void setMinionUntrusted(java.lang.String ipAddress) throws exceptions.UnregisteredMinion { monitor.Minion trustedMinion = trustedMinions.remove(ipAddress); if (trustedMinion != null) { untrustedMinions.put(ipAddress, trustedMinion); this.trustedMinionsArray = trustedMinions.entrySet().toA...
public void setMinionUntrusted(java.lang.String ipAddress) throws exceptions.UnregisteredMinion { monitor.Minion trustedMinion = trustedMinions.remove(ipAddress); if (trustedMinion != null) { untrustedMinions.put(ipAddress, trustedMinion); this.trustedMinionsArray = trustedMinions.entrySet().toA...
private java.util.ArrayList<com.canyapan.dietdiaryapp.models.Event> loadItems(org.joda.time.LocalDate date) { java.util.ArrayList<com.canyapan.dietdiaryapp.models.Event> list = null; try { list = com.canyapan.dietdiaryapp.db.EventHelper.getEventByDate(getContext(), date); } catch (android.database.s...
private java.util.ArrayList<com.canyapan.dietdiaryapp.models.Event> loadItems(org.joda.time.LocalDate date) { java.util.ArrayList<com.canyapan.dietdiaryapp.models.Event> list = null; try { list = com.canyapan.dietdiaryapp.db.EventHelper.getEventByDate(getContext(), date); } catch (android.database.s...
private void replaceLast(java.lang.String newString) { java.lang.String text = secondScreen.getText(); int lastSpace = text.lastIndexOf(com.implemica.zavizionov.calculator.CalculatorFormatter.SPACE_SYMBOL); int lastIndex = (lastSpace != (-1)) ? lastSpace + 1 : 0; setSecondScreenText(((text.substring(0, ...
private void replaceLast(java.lang.String newString) { java.lang.String text = secondScreen.getText(); int lastSpace = text.lastIndexOf(com.implemica.zavizionov.calculator.CalculatorFormatter.SPACE_SYMBOL); int lastIndex = (lastSpace == (-1)) ? 0 : lastSpace + 1; setSecondScreenText(((text.substring(0, ...
public void onActionActivate(buildcraft.api.transport.pipe.PipeEventActionActivate event) { if ((event.action) instanceof buildcraft.transport.statements.ActionExtractionPreset) { buildcraft.transport.statements.ActionExtractionPreset preset = ((buildcraft.transport.statements.ActionExtractionPreset) (event...
public void onActionActivate(buildcraft.api.transport.pipe.PipeEventActionActivate event) { super.onActionActivate(event); if ((event.action) instanceof buildcraft.transport.statements.ActionExtractionPreset) { buildcraft.transport.statements.ActionExtractionPreset preset = ((buildcraft.transport.statem...
public android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState) { android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(getContext()); builder.setTitle(R.string.dialog_bluetooth_disabled_title).setMessage(R.string.dialog_bluetooth_disabled_msg).setCancelable(false).setPosi...
public android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState) { android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(getContext()); builder.setTitle(R.string.dialog_bluetooth_disabled_title).setMessage(R.string.dialog_bluetooth_disabled_msg).setPositiveButton(android.R....
public void move_unchecked(org.xtuml.bp.core.common.ModelRoot destination) { org.xtuml.bp.core.common.InstanceList sourceInstanceList = getInstanceList(); synchronized(sourceInstanceList) { sourceInstanceList.remove(this); } org.xtuml.bp.core.common.InstanceList destinationInstanceList = destina...
public void move_unchecked(org.xtuml.bp.core.common.ModelRoot destination) { org.xtuml.bp.core.common.InstanceList sourceInstanceList = getInstanceList(); synchronized(sourceInstanceList) { sourceInstanceList.remove(this); } org.xtuml.bp.core.common.InstanceList destinationInstanceList = destina...
public void handlePlayerLogout(int id) { for (org.javajumper.saboteur.player.SPPlayer p : new java.util.ArrayList<org.javajumper.saboteur.player.SPPlayer>(players)) { if ((p.getId()) == id) { players.remove(p); } } for (org.javajumper.saboteur.player.DeadPlayer dp : new java.util...
public void handlePlayerLogout(int id) { for (org.javajumper.saboteur.player.SPPlayer p : new java.util.ArrayList(players)) { if ((p.getId()) == id) { players.remove(p); } } for (org.javajumper.saboteur.player.DeadPlayer dp : new java.util.ArrayList(deadplayers)) { if ((d...
public android.view.View onCreateInputView() { super.onCreateInputView(); kv = ((android.inputmethodservice.KeyboardView) (getLayoutInflater().inflate(R.layout.keyboard, null))); keyboard = new android.inputmethodservice.Keyboard(this, R.xml.qwerty); kv.setKeyboard(keyboard); kv.setOnKeyboardActionL...
public android.view.View onCreateInputView() { super.onCreateInputView(); kv = ((android.inputmethodservice.KeyboardView) (getLayoutInflater().inflate(R.layout.keyboard, null))); keyboard = new android.inputmethodservice.Keyboard(this, R.xml.qwerty); kv.setKeyboard(keyboard); kv.setOnKeyboardActionL...
public static weka.core.Instances getAarfData(java.lang.String FileName) throws java.io.IOException { weka.core.converters.ArffLoader loader = new weka.core.converters.ArffLoader(); loader.setFile(new java.io.File(FileName)); weka.core.Instances data = loader.getDataSet(); data.setClassIndex(((data.numA...
public static weka.core.Instances getAarfData(java.lang.String fileName) throws java.io.IOException { weka.core.converters.ArffLoader loader = new weka.core.converters.ArffLoader(); loader.setFile(new java.io.File(fileName)); weka.core.Instances data = loader.getDataSet(); data.setClassIndex(((data.numA...
public void generateAllSubscriptions(com.axelor.rpc.ActionRequest request, com.axelor.rpc.ActionResponse response) throws com.axelor.exception.AxelorException { com.axelor.apps.sale.db.SaleOrder saleOrder = request.getContext().asType(com.axelor.apps.sale.db.SaleOrder.class); saleOrder = com.axelor.inject.Beans...
public void generateAllSubscriptions(com.axelor.rpc.ActionRequest request, com.axelor.rpc.ActionResponse response) throws com.axelor.exception.AxelorException { com.axelor.apps.sale.db.SaleOrder saleOrder = request.getContext().asType(com.axelor.apps.sale.db.SaleOrder.class); saleOrder = com.axelor.inject.Beans...
public static com.jakduk.api.model.embedded.CommonWriter getCommonWriter() { com.jakduk.api.restcontroller.vo.user.AuthUserProfile authUserProfile = com.jakduk.api.common.util.AuthUtils.getAuthUserProfile(); if (java.util.Objects.nonNull(authUserProfile)) { return com.jakduk.api.model.embedded.CommonWri...
public static com.jakduk.api.model.embedded.CommonWriter getCommonWriter() { com.jakduk.api.restcontroller.vo.user.AuthUserProfile authUserProfile = com.jakduk.api.common.util.AuthUtils.getAuthUserProfile(); if (java.util.Objects.nonNull(authUserProfile)) { return com.jakduk.api.model.embedded.CommonWri...
private java.lang.String getRate(java.lang.Double number) { java.util.Locale locale = new java.util.Locale("en", "UK"); java.lang.String pattern = "###.##"; java.text.DecimalFormat decimalFormat = ((java.text.DecimalFormat) (java.text.NumberFormat.getNumberInstance(locale))); decimalFormat.applyPattern(...
private java.lang.String getRate(java.lang.Double number) { java.util.Locale locale = new java.util.Locale("en", "UK"); java.lang.String pattern = "###.##"; java.text.DecimalFormat decimalFormat = ((java.text.DecimalFormat) (java.text.NumberFormat.getNumberInstance(locale))); decimalFormat.applyPattern(...
protected void onRegistered(android.content.Context context, java.lang.String registrationId) { android.util.Log.i(com.versatilemobitech.indiontv.GCMIntentService.TAG, ("Device registered: regId = " + registrationId)); com.versatilemobitech.indiontv.CommonUtilities.displayMessage(context, "Your device registred...
protected void onRegistered(android.content.Context context, java.lang.String registrationId) { android.util.Log.i(com.versatilemobitech.indiontv.GCMIntentService.TAG, ("Device registered: regId = " + registrationId)); android.util.Log.d("NAME", BaseActivity.name); com.versatilemobitech.indiontv.ServerUtili...
private android.graphics.Point getRandomPoint(int baseX, int baseY, int r) { int x = mRandom.nextInt(r); int y = ((int) (java.lang.Math.sqrt(((r * r) - (x * x))))); x = baseX + (getRandomPNValue(x)); y = baseY + (getRandomPNValue(y)); return new android.graphics.Point(x, y); }
private android.graphics.Point getRandomPoint(int baseX, int baseY, int r) { if (r <= 0) { r = 1; } int x = mRandom.nextInt(r); int y = ((int) (java.lang.Math.sqrt(((r * r) - (x * x))))); x = baseX + (getRandomPNValue(x)); y = baseY + (getRandomPNValue(y)); return new android.graphic...
public void onDisable() { com.endercrest.colorcube.SettingsManager.getInstance().saveSystemConfig(); reloadConfig(); for (com.endercrest.colorcube.game.Game g : com.endercrest.colorcube.GameManager.getInstance().getGames()) { g.disable(); com.endercrest.colorcube.logging.QueueManager.getInst...
public void onDisable() { com.endercrest.colorcube.SettingsManager.getInstance().saveSystemConfig(); reloadConfig(); for (com.endercrest.colorcube.game.Game g : com.endercrest.colorcube.GameManager.getInstance().getGames()) { g.disable(true); } com.endercrest.colorcube.MessageManager.getInst...