buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private void setMediaSessionMetaData() {
android.support.v4.media.MediaMetadataCompat.Builder builder = new android.support.v4.media.MediaMetadataCompat.Builder().putString(MediaMetadataCompat.METADATA_KEY_ARTIST, metaDataArtist).putString(MediaMetadataCompat.METADATA_KEY_ALBUM, metaDataAlbum).putString(MediaMetada... | private void setMediaSessionMetaData() {
if ((mediaSession) == null) {
return ;
}
android.support.v4.media.MediaMetadataCompat.Builder builder = new android.support.v4.media.MediaMetadataCompat.Builder().putString(MediaMetadataCompat.METADATA_KEY_ARTIST, metaDataArtist).putString(MediaMetadataCompat... |
private void captureTerritory(gottesman.risk.Player activePlayer, gottesman.risk.Territory selectedTerritory, gottesman.risk.map.TerritoryView territoryView, gottesman.risk.Territory territory) {
int battalionNum = java.lang.Integer.parseInt(javax.swing.JOptionPane.showInputDialog(null, "Enter the amount of battali... | private void captureTerritory(gottesman.risk.Player activePlayer, gottesman.risk.Territory selectedTerritory, gottesman.risk.map.TerritoryView territoryView, gottesman.risk.Territory territory) {
int battalionNum = java.lang.Integer.parseInt(javax.swing.JOptionPane.showInputDialog(null, "Enter the amount of battali... |
protected void reloadForSearch(boolean finalTouch) {
if ((mAdapter) == null) {
return ;
}
try {
final int sD = mData.length;
for (int i = 0; i < sD; ++i) {
if (!((mData[i]) instanceof ds.framework.v4.data.AbsRecyclerViewData)) {
break;
}
... | protected void reloadForSearch(boolean finalTouch) {
if ((mAdapter) == null) {
return ;
}
try {
final int sD = mData.length;
for (int i = 0; i < sD; ++i) {
if ((mData[i]) instanceof ds.framework.v4.data.AbsRecyclerViewData) {
invalidateData(i);
... |
protected java.lang.Exception doInBackground(de.geeksfactory.opacclient.objects.Account... params) {
try {
de.geeksfactory.opacclient.apis.OpacApi api = ((de.geeksfactory.opacclient.OpacClient) (getApplication())).getNewApi(lib);
api.checkAccountData(account);
} catch (java.io.IOException e) {
... | protected java.lang.Exception doInBackground(de.geeksfactory.opacclient.objects.Account... params) {
try {
de.geeksfactory.opacclient.apis.OpacApi api = ((de.geeksfactory.opacclient.OpacClient) (getApplication())).getNewApi(lib);
api.start();
api.checkAccountData(account);
} catch (java.... |
private boolean isTaskRequired(com.emc.storageos.db.client.model.Volume rpVolume, com.emc.storageos.volumecontroller.impl.utils.VirtualPoolCapabilityValuesWrapper capabilities, boolean vplex, com.emc.storageos.model.TaskList taskList) {
boolean rpNonVplexSourceVolume = (Volume.PersonalityTypes.SOURCE.name().equals(... | private boolean isTaskRequired(com.emc.storageos.db.client.model.Volume rpVolume, com.emc.storageos.volumecontroller.impl.utils.VirtualPoolCapabilityValuesWrapper capabilities, boolean vplex, com.emc.storageos.model.TaskList taskList) {
boolean rpNonVplexSourceVolume = (Volume.PersonalityTypes.SOURCE.name().equals(... |
public void tick(kcl.teamIndexZero.traffic.simulator.data.SimulationTick tick) {
CurrentDate = (new java.util.Date().getTime()) / 1000;
if (((CurrentDate) - (lastChange)) > (timer)) {
modelSet.changeColour(model, model.currentState);
lastChange = CurrentDate;
}
} | public void tick(kcl.teamIndexZero.traffic.simulator.data.SimulationTick tick) {
CurrentDate = (new java.util.Date().getTime()) / 1000;
if (((CurrentDate) - (lastChange)) > (timer)) {
if ((modelSet) != null) {
modelSet.changeColour(model, model.currentState);
lastChange = Current... |
public boolean onKey(android.view.View v, int keyCode, android.view.KeyEvent event) {
if ((event.getAction()) == (android.view.KeyEvent.ACTION_DOWN)) {
if (keyCode == (android.view.KeyEvent.KEYCODE_ENTER)) {
rightGuess();
return true;
}
}
return false;
} | public boolean onKey(android.view.View v, int keyCode, android.view.KeyEvent event) {
if ((event.getAction()) == (android.view.KeyEvent.ACTION_DOWN)) {
switch (keyCode) {
case android.view.KeyEvent.KEYCODE_ENTER :
rightGuess();
return true;
default :
... |
private void handleIntent(android.content.Intent intent) {
if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
java.lang.String query = intent.getStringExtra(SearchManager.QUERY);
android.database.Cursor cursor = com.example.adao1.project2.DatabaseHelper.getInstance(this).getShop(query);
... | private void handleIntent(android.content.Intent intent) {
if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
java.lang.String query = intent.getStringExtra(SearchManager.QUERY);
cursor = com.example.adao1.project2.DatabaseHelper.getInstance(this).getShop(query);
searchCursorAdapter.swap... |
public java.lang.String optionsToString() {
java.lang.StringBuilder b = new java.lang.StringBuilder();
b.append(index).append("\n");
b.append(heightLevel).append("\n");
b.append(oceanLevel).append("\n");
b.append(getOceanReplacement()).append("\n");
b.append(cloudLevel);
b.append((geostrataG... | public java.lang.String optionsToString() {
java.lang.StringBuilder b = new java.lang.StringBuilder();
b.append(index).append("\n");
b.append(heightLevel).append("\n");
b.append(oceanLevel).append("\n");
b.append(getOceanReplacement()).append("\n");
b.append(cloudLevel).append("\n");
b.appen... |
public com.emc.hpux.model.HpuxVersion getHpuxMinimumVersion(boolean forceLookup) {
if (forceLookup || ((aixVersion) == null)) {
java.lang.String versionProp = this.getSysProperty(com.emc.storageos.computesystemcontroller.impl.ComputeSystemDiscoveryVersionValidator.HPUX_MIN_PROP);
if (isValidVersionN... | public com.emc.hpux.model.HpuxVersion getHpuxMinimumVersion(boolean forceLookup) {
if (forceLookup || ((hpuxVersion) == null)) {
java.lang.String versionProp = this.getSysProperty(com.emc.storageos.computesystemcontroller.impl.ComputeSystemDiscoveryVersionValidator.HPUX_MIN_PROP);
if (isValidVersion... |
public void inverseClicked(android.view.View v) {
android.widget.TextView textView2 = ((android.widget.TextView) (findViewById(R.id.textView2)));
tempNum = java.lang.Double.parseDouble(textView2.getText().toString());
tempNum = (tempNum) * (-1);
textView2.setText(((textView2 + "|") + (java.lang.String.v... | public void inverseClicked(android.view.View v) {
android.widget.TextView textView2 = ((android.widget.TextView) (findViewById(R.id.textView2)));
tempNum = java.lang.Double.parseDouble(textView2.getText().toString());
tempNum = (tempNum) * (-1);
textView2.setText(java.lang.String.valueOf(tempNum));
} |
public void testResultReturnsModelAndView() throws java.lang.Exception {
org.springframework.mock.web.MockHttpSession session = new org.springframework.mock.web.MockHttpSession();
org.springframework.web.servlet.ModelAndView actual = portal.result(session, "", "", "");
org.junit.Assert.assertEquals("result"... | public void testResultReturnsModelAndView() throws java.lang.Exception {
org.springframework.mock.web.MockHttpSession session = new org.springframework.mock.web.MockHttpSession();
org.springframework.web.servlet.ModelAndView actual = portal.result(session, "", "", "", "");
org.junit.Assert.assertEquals("res... |
public void run() {
if ((getAudioService()) != null) {
setMilliseconds((((drawSurfaceWidth / (getAudioService().getSampleRate())) * 1000) / 2));
}
setMillivolts(((((((float) (drawSurfaceHeight)) / 4.0F) / 24.5F) / 1000) * (com.backyardbrains.utils.BYBConstants.millivoltScale)));
} | public void run() {
if ((getAudioService()) != null) {
setMilliseconds((((drawSurfaceWidth / ((float) (getAudioService().getSampleRate()))) * 1000) / 2));
}
setMillivolts(((((((float) (drawSurfaceHeight)) / 4.0F) / 24.5F) / 1000) * (com.backyardbrains.utils.BYBConstants.millivoltScale)));
} |
private void refreshUser() {
mUser = mSession.getDataHandler().getStore().getUser(mMemberId);
if (null == (mUser)) {
mUser = new org.matrix.androidsdk.rest.model.User();
mUser.user_id = mMemberId;
mUser.displayname = getIntent().getStringExtra(im.vector.activity.VectorMemberDetailsActivi... | private boolean refreshUser() {
mUser = mSession.getDataHandler().getStore().getUser(mMemberId);
if (null == (mUser)) {
mUser = new org.matrix.androidsdk.rest.model.User();
mUser.user_id = mMemberId;
mUser.displayname = getIntent().getStringExtra(im.vector.activity.VectorMemberDetailsAct... |
private boolean validateQuantity() {
int quantity = java.lang.Integer.valueOf(subgroupsQuantity.getText().toString());
if (quantity > (getMaximumQuantity())) {
subgroupsQuantityLayout.setError(getString(R.string.nwinners_msg_validate_quantity, group.getItemCount()));
requestFocus(subgroupsQuanti... | private boolean validateQuantity() {
int quantity = java.lang.Integer.valueOf(subgroupsQuantity.getText().toString());
if (quantity > (getMaximumQuantity())) {
subgroupsQuantityLayout.setError(getString(R.string.nwinners_msg_validate_quantity, getMaximumQuantity()));
requestFocus(subgroupsQuanti... |
public void run() {
try {
mSocket = new java.net.Socket("117.34.105.157", 19527);
mSocket.setKeepAlive(true);
mSocket.setSoTimeout(10);
mBufferedReader = new java.io.BufferedReader(new java.io.InputStreamReader(mSocket.getInputStream()));
mOutputStream = mSocket.getOutputStre... | public void run() {
try {
mSocket = new java.net.Socket("117.34.105.157", 19527);
mSocket.setKeepAlive(true);
mSocket.setSoTimeout(0);
mBufferedReader = new java.io.BufferedReader(new java.io.InputStreamReader(mSocket.getInputStream()));
mOutputStream = mSocket.getOutputStrea... |
public void onRequestPermissionsResult(int requestCode, @android.support.annotation.NonNull
java.lang.String[] permissions, @android.support.annotation.NonNull
int[] grantResults) {
com.iven.i7helper.util.LocationUtil lu = com.iven.i7helper.util.LocationUtil.getLocationUtil();
switch (requestCode) {
cas... | public void onRequestPermissionsResult(int requestCode, @android.support.annotation.NonNull
java.lang.String[] permissions, @android.support.annotation.NonNull
int[] grantResults) {
com.iven.i7helper.util.LocationUtil lu = com.iven.i7helper.util.LocationUtil.getLocationUtil();
switch (requestCode) {
cas... |
private java.util.List<java.lang.String> pick(java.util.HashMap<java.lang.String, java.lang.Integer> map, int n) {
wedt.finder.ActualWikiFinder.ValueComparator bvc = new wedt.finder.ActualWikiFinder.ValueComparator(map);
java.util.TreeMap<java.lang.String, java.lang.Integer> sorted = new java.util.TreeMap<>(bvc... | private java.util.List<java.lang.String> pick(java.util.HashMap<java.lang.String, java.lang.Integer> map, int n) {
wedt.finder.ActualWikiFinder.ValueComparator bvc = new wedt.finder.ActualWikiFinder.ValueComparator(map);
java.util.TreeMap<java.lang.String, java.lang.Integer> sorted = new java.util.TreeMap<>(bvc... |
public java.lang.String addDev(objects.Device dev) {
java.sql.PreparedStatement stmt = null;
java.sql.Connection conn = null;
java.lang.String sql = "INSERT INTO network " + "VALUES (?, '?', '?')";
try {
conn = getConnection();
} catch (java.sql.SQLException e) {
return new java.lang... | public java.lang.String addDev(objects.Device dev) {
java.sql.PreparedStatement stmt = null;
java.sql.Connection conn = null;
java.lang.String sql = "INSERT INTO network " + "VALUES (?, '?', '?')";
try {
conn = getConnection();
} catch (java.lang.ClassNotFoundException e) {
return ne... |
public static boolean inBounds(int[][] array, int r, int c) {
return ((r > 0) && (r < (array.length))) && ((c > 0) && (c < (array[r].length)));
} | public static boolean inBounds(int[][] array, int r, int c) {
return ((r >= 0) && (r < (array.length))) && ((c >= 0) && (c < (array[r].length)));
} |
private void updateLength() {
int newLength = 0;
for (net.decix.jipfix.header.TemplateRecord template : templateRecords) {
newLength += template.getLength();
}
for (net.decix.jipfix.header.OptionTemplateRecord optionTemplate : optionTemplateRecords) {
newLength += optionTemplate.getLengt... | private void updateLength() {
int newLength = net.decix.jipfix.header.SetHeader.HEADERLENGTH;
for (net.decix.jipfix.header.TemplateRecord template : templateRecords) {
newLength += template.getLength();
}
for (net.decix.jipfix.header.OptionTemplateRecord optionTemplate : optionTemplateRecords) {... |
private static java.lang.String loadECoreFile(java.lang.String name) throws java.lang.Exception {
java.lang.String filename = cruise.umple.compiler.UmpleImportTest.getAbsFile(name);
assertTrue(new java.io.File(filename).exists());
cruise.umple.compiler.EcoreImportHandler handler = new cruise.umple.compiler.... | private static java.lang.String loadECoreFile(final java.lang.String name) throws java.lang.Exception {
assertTrue(new java.io.File(name).exists());
cruise.umple.compiler.EcoreImportHandler handler = new cruise.umple.compiler.EcoreImportHandler();
cruise.umple.compiler.UmpleImportModel umple = handler.readD... |
public static java.util.List<com.teinproductions.tein.papyrosprogress.Milestone> getMilestones(java.lang.String json) throws java.text.ParseException, org.json.JSONException {
org.json.JSONArray jArray = new org.json.JSONArray(json);
java.util.List<com.teinproductions.tein.papyrosprogress.Milestone> result = ne... | public static java.util.List<com.teinproductions.tein.papyrosprogress.Milestone> getMilestones(java.lang.String json) throws java.text.ParseException, org.json.JSONException {
org.json.JSONArray jArray = new org.json.JSONArray(json);
java.util.List<com.teinproductions.tein.papyrosprogress.Milestone> result = ne... |
public static void addPlayer(java.lang.String name) {
reachForTheTop.IO.createOutputFile((("Scores\\" + name) + ".reach"));
reachForTheTop.IO.println("times played: 0");
reachForTheTop.IO.println("total: 0");
reachForTheTop.IO.closeOutputFile();
reachForTheTop.IO.createOutputFile("Scores\\names.txt"... | public static void addPlayer(java.lang.String name) {
reachForTheTop.IO.createOutputFile((("Scores\\" + name) + ".reach"));
reachForTheTop.IO.println("times played: 0");
reachForTheTop.IO.println("total: 0");
reachForTheTop.IO.closeOutputFile();
reachForTheTop.IO.createOutputFile("Scores\\names.txt"... |
public void poll() {
try {
scanDirectory(outboxDir);
updateTracking();
} catch (org.openas2.OpenAS2Exception oae) {
oae.terminate();
} catch (java.lang.Exception e) {
logger.error(("Unexpected error occurred polling directory for files to send: " + (outboxDir)), e);
}
} | public void poll() {
try {
updateTracking();
scanDirectory(outboxDir);
} catch (org.openas2.OpenAS2Exception oae) {
oae.terminate();
} catch (java.lang.Exception e) {
logger.error(("Unexpected error occurred polling directory for files to send: " + (outboxDir)), e);
}
} |
public void start() {
scenes.WorldScene.WorldSystem.NPC n = ((scenes.WorldScene.WorldSystem.WorldSystem) (parent)).activeNPC;
java.awt.FontMetrics fm = javax.swing.JFrame.getFrames()[0].getGraphics().getFontMetrics();
dialog = engine.StringUtils.wrap(n.getDialog(), fm, ((engine.ContentPanel.INTERNAL_RES_W) ... | public void start() {
scenes.WorldScene.WorldSystem.NPC n = ((scenes.WorldScene.WorldSystem.WorldSystem) (parent)).activeNPC;
java.awt.FontMetrics fm = javax.swing.JFrame.getFrames()[0].getGraphics().getFontMetrics();
dialog = engine.StringUtils.wrap(n.getDialog(), fm, ((engine.ContentPanel.INTERNAL_RES_W) ... |
public boolean createNamedTerminal(java.lang.String caption) {
if (org.rstudio.core.client.StringUtil.isNullOrEmpty(caption)) {
createNewTerminal();
return true;
}
if (!(isCaptionAvailable(caption))) {
return false;
}
startTerminal(nextTerminalSequence(), null, caption, null,... | public boolean createNamedTerminal(java.lang.String caption) {
if (org.rstudio.core.client.StringUtil.isNullOrEmpty(caption)) {
createNewTerminal();
return true;
}
if (!(isCaptionAvailable(caption))) {
return false;
}
startTerminal(nextTerminalSequence(), null, caption, null,... |
public void writeToFile() throws java.io.IOException {
currentCollection = modelCol.getCollection();
skrivFil1 = new java.io.FileWriter(selectedCollection, true);
java.io.BufferedWriter writer = new java.io.BufferedWriter(skrivFil1);
java.io.PrintWriter printer = new java.io.PrintWriter(writer);
for... | public void writeToFile() throws java.io.IOException {
currentCollection = modelCol.getCollection();
skrivFil1 = new java.io.FileWriter(selectedCollection);
java.io.BufferedWriter writer = new java.io.BufferedWriter(skrivFil1);
java.io.PrintWriter printer = new java.io.PrintWriter(writer);
for (Item... |
public void afterPropertiesSet() throws java.lang.Exception {
int roundId = getRoundId();
if (roundId < 1) {
return ;
}
round = org.powertac.tournament.beans.Round.getRoundFromId(roundId, true);
loadRoundInfo();
loadParticipantInfo();
loadCsvLinks();
loadMaps();
} | public void afterPropertiesSet() throws java.lang.Exception {
int roundId = getRoundId();
if (roundId < 1) {
return ;
}
round = org.powertac.tournament.beans.Round.getRoundFromId(roundId, false);
loadRoundInfo();
loadParticipantInfo();
loadCsvLinks();
loadMaps();
} |
private boolean isEnabled(java.lang.String pkgName) {
java.lang.String mode = tw.fatminmin.xposed.minminguard.Main.pref.getString(Common.KEY_MODE, Common.VALUE_MODE_BLACKLIST);
if (mode.equals(Common.VALUE_MODE_AUTO)) {
return true;
}else
if (mode.equals(Common.VALUE_MODE_BLACKLIST)) {
... | private static boolean isEnabled(java.lang.String pkgName) {
java.lang.String mode = tw.fatminmin.xposed.minminguard.Main.pref.getString(Common.KEY_MODE, Common.VALUE_MODE_BLACKLIST);
if (mode.equals(Common.VALUE_MODE_AUTO)) {
return true;
}else
if (mode.equals(Common.VALUE_MODE_BLACKLIST)) ... |
protected java.lang.Boolean doInBackground(java.lang.Void... params) {
com.cs3235.door.doorlockandroid.login.IvleLoginManager ivleLoginManager = new com.cs3235.door.doorlockandroid.login.IvleLoginManager(httpManager);
com.cs3235.door.doorlockandroid.login.IvleLoginManager.IvleLoginResult ivleResult = ivleLoginM... | protected java.lang.Boolean doInBackground(java.lang.Void... params) {
com.cs3235.door.doorlockandroid.login.IvleLoginManager ivleLoginManager = new com.cs3235.door.doorlockandroid.login.IvleLoginManager(httpManager);
com.cs3235.door.doorlockandroid.login.IvleLoginManager.IvleLoginResult ivleResult = ivleLoginM... |
public void checkAttributeValue(cz.metacentrum.perun.core.api.PerunSession sess, cz.metacentrum.perun.core.api.Member member, cz.metacentrum.perun.core.api.Attribute attribute) throws cz.metacentrum.perun.core.api.exceptions.InternalErrorException, cz.metacentrum.perun.core.api.exceptions.WrongAttributeValueException, ... | public void checkAttributeValue(cz.metacentrum.perun.core.api.PerunSession sess, cz.metacentrum.perun.core.api.Member member, cz.metacentrum.perun.core.api.Attribute attribute) throws cz.metacentrum.perun.core.api.exceptions.InternalErrorException, cz.metacentrum.perun.core.api.exceptions.WrongAttributeValueException, ... |
public void doWithLockNoResult() {
if (!(sdSvc.isActiveService(service))) {
return ;
}
java.util.List<io.cattle.platform.servicediscovery.deployment.impl.DeploymentUnit> units = unitInstanceFactory.collectDeploymentUnits(services, new io.cattle.platform.servicediscovery.deployment.impl.DeploymentMan... | public void doWithLockNoResult() {
if (!(sdSvc.isActiveService(service))) {
return ;
}
java.util.List<io.cattle.platform.servicediscovery.deployment.impl.DeploymentUnit> units = unitInstanceFactory.collectDeploymentUnits(services, new io.cattle.platform.servicediscovery.deployment.impl.DeploymentMan... |
public void onTick(net.frozenbit.plugin5zig.cubecraft.gamemodes.DuelsGameMode gameMode) {
if ((gameMode.getState()) != (eu.the5zig.mod.server.GameState.LOBBY)) {
(timer)++;
if (((timer) % (net.frozenbit.plugin5zig.cubecraft.listeners.DuelsListener.OPPONENT_UPDATE_INTERVAL)) == 0) {
updat... | public void onTick(net.frozenbit.plugin5zig.cubecraft.gamemodes.DuelsGameMode gameMode) {
super.onTick(gameMode);
if ((gameMode.getState()) != (eu.the5zig.mod.server.GameState.LOBBY)) {
(timer)++;
if (((timer) % (net.frozenbit.plugin5zig.cubecraft.listeners.DuelsListener.OPPONENT_UPDATE_INTERVAL... |
public void onClick(android.view.View v) {
switch (v.getId()) {
case R.id.tvCensusForms :
android.content.Intent categoryIntent = new android.content.Intent(this, com.example.knbs.censusapp.CategoryActivity.class);
startActivity(categoryIntent);
break;
case R.id.t... | public void onClick(android.view.View v) {
switch (v.getId()) {
case R.id.tvCensusForms :
android.content.Intent categoryIntent = new android.content.Intent(this, com.example.knbs.censusapp.CategoryActivity.class);
startActivity(categoryIntent);
break;
case R.id.t... |
private void handleIntent(android.content.Intent intent) {
final int configScreenId = intent.getIntExtra(org.droidplanner.android.activities.ConfigurationActivity.EXTRA_CONFIG_SCREEN_ID, mConfigScreenId);
final android.support.v4.app.Fragment currentFragment = getCurrentFragment();
if ((currentFragment == n... | private void handleIntent(android.content.Intent intent) {
final int configScreenId = intent.getIntExtra(org.droidplanner.android.activities.ConfigurationActivity.EXTRA_CONFIG_SCREEN_ID, mConfigScreenId);
final android.support.v4.app.Fragment currentFragment = getCurrentFragment();
if ((currentFragment == n... |
public void usePotion() {
for (int i = 2; i < (this.potions.length); i--) {
if ((this.potions[i]) != null) {
heal(50);
this.potions[i] = null;
return ;
}
}
} | public void usePotion() {
for (int i = 2; i >= 0; i--) {
if ((this.potions[i]) != null) {
heal(50);
this.potions[i] = null;
return ;
}
}
} |
public static void main(java.lang.String[] args) {
char letter = 'a';
int a;
final int MIN = 65;
final int MAX = 122;
final int STOPLINE1 = 85;
final int STOPLINE2 = 122;
for (a = MIN; a <= MAX; a++)
letter = ((char) (a));
java.lang.System.out.print((" " + letter));
if ... | public static void main(java.lang.String[] args) {
char letter;
int a;
final int MIN = 65;
final int MAX = 122;
final int STOPLINE1 = 85;
final int STOPLINE2 = 122;
for (a = MIN; a <= MAX; a++) {
letter = ((char) (a));
java.lang.System.out.print((" " + letter));
if (... |
private void setSPenToolActionWithAllCanvases(int toolAction) {
for (int i = 0; i < (numWritableCharBoxCols); i++) {
for (int j = 0; j < (numCharBoxesInCol); j++) {
if (mCharBoxes[i][j].isActivated()) {
mCharBoxes[i][j].setToolTypeAction(SpenSurfaceView.TOOL_SPEN, toolAction);
... | private void setSPenToolActionWithAllCanvases(int toolAction) {
for (int i = 0; i < (numWritableCharBoxCols); i++) {
for (int j = 0; j < (numCharBoxesInCol); j++) {
mCharBoxes[i][j].setToolTypeAction(SpenSurfaceView.TOOL_SPEN, toolAction);
}
}
return ;
} |
private void deleteSelected() {
java.util.Map<ru.sukharev.pathtracker.utils.orm.MapPath, java.lang.Boolean> map = mAdapter.getCheckedMap();
try {
for (ru.sukharev.pathtracker.utils.orm.MapPath path : map.keySet()) {
if (map.get(path)) {
deletePathFromDatabase(path);
... | private void deleteSelected() {
java.util.Map<ru.sukharev.pathtracker.utils.orm.MapPath, java.lang.Boolean> map = mAdapter.getCheckedMap();
for (ru.sukharev.pathtracker.utils.orm.MapPath path : map.keySet()) {
if (map.get(path)) {
deletePathFromDatabase(path);
mAdapter.remove(pat... |
public void onStopTrackingTouch(android.widget.SeekBar seekBar) {
mTextSeekBar.setText(((("Shutter Speed(in ns):" + ((mSeekbar.getProgress()) + ShutterSpeed1)) + "/") + (java.lang.Math.round(((mSeekbar.getMax()) + ShutterSpeed1)))));
android.widget.Toast.makeText(getApplicationContext(), "Setting Shutter Speed"... | public void onStopTrackingTouch(android.widget.SeekBar seekBar) {
mTextSeekBar.setText(((("Shutter Speed(in ns):" + ((mSeekbar.getProgress()) + ShutterSpeed1)) + "/") + (java.lang.Math.round(((mSeekbar.getMax()) + ShutterSpeed1)))));
android.widget.Toast.makeText(getApplicationContext(), "Setting Shutter Speed"... |
public org.pb.x12.EDI parse(java.io.InputStream source) throws java.io.IOException, org.pb.x12.FormatException {
java.lang.StringBuilder strBuffer = new java.lang.StringBuilder();
char[] cbuf = new char[1024];
int length = -1;
java.io.Reader reader = new java.io.BufferedReader(new java.io.InputStreamRea... | public org.pb.x12.EDI parse(java.io.InputStream source) throws java.io.IOException, org.pb.x12.FormatException {
java.lang.StringBuilder strBuffer = new java.lang.StringBuilder();
char[] cbuf = new char[1024];
int length;
java.io.Reader reader = new java.io.BufferedReader(new java.io.InputStreamReader(s... |
private void postSecretMessage(ndbc.Message secret, java.sql.Connection connection) {
try (java.sql.Statement statement = connection.createStatement()) {
java.lang.System.out.println(secret.sender);
java.lang.String queryString = "INSERT INTO d1(id, user, message) VALUES('";
queryString += s... | private void postSecretMessage(ndbc.Message secret, java.sql.Connection connection) {
try (java.sql.Statement statement = connection.createStatement()) {
java.lang.String queryString = "INSERT INTO d1(id, user, message) VALUES('";
queryString += secret.messageId;
queryString += "', '";
... |
public org.tiogasolutions.couchace.core.api.request.PutDesignRequest design(java.lang.String designName, java.net.URL designFile, java.lang.String documentRevision) {
org.tiogasolutions.couchace.core.internal.util.ArgUtil.assertNotNull(designName, "designName");
org.tiogasolutions.couchace.core.internal.util.Ar... | public org.tiogasolutions.couchace.core.api.request.PutDesignRequest design(java.lang.String designName, java.net.URL designFile, java.lang.String documentRevision) {
org.tiogasolutions.couchace.core.internal.util.ArgUtil.assertNotNull(designName, "designName");
org.tiogasolutions.couchace.core.internal.util.Ar... |
public void hideSoftInput() {
android.view.View view = ((android.app.Activity) (context)).getCurrentFocus();
if (view == null)
view = new android.view.View(((android.app.Activity) (context)));
android.view.inputmethod.InputMethodManager imm = ((android.view.inputmethod.InputMethodManager) (((an... | public void hideSoftInput() {
android.view.View view = ((android.app.Activity) (context)).getCurrentFocus();
if (view == null)
view = new android.view.View(context);
android.view.inputmethod.InputMethodManager imm = ((android.view.inputmethod.InputMethodManager) (context.getSystemService(Activi... |
public boolean configChanged() {
int currentConfigHash = this.configProps.hashCode();
boolean configChanged = (this.propsHashCode) != currentConfigHash;
if (configChanged && (net.jawr.web.resource.bundle.factory.PropsConfigPropertiesSource.LOGGER.isDebugEnabled()))
net.jawr.web.resource.bundle.facto... | public boolean configChanged() {
int currentConfigHash = this.configProps.hashCode();
boolean configChanged = ((propsHashCode) != null) && ((this.propsHashCode) != currentConfigHash);
if (configChanged && (net.jawr.web.resource.bundle.factory.PropsConfigPropertiesSource.LOGGER.isDebugEnabled()))
net... |
public static org.osbot.rs07.api.map.Area[] getBanks() {
return new org.osbot.rs07.api.map.Area[]{ org.osbot.rs07.api.map.constants.Banks.AL_KHARID , org.osbot.rs07.api.map.constants.Banks.ARDOUGNE_NORTH , org.osbot.rs07.api.map.constants.Banks.ARDOUGNE_SOUTH , org.osbot.rs07.api.map.constants.Banks.CAMELOT , org.o... | public static org.osbot.rs07.api.map.Area[] getBanks() {
return new org.osbot.rs07.api.map.Area[]{ org.osbot.rs07.api.map.constants.Banks.AL_KHARID , org.osbot.rs07.api.map.constants.Banks.ARDOUGNE_NORTH , org.osbot.rs07.api.map.constants.Banks.ARDOUGNE_SOUTH , org.osbot.rs07.api.map.constants.Banks.CAMELOT , org.o... |
private boolean isValideEmail(java.lang.String email) {
java.sql.Statement stmt;
boolean status = false;
java.sql.Connection con = null;
try {
bean.ConnectionProvider provider = new bean.ConnectionProvider();
con = provider.getCon();
stmt = con.createStatement();
java.lan... | private boolean isValideEmail(java.lang.String email) {
java.sql.Statement stmt;
boolean status = false;
java.sql.Connection con = null;
try {
bean.ConnectionProvider provider = new bean.ConnectionProvider();
con = provider.getCon();
stmt = con.createStatement();
java.lan... |
public boolean tryReadLockWithCondition(V expected) {
int[] stamp = new int[1];
V value = lock.get(stamp);
return lock.compareAndSet(expected, expected, stamp[0], ((stamp[0]) + 2));
} | public boolean tryReadLockWithCondition(V expected) {
int[] stamp = new int[1];
V value;
do {
value = lock.get(stamp);
if ((expected != value) && ((value == null) || (!(expected.equals(value))))) {
return false;
}
} while (lock.compareAndSet(value, value, stamp[0], ((... |
public void showErroDialog() {
android.app.AlertDialog.Builder alert = new android.app.AlertDialog.Builder(this);
alert.setMessage("哎呀,居然发生错误了,是不是没有安装这个程序呢 :(");
alert.setPositiveButton("确定", null);
alert.setCancelable(false);
alert.create();
alert.show();
} | public static void showErroDialog(android.content.Context c) {
android.app.AlertDialog.Builder alert = new android.app.AlertDialog.Builder(c);
alert.setMessage("哎呀,居然发生错误了,是不是没有安装这个程序呢 :(");
alert.setPositiveButton("确定", null);
alert.setCancelable(false);
alert.create();
alert.show();
} |
public java.lang.String[] getQueryableAttributs() {
return new java.lang.String[]{ "name" , "custom" , "type" , "color" , "oracle" , "mana" , "cmc" , "power" , "toughness" , "loyalty" , "is" , "rarity" , "cube" , "artist" , "flavor" , "watermark" , "border" , "frame" , "set" };
} | public java.lang.String[] getQueryableAttributs() {
return new java.lang.String[]{ "custom" , "name" , "type" , "color" , "oracle" , "mana" , "cmc" , "power" , "toughness" , "loyalty" , "is" , "rarity" , "cube" , "artist" , "flavor" , "watermark" , "border" , "frame" , "set" };
} |
public void startLoop(java.lang.String filepath, trips.CarActionsFilter... filter) {
java.util.Set<trips.CarActionsFilter> filters = new java.util.HashSet(java.util.Arrays.asList(filter));
streamer = new trips.DataStreamSimulator(filepath, filters);
streamer.addStreamListener(this::newAction);
streamer.... | public void startLoop(java.lang.String filepath, trips.CarActionsFilter... filter) {
java.util.Set<trips.CarActionsFilter> filters = new java.util.HashSet(java.util.Arrays.asList(filter));
streamer = new trips.DataStreamSimulator(filepath, filters);
streamer.addStreamListener(this);
streamer.startStream... |
public void onAudioFocusChange(int focusChange) {
if (focusChange == (android.media.AudioManager.AUDIOFOCUS_LOSS_TRANSIENT)) {
mPlayTimer.stop();
mMediaPlayer.pause();
unregisterAudio();
}else
if (focusChange == (android.media.AudioManager.AUDIOFOCUS_GAIN)) {
}else
... | public void onAudioFocusChange(int focusChange) {
if (focusChange == (android.media.AudioManager.AUDIOFOCUS_LOSS_TRANSIENT)) {
mPlayTimer.stop();
mMediaPlayer.pause();
}else
if (focusChange == (android.media.AudioManager.AUDIOFOCUS_GAIN)) {
}else
if (focusChange == (a... |
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
android.view.View v = inflater.inflate(R.layout.second_frag, container, false);
currentCarIndex = getArguments().getInt("current_car", 0);
currentCar = com.tw... | public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
android.view.View v = inflater.inflate(R.layout.second_frag, container, false);
currentCarIndex = getArguments().getInt("current_car", 0);
currentCar = com.tw... |
public void onClick(android.view.View view) {
if (((android.support.v4.app.ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)) != (android.content.pm.PackageManager.PERMISSION_GRANTED)) && ((android.support.v4.app.ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_CO... | public void onClick(android.view.View view) {
if (((android.support.v4.app.ActivityCompat.checkSelfPermission(view.getContext(), Manifest.permission.ACCESS_FINE_LOCATION)) != (android.content.pm.PackageManager.PERMISSION_GRANTED)) && ((android.support.v4.app.ActivityCompat.checkSelfPermission(view.getContext(), Man... |
public void restartGame() {
this.instanceGame.getScheduler().stopAllTimers();
this.instanceGame.getScheduler().restoreSpeed();
deleteArray(snake);
deleteArray(foodInBonus);
matrix[xFood][yFood].setBackground(this.instanceGame.getBackgroundGame());
matrix[xFood][yFood].setIcon(null);
startGam... | public void restartGame() {
this.instanceGame.getScheduler().restoreSpeed();
deleteArray(snake);
deleteArray(foodInBonus);
matrix[xFood][yFood].setBackground(this.instanceGame.getBackgroundGame());
matrix[xFood][yFood].setIcon(null);
startGame();
this.instanceGame.updateScore(score);
} |
public static java.lang.String getDomainName(java.lang.String url) throws java.net.URISyntaxException {
java.net.URI uri = new java.net.URI(url);
java.lang.String domain = uri.getHost();
if (domain == null) {
return url.replace("www.", "");
}
return domain.replace("www.", "");
} | public static java.lang.String getDomainName(java.lang.String url) throws java.net.URISyntaxException {
java.net.URI uri = new java.net.URI(url);
java.lang.String domain = uri.getHost();
if (domain == null) {
return url.replaceAll("www.", "");
}
return domain.replaceAll("www.", "");
} |
private void addDeveloperFromInput() {
int id = readIdFromInput();
com.homelearning.model.Developer developer = developerController.getById(id);
if (developer == null) {
developerController.save(new com.homelearning.model.Developer(readIdFromInput(), readFirstNameFromInput(), readLastNameFromInput()... | private void addDeveloperFromInput() {
int id = readIdFromInput();
com.homelearning.model.Developer developer = developerController.getById(id);
if (developer == null) {
developerController.save(new com.homelearning.model.Developer(id, readFirstNameFromInput(), readLastNameFromInput(), readSpecialty... |
public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
mProfile = dataSnapshot.getValue(mobi.devteam.demofalldetector.model.Profile.class);
age = mProfile.getAge();
bmi = (mProfile.getWeight()) / (java.lang.Math.sqrt(mProfile.getHeight()));
isMale = mProfile.isMale();
thr... | public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
mProfile = dataSnapshot.getValue(mobi.devteam.demofalldetector.model.Profile.class);
if ((mProfile) == null)
return ;
age = mProfile.getAge();
bmi = (mProfile.getWeight()) / (java.lang.Math.sqrt(mProfile.getH... |
public net.openchrom.msd.converter.supplier.cms.model.IIonMeasurement getIonMeasurement(int scanIndex) {
if (!(isMinMaxSignalCalculated())) {
updateSignalLimits();
}
if ((scanIndex > 0) && (scanIndex < (ionMeasurements.size()))) {
return ionMeasurements.get(scanIndex);
}else {
re... | public net.openchrom.msd.converter.supplier.cms.model.IIonMeasurement getIonMeasurement(int scanIndex) {
if (!(isMinMaxSignalCalculated())) {
updateSignalLimits();
}
if ((scanIndex >= 0) && (scanIndex < (ionMeasurements.size()))) {
return ionMeasurements.get(scanIndex);
}else {
r... |
public void keyPressed(java.awt.event.KeyEvent e) {
if (((remain.length()) == 0) && ((e.getKeyCode()) != (java.awt.event.KeyEvent.VK_ENTER))) {
e.consume();
retype();
}else {
java.lang.String item = "%d %d 0";
long curTime = java.lang.System.currentTimeMillis();
records.a... | public void keyPressed(java.awt.event.KeyEvent e) {
if (((remain.length()) == 0) && ((e.getKeyCode()) != (java.awt.event.KeyEvent.VK_ENTER))) {
e.consume();
retype();
}else {
java.lang.String item = "%d %d 0";
long curTime = java.lang.System.currentTimeMillis();
records.a... |
private static java.util.Optional<java.nio.file.Path> expandFilename(java.lang.String filename, java.nio.file.Path directory) {
java.util.Objects.requireNonNull(filename);
java.util.Objects.requireNonNull(directory);
java.nio.file.Path file = java.nio.file.Paths.get(filename);
if (java.nio.file.Files.ex... | private static java.util.Optional<java.nio.file.Path> expandFilename(java.lang.String filename, java.nio.file.Path directory) {
java.util.Objects.requireNonNull(filename);
java.util.Objects.requireNonNull(directory);
java.nio.file.Path file = java.nio.file.Paths.get(filename);
if (filename.isEmpty()) {
... |
public int hashCode() {
int hash = 7;
hash = (53 * hash) + (java.util.Objects.hashCode(this.topLeft));
hash = (53 * hash) + (java.util.Objects.hashCode(this.bottomRight));
return hash;
} | public int hashCode() {
int hash = 7;
hash = (53 * hash) + (this.topLeft.hashCode());
hash = (53 * hash) + (this.bottomRight.hashCode());
return hash;
} |
protected void clear() {
mTotal = 0;
mLayoutManager.setLayoutHelpers(null);
for (android.util.Pair<com.alibaba.android.vlayout.DelegateAdapter.AdapterDataObserver, com.alibaba.android.vlayout.DelegateAdapter.Adapter> p : mAdapters) {
p.second.unregisterAdapterDataObserver(p.first);
}
mItemTy... | public void clear() {
mTotal = 0;
mLayoutManager.setLayoutHelpers(null);
for (android.util.Pair<com.alibaba.android.vlayout.DelegateAdapter.AdapterDataObserver, com.alibaba.android.vlayout.DelegateAdapter.Adapter> p : mAdapters) {
p.second.unregisterAdapterDataObserver(p.first);
}
mItemTypeA... |
private int find_next_test_item(int CurrentTestItem) {
int NextTestItemL = 0;
boolean NeedTest = false;
do {
NextTestItemL = CurrentTestItem + 1;
not_end_test_all = (NextTestItem) != (end_test_item);
if (not_end_test_all) {
NeedTest = fec_test_items_order[NextTestItem].te... | private int find_next_test_item(int CurrentTestItem) {
int NextTestItemL = 0;
boolean NeedTest = false;
NextTestItemL = CurrentTestItem + 1;
do {
not_end_test_all = NextTestItemL != (end_test_item);
if (not_end_test_all) {
NeedTest = fec_test_items_order[NextTestItemL].test;
... |
protected void setCurrentNetworkView(final org.cytoscape.view.model.CyNetworkView newView) {
synchronized(lock) {
if ((((currentNetworkView) == null) && (newView == null)) || (((currentNetworkView) != null) && (currentNetworkView.equals(newView))))
return ;
final org.cytoscape.v... | protected boolean setCurrentNetworkView(final org.cytoscape.view.model.CyNetworkView newView) {
synchronized(lock) {
if ((((currentNetworkView) == null) && (newView == null)) || (((currentNetworkView) != null) && (currentNetworkView.equals(newView))))
return false;
final org.cyt... |
public void start() {
if (!(lazyMode)) {
if (!(((itemProperty().getValue()) != null) || ((beanProperty().getValue()) != null))) {
reSchedule(null);
}
}
} | public void start() {
if (!(lazyMode)) {
if (!(((itemProperty().getValue()) == null) && ((beanProperty().getValue()) == null))) {
reSchedule(null);
}
}
} |
public int getPartition(org.apache.hadoop.io.LongWritable key, org.apache.hadoop.io.LongWritable value, int numberOfPartition) {
try {
hbase.query1.HBaseRowKeyPartitioner.fillFirstAndLastID();
} catch (java.io.IOException e) {
e.printStackTrace();
}
long intervalLength = ((hbase.query1.H... | public int getPartition(org.apache.hadoop.io.LongWritable key, org.apache.hadoop.io.LongWritable value, int numberOfPartition) {
try {
hbase.query1.HBaseRowKeyPartitioner.fillFirstAndLastID();
} catch (java.io.IOException e) {
e.printStackTrace();
}
long intervalLength = ((hbase.query1.H... |
private void removeTransform(org.bukkit.entity.Player player) {
org.bukkit.Bukkit.getServer().dispatchCommand(org.bukkit.Bukkit.getConsoleSender(), ("clearskin " + (player.getName())));
turnOff(player);
sendMessage(player, "You look like yourself again.");
sendMessage(player, strWarnMessage);
} | private void removeTransform(org.bukkit.entity.Player player) {
org.bukkit.Bukkit.getServer().dispatchCommand(org.bukkit.Bukkit.getConsoleSender(), ("clearskin " + (player.getName())));
sendMessage(player, "You look like yourself again.");
sendMessage(player, strWarnMessage);
} |
public ar.edu.unq.chasqui.model.Direccion obtenerDireccionPredeterminada() {
for (ar.edu.unq.chasqui.model.Direccion d : this.getDireccionesAlternativas()) {
if (d.getPredeterminada()) {
return d;
}
}
return (this.getDireccionesAlternativas()) != null ? this.getDireccionesAlterna... | public ar.edu.unq.chasqui.model.Direccion obtenerDireccionPredeterminada() {
for (ar.edu.unq.chasqui.model.Direccion d : this.getDireccionesAlternativas()) {
if (d.getPredeterminada()) {
return d;
}
}
return ((this.getDireccionesAlternativas()) != null) && ((this.getDireccionesAl... |
protected java.lang.String processRequest(cn.edu.fudan.request.AddTableRequest request, cn.edu.fudan.util.Session session) throws java.lang.Exception {
return (request == null) || ((request.table()) == (AddTableRequest.Table.DEFAULT)) ? "error" : (new cn.edu.fudan.dao.AddTableDAO(this, request).getResult()) > 0 ? "... | protected java.lang.String processRequest(cn.edu.fudan.request.AddTableRequest request, cn.edu.fudan.util.Session session) throws java.lang.Exception {
if ((request == null) || ((request.table()) == (AddTableRequest.Table.DEFAULT)))
return "error";
java.lang.Integer result = new cn.edu.fudan.dao.Ad... |
public void startTournament() throws java.lang.Exception {
for (int p1 = 0; p1 < (players.size()); p1++) {
for (int p2 = p1; p2 < (players.size()); p2++) {
if (p1 != p2) {
startGame(players.get(p1), players.get(p2));
}
}
}
} | public void startTournament() throws java.lang.Exception {
for (int p1 = 0; p1 < (players.size()); p1++) {
for (int p2 = 0; p2 < (players.size()); p2++) {
if (p1 != p2) {
startGame(players.get(p1), players.get(p2));
}
}
}
} |
@android.support.annotation.Nullable
static android.net.Uri safeUri(@android.support.annotation.NonNull
java.lang.String url) {
if (android.text.TextUtils.isEmpty(url)) {
return null;
}
android.net.Uri uri = android.net.Uri.parse(url);
if (((uri.getHost()) == null) || ((uri.getScheme()) == null)... | @android.support.annotation.Nullable
static android.net.Uri safeUri(@android.support.annotation.NonNull
java.lang.String url) {
if (android.text.TextUtils.isEmpty(url)) {
return null;
}
android.net.Uri uri = android.net.Uri.parse(url);
if ((android.text.TextUtils.isEmpty(uri.getScheme())) || (an... |
public void setRawData(java.util.List<float[]> data) {
this.centroids = null;
this.data = new edu.uc.rphash.tests.clusterers.KMeans2.PointND[data.size()];
for (int i = 0; i < (data.size()); i++) {
this.data[i] = new edu.uc.rphash.tests.clusterers.KMeans2.PointND(data.get(i), 1, new float[data.get(0)... | public void setRawData(java.util.List<float[]> data) {
this.centroids = null;
this.data = new edu.uc.rphash.tests.clusterers.KMeans2.PointND[data.size()];
for (int i = 0; i < (data.size()); i++) {
this.data[i] = new edu.uc.rphash.tests.clusterers.KMeans2.PointND(data.get(i), 1, 0.0F);
}
} |
protected void actOnResource(org.fogbowcloud.blowout.pool.AbstractResource resource, java.util.List<org.fogbowcloud.blowout.core.model.Task> tasks) {
org.fogbowcloud.blowout.infrastructure.model.ResourceState state = resource.getState();
if (resource.getState().equals(ResourceState.IDLE)) {
org.fogbowcl... | protected void actOnResource(org.fogbowcloud.blowout.pool.AbstractResource resource, java.util.List<org.fogbowcloud.blowout.core.model.Task> tasks) {
if (resource.getState().equals(ResourceState.IDLE)) {
org.fogbowcloud.blowout.core.model.Task task = chooseTaskForRunning(resource, tasks);
if (task !... |
private static com.emergentorganization.cellrpg.tools.map.MapObject parseItem(org.w3c.dom.Node item, com.badlogic.gdx.math.Vector2 offset) {
if (item.getNodeName().contentEquals("image")) {
return com.emergentorganization.cellrpg.tools.map.MapLoader.parseImage(item, offset);
}else
if (item.getNo... | private static com.emergentorganization.cellrpg.tools.map.MapObject parseItem(org.w3c.dom.Node item) {
if (item.getNodeName().contentEquals("image")) {
com.badlogic.gdx.math.Vector2 offset = new com.badlogic.gdx.math.Vector2();
return com.emergentorganization.cellrpg.tools.map.MapLoader.parseImage(i... |
private void flush() throws java.io.IOException {
try (java.io.BufferedWriter bw = new java.io.BufferedWriter(new java.io.FileWriter(gameFile))) {
batch.append("\n\n");
bw.write(batch.toString());
}
batch = new java.lang.StringBuffer();
currentBatchSize = 0;
gameStateRecorded = false... | private void flush() throws java.io.IOException {
try (java.io.BufferedWriter bw = new java.io.BufferedWriter(new java.io.FileWriter(gameFile, true))) {
batch.append("\n\n");
bw.write(batch.toString());
}
batch = new java.lang.StringBuffer();
currentBatchSize = 0;
gameStateRecorded =... |
public void reiniciar() throws java.lang.InterruptedException {
damas_v1.Ficha f = new damas_v1.Ficha("·");
damas_v1.FichaSwing fswing;
for (int i = 0; i < (MAXFILAS); i++) {
for (int j = 0; j < (MAXCOLUMNAS); j++) {
casillero[i][j] = f;
fswing = new damas_v1.FichaSwing(((i *... | public void reiniciar() throws java.lang.InterruptedException {
damas_v1.Ficha f = new damas_v1.Ficha("·");
for (int i = 0; i < (MAXFILAS); i++) {
for (int j = 0; j < (MAXCOLUMNAS); j++) {
casillero[i][j] = f;
setChanged();
}
}
} |
public void sendConfig(java.lang.String apiKey, java.lang.String config) {
try {
org.springframework.amqp.core.MessageProperties properties = new org.springframework.amqp.core.MessageProperties();
properties.setHeader(RabbitMQConfig.MSG_HEADER_APIKEY, apiKey);
org.springframework.amqp.core.M... | public void sendConfig(java.lang.String apiKey, java.lang.String config) {
try {
org.springframework.amqp.core.MessageProperties properties = new org.springframework.amqp.core.MessageProperties();
properties.setHeader(RabbitMQConfig.MSG_HEADER_APIKEY, apiKey);
org.springframework.amqp.core.M... |
protected java.lang.Object invoke(java.lang.Object args) throws java.lang.Exception {
java.lang.String[] argdata = ((java.lang.String[]) (args));
int arg1 = java.lang.Integer.valueOf(argdata[0]);
int arg2 = java.lang.Integer.valueOf(argdata[1]);
int arg3 = java.lang.Integer.valueOf(argdata[2]);
retu... | public java.lang.Object invoke(java.lang.Object args) throws java.lang.Exception {
java.lang.String[] argdata = ((java.lang.String[]) (args));
int arg1 = java.lang.Integer.valueOf(argdata[0]);
int arg2 = java.lang.Integer.valueOf(argdata[1]);
int arg3 = java.lang.Integer.valueOf(argdata[2]);
return ... |
public static void editNoteFromTable(java.lang.String title, java.lang.String text, java.lang.String deadline) {
com.leofesk.quicktodomanager.model.Database.updateCurrentNoteFromDatabase(com.leofesk.quicktodomanager.controller.DataBaseWorker.currentNoteID, title, text, deadline, com.leofesk.quicktodomanager.control... | public static void editNoteFromTable(java.lang.String title, java.lang.String text, java.lang.String deadline) {
com.leofesk.quicktodomanager.model.Database.updateCurrentNoteFromDatabase(com.leofesk.quicktodomanager.controller.DataBaseWorker.currentNoteID, title, text, deadline, com.leofesk.quicktodomanager.control... |
public void seekToUs(long positionUs) {
com.google.android.exoplayer.util.Assertions.checkState(prepared);
com.google.android.exoplayer.util.Assertions.checkState(((enabledTrackCount) > 0));
positionUs = (chunkSource.isLive()) ? 0 : positionUs;
long currentPositionUs = (isPendingReset()) ? pendingResetP... | public void seekToUs(long positionUs) {
com.google.android.exoplayer.util.Assertions.checkState(prepared);
com.google.android.exoplayer.util.Assertions.checkState(((enabledTrackCount) > 0));
long currentPositionUs = (isPendingReset()) ? pendingResetPositionUs : downstreamPositionUs;
downstreamPositionUs... |
protected android.graphics.Bitmap setBitmapSize(int iconId, int w) {
android.graphics.Bitmap bitmap = android.graphics.BitmapFactory.decodeResource(getContext().getResources(), iconId);
float s = (w * 1.0F) / (bitmap.getWidth());
bitmap = android.graphics.Bitmap.createScaledBitmap(bitmap, ((int) ((bitmap.ge... | private android.graphics.Bitmap setBitmapSize(int iconId, int w) {
android.graphics.Bitmap bitmap = android.graphics.BitmapFactory.decodeResource(getContext().getResources(), iconId);
float s = (w * 1.0F) / (bitmap.getWidth());
bitmap = android.graphics.Bitmap.createScaledBitmap(bitmap, ((int) ((bitmap.getW... |
protected void processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
response.setContentType("text/html;charset=UTF-8");
edu.wctc.da.bookwebapp.model.AuthorService authorService = new edu.wctc.d... | protected void processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
response.setContentType("text/html;charset=UTF-8");
edu.wctc.da.bookwebapp.model.AuthorService authorService = new edu.wctc.d... |
private void excludeCols(final boolean[] checkedItems) {
int i = 1;
assert null != checkedItems;
assert null != (this.templateModel);
for (final boolean checkedItem : checkedItems)
if (checkedItem)
this.templateModel.addExcludeCol((i++));
} | private void excludeCols(final boolean[] checkedItems) {
int i = 1;
assert null != checkedItems;
assert null != (this.templateModel);
for (final boolean checkedItem : checkedItems) {
if (checkedItem)
this.templateModel.addExcludeCol(i);
i++;
}
} |
private final boolean _log(simple.util.logging.LogLevel type, java.lang.Object msg, byte options) {
if (simple.util.logging.Log.isSet(options, type))
return _out.checkError();
synchronized(writeSync) {
_out.print(_getPreMessage(type));
_out.print(_cName);
_out.print(": ");
... | private final boolean _log(simple.util.logging.LogLevel type, java.lang.Object msg, byte options) {
if (!(simple.util.logging.Log.isSet(options, type)))
return _out.checkError();
synchronized(writeSync) {
_out.print(_getPreMessage(type));
_out.print(_cName);
_out.print(": ")... |
public static void find(java.lang.String arg, java.util.ArrayList<java.lang.String> list) {
if ((list.indexOf(arg)) == (-1)) {
java.lang.System.out.printf("%s not in list\n", arg);
}else {
java.lang.System.out.printf("%s in list at index %d\n", arg, list.indexOf(arg));
}
} | public static void find(java.lang.String arg, java.util.List<java.lang.String> list) {
if ((list.indexOf(arg)) == (-1)) {
java.lang.System.out.printf("%s not in list\n", arg);
}else {
java.lang.System.out.printf("%s in list at index %d\n", arg, list.indexOf(arg));
}
} |
private boolean checkForAKind() {
if (((findSameRank(((PJ5.SimplePoker.numberOfCards) - 1))) < 0) && ((kindCounter) == 4)) {
java.lang.System.out.println("Four of a kind!");
kindCounter = 0;
return true;
}else
if (((findSameRank(((PJ5.SimplePoker.numberOfCards) - 1))) < 0) && ((k... | private boolean checkForAKind() {
if (((findSameRank(((PJ5.SimplePoker.numberOfCards) - 1))) < 0) && ((kindCounter) == 4)) {
java.lang.System.out.println("Four of a kind!");
kindCounter = 0;
return true;
}
kindCounter = 0;
if (((findSameRank(((PJ5.SimplePoker.numberOfCards) - 1))... |
public java.lang.String toString() {
if ((id) < 0)
return "< New Session >";
java.util.Date dateObj = new java.util.Date(date);
java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat("E, MMM dd yyyy");
java.lang.String result = dateFormat.format(dateObj);
org.joda.time.D... | public java.lang.String toString() {
if ((id) < 0)
return "< New Session >";
java.lang.String result;
org.joda.time.DateTime dt = new org.joda.time.DateTime(date);
org.joda.time.format.DateTimeFormatter dtf = org.joda.time.format.DateTimeFormat.forPattern("E, MMM dd yyyy");
result = dtf... |
public java.util.List<java.lang.String> getProperties(java.lang.String player) {
java.util.List<java.lang.String> propertyList = new java.util.ArrayList<java.lang.String>();
for (a4.domain.Property curr : properties) {
if (curr.getOwner().toString().equals(player)) {
propertyList.add(curr.to... | public java.util.List<java.lang.String> getProperties(java.lang.String player) {
java.util.List<java.lang.String> propertyList = new java.util.ArrayList<java.lang.String>();
for (a4.domain.Property curr : properties) {
if ((curr.getOwner()) != null)
if (curr.getOwner().toString().equals(play... |
public boolean onTouch(android.view.View view, android.view.MotionEvent motionEvent) {
switch (motionEvent.getAction()) {
case android.view.MotionEvent.ACTION_DOWN :
password.setTransformationMethod(null);
password.setSelection(password.getText().length());
return true;
... | public boolean onTouch(android.view.View view, android.view.MotionEvent motionEvent) {
switch (motionEvent.getAction()) {
case android.view.MotionEvent.ACTION_DOWN :
password.setTransformationMethod(null);
return true;
case android.view.MotionEvent.ACTION_UP :
pas... |
public void setSize(final java.lang.Long size) {
if ((getPrev()) != 0) {
final java.lang.Long prevSize = getObject().getIntegerKey(ASAtom.SIZE);
if (prevSize > size) {
return ;
}
}
getObject().setIntegerKey(ASAtom.SIZE, size);
} | public void setSize(final java.lang.Long size) {
if (((getPrev()) != null) && ((getPrev()) != 0)) {
final java.lang.Long prevSize = getObject().getIntegerKey(ASAtom.SIZE);
if (prevSize > size) {
return ;
}
}
getObject().setIntegerKey(ASAtom.SIZE, size);
} |
private void init(android.util.AttributeSet attrs, int defStyleAttr) {
android.content.res.TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.SVGView, defStyleAttr, 0);
svgId = a.getResourceId(R.styleable.SVGView_carbon_src, 0);
filterColor = a.getColorStateList(R.styleable.SVGView_carbon... | private void init(android.util.AttributeSet attrs, int defStyleAttr) {
android.content.res.TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.SVGView, defStyleAttr, 0);
svgId = a.getResourceId(R.styleable.SVGView_carbon_src, 0);
setColorFilter(a.getColorStateList(R.styleable.SVGView_carbo... |
public boolean validateDayOfWeek(java.time.LocalDateTime currentTime) {
application.main.Business business = new application.main.Business();
for (int i = 0; i < (business.getOpeningDays().length); i++) {
if (business.getOpeningDays()[i].equals(currentTime.getDayOfWeek())) {
application.main... | public boolean validateDayOfWeek(java.time.LocalDateTime currentTime) {
application.main.Business business = new application.main.Business();
for (int i = 0; i < (business.getOpeningDays().size()); i++) {
if (business.getOpeningDays().get(i).equals(currentTime.getDayOfWeek())) {
application.... |
private void showWarningToUser(android.os.Message msg) {
android.content.Intent intent = new android.content.Intent(this, com.juliansparber.vpnMITM.UserAlertDialog.class);
intent.addFlags((((android.content.Intent.FLAG_ACTIVITY_REORDER_TO_FRONT) | (android.content.Intent.FLAG_ACTIVITY_NEW_TASK)) | (android.cont... | public void showWarningToUser(android.os.Message msg) {
android.content.Intent intent = new android.content.Intent(this, com.juliansparber.vpnMITM.UserAlertDialog.class);
intent.addFlags((((android.content.Intent.FLAG_ACTIVITY_REORDER_TO_FRONT) | (android.content.Intent.FLAG_ACTIVITY_NEW_TASK)) | (android.conte... |
public synchronized void log(int style, java.lang.String message) {
try {
javax.swing.text.StyledDocument doc = m_textPane.getStyledDocument();
javax.swing.text.Style s = m_styles[style];
doc.insertString(doc.getLength(), message, s);
doc.insertString(doc.getLength(), "\n", s);
}... | public synchronized void log(int style, java.lang.String message) {
try {
javax.swing.text.StyledDocument doc = m_textPane.getStyledDocument();
doc.insertString(doc.getLength(), message, m_styles[style]);
} catch (javax.swing.text.BadLocationException e) {
java.lang.System.err.println(e)... |
protected void onPostExecute(java.lang.String res) {
super.onPostExecute(res);
android.os.Message msg = showRouteHandler.obtainMessage(com.jstakun.gms.android.ui.AsyncTaskManager.SHOW_ROUTE_MESSAGE, filename);
showRouteHandler.handleMessage(msg);
if (!(silent)) {
intents.showInfoToast(res);
... | protected void onPostExecute(java.lang.String res) {
super.onPostExecute(res);
if ((showRouteHandler) != null) {
android.os.Message msg = showRouteHandler.obtainMessage(com.jstakun.gms.android.ui.AsyncTaskManager.SHOW_ROUTE_MESSAGE, filename);
showRouteHandler.handleMessage(msg);
}
if (!... |
public void handle(org.dsa.iot.dslink.node.actions.ActionResult event) {
try {
com.serotonin.bacnet4j.type.constructed.PriorityArray priorities = getPriorityArray();
if (priorities == null)
return ;
for (int i = 1; i <= (priorities.getCount()); i++) {
relinqu... | public void handle(org.dsa.iot.dslink.node.actions.ActionResult event) {
try {
com.serotonin.bacnet4j.type.constructed.PriorityArray priorities = getPriorityArray();
if (priorities == null)
return ;
for (int i = 1; i <= (priorities.getCount()); i++) {
relinqu... |
public int compareTo(main.hibernate.dao.RankingDao o) {
if ((this.betScore) > (o.getBetScore()))
return 1;
if ((this.betScore) < (o.getBetScore()))
return -1;
return 0;
} | public int compareTo(main.hibernate.dao.RankingDao o) {
if ((this.betScore) > (o.getBetScore()))
return -1;
if ((this.betScore) < (o.getBetScore()))
return 1;
return 0;
} |
public boolean deleteLink(java.lang.String dbid, long id1, long link_type, long id2, boolean noinverse, boolean expunge) throws java.lang.Exception {
int deletionCount;
try (edu.berkeley.cs.Transaction tx = session.beginTransaction()) {
java.lang.String deleteLinkStmt = "MATCH (n1 {id: {id1}}) -[r:{link... | public boolean deleteLink(java.lang.String dbid, long id1, long link_type, long id2, boolean noinverse, boolean expunge) throws java.lang.Exception {
int deletionCount;
try (edu.berkeley.cs.Transaction tx = session.beginTransaction()) {
java.lang.String deleteLinkStmt = "MATCH (n1 {id: {id1}}) -[r:{link... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.