buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private java.lang.Class<?> typeInfferUnary(nez.ast.jcode.JCodeTree node) {
java.lang.Class<?> nodeType = node.getTypedClass();
if (nodeType == (int.class)) {
return int.class;
}else
if (nodeType == (double.class)) {
return double.class;
}
new java.lang.RuntimeExc... | private java.lang.Class<?> typeInfferUnary(nez.ast.jcode.JCodeTree node) {
java.lang.Class<?> nodeType = node.getTypedClass();
if (nodeType == (int.class)) {
return int.class;
}else
if (nodeType == (double.class)) {
return double.class;
}
throw new java.lang.Runt... |
public void pop() {
com.google.common.base.Preconditions.checkState((!(closed)));
com.google.common.base.Preconditions.checkState(((com.microsoft.z3.Native.solverGetNumScopes(z3context, z3solver)) >= 1));
(level)--;
assertedFormulas.pop();
com.microsoft.z3.Native.solverPop(z3context, z3solver, 1);
} | public void pop() {
com.google.common.base.Preconditions.checkState((!(closed)));
com.google.common.base.Preconditions.checkState(((com.microsoft.z3.Native.solverGetNumScopes(z3context, z3solver)) >= 1));
com.google.common.base.Preconditions.checkState(((level) == ((assertedFormulas.size()) - 1)));
(lev... |
public void testMoveDirectionDouble() {
com.github.fishio.BoundingBox bb = new com.github.fishio.BoundingBox(1.0, 2.0, 3.0, 4.0);
bb.move(Direction.UP, 1.0);
org.junit.Assert.assertEquals(1.0, bb.getMinX(), 1.0E-7);
org.junit.Assert.assertEquals(3.0, bb.getMinY(), 1.0E-7);
org.junit.Assert.assertEqu... | public void testMoveDirectionDouble() {
com.github.fishio.BoundingBox bb = new com.github.fishio.BoundingBox(1.0, 2.0, 3.0, 4.0);
bb.move(Direction.UP, 1.0);
org.junit.Assert.assertEquals(1.0, bb.getMinX(), 1.0E-7);
org.junit.Assert.assertEquals(1.0, bb.getMinY(), 1.0E-7);
org.junit.Assert.assertEqu... |
public void removeListenerForKeyTableChange(final java.lang.String classname, final de.cismet.belis.gui.widget.KeyTableListener listener) {
final java.util.Collection<de.cismet.belis.gui.widget.KeyTableListener> listeners = keyTableListeners.get(classname.toLowerCase());
if (listeners != null) {
listene... | public void removeListenerForKeyTableChange(final java.lang.String className, final de.cismet.belis.gui.widget.KeyTableListener listener) {
final java.util.Collection<de.cismet.belis.gui.widget.KeyTableListener> listeners = keyTableListeners.get(className.toLowerCase());
if (listeners != null) {
listene... |
public java.lang.String serialize(gr.eap.RLGameEcoServer.comm.CommunicationsObject command) {
com.google.gson.GsonBuilder builder = new com.google.gson.GsonBuilder();
com.google.gson.Gson gson = builder.create();
com.google.gson.JsonObject a = gson.toJsonTree(command).getAsJsonObject();
a.add(gr.eap.RLG... | public java.lang.String serialize(gr.eap.RLGameEcoServer.comm.CommunicationsObject command) {
com.google.gson.GsonBuilder builder = new com.google.gson.GsonBuilder();
com.google.gson.Gson gson = builder.create();
com.google.gson.JsonObject a = gson.toJsonTree(command).getAsJsonObject();
a.add(gr.eap.RLG... |
public void onClick(android.view.View v) {
java.lang.String name;
java.lang.String ID;
ID = idSelect.getSelectedItem().toString();
android.content.SharedPreferences.Editor editor = settings.edit();
editor.putString("board_ID", ID);
editor.apply();
android.content.Intent intent = new android.... | public void onClick(android.view.View v) {
java.lang.String ID;
ID = idSelect.getSelectedItem().toString();
android.content.SharedPreferences.Editor editor = settings.edit();
editor.putString("board_ID", ID);
editor.apply();
android.content.Intent intent = new android.content.Intent(this, com.ex... |
public java.lang.String parseTweet(java.lang.String[] words) {
if (((words.length) == 2) && (words[1].equalsIgnoreCase(primes.PrimeTweet.RandomPrime.CMD_STRING))) {
int[] pl = p.getPrimesList();
return "" + (pl[new java.util.Random().nextInt(pl.length)]);
}
return null;
} | public java.lang.String parseTweet(java.lang.String[] words) {
if (((words.length) >= 2) && (words[1].equalsIgnoreCase(primes.PrimeTweet.RandomPrime.CMD_STRING))) {
int[] pl = p.getPrimesList();
return "" + (pl[new java.util.Random().nextInt(pl.length)]);
}
return null;
} |
public void addLine(java.lang.String line, int frequency) {
root.weight += frequency;
task.SuffixTreeDictionary.SuffixNode currentNode = root;
for (int i = 0; i < (line.length()); i++) {
char c = line.charAt(i);
currentNode = currentNode.addChild(c, frequency);
}
currentNode.setLastN... | public void addLine(java.lang.String line, int frequency) {
task.SuffixTreeDictionary.SuffixNode currentNode = root;
for (int i = 0; i < (line.length()); i++) {
char c = line.charAt(i);
currentNode = currentNode.addChild(c, frequency);
}
currentNode.setLastNode(frequency);
} |
public void setUp() throws java.lang.Exception {
library = getTestLibrary();
com.twu.biblioteca.UserDatabase database = new com.twu.biblioteca.UserDatabase();
database.add(getTestUser());
database.add(getTestAdmin());
loginValidator = new com.twu.biblioteca.LoginValidator(database);
byteArrayOut... | public void setUp() throws java.lang.Exception {
library = getTestLibrary();
com.twu.biblioteca.UserDatabase database = new com.twu.biblioteca.UserDatabase();
database.add(getTestUser());
database.add(getTestAdmin());
loginValidator = new com.twu.biblioteca.LoginValidator(database);
byteArrayOut... |
public static java.lang.String trimLastSeparator(java.lang.String separator, java.lang.String str) {
if ((str.length()) > 0) {
if ((str.lastIndexOf(separator)) == ((str.length()) - 1)) {
str = str.substring(0, ((str.length()) - 2));
}
}
return str;
} | public static java.lang.String trimLastSeparator(java.lang.String separator, java.lang.String str) {
if ((str.length()) > 0) {
if ((str.lastIndexOf(separator)) == ((str.length()) - 1)) {
str = str.substring(0, ((str.length()) - 1));
}
}
return str;
} |
public static com.Da_Technomancer.crossroads.dimensions.PlayerDimensionMapSavedData get(net.minecraft.world.World world, @javax.annotation.Nullable
net.minecraft.server.management.PlayerProfileCache playerCache) {
com.Da_Technomancer.crossroads.dimensions.PlayerDimensionMapSavedData.cache = playerCache;
net.min... | public static com.Da_Technomancer.crossroads.dimensions.PlayerDimensionMapSavedData get(net.minecraft.world.World world, @javax.annotation.Nullable
net.minecraft.server.management.PlayerProfileCache playerCache) {
com.Da_Technomancer.crossroads.dimensions.PlayerDimensionMapSavedData.cache = playerCache;
net.min... |
public void loadPodcastListFragment(boolean animate) {
activeFragmentId = R.id.nav_podcast;
setActionBarBackArrow(false);
android.app.FragmentTransaction ft = getFragmentManager().beginTransaction();
if (animate) {
ft.setCustomAnimations(R.animator.fade_in_to_right, R.animator.fade_out_to_right)... | public void loadPodcastListFragment(boolean animate) {
activeFragmentId = R.id.nav_podcast;
android.app.FragmentTransaction ft = getFragmentManager().beginTransaction();
if (animate) {
ft.setCustomAnimations(R.animator.fade_in_to_right, R.animator.fade_out_to_right);
}
ft.replace(R.id.home_s... |
public void reAssignSlotWhenNoSubscribers(java.lang.String nodeId, java.lang.String queueName) {
try {
java.lang.String lockKeyForNodeId = nodeId + (org.wso2.andes.kernel.slot.SlotManagerClusterMode.class);
synchronized(lockKeyForNodeId.intern()) {
slotAgent.deleteSlotAssignmentByQueueNa... | public void reAssignSlotWhenNoSubscribers(java.lang.String nodeId, java.lang.String queueName) throws org.wso2.andes.kernel.AndesException {
java.lang.String lockKeyForNodeId = nodeId + (org.wso2.andes.kernel.slot.SlotManagerClusterMode.class);
synchronized(lockKeyForNodeId.intern()) {
slotAgent.deleteS... |
public T map(com.subinkrishna.simplehttp.Http.Response response) {
T result = null;
if (null != response) {
com.google.gson.Gson gson = new com.google.gson.Gson();
java.lang.String json = new java.lang.String(response.mBody);
result = gson.fromJson(json, mType);
}
return result;
... | public T map(com.subinkrishna.simplehttp.Http.Response response) {
T result = null;
java.lang.String json = null;
if ((null != response) && (null != (response.mBody))) {
com.google.gson.Gson gson = new com.google.gson.Gson();
json = new java.lang.String(response.mBody);
result = gson... |
private CentralPoint.StatusInfo getClientStatus() throws java.lang.Exception {
if (doc.getDocumentElement().getChildNodes().item(0).getNodeValue().equals(ConstantTags.ALIVE)) {
return new CentralPoint.StatusInfo(StatusInfo.ALIVE);
}else {
return new CentralPoint.StatusInfo(StatusInfo.DYING);
... | public CentralPoint.StatusInfo getClientStatus() throws java.lang.Exception {
if (doc.getDocumentElement().getChildNodes().item(0).getNodeValue().equals(ConstantTags.ALIVE)) {
return new CentralPoint.StatusInfo(StatusInfo.ALIVE);
}else {
return new CentralPoint.StatusInfo(StatusInfo.DYING);
... |
public void setLocationRemainingCapacity(edu.pddl.mmcr.model.Location location, java.lang.Integer capacity) {
if (capacity.equals(location.getRemainingCapacity())) {
location.setRemainingCapacity(capacity);
java.awt.event.ActionEvent event = new java.awt.event.ActionEvent(location, java.awt.event.Ac... | public void setLocationRemainingCapacity(edu.pddl.mmcr.model.Location location, java.lang.Integer capacity) {
if (!(capacity.equals(location.getRemainingCapacity()))) {
location.setRemainingCapacity(capacity);
java.awt.event.ActionEvent event = new java.awt.event.ActionEvent(location, java.awt.event... |
public void calculate(java.lang.String line, java.lang.String[] splitline, java.lang.String sampled_timeframe) {
java.lang.String[] regexgroups = getRegexGroups();
if ((regexgroups != null) && ((regexgroups.length) > 1))
value = regexgroups[aggregating_field];
else
value = splitline[aggregat... | public void calculate(java.lang.String line, java.lang.String[] splitline, java.lang.String sampled_timeframe) {
java.lang.String[] regexgroups = getRegexGroups();
if ((regexgroups != null) && ((regexgroups.length) > 1))
value = regexgroups[aggregating_field];
else
value = splitline[aggregat... |
protected void run(java.lang.String[] args) {
this.options = newOptions(args);
try {
java.lang.String result = remote.execute(newOperation());
java.lang.System.out.println((result == null ? "success" : result));
afterRun();
} catch (java.lang.Exception e) {
throw new com.haze... | protected void run(java.lang.String[] args) {
this.options = newOptions(args);
try {
java.lang.String result = remote.execute(newOperation());
java.lang.System.out.println((result == null ? "success" : result));
} catch (java.lang.Exception e) {
throw new com.hazelcast.simulator.util... |
public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object text, boolean isSelected, boolean hasFocus, int row, int column) {
if (text instanceof java.lang.String) {
setFont(italicFont);
setBorder(plainBorder);
}else {
setFont(regularFont);
... | public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object text, boolean isSelected, boolean hasFocus, int row, int column) {
super.getTableCellRendererComponent(table, text, isSelected, hasFocus, row, column);
if (text instanceof java.lang.String) {
setFont(itali... |
double sum = 0;
for (int i = 0; i < (x + 1); i++) {
c[i] *= java.lang.Math.pow(x, i);
sum += c[i];
}
return sum;
} | double sum = 0.0;
for (int i = 0; i < (c.length); i++) {
sum += (c[i]) * (java.lang.Math.pow(x, i));
}
return sum;
} |
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
if (resultCode == (RESULT_OK)) {
if (requestCode == (com.kbeanie.multipicker.api.Picker.PICK_IMAGE_DEVICE)) {
kProgressHUD = com.kaopiz.kprogresshud.KProgressHUD.create(this).setStyle(KProgressHUD.Sty... | protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
if (resultCode == (RESULT_OK)) {
if (requestCode == (com.kbeanie.multipicker.api.Picker.PICK_IMAGE_DEVICE)) {
kProgressHUD = com.kaopiz.kprogresshud.KProgressHUD.create(this).setStyle(KProgressHUD.Sty... |
public void onActivityCreated(android.os.Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
if ((b) != null) {
textView = ((android.widget.TextView) (rootView.findViewById(R.id.textView)));
java.lang.String textV = b.getString("textViewText");
setProgressColor(Colo... | public void onActivityCreated(android.os.Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
if ((b) != null) {
textView = ((android.widget.TextView) (rootView.findViewById(R.id.textView)));
java.lang.String textV = b.getString("textViewText");
textView.setText(text... |
private static ru.spbau.bocharov.cli.common.QuoteString createQuoteString(java.lang.String bodyWithQuotes) {
java.lang.String body = bodyWithQuotes;
if (isQuote(bodyWithQuotes.charAt(0))) {
body = bodyWithQuotes.substring(1, ((bodyWithQuotes.length()) - 1));
}
return (body.charAt(0)) == (ru.spba... | private static ru.spbau.bocharov.cli.common.QuoteString createQuoteString(java.lang.String bodyWithQuotes) {
java.lang.String body = bodyWithQuotes;
if (isQuote(bodyWithQuotes.charAt(0))) {
body = bodyWithQuotes.substring(1, ((bodyWithQuotes.length()) - 1));
}
return (bodyWithQuotes.charAt(0)) =... |
public synchronized java.util.ArrayList<data.Metric> getNextMetricSequence() {
if ((((metricSequenceKeyList.size()) - 1) > (metricSequenceIndex)) && (threadsRunning)) {
data.MetricKey mk = metricSequenceKeyList.get(metricSequenceIndex);
(metricSequenceIndex)++;
return metricSequenceHash.get(... | public synchronized java.util.ArrayList<data.Metric> getNextMetricSequence() {
if ((((metricSequenceKeyList.size()) - 1) >= (metricSequenceIndex)) && (threadsRunning)) {
data.MetricKey mk = metricSequenceKeyList.get(metricSequenceIndex);
(metricSequenceIndex)++;
return metricSequenceHash.get... |
public javax.ws.rs.core.Response deactivateOrder(@com.emc.sa.api.PathParam(value = "id")
java.net.URI id) throws com.emc.storageos.db.exceptions.DatabaseException {
com.emc.sa.api.Order order = queryResource(id);
com.emc.storageos.api.service.impl.resource.ArgValidator.checkEntity(order, id, true);
com.emc.... | public javax.ws.rs.core.Response deactivateOrder(@com.emc.sa.api.PathParam(value = "id")
java.net.URI id) throws com.emc.storageos.db.exceptions.DatabaseException {
com.emc.sa.api.Order order = queryResource(id);
com.emc.storageos.api.service.impl.resource.ArgValidator.checkEntity(order, id, true);
orderMan... |
protected void selectDefaultCandidate() {
synchronized(localCandidates) {
java.util.Iterator<org.ice4j.ice.LocalCandidate> localCandsIter = localCandidates.iterator();
while (localCandsIter.hasNext()) {
org.ice4j.ice.LocalCandidate cand = localCandsIter.next();
if ((this.defa... | protected void selectDefaultCandidate() {
synchronized(localCandidates) {
java.util.Iterator<org.ice4j.ice.LocalCandidate> localCandsIter = localCandidates.iterator();
while (localCandsIter.hasNext()) {
org.ice4j.ice.LocalCandidate cand = localCandsIter.next();
if (((defaultC... |
public void onClick(android.view.View v) {
switch (v.getId()) {
case R.id.imageViewGoogleSignIn :
googleSignIn();
break;
case R.id.imageViewFacebookSignIn :
facebookSignIn();
break;
case R.id.imageViewTwitterSignIn :
twitterSignIn()... | public void onClick(android.view.View v) {
switch (v.getId()) {
case R.id.imageViewGoogleSignIn :
googleSignIn();
break;
case R.id.imageViewFacebookSignIn :
facebookSignIn();
return ;
case R.id.imageViewTwitterSignIn :
twitterSignIn... |
public void parse(java.io.InputStream inputStream, java.lang.String encoding) throws java.io.IOException {
java.lang.String markup;
if (encoding != null)
markup = org.apache.wicket.util.io.Streams.readString(inputStream, encoding);
else
markup = org.apache.wicket.util.io.Streams.readString(i... | public void parse(java.io.InputStream inputStream, java.lang.String encoding) throws java.io.IOException {
java.lang.String markup;
if (encoding != null)
markup = org.apache.wicket.util.io.Streams.readString(inputStream, encoding);
else
markup = org.apache.wicket.util.io.Streams.readString(i... |
public void onClick(android.view.View view) {
if (view == (btnProfile)) {
gotoLoginActivity();
}else
if (view == (btnAbout)) {
java.lang.String url = mFirebaseRemoteConfig.getString(Helper.ABOUT_URL_CONFIG_KEY);
com.appspace.evyalert.util.ChromeCustomTabUtil.open(this, ur... | public void onClick(android.view.View view) {
if (view == (btnProfile)) {
gotoLoginActivity();
}else
if (view == (btnAbout)) {
java.lang.String url = mFirebaseRemoteConfig.getString(Helper.ABOUT_URL_CONFIG_KEY);
com.appspace.evyalert.util.ChromeCustomTabUtil.open(this, ur... |
private java.util.Date getFormattingDate(java.lang.String str) {
java.util.Locale locale = new java.util.Locale("en", "UK");
java.text.DateFormatSymbols dateFormatSymbols = new java.text.DateFormatSymbols(locale);
dateFormatSymbols.setWeekdays(new java.lang.String[]{ });
java.lang.String pattern = "E M... | java.util.Date getFormattingDate(java.lang.String str) {
java.util.Locale locale = new java.util.Locale("en", "UK");
java.text.DateFormatSymbols dateFormatSymbols = new java.text.DateFormatSymbols(locale);
dateFormatSymbols.setWeekdays(new java.lang.String[]{ });
java.lang.String pattern = "E MMM dd HH... |
private void createIfMissing(final java.io.File directory, final java.lang.String name) {
if ((!(directory.exists())) && (!(directory.mkdirs()))) {
throw new java.lang.AssertionError((((("Unable to create working directory: '" + directory) + "' it is the '") + name) + "' directory"));
}
} | private void createIfMissing(final java.io.File directory, final java.lang.String name) {
if ((!(directory.exists())) && (!(directory.mkdirs()))) {
if (!(directory.exists())) {
throw new java.lang.AssertionError((((("Unable to create working directory: '" + directory) + "' it is the '") + name) ... |
public long getRemainingTime() {
if (!(action.getParameters().containsKey(org.md2k.study.model_view.privacy_control.PrivacyControlManager.MAX_TIME)))
return java.lang.Integer.MAX_VALUE;
long maxTime = java.lang.Long.parseLong(action.getParameters().get(org.md2k.study.model_view.privacy_control.Priv... | public long getRemainingTime() {
if (((action.getParameters()) == null) || (!(action.getParameters().containsKey(org.md2k.study.model_view.privacy_control.PrivacyControlManager.MAX_TIME))))
return java.lang.Integer.MAX_VALUE;
long maxTime = java.lang.Long.parseLong(action.getParameters().get(org.md... |
public void success(com.google.gson.JsonObject message, retrofit.client.Response response) {
com.homelybuysapp.connection.ServerConnectionMaker.recieveResponse(response);
android.util.Log.e("PackList", response.toString());
calling_class_object_internal.PackListSuccess(packlist);
CartGlobals.CartServerR... | public void success(com.google.gson.JsonObject message, retrofit.client.Response response) {
com.homelybuysapp.connection.ServerConnectionMaker.recieveResponse(response);
calling_class_object_internal.PackListSuccess(packlist);
CartGlobals.CartServerRequestQueue.removeFirst();
if (!(CartGlobals.CartServ... |
private boolean isAcceptableDateChange(java.util.Date startDate, java.util.Date endDate) {
if ((startDate == null) || (endDate == null)) {
return true;
}else
if ((startDate.compareTo(endDate)) < 0) {
return true;
}else {
return false;
}
} | private boolean isAcceptableDateChange(java.util.Date startDate, java.util.Date endDate) {
if ((startDate != null) && (endDate == null)) {
return false;
}else
if ((startDate == null) && (endDate == null)) {
return true;
}else
if ((startDate == null) && (endDate !=... |
public java.util.Locale getLocale() {
final java.lang.String localeLanguage = preferences.getLocaleLanguage();
if ((localeLanguage == null) || (localeLanguage.isEmpty())) {
if (com.googlecode.cchlib.apps.duplicatefiles.prefs.PreferencesControler.LOGGER.isTraceEnabled()) {
com.googlecode.cchl... | public java.util.Locale getLocale() {
final java.lang.String localeLanguage = this.preferences.getLocaleLanguage();
if ((localeLanguage == null) || (localeLanguage.isEmpty())) {
if (com.googlecode.cchlib.apps.duplicatefiles.prefs.PreferencesControler.LOGGER.isTraceEnabled()) {
com.googlecode... |
public double getConfidence() {
this.confidence = 100 - (this.probability);
int cl = -100000;
if ((this.probability) <= 0) {
this.confidence = 100;
}else {
this.confidence = 100 + (cl / (this.probability));
}
return this.confidence;
} | public double getConfidence() {
this.confidence = 100 - (this.probability);
int cl = -100000;
if ((this.probability) <= 0) {
this.confidence = 100;
}else {
this.confidence = 100 + (cl / (this.probability));
if ((this.confidence) <= 0) {
this.confidence = 100;
... |
public static void print(int root, wyautl.core.Automaton automaton) {
java.util.List<wyautl.core.Automaton.State> states = new java.util.ArrayList<wyautl.core.Automaton.State>();
wyautl.core.Automata.extract(automaton, root, states);
wyautl.core.Automaton subaut = new wyautl.core.Automaton(states.toArray(ne... | public static void print(int root, wyautl.core.Automaton automaton) {
java.util.List<wyautl.core.Automaton.State> states = new java.util.ArrayList<wyautl.core.Automaton.State>();
root = wyautl.core.Automata.extract(automaton, root, states);
wyautl.core.Automaton subaut = new wyautl.core.Automaton(states.toA... |
private io.crate.metadata.doc.DocTableInfo innerGetTableInfo(java.lang.String name) {
boolean checkAliasSchema = clusterService.state().metaData().settings().getAsBoolean("crate.table_alias.schema_check", true);
io.crate.metadata.doc.DocTableInfoBuilder builder = new io.crate.metadata.doc.DocTableInfoBuilder(fu... | private io.crate.metadata.doc.DocTableInfo innerGetTableInfo(java.lang.String name) {
boolean checkAliasSchema = clusterService.state().metaData().settings().getAsBoolean("crate.table_alias.schema_check", true);
io.crate.metadata.doc.DocTableInfoBuilder builder = new io.crate.metadata.doc.DocTableInfoBuilder(fu... |
public void onInventoryClose(org.bukkit.event.inventory.InventoryCloseEvent event) {
if (((event.getPlayer().getUniqueId()) == (player.getUniqueId())) && ((event.getView()) == (gui))) {
destroy();
}
} | public void onInventoryClose(org.bukkit.event.inventory.InventoryCloseEvent event) {
if ((event.getPlayer().getUniqueId().equals(player.getUniqueId())) && ((event.getView()) == (gui))) {
destroy();
}
} |
private void updateUiVoltage(android.content.Intent intent) {
double voltage = intent.getDoubleExtra(ConnectionManager.EXTRA_SERIAL_PORT_READ_BATTERY, (-1.0));
android.widget.TextView tv = ((android.widget.TextView) (findViewById(R.id.battery_voltage)));
if (tv != null) {
tv.setText(java.lang.String... | private void updateUiVoltage(android.content.Intent intent) {
double voltage = intent.getDoubleExtra(ConnectionManager.EXTRA_SERIAL_PORT_READ_BATTERY, (-1.0));
android.widget.TextView tv = ((android.widget.TextView) (findViewById(R.id.battery_voltage)));
if (tv != null) {
tv.setText(getString(R.stri... |
public int calculateA() {
int count = 0;
count += (getName().length()) - (getName().replaceAll(" ", "").length());
count = (count + 1) + (getAge());
do {
count = count - 7;
java.lang.System.out.println(count);
} while (count >= 10 );
return 0;
} | public int calculateA() {
int count = 0;
count += (getName().length()) - (getName().replaceAll(" ", "").length());
count = (count + 1) + (getAge());
do {
count = count - 7;
} while (count >= 10 );
return count;
} |
private static java.lang.String fromCodePoint(int codePoint) {
if (codePoint >= (java.lang.Character.MIN_SUPPLEMENTARY_CODE_POINT)) {
char hiSurrogate = java.lang.Character.getHighSurrogate(codePoint);
char loSurrogate = java.lang.Character.getLowSurrogate(codePoint);
return (java.lang.Strin... | static java.lang.String fromCodePoint(int codePoint) {
if (codePoint >= (java.lang.Character.MIN_SUPPLEMENTARY_CODE_POINT)) {
char hiSurrogate = java.lang.Character.getHighSurrogate(codePoint);
char loSurrogate = java.lang.Character.getLowSurrogate(codePoint);
return (java.lang.String.valueO... |
public static java.lang.String getTypeFromUrl(android.content.Context c, java.lang.String url) {
if (url.contains("anime"))
return c.getString(R.string.anime);
else
if (url.contains("manga"))
return c.getString(R.string.manga);
else
if (url.contains("characters"))... | public static java.lang.String getTypeFromUrl(android.content.Context c, java.lang.String url) {
if (url != null) {
if (url.contains("anime"))
return c.getString(R.string.anime);
else
if (url.contains("manga"))
return c.getString(R.string.manga);
e... |
public void insertReview(java.lang.String testo, int idGioco, int idUtente) throws concrete.SQLException {
java.sql.Connection connection = database.DB.openConnection();
java.sql.PreparedStatement ps = con.prepareStatement(concrete.RecensioneDao.INSERT);
ps.setString(1, testo);
ps.setString(2, idGioco);... | public void insertReview(java.lang.String testo, int idGioco, int idUtente) throws concrete.SQLException {
java.sql.Connection connection = database.DB.openConnection();
java.sql.PreparedStatement ps = connection.prepareStatement(concrete.RecensioneDao.INSERT);
ps.setString(1, testo);
ps.setString(2, id... |
private void setFirstDate() {
firstDate = dateFirstDate.getValue();
if ((dateSecondDate.getValue()) != null) {
try {
getAllAbsence(firstDate, secondDate);
} catch (java.sql.SQLException ex) {
java.util.logging.Logger.getLogger(attendance.gui.controller.TeacherViewControll... | private void setFirstDate() {
firstDate = dateFirstDate.getValue();
if (((dateSecondDate.getValue()) != null) && ((firstDate) != null)) {
try {
getAllAbsence(firstDate, secondDate);
} catch (java.sql.SQLException ex) {
java.util.logging.Logger.getLogger(attendance.gui.con... |
public void onUpdateNavigation() {
++(this.totalTicks);
if (!(this.noPath())) {
if (!(this.noPath())) {
net.minecraft.util.Vec3 vec3 = this.currentPath.getPosition(this.theEntity);
if (vec3 != null) {
this.theEntity2.getShipMoveHelper().setMoveTo(vec3.xCoord, vec3... | public void onUpdateNavigation() {
++(this.totalTicks);
if (!(this.noPath())) {
net.minecraft.util.Vec3 vec3 = this.currentPath.getPosition(this.theEntity);
if (vec3 != null) {
this.theEntity2.getShipMoveHelper().setMoveTo(vec3.xCoord, vec3.yCoord, vec3.zCoord, this.speed);
}... |
public boolean hasChildren() {
boolean hasKids = false;
for (mekhq.campaign.personnel.Ancestors a : campaign.getAncestors()) {
if ((getId().equals(a.getMotherID())) || (getId().equals(a.getFatherID()))) {
hasKids = true;
break;
}
}
return hasKids;
} | public boolean hasChildren() {
boolean hasKids = false;
if ((getId()) != null) {
for (mekhq.campaign.personnel.Ancestors a : campaign.getAncestors()) {
if ((getId().equals(a.getMotherID())) || (getId().equals(a.getFatherID()))) {
hasKids = true;
break;
... |
public static void processCommand(net.minecraft.command.ICommandSender p_71515_1_, java.lang.String[] removeIndexUntil) {
if (p_71515_1_ instanceof net.minecraft.entity.player.EntityPlayer) {
}else {
mainserverjt.piratemod.command.ChatColor.sendPrivateMessage(p_71515_1_, ((mainserverjt.piratemod.command... | public static void processCommand(net.minecraft.command.ICommandSender p_71515_1_, java.lang.String[] removeIndexUntil) {
if (p_71515_1_ instanceof net.minecraft.entity.player.EntityPlayer) {
mainserverjt.piratemod.command.ChatColor.sendPrivateMessage(p_71515_1_, ((mainserverjt.piratemod.command.ChatColor.p... |
public java.lang.String buildMessage(java.util.Map<java.lang.String, java.lang.String> parameters) {
com.google.gson.Gson gson = new com.google.gson.Gson();
if (parameters.containsKey(com.fhactory.outputs.lights.LightMessageBuilder.POWER_PARAM)) {
com.fhactory.outputs.lights.LightMessageBuilder.LightMes... | public java.lang.String buildMessage(java.util.Map<java.lang.String, java.lang.String> parameters) {
com.google.gson.Gson gson = new com.google.gson.Gson();
if (parameters.containsKey(com.fhactory.outputs.lights.LightMessageBuilder.POWER_PARAM)) {
com.fhactory.outputs.lights.LightMessageBuilder.LightMes... |
public void setAssignOrder(int driverId, int trackingNumber, java.sql.Timestamp carArriveTime) {
javax.persistence.Query query = entityManager.createNativeQuery("UPDATE taxi_order_item SET driver_id = ? WHERE tracking_number = ?");
query.setParameter(1, driverId);
query.setParameter(1, trackingNumber);
... | public void setAssignOrder(int driverId, int trackingNumber, java.sql.Timestamp carArriveTime) {
javax.persistence.Query query = entityManager.createNativeQuery("UPDATE taxi_order_item SET driver_id = ? WHERE tracking_number = ?");
query.setParameter(1, driverId);
query.setParameter(2, trackingNumber);
... |
public void componentResized(java.awt.event.ComponentEvent e) {
double move = 0.0;
int newWidth = this.getWidth();
int amount = newWidth - (oldComponentWidth);
if (zoomedOutBeyondOneToOne) {
move = -(amount * (zoom));
}else {
move = -(((double) (amount)) / ((double) (zoom)));
}
... | public void componentResized(java.awt.event.ComponentEvent e) {
int newWidth = this.getWidth();
if (newWidth != (oldComponentWidth)) {
double move = 0.0;
int amount = newWidth - (oldComponentWidth);
if (zoomedOutBeyondOneToOne) {
move = -(amount * (zoom));
}else {
... |
public static void main(java.lang.String[] args) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException {
main.ApplicationContext context = new main.ApplicationContext();
main.interfaces.MessageRenderer renderer = ((main.interfaces.MessageRenderer) (context.g... | public static void main(java.lang.String[] args) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException {
main.ApplicationContext context = new main.ApplicationContext();
main.interfaces.MessageRenderer renderer = ((main.interfaces.MessageRenderer) (context.g... |
public void onSessionClosed(com.quickblox.videochat.webrtc.QBRTCSession session) {
android.util.Log.d(com.quickblox.q_municate_core.qb.helpers.QBVideoChatHelper.CALL_INTEGRATION, "onSessionClosed");
if (session.equals(getCurrentSession())) {
android.util.Log.d(com.quickblox.q_municate_core.qb.helpers.QB... | public void onSessionClosed(com.quickblox.videochat.webrtc.QBRTCSession session) {
android.util.Log.d(com.quickblox.q_municate_core.qb.helpers.QBVideoChatHelper.CALL_INTEGRATION, "onSessionClosed");
if (session.equals(getCurrentSession())) {
android.util.Log.d(com.quickblox.q_municate_core.qb.helpers.QB... |
public java.lang.String getPath(java.lang.String url) {
java.lang.String result = "fail";
try {
java.net.URI path = new java.net.URI(url.replace(" ", "%20"));
result = path.getPath();
} catch (java.net.URISyntaxException ex) {
java.util.logging.Logger.getLogger(domein.DownloadThread.... | public java.lang.String getPath(java.lang.String url) {
java.lang.String result = "fail";
try {
java.net.URI path = new java.net.URI(url.replace(" ", "%20"));
result = path.toString();
} catch (java.net.URISyntaxException ex) {
java.util.logging.Logger.getLogger(domein.DownloadThread... |
private boolean confirmed(org.gradoop.common.model.impl.pojo.Vertex salesQuotation) {
java.util.List<java.lang.Float> influencingMasterQuality = com.google.common.collect.Lists.newArrayList();
influencingMasterQuality.add(getEdgeTargetQuality("sentBy", salesQuotation.getId(), Constants.EMPLOYEE_MAP));
influ... | private boolean confirmed(org.gradoop.common.model.impl.pojo.Vertex salesQuotation) {
java.util.List<java.lang.Float> influencingMasterQuality = com.google.common.collect.Lists.newArrayList();
influencingMasterQuality.add(getEdgeTargetQuality("sentBy", salesQuotation.getId(), Constants.EMPLOYEE_MAP));
influ... |
public void handleRedirectAttributesWithoutRedirect() throws java.lang.Exception {
org.springframework.web.servlet.mvc.support.RedirectAttributesModelMap redirectAttributes = new org.springframework.web.servlet.mvc.support.RedirectAttributesModelMap();
mavContainer.setRedirectModel(redirectAttributes);
org.... | public void handleRedirectAttributesWithoutRedirect() throws java.lang.Exception {
org.springframework.web.servlet.mvc.support.RedirectAttributesModelMap redirectAttributes = new org.springframework.web.servlet.mvc.support.RedirectAttributesModelMap();
mavContainer.setRedirectModel(redirectAttributes);
org.... |
public GameBoard chooseGame() {
java.lang.Object[] games = new java.lang.Object[]{ "Tic Tac Toe" , "Checkers" , "Othello" };
int choice = javax.swing.JOptionPane.showOptionDialog(null, "Choose a game:", "Game Selection", javax.swing.JOptionPane.DEFAULT_OPTION, javax.swing.JOptionPane.WARNING_MESSAGE, null, game... | public GameBoard chooseGame() {
java.lang.Object[] games = new java.lang.Object[]{ "Tic Tac Toe" , "Checkers" , "Othello" };
int choice = javax.swing.JOptionPane.showOptionDialog(null, "Choose a game:", "Game Selection", javax.swing.JOptionPane.DEFAULT_OPTION, javax.swing.JOptionPane.WARNING_MESSAGE, null, game... |
private double scoreFunctionCEMC() {
double score = 0.0;
for (int col = 0; col < (subunitLen); col++) {
double d1 = colDistances[col];
double colScore = (((org.biojava.nbio.structure.align.symm.refine.SymmGapOptimizer.M) * 2) / (1 + ((d1 * d1) / ((d0) * (d0))))) - (org.biojava.nbio.structure.ali... | private double scoreFunctionCEMC() {
double score = 0.0;
for (int col = 0; col < (subunitLen); col++) {
double d1 = colDistances[col];
double colScore = (org.biojava.nbio.structure.align.symm.refine.SymmGapOptimizer.M) / (1 + ((d1 * d1) / ((d0) * (d0))));
score += colScore;
}
ret... |
public void setCurrentMaze(algorithms.mazeGenerators.Maze3d m) {
currentMaze = m;
mazeData = currentMaze.getCrossSectionByY(currentMaze.getEnter().getDim());
setCharacterPosition(currentMaze.getEnter().getDim(), currentMaze.getEnter().getWid(), currentMaze.getEnter().getLen());
redraw();
} | public void setCurrentMaze(algorithms.mazeGenerators.Maze3d m) {
currentMaze = m;
mazeData = currentMaze.getCrossSectionByY(currentMaze.getEnter().getDim());
setCharacterPosition(currentMaze.getEnter().getDim(), currentMaze.getEnter().getWid(), currentMaze.getEnter().getLen());
} |
public javax.ws.rs.core.Response setApplicationDescriptionTOSCA(@javax.ws.rs.PathParam(value = "id")
java.lang.String cloudServiceId, java.lang.String celar) {
try {
AnalysisLogger.logger.info(("The received description " + celar));
celar = celar.replaceAll("&", "&");
controlCoordination... | public javax.ws.rs.core.Response setApplicationDescriptionTOSCA(@javax.ws.rs.PathParam(value = "id")
java.lang.String cloudServiceId, java.lang.String celar) {
try {
AnalysisLogger.logger.info(("The received description " + celar));
controlCoordination.setApplicationDescriptionInfoTOSCA(celar, cloud... |
public void onActivityCreated(com.tns.Activity param_0, com.tns.Bundle param_1) {
if (ErrorReport.HasApplicationCreateError) {
return ;
}
java.lang.Object[] params = new java.lang.Object[2];
params[0] = param_0;
params[1] = param_1;
com.tns.com.tns.Platform.callJSMethod(this, "onActivity... | public void onActivityCreated(com.tns.Activity param_0, com.tns.Bundle param_1) {
java.lang.Object[] params = new java.lang.Object[2];
params[0] = param_0;
params[1] = param_1;
com.tns.com.tns.Platform.callJSMethod(this, "onActivityCreated", void.class, params);
} |
public void testCreateFileWithIncorrectContentType() throws java.io.IOException {
assumeNotWindows();
assumeNotOsx();
org.innovateuk.ifs.file.resource.FileEntryResource fileResource = org.innovateuk.ifs.file.builder.FileEntryResourceBuilder.newFileEntryResource().with(org.innovateuk.ifs.base.amend.BaseBuild... | public void testCreateFileWithIncorrectContentType() throws java.io.IOException {
org.innovateuk.ifs.file.resource.FileEntryResource fileResource = org.innovateuk.ifs.file.builder.FileEntryResourceBuilder.newFileEntryResource().with(org.innovateuk.ifs.base.amend.BaseBuilderAmendFunctions.id(null)).withFilesizeBytes... |
public void init() throws java.io.IOException, java.lang.InterruptedException {
org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl config = new org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl(tempDir, password);
config.setZooKeeperStartupTime(100000);
cluster = new org.apache.accumulo.m... | public void init() throws java.io.IOException, java.lang.InterruptedException {
org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl config = new org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl(tempDir, password);
config.setZooKeeperStartupTime(100000);
cluster = new org.apache.accumulo.m... |
public void execute(org.sonar.server.computation.ComputationContext context) {
org.sonar.core.persistence.DbSession session = dbClient.openSession(true);
try {
org.sonar.core.measure.db.MetricDto duplicationMetric = dbClient.metricDao().selectByKey(session, CoreMetrics.DUPLICATIONS_DATA_KEY);
or... | public void execute(org.sonar.server.computation.ComputationContext context) {
org.sonar.core.persistence.DbSession session = dbClient.openSession(true);
try {
org.sonar.core.measure.db.MetricDto duplicationMetric = dbClient.metricDao().selectByKey(session, CoreMetrics.DUPLICATIONS_DATA_KEY);
or... |
public void insertNotResource(final java.util.List<java.lang.String> listId, final java.lang.String userId, final java.lang.String QueryProperties) {
java.lang.String INSERT_USERID_X = null;
boolean statusUserX = true;
for (int i = 0; i < (listId.size()); i++) {
INSERT_USERID_X = QueryProperties;
... | public void insertNotResource(final java.util.List<java.lang.String> listId, final java.lang.String userId, final java.lang.String QueryProperties) {
java.lang.String INSERT_USERID_X = null;
for (int i = 0; i < (listId.size()); i++) {
INSERT_USERID_X = QueryProperties;
dao.insertObjectNotResourc... |
public static org.bukkit.inventory.meta.ItemMeta hideItemAttributes(org.bukkit.inventory.meta.ItemMeta meta) {
if (!(fr.zcraft.zlib.tools.items.ItemUtils.addItemFlagLoaded))
fr.zcraft.zlib.tools.items.ItemUtils.init();
if ((fr.zcraft.zlib.tools.items.ItemUtils.addItemFlagsMethod) == null) {
... | public static org.bukkit.inventory.meta.ItemMeta hideItemAttributes(org.bukkit.inventory.meta.ItemMeta meta) {
if (!(fr.zcraft.zlib.tools.items.ItemUtils.addItemFlagLoaded))
fr.zcraft.zlib.tools.items.ItemUtils.init();
if ((fr.zcraft.zlib.tools.items.ItemUtils.addItemFlagsMethod) == null) {
... |
private static void mergeInfo(com.mycar.service.impl.Order l, com.mycar.service.impl.Order r) {
if ((r.getPay_info()) != null)
l.setPay_info(com.mycar.logic.VehicleCostLogic.mergeInfo(l.getPay_info(), r.getPay_info()));
if ((r.getCost_info()) != null)
l.setCost_info(com.mycar.logic.VehicleC... | private static void mergeInfo(com.mycar.service.impl.Order l, com.mycar.service.impl.Order r) {
if (r == null)
return ;
if ((r.getPay_info()) != null)
l.setPay_info(com.mycar.logic.VehicleCostLogic.mergeInfo(l.getPay_info(), r.getPay_info()));
if ((r.getCost_info()) != null)
... |
public com.bcbssc.post.dao.EventType getEventType(long EventTypeID) {
java.lang.String sql = "SELECT * FROM eventtype LEFT JOIN communicationtemplate on EVENTTYPE_CTID = COMMUNICATIONTEMPLATE_ID WHERE EVENTTYPE_ID = ?";
if (com.bcbssc.post.dao.MySQLPostDAO.log.isDebugEnabled())
com.bcbssc.post.dao.MySQL... | public com.bcbssc.post.dao.EventType getEventType(long EventTypeID) {
java.lang.String sql = "SELECT * FROM eventtype LEFT JOIN communicationtemplate on EVENTTYPE_CTID = COMMUNICATIONTEMPLATE_ID WHERE EVENTTYPE_ID = ?";
if (com.bcbssc.post.dao.MySQLPostDAO.log.isDebugEnabled())
com.bcbssc.post.dao.MySQL... |
public void surfaceDestroyed(android.view.SurfaceHolder holder) {
boolean retry = true;
int counter = 0;
while (retry && (counter < 1000)) {
counter++;
try {
thread.setRunning(false);
thread.join();
retry = false;
} catch (java.lang.InterruptedExce... | public void surfaceDestroyed(android.view.SurfaceHolder holder) {
boolean retry = true;
int counter = 0;
while (retry && (counter < 1000)) {
counter++;
try {
thread.setRunning(false);
thread.join();
retry = false;
thread = null;
} catch... |
public void run() {
curList.addAll(com.breadwallet.tools.sqlite.CurrencyDataSource.getInstance(getContext()).getAllISOs());
final android.widget.ArrayAdapter<java.lang.String> adapter = new android.widget.ArrayAdapter(getContext(), R.layout.bread_spinner_item, curList);
getActivity().runOnUiThread(new java.... | public void run() {
if ((getActivity()) == null)
return ;
curList.addAll(com.breadwallet.tools.sqlite.CurrencyDataSource.getInstance(getActivity()).getAllISOs());
if ((getActivity()) == null)
return ;
final android.widget.ArrayAdapter<java.lang.String> adapter = new android.wid... |
public void update(java.util.Observable o, java.lang.Object arg) {
if (o == (_spiel)) {
if (arg instanceof ConsoleUI.Mensch) {
zieheMitMensch();
}else
if (arg instanceof ConsoleUI.KI) {
zieheMitKI();
}else {
zeigeZwischenstand();
... | public void update(java.util.Observable o, java.lang.Object arg) {
if (o == (_spiel)) {
if (arg instanceof ConsoleUI.Mensch) {
zieheMitMensch();
}else
if (arg instanceof ConsoleUI.KI) {
zieheMitKI();
}else {
zeigeZwischenstand();
... |
public void testFindByTypeIsCaseInSensitive() throws java.lang.Exception {
populateData();
int expectedSize = 0;
int actualSize = 0;
java.util.List<net.smartcosmos.dto.things.ThingResponse> response = persistenceService.findByType(tenantUrn, net.smartcosmos.dao.things.impl.ThingPersistenceServiceTest.TY... | public void testFindByTypeIsCaseInSensitive() throws java.lang.Exception {
populateData();
int expectedSize = 0;
int actualSize = 0;
java.util.List<net.smartcosmos.dto.things.ThingResponse> response = persistenceService.findByType(tenantUrn, net.smartcosmos.dao.things.impl.ThingPersistenceServiceTest.TY... |
public void onPlayerChat(org.bukkit.event.player.AsyncPlayerChatEvent event) {
if (event.isCancelled())
return ;
event.setCancelled(true);
buttondevteam.lib.chat.TBMCChatAPI.SendChatMessage(buttondevteam.lib.TBMCPlayer.getPlayer(event.getPlayer()).asPluginPlayer(buttondevteam.chat.ChatPlayer.cl... | public void onPlayerChat(org.bukkit.event.player.AsyncPlayerChatEvent event) {
if (event.isCancelled())
return ;
buttondevteam.lib.chat.TBMCChatAPI.SendChatMessage(buttondevteam.lib.TBMCPlayer.getPlayer(event.getPlayer()).asPluginPlayer(buttondevteam.chat.ChatPlayer.class).CurrentChannel, event.get... |
public void accept(prada.lab.android.pingo.model.PingoPlace place) throws java.lang.Exception {
binding.setVm(new prada.lab.android.pingo.viewmodel.PlaceViewModel(place));
othersAdapter.setTags(place.getTags(PingoPlace.TAG_NON_OTHERS));
java.util.List<prada.lab.android.pingo.model.Tag> categories = new java... | public void accept(prada.lab.android.pingo.model.PingoPlace place) throws java.lang.Exception {
binding.setVm(new prada.lab.android.pingo.viewmodel.PlaceViewModel(place));
othersAdapter.setTags(place.getTags());
java.util.List<prada.lab.android.pingo.model.Tag> categories = new java.util.ArrayList<>();
... |
public void run() {
if (sDrive.init()) {
if (check()) {
try {
javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getCrossPlatformLookAndFeelClassName());
} catch (java.lang.Exception e) {
LOG.error("Exception on initialization", e);
... | public void run() {
if (sDrive.init()) {
if (check()) {
try {
javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getCrossPlatformLookAndFeelClassName());
} catch (java.lang.Exception e) {
LOG.error("Exception on initialization", e);
... |
public static void recordCastOrError(@org.jetbrains.annotations.NotNull
org.jetbrains.kotlin.psi.JetExpression expression, @org.jetbrains.annotations.NotNull
org.jetbrains.kotlin.types.JetType type, @org.jetbrains.annotations.NotNull
org.jetbrains.kotlin.resolve.BindingTrace trace, boolean canBeCast, boolean recordExpr... | public static boolean recordCastOrError(@org.jetbrains.annotations.NotNull
org.jetbrains.kotlin.psi.JetExpression expression, @org.jetbrains.annotations.NotNull
org.jetbrains.kotlin.types.JetType type, @org.jetbrains.annotations.NotNull
org.jetbrains.kotlin.resolve.BindingTrace trace, boolean canBeCast, boolean recordE... |
public synchronized pt.ulisboa.tecnico.hourglass.common.communication.messages.ComputationalMessage<I, M> addMessage(M message, I targetID) {
if (!(messages.containsKey(targetID))) {
messages.put(targetID, new java.util.ArrayList<M>(bufferSize));
}
messages.get(targetID).add(message);
if ((++(th... | public synchronized pt.ulisboa.tecnico.hourglass.common.communication.messages.ComputationalMessage<I, M> addMessage(M message, I targetID) {
if (!(messages.containsKey(targetID))) {
messages.put(targetID, new java.util.ArrayList<M>());
}
messages.get(targetID).add(message);
if ((++(this.index))... |
private void registHxListener() {
com.lib.base.log.KLog.i("MainService--->registHxListener()");
mHxConnectListener = new com.lwk.familycontact.im.listener.HxConnectListener();
com.lwk.familycontact.im.helper.HxSdkHelper.getInstance().addConnectListener(mHxConnectListener);
mHxContactListener = new com.l... | public void registHxListener() {
com.lib.base.log.KLog.i("MainService--->registHxListener()");
mHxConnectListener = new com.lwk.familycontact.im.listener.HxConnectListener();
com.lwk.familycontact.im.helper.HxSdkHelper.getInstance().addConnectListener(mHxConnectListener);
mHxContactListener = new com.lw... |
public void start() throws java.lang.Exception {
org.apache.activemq.broker.BrokerService broker = new org.apache.activemq.broker.BrokerService();
broker.setBrokerName(brokerName);
broker.addConnector(brokerUrl);
org.apache.activemq.usage.SystemUsage systemUsage = broker.getSystemUsage();
systemUsag... | public void start() throws java.lang.Exception {
org.apache.activemq.broker.BrokerService broker = new org.apache.activemq.broker.BrokerService();
broker.setBrokerName(brokerName);
broker.addConnector(brokerUrl);
org.apache.activemq.usage.SystemUsage systemUsage = broker.getSystemUsage();
systemUsag... |
public void clear() {
this.field = new de.hs_bochum.ss.model.FieldValue[9][9];
for (int j = 0; j < (field.length); j++) {
for (int i = 0; i < (field[j].length); i++) {
field[j][i] = new de.hs_bochum.ss.model.FieldValue();
}
}
} | public void init() {
this.field = new de.hs_bochum.ss.model.FieldValue[9][9];
for (int j = 0; j < (field.length); j++) {
for (int i = 0; i < (field[j].length); i++) {
field[j][i] = new de.hs_bochum.ss.model.FieldValue();
}
}
} |
public static org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef createNodeRef(final java.lang.String nodeId) {
org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey key = new org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey(new org.ope... | public static org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef createNodeRef(final java.lang.String nodeId) {
org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey key = new org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey(new org.ope... |
public boolean addAgree(cn.edu.nju.software.entity.Agree agree) {
if ((worksDao.getWorksById(agree.getWorksId())) == null) {
return false;
}
boolean res1 = agreeDao.saveAgree(agree);
boolean res2 = appUserDao.newLike(agree.getUserId());
return res1 && res2;
} | public boolean addAgree(cn.edu.nju.software.entity.Agree agree) {
if ((worksDao.getWorksById(agree.getWorksId())) == null) {
return false;
}
boolean res1 = agreeDao.saveAgree(agree);
boolean res2 = false;
if (res1) {
res2 = appUserDao.newLike(agree.getUserId());
}
return res1... |
private void clearEnvironment() {
initRuntimeInstallsByTypeMap();
initDefaultRuntimeInstallsMap();
fOriginalRuntimesTimeStamp.clear();
fLastRuntimesTimeStamp.clear();
fJSTypeCombo.select(0);
currentRuntimeTypeId = getRuntimeTypeId(0);
fJSRuntimesBlock.setRuntimeType(org.eclipse.wst.jsdt.core... | private void clearEnvironment() {
initRuntimeInstallsByTypeMap();
initDefaultRuntimeInstallsMap();
fOriginalRuntimesTimeStamp.clear();
fLastRuntimesTimeStamp.clear();
currentRuntimeTypeId = getRuntimeTypeId(0);
if ((currentRuntimeTypeId) != null) {
fJSTypeCombo.select(0);
fJSRunt... |
private void addSequence(int seqId, char base) {
if (this.seqChars.isEmpty())
this.base = base;
if (base != (this.base))
this.base = 0;
for (java.lang.Integer sqId : seqChars.keySet())
if (sqId == seqId)
return ;
this.seqChars.put(seqId, base);... | private void addSequence(int seqId, char base) {
if (this.seqChars.isEmpty())
this.base = base;
for (java.lang.Integer sqId : seqChars.keySet())
if (sqId == seqId)
return ;
this.seqChars.put(seqId, base);
} |
protected com.floatingmuseum.mocloud.data.entity.Colors buildColors(android.support.v7.graphics.Palette.Swatch swatch) {
com.floatingmuseum.mocloud.data.entity.Colors colors = new com.floatingmuseum.mocloud.data.entity.Colors();
colors.setRgb(swatch.getRgb());
colors.setHsl(swatch.getHsl());
colors.setP... | protected com.floatingmuseum.mocloud.data.entity.Colors buildColors(android.support.v7.graphics.Palette.Swatch swatch) {
com.floatingmuseum.mocloud.data.entity.Colors colors = new com.floatingmuseum.mocloud.data.entity.Colors();
colors.setRgb(swatch.getRgb());
colors.setHsl(swatch.getHsl());
colors.setP... |
public void setInitialTarget(com.esbjon.entities.Entity target, com.esbjon.mapobjects.Tile toTile) {
if (target != null)
this.playerAssignTarget(targetEntity, false);
else
if (toTile != null)
this.playerAssignGoTo(toTile, bufferVect.set(toTile.getmX(), toTile.getYAtCenter(), toTile.g... | public void setInitialTarget(com.esbjon.entities.Entity target, com.esbjon.mapobjects.Tile toTile) {
if (target != null)
this.playerAssignTarget(target, false);
else
if (toTile != null)
this.playerAssignGoTo(toTile, bufferVect.set(toTile.getmX(), toTile.getYAtCenter(), toTile.getmZ()... |
protected void onPostExecute(android.graphics.Bitmap bitmap) {
android.widget.ImageView imageView = mImageViewRef.get();
if ((imageView != null) && (bitmap != null)) {
android.graphics.drawable.Drawable currentDrawable = imageView.getDrawable();
if (currentDrawable instanceof com.iolab.sightloca... | protected void onPostExecute(android.graphics.Bitmap bitmap) {
android.widget.ImageView imageView = mImageViewRef.get();
if ((imageView != null) && (bitmap != null)) {
android.graphics.drawable.Drawable currentDrawable = imageView.getDrawable();
if ((currentDrawable != null) && (currentDrawable ... |
public void run() {
android.util.Log.i(DEBUG_TAG, "Run method");
while (_running) {
try {
for (int i = 0; i < (_outPin.length); i++) {
scanColums();
}
} catch (java.lang.InterruptedException e) {
e.printStackTrace();
} catch (ioio.lib.a... | public void run() {
android.util.Log.i(DEBUG_TAG, "Run method");
while (_running) {
try {
for (int i = 0; i < (_outPin.length); i++) {
scanColums();
}
} catch (java.lang.InterruptedException e) {
e.printStackTrace();
} catch (ioio.lib.a... |
private void propulateRourke(org.oscarehr.util.LoggedInInfo loggedInInfo, ca.bornontario.x18MEWBV.RBR rourke, java.lang.Integer fdid) {
ca.bornontario.x18MEWBV.RBRM18 rbrm18 = rourke.addNewRBRM18();
propulateRourkeFromRourke18m(rbrm18, fdid);
propulateRourkeFromNDDS(rbrm18);
propulateRourkeFromImmunizat... | private void propulateRourke(org.oscarehr.util.LoggedInInfo loggedInInfo, ca.bornontario.x18MEWBV.RBR rourke, java.lang.Integer fdid) {
ca.bornontario.x18MEWBV.RBRM18 rbrm18 = rourke.addNewRBRM18();
propulateRourkeFromRourke18m(rbrm18, fdid);
propulateRourkeFromNDDS(rbrm18);
propulateRourkeFromImmunizat... |
public void closeDatabaseConnection() {
java.lang.System.out.println("closing connection...");
if ((this.c) != null) {
try {
this.stmt.close();
this.c.close();
} catch (java.sql.SQLException e) {
e.printStackTrace();
}
}
} | public void closeDatabaseConnection() {
if ((this.c) != null) {
try {
this.stmt.close();
this.c.close();
} catch (java.sql.SQLException e) {
e.printStackTrace();
}
}
} |
public java.util.List<com.twobig.sivale.hd.to.Invoice> getInvoicesNoTransactionBetweenDates(java.util.Date startDate, java.util.Date endDate, java.lang.String cardNumber) {
final com.twobig.sivale.hadoop.interfaces.InvoiceDAO invoiceDAO = new com.twobig.sivale.hadoop.implementations.HbaseInvoiceImpl();
final ja... | public java.util.List<com.twobig.sivale.hd.to.Invoice> getInvoicesNoTransactionBetweenDates(java.util.Date startDate, java.util.Date endDate, java.lang.String cardNumber) {
final com.twobig.sivale.hadoop.interfaces.InvoiceDAO invoiceDAO = new com.twobig.sivale.hadoop.implementations.HbaseInvoiceImpl();
final ja... |
public static void flushStorage(redis.clients.jedis.JedisPool pool, java.lang.String prefix) {
org.zakariya.mrdoodleserver.SyncServer.logger.info("Deleting all storage under the {}* namespace", prefix);
try (redis.clients.jedis.Jedis jedis = pool.getResource()) {
java.util.Set<java.lang.String> keys = j... | private static void flushStorage(redis.clients.jedis.JedisPool pool, java.lang.String prefix) {
org.zakariya.mrdoodleserver.SyncServer.logger.info("Deleting all storage under the {}* namespace", prefix);
try (redis.clients.jedis.Jedis jedis = pool.getResource()) {
java.util.Set<java.lang.String> keys = ... |
public void openSearch() {
if (isSearchViewOpen) {
return ;
}
searchEditText.setText("");
searchEditText.requestFocus();
if ((Build.VERSION.SDK_INT) >= (Build.VERSION_CODES.LOLLIPOP)) {
rootView.setVisibility(View.VISIBLE);
com.dat.floatingsearchviewdemo.AnimationUtils.circle... | public void openSearch() {
if (isSearchViewOpen) {
return ;
}
searchEditText.setText("");
searchEditText.requestFocus();
if ((Build.VERSION.SDK_INT) >= (Build.VERSION_CODES.LOLLIPOP)) {
rootView.setVisibility(View.VISIBLE);
com.dat.floatingsearchviewdemo.AnimationUtils.circle... |
public void close() {
if ((resultSet) != null)
try {
resultSet.close();
if ((statement) != null)
statement.close();
connection.close();
} catch (java.sql.SQLException e) {
throw new com.jaspersoft.tamanoir.ConnectionExcepti... | public void close() {
if ((resultSet) != null)
try {
resultSet.close();
} catch (java.sql.SQLException e) {
throw new com.jaspersoft.tamanoir.ConnectionException(e);
}
if ((statement) != null)
try {
statement.close();
} catch (java... |
public edu.bu.vip.kinect.controller.calibration.Protos.Calibration createCalibration(edu.bu.vip.kinect.controller.calibration.Protos.Calibration calibration) {
java.util.Random rand = new java.util.Random();
long newId = rand.nextInt();
while (calibrationExists(newId)) {
newId = rand.nextInt();
... | public edu.bu.vip.kinect.controller.calibration.Protos.Calibration createCalibration(edu.bu.vip.kinect.controller.calibration.Protos.Calibration calibration) {
java.util.Random rand = new java.util.Random();
long newId = java.lang.Math.abs(rand.nextInt());
while (calibrationExists(newId)) {
newId = ... |
private void setDelegation(final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.PlspId plspId, final org.opendaylight.protocol.pcep.pcc.mock.api.PccSession session) {
final org.opendaylight.protocol.pcep.pcc.mock.PccTunnelManagerImpl.Tunnel tunnel = tunnels.get(plspId)... | private void setDelegation(final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.PlspId plspId, final org.opendaylight.protocol.pcep.pcc.mock.api.PccSession session) {
final org.opendaylight.protocol.pcep.pcc.mock.PccTunnelManagerImpl.Tunnel tunnel = this.tunnels.get(pl... |
public void call(rx.Subscriber<? super java.util.List<com.aphoh.courser.utils.Assignment>> subscriber) {
java.util.List<com.aphoh.courser.utils.Assignment> assignments = new java.util.ArrayList<>();
for (com.aphoh.courser.utils.Assignment assignment : assignments) {
if ((assignment.getCourse().getId()) ... | public void call(rx.Subscriber<? super java.util.List<com.aphoh.courser.utils.Assignment>> subscriber) {
java.util.List<com.aphoh.courser.utils.Assignment> result = new java.util.ArrayList<>();
for (com.aphoh.courser.utils.Assignment assignment : assignments) {
if ((assignment.getCourse().getId()) == co... |
public static java.util.Date getDateWithTime(java.util.Date date, java.lang.String time) {
java.util.Date result;
try {
result = org.opencms.gwt.client.ui.input.datebox.CmsDateConverter.Z_TIME_FORMAT.parse(time);
result.setDate(date.getDate());
result.setMonth(date.getMonth());
r... | public static java.util.Date getDateWithTime(java.util.Date date, java.lang.String time) {
java.util.Date result;
try {
result = org.opencms.gwt.client.ui.input.datebox.CmsDateConverter.Z_TIME_FORMAT.parse(time);
result.setYear(date.getYear());
result.setMonth(date.getMonth());
r... |
public void test_146_ACLTestReadsOne(edu.umass.cs.gnsclient.client.util.GuidEntry barneyEntry, edu.umass.cs.gnsclient.client.util.GuidEntry samEntry) {
try {
try {
org.junit.Assert.assertEquals("413-555-1234", edu.umass.cs.gnsclient.client.integrationtests.ServerIntegrationTest.client.fieldRead(... | public void test_146_ACLTestReadsOne(edu.umass.cs.gnsclient.client.util.GuidEntry barneyEntry, edu.umass.cs.gnsclient.client.util.GuidEntry samEntry) {
try {
try {
org.junit.Assert.assertEquals("413-555-1234", edu.umass.cs.gnsclient.client.integrationtests.ServerIntegrationTest.client.fieldRead(... |
public void start() throws org.eclipse.scout.rt.platform.PlatformException {
try {
return javax.security.auth.Subject.doAs(m_subject, new java.security.PrivilegedExceptionAction<java.lang.Object>() {
@java.lang.Override
public java.lang.Object run() throws java.lang.Exception {
... | public void start() throws org.eclipse.scout.rt.platform.PlatformException {
try {
javax.security.auth.Subject.doAs(m_subject, new java.security.PrivilegedExceptionAction<java.lang.Object>() {
@java.lang.Override
public java.lang.Object run() throws java.lang.Exception {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.