buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public static void main(java.lang.String[] args) throws java.lang.Exception { java.lang.String alg = "AES"; java.lang.String key = "TheBestSecreteKe"; java.security.Key key2 = new javax.crypto.spec.SecretKeySpec(key.getBytes(), alg); javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance(alg); ...
public static void main(java.lang.String[] args) throws java.lang.Exception { java.lang.String alg = "AES"; java.lang.String key = "TheBestSecreteKe"; java.security.Key key2 = new javax.crypto.spec.SecretKeySpec(key.getBytes(), alg); javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance(alg); ...
public int compare(Paxos.ProposalId rhs) { if ((this.id) == (rhs.id)) { return java.lang.Integer.compare(this.playerId, rhs.playerId); }else if ((this.id) < (rhs.id)) { return -1; }else { return 1; } }
public int compare(Paxos.ProposalId rhs) { if ((this.id) == (rhs.id)) { if ((rhs.playerId) == (this.playerId)) { return 0; }else if ((this.playerId) < (rhs.playerId)) { return -1; }else { return 1; } }else ...
public value.Value sub(value.Value other) { if ((!(isSet())) || (!(other.isSet()))) { return new value.IntegerValue(0); } return new value.IntegerValue(((value) - (((value.IntegerValue) (other)).getValue()))); }
public value.Value sub(value.Value other) { if ((!(isSet())) || (!(other.isSet()))) { return new value.IntegerValue(); } return new value.IntegerValue(((value) - (((value.IntegerValue) (other)).getValue()))); }
protected void setUp() throws java.lang.Exception { java.lang.String name = getName(); name = name.replace("$$", "/"); name = name.replace("$", "."); consulo.internal.dotnet.asm.mbel.ModuleParser moduleParser = new consulo.internal.dotnet.asm.mbel.ModuleParser(new java.io.File(("testData/" + name))); ...
protected void setUp() throws java.lang.Exception { java.lang.String name = getName(); name = name.replace("$$", "/"); name = name.replace("$", "."); consulo.internal.dotnet.asm.mbel.ModuleParser moduleParser = new consulo.internal.dotnet.asm.mbel.ModuleParser(new java.io.File(("testData/" + name))); ...
public static void main(java.lang.String[] args) { java.util.List<java.lang.Integer> list = new java.util.ArrayList<java.lang.Integer>(); list.addAll(java.util.Arrays.asList(5, 5, 3, 5, 3, 8, 5, 6, 5, 7, 3, 1)); java.lang.System.out.println(MajorityElements.findElement(list, 3)); }
public static void main(java.lang.String[] args) { java.util.List<java.lang.Integer> list = new java.util.ArrayList<java.lang.Integer>(); list.addAll(java.util.Arrays.asList(0, 0, 1, 7, 1, 1)); java.lang.System.out.println(MajorityElements.findElement(list, 3)); }
public static double std(org.dynami.core.data.Series series) { double avg = org.dynami.core.utils.StatUtils.avg(series); double sum = 0; for (java.lang.Double d : series) { sum += java.lang.Math.pow((d - avg), 2); } return java.lang.Math.sqrt(((sum / (series.size())) - 1)); }
public static double std(org.dynami.core.data.Series series) { double avg = org.dynami.core.utils.StatUtils.avg(series); double sum = 0; for (double d : series) { sum += java.lang.Math.pow((d - avg), 2); } return java.lang.Math.sqrt((sum / ((series.size()) - 1.0))); }
protected static void setOmHome() { java.lang.String webappsDir = java.lang.System.getProperty("om.home", "."); org.apache.openmeetings.util.OmFileHelper.setOmHome(webappsDir); if ((!(org.apache.openmeetings.util.OmFileHelper.getOmHome().exists())) || (!(org.apache.openmeetings.util.OmFileHelper.getOmHome()...
public static void setOmHome() { java.lang.String webappsDir = java.lang.System.getProperty("om.home", "."); org.apache.openmeetings.util.OmFileHelper.setOmHome(webappsDir); if ((!(org.apache.openmeetings.util.OmFileHelper.getOmHome().exists())) || (!(org.apache.openmeetings.util.OmFileHelper.getOmHome().is...
private java.lang.String toBinaryString(int number) { java.lang.String temp = java.lang.Integer.toHexString(number); int length = temp.length(); for (int i = 0; i < (4 - length); i++) temp += "0" + temp; return temp; }
private java.lang.String toBinaryString(int number) { java.lang.StringBuilder temp = new java.lang.StringBuilder(java.lang.Integer.toHexString(number)); int length = temp.length(); for (int i = 0; i < (4 - length); i++) temp.append("0").append(temp); return temp.toString(); }
public int compareTo(@com.sun.istack.internal.NotNull java.lang.Object other) { ch.redmonkeyass.zombieInvasion.worldmap.Node o = ((ch.redmonkeyass.zombieInvasion.worldmap.Node) (other)); float f = (heuristic) + (cost); float of = (o.heuristic) + (o.cost); if (f < of) { return -1; }else ...
public int compareTo(ch.redmonkeyass.zombieInvasion.worldmap.Node other) { ch.redmonkeyass.zombieInvasion.worldmap.Node o = ((ch.redmonkeyass.zombieInvasion.worldmap.Node) (other)); float f = (heuristic) + (cost); float of = (o.heuristic) + (o.cost); if (f < of) { return -1; }else if...
public void setActive() { isActive = true; saveService.saveDataValue(SaveEnum.CONTEXT, context); if (((type) == (com.majalis.scenes.EndScene.Type.ENCOUNTER_OVER)) || ((type) == (com.majalis.scenes.EndScene.Type.GAME_OVER))) { saveService.saveDataValue(SaveEnum.RETURN_CONTEXT, null); } saveSe...
public void setActive() { isActive = true; saveService.saveDataValue(SaveEnum.CONTEXT, context); if (((type) == (com.majalis.scenes.EndScene.Type.ENCOUNTER_OVER)) || ((type) == (com.majalis.scenes.EndScene.Type.GAME_OVER))) { saveService.saveDataValue(SaveEnum.RETURN_CONTEXT, null); } saveSe...
public void setTime(int t) { if (((startTime) <= t) && (t <= (endTime))) { java.lang.System.out.println(("end time internal - " + (endTime))); hideContextPopups(); time.set(t); }else if (t < (startTime)) time.set(startTime); else if (t > (endTime))...
public void setTime(int t) { if (((startTime) <= t) && (t <= (endTime))) { hideContextPopups(); time.set(t); }else if (t < (startTime)) time.set(startTime); else if (t > (endTime)) time.set(endTime); }
public static <T> void serialize(T object, java.lang.Class<T> sourceClass, java.io.OutputStream resultStream, java.lang.String schemaLocation) throws javax.xml.bind.JAXBException { javax.xml.bind.JAXBContext jaxbContext = javax.xml.bind.JAXBContext.newInstance(sourceClass); javax.xml.bind.Marshaller jaxbMarshal...
public static <T> void serialize(T object, java.io.OutputStream resultStream, java.lang.String schemaLocation) throws javax.xml.bind.JAXBException { javax.xml.bind.JAXBContext jaxbContext = javax.xml.bind.JAXBContext.newInstance(object.getClass()); javax.xml.bind.Marshaller jaxbMarshaller = jaxbContext.createMa...
public void run() { if (!(args.isNull(0))) { java.lang.String inputMode_s = args.get(0); int inputMode_i = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING; if (inputMode.equals("pan")) { inputMode_i = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN; }else ...
public void run() { int inputMode_i = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING; if (inputMode_s.equals("pan")) { inputMode_i = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN; }else if (inputMode_s.equals("resize")) { inputMode_i = WindowManager.LayoutParams.SOFT_INP...
private void createChannel() { if ((channel) == null) { channel = servletRequestContext.getExchange().getResponseChannel(); channel.getWriteSetter().set(internalListener); if ((internalListener) != null) { channel.resumeWrites(); } } }
private void createChannel() { if ((channel) == null) { channel = servletRequestContext.getExchange().getResponseChannel(); if ((internalListener) != null) { channel.getWriteSetter().set(internalListener); } } }
private void addRow(int row, int numInRow) { int idxInRow = 0; int startVertex = row * numInRow; int currVertex = startVertex; while (idxInRow < numInRow) { addFace(currVertex, (currVertex + 1), ((currVertex + numInRow) + 1), (currVertex + numInRow)); currVertex++; idxInRow++; ...
private void addRow(int row, int numInRow) { int idxInRow = 0; int startVertex = (row * numInRow) + 1; int currVertex = startVertex; while (idxInRow < (numInRow - 1)) { addFace(currVertex, (currVertex + 1), (currVertex + numInRow)); addFace((currVertex + 1), ((currVertex + numInRow) + 1)...
protected <T> T createObjectForClass(java.lang.Class<T> aClass, java.util.Map<java.lang.Class<?>, java.lang.Object> valueMap) throws com.robertsmieja.test.utils.junit.exceptions.ObjectFactoryException { T object; object = com.robertsmieja.test.utils.junit.Internal.createObjectFromDefaultConstructor(aClass); ...
protected <T> T createObjectForClass(java.lang.Class<T> aClass, java.util.Map<java.lang.Class<?>, java.lang.Object> valueMap) throws com.robertsmieja.test.utils.junit.exceptions.ObjectFactoryException { T object = com.robertsmieja.test.utils.junit.Internal.createObjectFromDefaultConstructor(aClass); java.util.L...
public boolean delete(com.hazelcast.nio.serialization.Data key) { checkIfLoaded(); final long now = getNow(); final com.hazelcast.map.impl.record.Record record = getRecordOrNull(key, now, false); if (record == null) { removeIndex(record); mapDataStore.remove(key, now); }else { ...
public boolean delete(com.hazelcast.nio.serialization.Data key) { checkIfLoaded(); final long now = getNow(); final com.hazelcast.map.impl.record.Record record = getRecordOrNull(key, now, false); if (record == null) { mapDataStore.remove(key, now); }else { return (removeRecord(key, r...
private void startTerminal(int sequence, java.lang.String terminalHandle, java.lang.String caption, java.lang.String title, boolean hasChildProcs, int cols, int rows, int shellType) { org.rstudio.studio.client.workbench.views.terminal.TerminalSession newSession = new org.rstudio.studio.client.workbench.views.termin...
private void startTerminal(int sequence, java.lang.String terminalHandle, java.lang.String caption, java.lang.String title, boolean hasChildProcs, int cols, int rows, int shellType) { org.rstudio.studio.client.workbench.views.terminal.TerminalSession newSession = new org.rstudio.studio.client.workbench.views.termin...
public static boolean CheckGetFileName() { netlife.datamodels.Commands com = new netlife.datamodels.Commands("ADD", "bilder/2012/1.jpg", ""); netlife.datamodels.Commands com2 = new netlife.datamodels.Commands("DEL", "bilder/2012/1.jpg/", ""); java.lang.String test = netlife.Logic.getFileName(com); java....
public static boolean CheckGetFileName() { netlife.datamodels.Commands com = new netlife.datamodels.Commands("ADD", "bilder/2012/1.jpg", ""); netlife.datamodels.Commands com2 = new netlife.datamodels.Commands("DEL", "bilder/2012/1.jpg/", ""); java.lang.String test = netlife.Logic.getFileName(com); java....
private void runChildren(final org.junit.runner.notification.RunNotifier notifier, java.util.Collection<T> filteredChildren) { final org.junit.runners.model.RunnerScheduler scheduler = fScheduler; try { for (final T each : getFilteredChildren()) { scheduler.schedule(new java.lang.Runnable() ...
private void runChildren(final org.junit.runner.notification.RunNotifier notifier, java.util.Collection<T> filteredChildren) { final org.junit.runners.model.RunnerScheduler scheduler = fScheduler; try { for (final T each : filteredChildren) { scheduler.schedule(new java.lang.Runnable() { ...
public void setStartDate(java.util.Optional<java.util.List<java.util.Date>> startDate) { try { java.util.List<java.util.Date> dateList = startDate.get(); if ((dateList.size()) == 2) { this.startDate = java.util.Optional.of(startDate.get().get(0)); }else { this.startDa...
public void setStartDate(java.util.Optional<java.util.List<java.util.Date>> startDate) { try { java.util.List<java.util.Date> dateList = startDate.get(); if ((dateList.size()) == 2) { this.startDate = java.util.Optional.of(startDate.get().get(0)); }else { throw new ja...
public void addLast(Item item) { if (this.checkNull(item)) throw new java.util.NoSuchElementException(); if ((tail) == null) { tail = new Deque.Node(); tail.item = item; head = tail; }else { tail.prev = new Deque.Node(); tail.prev.next = tail; tai...
public void addLast(Item item) { if (this.checkNull(item)) throw new java.lang.NullPointerException(); if ((tail) == null) { tail = new Deque.Node(); tail.item = item; head = tail; }else { tail.prev = new Deque.Node(); tail.prev.next = tail; tail ...
private void reDrawGestureView() { dist = 0; android.util.Log.i("Action", "RESET GESTURE"); setContentView(R.layout.test_gesture); resetButton = ((android.widget.Button) (findViewById(R.id.gesture_test_button))); resetButton.setOnClickListener(new android.view.View.OnClickListener() { @java....
private void reDrawGestureView() { dist = 0; android.util.Log.i("Action", "RESET GESTURE"); setContentView(R.layout.test_gesture); resetButton.setOnClickListener(new android.view.View.OnClickListener() { @java.lang.Override public void onClick(android.view.View view) { reDraw...
private void saveToModel() { if ((prefs) == null) return ; prefs.setUseDefaultCommand(b_cmdFromPath.getSelection()); java.lang.String command = t_cmd.getText().trim(); prefs.setCommand(command); final org.eclipse.jface.viewers.IStructuredSelection sel = ((org.eclipse.jface.viewers.IStru...
private void saveToModel() { prefs.setUseDefaultCommand(b_cmdFromPath.getSelection()); java.lang.String command = t_cmd.getText().trim(); prefs.setCommand(command); final org.eclipse.jface.viewers.IStructuredSelection sel = ((org.eclipse.jface.viewers.IStructuredSelection) (c_generator.getSelection()));...
public void run() { tvAddress.setText(address); etPaymentId.setEnabled(true); etAmount.setEnabled(true); bPaymentId.setEnabled(true); bGenerate.setEnabled(true); hideProgress(); generateQr(); }
private void show(java.lang.String address) { tvAddress.setText(address); etPaymentId.setEnabled(true); etAmount.setEnabled(true); bPaymentId.setEnabled(true); bGenerate.setEnabled(true); hideProgress(); generateQr(); }
private void sendOnOpenMessage(io.netty.channel.ChannelHandlerContext ctx, boolean isSecured, java.lang.String uri) throws java.net.URISyntaxException { cMsg = new org.wso2.carbon.messaging.StatusCarbonMessage(org.wso2.carbon.transport.http.netty.common.Constants.STATUS_OPEN, 0, null); javax.websocket.Session s...
private void sendOnOpenMessage(io.netty.channel.ChannelHandlerContext ctx, boolean isSecured, java.lang.String uri) throws java.net.URISyntaxException { cMsg = new org.wso2.carbon.messaging.StatusCarbonMessage(org.wso2.carbon.transport.http.netty.common.Constants.STATUS_OPEN, 0, null); setupCarbonMessage(ctx); ...
private java.lang.String findHalfHourAfter(int hours, int minutes) { java.lang.String halfHourAfter = ""; minutes += 30; if (minutes > 60) { hours++; minutes -= 60; } halfHourAfter = formatTime(halfHourAfter, hours, minutes); return halfHourAfter += minutes; }
private java.lang.String findHalfHourAfter(int hours, int minutes) { java.lang.String halfHourAfter = ""; minutes += 30; if (minutes >= 60) { hours++; minutes -= 60; } halfHourAfter = formatTime(halfHourAfter, hours, minutes); return halfHourAfter += minutes; }
protected void updateFromNameChange(java.lang.String newHeroName) { mName = newHeroName; java.lang.String imageName = mParentPresenter.getHeroImageName(newHeroName); for (int i = 0; i < (mSimilarityList.size()); i++) { if (mSimilarityList.get(i).equals(imageName)) { mView.setHeroInRecycl...
protected void updateFromNameChange(java.lang.String newHeroName) { if (mName.equals(newHeroName)) return ; mName = newHeroName; java.lang.String imageName = mParentPresenter.getHeroImageName(newHeroName); for (int i = 0; i < (mSimilarityList.size()); i++) { if (mSimilarityList.get(...
public void onClick(android.view.View view) { android.content.Intent intent1 = new android.content.Intent(activity, ir.rasen.charsoo.view.activity.business.ActivityBusinessFollowers.class); intent1.putExtra(Params.BUSINESS_ID_STRING, business.id); intent1.putExtra(Params.USER_ID_INT, ir.rasen.charsoo.contro...
public void onClick(android.view.View view) { android.content.Intent intent1 = new android.content.Intent(activity, ir.rasen.charsoo.view.activity.business.ActivityBusinessFollowers.class); intent1.putExtra(Params.BUSINESS_ID_STRING, business.id); intent1.putExtra(Params.USER_ID_INT, ir.rasen.charsoo.contro...
private static double getPassangerDiscount(ooptraining.Passanger p) { double discount = 1.0; if ((p.getMiles()) > (ooptraining.DiscountCalculator.SILVER_LIMIT)) { discount = ooptraining.DiscountCalculator.SILVER_DISCOUNT; }else if ((p.getMiles()) > (ooptraining.DiscountCalculator.GOLD_LIMIT)...
private static double getPassangerDiscount(ooptraining.Passanger p) { double discount = 1.0; if ((p.getMiles()) > (ooptraining.DiscountCalculator.GOLD_LIMIT)) { discount = ooptraining.DiscountCalculator.GOLD_DISCOUNT; }else if ((p.getMiles()) > (ooptraining.DiscountCalculator.SILVER_LIMIT)) ...
public learntest.core.gentest.GentestResult gentestAndCompile(java.util.List<double[]> solutions, java.util.List<sav.strategies.dto.execute.value.ExecVar> vars, learntest.core.gentest.GentestParams params) throws sav.common.core.SavException { learntest.core.LearningMediator.log.debug("gentest.."); learntest.co...
public learntest.core.gentest.GentestResult gentestAndCompile(java.util.List<double[]> solutions, java.util.List<sav.strategies.dto.execute.value.ExecVar> vars, learntest.core.gentest.GentestParams params) throws sav.common.core.SavException { learntest.core.LearningMediator.log.debug("gentest.."); learntest.co...
public void handle(javafx.event.ActionEvent event) { javafx.scene.control.CheckBox cb = ((javafx.scene.control.CheckBox) (event.getSource())); javafx.scene.control.TableColumn column = ((javafx.scene.control.TableColumn) (cb.getUserData())); if (cb.isSelected()) { for (application.ResultTable result...
public void handle(javafx.event.ActionEvent event) { javafx.scene.control.CheckBox cb = ((javafx.scene.control.CheckBox) (event.getSource())); if (cb.isSelected()) { for (application.ResultTable resultTableRow : resultTable.getItems()) { resultTableRow.setTrace(true); } }else { ...
private void createNextRound() { java.lang.System.out.println("create next round"); java.lang.System.out.println(("current grid num is " + (currentGridNum))); if ((currentGridNum) >= (beetle_kit.EstimationGame.MAX_NUM_ROUNDS)) { javax.swing.JPanel panel = createEndGamePanel(); javax.swing.JO...
private void createNextRound() { if ((currentGridNum) >= (beetle_kit.EstimationGame.MAX_NUM_ROUNDS)) { javax.swing.JPanel panel = createEndGamePanel(); javax.swing.JOptionPane.showOptionDialog(this, panel, "Congratulations!!!", javax.swing.JOptionPane.DEFAULT_OPTION, javax.swing.JOptionPane.PLAIN_ME...
double heuristics(dstarlite.State a, dstarlite.State b) { double temp; double min = java.lang.Math.abs(((a.getX()) - (b.getX()))); double max = java.lang.Math.abs(((a.getY()) - (a.getY()))); if (min > max) { temp = min; min = max; max = temp; } return (((m_sqrt2) - 1.0) *...
double heuristics(dstarlite.State a, dstarlite.State b) { double temp; double min = java.lang.Math.abs(((a.getX()) - (b.getX()))); double max = java.lang.Math.abs(((a.getY()) - (b.getY()))); if (min > max) { temp = min; min = max; max = temp; } return (((m_sqrt2) - 1.0) *...
private com.bagri.core.system.Collection getTypedCollection(com.bagri.core.system.Schema schema, java.lang.String typePath) { for (com.bagri.core.system.Collection collect : schema.getCollections()) { java.lang.String cPath = collect.getDocumentType(); if ((cPath != null) && (typePath.equals(cPath))...
private java.util.Collection getTypedCollection(com.bagri.core.system.Schema schema, java.lang.String typePath) { for (java.util.Collection collect : schema.getCollections()) { java.lang.String cPath = collect.getDocumentType(); if ((cPath != null) && (typePath.equals(cPath))) { return c...
@Test void getPastReviewers() { java.util.Date submissionDeadline = new java.util.Date(); java.util.Date reviewDeadline = new java.util.Date(); Conference tester = new Conference(submissionDeadline, reviewDeadline, new ArrayList<Reviewer>()); assertEquals(tester.getPastReviewers(), new ArrayList<Reviewe...
@Test void getPastReviewers() { java.util.Date submissionDeadline = java.util.Calendar.getTime(); java.util.Date reviewDeadline = java.util.Calendar.getTime(); Conference tester = new Conference(submissionDeadline, reviewDeadline, new ArrayList<Reviewer>()); assertEquals(tester.getPastReviewers(), new A...
public void create() { ru.spbau.kaysin.ants.Ants.generator = new com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator(Gdx.files.internal("FONTS/visitor1.ttf")); ru.spbau.kaysin.ants.Ants.assets.load("pack.txt", com.badlogic.gdx.graphics.g2d.TextureAtlas.class); ru.spbau.kaysin.ants.Ants.assets.load(...
public void create() { ru.spbau.kaysin.ants.Ants.generator = new com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator(Gdx.files.internal("FONTS/visitor1.ttf")); ru.spbau.kaysin.ants.Ants.assets.load("pack.txt", com.badlogic.gdx.graphics.g2d.TextureAtlas.class); ru.spbau.kaysin.ants.Ants.assets.load(...
public void deregister() throws java.io.IOException { if ((listen) == null) { java.lang.System.out.println("Register first!"); return ; } java.net.Socket sock = createSocket(); if (!(sendAndReceive(("deregister " + (id))))); { java.lang.System.out.println("Deregister failed, ...
public void deregister() throws java.io.IOException { if ((listen) == null) { java.lang.System.out.println("Register first!"); return ; } java.net.Socket sock = createSocket(); if (!(sendAndReceive(("deregister " + (id))))) { java.lang.System.out.println("Deregister failed, try a...
public void gameOver() { java.lang.String playername = ((java.lang.String) (javax.swing.JOptionPane.showInputDialog(null, ((("Your score: " + (_panel.gameModel().step())) + "\n") + "Enter your name:\n"), "Game Over", javax.swing.JOptionPane.PLAIN_MESSAGE, null, null, "new player"))); _scoreBoard.put(_panel.game...
public void gameOver() { java.lang.String playername = ((java.lang.String) (javax.swing.JOptionPane.showInputDialog(null, ((("Your score: " + (_panel.gameModel().step())) + "\n") + "Enter your name:\n"), "Game Over", javax.swing.JOptionPane.PLAIN_MESSAGE, null, null, "new player"))); if (playername != null) ...
private com.sonnytron.sortatech.pantryprep.Database.IngredientsCursorWrapper queryTopFiveIngredients(java.lang.String whereClause, java.lang.String[] whereArgs) { android.database.sqlite.SQLiteQueryBuilder qb = new android.database.sqlite.SQLiteQueryBuilder(); java.lang.String[] subQueries = new java.lang.Strin...
private com.sonnytron.sortatech.pantryprep.Database.IngredientsCursorWrapper queryTopFiveIngredients(java.lang.String whereClause, java.lang.String[] whereArgs) { android.database.sqlite.SQLiteQueryBuilder qb = new android.database.sqlite.SQLiteQueryBuilder(); java.lang.String[] subQueries = new java.lang.Strin...
public static com.ldf.calendar.model.CalendarDate fromDate(java.util.Date date) { java.util.Calendar cal = java.util.Calendar.getInstance(); cal.setTime(date); com.ldf.calendar.model.CalendarDate calendarDate = new com.ldf.calendar.model.CalendarDate(); calendarDate.year = cal.get(java.util.Calendar.YEA...
public static com.ldf.calendar.model.CalendarDate fromDate(java.util.Date date) { java.util.Calendar cal = java.util.Calendar.getInstance(); cal.setTime(date); com.ldf.calendar.model.CalendarDate calendarDate = new com.ldf.calendar.model.CalendarDate(); calendarDate.year = cal.get(java.util.Calendar.YEA...
protected javax.portlet.PortletPreferences updateImportPortletPreferences(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext, javax.portlet.PortletPreferences portletPreferences) throws java.lang.Exception { long organizationId = com.liferay.portal.kernel.util.GetterUtil.getLong(portletPrefer...
protected javax.portlet.PortletPreferences updateImportPortletPreferences(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext, javax.portlet.PortletPreferences portletPreferences) throws java.lang.Exception { com.liferay.portal.kernel.model.Company company = _companyLocalService.getCompanyById...
private java.util.List<com.kasirgalabs.etumulator.linker.Data> resolveData() { java.util.List<com.kasirgalabs.etumulator.linker.Data> resolvedData = new java.util.ArrayList<>(); for (com.kasirgalabs.etumulator.linker.Data data : targetData) { if (definedData.contains(data)) { com.kasirgalabs...
private java.util.List<com.kasirgalabs.etumulator.linker.Data> resolveData() { java.util.List<com.kasirgalabs.etumulator.linker.Data> resolvedData = new java.util.ArrayList<>(); for (com.kasirgalabs.etumulator.linker.Data data : targetData) { if (definedData.contains(data)) { com.kasirgalabs...
public void addItem(item.Item i) { item.Item item = i.clone(); if (i.isStackable) { int loc = findShopItemLoc(i); if (loc >= 0) { items.get(loc).count += i.count; }else { items.add(item); } }else { items.add(item); } }
public void addItem(item.Item i, int count) { item.Item item = i.clone(); if (count != (-1)) { item.count = count; } if (i.isStackable) { int loc = findShopItemLoc(i); if (loc >= 0) { items.get(loc).count += item.count; }else { items.add(item); ...
public java.lang.String returnDiagnose(@javax.ws.rs.QueryParam(value = "session") java.lang.String session, @javax.ws.rs.QueryParam(value = "patientId") java.lang.String patientId) { java.lang.String medications = "false"; try { connector = eu.neq.mais.connector.ConnectorFactory.getConnector(eu.neq.mais...
public java.lang.String returnDiagnose(@javax.ws.rs.QueryParam(value = "session") java.lang.String session, @javax.ws.rs.QueryParam(value = "patientId") java.lang.String patientId) { java.lang.String medications = "false"; try { connector = eu.neq.mais.connector.ConnectorFactory.getConnector(eu.neq.mais...
public int getTotalBalance() { int totalBalance = 0; for (Reservation reservation : this.reservations) { if ((reservation.getRoomType()) == "L") { totalBalance = +200; } if ((reservation.getRoomType()) == "E") { totalBalance = +80; } } return total...
public int getTotalBalance() { int totalBalance = 0; for (Reservation reservation : this.reservations) { if ((reservation.getRoomType()) == "L") { totalBalance += 200; } if ((reservation.getRoomType()) == "E") { totalBalance += 80; } } return total...
public void onDisable() { super.onDisable(); for (org.bukkit.entity.Player player : getServer().getOnlinePlayers()) { com.pgcraft.spectatorplus.spectators.Spectator spectator = getPlayerData(player); if (spectator.isSpectating()) { spectator.setSpectating(false, true); sp...
public void onDisable() { for (org.bukkit.entity.Player player : getServer().getOnlinePlayers()) { com.pgcraft.spectatorplus.spectators.Spectator spectator = getPlayerData(player); if (spectator.isSpectating()) { spectator.setSpectating(false, true); spectator.saveSpectatorMo...
public void onTaskComplete(java.util.ArrayList<group3.tcss450.uw.edu.thememebible.Model.Meme> theMemeData) { dismissProgressBar(); mMemeData = theMemeData; android.os.Bundle args = new android.os.Bundle(); args.putSerializable(getString(R.string.photo_data_key), mMemeData); mPhotoFragment.setArgumen...
public void onTaskComplete(java.util.ArrayList<group3.tcss450.uw.edu.thememebible.Model.Meme> theMemeData) { dismissProgressBar(); mMemeData = theMemeData; if (!(mMemeData.isEmpty())) { android.os.Bundle args = new android.os.Bundle(); args.putSerializable(getString(R.string.photo_data_key),...
private void setValueContrained(int x) { x = x - (this.getAbsoluteLeft()); int width = sliderWidget.getOffsetWidth(); if (x < 0) { x = 0; } if (x > width) { x = width; } int componentValue = (x * (max)) / width; setValue(componentValue, true, false); sliderWidget.setP...
private void setValueContrained(int x) { x = x - (this.getAbsoluteLeft()); int width = sliderWidget.getOffsetWidth(); if (x < 0) { x = 0; } if (x > (width - 1)) { x = width - 1; } int componentValue = (x * (max)) / width; setValue(componentValue, true, false); sliderW...
public boolean shootAt(int row, int column) { int tempRow = getBowRow(); int tempColumn = getBowColumn(); if ((!(isSunk())) || (!(stworo01.EmptySea.class.isInstance(this)))) { if (this.isHorizontal()) { this.hit[(column - tempColumn)] = true; return true; }else { ...
public boolean shootAt(int row, int column) { int tempRow = getBowRow(); int tempColumn = getBowColumn(); if ((!(isSunk())) || (!(stworo01.EmptySea.class.isInstance(this)))) { if (isHorizontal()) { this.hit[(column - tempColumn)] = true; return true; }else { ...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); android.widget.Toast.makeText(getApplicationContext(), "sdfghjkl;", Toast.LENGTH_LONG).show(); android.content.Intent intent = getIntent(); username = intent.ge...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); android.content.Intent intent = getIntent(); username = intent.getStringExtra("Username"); username_TextV = ((android.widget.TextView) (findViewById(R.id.userna...
private void setZeroValues(java.lang.String values) { java.lang.String[] sr = values.split(","); for (int i = 0; i < (sr.length); i++) { int num = java.lang.Integer.MIN_VALUE; try { num = java.lang.Integer.parseInt(sr[i]); } catch (java.lang.NumberFormatException nfe) { ...
private void setZeroValues(java.lang.String values) { zeroValues = new java.util.ArrayList<java.lang.Integer>(); java.lang.String[] sr = values.split(","); for (int i = 0; i < (sr.length); i++) { int num = java.lang.Integer.MIN_VALUE; try { num = java.lang.Integer.parseInt(sr[i])...
public static void index() { controllers.Http.Cookie userLoggedInCookie = request.cookies.get("token"); if (userLoggedInCookie == null) { controllers.Application.loginForm(); } models.User user = models.User.find("byToken", userLoggedInCookie.value).first(); java.util.List<models.Audio> audi...
public static void index() { controllers.Http.Cookie userLoggedInCookie = request.cookies.get("token"); if ((userLoggedInCookie == null) || ((models.User.find("byToken", userLoggedInCookie.value).first()) == null)) { controllers.Application.loginForm(); } models.User user = models.User.find("byT...
public boolean onTouch(android.view.View view, android.view.MotionEvent event) { switch (event.getActionMasked()) { case android.view.MotionEvent.ACTION_DOWN : android.view.View.DragShadowBuilder shadowBuilder = new android.view.View.DragShadowBuilder(); view.startDrag(android.conten...
public boolean onTouch(android.view.View view, android.view.MotionEvent event) { switch (event.getActionMasked()) { case android.view.MotionEvent.ACTION_DOWN : view.startDrag(android.content.ClipData.newPlainText("", ""), new android.view.View.DragShadowBuilder(), view, 0); return tr...
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) { android.view.View rootView = inflater.inflate(R.layout.fragment_base_pager, container, false); android.widget.TextView textView = ((android.widget.TextView) (root...
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) { android.view.View rootView = inflater.inflate(R.layout.fragment_base_pager, container, false); android.widget.TextView textView = ((android.widget.TextView) (root...
private void resetBall(int scorer) { if (scorer == 10) { (score2)++; }else { (score1)++; } ballIsStopped = true; ballOffsetX = 0; ballOffsetY = 0; ballVelX = 0; ballVelY = 0; bat1Offset = 0; bat2Offset = 0; lastScorer = scorer; bounces = 0; }
private void resetBall(int scorer) { if (scorer == 1) { (score2)++; }else { (score1)++; } ballIsStopped = true; ballOffsetX = 0; ballOffsetY = 0; ballVelX = 0; ballVelY = 0; bat1Offset = 0; bat2Offset = 0; lastScorer = scorer; bounces = 0; }
private com.pushtorefresh.storio.sqlitedb.operation.put.PutResult updateOrInsert(@android.support.annotation.NonNull com.pushtorefresh.storio.sqlitedb.StorIOSQLiteDb storIOSQLiteDb, @android.support.annotation.NonNull android.content.ContentValues contentValues, @android.support.annotation.NonNull java.lang.String tabl...
private com.pushtorefresh.storio.sqlitedb.operation.put.PutResult updateOrInsert(@android.support.annotation.NonNull com.pushtorefresh.storio.sqlitedb.StorIOSQLiteDb storIOSQLiteDb, @android.support.annotation.NonNull android.content.ContentValues contentValues, @android.support.annotation.NonNull java.lang.String tabl...
private void assertAddSuccess(seedu.tasklist.testutil.TestTask personToAdd, seedu.tasklist.testutil.TestTask... currentList) { commandBox.runCommand(personToAdd.getAddCommand()); guitests.guihandles.PersonCardHandle addedCard = taskListPanel.navigateToPerson(personToAdd.getTaskDetails().taskDetails); assert...
private void assertAddSuccess(seedu.tasklist.testutil.TestTask personToAdd, seedu.tasklist.testutil.TestTask... currentList) { commandBox.runCommand(personToAdd.getAddCommand()); guitests.guihandles.PersonCardHandle addedCard = taskListPanel.navigateToPerson(personToAdd.getTaskDetails().toString()); assertM...
private void initDateAndTime(main.java.Task.Type type, java.util.ArrayList<java.time.LocalDateTime> parsedDates) { switch (type) { case TIMED : date = parsedDates.get(main.java.Task.POSITION_FIRST_DATE).toLocalDate(); startTime = parsedDates.get(main.java.Task.POSITION_FIRST_DATE).to...
private void initDateAndTime(main.java.Task.Type type, java.util.ArrayList<java.time.LocalDateTime> parsedDates) { switch (type) { case TIMED : date = parsedDates.get(main.java.Task.POSITION_FIRST_DATE).toLocalDate(); startTime = parsedDates.get(main.java.Task.POSITION_FIRST_DATE).to...
private void setupTabLayout() { tabLayout.setTabGravity(TabLayout.GRAVITY_FILL); tabLayout.addTab(tabLayout.newTab().setText(com.nsqre.insquare.Fragments.ProfileFragment.TAB_OWNED)); tabLayout.addTab(tabLayout.newTab().setText(com.nsqre.insquare.Fragments.ProfileFragment.TAB_FAVOURITE)); tabLayout.setOn...
private void setupTabLayout() { tabLayout.setTabGravity(TabLayout.GRAVITY_FILL); tabLayout.addTab(tabLayout.newTab().setText(com.nsqre.insquare.Fragments.ProfileFragment.TAB_FAVOURITE)); tabLayout.addTab(tabLayout.newTab().setText(com.nsqre.insquare.Fragments.ProfileFragment.TAB_OWNED)); tabLayout.setOn...
public void init(java.lang.String serverAddress, int serverPort, int hostPort, java.util.concurrent.BlockingQueue<java.lang.String> msgQueue) throws java.io.IOException { java.net.Socket s = new java.net.Socket(); s.bind(new java.net.InetSocketAddress(hostPort)); s.connect(new java.net.InetSocketAddress(ser...
public void init(java.lang.String serverAddress, int serverPort, int hostPort, java.util.concurrent.BlockingQueue<java.lang.String> msgQueue) throws java.io.IOException { java.net.Socket s = new java.net.Socket(); s.bind(new java.net.InetSocketAddress(hostPort)); s.connect(new java.net.InetSocketAddress(ser...
public void onDataReceived(com.jacks205.spots.model.ParkingStructure[] structures, java.util.Date lastUpdated) { if ((spotsListAdapter) == null) { spotsListAdapter = new com.jacks205.spots.adapters.SpotsListAdapter(this, structures, lastUpdated); listView.setAdapter(spotsListAdapter); }else { ...
public void onDataReceived(com.jacks205.spots.model.ParkingStructure[] structures) { if ((spotsListAdapter) == null) { spotsListAdapter = new com.jacks205.spots.adapters.SpotsListAdapter(this, structures); listView.setAdapter(spotsListAdapter); }else { spotsListAdapter.setStructures(stru...
protected java.lang.String doInBackground(java.lang.Void... params) { com.myapp.handbook.HttpConnectionUtil util = new com.myapp.handbook.HttpConnectionUtil(); java.lang.String url = (HttpConnectionUtil.URL_ENPOINT) + "/SendMessageToMultipleUser/"; org.json.JSONObject messageJson = prepareMessage(); uti...
protected java.lang.String doInBackground(java.lang.Void... params) { com.myapp.handbook.HttpConnectionUtil util = new com.myapp.handbook.HttpConnectionUtil(); java.lang.String url = (HttpConnectionUtil.URL_ENPOINT) + "/SendMessageToMultipleUser/"; org.json.JSONObject messageJson = prepareMessage(); com...
public java.lang.String eth_getCode(java.lang.String address, java.lang.String blockId) throws java.lang.Exception { org.ethereum.jsonrpc.Block block = getByJsonBlockId(blockId); byte[] addressAsByteArray = org.ethereum.jsonrpc.TypeConverter.TypeConverter.StringHexToByteArray(address); byte[] code = this.re...
public java.lang.String eth_getCode(java.lang.String address, java.lang.String blockId) throws java.lang.Exception { org.ethereum.jsonrpc.Block block = getByJsonBlockId(blockId); if (block == null) return null; byte[] addressAsByteArray = org.ethereum.jsonrpc.TypeConverter.TypeConverter.StringH...
private java.util.List<T> down(int row, int column, int length) { java.util.List<T> nodes = new java.util.ArrayList<>(); int rowCount = rowCount(); for (int position = 0; position < length; position++) { int currentRow = row + position; if (currentRow > rowCount) { break; ...
private java.util.List<T> down(int row, int column, int length) { java.util.List<T> nodes = new java.util.ArrayList<>(); int rowCount = rowCount(); for (int position = 0; position < length; position++) { int currentRow = row + position; if (currentRow >= rowCount) { break; ...
public void index_showsHomePageTest() throws java.lang.Exception { mockMvc.perform(org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get("/")).andExpect(org.springframework.test.web.servlet.result.MockMvcResultMatchers.status().isOk()).andExpect(model().attribute("tasks", tasks)).andExpect(model()...
public void index_showsHomePageTest() throws java.lang.Exception { mockMvc.perform(org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get("/")).andExpect(org.springframework.test.web.servlet.result.MockMvcResultMatchers.status().isOk()).andExpect(org.springframework.test.web.servlet.result.MockMvcR...
public com.ankurdave.part.ChildPtr find_child(byte c) { for (int i = 0; i < (this.num_children); i++) { if ((keys[i]) == (to_uint(c))) { return new com.ankurdave.part.ArrayChildPtr(children, i); } } return null; }
public com.ankurdave.part.ChildPtr find_child(byte c) { for (int i = 0; i < (this.num_children); i++) { if ((keys[i]) == c) { return new com.ankurdave.part.ArrayChildPtr(children, i); } } return null; }
public static void main(java.lang.String[] args) throws java.lang.ClassNotFoundException { java.net.ServerSocket sconn = null; java.net.Socket conn = null; antsserverdigest.gestore now; java.lang.Thread thread; int port = 3356; while (true) { try { sconn = new java.net.Server...
public static void main(java.lang.String[] args) throws java.io.IOException, java.lang.ClassNotFoundException { java.net.ServerSocket sconn = null; java.net.Socket conn = null; antsserverdigest.gestore now; java.lang.Thread thread; int port = 3356; sconn = new java.net.ServerSocket(port); wh...
public void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setRetainInstance(true); db = new com.nectar.thesun.library.NewsListDatabase(com.nectar.thesun.PageSlidingTabStripFragment.mcontext); if ((db.getNews()) != null) { com.nectar.thesun.library.MyConstan...
public void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setRetainInstance(true); if ((com.nectar.thesun.library.MyConstants.homenews) == null) { com.nectar.thesun.library.MyConstants.homenews = new java.util.ArrayList<>(); } if (!(com.nectar.thesun.Pa...
public java.util.Collection getAllSubTasks(java.lang.String taskId) { if ((taskId == null) || ((taskId.length()) == 0)) { return getAllRootTasks(); }else { net.sf.memoranda.Task task = getTaskElement(taskId); if (task == null) { return new java.util.Vector(); } ...
public java.util.Collection<net.sf.memoranda.Task> getAllSubTasks(java.lang.String taskId) { if ((taskId == null) || ((taskId.length()) == 0)) { return getAllRootTasks(); }else { net.sf.memoranda.Task task = getTaskElement(taskId); return task.getSubTasks(); } }
public java.lang.String getOwnerFullName() { com.softserve.edu.entity.verification.ClientData ownerData = getVerification().getClientData(); java.lang.String fullName = ((((ownerData.getLastName()) + " ") + (ownerData.getFirstName())) + " ") + (ownerData.getMiddleName()); return fullName; }
public java.lang.String getOwnerFullName() { com.softserve.edu.entity.verification.ClientData ownerData = getVerification().getClientData(); return ((((ownerData.getLastName()) + " ") + (ownerData.getFirstName())) + " ") + (ownerData.getMiddleName()); }
private int columnHeight(int column) { int r = 0; for (; (r < (this.height)) && ((this.grid[column][r].isEmpty()) || (this.grid[column][r].isShape())); r++); return ((this.height) - r) - 1; }
private int columnHeight(int column) { int r = 0; for (; (r < (this.height)) && ((this.grid[column][r].isEmpty()) || (this.grid[column][r].isShape())); r++); return (this.height) - r; }
static void askToSave() { java.lang.String[] options = new java.lang.String[]{ "Yes" , "No" , "Cancel" }; int n = javax.swing.JOptionPane.showOptionDialog(EssayWriter.frame, "Would you like to save before you exit?", "Save?", javax.swing.JOptionPane.YES_NO_CANCEL_OPTION, javax.swing.JOptionPane.QUESTION_MESSAGE...
static void askToSave() { java.lang.String[] options = new java.lang.String[]{ "Yes" , "No" , "Cancel" }; int n = javax.swing.JOptionPane.showOptionDialog(EssayWriter.frame, "Would you like to save before you exit?", "Save?", javax.swing.JOptionPane.YES_NO_CANCEL_OPTION, javax.swing.JOptionPane.QUESTION_MESSAGE...
private void insertToClassifiableTextsCharacteristicsTable(java.sql.Connection con, int classifiableTextId, com.irvil.textclassifier.model.Characteristic characteristic, com.irvil.textclassifier.model.CharacteristicValue characteristicValue) throws java.sql.SQLException { java.lang.String sqlInsert = "INSERT INTO C...
private void insertToClassifiableTextsCharacteristicsTable(java.sql.Connection con, int classifiableTextId, com.irvil.textclassifier.model.Characteristic characteristic, com.irvil.textclassifier.model.CharacteristicValue characteristicValue) throws java.sql.SQLException { java.lang.String sqlInsert = "INSERT INTO C...
public void surfaceCreated(android.view.SurfaceHolder holder) { this.grid = new com.example.jacek.streamthegame.Grid(this.getContext(), this.nRows, this.nCols, ((getWidth()) / (this.nRows)), ((getHeight()) / (this.nCols))); this.grid.tryAddObject(Sprite.short_pipe, 2, 1); this.thread.setRunning(true); t...
public void surfaceCreated(android.view.SurfaceHolder holder) { this.grid = new com.example.jacek.streamthegame.Grid(this.getContext(), this.nRows, this.nCols, ((getWidth()) / (this.nCols)), ((getHeight()) / (this.nRows))); this.grid.tryAddObject(Sprite.short_pipe, 2, 1); this.thread.setRunning(true); t...
public void onFragmentInteraction(int requestCode, int resultCode, java.lang.Object... objects) { switch (requestCode) { case com.joss.jrow.TrainingEnvironment.TrainingActivity.SAVE_REQUEST_CODE : if (resultCode == (RESULT_OK)) { com.joss.jrow.Models.Training.getTraining().save((...
public void onFragmentInteraction(int requestCode, int resultCode, java.lang.Object... objects) { switch (requestCode) { case com.joss.jrow.TrainingEnvironment.TrainingActivity.SAVE_REQUEST_CODE : if (resultCode == (RESULT_OK)) { com.joss.jrow.Models.Training.getTraining().save((...
private void check(com.gargoylesoftware.htmlunit.WebClient wc, com.gargoylesoftware.htmlunit.HttpMethod m) throws java.io.IOException { com.gargoylesoftware.htmlunit.TextPage p = wc.getPage(new com.gargoylesoftware.htmlunit.WebRequestSettings(new java.net.URL(url, "verbMatch/"), m)); assertEquals((("Got " + (m....
private void check(com.gargoylesoftware.htmlunit.WebClient wc, com.gargoylesoftware.htmlunit.HttpMethod m) throws java.io.IOException { com.gargoylesoftware.htmlunit.TextPage p = wc.getPage(new com.gargoylesoftware.htmlunit.WebRequestSettings(new java.net.URL(url, "verbMatch/"), m)); assertEquals(("Got " + (m.n...
public void onClick(org.bukkit.event.inventory.InventoryClickEvent event) { org.bukkit.entity.Player player = ((org.bukkit.entity.Player) (event.getWhoClicked())); if (player != null) { player.performCommand(("vote reward " + (voteSite.getSiteName()))); player.closeInventory(); } }
public void onClick(org.bukkit.event.inventory.InventoryClickEvent event) { org.bukkit.entity.Player player = ((org.bukkit.entity.Player) (event.getWhoClicked())); if (player != null) { player.closeInventory(); player.performCommand(("vote reward " + (voteSite.getSiteName()))); } }
public int hashCode() { int result = getDateFrom().hashCode(); result = (31 * result) + (getUser().hashCode()); result = (31 * result) + (getBookInstance().hashCode()); return result; }
public int hashCode() { int result = ((getDateFrom()) != null) ? getDateFrom().hashCode() : 0; result = (31 * result) + ((getUser()) != null ? getUser().hashCode() : 0); result = (31 * result) + ((getBookInstance()) != null ? getBookInstance().hashCode() : 0); return result; }
public synchronized java.lang.String getSpeed(long size) { long t2 = java.lang.System.currentTimeMillis(); long t = t2 - (t1); t1 = t2; if (t == 0) return "MAX"; sum += size; return java.lang.String.format("%,dKB/s avg. %,dKB/s, sum=%,dbytes", (size / t), ((sum) / (t2 - (t0))), sum)...
public java.lang.String getSpeed(long size) { synchronized(this) { sum += size; } long t2 = java.lang.System.currentTimeMillis(); long t = t2 - (t1); t1 = t2; if (t == 0) return "MAX"; return java.lang.String.format("%,dKB/s avg. %,dKB/s, sum=%,dbytes", (size / t), ((sum...
public void onComplete() { for (reactor.core.publisher.FluxGroupBy.UnicastGroupedFlux<K, V> g : groupMap.values()) { g.onComplete(); } groupMap.clear(); reactor.core.publisher.FluxGroupBy.GroupByMain.GROUP_COUNT.decrementAndGet(this); done = true; drain(); }
public void onComplete() { if (done) { return ; } for (reactor.core.publisher.FluxGroupBy.UnicastGroupedFlux<K, V> g : groupMap.values()) { g.onComplete(); } groupMap.clear(); reactor.core.publisher.FluxGroupBy.GroupByMain.GROUP_COUNT.decrementAndGet(this); done = true; d...
public de.hshannover.f4.trust.visitmeta.gui.util.RestConnection copy() { de.hshannover.f4.trust.visitmeta.gui.util.RestConnection tmp = new de.hshannover.f4.trust.visitmeta.gui.util.RestConnection(getDataserviceConnection(), getConnectionName()); tmp.setUrl(getUrl()); tmp.setUsername(getUsername()); tmp...
public de.hshannover.f4.trust.visitmeta.gui.util.RestConnection copy() { de.hshannover.f4.trust.visitmeta.gui.util.RestConnection tmp = new de.hshannover.f4.trust.visitmeta.gui.util.RestConnection(getDataserviceConnection(), getName()); tmp.setUrl(getUrl()); tmp.setUsername(getUsername()); tmp.setPasswo...
long id = time * (TcpReplicator.TIMESTAMP_FACTOR); for (; ;) { long old = transactionID.get(); if (old >= id) id = old + 1; if (transactionID.compareAndSet(old, id)) break; } return id; }
long id = time; for (; ;) { long old = transactionID.get(); if (old >= id) id = old + 1; if (transactionID.compareAndSet(old, id)) break; } return id; }
public void addRow(ar.edu.ungs.business.dto.AutorizacionPracticaDTO item) { getElementos().add(item); java.lang.Object[] vector = new java.lang.Object[3]; vector[0] = item.getPractica().getCodigo(); vector[1] = item.getPractica().getNombre(); vector[2] = item.getCantidadSesiones(); super.addRow(...
public void addRow(ar.edu.ungs.business.dto.AutorizacionPracticaDTO item) { getElementos().add(item); java.lang.Object[] vector = new java.lang.Object[2]; vector[0] = item.getPractica().getCodigo(); vector[1] = item.getPractica().getNombre(); super.addRow(vector); }
public void forward(org.xbill.DNS.Message message, com.ahuazhu.soy.modal.ResponseContext response) throws java.io.IOException { org.xbill.DNS.Message answer = cache.getValue(new com.ahuazhu.soy.modal.QuestionKey(message)); if (answer != null) { send(message, response); return ; } if (for...
public void forward(org.xbill.DNS.Message message, com.ahuazhu.soy.modal.ResponseContext response) throws java.io.IOException { org.xbill.DNS.Message answer = cache.getValue(new com.ahuazhu.soy.modal.QuestionKey(message)); if (answer != null) { send(answer, response); return ; } if (forw...
private void downloadFile(java.io.File posterFile, java.lang.String url) { try { java.net.URL posterUrl = new java.net.URL(url); java.nio.channels.ReadableByteChannel rbc = java.nio.channels.Channels.newChannel(posterUrl.openStream()); java.io.FileOutputStream fos = new java.io.FileOutputStr...
private void downloadFile(java.io.File posterFile, java.lang.String url) { try { java.net.URL posterUrl = new java.net.URL(url); java.nio.channels.ReadableByteChannel rbc = java.nio.channels.Channels.newChannel(posterUrl.openStream()); java.io.FileOutputStream fos = new java.io.FileOutputStr...
public MapPosition getPosition(DIR direction) { switch (direction) { case NORTH : return new MapPosition(x, ((y)--)); case SOUTH : return new MapPosition(x, ((y)++)); case EAST : return new MapPosition(((x)++), y); case WEST : return ne...
public MapPosition getPosition(DIR direction) { switch (direction) { case NORTH : return new MapPosition(x, ((y) - 1)); case SOUTH : return new MapPosition(x, ((y) + 1)); case EAST : return new MapPosition(((x) + 1), y); case WEST : ret...
public static void main(java.lang.String[] args) { javax.swing.JFrame frame = new javax.swing.JFrame(); graphics.Screen screen = new graphics.Screen("Bob", true, true); frame.add(screen); frame.setUndecorated(true); frame.setSize(graphics.GameEngine.screenSize); frame.setVisible(true); frame...
public static void main(java.lang.String[] args) { javax.swing.JFrame frame = new javax.swing.JFrame(); graphics.Screen screen = new graphics.Screen("Bob", true); frame.add(screen); frame.setUndecorated(true); frame.setSize(graphics.GameEngine.screenSize); frame.setVisible(true); frame.setDe...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_tictactoe); android.support.v7.widget.Toolbar toolbar = ((android.support.v7.widget.Toolbar) (findViewById(R.id.toolbar))); setSupportActionBar(toolbar); getSupportAct...
protected void onCreate(final android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_tictactoe); android.support.v7.widget.Toolbar toolbar = ((android.support.v7.widget.Toolbar) (findViewById(R.id.toolbar))); setSupportActionBar(toolbar); getSupp...
private void save() throws com.hummingwave.Custom.WaveORMException { com.sample.Employee employee = new com.sample.Employee(); employee.setEmpNo("027"); employee.setName("Chaitra"); { try { employee.setBytes("Chaitra".getBytes("ISO-8859-15")); } catch (java.io.UnsupportedEnco...
private void save() throws com.hummingwave.Custom.WaveORMException { com.sample.Employee employee = new com.sample.Employee(); employee.setEmpNo("027"); employee.setName("Chaitra"); employee.setBytes("Chaitra".getBytes()); android.util.Log.d("BYTES", (("Chaitra".getBytes()) + "")); employee.upda...
public void onClick(android.view.View v) { mCurrentIndex = ((mCurrentIndex) + 1) % (mStations.length); mStartStopButton.setImageDrawable(playDrawable()); updateDropdownHeader(mCurrentIndex); playPressed = false; doneBuffering = false; if (player.isPlaying()) { player.stop(); } pl...
public void onClick(android.view.View v) { mCurrentIndex = ((mCurrentIndex) + 1) % (mStations.length); mStartStopButton.setImageDrawable(playDrawable()); updateDropdownHeader(mCurrentIndex); playPressed = false; doneBuffering = false; if ((player) != null) { if (player.isPlaying()) { ...
public static models.Rate create(int score, java.lang.Long userId, java.lang.Long criteriaId, java.lang.Long projectId) { if ((models.Rate.findByUserIdAndProjectIdAndCriteriaId(userId, projectId, criteriaId)) == null) { models.Rate rate = new models.Rate(); rate.score = score; rate.userId = ...
public static models.Rate create(int score, java.lang.Long userId, java.lang.Long criteriaId, java.lang.Long projectId) { if ((models.Rate.findByUserIdAndProjectIdAndCriteriaId(userId, projectId, criteriaId)) == null) { models.Rate rate = new models.Rate(); rate.score = score; rate.userId = ...
public void encodeData(org.mobicents.protocols.asn.AsnOutputStream asnOs) throws org.mobicents.protocols.ss7.cap.api.CAPException { if ((this.data) == null) throw new org.mobicents.protocols.ss7.cap.api.CAPException("data field must not be null"); if (((this.data.length) < 3) && ((this.data.length)...
public void encodeData(org.mobicents.protocols.asn.AsnOutputStream asnOs) throws org.mobicents.protocols.ss7.cap.api.CAPException { if ((this.data) == null) throw new org.mobicents.protocols.ss7.cap.api.CAPException("data field must not be null"); if (((this.data.length) < 3) || ((this.data.length)...
public android.view.View getView(int position, android.view.View view, android.view.ViewGroup parent) { android.view.LayoutInflater inflater = context.getLayoutInflater(); android.view.View rowView = inflater.inflate(R.layout.list_single, null, true); android.widget.TextView txtTitle = ((android.widget.Text...
public android.view.View getView(int position, android.view.View view, android.view.ViewGroup parent) { android.view.LayoutInflater inflater = context.getLayoutInflater(); android.view.View rowView = inflater.inflate(R.layout.list_single, null, true); android.widget.TextView txtTitle = ((android.widget.Text...
private void updateLabels() { if ((game.mode) == "practice") { gamePanel.setCurrentWordCount(game.getWordCount()); } gamePanel.setCurrentWordLabel(game.currentWord, game.currentCorrectIndex); if ((game.difficulty) <= 2) { gamePanel.setCurrentTypedWordLabel(game.currentTypedWord, game.cur...
private void updateLabels() { if ((game.mode) == "practice") { gamePanel.setCurrentWordCount(game.getWordCount()); } gamePanel.setCurrentWordLabel(game.currentWord, game.currentCorrectIndex); if ((game.difficulty) <= 2) { gamePanel.setCurrentTypedWordLabel(game.currentTypedWord, game.cur...
public void actionPerformed(java.awt.event.ActionEvent event) { try { hostServer = new CryptoServer(); hostServer.start(); setHostOptCompsTo(false); setStartCompsTo(false); repaint(); setWinSizeTo(hostScreenSize); setHostCompsTo(true); } catch (java.io.IOE...
public void actionPerformed(java.awt.event.ActionEvent event) { try { hostServer = new CryptoServer(); hostServer.start(); setHostOptCompsTo(false); setStartCompsTo(false); setWinSizeTo(hostScreenSize); setHostCompsTo(true); } catch (java.io.IOException e) { ...
private static void validateSqlDatabaseNotFound(java.lang.String newDatabase) { try { sqlServerManager.sqlDatabases().getBySqlServer(com.microsoft.azure.management.sql.SqlServerOperationsTests.RG_NAME, com.microsoft.azure.management.sql.SqlServerOperationsTests.SQL_SERVER_NAME, com.microsoft.azure.managemen...
private static void validateSqlDatabaseNotFound(java.lang.String newDatabase) { try { sqlServerManager.sqlDatabases().getBySqlServer(com.microsoft.azure.management.sql.SqlServerOperationsTests.RG_NAME, com.microsoft.azure.management.sql.SqlServerOperationsTests.SQL_SERVER_NAME, newDatabase); org.jun...
public void startProgram() { this.displayBanner(); java.lang.String playersName = this.getPlayersName(); byui.cit260.hobbit.model.Player player = byui.cit260.hobbit.control.ProgramControl.createPlayer(playersName); byui.cit260.hobbit.model.GoldPouch goldPouch = byui.cit260.hobbit.control.ProgramControl....
public void startProgram() { this.displayBanner(); java.lang.String playersName = this.getPlayersName(); byui.cit260.hobbit.model.Player player = byui.cit260.hobbit.control.ProgramControl.createPlayer(playersName); this.displayWelcomeMessage(player); byui.cit260.hobbit.view.MainMenuView mainMenu = n...
public fr.inria.soctrace.tools.ocelotl.core.queries.IteratorQueries.EventIterator getVariableIterator(java.util.List<fr.inria.soctrace.lib.model.EventProducer> eventProducers, java.util.List<fr.inria.soctrace.lib.search.utils.IntervalDesc> time, org.eclipse.core.runtime.IProgressMonitor monitor) throws fr.inria.soctrac...
public fr.inria.soctrace.tools.ocelotl.core.queries.IteratorQueries.EventIterator getVariableIterator(java.util.List<fr.inria.soctrace.lib.model.EventProducer> eventProducers, java.util.List<fr.inria.soctrace.lib.search.utils.IntervalDesc> time, org.eclipse.core.runtime.IProgressMonitor monitor) throws fr.inria.soctrac...
public void parseLine(java.lang.String line) { services.FavouriteQuoteImporter.LOGGER.debug(("Parsing line: {}" + line)); if (line.trim().isEmpty()) { return ; } java.util.regex.Matcher matcher = services.FavouriteQuoteImporter.PATTERN.matcher(line); while (matcher.find()) { services...
public void parseLine(java.lang.String line) { services.FavouriteQuoteImporter.LOGGER.debug("Parsing line: {}", line); if (line.trim().isEmpty()) { return ; } java.util.regex.Matcher matcher = services.FavouriteQuoteImporter.PATTERN.matcher(line); while (matcher.find()) { services.qu...