buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private void relaxHoriz(int i, int j) {
int x = i % (height());
int y = i / (height());
double newP = (distTo[i]) + (energy(x, y));
if ((distTo[j]) > newP) {
distTo[j] = newP;
indexTo[j] = i;
}
} | private void relaxHoriz(int i, int j) {
int x = i / (height());
int y = i % (height());
double newP = (distTo[i]) + (energy(x, y));
if ((distTo[j]) > newP) {
distTo[j] = newP;
indexTo[j] = i;
}
} |
public java.util.Set<? extends com.cfar.swim.worldwind.planning.NonUniformCostIntervalGrid> lookupCells(gov.nasa.worldwind.geom.Position position) {
java.util.Set<com.cfar.swim.worldwind.planning.NonUniformCostIntervalGrid> cells = null;
if (null != (this.globe)) {
cells = ((java.util.Set<com.cfar.swim.... | public java.util.Set<? extends com.cfar.swim.worldwind.planning.NonUniformCostIntervalGrid> lookupCells(gov.nasa.worldwind.geom.Position position) {
java.util.Set<com.cfar.swim.worldwind.planning.NonUniformCostIntervalGrid> cells = null;
if (null != (this.globe)) {
cells = ((java.util.Set<com.cfar.swim.... |
private static void printSyntax() {
java.io.PrintStream err = java.lang.System.err;
err.println("Syntax: ");
err.println("WOTUtil -benchmarkRemoveTrustDestructive INPUT_DATABASE OUTPUT_GNUPLOT SEED");
err.println(" ATTENTION: Destroys the given database!");
err.println(" ATTENTION: OUTPUT_GNUP... | private static void printSyntax() {
java.io.PrintStream err = java.lang.System.err;
err.println("Syntax: ");
err.println("WOTUtil -benchmarkRemoveTrustDestructive INPUT_DATABASE OUTPUT_GNUPLOT SEED");
err.println(" ATTENTION: Destroys the given database!");
err.println(" ATTENTION: OUTPUT_GNUP... |
protected java.lang.Object resolveContraindication(org.obiba.magma.ValueSet valueSet, org.obiba.magma.Variable variable) {
java.lang.String instrumentTypeName = variable.getAttributeStringValue(StageAttributeVisitor.STAGE_ATTRIBUTE);
if (instrumentTypeName != null) {
org.obiba.onyx.jade.core.domain.inst... | protected java.lang.Object resolveContraindication(org.obiba.magma.ValueSet valueSet, org.obiba.magma.Variable variable) {
java.lang.String instrumentTypeName = variable.getAttributeStringValue(StageAttributeVisitor.STAGE_ATTRIBUTE);
if (instrumentTypeName == null)
return null;
org.obiba.onyx.j... |
public void run() throws org.nuxeo.ecm.core.api.ClientException {
org.nuxeo.runtime.transaction.TransactionHelper.startTransaction();
try {
org.nuxeo.dam.DamService damService = org.nuxeo.runtime.api.Framework.getLocalService(org.nuxeo.dam.DamService.class);
folder = session.createDocumentModel(... | public void run() throws org.nuxeo.ecm.core.api.ClientException {
try {
org.nuxeo.dam.DamService damService = org.nuxeo.runtime.api.Framework.getLocalService(org.nuxeo.dam.DamService.class);
folder = session.createDocumentModel(damService.getAssetLibraryPath(), org.nuxeo.common.utils.IdUtils.generat... |
public boolean onQueryTextChange(java.lang.String newText) {
newText = newText.toLowerCase();
java.util.List<com.example.kimjaeseung.cultureseoul2.domain.CultureEvent> newList = new java.util.ArrayList<>();
for (com.example.kimjaeseung.cultureseoul2.domain.CultureEvent cultureEvent : mCultureEventLIst) {
... | public boolean onQueryTextChange(java.lang.String newText) {
newText = newText.toLowerCase();
java.util.List<com.example.kimjaeseung.cultureseoul2.domain.CultureEvent> newList = new java.util.ArrayList<>();
for (com.example.kimjaeseung.cultureseoul2.domain.CultureEvent cultureEvent : mCultureEventLIst) {
... |
public boolean onQueryTextChange(java.lang.String text) {
if ((text.isEmpty()) || (disableAutoComplete)) {
disableAutoComplete = false;
return false;
}else
if ((text.length()) < 3) {
setAutoCompleteAdapterIcon(recentSearchIconResourceId);
loadSavedSearches();
... | public boolean onQueryTextChange(java.lang.String text) {
if ((text.isEmpty()) || (disableAutoComplete)) {
setAutoCompleteAdapterIcon(autoCompleteIconResourceId);
disableAutoComplete = false;
return false;
}else
if ((text.length()) < 3) {
setAutoCompleteAdapterIcon(re... |
private void addToscaArchive(java.nio.file.Path path) {
java.nio.file.Path relativePath = path.relativize(rootPath);
java.nio.file.Path zipPath = zipRootPath.resolve(relativePath).resolve("archive.zip");
try {
alien4cloud.utils.FileUtil.zip(path, zipPath);
toscaArchives.add(zipPath);
} c... | private void addToscaArchive(java.nio.file.Path path) {
java.nio.file.Path relativePath = rootPath.relativize(path);
java.nio.file.Path zipPath = zipRootPath.resolve(relativePath).resolve("archive.zip");
try {
alien4cloud.utils.FileUtil.zip(path, zipPath);
toscaArchives.add(zipPath);
} c... |
void restoreLastSession() {
if ((node.getChildren()) != null) {
for (org.dsa.iot.dslink.node.Node child : node.getChildren().values()) {
try {
com.serotonin.bacnet4j.type.enumerated.PropertyIdentifier propid = com.serotonin.bacnet4j.type.enumerated.PropertyIdentifier.forName(chil... | void restoreLastSession() {
if ((node.getChildren()) != null) {
for (org.dsa.iot.dslink.node.Node child : node.getChildren().values()) {
try {
com.serotonin.bacnet4j.type.enumerated.PropertyIdentifier propid = com.serotonin.bacnet4j.type.enumerated.PropertyIdentifier.forName(chil... |
public org.eclipse.emf.ecore.EObject eObject(fr.inria.atlanmod.neoemf.core.Id id) {
fr.inria.atlanmod.neoemf.core.PersistentEObject object = null;
if (java.util.Objects.nonNull(id)) {
org.eclipse.emf.ecore.EClass eClass = resolveInstanceOf(id);
object = persistentObjectsCache.get(id, new fr.inri... | public org.eclipse.emf.ecore.EObject eObject(fr.inria.atlanmod.neoemf.core.Id id) {
fr.inria.atlanmod.neoemf.core.PersistentEObject object = null;
if (java.util.Objects.nonNull(id)) {
object = persistentObjectsCache.get(id, new fr.inria.atlanmod.neoemf.data.berkeleydb.store.DirectWriteBerkeleyDbStore.Pe... |
public org.wso2.carbon.event.admin.internal.Subscription[] getWsSubscriptionsForTopic(java.lang.String topic) throws org.wso2.carbon.event.admin.internal.exception.EventAdminException {
org.wso2.carbon.event.core.EventBroker eventBroker = org.wso2.carbon.event.admin.internal.util.EventAdminHolder.getInstance().getE... | public org.wso2.carbon.event.admin.internal.Subscription[] getWsSubscriptionsForTopic(java.lang.String topic) throws org.wso2.carbon.event.admin.internal.exception.EventAdminException {
org.wso2.carbon.event.core.EventBroker eventBroker = org.wso2.carbon.event.admin.internal.util.EventAdminHolder.getInstance().getE... |
public void deleteAllSnapshotFiles() {
while ((ifExists) == true) {
newFilePath = ((seedu.multitasky.commons.events.ui.EntryAppRequestEvent.FILE_PATH) + (index)) + ".xml";
toDelete = new java.io.File(newFilePath);
ifExists = toDelete.exists();
toDelete.delete();
(index)++;
... | public void deleteAllSnapshotFiles() {
newFilePath = ((seedu.multitasky.commons.events.ui.EntryAppRequestEvent.FILE_PATH) + (index)) + ".xml";
toDelete = new java.io.File(newFilePath);
ifExists = toDelete.exists();
while ((ifExists) == true) {
newFilePath = ((seedu.multitasky.commons.events.ui.E... |
private void writeTag(org.json.JSONArray data, com.chariotsolutions.nfc.plugin.CallbackContext callbackContext) throws org.json.JSONException {
if ((getIntent()) == null) {
callbackContext.error("Failed to write tag, received null intent");
}
if (inReaderMode) {
android.nfc.Tag tag = savedTa... | private void writeTag(org.json.JSONArray data, com.chariotsolutions.nfc.plugin.CallbackContext callbackContext) throws org.json.JSONException {
if ((getIntent()) == null) {
callbackContext.error("Failed to write tag, received null intent");
}
android.nfc.Tag tag = savedTag;
if (!(inReaderMode)) ... |
private int[] leftHalf(int[] array) {
int size1 = (array.length) / 2;
int[] left = new int[size1];
java.lang.System.arraycopy(array, 0, left, 0, (size1 - 1));
return left;
} | private int[] leftHalf(int[] array) {
int size1 = (array.length) / 2;
int[] left = new int[size1];
java.lang.System.arraycopy(array, 0, left, 0, size1);
return left;
} |
public void onReceive(android.content.Context context, android.content.Intent intent) {
android.os.Bundle args = intent.getExtras();
timber.log.Timber.d(args.getString(JoinTripResultsFragment.KEY_ACTION_TO_RUN));
android.app.Fragment frag = new org.croudtrip.fragments.JoinTripResultsFragment();
frag.set... | public void onReceive(android.content.Context context, android.content.Intent intent) {
android.os.Bundle args = intent.getExtras();
android.app.Fragment frag = new org.croudtrip.fragments.JoinTripResultsFragment();
frag.setArguments(args);
getSectionList().get(0).setTarget(frag);
getSectionList().g... |
public void GetUniforms(java.util.ArrayList<java.lang.Double> variates) {
if (OddEven) {
innerGenerator.GetUniforms(variates);
nextVariates.clear();
for (double val : variates) {
nextVariates.add((1.0 - val));
}
OddEven = false;
}else {
variates = next... | public void GetUniforms(java.util.ArrayList<java.lang.Double> variates) {
if (OddEven) {
innerGenerator.GetUniforms(variates);
nextVariates.clear();
for (double val : variates) {
nextVariates.add((1.0 - val));
}
OddEven = false;
}else {
variates.clear(... |
public static void main(java.lang.String[] args) {
int i = 0;
for (int j = 0; i < 500; ++i , ++j) {
if (!(Flik.isSameNumber(i, j))) {
break;
}
}
java.lang.System.out.println(("i is " + i));
} | public static void main(java.lang.String[] args) {
int j = 0;
int i;
for (i = 0; i < 500; i++ , j++) {
if (!(Flik.isSameNumber(i, j))) {
break;
}
}
java.lang.System.out.println(("i is " + i));
} |
public void onMessage(java.lang.String name, java.util.Map<java.lang.String, java.lang.String> data) {
if ((_actor) != null)
exec.execute(() -> {
if (_actor.onMessage(name, data))
interactionEnded();
});
else
onErrorOutput("Message received outsid... | public void onMessage(java.lang.String name, java.util.Map<java.lang.String, java.lang.String> data) {
if ((_actor) != null)
exec.execute(() -> {
if (_actor.onMessage(name, data))
interactionEnded();
});
else
onErrorOutput(java.lang.String.format(... |
public void onPressedEnter() {
if (((activeView) == (ccre.supercanvas.components.channels.FloatControlComponent.View.TEXTUAL)) && ((getPanel().editing) == (activeBuffer))) {
try {
setDele(java.lang.Float.parseFloat(activeBuffer.toString()));
getPanel().editing = null;
} catch... | public void onPressedEnter() {
if (((activeView) == (ccre.supercanvas.components.channels.FloatControlComponent.View.TEXTUAL)) && ((getPanel().editing) == (activeBuffer))) {
try {
setDele(false, java.lang.Float.parseFloat(activeBuffer.toString()));
getPanel().editing = null;
... |
private static java.lang.String reverseTranscribe(java.lang.String s) throws java.lang.Exception {
java.lang.StringBuffer buff = new java.lang.StringBuffer();
for (int x = (s.length()) - 1; x > 0; x--)
buff.append(cmcDistances.test.VerifyContif.flip(s.charAt(x)));
return buff.toString();
} | private static java.lang.String reverseTranscribe(java.lang.String s) throws java.lang.Exception {
java.lang.StringBuffer buff = new java.lang.StringBuffer();
for (int x = (s.length()) - 1; x >= 0; x--)
buff.append(cmcDistances.test.VerifyContif.flip(s.charAt(x)));
return buff.toString();
} |
public void actionPerformed(java.awt.event.ActionEvent e) {
int x = jDialog.getX();
x = x - 10;
if (x < (xEnd)) {
x = xEnd;
fadeIn.stop();
fadeIn = null;
}
jDialog.setLocation(x, y);
} | public void actionPerformed(java.awt.event.ActionEvent e) {
int x = jDialog.getX();
x = x - 10;
if (x < (xEnd)) {
x = xEnd;
if ((fadeIn) != null) {
fadeIn.stop();
}
fadeIn = null;
}
jDialog.setLocation(x, y);
} |
private void createAccount(java.lang.String username, java.lang.String password) {
synchronized(clients) {
if ((!(username.equals(""))) && (password.equals(""))) {
clients.put(username, password);
}
}
} | private void createAccount(java.lang.String username, java.lang.String password) {
synchronized(clients) {
if ((!(username.equals(""))) && (!(password.equals("")))) {
clients.put(username, password);
}
}
} |
public void onResume() {
super.onResume();
if (loginController.checkIfLoggedIn()) {
mSimpleFacebook = com.sromku.simple.fb.SimpleFacebook.getInstance(getActivity());
}else {
loginController.logIn();
}
if (nl.project.groep4.hhs.bestofdubsmash.view.MainView.refreshNeeded) {
nl.... | public void onResume() {
super.onResume();
if (loginController.checkIfLoggedIn()) {
mSimpleFacebook = com.sromku.simple.fb.SimpleFacebook.getInstance(getActivity());
}else {
loginController.logIn();
}
if (nl.project.groep4.hhs.bestofdubsmash.view.MainView.refreshNeeded) {
nl.... |
private void move() {
for (int i = 0; i < (enemyShips.size()); i++) {
enemyShips.get(i).move();
enemyShips.get(i).shoot();
}
playerShip.keyMapHandler();
projectileHandler.moveProjectiles();
} | private void move() {
for (int i = 0; i < (enemyShips.size()); i++) {
enemyShips.get(i).move();
enemyShips.get(i).shoot();
}
projectileHandler.moveProjectiles();
playerShip.keyMapHandler();
} |
private int getSelectedResourceTypes(org.eclipse.core.resources.IResource[] resources) {
int types = 0;
for (int i = 0; i < (resources.length); i++) {
types |= resources[i].getType();
}
return types;
} | private int getSelectedResourceTypes(java.util.List<org.eclipse.core.resources.IResource> resources) {
int types = 0;
for (int i = 0; i < (resources.size()); i++) {
types |= resources.get(i).getType();
}
return types;
} |
public void onClick(android.view.View v) {
com.irhamfauzan.finaltask.Lampu Mode = com.irhamfauzan.finaltask.PrefLampu.load(this);
if (switchButtonMode.isChecked()) {
Mode.mode = true;
Payload = "3";
}else {
Mode.mode = false;
Payload = "3";
}
com.irhamfauzan.finaltask... | public void onClick(android.view.View v) {
com.irhamfauzan.finaltask.Lampu Mode = com.irhamfauzan.finaltask.PrefLampu.load(this);
if (switchButtonMode.isChecked()) {
Mode.mode = true;
Payload = "3";
}else {
Mode.mode = false;
Payload = "0";
}
com.irhamfauzan.finaltask... |
private boolean[] checkRadioGroupCorrectAnswers() {
boolean[] RGCorrectAnswers = new boolean[radioGroupAnswerGroups.length];
for (int i = 0; i < (radioGroupAnswerGroups.length); i += 1) {
RGCorrectAnswers[i] = (radioGroupAnswerGroups[i].getCheckedRadioButtonId()) == (radioGroupCorrectAnswers[i].getId())... | private boolean[] checkRadioGroupCorrectAnswers() {
boolean[] RGCorrectAnswers = new boolean[radioGroupAnswerGroups.size()];
for (int i = 0; i < (radioGroupAnswerGroups.size()); i += 1) {
RGCorrectAnswers[i] = (radioGroupAnswerGroups.get(i).getCheckedRadioButtonId()) == (radioGroupCorrectAnswers.get(i).... |
public boolean isTaskComplete(boolean taskComplete, java.util.List<com.rasp.mr.master.Task> tasks) {
if (!taskComplete) {
boolean result = true;
for (com.rasp.mr.master.Task task : tasks) {
if (!(task.isCompleted())) {
result = false;
break;
}
... | private boolean isTaskComplete(boolean taskComplete, java.util.List<? extends com.rasp.mr.master.Task> tasks) {
if (!taskComplete) {
boolean result = true;
for (com.rasp.mr.master.Task task : tasks) {
if (!(task.isCompleted())) {
result = false;
break;
... |
public void updateItem(com.github.jextractall.unpack.ExtractionResult result, boolean empty) {
if (empty || (result == null)) {
super.updateItem(result, empty);
return ;
}
if ((result.getException()) != null) {
imgV.setImage(errorImg);
setTooltip(new javafx.scene.control.Tool... | public void updateItem(com.github.jextractall.unpack.ExtractionResult result, boolean empty) {
if (empty || (result == null)) {
imgV.setImage(null);
setTooltip(null);
super.updateItem(result, empty);
return ;
}
if ((result.getException()) != null) {
imgV.setImage(erro... |
public V get(java.lang.String name, java.util.Locale locale) {
for (java.util.Map<K, V> curMap : this.stackList) {
if (curMap.containsKey(name)) {
if (curMap instanceof org.apache.ofbiz.base.util.collections.LocalizedMap<?>) {
org.apache.ofbiz.base.util.collections.LocalizedMap<V... | public V get(java.lang.String name, java.util.Locale locale) {
for (java.util.Map<K, V> curMap : this.stackList) {
if (curMap.containsKey(name)) {
if (curMap instanceof org.apache.ofbiz.base.util.collections.LocalizedMap<?>) {
org.apache.ofbiz.base.util.collections.LocalizedMap<V... |
public void cycleMode(model.actions.ActionModifiers actionModifier) {
model.player.ArrayAction tempArrayAction = getArrayActionUpDown(actionModifier);
selectedEntity = complexDataStructure.circleMode(tempArrayAction);
if ((selectedEntity) == null) {
selectedRallyPoint = complexDataStructure.getRally... | public void cycleMode(model.actions.ActionModifiers actionModifier) {
model.player.ArrayAction tempArrayAction = getArrayActionUpDown(actionModifier);
selectedEntity = complexDataStructure.circleMode(tempArrayAction);
if (((selectedEntity) == null) && ((selectedRallyPoint) != null)) {
selectedRallyP... |
public double calculate(java.lang.String expression) throws ru.mipt.java2016.homework.base.task1.ParsingException {
if (expression == null) {
throw new ru.mipt.java2016.homework.base.task1.ParsingException("Expression is null");
}
expression = expression.replaceAll("[ \\n\\t]", "");
if ((express... | public double calculate(java.lang.String expression) throws ru.mipt.java2016.homework.base.task1.ParsingException {
if (expression == null) {
throw new ru.mipt.java2016.homework.base.task1.ParsingException("Expression is null");
}
postfix = new java.util.Stack<>();
numbers = new java.util.Stack<... |
public static matrix.Matrix zeroes(int rows, int columns) {
double[][] zeroMatrix = new double[rows][columns];
for (int i = 0; i < rows; ++i) {
for (int j = 0; j < columns; ++j) {
zeroMatrix[i][j] = 0;
}
}
return new matrix.Matrix(zeroMatrix, rows, columns);
} | public static matrix.Matrix zeroes(int rows, int columns) {
double[][] zeroMatrix = new double[rows][columns];
for (int i = 0; i < rows; ++i) {
for (int j = 0; j < columns; ++j) {
zeroMatrix[i][j] = 0;
}
}
return new matrix.Matrix(zeroMatrix);
} |
private java.lang.String[] splitBySlashAndDecode(java.lang.String connectionString) throws java.io.UnsupportedEncodingException {
java.lang.String[] split = connectionString.split("/");
for (int i = 0; i < (split.length); i++) {
split[i] = java.net.URLDecoder.decode(split[1], "UTF-8");
}
return ... | private java.lang.String[] splitBySlashAndDecode(java.lang.String connectionString) throws java.io.UnsupportedEncodingException {
java.lang.String[] split = connectionString.split("/");
for (int i = 0; i < (split.length); i++) {
split[i] = java.net.URLDecoder.decode(split[i], "UTF-8");
}
return ... |
private boolean canigoup() {
fdelta = BarbarianHorde.playerguy.getpdelta();
return (!(isBlocked(this.Bx, ((this.By) - (fdelta))))) || (!(isBlocked(((float) (((this.Bx) + (SIZE)) + 1.5)), ((this.By) - (fdelta)))));
} | private boolean canigoup() {
fdelta = BarbarianHorde.playerguy.getpdelta();
return (!(isBlocked(this.Bx, ((this.By) - (fdelta))))) || (!(isBlocked((((this.Bx) + (SIZE)) - 1), ((this.By) - (fdelta)))));
} |
protected void setInput(final MWC.TacticalData.IRollingNarrativeProvider newNarr) {
if (newNarr != (_myRollingNarrative)) {
if ((_myRollingNarrative) != null) {
myViewer.setInput(null);
_myRollingNarrative.removeNarrativeListener(IRollingNarrativeProvider.ALL_CATS, _myRollingNarrList... | protected void setInput(final MWC.TacticalData.IRollingNarrativeProvider newNarr) {
if (newNarr != (_myRollingNarrative)) {
if ((_myRollingNarrative) != null) {
myViewer.setInput(null);
_myRollingNarrative.removeNarrativeListener(IRollingNarrativeProvider.ALL_CATS, _myRollingNarrList... |
public android.app.Dialog onCreateDialog(final android.os.Bundle savedInstanceState) {
final android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(getActivity());
builder.setView(initView());
builder.setTitle(R.string.uvc_device_select);
builder.setPositiveButton(android.R.string... | public android.app.Dialog onCreateDialog(final android.os.Bundle savedInstanceState) {
final android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(getActivity());
builder.setView(initView());
builder.setTitle(R.string.uvc_device_select);
builder.setPositiveButton(android.R.string... |
public com.wso2telco.core.pcrservice.Returnable getExistingPCR(com.wso2telco.core.pcrservice.model.RequestDTO dto) throws com.wso2telco.core.pcrservice.exception.PCRException {
try {
com.wso2telco.core.pcrservice.persistable.UUIDPCRService uuidpcrService = new com.wso2telco.core.pcrservice.persistable.UUIDP... | public com.wso2telco.core.pcrservice.Returnable getExistingPCR(com.wso2telco.core.pcrservice.model.RequestDTO dto) throws com.wso2telco.core.pcrservice.exception.PCRException {
try {
com.wso2telco.core.pcrservice.persistable.UUIDPCRService uuidpcrService = new com.wso2telco.core.pcrservice.persistable.UUIDP... |
public com.majalis.scenes.Scene getStartScene() {
upsertScenes();
if ((sceneCode) == (-1)) {
saveService.saveDataValue(SaveEnum.MUSIC, AssetEnum.ENCOUNTER_MUSIC.getPath());
return scenes.get(0);
}
return masterSceneMap.get(sceneCode);
} | public com.majalis.scenes.Scene getStartScene() {
upsertScenes();
if ((sceneCode) == (-1)) {
saveService.saveDataValue(SaveEnum.MUSIC, AssetEnum.ENCOUNTER_MUSIC.getPath());
return scenes.get(0);
}
return masterSceneMap.get(sceneCode, scenes.get(0));
} |
public void onChildAdded(com.firebase.client.DataSnapshot dataSnapshot, java.lang.String s) {
edu.rosehulman.roselabs.sharewithme.UserProfile user = dataSnapshot.getValue(edu.rosehulman.roselabs.sharewithme.UserProfile.class);
mUser.setKey(dataSnapshot.getKey());
mUser.setPicture(user.getPicture());
mIm... | public void onChildAdded(com.firebase.client.DataSnapshot dataSnapshot, java.lang.String s) {
edu.rosehulman.roselabs.sharewithme.UserProfile user = dataSnapshot.getValue(edu.rosehulman.roselabs.sharewithme.UserProfile.class);
mUser.setKey(dataSnapshot.getKey());
if ((user.getPicture()) != null) {
m... |
public static boolean isChild(BinaryTree.Node root, BinaryTree.Node nodeToCheck) {
if (null == root) {
return false;
}
if (root == nodeToCheck) {
return true;
}
return (BinaryTree.isChild(root.left, nodeToCheck)) || (BinaryTree.isChild(root.right, nodeToCheck));
} | public static boolean isChild(BinaryTree.Node root, BinaryTree.Node nodeToCheck) {
if (null == root) {
return false;
}
return ((root == nodeToCheck) || (BinaryTree.isChild(root.left, nodeToCheck))) || (BinaryTree.isChild(root.right, nodeToCheck));
} |
private void readMail() {
java.util.ArrayList<forhonour.Mail> mail = new java.util.ArrayList<forhonour.Mail>();
mail = forhonour.ForHonour.usr.fetchMail();
for (forhonour.Mail m : mail) {
forhonour.ForHonour.door.writeln(("`6Message from " + (m.from)));
forhonour.ForHonour.door.writeln("`6--... | private void readMail() {
java.util.ArrayList<forhonour.Mail> mail = new java.util.ArrayList<forhonour.Mail>();
mail = forhonour.ForHonour.usr.fetchMail();
for (forhonour.Mail m : mail) {
forhonour.ForHonour.door.writeln("");
forhonour.ForHonour.door.writeln(("`6Message from " + (m.from)));
... |
public void onClick(android.view.View v) {
android.util.Log.d("MFS", "Save");
android.content.Context context = getApplicationContext();
if (isExternalStorageWritable()) {
writeToSDFile();
android.widget.Toast start_toast = android.widget.Toast.makeText(context, "Saving", Toast.LENGTH_SHORT)... | public void onClick(android.view.View v) {
message("Save", false);
android.content.Context context = getApplicationContext();
if (isExternalStorageWritable()) {
writeToSDFile();
android.widget.Toast start_toast = android.widget.Toast.makeText(context, "Saving", Toast.LENGTH_SHORT);
s... |
public java.util.List<java.lang.String> getStripRoleNames() {
java.util.List<java.lang.String> roles = getRoles();
java.util.List<java.lang.String> stripRoleNames = new java.util.ArrayList<>(roles.size());
for (java.lang.String role : roles) {
stripRoleNames.add(stripRolePrefix(role));
}
ret... | public java.util.List<java.lang.String> getStripRoleNames() {
java.util.List<java.lang.String> roles = getRoles();
java.util.List<java.lang.String> stripRoleNames = new java.util.ArrayList<>(roles.size());
for (java.lang.String role : roles) {
stripRoleNames.add(stripRolePrefix(role));
}
ret... |
public static void startScheduler() throws java.lang.Exception {
java.lang.String ipAddress = com.containersolutions.mesoshelloworld.systemtest.DiscoverySystemTest.CLUSTER.getMasterContainer().getIpAddress();
com.containersolutions.mesoshelloworld.systemtest.DiscoverySystemTest.log.info(("Starting Scheduler, co... | public static void startScheduler() throws java.lang.Exception {
java.lang.String ipAddress = com.containersolutions.mesoshelloworld.systemtest.DiscoverySystemTest.CLUSTER.getMasterContainer().getIpAddress();
com.containersolutions.mesoshelloworld.systemtest.DiscoverySystemTest.log.info(("Starting Scheduler, co... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTheme(new pt.ipp.estg.cmu.settings.PreferencesSettings(this).getThemePreference());
setContentView(R.layout.activity_categoria);
isAdmin = getIntent().getBooleanExtra(Util.ARG_ADMIN, false);
if (is... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTheme(new pt.ipp.estg.cmu.settings.PreferencesSettings(this).getThemePreference());
setContentView(R.layout.activity_categoria);
isAdmin = getIntent().getBooleanExtra(Util.ARG_ADMIN, false);
if (is... |
private void fetchAndLoadFriendFile(com.posn.datatypes.Friend friend) throws com.posn.exceptions.POSNCryptoException, java.io.IOException, org.json.JSONException {
java.lang.String fileName = (friend.ID) + "_friend_user_file.txt";
java.lang.String deviceFilepath = com.posn.constants.Constants.wallFilePath;
... | private boolean fetchAndLoadFriendFile(com.posn.datatypes.Friend friend) throws com.posn.exceptions.POSNCryptoException, java.io.IOException, org.json.JSONException {
java.lang.String fileName = (friend.ID) + "_friend_user_file.txt";
java.lang.String deviceFilepath = com.posn.constants.Constants.wallFilePath;
... |
public net.minecraft.item.ItemStack recalculateRRPath(mekanism.common.tile.TileEntityLogisticalSorter outputter, mekanism.common.base.ILogisticalTransporter transporter, int min) {
mekanism.common.content.transporter.TransporterPathfinder.Destination newPath = mekanism.common.content.transporter.TransporterPathfind... | public net.minecraft.item.ItemStack recalculateRRPath(mekanism.common.tile.TileEntityLogisticalSorter outputter, mekanism.common.base.ILogisticalTransporter transporter, int min) {
mekanism.common.content.transporter.TransporterPathfinder.Destination newPath = mekanism.common.content.transporter.TransporterPathfind... |
private java.nio.file.FileSystem newZipFileSystem(final java.io.File file) throws java.io.IOException {
final java.util.Map<java.lang.String, java.lang.String> env = new java.util.HashMap<java.lang.String, java.lang.String>() {
{
put("create", "true");
}
};
return java.nio.file.F... | private java.nio.file.FileSystem newZipFileSystem(final java.io.File file) throws java.io.IOException {
final java.util.Map<java.lang.String, java.lang.String> env = new java.util.HashMap<>();
env.put("create", "true");
return java.nio.file.FileSystems.newFileSystem(java.net.URI.create(("jar:" + (file.toURI... |
@com.intrafind.sitesearch.controller.RequestMapping(path = "{siteId}/pages/url/{url}", method = RequestMethod.GET)
org.springframework.http.ResponseEntity<com.intrafind.sitesearch.dto.FetchedPage> fetchViaUrl(@com.intrafind.sitesearch.controller.PathVariable(value = "siteId")
java.util.UUID siteId, @com.intrafind.sites... | @com.intrafind.sitesearch.controller.RequestMapping(path = "{siteId}/pages", method = RequestMethod.GET)
org.springframework.http.ResponseEntity<com.intrafind.sitesearch.dto.FetchedPage> fetchViaUrl(@com.intrafind.sitesearch.controller.PathVariable(value = "siteId")
java.util.UUID siteId, @com.intrafind.sitesearch.cont... |
private org.n52.sos.ogc.om.NamedValue<?> parseNamedValue(com.fasterxml.jackson.databind.JsonNode parameter) throws org.n52.sos.ogc.ows.OwsExceptionReport {
com.fasterxml.jackson.databind.JsonNode namedValue = parameter.path(JSONConstants.NAMED_VALUE);
org.n52.sos.ogc.om.NamedValue<?> nv = parseNamedValueValue(p... | private org.n52.sos.ogc.om.NamedValue<?> parseNamedValue(com.fasterxml.jackson.databind.JsonNode parameter) throws org.n52.sos.ogc.ows.OwsExceptionReport {
com.fasterxml.jackson.databind.JsonNode namedValue = parameter.path(JSONConstants.NAMED_VALUE);
org.n52.sos.ogc.om.NamedValue<?> nv = parseNamedValueValue(n... |
public void restore() {
ExecutingLineIndex = mELI;
LineIndex = mLI;
PossibleKeyWord = mPKW;
VarSearchStart = mVSS;
mSVN = VarNames.size();
mVI = VarIndex.size();
mNVV = com.rfo.basic.Run.NumericVarValues.size();
mSVV = StringVarValues.size();
mAT = ArrayTable.size();
trimArray(Va... | public void restore() {
ExecutingLineIndex = mELI;
LineIndex = mLI;
PossibleKeyWord = mPKW;
VarSearchStart = mVSS;
trimArray(VarNames, mSVN);
trimArray(VarIndex, mVI);
trimArray(com.rfo.basic.Run.NumericVarValues, mNVV);
trimArray(StringVarValues, mSVV);
trimArray(ArrayTable, mAT);
} |
public void recompute() {
java.util.Iterator<spreadsheet.Cell> i = changed.iterator();
while (i.hasNext()) {
spreadsheet.Cell c = i.next();
java.lang.String expr = c.getExpr();
c.setVal(new spreadsheet.StringValue(expr));
changed.remove(c);
}
} | public void recompute() {
java.util.Iterator<spreadsheet.Cell> i = changed.iterator();
while (i.hasNext()) {
spreadsheet.Cell c = i.next();
java.lang.String expr = c.getExpr();
c.setVal(new spreadsheet.StringValue(expr));
i.remove();
}
} |
public static void cleanup(boolean deleteTemporary) {
if ((deleteTemporary && ((org.owasp.dependencycheck.utils.Settings.tempDirectory) != null)) && (org.owasp.dependencycheck.utils.Settings.tempDirectory.exists())) {
org.owasp.dependencycheck.utils.FileUtils.delete(org.owasp.dependencycheck.utils.Settings.... | public static void cleanup(boolean deleteTemporary) {
if ((deleteTemporary && ((org.owasp.dependencycheck.utils.Settings.tempDirectory) != null)) && (org.owasp.dependencycheck.utils.Settings.tempDirectory.exists())) {
}
try {
org.owasp.dependencycheck.utils.Settings.localSettings.remove();
} cat... |
protected static boolean triggerOnBackPressed(java.util.List<com.floern.android.app.Fragment> fragments) {
if (fragments == null) {
return false;
}
for (com.floern.android.app.Fragment fragment : fragments) {
if ((fragment.isVisible()) && (fragment instanceof com.floern.android.app.Fragment)... | protected static boolean triggerOnBackPressed(java.util.List<com.floern.android.app.Fragment> fragments) {
if (fragments == null) {
return false;
}
for (com.floern.android.app.Fragment fragment : fragments) {
if ((fragment instanceof com.floern.android.app.Fragment) && (fragment.isVisible())... |
public java.lang.String toString() {
return (((((((((((("User{" + "id=") + (getId())) + ", email=") + (email)) + ", name=") + (name)) + ", enabled=") + (enabled)) + ", roles=") + (roles)) + ", caloriesPerDay=") + (caloriesPerDay)) + '}';
} | public java.lang.String toString() {
return (((((((((((("User{" + "id=") + (id)) + ", email=") + (email)) + ", name=") + (name)) + ", enabled=") + (enabled)) + ", roles=") + (roles)) + ", caloriesPerDay=") + (caloriesPerDay)) + '}';
} |
private void disconnect() {
try {
listener.terminate();
clientSocket.close();
} catch (java.lang.Exception e) {
logger.trace("Error attempting to disconnect from Squeeze Server", e);
return ;
} finally {
clientSocket = null;
listener = null;
}
players.... | private void disconnect() {
try {
if ((listener) != null) {
listener.terminate();
}
if ((clientSocket) != null) {
clientSocket.close();
}
} catch (java.lang.Exception e) {
logger.trace("Error attempting to disconnect from Squeeze Server", e);
... |
public void run() {
while (running) {
try {
java.lang.String bitstream = arduino.inputBuffer;
main.SpeedAngle sa = arduino.readSpeedAngle();
if (bitstream != "") {
gui.setReceivedValues(sa.speed, sa.angle, bitstream);
}
java.lang.Th... | public void run() {
while (running) {
try {
java.lang.String bitstream = arduino.inputBuffer;
if (!(bitstream.isEmpty())) {
main.SpeedAngle sa = arduino.readSpeedAngle();
gui.setReceivedValues(sa.speed, sa.angle, bitstream);
}
j... |
public static void startInAppFlowInApp(android.app.Activity activity, com.enstage.wibmo.sdk.inapp.pojo.W2faInitRequest w2faInitRequest, com.enstage.wibmo.sdk.inapp.pojo.W2faInitResponse w2faInitResponse) {
android.content.Intent intent = new android.content.Intent(((com.enstage.wibmo.sdk.WibmoSDK.getWibmoIntentActi... | public static void startInAppFlowInApp(android.app.Activity activity, com.enstage.wibmo.sdk.inapp.pojo.W2faInitRequest w2faInitRequest, com.enstage.wibmo.sdk.inapp.pojo.W2faInitResponse w2faInitResponse) {
android.content.Intent intent = new android.content.Intent(((com.enstage.wibmo.sdk.WibmoSDK.getWibmoIntentActi... |
public void onClick(android.view.View view) {
if (com.vk.sdk.VKSdk.isLoggedIn()) {
android.util.Log.e("Uje logged in", "Uje Loged in");
}
com.vk.sdk.VKSdk.authorize(com.spb.sezam.VKActivity.myScope);
if (com.vk.sdk.VKSdk.isLoggedIn()) {
android.util.Log.e("Uje logged in2", "Uje Loged in2... | public void onClick(android.view.View view) {
if (com.vk.sdk.VKSdk.isLoggedIn()) {
android.util.Log.e("Uje logged in", "Uje Loged in");
}
authorize();
if (com.vk.sdk.VKSdk.isLoggedIn()) {
android.util.Log.e("Uje logged in2", "Uje Loged in2");
}
} |
public void testStoreBinary() throws java.lang.Exception {
lux.index.XmlIndexer indexer = new lux.index.XmlIndexer(STORE_DOCUMENT);
org.apache.lucene.index.IndexWriter indexWriter = indexer.newIndexWriter(dir);
indexer.storeDocument(indexWriter, "/lux/compiler/test-module.xqy", getClass().getClassLoader().g... | public void testStoreBinary() throws java.lang.Exception {
lux.index.XmlIndexer indexer = new lux.index.XmlIndexer(STORE_DOCUMENT);
org.apache.lucene.index.IndexWriter indexWriter = indexer.newIndexWriter(dir);
indexer.storeDocument(indexWriter, "/lux/compiler/test-module.xqy", getClass().getClassLoader().g... |
public float calculatePrice(int quantity) {
float price = 0;
for (int i = 0; i <= quantity; i++) {
price += Asks.get(i).getPrice();
price += Bids.get(i).getPrice();
}
price = price / (quantity * 2);
return price;
} | public float calculatePrice(int quantity) {
float price = 0;
for (int i = 0; i < quantity; i++) {
price += Asks.get(i).getPrice();
price += Bids.get(i).getPrice();
}
price = price / (quantity * 2);
return price;
} |
public void run() {
super.run();
try {
java.lang.Thread.sleep(5000);
com.oslorde.extra.DexDumper.dumpDex(((dalvik.system.BaseDexClassLoader) (getClassLoader())), getDir("test_dex", com.oslorde.extra.MODE_PRIVATE).getPath(), null, new java.io.File(getFilesDir(), "libs"), null, DumpMode.MODE_LOOSE... | public void run() {
super.run();
try {
com.oslorde.extra.DexDumper.dumpDex(((dalvik.system.BaseDexClassLoader) (getClassLoader())), getDir("test_dex", com.oslorde.extra.MODE_PRIVATE).getPath(), null, new java.io.File(getFilesDir(), "libs"), null, DumpMode.MODE_LOOSE);
} catch (java.lang.Throwable e)... |
public void onClick(android.content.DialogInterface dialog, int which) {
incrementGamesPlayedAchievement();
incrementRoundsStartedEvent();
showWaitingScreen();
android.os.Bundle autoMatchCriteria = com.google.android.gms.games.multiplayer.realtime.RoomConfig.createAutoMatchCriteria(1, 1, 0);
de.appp... | public void onClick(android.content.DialogInterface dialog, int which) {
incrementRoundsStartedEvent();
showWaitingScreen();
android.os.Bundle autoMatchCriteria = com.google.android.gms.games.multiplayer.realtime.RoomConfig.createAutoMatchCriteria(1, 1, 0);
de.appphil.categories.TurnBasedGame.createMatc... |
public synchronized void remove(final java.lang.String address) {
if (this.bluetoothGatt.containsKey(address)) {
android.util.Log.d(net.sylvek.itracing2.BluetoothLEService.TAG, ("remove() - to device " + address));
this.bluetoothGatt.get(address).disconnect();
this.bluetoothGatt.remove(addre... | public synchronized void remove(final java.lang.String address) {
if (this.bluetoothGatt.containsKey(address)) {
android.util.Log.d(net.sylvek.itracing2.BluetoothLEService.TAG, ("remove() - to device " + address));
if ((this.bluetoothGatt.get(address)) != null) {
this.bluetoothGatt.get(a... |
public boolean anotherPlayIsPossible() {
java.util.List<java.lang.Integer> selected = java.util.Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8);
if ((containspairsum11(selected)) == true) {
return true;
}else
if (containsJQK(selected)) {
return true;
}
return false;
} | public boolean anotherPlayIsPossible() {
java.util.List<java.lang.Integer> selected = java.util.Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8);
if (containspairsum11(selected)) {
return true;
}else
if (containsJQK(selected)) {
return true;
}
return false;
} |
private void addSadlBaseModelImportToJenaModel(org.eclipse.emf.ecore.resource.Resource resource) throws com.ge.research.sadl.jena.JenaProcessorException, com.ge.research.sadl.reasoner.ConfigurationException, java.io.IOException, java.net.URISyntaxException {
sadlBaseModel = getOntModelFromString(resource, com.ge.re... | private void addSadlBaseModelImportToJenaModel(org.eclipse.emf.ecore.resource.Resource resource) throws com.ge.research.sadl.jena.JenaProcessorException, com.ge.research.sadl.reasoner.ConfigurationException, java.io.IOException, java.net.URISyntaxException {
if ((sadlBaseModel) == null) {
sadlBaseModel = co... |
public void actionPerformed(java.awt.event.ActionEvent e) {
java.lang.Object[] options = new java.lang.Object[]{ "Confirm" , "Cancel" };
int n = javax.swing.JOptionPane.showOptionDialog(exitWindow, "Are you sure you want to begin a new game? All progress wil be lost.", "Hnefatafl", javax.swing.JOptionPane.YES_N... | public void actionPerformed(java.awt.event.ActionEvent e) {
java.lang.Object[] options = new java.lang.Object[]{ "Confirm" , "Cancel" };
int n = javax.swing.JOptionPane.showOptionDialog(exitWindow, "Are you sure you want to begin a new game? All progress wil be lost.", "Hnefatafl", javax.swing.JOptionPane.YES_N... |
public void onClick(android.content.DialogInterface dialog, int which) {
java.lang.CharSequence input = mEditText.getText();
if ((android.text.TextUtils.isEmpty(input)) && (hintIsValidEntry)) {
input = mEditText.getHint();
}
mListener.onOk(input);
} | public void onClick(android.content.DialogInterface dialog, int which) {
java.lang.CharSequence input = mEditText.getText();
if ((android.text.TextUtils.isEmpty(input)) && (hintIsValidEntry)) {
input = mEditText.getHint();
}
java.lang.String value = null;
if (input != null)
value = i... |
private boolean isSingleIncrement(com.puppycrawl.tools.checkstyle.api.DetailAST postExpr) {
if ((postExpr.getChildCount()) != 1) {
return false;
}
com.puppycrawl.tools.checkstyle.api.DetailAST expr = postExpr.getFirstChild().getFirstChild().getFirstChild();
if (((expr.getType()) == (com.puppycra... | private boolean isSingleIncrement(com.puppycrawl.tools.checkstyle.api.DetailAST postExpr, java.lang.String var) {
if ((postExpr.getChildCount()) != 1) {
return false;
}
com.puppycrawl.tools.checkstyle.api.DetailAST expr = postExpr.getFirstChild().getFirstChild().getFirstChild();
return (((expr.g... |
public void onResponse(@android.support.annotation.NonNull
retrofit2.Call<com.app.phedev.popmovie.pojo.TrailerResponse> call, @android.support.annotation.NonNull
retrofit2.Response<com.app.phedev.popmovie.pojo.TrailerResponse> response) {
java.util.List<com.app.phedev.popmovie.pojo.Trailer> trailers = response.body... | public void onResponse(@android.support.annotation.NonNull
retrofit2.Call<com.app.phedev.popmovie.pojo.TrailerResponse> call, @android.support.annotation.NonNull
retrofit2.Response<com.app.phedev.popmovie.pojo.TrailerResponse> response) {
java.util.List<com.app.phedev.popmovie.pojo.Trailer> trailers = response.body... |
public void onAudioFocusChange(int focusChange) {
switch (focusChange) {
case android.media.AudioManager.AUDIOFOCUS_GAIN :
break;
case android.media.AudioManager.AUDIOFOCUS_LOSS :
mediaPlayer.release();
break;
case android.media.AudioManager.AUDIOFOCUS_LOS... | public void onAudioFocusChange(int focusChange) {
switch (focusChange) {
case android.media.AudioManager.AUDIOFOCUS_GAIN :
mediaPlayer.setVolume(1.0F, 1.0F);
break;
case android.media.AudioManager.AUDIOFOCUS_LOSS :
mediaPlayer.release();
break;
... |
public void onSingleClick(android.view.View v) {
if (!(currentlyEditingId.equals(comment.getFullName())))
if (me.ccrama.redditslide.SettingValues.swap) {
doLongClick(holder, comment, baseNode, finalPos, finalPos1);
}else {
doOnClick(holder, comment, baseNode);
}
... | public void onSingleClick(android.view.View v) {
if (!(currentlyEditingId.equals(comment.getFullName())))
if (me.ccrama.redditslide.SettingValues.swap) {
doLongClick(holder, comment, baseNode);
}else {
doOnClick(holder, comment, baseNode);
}
} |
private void fireEvent(org.rstudio.studio.client.workbench.views.source.editors.text.ace.AceEditorCommandEvent.CommandType type, org.rstudio.studio.client.workbench.views.source.editors.text.ace.AceEditorCommandEvent.ExecutionPolicy policy) {
org.rstudio.studio.client.workbench.views.source.editors.text.ace.AceEdit... | private void fireEvent(int type, int policy) {
org.rstudio.studio.client.workbench.views.source.editors.text.ace.AceEditorCommandEvent event = new org.rstudio.studio.client.workbench.views.source.editors.text.ace.AceEditorCommandEvent(type, policy);
if (org.rstudio.studio.client.common.satellite.Satellite.isCur... |
public static void updateUi(int msg) {
switch (msg) {
case app.park.com.bluetooth.Constants.MESSAGE_BT_CONNECTED :
if ((app.park.com.MainActivity.mDeviceRole) == (app.park.com.MainActivity.ROLE_CONTROLLER)) {
app.park.com.MainActivity.mVideoFragment.enableButton();
}e... | public static void updateUi(int msg) {
switch (msg) {
case app.park.com.bluetooth.Constants.MESSAGE_BT_CONNECTED :
if ((app.park.com.MainActivity.mDeviceRole) == (app.park.com.MainActivity.ROLE_CONTROLLER)) {
app.park.com.MainActivity.mVideoFragment.enableButton();
}e... |
public ninja.leaping.permissionsex.backend.memory.MemoryOptionSubjectData.DataEntry withoutOption(java.lang.String key) {
if (!(options.containsKey(key))) {
return this;
}
java.util.Map<java.lang.String, java.lang.String> newOptions = new java.util.HashMap<>(options);
newOptions.remove(key);
... | public ninja.leaping.permissionsex.backend.memory.MemoryOptionSubjectData.DataEntry withoutOption(java.lang.String key) {
if (((options) == null) || (!(options.containsKey(key)))) {
return this;
}
java.util.Map<java.lang.String, java.lang.String> newOptions = new java.util.HashMap<>(options);
ne... |
private double tf(java.lang.String term, java.lang.String docName) {
double fik;
if ((InvertedIndex.invertedIndex.get(term).containsKey(docName)) == false) {
return 0;
}else {
fik = InvertedIndex.invertedIndex.get(term).get(docName);
}
return fik / (BackData.wordFreqDoc.get(docName))... | private double tf(java.lang.String term, java.lang.String docName) {
double fik;
if ((InvertedIndex.invertedIndex.get(term).containsKey(docName)) == false) {
return 0;
}else
if ((BackData.wordFreqDoc.get(docName)) == 0) {
return 0;
}else {
fik = InvertedIndex.... |
public void onReceive(android.content.Context context, android.content.Intent intent) {
switch (intent.getAction()) {
case piotr.fr.sharelist.dialog.TextPickerDialog.EVENT_ON_TEXT_PICKED_UP :
java.lang.String text = intent.getStringExtra(TextPickerDialog.EXTRA_TEXT);
addElement(text)... | public void onReceive(android.content.Context context, android.content.Intent intent) {
switch (intent.getAction()) {
case piotr.fr.sharelist.dialog.TextPickerDialog.EVENT_ON_TEXT_PICKED_UP :
java.lang.String text = intent.getStringExtra(TextPickerDialog.EXTRA_TEXT);
addElement(text)... |
protected void changeLanguageTo(java.lang.String lang) {
if (lang.equals(language)) {
return ;
}
English.setSelected(lang.equals("en"));
Deutsch.setSelected(lang.equals("de"));
Francais.setSelected(lang.equals("fr"));
language = lang;
if ((activeAddon) != null) {
Description.... | protected void changeLanguageTo(java.lang.String lang) {
if (lang.equals(language)) {
return ;
}
English.setSelected("en".equals(lang));
Deutsch.setSelected("de".equals(lang));
Francais.setSelected("fr".equals(lang));
language = lang;
if ((activeAddon) != null) {
Description.... |
public void toggleEdit() {
editable = !(editable);
android.view.MenuItem item = ((android.view.MenuItem) (menu.findItem(R.id.action_add)));
item.setVisible(editable);
if ((data) == null)
return ;
for (com.munger.budgettrack.model.CashFlow tr : data) {
com.munger.budgettrack.view... | public void toggleEdit() {
editable = !(editable);
android.view.MenuItem item = ((android.view.MenuItem) (menu.findItem(R.id.action_add)));
item.setVisible(editable);
if ((data) == null)
return ;
for (com.munger.budgettrack.model.CashFlow tr : data) {
com.munger.budgettrack.view... |
public static void setRelevantAlterations(java.lang.Integer entrezGeneId, java.lang.String variant, java.util.List<org.mskcc.cbio.oncokb.util.Alteration> alts) {
if (!(org.mskcc.cbio.oncokb.util.CacheUtils.relevantAlterations.containsKey(entrezGeneId))) {
org.mskcc.cbio.oncokb.util.CacheUtils.relevantAltera... | public static void setRelevantAlterations(java.lang.Integer entrezGeneId, java.lang.String variant, java.util.List<org.mskcc.cbio.oncokb.util.Alteration> alts) {
if (!(org.mskcc.cbio.oncokb.util.CacheUtils.relevantAlterations.containsKey(entrezGeneId))) {
org.mskcc.cbio.oncokb.util.CacheUtils.relevantAltera... |
public static void updateSeekBarOnProgress() {
com.byteshaft.streamsound.MainActivity mainActivity = com.byteshaft.streamsound.MainActivity.getInstance();
if (mainActivity != null) {
mainActivity.seekBar.setProgress(((mainActivity.seekBar.getProgress()) + ((mainActivity.updateValue) / 2)));
main... | public static void updateSeekBarOnProgress() {
com.byteshaft.streamsound.MainActivity mainActivity = com.byteshaft.streamsound.MainActivity.getInstance();
if (mainActivity != null) {
mainActivity.seekBar.setProgress(((mainActivity.seekBar.getProgress()) + ((mainActivity.updateValue) / 2)));
java... |
public boolean outOfRange() {
if ((guess) > (maxItemsInJar)) {
java.lang.System.out.printf("Your guess must be less than maximum fill amount %s", maxItemsInJar);
return true;
}else
if ((guess) < 1) {
java.lang.System.out.print("Your guess must be greater than 1");
... | public boolean outOfRange() {
if ((guess) > (maxItemsInJar)) {
java.lang.System.out.printf("Your guess must be less than maximum fill amount %s", maxItemsInJar);
return true;
}else
if ((guess) < 1) {
java.lang.System.out.println("Your guess must be greater than 1");
... |
private java.util.Map<java.lang.String, java.lang.Object> translate(java.util.Map<java.lang.String, java.lang.Object> map, com.silicornio.quepotranslator.QPTransObject transObject) {
java.util.Map<java.lang.String, java.lang.Object> instanceMap = translateToMap(map, transObject);
com.silicornio.quepotranslator.... | private java.util.Map<java.lang.String, java.lang.Object> translate(java.util.Map<java.lang.String, java.lang.Object> map, com.silicornio.quepotranslator.QPTransObject transObject) {
java.util.Map<java.lang.String, java.lang.Object> instanceMap = translateToMap(map, transObject, true);
com.silicornio.quepotrans... |
public org.springframework.web.servlet.ModelAndView writeFile(@org.springframework.web.bind.annotation.ModelAttribute
patrimoine.models.Collection collection, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws java.io.IOException, jxl.read.biff.BiffException, jxl.write.WriteExcept... | public org.springframework.web.servlet.ModelAndView writeFile(@org.springframework.web.bind.annotation.ModelAttribute
patrimoine.models.Collection collection, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws java.io.IOException, jxl.read.biff.BiffException, jxl.write.WriteExcept... |
public boolean isValid(com.player.Position p) {
return ((((p.x) >= 0) && ((p.x) < (row))) && ((p.y) >= 0)) && ((p.y) < (column));
} | public boolean isValid(com.player.Position p) {
return ((((p != null) && ((p.x) >= 0)) && ((p.x) < (row))) && ((p.y) >= 0)) && ((p.y) < (column));
} |
public void close() throws java.io.IOException {
closeByteBufferImpl();
fileChannel.close();
socketChannel.close();
sChannel.close();
synchronized(this) {
org.apache.htrace.TraceScope scope = dfsClient.getPathTraceScope("DFSOutputStream#close", src);
try {
flushBuffer();
... | public void close() throws java.io.IOException {
closeByteBufferImpl();
fileChannel.close();
socketChannel.close();
sChannel.close();
synchronized(this) {
org.apache.htrace.TraceScope scope = dfsClient.getPathTraceScope("DFSOutputStream#close", src);
try {
completeFile(bl... |
public void onComplete() {
saveData(IEntity.STATE_COMPLETE, entity.getFileSize());
(mCompleteNum)++;
handleSpeed(0);
mListener.onSubComplete(entity);
if ((mCompleteNum) >= (mTaskEntity.getEntity().getSubTask().size())) {
closeTimer(false);
mListener.onComplete();
}
if (((mCom... | public void onComplete() {
saveData(IEntity.STATE_COMPLETE, entity.getFileSize());
(mCompleteNum)++;
handleSpeed(0);
mListener.onSubComplete(entity);
if ((mCompleteNum) >= (mTaskEntity.getEntity().getSubTask().size())) {
closeTimer(false);
mListener.onComplete();
}else
if... |
public int getCluster(final com.orientechnologies.orient.core.metadata.schema.OClass iClass) {
final int[] clusters = iClass.getClusterIds();
if ((clusters.length) == 1)
return clusters[0];
if ((pointer) >= (clusters.length))
pointer = 0;
return clusters[((pointer)++)];
} | public int getCluster(final com.orientechnologies.orient.core.metadata.schema.OClass iClass) {
final int[] clusters = iClass.getClusterIds();
if ((clusters.length) == 1)
return clusters[0];
synchronized(this) {
if ((pointer) >= (clusters.length))
pointer = 0;
... |
public void configureMessageConverters(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> converters) {
final org.springframework.http.converter.json.MappingJackson2HttpMessageConverter converter = new org.springframework.http.converter.json.MappingJackson2HttpMessageConverter();
final c... | public void configureMessageConverters(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> converters) {
final org.springframework.http.converter.json.MappingJackson2HttpMessageConverter converter = new org.springframework.http.converter.json.MappingJackson2HttpMessageConverter();
final c... |
public void normalizeRatio(sdp.AI.Command comm) {
if ((java.lang.Math.abs(comm.turning_speed)) > (MAX_TURNING_SPEED)) {
comm.speed = MAX_SPEED_CM_S;
return ;
}
double rat = 1 - ((java.lang.Math.abs(comm.turning_speed)) / (MAX_SPEED_CM_S));
comm.speed *= rat;
} | public void normalizeRatio(sdp.AI.Command comm) {
if ((java.lang.Math.abs(comm.turning_speed)) > (MAX_TURNING_SPEED)) {
comm.speed = 0;
return ;
}
double rat = 1 - ((java.lang.Math.abs(comm.turning_speed)) / (MAX_SPEED_CM_S));
comm.speed *= rat;
} |
public void print_board() {
java.lang.System.out.println("Initializing print_board");
java.lang.System.out.print("Deck size: ");
print_deck_size();
java.lang.System.out.print("Card queue: ");
print_card_queue();
java.lang.System.out.println("(Leftmost is on top)");
java.lang.System.out.print... | public void print_board() {
java.lang.System.out.println("Initializing print_board");
java.lang.System.out.print("Deck size: ");
print_deck_size();
java.lang.System.out.print("Card queue: ");
print_card_queue();
java.lang.System.out.print("Foundations: ");
print_foundations();
java.lang.... |
public boolean getItemValueBoolean(java.lang.String aName) {
try {
aName = aName.toLowerCase();
java.util.List<?> v = getItemValue(aName);
if ((v.size()) == 0)
return false;
java.lang.Object sValue = v.get(0);
return java.lang.Boolean.valueOf(sValue.toStr... | public boolean getItemValueBoolean(java.lang.String aName) {
try {
java.util.List<?> v = getItemValue(aName);
if ((v.size()) == 0)
return false;
java.lang.Object sValue = v.get(0);
return java.lang.Boolean.valueOf(sValue.toString());
} catch (java.lang.ClassC... |
public java.lang.String toString() {
java.lang.StringBuilder s = new java.lang.StringBuilder();
java.util.Iterator<fr.lirmm.graphik.DEFT.gad.GADEdge> it = this.path.iterator();
if (it.hasNext()) {
s.append(it.next().getTarget());
}
for (fr.lirmm.graphik.DEFT.gad.GADEdge edge : this.path) {
... | public java.lang.String toString() {
java.lang.StringBuilder s = new java.lang.StringBuilder();
java.util.Iterator<fr.lirmm.graphik.DEFT.gad.GADEdge> it = this.path.iterator();
if (it.hasNext()) {
s.append(it.next().getTarget());
}
for (fr.lirmm.graphik.DEFT.gad.GADEdge edge : this.path) {
... |
private void closeStore(org.neo4j.kernel.impl.store.StoreType type) {
int i = type.ordinal();
if ((stores[i]) != null) {
type.close(this, stores[i]);
stores[i] = null;
}
} | private void closeStore(org.neo4j.kernel.impl.store.StoreType type) {
int i = type.ordinal();
if ((stores[i]) != null) {
try {
type.close(this, stores[i]);
} finally {
stores[i] = null;
}
}
} |
static void requestPermissions(android.content.Context context, net.kjulio.rxlocation.BaseHelper baseHelper) {
net.kjulio.rxlocation.PermissionsRequestLock.getInstance().addListener(baseHelper);
if (!(net.kjulio.rxlocation.PermissionsActivity.permissionsRequestInprogress)) {
android.content.Intent inten... | static void requestPermissions(android.content.Context context, net.kjulio.rxlocation.BaseHelper baseHelper) {
net.kjulio.rxlocation.PermissionsRequestLock.getInstance().addListener(baseHelper);
if (!(net.kjulio.rxlocation.PermissionsActivity.permissionsRequestInprogress.get())) {
android.content.Intent... |
public static com.badlogic.gdx.math.Vector2 toWorldCoord(int xGrid, int yGrid, int zGrid, float w, float h, float depth) {
float x = 0;
float y = 0;
y = (((yGrid * h) * 3) / 4.0F) + (zGrid * depth);
x = (xGrid * w) - (((yGrid % 2) * w) / 2.0F);
return new com.badlogic.gdx.math.Vector2(x, y);
} | public static com.badlogic.gdx.math.Vector2 toWorldCoord(int xGrid, int yGrid, int zGrid, float w, float h, float depth) {
float y = (((yGrid * h) * 3) / 4.0F) + (zGrid * depth);
float x = (xGrid * w) - (((yGrid % 2) * w) / 2.0F);
return new com.badlogic.gdx.math.Vector2(x, y);
} |
private final int level0resolve(final de.uni_freiburg.informatik.ultimate.smtinterpol.dpll.Literal l, final java.util.Set<de.uni_freiburg.informatik.ultimate.smtinterpol.dpll.Literal> level0Ants, final int sl) {
final de.uni_freiburg.informatik.ultimate.smtinterpol.dpll.Clause l0 = getLevel0(l.negate());
if (is... | private final int level0resolve(final de.uni_freiburg.informatik.ultimate.smtinterpol.dpll.Literal l, final java.util.Set<de.uni_freiburg.informatik.ultimate.smtinterpol.dpll.Literal> level0Ants, final int sl) {
final de.uni_freiburg.informatik.ultimate.smtinterpol.dpll.Clause l0 = getLevel0(l.negate());
level0... |
public double getLandingLocationX() {
net.minecraft.util.EnumFacing facing = zmaster587.libVulpes.block.RotatableBlock.getFront(worldObj.getBlockState(getPos()));
return (((getPos().getX()) + ((facing.getFrontOffsetX()) * 3)) - (facing.getFrontOffsetZ())) + 0.5;
} | public double getLandingLocationX() {
net.minecraft.util.EnumFacing facing = zmaster587.libVulpes.block.RotatableBlock.getFront(worldObj.getBlockState(getPos()));
return (((getPos().getX()) + ((facing.getFrontOffsetX()) * (-3))) - (facing.getFrontOffsetZ())) + 0.5;
} |
private void consumeInfectAction(io.infectnet.server.engine.core.entity.wrapper.Action action) {
io.infectnet.server.engine.content.system.infect.InfectAction infectAction = ((io.infectnet.server.engine.content.system.infect.InfectAction) (action));
if (world.neighboursOf(infectAction.getSource()).contains(infe... | private void consumeInfectAction(io.infectnet.server.engine.core.entity.wrapper.Action action) {
io.infectnet.server.engine.content.system.infect.InfectAction infectAction = ((io.infectnet.server.engine.content.system.infect.InfectAction) (action));
if (world.neighboursOf(infectAction.getSource()).contains(infe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.