buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private void adjustAttemptsForConnectionManager() {
if (shouldSetConnectionManager()) {
com.android.server.telecom.CreateConnectionProcessor.CallAttemptRecord record = new com.android.server.telecom.CreateConnectionProcessor.CallAttemptRecord(mPhoneAccountRegistrar.getSimCallManager(), mAttemptRecords.get(0... | private void adjustAttemptsForConnectionManager() {
if (shouldSetConnectionManager()) {
com.android.server.telecom.CreateConnectionProcessor.CallAttemptRecord record = new com.android.server.telecom.CreateConnectionProcessor.CallAttemptRecord(mPhoneAccountRegistrar.getSimCallManager(), mAttemptRecords.get(0... |
public void receiveCommit() {
this.state = "commit";
logString("receivedCommit");
readInput();
retryCommit : try {
java.lang.System.out.println(("aboutToSendAck:" + (this.state)));
coordinator.receiveAck("commit", this.participantNum);
} catch (java.lang.Exception e) {
logStr... | public void receiveCommit() {
this.state = "commit";
logString("receivedCommit");
readInput();
try {
java.lang.System.out.println(("aboutToSendAck:" + (this.state)));
coordinator.receiveAck("commit", this.participantNum);
} catch (java.lang.Exception e) {
logString("coordinat... |
public void run() {
train.addHistory(station.getName(), context.getGameLogic().getPlayerManager().getTurnNumber());
java.lang.System.out.println(((("Added to history: passed " + (station.getName())) + " on turn ") + (context.getGameLogic().getPlayerManager().getTurnNumber())));
junctionFailure(station);
... | public void run() {
train.addHistory(station, context.getGameLogic().getPlayerManager().getTurnNumber());
java.lang.System.out.println(((("Added to history: passed " + (station.getName())) + " on turn ") + (context.getGameLogic().getPlayerManager().getTurnNumber())));
junctionFailure(station);
collision... |
public int paga_reale_mazziere() {
fiches = (fiches) - (puntata);
if ((fiches) < 0) {
perso = true;
return (puntata) + ((fiches) + (puntata));
}
return (puntata) * 2;
} | public int paga_reale_mazziere() {
fiches = (fiches) - (puntata);
if ((fiches) < 0) {
perso = true;
int buf = fiches;
fiches = 0;
return (puntata) + (buf + (puntata));
}
return (puntata) * 2;
} |
private void MouseButtonCallback(long window, int button, int state, int arg3) {
java.lang.System.out.println(((((button + " ") + state) + " ") + arg3));
if (button == (org.lwjgl.glfw.GLFW.GLFW_MOUSE_BUTTON_1)) {
mouse_down = state == 1;
toInteract = world.closestEntity(current.getLocation(), 10... | private void MouseButtonCallback(long window, int button, int state, int arg3) {
java.lang.System.out.println(((((button + " ") + state) + " ") + arg3));
if ((button == (org.lwjgl.glfw.GLFW.GLFW_MOUSE_BUTTON_1)) && (state == 0)) {
mouse_down = state == 1;
toInteract = world.closestEntity(current... |
public java.lang.Long next() {
if (!(hasNext())) {
throw new java.util.NoSuchElementException();
}
long result = 0;
while (result == 0) {
result = puzzleStorage.puzzles[cursor];
(cursor)++;
}
return result;
} | public java.lang.Long next() {
long result = 0;
while (result == 0) {
if (!(hasNext())) {
throw new java.util.NoSuchElementException();
}
result = puzzleStorage.puzzles[cursor];
(cursor)++;
}
return result;
} |
public void done(com.parse.ParseUser user, com.parse.ParseException err) {
if (user == null) {
android.util.Log.d("MyApp", "Uh oh. The user cancelled the Facebook login.");
}else
if (user.isNew()) {
android.util.Log.d("MyApp", "User signed up and logged in through Facebook!");
... | public void done(com.parse.ParseUser user, com.parse.ParseException err) {
if (user == null) {
android.util.Log.d("MyApp", "Uh oh. The user cancelled the Facebook login.");
getUserDetailFromFB();
}else
if (user.isNew()) {
android.util.Log.d("MyApp", "User signed up and logged... |
public void onTouchMove(com.google.gwt.event.dom.client.TouchMoveEvent event) {
if (((initialX) == 0) && ((initialY) == 0)) {
com.google.gwt.dom.client.Touch touch = event.getTouches().get(0);
initialX = touch.getPageX();
initialY = touch.getPageY();
}
com.gwtmobile.ui.client.utils.U... | public void onTouchMove(com.google.gwt.event.dom.client.TouchMoveEvent event) {
if (((initialX) == 0) && ((initialY) == 0)) {
com.google.gwt.dom.client.Touch touch = event.getTouches().get(0);
initialX = touch.getPageX();
initialY = touch.getPageY();
}
} |
private com.smanzana.dungeonmaster.utils.StepList toStepList() {
com.smanzana.dungeonmaster.utils.StepList out = new com.smanzana.dungeonmaster.utils.StepList();
for (com.smanzana.dungeonmaster.ui.app.swing.editors.StepField.RangeSegment seg : segments) {
if (seg != null)
out.addStep(seg.get... | private com.smanzana.dungeonmaster.utils.StepList toStepList() {
com.smanzana.dungeonmaster.utils.StepList out = new com.smanzana.dungeonmaster.utils.StepList();
if ((segments) != null)
for (com.smanzana.dungeonmaster.ui.app.swing.editors.StepField.RangeSegment seg : segments) {
if (seg != n... |
private void remap(wyautl.core.Automaton automaton, int from, int to) {
for (int i = 0; i != (automaton.nStates()); ++i) {
java.lang.System.out.println(("BEFORE: " + (automaton.get(i))));
automaton.get(i).remap(from, to);
java.lang.System.out.println(("AFTER: " + (automaton.get(i))));
}
... | private void remap(wyautl.core.Automaton automaton, int from, int to) {
for (int i = 0; i != (automaton.nStates()); ++i) {
automaton.get(i).remap(from, to);
}
} |
private static int calculateScore(java.util.ArrayList<PairTime> pairTimes) {
int score = 0;
for (int i = 0; i < (pairTimes.size()); i++) {
score += pairTimes.get(i).getPair().getScore();
}
return score;
} | public static int calculateScore(java.util.ArrayList<PairTime> pairTimes) {
int score = 0;
for (int i = 0; i < (pairTimes.size()); i++) {
score += pairTimes.get(i).getPair().getScore();
}
return score;
} |
public void push(org.arcueidarc.nekoarc.types.ArcObject obj) {
for (; ;) {
try {
stack[((sp)++)] = obj;
return ;
} catch (java.lang.ArrayIndexOutOfBoundsException e) {
stackgc();
if ((sp) >= (stack.length))
throw new org.arcueidarc.neko... | public void push(org.arcueidarc.nekoarc.types.ArcObject obj) {
for (; ;) {
try {
stack[((sp)++)] = obj;
return ;
} catch (java.lang.ArrayIndexOutOfBoundsException e) {
(sp)--;
stackgc();
if ((sp) >= (stack.length))
throw new... |
private void updateJobOutput(java.lang.String uuid, com.kylinolap.job2.dao.JobOutputPO output) {
try {
if ((jobDao.getJobOutput(uuid)) != null) {
jobDao.deleteJobOutput(uuid);
}
jobDao.addOrUpdateJobOutput(uuid, output);
} catch (com.kylinolap.job2.exception.PersistentExcepti... | private void updateJobOutput(java.lang.String uuid, com.kylinolap.job2.dao.JobOutputPO output) {
try {
jobDao.addOrUpdateJobOutput(uuid, output);
} catch (com.kylinolap.job2.exception.PersistentException e) {
com.kylinolap.job2.service.DefaultJobService.logger.error(("fail to update job output i... |
static int minimaxDecision(State state) {
int action = 0;
int v = -(Minimax.MAX_NUMBER);
for (int a : Minimax.actions(state)) {
int temp = Minimax.minValue(Minimax.result(state, a));
if (temp > v) {
action = a;
}
}
return action;
} | public static int minimaxDecision(State state) {
int action = 0;
int v = -(Minimax.MAX_NUMBER);
for (int a : Minimax.actions(state)) {
int temp = Minimax.minValue(Minimax.result(state, a));
if (temp > v) {
v = temp;
action = a;
}
}
return action;
} |
public void PressButton(int i) {
if (com.kuna.ibeatcon_android.Controller.vb_feedback) {
android.os.Vibrator v = ((android.os.Vibrator) (getSystemService(Context.VIBRATOR_SERVICE)));
v.vibrate(100);
SendData(pressKey[i]);
android.util.Log.i("iBeatCon", (("Button " + i) + " Pressed wi... | public void PressButton(int i) {
if (com.kuna.ibeatcon_android.Controller.vb_feedback) {
android.os.Vibrator v = ((android.os.Vibrator) (getSystemService(Context.VIBRATOR_SERVICE)));
v.vibrate(100);
SendData(pressKey[i]);
}else {
SendData(pressKey[i]);
}
} |
public static java.lang.String getRedirectionPath(final org.fenixedu.bennu.core.domain.User user, final javax.servlet.http.HttpServletRequest request) {
synchronized(org.fenixedu.ulisboa.specifications.authentication.ULisboaAuthenticationRedirector.handlers) {
for (final org.fenixedu.ulisboa.specifications.... | public static java.lang.String getRedirectionPath(final org.fenixedu.bennu.core.domain.User user, final javax.servlet.http.HttpServletRequest request) {
for (final org.fenixedu.ulisboa.specifications.authentication.IULisboaRedirectionHandler iuLisboaRedirectionHandler : org.fenixedu.ulisboa.specifications.authentic... |
public java.lang.Integer getPortForBridge(java.lang.Integer nodeid) {
if (nodeid == null)
return null;
if (m_macsOnSegment.isEmpty()) {
for (org.opennms.netmgt.model.topology.BridgePort link : m_portsOnSegment) {
if ((link.getNode().getId().intValue()) == (nodeid.intValue()))
... | public org.opennms.netmgt.model.topology.BridgePort getBridgePort(java.lang.Integer nodeid) {
if (nodeid == null)
return null;
for (org.opennms.netmgt.model.topology.BridgePort link : m_portsOnSegment) {
if ((link.getNode().getId().intValue()) == (nodeid.intValue()))
return link... |
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mProgressDrawerManager.onSizeChanged(w, h);
mShapeDrawerManager.onSizeChanged(w, h, getPaddingLeft(), getPaddingTop(), getPaddingRight(), getPaddingBottom());
mBlurManager.onSizeChanged(w, h);
thi... | protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mProgressDrawerManager.onSizeChanged(w, h);
mShapeDrawerManager.onSizeChanged(w, h, getPaddingLeft(), getPaddingTop(), getPaddingRight(), getPaddingBottom());
mBlurManager.onSizeChanged(w, h);
} |
public java.lang.String handleUserDelete(@org.springframework.web.bind.annotation.PathVariable(value = "userName")
java.lang.String userName, @org.springframework.web.bind.annotation.ModelAttribute(value = "userDTO")
com.fithub.domain.UserDTO userDTO, org.springframework.web.servlet.mvc.support.RedirectAttributes redir... | public java.lang.String handleUserDelete(@org.springframework.web.bind.annotation.PathVariable(value = "userName")
java.lang.String userName, @org.springframework.web.bind.annotation.ModelAttribute(value = "userDTO")
com.fithub.domain.UserDTO userDTO, org.springframework.web.servlet.mvc.support.RedirectAttributes redir... |
public void display(com.badlogic.gdx.graphics.g2d.Batch batch) {
if (assetNeedUpdate)
assetManager();
chapter1Display(batch);
renderSharedAssets(batch);
if (!(viewingSettings)) {
switch (chapterSection) {
case 1 :
drawBG(batch);
break;
... | public void display(com.badlogic.gdx.graphics.g2d.Batch batch) {
if (assetNeedUpdate)
assetManager();
chapter1Display(batch);
if (!(viewingSettings)) {
switch (chapterSection) {
case 1 :
drawBG(batch);
break;
}
}
if (ansCorrect... |
private static org.apache.jmeter.control.ReplaceableController ensureReplaceableControllerIsLoaded(org.apache.jmeter.testelement.TestElement item) {
org.apache.jmeter.control.ReplaceableController rc;
if (item.getClass().getName().equals("org.apache.jmeter.control.ModuleController")) {
rc = ((org.apache... | private static org.apache.jmeter.control.ReplaceableController ensureReplaceableControllerIsLoaded(org.apache.jmeter.testelement.TestElement item) {
org.apache.jmeter.control.ReplaceableController rc;
if ("org.apache.jmeter.control.ModuleController".equals(item.getClass().getName())) {
rc = ((org.apache... |
public Item removeLast() {
Item item = array[last];
if (item == null) {
throw new java.util.NoSuchElementException();
}
array[last] = null;
(last)--;
(N)--;
subSize();
return item;
} | public Item removeLast() {
Item item = array[((last) - 1)];
if (item == null) {
throw new java.util.NoSuchElementException();
}
array[((last) - 1)] = null;
(N)--;
last = N;
subSize();
return item;
} |
public java.sql.Connection estaConnection() throws com.info.ghiny.examsystem.tools.ProcessException {
java.sql.Connection con = null;
try {
java.lang.Class.forName(curDriver);
con = java.sql.DriverManager.getConnection(curAddress);
} catch (java.lang.Exception err) {
throw new com.in... | public java.sql.Connection estaConnection() throws com.info.ghiny.examsystem.tools.ProcessException {
java.sql.Connection con;
try {
java.lang.Class.forName(curDriver);
con = java.sql.DriverManager.getConnection(curAddress);
} catch (java.lang.Exception err) {
throw new com.info.ghin... |
public javax.ws.rs.core.Response services() {
java.lang.String rendered = soyService.renderPlugin(pluginRegion, com.google.common.base.Optional.of(new com.jivesoftware.os.upena.deployable.region.ConfigPluginRegion.ConfigPluginRegionInput("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""... | public javax.ws.rs.core.Response services() {
java.lang.String rendered = soyService.renderPlugin(pluginRegion, com.google.common.base.Optional.of(new com.jivesoftware.os.upena.deployable.region.ConfigPluginRegion.ConfigPluginRegionInput("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""... |
public void onFailure(retrofit2.Call<com.sdsmdg.bookshareapp.BSA.api.models.LocalBooks.BookList> call, java.lang.Throwable t) {
android.util.Log.d("GA_search", ("searchOnFail " + (t.toString())));
refreshLayout.setRefreshing(false);
android.transition.TransitionManager.beginDelayedTransition(rootView);
... | public void onFailure(retrofit2.Call<com.sdsmdg.bookshareapp.BSA.api.models.LocalBooks.BookList> call, java.lang.Throwable t) {
android.util.Log.d("GA_search", ("searchOnFail " + (t.toString())));
refreshLayout.setRefreshing(false);
progressBar.setVisibility(View.GONE);
innerLayout.getForeground().setAl... |
public final void execute(final rx.functions.Action1<? super Result> onNext, final rx.functions.Action1<java.lang.Throwable> onError, Param param) {
viper.Interactor.checkNotNull(onNext, "onNext");
viper.Interactor.checkNotNull(onError, "onError");
execute(new rx.Subscriber<Result>() {
@java.lang.Ov... | public final void execute(final rx.functions.Action1<? super Result> onNext, final rx.functions.Action1<java.lang.Throwable> onError, Param param) {
viper.Interactor.checkNotNull(onNext, "onNext");
viper.Interactor.checkNotNull(onError, "onError");
execute(new rx.Subscriber<Result>() {
@java.lang.Ov... |
protected void draw(android.graphics.Canvas canvas) {
android.util.Log.i("ttangliang", ("isCanvasAcc = " + (canvas.isHardwareAccelerated())));
if ((center) == null) {
return ;
}
switch (style) {
case RECTANGLE :
break;
case CIRCLE :
canvas.drawCircle(cente... | protected void draw(android.graphics.Canvas canvas) {
if ((center) == null) {
return ;
}
switch (style) {
case RECTANGLE :
break;
case CIRCLE :
canvas.drawCircle(center.x, center.y, radius, paint);
break;
}
} |
public org.joda.time.Duration getEstimatedTime(@android.support.annotation.NonNull
org.cook_e.data.Step s) {
org.cook_e.data.Objects.requireNonNull(s, "step must not be null");
int index = searchStep(s.hashCode());
if (index != (-1)) {
long time = ((long) ((s.getTime().getMillis()) * (org.cook_e.dat... | public org.joda.time.Duration getEstimatedTime(@android.support.annotation.NonNull
org.cook_e.data.Step s) {
org.cook_e.data.Objects.requireNonNull(s, "step must not be null");
int index = searchStep(s.hashCode());
if (index >= 0) {
long time = ((long) ((s.getTime().getMillis()) * (org.cook_e.data.T... |
private void initLoaders() {
loaders = new java.util.TreeSet<org.owasp.esapi.configuration.AbstractPrioritizedPropertyLoader>();
try {
loaders.add(org.owasp.esapi.configuration.EsapiPropertyLoaderFactory.createPropertyLoader(EsapiConfiguration.OPSTEAM_ESAPI_CFG));
} catch (java.lang.Exception e) {
... | private void initLoaders() {
loaders = new java.util.TreeSet<org.owasp.esapi.configuration.AbstractPrioritizedPropertyLoader>();
try {
loaders.add(org.owasp.esapi.configuration.EsapiPropertyLoaderFactory.createPropertyLoader(EsapiConfiguration.OPSTEAM_ESAPI_CFG));
} catch (java.lang.Exception e) {
... |
protected java.lang.Integer doInBackground(java.lang.Void... voids) {
publishProgress(R.string.file_migration_preparing);
com.owncloud.android.lib.common.utils.Log_OC.stopLogging();
boolean[] syncStates = new boolean[0];
try {
publishProgress(R.string.file_migration_saving_accounts_configuration... | protected java.lang.Integer doInBackground(java.lang.Void... voids) {
publishProgress(R.string.file_migration_preparing);
com.owncloud.android.lib.common.utils.Log_OC.stopLogging();
boolean[] syncStates = null;
try {
publishProgress(R.string.file_migration_saving_accounts_configuration);
... |
public void setUp() throws java.lang.Exception {
prefs = net.sf.jabref.preferences.JabRefPreferences.getInstance();
net.sf.jabref.model.metadata.MetaData metaData = new net.sf.jabref.model.metadata.MetaData();
context = new net.sf.jabref.model.database.BibDatabaseContext(new net.sf.jabref.model.database.Bib... | public void setUp() throws java.lang.Exception {
prefs = net.sf.jabref.preferences.JabRefPreferences.getInstance();
net.sf.jabref.model.metadata.MetaData metaData = new net.sf.jabref.model.metadata.MetaData();
context = new net.sf.jabref.model.database.BibDatabaseContext(new net.sf.jabref.model.database.Bib... |
public void sleep() {
destroyInverseKinematicsRunnable();
if ((scheduled) == null) {
if (us.ihmc.darpaRoboticsChallenge.networkProcessor.kinematicsToolboxModule.KinematicsToolboxModule.DEBUG)
us.ihmc.tools.io.printing.PrintTools.error(this, "There is no task running.");
retu... | public void sleep() {
destroyInverseKinematicsRunnable();
activeMessageSource.set(null);
if ((scheduled) == null) {
if (us.ihmc.darpaRoboticsChallenge.networkProcessor.kinematicsToolboxModule.KinematicsToolboxModule.DEBUG)
us.ihmc.tools.io.printing.PrintTools.error(this, "There is no tas... |
public void resetTo(dyvil.tools.parsing.token.IToken token) {
this.tokens.jump(token);
if ((this.reportedMarkers) >= 0) {
this.markers.remove(this.reportedMarkers);
}
if ((this.splitTokens) == null) {
return ;
}
for (dyvil.tools.parsing.token.IToken splitToken : this.splitTokens)... | public void resetTo(dyvil.tools.parsing.token.IToken token) {
this.tokens.jump(token);
if ((this.splitTokens) == null) {
return ;
}
for (dyvil.tools.parsing.token.IToken splitToken : this.splitTokens) {
splitToken.prev().setNext(splitToken);
splitToken.next().setPrev(splitToken);... |
public void testClassWideAttributeInAnonymousClass() throws java.lang.Throwable {
@com.orhanobut.tracklytics.FixedAttribute(key = "key1", value = "value1")
class Foo {
@com.orhanobut.tracklytics.FixedAttribute(key = "key2", value = "value2")
class Inner {
@com.orhanobut.tracklytics.T... | public void testClassWideAttributeInAnonymousClass() throws java.lang.Throwable {
@com.orhanobut.tracklytics.FixedAttribute(key = "key1", value = "value1")
class Foo {
@com.orhanobut.tracklytics.FixedAttribute(key = "key2", value = "value2")
class Inner {
@com.orhanobut.tracklytics.T... |
public void set(java.lang.Boolean value) {
java.util.Collection<java.lang.Object> coll = container.get();
if (value) {
if (coll != null) {
if (!(coll.contains(item))) {
coll.add(item);
}
}else {
container.set(org.rapidoid.util.U.list(item));
... | public void set(java.lang.Boolean value) {
java.util.Collection<java.lang.Object> coll = container.get();
if (value) {
if (coll != null) {
if (!(coll.contains(item))) {
coll.add(item);
}
}else {
coll = org.rapidoid.util.U.list(item);
}
... |
public static double noteToFreq(int key) {
int note = key % (edu.utexas.cs.nn.util.sound.MIDIUtil.NOTES_IN_OCTAVE);
int octave = (key / (edu.utexas.cs.nn.util.sound.MIDIUtil.NOTES_IN_OCTAVE)) - 1;
return (edu.utexas.cs.nn.util.sound.MIDIUtil.NOTES[note]) * (java.lang.Math.pow(2.0, (((double) (octave)) - 1.0... | private static double noteToFreq(int key) {
int note = key % (edu.utexas.cs.nn.util.sound.MIDIUtil.NOTES_IN_OCTAVE);
int octave = (key / (edu.utexas.cs.nn.util.sound.MIDIUtil.NOTES_IN_OCTAVE)) - 1;
return (edu.utexas.cs.nn.util.sound.MIDIUtil.NOTES[note]) * (java.lang.Math.pow(2.0, (((double) (octave)) - 1.... |
void register(com.kk.bus.Bus bus, java.lang.Object objectToRegister, java.util.Set<java.lang.reflect.Method> subscriberMethods, com.kk.bus.DeliveryContext deliveryContext) {
synchronized(this) {
com.kk.bus.EventDeliverer eventDeliverer = mObjectDeliverers.get(objectToRegister);
if (eventDeliverer ==... | synchronized void register(com.kk.bus.Bus bus, java.lang.Object objectToRegister, java.util.Set<java.lang.reflect.Method> subscriberMethods, com.kk.bus.DeliveryContext deliveryContext) {
com.kk.bus.EventDeliverer eventDeliverer = mObjectDeliverers.get(objectToRegister);
if (eventDeliverer == null) {
eve... |
private void addCanvasToRootPane(javafx.scene.image.Image image) {
rootPane.setPrefWidth(image.getWidth());
rootPane.setPrefHeight(image.getHeight());
rootPane.getChildren().add(canvas);
javafx.scene.layout.StackPane.setAlignment(canvas, javafx.geometry.Pos.TOP_CENTER);
} | private void addCanvasToRootPane(javafx.scene.image.Image image) {
if (image == null) {
return ;
}
rootPane.setPrefWidth(image.getWidth());
rootPane.setPrefHeight(image.getHeight());
rootPane.getChildren().add(canvas);
javafx.scene.layout.StackPane.setAlignment(canvas, javafx.geometry.Po... |
public static void teleportPlayer(org.bukkit.entity.Player player, org.bukkit.Location location, org.bukkit.plugin.java.JavaPlugin plugin) {
int backupTask;
player.teleport(location);
backupTask = plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new net.madmanmarkau.MultiHome.ChunkResendTa... | public static void teleportPlayer(org.bukkit.entity.Player player, org.bukkit.Location location, org.bukkit.plugin.java.JavaPlugin plugin) {
int backupTask;
player.teleport(location);
backupTask = plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new net.madmanmarkau.MultiHome.ChunkResendTa... |
public void process(org.apache.camel.Exchange exchange) throws java.lang.Exception {
java.lang.System.out.println("TEST");
java.lang.String json = exchange.getIn().getBody(java.lang.String.class);
com.workflow2015.common.helper.RouteRequest routeRequest = JsonHelper.gson.fromJson(json, com.workflow2015.comm... | public void process(org.apache.camel.Exchange exchange) throws java.lang.Exception {
java.lang.String json = exchange.getIn().getBody(java.lang.String.class);
com.workflow2015.common.helper.RouteRequest routeRequest = JsonHelper.gson.fromJson(json, com.workflow2015.common.helper.RouteRequest.class);
java.la... |
public void changed(javafx.beans.value.ObservableValue<? extends java.lang.String> observable, java.lang.String oldValue, java.lang.String newValue) {
if (newValue.matches("\\d*")) {
processScheduler.logic.Message.PACK_SIZE = java.lang.Integer.parseInt(newValue);
}else {
intensity.setText(oldVal... | public void changed(javafx.beans.value.ObservableValue<? extends java.lang.String> observable, java.lang.String oldValue, java.lang.String newValue) {
if (newValue.matches("\\d*")) {
}else {
intensity.setText(oldValue);
}
processScheduler.logic.Strategy.TICKSFORMESSAGE = java.lang.Integer.parseI... |
private static java.lang.String getUniqueTitle(net.minecraft.world.World world) {
java.util.List<net.torocraft.nemesissystem.registry.Nemesis> nemeses = net.torocraft.nemesissystem.registry.NemesisRegistryProvider.get(world).list();
java.lang.String title = net.torocraft.nemesissystem.util.NemesisBuilder.getRan... | public static java.lang.String getUniqueTitle(net.minecraft.world.World world) {
java.util.List<net.torocraft.nemesissystem.registry.Nemesis> nemeses = net.torocraft.nemesissystem.registry.NemesisRegistryProvider.get(world).list();
java.lang.String title = net.torocraft.nemesissystem.util.NemesisBuilder.getRand... |
private java.lang.String parseHeadline(com.ximpleware.VTDNav vn) throws com.ximpleware.NavException {
edu.jhu.agiga.AgigaSentenceReader.require(vn.matchElement(AgigaConstants.DOC));
if (!(vn.toElement(VTDNav.FIRST_CHILD, AgigaConstants.HEADLINE))) {
edu.jhu.agiga.AgigaDocumentReader.log.finer("No headli... | private java.lang.String parseHeadline(com.ximpleware.VTDNav vn) throws com.ximpleware.NavException {
edu.jhu.agiga.AgigaSentenceReader.require(vn.matchElement(AgigaConstants.DOC));
if ((!(vn.toElement(VTDNav.FIRST_CHILD, AgigaConstants.HEADLINE))) || ((vn.getText()) == (-1))) {
edu.jhu.agiga.AgigaDocum... |
protected void onRetrieveInstanceState(android.os.Bundle savedInstanceState) {
if (savedInstanceState != null) {
stats = savedInstanceState.getBundle("champData");
}else {
android.os.Bundle extras = getIntent().getExtras();
isHeader = extras.getBoolean("isHeader");
stats = extras... | protected void onRetrieveInstanceState(android.os.Bundle savedInstanceState) {
if (savedInstanceState != null) {
stats = savedInstanceState.getBundle("champData");
isHeader = savedInstanceState.getBoolean("isHeader", false);
}else {
android.os.Bundle extras = getIntent().getExtras();
... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_nearby);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
registerLocationManager();
android.support.v4.app.FragmentTransaction ft = getSupportFragmentManager().... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_nearby);
if ((getSupportActionBar()) != null) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
registerLocationManager();
android.support.v4.app.... |
public void changeState(com.example.alexander_topilskii.internetradio.models.database.Station station) {
currentState = State.IS_WAIT;
listener.setPlayerStates((-1), State.IS_WAIT);
if ((mediaPlayer) == null)
initPlayer(station.getSource());
else {
if (mediaPlayer.isPlaying()) {
... | public void changeState(com.example.alexander_topilskii.internetradio.models.database.Station station) {
currentState = State.IS_WAIT;
if (station != null) {
listener.setPlayerStates((-1), State.IS_WAIT);
if ((mediaPlayer) == null)
initPlayer(station.getSource());
else {
... |
public static void removeEmployee(int id) {
StaffManager.Company.employeeList.remove((id - 1));
for (int i = id - 1; i < (StaffManager.Company.employeeList.size()); i++) {
StaffManager.Company.employeeList.get(i).setId((i + 1));
Employee.nextId -= 1;
}
} | public static void removeEmployee(int id) {
StaffManager.Company.employeeList.remove((id - 1));
for (int i = id - 1; i < (StaffManager.Company.employeeList.size()); i++) {
StaffManager.Company.employeeList.get(i).setId((i + 1));
}
} |
public int render() {
Gdx.gl.glClearColor(0.2F, 0.2F, 0.2F, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
stage.act(java.lang.Math.min(Gdx.graphics.getDeltaTime(), (1 / 30.0F)));
stage.draw();
if (finished)
return num;
else
return -1;
} | public int render() {
Gdx.gl.glClearColor(0.2F, 0.2F, 0.2F, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
stage.act(java.lang.Math.min(Gdx.graphics.getDeltaTime(), (1 / 30.0F)));
stage.draw();
return num;
} |
protected boolean isHovered(int mouseX, int mouseY) {
return (((mouseX >= (xPosition)) && (mouseX <= ((xPosition) + (width)))) && (mouseY >= (yPosition))) && (mouseY <= ((yPosition) + (height)));
} | public boolean isHovered(int mouseX, int mouseY) {
return (((mouseX >= (xPosition)) && (mouseX <= ((xPosition) + (width)))) && (mouseY >= (yPosition))) && (mouseY <= ((yPosition) + (height)));
} |
private void signout() {
android.content.SharedPreferences sharedPreferences = android.preference.PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
android.content.SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean(LogInActivity.IS_LOGGED_IN_STR, false);
... | private void signout() {
android.content.SharedPreferences sharedPreferences = android.preference.PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
android.content.SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean(LogInActivity.IS_LOGGED_IN_STR, false);
... |
public void update() {
pendingTime.set(db.getServerSettingInt("pendingTime"));
notificationInterval.set(db.getServerSettingInt("notificationInterval"));
debuggingStatus.set(false);
notifications = db.getNotifications();
triggers = ts.getConfiguredDevices(db.getTriggerDevices());
} | public void update() {
pendingTime.set(db.getServerSettingInt("pendingTime"));
notificationInterval.set(db.getServerSettingInt("notificationInterval"));
notifications = db.getNotifications();
triggers = ts.getConfiguredDevices(db.getTriggerDevices());
} |
public void onClick(com.gwtext.client.widgets.Button button, com.gwtext.client.core.EventObject e) {
com.gwtext.client.widgets.tree.DefaultSelectionModel dsm = ((com.gwtext.client.widgets.tree.DefaultSelectionModel) (entityTreePanel.getSelectionModel()));
com.gwtext.client.widgets.tree.TreeNode selectedNode = d... | public void onClick(com.gwtext.client.widgets.Button button, com.gwtext.client.core.EventObject e) {
com.gwtext.client.widgets.tree.DefaultSelectionModel dsm = ((com.gwtext.client.widgets.tree.DefaultSelectionModel) (entityTreePanel.getSelectionModel()));
com.gwtext.client.widgets.tree.TreeNode selectedNode = d... |
public void setValue(fd2editor.BaseSeg.VALUE whichValue, int sValue) {
sValue = sValue & 134217727;
if (sValue > (max)) {
sValue = max;
}
if (sValue < (min)) {
sValue = min;
}
switch (whichValue) {
case DEFAULT :
this.defaultValue = sValue;
break;
... | public void setValue(fd2editor.BaseSeg.VALUE whichValue, int sValue) {
if (sValue > (max)) {
sValue = max;
}
if (sValue < (min)) {
sValue = min;
}
switch (whichValue) {
case DEFAULT :
this.defaultValue = sValue;
break;
case RECOMMEND :
... |
public void addTransition(java.lang.String name, java.lang.Object source, java.lang.Object target) {
graph.getModel().beginUpdate();
try {
com.mxgraph.model.mxCell edge = ((com.mxgraph.model.mxCell) (graph.insertEdge(root, null, name, source, target)));
} finally {
graph.getModel().endUpdate... | public void addTransition(java.lang.String name, java.lang.Object source, java.lang.Object target) {
graph.getModel().beginUpdate();
try {
graph.insertEdge(root, null, name, source, target);
} finally {
graph.getModel().endUpdate();
}
} |
public void renderCreate(org.eclipse.rap.clientscripting.internal.ClientListenerBinding binding, org.eclipse.rwt.internal.protocol.IClientObject clientObject) {
clientObject.create(org.eclipse.rap.clientscripting.internal.ClientListenerBindingSynchronizer.TYPE);
clientObject.set("listener", org.eclipse.rap.clie... | public void renderCreate(org.eclipse.rap.clientscripting.internal.ClientListenerBinding binding, org.eclipse.rwt.internal.protocol.IClientObject clientObject) {
clientObject.create(org.eclipse.rap.clientscripting.internal.ClientListenerBindingSynchronizer.TYPE);
clientObject.set("listener", org.eclipse.rap.clie... |
public boolean removeUserFromResourcePermission(java.lang.String policyId, java.lang.String groupName, java.lang.String accountName) {
java.lang.String[] policyIds = policyId.split(":");
boolean userRemovedFromHDFSPolicy = this.hdfsAdminService.removeUserFromResourcePermission(policyIds[0], groupName, accountNa... | public boolean removeUserFromResourcePermission(java.lang.String policyId, java.lang.String groupName, java.lang.String accountName) {
java.lang.String[] policyIds = policyId.split(":");
boolean userRemovedFromYarnPolicy = this.yarnCommonService.removeUserFromQueuePermission(policyIds[0], groupName, accountName... |
public java.util.List<com.hearthsim.util.HearthActionBoardPair> playTurn(int turn, com.hearthsim.model.BoardModel board, com.hearthsim.util.factory.BoardStateFactoryBase factory) throws com.hearthsim.exception.HSException {
if (((baseNode) == null) || ((!(baseNode.turn.data_.equals(board))) && ((baseNode.turnNum) !... | public java.util.List<com.hearthsim.util.HearthActionBoardPair> playTurn(int turn, com.hearthsim.model.BoardModel board, com.hearthsim.util.factory.BoardStateFactoryBase factory) throws com.hearthsim.exception.HSException {
if (((baseNode) == null) || ((!(baseNode.turn.data_.equals(board))) && ((baseNode.turnNum) !... |
public int xToPixel(double x, mesquite.lib.MesquiteChart chart) {
tempNum.setValue(x);
int fieldWidth = chart.getFieldWidth();
int margin = chart.getMargin();
return (margin + (tempNum.setWithinBounds(minX, maxX, ((fieldWidth - (2 * margin)) - (markerWidth))))) - (chart.getXPixelBase());
} | public synchronized int xToPixel(double x, mesquite.lib.MesquiteChart chart) {
tempNum.setValue(x);
int fieldWidth = chart.getFieldWidth();
int margin = chart.getMargin();
int value = (margin + (tempNum.setWithinBounds(minX, maxX, ((fieldWidth - (2 * margin)) - (markerWidth))))) - (chart.getXPixelBase()... |
public void handleResetButtonAction(javafx.event.ActionEvent event) throws java.io.IOException {
java.lang.System.out.println("reseting level");
int i;
try {
i = java.lang.Integer.parseInt(levelNumber.getText());
} catch (java.lang.Exception e) {
return ;
}
resetButtons();
re... | public void handleResetButtonAction(javafx.event.ActionEvent event) throws java.io.IOException {
java.lang.System.out.println("reseting level");
int i;
try {
i = java.lang.Integer.parseInt(levelNumber.getText());
} catch (java.lang.Exception e) {
return ;
}
resetPieces();
res... |
private static soot.JastAddJ.PathPart createPathPart(java.lang.String s) {
try {
java.io.File f = new java.io.File(s);
if (f.isDirectory())
return new soot.JastAddJ.FolderPart(f);
else
if (f.isFile())
return new soot.JastAddJ.ZipFilePart(new java.util.... | private static soot.JastAddJ.PathPart createPathPart(java.lang.String s) {
try {
java.io.File f = new java.io.File(s);
if (f.isDirectory())
return new soot.JastAddJ.FolderPart(f);
else
if (f.isFile())
return new soot.JastAddJ.ZipFilePart(f);
... |
public void whenCheckingFitnessFeatureThrowsException_thenCorrespondingFitnessFeatureShouldBeFalse() {
org.corpus_tools.pepper.modules.PepperModule module = org.mockito.Mockito.mock(org.corpus_tools.pepper.modules.PepperModule.class);
org.mockito.Mockito.when(module.getDesc()).thenThrow(new java.lang.RuntimeExc... | public void whenCheckingFitnessFeatureThrowsException_thenCorrespondingFitnessFeatureShouldBeFalse() {
org.corpus_tools.pepper.modules.PepperModule module = org.mockito.Mockito.mock(org.corpus_tools.pepper.modules.PepperModule.class);
org.mockito.Mockito.when(module.getDesc()).thenThrow(new java.lang.RuntimeExc... |
public java.lang.String preLogin(javax.servlet.http.HttpServletRequest request) {
org.shaolin.vogerp.commonmodel.ICaptcherService service = IServerServiceManager.INSTANCE.getService(org.shaolin.vogerp.commonmodel.ICaptcherService.class);
org.shaolin.vogerp.commonmodel.be.ICaptcha captcha = service.getItem(servi... | public java.lang.String preLogin(javax.servlet.http.HttpServletRequest request) {
org.shaolin.vogerp.commonmodel.ICaptcherService service = IServerServiceManager.INSTANCE.getService(org.shaolin.vogerp.commonmodel.ICaptcherService.class);
org.shaolin.vogerp.commonmodel.be.ICaptcha captcha = service.getItem(servi... |
public boolean borrowBook(Library lib, java.lang.String title) {
if (lib.bookList.containsKey(title)) {
borrowedBooks.add(lib.bookList.get(title).get(0));
lib.bookList.get(title).remove(0);
return true;
}else {
java.lang.System.out.println("Book not Found");
return false;... | public boolean borrowBook(Library lib, java.lang.String title) {
if (lib.bookList.containsKey(title)) {
borrowedBooks.add(lib.bookList.get(title).get(0));
lib.bookList.get(title).remove(0);
return true;
}else {
return false;
}
} |
public void cfgSlaves(java.util.List<distrib.hadoop.host.Host> hosts) {
cmds.add(cfgSlaves("cat /dev/null >"));
cmds.add(cfgEnv((("echo '" + (distrib.hadoop.cluster.Spark.COMMENT_START)) + "' >>")));
for (distrib.hadoop.host.Host s : hosts) {
cmds.add(cfgSlaves((("echo " + (s.getHostName())) + " >>"... | public void cfgSlaves(java.util.List<distrib.hadoop.host.Host> hosts) {
cmds.add(cfgSlaves("cat /dev/null >"));
for (distrib.hadoop.host.Host s : hosts) {
cmds.add(cfgSlaves((("echo " + (s.getHostName())) + " >>")));
}
} |
private static java.lang.String prepareMessage(java.lang.String messageCode) {
java.lang.String message;
if ((java.lang.Integer.parseInt(messageCode)) > 4) {
message = "nowych orzeczeń";
}else
if ((java.lang.Integer.parseInt(messageCode)) > 1) {
message = "nowe orzeczenia";
... | private static java.lang.String prepareMessage(java.lang.String messageCode) {
if ((messageCode == null) || (messageCode.isEmpty())) {
return "nowe orzeczenie";
}
java.lang.String message;
if ((java.lang.Integer.parseInt(messageCode)) > 4) {
message = "nowych orzeczeń";
}else
... |
public static final void updatePlayer(net.minecraft.entity.player.EntityPlayer player) {
if (player instanceof net.minecraft.entity.player.EntityPlayerMP) {
net.minecraft.entity.player.EntityPlayerMP playerMP = ((net.minecraft.entity.player.EntityPlayerMP) (player));
net.ci010.attributesmod.properti... | public static final void updatePlayer(net.minecraft.entity.player.EntityPlayer player) {
if (player instanceof net.minecraft.entity.player.EntityPlayerMP) {
net.minecraft.entity.player.EntityPlayerMP playerMP = ((net.minecraft.entity.player.EntityPlayerMP) (player));
net.ci010.attributesmod.properti... |
public void onSuccess(final java.lang.Float volume) {
if (volume <= 0.0) {
com.connectsdk.core.Util.postSuccess(listener, null);
}else {
float newVolume = ((float) (volume - 0.01));
if (newVolume < 0.0)
newVolume = ((float) (0.0));
setVolume(newVolume, listen... | public void onSuccess(final java.lang.Float volume) {
if (volume >= 1.0) {
com.connectsdk.core.Util.postSuccess(listener, null);
}else {
float newVolume = ((float) (volume + 0.01));
if (newVolume > 1.0)
newVolume = ((float) (1.0));
setVolume(newVolume, listen... |
public void doListRecurseTest() throws java.lang.Exception {
java.util.Map m = new java.util.LinkedHashMap();
java.util.List a = new java.util.ArrayList();
m.put("b", "c");
m.put("a", a);
a.add("Hello");
a.add(a);
a.add(m);
java.lang.String json = new ru.yandex.strictweb.ajaxtools.presen... | public void doListRecurseTest() throws java.lang.Exception {
java.util.Map m = new java.util.LinkedHashMap();
java.util.List a = new java.util.ArrayList();
m.put("b", "c");
m.put("a", a);
a.add("Hello");
a.add(a);
a.add(m);
a.add(new java.util.LinkedHashMap());
java.lang.String json ... |
public void run() {
try {
synchronized(this) {
trafficLightsView.changeLight(TrafficLightsView.Light.RED);
java.lang.Thread.sleep(this.offset);
while (!(java.lang.Thread.interrupted())) {
trafficLightsView.changeLight(TrafficLightsView.Light.GREEN);
... | public void run() {
try {
trafficLightsView.changeLight(TrafficLightsView.Light.RED);
java.lang.Thread.sleep(this.offset);
while (!(java.lang.Thread.interrupted())) {
trafficLightsView.changeLight(TrafficLightsView.Light.GREEN);
java.lang.Thread.sleep(greenLightDurati... |
public void onCancel() {
android.util.Log.i("Cancel", "Canceled");
try {
android.util.Log.i("Webview Title: ", webview.getTitle());
} catch (java.lang.Exception e) {
android.util.Log.i("webview.getTitle(): ", e.toString());
}
bringBackWebView();
} | public void onCancel() {
android.util.Log.i("Cancel", "Canceled");
try {
android.util.Log.i("Webview Title: ", webview.getTitle());
} catch (java.lang.Exception e) {
android.util.Log.i("webview.getTitle(): ", e.toString());
}
} |
public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments().containsKey(org.shingo.shingoeventsapp.ui.events.EventDetailFragment.ARG_ITEM_ID)) {
org.shingo.shingoeventsapp.ui.events.EventDetailFragment.mEvent_id = getArguments().getString(org.shing... | public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments().containsKey(org.shingo.shingoeventsapp.ui.events.EventDetailFragment.ARG_ITEM_ID)) {
org.shingo.shingoeventsapp.ui.events.EventDetailFragment.mEvent_id = getArguments().getString(org.shing... |
private void runMission() {
this.currentStatus = main.java.game.ResistanceGame.GameStatus.AWAITING_MISSION_RESULT;
this.missionResult = new java.util.HashMap<>();
main.java.game.GameMessages.sendVoteResults(this.channel, this.voteTally);
try {
java.lang.Thread.sleep(5000);
} catch (java.lang... | private void runMission() {
this.missionResult = new java.util.HashMap<>();
main.java.game.GameMessages.sendVoteResults(this.channel, this.voteTally);
try {
java.lang.Thread.sleep(5000);
} catch (java.lang.InterruptedException e) {
e.printStackTrace();
}
if (this.voteResult(this.... |
public void input() throws java.io.IOException {
java.io.BufferedReader br = new java.io.BufferedReader(new java.io.InputStreamReader(java.lang.System.in));
java.lang.System.out.println("Enter data");
bno = java.lang.Integer.parseInt(br.readLine());
phno = java.lang.Integer.parseInt(br.readLine());
... | public void input() throws java.io.IOException {
java.io.BufferedReader br = new java.io.BufferedReader(new java.io.InputStreamReader(java.lang.System.in));
java.lang.System.out.println("Enter data");
bno = java.lang.Integer.parseInt(br.readLine());
phno = java.lang.Integer.parseInt(br.readLine());
... |
public void addFile(java.lang.String fileName, org.sem8.ds.rest.resource.NodeResource node) {
java.util.List<org.sem8.ds.rest.resource.NodeResource> temp;
temp = this.fileMap.get(node);
if (temp != null) {
temp.add(node);
}else {
temp = new java.util.ArrayList<org.sem8.ds.rest.resource.N... | public void addFile(java.lang.String fileName, org.sem8.ds.rest.resource.NodeResource node) {
java.util.List<org.sem8.ds.rest.resource.NodeResource> temp;
temp = this.fileMap.get(fileName);
if (temp != null) {
temp.add(node);
}else {
temp = new java.util.ArrayList<org.sem8.ds.rest.resour... |
public boolean checkImpl(wjtoth.cyclicstablematching.PreferenceSystem preferenceSystem) {
for (wjtoth.cyclicstablematching.Matching matching : matchings) {
wjtoth.cyclicstablematching.MatchingPS mathcingPS = new wjtoth.cyclicstablematching.MatchingPS(matching, preferenceSystem);
if ((mathcingPS.size... | public boolean checkImpl(wjtoth.cyclicstablematching.Matching matching, wjtoth.cyclicstablematching.PreferenceSystem preferenceSystem) {
wjtoth.cyclicstablematching.MatchingPS mathcingPS = new wjtoth.cyclicstablematching.MatchingPS(matching, preferenceSystem);
if ((mathcingPS.size()) == 0) {
return fals... |
private java.lang.String _revert(java.lang.String str) {
java.lang.String s = "";
int len = str.length();
for (int i = 0; i < len; i++) {
s += str.charAt(str.charAt(((len - 1) - i)));
}
return s;
} | private java.lang.String _revert(java.lang.String str) {
java.lang.String s = "";
int len = str.length();
for (int i = 0; i < len; i++) {
s += str.charAt(((len - 1) - i));
}
return s;
} |
public void onCompletion(org.apache.kafka.clients.producer.RecordMetadata metadata, java.lang.Exception exception) {
if (exception == null) {
org.apache.kafka.common.TopicPartition tp = new org.apache.kafka.common.TopicPartition(metadata.topic(), metadata.partition());
offsets.put(tp, metadata.offse... | public void onCompletion(org.apache.kafka.clients.producer.RecordMetadata metadata, java.lang.Exception exception) {
if (exception == null) {
org.apache.kafka.common.TopicPartition tp = new org.apache.kafka.common.TopicPartition(metadata.topic(), metadata.partition());
offsets.put(tp, metadata.offse... |
public java.lang.String runNode(java.lang.String input) throws SoFTlib.SoFTException {
int index = de.unidue.stud.maha.Main.getInputIndex(myChar());
int zahl = java.lang.Integer.valueOf(SoFTlib.Helper.words(input, 1, index, 1));
java.lang.String maskierer = de.unidue.stud.maha.Main.getMaskierer();
form(... | public java.lang.String runNode(java.lang.String input) throws SoFTlib.SoFTException {
int index = de.unidue.stud.maha.Main.getInputIndex(myChar());
int zahl = java.lang.Integer.valueOf(SoFTlib.Helper.words(input, 1, index, index));
java.lang.String maskierer = de.unidue.stud.maha.Main.getMaskierer();
f... |
public void unaryOp(int o) {
java.lang.String op;
switch (o) {
default :
case org.squiddev.cobalt.Lua.OP_UNM :
op = "neg";
break;
case org.squiddev.cobalt.Lua.OP_NOT :
op = "not";
break;
case org.squiddev.cobalt.Lua.OP_LEN :
... | public void unaryOp(int o) {
java.lang.String op;
switch (o) {
default :
case org.squiddev.cobalt.Lua.OP_UNM :
op = "neg";
break;
case org.squiddev.cobalt.Lua.OP_LEN :
op = "length";
break;
case org.squiddev.cobalt.Lua.OP_NOT :
... |
public java.util.Map<java.lang.Integer, int[]> getListOfCoordinates() {
java.util.Map<java.lang.Integer, int[]> listOfCoordinates = new java.util.HashMap<>();
int key = 0;
for (int y = 0; y < (Game.Controllers.BoardController.BOARDSIZE); y++) {
for (int x = 0; x < (Game.Controllers.BoardController.B... | public java.util.Map<java.lang.Integer, int[]> getListOfCoordinates() {
java.util.Map<java.lang.Integer, int[]> listOfCoordinates = new java.util.HashMap<>();
int key = 0;
for (int x = 0; x < (Game.Controllers.BoardController.BOARDSIZE); x++) {
for (int y = 0; y < (Game.Controllers.BoardController.B... |
private void processPicture(javax.servlet.http.Part picture, com.lavalloisir.beans.User user) {
java.lang.String pictureName = null;
try {
pictureName = getFileName(picture);
validPictureName(pictureName);
writeFile(picture, pictureName);
} catch (java.lang.Exception e) {
set... | private void processPicture(javax.servlet.http.Part picture, com.lavalloisir.beans.User user) {
java.lang.String pictureName = null;
try {
pictureName = getFileName(picture);
validPictureName(pictureName);
writeFile(picture, pictureName);
java.lang.String localPath = path.substri... |
public void replaceAllTextOnPage(int pageNumber, java.lang.String textToAdd) {
if ((pageNumber < 0) || (pageNumber >= (this.pages.length))) {
java.lang.System.out.println("Invalid page number.");
return ;
}
if ((textToAdd == null) || (textToAdd.equals(""))) {
java.lang.System.out.pri... | public void replaceAllTextOnPage(int pageNumber, java.lang.String textToAdd) {
if ((pageNumber <= 0) || (pageNumber > (this.pages.length))) {
java.lang.System.out.println("Invalid page number.");
return ;
}
if ((textToAdd == null) || (textToAdd.equals(""))) {
java.lang.System.out.pri... |
private void setTokens(com.mcnaughton.client.spotifyModels.AccessResponse response) {
com.mcnaughton.client.SpotifyClient.accessToken = response.getAccess_token();
com.mcnaughton.client.SpotifyClient.refreshToken = response.getRefresh_token();
com.mcnaughton.client.SpotifyClient.tokenType = response.getToke... | private void setTokens(com.mcnaughton.client.spotifyModels.AccessResponse response) {
com.mcnaughton.client.SpotifyClient.accessToken = response.getAccess_token();
if ((response.getRefresh_token()) != null) {
com.mcnaughton.client.SpotifyClient.refreshToken = response.getRefresh_token();
}
com.m... |
protected static org.matheclipse.core.interfaces.IExpr sortResults(org.matheclipse.core.interfaces.IAST resultList) {
for (int i = 1; i < (resultList.size()); i++) {
if (resultList.get(i).isList()) {
org.matheclipse.core.eval.EvalAttributes.sort(((org.matheclipse.core.interfaces.IAST) (resultLis... | protected static org.matheclipse.core.interfaces.IAST sortResults(org.matheclipse.core.interfaces.IAST resultList) {
for (int i = 1; i < (resultList.size()); i++) {
if (resultList.get(i).isList()) {
org.matheclipse.core.eval.EvalAttributes.sort(((org.matheclipse.core.interfaces.IAST) (resultList... |
public T invertedCumulativeProbability(double cumulativeProbability) {
com.google.common.base.Preconditions.checkArgument(((0 < cumulativeProbability) && (cumulativeProbability <= 1.0)));
long card = domain.cardinality();
long min = domain.ordinal(domain.min());
long ordinal = ((long) (java.lang.Math.ce... | public T invertedCumulativeProbability(double cumulativeProbability) {
com.google.common.base.Preconditions.checkArgument(((0 < cumulativeProbability) && (cumulativeProbability <= 1.0)));
long card = domain.cardinality();
long min = domain.ordinal(domain.min());
long ordinal = (((long) (java.lang.Math.c... |
private void writeData() {
try (java.io.BufferedWriter writer = new java.io.BufferedWriter(new java.io.OutputStreamWriter(new java.io.FileOutputStream(file, true), "UTF-8"))) {
writer.write((((de.neffez.timetrack.util.DateUtil.getTodayFormatted(TimeTrackConstants.DE_DATE)) + " ") + (timeSinceStartup.getText... | private void writeData() {
try (java.io.BufferedWriter writer = new java.io.BufferedWriter(new java.io.OutputStreamWriter(new java.io.FileOutputStream(file, true), "UTF-8"))) {
writer.write(((((de.neffez.timetrack.util.DateUtil.getTodayFormatted(TimeTrackConstants.DE_DATE)) + " ") + (timeSinceStartup.getTex... |
public void run() {
com.pkjiao.friends.mm.common.CommonDataStructure.UploadHeadPicResultEntry resultEntry = com.pkjiao.friends.mm.utils.Utils.uploadHeadPicBitmap(CommonDataStructure.URL_UPLOAD_HEAD_PIC, uid, mCropPhoto, mCropPhotoName);
if (!(isUidExistInHeadPicDB(uid))) {
insertHeadPicToHeadPicsDB(resu... | public void run() {
if ((mCropPhoto) != null) {
com.pkjiao.friends.mm.common.CommonDataStructure.UploadHeadPicResultEntry resultEntry = com.pkjiao.friends.mm.utils.Utils.uploadHeadPicBitmap(CommonDataStructure.URL_UPLOAD_HEAD_PIC, uid, mCropPhoto, mCropPhotoName);
if (!(isUidExistInHeadPicDB(uid))) ... |
public boolean equals(java.lang.Object o) {
if (!(o instanceof org.snt.inmemantlr.tree.AstNode))
return false;
org.snt.inmemantlr.tree.AstNode n = ((org.snt.inmemantlr.tree.AstNode) (o));
return ((n.ntype.equals(this.ntype)) && (n.label.equals(this.label))) && (this.children.equals(n.children))... | public boolean equals(java.lang.Object o) {
if (!(o instanceof org.snt.inmemantlr.tree.AstNode))
return false;
org.snt.inmemantlr.tree.AstNode n = ((org.snt.inmemantlr.tree.AstNode) (o));
return ((((n.getId()) == (this.getId())) && (n.ntype.equals(this.ntype))) && (n.label.equals(this.label))) ... |
public void robotInit() {
leftStick = new org.usfirst.frc.team3501.robot.Joystick(LEFT_JOYSTICK_PORT);
rightStick = new org.usfirst.frc.team3501.robot.Joystick(RIGHT_JOYSTICK_PORT);
drivetrain = new org.usfirst.frc.team3501.robot.Drivetrain();
arm = new org.usfirst.frc.team3501.robot.Arm();
claw = n... | public void robotInit() {
leftStick = new org.usfirst.frc.team3501.robot.Joystick(LEFT_JOYSTICK_PORT);
rightStick = new org.usfirst.frc.team3501.robot.Joystick(RIGHT_JOYSTICK_PORT);
drivetrain = new org.usfirst.frc.team3501.robot.Drivetrain();
arm = new org.usfirst.frc.team3501.robot.Arm();
claw = n... |
public void onResponse(okhttp3.Call call, okhttp3.Response response) throws java.io.IOException {
if (response.isSuccessful()) {
java.lang.String responseStr = response.body().string();
android.util.Log.d("RESPONSE WHOAMI", responseStr);
loadData();
}else {
android.util.Log.d("RE... | public void onResponse(okhttp3.Call call, okhttp3.Response response) throws java.io.IOException {
if (response.isSuccessful()) {
java.lang.String responseStr = response.body().string();
android.util.Log.d("RESPONSE WHOAMI", responseStr);
refreshToken();
}else {
android.util.Log.d... |
private java.lang.String readDir(org.jdom2.Document doc, java.lang.String[] files, java.lang.String dirName) {
if (files != null) {
java.util.Arrays.sort(files);
}
java.lang.String eDir = dirName;
org.jdom2.Element p = buildElement(files, dirName, eDir);
doc.getRootElement().addContent(p);
... | private java.lang.String readDir(org.jdom2.Document doc, java.lang.String[] files, java.lang.String dirName) {
if (files != null) {
java.util.Arrays.sort(files);
}
org.jdom2.Element p = buildElement(files, dirName);
doc.getRootElement().addContent(p);
return p.getName();
} |
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
int count = ((listener) instanceof com.heinrichreimersoftware.materialintro.view.FadeableViewPager.OnOverscrollPageChangeListener) ? com.heinrichreimersoftware.materialintro.view.FadeableViewPager.super.getAdapter().getCount(... | public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
int count = ((listener) instanceof com.heinrichreimersoftware.materialintro.view.FadeableViewPager.OnOverscrollPageChangeListener) ? com.heinrichreimersoftware.materialintro.view.FadeableViewPager.super.getAdapter().getCount(... |
public void removeTask(net.sf.memoranda.Task task) {
java.lang.String parentTaskId = task.getParentID();
if (parentTaskId != null) {
net.sf.memoranda.Task parentNode = getTaskElement(parentTaskId);
parentNode.removeSubTask(task);
}
taskList.remove(task.getID());
rootTaskList.remove(t... | public void removeTask(net.sf.memoranda.Task task) {
if (task == null) {
return ;
}
java.lang.String parentTaskId = task.getParentID();
if (parentTaskId != null) {
net.sf.memoranda.Task parentNode = getTaskElement(parentTaskId);
if (parentNode != null)
parentNode.remo... |
protected void onAction(java.lang.String sender, java.lang.String login, java.lang.String hostname, java.lang.String target, java.lang.String action) {
java.lang.String nickName = this.stripNickname(sender);
de.skuzzle.polly.sdk.eventlistener.IrcUser user = new de.skuzzle.polly.sdk.eventlistener.IrcUser(nickNam... | protected void onAction(java.lang.String sender, java.lang.String login, java.lang.String hostname, java.lang.String target, java.lang.String action) {
java.lang.String nickName = this.stripNickname(sender);
de.skuzzle.polly.sdk.eventlistener.IrcUser user = new de.skuzzle.polly.sdk.eventlistener.IrcUser(nickNam... |
private void selectConversation(javafx.scene.input.MouseEvent e) {
int index = conversations.getSelectionModel().getSelectedIndex();
java.lang.String data = conversations.getSelectionModel().getSelectedItem();
codeu.chat.common.ConversationSummary selectedConvo = lookupByTitle(data, index);
codeu.chat.c... | private void selectConversation(javafx.scene.input.MouseEvent e) {
int index = conversations.getSelectionModel().getSelectedIndex();
java.lang.String data = conversations.getSelectionModel().getSelectedItem();
codeu.chat.common.ConversationSummary selectedConvo = lookupByTitle(data, index);
if (selected... |
public static int printData(java.lang.String[] args) throws com.fasterxml.jackson.core.JsonProcessingException, java.lang.NullPointerException {
org.paces.Stata.Data.Meta dbg = new org.paces.Stata.Data.Meta(args);
org.paces.Stata.Data.StataData stataData = new org.paces.Stata.Data.DataSet(dbg);
org.paces.St... | public static int printData(java.lang.String[] args) throws com.fasterxml.jackson.core.JsonProcessingException, java.lang.NullPointerException {
org.paces.Stata.Data.Meta dbg = new org.paces.Stata.Data.Meta(args);
org.paces.Stata.Data.DataSet stataData = new org.paces.Stata.Data.DataSet(dbg);
org.paces.Stat... |
private static weka.core.Instances loadTestFile(java.lang.String fileName) {
weka.core.Instances data = null;
weka.core.converters.ArffLoader loader = new weka.core.converters.ArffLoader();
try {
loader.setFile(new java.io.File(fileName));
data = loader.getDataSet();
data.setClassInd... | private static weka.core.Instances loadTestFile(java.io.File file) {
weka.core.Instances data = null;
weka.core.converters.ArffLoader loader = new weka.core.converters.ArffLoader();
try {
loader.setFile(file);
data = loader.getDataSet();
data.setClassIndex(((data.numAttributes()) - 1... |
public void verifyEndpointResponseNotEmpty() {
try {
java.lang.String string = new com.abhelly.builditbigger.EndpointsAsyncTask().execute(getContext()).get();
assertNotNull(string);
assertTrue(((string.length()) > 0));
} catch (java.lang.InterruptedException | java.util.concurrent.Execut... | public void verifyEndpointResponseNotEmpty() {
try {
java.lang.String string = new com.abhelly.builditbigger.EndpointsAsyncTask(getContext(), null).execute().get();
assertNotNull(string);
assertTrue(((string.length()) > 0));
} catch (java.lang.InterruptedException | java.util.concurrent.... |
private void init(com.shinav.mathapp.db.pojo.CutsceneLine cutsceneLine) {
this.cutsceneLine = cutsceneLine;
com.shinav.mathapp.injection.component.Injector.getViewComponent(this.getContext()).inject(this);
int layout = getLayout(cutsceneLine);
android.view.View view = inflate(layout, this, false);
h... | private void init() {
com.shinav.mathapp.injection.component.Injector.getViewComponent(this.getContext()).inject(this);
int layout = getLayout(cutsceneLine);
android.view.View view = inflate(layout, this, false);
holder = new com.shinav.mathapp.cutscene.CutsceneLineView.ViewHolder(view);
loadCharact... |
public void display(java.awt.Graphics g) {
java.lang.System.out.println(isHighlighted());
if (isHighlighted()) {
g.setColor(java.awt.Color.green);
g.drawRect(x, ((y) + (((totalCards) * (Card.height)) / 2)), Card.width, Card.height);
setHighlight(false);
}else {
g.setColor(jav... | public void display(java.awt.Graphics g) {
if (isHighlighted()) {
g.setColor(java.awt.Color.green);
g.drawRect(x, ((y) + (((totalCards) * (Card.height)) / 2)), Card.width, Card.height);
setHighlight(false);
}else {
g.setColor(java.awt.Color.black);
}
totalCards = 0;
s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.