buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void galleryAddPic(android.content.Context context) {
android.content.Intent mediaScanIntent = new android.content.Intent(android.content.Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
if (android.text.TextUtils.isEmpty(mCurrentPhotoPath)) {
return ;
}
java.io.File f = new java.io.File(mCurrentP... | public void galleryAddPic(android.content.Context context) {
android.content.Intent mediaScanIntent = new android.content.Intent(android.content.Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
if (android.text.TextUtils.isEmpty(mCurrentPhotoPath)) {
return ;
}
java.io.File f = new java.io.File(mCurrentP... |
public void notifyCriticalError(java.lang.String message) {
com.freedomotic.api.Plugin.LOG.warning(message);
setDescription(message);
com.freedomotic.events.MessageEvent callout = new com.freedomotic.events.MessageEvent(this, message);
callout.setType("callout");
callout.setLevel("warning");
cal... | public void notifyCriticalError(java.lang.String message) {
com.freedomotic.api.Plugin.LOG.warning(message);
com.freedomotic.events.MessageEvent callout = new com.freedomotic.events.MessageEvent(this, message);
callout.setType("callout");
callout.setLevel("warning");
callout.setExpiration((10 * 1000... |
public java.util.List<coverage.Obligation> generate(java.util.HashMap<jkind.lustre.VarDecl, coverage.ObservedTree> sequantialTrees) {
java.util.List<coverage.Obligation> obligations = new java.util.ArrayList<coverage.Obligation>();
coverage.ObservedTree tree;
for (jkind.lustre.VarDecl root : sequantialTrees... | public java.util.List<coverage.Obligation> generate(java.util.HashMap<jkind.lustre.VarDecl, coverage.ObservedTree> sequantialTrees) {
java.util.List<coverage.Obligation> obligations = new java.util.ArrayList<coverage.Obligation>();
coverage.ObservedTree tree;
for (jkind.lustre.VarDecl root : sequantialTrees... |
public static com.sensia.swetools.editors.sensorml.client.panels.charts.ISensorChart createChart(com.sensia.swetools.editors.sensorml.client.panels.widgets.AbstractSensorElementWidget root, java.lang.String values, java.lang.String tokenSeparator, java.lang.String blockSeparator) {
java.util.List<com.sensia.swetool... | public static com.sensia.swetools.editors.sensorml.client.panels.charts.ISensorChart createChart(com.sensia.swetools.editors.sensorml.client.panels.widgets.AbstractSensorElementWidget root) {
java.util.List<com.sensia.swetools.editors.sensorml.client.panels.widgets.ISensorWidget> fields = com.sensia.swetools.editor... |
public void showBreakTimeDlg(long cargoWorkId) {
android.support.v4.app.FragmentManager manager = getSupportFragmentManager();
if (manager != null) {
scs71.com.scscws.ui.main_menu.break_time_dlg.BreakTimeDlg dlg = scs71.com.scscws.ui.main_menu.break_time_dlg.BreakTimeDlg.newInstance(cargoWorkId, this);
... | public void showBreakTimeDlg() {
android.support.v4.app.FragmentManager manager = getSupportFragmentManager();
if (manager != null) {
scs71.com.scscws.ui.main_menu.break_time_dlg.BreakTimeDlg dlg = scs71.com.scscws.ui.main_menu.break_time_dlg.BreakTimeDlg.newInstance(this);
manager.beginTransact... |
public void testJudgeMock() {
owo.com.androidunittest.targets.A a = org.mockito.Mockito.mock(owo.com.androidunittest.targets.A.class);
owo.com.androidunittest.targets.A b = org.mockito.Mockito.spy(a);
junit.framework.Assert.assertTrue(org.mockito.Mockito.mockingDetails(a).isMock());
junit.framework.Asse... | public void testJudgeMock() {
owo.com.androidunittest.targets.A a = org.mockito.Mockito.mock(owo.com.androidunittest.targets.A.class);
owo.com.androidunittest.targets.A b = org.mockito.Mockito.spy(new owo.com.androidunittest.targets.A());
junit.framework.Assert.assertTrue(org.mockito.Mockito.mockingDetails(... |
protected void onPostExecute(java.util.List<de.uulm.dbis.coaster2go.data.Attraction> attractionList) {
if (attractionList == null) {
android.util.Log.e(de.uulm.dbis.coaster2go.activities.AttractionOverviewActivity.TAG, "LoadParksTask.onPostExecute: parkList was null!");
}else {
attractionListAda... | protected void onPostExecute(java.util.List<de.uulm.dbis.coaster2go.data.Attraction> attractionList) {
if (attractionList == null) {
android.util.Log.e(de.uulm.dbis.coaster2go.activities.AttractionOverviewActivity.TAG, "LoadParksTask.onPostExecute: parkList was null!");
}else {
attractionListAda... |
public void onRevokeAccessClick(android.view.View view) {
android.widget.Toast.makeText(this, "onRevokeAccessClick", Toast.LENGTH_SHORT).show();
boolean isConnecting = googleApiClient.isConnecting();
android.util.Log.e(com.sarahehabm.carbcalculator.login.LoginActivity.TAG, ("onRevokeAccessClick; client.isCo... | public void onRevokeAccessClick(android.view.View view) {
boolean isConnecting = googleApiClient.isConnecting();
android.util.Log.e(com.sarahehabm.carbcalculator.login.LoginActivity.TAG, ("onRevokeAccessClick; client.isConnecting()= " + isConnecting));
if (!isConnecting) {
Plus.AccountApi.clearDefau... |
public void testGetAndAddPossibleState() {
model.MarkovChain mc = new model.MarkovChain("foo");
assertEquals(mc.getPossibleState(), "");
mc.addState("bar");
assertEquals(mc.getPossibleState(), "bar");
mc.addState("foobar");
assertTrue((((mc.getPossibleState()) == "bar") || ((mc.getPossibleState(... | public void testGetAndAddPossibleState() {
model.MarkovChain mc = new model.MarkovChain("foo");
assertEquals(mc.getPossibleState(), "");
mc.addState("bar");
assertEquals(mc.getPossibleState(), "bar");
mc.addState("foobar");
java.lang.String result = mc.getPossibleState();
assertTrue(((result... |
public boolean isRoundActive() {
int numberOfPlayers = players.size();
int count = 0;
for (scripts.Player p : players)
if (p.isFolded())
count++;
if ((count > 0) && (count < numberOfPlayers)) {
return true;
}
for (scripts.Player p : players) {
p.... | public boolean isRoundActive() {
int numberOfPlayers = players.size();
int count = 0;
for (scripts.Player p : players)
if (p.isFolded())
count++;
table = new scripts.Table();
round = new scripts.Round(this);
round.preFlop();
return false;
} |
public void addOrder(com.at.ac.tuwien.sepm.ss15.edulium.domain.Order order) throws com.at.ac.tuwien.sepm.ss15.edulium.domain.validation.ValidationException, com.at.ac.tuwien.sepm.ss15.edulium.service.ServiceException {
com.at.ac.tuwien.sepm.ss15.edulium.service.impl.OrderServiceImpl.LOGGER.debug(("Entering addOrder... | public void addOrder(com.at.ac.tuwien.sepm.ss15.edulium.domain.Order order) throws com.at.ac.tuwien.sepm.ss15.edulium.domain.validation.ValidationException, com.at.ac.tuwien.sepm.ss15.edulium.service.ServiceException {
com.at.ac.tuwien.sepm.ss15.edulium.service.impl.OrderServiceImpl.LOGGER.debug(("Entering addOrder... |
protected int obtainRandomMsgsPosition(java.util.List<org.openqa.selenium.WebElement> msgs) {
int randomPosition = com.blackwolves.seeder.YahooRunnable.randInt(0, ((msgs.size()) >= 50 ? 49 : (msgs.size()) - 1));
com.blackwolves.seeder.YahooRunnable.logger.info(("*****************obtainRandomMsgsPosition : " + r... | protected int obtainRandomMsgsPosition(java.util.List<org.openqa.selenium.WebElement> msgs) {
int randomPosition = com.blackwolves.seeder.YahooRunnable.randInt(0, ((msgs.size()) >= 50 ? 49 : (msgs.size()) == 0 ? 0 : (msgs.size()) - 1));
com.blackwolves.seeder.YahooRunnable.logger.info(("*****************obtainR... |
private int checkDown(int x, int y) {
try {
if (rooms.get(new com.tda367.infinityrun.Roomtemplates.IndexPoint(x, (y - 1))).u) {
}
} catch (java.lang.NullPointerException n) {
java.lang.System.out.println("Down");
return 0;
}
if (rooms.get(new com.tda367.infinityrun.Roomte... | private int checkDown(int x, int y) {
try {
if (rooms.get(new com.tda367.infinityrun.Roomtemplates.IndexPoint(x, (y - 1))).u) {
}
} catch (java.lang.NullPointerException n) {
return 0;
}
if (rooms.get(new com.tda367.infinityrun.Roomtemplates.IndexPoint(x, (y - 1))).u) {
r... |
public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
com.example.ak.firebaseauthdemo.UserInformation user = dataSnapshot.getValue(com.example.ak.firebaseauthdemo.UserInformation.class);
if ((user.getName()) != "default") {
java.lang.String string = (("Name: " + (user.getNam... | public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
com.example.ak.firebaseauthdemo.UserInformation user = dataSnapshot.getValue(com.example.ak.firebaseauthdemo.UserInformation.class);
if (user != null) {
if ((user.getName()) != "default") {
java.lang.String st... |
public static void checkMovement2Started() {
if (((dCompletion) < (((dStartToFrontStepBoard) / (dStartToBox)) + (dTrackMargin))) && ((dCompletion) > (((dStartToFrontStepBoard) / (dStartToBox)) - (dTrackMargin)))) {
bMovement2Started = true;
}
} | public void checkMovement2Started() {
if (((dCompletion) < (((dStartToFrontStepBoard) / (dStartToBox)) + (dTrackMargin))) && ((dCompletion) > (((dStartToFrontStepBoard) / (dStartToBox)) - (dTrackMargin)))) {
bMovement2Started = true;
}
} |
public static void addAurora(final org.blockartistry.mod.DynSurround.data.AuroraData data) {
if (!(org.blockartistry.mod.DynSurround.ModOptions.getAuroraEnable()))
return ;
if (((org.blockartistry.mod.DynSurround.client.AuroraEffectHandler.auroraDimension) != (data.dimensionId)) || ((org.blockartis... | public static void addAurora(final org.blockartistry.mod.DynSurround.data.AuroraData data) {
if (!(org.blockartistry.mod.DynSurround.ModOptions.getAuroraEnable()))
return ;
synchronized(org.blockartistry.mod.DynSurround.client.AuroraEffectHandler.auroras) {
if (((org.blockartistry.mod.DynSu... |
public void caseMJCopyStmt(matjuice.transformer.MJCopyStmt stmt) {
inFlowSets.put(stmt, copy(currentInSet));
currentOutSet = copy(currentInSet);
java.lang.String lhs = stmt.getVarName();
currentOutSet.remove(lhs);
matjuice.analysis.MallocSite m = matjuice.analysis.MallocSite.newLocalSite();
matj... | public void caseMJCopyStmt(matjuice.transformer.MJCopyStmt stmt) {
inFlowSets.put(stmt, copy(currentInSet));
currentOutSet = copy(currentInSet);
java.lang.String lhs = stmt.getVarName();
currentOutSet.remove(lhs);
matjuice.analysis.MallocSite m = matjuice.analysis.MallocSite.newLocalSite();
matj... |
public boolean onTouch(android.view.View v, android.view.MotionEvent e) {
switch (e.getAction()) {
case android.view.MotionEvent.ACTION_DOWN :
btn_showHide.setPressed(true);
txt_title.setPressed(true);
break;
case android.view.MotionEvent.ACTION_UP :
b... | public boolean onTouch(android.view.View v, android.view.MotionEvent e) {
switch (e.getAction()) {
case android.view.MotionEvent.ACTION_DOWN :
btn_showHide.setPressed(true);
txt_title.setPressed(true);
break;
case android.view.MotionEvent.ACTION_UP :
b... |
public void hunt(ypmf.Creature target) {
java.util.List<ypmf.Point> points = new ypmf.Path(creature, target.x, target.y).points();
int mx = (points.get(0).x) - (creature.x);
int my = (points.get(0).y) - (creature.y);
creature.moveBy(mx, my, 0);
} | public void hunt(ypmf.Creature target) {
java.util.List<ypmf.Point> points = new ypmf.Path(creature, target.x, target.y).points();
if (points != null) {
int mx = (points.get(0).x) - (creature.x);
int my = (points.get(0).y) - (creature.y);
creature.moveBy(mx, my, 0);
}
} |
public AsyncTcpSocket.EventHandler onConnect(io.datakernel.eventloop.AsyncTcpSocket conn) {
removePendingSocketConnect(address);
io.datakernel.http.ExposedLinkedList<io.datakernel.http.AbstractHttpConnection> pool = ipConnectionLists.get(address);
if (pool == null) {
pool = new io.datakernel.http.Ex... | public AsyncTcpSocket.EventHandler onConnect(io.datakernel.eventloop.AsyncTcpSocket conn) {
removePendingSocketConnect(address);
io.datakernel.http.ExposedLinkedList<io.datakernel.http.AbstractHttpConnection> pool = ipConnectionLists.get(address);
if (pool == null) {
pool = new io.datakernel.http.Ex... |
public static void main(java.lang.String[] args) {
edu.princeton.cs.algs4.Picture picture = new edu.princeton.cs.algs4.Picture(new java.io.File(("C:\\Users\\Borui Wang\\Desktop\\Borui Wang\\Coursera\\Algorithms Part 2\\" + ("Algorithms Part 2\\assignments\\ProgrammingAssignment2SeamCarvingHelpCenter\\" + "seamCarvi... | public static void main(java.lang.String[] args) {
edu.princeton.cs.algs4.Picture picture = new edu.princeton.cs.algs4.Picture(new java.io.File(("C:\\Users\\Borui Wang\\Desktop\\Borui Wang\\Coursera\\Algorithms Part 2\\" + ("Algorithms Part 2\\assignments\\ProgrammingAssignment2SeamCarvingHelpCenter\\" + "seamCarvi... |
private void updateWowButtonText(boolean wowed, int wowCount) {
if (wowed) {
if (wowCount == 1) {
wowStatText.setText("You WoWed this.");
newWowButton.setChecked(true);
}else {
wowStatText.setText((("You and other " + (wowCount - 1)) + " WoWed."));
new... | private void updateWowButtonText(boolean wowed, int wowCount) {
if (wowed) {
if (wowCount == 1) {
wowStatText.setText("You WoWed this.");
newWowButton.setChecked(true);
}else {
wowStatText.setText((("You and other " + (wowCount - 1)) + " WoWed."));
new... |
private void addR2VEdgeWithoutSaving(java.lang.Long ccmId, java.lang.Long icmId, java.lang.String edgePort, java.lang.String edgeName, net.stigmod.service.RelationNode relationNode, java.lang.String valueName, java.util.Map<java.lang.String, net.stigmod.service.ValueNode> valueNodePool) {
net.stigmod.service.ValueN... | private void addR2VEdgeWithoutSaving(java.lang.Long ccmId, java.lang.Long icmId, java.lang.String edgePort, java.lang.String edgeName, net.stigmod.service.RelationNode relationNode, java.lang.String valueName, java.util.Map<java.lang.String, net.stigmod.service.ValueNode> valueNodePool) {
net.stigmod.service.ValueN... |
public void onClick(android.view.View v) {
if ((loginFragmentOnClickListener) != null) {
android.os.Bundle bundle = new android.os.Bundle();
bundle.putString(com.example.adriftbookclient.oobhomeworkclient.LoginFragment.USER_NAME, userNameEt.getText().toString());
bundle.putString(com.example... | public void onClick(android.view.View v) {
if ((loginFragmentOnClickListener) != null) {
android.os.Bundle bundle = new android.os.Bundle();
bundle.putString(com.example.adriftbookclient.oobhomeworkclient.LoginFragment.USER_NAME, userNameEt.getText().toString().trim());
bundle.putString(com.... |
public boolean matches(int[] tuple) {
int a = 0;
int b = 0;
for (int i = 0; i < (tuple.length); i++) {
if ((tuple[i]) == majority)
a++;
else
if ((tuple[i]) == minority)
b++;
}
return (a == ((size) - 1)) && (b == 1);
} | public boolean matches(int[] tuple) {
int a = 0;
int b = 0;
for (int i = 0; i < (tuple.length); i++) {
if ((tuple[i]) == majority)
a++;
else
if ((tuple[i]) == minority)
b++;
else
return false;
}
... |
public void removeAttachmentFromRecord(java.io.File attachment, uk.ac.ucl.excites.sapelli.storage.model.Record record) {
long creationTimeOffset = getCreationTimeOffsetFromFile(attachment);
java.util.List<java.lang.Long> offsets = getCurrentAttachmentOffsets(record);
if (offsets != null) {
if (offse... | public void removeAttachmentFromRecord(java.io.File attachment, uk.ac.ucl.excites.sapelli.storage.model.Record record) {
if (record == null)
return ;
long creationTimeOffset = getCreationTimeOffsetFromFile(attachment);
java.util.List<java.lang.Long> offsets = getCurrentAttachmentOffsets(record)... |
public void run() {
while (connecting) {
try {
java.lang.Thread.sleep(1000);
} catch (java.lang.InterruptedException e) {
e.printStackTrace();
}
(waiting)++;
if ((waiting) == 10) {
h.obtainMessage(com.robic.zoran.moonstalker.BlueToothServic... | public void run() {
while (connecting) {
try {
java.lang.Thread.sleep(1000);
} catch (java.lang.InterruptedException e) {
e.printStackTrace();
}
(waiting)++;
if ((waiting) == 10) {
h.obtainMessage(com.robic.zoran.moonstalker.BlueToothServic... |
private javax.swing.ImageIcon getImageForModule(com.prplplus.shipconstruct.Module m) {
int scaleFactor = 32 / (java.lang.Math.max(3, java.lang.Math.max(m.width, m.height)));
java.awt.Image i = m.image;
if (i == null) {
return null;
}
i = i.getScaledInstance(((m.width) * scaleFactor), ((m.hei... | private javax.swing.ImageIcon getImageForModule(com.prplplus.shipconstruct.Module m) {
int scaleFactor = java.lang.Math.max(1, (32 / (java.lang.Math.max(3, java.lang.Math.max(m.width, m.height)))));
java.awt.Image i = m.image;
if (i == null) {
return null;
}
i = i.getScaledInstance(((m.width... |
public void applyFigure(final hrytsak.xo.model.Field field, final hrytsak.xo.model.Figure figure, final java.awt.Point point) throws hrytsak.xo.model.exception.AlreadyOccupiedException, hrytsak.xo.model.exception.InvalidPointException {
if ((field.getFigure(point)) != null) {
throw new hrytsak.xo.model.exce... | public void applyFigure(final hrytsak.xo.model.Field field, final java.awt.Point point, final hrytsak.xo.model.Figure figure) throws hrytsak.xo.model.exception.AlreadyOccupiedException, hrytsak.xo.model.exception.InvalidPointException {
if ((field.getFigure(point)) != null) {
throw new hrytsak.xo.model.exce... |
private void updateTileSourceSummary() {
fillTileSourcesToPreference(tileSourcePreference, osmandSettings.MAP_TILE_SOURCES.get(), false);
fillTileSourcesToPreference(overlayPreference, osmandSettings.MAP_OVERLAY.get(), true);
fillTileSourcesToPreference(underlayPreference, osmandSettings.MAP_UNDERLAY.get(),... | private void updateTileSourceSummary() {
fillTileSourcesToPreference(tileSourcePreference, osmandSettings.MAP_TILE_SOURCES.get(), false);
fillTileSourcesToPreference(overlayPreference, osmandSettings.MAP_OVERLAY.get(), true);
fillTileSourcesToPreference(underlayPreference, osmandSettings.MAP_UNDERLAY.get(),... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_boot_info);
datePickerDialog = new android.app.DatePickerDialog(this.getActivityContext(), this, 2017, 7, 10);
if ((mBootPresenter) == null) {
mBootPresenter = new... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_boot_info);
datePickerDialog = new android.app.DatePickerDialog(this.getActivityContext(), this, 2017, 7, 10);
if ((mBootPresenter) == null) {
mBootPresenter = new... |
public org.apache.openmeetings.db.entity.user.User loginUserByRemoteHash(java.lang.String SID, java.lang.String remoteHash) {
try {
org.apache.openmeetings.db.entity.server.Sessiondata sessionData = sessionDao.check(remoteHash);
if (sessionData != null) {
org.apache.openmeetings.db.entit... | public org.apache.openmeetings.db.entity.user.User loginUserByRemoteHash(java.lang.String SID, java.lang.String remoteHash) {
try {
org.apache.openmeetings.db.entity.server.Sessiondata sessionData = sessionDao.get(remoteHash);
if (sessionData != null) {
org.apache.openmeetings.db.entity.... |
public org.w3c.dom.Document getServiceInstanceProperties(java.net.URI serviceInstanceID, java.util.List<javax.xml.namespace.QName> propertiesList) throws org.opentosca.instancedata.service.ReferenceNotFoundException {
java.util.List<org.opentosca.model.instancedata.ServiceInstance> serviceInstances = getServiceInst... | public org.w3c.dom.Document getServiceInstanceProperties(java.net.URI serviceInstanceID, java.util.List<javax.xml.namespace.QName> propertiesList) throws org.opentosca.instancedata.service.ReferenceNotFoundException {
java.util.List<org.opentosca.model.instancedata.ServiceInstance> serviceInstances = this.getServic... |
public void damageEntity(int entityId, int damage) {
org.inaetics.dronessimulator.gameengine.common.state.GameEntity e = this.m_stateManager.getById(entityId);
if (e instanceof org.inaetics.dronessimulator.gameengine.common.state.HealthGameEntity) {
org.inaetics.dronessimulator.gameengine.common.state.H... | public void damageEntity(int entityId, int damage) {
org.inaetics.dronessimulator.gameengine.common.state.GameEntity e = this.m_stateManager.getById(entityId);
if (e != null) {
if (e instanceof org.inaetics.dronessimulator.gameengine.common.state.HealthGameEntity) {
org.inaetics.dronessimula... |
public edu.petrov.gojavaonline.calculator.BigInteger High() {
if ((size()) == 0) {
return new edu.petrov.gojavaonline.calculator.BigInteger();
}else
if ((size()) == 1) {
return new edu.petrov.gojavaonline.calculator.BigInteger(this);
}else {
edu.petrov.gojavaonlin... | public edu.petrov.gojavaonline.calculator.BigInteger High() {
if ((size()) == 0) {
return new edu.petrov.gojavaonline.calculator.BigInteger();
}else
if ((size()) == 1) {
return new edu.petrov.gojavaonline.calculator.BigInteger();
}else {
edu.petrov.gojavaonline.ca... |
public final void beginTransaction(boolean write) {
if ((inTransaction()) && ((!write) || (!(mDb.isReadOnly()))))
return ;
if (write)
openWrite();
else
openRead();
if (inTransaction())
mDb.beginTransaction();
} | public final void beginTransaction(boolean write) {
if ((inTransaction()) && ((!write) || (!(mDb.isReadOnly()))))
return ;
if (write)
openWrite();
else
openRead();
if (!(inTransaction()))
mDb.beginTransaction();
} |
java.lang.String buildScopeString(java.util.Set<java.lang.String> scopes, java.lang.String username, java.lang.String realm) {
java.util.Locale locale = getLocale(username, realm);
java.lang.StringBuilder sb = new java.lang.StringBuilder();
for (java.lang.String scope : scopes) {
sb.append(resolveSc... | java.lang.String buildScopeString(java.util.Collection<java.lang.String> scopes, java.lang.String username, java.lang.String realm) {
java.util.Locale locale = getLocale(username, realm);
java.lang.StringBuilder sb = new java.lang.StringBuilder();
for (java.lang.String scope : scopes) {
sb.append(re... |
public void onStopTrackingTouch(android.widget.SeekBar seekBar) {
if ((newCircle) != null) {
newCircle.remove();
}
com.google.android.gms.maps.model.CircleOptions circleOptions = new com.google.android.gms.maps.model.CircleOptions().center(latLng).radius(_radiusChanged).fillColor(1082797026).strokeC... | public void onStopTrackingTouch(android.widget.SeekBar seekBar) {
if ((newCircle) != null) {
newCircle.remove();
}
com.google.android.gms.maps.model.CircleOptions circleOptions = new com.google.android.gms.maps.model.CircleOptions().center(latLng).radius(_radiusChanged).fillColor(1082797026).strokeC... |
private void PopulateSpinners() {
java.lang.Integer[] array = new java.lang.Integer[50];
for (int i = 0; i < 50; i++) {
array[i] = i + 1;
}
androidexpList.setAdapter(new android.widget.ArrayAdapter<java.lang.Integer>(this, android.R.layout.simple_list_item_1, array));
iosexpList.setAdapter(n... | private void PopulateSpinners() {
java.lang.Integer[] array = new java.lang.Integer[50];
for (int i = 0; i < 50; i++) {
array[i] = i;
}
androidexpList.setAdapter(new android.widget.ArrayAdapter<java.lang.Integer>(this, android.R.layout.simple_list_item_1, array));
iosexpList.setAdapter(new a... |
public boolean isFinished(Player currentPlayer) {
if (isFilled()) {
winMessage = "Nobody wins!";
return true;
}
if (hasPlayerWon(currentPlayer)) {
winMessage = (currentPlayer.getName()) + " wins!";
return true;
}
return false;
} | public boolean isFinished(Player currentPlayer) {
if (hasPlayerWon(currentPlayer)) {
winMessage = (currentPlayer.getName()) + " wins!";
return true;
}
if (isFilled()) {
winMessage = "Nobody wins!";
return true;
}
return false;
} |
public void run() {
for (double d = currentTemperature.getMeasure_Double(); (currentTemperature.getMeasure_Double()) > (desiredTemperature.getMeasure_Double()); d--) {
HeizungServer.MeasureBean new_currentTemperature = new HeizungServer.MeasureBean(d, currentTemperature.getUnitOfMeasurement_Enum());
... | public void run() {
for (double d = currentTemperature.getMeasure_Double(); (currentTemperature.getMeasure_Double()) > (desiredTemperature.getMeasure_Double()); d--) {
HeizungServer.MeasureBean new_currentTemperature = new HeizungServer.MeasureBean(d, currentTemperature.getUnitOfMeasurement_Enum());
... |
private T steal() throws bag.ConcurrentBag.CannotStealException {
bag.ConcurrentBag<T>.ThreadMetaData md = localMetadata.get();
while (true) {
T item = nextStealItem();
if (item != null) {
java.util.concurrent.atomic.AtomicReferenceArray<T> stealBlock = bagArrayList.get(md.stealFromB... | private T steal() throws bag.ConcurrentBag.CannotStealException {
bag.ConcurrentBag<T>.ThreadMetaData md = localMetadata.get();
while (true) {
T item = nextStealItem();
if (item != null) {
java.util.concurrent.atomic.AtomicReferenceArray<T> stealBlock = bagArrayList.get(md.stealFromB... |
public static void main(java.lang.String[] args) throws java.io.FileNotFoundException, java.io.IOException {
try {
int i = java.lang.Integer.parseInt(args[0]);
java.lang.System.out.println(("k=" + i));
automapreduct.Automaton a = new automapreduct.Automaton();
a.loadFromFile("InputAu... | public static void main(java.lang.String[] args) throws java.io.FileNotFoundException, java.io.IOException {
try {
int i = java.lang.Integer.parseInt(args[0]);
java.lang.System.out.println(("k=" + i));
automapreduct.Automaton a = new automapreduct.Automaton();
a.loadFromFile("InputAu... |
public void start(javafx.stage.Stage primaryStage) throws java.lang.Exception {
javafx.scene.Parent root = javafx.fxml.FXMLLoader.load(getClass().getResource("sample.fxml"));
primaryStage.setTitle("Hello World");
primaryStage.setScene(new javafx.scene.Scene(root, 300, 275));
primaryStage.show();
Syn... | public void start(javafx.stage.Stage primaryStage) throws java.lang.Exception {
javafx.scene.Parent root = javafx.fxml.FXMLLoader.load(getClass().getResource("sample.fxml"));
primaryStage.setTitle("Hello World");
primaryStage.setScene(new javafx.scene.Scene(root, 300, 275));
primaryStage.show();
Syn... |
public net.meisen.dissertation.model.descriptors.NullDescriptor<I> getNullDescriptor() throws net.meisen.dissertation.exceptions.DescriptorModelException {
if (!(supportsNullDescriptor())) {
exceptionRegistry.throwRuntimeException(net.meisen.dissertation.exceptions.DescriptorModelException.class, 1004, getI... | public net.meisen.dissertation.model.descriptors.NullDescriptor<I> getNullDescriptor() throws net.meisen.dissertation.exceptions.DescriptorModelException {
if (!(supportsNullDescriptor())) {
exceptionRegistry.throwRuntimeException(net.meisen.dissertation.exceptions.DescriptorModelException.class, 1004, getI... |
public void stateChanged(org.apache.zookeeper.server.quorum.QuorumStateListener.State state, org.apache.zookeeper.server.quorum.QuorumPeer peer) {
if (((stateListeners) != null) && (!(stateListeners.isEmpty()))) {
if (((stateListeners) != null) && (!(stateListeners.isEmpty()))) {
org.apache.zook... | public void stateChanged(org.apache.zookeeper.server.quorum.QuorumStateListener.State state, org.apache.zookeeper.server.quorum.QuorumPeer peer) {
if (((stateListeners) != null) && (!(stateListeners.isEmpty()))) {
org.apache.zookeeper.server.quorum.QuorumStateHelper.Message message = new org.apache.zookeepe... |
static dagger.internal.codegen.ResolvedBindings create(dagger.internal.codegen.BindingKey bindingKey, java.util.Set<? extends dagger.internal.codegen.Binding> ownedBindings, java.util.Set<? extends dagger.internal.codegen.Binding> inheritedBindings) {
com.google.common.collect.ImmutableSet<dagger.internal.codegen.B... | static dagger.internal.codegen.ResolvedBindings create(dagger.internal.codegen.BindingKey bindingKey, java.util.Set<? extends dagger.internal.codegen.Binding> ownedBindings, java.util.Set<? extends dagger.internal.codegen.Binding> inheritedBindings) {
com.google.common.collect.ImmutableSet<dagger.internal.codegen.B... |
public synchronized int getLocalAMRMTokenKeyId() {
java.lang.Integer keyId = this.localTokenKeyId;
if (keyId == null) {
try {
if ((this.localToken) == null) {
throw new org.apache.hadoop.yarn.exceptions.YarnRuntimeException(("Missing AMRM token for " + (this.applicationAttemp... | public synchronized int getLocalAMRMTokenKeyId() {
java.lang.Integer keyId = this.localTokenKeyId;
if (keyId == null) {
try {
if ((this.localToken) == null) {
throw new org.apache.hadoop.yarn.exceptions.YarnRuntimeException(("Missing AMRM token for " + (this.applicationAttemp... |
public void refresh() {
if ((realManager.getToken()) == null) {
showLoadingEnded();
if (!(de.tum.in.tumcampus.auxiliary.NetUtils.isConnected(this)))
showNoInternetLayout();
else
de.tum.in.tumcampus.auxiliary.Utils.showToast(this, R.string.login_failed);
}... | public void refresh() {
if ((realManager.getToken()) == null) {
showLoadingEnded();
if (!(de.tum.in.tumcampus.auxiliary.NetUtils.isConnected(this)))
showNoInternetLayout();
else
de.tum.in.tumcampus.auxiliary.Utils.showToast(this, R.string.login_failed);
}... |
public void resetOrderTimes() {
java.lang.String sql = java.lang.String.format("UPDATE %s SET %s = 3, %s = 3, %s = 3", TABLE, ORDER_ONE, ORDER_TWO, ORDER_THREE);
try (java.sql.Statement statement = com.gmail.edenthink.tools.Driver.getConnection().createStatement()) {
statement.executeUpdate(sql);
} ... | public void resetOrderTimes() {
java.lang.String sql = java.lang.String.format("UPDATE %s SET %s = 3, %s = 3, %s = 3", TABLE, ORDER_ONE, ORDER_TWO, ORDER_THREE);
try (java.sql.Statement statement = com.gmail.edenthink.tools.Driver.getConnection().createStatement()) {
statement.executeUpdate(sql);
} ... |
public void removeIngredientFromMyList(java.lang.String listName, java.lang.String ingredient) {
myListIngredientsMap.get(listName).remove(ingredient);
if (sharedPref.contains((listName + (conor.navigationdrawer.Database.MY_LIST_INGREDIENTS)))) {
prefEditor.remove((listName + (conor.navigationdrawer.Dat... | public void removeIngredientFromMyList(java.lang.String listName, java.lang.String ingredient) {
myListIngredientsMap.get((listName + (conor.navigationdrawer.Database.MY_LIST_INGREDIENTS))).remove(ingredient);
if (sharedPref.contains((listName + (conor.navigationdrawer.Database.MY_LIST_INGREDIENTS)))) {
... |
public static void main(java.lang.String[] args) {
int difficulty = 3;
try {
difficulty = java.lang.Integer.parseInt(args[0]);
if (difficulty < 0) {
java.lang.System.out.println("Negative numbers not allowed, defaulting to dificulty = 3");
difficulty = 3;
}
} ... | public static void main(java.lang.String[] args) {
int difficulty = 3;
try {
difficulty = java.lang.Integer.parseInt(args[0]);
if (difficulty < 0) {
java.lang.System.out.println("Negative numbers not allowed, defaulting to dificulty = 3");
difficulty = 3;
}
} ... |
private static com.cliffcrosland.kirkpatrickseidel.Point2 findMax(java.util.List<com.cliffcrosland.kirkpatrickseidel.Point2> points, java.util.Comparator<com.cliffcrosland.kirkpatrickseidel.Point2> comp) {
com.cliffcrosland.kirkpatrickseidel.Point2 max = null;
for (com.cliffcrosland.kirkpatrickseidel.Point2 poi... | private static com.cliffcrosland.kirkpatrickseidel.Point2 findMax(java.util.List<com.cliffcrosland.kirkpatrickseidel.Point2> points, java.util.Comparator<com.cliffcrosland.kirkpatrickseidel.Point2> comp) {
com.cliffcrosland.kirkpatrickseidel.Point2 max = null;
for (com.cliffcrosland.kirkpatrickseidel.Point2 poi... |
public void actionPerformed(java.awt.event.ActionEvent arg0) {
if (inputValidated()) {
if ((savedDocs) == false) {
saveDocs(document.getDocId());
refreshTable();
enterUpdateState();
}else
updateDocs(idToUpdate);
}
} | public void actionPerformed(java.awt.event.ActionEvent arg0) {
if (inputValidated()) {
if ((savedDocs) == false) {
saveDocs(document.getDocId());
refreshTable();
enterUpdateState();
}else {
updateDocs(idToUpdate);
refreshTable();
}
... |
private int runPercolation(int n) {
Percolation percolation = new Percolation(n);
int blocksOpen = 0;
while (!(percolation.percolates())) {
int row = edu.princeton.cs.algs4.StdRandom.uniform(1, (n + 1));
int col = edu.princeton.cs.algs4.StdRandom.uniform(1, (n + 1));
percolation.open... | private int runPercolation(int n) {
Percolation percolation = new Percolation(n);
int blocksOpen = 0;
while (!(percolation.percolates())) {
int row = edu.princeton.cs.algs4.StdRandom.uniform(1, (n + 1));
int col = edu.princeton.cs.algs4.StdRandom.uniform(1, (n + 1));
percolation.open... |
private boolean isEverythingFilled() {
try {
boolean isEverythingFilled = (!(orgUnitView.getSelectedItem().equals(orgUnitDefaultOption))) && (!(programView.getSelectedItem().equals(programDefaultOption)));
if (tabGroupView.getSelectedItem().equals(tabGroupDefaultOption))
isEverythingFill... | private boolean isEverythingFilled() {
try {
boolean isEverythingFilled = (!(orgUnitView.getSelectedItem().equals(orgUnitDefaultOption))) && (!(programView.getSelectedItem().equals(programDefaultOption)));
return !isEverythingFilled ? false : !(tabGroupView.getSelectedItem().equals(tabGroupDefaultOp... |
private static float getAverageLuminance(java.awt.image.BufferedImage image, int x0, int y0, int width, int height) {
int cnt = 0;
float luminance = 0.0F;
for (int x = x0; x < (image.getWidth()); x += 10) {
for (int y = y0; y < (image.getHeight()); y += 10) {
luminance += de.acwhadk.rz.D... | private static float getAverageLuminance(java.awt.image.BufferedImage image, int x0, int y0, int width, int height) {
int cnt = 0;
float luminance = 0.0F;
for (int x = x0; x < (x0 + width); x += 10) {
for (int y = y0 - height; y < y0; y += 10) {
luminance += de.acwhadk.rz.DesktopBGChange... |
private void sendHPSyncMessage(java.lang.String message) {
kaist.game.battlecar.service.BluetoothService btService = kaist.game.battlecar.service.BluetoothService.getInstance(this);
if ((btService.getState()) != (kaist.game.battlecar.service.BluetoothService.STATE_CONNECTED)) {
android.widget.Toast.make... | private void sendHPSyncMessage(java.lang.String message) {
if ((btService.getState()) != (kaist.game.battlecar.service.BluetoothService.STATE_CONNECTED)) {
android.widget.Toast.makeText(this, R.string.not_connected, Toast.LENGTH_SHORT).show();
return ;
}
if ((message.length()) > 0) {
... |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
if (drawerToggle.onOptionsItemSelected(item)) {
return true;
}else
if ((item.getItemId()) == (R.id.action_add_flag)) {
item.setVisible(false);
switchToShareFragment();
}
return super.onOpt... | public boolean onOptionsItemSelected(android.view.MenuItem item) {
if (drawerToggle.onOptionsItemSelected(item)) {
return true;
}else
if ((item.getItemId()) == (R.id.action_add_flag)) {
switchToShareFragment();
}
return super.onOptionsItemSelected(item);
} |
public void toCheckoutActionPerformed(javafx.event.ActionEvent evt) {
if ((evt.getSource().equals(checkoutButton)) && (!((content) instanceof imat.viewcontroller.CheckOutViewController))) {
imat.viewcontroller.CheckOutViewController checkOutViewController = imat.viewcontroller.CheckOutViewController.load("C... | public void toCheckoutActionPerformed(javafx.event.ActionEvent evt) {
if ((evt.getSource().equals(checkoutButton)) && (!((content) instanceof imat.viewcontroller.CheckOutViewController))) {
imat.viewcontroller.CheckOutViewController checkOutViewController = imat.viewcontroller.CheckOutViewController.load("C... |
public unal.architecture.entity.User me(@javax.ws.rs.core.Context
javax.servlet.http.HttpServletRequest request) {
java.lang.Long userId = ((java.lang.Long) (request.getSession().getAttribute("user")));
userId = 1L;
if (userId == null)
throw new unal.architecture.rest.NotAuthorizedException("");
... | public unal.architecture.entity.User me(@javax.ws.rs.core.Context
javax.servlet.http.HttpServletRequest request) {
java.lang.Long userId = ((java.lang.Long) (request.getSession().getAttribute("user")));
if (userId == null)
throw new unal.architecture.rest.NotAuthorizedException("");
return em.f... |
private com.livae.util.tree.Btree<java.lang.Integer> createFullTree(int levels, int nodesPerPage) {
com.livae.util.tree.Btree<java.lang.Integer> tree = new com.livae.util.tree.Btree(nodesPerPage);
com.livae.util.Tuple<com.livae.util.tree.BtreePage<java.lang.Integer>, java.lang.Integer> root = createFullTree(tre... | private com.livae.util.tree.Btree<java.lang.Integer> createFullTree(int levels, int nodesPerPage) {
com.livae.util.tree.Btree<java.lang.Integer> tree = new com.livae.util.tree.Btree(nodesPerPage);
com.livae.util.Tuple<com.livae.util.tree.BtreePage<java.lang.Integer>, java.lang.Integer> root = createFullTree(tre... |
public void onClick(final com.google.gwt.event.dom.client.ClickEvent event) {
if ((localConfig) != null) {
java.lang.String removeString = removeThisCode.getText();
com.google.gwt.user.client.Window.alert(("config removed: " + (localConfig.getItem(removeString))));
localConfig.removeItem(rem... | public void onClick(final com.google.gwt.event.dom.client.ClickEvent event) {
if ((localConfig) != null) {
java.lang.String removeString = removeThisCode.getText();
com.google.gwt.user.client.Window.alert(("config removed: " + (localConfig.getItem(removeString))));
localConfig.removeItem(rem... |
public static void giveItem(net.minecraft.world.World world, net.minecraft.entity.player.EntityPlayer player, net.minecraft.block.Block block, int meta, int cnt, net.minecraft.util.BlockPos pos) {
net.minecraft.item.ItemStack oldStack = new net.minecraft.item.ItemStack(block, cnt, meta);
if (!(player.inventory.... | public static void giveItem(net.minecraft.world.World world, net.minecraft.entity.player.EntityPlayer player, net.minecraft.util.BlockPos pos, net.minecraft.item.ItemStack oldStack) {
if (!(player.inventory.addItemStackToInventory(oldStack))) {
net.minecraft.entity.item.EntityItem entityItem = new net.minec... |
public static void removeTower(int x, int y) {
java.util.Iterator<de.clemens_hartmann.checkpoint.core.Tower> iter = de.clemens_hartmann.checkpoint.core.TowerManager.towers.iterator();
while (iter.hasNext()) {
de.clemens_hartmann.checkpoint.core.Tower tower = iter.next();
if (((tower.getX()) == x... | public static void removeTower(int x, int y) {
java.util.Iterator<de.clemens_hartmann.checkpoint.core.Tower> iter = de.clemens_hartmann.checkpoint.core.TowerManager.towers.iterator();
while (iter.hasNext()) {
de.clemens_hartmann.checkpoint.core.Tower tower = iter.next();
if (((tower.getX()) == x... |
public void enableVelocityOverrideWithVelocity(double velocity) {
if ((override) == false) {
override = true;
overrideVelocity = velocity;
originalVelocity = velocityPID.getSetpoint();
velocityPID.setSetpoint(overrideVelocity);
}else {
overrideVelocity = velocity;
... | public void enableVelocityOverrideWithVelocity(double velocity) {
if ((velocityPID.getSetpoint()) < 0) {
velocity = -velocity;
}
if ((override) == false) {
override = true;
overrideVelocity = velocity;
originalVelocity = velocityPID.getSetpoint();
velocityPID.setSetpo... |
public org.springframework.http.ResponseEntity<za.org.grassroot.webapp.model.rest.ResponseWrappers.ResponseWrapper> createGroup(@za.org.grassroot.webapp.controller.rest.PathVariable(value = "phoneNumber")
java.lang.String phoneNumber, @za.org.grassroot.webapp.controller.rest.PathVariable(value = "code")
java.lang.Strin... | public org.springframework.http.ResponseEntity<za.org.grassroot.webapp.model.rest.ResponseWrappers.ResponseWrapper> registerUser(@za.org.grassroot.webapp.controller.rest.PathVariable(value = "phoneNumber")
java.lang.String phoneNumber, @za.org.grassroot.webapp.controller.rest.PathVariable(value = "code")
java.lang.Stri... |
public static com.emajar.trees.Node createBalancedTree(int[] array, int min, int max) {
if (max < min) {
return null;
}
int middle = (max - min) / 2;
com.emajar.trees.Node n = new com.emajar.trees.Node(array[middle]);
n.left = com.emajar.trees.CreateBalancedTree.createBalancedTree(array, 0, ... | public static com.emajar.trees.Node createBalancedTree(int[] array, int min, int max) {
if (max < min) {
return null;
}
int middle = (max + min) / 2;
com.emajar.trees.Node n = new com.emajar.trees.Node(array[middle]);
n.left = com.emajar.trees.CreateBalancedTree.createBalancedTree(array, min... |
public java.util.List<org.gitlab.api.models.GitlabMergeRequest> get(org.gitlab.api.models.GitlabProject project) throws java.io.IOException {
_requests.add(project);
final java.util.List<org.gitlab.api.models.GitlabMergeRequest> l = _responses.get(project);
return l == null ? java.util.Collections.<org.gitl... | public java.util.List<org.gitlab.api.models.GitlabMergeRequest> get(org.gitlab.api.models.GitlabProject project) throws java.io.IOException {
_requests.add(project);
final java.util.List<org.gitlab.api.models.GitlabMergeRequest> l = _responses.get(project.getId());
return l == null ? java.util.Collections.<... |
private void onceWrite(org.poco.framework.poi.managers.IPoiManager.IPoiSheet sheet, java.util.List<org.poco.framework.poi.managers.impl.ReadWriter.XMLDetail> onces, java.lang.Object data) {
java.lang.Object param = null;
for (org.poco.framework.poi.managers.impl.ReadWriter.XMLDetail xdetail : onces) {
p... | private void onceWrite(org.poco.framework.poi.managers.IPoiManager.IPoiSheet sheet, java.util.List<org.poco.framework.poi.managers.impl.ReadWriter.XMLDetail> onces, java.lang.Object data) {
java.lang.Object param = null;
for (org.poco.framework.poi.managers.impl.ReadWriter.XMLDetail xdetail : onces) {
p... |
public java.lang.Iterable<T> getBuildsAfter(java.lang.String n) {
return filterSkipped((isMyBuilds() ? dynamicBuildRepository.<T>getCurrentUserBuildsGreaterThan(((com.groupon.jenkins.dynamic.build.DbBackedProject) (owner)), n) : dynamicBuildRepository.<T>getBuildGreaterThan(((com.groupon.jenkins.dynamic.build.DbBac... | public java.lang.Iterable<T> getBuildsAfter(int n) {
return filterSkipped((isMyBuilds() ? dynamicBuildRepository.<T>getCurrentUserBuildsGreaterThan(((com.groupon.jenkins.dynamic.build.DbBackedProject) (owner)), n) : dynamicBuildRepository.<T>getBuildGreaterThan(((com.groupon.jenkins.dynamic.build.DbBackedProject) (... |
public void onPress(android.view.View view) {
android.widget.TextView tv = ((android.widget.TextView) (findViewById(R.id.person_name)));
java.lang.String deck = tv.getText().toString();
java.lang.System.out.println("pressed");
android.content.Intent intent = new android.content.Intent(this, com.example.... | public void onPress(android.view.View view) {
android.widget.TextView tv = ((android.widget.TextView) (view.findViewById(R.id.person_name)));
java.lang.String deck = tv.getText().toString();
android.content.Intent intent = new android.content.Intent(this, com.example.oce.langlock.MainContentActivity.class);... |
public void removeBook(int position) {
com.josephcmontgomery.bookscanner.Tools.BookInformation book = getBookFromDataSource(position);
if ((book.bookId) != (-1)) {
com.josephcmontgomery.bookscanner.Database.Database.deleteBookById(book.bookId, context);
cursor = com.josephcmontgomery.bookscanner... | public void removeBook(int position) {
com.josephcmontgomery.bookscanner.Tools.BookInformation book = getBookFromDataSource(position);
if ((book.bookId) != (-1)) {
com.josephcmontgomery.bookscanner.Database.Database.deleteBookById(book.bookId, context);
cursor = com.josephcmontgomery.bookscanner... |
private BSTreeNode<T> add(BSTreeNode<T> curr, BSTreeNode<T> t) {
if (curr == null) {
return t;
}else
if ((t.getData().compareTo(curr.getData())) < 0) {
curr.setLeft(add(root.getLeft(), t));
return curr;
}else {
curr.setRight(add(root.getRight(), t));
... | private BSTreeNode<T> add(BSTreeNode<T> curr, BSTreeNode<T> t) {
if (curr == null) {
return t;
}else
if ((t.getData().compareTo(curr.getData())) < 0) {
curr.setLeft(add(curr.getLeft(), t));
}else {
curr.setRight(add(curr.getRight(), t));
}
return ... |
public void create() throws java.io.IOException {
java.net.ServerSocket welcomeSocket = new java.net.ServerSocket(portNumber);
while (true) {
java.net.Socket connectionSocket = welcomeSocket.accept();
java.io.BufferedReader inFromClient = new java.io.BufferedReader(new java.io.InputStreamReader(... | public void create() throws java.io.IOException {
@java.lang.SuppressWarnings(value = "resource")
java.net.ServerSocket welcomeSocket = new java.net.ServerSocket(portNumber);
while (true) {
java.net.Socket connectionSocket = welcomeSocket.accept();
java.io.BufferedReader inFromClient = new j... |
public java.util.Calendar calcDataCobranca(java.lang.String dataCompra) {
java.util.Calendar cDataCobranca = controller.DataController.stringToCalendar(dataCompra);
if ((cDataCobranca.get(java.util.Calendar.DAY_OF_MONTH)) >= (diaVirada)) {
cDataCobranca.add(java.util.Calendar.MONTH, 1);
}
cDataC... | public java.util.Calendar calcDataCobranca(java.lang.String dataCompra) {
java.util.Calendar cDataCobranca = controller.DataController.stringToCalendar(dataCompra);
if ((diaVirada) > (diaVencimento)) {
cDataCobranca.add(java.util.Calendar.MONTH, 1);
}
if ((cDataCobranca.get(java.util.Calendar.DA... |
public void classNameFromTypeElement() {
javax.lang.model.util.Elements elements = compilationRule.getElements();
javax.lang.model.element.TypeElement element = elements.getTypeElement(java.lang.Object.class.getCanonicalName());
com.google.common.truth.Truth.assert_().that(dagger.internal.codegen.writer.Cla... | public void classNameFromTypeElement() {
javax.lang.model.util.Elements elements = compilationRule.getElements();
javax.lang.model.element.TypeElement element = elements.getTypeElement(java.lang.Object.class.getCanonicalName());
com.google.common.truth.Truth.assertThat(dagger.internal.codegen.writer.ClassNa... |
protected edu.umd.smile.object.ObjectBondTracker.ObjectBond findLoosenable(com.jme3.scene.Spatial guestItem, com.jme3.math.Vector3f clickedLocation) {
com.jme3.scene.Node guest = getNearestGuestBondPoint(guestItem, clickedLocation);
if (guest == null) {
return null;
}
edu.umd.smile.object.Object... | protected edu.umd.smile.object.ObjectBondTracker.ObjectBond findLoosenable(com.jme3.scene.Spatial guestItem, com.jme3.math.Vector3f clickedLocation) {
com.jme3.scene.Node guest = getNearestGuestBondPoint(guestItem, clickedLocation);
if (guest == null) {
return null;
}
edu.umd.smile.object.Object... |
public boolean next() throws java.sql.SQLException {
throwIfTimedOutOrClosed();
if ((cursor) != null) {
boolean next;
if (!(next = super.next())) {
throwIfTimedOut();
}
return next;
}else {
throwIfTimedOut();
return false;
}
} | public boolean next() throws java.sql.SQLException {
throwIfTimedOutOrClosed();
if ((cursor) != null) {
if (!(super.next())) {
throwIfTimedOut();
}
return true;
}else {
throwIfTimedOut();
return false;
}
} |
public void showClientIdentifiers(java.util.List<com.mifos.objects.noncore.Identifier> identifiers) {
if ((getActivity()) == null)
return ;
if ((identifiers != null) && ((identifiers.size()) > 0)) {
com.mifos.mifosxdroid.adapters.IdentifierListAdapter identifierListAdapter = new com.mifos.m... | public void showClientIdentifiers(java.util.List<com.mifos.objects.noncore.Identifier> identifiers) {
if ((getActivity()) == null)
return ;
this.identifiers = identifiers;
if ((identifiers != null) && ((identifiers.size()) > 0)) {
identifierListAdapter = new com.mifos.mifosxdroid.adapte... |
public void avgyro(org.ejml.data.DenseMatrix64F out) {
if ((acing) > 0) {
org.ejml.ops.CommonOps.scale((1 / (acing)), acgyro, out);
org.instk.demo_1001.INS.skew(vr_a, out);
}else
out.zero();
} | public void avgyro(org.ejml.data.DenseMatrix64F out) {
if ((acing) > 0) {
org.ejml.ops.CommonOps.scale((1 / (acing)), acgyro, vr_a);
org.instk.demo_1001.INS.skew(vr_a, out);
}else
out.zero();
} |
public static void setKeyframeToSkeleton(com.gemserk.tools.animationeditor.core.Skeleton skeleton, com.gemserk.tools.animationeditor.core.SkeletonAnimationKeyFrame keyframe) {
java.util.Set<java.lang.String> keySet = keyframe.jointKeyFrames.keySet();
for (java.lang.String jointId : keySet) {
float[] joi... | public static void setKeyframeToSkeleton(com.gemserk.tools.animationeditor.core.Skeleton skeleton, com.gemserk.tools.animationeditor.core.SkeletonAnimationKeyFrame keyframe) {
java.util.Set<java.lang.String> keySet = keyframe.jointKeyFrames.keySet();
for (java.lang.String jointId : keySet) {
float[] joi... |
public java.lang.ref.WeakReference<java.lang.Object> get(java.lang.Object obj) {
java.lang.ref.WeakReference<java.lang.Object> res = null;
java.lang.Long id = ((long) (obj.hashCode()));
java.util.List<java.lang.ref.WeakReference<java.lang.Object>> bucket = buckets.get(id);
if (bucket != null) {
... | public java.lang.ref.WeakReference<java.lang.Object> get(java.lang.Object obj) {
java.lang.ref.WeakReference<java.lang.Object> res = null;
java.lang.Long id = ((long) (obj.hashCode()));
java.util.List<java.lang.ref.WeakReference<java.lang.Object>> bucket = buckets.get(id);
if (bucket != null) {
... |
public void subscribe(java.util.regex.Pattern pattern, org.apache.kafka.clients.consumer.ConsumerRebalanceListener listener) {
acquire();
try {
if (pattern == null)
throw new java.lang.IllegalArgumentException("Topic pattern to subscribe to cannot be null");
org.apache.kafka... | public void subscribe(java.util.regex.Pattern pattern, org.apache.kafka.clients.consumer.ConsumerRebalanceListener listener) {
acquire();
try {
if (pattern == null)
throw new java.lang.IllegalArgumentException("Topic pattern to subscribe to cannot be null");
org.apache.kafka... |
public net.minecraft.item.ItemStack decrStackSize(int slot, int amount) {
net.minecraft.item.ItemStack stack = getStackInSlot(slot);
if ((stack != null) && (amount != 0)) {
if ((stack.stackSize) <= amount) {
setInventorySlotContents(slot, null);
}else {
stack = stack.spli... | public net.minecraft.item.ItemStack decrStackSize(int slot, int amount) {
net.minecraft.item.ItemStack stack = getStackInSlot(slot);
if ((stack != null) && (amount > 0)) {
if ((stack.stackSize) <= amount) {
setInventorySlotContents(slot, null);
}else {
stack = stack.split... |
boolean insertionMode = (aas == null) || (aas.isEmpty());
if (insertionMode)
return com.nextprot.api.isoform.mapper.utils.SequencePositionMapper.checkSequencePosition(sequence, pos, true);
return (com.nextprot.api.isoform.mapper.utils.SequencePositionMapper.checkSequencePosition(sequence, pos, ... | boolean insertionMode = (aas == null) || (aas.isEmpty());
if (insertionMode)
return com.nextprot.api.isoform.mapper.utils.SequencePositionMapper.checkSequencePosition(sequence, pos, true);
return (com.nextprot.api.isoform.mapper.utils.SequencePositionMapper.checkSequencePosition(sequence, pos, ... |
private <T extends net.tjeerd.onedrive.json.folder.Data> T convertTo(java.lang.Class<T> clazz) {
com.fasterxml.jackson.databind.ObjectMapper objectMapper = new com.fasterxml.jackson.databind.ObjectMapper();
try {
java.lang.String json = objectMapper.writerWithType(net.tjeerd.onedrive.json.folder.Data.cl... | private <T extends net.tjeerd.onedrive.json.folder.Data> T convertTo(java.lang.Class<T> clazz) {
com.fasterxml.jackson.databind.ObjectMapper objectMapper = new com.fasterxml.jackson.databind.ObjectMapper();
try {
java.lang.String json = objectMapper.writeValueAsString(this);
T f = objectMapper.r... |
public void onChange() {
try {
assertEquals(1, numberOfInvocation.incrementAndGet());
assertTrue(realmResults.isLoaded());
assertEquals(5, realmResults.getColumnLong());
assertEquals("The Endless River", realmResults.getColumnString());
} catch (junit.framework.AssertionFailedErr... | public void onChange() {
try {
assertEquals(1, numberOfInvocation.incrementAndGet());
assertTrue(realmResults.isLoaded());
assertEquals(0, realmResults.size());
} catch (junit.framework.AssertionFailedError e) {
threadAssertionError[0] = e;
} finally {
signalCallbackF... |
private void removeExpiredStickyFlags(org.dcache.pool.repository.MetaDataRecord entry) throws diskCacheV111.util.CacheException {
synchronized(entry) {
org.dcache.pool.repository.CacheEntry oldEntry = new org.dcache.pool.repository.v5.CacheEntryImpl(entry);
java.util.Collection<org.dcache.pool.repos... | private void removeExpiredStickyFlags(org.dcache.pool.repository.MetaDataRecord entry) throws diskCacheV111.util.CacheException {
synchronized(entry) {
org.dcache.pool.repository.CacheEntry oldEntry = new org.dcache.pool.repository.v5.CacheEntryImpl(entry);
java.util.Collection<org.dcache.pool.repos... |
private void payWithNewCard() {
android.content.Intent scanIntent = new android.content.Intent(this, io.card.payment.CardIOActivity.class);
scanIntent.putExtra(CardIOActivity.EXTRA_APP_TOKEN, ly.kite.checkout.PaymentActivity.CARD_IO_TOKEN);
scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_EXPIRY, true);
... | private void payWithNewCard() {
android.content.Intent scanIntent = new android.content.Intent(this, io.card.payment.CardIOActivity.class);
scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_EXPIRY, true);
scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CVV, true);
scanIntent.putExtra(CardIOActivity.EXTR... |
public void handle(org.fenixedu.cms.domain.Page page, org.fenixedu.cms.rendering.TemplateContext componentContext, org.fenixedu.cms.rendering.TemplateContext globalContext) {
org.fenixedu.academic.domain.Degree degree = degree(page);
globalContext.put("defaultView", "month");
globalContext.put("eventsUrl", ... | public void handle(org.fenixedu.cms.domain.Page page, org.fenixedu.cms.rendering.TemplateContext componentContext, org.fenixedu.cms.rendering.TemplateContext globalContext) {
org.fenixedu.academic.domain.Degree degree = degree(page);
globalContext.put("defaultView", "month");
globalContext.put("eventsUrl", ... |
public static <E extends java.lang.Enum<E>> void select(com.google.gwt.user.client.ui.ListBox cbo, E value) {
int count = cbo.getItemCount();
for (int i = 0; i < count; i++) {
if (cbo.getItemText(i).equals(value.toString())) {
cbo.setSelectedIndex(i);
break;
}
}
} | public static void select(com.google.gwt.user.client.ui.ListBox cbo, java.lang.String value) {
int count = cbo.getItemCount();
for (int i = 0; i < count; i++) {
if (cbo.getValue(i).equals(value)) {
cbo.setSelectedIndex(i);
break;
}
}
} |
public com.hobbes.wstore.FileByteChanges evict() {
com.hobbes.wstore.Path least = lru[currLeast];
lru[currLeast] = null;
com.hobbes.wstore.FileByteChanges ret = table.remove(least);
ret.writeLog();
currLeast = ((currLeast) + 1) % (size);
} | public com.hobbes.wstore.FileByteChanges evict() {
com.hobbes.wstore.Path least = lru[currLeast];
lru[currLeast] = null;
com.hobbes.wstore.FileByteChanges ret = table.remove(least);
ret.writeLog();
currLeast = ((currLeast) + 1) % (size);
return ret;
} |
public void onClick(com.google.gwt.event.dom.client.ClickEvent event) {
java.lang.System.out.println(("selectedValues::+" + (selValues.contains(domainStand.getCodeId().toString()))));
if (selValues.contains(domainStand.getCodeId().toString())) {
selectedValues.remove(domainStand.getCodeId());
}
... | public void onClick(com.google.gwt.event.dom.client.ClickEvent event) {
if (selValues.contains(domainStand.getCodeId().toString())) {
selectedValues.remove(domainStand.getCodeId());
}
standardsCode.removeStyleName("active");
removeGradeWidget(ulSelectedItems, domainStand.getCodeId());
liPane... |
public void lifeCheck(edu.oregonstate.cs361.battleship.Ship in) {
shipSunk = false;
if (in.isAlive()) {
if ((in.getHealth()) == 0) {
in.makeDed();
shipSunk = true;
}else {
shipSunk = false;
}
}else
if (!(in.isAlive())) {
shipSun... | public void lifeCheck(edu.oregonstate.cs361.battleship.Ship in) {
shipSunk = false;
if (in.isAlive()) {
if ((in.getHealth()) == 0) {
in.makeDed();
shipSunk = true;
}else {
shipSunk = false;
}
}else {
shipSunk = false;
}
} |
private void removeExpiredCampaings(int currentDay) {
for (java.util.Map.Entry<java.lang.Integer, CampaignData> camp : myCampaigns.entrySet()) {
CampaignData campData = camp.getValue();
if ((campData.dayEnd) > currentDay)
myCampaigns.remove(campData.id);
}
} | private void removeExpiredCampaings(int currentDay) {
for (java.util.Map.Entry<java.lang.Integer, CampaignData> camp : myCampaigns.entrySet()) {
CampaignData campData = camp.getValue();
if ((campData.dayEnd) < currentDay)
myCampaigns.remove(campData.id);
}
} |
public java.util.List<edu.nju.logic.vo.AnswerVO> getAnswerByName(java.lang.String name) {
java.util.List<edu.nju.data.entity.Answer> answers = answerDAO.getAnswerByUserName(name);
java.util.List<edu.nju.logic.vo.AnswerVO> answerVOs = new java.util.ArrayList(answers.size());
for (edu.nju.data.entity.Answer a... | public java.util.List<edu.nju.logic.vo.AnswerVO> getAnswerByName(java.lang.String name) {
java.util.List<edu.nju.data.entity.Answer> answers = answerDAO.getAnswerByUserName(name);
java.util.List<edu.nju.logic.vo.AnswerVO> answerVOs = new java.util.ArrayList<>();
for (edu.nju.data.entity.Answer answer : answ... |
public net.binaryaura.customize.client.gui.huditem.HudItem get(java.lang.String name) {
for (net.binaryaura.customize.client.gui.huditem.HudItem hudItem : all.toArray(new net.binaryaura.customize.client.gui.huditem.HudItem[all.size()])) {
if (name.equals(hudItem.getName()))
return hudItem;
... | public net.binaryaura.customize.client.gui.huditem.HudItem get(java.lang.String name) {
for (net.binaryaura.customize.client.gui.huditem.HudItem hudItem : all.toArray(new net.binaryaura.customize.client.gui.huditem.HudItem[all.size()])) {
if (name.equals(hudItem.getName()))
return hudItem;
... |
public ch.helin.messages.dto.way.Waypoint convertToWaypointDto(models.WayPoint wayPoint) {
ch.helin.messages.dto.way.Waypoint wayPointDto = new ch.helin.messages.dto.way.Waypoint();
wayPointDto.setId(wayPoint.getId());
ch.helin.messages.dto.way.Position position = commons.gis.GisHelper.createPosition(wayPoi... | public ch.helin.messages.dto.way.Waypoint convertToWaypointDto(models.WayPoint wayPoint) {
ch.helin.messages.dto.way.Waypoint wayPointDto = new ch.helin.messages.dto.way.Waypoint();
wayPointDto.setId(wayPoint.getId());
ch.helin.messages.dto.way.Position position = commons.gis.GisHelper.createPosition(wayPoi... |
public java.lang.Object getValueAt(int row, int col) {
Download obj = downloadList.get(row);
switch (col) {
case 0 :
return obj.getUrlName();
case 1 :
int i = obj.getSize();
return i == (-1) ? "" : java.lang.Integer.toString(i);
case 2 :
re... | public java.lang.Object getValueAt(int row, int col) {
Download obj = downloadList.get(row);
switch (col) {
case 0 :
return obj.getUrlName();
case 1 :
int i = obj.getSize();
return i == (-1) ? "" : java.lang.Integer.toString(i);
case 2 :
re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.