buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
private void insertRemainingWord(algorithms.tst.intern.TstNode node, java.lang.String string) { while ((string.length()) > 0) { node.setCharacter(string.charAt(0)); node.setMiddleChild(new algorithms.tst.intern.TstNode()); node = node.getMiddleChild(); string = string.substring(1); ...
private void insertRemainingWord(algorithms.tst.intern.TstNode node, java.lang.String string) { while ((string.length()) > 0) { node.setCharacter(string.charAt(0)); string = string.substring(1); if ((string.length()) > 0) { node.setMiddleChild(new algorithms.tst.intern.TstNode())...
private void findCreatorAndCreateBusMapping(hu.bme.mit.massif.simulink.BusSelector selector) { hu.bme.mit.massif.simulink.api.util.bus.BusSignalMappingCreator.SpecifiableOriginatingOutPort origin = findBusCreatorOfIncomigBus(selector); if ((origin.specification) == null) { handleIncompleteMappings(origi...
private void findCreatorAndCreateBusMapping(hu.bme.mit.massif.simulink.BusSelector selector) { hu.bme.mit.massif.simulink.api.util.bus.BusSignalMappingCreator.SpecifiableOriginatingOutPort origin = findBusCreatorOfIncomigBus(selector); if (origin != null) { if ((origin.specification) == null) { ...
public void updateUser(com.example.calebrudnicki.spoutr.User user, java.lang.String password) { for (com.example.calebrudnicki.spoutr.User u : com.example.calebrudnicki.spoutr.Model.allUsers) { if (u.getUsername().equals(user.getUsername())) { com.example.calebrudnicki.spoutr.Model.allUsers.remo...
public void updateUser(com.example.calebrudnicki.spoutr.User user, java.lang.String password) { for (com.example.calebrudnicki.spoutr.User u : com.example.calebrudnicki.spoutr.Model.allUsers) { if (u.getUsername().equals(user.getUsername())) { com.example.calebrudnicki.spoutr.Model.allUsers.remo...
public void testingRemove(com.codecool.shop.dao.SupplierDao supplierDao, com.codecool.shop.model.Supplier testSupplier) { testSupplier.setId(1); int numOfItems = supplierDao.getAll().size(); supplierDao.add(testSupplier); supplierDao.remove(1); assertEquals(numOfItems, supplierDao.getAll().size()); ...
public void testingRemove(com.codecool.shop.dao.SupplierDao supplierDao, com.codecool.shop.model.Supplier testSupplier) { testSupplier.setId(1); int numOfItems = supplierDao.getAll().size(); supplierDao.add(testSupplier); int id = supplierDao.getAll().get(0).getId(); testSupplier.setId(id); supp...
public void testDefectNumber() { defect1.setNumber(3); assertTrue(((defect1.getNumber()) == 3)); defect1.setNumber((-1)); assertTrue(((defect1.getNumber()) == 3)); defect1.setNumber(1952); assertTrue(((defect1.getNumber()) == 1952)); }
public void testDefectNumber() { defect1.setNumber(3); assertTrue(((defect1.getNumber()) == 3)); defect1.setNumber((-1)); assertTrue(((defect1.getNumber()) == (-1))); defect1.setNumber(1952); assertTrue(((defect1.getNumber()) == 1952)); }
public void onClick(cn.pedant.SweetAlert.SweetAlertDialog sweetAlertDialog) { dialog.dismiss(); android.support.v4.app.Fragment fragment = new com.idbi.idbi.ui.Homestack.HomeStackFragment(); android.support.v4.app.FragmentManager fragmentManager = ((com.idbi.idbi.ui.activities.DashboardActivity) (com.idbi.i...
public void onClick(cn.pedant.SweetAlert.SweetAlertDialog sweetAlertDialog) { dialog.dismiss(); android.support.v4.app.Fragment fragment = new com.idbi.idbi.ui.Homestack.HomeStackFragment(); android.support.v4.app.FragmentManager fragmentManager = ((com.idbi.idbi.ui.activities.DashboardActivity) (context))....
public void checkIfSquareIsClicked(java.awt.event.MouseEvent e, java.util.List<de.htwg.dog.view.gui.BoardPanel.Square> squareList) { for (de.htwg.dog.view.gui.BoardPanel.Square square : squareList) { if ((square.contains(e.getX(), e.getY())) && ((e.getButton()) == 1)) { squareClicked(square); ...
private void checkIfSquareIsClicked(java.awt.event.MouseEvent e, java.util.List<de.htwg.dog.view.gui.BoardPanel.Square> squareList) { for (de.htwg.dog.view.gui.BoardPanel.Square square : squareList) { if ((square.contains(e.getX(), e.getY())) && ((e.getButton()) == 1)) { squareClicked(square); ...
public void moveUp(int id) { for (net.binaryaura.customize.client.gui.huditem.HudItem hudItem : all) { if (id == (hudItem.getId())) { moveUp(hudItem); } } Customize.log.warn((("ID " + id) + " doesn't relate to a hudItem. Skipping")); }
public void moveUp(int id) { for (net.binaryaura.customize.client.gui.huditem.HudItem hudItem : all) { if (id == (hudItem.getId())) { moveUp(hudItem); } } Customize.log.error((("ID " + id) + " doesn't relate to a hudItem. Skipping")); }
private void playDices(float deltaTime) { Dices.instance.update(deltaTime); timerForThrowingDices += deltaTime; if (((timerForThrowingDices) >= 5) && (Dices.instance.canPlayerThrowDices)) { Dices.instance.throwDices(diceContainer.diceMarginFromX, diceContainer.diceMarginToX, diceContainer.diceMargin...
private void playDices(float deltaTime) { Dices.instance.update(deltaTime); timerForThrowingDices += deltaTime; if (((timerForThrowingDices) >= 5) && (Dices.instance.canPlayerThrowDices)) { Dices.instance.throwDices(diceContainer.diceMarginFromX, diceContainer.diceMarginToX, diceContainer.diceMargin...
public static void removeFilesAndFolder(java.lang.String... paths) throws java.io.IOException { for (java.lang.String path : paths) { java.io.File f = new java.io.File(path); if ((f != null) && (f.exists())) { org.apache.commons.io.FileUtils.forceDelete(new java.io.File(path)); }...
public static void removeFilesAndFolder(java.lang.String... paths) throws java.io.IOException { for (java.lang.String path : paths) { java.io.File f = new java.io.File(path); if ((f != null) && (f.exists())) { org.apache.commons.io.FileUtils.forceDelete(f); } } }
public int calculateDeductions(com.codeclan.shoppingbasket.Customer customer, int totalSpend) { if ((customer.hasLoyaltyCard()) == false) { return 0; }else { double discount = (totalSpend / 100.0) * (this.percentageToDiscount); int intDiscount = ((int) (java.lang.Math.round(discount))); ...
public int calculateDeductions(com.codeclan.shoppingbasket.Customer customer, int totalSpend) { if ((customer.hasLoyaltyCard()) == false) { return 0; }else { double discount = ((this.percentageToDiscount) / 100.0) * totalSpend; int intDiscount = ((int) (java.lang.Math.round(discount))); ...
public static boolean isPrime(int n) { boolean itIsAPrime = true; if (n < 2) { itIsAPrime = false; }else if (n == 2) { itIsAPrime = true; }else { for (int i = 2; i < n; i++) { if ((n % i) == 0) { itIsAPrime = false; ...
public static boolean isPrime(int n) { if (n < 2) { return false; }else if (n == 2) { return true; }else { for (int i = 2; i < n; i++) { if ((n % i) == 0) { return false; } } } return...
public void insertToDatabase(int wid, java.lang.String wName, int wPosition, java.lang.String wURL, byte[] wIcon, boolean jsEnabled) { android.content.ContentValues values = new android.content.ContentValues(); values.put("wid", wid); values.put("wName", wName); values.put("wPosition", wPosition); v...
public void insertToDatabase(int wid, java.lang.String wName, int wPosition, java.lang.String wURL, boolean jsEnabled) { android.content.ContentValues values = new android.content.ContentValues(); values.put("wid", wid); values.put("wName", wName); values.put("wPosition", wPosition); values.put("wUR...
public org.openflexo.fib.utils.FIBInspector inspectorForObject(java.lang.Object object) { if (object == null) { return null; } if (object instanceof org.openflexo.foundation.fml.rt.FlexoConceptInstance) { return inspectorForFlexoConceptInstance(((org.openflexo.foundation.fml.rt.FlexoConceptI...
public org.openflexo.fib.utils.FIBInspector inspectorForObject(java.lang.Object object) { if (object == null) { return null; } if (object instanceof org.openflexo.foundation.fml.rt.FlexoConceptInstance) { return inspectorForFlexoConceptInstance(((org.openflexo.foundation.fml.rt.FlexoConceptI...
public void rename() { for (int A = 0; A < (planets.size()); A++) { if (planets.get(A).getName().contains("planet")) { planets.get(A).setName((("planet " + A) + 1)); } } }
public void rename() { for (int A = 0; A < (planets.size()); A++) { if (planets.get(A).getName().contains("planet")) { planets.get(A).setName(("planet " + (A + 1))); } } }
public void setSettingChanged(java.lang.String settingName) { if (isListSetting(settingName)) { settingChanged(settingName, Setting.LIST, getList(settingName)); }else if (isMapSetting(settingName)) { settingChanged(settingName, Setting.MAP, getMap(settingName)); } }
public void setSettingChanged(java.lang.String settingName) { if (isListSetting(settingName)) { settingChanged(settingName.toLowerCase(), Setting.LIST, getList(settingName)); }else if (isMapSetting(settingName)) { settingChanged(settingName.toLowerCase(), Setting.MAP, getMap(settingN...
public static int getRamPercentage(android.content.Context context) { android.app.ActivityManager.MemoryInfo mi = new android.app.ActivityManager.MemoryInfo(); android.app.ActivityManager activityManager = ((android.app.ActivityManager) (context.getSystemService(android.content.Context.ACTIVITY_SERVICE))); ...
public static int getRamPercentage(android.content.Context context) { android.app.ActivityManager.MemoryInfo mi = new android.app.ActivityManager.MemoryInfo(); android.app.ActivityManager activityManager = ((android.app.ActivityManager) (context.getSystemService(android.content.Context.ACTIVITY_SERVICE))); ...
public static java.lang.String join(final java.lang.Iterable<java.lang.String> arguments, final java.lang.String delimiter) { final java.lang.StringBuilder buf = new java.lang.StringBuilder(); boolean first = true; for (final java.lang.String arg : arguments) { if (arg != null) { if (fir...
public static java.lang.String join(final java.lang.Iterable<java.lang.String> arguments, final java.lang.String delimiter) { final java.lang.StringBuilder buf = new java.lang.StringBuilder(); if (arguments != null) { boolean first = true; for (final java.lang.String arg : arguments) { ...
public void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); mImagePath = (android.os.Environment.getExternalStorageDirectory().getPath()) + "/DownLoad/"; mListImage = new com.guo.samples.ImageListNetActivity.ListImage(this, name); setListAdapter(mListImage); getL...
public void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); mImagePath = (android.os.Environment.getExternalStorageDirectory().getPath()) + "/DownLoad/"; mListImage = new com.guo.samples.ImageListNetActivity.ListImage(this, name); setListAdapter(mListImage); getL...
public boolean dialogItemChanged(ij.gui.GenericDialog sfgd, java.awt.AWTEvent e) { marginLeft = sfgd.getNextNumber(); marginRight = sfgd.getNextNumber(); marginTop = sfgd.getNextNumber(); marginBottom = sfgd.getNextNumber(); prohibitedLineColor = sfgd.getNextChoice(); acceptanceLineColor = sfgd....
public boolean dialogItemChanged(ij.gui.GenericDialog sfgd, java.awt.AWTEvent e) { marginTop = sfgd.getNextNumber(); marginBottom = sfgd.getNextNumber(); marginLeft = sfgd.getNextNumber(); marginRight = sfgd.getNextNumber(); prohibitedLineColor = sfgd.getNextChoice(); acceptanceLineColor = sfgd....
public void handle(javafx.scene.input.MouseEvent event) { if ((event.getButton()) == (javafx.scene.input.MouseButton.PRIMARY)) { createDayView(start); }else if (((event.getButton()) == (javafx.scene.input.MouseButton.SECONDARY)) && (yearView)) { createYear(timeline.getStart(), timeli...
public void handle(javafx.scene.input.MouseEvent event) { if ((event.getButton()) == (javafx.scene.input.MouseButton.PRIMARY)) { createDayView(start, end); }else if (((event.getButton()) == (javafx.scene.input.MouseButton.SECONDARY)) && (yearView)) { createYear(timeline.getStart(), t...
public void onClick(android.view.View v) { com.qiang.workout.Models.StopwatchTime stopwatchTime = new com.qiang.workout.Models.StopwatchTime(); stopwatchTime.setTime((((int) (timeWhenPaused)) / 1000)); stopwatchTime.setCategory(selectedCategory.getID()); stopwatchTime.setRecordDate((((int) (java.lang.Sy...
public void onClick(android.view.View v) { com.qiang.workout.Models.StopwatchTime stopwatchTime = new com.qiang.workout.Models.StopwatchTime(); stopwatchTime.setTime((((int) (timeWhenPaused)) / 1000)); stopwatchTime.setCategory(selectedCategory.getID()); stopwatchTime.setRecordDate(((java.lang.System.cu...
private void clearComponentsForNewEntry() { txtItemId.clear(); txtItemName.clear(); txtItemDescription.clear(); txtPartNo.clear(); cmbBatchNo.getSelectionModel().selectFirst(); cmbMainCategory.getSelectionModel().selectFirst(); cmbUnitQty.getSelectionModel().selectFirst(); cmbUnit.getSel...
private void clearComponentsForNewEntry() { txtItemName.clear(); txtItemDescription.clear(); txtPartNo.clear(); cmbBatchNo.getSelectionModel().selectFirst(); cmbMainCategory.getSelectionModel().selectFirst(); cmbUnitQty.getSelectionModel().selectFirst(); cmbUnit.getSelectionModel().selectFir...
public void onClick(android.view.View v) { int newPosition = java.lang.Math.max(((currentPosition) - 1), 0); if (newPosition == (currentPosition)) { return ; } getStatTextView(currentPosition).setEnabled(false); getStatTextView(newPosition).setEnabled(true); currentPosition = newPosition...
public void onClick(android.view.View v) { int newPosition = java.lang.Math.max(((currentPosition) - 1), 0); getStatTextView(currentPosition).setEnabled(false); getStatTextView(newPosition).setEnabled(true); currentPosition = newPosition; }
public static void updateContactInfo() { java.lang.Integer rows = com.exercise6.core.dao.EmployeeDAO.showEmployees(1); java.lang.Integer employeeId; java.lang.System.out.print("Update contact info of which employee: "); employeeId = com.exercise6.util.InputUtil.inputOptionCheck(); while (!(com.exerc...
public static void updateContactInfo() { java.lang.Integer rows = com.exercise6.core.dao.EmployeeDAO.showEmployees(1); java.lang.Integer employeeId; java.lang.System.out.print("Update contact info of which employee: "); employeeId = com.exercise6.util.InputUtil.inputOptionCheck(); while (!(com.exerc...
public void onButtonClickListner(int position) { try { if (isNetworkAvailable()) { nextCall(position); lvMain.removeHeaderView(lvHeader); }else { android.widget.Toast.makeText(this, this.getString(R.string.internet_connection_is_not), Toast.LENGTH_SHORT).show(); ...
public void onButtonClickListner(int position) { try { if (isNetworkAvailable()) { nextCall(position); lvMain.removeHeaderView(lvHeader); }else { android.widget.Toast.makeText(this, this.getString(R.string.internet_connection_is_not), Toast.LENGTH_SHORT).show(); ...
public void onSuccess(int statusCode, cz.msebera.android.httpclient.Header[] headers, org.json.JSONObject responseBody) { org.json.JSONArray items = null; try { java.lang.System.out.println(responseBody.toString()); items = responseBody.getJSONArray("movies"); java.util.ArrayList<edu.gat...
public void onSuccess(int statusCode, cz.msebera.android.httpclient.Header[] headers, org.json.JSONObject responseBody) { org.json.JSONArray items = null; try { items = responseBody.getJSONArray("movies"); java.util.ArrayList<edu.gatech.snickers.techflixandchill.BoxOfficeMovie> movies = edu.gate...
public void setChars(ultrapoulet.wifeygame.battle.BattleWifey input, ultrapoulet.wifeygame.battle.BattleEnemy enemy) { displayChar = input; displayEnemy = enemy; displayText = -1; skillsPage = 0; maxPage = (displayChar.getSkills().size()) / (SKILLS_TEXT_PER_PAGE); multipliers = displayChar.getMu...
public void setChars(ultrapoulet.wifeygame.battle.BattleWifey input, ultrapoulet.wifeygame.battle.BattleEnemy enemy) { displayChar = input; displayEnemy = enemy; displayText = -1; skillsPage = 0; maxPage = ((displayChar.getSkills().size()) - 1) / (SKILLS_TEXT_PER_PAGE); multipliers = displayChar...
public double joystickDeadZone(double value) { if ((value > 0.01) || (value < (-0.01))) { return (value - 0.01) / 0.99; }else if (value < (-0.01)) { return (value + 0.01) / 0.99; } return 0.0; }
private double joystickDeadZone(double value) { if ((value > 0.01) || (value < (-0.01))) { return (value - 0.01) / 0.99; }else if (value < (-0.01)) { return (value + 0.01) / 0.99; } return 0.0; }
public com.orientechnologies.orient.core.record.impl.ODocument fromStream(final byte[] iRecordBuffer) { removeAllCollectionChangeListeners(); _fields = null; _fieldSize = 0; _contentChanged = false; _schema = null; fetchSchemaIfCan(); super.fromStream(iRecordBuffer); if (!(_lazyLoad)) { ...
public com.orientechnologies.orient.core.record.impl.ODocument fromStream(final byte[] iRecordBuffer) { removeAllCollectionChangeListeners(); _fields = null; _fieldSize = 0; _contentChanged = false; _schema = null; fetchSchemaIfCan(); super.fromStream(iRecordBuffer); if (!(_lazyLoad)) { ...
public void deleteTest() { entity.StaticData insertStaticData = dao.StaticDataDAOTest.stDAO.create(dao.StaticDataDAOTest.stData); long id = dao.StaticDataDAOTest.stDAO.delete(dao.StaticDataDAOTest.stData); dao.Assert.assertEquals(id, insertStaticData.getId()); entity.StaticData nullStaticData = dao.Stat...
public void deleteTest() { entity.StaticData insertStaticData = dao.StaticDataDAOTest.stDAO.create(dao.StaticDataDAOTest.stData); long id = dao.StaticDataDAOTest.stDAO.delete(insertStaticData); dao.Assert.assertEquals(id, insertStaticData.getId()); entity.StaticData nullStaticData = dao.StaticDataDAOTes...
private void markBaseProps(java.util.Set<org.ggp.base.util.gdl.grammar.GdlSentence> stateSentences) { java.util.Map<org.ggp.base.util.gdl.grammar.GdlSentence, org.ggp.base.util.propnet.architecture.components.Proposition> props = propNet.getBasePropositions(); for (java.util.Map.Entry<org.ggp.base.util.gdl.gram...
private void markBaseProps(java.util.Set<org.ggp.base.util.gdl.grammar.GdlSentence> stateSentences) { java.util.Map<org.ggp.base.util.gdl.grammar.GdlSentence, org.ggp.base.util.propnet.architecture.components.Proposition> props = propNet.getBasePropositions(); for (java.util.Map.Entry<org.ggp.base.util.gdl.gram...
private int addMissingVertices(java.lang.Object parent) { int oldSize = vertices.size(); int index = oldSize; while ((vertices.size()) < (rewrite.states().size())) { java.lang.String label = java.lang.Integer.toString((index++)); vertices.add(graph.insertVertex(parent, null, label, 20, 20, 2...
private void addMissingVertices(java.lang.Object parent) { int index = vertices.size(); while (index < (rewrite.states().size())) { java.lang.String label = java.lang.Integer.toString((index++)); vertices.add(graph.insertVertex(parent, null, label, 20, 20, 20, 20, "ROUNDED")); } }
public void execute(org.activiti.engine.delegate.DelegateExecution execution) throws java.lang.Exception { java.lang.String authenticatedUserName = org.alfresco.repo.security.authentication.AuthenticationUtil.getFullyAuthenticatedUser(); rs.make.alfresco.workflow.activiti.delegate.newsflash.SetParametersForNews...
public void execute(org.activiti.engine.delegate.DelegateExecution execution) throws java.lang.Exception { java.lang.String authenticatedUserName = org.alfresco.repo.security.authentication.AuthenticationUtil.getFullyAuthenticatedUser(); rs.make.alfresco.workflow.activiti.delegate.newsflash.SetParametersForNews...
public boolean shift(boolean a) { boolean rc = this.bits[0]; for (int i = 0; i < (bits.length); i++) { bits[i] = bits[(i + 1)]; } bits[((bits.length) - 1)] = a; return rc; }
public boolean shift(boolean a) { boolean rc = this.bits[0]; for (int i = 0; i < ((bits.length) - 1); i++) { bits[i] = bits[(i + 1)]; } bits[((bits.length) - 1)] = a; return rc; }
private void triggerRepaint(de.hshannover.f4.trust.visitmeta.interfaces.Propable propable) { de.hshannover.f4.trust.visitmeta.graphDrawer.Piccolo2DPanel.LOGGER.trace((("Method triggerRepaint(" + propable) + ") called.")); if (propable instanceof de.hshannover.f4.trust.visitmeta.interfaces.Identifier) { ...
private void triggerRepaint(de.hshannover.f4.trust.visitmeta.interfaces.Propable propable) { de.hshannover.f4.trust.visitmeta.graphDrawer.Piccolo2DPanel.LOGGER.trace((("Method triggerRepaint(" + propable) + ") called.")); if (propable instanceof de.hshannover.f4.trust.visitmeta.interfaces.Identifier) { ...
public int getUserOrdersCount(long user_id, int type, int flag) throws com.loocha.exception.ServerInternalException { java.lang.String condition = ""; if (type == 0) { condition = " and paid_id = 0 "; }else if (type == 1) { condition = " and paid_id > 0 "; } if (...
public int getUserOrdersCount(long user_id, int type, int flag) throws com.loocha.exception.ServerInternalException { java.lang.String condition = ""; if (flag == 0) { condition = " and user_request.flag in (2,3)"; }else condition = " and user_request.flag = " + flag; return query(c...
private java.lang.Object[] changeNullValueToNullString(java.lang.Object[] rowValue) { int i = 0; for (java.lang.Object obj : rowValue) { if (obj != null) { if (obj.equals(valueToCheckAgainst)) { rowValue[i] = org.carbondata.core.constants.CarbonCommonConstants.MEMBER_DEFAULT_...
private java.lang.Object[] changeNullValueToNullString(java.lang.Object[] rowValue) { int i = 0; for (java.lang.Object obj : rowValue) { if (obj != null) { if (obj.equals(valueToCheckAgainst)) { rowValue[i] = org.carbondata.core.constants.CarbonCommonConstants.MEMBER_DEFAULT_...
public static <T> void logDebug(java.lang.String logMessage, java.lang.Class<T> clasS) { if (Main.DEBUG) { java.lang.String[] lines = logMessage.split("\\r?\\n"); java.lang.String toPrint = (pixyel_backend.Log.getClassNameWithDate(clasS)) + "DEBUG: "; for (java.lang.String line : lines) { ...
public static <T> void logDebug(java.lang.String logMessage, java.lang.Class<T> clasS) { if (Main.DEBUG) { java.lang.String[] lines = logMessage.split("\\r?\\n"); java.lang.String toPrint = (pixyel_backend.Log.getClassNameWithDate(clasS)) + "DEBUG: "; for (java.lang.String line : lines) { ...
private void startNextActivity() { android.content.Intent intent; if (new com.muzima.service.WizardFinishPreferenceService(this).isWizardFinished()) { intent = new android.content.Intent(getApplicationContext(), com.muzima.view.MainActivity.class); }else { ((com.muzima.MuzimaApplication) (ge...
private void startNextActivity() { android.content.Intent intent; if (new com.muzima.service.WizardFinishPreferenceService(this).isWizardFinished()) { intent = new android.content.Intent(getApplicationContext(), com.muzima.view.MainActivity.class); }else { intent = new android.content.Intent...
public dao.Movie getMovie(int id) { dao.MovieListManager.movieList = buildMovieList(); for (dao.Movie movie : dao.MovieListManager.movieList) { java.util.Optional<dao.Movie> nullableMovie = java.util.Optional.ofNullable(getMovieById(movie, id)); if (nullableMovie.isPresent()) { retur...
public dao.Movie getMovie(int id) { for (dao.Movie movie : dao.MovieListManager.movieList) { java.util.Optional<dao.Movie> nullableMovie = java.util.Optional.ofNullable(getMovieById(movie, id)); if (nullableMovie.isPresent()) { return nullableMovie.get(); } } return null;...
public com.effektif.workflow.api.model.RelativeTime readRelativeTimeEffektif(java.lang.String localPart) { com.effektif.workflow.api.model.RelativeTime relativeTime = null; startExtensionElements(); com.effektif.workflow.api.bpmn.XmlElement element = ((currentXml) != null) ? currentXml.removeElement(com.eff...
public com.effektif.workflow.api.model.RelativeTime readRelativeTimeEffektif(java.lang.String localPart) { com.effektif.workflow.api.model.RelativeTime relativeTime = null; com.effektif.workflow.api.bpmn.XmlElement element = ((currentXml) != null) ? currentXml.removeElement(com.effektif.workflow.impl.bpmn.EFFEK...
private final boolean isWordBreak(int textOffset) { if (!(org.nbp.b2g.ui.Endpoint.isWordBreak(getLineText().charAt(textOffset)))) return false; java.lang.CharSequence brailleCharacters = getBrailleCharacters(); int brailleOffset = getBrailleOffset(textOffset); if (brailleOffset == (brailleC...
private final boolean isWordBreak(int textOffset) { if (!(org.nbp.b2g.ui.Endpoint.isWordBreak(getLineText().charAt(textOffset)))) return false; java.lang.CharSequence brailleCharacters = getBrailleCharacters(); int brailleOffset = getBrailleOffset(textOffset); if (brailleOffset == (brailleC...
public static void enterchk() { for (java.lang.String value : GosLink2.gb.enters) { GosLink2.dw.append(value); int num = java.lang.Integer.parseInt(value.substring(0, 1)); GosLink2.TNH.get(num).write(value.substring(2)); } GosLink2.gb.enters.clear(); }
public static void enterchk() { for (java.lang.String value : GosLink2.gb.enters) { int num = java.lang.Integer.parseInt(value.substring(0, 1)); GosLink2.TNH.get(num).write(value.substring(2)); } GosLink2.gb.enters.clear(); }
public void saveUser(@javax.validation.Valid br.com.fiap.am.model.Client client) { validator.onErrorSendBadRequest(); users.insert(client); result.use(br.com.caelum.vraptor.view.Results.http()).setStatusCode(201); result.use(br.com.caelum.vraptor.view.Results.json()).withoutRoot().from(client).recursive...
public void saveUser(@javax.validation.Valid br.com.fiap.am.model.Client client) { validator.onErrorSendBadRequest(); if ((client.getId()) == null) { users.insert(client); }else { users.update(client); } result.use(br.com.caelum.vraptor.view.Results.http()).setStatusCode(201); re...
public synchronized void addListener(int id, @android.support.annotation.NonNull final eu.inloop.localmessagemanager.LocalMessageCallback listener) { java.util.List<eu.inloop.localmessagemanager.LocalMessageCallback> whatListofListeners = mListenersSpecific.get(id); if (whatListofListeners == null) { wh...
public void addListener(int id, @android.support.annotation.NonNull final eu.inloop.localmessagemanager.LocalMessageCallback listener) { synchronized(mListenersSpecific) { java.util.List<eu.inloop.localmessagemanager.LocalMessageCallback> whatListofListeners = mListenersSpecific.get(id); if (whatLis...
private java.util.Set<java.lang.String> pruneDictByLength(int wordLength) { java.util.Set<java.lang.String> prunedDict = new java.util.HashSet<java.lang.String>(); for (java.lang.String s : this.dictionary) { if ((s.length()) == wordLength) { prunedDict.add(s); } } return pru...
private java.util.List<java.lang.String> pruneDictByLength(int wordLength) { java.util.List<java.lang.String> prunedDict = new java.util.ArrayList<java.lang.String>(); for (java.lang.String s : this.dictionary) { if ((s.length()) == wordLength) { prunedDict.add(s); } } return...
public void modifyFile(java.io.RandomAccessFile file, int flags, java.lang.Object data) { final io.bicycle.epoll.EventPolling.FileFDTuple tuple = tupleFor(file); final io.bicycle.epoll.NativePollEvent event = tuple.event; event.events = flags; tuple.data = data; event.write(); if ((io.bicycle.ep...
public void modifyFile(java.lang.String filename, int flags, java.lang.Object data) { final io.bicycle.epoll.EventPolling.FileFDTuple tuple = tupleFor(filename); final io.bicycle.epoll.NativePollEvent event = tuple.event; event.events = flags; tuple.data = data; event.write(); if ((io.bicycle.ep...
public boolean equals(org.opendaylight.controller.sal.flowprogrammer.Flow flow) { if (flow == null) { return false; } if (match.equals(flow.getMatch())) return false; if ((priority) != (flow.getPriority())) return false; return true; }
public boolean equals(org.opendaylight.controller.sal.flowprogrammer.Flow flow) { if (flow == null) { return false; } if (!(match.equals(flow.getMatch()))) return false; if ((priority) != (flow.getPriority())) return false; return true; }
public void clearGlideCache() { try { if ((android.os.Looper.myLooper()) == (android.os.Looper.getMainLooper())) { new java.lang.Thread(new java.lang.Runnable() { @java.lang.Override public void run() { com.bumptech.glide.Glide.get(com.idogfood...
public void clearGlideCache() { try { if ((android.os.Looper.myLooper()) == (android.os.Looper.getMainLooper())) { new java.lang.Thread(() -> com.bumptech.glide.Glide.get(com.idogfooding.bone.BaseApplication._context).clearDiskCache()); }else { com.bumptech.glide.Glide.get(co...
public void stopSound(java.lang.String title) { java.lang.Integer id = this.loadedSounds.get(title); android.util.Log.d("Player", ("Stopping " + title)); this.soundPool.stop(id.intValue()); this.soundPool.unload(id.intValue()); this.loadedSounds.remove(title); }
public void stopSound(java.lang.String title) { java.lang.Integer id = this.loadedSounds.get(title); this.soundPool.stop(id.intValue()); this.soundPool.unload(id.intValue()); this.loadedSounds.remove(title); }
private static void checkForSpecialMidiEvent(javax.sound.midi.MidiEvent thisEvent, java.util.HashMap<java.lang.Byte, javax.sound.midi.MidiEvent> thisTrackSpecialEvents) { java.lang.Byte midiStatusHash = mckay.utilities.sound.midi.MIDIMethods.getMidiMetaStatusHash(thisEvent); javax.sound.midi.MidiMessage thisMes...
private static void checkForSpecialMidiEvent(javax.sound.midi.MidiEvent thisEvent, java.util.HashMap<java.lang.Byte, javax.sound.midi.MidiEvent> thisTrackSpecialEvents) { javax.sound.midi.MidiMessage thisMessage = thisEvent.getMessage(); if (mckay.utilities.sound.midi.MIDIMethods.statusByteIsSpecial(thisMessage...
public void onTouchStart(com.google.gwt.event.dom.client.TouchStartEvent touchStartEvent) { com.vaadin.client.VConsole.log(" === TouchStart"); com.google.gwt.dom.client.Element relativeElement = touchStartEvent.getRelativeElement(); checkForButtonWidget(touchStartEvent.getNativeEvent()); removeStyleVers...
public void onTouchStart(com.google.gwt.event.dom.client.TouchStartEvent touchStartEvent) { checkForButtonWidget(touchStartEvent.getNativeEvent()); removeStyleVersions(touchArea.getElement().getStyle(), "transition"); removeStyleVersions(touchArea.getElement().getStyle(), "transitionProperty"); touchSta...
public void onClick(android.view.View view) { gameBoard.setTestGame(java.lang.Integer.parseInt(btnDebug.getText().toString())); imgBoard.redrawBoard(); imgBoard.updateSpinnerChoices(gameBoard); android.widget.Button bMove = ((android.widget.Button) (findViewById(R.id.bMove))); bMove.setEnabled(true)...
public void onClick(android.view.View view) { gameBoard.setTestGame(java.lang.Integer.parseInt(btnDebug.getText().toString())); imgBoard.redrawBoard(); imgBoard.updateSpinnerChoices(); android.widget.Button bMove = ((android.widget.Button) (findViewById(R.id.bMove))); bMove.setEnabled(true); }
public void ensurePool(int howmany) { if (howmany >= (this.pool.length)) { init(java.lang.Math.max(howmany, ((this.pool.length) << 1))); } this.maxvarid = howmany; }
public void ensurePool(int howmany) { if (howmany >= (this.pool.length)) { init(java.lang.Math.max(howmany, ((this.pool.length) << 1))); } if ((this.maxvarid) < howmany) { this.maxvarid = howmany; } }
public int compareTo(org.bndtools.templating.Category o) { int diff; if ((this.prefix) == null) diff = ((o.prefix) == null) ? 0 : 1; else if ((o.prefix) == null) diff = -1; else diff = o.name.compareTo(this.name); return diff; }
public int compareTo(org.bndtools.templating.Category o) { int diff; if ((this.prefix) == null) diff = ((o.prefix) == null) ? 0 : 1; else if ((o.prefix) == null) diff = -1; else diff = this.prefix.compareTo(o.prefix); if (diff != 0) r...
public static void deleteEntityView(ru.resolutionpoint.edu.animals.model.Entity entity) { for (ru.resolutionpoint.edu.animals.view.EntityView en : ru.resolutionpoint.edu.animals.view.EntitiesPanel.entities) { if (en.getEntity().equals(entity)) { ru.resolutionpoint.edu.animals.view.EntitiesPanel....
public static void deleteEntityView(ru.resolutionpoint.edu.animals.model.Entity entity) { for (ru.resolutionpoint.edu.animals.view.EntityView en : ru.resolutionpoint.edu.animals.view.EntitiesPanel.entities) { if (en.getEntity().equals(entity)) { ru.resolutionpoint.edu.animals.view.EntitiesPanel....
public void testInvalidBuildFileAsImportProjectPath() { boolean caught = false; final java.nio.file.Path filePath = java.nio.file.Paths.get(getProjectPath(), "..", "invalid-build-file", "BUILD"); final java.lang.String badBuildFile = filePath.normalize().toString(); try { myFromPantsControl.onLi...
public void testInvalidBuildFileAsImportProjectPath() { boolean caught = false; final java.nio.file.Path filePath = java.nio.file.Paths.get(getProjectPath(), "..", "invalid-build-file", "BUILD"); final java.lang.String badBuildFile = filePath.normalize().toString(); java.lang.System.out.println(badBuild...
public java.lang.Void visit(cons.ql.ast.statement.If ifNode) { javax.swing.JPanel container = gui.ComponentCreator.check(ifNode.getBlock(), controller.getValueEnvironment()); gui.IfObserver ifObserver = new gui.IfObserver(ifNode, controller, container); controller.addGlobalObserver(ifObserver); pane.add...
public java.lang.Void visit(cons.ql.ast.statement.If ifNode) { javax.swing.JPanel container = gui.ComponentCreator.check(ifNode.getBlock(), controller); gui.IfObserver ifObserver = new gui.IfObserver(ifNode, controller, container); controller.addGlobalObserver(ifObserver); pane.add(container); retur...
public synchronized void onResourceUpdate(java.lang.String name, co.cask.cdap.security.auth.KeyIdentifier instance) { co.cask.cdap.security.auth.DistributedKeyManager.LOG.debug("SharedResourceCache triggered update: leader={}, resource key={}", leader, name); if (((currentKey) == null) || ((instance.getExpirati...
public synchronized void onResourceUpdate(java.lang.String name, co.cask.cdap.security.auth.KeyIdentifier instance) { co.cask.cdap.security.auth.DistributedKeyManager.LOG.debug("SharedResourceCache triggered update: leader={}, resource key={}", leader, name); if (((currentKey) == null) || ((instance.getExpirati...
protected java.lang.String getJavaVersion() { java.lang.String javaVersion = "1.7"; org.apache.maven.model.Plugin p = maven_project.getPlugin("org.apache.maven.plugins:maven-compiler-plugin"); if (p != null) { org.codehaus.plexus.util.xml.Xpp3Dom config = ((org.codehaus.plexus.util.xml.Xpp3Dom) (p.g...
protected java.lang.String getJavaVersion() { java.lang.String javaVersion = "1.7"; org.apache.maven.model.Plugin p = maven_project.getPlugin("org.apache.maven.plugins:maven-compiler-plugin"); if (p != null) { org.codehaus.plexus.util.xml.Xpp3Dom config = ((org.codehaus.plexus.util.xml.Xpp3Dom) (p.g...
public double derivate_alpha(double a, double b, double alpha, double t_0, double f_0, double t, double f) { return (((a * (t - t_0)) + b) * (java.lang.Math.pow((f_0 / f), alpha))) * (java.lang.Math.log((f_0 / f))); }
public double derivate_alpha(double a, double b, double alpha, double t_0, double f_0, double t, double f) { return (((a * (t - t_0)) + b) * (java.lang.Math.pow((f / f_0), alpha))) * (java.lang.Math.log((f / f_0))); }
public static void main(java.lang.String[] arg) { com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration config = new com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration(); config.title = "Life--"; config.width = 1440; config.height = 810; com.badlogic.gdx.backends.lwjgl.LwjglApplic...
public static void main(java.lang.String[] arg) { com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration config = new com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration(); config.title = "Life--"; config.width = 1440; config.height = 810; com.badlogic.gdx.backends.lwjgl.LwjglApplic...
public void removeSoundClips() { java.util.List<SoundClip> l = view.getSelectedSoundClips(); Album selectedAlbum = view.getSelectedAlbum(); if (selectedAlbum != null) { }else { selectedAlbum = root; } for (int i = 0; i < (l.size()); i++) { selectedAlbum.removeSoundClip(l.get(i));...
public void removeSoundClips() { java.util.List<SoundClip> l = view.getSelectedSoundClips(); Album selectedAlbum = view.getSelectedAlbum(); if (selectedAlbum == null) return ; for (int i = 0; i < (l.size()); i++) { selectedAlbum.removeSoundClip(l.get(i)); } view.onClipsUpdat...
public void handleMenuButtonClick(javafx.event.ActionEvent e) throws java.io.IOException { java.lang.String[] seg = e.getSource().toString().split(java.util.regex.Pattern.quote("'")); java.lang.System.out.println(seg[((seg.length) - 1)]); WeatherAPI.WeatherForecast weatherfore = new WeatherAPI.WeatherForeca...
public void handleMenuButtonClick(javafx.event.ActionEvent e) throws java.io.IOException { java.lang.String[] seg = e.getSource().toString().split(java.util.regex.Pattern.quote("'")); java.lang.System.out.println(seg[((seg.length) - 1)]); }
public void defaultLabel() throws java.lang.Exception { java.lang.String uri = org.springframework.cloud.config.server.test.ConfigServerTestUtils.prepareLocalRepo(); this.context = new org.springframework.boot.builder.SpringApplicationBuilder(org.springframework.cloud.config.server.environment.JGitEnvironmentRe...
public void defaultLabel() throws java.lang.Exception { java.lang.String uri = org.springframework.cloud.config.server.test.ConfigServerTestUtils.prepareLocalRepo(); this.context = new org.springframework.boot.builder.SpringApplicationBuilder(org.springframework.cloud.config.server.environment.JGitEnvironmentRe...
protected com.martiansoftware.jsap.JSAPResult parseParameters(java.lang.String[] args) throws java.lang.Exception { com.martiansoftware.jsap.SimpleJSAP jsap = buildCommandLineOptions(); com.martiansoftware.jsap.JSAPResult config = jsap.parse(args); if ((!(config.success())) || (jsap.messagePrinted())) { ...
protected com.martiansoftware.jsap.JSAPResult parseParameters(java.lang.String[] args) throws java.lang.Exception { jsap = buildCommandLineOptions(); com.martiansoftware.jsap.JSAPResult config = jsap.parse(args); if ((!(config.success())) || (jsap.messagePrinted())) { java.util.Iterator<?> messageIt...
private int calcularDondeTerminaLaLista(java.util.List<java.lang.String> listaDeEntrada, int comienzoDeLaLista) { int i = comienzoDeLaLista; for (int j = i; j < (listaDeEntrada.size()); j++) { if (listaDeEntrada.get(j).startsWith("*")) { i++; } } return i - 1; }
private int calcularDondeTerminaLaLista(java.util.List<java.lang.String> listaDeEntrada, int comienzoDeLaLista) { int i = comienzoDeLaLista; for (int j = i; j < (listaDeEntrada.size()); j++) { if (listaDeEntrada.get(j).startsWith("*")) { i++; }else { j = listaDeEntrada.si...
private void onDownloadSuccess(us.codecraft.webmagic.Request request, us.codecraft.webmagic.Page page) { onSuccess(request); if (site.getAcceptStatCode().contains(page.getStatusCode())) { pageProcessor.process(page); extractAndAddRequests(page, spawnUrl); if (!(page.getResultItems().isSk...
private void onDownloadSuccess(us.codecraft.webmagic.Request request, us.codecraft.webmagic.Page page) { if (site.getAcceptStatCode().contains(page.getStatusCode())) { pageProcessor.process(page); extractAndAddRequests(page, spawnUrl); if (!(page.getResultItems().isSkip())) { for...
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) { android.view.View view = inflater.inflate(R.layout.fragment_subworkout, container, false); android.widget.ListView listView = ((android.widget.ListView) (view.fin...
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) { android.view.View view = inflater.inflate(R.layout.fragment_subworkout, container, false); android.widget.ListView listView = ((android.widget.ListView) (view.fin...
protected void onPostExecute(java.lang.Void aVoid) { super.onPostExecute(aVoid); Body.setText(resultBody); Body.setMovementMethod(android.text.method.LinkMovementMethod.getInstance()); if (!(com.unit5app.Settings.getArticleSettingsBoolean(Settings.ID_ARTICLE_SETTING_SCROLL_WITH_TITLE))) { Body.s...
protected void onPostExecute(java.lang.Void aVoid) { super.onPostExecute(aVoid); if ((resultBody) != null) { Body.setText(resultBody); Body.setMovementMethod(android.text.method.LinkMovementMethod.getInstance()); if (!(com.unit5app.Settings.getArticleSettingsBoolean(Settings.ID_ARTICLE_S...
public static void handleArgumentError(java.lang.Object arg, com.oracle.truffle.r.runtime.nodes.RBaseNode callObj, com.oracle.truffle.r.runtime.RError.Message message, java.lang.Object[] messageArgs) { if ((com.oracle.truffle.r.runtime.context.RContext.getInstance()) == null) { throw new java.lang.IllegalAr...
protected static void handleArgumentError(java.lang.Object arg, com.oracle.truffle.r.runtime.nodes.RBaseNode callObj, com.oracle.truffle.r.runtime.RError.Message message, java.lang.Object[] messageArgs) { if ((com.oracle.truffle.r.runtime.context.RContext.getInstance()) == null) { throw new java.lang.Illega...
public void startAnim(int step) { if (step == 1) { stopAnim(); startViewAnim(0.0F, 1.0F, 600, step); }else if (step == 2) { startViewAnim(0.0F, 1.0F, 400, step); } }
private void startAnim(int step) { if (step == 1) { stopAnim(); startViewAnim(0.0F, 1.0F, 600, step); }else if (step == 2) { startViewAnim(0.0F, 1.0F, 400, step); } }
protected void decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, java.util.List<java.lang.Object> out) throws java.lang.Exception { int numRequest = in.readInt(); java.lang.String URIs = hivemall.mix.yarn.network.NettyUtils.readString(in); out.add(new hivemall.mix.yarn.network.M...
protected void decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, java.util.List<java.lang.Object> out) throws java.lang.Exception { int numRequest = in.readInt(); java.lang.String URIs = hivemall.mix.yarn.network.NettyUtils.readString(in); out.add(new hivemall.mix.yarn.network.M...
public void onClick(android.view.View view) { switch (view.getId()) { case R.id.search_for_nursery : ((com.kareem.mynursery.NavigationContext) (parentActivity)).navigate(com.kareem.mynursery.nursery.NurseryListActivity.class); case R.id.profileAddNursery : ((com.kareem.mynurs...
public void onClick(android.view.View view) { switch (view.getId()) { case R.id.search_for_nursery : ((com.kareem.mynursery.NavigationContext) (parentActivity)).navigate(com.kareem.mynursery.nursery.NurseryListActivity.class); break; case R.id.profileAddNursery : ...
protected jd.http.Browser prepBrowser(final jd.http.Browser prepBr, final java.lang.String host) { if (!((browserPrepped.containsKey(prepBr)) && ((browserPrepped.get(prepBr)) == (java.lang.Boolean.TRUE)))) { super.prepBrowser(prepBr, host); prepBr.setCookie(jd.plugins.hoster.RockFileEu.COOKIE_HOST, ...
protected jd.http.Browser prepBrowser(final jd.http.Browser prepBr, final java.lang.String host) { if (!((browserPrepped.containsKey(prepBr)) && ((browserPrepped.get(prepBr)) == (java.lang.Boolean.TRUE)))) { super.prepBrowser(prepBr, host); prepBr.setCookie(jd.plugins.hoster.RockFileEu.COOKIE_HOST, ...
public void testsUnsupportedTagsJoin() { try { compile("{{#join}}{{/join}}"); } catch (com.github.mustachejava.MustacheException e) { assertThat(e.getMessage(), org.hamcrest.Matchers.containsString("Mustache function [join] must contain one and only one identifier")); } try { com...
public void testsUnsupportedTagsJoin() { try { compile("{{#join}}{{/join}}"); } catch (com.github.mustachejava.MustacheException e) { assertThat(e.getMessage(), containsString("Mustache function [join] must contain one and only one identifier")); } try { compile("{{#join delimite...
private void syncStacks() { if ((this.te) != null) { if ((this.slots) == null) this.slots = new net.minecraft.item.ItemStack[numSlots]; for (int i = 0; i < (this.slots.length); i++) { this.slots[i] = this.te.getStackInSlot((i + 1)); } } }
private void syncStacks() { if ((this.te) != null) { if ((this.slots) == null) this.slots = new net.minecraft.item.ItemStack[numSlots]; for (int i = 0; i < (this.slots.length); i++) { this.slots[i] = this.te.getStackInSlot(i); } } }
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_take_note); mToolbar = ((android.support.v7.widget.Toolbar) (findViewById(R.id.toolbar))); setSupportActionBar(mToolbar); mRealm = io.realm.Realm.getDefaultInstance();...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_take_note); mToolbar = ((android.support.v7.widget.Toolbar) (findViewById(R.id.toolbar))); setSupportActionBar(mToolbar); mRealm = io.realm.Realm.getDefaultInstance();...
public void testEscape() throws java.lang.Exception { open(URL); boolean escButtonClosedCal; openDatePicker(); org.openqa.selenium.WebElement element = findDomElement(org.openqa.selenium.By.cssSelector(SELECTED_DATE)); element.sendKeys(Keys.ESCAPE); assertFalse("Escape button did not close the c...
public void testEscape() throws java.lang.Exception { open(URL); openDatePicker(); org.openqa.selenium.WebElement element = findDomElement(org.openqa.selenium.By.cssSelector(SELECTED_DATE)); element.sendKeys(Keys.ESCAPE); assertFalse("Escape button did not close the calendar", isElementPresent(org.o...
public float getInterpolation(float input) { if (input < 0.5F) { return 0.5F * (out.getInterpolation((input * 2))); } return 0.5F * (1 + (out.getInterpolation(((input * 2) - 1)))); }
public float getInterpolation(float input) { if (input < 0.5F) { return 0.5F * (1 - (out.getInterpolation((1 - (input * 2))))); } return 0.5F * (1 + (out.getInterpolation(((input * 2) - 1)))); }
private void addControlsToGrid() { grid.add(taskId, 0, 0); grid.add(checkBox, 1, 0); grid.add(taskName, 2, 0); grid.add(taskStartDate, 3, 0, 1, 1); grid.add(taskDeadLine, 4, 0, 1, 1); }
private void addControlsToGrid() { grid.add(taskId, 0, 0); grid.add(checkBox, 1, 0); grid.add(taskName, 2, 0); grid.add(taskStartDate, 3, 0); grid.add(taskDeadLine, 4, 0); }
public void viewAllPermissions() { int userId = 2; org.activityinfo.store.spi.FormPermissions permissions = catalog.getForm(activityFormClass(1)).get().getPermissions(userId); assertThat(permissions.isVisible(), org.hamcrest.Matchers.equalTo(true)); assertThat(permissions.isEditAllowed(), org.hamcrest.M...
public void viewAllPermissions() { int userId = 2; org.activityinfo.store.spi.FormPermissions permissions = catalog.getForm(activityFormClass(1)).get().getPermissions(userId); assertThat(permissions.isVisible(), equalTo(true)); assertThat(permissions.isEditAllowed(), equalTo(true)); assertThat(permi...
public static eu.drus.jpa.unit.neo4j.graphml.AttributeType create(java.lang.String value) { switch (value) { case "boolean" : return eu.drus.jpa.unit.neo4j.graphml.AttributeType.BOOLEAN; case "int" : return eu.drus.jpa.unit.neo4j.graphml.AttributeType.INT; case "long"...
public static eu.drus.jpa.unit.neo4j.graphml.AttributeType create(final java.lang.String value) { switch (value) { case "boolean" : return eu.drus.jpa.unit.neo4j.graphml.AttributeType.BOOLEAN; case "int" : return eu.drus.jpa.unit.neo4j.graphml.AttributeType.INT; case ...
public void digitalWrite(int pin, int value) { byte[] buffer = new byte[]{ ((byte) (grovepi.GrovePi.Command.DIGITAL_WRITE)) , ((byte) (pin)) , ((byte) (value)) , Constants.UNUSED }; java.lang.System.out.print((((("<pin-" + pin) + "=>") + value) + ">")); getDirectAccess().write(buffer); }
public void digitalWrite(int pin, int value) { byte[] buffer = new byte[]{ ((byte) (grovepi.GrovePi.Command.DIGITAL_WRITE)) , ((byte) (pin)) , ((byte) (value)) , Constants.UNUSED }; getDirectAccess().write(buffer); }
public void testGetCustomer() { try { vu.fs.cs.swt.beans.Customer customer = new vu.fs.cs.swt.beans.Customer("John", "Doe", "johnny", "awesomePassword"); java.lang.String accountNumber = customer.getAccountNumber(); vu.fs.cs.swt.beans.Saving s = new vu.fs.cs.swt.beans.Saving(); s.set...
public void testGetCustomer() { try { vu.fs.cs.swt.beans.Customer customer = new vu.fs.cs.swt.beans.Customer("John", "Doe", "johnny", "awesomePassword"); java.lang.String accountNumber = customer.getAccountNumber(); vu.fs.cs.swt.beans.Saving s = new vu.fs.cs.swt.beans.Saving(customer); ...
public void run() { android.view.inputmethod.InputMethodManager inputManager = ((android.view.inputmethod.InputMethodManager) (cordova.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE))); android.view.View v = cordova.getActivity().getCurrentFocus(); if (v == null) { callbackContext.error...
public void run() { android.view.inputmethod.InputMethodManager inputManager = ((android.view.inputmethod.InputMethodManager) (cordova.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE))); android.view.View v = cordova.getActivity().getCurrentFocus(); if (v == null) { callbackContext.error...
public void onLeScan(android.bluetooth.BluetoothDevice device, int rssi, byte[] scanRecord) { if (device == null) return ; if (((device.getName()) == null) || (!(device.getName().contains("UAES")))) return ; com.clj.fastble.data.ScanResult scanResult = new com.clj.fastble.data.Scan...
public void onLeScan(android.bluetooth.BluetoothDevice device, int rssi, byte[] scanRecord) { if (device == null) return ; if ((device.getName()) == null) return ; com.clj.fastble.data.ScanResult scanResult = new com.clj.fastble.data.ScanResult(device, rssi, scanRecord, java.lang.S...
public static java.util.Date getRandomDate(java.util.Date minDate, java.util.Date maxDate) { java.util.GregorianCalendar gc = new java.util.GregorianCalendar(); gc.setTime(minDate); int minDay = gc.get(java.util.GregorianCalendar.DAY_OF_YEAR); gc.setTime(maxDate); int maxDay = gc.get(java.util.Grego...
public static java.util.Date getRandomDate(java.util.Date minDate, java.util.Date maxDate) { java.util.GregorianCalendar gc = new java.util.GregorianCalendar(); gc.setTime(minDate); int minDay = gc.get(java.util.GregorianCalendar.DAY_OF_YEAR); gc.setTime(maxDate); int maxDay = gc.get(java.util.Grego...
public dist.esper.core.message.NewStreamInstanceMessage read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, java.lang.Class<dist.esper.core.message.NewStreamInstanceMessage> type) { dist.esper.core.message.NewStreamInstanceMessage nsim = new dist.esper.core.message.NewStreamInstanceM...
public dist.esper.core.message.NewStreamInstanceMessage read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, java.lang.Class<dist.esper.core.message.NewStreamInstanceMessage> type) { dist.esper.core.message.NewStreamInstanceMessage nsim = new dist.esper.core.message.NewStreamInstanceM...
public static void removeEvent(net.sf.memoranda.date.CalendarDate date, int hh, int mm) { net.sf.memoranda.EventsManager.Day d = net.sf.memoranda.EventsManager.getDay(date); if (d == null) { d.getElement().removeChild(net.sf.memoranda.EventsManager.getEvent(date, hh, mm).getContent()); } }
public static void removeEvent(net.sf.memoranda.date.CalendarDate date, int hh, int mm) { if ((net.sf.memoranda.EventsManager.getDay(date)) == null) { net.sf.memoranda.EventsManager.getDay(date).getElement().removeChild(net.sf.memoranda.EventsManager.getEvent(date, hh, mm).getContent()); } }
public boolean isValid() { if (((startTime) != null) && ((endTime) != null)) { type = com.equinox.Todo.TYPE.EVENT; if (startTime.isBefore(endTime)) { return false; } }else if (((startTime) == null) && ((endTime) != null)) { type = com.equinox.Todo.TYPE.DEA...
public boolean isValid() { if (((startTime) != null) && ((endTime) != null)) { type = com.equinox.Todo.TYPE.EVENT; if (endTime.isBefore(startTime)) { return false; } }else if (((startTime) == null) && ((endTime) != null)) { type = com.equinox.Todo.TYPE.DEA...
public void update(org.newdawn.slick.GameContainer gc) { for (int i = 0; i < (numOfEnemies); i++) { if ((enemies[i].getHealth()) == 0) { enemies[i] = null; } if ((enemies[i]) != null) { enemies[i].update(gc); enemies[i].setRobotPos(robot.getPos()); ...
public void update(org.newdawn.slick.GameContainer gc) { for (int i = 0; i < (numOfEnemies); i++) { if ((enemies[i]) != null) { enemies[i].update(gc); enemies[i].setRobotPos(robot.getPos()); if ((enemies[i].getHealth()) == 0) { enemies[i] = null; ...
public int solution(java.lang.String S) { int result = 1; int leftNum = 0; for (char c : S.toCharArray()) { if (c == '(') { leftNum++; }else { leftNum--; } if (leftNum < 0) { result = 0; break; } } return result;...
public int solution(java.lang.String S) { int result = 1; int leftNum = 0; for (char c : S.toCharArray()) { if (c == '(') { leftNum++; }else { leftNum--; } if (leftNum < 0) { result = 0; break; } } if (leftNum !=...
public SigmaEC.util.Option<java.lang.String[]> getOptionalStringArrayParameter(final java.lang.String parameterName) { assert parameterName != null; final java.lang.String value = properties.getProperty(parameterName); return value == null ? Option.NONE : new SigmaEC.util.Option<java.lang.String[]>(getStrin...
public SigmaEC.util.Option<java.lang.String[]> getOptionalStringArrayParameter(final java.lang.String parameterName) { assert parameterName != null; assert !(parameterName.isEmpty()); final java.lang.String value = properties.getProperty(parameterName); return value == null ? Option.NONE : new SigmaEC.u...
protected void createHeader() { setPrimaryStyleName("valo-menu"); addStyleName("valo-menu-part"); com.vaadin.ui.HorizontalLayout headercontent = new com.vaadin.ui.HorizontalLayout(header); headercontent.setMargin(false); for (com.vaadin.ui.Component component : headercontent) { headercontent...
protected void createHeader() { setPrimaryStyleName("valo-menu"); addStyleName("valo-menu-part"); com.vaadin.ui.HorizontalLayout headercontent = new com.vaadin.ui.HorizontalLayout(this.header); headercontent.setMargin(false); for (com.vaadin.ui.Component component : headercontent) { headerco...
public static java.lang.String getMsg(java.lang.String msg, double amount, java.lang.String killed, java.lang.String killer, java.lang.String karma) { msg = msg.replaceAll("<killed>", killed).replaceAll("<killer>", killer); if ((com.codisimus.plugins.pvpreward.PvPReward.negative) && (!(karma.equals("0")))) ...
public static java.lang.String getMsg(java.lang.String msg, double amount, java.lang.String killed, java.lang.String killer, java.lang.String karma) { msg = msg.replace("<killed>", killed).replace("<killer>", killer); if ((com.codisimus.plugins.pvpreward.PvPReward.negative) && (!(karma.equals("0")))) ms...
public au.edu.jcu.v4l4j.VideoFrame encode(au.edu.jcu.v4l4j.BaseVideoFrame frame) throws au.edu.jcu.v4l4j.exceptions.V4L4JException { au.edu.jcu.v4l4j.encoder.AbstractConvertedVideoFrame outFrame = availableFrames.poll(); this.putBuffer(this.object, frame.getBytes(), frame.getFrameLength()); this.doConvert(t...
public au.edu.jcu.v4l4j.VideoFrame encode(au.edu.jcu.v4l4j.BaseVideoFrame frame) throws au.edu.jcu.v4l4j.exceptions.V4L4JException { au.edu.jcu.v4l4j.encoder.AbstractConvertedVideoFrame outFrame = availableFrames.poll(); this.putBuffer(frame.getBytes(), frame.getFrameLength()); this.doConvert(); int len...
public void surfaceChanged(android.view.SurfaceHolder holder, int format, int width, int height) { javax.microedition.khronos.egl.EGL10 egl = ((javax.microedition.khronos.egl.EGL10) (javax.microedition.khronos.egl.EGLContext.getEGL())); org.yabause.android.YabauseRunnable.lockGL(); egl.eglMakeCurrent(mEglDi...
public void surfaceChanged(android.view.SurfaceHolder holder, int format, int width, int height) { javax.microedition.khronos.egl.EGL10 egl = ((javax.microedition.khronos.egl.EGL10) (javax.microedition.khronos.egl.EGLContext.getEGL())); org.yabause.android.YabauseRunnable.lockGL(); egl.eglMakeCurrent(mEglDi...
private void parseZeile(int zeilennummer) { java.lang.String zeile = zeilen.get(zeilennummer); if (zeile.startsWith("?")) { wechsleAufgabe(); aktuelleAufgabe.setFrage(fragezeichenAnsEndeSetzen(zeile)); }else if (zeile.startsWith("*")) { aktuelleAufgabe.setRichtigeAntwort(...
private void parseZeile(int zeilennummer) { java.lang.String zeile = zeilen.get(zeilennummer); if (zeile.startsWith("?")) { wechsleAufgabe(); aktuelleAufgabe.setFrage(fragezeichenAnsEndeSetzen(zeile)); }else if (zeile.startsWith("*")) { aktuelleAufgabe.setRichtigeAntwort(...