buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public com.kepler.protocol.Request process(com.kepler.protocol.Request request) { if (log4jSupported) { com.kepler.header.Headers headers = request.headers(); if (headers != null) { java.lang.String trace = headers.get(Trace.TRACE, ""); org.apache.log4j.MDC.put(Trace.TRACE, t...
public com.kepler.protocol.Request process(com.kepler.protocol.Request request) { if (log4jSupported) { com.kepler.header.Headers headers = request.headers(); if (headers != null) { java.lang.String trace = headers.get(Trace.TRACE, ""); if (trace != null) { or...
public void onCreate(android.database.sqlite.SQLiteDatabase db) { android.util.Log.i(com.skyline.db.jerrymouse.core.datasource.SQLiteDataSource.LOG_TAG, "onCreate"); if ((com.skyline.db.jerrymouse.core.datasource.SQLiteDataSource.INIT_CALL_BACK) != null) { com.skyline.db.jerrymouse.core.datasource.SQLit...
public void onCreate(android.database.sqlite.SQLiteDatabase db) { android.util.Log.i(com.skyline.db.jerrymouse.core.datasource.SQLiteDataSource.LOG_TAG, "onCreate"); if ((com.skyline.db.jerrymouse.core.datasource.SQLiteDataSource.INIT_CALL_BACK) != null) { com.skyline.db.jerrymouse.core.datasource.SQLit...
public void dropAll(com.primetoxinz.stacksonstacks.IMultipartContainer container) { new java.lang.Thread(() -> { try { java.util.Collection c = container.getParts(); java.util.Iterator<com.primetoxinz.stacksonstacks.IMultipart> iter = c.iterator(); while (iter.hasNext()) ...
public void dropAll(com.primetoxinz.stacksonstacks.IMultipartContainer container) { try { new java.lang.Thread(() -> { java.util.Collection c = container.getParts(); java.util.Iterator<com.primetoxinz.stacksonstacks.IMultipart> iter = c.iterator(); while (iter.hasNext()) ...
private void storeResponseInfoFrom(org.apache.http.HttpResponse response) throws java.io.IOException { this.response = response; org.apache.http.HttpEntity entity = response.getEntity(); if (entity != null) { latestResponseContent = org.apache.commons.io.IOUtils.toByteArray(entity.getContent()); ...
private void storeResponseInfoFrom(org.apache.http.HttpResponse response) throws java.io.IOException { this.response = response; latestResponseCode = response.getStatusLine().getStatusCode(); org.apache.http.HttpEntity entity = response.getEntity(); if (entity != null) { latestResponseContent = ...
int move(int x, int y) { if (checkLocation(currentPlayer, x, y, true)) { piece[x][y] = currentPlayer; currentPlayer *= -1; if (shouldPass(currentPlayer)) { if (shouldPass((-(currentPlayer)))) { currentPlayer = 64; }else { java.lang.Syst...
int move(int x, int y) { if (checkLocation(currentPlayer, x, y, true)) { piece[x][y] = currentPlayer; currentPlayer *= -1; if (shouldPass(currentPlayer)) { if (shouldPass((-(currentPlayer)))) { currentPlayer *= -64; }else { java.lang.Sy...
private boolean checkForUniquenessConstraints(java.util.Set<java.lang.String> columnNames, java.lang.String tableConstraints, java.util.regex.Pattern regex) { java.util.regex.Matcher matcher = regex.matcher(tableConstraints); while (matcher.find()) { java.util.Set<java.lang.String> namesInExpressions = ...
private boolean checkForUniquenessConstraints(java.util.Set<java.lang.String> columnNames, java.lang.String tableConstraints, java.util.regex.Pattern regex) { if (tableConstraints == null) { return false; } java.util.regex.Matcher matcher = regex.matcher(tableConstraints); while (matcher.find())...
private void initMessages() { if ((vm.isRunning()) && (!(vm.getHasAgent()))) { setMessage(org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance().getConstants().liveSnapshotWithNoGuestAgentMsg()); } if (isValidateByVmSnapshots()) { initVmSnapshots(); }else { initVmDisks(); ...
private void initMessages() { if (vm.isRunning()) { setMessage(org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance().getConstants().liveSnapshotWithNoGuestAgentMsg()); } if (isValidateByVmSnapshots()) { initVmSnapshots(); }else { initVmDisks(); } }
private static java.lang.String getParentDomain(java.lang.String domain) { domain = uk.bl.api.OverallLicenseStatus.stripWWW(domain); com.google.common.net.InternetDomainName idn = com.google.common.net.InternetDomainName.from(domain); if (idn.isTopPrivateDomain()) return idn.name(); return ...
private static java.lang.String getParentDomain(java.lang.String domain) { domain = uk.bl.api.OverallLicenseStatus.stripWWW(domain); com.google.common.net.InternetDomainName idn = com.google.common.net.InternetDomainName.from(domain); if (idn.isTopPrivateDomain()) return idn.toString(); ret...
private int itemVisibility(int position) { do { position--; com.blunderer.materialdesignlibrary.models.ListItem item = getItem(position); if (item instanceof com.blunderer.materialdesignlibrary.models.NavigationDrawerListItemCollapsibleHeader) { return ((com.blunderer.materialdes...
private int itemVisibility(int position) { if (position == 0) return android.view.View.VISIBLE; do { position--; com.blunderer.materialdesignlibrary.models.ListItem item = getItem(position); if (item instanceof com.blunderer.materialdesignlibrary.models.NavigationDrawerListI...
private void resize(int length) { LineSegment[] newArr = new LineSegment[(segments.length) * 2]; for (int i = 0; i < (segments.length); i++) { newArr[i] = segments[i]; } segments = newArr; newArr = null; }
private void resize(int length) { LineSegment[] newArr = new LineSegment[length]; for (int i = 0; i < (segments.length); i++) { newArr[i] = segments[i]; } segments = newArr; newArr = null; }
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_bank); setSupportActionBar(toolbar); butterknife.ButterKnife.bind(this); mBankId = getIntent().getIntExtra(androks.rate.Activities.BankActivity.BANK_ID, 0); toolba...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_bank); butterknife.ButterKnife.bind(this); setSupportActionBar(toolbar); mBankId = getIntent().getIntExtra(androks.rate.Activities.BankActivity.BANK_ID, 0); toolba...
private Matrix getRGBMatrix(java.awt.image.BufferedImage image) { int n = image.getHeight(); int m = image.getWidth(); double[][] data = new double[n][m]; for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) data[i][j] = image.getRGB(i, j); return new Matrix(data...
private static Matrix getRGBMatrix(java.awt.image.BufferedImage image) { int n = image.getHeight(); int m = image.getWidth(); double[][] data = new double[n][m]; for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) data[i][j] = image.getRGB(j, i); return new Matr...
public void addItem(Item item, int count) { if ((count < 1) || (item == null)) { return ; } if (allItems.containsKey(item)) { allItems.put(item, ((allItems.get(item)) + count)); }else { allItems.put(item, count); } }
public void addItem(Item item, int count) throws java.lang.Exception { if ((count < 1) || (item == null)) { return ; } if (allItems.containsKey(item)) { allItems.put(item, ((allItems.get(item)) + count)); }else { allItems.put(item, count); } if ((allItems.get(item)) < 0) ...
public boolean requiresPassword(org.eclipse.datatools.connectivity.IConnectionProfile connectionProfile) { java.util.Properties props = connectionProfile.getBaseProperties(); java.lang.String contextFactory = props.getProperty(ICredentialsCommon.SECURITY_TYPE_ID); if ((contextFactory != null) && (!(contextF...
public boolean requiresPassword(org.eclipse.datatools.connectivity.IConnectionProfile connectionProfile) { java.util.Properties props = connectionProfile.getBaseProperties(); java.lang.String contextFactory = props.getProperty(ICredentialsCommon.SECURITY_TYPE_ID); if (((contextFactory != null) & (!(contextF...
public java.util.ArrayList<java.lang.String> getSpawns() { java.util.Set<java.lang.String> spawns = getConfig().getConfigurationSection("spawns").getKeys(false); java.util.ArrayList<java.lang.String> spawnsNew = new java.util.ArrayList<>(); for (java.lang.String name : spawns) { spawns.add(name); ...
public java.util.ArrayList<java.lang.String> getSpawns() { java.util.Set<java.lang.String> spawns = getConfig().getConfigurationSection("spawns").getKeys(false); java.util.ArrayList<java.lang.String> spawnsNew = new java.util.ArrayList<>(); for (java.lang.String name : spawns) { spawnsNew.add(name);...
private void showEditWindow(java.lang.String title) { org.libreplan.web.resources.worker.WorkerCRUDController.LOG.info(("WorkerCRUDController.showEditWindow" + (getWorker()))); personalDataTab.setSelected(true); ((org.zkoss.zul.api.Caption) (editWindow.getFellow("caption"))).setLabel(title); getVisibili...
private void showEditWindow(java.lang.String title) { personalDataTab.setSelected(true); ((org.zkoss.zul.api.Caption) (editWindow.getFellow("caption"))).setLabel(title); getVisibility().showOnly(editWindow); org.libreplan.web.common.Util.reloadBindings(editWindow); }
public ir.rasen.charsoo.controller.helper.ServerAnswer executeList(android.content.Context context) throws java.lang.Exception { if (!(ir.rasen.charsoo.controller.helper.NetworkHandler.isNetworkAvailable(context))) return ir.rasen.charsoo.controller.helper.WebservicesHandler.getNetworkConnectionError(); ...
public ir.rasen.charsoo.controller.helper.ServerAnswer executeList(android.content.Context context) throws java.lang.Exception { if (!(ir.rasen.charsoo.controller.helper.NetworkHandler.isNetworkAvailable(context))) return ir.rasen.charsoo.controller.helper.WebservicesHandler.getNetworkConnectionError(); ...
public static void main(java.lang.String[] args) { java.lang.System.out.println("UTOT MO JEZZA"); userInterface.MainGameFrame frame1 = new userInterface.MainGameFrame(); java.lang.System.out.println("Igi"); frame1.setDefaultLookAndFeelDecorated(true); frame1.setDefaultCloseOperation(javax.swing.JFra...
public static void main(java.lang.String[] args) { userInterface.MainGameFrame frame1 = new userInterface.MainGameFrame(); frame1.setDefaultLookAndFeelDecorated(true); frame1.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE); frame1.setSize(1000, 600); frame1.setLocationRelativeTo(null); ...
public void addFront(int data) { if ((head) == null) head = new doublelinkedlist.Link(data); else { doublelinkedlist.Link newLink = new doublelinkedlist.Link(null, data, head); head.previous = newLink; head = newLink; (size)++; } }
public void addFront(java.lang.String data) { if ((head) == null) head = new doublelinkedlist.Link(data); else { doublelinkedlist.Link newLink = new doublelinkedlist.Link(null, data, head); head.previous = newLink; head = newLink; (size)++; } }
public void testGetPartWithSize() { org.junit.Assert.assertEquals(123456789, be.inniger.euler.util.Maths.getPart(123456789, 0, 9, 9)); org.junit.Assert.assertEquals(23456789, be.inniger.euler.util.Maths.getPart(123456789, 1, 9, 9)); org.junit.Assert.assertEquals(12345678, be.inniger.euler.util.Maths.getPart...
public void testGetPartWithSize() { org.junit.Assert.assertEquals(123456789, getPart(123456789, 0, 9, 9)); org.junit.Assert.assertEquals(23456789, getPart(123456789, 1, 9, 9)); org.junit.Assert.assertEquals(12345678, getPart(123456789, 0, 8, 9)); org.junit.Assert.assertEquals(345, getPart(123456789, 2, ...
public bg.tues.DCL.Value evaluate() { initExpression.evaluate(); bg.tues.DCL.Value value = condition.evaluate(); if (!(value.isBoolean())) { throw new java.lang.RuntimeException((("Illegal boolean expression " + "inside for-statement: ") + value)); } for (initExpression.evaluate(); condition...
public bg.tues.DCL.Value evaluate() { initExpression.evaluate(); bg.tues.DCL.Value value = condition.evaluate(); if (!(value.isBoolean())) { throw new java.lang.RuntimeException((("Illegal boolean expression " + "inside for-statement: ") + value)); } for (initExpression.evaluate(); condition...
public boolean preHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object handler) throws java.lang.Exception { if (isInclude(request.getRequestURI())) { if (SessionManager.INSTANCE.isNotLogin(request.getSession())) { response.sendR...
public boolean preHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object handler) throws java.lang.Exception { if (SessionManager.INSTANCE.isNotLogin(request.getSession())) { response.sendRedirect(com.hao.constants.Constants.LOGIN_URI); ...
public void run() { btAdapter.cancelDiscovery(); try { btSocket.connect(); } catch (java.io.IOException e) { try { btSocket.close(); } catch (java.io.IOException f) { } } mChat.ncThread = null; mChat.connected(btSocket, btDevice); }
public void run() { btAdapter.cancelDiscovery(); try { btSocket.connect(); } catch (java.io.IOException e) { try { btSocket.close(); } catch (java.io.IOException f) { } return ; } mChat.ncThread = null; mChat.connected(btSocket, btDevice); }
@org.python.expose.ExposedMethod(doc = BuiltinDocs.dict___getitem___doc) final org.python.core.PyObject stringmap___getitem__(org.python.core.PyObject key) { if (key instanceof org.python.core.PyString) { return __getitem__(((org.python.core.PyString) (key)).internedString()); }else { org.python...
@org.python.expose.ExposedMethod(doc = BuiltinDocs.dict___getitem___doc) final org.python.core.PyObject stringmap___getitem__(org.python.core.PyObject key) { if (key instanceof org.python.core.PyString) { return __getitem__(((org.python.core.PyString) (key)).internedString()); }else { org.python...
private void clear() { android.view.View pageFill = getPageFill(); android.view.View pageFree = getPageFree(); detachViewFromParent(pageFill); org.looa.demoaboutlayout.LayoutParams params = ((org.looa.demoaboutlayout.LayoutParams) (pageFree.getLayoutParams())); params.topMargin = 0; pageFree.set...
private void clear() { android.view.View pageFill = getPageFill(); android.view.View pageFree = getPageFree(); detachViewFromParent(pageFill); org.looa.demoaboutlayout.LayoutParams params = ((org.looa.demoaboutlayout.LayoutParams) (pageFree.getLayoutParams())); params.topMargin = 0; pageFree.set...
public void actionPerformed(java.awt.event.ActionEvent e) { java.util.Date dt = new java.util.Date(); java.util.Calendar cal = java.util.GregorianCalendar.getInstance(); cal.setTime(dt); int hours = cal.get(java.util.Calendar.HOUR); model.PredictionTime time = (hours <= 12) ? model.PredictionTime.MO...
public void actionPerformed(java.awt.event.ActionEvent e) { java.util.Date dt = new java.util.Date(); java.util.Calendar cal = java.util.GregorianCalendar.getInstance(); cal.setTime(dt); int hours = cal.get(java.util.Calendar.HOUR); model.PredictionTime time = (hours <= 12) ? model.PredictionTime.AF...
public boolean cancelJob(java.util.List<gr.tuc.softnet.core.NodeStatus> nodes, java.lang.String jobID) { gr.tuc.softnet.engine.MCJob job = jobInfo.get(jobID); if (job == null) { logger.error((("Job: " + jobID) + " is not handled bu this JobManager")); return dataTransport.cancelJob(coordinator.g...
public boolean cancelJob(java.util.List<gr.tuc.softnet.core.NodeStatus> nodes, java.lang.String jobID) { gr.tuc.softnet.engine.MCJob job = jobInfo.get(jobID); if (job == null) { logger.error((("Job: " + jobID) + " is not handled bu this JobManager")); return dataTransport.cancelJob(jobID, jobID,...
public java.math.BigInteger toBigInteger() { final byte[] barr = new byte[21]; barr[0] = 0; java.lang.System.arraycopy(getBytes(), 0, barr, 1, 20); return new java.math.BigInteger(barr); }
public java.math.BigInteger toBigInteger() { final byte[] barr = new byte[(getBytes().length) + 1]; barr[0] = 0; java.lang.System.arraycopy(getBytes(), 0, barr, 1, getBytes().length); return new java.math.BigInteger(barr); }
public int sameColorSamePosition(code c) { int count = 0; for (int i = 0; i < (colors.length); i++) { if (colors[i] = c.colors[i]) { count++; } } }
public int sameColorSamePosition(code c) { int count = 0; for (int i = 0; i < (colors.length); i++) { if ((colors[i]) == (c.colors[i])) { count++; } } return count; }
protected java.lang.String getStringValue(java.lang.Object element) { usingNullOrEmptyValue = false; if (element == null) { element = nullValue; usingNullOrEmptyValue = true; if (element == null) { return null; } } java.lang.String string = java.lang.String.va...
protected java.lang.String getStringValue(java.lang.Object element) { usingNullOrEmptyValue = false; if (element == null) { usingNullOrEmptyValue = true; return null; } java.lang.String string = java.lang.String.valueOf(element); if (string.isEmpty()) { usingNullOrEmptyValue ...
public org.broadleafcommerce.core.web.checkout.model.BillingInfoForm prePopulateBillingInfoForm(org.broadleafcommerce.core.web.checkout.model.BillingInfoForm billingInfoForm, org.broadleafcommerce.core.web.checkout.model.ShippingInfoForm shippingInfoForm, org.broadleafcommerce.core.order.domain.Order cart) { org.br...
public org.broadleafcommerce.core.web.checkout.model.BillingInfoForm prePopulateBillingInfoForm(org.broadleafcommerce.core.web.checkout.model.BillingInfoForm billingInfoForm, org.broadleafcommerce.core.web.checkout.model.ShippingInfoForm shippingInfoForm, org.broadleafcommerce.core.order.domain.Order cart) { org.br...
public static void fillMatrix() { java.util.Random rand = new java.util.Random(); for (int i = 0; i < (Lab2.GaussJordan.SIZE); i++) { for (int j = 0; j < (Lab2.GaussJordan.SIZE); j++) { Lab2.GaussJordan.Matrix[i][j] = (rand.nextDouble()) * ((rand.nextInt(1000)) - 500); Lab2.Gauss...
public static void fillMatrix() { java.util.Random rand = new java.util.Random(); for (int i = 0; i < (Lab2.GaussJordan.SIZE); i++) { for (int j = 0; j < (Lab2.GaussJordan.SIZE); j++) { Lab2.GaussJordan.Matrix[i][j] = (rand.nextDouble()) * ((rand.nextInt(1000)) - 500); } } }
public void onUpgrade(android.database.sqlite.SQLiteDatabase db, int oldVersion, int newVersion) { int upgradeTo = oldVersion + 1; while (upgradeTo <= newVersion) { switch (upgradeTo) { case 8 : db.execSQL(java.lang.String.format("UPDATE %s SET %s=%s*100;", DayPointsProviderM...
public void onUpgrade(android.database.sqlite.SQLiteDatabase db, int oldVersion, int newVersion) { int upgradeTo = oldVersion + 1; while (upgradeTo <= newVersion) { switch (upgradeTo) { case 8 : db.execSQL(java.lang.String.format("UPDATE %s SET %s=%s*100;", DayPointsProviderM...
public void start(javafx.stage.Stage stage) { this.stage = stage; this.sprites = new nl.tudelft.scrumbledore.SpriteStore(); setupGame(); setupGUI(); addKeyEventListeners(scene); addButtonEventListeners(); addWindowEventListeners(stage); renderStatic(); animationTimer.start(); sta...
public void start(javafx.stage.Stage stage) { this.stage = stage; this.sprites = new nl.tudelft.scrumbledore.SpriteStore(); setupGame(); setupGUI(); addKeyEventListeners(scene); addButtonEventListeners(); renderStatic(); animationTimer.start(); stage.show(); }
public br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentConfig asConfig() { return new br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentConfig(credentialId, awsRegion, applicationName, environmentName, bucketName, keyPrefix, versionLabelFormat, rootObject, includes, excludes, zeroDownt...
public br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentConfig asConfig() { return new br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentConfig(credentialId, awsRegion, applicationName, environmentName, bucketName, keyPrefix, versionLabelFormat, rootObject, includes, excludes, zeroDownt...
public void setKiShoot(java.lang.String ship, java.lang.String gegner, java.lang.String pos, java.lang.String orientation) { java.lang.String text = (((((ship + ";") + gegner) + ";") + pos) + ";") + orientation; server.setAttack(text); }
public void setKiShoot(java.lang.String ship, java.lang.String gegner, java.lang.String pos, java.lang.String orientation) { java.lang.String text = (((((ship + ";") + gegner) + ";") + pos) + ";") + orientation; setAttack(ship, gegner, pos, orientation); }
public void createRaavareBatch(DTO.RaavareBatchDTO raavarebatch) throws interfaces.DALException { query = "select * from raavarebatch where rb_id =" + (raavarebatch.getRbID()); java.sql.ResultSet result = c.doQuery(query); if (result != null) { java.lang.System.out.println("RB_ID already exsists"); ...
public void createRaavareBatch(DTO.RaavareBatchDTO raavarebatch) throws interfaces.DALException { query = ((((("Call opret_raavarebatch(" + (raavarebatch.getRbID())) + ", ") + (raavarebatch.getRaavareID())) + ", ") + (raavarebatch.getMaengde())) + ")"; c.doQuery(query); }
public void setGazetteerFeatureSeparator(java.lang.String sep) { gazetteerFeatureSeparator = sep; if ((sep == null) || (!(sep.isEmpty()))) { unescapedSeparator = gate.util.Strings.unescape("\\t"); }else { unescapedSeparator = gate.util.Strings.unescape(sep); } }
public void setGazetteerFeatureSeparator(java.lang.String sep) { gazetteerFeatureSeparator = sep; if ((sep == null) || (sep.isEmpty())) { unescapedSeparator = gate.util.Strings.unescape("\\t"); }else { unescapedSeparator = gate.util.Strings.unescape(sep); } }
public static java.lang.String replaceColorCodes(java.lang.String message) { for (org.bukkit.ChatColor color : $missing$) { message = message.replaceAll(java.lang.String.format("&%c", new java.lang.Object[]{ java.lang.Character.valueOf(color.getChar()) }), color.toString()); } return message; }
public static java.lang.String replaceColorCodes(java.lang.String message) { for (org.bukkit.ChatColor color : org.bukkit.ChatColor.values()) { message = message.replaceAll(java.lang.String.format("&%c", new java.lang.Object[]{ java.lang.Character.valueOf(color.getChar()) }), color.toString()); } re...
private org.ahocorasick.trie.State getState(org.ahocorasick.trie.State currentState, java.lang.Character character) { org.ahocorasick.trie.State newCurrentState = currentState.nextState(character); while (newCurrentState == null) { currentState = currentState.failure(); newCurrentState = current...
private org.ahocorasick.trie.State getState(org.ahocorasick.trie.State currentState, java.lang.Character character) { org.ahocorasick.trie.State newCurrentState = null; if (currentState != null) { newCurrentState = currentState.nextState(character); while ((newCurrentState == null) && ((currentS...
public void sendClientFinishedMessage() { Gdx.app.log("Client", "ClientFinishedMessage sent"); tuc.werkstatt.doubleup.Network.ClientFinishedMessage msg = new tuc.werkstatt.doubleup.Network.ClientFinishedMessage(); synchronized(lock) { msg.gameID = java.util.Arrays.asList(game.minigames).indexOf(curr...
public void sendClientFinishedMessage() { Gdx.app.log("Client", "ClientFinishedMessage sent"); tuc.werkstatt.doubleup.Network.ClientFinishedMessage msg = new tuc.werkstatt.doubleup.Network.ClientFinishedMessage(); synchronized(lock) { msg.gameID = java.util.Arrays.asList(game.minigames).indexOf(curr...
public void run() { keepListening = true; try { while (keepListening) { connectionHandler.HandleConnection(serverSocket.accept()); } } catch (java.io.IOException e) { keepListening = false; java.lang.System.err.printf("An error ocurred while accepting a connectio...
public void run() { keepListening = true; try { while (keepListening) { connectionHandler.HandleConnection(serverSocket.accept()); } } catch (java.io.IOException e) { keepListening = false; java.lang.System.err.println("An error ocurred while accepting a connecti...
public static synchronized void markAsCode(java.io.File file, int line) { java.util.List<java.lang.Integer> coverageInfo = ru.urururu.util.Coverage.coverage.computeIfAbsent(file, ( __) -> new java.util.ArrayList<>()); while ((coverageInfo.size()) < (line + 1)) { coverageInfo.add(null); } java.l...
private static synchronized void markAsCode(java.io.File file, int line) { java.util.List<java.lang.Integer> coverageInfo = ru.urururu.util.Coverage.coverage.computeIfAbsent(file, ( __) -> new java.util.ArrayList<>()); while ((coverageInfo.size()) < (line + 1)) { coverageInfo.add(null); } java....
public void onCreate(net.sqlcipher.database.SQLiteDatabase database) { super.onCreate(database); createTable(database, org.ei.opensrp.path.repository.PathRepository.Table.client, org.ei.opensrp.path.repository.PathRepository.client_column.values()); createTable(database, org.ei.opensrp.path.repository.PathR...
public void onCreate(net.sqlcipher.database.SQLiteDatabase database) { super.onCreate(database); createTable(database, org.ei.opensrp.path.repository.PathRepository.Table.client, org.ei.opensrp.path.repository.PathRepository.client_column.values()); createTable(database, org.ei.opensrp.path.repository.PathR...
public void actionPerformed(java.awt.event.ActionEvent e) { try { customer = q.getCustomer(customer.getCid(), customer.getPhone()); } catch (java.lang.Exception err) { java.lang.System.out.println("Error while updating"); err.printStackTrace(); } produceCustomerFrame(); frame...
public void actionPerformed(java.awt.event.ActionEvent e) { try { customer = q.getCustomer(customer.getCid(), customer.getPhone()); } catch (java.lang.Exception err) { java.lang.System.out.println("Error while updating"); err.printStackTrace(); } frame.setVisible(false); fram...
public static java.util.List<java.lang.String[]> read(java.lang.String filename, java.io.InputStream inputStream, int startRow) throws java.io.IOException { if (inputStream == null) { throw new java.lang.IllegalArgumentException("inputStream is null"); } return com.hust.mining.util.ExcelUtil.read(fi...
public static java.util.List<java.lang.String[]> read(java.lang.String filename, java.io.InputStream inputStream, int startRow) throws java.io.IOException { if (inputStream == null) { throw new java.lang.IllegalArgumentException("inputStream is null"); } return com.hust.mining.util.ExcelUtil.read(fi...
public void writeRecogLat(xmlParser.Ships shipList, java.lang.String filename, boolean imperial) { writeLatex((((((preamble(imperial)) + (startTable(imperial))) + (allShips(shipList, true))) + (endTable())) + (terminate())), filename, false); }
public void writeRecogLat(xmlParser.Ships shipList, java.lang.String filename, boolean imperial) { writeLatex((((((preamble(imperial)) + (startTable(imperial))) + (allShips(shipList, true))) + (endTable())) + (terminate())), filename, imperial); }
public void onScroll(android.widget.AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { lastItem = firstVisibleItem + visibleItemCount; android.util.Log.d(com.smart.travel.AdviceFragment.TAG, ((((("onScroll callback: " + firstVisibleItem) + ", ") + visibleItemCount) + ", ") + (la...
public void onScroll(android.widget.AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { lastItem = firstVisibleItem + visibleItemCount; if ((!(footerViewLoadingVisiable)) && (totalItemCount > visibleItemCount)) { adviceListView.addFooterView(footerViewLoading); ad...
public void createAdjList(int[][] data, int[] weight) { adjList = new java.util.ArrayList<graph.undirectedGraph.UGNode>(); if (((data == null) || (weight == null)) || ((data.length) != (weight.length))) return ; createAdjList(data); for (int i = 0; i < (weight.length); i++) adjList....
public void createAdjList(int[][] data, int[] weight) { if (((data == null) || (weight == null)) || ((data.length) != (weight.length))) return ; adjList = new java.util.HashMap<java.lang.Integer, graph.undirectedGraph.UGNode>(); createAdjList(data); for (int i = 0; i < (weight.length); i++)...
public boolean onPushMsg(android.content.Context context, byte[] msg, android.os.Bundle bundle) { try { java.lang.String content = "收到一条Push消息: " + (new java.lang.String(msg, "UTF-8")); android.util.Log.d(PustDemoActivity.TAG, content); showPushMessage(PustDemoActivity.RECEIVE_PUSH_MSG, cont...
public boolean onPushMsg(android.content.Context context, byte[] msg, android.os.Bundle bundle) { try { java.lang.String content = "收到一条Push消息: " + (new java.lang.String(msg, "UTF-8")); } catch (java.lang.Exception e) { e.printStackTrace(); } return false; }
public void run() { while (open) { try { java.lang.String m = dIn.readUTF(); textView.addText((m + "\n")); } catch (java.lang.Exception e) { Client.ErrorDisplay.showError(e); } } try { socket.close(); } catch (java.lang.Exception err) ...
public void run() { while (open) { try { java.lang.String m = dIn.readUTF(); textView.addText((m + "\n")); } catch (java.lang.Exception e) { Client.ErrorDisplay.showError(e); open = false; } } try { socket.close(); } catch ...
public void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.nearbyRestaurantList = ((in.runtime.kartfood.ui.NewHomeActivity) (this.getActivity())).restaurantList; this.activity = ((in.runtime.kartfood.ui.NewHomeActivity) (this.getActivity())); }
public void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.nearbyRestaurantList = new java.util.ArrayList(((in.runtime.kartfood.ui.NewHomeActivity) (this.getActivity())).restaurantList); this.activity = ((in.runtime.kartfood.ui.NewHomeActivity) (this.getActivity())...
private int findNNPEnd(java.util.List<uk.gov.dstl.baleen.types.language.WordToken> tokens, int firstToken) { int end = tokens.get(firstToken).getEnd(); for (int j = firstToken + 1; j < (tokens.size()); j++) { if ("NNP".equals(tokens.get(j).getPartOfSpeech())) { end = tokens.get(j).getEnd(); ...
private int findNNPEnd(java.util.List<uk.gov.dstl.baleen.types.language.WordToken> tokens, int firstToken) { int end = tokens.get(firstToken).getEnd(); for (int j = firstToken + 1; j < (tokens.size()); j++) { if ("NNP".equals(tokens.get(j).getPartOfSpeech())) { end = tokens.get(j).getEnd(); ...
public void paint(java.awt.Graphics g) { if ((drawArtificalMouseCursor) && (moveBackCursor)) { super.paint(g); g.drawImage(mousePointer, lastSure.x, lastSure.y, null); }else if (!(isDone)) { super.paint(g); } g.drawImage(im, 0, 0, null); }
public void paint(java.awt.Graphics g) { super.paint(g); if ((drawArtificalMouseCursor) && (moveBackCursor)) { g.drawImage(mousePointer, lastSure.x, lastSure.y, null); } g.drawImage(im, 0, 0, null); }
public void paintBlocks(java.awt.Graphics g) { int blockNum = 0; for (int i = 0; i <= (getWidth()); i += 100) { if (redBlock[blockNum]) { g.setColor(brick); g.fillRect(i, 0, 50, 50); } blockNum++; g.setColor(java.awt.Color.white); } }
public void paintBlocks(java.awt.Graphics g) { int blockNum = 0; for (int i = 0; (i < (redBlock.length)) && ((i * 100) <= (getWidth())); i++) { if (redBlock[blockNum]) { g.setColor(brick); g.fillRect((i * 100), 0, 50, 50); } blockNum++; g.setColor(java.awt...
public void addGoal(long _goal) { if (((this.goal) + _goal) < 0) { long extra = (this.goal) + _goal; this.goal += _goal - extra; }else { this.goal = _goal; } }
public void addGoal(long _goal) { if (((this.goal) + _goal) < 0) { long extra = (this.goal) + _goal; this.goal += _goal - extra; }else { this.goal += _goal; } }
public void run() { myBluetooth.cancelDiscovery(); try { com.example.bmihaylov.rcremotecontrol.BluetoothDevicesFragment.bluetoothSocket.connect(); getDialog().dismiss(); com.example.bmihaylov.rcremotecontrol.BluetoothDevicesFragment.bluetoothSocket.getOutputStream().write("O".toString()....
public void run() { myBluetooth.cancelDiscovery(); try { com.example.bmihaylov.rcremotecontrol.BluetoothDevicesFragment.bluetoothSocket.connect(); getDialog().dismiss(); com.example.bmihaylov.rcremotecontrol.BluetoothDevicesFragment.bluetoothSocket.getOutputStream().write("O".getBytes())...
public void itemStateChanged(java.awt.event.ItemEvent e) { if (mleCheckBox.isSelected()) { FlagMLE = mrmc.gui.InputFileCard.USE_MLE; }else { FlagMLE = mrmc.gui.InputFileCard.NO_MLE; } DBRecordStat.flagMLE = FlagMLE; DBRecordSize.flagMLE = FlagMLE; GUI.StatPanel1.resetStatPanel();...
public void itemStateChanged(java.awt.event.ItemEvent e) { if (mleCheckBox.isSelected()) { FlagMLE = mrmc.gui.InputFileCard.USE_MLE; }else { FlagMLE = mrmc.gui.InputFileCard.NO_MLE; } DBRecordStat.flagMLE = FlagMLE; GUI.StatPanel1.resetStatPanel(); GUI.StatPanel1.resetTable1(); ...
public java.util.Vector map(java.util.function.BiFunction<java.lang.Double, java.lang.Double, java.lang.Double> fun, double y) { int len = sto.size(); for (int i = 1; i < len; i++) sto.set(i, fun.apply(sto.get(i), y)); return this; }
public java.util.Vector map(java.util.function.BiFunction<java.lang.Double, java.lang.Double, java.lang.Double> fun, double y) { int len = sto.size(); for (int i = 0; i < len; i++) sto.set(i, fun.apply(sto.get(i), y)); return this; }
private java.util.Optional<address.model.AddressBook> getMirrorData() throws address.exceptions.FileContainsDuplicatesException { java.lang.System.out.println(("Updating data from cloud: " + (java.lang.System.nanoTime()))); final java.io.File mirrorFile = address.prefs.PrefsManager.getInstance().getMirrorLocati...
private java.util.Optional<address.model.AddressBook> getMirrorData() throws address.exceptions.FileContainsDuplicatesException { java.lang.System.out.println(("Updating data from cloud: " + (java.lang.System.nanoTime()))); final java.io.File mirrorFile = address.prefs.PrefsManager.getInstance().getMirrorLocati...
public void onUpdate() { if (((this.particleAge)++) >= (this.particleMaxAge)) { this.setExpired(); } this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ = this.posZ; this.moveEntity(this.motionX, this.motionY, this.motionZ); this.particleScale *= 0.85F; }
public void onUpdate() { if (((this.particleAge)++) >= (this.particleMaxAge)) { this.setExpired(); } this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ = this.posZ; this.moveEntity(this.motionX, this.motionY, this.motionZ); }
public void testValidStudentAddress() { try { student = new model.Student("Jacó Mario Souza", cpf, rg, date, email, address, phone1, phone2, "Milene Souza Medeiros", "Mário Souza Filho"); assertEquals(address, student.getAddress()); } catch (exception.StudentException e) { fail(("Should ...
public void testValidStudentAddress() { try { student = new model.Student("Jacó Mario Souza", cpf, rg, date, email, address, phone1, phone2, "Milene Souza Medeiros", "Mário Souza Filho", 1); assertEquals(address, student.getAddress()); } catch (exception.StudentException e) { fail(("Shou...
public static boolean isSorted(int[] arr, int min, int max) { for (int i = 0; i < ((arr.length) - 1); i++) { if ((arr[i]) > (arr[(i + 1)])) { return false; } } return true; }
public static boolean isSorted(int[] arr, int min, int max) { for (int i = min; i < (max - 1); i++) { if ((arr[i]) > (arr[(i + 1)])) { return false; } } return true; }
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main_page); android.support.design.widget.BottomNavigationView navigation = ((android.support.design.widget.BottomNavigationView) (findViewById(R.id.navigation))); navigat...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main_page); android.support.design.widget.BottomNavigationView navigation = ((android.support.design.widget.BottomNavigationView) (findViewById(R.id.navigation))); navigat...
public void onClick(android.view.View view) { android.preference.PreferenceScreen pref = ((android.preference.PreferenceScreen) (getPreferenceManager().findPreference(getKey()))); if ((pref != null) && ((pref.getDialog()) != null)) { pref.getDialog().dismiss(); }else { android.content.Intent...
public void onClick(android.view.View view) { android.preference.PreferenceScreen pref = ((android.preference.PreferenceScreen) (getPreferenceManager().findPreference(getKey()))); if ((pref != null) && ((pref.getDialog()) != null)) { pref.getDialog().dismiss(); }else { } }
public boolean allowSource(final org.wirez.core.graph.Node source, final org.wirez.core.graph.Edge<org.wirez.core.graph.content.view.View<?>, org.wirez.core.graph.Node> connector, final int magnet) { if (null != (canvasHandler)) { org.wirez.core.command.CommandResult<org.wirez.core.client.command.CanvasViol...
public boolean allowSource(final org.wirez.core.graph.Node source, final org.wirez.core.graph.Edge<org.wirez.core.graph.content.view.View<?>, org.wirez.core.graph.Node> connector, final int magnet) { if ((null != (canvasHandler)) && (null != source)) { org.wirez.core.command.CommandResult<org.wirez.core.cli...
private void updateArmorStats(gregtech.common.items.armor.ArmorData armorData, java.util.ArrayList<gregtech.common.items.armor.components.StatType> statTypes) { for (gregtech.common.items.armor.components.StatType statType : statTypes) { if (((armorData == null) || ((armorData.mStat) == null)) || (!(armorDa...
private void updateArmorStats(gregtech.common.items.armor.ArmorData armorData, java.util.ArrayList<gregtech.common.items.armor.components.StatType> statTypes) { for (gregtech.common.items.armor.components.StatType statType : statTypes) { if (((armorData == null) || ((armorData.mStat) == null)) || (!(armorDa...
public void update(long dt) { timer = (timer) + dt; if ((timer) == 10) { getWorld().addObject(new Model.Physics.Entity.Mobs.Enemy(((int) (getX())), ((int) (getY())), enemy)); timer = 0; } }
public void update(double dt) { timer = (timer) + dt; if ((timer) == 10) { getWorld().addObject(new Model.Physics.Entity.Mobs.Enemy(((int) (getX())), ((int) (getY())), enemy)); timer = 0; } }
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) { if (resultCode != (android.app.Activity.RESULT_OK)) { return ; } if (resultCode == (com.shahid.android.geoquiz.MainActivity.REQUEST_CODE_CHEAT)) { if (data == null) { return ; ...
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode != (android.app.Activity.RESULT_OK)) { return ; } if (requestCode == (com.shahid.android.geoquiz.MainActivity.REQUEST_CODE_CHEAT))...
protected void onPostExecute(java.util.ArrayList<com.example.fabiohh.popularmovies.models.MovieItem> movieItems) { if ((movieItems != null) && ((movieItems.size()) > 0)) { mImageAdapter.setData(movieItems); } if ((context) instanceof com.example.fabiohh.popularmovies.MainActivity) { ((com.ex...
protected void onPostExecute(java.util.ArrayList<com.example.fabiohh.popularmovies.models.MovieItem> movieItems) { if ((movieItems != null) && ((movieItems.size()) > 0)) { mImageAdapter.setData(movieItems); super.onPostExecute(movieItems); return ; } if ((context) instanceof com.exam...
public void run() { boolean[] available = impl.canSendMail(id, getContext()); java.util.List<org.apache.cordova.PluginResult> messages = new java.util.ArrayList<org.apache.cordova.PluginResult>(); messages.add(new org.apache.cordova.PluginResult(PluginResult.Status.OK, available[0])); messages.add(new o...
public void run() { boolean[] available = impl.canSendMail(null, getContext()); java.util.List<org.apache.cordova.PluginResult> messages = new java.util.ArrayList<org.apache.cordova.PluginResult>(); messages.add(new org.apache.cordova.PluginResult(PluginResult.Status.OK, available[0])); messages.add(new...
public void detectListenerWithStartOrientationDetectionWithCustomSmoothness() { addSensor(android.hardware.Sensor.TYPE_ACCELEROMETER); addSensor(android.hardware.Sensor.TYPE_MAGNETIC_FIELD); com.github.nisrulz.sensey.OrientationDetector.OrientationListener fakeListener = org.mockito.Mockito.mock(com.github....
public void detectListenerWithStartOrientationDetectionWithCustomSmoothness() { addSensor(android.hardware.Sensor.TYPE_ACCELEROMETER); addSensor(android.hardware.Sensor.TYPE_MAGNETIC_FIELD); com.github.nisrulz.sensey.OrientationDetector.OrientationListener fakeListener = org.mockito.Mockito.mock(com.github....
private int altn() throws java.lang.Exception { if ((_position) >= (_len)) return 0; if ((clause()) > 0) return 1; if ((_position) >= (_len)) return 0; return altn(); }
private int altn() throws java.lang.Exception { if ((_position) >= (_len)) return 0; if ((clause()) > 0) return 1; if ((_position) >= (_len)) return 0; altn(); return 0; }
private void jButtonDeleteMailActionPerformed(java.awt.event.ActionEvent evt) { if ((jMailTable.getSelectedRow()) >= 0) { int row = jMailTable.getSelectedRow(); if (emailController.removeEmail(emailList.get(row))) { emailList.remove(jMailTable.getSelectedRow()); emailTable.fi...
private void jButtonDeleteMailActionPerformed(java.awt.event.ActionEvent evt) { if ((jMailTable.getSelectedRow()) >= 0) { int row = jMailTable.getSelectedRow(); emailController.removeEmail(emailList.get(row)); emailList.remove(jMailTable.getSelectedRow()); emailTable.fireTableDataCha...
public com.amalto.core.storage.Storage get(java.lang.String storageName, com.amalto.core.storage.StorageType type) { if ((StorageAdmin.SYSTEM_STORAGE.equals(storageName)) && ((com.amalto.core.storage.StorageType.SYSTEM) == type)) { return null; }else { for (com.amalto.core.storage.Storage s : st...
public com.amalto.core.storage.Storage get(java.lang.String storageName, com.amalto.core.storage.StorageType type) { for (com.amalto.core.storage.Storage s : storages) { if ((s.getName().equals(storageName)) && ((s.getType()) == type)) { return s; } } return super.get(storageName...
public java.util.List<com.stratelia.webactiv.almanach.model.EventOccurrence> generateOccurrencesFrom(com.silverpeas.calendar.Date date, java.util.List<com.stratelia.webactiv.almanach.model.EventDetail> events) { java.util.Calendar endDate = java.util.Calendar.getInstance(); endDate.add(java.util.Calendar.YEAR, ...
public java.util.List<com.stratelia.webactiv.almanach.model.EventOccurrence> generateOccurrencesFrom(java.util.Date date, java.util.List<com.stratelia.webactiv.almanach.model.EventDetail> events) { java.util.Calendar endDate = java.util.Calendar.getInstance(); endDate.add(java.util.Calendar.YEAR, 100); retu...
public void add(int docid, double[] docvector) { org.meresco.lucene.search.PageRank.Node docnode = this.addDocNode(docid); for (int ord = 0; ord < (docvector.length); ord++) { org.meresco.lucene.search.PageRank.Node termnode = this.addTermNode(ord); this.addEdge(docnode, termnode, docvector[ord]...
public void add(int docid, double[] docvector) { org.meresco.lucene.search.PageRank.Node docnode = this.addDocNode(docid); for (int ord = 0; ord < (docvector.length); ord++) this.addEdge(docnode, this.addTermNode(ord), docvector[ord]); }
private linked_yarn.LinkedYarn.Node findFirstNodeWith(java.lang.String toFind) { if (this.isEmpty()) { return null; } linked_yarn.LinkedYarn.Node currentNode = this.head; while (currentNode != null) { if (currentNode.text.equals(toFind)) { return currentNode; }else { ...
private linked_yarn.LinkedYarn.Node findFirstNodeWith(java.lang.String toFind) { if (isEmpty()) { return null; } linked_yarn.LinkedYarn.Node currentNode = this.head; while (currentNode != null) { if (currentNode.text.equals(toFind)) { return currentNode; } cur...
public void onClick(android.view.View v) { isYinpinPlaying = !(isYinpinPlaying); isJiangjiePlaying = false; ivJiangjie.setBackgroundResource(R.mipmap.ic_play_blue); if (isYinpinPlaying) { ivYinpin.setBackgroundResource(R.mipmap.ic_pause_blue); if ((data.leftUri) != null) { tr...
public void onClick(android.view.View v) { isYinpinPlaying = !(isYinpinPlaying); isJiangjiePlaying = false; ivJiangjie.setBackgroundResource(R.mipmap.ic_play_blue); if (isYinpinPlaying) { ivYinpin.setBackgroundResource(R.mipmap.ic_pause_blue); if ((data.leftUri) != null) { au...
protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws java.lang.Exception { http.httpBasic().and().authorizeRequests().antMatchers("/index.html", "/home.html", "/login.html", "/").permitAll().anyRequest().authenticated().and().csrf().csrfTokenRepository(org.s...
protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws java.lang.Exception { http.csrf().csrfTokenRepository(org.springframework.security.web.csrf.CookieCsrfTokenRepository.withHttpOnlyFalse()).and().httpBasic().and().authorizeRequests().antMatchers("/index.ht...
private void handleTextMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage webSocketMessage) throws java.lang.Exception { log.debug("[id={}] Received text message: {}", session.getId(), webSocketMessage); java.lang.String chargeBoxId = getChargeBoxId(sessi...
private void handleTextMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage webSocketMessage) throws java.lang.Exception { java.lang.String incomingString = webSocketMessage.getPayload(); log.debug("[id={}] Received text message: {}", session.getId(), incom...
public org.eclipse.uml2.uml.Element GetElement(java.lang.String name) { for (net.menthor.ontouml2uml.RefOntoUML.Element elem : umap.keySet()) { if (elem instanceof net.menthor.ontouml2uml.RefOntoUML.NamedElement) { net.menthor.ontouml2uml.RefOntoUML.NamedElement nElem = ((net.menthor.ontouml2uml...
public org.eclipse.uml2.uml.Element GetElement(java.lang.String name) { for (net.menthor.ontouml2uml.RefOntoUML.Element elem : umap.keySet()) { if (elem instanceof net.menthor.ontouml2uml.RefOntoUML.NamedElement) { net.menthor.ontouml2uml.RefOntoUML.NamedElement nElem = ((net.menthor.ontouml2uml...
private void maxSellOrders(mt.Order o) throws mt.exception.ServerException { int i = 0; java.util.Set<mt.Order> orders = orderMap.get(o.getNickname()); for (java.util.Iterator<mt.Order> it = orders.iterator(); it.hasNext();) { mt.Order order = it.next(); if (order.isSellOrder()) ...
private boolean maxSellOrders(mt.Order o) throws mt.exception.ServerException { int i = 0; java.util.Set<mt.Order> orders = orderMap.get(o.getNickname()); for (java.util.Iterator<mt.Order> it = orders.iterator(); it.hasNext();) { mt.Order order = it.next(); if (order.isSellOrder()) ...
public static float calculateInSampleSize(int width, int height, int reqWidth, int reqHeight) { float inSampleSize = 1; while (((height / inSampleSize) > reqHeight) && ((width / inSampleSize) > reqWidth)) { inSampleSize += 0.1; } return inSampleSize; }
public static int calculateInSampleSize(int width, int height, int reqWidth, int reqHeight) { int inSampleSize = 1; while (((height / inSampleSize) > reqHeight) && ((width / inSampleSize) > reqWidth)) { inSampleSize += 1; } return inSampleSize; }
public int getUserTotalScore(java.lang.String username, java.sql.Connection connection) { if (connection == null) return sourcePackage.Database.NO_CONNECTION; try { java.sql.PreparedStatement ps = connection.prepareStatement((("select 'total_score' from " + (MyDBInfo.MYSQL_DATABASE_NAME)) +...
public int getUserTotalScore(java.lang.String username, java.sql.Connection connection) { if (connection == null) return sourcePackage.Database.NO_CONNECTION; try { java.sql.PreparedStatement ps = connection.prepareStatement((("select 'total_score' from " + (MyDBInfo.MYSQL_DATABASE_NAME)) +...
public void onItemClick(int mPosition, int j) { android.content.Intent i = new android.content.Intent(getApplicationContext(), com.nectar.thesun.ReadActivity.class); i.putExtra("listname", j); if (j == 0) { mPosition = MyConstants.homenews.get(mPosition).getPageid(); } i.putExtra("position",...
public void onItemClick(int mPosition, int j) { android.content.Intent i = new android.content.Intent(getApplicationContext(), com.nectar.thesun.ReadActivity.class); i.putExtra("listname", j); if (j == 0) { mPosition = MyConstants.homenews.get(mPosition).getPageid(); } i.putExtra("position",...
public void deletebtn(android.view.View view) { android.widget.Toast.makeText(getApplicationContext(), "Please remove old Shortcut from home screen. AutoSMS will no longer remember it.", Toast.LENGTH_LONG).show(); java.lang.System.out.println(("Id is " + (id))); com.abezukor.abezukor.autosms.DBHandler dbHan...
public void deletebtn(android.view.View view) { android.widget.Toast.makeText(getApplicationContext(), "Please remove old Shortcut from home screen. AutoSMS will no longer remember it.", Toast.LENGTH_LONG).show(); com.abezukor.abezukor.autosms.DBHandler dbHandler = new com.abezukor.abezukor.autosms.DBHandler(th...
void promoteLowToMediumOnWait() { if (((this.lowTick) % 5) == 0) { labs.one.util.Job j = this.low.shift(); if (j != null) { this.medium.push(j); } } (this.lowTick)++; }
void promoteLowToMediumOnWait() { if ((this.lowTick) == 5) { labs.one.util.Job j = this.low.shift(); if (j != null) { this.medium.push(j); } } (this.lowTick)++; }
public static void multiplesOfThreesAndFives() { int total = 0; for (int i = 0; i < 1000; i++) { if ((i % 3) == 0) { total += i; }else if ((i % 5) == 0) { total += i; } } }
public static int multiplesOfThreesAndFives() { int total = 0; for (int i = 0; i < 1000; i++) { if ((i % 3) == 0) { total += i; }else if ((i % 5) == 0) { total += i; } } return total; }
protected oop.ex4.data_structures.Node getNodeWithVal(int searchVal) { oop.ex4.data_structures.Node current = myRoot; oop.ex4.data_structures.Node last = null; while (current != null) { if (searchVal == (current.getKey())) { return current; }else { last = current; ...
protected oop.ex4.data_structures.Node getNodeWithVal(int searchVal) { oop.ex4.data_structures.Node current = myRoot; while (current != null) { if (searchVal == (current.getKey())) { return current; }else { if (searchVal < (current.getKey())) { current = c...
private void isTaskArrived() { for (int i = 0; i < (tasks.size()); i++) { Task temp = tasks.get(i); if ((temp.getStartTime()) == (MainScheduler.counter)) order(temp); } }
private void isTaskArrived() { for (int i = 0; i < (tasks.size()); i++) { Task temp = tasks.get(i); if ((temp.getStartTime()) <= (MainScheduler.counter)) order(temp); } }
public java.util.ArrayList<Coin> returnCoins(java.util.ArrayList<Coin> coins, Product product) { double difference = calcChangeDue(coins, product); while (difference > 0) if (difference >= 0.25) { quarterBank.remove(0); Quarter quarter = new Quarter(); coinsToReturn.a...
public java.util.ArrayList<Coin> returnCoins(java.util.ArrayList<Coin> coins, Product product) { double difference = calcChangeDue(coins, product); while (difference > 0) if (difference >= 0.25) { quarterBank.remove(0); Quarter quarter = new Quarter(); coinsToReturn.a...
public static java.util.ArrayList<model.roster.Student> getStudentsAssociatedWithRoster(model.roster.Roster roster) { java.util.ArrayList<model.roster.Student> list = new java.util.ArrayList<model.roster.Student>(); if ((model.server.Server.associatedClasses) != null) { for (model.roster.Student student...
public static java.util.ArrayList<java.lang.String> getStudentsAssociatedWithRoster(model.roster.Roster roster) { java.util.ArrayList<java.lang.String> list = new java.util.ArrayList<java.lang.String>(); if ((model.server.Server.associatedClasses) != null) { for (java.lang.String id : model.server.Serve...
public void animateText(java.lang.String text, chris234k.yorhawatchface.ICompletionCallback completionCallback) { if (!(mIsAnimating)) { mTextContent = text; mTextValue.replace(0, mTextValue.length(), ""); mTextIndex = 0; mFrameIndex = 0; mIsAnimating = true; mComplet...
public void animateText(java.lang.String text, chris234k.yorhawatchface.ICompletionCallback completionCallback) { if (!(mIsAnimating)) { mTextContent = text; mTextValue.replace(0, mTextValue.length(), ""); mTextIndex = 0; mFrameIndex = 1; mIsAnimating = true; mComplet...
public boolean acceptTrade(int playerIndex, boolean willAccept, int gameID) { shared.gameModel.GameModel serverModel = gamesList.get(gameID); if ((serverModel.getTradeOffer()) != null) { if (serverModel.canAcceptTrade(playerIndex, serverModel.getTradeOffer())) { new server.facade.AcceptTrade...
public boolean acceptTrade(int playerIndex, boolean willAccept, int gameID) { shared.gameModel.GameModel serverModel = gamesList.get(gameID); if ((serverModel.getTradeOffer()) != null) { new server.facade.AcceptTradeCommand(playerIndex, willAccept, serverModel).execute(); serverModel.incrementVe...
public void execute(final org.gradle.api.reporting.Report report) { org.gradle.api.internal.ConventionMapping mapping = ((org.gradle.api.internal.IConventionAware) (report)).getConventionMapping(); mapping.map("enabled", com.google.common.util.concurrent.Callables.returning(report.getName().equals("html"))); ...
public void execute(final org.gradle.api.reporting.Report report) { org.gradle.api.internal.ConventionMapping mapping = ((org.gradle.api.internal.IConventionAware) (report)).getConventionMapping(); mapping.map("enabled", com.google.common.util.concurrent.Callables.returning(report.getName().equals("html"))); ...
public void testCurry() { final int arg1 = 42; final double arg2 = 0.123; ru.spbau.mit.Function2<java.lang.Integer, java.lang.Double, java.lang.String> fun2 = new ru.spbau.mit.Function2<java.lang.Integer, java.lang.Double, java.lang.String>() { @java.lang.Override public java.lang.String app...
public void testCurry() { final int arg1 = 42; final double arg2 = 0.123; ru.spbau.mit.Function2<java.lang.Integer, java.lang.Double, java.lang.String> fun2 = new ru.spbau.mit.Function2<java.lang.Integer, java.lang.Double, java.lang.String>() { @java.lang.Override public java.lang.String app...
private java.io.File getInstallDirectory() { java.io.File installDirectory = new java.io.File(this.config.getInstallDirectory(), com.github.eirslett.maven.plugins.frontend.lib.YarnInstaller.INSTALL_PATH); if (!(installDirectory.exists())) { this.logger.debug("Creating install directory {}", installDirec...
private java.io.File getInstallDirectory() { java.io.File installDirectory = new java.io.File(config.getInstallDirectory(), com.github.eirslett.maven.plugins.frontend.lib.YarnInstaller.INSTALL_PATH); if (!(installDirectory.exists())) { logger.debug("Creating install directory {}", installDirectory); ...
public void testTakeTerritory() { board.changeTroops(alaska, 1); board.changeTroops(alberta, 100); board.setFaction(alaska, Colors.PINK); board.setFaction(alberta, Colors.BLACK); for (int i = 0; i < 1000; i++) { board.attack(alberta, alaska); } assertSame(Colors.BLACK, board.getFacti...
public void testTakeTerritory() { board.changeTroops(alaska, 0); board.changeTroops(alberta, 100); board.setFaction(alaska, Colors.PINK); board.setFaction(alberta, Colors.BLACK); board.attack(alberta, alaska); assertSame(Colors.BLACK, board.getFaction(alaska)); assertSame(3, board.getTroops(...
public void onOffsetChanged(android.support.design.widget.AppBarLayout appBarLayout, int verticalOffset) { if (((java.lang.Math.abs(verticalOffset)) >= ((appBarLayout.getTotalScrollRange()) / 2)) && (!(isColorChanged))) { setBackArrowColor(true); }else if (verticalOffset == 0) { setB...
public void onOffsetChanged(android.support.design.widget.AppBarLayout appBarLayout, int verticalOffset) { if (((java.lang.Math.abs(verticalOffset)) >= ((appBarLayout.getTotalScrollRange()) / 2)) && (!(isColorChanged))) { setBackArrowColor(true); }else if ((java.lang.Math.abs(verticalOffset)) <=...