buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public static void writeDictionary(java.lang.String dictionaryLocation) throws java.io.IOException { java.util.HashMap<java.lang.String, java.lang.Object> dict = new java.util.HashMap<java.lang.String, java.lang.Object>(); java.util.Scanner read = new java.util.Scanner(new java.io.FileReader(dictionaryLocation)...
public static void writeDictionary(java.lang.String dictionaryLocation) throws java.io.IOException { java.util.HashMap<java.lang.String, java.lang.Object> dict = new java.util.HashMap<java.lang.String, java.lang.Object>(); java.util.Scanner read = new java.util.Scanner(new java.io.FileReader(dictionaryLocation)...
public void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); mActivityContext = getActivity(); mApplicationContext = getActivity().getApplicationContext(); if ((getArguments()) != null) { mCategoryName = getArguments().getString(com.pratilipi.mobile.android.Pr...
public void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); mActivityContext = getActivity(); mApplicationContext = getActivity().getApplicationContext(); if ((getArguments()) != null) { mCategoryName = getArguments().getString(com.pratilipi.mobile.android.Pr...
public void onClick(android.view.View v) { android.util.SparseBooleanArray checked = daysList.getCheckedItemPositions(); java.util.ArrayList<java.lang.Integer> daysSelected = new java.util.ArrayList<java.lang.Integer>(); for (int i = 0; i < (checked.size()); i++) { daysSelected.add(i); } thi...
public void onClick(android.view.View v) { android.util.SparseBooleanArray checked = daysList.getCheckedItemPositions(); daysSelected = new java.util.ArrayList<java.lang.Integer>(); for (int i = 0; i < (checked.size()); i++) { daysSelected.add(i); } this.headBackToMainScreen(); }
public void testDescriptor() throws java.lang.Exception { org.datacleaner.descriptors.AnalyzerDescriptor<?> desc = org.datacleaner.descriptors.Descriptors.ofAnalyzer(org.datacleaner.beans.valuedist.ValueDistributionAnalyzer.class); assertEquals(0, desc.getInitializeMethods().size()); assertEquals(6, desc.ge...
public void testDescriptor() throws java.lang.Exception { org.datacleaner.descriptors.AnalyzerDescriptor<?> desc = org.datacleaner.descriptors.Descriptors.ofAnalyzer(org.datacleaner.beans.valuedist.ValueDistributionAnalyzer.class); assertEquals(0, desc.getInitializeMethods().size()); assertEquals(6, desc.ge...
public java.lang.String toString() { java.lang.String result = ""; if (organic) { result += "*"; } result += (name) + " "; if (fruit) { result += "(F) "; } result += ("- " + (weight)) + " lbs"; return result; }
public java.lang.String toString() { java.lang.String result = ""; if (this.organic) { result += "*"; } result += (this.name) + " "; if (this.fruit) { result += "(F) "; } result += ("- " + (this.weight)) + " lbs"; return result; }
public void handle(javafx.event.ActionEvent e) { root.getChildren().remove(makeMove); spacesToMove = ((int) ((java.lang.Math.random()) * 3)) + 1; (curSpace)++; targetX = control.tileList.get(curSpace).x; targetY = control.tileList.get(curSpace).y; startNanoTime = java.lang.System.nanoTime(); ...
public void handle(javafx.event.ActionEvent e) { root.getChildren().remove(makeMove); spacesToMove = ((int) ((java.lang.Math.random()) * 3)) + 1; targetX = control.tileList.get(((curSpace) + 1)).x; targetY = control.tileList.get(((curSpace) + 1)).y; startNanoTime = java.lang.System.nanoTime(); i...
public org.json.JSONArray getStoryData() { org.json.JSONArray storyArray = null; try { org.json.JSONArray mJSONArray = loadDataFromAsset(); for (int i = 2; i < (mJSONArray.length()); i++) { storyArray.put(mJSONArray.getJSONObject(i)); } } catch (org.json.JSONException ex)...
public org.json.JSONArray getStoryData() { org.json.JSONArray storyArray = new org.json.JSONArray(); try { org.json.JSONArray mJSONArray = loadDataFromAsset(); for (int i = 2; i < (mJSONArray.length()); i++) { storyArray.put(mJSONArray.getJSONObject(i)); } } catch (org.js...
private boolean deliverLevelParts(com.lappard.android.level.LevelCreator.PartAvailableListener listener) { if ((levelParts.size()) > (deliveredParts)) { java.util.List<com.badlogic.gdx.scenes.scene2d.Actor> result = createActors(levelParts.get(deliveredParts)); (deliveredParts)++; android.ut...
private boolean deliverLevelParts(com.lappard.android.level.LevelCreator.PartAvailableListener listener) { if ((levelParts.size()) > (deliveredParts)) { java.util.List<com.badlogic.gdx.scenes.scene2d.Actor> result = createActors(levelParts.get(deliveredParts)); (deliveredParts)++; listener.o...
protected void populateViewHolder(id.sch.smktelkom_mlg.project2.xirpl10816242534.oeripbedjoe.Fragment.Fragment2.BeratHolder beratViewHolder, id.sch.smktelkom_mlg.project2.xirpl10816242534.oeripbedjoe.DataAdapter data, int position) { beratViewHolder.setName(data.getTitle()); beratViewHolder.setText(data.getDesc...
public void populateViewHolder(id.sch.smktelkom_mlg.project2.xirpl10816242534.oeripbedjoe.Fragment.Fragment2.BeratHolder beratViewHolder, id.sch.smktelkom_mlg.project2.xirpl10816242534.oeripbedjoe.DataAdapter data, int position) { beratViewHolder.setName(data.getTitle()); beratViewHolder.setText(data.getDesc())...
public boolean removeClient(de.dhbwka.java.bombercat.Client client, java.util.Map<java.lang.String, de.dhbwka.java.bombercat.Lobby> lobbies) { boolean result = false; if (lobbyLeader.equals(client)) { deleteLobby(); lobbies.remove(getLobbyName()); result = true; }else { resul...
public boolean removeClient(de.dhbwka.java.bombercat.Client client, java.util.Map<java.lang.String, de.dhbwka.java.bombercat.Lobby> lobbies) { boolean result = false; if (lobbyLeader.equals(client)) { deleteLobby(lobbies); result = true; }else { result = clients.remove(client); ...
private int compareNumOfAllocations(com.example.nickozoulis.teamproj.domain.Referee lRef, com.example.nickozoulis.teamproj.domain.Referee rRef) { if ((lRef.getNumOfMatchAllocated()) > (rRef.getNumOfMatchAllocated())) return 1; if ((lRef.getNumOfMatchAllocated()) < (rRef.getNumOfMatchAllocated())) ...
private int compareNumOfAllocations(com.example.nickozoulis.teamproj.domain.Referee lRef, com.example.nickozoulis.teamproj.domain.Referee rRef) { if ((lRef.getNumOfMatchAllocated()) > (rRef.getNumOfMatchAllocated())) return 1; if ((lRef.getNumOfMatchAllocated()) < (rRef.getNumOfMatchAllocated())) ...
public void mouseAction(java.awt.event.MouseEvent e) { if ((((e.getModifiers()) & (java.awt.event.InputEvent.BUTTON3_MASK)) != 0) || (e.isPopupTrigger())) { org.parosproxy.paros.view.View.getSingleton().getPopupMenu().show(e.getComponent(), e.getX(), e.getY()); } }
public void mouseAction(java.awt.event.MouseEvent e) { if (e.isPopupTrigger()) { org.parosproxy.paros.view.View.getSingleton().getPopupMenu().show(e.getComponent(), e.getX(), e.getY()); } }
public int doEndTag() throws javax.servlet.jsp.JspException { try { java.lang.String bodyContentString = (null != (getBodyContent())) ? getBodyContent().getString() : ""; bodyContent = null; pageContext.getOut().write(bodyContentString); } catch (java.io.IOException e) { throw ne...
public int doEndTag() throws javax.servlet.jsp.JspException { try { java.lang.String bodyContentString = (null != (getBodyContent())) ? getBodyContent().getString() : ""; bodyContent = null; pageContext.getOut().write(bodyContentString); } catch (java.io.IOException | java.lang.RuntimeEx...
protected boolean updateVideoSize(int width, int height) { matrixManager.setIntrinsicVideoSize(width, height); updateMatrixOnLayout(); videoSize.x = width; videoSize.y = height; if ((width == 0) || (height == 0)) { return false; } android.view.SurfaceHolder holder = getHolder(); ...
protected boolean updateVideoSize(int width, int height) { matrixManager.setIntrinsicVideoSize(width, height); updateMatrixOnLayout(); videoSize.x = width; videoSize.y = height; return !((width == 0) || (height == 0)); }
private void pause(Bluetooth.BluetoothInterface.Packet packet) { if (playing) { try { Audio.SongPlayer.sleepNanos(packet.launchTime); } catch (java.lang.InterruptedException e) { java.lang.System.out.println(e); } speakerCache.stop(); playing = false; ...
private void pause(Bluetooth.BluetoothInterface.Packet packet) { if (playing) { new java.lang.Thread(() -> { try { Audio.SongPlayer.sleepNanos(packet.launchTime); } catch (java.lang.InterruptedException e) { java.lang.System.out.println(e); ...
public void init() { if (Heart.Heart_Core.initialized) { return ; } if (!(headless)) { initGUI(); redirectSystemStreams(); } initVariables(); initCfg(); initLog(); shareMediaDir(); initMediaManager(); initPatchThread(); }
public void init() { if (Heart.Heart_Core.initialized) { return ; } if (!(headless)) { initGUI(); redirectSystemStreams(); } initVariables(); initCfg(); initLog(); initMediaManager(); initPatchThread(); }
public boolean checkLogin(java.lang.String email, java.lang.String password) { password = hashString(password); java.sql.ResultSet resultSet = null; java.lang.String query = "SELECT email, password FROM User WHERE email = ? and password = ? "; try { java.sql.PreparedStatement pstmt = connection....
public boolean checkLogin(java.lang.String email, java.lang.String password) { password = hashString(password); java.lang.String query = "SELECT email, password FROM User WHERE email = ? and password = ? "; try { java.sql.PreparedStatement pstmt = connection.prepareStatement(query); pstmt.se...
public int findIndexFromKey(K key) { for (int i = 0; i < (internalMap.size()); i++) { if ((internalMap.get(i).getKey()) == key) return i; } return -1; }
public int findIndexFromKey(K key) { for (int i = 0; i < (internalMap.size()); i++) { if (internalMap.get(i).getKey().equals(key)) return i; } return -1; }
public void trickOver() { for (models.Card card : model.getCardsInPlay().getAllCards()) { } javax.swing.JOptionPane.showMessageDialog(view.getFrame(), "Trick over"); clearTable(); if (model.isHandOver()) { handOver(); } }
public void trickOver() { for (models.Card card : model.getCardsInPlay().getAllCards()) { models.Card c = card; } javax.swing.JOptionPane.showMessageDialog(view.getFrame(), "Trick over"); clearTable(); if (model.isHandOver()) { handOver(); } }
protected void beforeHookedMethod(com.woalk.apps.xposed.notifcount.MethodHookParam param) throws java.lang.Throwable { android.service.notification.StatusBarNotification sbn = ((android.service.notification.StatusBarNotification) (param.args[0])); if ((sbn.getNotification().number) == 0) { com.woalk.app...
protected void beforeHookedMethod(com.woalk.apps.xposed.notifcount.MethodHookParam param) throws java.lang.Throwable { android.service.notification.StatusBarNotification sbn = ((android.service.notification.StatusBarNotification) (param.args[0])); com.woalk.apps.xposed.notifcount.XposedMod.mSettingsHelper.reloa...
public void setMaxCount(java.lang.Integer max) { for (int i = 0; i <= (max + 1); i++) { itemList.add(i); } maxItems = max; currentPageListView.setEnabled(false); dataAdapter.setPagesNumber(itemList); currentPageListView.setAdapter(dataAdapter); maxPages.setText(max.toString()); }
public void setMaxCount(java.lang.Integer max) { for (int i = 0; i <= (max + 1); i++) { itemList.add(i); } maxItems = max; dataAdapter.setPagesNumber(itemList); currentPageListView.setAdapter(dataAdapter); maxPages.setText(max.toString()); }
private void checkAndAdd(java.util.Set<java.lang.String> classes, java.lang.String className) { for (java.lang.String excl : this.excludes) { if (excl.equals(className)) return ; if (excl.endsWith(".*")) { java.lang.String baseName = excl.substring(0, ((excl.length()...
private void checkAndAdd(java.util.Set<java.lang.String> classes, java.lang.String className) { if ((this.excludes) != null) for (java.lang.String excl : this.excludes) { if (excl.equals(className)) return ; if (excl.endsWith(".*")) { java...
public com.lucifer.utils.Result upload(@com.lucifer.controller.RequestParam(value = "file") org.springframework.web.multipart.MultipartFile file) { try { java.lang.String uploadUrl; uploadUrl = qiniuCloudService.simpleUploadWithoutKey(file.getBytes()); return com.lucifer.utils.Result.ok(uplo...
public com.lucifer.utils.Result upload(@com.lucifer.controller.RequestParam(value = "file") org.springframework.web.multipart.MultipartFile file) { try { java.lang.String uploadUrl; uploadUrl = qiniuCloudService.simpleUploadWithoutKey(file); return com.lucifer.utils.Result.ok(uploadUrl); ...
public long insert(io.keepcoding.rgs.everpobre.model.Notebook notebook) { if (notebook == null) { throw new java.lang.IllegalArgumentException("Passing NULL NOTEBOOK, imbecile"); } long id = db.getWritableDatabase().insert(DBConstants.TABLE_NOTEBOOK, null, this.getContentValues(notebook)); noteb...
public long insert(io.keepcoding.rgs.everpobre.model.Notebook notebook) { if (notebook == null) { throw new java.lang.IllegalArgumentException("Passing NULL NOTEBOOK, imbecile"); } long id = db.getWritableDatabase().insert(DBConstants.TABLE_NOTEBOOK, null, this.getContentValues(notebook)); noteb...
public boolean canPlaceRoadAtLocation(int playerIndex, client.models.mapdata.EdgeLocation edge) { if ((this.getEdgeOwner(edge)) != (-1)) return false; java.lang.Integer[] surrOwners = this.getAdjacentEdgeOwners(edge); if (java.util.Arrays.asList(surrOwners).contains(playerIndex)) return...
public boolean canPlaceRoadAtLocation(int playerIndex, client.models.mapdata.EdgeLocation edge) { if ((this.getEdgeOwner(edge)) != (-1)) return false; java.lang.Integer[] surrOwners = this.getAdjacentEdgeOwners(edge); if (surrOwners == null) return false; if (java.util.Arrays.a...
private void backupAllMenuItemAction() { int response = mainView.showConfirmationDialog("Back up vocab files", "This will overwrite all previous backup files. Are you sure?"); if (response == (javax.swing.JOptionPane.YES_OPTION)) { for (com.tkomiya.models.VocabList vlist : vocabLists) { java...
public void backupAllMenuItemAction() { int response = mainView.showConfirmationDialog("Back up vocab files", "This will overwrite all previous backup files. Are you sure?"); if (response == (javax.swing.JOptionPane.YES_OPTION)) { for (com.tkomiya.models.VocabList vlist : vocabLists) { java....
static byte[] readFile(java.io.File file) throws java.io.IOException { byte[] buffer = new byte[1024]; java.io.ByteArrayOutputStream bytes = new java.io.ByteArrayOutputStream(); java.io.FileInputStream fileInputStream = new java.io.FileInputStream(file); while (true) { int read = fileInputStream...
static byte[] readFile(java.io.File file) throws java.io.IOException { byte[] buffer = new byte[1024]; java.io.ByteArrayOutputStream bytes = new java.io.ByteArrayOutputStream(); java.io.FileInputStream fileInputStream = new java.io.FileInputStream(file); try { while (true) { int read...
public void readFields(java.io.DataInput in) throws java.io.IOException { int size = in.readInt(); shortestpath = new int[size]; for (int i = 0; i < size; i++) { shortestpath[i] = in.readInt(); } }
public void readFields(java.io.DataInput in) throws java.io.IOException { int size = in.readInt(); if (size == 0) { shortestpath = null; return ; } shortestpath = new int[size]; for (int i = 0; i < size; i++) { shortestpath[i] = in.readInt(); } }
public org.apache.cassandra.db.RowIndexEntry<org.apache.cassandra.io.sstable.IndexInfo> deserializeForCache(org.apache.cassandra.io.util.DataInputPlus in) throws java.io.IOException { assert version.storeRows(); long position = in.readUnsignedVInt(); switch (in.readByte()) { case org.apache.cassandr...
public org.apache.cassandra.db.RowIndexEntry<org.apache.cassandra.io.sstable.IndexInfo> deserializeForCache(org.apache.cassandra.io.util.DataInputPlus in) throws java.io.IOException { assert version.storeRows(); long position = in.readUnsignedVInt(); switch (in.readByte()) { case org.apache.cassandr...
public void shouldReturnNullDigestOnPartlyOverlappingWrites() throws java.io.IOException { chksumChannel.write(buffers[1], blocksize); chksumChannel.write(buffers[0], ((blocksize) - 1)); if ((blocksize) == 1) { fail("Pick a blocksize > 1 for testing correct handling of partly overlapping writes!"); ...
public void shouldReturnNullDigestOnPartlyOverlappingWrites() throws java.io.IOException { chksumChannel.write(buffers[1], blocksize); chksumChannel.write(buffers[0], ((blocksize) - 1)); if ((blocksize) == 1) { fail("Pick a blocksize > 1 for testing correct handling of partly overlapping writes!"); ...
public java.lang.String format(org.joda.time.DateTime dateTime, java.util.Locale locale) { if (dateTime == null) { return ""; } org.joda.time.DateTimeZone timeZone = dateTime.getZone(); long utcTime = timeZone.convertLocalToUTC(dateTime.getMillis(), false); dateTime = new org.joda.time.DateT...
public java.lang.String format(org.joda.time.DateTime dateTime) { if (dateTime == null) { return ""; } org.joda.time.DateTimeZone timeZone = dateTime.getZone(); long utcTime = timeZone.convertLocalToUTC(dateTime.getMillis(), false); dateTime = new org.joda.time.DateTime((utcTime + (offset)))...
public void testListUserAssociations() throws java.lang.Exception { org.wso2.is.portal.user.client.association.FederatedAccountAssociationClientService userAccountAssociationClientService = getFederatedAccountAssociationClientService(); org.wso2.carbon.security.caas.user.core.bean.User testUser = new org.wso2.c...
public void testListUserAssociations() throws java.lang.Exception { org.wso2.is.portal.user.client.association.FederatedAccountAssociationClientService userAccountAssociationClientService = getFederatedAccountAssociationClientService(); org.wso2.carbon.security.caas.user.core.bean.User testUser = new org.wso2.c...
public void setCoordinates(dev.eyesless.simple_weather_for_fishermans.geocoding_responce_classes.Location location) { cfinterface.setCoords((((java.lang.String.valueOf(location.getLat())) + " and ") + (java.lang.String.valueOf(location.getLng())))); if ((location.getLastlocation()) != null) setAutocompl...
public void setCoordinates(dev.eyesless.simple_weather_for_fishermans.geocoding_responce_classes.Location location) { if ((location.getLastlocation()) != null) { setAutocompleted(location.getLastlocation()); cfinterface.setDefoultLoc(); cfinterface.setLocUnavaliable(); }else { cf...
protected void intalizeDrawer() { moveDrawerToTop(); mDrawerLayout = ((android.support.v4.widget.DrawerLayout) (findViewById(R.id.drawer_layout))); menuItems = getResources().getStringArray(R.array.side_menu_items); mDrawerList = ((android.widget.ListView) (findViewById(R.id.left_drawer))); mDrawerL...
protected void intalizeDrawer() { moveDrawerToTop(); mDrawerLayout = ((android.support.v4.widget.DrawerLayout) (findViewById(R.id.drawer_layout))); menuItems = getResources().getStringArray(R.array.side_menu_items); mDrawerList = ((android.widget.ListView) (findViewById(R.id.left_drawer))); mDrawerL...
private java.lang.String getField(java.util.Map<java.lang.String, java.lang.Object> profile) { java.util.List<java.lang.String> map = ((java.util.List<java.lang.String>) (profile.get("summary"))); if ((map.size()) >= 2) { return map.get(1).toString(); }else { return ""; } }
private java.lang.String getField(java.util.Map<java.lang.String, java.lang.Object> profile) { java.util.List<java.lang.String> map = ((java.util.List<java.lang.String>) (profile.get("summary"))); if ((map != null) && ((map.size()) >= 2)) { return map.get(1).toString(); }else { return ""; ...
private static void compareHands(java.util.List<java.lang.Integer> x, java.util.List<java.lang.Integer> y, boolean[] a, boolean[] b) { int buildValue1 = week1Problems.P6.findValue(a); int buildValue2 = week1Problems.P6.findValue(b); if (buildValue1 > buildValue2) { java.lang.System.out.print("Player...
private static void compareHands(java.util.List<java.lang.Integer> x, java.util.List<java.lang.Integer> y, boolean[] a, boolean[] b) { int buildValue1 = week1Problems.P6.findValue(a); int buildValue2 = week1Problems.P6.findValue(b); if (buildValue1 > buildValue2) { java.lang.System.out.println("Play...
private void resetViewport() { final lecho.lib.hellocharts.model.Viewport v = new lecho.lib.hellocharts.model.Viewport(chart.getMaximumViewport()); v.bottom = (edu.zucc.xk31401419.mycurrencies.utils.MathUtil.getMaxAndMin(rateValuesTab)[1]) * ((float) (1.1)); v.top = (edu.zucc.xk31401419.mycurrencies.utils.M...
private void resetViewport() { final lecho.lib.hellocharts.model.Viewport v = new lecho.lib.hellocharts.model.Viewport(chart.getMaximumViewport()); v.bottom = (edu.zucc.xk31401419.mycurrencies.utils.MathUtil.getMaxAndMin(rateValuesTab)[1]) * ((float) (0.9)); v.top = (edu.zucc.xk31401419.mycurrencies.utils.M...
java.util.HashSet<uialgebra.algebra.UIATokenElement> getAllTop() { java.util.HashSet<uialgebra.algebra.UIATokenElement> erg = new java.util.HashSet<uialgebra.algebra.UIATokenElement>(); erg.add(this); if (!(getTop().isLastEdge())) for (uialgebra.algebra.UIATokenElement elem : getLeft().getLeftsideEl...
java.util.HashSet<uialgebra.algebra.UIATokenElement> getAllTop() { java.util.HashSet<uialgebra.algebra.UIATokenElement> erg = new java.util.HashSet<uialgebra.algebra.UIATokenElement>(); erg.add(this); if (!(getTop().isLastEdge())) for (uialgebra.algebra.UIATokenElement elem : getTop().getLeftsideEle...
public static java.lang.String format(final int year, final int month, final int day, final java.lang.String pattern) { final java.util.Calendar cal = java.util.Calendar.getInstance(java.util.TimeZone.getTimeZone("UTC")); cal.set(java.util.Calendar.YEAR, year); cal.set(java.util.Calendar.MONTH, month); ...
public static java.lang.String format(final int year, final int month, final int day, final java.lang.String pattern) { final java.util.Calendar cal = java.util.Calendar.getInstance(java.util.TimeZone.getTimeZone("UTC")); cal.set(java.util.Calendar.YEAR, year); cal.set(java.util.Calendar.MONTH, (month - 1))...
private void addMember(final com.enonic.xp.security.PrincipalKey container, final com.enonic.xp.security.PrincipalKey member) { try { securityService.addRelationship(com.enonic.xp.security.PrincipalRelationship.from(container).to(member)); com.enonic.xp.core.impl.security.SecurityInitializer.LOG.inf...
private void addMember(final com.enonic.xp.security.PrincipalKey container, final com.enonic.xp.security.PrincipalKey member) { try { securityService.addRelationship(com.enonic.xp.security.PrincipalRelationship.from(container).to(member)); com.enonic.xp.core.impl.security.SecurityInitializer.LOG.inf...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_chat); if (!(checkServiceAlive())) { return ; } mChatView.setLeftBubbleColor(Color.WHITE); mChatView.setSendIcon(R.drawable.ic_action_send); mChatView....
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_chat); if (!(checkServiceAlive())) { return ; } mChatView.setLeftBubbleColor(Color.WHITE); mChatView.setSendIcon(R.drawable.ic_action_send); mChatView....
public boolean createStudent(java.lang.String name, java.lang.String userID, java.lang.String pass) { if (user.isSet()) { if ((user.get().access()) == (AccessLevel.teacher)) { flash.card.java.model.Student s = new flash.card.java.model.Student(name, userID, pass); return this.db.putS...
public boolean createStudent(java.lang.String userID, java.lang.String pass, java.lang.String name) { if (user.isSet()) { if ((user.get().access()) == (AccessLevel.teacher)) { flash.card.java.model.Student s = new flash.card.java.model.Student(userID, pass, name); return this.db.putS...
public static java.lang.String omitEveryOther(java.lang.String word) { boolean keepCurrent = true; int i = 0; java.lang.String newSpeak = ""; while (i < (word.length())) { if (keepCurrent) { newSpeak += java.lang.String.valueOf(word.charAt(i)); keepCurrent = false; ...
public static java.lang.String omitEveryOther(java.lang.String word) { boolean keepCurrent = true; int i = 0; java.lang.String newSpeak = ""; while (i < (word.length())) { if (keepCurrent) { newSpeak += java.lang.String.valueOf(word.charAt(i)); keepCurrent = false; ...
public void onBarDelete(int total) { score += total; callback.onScoreChange(score); if (((score) % (home.tetris.Scene.SCORE_PER_LEVEL)) == 0) { (level)++; sound.play(Sound.LEVEL_UP); callback.onLevelUp(level); } deletingAnimation.falling(total); }
public void onBarDelete(int total) { score += total; callback.onScoreChange(score); if ((score) >= ((level) * (home.tetris.Scene.SCORE_PER_LEVEL))) { (level)++; sound.play(Sound.LEVEL_UP); callback.onLevelUp(level); } deletingAnimation.falling(total); }
public java.util.List<ralgorithm.State> pmove() { java.util.List<ralgorithm.State> states = new java.util.ArrayList<ralgorithm.State>(); ralgorithm.State state; while (true) { state = step(); if (state == null) { java.lang.System.out.println("Got NULL state"); break; ...
public java.util.List<ralgorithm.State> pmove() { java.util.List<ralgorithm.State> states = new java.util.ArrayList<ralgorithm.State>(); ralgorithm.State state; while (true) { state = step(); if (state == null) { break; } states.add(state); } for (ralgori...
private boolean isMonth(java.lang.String nextWord) { boolean ans = false; for (int i = 1; i < (monthsInYear.length); i++) { if (nextWord.equals(monthsInYear[i])) { ans = true; break; } } return ans; }
private boolean isMonth(java.lang.String nextWord) { boolean ans = false; for (int i = 1; i < (monthsInYear.length); i++) { if (nextWord.contains(monthsInYear[i])) { ans = true; break; } } return ans; }
public void put(KEY key, VALUE data) { java.lang.String s = datacache.Util.getMD5(key.toString()); try { datacache.disklrucache.DiskLruCache.Editor editor = mDiskIruCache.edit(s); if (editor != null) { java.io.OutputStream outputStream = editor.newOutputStream(0); mValueD...
public void put(KEY key, VALUE data) { java.lang.String s = datacache.Util.getMD5(key.toString()); try { datacache.disklrucache.DiskLruCache.Editor editor = mDiskIruCache.edit(s); if (editor != null) { java.io.OutputStream outputStream = editor.newOutputStream(0); mValueD...
protected me.aerovulpe.crawler.data.Photo[] doInBackground(android.database.Cursor... params) { if (params[0].isClosed()) return null; me.aerovulpe.crawler.data.Photo[] photos = null; try { photos = me.aerovulpe.crawler.data.Photo.arrayFromCursor(params[0]); } catch (android.databas...
protected me.aerovulpe.crawler.data.Photo[] doInBackground(android.database.Cursor... params) { if (params[0].isClosed()) return null; me.aerovulpe.crawler.data.Photo[] photos = null; try { photos = me.aerovulpe.crawler.data.Photo.arrayFromCursor(params[0]); } catch (android.databas...
public java.util.List<org.n52.series.api.v1.db.da.beans.ProcedureEntity> getAllInstances(org.n52.series.api.v1.db.da.DbQuery parameters) throws org.n52.series.api.v1.db.da.DataAccessException { org.hibernate.Criteria criteria = getDefaultCriteria("procedure"); if (hasTranslation(parameters, org.n52.series.api.v...
public java.util.List<org.n52.series.api.v1.db.da.beans.ProcedureEntity> getAllInstances(org.n52.series.api.v1.db.da.DbQuery parameters) throws org.n52.series.api.v1.db.da.DataAccessException { org.hibernate.Criteria criteria = getDefaultCriteria("procedure"); if (hasTranslation(parameters, org.n52.series.api.v...
public int getValue(gameplay.Card card) { int s = card.getSuit(); int val; switch (s) { case 0 : val = this.indexOf(spades, card); break; case 1 : val = this.indexOf(hearts, card); break; case 2 : val = this.indexOf(clubs, c...
public int getValue(gameplay.Card card) { int s = card.getSuit(); int val; switch (s) { case 0 : val = this.spades.indexOf(card); break; case 1 : val = this.hearts.indexOf(card); break; case 2 : val = this.clubs.indexOf(card...
private boolean editTask(java.lang.String rawInput) { java.util.ArrayList<java.lang.String> inputParts = breakString(rawInput); int taskID = convertToInt(getTaskID(inputParts)); java.lang.String date = getDateFromRaw(inputParts); if (isInvalidID(taskID)) { return false; } logic.editTask(...
private boolean editTask(java.lang.String rawInput) { java.util.ArrayList<java.lang.String> inputParts = breakString(rawInput); int taskID = convertToInt(getTaskID(inputParts)); java.lang.String date = getDateFromRaw(inputParts); if (isInvalidID(taskID)) { return false; } return logic.ed...
public void testGetMinYWorld() throws java.lang.Exception { bbox.addHitBox(new com.almasb.fxgl.physics.HitBox("ARM", new javafx.geometry.Point2D(0, 20), com.almasb.fxgl.physics.BoundingShape.box(40, 40))); org.junit.Assert.assertEquals(20, bbox.getMinYWorld(), 0); position.translateY(100); org.junit.Ass...
public void testGetMinYWorld() throws java.lang.Exception { bbox.addHitBox(new com.almasb.fxgl.physics.HitBox("ARM", new javafx.geometry.Point2D(0, 20), com.almasb.fxgl.physics.BoundingShape.box(40, 40))); assertEquals(20, bbox.getMinYWorld(), 0); position.translateY(100); assertEquals(120, bbox.getMinY...
public static java.lang.String toCSVTime(java.lang.Object obj, org.apache.sqoop.schema.type.Column col) { if (((org.apache.sqoop.connector.common.Time) (col)).hasFraction()) { return org.apache.sqoop.connector.common.SqoopIDFUtils.encloseWithQuotes(org.apache.sqoop.connector.common.SqoopIDFUtils.tfWithFract...
public static java.lang.String toCSVTime(java.lang.Object obj, org.apache.sqoop.schema.type.Column col) { assert col instanceof org.apache.sqoop.connector.common.Time; assert obj instanceof org.joda.time.LocalTime; if (((org.apache.sqoop.connector.common.Time) (col)).hasFraction()) { return org.apac...
public void act(float delta) { taken += delta; if ((taken) > (duration)) { callActionCompletedListener(); action.act(delta); if (action.isDone()) action.callActionCompletedListener(); } }
public void act(float delta) { taken += delta; if ((taken) > (duration)) { callActionCompletedListener(); if ((action) != null) { action.act(delta); if (action.isDone()) action.callActionCompletedListener(); } } }
public void setBooleanMetadata(java.lang.String key, boolean value) { if (((sender.getBlock()) == null) || ((sender.getBlock().getType()) == (org.bukkit.Material.COMMAND))) { return ; } sender.getBlock().setMetadata(key, new org.bukkit.metadata.FixedMetadataValue(org.bitbucket.ucchy.undine.UndineMai...
public void setBooleanMetadata(java.lang.String key, boolean value) { if ((((sender) == null) || ((sender.getBlock()) == null)) || ((sender.getBlock().getType()) == (org.bukkit.Material.COMMAND))) { return ; } sender.getBlock().setMetadata(key, new org.bukkit.metadata.FixedMetadataValue(org.bitbucke...
private void executeOnStartActions() { int actionIndexOnStart = java.lang.Integer.parseInt(sharedPrefs.getString(getString(R.string.key_prefActionOnStart), java.lang.Integer.toString(ActionOnStartNone))); if (actionIndexOnStart == (ActionOnStartNone)) { return ; }else if (actionIndexOnStart ...
private void executeOnStartActions() { int actionIndexOnStart = java.lang.Integer.parseInt(sharedPrefs.getString(getString(R.string.key_prefActionOnStart), java.lang.Integer.toString(ActionOnStartRandomAyah))); if (actionIndexOnStart == (ActionOnStartNone)) { return ; }else if (actionIndexOn...
public void onClick(android.view.View v) { fold(); popupWindow.dismiss(); hideUserOptions(0); showPlayerAction(0, "Fold"); thread.postDelayed(new java.lang.Runnable() { public void run() { simulateTurns(); } }, 5000); }
public void onClick(android.view.View v) { fold(); popupWindow.dismiss(); hideUserOptions(); showPlayerAction(0, "Fold"); thread.postDelayed(new java.lang.Runnable() { public void run() { simulateTurns(); } }, 5000); }
private void addCoupleToSquare(short square, short coupleNo, short cplPsn) { com.bgt.core.CoupleGenerator tip = com.bgt.core.Globals.getInstance().getCoupleGenerator(); java.lang.System.out.println(((((("in addCoupleToSquare, square = " + square) + ", couple = ") + coupleNo) + ", cplPsn = ") + cplPsn)); tip...
private void addCoupleToSquare(short square, short coupleNo, short cplPsn) { com.bgt.core.CoupleGenerator tip = com.bgt.core.Globals.getInstance().getCoupleGenerator(); tip.getCouplesInSquare().setCoupleNo(square, cplPsn, coupleNo); tip.getCouples().setSelectedForSquare(coupleNo, true); }
private boolean testActiveClick(com.google.gwt.user.client.Event e) { com.google.gwt.dom.client.Element target = e.getEventTarget().cast(); com.google.gwt.query.client.GQuery $e = com.google.gwt.query.client.GQuery.$(target); if (($e.parents(("#" + (containerId))).length()) > 0) { activeField = true...
private boolean testActiveClick(com.google.gwt.user.client.Event e) { com.google.gwt.dom.client.Element target = e.getEventTarget().cast(); com.google.gwt.query.client.GQuery $e = com.google.gwt.query.client.GQuery.$(target); if (($e.parents(("#" + (containerId))).length()) > 0) { activeField = true...
public static com.mongodb.MongoClient createClientFromFlumeContext(org.apache.flume.Context context, java.lang.String prefix) { java.util.List<com.mongodb.ServerAddress> seeds = org.mapad.google.common.utils.MongoUtils.getSeeds((prefix + (context.getString(org.mapad.google.common.utils.MongoUtils.HOSTNAMES)))); ...
public static com.mongodb.MongoClient createClientFromFlumeContext(org.apache.flume.Context context, java.lang.String prefix) { java.util.List<com.mongodb.ServerAddress> seeds = org.mapad.google.common.utils.MongoUtils.getSeeds(context.getString((prefix + (org.mapad.google.common.utils.MongoUtils.HOSTNAMES)))); ...
private void updateRippleSize(int width, int height) { final int cx = width / 2; final int cy = (mDual) ? (mIcon.getTop()) + (mIcon.getHeight()) : height; final int rad = ((int) ((mIcon.getHeight()) * 1.25F)); mRipple.setHotspotBounds((cx - rad), (cy - rad), (cx + rad), (cy + rad)); }
private void updateRippleSize(int width, int height) { final int cx = width / 2; final int cy = (mDual) ? (mIcon.getTop()) + (mIcon.getHeight()) : height / 2; final int rad = ((int) ((mIcon.getHeight()) * 1.25F)); mRipple.setHotspotBounds((cx - rad), (cy - rad), (cx + rad), (cy + rad)); }
public java.lang.String cardToString() { java.lang.String ret = ""; if (((value) == 1) || ((value) == 11)) { ret = "A"; } if ((value) == 21) { ret = "J"; } if ((value) == 22) { ret = "Q"; } if ((value) == 23) { ret = "K"; }else { ret = value; ...
public java.lang.String cardToString() { java.lang.String ret = ""; if (((value) == 1) || ((value) == 11)) { ret = "A"; } if ((value) == 21) { ret = "J"; } if ((value) == 22) { ret = "Q"; } if ((value) == 23) { ret = "K"; }else { ret = "" + (va...
public void fireBomb(samueltaylor.classicwarlordprototype.Model.Region r, java.util.List<samueltaylor.classicwarlordprototype.Model.Empire> affectedEmpires, java.util.List<samueltaylor.classicwarlordprototype.Model.Region> affectedRegions) { location.setBomb(null); location = r; if ((r.getBomb()) != null) {...
public void fireBomb(samueltaylor.classicwarlordprototype.Model.Region r, java.util.List<samueltaylor.classicwarlordprototype.Model.Empire> affectedEmpires, java.util.List<samueltaylor.classicwarlordprototype.Model.Region> affectedRegions) { location.setBomb(null); location = r; if (((r.getBomb()) != null) ...
public void playerKilled(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerKilled event) { if (event.getKiller().equals(info.getId())) { updateRisque(); shoot.stopShooting(); if ((currentWeapon) != null) { currentWeapon.upNbKills(); currentWeapon...
public void playerKilled(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerKilled event) { if (event.getKiller().equals(info.getId())) { updateRisque(); shoot.stopShooting(); if ((currentWeapon) != null) { currentWeapon.upNbKills(); currentWeapon...
private void showWindow(net.mready.hover.HoverWindow window) { checkWindow(window); if (window.attached) { return ; } windowManager.addView(window.windowView, window.windowLayoutParams); window.attached = true; if ((powerManager.isScreenOn()) && (!(keyguardManager.inKeyguardRestrictedInp...
private void showWindow(net.mready.hover.HoverWindow window) { if (window.attached) { return ; } windowManager.addView(window.windowView, window.windowLayoutParams); window.attached = true; if ((powerManager.isScreenOn()) && (!(keyguardManager.inKeyguardRestrictedInputMode()))) { win...
public com.kosn.entity.Item checkEquipment(java.lang.String target) { java.util.List<com.kosn.entity.Item> equippedItems = new java.util.ArrayList<com.kosn.entity.Item>(equipment.values()); for (com.kosn.entity.Item checkItem : equippedItems) { if (checkItem.getName().equals(target)) { retur...
public com.kosn.entity.Item checkEquipment(java.lang.String target) { java.util.List<com.kosn.entity.Item> equippedItems = new java.util.ArrayList<com.kosn.entity.Item>(equipment.values()); for (com.kosn.entity.Item checkItem : equippedItems) { if (checkItem.getName().equals(target)) { retur...
public void getAddress() { if (!(locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER))) { mainLayout.setVisibility(View.GONE); buildAlertMessageNoGps(); }else if (!(isConn())) { mainLayout.setVisibility(View.GONE); buildAlertMessageNoInternet(); ...
public void getAddress() { if (!(locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER))) { mainLayout.setVisibility(View.GONE); buildAlertMessageNoGps(); }else if (!(isConn())) { mainLayout.setVisibility(View.GONE); buildAlertMessageNoInternet(); ...
public void apply(org.eclipse.emf.ecore.EObject element, org.eclipse.xtext.ui.editor.model.edit.IModificationContext context) throws java.lang.Exception { com.puppetlabs.geppetto.semver.Version v = getResolvedMetadataVersion(element); java.lang.StringBuilder bld = new java.lang.StringBuilder(); bld.append("...
public void apply(org.eclipse.emf.ecore.EObject element, org.eclipse.xtext.ui.editor.model.edit.IModificationContext context) throws java.lang.Exception { java.lang.StringBuilder bld = new java.lang.StringBuilder(); bld.append("\""); bld.append(getResolvedMetadataVersion(element).getMajor()); bld.append...
private java.lang.String buildSortOrder(com.chd.MediaMgr.utils.MediaFileUtil.SortMethod sort) { java.lang.String sortOrder = null; switch (sort) { case name : sortOrder = (MediaStore.Files.FileColumns.TITLE) + " asc"; break; case size : sortOrder = (MediaStore...
private java.lang.String buildSortOrder(com.chd.MediaMgr.utils.MediaFileUtil.SortMethod sort) { if (sort == null) return null; java.lang.String sortOrder = null; switch (sort) { case name : sortOrder = (MediaStore.Files.FileColumns.TITLE) + " asc"; break; ...
protected <T extends java.security.spec.AlgorithmParameterSpec> T engineGetParameterSpec(final java.lang.Class<T> paramSpec) throws java.security.spec.InvalidParameterSpecException { if (paramSpec.equals(javax.crypto.spec.IvParameterSpec.class)) { return ((T) (new javax.crypto.spec.IvParameterSpec(iv, pos))...
protected <T extends java.security.spec.AlgorithmParameterSpec> T engineGetParameterSpec(final java.lang.Class<T> paramSpec) throws java.security.spec.InvalidParameterSpecException { if (paramSpec.equals(javax.crypto.spec.IvParameterSpec.class)) { return ((T) (new javax.crypto.spec.IvParameterSpec(iv))); ...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); if ((getLayoutRes()) > 0) { setContentView(R.layout.activity_base); butterknife.ButterKnife.bind(this); android.view.View content = android.view.LayoutInflater.from(this).inflate(getLayout...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); if ((getLayoutRes()) > 0) { setContentView(R.layout.activity_base); android.view.View content = android.view.LayoutInflater.from(this).inflate(getLayoutRes(), root, false); if (hasTitle())...
public double slopeTo(Point that) { if ((this.compareTo(that)) == 0) return java.lang.Double.NEGATIVE_INFINITY; if ((this.x) == (that.x)) return java.lang.Double.POSITIVE_INFINITY; return ((double) ((this.y) - (that.y))) / ((double) ((this.x) - (that.x))); }
public double slopeTo(Point that) { if ((this.compareTo(that)) == 0) return java.lang.Double.NEGATIVE_INFINITY; if ((this.x) == (that.x)) return java.lang.Double.POSITIVE_INFINITY; if ((this.y) == (that.y)) return +0.0; return ((double) ((that.y) - (this.y))) / ((d...
public void printData() { java.lang.System.out.println(("=> Directory= " + (this.path))); if ((files.size()) > 0) java.lang.System.out.println(" Files: "); else java.lang.System.out.println(" <no files>"); for (int i = 0; i < (files.size()); ++i) java.lang.System.out...
public void printData() { java.lang.System.out.println(("=> Directory= " + (this.path))); if ((this.files.size()) > 0) java.lang.System.out.println(" Files: "); else java.lang.System.out.println(" <no files>"); for (int i = 0; i < (this.files.size()); ++i) java.lang....
public static boolean isInvEmpty(net.minecraft.inventory.IInventory stack) { boolean empty = true; if (stack == null) return true; for (int i = 0; i < (stack.getSizeInventory()); i++) { if ((stack.getStackInSlot(i)) != null) return false; } return true; }
public static boolean isInvEmpty(net.minecraft.inventory.IInventory stack) { boolean empty = true; if (stack == null) return true; for (int i = 0; i < (stack.getSizeInventory()); i++) { if (!(stack.getStackInSlot(i).isEmpty())) return false; } return true; }
private void setProperties(org.openhab.binding.max.internal.message.F_Message message) { ntpServer1 = message.getNtpServer1(); ntpServer2 = message.getNtpServer2(); org.eclipse.smarthome.config.core.Configuration configuration = org.openhab.binding.max.internal.handler.MaxCubeBridgeHandler.editConfiguration...
private void setProperties(org.openhab.binding.max.internal.message.F_Message message) { ntpServer1 = message.getNtpServer1(); ntpServer2 = message.getNtpServer2(); org.eclipse.smarthome.config.core.Configuration configuration = editConfiguration(); configuration.put(org.openhab.binding.max.internal.han...
public void run() { if (!(discoveryReplyList.contains(packetData))) { discoveryReplyList.add(packetData); android.widget.ListView lvDiscoveryReplies = ((android.widget.ListView) (findViewById(R.id.listView_DiscoveryReplies))); android.widget.ArrayAdapter<java.lang.String> adapter = ((android...
public void run() { if (!(discoveryReplyList.contains(packetData))) { android.widget.ListView lvDiscoveryReplies = ((android.widget.ListView) (findViewById(R.id.listView_DiscoveryReplies))); android.widget.ArrayAdapter<java.lang.String> adapter = ((android.widget.ArrayAdapter<java.lang.String>) (lvD...
public void run() { while (_running) { try { scanKeyboard(); } catch (ioio.lib.api.exception.ConnectionLostException e) { _running = false; e.printStackTrace(); } catch (java.lang.InterruptedException e) { _running = false; e.printS...
public void run() { while (_running) { try { scanKeyboard(); } catch (ioio.lib.api.exception.ConnectionLostException e) { _running = false; e.printStackTrace(); } catch (java.lang.InterruptedException e) { _running = false; e.printS...
private java.lang.Class<?> getSuperClassOnSet(java.util.Set<java.lang.Class<?>> set, java.lang.Class<?> clazz) { java.lang.Class<?> found = null; for (java.lang.Class<?> aux : set) { if ((aux.isAssignableFrom(clazz)) && ((found != null) && (aux.isAssignableFrom(found)))) { found = aux; ...
private java.lang.Class<?> getSuperClassOnSet(java.util.Set<java.lang.Class<?>> set, java.lang.Class<?> clazz) { java.lang.Class<?> found = null; for (java.lang.Class<?> aux : set) { if ((aux.isAssignableFrom(clazz)) && ((found == null) || (aux.isAssignableFrom(found)))) { found = aux; ...
public void touchUp(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer, int button) { back.setBounds(((back.getX()) - 5), back.getY(), ((back.getWidth()) + 5), ((back.getHeight()) + 5)); game.mainMenuScreen = new by.randomen.screens.MainMenuScreen(game); game.setScreen(game.main...
public void touchUp(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer, int button) { back.setBounds(((back.getX()) - 5), back.getY(), ((back.getWidth()) + 5), ((back.getHeight()) + 5)); game.mainMenuScreen = new by.randomen.screens.MainMenuScreen(game); game.setScreen(game.main...
public org.exist.xquery.value.Sequence postEval(org.exist.xquery.value.Sequence seq) throws org.exist.xquery.XPathException { if ((orderedResult) == null) { return seq; } orderedResult.sort(); final org.exist.xquery.value.Sequence result = orderedResult; orderedResult = null; if ((getRet...
public org.exist.xquery.value.Sequence postEval(org.exist.xquery.value.Sequence seq) throws org.exist.xquery.XPathException { if ((orderedResult) == null) { return seq; } orderedResult.sort(); org.exist.xquery.value.Sequence result = orderedResult; orderedResult = null; if ((getReturnExp...
protected void updateReel(double x, double y, double orientationReelle, boolean enMarcheAvant, double courbureReelle) { if (enMarcheAvant) { orientationGeometrique = orientationReelle; courbureGeometrique = courbureReelle; }else { orientationGeometrique = orientationReelle + (java.lang.M...
public void updateReel(double x, double y, double orientationReelle, boolean enMarcheAvant, double courbureReelle) { if (enMarcheAvant) { orientationGeometrique = orientationReelle; courbureGeometrique = courbureReelle; }else { orientationGeometrique = orientationReelle + (java.lang.Math...
protected net.instant.util.fileprod.ProducerJob produceInner(java.lang.String name) { net.instant.util.fileprod.ProducerJob ret = null; if ((fs) != null) ret = fs.produce(name); if (((rs) != null) && (ret != null)) ret = rs.produce(name); return ret; }
protected net.instant.util.fileprod.ProducerJob produceInner(java.lang.String name) { net.instant.util.fileprod.ProducerJob ret = null; if ((fs) != null) ret = fs.produce(name); if (((rs) != null) && (ret == null)) ret = rs.produce(name); return ret; }
public void testSubtractBusinessKey() throws java.lang.Exception { boolean assert_ = false; try { spreadsheet.mapper.utils.FieldUtils.subtractBusinessKey("test.int1"); } catch (java.lang.IllegalArgumentException e) { spreadsheet.mapper.utils.FieldUtilsTest.LOGGER.debug("\'test.int1\' not bus...
public void testSubtractBusinessKey() throws java.lang.Exception { boolean assert_ = false; try { spreadsheet.mapper.utils.FieldUtils.subtractBusinessKey("test.int1"); } catch (java.lang.IllegalArgumentException e) { spreadsheet.mapper.utils.FieldUtilsTest.LOGGER.debug("\'test.int1\' not bus...
public int getBillWorth(int itemDamage, int stackSize) { int cash = 0; switch (itemDamage) { case 0 : cash = 1; break; case 1 : cash = 5; break; case 2 : cash = 10; break; case 3 : cash = 20; ...
private int getBillWorth(int itemDamage, int stackSize) { int cash = 0; switch (itemDamage) { case 0 : cash = 1; break; case 1 : cash = 5; break; case 2 : cash = 10; break; case 3 : cash = 20; ...
public java.util.List<java.lang.String> asListString(javax.naming.directory.Attribute att) throws javax.naming.NamingException { if (att == null) return null; java.util.List<java.lang.String> res = new java.util.LinkedList<java.lang.String>(); for (int i = 0; i < (att.size()); i++) res....
public java.util.List<java.lang.String> asListString(javax.naming.directory.Attribute att) throws javax.naming.NamingException { java.util.List<java.lang.String> res = new java.util.LinkedList<java.lang.String>(); if (att == null) return res; for (int i = 0; i < (att.size()); i++) res.a...
private void calculateLength() { if ((orientation) == (Sens.VERTICAL)) { length = (end.getRow()) - (start.getRow()); }else if ((orientation) == (Sens.HORIZONTAL)) { length = (end.getCol()) - (start.getCol()); } }
private void calculateLength() { if ((orientation) == (Sens.VERTICAL)) { length = ((end.getRow()) - (start.getRow())) + 1; }else if ((orientation) == (Sens.HORIZONTAL)) { length = ((end.getCol()) - (start.getCol())) + 1; } }
public com.ullink.slack.simpleslackapi.SlackMessageHandle<com.ullink.slack.simpleslackapi.replies.SlackChannelReply> leaveChannel(com.ullink.slack.simpleslackapi.SlackChannel channel) { com.ullink.slack.simpleslackapi.impl.SlackMessageHandleImpl handle = new com.ullink.slack.simpleslackapi.impl.SlackMessageHandleIm...
public com.ullink.slack.simpleslackapi.SlackMessageHandle<com.ullink.slack.simpleslackapi.replies.SlackChannelReply> leaveChannel(com.ullink.slack.simpleslackapi.SlackChannel channel) { com.ullink.slack.simpleslackapi.impl.SlackMessageHandleImpl<com.ullink.slack.simpleslackapi.replies.SlackChannelReply> handle = ne...
public void landOnField(Players.PlayerController playerController, Fields.FieldController fieldController) { Players.Player jailedPlayer = playerController.getCurrentPlayer(); jailedPlayer.setJail(true); Game.GameController.movement(false, ((jailedPlayer.getPlace()) + 1), 11, jailedPlayer, fieldController, ...
public void landOnField(Players.PlayerController playerController, Fields.FieldController fieldController) { Players.Player jailedPlayer = playerController.getCurrentPlayer(); jailedPlayer.setJail(true); Game.GameController.movement(((jailedPlayer.getPlace()) + 1), 11, jailedPlayer, fieldController, playerC...
private void getClassModifiers(java.lang.Class clazz, int numberOfTabs) { getTabs(numberOfTabs); java.lang.String modifiers = java.lang.reflect.Modifier.toString(clazz.getModifiers()); if (modifiers.isEmpty()) { sb.append(("class " + (clazz.getSimpleName()))); }else { sb.append(((modifie...
private void getClassModifiers(java.lang.Class clazz, int numberOfTabs) { getTabs(numberOfTabs); java.lang.String modifiers = java.lang.reflect.Modifier.toString(clazz.getModifiers()); if (modifiers.isEmpty()) { sb.append("class ").append(clazz.getSimpleName()); }else { sb.append(modifie...
private void stealSourceAsFields(java.util.Map<java.lang.String, java.lang.Object> sourceAsMap, final java.util.Map<java.lang.String, org.elasticsearch.search.SearchHitField> fields, final java.util.Set<java.lang.String> included) { if ((((sourceAsMap == null) || (fields == null)) || (sourceAsMap.isEmpty())) || (in...
private void stealSourceAsFields(java.util.Map<java.lang.String, java.lang.Object> sourceAsMap, final java.util.Map<java.lang.String, org.elasticsearch.search.SearchHitField> fields, final java.util.Set<java.lang.String> included) { if (((((sourceAsMap == null) || (fields == null)) || (sourceAsMap.isEmpty())) || (i...
private void findSubIndexForColor(int topIndex, int color) { if (((getBuilder().mColorsSub.length) - 1) < topIndex) return ; int[] subColors = getBuilder().mColorsSub[topIndex]; for (int subIndex = 0; subIndex < (subColors.length); subIndex++) { if ((subColors[subIndex]) == color) { ...
private void findSubIndexForColor(int topIndex, int color) { if (((getBuilder().mColorsSub) == null) || (((getBuilder().mColorsSub.length) - 1) < topIndex)) return ; int[] subColors = getBuilder().mColorsSub[topIndex]; for (int subIndex = 0; subIndex < (subColors.length); subIndex++) { ...
public int findPositionById(long id) { android.database.Cursor cursor = getList(); if (cursor == null) return -1; while (cursor.moveToNext()) { if ((cursor.getLong(0)) == id) { return cursor.getPosition(); } } return -1; }
public static int findPositionById(android.database.Cursor list, long id) { if (list == null) return -1; while (list.moveToNext()) { if ((list.getLong(0)) == id) { return list.getPosition(); } } return -1; }
public void removeCell(java.lang.String id) { elegit.treefx.Cell cell = cellMap.get(id); if (cellMap.containsKey(cell.getCellId())) { elegit.treefx.Cell oldCell = cellMap.remove(cell.getCellId()); for (elegit.treefx.Cell p : cell.getCellParents()) { p.removeCellChild(oldCell); ...
public void removeCell(java.lang.String id) { elegit.treefx.Cell cell = cellMap.get(id); if ((cell != null) && (cellMap.containsKey(cell.getCellId()))) { elegit.treefx.Cell oldCell = cellMap.remove(cell.getCellId()); for (elegit.treefx.Cell p : cell.getCellParents()) { p.removeCellCh...
public void setTemplateID(java.util.Map mobData, com.nkoiv.mists.game.gameobject.MapObject mob) { if (mobData.containsKey("templateID")) { int templateID = java.lang.Integer.parseInt(((java.lang.String) (mobData.get("templateID")))); mob.setTemplateID(templateID); }else { mob.setTemplate...
public void setTemplateID(java.util.Map mobData, com.nkoiv.mists.game.gameobject.MapObject mob) { if (mobData.containsKey("templateID")) { int templateID = java.lang.Integer.parseInt(((java.lang.String) (mobData.get("templateID")))); if (templateID < 1) mob.setTemplateID(getNextFreeID())...
public boolean createUser(boolean checkExists) { if ((!(userDefined())) || (checkExists && (userExists()))) { return false; } org.avaje.docker.commands.PostgresContainer.log.debug("create postgres user {}", config.containerName()); java.lang.ProcessBuilder pb = createRole(dbConfig.getDbUser(), d...
public boolean createUser(boolean checkExists) { if ((!(userDefined())) || (checkExists && (userExists()))) { return false; } org.avaje.docker.commands.PostgresContainer.log.debug("create postgres user {}", dbConfig.getDbUser()); java.lang.ProcessBuilder pb = createRole(dbConfig.getDbUser(), dbC...
public boolean start() { try { syncBladeInterval = java.lang.Integer.valueOf(configDao.getValue(Config.UCSSyncBladeInterval.key())); } catch (java.lang.NumberFormatException e) { syncBladeInterval = 600; } syncBladesExecutor = java.util.concurrent.Executors.newScheduledThreadPool(1, new ...
public boolean start() { try { syncBladeInterval = java.lang.Integer.parseInt(configDao.getValue(Config.UCSSyncBladeInterval.key())); } catch (java.lang.NumberFormatException e) { syncBladeInterval = 600; } syncBladesExecutor = java.util.concurrent.Executors.newScheduledThreadPool(1, new...
public void testValidateCredentialsPasswordOnly() throws java.lang.Exception { expectedMessages.add(HubProxyInfoBuilder.ERROR_MSG_CREDENTIALS_INVALID); final com.blackducksoftware.integration.hub.builder.HubProxyInfoBuilder builder = new com.blackducksoftware.integration.hub.builder.HubProxyInfoBuilder(); b...
public void testValidateCredentialsPasswordOnly() throws java.lang.Exception { expectedMessages.add(HubProxyInfoBuilder.ERROR_MSG_CREDENTIALS_INVALID); expectedMessages.add(HubProxyInfoBuilder.ERROR_MSG_CREDENTIALS_INVALID); final com.blackducksoftware.integration.hub.builder.HubProxyInfoBuilder builder = n...
protected static org.glassfish.grizzly.http.server.HttpServer startServer() throws java.io.IOException { final org.glassfish.jersey.server.ResourceConfig rc = new org.glassfish.jersey.server.ResourceConfig().packages("org.wikibrain.atlasify"); rc.register(org.wikibrain.atlasify.CORSFilter.class); rc.registe...
protected static org.glassfish.grizzly.http.server.HttpServer startServer() throws java.io.IOException { final org.glassfish.jersey.server.ResourceConfig rc = new org.glassfish.jersey.server.ResourceConfig().packages("org.wikibrain.atlasify"); rc.register(org.wikibrain.atlasify.CORSFilter.class); java.lang....
private void unwrapAndRemoveFromIndex(java.lang.Object oldValue, com.hazelcast.nio.serialization.Data indexKey) { if (oldValue instanceof com.hazelcast.query.extractor.MultiResult) { java.util.List<java.lang.Object> results = ((com.hazelcast.query.extractor.MultiResult) (oldValue)).getResults(); for...
private void unwrapAndRemoveFromIndex(java.lang.Object oldValue, com.hazelcast.nio.serialization.Data indexKey) { if (oldValue instanceof com.hazelcast.query.extractor.MultiResult) { java.util.List<java.lang.Object> results = ((com.hazelcast.query.extractor.MultiResult) (oldValue)).getResults(); for...
public java.lang.Boolean apply(java.lang.Long bookmarkId) { boolean result; if (bookmarkId > 0) { bookmarksDBAdapter.removeBookmark(bookmarkId); result = false; }else { bookmarksDBAdapter.addBookmark(sura, ayah, page); result = true; } bookmarksPublishSubject.onNext(n...
public java.lang.Boolean apply(java.lang.Long bookmarkId) { boolean result; if (bookmarkId > 0) { bookmarksDBAdapter.removeBookmark(bookmarkId); result = false; }else { bookmarksDBAdapter.addBookmark(sura, ayah, page); result = true; } bookmarksPublishSubject.onNext(t...