buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public java.lang.Integer getTileId(int id) {
seventh.map.Tileset bestmatch = null;
for (seventh.map.Tileset t : tilesets) {
if (id >= (t.getStartId())) {
if ((bestmatch == null) || ((bestmatch.getStartId()) < (t.getStartId()))) {
bestmatch = t;
}
}
}
... | public java.lang.Integer getTileId(int id) {
seventh.map.Tileset bestmatch = null;
for (seventh.map.Tileset t : tilesets) {
if (id >= (t.getStartId())) {
if ((bestmatch == null) || ((bestmatch.getStartId()) < (t.getStartId()))) {
bestmatch = t;
}
}
}
... |
public boolean isAvailableFor(java.lang.Object object) {
if ((property1) instanceof org.minimalj.model.properties.ChainedProperty) {
if (((org.minimalj.model.properties.ChainedProperty) (property1)).isAvailableFor(object)) {
return false;
}
}
return (property1.getValue(object)) !... | public boolean isAvailableFor(java.lang.Object object) {
if ((property1) instanceof org.minimalj.model.properties.ChainedProperty) {
if (!(((org.minimalj.model.properties.ChainedProperty) (property1)).isAvailableFor(object))) {
return false;
}
}
return (property1.getValue(object)... |
public void disconnectAll() {
int userCount;
java.util.concurrent.ExecutorService remover = java.util.concurrent.Executors.newFixedThreadPool(cores);
synchronized(users) {
userCount = users.size();
}
for (int i = 0; i < userCount; i++) {
final int iFinal = i;
remover.submit((... | private void disconnectAll() {
int userCount;
java.util.concurrent.ExecutorService remover = java.util.concurrent.Executors.newFixedThreadPool(cores);
synchronized(users) {
userCount = users.size();
}
for (int i = 0; i < userCount; i++) {
final int iFinal = i;
remover.submit(... |
private void flush(java.io.DataOutputStream out) throws java.io.IOException {
if ((this) == null)
return ;
out.writeChar(mRoot.mCharacter);
out.writeInt(size());
out.writeBoolean(mRoot.isTerminal);
for (sp.TrieImpl f : mNodes) {
f.flush(out);
}
out.writeChar('|');
} | private void flush(java.io.DataOutputStream out) throws java.io.IOException {
out.writeChar(mRoot.mCharacter);
out.writeInt(size());
out.writeBoolean(mRoot.isTerminal);
for (sp.TrieImpl f : mNodes) {
f.flush(out);
}
out.writeChar('|');
} |
public void onAuthenticationError(int errorCode, java.lang.CharSequence errString) {
super.onAuthenticationError(errorCode, errString);
if (errorCode == (FINGERPRINT_ERROR_CANCELED)) {
isCancelled = true;
}
if ((promise) == null) {
throw new java.lang.AssertionError("Tried to reject the ... | public void onAuthenticationError(int errorCode, java.lang.CharSequence errString) {
super.onAuthenticationError(errorCode, errString);
if (errorCode == (FINGERPRINT_ERROR_CANCELED)) {
isCancelled = true;
}
if ((promise) == null) {
return ;
}
promise.reject(java.lang.Integer.toSt... |
private void setCommentsCount() throws java.net.MalformedURLException {
org.json.simple.JSONObject currentObject;
int commentsCount = 0;
for (int i = 0; i < ((recentMedia.size()) - 1); i++) {
currentObject = ((org.json.simple.JSONObject) (recentMedia.get(i)));
org.json.simple.JSONObject comm... | private void setCommentsCount() throws java.net.MalformedURLException {
org.json.simple.JSONObject currentObject;
int commentsCount = 0;
for (int i = 0; i < (recentMedia.size()); i++) {
currentObject = ((org.json.simple.JSONObject) (recentMedia.get(i)));
org.json.simple.JSONObject commentsAr... |
public void testFindByWorkHoursWhenDriverHaveMoreHoursThanArgument() throws com.tsystems.javaschool.logiweb.dao.exceptions.DaoException, com.tsystems.javaschool.logiweb.service.exceptions.LogiwebServiceException {
setupMocks();
java.util.List<com.tsystems.javaschool.logiweb.entities.Driver> freeDrivers = setupD... | public void testFindByWorkHoursWhenDriverHaveMoreHoursThanArgument() throws com.tsystems.javaschool.logiweb.dao.exceptions.DaoException, com.tsystems.javaschool.logiweb.service.exceptions.LogiwebServiceException {
setupMocks();
java.util.List<com.tsystems.javaschool.logiweb.entities.Driver> freeDrivers = setupD... |
public void testValidateAlreadyUsedCode() {
org.hni.security.om.ActivationCode code = activationCodeService.getByActivationCode(org.hni.security.service.TestActivationCodeService.SUPPLIED_AUTH_CODE_1);
assertTrue(activationCodeService.validate(org.hni.security.service.TestActivationCodeService.SUPPLIED_AUTH_COD... | public void testValidateAlreadyUsedCode() {
org.hni.security.om.ActivationCode code = activationCodeService.getByActivationCode(org.hni.security.service.TestActivationCodeService.SUPPLIED_AUTH_CODE_1);
assertTrue(activationCodeService.validate(org.hni.security.service.TestActivationCodeService.SUPPLIED_AUTH_COD... |
public void releaseNotesAreGeneratedByTagWithPushOfReleaseNotes() throws java.io.IOException {
final java.lang.String[] args = new java.lang.String[]{ "-configurationFilePath" , com.infusion.relnotesgen.MainIT.class.getResource("/configuration.properties").getFile() , "-tag1" , "0.19.0.19" , "-pushReleaseNotes" , "... | public void releaseNotesAreGeneratedByTagWithPushOfReleaseNotes() throws java.io.IOException {
final java.lang.String[] args = new java.lang.String[]{ "-configurationFilePath" , com.infusion.relnotesgen.MainIT.class.getResource("/configuration.properties").getFile() , "-pushReleaseNotes" , "-reportDirectory" , com.... |
public void onJoinGame(co.neweden.gamesmanager.event.GMPlayerJoinGameEvent event) {
if (((listen) == false) && ((game.getPlaying().contains(event.getPlayer())) == false))
return ;
joinedAt.put(event.getPlayer(), java.lang.System.currentTimeMillis());
} | public void onJoinGame(co.neweden.gamesmanager.event.GMPlayerJoinGameEvent event) {
if ((listen) && (game.getPlaying().contains(event.getPlayer()))) {
joinedAt.put(event.getPlayer(), java.lang.System.currentTimeMillis());
}
} |
public boolean isDeleteable() {
if ((getLibrary()) == null)
return false;
if (getOwningComponent().getParent().isOperation())
return isEditable();
return getLibrary().isManaged() ? (isInHead()) && (isEditable()) : isEditable();
} | public boolean isDeleteable() {
if ((getLibrary()) == null)
return false;
if ((getOwningComponent().getParent()) == null)
return true;
if (getOwningComponent().getParent().isOperation())
return isEditable();
return getLibrary().isManaged() ? (isInHead()) && (isEdit... |
public void onCollisionWith(org.group17.Units.GameObject other) {
if (other instanceof org.group17.Units.Bubble) {
this.bInBubble = true;
}else {
this.getSpeed().setX(this.getSpeed().getX());
if ((other instanceof org.group17.Units.Player) && (bInBubble)) {
this.getMap().remo... | public void onCollisionWith(org.group17.Units.GameObject other) {
if (other instanceof org.group17.Units.Bubble) {
this.bInBubble = true;
}else {
this.getSpeed().setX((-(this.getSpeed().getX())));
if ((other instanceof org.group17.Units.Player) && (bInBubble)) {
this.getMap()... |
public static void load(java.lang.String file) {
try {
javax.sound.sampled.AudioInputStream audioInputStream = javax.sound.sampled.AudioSystem.getAudioInputStream(new java.io.File(file).getAbsoluteFile());
jrad.util.Music.music = javax.sound.sampled.AudioSystem.getClip();
jrad.util.Music.mus... | public static void load(java.lang.String file) {
try {
javax.sound.sampled.AudioInputStream audioInputStream = javax.sound.sampled.AudioSystem.getAudioInputStream(new java.io.File(file).getAbsoluteFile());
jrad.util.Music.music = javax.sound.sampled.AudioSystem.getClip();
jrad.util.Music.mus... |
protected void createFieldEditors() {
ch.elexis.core.findings.templates.model.FindingsTemplates model = FindingsServiceHolder.findingsTemplateService.getFindingsTemplates("Standard Vorlagen");
findingsComposite = new ch.elexis.core.findings.templates.ui.composite.FindingsComposite(getFieldEditorParent(), model)... | protected void createFieldEditors() {
ch.elexis.core.findings.templates.model.FindingsTemplates model = FindingsServiceHolder.findingsTemplateService.getFindingsTemplates("Standard Vorlagen");
findingsComposite = new ch.elexis.core.findings.templates.ui.composite.FindingsComposite(getFieldEditorParent(), model)... |
try {
Servercallback callbackStub = ((Servercallback) (java.rmi.server.UnicastRemoteObject.exportObject(clientCallback, 0)));
java.rmi.registry.Registry callbackRegistry = java.rmi.registry.LocateRegistry.getRegistry();
callbackRegistry.bind("Servercallback", callbackStub);
java.lang... | public void startCallback(Client clientCallback) {
try {
Servercallback callbackStub = ((Servercallback) (java.rmi.server.UnicastRemoteObject.exportObject(clientCallback, 0)));
java.rmi.registry.Registry callbackRegistry = java.rmi.registry.LocateRegistry.getRegistry();
callbackRegistry.bind... |
public void apply(double[] data) {
int firstElement = (data.length) - (window);
if (firstElement < 0)
firstElement = 0;
double vals = window;
if ((data.length) < (window))
vals = data.length;
double sum = 0.0;
for (int i = data.length; i > firstElement; i++) {
s... | public void apply(double[] data) {
int firstElement = (data.length) - (window);
if (firstElement < 0)
firstElement = 0;
double vals = window;
if ((data.length) < (window))
vals = data.length;
double sum = 0.0;
for (int i = firstElement; i < (data.length); i++) {
... |
public void update(float dt) {
player.update(dt);
handleInput(dt);
world.step((1 / 60.0F), 1, 2);
gamecam.position.x = player.b2body.getPosition().x;
gamecam.position.y = player.b2body.getPosition().y;
gamecam.update();
renderer.setView(gamecam);
} | public void update(float dt) {
player.update(dt);
handleInput(dt);
gamecam.position.x = player.b2body.getPosition().x;
gamecam.position.y = player.b2body.getPosition().y;
gamecam.update();
world.step((1 / 60.0F), 1, 2);
renderer.setView(gamecam);
} |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
android.util.Log.d(com.osu.cse5236.oddjobs.JobListFragment.TAG, "onOptionsItemSelected() called");
switch (item.getItemId()) {
case R.id.new_job :
com.osu.cse5236.oddjobs.Job job = new com.osu.cse5236.oddjobs.Job();
... | public boolean onOptionsItemSelected(android.view.MenuItem item) {
android.util.Log.d(com.osu.cse5236.oddjobs.JobListFragment.TAG, "onOptionsItemSelected() called");
switch (item.getItemId()) {
case R.id.new_job :
com.osu.cse5236.oddjobs.Job job = new com.osu.cse5236.oddjobs.Job();
... |
public void done(org.parse4j.ParseObject arg0, org.parse4j.ParseException arg1) {
if (arg1 == null) {
smartcity.accessibility.database.DatabaseManager.getObjectByFields("Review", m, new org.parse4j.callback.GetCallback<org.parse4j.ParseObject>() {
@java.lang.Override
public void done... | public void done(org.parse4j.ParseObject arg0, org.parse4j.ParseException arg1) {
if (arg0 == null) {
smartcity.accessibility.database.DatabaseManager.getObjectByFields("Review", m, new org.parse4j.callback.GetCallback<org.parse4j.ParseObject>() {
@java.lang.Override
public void done... |
public java.io.File closeResourceContainer(java.lang.String sourceLanguageSlug, java.lang.String projectSlug, java.lang.String resourceSlug) throws java.lang.Exception {
org.unfoldingword.resourcecontainer.Resource resource = library.getResource(sourceLanguageSlug, projectSlug, resourceSlug);
if (resource == nu... | public java.io.File closeResourceContainer(java.lang.String sourceLanguageSlug, java.lang.String projectSlug, java.lang.String resourceSlug) throws java.lang.Exception {
org.unfoldingword.resourcecontainer.Resource resource = library.getResource(sourceLanguageSlug, projectSlug, resourceSlug);
if (resource == nu... |
public void step(com.icarus.project.Airplane airplane, float dt) {
super.step(airplane, dt);
velocity.add(velocity.cpy().nor().scl((dt * (accelRate))));
if ((com.icarus.project.PIScreen.toMeters(velocity.len())) > 150) {
airplane.transitionToFlying(0);
airplane.setTargetAltitude(10000);
... | public void step(com.icarus.project.Airplane airplane, float dt) {
super.step(airplane, dt);
velocity.add(velocity.cpy().nor().scl((dt * (accelRate))));
if ((com.icarus.project.PIScreen.toMeters(velocity.len())) > 150) {
airplane.transitionToFlying(1);
airplane.setTargetAltitude(10000);
... |
public void listMachinesShouldReturnListOfVms() throws java.lang.Exception {
com.elastisys.scale.cloudpool.vsphere.client.impl.ManagedEntity[] vms = new com.elastisys.scale.cloudpool.vsphere.client.impl.ManagedEntity[]{ new com.elastisys.scale.cloudpool.vsphere.util.MockedVm().build() };
doReturn(vms).when(com.... | public void listMachinesShouldReturnListOfVms() throws java.lang.Exception {
com.elastisys.scale.cloudpool.vsphere.client.impl.ManagedEntity[] vms = new com.elastisys.scale.cloudpool.vsphere.client.impl.ManagedEntity[]{ new com.elastisys.scale.cloudpool.vsphere.util.MockedVm().build() };
doReturn(vms).when(com.... |
public void imageRowElementClicked(android.net.Uri uri) {
if (uri == null) {
view().pickNewImage((((nazacheres.com.pixelperfect.Utils.PPStatic.APP_NAME) + "/") + (projectName)), imageUris.size());
}else {
view().focusOnImage(uri);
}
} | public void imageRowElementClicked(android.net.Uri uri) {
if (uri == null) {
view().pickNewImage(((("/" + (nazacheres.com.pixelperfect.Utils.PPStatic.APP_NAME)) + "/") + (projectName)), imageUris.size());
}else {
view().focusOnImage(uri);
}
} |
public void populate(it.ialweb.poi.Station station) {
if ((collapsingToolbar) != null) {
collapsingToolbar.setTitle(station.getName());
}
text.setVisibility(View.VISIBLE);
gallery.setVisibility(View.VISIBLE);
fabButton.setVisibility(View.VISIBLE);
com.bumptech.glide.Glide.with(getActivit... | public void populate(it.ialweb.poi.Station station) {
this.station = station;
if ((collapsingToolbar) != null) {
collapsingToolbar.setTitle(station.getName());
}
text.setVisibility(View.VISIBLE);
gallery.setVisibility(View.VISIBLE);
fabButton.setVisibility(View.VISIBLE);
com.bumptech... |
private java.lang.String getExistingString(javax.swing.JComboBox l, java.lang.String n) {
java.lang.System.out.println(n);
for (int i = 0; i < (l.getItemCount()); i++) {
l.setSelectedIndex(i);
java.lang.String n1 = l.getSelectedItem().toString();
java.lang.System.out.println(n1);
... | private java.lang.String getExistingString(javax.swing.JComboBox l, java.lang.String n) {
for (int i = 0; i < (l.getItemCount()); i++) {
l.setSelectedIndex(i);
java.lang.String n1 = l.getSelectedItem().toString();
if (n1.endsWith(n)) {
return n1;
}
}
return "";
} |
public java.util.List<com.gagror.data.account.ContactReferenceOutput> loadAccountsNotContacts() {
log.debug("Loading non-contact accounts as contacts");
final java.util.List<com.gagror.data.account.ContactReferenceOutput> output = new java.util.ArrayList<>();
for (final com.gagror.data.account.AccountEntity... | public java.util.List<com.gagror.data.account.ContactReferenceOutput> loadAccountsNotContacts() {
log.debug("Loading non-contact accounts as contacts");
final java.util.List<com.gagror.data.account.ContactReferenceOutput> output = new java.util.ArrayList<>();
for (final com.gagror.data.account.AccountEntity... |
public static java.lang.String getProcedureName(com.hangum.tadpole.engine.query.dao.mysql.ProcedureFunctionDAO tc) {
if (("".equals(tc.getSchema_name())) | (null == (tc.getSchema_name())))
return tc.getName();
else
return java.lang.String.format("%s.%s", tc.getSchema_name(), tc.getName());
... | public static java.lang.String getProcedureName(com.hangum.tadpole.engine.query.dao.mysql.ProcedureFunctionDAO tc) {
if (("".equals(tc.getSchema_name())) || (null == (tc.getSchema_name())))
return tc.getName();
else
return java.lang.String.format("%s.%s", tc.getSchema_name(), tc.getName());
... |
public void onBindViewHolder(com.lufficc.lightadapter.LoadMoreFooterModel footerModel, com.lufficc.lightadapter.LoadMoreFooterViewHolderProvider.FooterViewHolder viewHolder) {
if ((footerModel.getInitState()) != (FooterState.STATE_INVALID)) {
viewHolder.state = footerModel.getInitState();
footerMode... | public void onBindViewHolder(com.lufficc.lightadapter.LoadMoreFooterModel footerModel, com.lufficc.lightadapter.LoadMoreFooterViewHolderProvider.FooterViewHolder viewHolder, int position) {
if ((footerModel.getInitState()) != (FooterState.STATE_INVALID)) {
viewHolder.state = footerModel.getInitState();
... |
private void initializeData() {
productList = new java.util.ArrayList<>();
productList.add(new br.ufg.inf.homeshop.model.Product("Sucrilhos", "Yummy", 45.0, "nothing"));
productList.add(new br.ufg.inf.homeshop.model.Product("Sucrilhos", "Yummy", 45.0, "nothing"));
productList.add(new br.ufg.inf.homeshop... | private void initializeData() {
this.productList = new java.util.ArrayList<>();
productList.add(new br.ufg.inf.homeshop.model.Product("Sucrilhos", "Yummy", 45.0, "nothing"));
productList.add(new br.ufg.inf.homeshop.model.Product("Sucrilhos", "Yummy", 45.0, "nothing"));
productList.add(new br.ufg.inf.hom... |
public int hashCode() {
int hash = 1;
char[] array = data.array();
int start = data.arrayOffset();
int limit = ((start + (fieldLengths[0])) + (fieldLengths[1])) + 1;
for (int i = limit; i >= start; i--) {
hash = (31 * hash) + ((int) (array[i]));
}
return hash;
} | public int hashCode() {
int hash = 1;
char[] array = data.array();
int start = data.arrayOffset();
int limit = (start + (fieldLengths[0])) + (fieldLengths[1]);
for (int i = limit; i >= start; i--) {
hash = (31 * hash) + ((int) (array[i]));
}
return hash;
} |
com.example.ollie.workoutapp.Account account = com.example.ollie.workoutapp.Database.realm.where(com.example.ollie.workoutapp.Account.class).equalTo("username", username, Case.INSENSITIVE).equalTo("password", password).findFirst();
com.example.ollie.workoutapp.Database.currentAccount = com.example.ollie.workout... | com.example.ollie.workoutapp.Account account = com.example.ollie.workoutapp.Database.realm.where(com.example.ollie.workoutapp.Account.class).equalTo("username", username, Case.INSENSITIVE).equalTo("password", password).findFirst();
if (account != null) {
com.example.ollie.workoutapp.Database.currentAcco... |
public net.minecraft.block.state.IBlockState getStateFromMeta(int meta) {
return this.getDefaultState().withProperty(tko.pnpnpn.common.block.BlockLogicD.INSIDE, java.lang.Boolean.valueOf(((meta & 1) == 1))).withProperty(tko.pnpnpn.common.block.BlockLogicD.OUTSIDE, java.lang.Boolean.valueOf(((meta & 2) == 1)));
} | public net.minecraft.block.state.IBlockState getStateFromMeta(int meta) {
return this.getDefaultState().withProperty(tko.pnpnpn.common.block.BlockLogicD.INSIDE, java.lang.Boolean.valueOf(((meta & 1) > 0))).withProperty(tko.pnpnpn.common.block.BlockLogicD.OUTSIDE, java.lang.Boolean.valueOf(((meta & 2) > 0)));
} |
public void displayValue(final java.lang.Object currentValue2) {
msi.gama.gui.parameters.IScope scope = msi.gama.gui.parameters.GAMA.obtainNewScope();
setCurrentValue((evaluateExpression ? expectedType.cast(scope, currentValue2, false, false) : currentValue2));
text.setText(msi.gama.common.util.StringUtils.... | public void displayValue(final java.lang.Object currentValue2) {
msi.gama.gui.parameters.IScope scope = msi.gama.gui.parameters.GAMA.obtainNewScope();
setCurrentValue((evaluateExpression ? expectedType.cast(scope, currentValue2, null, false) : currentValue2));
text.setText(msi.gama.common.util.StringUtils.t... |
void connectBt() {
if ((mChatService.getState()) == (com.quadcoder.coinpet.bluetooth.BluetoothManager.STATE_BT_ENABLED)) {
mDevice = mChatService.searchPaired();
if ((mDevice) == null) {
discovery();
}
mChatService.connect(mDevice);
}
} | void connectBt() {
if ((mChatService.getState()) == (com.quadcoder.coinpet.bluetooth.BluetoothManager.STATE_BT_ENABLED)) {
mDevice = mChatService.searchPaired();
if ((mDevice) != null) {
mChatService.connect(mDevice);
}else {
discovery();
}
}
} |
private void B_PlayersMouseClicked(java.awt.event.MouseEvent evt) {
ScrollPane_Player.setVisible(true);
ScrollPane_Owner.setVisible(false);
ScrollPane_Team.setVisible(false);
Panel_Person.setVisible(false);
Panel_Buttons.setVisible(false);
Panel_Statistics.setVisible(false);
ScrollPane_TeamD... | private void B_PlayersMouseClicked(java.awt.event.MouseEvent evt) {
ScrollPane_Player.setVisible(true);
ScrollPane_Owner.setVisible(false);
ScrollPane_Team.setVisible(false);
Panel_Person.setVisible(false);
Panel_Buttons.setVisible(false);
Panel_Statistics.setVisible(false);
ScrollPane_TeamD... |
public resources.Item takeItem(java.lang.String itemName) {
if (items.containsKey(itemName)) {
resources.Item i = items.get(itemName);
if (!(i.canBeTaken()))
return null;
return items.get(itemName);
}
return null;
} | public resources.Item takeItem(java.lang.String itemName) {
if (items.containsKey(itemName)) {
resources.Item i = items.get(itemName);
if (!(i.canBeTaken()))
return null;
items.remove(itemName);
return i;
}
return null;
} |
public java.lang.String setGameOver() {
level.setGameStart();
msg.setGameOver(level.getLevel(), level.getLives());
pp.startGame(level.getLevel());
bg.setStart();
this.gameOver = true;
return "Game Over";
} | public java.lang.String setGameOver() {
this.count = 0;
level.setGameStart();
msg.setGameOver(level.getLevel(), level.getLives());
pp.startGame(level.getLevel());
bg.setStart();
this.gameOver = true;
return "Game Over";
} |
public void onTextChanged(java.lang.CharSequence s, int start, int before, int count) {
location = eventLocationEditText.getText().toString();
if (((name.isEmpty()) || ((name.length()) < 15)) && (!(nameValid))) {
eventLocationEditText.setError("Need at least 15 characters");
createEventButton.se... | public void onTextChanged(java.lang.CharSequence s, int start, int before, int count) {
location = eventLocationEditText.getText().toString();
if (((location.isEmpty()) || ((location.length()) < 15)) && (!(nameValid))) {
eventLocationEditText.setError("Need at least 15 characters");
createEventB... |
if (atAddress < (memory.length)) {
return memory[atAddress];
}else {
errorHandler.throwDataAddressError(("0x" + (java.lang.Integer.toHexString(atAddress))));
return -1;
}
} | if ((0 <= atAddress) && (atAddress < (memory.length))) {
return memory[atAddress];
}else {
errorHandler.throwDataAddressError(("0x" + (java.lang.Integer.toHexString(atAddress))));
return -1;
}
} |
public static void set(com.google.firebase.auth.FirebaseUser user) {
if (((wumf.com.sharedapps.CurrentUser.currentUser) == null) && (user != null)) {
java.lang.String uid = user.getUid();
wumf.com.sharedapps.firebase.TagsFirebase.listenMyTags(uid);
wumf.com.sharedapps.firebase.UsersFirebase.... | public static void set(com.google.firebase.auth.FirebaseUser user) {
if (((wumf.com.sharedapps.CurrentUser.currentUser) == null) && (user != null)) {
java.lang.String uid = user.getUid();
wumf.com.sharedapps.firebase.TagsFirebase.listenMyTags(uid);
wumf.com.sharedapps.firebase.UsersFirebase.... |
public void signalRelease(java.lang.String methodName, java.lang.String parameterSetup, char parameter) {
long k = getKeyOfMethod(methodName);
java.lang.String actualPars = releasedParameters.get(k).get(parameterSetup);
if (!(actualPars.contains(("" + parameter))))
releasedParameters.get(k).put(para... | public void signalRelease(java.lang.String methodName, java.lang.String parameterSetup, java.lang.String parameter) {
long k = getKeyOfMethod(methodName);
java.util.List<java.lang.String> actualPars = releasedParameters.get(k).get(parameterSetup);
if (!(actualPars.contains(parameter)))
releasedParam... |
protected void onDraw(android.graphics.Canvas canvas) {
super.onDraw(canvas);
android.graphics.Paint paint = new android.graphics.Paint();
paint.setColor(Color.RED);
paint.setTextSize(40);
canvas.drawText("## Overlay ##", 250, 50, paint);
} | protected void onDraw(android.graphics.Canvas canvas) {
super.onDraw(canvas);
android.graphics.Paint paint = new android.graphics.Paint();
paint.setColor(Color.RED);
paint.setTextSize(40);
canvas.drawText("## Overlay ##", 250, 50, paint);
this.canvas = canvas;
} |
public void dispose() {
logger.debug("Disposing Helios IP handler.");
updateStatus(ThingStatus.OFFLINE);
try {
unsubscribe();
if ((endpoint) != null) {
endpoint.stop();
}
endpoint = null;
terminationTime = null;
context = null;
notification... | public void dispose() {
logger.debug("Disposing Helios IP handler.");
try {
unsubscribe();
if ((endpoint) != null) {
endpoint.stop();
}
endpoint = null;
terminationTime = null;
context = null;
notificationProducer = null;
subscription =... |
public java.lang.String statusUpdate() {
java.lang.StringBuilder status = new java.lang.StringBuilder();
java.lang.System.out.println(this);
for (codeu.chat.util.Uuid user : followees.keySet()) {
status.append(followees.get(user).statusUpdate());
}
return status.toString();
} | public java.lang.String statusUpdate() {
java.lang.StringBuilder status = new java.lang.StringBuilder();
for (codeu.chat.util.Uuid user : followees.keySet()) {
status.append(followees.get(user).statusUpdate());
}
return status.toString();
} |
public int deleteTestById(java.lang.Long id) throws java.sql.SQLException {
java.sql.Connection connection = null;
java.sql.PreparedStatement preparedStatement = null;
try {
connection = connectionHelper.getConnection();
preparedStatement = connection.prepareStatement(("DELETE FROM test" + "... | public int deleteTestById(java.lang.Long id) throws java.sql.SQLException {
java.sql.Connection connection = null;
java.sql.PreparedStatement preparedStatement = null;
try {
connection = connectionHelper.getConnection();
preparedStatement = connection.prepareStatement(("DELETE FROM test" + "... |
public boolean preReceive(org.springframework.messaging.MessageChannel channel, java.util.Deque<org.springframework.messaging.support.ChannelInterceptor> interceptorStack) {
if ((this.interceptors.size()) > 0) {
for (org.springframework.messaging.support.ChannelInterceptor interceptor : interceptors) {
... | public boolean preReceive(org.springframework.messaging.MessageChannel channel, java.util.Deque<org.springframework.messaging.support.ChannelInterceptor> interceptorStack) {
if ((this.size) > 0) {
for (org.springframework.messaging.support.ChannelInterceptor interceptor : interceptors) {
if (!(i... |
public boolean isMyAppInForeground() {
android.app.ActivityManager manager = ((android.app.ActivityManager) (context.getSystemService(Context.ACTIVITY_SERVICE)));
java.util.List<android.app.ActivityManager.RunningAppProcessInfo> runningProcesses = manager.getRunningAppProcesses();
android.app.ActivityManage... | private boolean isMyAppInForeground() {
android.app.ActivityManager manager = ((android.app.ActivityManager) (context.getSystemService(Context.ACTIVITY_SERVICE)));
java.util.List<android.app.ActivityManager.RunningAppProcessInfo> runningProcesses = manager.getRunningAppProcesses();
android.app.ActivityManag... |
public void loadFile(final java.io.File file, boolean detectLanguage) {
this.file = file;
this.detectLanguage = detectLanguage;
if (detectLanguage) {
detectLanguage(file);
}
if ((file.length()) > 100000) {
error("File too big (100k max)");
}else {
progress.setVisibility(V... | public void loadFile(final java.io.File file, boolean detectLanguage) {
if (file == null) {
return ;
}
this.file = file;
this.detectLanguage = detectLanguage;
if (detectLanguage) {
detectLanguage(file);
}
if ((file.length()) > 100000) {
error("File too big (100k max)"... |
public void apply(javafx.event.ActionEvent actionEvent) {
if (((this.checkbox.isSelected()) && (this.changedMins())) || (this.changedstate)) {
this.c.babystepsOutput(this.checkbox.isSelected(), java.lang.Double.parseDouble(this.minutes));
this.stage.close();
}
} | public void apply(javafx.event.ActionEvent actionEvent) {
if (((this.checkbox.isSelected()) && (this.changedMins())) || (this.changedstate)) {
this.c.babystepsOutput(this.checkbox.isSelected(), ((double) (this.time.getValue())));
this.stage.close();
}
} |
public boolean purchase(java.lang.String message, int purchase) {
if (((cash) - purchase) < 0) {
edu.carleton.COMP2601.finalproject.GameActivity.getInstance().logs.append(("\n" + (R.string.client_notEnoughCash_log)));
return false;
}
cash -= purchase;
edu.carleton.COMP2601.finalproject.G... | public boolean purchase(java.lang.String message, int purchase) {
if (((cash) - purchase) < 0) {
return false;
}
cash -= purchase;
edu.carleton.COMP2601.finalproject.GameActivity.getInstance().logs.append((((("\n" + message) + " (-$") + purchase) + ")"));
return true;
} |
public final boolean equals(final java.lang.Object object) {
if (object instanceof au.com.agic.deploymentsync.core.deployment.Deployment) {
final au.com.agic.deploymentsync.core.deployment.Deployment deployment = ((au.com.agic.deploymentsync.core.deployment.Deployment) (object));
return (deployment ... | public final boolean equals(final java.lang.Object object) {
if (object instanceof au.com.agic.deploymentsync.core.deployment.Deployment) {
final au.com.agic.deploymentsync.core.deployment.Deployment deployment = ((au.com.agic.deploymentsync.core.deployment.Deployment) (object));
return org.apache.c... |
public void setUIScanLineColor(int color) {
this.mScanLineColor = color;
float r = android.graphics.Color.red(mScanLineColor);
float g = android.graphics.Color.green(mScanLineColor);
float b = android.graphics.Color.blue(mScanLineColor);
com.vuforia.TrackerManager trackerManager = com.vuforia.Tracke... | public void setUIScanLineColor(int color) {
this.mScanLineColor = color;
float r = android.graphics.Color.red(mScanLineColor);
float g = android.graphics.Color.green(mScanLineColor);
float b = android.graphics.Color.blue(mScanLineColor);
com.vuforia.TrackerManager trackerManager = com.vuforia.Tracke... |
public void onTimeout(final net.named_data.jndn.Interest interest) {
(state.nRetries)--;
if ((state.nRetries) > 0) {
try {
face.expressInterest(new net.named_data.jndn.Interest(interest).setNonce(null), this, this);
} catch (java.io.IOException e) {
com.intel.jndn.managem... | public void onTimeout(final net.named_data.jndn.Interest interest) {
(state.nRetries)--;
if ((state.nRetries) > 0) {
try {
face.expressInterest(new net.named_data.jndn.Interest(interest), this, this);
} catch (java.io.IOException e) {
com.intel.jndn.management.helpers.Fet... |
public int search(T item) {
nodes.ListNode<T> nodeCurrent = head;
if ((nodeCurrent.getItem()) == item)
return nodeCurrent.getItemCount();
while ((nodeCurrent.getNext()) != null) {
nodeCurrent = nodeCurrent.getNext();
if ((nodeCurrent.getItem()) == item)
return nodeCu... | public int search(T item) {
nodes.ListNode<T> nodeCurrent = head;
if (nodeCurrent.getItem().equals(item))
return nodeCurrent.getItemCount();
while ((nodeCurrent.getNext()) != null) {
nodeCurrent = nodeCurrent.getNext();
if (nodeCurrent.getItem().equals(item))
return ... |
public void insertTeaches(com.a2pt.whatsnext.models.Teaches teaches) {
android.database.sqlite.SQLiteDatabase db = this.getWritableDatabase();
android.content.ContentValues values = new android.content.ContentValues();
values.put(com.a2pt.whatsnext.services.ITSdbManager.KEY_TEACHES_SESSION_ID, teaches.getSe... | public void insertTeaches(com.a2pt.whatsnext.models.Teaches teaches, android.database.sqlite.SQLiteDatabase db) {
android.content.ContentValues values = new android.content.ContentValues();
values.put(com.a2pt.whatsnext.services.ITSdbManager.KEY_TEACHES_SESSION_ID, teaches.getSessionID());
values.put(com.a2... |
public boolean checkPermissions(@javax.annotation.Nonnull
net.proteusframework.internet.http.Request request, @javax.annotation.Nullable
net.proteusframework.users.model.Principal principal) {
if (functionExists(_appUtil.getSite(), request, _applicationRegistry, _registeredLinkDAO)) {
if (principal == null)... | public boolean checkPermissions(@javax.annotation.Nonnull
net.proteusframework.internet.http.Request request, @javax.annotation.Nullable
net.proteusframework.users.model.Principal principal) {
if (functionExists(_appUtil.getSite(), request, _applicationRegistry, _registeredLinkDAO)) {
if (principal == null)... |
public boolean onKeyLongPress(int keyCode, android.view.KeyEvent event) {
if (keyCode == (android.view.KeyEvent.KEYCODE_VOLUME_DOWN)) {
android.util.Log.d("Test", "Long press!");
flag = false;
flag2 = true;
saveImage();
return true;
}
if (keyCode == (android.view.KeyE... | public boolean onKeyLongPress(int keyCode, android.view.KeyEvent event) {
if (keyCode == (android.view.KeyEvent.KEYCODE_VOLUME_DOWN)) {
android.util.Log.d("Test", "Long press!");
flag = false;
flag2 = true;
saveImage();
return true;
}
return super.onKeyLongPress(keyCo... |
private void setupViewsCompiled(java.util.Set<java.lang.String> matchingClasses) {
for (java.lang.String matchingClass : matchingClasses) {
ch.liquidmind.inflection.model.compiled.ViewCompiled matchingView = new ch.liquidmind.inflection.model.compiled.ViewCompiled(matchingClass);
matchingView.setSel... | private void setupViewsCompiled(java.util.Set<java.lang.String> matchingClasses) {
for (java.lang.String matchingClass : matchingClasses) {
ch.liquidmind.inflection.model.compiled.ViewCompiled matchingView = new ch.liquidmind.inflection.model.compiled.ViewCompiled(matchingClass, currentTaxonomyCompiled);
... |
public void run() {
if (!(environment.isPaused())) {
runOnUiThread(new java.lang.Runnable() {
@java.lang.Override
public void run() {
updateCharacterView();
updateBulletsView();
updateEnemyView();
updatePopupView();
... | public void run() {
runOnUiThread(new java.lang.Runnable() {
@java.lang.Override
public void run() {
updateCharacterView();
updateBulletsView();
updateEnemyView();
updatePopupView();
}
});
if (!(environment.isPaused())) {
if (co... |
public void PrintCmd() {
java.lang.System.out.print('\n');
for (int i = 0; i < 64; i++) {
if (((i % (stride)) == 0) && (i != 0)) {
java.lang.System.out.print('\n');
}
java.lang.System.out.print(board_data[i]);
}
java.lang.System.out.print('\n');
java.lang.System.o... | public void PrintCmd() {
java.lang.System.out.print('\n');
for (int i = 0; i < 64; i++) {
if (((i % (stride)) == 0) && (i != 0)) {
java.lang.System.out.print('\n');
}
java.lang.System.out.print(board_data[i]);
}
java.lang.System.out.print('\n');
java.lang.System.o... |
public static boolean cardTest() {
Card.Suit club = Card.Suit.clubs;
Card.Suit spade = Card.Suit.spades;
Card.Suit diamonds = Card.Suit.diamonds;
try {
Card testCard0 = new Card();
Card testCard1 = new Card('0', club);
Card testCard2 = new Card('J', spade);
Card testCard3... | public static boolean cardTest() {
Card.Suit club = Card.Suit.clubs;
Card.Suit spade = Card.Suit.spades;
Card.Suit diamonds = Card.Suit.diamonds;
Card testCard0 = new Card();
Card testCard1 = new Card('0', club);
Card testCard2 = new Card('J', spade);
Card testCard3 = new Card('Y', diamonds)... |
public void factoryClosed(final org.apache.activemq.artemis.api.core.client.ClientSessionFactory factory) {
boolean isEmpty;
synchronized(factories) {
factories.remove(factory);
isEmpty = factories.isEmpty();
}
if ((!(clusterConnection)) && isEmpty) {
synchronized(topologyArrayGu... | public void factoryClosed(final org.apache.activemq.artemis.api.core.client.ClientSessionFactory factory) {
boolean isEmpty;
synchronized(factories) {
factories.remove(factory);
isEmpty = factories.isEmpty();
}
if ((!(clusterConnection)) && isEmpty) {
receivedTopology = false;
... |
public void setSkyRenderer(net.minecraftforge.client.IRenderHandler skyRenderer) {
for (java.lang.reflect.Field field : skyRenderer.getClass().getDeclaredFields())
if (net.minecraftforge.client.IRenderHandler.class.isAssignableFrom(field.getDeclaringClass()))
super.setSkyRenderer(skyRenderer);
... | public void setSkyRenderer(net.minecraftforge.client.IRenderHandler skyRenderer) {
if (skyRenderer == null)
return ;
for (java.lang.reflect.Field field : skyRenderer.getClass().getDeclaredFields())
if (net.minecraftforge.client.IRenderHandler.class.isAssignableFrom(field.getDeclaringClass()... |
private static java.lang.String getExtension(java.lang.String uri) {
int lastDotIndex = uri.lastIndexOf('.');
java.lang.String extension;
if (lastDotIndex > 1) {
extension = uri.substring(lastDotIndex);
}else {
try {
extension = com.orctom.laputa.service.config.Configurator.g... | private static java.lang.String getExtension(java.lang.String uri) {
int lastDotIndex = uri.lastIndexOf('.');
if ((lastDotIndex > 1) && (lastDotIndex < ((uri.length()) - 1))) {
return uri.substring(lastDotIndex);
}else {
return null;
}
} |
private void expand() {
final int newSize = (stackVector.length) * 2;
final T[] newArray = ((T[]) (new java.lang.Object[newSize]));
for (int i = 0; i < (head); i++)
newArray[i] = stackVector[i];
stackVector = newArray;
} | private void expand() {
final int newSize = (stackVector.length) * 2;
final T[] newArray = ((T[]) (new java.lang.Object[newSize]));
for (int i = 0; i <= (head); i++)
newArray[i] = stackVector[i];
stackVector = newArray;
} |
protected void afterHookedMethod(hook.xposed.MethodHookParam param) {
java.lang.String url = param.thisObject.toString();
if (!(url.contains("http:"))) {
return ;
}
java.net.HttpURLConnection connection = ((java.net.HttpURLConnection) (param.getResult()));
java.lang.String jsonUrl = handleUr... | protected void afterHookedMethod(hook.xposed.MethodHookParam param) {
java.lang.String url = param.thisObject.toString();
if (!(url.contains("http:"))) {
return ;
}
java.net.HttpURLConnection connection = ((java.net.HttpURLConnection) (param.getResult()));
java.lang.String jsonUrl = handleUr... |
protected void doSetupOrientation() {
if (isDeviceOrientationSupported()) {
addDeviceOrientationChangeHandler(new com.googlecode.mgwt.ui.client.util.impl.ResizeOrientationHandler.DeviceOrientationChangeCallback() {
@java.lang.Override
public void onOrientationChange() {
... | protected void doSetupOrientation() {
if (isDeviceOrientationSupported()) {
com.google.gwt.user.client.Window.addResizeHandler(new com.google.gwt.event.logical.shared.ResizeHandler() {
@java.lang.Override
public void onResize(com.google.gwt.event.logical.shared.ResizeEvent event) {
... |
public java.util.List<vo.logisticsvo.LogisticsInfo> getInfoForTableView() {
java.util.List<vo.logisticsvo.LogisticsInfo> ans = new java.util.ArrayList<vo.logisticsvo.LogisticsInfo>(time.size());
for (int i = 0; i < (ans.size()); i++) {
ans.add(vo.logisticsvo.LogisticsInfo.build(time.get(i), location.get... | public java.util.List<vo.logisticsvo.LogisticsInfo> getInfoForTableView() {
java.util.List<vo.logisticsvo.LogisticsInfo> ans = new java.util.ArrayList<vo.logisticsvo.LogisticsInfo>(time.size());
for (int i = 0; i < (time.size()); i++) {
ans.add(vo.logisticsvo.LogisticsInfo.build(time.get(i), location.ge... |
public void onClick(android.view.View v) {
if (!(br.com.adley.myseriesproject.library.Utils.checkAppConnectionStatus(getContext()))) {
android.support.design.widget.Snackbar.make(mNoInternetConnection, getActivity().getString(R.string.cant_load_favorites), Snackbar.LENGTH_LONG).show();
}else {
e... | public void onClick(android.view.View v) {
if (!(br.com.adley.myseriesproject.library.Utils.checkAppConnectionStatus(getContext()))) {
android.support.design.widget.Snackbar.make(mNoInternetConnection, getActivity().getString(R.string.cant_load_favorites), Snackbar.LENGTH_LONG).show();
}else {
e... |
protected java.security.Key getKeyByType(com.xiaoleilu.hutool.crypto.asymmetric.KeyType type) {
switch (type) {
case PrivateKey :
if (null == (this.privateKey)) {
throw new java.lang.NullPointerException("Private key must not null when use it !");
}
return... | protected java.security.Key getKeyByType(com.xiaoleilu.hutool.crypto.asymmetric.KeyType type) {
switch (type) {
case PrivateKey :
if (null == (this.privateKey)) {
throw new java.lang.NullPointerException("Private key must not null when use it !");
}
return... |
public void indexAdjust(int index) {
if (((size) < index) || (index < 0)) {
s.sop("parameter is invalid!");
return ;
}
int i = 0;
current = head.next;
while ((i < index) && ((current) != null)) {
current = current.next;
i++;
}
} | public void indexAdjust(int index) {
if ((((size) - 1) < index) || (index < (-1))) {
s.sop("parameter is invalid!");
return ;
}
if (index == (-1))
return ;
int i = 0;
current = head.next;
while ((i < index) && ((current) != null)) {
current = current.next;
... |
public void checkAssetLoaded(net.jodah.concurrentunit.Waiter waiter, java.lang.String name, int numTex) {
mWaiter.assertEquals(1, ModelsLoaded);
mWaiter.assertEquals(0, ModelErrors);
mWaiter.assertEquals(numTex, TexturesLoaded);
if (name != null) {
mWaiter.assertNotNull(mScene.getSceneObjectByNa... | public void checkAssetLoaded(net.jodah.concurrentunit.Waiter waiter, java.lang.String name, int numTex) {
mWaiter.assertEquals(1, ModelsLoaded);
mWaiter.assertEquals(0, ModelErrors);
mWaiter.assertEquals(numTex, TexturesLoaded);
if (name != null) {
mWaiter.assertNotNull(mScene.getSceneObjectByNa... |
public void run() {
try {
de.kuschku.util.AndroidAssert.assertNotNull(client);
while (running) {
de.kuschku.libquassel.functions.types.Heartbeat heartbeat = new de.kuschku.libquassel.functions.types.Heartbeat();
busProvider.dispatch(heartbeat);
android.util.Log.d(... | public void run() {
try {
de.kuschku.util.AndroidAssert.assertNotNull(client);
while (running) {
de.kuschku.libquassel.functions.types.Heartbeat heartbeat = new de.kuschku.libquassel.functions.types.Heartbeat();
busProvider.dispatch(heartbeat);
java.lang.Thread.sl... |
try {
final java.security.KeyStore keystore = java.security.KeyStore.getInstance(RootCertificateImpl.KEYSTORE_TYPE);
try (java.io.InputStream stream = new java.io.FileInputStream(keystoreFile)) {
keystore.load(stream, password);
return io.github.olivierlemasle.ca.RootCertific... | try {
final java.security.KeyStore keystore = java.security.KeyStore.getInstance(RootCertificateImpl.KEYSTORE_TYPE);
try (java.io.InputStream stream = new java.io.FileInputStream(keystoreFile)) {
keystore.load(stream, password);
return io.github.olivierlemasle.ca.RootCertific... |
public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getPageManager().setDebug(true);
getPageManager().enableSwipeToHide();
getPageManager().useSwipePageTransitionEffect();
if (savedInstanceState == null) {
new net.neevek.android.demo.paginize.page... | public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getPageManager().setDebug(true);
getPageManager().enableSwipeToHide(true);
getPageManager().useSwipePageTransitionEffect();
if (savedInstanceState == null) {
new net.neevek.android.demo.paginize.... |
private void submitLostItem(java.util.Date dateTime) {
int reward = java.lang.Integer.parseInt(rewardField.getText().toString());
newItem = new com.example.mcw0805.wheres_my_stuff.Model.LostItem(inputName, inputDescription, dateTime, inputLongitude, inputLatitude, inputItemCategory, uid, reward);
newItem.wr... | private void submitLostItem(java.util.Date dateTime) {
int reward = java.lang.Integer.parseInt(rewardField.getText().toString());
newItem = new com.example.mcw0805.wheres_my_stuff.Model.LostItem(inputName, inputDescription, dateTime, inputLongitude, inputLatitude, inputItemCategory, uid, reward);
incrementS... |
public void testRunToStableResultIsotropy() {
final ij.ImagePlus imp = org.bonej.geometry.TestDataMaker.binaryNoise(256, 256, 256, 0.25);
final java.lang.Object[] result = anisotropy.runToStableResult(imp, 100, 2000, 50000, (256 / 4), 2.3, 0.005, true);
final double da = ((double[]) (result[0]))[0];
org... | public void testRunToStableResultIsotropy() {
final ij.ImagePlus imp = org.bonej.geometry.TestDataMaker.binaryNoise(256, 256, 256, 0.25);
final java.lang.Object[] result = anisotropy.runToStableResult(imp, 100, 2000, 50000, (256 / 4), 2.3, 0.005, false);
final double da = ((double[]) (result[0]))[0];
or... |
if ((deserializedClass) != null) {
deserializedClass.getFields();
}
if ((osci) != null) {
return osci.fields;
}
if ((localClass) != null) {
return localClass.getFields();
}
return empty;
} | if ((deserializedClass) != null)
return deserializedClass.getFields();
if ((osci) != null)
return osci.fields;
if ((localClass) != null)
return localClass.getFields();
return empty;
} |
public io.github.jevaengine.math.Vector3F boundLocation(io.github.jevaengine.math.Vector3F v) {
return new io.github.jevaengine.math.Vector3F(java.lang.Math.min(((m_world.getBounds().width) - 1), java.lang.Math.max(0, v.x)), java.lang.Math.min(((m_world.getBounds().height) - 1), java.lang.Math.max(0, v.y)), v.z);
} | public io.github.jevaengine.math.Vector3F boundLocation(io.github.jevaengine.math.Vector3F v) {
if ((m_world) == null)
return new io.github.jevaengine.math.Vector3F();
return new io.github.jevaengine.math.Vector3F(java.lang.Math.min(((m_world.getBounds().width) - 1), java.lang.Math.max(0, v.x)), ja... |
private void startThreadIfNeeded() {
if (((mDirty) && ((mThread) == null)) && ((com.nextfaze.poweradapters.data.IncrementalArrayData.getDataObserverCount()) > 0)) {
mDirty = false;
onLoadBegin();
setLoading(true);
mThread = mThreadFactory.newThread(new java.lang.Runnable() {
... | private boolean startThreadIfNeeded() {
if (((mDirty) && ((mThread) == null)) && ((com.nextfaze.poweradapters.data.IncrementalArrayData.getDataObserverCount()) > 0)) {
mDirty = false;
onLoadBegin();
setLoading(true);
mThread = mThreadFactory.newThread(new java.lang.Runnable() {
... |
public static void main(java.lang.String[] args) {
movieDBquiz.MatchingQuestion q = new movieDBquiz.MatchingQuestion();
java.awt.EventQueue.invokeLater(new java.lang.Runnable() {
public void run() {
try {
movieDBquiz.QuizDemo window = new movieDBquiz.QuizDemo();
... | public static void main(java.lang.String[] args) {
java.awt.EventQueue.invokeLater(new java.lang.Runnable() {
public void run() {
try {
movieDBquiz.QuizDemo window = new movieDBquiz.QuizDemo();
window.AppDemo.setVisible(true);
} catch (java.lang.Except... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
android.support.v4.app.FragmentManager fM = getSupportFragmentManager();
android.support.v4.app.FragmentTransaction fT = fM.beginTransaction();
android.support.... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
android.content.Intent i = new android.content.Intent(this, com.citylist.android.wereiwas.GPSService.class);
startService(i);
android.support.v4.app.FragmentMan... |
public void onClick(android.content.DialogInterface dialog, int which) {
historyDao.crearHistory(context);
java.util.List<com.revotechs.calculator.tools.HistoryItem> items = historyDao.getAll(context);
adapter = new com.revotechs.calculator.adapters.RecyclerViewAdapter(items);
historyView.setAdapter(ada... | public void onClick(android.content.DialogInterface dialog, int which) {
historyDao.crearHistory(context);
items = historyDao.getAll(context);
adapter = new com.revotechs.calculator.adapters.RecyclerViewAdapter(items);
historyView.setAdapter(adapter);
itemDecoration = new android.support.v7.widget.D... |
public Image drawPts(java.util.List<Point> points) {
ImagePlus imp = this.getImagePlus();
ImageProcessor ip = imp.getProcessor();
for (Point pt : points) {
ip.fillOval((((int) (pt.x)) - 2), (((int) (pt.y)) - 2), 4, 4);
}
return new Image(ip);
} | public Image drawPts(java.util.List<Point> points) {
ImagePlus imp = this.getImagePlus();
ImageProcessor ip = imp.getProcessor();
for (Point pt : points) {
ip.fillOval(((int) (pt.x)), ((int) (pt.y)), 4, 4);
}
return new Image(ip);
} |
public void testTransformAttributeDefaultValue() throws java.lang.Throwable {
class Foo {
@com.orhanobut.tracklytics.TrackEvent(value = "event")
@com.orhanobut.tracklytics.TransformAttributeMap(keys = { 0 , 1 }, values = { "value1" , "value2" })
@com.orhanobut.tracklytics.TransformAttribute(... | public void testTransformAttributeDefaultValue() throws java.lang.Throwable {
class Foo {
@com.orhanobut.tracklytics.TrackEvent(value = "event")
@com.orhanobut.tracklytics.TransformAttributeMap(keys = { 0 , 1 }, values = { "value1" , "value2" })
@com.orhanobut.tracklytics.TransformAttribute(... |
public void acknowledgeMessage(long deliveryTag, boolean multiple) throws org.wso2.andes.AMQException {
isMessagesAcksProcessing = true;
java.util.Collection<org.wso2.andes.server.queue.QueueEntry> ackedMessages = getAckedMessages(deliveryTag, multiple);
_transaction.dequeue(ackedMessages, new org.wso2.ande... | public void acknowledgeMessage(long deliveryTag, boolean multiple) throws org.wso2.andes.AMQException {
try {
isMessagesAcksProcessing = true;
java.util.Collection<org.wso2.andes.server.queue.QueueEntry> ackedMessages = getAckedMessages(deliveryTag, multiple);
_transaction.dequeue(ackedMessa... |
public boolean compareTo(booleanArray other, double percent) {
for (int i = 0; i < (booleanArrs.length); i++) {
if (booleanArrs[i].compareTo(other, percent)) {
index = i;
return true;
}
}
return false;
} | public boolean compareTo(booleanArray other, double percent) {
for (int i = 0; i < (booleanArrs.length); i++) {
if (booleanArrs[i].compareTo(other, percent)) {
index = i;
java.lang.System.out.println(index);
return true;
}
}
return false;
} |
public void setup() {
bind(org.jboss.arquillian.core.api.annotation.ApplicationScoped.class, org.arquillian.cube.docker.impl.util.Boot2Docker.class, new org.arquillian.cube.docker.impl.util.Boot2Docker(commandLineExecutor));
bind(org.jboss.arquillian.core.api.annotation.ApplicationScoped.class, org.arquillian.c... | public void setup() {
bind(org.jboss.arquillian.core.api.annotation.ApplicationScoped.class, org.arquillian.cube.docker.impl.util.Boot2Docker.class, new org.arquillian.cube.docker.impl.util.Boot2Docker(commandLineExecutor));
bind(org.jboss.arquillian.core.api.annotation.ApplicationScoped.class, org.arquillian.c... |
public void set_element_and_ensure_size() {
com.artemis.utils.Bag<java.lang.Integer> b = new com.artemis.utils.Bag<java.lang.Integer>();
for (int i = 0; 10 > i; i++) {
b.add(i);
}
b.set(4, (-10));
org.junit.Assert.assertEquals(10, b.size());
} | public void set_element_and_ensure_size() {
com.artemis.utils.Bag<java.lang.Integer> b = new com.artemis.utils.Bag<java.lang.Integer>();
for (int i = 0; 10 > i; i++) {
b.add(i);
}
b.set(4, (-10));
assertEquals(10, b.size());
} |
public void testInstallmentsOfPayment() {
try {
payment = new model.Payment(service, 1, 1, 0);
assertEquals(new java.lang.Integer(0), payment.getInstallments());
} catch (exception.PaymentException e) {
fail(("Should not throw this exception: " + (e.getMessage())));
}
} | public void testInstallmentsOfPayment() {
try {
payment = new model.Payment(service, 1, 1, 1);
assertEquals(new java.lang.Integer(1), payment.getInstallments());
} catch (exception.PaymentException e) {
fail(("Should not throw this exception: " + (e.getMessage())));
}
} |
public void safeRun() {
final com.dava.framework.JNITextField.TextField text = com.dava.framework.JNITextField.GetTextField(id);
if (isPassword) {
text.setInputType(((android.view.inputmethod.EditorInfo.TYPE_CLASS_TEXT) | (android.view.inputmethod.EditorInfo.TYPE_TEXT_VARIATION_PASSWORD)));
}else {
... | public void safeRun() {
if (isPassword) {
text.setInputType(((android.view.inputmethod.EditorInfo.TYPE_CLASS_TEXT) | (android.view.inputmethod.EditorInfo.TYPE_TEXT_VARIATION_PASSWORD)));
}else {
text.setInputType(((text.getInputType()) & (~(android.view.inputmethod.EditorInfo.TYPE_TEXT_VARIATION... |
return getCommand(isolationStrategy, executionResult, executionLatency, fallbackResult, new com.netflix.hystrix.HystrixCircuitBreakerTest.TestCircuitBreaker(), null, ((executionLatency * 2) + 100), CacheEnabled.NO, "foo", 10);
} | return getCommand(isolationStrategy, executionResult, executionLatency, fallbackResult, 0, new com.netflix.hystrix.HystrixCircuitBreakerTest.TestCircuitBreaker(), null, ((executionLatency * 2) + 100), CacheEnabled.NO, "foo", 10, 10);
} |
public long removeLoadRuntimeEstimate(java.util.Date date) {
synchronized(loadRuntimeEstimateList) {
for (java.util.ListIterator<io.druid.server.coordination.MutablePair<java.util.Date, java.lang.Long>> iterator = loadRuntimeEstimateList.listIterator(); iterator.hasNext();) {
io.druid.server.coo... | public long removeLoadRuntimeEstimate(java.util.Date date) {
synchronized(loadRuntimeEstimateList) {
for (java.util.ListIterator<io.druid.server.coordination.MutablePair<java.util.Date, java.lang.Long>> iterator = loadRuntimeEstimateList.listIterator(); iterator.hasNext();) {
io.druid.server.coo... |
private boolean checkXgreaterYsmaller(int index) {
return (((getX()) > (getxNext())) && ((getY()) < (getyNext()))) && ((index + 1) < (getFields().size()));
} | private boolean checkXgreaterYsmaller(int index) {
boolean b = (((getX()) > (getxNext())) && ((getY()) < (getyNext()))) && ((index + 1) < (getFields().size()));
return b;
} |
protected com.recruitment.json.model.CandidateResponse getCandidates(com.recruitment.json.model.Test t) {
java.lang.String jsonData = readFromFile(getTestCandidateFileName(t));
com.fasterxml.jackson.databind.ObjectMapper objectMapper = new com.fasterxml.jackson.databind.ObjectMapper();
try {
com.rec... | protected com.recruitment.json.model.CandidateResponse getCandidates(com.recruitment.json.model.Test t) {
com.fasterxml.jackson.databind.ObjectMapper objectMapper = new com.fasterxml.jackson.databind.ObjectMapper();
try {
java.lang.String jsonData = readFromFile(getTestCandidateFileName(t));
com... |
public void testProperFileExtension() throws java.lang.Exception {
final com.puppycrawl.tools.checkstyle.DefaultConfiguration checkConfig = createCheckConfig(com.puppycrawl.tools.checkstyle.checks.naming.ConstantNameCheck.class);
final java.lang.String content = "public class Main { public static final int k = ... | public void testProperFileExtension() throws java.lang.Exception {
final com.puppycrawl.tools.checkstyle.DefaultConfiguration checkConfig = createCheckConfig(com.puppycrawl.tools.checkstyle.checks.naming.ConstantNameCheck.class);
final java.io.File file = temporaryFolder.newFile("file.java");
try (final jav... |
public java.util.List<me.sergienko.model.Student> getRecordsLimitOffset(java.lang.Integer limit, java.lang.Integer offset) {
org.hibernate.Session session = sessionFactory.getCurrentSession();
org.hibernate.Criteria criteria = session.createCriteria(me.sergienko.model.Student.class);
criteria.setFirstResult... | public java.util.List<me.sergienko.model.Student> getRecordsLimitOffset(java.lang.Integer limit, java.lang.Integer offset) {
org.hibernate.Session session = sessionFactory.getCurrentSession();
org.hibernate.Criteria criteria = session.createCriteria(me.sergienko.model.Student.class);
criteria.setFirstResult... |
private static void init() {
java.lang.String uuid = net.minecraft.client.Minecraft.getMinecraft().getSession().getPlayerID();
net.playmcm.qwertysam.log.QLogger.log(LogType.AUTHUTIL, ("UUID = " + uuid));
net.playmcm.qwertysam.util.AuthUtil.user = net.playmcm.qwertysam.util.Staff.valueByUUID(uuid);
net.p... | private static void init() {
java.lang.String uuid = net.minecraft.client.Minecraft.getMinecraft().getSession().getPlayerID();
net.playmcm.qwertysam.log.QLogger.log(LogType.AUTHUTIL, ("UUID = " + uuid));
net.playmcm.qwertysam.util.AuthUtil.user = net.playmcm.qwertysam.util.Staff.valueByUUID(uuid);
net.p... |
private void startAnimation(com.yat3s.navigationtab.TabView tabView) {
int currentIndex = this.indexOfChild(tabView);
if (null != (mTabSelectedListener)) {
mTabSelectedListener.onSelected(currentIndex);
}
if (currentIndex != (mLastIndex)) {
if ((-1) != (mLastIndex)) {
mTabVie... | private void startAnimation(com.yat3s.navigationtab.TabView tabView) {
int currentIndex = this.indexOfChild(tabView);
if (null != (mTabSelectedListener)) {
mTabSelectedListener.onSelected(currentIndex);
}
if (currentIndex != (mLastIndex)) {
mTabViews.get(mLastIndex).cancelHighLight();
... |
private boolean check(int player) {
chessgame.Square king = cb.getKing(player);
java.awt.Point p = king.getPoint();
for (java.awt.Point move : playerMoves((1 - player))) {
if (move.equals(p)) {
return true;
}
}
return false;
} | private boolean check(int player) {
chessgame.Square king = cb.getKing(player);
if (king != null) {
java.awt.Point p = king.getPoint();
for (java.awt.Point move : playerMoves((1 - player))) {
if (move.equals(p)) {
return true;
}
}
return fa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.