buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private void updateFirebaseData(android.location.Location location) {
double lat = location.getLatitude();
double lon = location.getLongitude();
java.lang.String userId = firebaseAuth.getCurrentUser().getUid();
firebaseDatabaseHelper.updateOnlineUserLocation(lat, lon, userId);
android.util.Log.d(com... | private void updateFirebaseData(android.location.Location location) {
double lat = location.getLatitude();
double lon = location.getLongitude();
firebaseDatabaseHelper.updateOnlineUserLocation(lat, lon);
android.util.Log.d(com.example.alex.motoproject.services.LocationListenerService.LOG_TAG, ((((("Lat ... |
public com.traintrax.navigation.trackswitch.SwitchState getTrackSwitchState(java.lang.String id) {
java.lang.String requestUrl = com.traintrax.navigation.service.rest.client.RemoteTrackSwitchService.createTrackSwitchStateRequestUrl(hostName, port, java.lang.Integer.parseInt(id));
java.lang.String response = web... | public com.traintrax.navigation.trackswitch.SwitchState getTrackSwitchState(java.lang.String id) {
java.lang.String requestUrl = com.traintrax.navigation.service.rest.client.RemoteTrackSwitchService.createTrackSwitchStateRequestUrl(hostName, port, id);
java.lang.String response = webServiceClient.sendRequest(re... |
public void markDirty() {
if ((itemStack) != null)
((blusunrize.immersiveengineering.common.items.ItemInternalStorage) (this.itemStack.getItem())).setContainedItems(itemStack, stackList);
if ((this.itemStack.getItem()) instanceof blusunrize.immersiveengineering.common.items.ItemUpgradeableTool)
... | public void markDirty() {
if ((itemStack) != null) {
((blusunrize.immersiveengineering.common.items.ItemInternalStorage) (this.itemStack.getItem())).setContainedItems(itemStack, stackList);
if ((this.itemStack.getItem()) instanceof blusunrize.immersiveengineering.common.items.ItemUpgradeableTool)
... |
public void test_newerThan_gt_newest() throws java.io.IOException {
jenkins.widgets.HistoryPageFilter<hudson.model.ModelObject> historyPageFilter = newPage(5, 11L, null);
java.util.List<hudson.model.ModelObject> itemList = new java.util.ArrayList<hudson.model.ModelObject>();
itemList.addAll(newRuns(1, 10));... | public void test_newerThan_gt_newest() throws java.io.IOException {
jenkins.widgets.HistoryPageFilter<hudson.model.ModelObject> historyPageFilter = newPage(5, 11L, null);
java.util.List<hudson.model.ModelObject> itemList = newRuns(1, 10);
historyPageFilter.add(itemList);
org.junit.Assert.assertEquals(fa... |
private void sendCommand(java.lang.String button_text, java.lang.String length, java.lang.String up_down) {
java.lang.String to_send = (((button_text + " ") + length) + " ") + up_down;
java.lang.System.out.println(to_send);
output.println(to_send);
try {
turtle_coords.setText(input.readLine());
... | private void sendCommand(java.lang.String button_text, java.lang.String length, java.lang.String up_down) {
if ((length.length()) > 0) {
java.lang.String to_send = (((button_text + " ") + length) + " ") + up_down;
java.lang.System.out.println(to_send);
output.println(to_send);
try {
... |
public Chunk getChunk(Point p) {
if (((((p.x) < 0) || ((p.y) < 0)) || ((p.x) >= (size.width))) || ((p.x) >= (size.height))) {
return null;
}
return chunks[((p.y) / (Level.chunkSize.height))][((p.x) / (Level.chunkSize.width))];
} | public Chunk getChunk(Point p) {
if (((((p.x) < 0) || ((p.y) < 0)) || ((p.x) >= (size.width))) || ((p.y) >= (size.height))) {
return null;
}
return chunks[((p.y) / (Level.chunkSize.height))][((p.x) / (Level.chunkSize.width))];
} |
public java.util.List<java.lang.String> getStringList(java.lang.String path) {
java.util.List<java.lang.String> newStringList = new java.util.LinkedList<java.lang.String>();
if (isString(path))
return java.util.Arrays.asList(getString(path));
java.util.List<java.lang.String> stringList = super.... | public java.util.List<java.lang.String> getStringList(java.lang.String path) {
java.util.List<java.lang.String> newStringList = new java.util.LinkedList<java.lang.String>();
if (isString(path))
return new java.util.ArrayList<java.lang.String>(java.util.Arrays.asList(getString(path)));
java.util... |
protected void postRunnable(java.lang.Runnable runnable) {
if (runnable != null) {
if ((getUseSynchronousMode()) || ((handler) == null)) {
runnable.run();
}else {
com.loopj.android.http.Utils.asserts(((handler) != null), "handler should not be null!");
handler.pos... | protected void postRunnable(java.lang.Runnable runnable) {
if (runnable != null) {
if ((getUseSynchronousMode()) || ((handler) == null)) {
runnable.run();
}else {
handler.post(runnable);
}
}
} |
protected java.lang.Void doInBackground(java.lang.Void... params) {
org.thoughtcrime.securesms.crypto.MasterSecret masterSecret = org.thoughtcrime.securesms.service.KeyCachingService.getMasterSecret(context);
int reminderCount = intent.getIntExtra("reminder_count", 0);
org.thoughtcrime.securesms.notificatio... | protected java.lang.Void doInBackground(java.lang.Void... params) {
org.thoughtcrime.securesms.crypto.MasterSecret masterSecret = org.thoughtcrime.securesms.service.KeyCachingService.getMasterSecret(context);
int reminderCount = intent.getIntExtra("reminder_count", 0);
org.thoughtcrime.securesms.notificatio... |
public void setState(java.lang.Integer state) {
this.state = state;
this.color = "black";
if (this.state.equals(1))
this.color = "green";
if (this.state.equals(2))
this.color = "red";
} | public void setState(java.lang.Integer state) {
this.state = state;
this.color = "black";
if (this.state.equals(1))
this.color = "green";
if (this.state.equals(0))
this.color = "red";
} |
public synchronized void write(byte[] record) throws java.lang.InterruptedException, org.apache.hive.hcatalog.streaming.SerializationError, org.apache.nifi.processors.hive.WriteFailure {
try {
if ((generateWriteFailure) && (((generateWriteFailureRecordIndex) == null) || ((totalRecords) == (generateWriteFail... | public synchronized void write(byte[] record) throws java.lang.InterruptedException, org.apache.hive.hcatalog.streaming.SerializationError, org.apache.nifi.processors.hive.WriteFailure {
try {
if ((generateWriteFailure) && (((generateWriteFailureRecordIndex) == null) || ((writeAttemptCount) == (generateWrit... |
public static io.druid.query.IntervalChunkingQueryRunnerDecorator NoopIntervalChunkingQueryRunnerDecorator() {
return new io.druid.query.IntervalChunkingQueryRunnerDecorator(null, null, null, null) {
@java.lang.Override
public <T> io.druid.query.QueryRunner<T> decorate(final io.druid.query.QueryRunn... | public static io.druid.query.IntervalChunkingQueryRunnerDecorator NoopIntervalChunkingQueryRunnerDecorator() {
return new io.druid.query.IntervalChunkingQueryRunnerDecorator(null, null, null) {
@java.lang.Override
public <T> io.druid.query.QueryRunner<T> decorate(final io.druid.query.QueryRunner<T> ... |
public void start(javafx.stage.Stage primaryStage) throws java.lang.Exception {
borderPane.getStylesheets().add(ijfx.ui.main.ImageJFX.getStylesheet());
borderPane.getStyleClass().add("explorer-filter");
javafx.scene.Scene scene = new javafx.scene.Scene(borderPane);
primaryStage.setWidth(600);
primar... | public void start(javafx.stage.Stage primaryStage) throws java.lang.Exception {
this.primaryStage = primaryStage;
borderPane.getStylesheets().add(ijfx.ui.main.ImageJFX.getStylesheet());
borderPane.getStyleClass().add("explorer-filter");
javafx.scene.Scene scene = new javafx.scene.Scene(borderPane);
... |
public static void setMasterVolume(@org.eclipse.smarthome.model.script.engine.action.ParamDoc(name = "volume", text = "volume in the range [0,1]")
final float volume) throws java.io.IOException {
if ((volume < 0) || (volume > 1)) {
throw new java.lang.IllegalArgumentException("Volume value must be in the ra... | public static void setMasterVolume(@org.eclipse.smarthome.model.script.engine.action.ParamDoc(name = "volume", text = "volume in the range [0,1]")
final float volume) throws java.io.IOException {
if ((volume < 0) || (volume > 1)) {
throw new java.lang.IllegalArgumentException("Volume value must be in the ra... |
private java.util.Properties parseAttributes(org.w3c.dom.Node node) {
java.util.Properties attributes = new java.util.Properties();
org.w3c.dom.NamedNodeMap nnm = node.getAttributes();
for (int i = 0; i < (nnm.getLength()); i++) {
org.w3c.dom.Node attribute = nnm.item(i);
java.lang.String va... | protected java.util.Properties parseAttributes(org.w3c.dom.Node node) {
java.util.Properties attributes = new java.util.Properties();
org.w3c.dom.NamedNodeMap nnm = node.getAttributes();
for (int i = 0; i < (nnm.getLength()); i++) {
org.w3c.dom.Node attribute = nnm.item(i);
java.lang.String ... |
private boolean RichTextComponent() {
begin("RichTextComponent");
if (Link()) {
sem.RichTextComponent_0();
return accept();
}
if (CursiveText()) {
sem.RichTextComponent_1();
return accept();
}
if (Template()) {
sem.RichTextComponent_2();
return acc... | private boolean RichTextComponent() {
begin("RichTextComponent");
if (Link()) {
sem.RichTextComponent_0();
return accept();
}
if (CursiveText()) {
sem.RichTextComponent_1();
return accept();
}
if (Template()) {
sem.RichTextComponent_2();
return acc... |
public json.JSONObject getMSAGraphJSON() {
api.PartialOrderGraph msa;
java.lang.System.out.println(((asrJoint) == null));
java.lang.System.out.println(((asrMarginal) == null));
if (inferenceType.equalsIgnoreCase("joint"))
msa = asrJoint.getMSAGraph();
else
msa = asrMarginal.getMSAGra... | public json.JSONObject getMSAGraphJSON() {
api.PartialOrderGraph msa;
if (inferenceType.equalsIgnoreCase("joint"))
msa = asrJoint.getMSAGraph();
else
msa = asrMarginal.getMSAGraph();
vis.POAGJson json = new vis.POAGJson(msa);
return json.toJSON();
} |
public boolean createAllTables() {
try {
for (com.winthier.sql.SQLTable table : tables.values()) {
java.lang.String sql = table.getCreateTableStatement();
debugLog(sql);
executeUpdate(sql);
}
} catch (javax.persistence.PersistenceException pe) {
pe.pri... | public boolean createAllTables() {
try {
for (com.winthier.sql.SQLTable table : tables.values()) {
java.lang.String sql = table.getCreateTableStatement();
executeUpdate(sql);
}
} catch (javax.persistence.PersistenceException pe) {
pe.printStackTrace();
ret... |
public void offset_returnsTheNumberWhichOffsetsTheTotalEntriesBasedOnPageSize() {
assertThat(new uk.gov.register.presentation.resource.Pagination("/entries", java.util.Optional.of(1L), java.util.Optional.of(10L), 100).offset(), org.hamcrest.Matchers.equalTo(0L));
assertThat(new uk.gov.register.presentation.reso... | public void offset_returnsTheNumberWhichOffsetsTheTotalEntriesBasedOnPageSize() {
assertThat(new uk.gov.register.presentation.resource.Pagination(java.util.Optional.of(1L), java.util.Optional.of(10L), 100).offset(), org.hamcrest.Matchers.equalTo(0L));
assertThat(new uk.gov.register.presentation.resource.Paginat... |
public int findTokenStart(java.lang.CharSequence text, int cursor) {
int i = cursor;
while ((i > 0) && (!(splitChar.contains(text.charAt((i - 1)))))) {
i--;
}
while ((i < cursor) && ((text.charAt(i)) == ' ')) {
i++;
}
return i;
} | public int findTokenStart(java.lang.CharSequence text, int cursor) {
int i = cursor;
while ((i > 0) && (!(splitChar.contains(text.charAt((i - 1)))))) {
i--;
}
if ((i > 0) && ((text.charAt(i)) == ' ')) {
i++;
}
return i;
} |
public boolean equal(org.oreland.entity.TargetLevel other) {
if ((distribution.size()) != (other.distribution.size()))
return false;
for (int i = 0; i < (distribution.size()); i++) {
org.oreland.entity.TargetLevel.Distribution d = distribution.get(i);
org.oreland.entity.TargetLevel.... | public boolean equal(org.oreland.entity.TargetLevel other) {
if ((distribution.size()) != (other.distribution.size()))
return false;
for (org.oreland.entity.TargetLevel.Distribution d : distribution) {
org.oreland.entity.TargetLevel.Distribution d2 = other.get(d.level);
if ((d2 == n... |
public boolean setValue(java.lang.Object value) {
java.lang.String type = mSchemaNode.getString("type");
if (((type.equalsIgnoreCase("string")) && (value instanceof java.lang.String)) || ((type.equalsIgnoreCase("integer")) && (value instanceof java.lang.Integer))) {
mJsonNode = value;
return tru... | public boolean setValue(java.lang.Object value) {
java.lang.String type = mSchemaNode.getString("type");
if (((type.equalsIgnoreCase("string")) && (value instanceof java.lang.String)) || ((type.equalsIgnoreCase("integer")) && ((value instanceof java.lang.Long) || (value instanceof java.lang.Integer)))) {
... |
public void testGetLocatorsForReRollHigherLevelToRerollGranularity() throws java.io.IOException {
boolean isReroll = true;
com.rackspacecloud.blueflood.rollup.SlotKey destSlotKey = com.rackspacecloud.blueflood.rollup.SlotKey.of(Granularity.MIN_240, 0, TEST_SHARD);
com.rackspacecloud.blueflood.rollup.Granula... | public void testGetLocatorsForReRollHigherLevelToRerollGranularity() throws java.io.IOException {
boolean isReroll = true;
com.rackspacecloud.blueflood.rollup.SlotKey destSlotKey = com.rackspacecloud.blueflood.rollup.SlotKey.of(Granularity.MIN_240, 0, TEST_SHARD);
com.rackspacecloud.blueflood.rollup.Granula... |
public void addObjectClassInfo(java.lang.String adaptationId, com.longyg.frontend.model.ars.om.ObjectClassInfo oci) {
if (!(ociMap.containsKey(adaptationId))) {
java.util.TreeSet<com.longyg.frontend.model.ars.om.ObjectClassInfo> ociSet = ociMap.get(adaptationId);
if (!(ociSet.contains(oci))) {
... | public void addObjectClassInfo(java.lang.String adaptationId, com.longyg.frontend.model.ars.om.ObjectClassInfo oci) {
if (ociMap.containsKey(adaptationId)) {
java.util.TreeSet<com.longyg.frontend.model.ars.om.ObjectClassInfo> ociSet = ociMap.get(adaptationId);
if (!(ociSet.contains(oci))) {
... |
public void testIndexImporterWithWrongRowIdShardCombination() throws java.io.IOException {
java.util.List<org.apache.lucene.document.Field> document = _fieldManager.getFields("2", genRecord("1"));
_commitWriter.addDocument(document);
_commitWriter.commit();
_commitWriter.close();
_indexImporter.run(... | public void testIndexImporterWithWrongRowIdShardCombination() throws java.io.IOException {
java.util.List<org.apache.lucene.document.Field> document = _fieldManager.getFields("2", genRecord("1"));
_commitWriter.addDocument(document);
_commitWriter.commit();
_commitWriter.close();
_indexImporter.run(... |
public java.lang.Object readResolve() {
if ((graphConfiguration) == null) {
graphConfiguration = new java.util.ArrayList<>();
}
if (((getParserUniqueName()) == null) || ((getParserUniqueName()) == null)) {
net.praqma.jenkins.memorymap.parser.AbstractMemoryMapParser.logger.log(java.util.loggi... | public java.lang.Object readResolve() {
if ((graphConfiguration) == null) {
graphConfiguration = new java.util.ArrayList<>();
}
if ((getParserUniqueName()) == null) {
net.praqma.jenkins.memorymap.parser.AbstractMemoryMapParser.logger.log(java.util.logging.Level.FINE, "Entering 1.x compatibil... |
public void deleteComponent(com.google.appinventor.shared.rpc.component.Component component) {
if (!(component.getAuthorId().equals(userInfoProvider.getUserId()))) {
throw com.google.appinventor.server.CrashReport.createAndLogError(com.google.appinventor.server.ComponentServiceImpl.LOG, null, (("The user wh... | public void deleteComponent(com.google.appinventor.shared.rpc.component.Component component) {
if (!(component.getAuthorId().equals(userInfoProvider.getUserId()))) {
throw com.google.appinventor.server.CrashReport.createAndLogError(com.google.appinventor.server.ComponentServiceImpl.LOG, null, (("The user wh... |
private void configPopupWindow() {
mPopupWindow = new android.support.v7.widget.AppCompatPopupWindow(mContext, null, io.github.douglasjunior.androidSimpleTooltip.SimpleTooltip.mDefaultPopupWindowStyleRes);
mPopupWindow.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT);
mPopupWindow.setHeight(ViewGroup.LayoutPar... | private void configPopupWindow() {
mPopupWindow = new android.support.v7.widget.AppCompatPopupWindow(mContext, null, io.github.douglasjunior.androidSimpleTooltip.SimpleTooltip.mDefaultPopupWindowStyleRes);
mPopupWindow.setOnDismissListener(this);
mPopupWindow.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT);
... |
public net.minecraft.util.IIcon getIcon(int side, int meta) {
if ((meta < 0) || ((meta >= (woodTypes.length)) && (meta < 8))) {
meta = 0;
}else
if (meta > 7) {
meta %= 8;
}
return iconArray[meta];
} | public net.minecraft.util.IIcon getIcon(int side, int meta) {
if (meta > 7) {
meta %= 8;
}
if ((meta < 0) || ((meta >= (woodTypes.length)) && (meta <= 7))) {
meta = 0;
}
return iconArray[meta];
} |
int i = 1;
if ((m[(i - 1)]) >= n) {
return n;
}else
if (n == 0) {
return 0;
}else {
i++;
}
return n - (m[(i - 1)]);
} | int i = 0;
if ((m[i]) >= n) {
return n;
}else
if (n == 0) {
return 0;
}else {
i++;
}
return n - (m[i]);
} |
public void End(com.mcmiddleearth.mcme.events.PVP.maps.Map m) {
state = GameState.IDLE;
for (org.bukkit.entity.Player p : org.bukkit.Bukkit.getOnlinePlayers()) {
com.mcmiddleearth.mcme.events.PVP.Team.removeFromTeam(p);
}
com.mcmiddleearth.mcme.events.PVP.Gamemode.BasePluginGamemode.getScoreboar... | public void End(com.mcmiddleearth.mcme.events.PVP.maps.Map m) {
state = GameState.IDLE;
for (org.bukkit.entity.Player p : org.bukkit.Bukkit.getOnlinePlayers()) {
com.mcmiddleearth.mcme.events.PVP.Team.removeFromTeam(p);
}
getScoreboard().clearSlot(DisplaySlot.SIDEBAR);
m.playerLeaveAll();
... |
public java.lang.String[] getActiveSplitVerb(edu.uw.easysrl.qasrl.qg.VerbHelper verbHelper) {
java.lang.String[] result;
if ((verbSlot.auxiliaries.size()) == 0) {
result = verbHelper.getAuxiliaryAndVerbStrings(words, null, verbSlot.indexInSentence);
}else {
result = getActiveVerb(verbHelper)... | public java.lang.String[] getActiveSplitVerb(edu.uw.easysrl.qasrl.qg.VerbHelper verbHelper) {
java.lang.String[] result;
if ((verbSlot.auxiliaries.size()) == 0) {
result = verbHelper.getAuxiliaryAndVerbStrings(words, null, verbSlot.indexInSentence);
if (verbSlot.hasParticle) {
result... |
public void run() {
isDelayed = false;
isImmortal = true;
location[1] = 0;
location[3] = 0;
location[0] = xStartLocation;
location[2] = yStartLocation;
immortalTimer = new java.util.Timer();
immortalTimer.schedule(new java.util.TimerTask() {
@java.lang.Override
public voi... | public void run() {
isDelayed = false;
isImmortal = true;
location[1] = 0;
location[3] = 0;
immortalTimer = new java.util.Timer();
immortalTimer.schedule(new java.util.TimerTask() {
@java.lang.Override
public void run() {
isImmortal = false;
immortalTimer.... |
public static void run() {
io.github.rmuhamedgaliev.config.ConfigLoader configLoader = new io.github.rmuhamedgaliev.config.ConfigLoader();
configLoader.prepareConfig();
java.lang.System.setProperty("logback.configurationFile", "config/logback.xml");
java.util.List<io.github.rmuhamedgaliev.Plugin> plugin... | public static void run() {
java.util.List<io.github.rmuhamedgaliev.Plugin> plugins;
try {
io.github.rmuhamedgaliev.config.ConfigLoader configLoader = new io.github.rmuhamedgaliev.config.ConfigLoader();
configLoader.prepareConfig();
java.lang.System.setProperty("logback.configurationFile"... |
public java.util.List<java.lang.Integer> parseIntegerList(java.lang.String numberStr, java.lang.String separator) throws java.lang.NumberFormatException {
java.util.List<java.lang.Integer> argumentList = new java.util.LinkedList<java.lang.Integer>();
if (numberStr.isEmpty()) {
return argumentList;
}... | public java.util.List<java.lang.Integer> parseIntegerList(java.lang.String numberStr, java.lang.String separator) throws java.lang.NumberFormatException {
java.util.List<java.lang.Integer> argumentList = new java.util.LinkedList<java.lang.Integer>();
if (numberStr.isEmpty()) {
return argumentList;
}... |
public boolean compareWords(java.lang.String playerWord) throws byui.CIT260.funnyWeekend.exceptions.CompareWordsControlException {
if ("".equals(playerWord))
throw new byui.CIT260.funnyWeekend.exceptions.CompareWordsControlException("You need to input the word");
java.lang.String[][] words = game.g... | public boolean compareWords(java.lang.String playerWord) throws byui.CIT260.funnyWeekend.exceptions.CompareWordsControlException {
if ("".equals(playerWord))
throw new byui.CIT260.funnyWeekend.exceptions.CompareWordsControlException("You need to input the word");
match = false;
java.lang.String... |
public void onItemClick(android.widget.AdapterView parent, android.view.View view, int position, long id) {
java.lang.System.out.println("click");
cs48.project.com.parl.models.User selectedUser = ((cs48.project.com.parl.models.User) (parent.getItemAtPosition(position)));
cs48.project.com.parl.ui.activities.... | public void onItemClick(android.widget.AdapterView parent, android.view.View view, int position, long id) {
java.lang.System.out.println("click");
cs48.project.com.parl.models.User selectedUser = ((cs48.project.com.parl.models.User) (parent.getItemAtPosition(position)));
if (selectedUser != null) {
... |
public void autoGearShift() {
if ((gearCounter) == 10) {
double sum = 0;
for (int i = 0; i == (currents.length); i++) {
sum += currents[i];
}
gearUp = (sum / (currents.length)) > (edu.stuy.robot.RobotMap.GEAR_SHIFT_THRESHOLD);
gearShift.set(gearUp);
gearCo... | public void autoGearShift() {
if ((gearCounter) == 10) {
double sum = 0;
for (int i = 0; i < (currents.length); i++) {
sum += currents[i];
}
gearUp = (sum / (currents.length)) > (edu.stuy.robot.RobotMap.GEAR_SHIFT_THRESHOLD);
gearShift.set(gearUp);
gearCou... |
private java.util.Stack<edu.cwru.sepia.agent.minimax.AstarAgent.MapLocation> reconstructPath(edu.cwru.sepia.agent.minimax.AstarAgent.MapLocation current, edu.cwru.sepia.agent.minimax.AstarAgent.MapLocation start) {
java.util.Stack<edu.cwru.sepia.agent.minimax.AstarAgent.MapLocation> path = new java.util.Stack<edu.c... | private java.util.Stack<edu.cwru.sepia.agent.minimax.AstarAgent.MapLocation> reconstructPath(edu.cwru.sepia.agent.minimax.AstarAgent.MapLocation current, edu.cwru.sepia.agent.minimax.AstarAgent.MapLocation start) {
java.util.Stack<edu.cwru.sepia.agent.minimax.AstarAgent.MapLocation> path = new java.util.Stack<edu.c... |
public void setManager(java.lang.String manager) {
if (manager != null) {
try {
javax.naming.ldap.LdapName dn = new javax.naming.ldap.LdapName(manager);
this.manager = dn.getRdn(((dn.size()) - 1)).getValue().toString();
} catch (javax.naming.InvalidNameException e) {
... | public void setManager(java.lang.String manager) {
if ((manager == null) || ((manager.length()) == 0)) {
this.manager = null;
}else {
try {
javax.naming.ldap.LdapName dn = new javax.naming.ldap.LdapName(manager);
this.manager = dn.getRdn(((dn.size()) - 1)).getValue().toSt... |
private com.bsuir.piskun.beans.User setUser(com.bsuir.piskun.beans.User user, java.sql.ResultSet resultSet) throws java.sql.SQLException {
user.setUserId(resultSet.getInt(RowValues.ID));
user.setLogin(resultSet.getString(RowValues.LOGIN));
user.setPassword(resultSet.getString(RowValues.PASSWORD));
user.... | private com.bsuir.piskun.beans.User setUser(com.bsuir.piskun.beans.User user, java.sql.ResultSet resultSet) throws java.sql.SQLException {
user.setUserId(resultSet.getInt(RowValues.ID));
user.setLogin(resultSet.getString(RowValues.LOGIN));
user.setPassword(resultSet.getString(RowValues.PASSWORD));
user.... |
public Lane shorter() {
if ((Road.lanes[1].getLength()) > (Road.lanes[2].getLength())) {
return Road.lanes[1];
}else
if ((Road.lanes[1].getLength()) < (Road.lanes[2].getLength())) {
return Road.lanes[2];
}else {
return Road.lanes[(((int) ((java.lang.Math.random())... | public Lane shorter() {
if ((Road.lanes[1].getLength()) < (Road.lanes[2].getLength())) {
return Road.lanes[1];
}else
if ((Road.lanes[2].getLength()) < (Road.lanes[1].getLength())) {
return Road.lanes[2];
}else {
return Road.lanes[(((int) ((java.lang.Math.random())... |
public boolean restartGame() {
if (!(this.isGameRun)) {
backToMainMenu("cannot do restart because no game run..");
}
userInterface.printMassage("restarting...");
this.whoPlay = 0;
this.propWhoPlay.set("Player 1");
this.players = null;
this.gameStatistic = null;
this.isGameRun = f... | public boolean restartGame() {
if (!(this.isGameRun)) {
backToMainMenu("cannot do restart because no game run..");
}
userInterface.printMassage("restarting...");
this.whoPlay = 0;
this.propWhoPlay.set("Player 1");
this.players = null;
this.isGameRun = false;
this.isGameLoaded = f... |
public static void OnAreaEnter(org.nwnx.nwnx2.jvm.NWObject oPC) {
if ((((!(org.nwnx.nwnx2.jvm.NWScript.getIsPC(oPC))) || (org.nwnx.nwnx2.jvm.NWScript.getIsDM(oPC))) || ((org.nwnx.nwnx2.jvm.NWScript.getLocalInt(oPC, "MIGRATION_SYSTEM_LOGGED_IN_ONCE")) == 1)) || (org.nwnx.nwnx2.jvm.NWScript.getTag(org.nwnx.nwnx2.jvm.... | public static void OnAreaEnter(org.nwnx.nwnx2.jvm.NWObject oPC) {
if ((((!(org.nwnx.nwnx2.jvm.NWScript.getIsPC(oPC))) || (org.nwnx.nwnx2.jvm.NWScript.getIsDM(oPC))) || ((org.nwnx.nwnx2.jvm.NWScript.getLocalInt(oPC, "MIGRATION_SYSTEM_LOGGED_IN_ONCE")) == 1)) || (!(org.nwnx.nwnx2.jvm.NWScript.getTag(org.nwnx.nwnx2.jv... |
public static void test_338() {
excute(testcase.Object_TextScroll, testcase.Operation_ClickWait, "日期和时间", "vertical");
excute(testcase.Object_Text, testcase.Operation_ClickWait, "选择时区");
excute(testcase.Object_TextScroll, testcase.Operation_ClickWait, "香港", "vertical");
check(testcase.Object_Text, testc... | public static void test_338() {
excute(testcase.Object_TextScroll, testcase.Operation_ClickWait, "日期和时间", "vertical");
excute(testcase.Object_Text, testcase.Operation_ClickWait, "自动确定时区");
excute(testcase.Object_Text, testcase.Operation_ClickWait, "选择时区");
excute(testcase.Object_TextScroll, testcase.Ope... |
public void onBackPressed() {
android.util.Log.d("CDA", "onBackPressed Called");
android.app.Fragment fragment = fragmentManager.findFragmentByTag("BusSchedule");
if (fragment != null) {
fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.remove(fragment);
f... | public void onBackPressed() {
android.app.Fragment fragment = fragmentManager.findFragmentByTag("BusSchedule");
if (fragment != null) {
fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.remove(fragment);
fragmentTransaction.commit();
}else {
super.... |
private org.opencv.core.Mat warpCorners(org.opencv.core.MatOfPoint2f imageCorners) {
org.opencv.core.Mat mat = null;
if (warpInitialized) {
mat = new org.opencv.core.Mat();
org.opencv.core.Core.transform(imageCorners, mat, perspMat);
}else {
com.shootoff.camera.autocalibration.AutoCa... | private org.opencv.core.Mat warpCorners(org.opencv.core.MatOfPoint2f imageCorners) {
final org.opencv.core.Mat mat;
if (warpInitialized) {
mat = new org.opencv.core.Mat();
org.opencv.core.Core.transform(imageCorners, mat, perspMat);
}else {
mat = null;
com.shootoff.camera.aut... |
private Node[] copyKids(Node[] array, int manyItems, int length) throws java.lang.CloneNotSupportedException {
Node[] temp = new Node[length];
for (int i = 0; i < manyItems; i++) {
temp[i] = array[i].deepCopy();
}
return temp;
} | protected Node[] copyKids(Node[] array, int manyItems, int length) throws java.lang.CloneNotSupportedException {
Node[] temp = new Node[length];
for (int i = 0; i < manyItems; i++) {
temp[i] = array[i].deepCopy();
}
return temp;
} |
private void displayOriginalData(org.jfree.data.category.DefaultCategoryDataset lineChart) {
for (int i = 0; i < (data.size()); i++) {
lineChart.addValue(data.get(i), "Original Data", (i + ""));
}
} | private void displayOriginalData(org.jfree.data.category.DefaultCategoryDataset lineChart) {
for (int i = 1; i <= (data.size()); i++) {
lineChart.addValue(data.get((i - 1)), "Original Data", (i + ""));
}
} |
public void onResume() {
super.onResume();
this.isPaused = false;
this.slidingUpPanelLayout.restore();
if (needToChange) {
if (getOnBusState()) {
cl.smartcities.isci.transportinspector.utils.Bus bus = getBus();
this.showOnBusReportPanel(bus);
this.slidingUpPan... | public void onResume() {
super.onResume();
this.isPaused = false;
this.slidingUpPanelLayout.restore();
if (getOnBusState()) {
cl.smartcities.isci.transportinspector.utils.Bus bus = getBus();
this.showOnBusReportPanel(bus);
this.slidingUpPanelLayout.showFabIcon();
showPane... |
private void updateReverseDrive() {
if (sigRightTrigger.risingEdge(((gamepad1.right_trigger) > 0.5)))
backwardsDrive = !(backwardsDrive);
if ((backwardsDrive) == true) {
org.firstinspires.ftc.teamcode.Utilities.ManualControl.setSingleStickXY((-(gamepad1.left_stick_x)), (-(gamepad1.left_stic... | private void updateReverseDrive() {
if (sigRightTrigger.risingEdge(((gamepad1.right_trigger) > 0.5)))
backwardsDrive = !(backwardsDrive);
if ((backwardsDrive) == true) {
org.firstinspires.ftc.teamcode.Utilities.ManualControl.setSingleStickXY((-(gamepad1.left_stick_x)), (-(gamepad1.left_stic... |
public boolean hasNext() {
while (!(asyncIndexer.isDone())) {
if ((queue.size()) > 0) {
return false;
}
try {
java.lang.Thread.sleep(100);
} catch (java.lang.InterruptedException e) {
}
}
return true;
} | public boolean hasNext() {
while ((!(asyncIndexer.isDone())) && ((queue.size()) == 0)) {
try {
java.lang.Thread.sleep(100);
} catch (java.lang.InterruptedException e) {
}
}
return (queue.size()) > 0;
} |
public static java.util.List<java.lang.Integer> make(int size) {
java.util.List<java.lang.Integer> list = new java.util.ArrayList<java.lang.Integer>();
for (int i = 1; i <= size; i++) {
int num = ((int) (java.lang.Math.abs((((ListCreator.numberRange) + 1) * (java.lang.Math.random())))));
list.ad... | public static java.util.List<java.lang.Integer> make(int size) {
java.util.List<java.lang.Integer> list = new java.util.ArrayList<java.lang.Integer>();
for (int i = 1; i <= size; i++) {
int num = ((int) (java.lang.Math.abs((((ListCreator.numberRange) + 1) * (java.lang.Math.random())))));
list.ad... |
public java.lang.Object visit(bantam.visitor.UnaryNotExpr node) {
super.visit(node);
if (this.BOOLEAN.equals(node.getExpr().getExprType()))
this.registerError(node, ("UnaryNotExpr must be of type boolean, is of type " + (node.getExpr().getExprType())));
node.setExprType(this.BOOLEAN);
retur... | public java.lang.Object visit(bantam.visitor.UnaryNotExpr node) {
super.visit(node);
if (!(this.BOOLEAN.equals(node.getExpr().getExprType())))
this.registerError(node, ("UnaryNotExpr must be of type boolean, is of type " + (node.getExpr().getExprType())));
node.setExprType(this.BOOLEAN);
re... |
public boolean onPreferenceChange(android.preference.Preference preference, java.lang.Object newValue) {
if (preference == (mOnTheGoAlphaPref)) {
float val = java.lang.Float.parseFloat(((java.lang.String) (newValue)));
Settings.System.putFloat(mCr, Settings.System.ON_THE_GO_ALPHA, (val / 100));
... | public boolean onPreferenceChange(android.preference.Preference preference, java.lang.Object newValue) {
if (preference == (mScreenshotDelay)) {
int value = java.lang.Integer.parseInt(newValue.toString());
Settings.System.putInt(mCr, Settings.System.SCREENSHOT_DELAY, value);
return true;
... |
public void onLocationChanged(android.location.Location location) {
int lat = ((int) ((location.getLatitude()) * 1000000.0));
int lng = ((int) ((location.getLongitude()) * 1000000.0));
currentLoc = new com.google.android.maps.GeoPoint(lat, lng);
refreshOverlay();
} | public void onLocationChanged(android.location.Location location) {
if (location != null) {
int lat = ((int) ((location.getLatitude()) * 1000000.0));
int lng = ((int) ((location.getLongitude()) * 1000000.0));
currentLoc = new com.google.android.maps.GeoPoint(lat, lng);
refreshOverlay... |
public void next() {
this.index += 1;
int tempIndex = this.index;
while (((menu.get(tempIndex).heartHealthy) != true) && ((this.index) < (this.menuSize))) {
this.index += 1;
tempIndex += 1;
}
} | public void next() {
this.index += 1;
int tempIndex = this.index;
while (((this.index) < (this.menuSize)) && ((menu.get(tempIndex).heartHealthy) != true)) {
this.index += 1;
tempIndex += 1;
}
} |
public int compare(javafx.util.Pair<java.lang.Integer, java.lang.String> o1, javafx.util.Pair<java.lang.Integer, java.lang.String> o2) {
if ((o1.getKey()) > (o2.getKey())) {
return -1;
}else
if ((o1.getKey().equals(o2.getKey())) && ((o1.getValue().compareTo(o2.getValue())) == 0)) {
r... | public int compare(javafx.util.Pair<java.lang.Integer, java.lang.String> o1, javafx.util.Pair<java.lang.Integer, java.lang.String> o2) {
if ((o1.getKey()) > (o2.getKey())) {
return -1;
}else
if (o1.getKey().equals(o2.getKey())) {
return o1.getValue().compareTo(o2.getValue());
... |
private void onPostItemClick(com.google.gwt.event.dom.client.ClickEvent event) {
if (!(title.isEditModeFocused())) {
org.silverpeas.poc.api.navigation.NavigationProvider.get().goTo(org.silverpeas.poc.client.local.blog.post.BlogPostPage.class, com.google.common.collect.ImmutableMultimap.of("instanceId", getM... | private void onPostItemClick(com.google.gwt.event.dom.client.ClickEvent event) {
if ((!(title.isEditModeFocused())) && ((getModel()) != null)) {
org.silverpeas.poc.api.navigation.NavigationProvider.get().goTo(org.silverpeas.poc.client.local.blog.post.BlogPostPage.class, com.google.common.collect.ImmutableMu... |
public synchronized java.lang.Object[] getRow() {
try {
while ((!(endReached)) && ((pendingRow) == null))
wait();
if (endReached)
return null;
java.lang.Object[] row = pendingRow;
pendingRow = null;
return row;
} catch (java.lang.... | public synchronized java.lang.Object[] getRow() {
try {
while ((!(endReached)) && ((pendingRow) == null))
wait();
if ((endReached) && ((pendingRow) == null))
return null;
java.lang.Object[] row = pendingRow;
pendingRow = null;
return ... |
private int getMinute() {
java.lang.String time = getTime();
if ((time == null) || (!(time.matches(com.fsck.k9.preferences.TimePickerPreference.VALIDATION_EXPRESSION)))) {
return -1;
}
return java.lang.Integer.valueOf(time.split(":")[1]);
} | private int getMinute() {
java.lang.String time = getTime();
if ((time == null) || (!(time.matches(com.fsck.k9.preferences.TimePickerPreference.VALIDATION_EXPRESSION)))) {
return -1;
}
return java.lang.Integer.parseInt(time.split(":")[1]);
} |
public void update(java.util.Observable observable, java.lang.Object arg) {
if (arg instanceof programming.breakout.engine.GameState.GameDelta) {
programming.breakout.engine.GameState.GameDelta delta = ((programming.breakout.engine.GameState.GameDelta) (arg));
for (programming.breakout.engine.Entity... | public void update(java.util.Observable observable, java.lang.Object arg) {
if (arg instanceof programming.breakout.engine.GameState.GameDelta) {
programming.breakout.engine.GameState.GameDelta delta = ((programming.breakout.engine.GameState.GameDelta) (arg));
for (programming.breakout.engine.Entity... |
public void getLocationCoordinates() {
if (locationService.checkLocationServiceSettingsEnabled(getApplicationContext())) {
locationService.setBroadCastData(getClass().getSimpleName());
locationService.startTrackingLocation(getApplicationContext());
}else {
hideProgress();
com.mdl... | public void getLocationCoordinates() {
if (locationService.checkLocationServiceSettingsEnabled(this)) {
locationService.setBroadCastData(getClass().getSimpleName());
locationService.startTrackingLocation(this);
}else {
hideProgress();
com.mdlive.unifiedmiddleware.commonclasses.ut... |
public void onClick(android.view.View v) {
switch (currentState) {
case STATE_RESET :
nfcBenchmarkFragment.setStateToRunning();
currentState = RUNNING;
return ;
case RUNNING :
nfcBenchmarkFragment.setStateToStopped();
currentState = STATE_S... | public void onClick(android.view.View v) {
switch (currentState) {
case STATE_RESET :
nfcBenchmarkFragment.setStateToRunning(true);
currentState = RUNNING;
return ;
case RUNNING :
nfcBenchmarkFragment.setStateToStopped();
currentState = STA... |
public void startWithoutDelay(java.lang.String filepath, trips.CarActionsFilter... filter) {
java.util.Set<trips.CarActionsFilter> filters = new java.util.HashSet(java.util.Arrays.asList(filter));
trips.CarAction.addCreatedListener(this::newAction, filters);
reader = new trips.ReadFromOpenXCFile(filepath);
... | public void startWithoutDelay(java.lang.String filepath, trips.CarActionsFilter... filter) {
java.util.Set<trips.CarActionsFilter> filters = new java.util.HashSet(java.util.Arrays.asList(filter));
trips.CarAction.addCreatedListener(this, filters);
reader = new trips.ReadFromOpenXCFile(filepath);
reader.... |
public void onEventCalculateNumberOfQuizzes(com.matteoveroni.wordsremember.dictionary.events.vocable.EventCountDistinctVocablesWithTranslationsCompleted event) {
numberOfQuestions = event.getNumberOfVocablesWithTranslation();
if ((settings.getNumberOfQuestions()) > (numberOfQuestions)) {
settings.setNum... | public void onEventCalculateNumberOfQuizzes(com.matteoveroni.wordsremember.dictionary.events.vocable.EventCountDistinctVocablesWithTranslationsCompleted event) {
numberOfQuestions = event.getNumberOfVocablesWithTranslation();
if ((numberOfQuestions) > (settings.getNumberOfQuestions())) {
numberOfQuestio... |
public android.view.View getViewAt(android.view.View view, int i) {
com.genonbeta.CoolSocket.test.helper.TemplateItem item = ((com.genonbeta.CoolSocket.test.helper.TemplateItem) (getItem(i)));
android.widget.TextView text = ((android.widget.TextView) (view.findViewById(R.id.text)));
if (item.isJson)
... | public android.view.View getViewAt(android.view.View view, int i) {
com.genonbeta.CoolSocket.test.helper.TemplateItem item = ((com.genonbeta.CoolSocket.test.helper.TemplateItem) (getItem(i)));
android.widget.TextView text = ((android.widget.TextView) (view.findViewById(R.id.text)));
if (item.isJson)
... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_layout);
searchButton = ((android.widget.Button) (findViewById(R.id.buttonSerch)));
searchButton.setOnClickListener(new android.view.View.OnClickListener() {
@java.lan... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_layout);
context = this;
searchButton = ((android.widget.Button) (findViewById(R.id.buttonSerch)));
searchButton.setOnClickListener(new android.view.View.OnClickListener()... |
private void removeCommand(java.lang.String[] args) {
if ((args.length) != 2) {
_output.println("ERROR: invalid remove command");
}
if (!(_monthNames.contains(args[1]))) {
_output.printf("ERROR: %s is not a loaded month%n", args[1]);
}
_budget.removeMonth(_budget.getMonth(args[1]));
... | private void removeCommand(java.lang.String[] args) {
if ((args.length) != 2) {
_output.println("ERROR: invalid remove command");
return ;
}
if (!(_monthNames.contains(args[1]))) {
_output.printf("ERROR: %s is not a loaded month%n", args[1]);
return ;
}
_budget.remove... |
public void onBindViewHolder(org.lvu.adapter.BaseListAdapter.ViewHolder holder, int position) {
holder.image.setImageBitmap(mData.get((position >= (mData.size()) ? (mData.size()) - 1 : position)).getBitmap());
super.onBindViewHolder(holder, position);
} | public void onBindViewHolder(org.lvu.adapter.BaseListAdapter.ViewHolder holder, int position) {
super.onBindViewHolder(holder, position);
if (mData.isEmpty())
return ;
holder.image.setImageBitmap(mData.get(((position != 0) && (position >= (mData.size())) ? (mData.size()) - 1 : position)).getBit... |
public boolean equals(java.lang.Object another) {
if ((another.getClass()) != (this.getClass())) {
return false;
}
com.rida.agents.Driver.DriverDescription other = ((com.rida.agents.Driver.DriverDescription) (another));
if ((this.name.equals(other.name)) && (this.way.equals(other.way))) {
... | public boolean equals(java.lang.Object another) {
if ((another.getClass()) != (this.getClass())) {
return false;
}
com.rida.agents.Driver.DriverDescription other = ((com.rida.agents.Driver.DriverDescription) (another));
return (this.name.equals(other.name)) && (this.way.equals(other.way));
} |
public static void criarTrabalho() {
java.lang.Long anuncioId = br.uva.goldenservices.views.AnuncioView.getCurrentId();
if ((anuncioId != null) && ((br.uva.goldenservices.views.TrabalhoView.trabalhoId) == null)) {
golden.services.model.trabalhos.Trabalho trabalho = golden.services.http.ConnectorWebServi... | public static void criarTrabalho() {
java.lang.Long anuncioId = br.uva.goldenservices.views.AnuncioView.getCurrentId();
if (anuncioId != null) {
golden.services.model.trabalhos.Trabalho trabalho = golden.services.http.ConnectorWebService.criarTrabalho(anuncioId.toString());
if (trabalho == null)... |
public void execute() {
try {
oldDirectory = mainStorage.getCurrentDirectory();
mainStorage.changeDirectory(newDirectory);
pushToUndoStack();
eventBus.post(new jfdi.logic.events.MoveDirectoryDoneEvent(newDirectory));
} catch (jfdi.storage.exceptions.FilesReplacedException e) {
... | public void execute() {
try {
oldDirectory = mainStorage.getCurrentDirectory();
mainStorage.changeDirectory(newDirectory);
pushToUndoStack();
eventBus.post(new jfdi.logic.events.MoveDirectoryDoneEvent(newDirectory));
} catch (jfdi.storage.exceptions.FilesReplacedException e) {
... |
protected void writeTo(javax.servlet.http.HttpServletResponse response) throws java.io.IOException {
java.io.OutputStream outStream = response.getOutputStream();
response.setHeader("Content-Disposition", ("attachment;filename=" + (file.getFilename())));
response.setContentType(file.getContentType());
re... | protected void writeTo(javax.servlet.http.HttpServletResponse response) throws java.io.IOException {
super.writeTo(response);
java.io.OutputStream outStream = response.getOutputStream();
response.setHeader("Content-Disposition", ("attachment;filename=" + (file.getFilename())));
response.setContentType(f... |
public void addNumber(long number, int bits) {
if (!(writing))
throw new java.lang.IllegalStateException("Not writing file!");
if (bits < 1)
throw new java.lang.IllegalArgumentException("Cannot write a number with less then 1 bit!");
if (bits > 64)
throw new java.lang.Illeg... | public void addNumber(long number, int bits) {
if (!(writing))
throw new java.lang.IllegalStateException("Not writing file!");
if (bits < 1)
throw new java.lang.IllegalArgumentException("Cannot write a number with less then 1 bit!");
if (bits > 64)
throw new java.lang.Illeg... |
public boolean contains(Feature feature) {
if ((head) == null)
return false;
else {
FeatureNode current = head;
while (current != null) {
if (!(current.equals(feature)))
return true;
current = current.getNext();
}
retu... | public boolean contains(Feature feature) {
if ((head) == null)
return false;
else {
FeatureNode current = head;
while (current != null) {
if (current.equals(feature))
return true;
current = current.getNext();
}
return ... |
private void loadWordsFromFile(java.util.Set<java.lang.String> words, java.nio.file.Path file) {
try (java.util.stream.Stream<java.lang.String> lines = java.nio.file.Files.lines(file, java.nio.charset.StandardCharsets.ISO_8859_1)) {
lines.map(( line) -> line.trim()).forEach(( word) -> words.add(word));
... | private void loadWordsFromFile(java.util.Set<java.lang.String> words, java.nio.file.Path file) {
try (java.util.stream.Stream<java.lang.String> lines = java.nio.file.Files.lines(file, java.nio.charset.StandardCharsets.ISO_8859_1)) {
lines.map(( line) -> line.trim().toLowerCase()).forEach(( word) -> words.ad... |
public void onClick_Start(android.view.View view) {
playerNumber = java.lang.Integer.parseInt(((java.lang.String) (spinner.getSelectedItem())));
createCharacterList();
android.content.Intent intent = new android.content.Intent(this, com.example.shoha.avalon.AddPlayers.class);
intent.putParcelableArrayLi... | public void onClick_Start(android.view.View view) {
playerNumber = java.lang.Integer.parseInt(((java.lang.String) (spinner.getSelectedItem())));
createCharacterList();
java.lang.System.out.println(charecters.size());
java.lang.System.out.println(playerNumber);
android.content.Intent intent = new and... |
public ChartData.DataPoint getClosestDataPointToTimestampBelow(long timestamp, long belowTimestamp) {
int closestIndex = mChartData.getClosestIndexToTimestamp(timestamp);
com.google.android.apps.forscience.whistlepunk.scalarchart.ChartData.DataPoint closestPoint = mChartData.getPoints().get(closestIndex);
i... | public ChartData.DataPoint getClosestDataPointToTimestampBelow(long timestamp, long belowTimestamp) {
if (mChartData.isEmpty()) {
return null;
}
int closestIndex = mChartData.getClosestIndexToTimestamp(timestamp);
com.google.android.apps.forscience.whistlepunk.scalarchart.ChartData.DataPoint clo... |
public boolean gameOver() {
if (getBoard().canPickStone()) {
return false;
}
for (qwirkle.Player p : players) {
if ((p.getHandSize()) == 0) {
return true;
}
}
return true;
} | public boolean gameOver() {
if (getBoard().canPickStone()) {
return false;
}
for (qwirkle.Player p : players) {
if ((p.getHandSize()) == 0) {
return true;
}
}
return false;
} |
public void destroy() {
try {
final net.bpiwowar.xpm.connectors.AbstractProcessBuilder builder = getConnector().processBuilder();
builder.command("oardel", "--signal", "TERM", pid);
builder.detach(false);
builder.execute();
} catch (java.lang.Exception e) {
throw new net.... | public void destroy() {
if ((pid) != null) {
try {
final net.bpiwowar.xpm.connectors.AbstractProcessBuilder builder = getConnector().processBuilder();
builder.command("oardel", "--signal", "TERM", pid);
builder.detach(false);
builder.execute();
} catch... |
public void disconnect(boolean expected) {
lookingForInput = false;
if ((listener) != null) {
listener.shutdown();
}
clientAliveTimer.cancel();
pixyel_backend.connection.Connection.disconnect(socket.hashCode());
try {
socket.close();
} catch (java.lang.Exception e) {
... | public void disconnect(boolean expected) {
lookingForInput = false;
if ((listener) != null) {
listener.shutdown();
}
clientAliveTimer.cancel();
pixyel_backend.connection.Connection.disconnect(this, socket.hashCode());
try {
socket.close();
} catch (java.lang.Exception e) {
... |
public boolean dismiss(android.view.View tipView, boolean byUser, long startDelay) {
if (tipView == null) {
return false;
}
int key = ((int) (tipView.getTag()));
if ((mTipsMap.containsKey(key)) && (isVisible(tipView))) {
mTipsMap.remove(key);
animateDismiss(tipView, byUser, start... | private boolean dismiss(android.view.View tipView, boolean byUser, long startDelay) {
if (tipView == null) {
return false;
}
int key = ((int) (tipView.getTag()));
if ((mTipsMap.containsKey(key)) && (isVisible(tipView))) {
mTipsMap.remove(key);
animateDismiss(tipView, byUser, star... |
public java.lang.String validateWijzigKlant(final java.lang.String naam, final java.lang.String email) {
domainapp.dom.klanten.Klant found = klantRepository.findUnique(email);
if ((email != null) && (found != null)) {
if (!(found.equals(this))) {
return "Er is al een klant met dit email adre... | public java.lang.String validateWijzigKlant(final java.lang.String naam, final java.lang.String email) {
if (email != null) {
domainapp.dom.klanten.Klant found = klantRepository.findUnique(email);
if ((email != null) && (found != null)) {
if (!(found.equals(this))) {
retu... |
private void fillIgnoredProblemTable() {
try {
com.liferay.ide.project.core.upgrade.IgnoredProblemsContainer mpContainer = com.liferay.ide.project.core.upgrade.UpgradeAssistantSettingsUtil.getObjectFromStore(com.liferay.ide.project.core.upgrade.IgnoredProblemsContainer.class);
com.liferay.blade.api.... | private void fillIgnoredProblemTable() {
try {
com.liferay.ide.project.core.upgrade.IgnoredProblemsContainer mpContainer = com.liferay.ide.project.core.upgrade.UpgradeAssistantSettingsUtil.getObjectFromStore(com.liferay.ide.project.core.upgrade.IgnoredProblemsContainer.class);
if (mpContainer != nul... |
public void skipCheckChunkTypeInt(int expected, int possible) throws java.io.IOException {
int got = readInt();
if (got == possible) {
skipCheckChunkTypeInt(expected, (-1));
}else
if (got != expected) {
throw new java.io.IOException(java.lang.String.format("Expected: 0x%08x, got:... | public void skipCheckChunkTypeInt(int expected, int possible) throws java.io.IOException {
int got = readInt();
if ((got == possible) || (got < expected)) {
skipCheckChunkTypeInt(expected, (-1));
}else
if (got != expected) {
throw new java.io.IOException(java.lang.String.format("... |
private void showErrorDialog() {
final com.liteon.icampusguardian.util.CustomDialog dialog = new com.liteon.icampusguardian.util.CustomDialog();
dialog.setTitle("帳號不正確,請再確認!");
dialog.setIcon(R.drawable.ic_error_outline_black_24dp);
dialog.setBtnText("好");
dialog.setBtnConfirm(new android.view.View.... | private void showErrorDialog(java.lang.String message) {
final com.liteon.icampusguardian.util.CustomDialog dialog = new com.liteon.icampusguardian.util.CustomDialog();
dialog.setTitle(message);
dialog.setIcon(R.drawable.ic_error_outline_black_24dp);
dialog.setBtnText("好");
dialog.setBtnConfirm(new ... |
public static boolean isLocAddr(java.lang.String host) {
if (org.apache.ignite.internal.util.typedef.F.isEmpty(host))
return true;
try {
java.net.InetAddress x = java.net.InetAddress.getByName(host);
assert x != null;
return (x.isLinkLocalAddress()) || (x.isLoopbackAddress()... | public static boolean isLocAddr(java.lang.String host) {
if (org.apache.ignite.internal.util.typedef.F.isEmpty(host))
return true;
final java.net.InetAddress x;
try {
x = java.net.InetAddress.getByName(host);
} catch (java.io.IOException ioe) {
return false;
}
return... |
public void minimalDriverConfiguration() throws java.rmi.RemoteException {
com.elastisys.scale.cloudpool.commons.basepool.driver.DriverConfig configuration = com.elastisys.scale.commons.json.JsonUtils.toObject(com.elastisys.scale.commons.json.JsonUtils.parseJsonResource(minimalConfigPath), com.elastisys.scale.cloud... | public void minimalDriverConfiguration() throws java.rmi.RemoteException {
com.elastisys.scale.cloudpool.commons.basepool.driver.DriverConfig configuration = com.elastisys.scale.commons.json.JsonUtils.toObject(com.elastisys.scale.commons.json.JsonUtils.parseJsonResource(minimalConfigPath), com.elastisys.scale.cloud... |
public static com.handup.handup.controller.course.content.ContentFragment newInstance(float dpWidth, float density) {
com.handup.handup.controller.course.content.ContentFragment fragment = new com.handup.handup.controller.course.content.ContentFragment();
android.os.Bundle args = new android.os.Bundle();
ar... | public static com.handup.handup.controller.course.content.ContentFragment newInstance(float dpWidth, float density) {
com.handup.handup.controller.course.content.ContentFragment fragment = new com.handup.handup.controller.course.content.ContentFragment();
android.os.Bundle args = new android.os.Bundle();
ar... |
public void loadData(boolean startup) {
java.util.ArrayList<com.ywwxhz.entitys.HotCommentItem> items = com.ywwxhz.lib.kits.FileCacheKit.getInstance().getAsObject(((getTypeKey().hashCode()) + ""), "list", new com.google.gson.reflect.TypeToken<java.util.ArrayList<com.ywwxhz.entitys.HotCommentItem>>() { });
if ... | public void loadData(boolean startup) {
java.util.ArrayList<com.ywwxhz.entitys.HotCommentItem> items = com.ywwxhz.lib.kits.FileCacheKit.getInstance().getAsObject(((getTypeKey().hashCode()) + ""), "list", new com.google.gson.reflect.TypeToken<java.util.ArrayList<com.ywwxhz.entitys.HotCommentItem>>() { });
if ... |
public java.util.List<java.util.List<java.lang.Integer>> permute0(int[] nums) {
java.util.List<java.util.List<java.lang.Integer>> result = new java.util.LinkedList<java.util.List<java.lang.Integer>>();
if ((nums.length) == 0) {
return result;
}
java.util.List<java.lang.Integer> rootList = new ja... | public java.util.List<java.util.List<java.lang.Integer>> permute0(int[] nums) {
java.util.List<java.util.List<java.lang.Integer>> result = new java.util.LinkedList<java.util.List<java.lang.Integer>>();
java.util.List<java.lang.Integer> rootList = new java.util.ArrayList<java.lang.Integer>();
for (int num : ... |
public T removeLast() {
if ((size) == 0) {
throw new java.util.NoSuchElementException();
}
T ans = data[end];
(size)--;
if ((end) == 0) {
end = data.length;
}
(end)--;
return ans;
} | public T removeLast() {
if ((size) == 0) {
throw new java.util.NoSuchElementException();
}
T ans = data[end];
(size)--;
if ((end) == ((data.length) - 1)) {
end = 0;
}else {
(end)--;
}
(size)--;
return ans;
} |
public void animateFAB() {
if (isFabOpen) {
addButton.startAnimation(rotate_backward);
noteAddButton.startAnimation(fab_close);
noteAddButton.setClickable(false);
isFabOpen = false;
}else {
addButton.startAnimation(rotate_forward);
noteAddButton.startAnimation(fab... | public void animateFAB() {
if (isFabOpen) {
addButton.startAnimation(rotate_backward);
noteAddButton.startAnimation(fab_close);
noteAddButton.setEnabled(false);
isFabOpen = false;
}else {
addButton.startAnimation(rotate_forward);
noteAddButton.startAnimation(fab_o... |
private void registerUser(me.thamma.serverutils.ServerNewConnectionHandler handler) throws java.io.IOException {
me.thamma.serverutils.ServerConnection connection = new me.thamma.serverutils.ServerConnection(clients.size(), server.accept());
connection.message(("" + (connection.getId())));
handler.handle(th... | private void registerUser(me.thamma.serverutils.ServerNewConnectionHandler handler) throws java.io.IOException {
me.thamma.serverutils.ServerConnection connection = new me.thamma.serverutils.ServerConnection(clients.size(), server.accept());
connection.message(("" + (connection.getId())));
clients.add(conne... |
public void displayRecordList() {
for (track.TrackingRow listrecord : recordlist) {
if (!(listrecord.invalid)) {
java.lang.System.out.println((((((((" " + (listrecord.range.hi)) + " - ") + (listrecord.range.lo)) + " -- ") + (listrecord.statusCode)) + " -- ") + (listrecord.transferCode)));
... | public void displayRecordList() {
for (track.TrackingRow listrecord : recordlist) {
if (!(listrecord.invalid)) {
java.lang.System.out.println((((((((listrecord.range.lo) + " ") + (listrecord.range.hi)) + " ") + (listrecord.statusCode)) + " ") + (listrecord.transferCode)));
}
}
} |
public void editPersonTest() {
org.openmrs.reference.page.AdministrationPage administrationPage = homePage.goToAdministration();
org.openmrs.reference.page.ManagePersonPage managePersonPage = administrationPage.clickOnManagePersons();
managePersonPage.setPersonName(personInfo.givenName);
org.openmrs.ref... | public void editPersonTest() {
org.openmrs.reference.page.AdministrationPage administrationPage = homePage.goToAdministration();
org.openmrs.reference.page.ManagePersonPage managePersonPage = administrationPage.clickOnManagePersons();
managePersonPage.setPersonName(personInfo.givenName);
org.openmrs.ref... |
public void run() {
try {
org.hubiquitus.hapi.transport.service.ServiceResponse responseWSSupported = org.hubiquitus.hapi.transport.service.ServiceManager.requestService(mEndpoint, org.hubiquitus.hapi.Hubiquitus.INFO, ServiceManager.Method.GET, null);
java.lang.Boolean WsSupported = org.hubiquitus.h... | public void run() {
try {
org.hubiquitus.hapi.transport.service.ServiceResponse responseWSSupported = org.hubiquitus.hapi.transport.service.ServiceManager.requestService(mEndpoint, org.hubiquitus.hapi.Hubiquitus.INFO, ServiceManager.Method.GET, null);
java.lang.Boolean WsSupported = org.hubiquitus.h... |
int outputMp3buf = mAndroidLame.flush(mp3buffer);
if (outputMp3buf > 0) {
android.util.Log.i("BlackBox", "Flushed MP3");
os.write(mp3buffer, 0, outputMp3buf);
}
mAndroidLame.close();
os.flush();
os.close();
android.util.Log.i("Rewind", ("Saved File at " + (file.toURI())));
} | int outputMp3buf = mAndroidLame.flush(mp3buffer);
if (outputMp3buf > 0) {
android.util.Log.i("Rewind", "Flushed MP3");
os.write(mp3buffer, 0, outputMp3buf);
}
mAndroidLame.close();
os.flush();
os.close();
android.util.Log.i("Rewind", ("Saved File at " + (file.toURI())));
} |
public java.util.Set<gov.nasa.worldwind.geom.Position> getNeighbors(gov.nasa.worldwind.geom.Position position) {
java.util.Set<gov.nasa.worldwind.geom.Position> neighbors = new java.util.HashSet<gov.nasa.worldwind.geom.Position>(6);
if (null != (this.globe)) {
java.lang.System.out.println(("computing ne... | public java.util.Set<gov.nasa.worldwind.geom.Position> getNeighbors(gov.nasa.worldwind.geom.Position position) {
java.util.Set<gov.nasa.worldwind.geom.Position> neighbors = new java.util.HashSet<gov.nasa.worldwind.geom.Position>(6);
if (null != (this.globe)) {
java.util.Set<gov.nasa.worldwind.geom.Vec4>... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.