buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void move(double speed) {
frontL.set(speed);
backL.set(speed);
} | public void move(double speed) {
this.frontL.set(speed);
this.backL.set(speed);
} |
public void setMultiplier(int multiplier) {
if (((this.value) == (entityPackage.Tile.BLOCKED_TILE)) || ((this.value) == (entityPackage.Tile.BUCKET_TILE))) {
this.multiplier = multiplier;
}
} | public void setMultiplier(int multiplier) {
if (((this.value) == (entityPackage.Tile.BLOCKED_TILE)) || ((this.value) == (entityPackage.Tile.BUCKET_TILE))) {
return ;
}
this.multiplier = multiplier;
} |
public void shutdown() {
if ((_first) != null) {
_first.shutdown();
}
if ((_second) != null) {
_second.shutdown();
}
} | public void shutdown() {
super.shutdown();
if ((_first) != null) {
_first.shutdown();
}
if ((_second) != null) {
_second.shutdown();
}
} |
public void deleteTool(java.lang.String toolId) {
try {
listStore.remove(listStore.findModelWithKey(toolId));
} catch (com.google.gwt.event.shared.UmbrellaException umb) {
}
} | public void deleteTool(java.lang.String toolId) {
listStore.remove(listStore.findModelWithKey(toolId));
} |
public void damage(com.xoul.ru.magone.model.Damage damage) {
currenthp -= damage.damage;
} | public void damage(com.xoul.ru.magone.model.Damage damage) {
if ((damage.damage) > 0)
currenthp -= damage.damage;
} |
public void setEmail(java.lang.String email) {
this.email = email.trim();
} | public void setEmail(java.lang.String email) {
this.email = email;
} |
public D convertToView(E model) {
D view = getViewInstance(model);
view.setId(model.getId());
return view;
} | public D convertToView(E model) {
if (model == null)
return null;
D view = getViewInstance(model);
view.setId(model.getId());
return view;
} |
public void popLocalVariables(org.exist.xquery.LocalVariable var) {
popLocalVariables(var, null);
} | public void popLocalVariables(final org.exist.xquery.LocalVariable var) {
popLocalVariables(var, null, null);
} |
public void onSoftKeyboardShown(boolean isShowing) {
keyboardIsShowing = isShowing;
if ((this.fragmentAddField) != null)
this.fragmentAddField.keyboardShowing = isShowing;
android.util.Log.d("MainActivity", ("Keyboard Showing:" + (java.lang.Boolean.toString(isShowing))));
} | public void onSoftKeyboardShown(boolean isShowing) {
keyboardIsShowing = isShowing;
if ((this.fragmentAddField) != null)
this.fragmentAddField.keyboardShowing = isShowing;
} |
public void onClick(final android.content.DialogInterface dialog, final int which) {
studentInfoList.remove((pos + 1));
notifyItemRangeRemoved(pos, 1);
} | public void onClick(final android.content.DialogInterface dialog, final int which) {
studentInfoList.remove(pos);
notifyItemRangeRemoved(pos, 1);
} |
public void setFieldDoubleNotNull(java.lang.Double value) {
realm.checkIfValid();
if (value == null) {
throw new java.lang.IllegalArgumentException("Trying to set non-nullable field fieldDoubleNotNull to null.");
}
row.setDouble(columnInfo.fieldDoubleNotNullIndex, ((double) (value)));
} | public void setFieldDoubleNotNull(java.lang.Double value) {
realm.checkIfValid();
if (value == null) {
throw new java.lang.IllegalArgumentException("Trying to set non-nullable field fieldDoubleNotNull to null.");
}
row.setDouble(columnInfo.fieldDoubleNotNullIndex, value);
} |
public void onDismiss(android.content.DialogInterface dialogInterface) {
if (!(navigateSuccess)) {
funnel.logCancel();
}
} | public void onDismiss(android.content.DialogInterface dialogInterface) {
super.onDismiss(dialogInterface);
if (!(navigateSuccess)) {
funnel.logCancel();
}
} |
public double getMaxOutput() {
if (!((hasStartedCrafting) && ((currentRecipe.getEuTick()) > 0))) {
return 0;
}
return 1000000;
} | public double getMaxOutput() {
if (!(((hasStartedCrafting) && ((currentRecipe) != null)) && ((currentRecipe.getEuTick()) > 0))) {
return 0;
}
return 1000000;
} |
public void test01_1_MainPage_noLogin() {
WebDriverTest.driver.manage().window().maximize();
main.start(WebDriverTest.host);
main.verifyMain();
main.verifyLoginButton();
} | public void test01_1_MainPage_noLogin() {
WebDriverTest.driver.manage().window().maximize();
main.start(WebDriverTest.host);
main.verifyMain(WebDriverTest.host);
main.verifyLoginButton();
} |
public void resetSelectedTags() {
for (android.widget.CheckBox c : checkBoxes)
c.setChecked(false);
selectedStrings.clear();
} | public void resetSelectedTags() {
for (android.widget.CheckBox c : checkBoxes)
c.setChecked(false);
} |
synchronized void like(java.lang.String word, java.lang.String web) throws java.sql.SQLException {
java.lang.String sql = ((((("update wordlist set wordlist." + web) + "=wordlist.") + web) + "+1 where wordlist.word=") + word) + ";";
stmt.executeQuery(sql);
} | synchronized void like(java.lang.String word, java.lang.String web) throws java.sql.SQLException {
java.lang.String sql = ((((("update wordlist set wordlist." + web) + "=wordlist.") + web) + "+1 where wordlist.word=") + word) + ";";
stmt.execute(sql);
} |
public void accept(android.view.View view) {
android.widget.Toast.makeText(getActivity(), "Congrats!", Toast.LENGTH_SHORT).show();
com.examples.ankit.breakpoint.prefences.MyPreferenceManager.setUserConsent(true);
if ((mListener) != null) {
mListener.onAgreementAccepted(true);
}
} | public void accept(android.view.View view) {
com.examples.ankit.breakpoint.prefences.MyPreferenceManager.setUserConsent(true);
if ((mListener) != null) {
mListener.onAgreementAccepted(true);
}
} |
public static void setSubscriptions(java.util.ArrayList<java.lang.String> subs) {
me.ccrama.redditslide.UserSubscriptions.subscriptions.edit().putString(Authentication.name, me.ccrama.redditslide.Reddit.arrayToString(subs)).apply();
} | public static void setSubscriptions(java.util.ArrayList<java.lang.String> subs) {
me.ccrama.redditslide.UserSubscriptions.subscriptions.edit().putString(Authentication.name, me.ccrama.redditslide.Reddit.arrayToString(subs)).commit();
} |
public final void testgetSelectedCoordsToBig() {
gamelogic.Game game = new gamelogic.Game();
game.start();
final int int1 = 9;
game.processClick(int1, 0);
game.stop();
} | public final void testgetSelectedCoordsToBig() {
final int int1 = 9;
game.processClick(int1, 0);
} |
public void setGraph(edu.cmu.tetradapp.model.Graph graph) {
graphs = new java.util.ArrayList<>();
graphs.add(((edu.cmu.tetradapp.model.SemGraph) (graph)));
log();
} | public void setGraph(edu.cmu.tetradapp.model.Graph graph) {
graphs = new java.util.ArrayList<>();
graphs.add(new edu.cmu.tetradapp.model.SemGraph(graph));
log();
} |
void setError(@org.jetbrains.annotations.NotNull
java.lang.Throwable error, jetbrains.mps.debugger.java.runtime.evaluation.container.IEvaluationContainer model) {
com.intellij.openapi.application.ApplicationManager.getApplication().assertIsDispatchThread();
synchronized(myStates) {
jetbrains.mps.interna... | void setError(@org.jetbrains.annotations.NotNull
java.lang.Throwable error, jetbrains.mps.debugger.java.runtime.evaluation.container.IEvaluationContainer model) {
synchronized(myStates) {
jetbrains.mps.internal.collections.runtime.MapSequence.fromMap(myStates).put(model, new jetbrains.mps.debugger.java.runt... |
public com.piratesgame.graph.vertices.Vertex getNeighbour(com.piratesgame.graph.vertices.Vertex v) {
if (v.equals(this.vertexOne)) {
return this.vertexTwo;
}
return this.vertexOne;
} | public com.piratesgame.graph.vertices.Vertex getNeighbour(com.piratesgame.graph.vertices.Vertex v) {
if (v.equals(this.vertexOne)) {
return this.vertexTwo;
}else
if (v.equals(this.vertexTwo)) {
return this.vertexOne;
}
return null;
} |
private java.lang.String getNewURLs() {
if (this.useExternalFile) {
return this.getNewURLsFromConfig();
}
return this.getNewPropertyURLs();
} | private java.lang.String getNewURLs() {
if (useExternalFile) {
return getNewURLsFromConfig();
}
return getNewPropertyURLs();
} |
public boolean onMarkerClick(com.baidu.mapapi.map.Marker marker) {
showPopWindow();
return false;
} | public boolean onMarkerClick(com.baidu.mapapi.map.Marker marker) {
showPopWindow(marker);
return false;
} |
public static void storeAppInstalled(android.content.Context context, java.lang.String appInstalled) {
android.content.SharedPreferences sharedPreferences = com.silverpop.engage.config.EngageConfig.getConfigSharedPrefs(context);
sharedPreferences.edit().putString(com.silverpop.engage.config.EngageConfig.SharedP... | public static void storeAppInstalled(android.content.Context context, java.lang.String appInstalled) {
com.silverpop.engage.config.EngageConfig.getConfigSharedPrefs(context).edit().putString(com.silverpop.engage.config.EngageConfig.SharedProperties.APP_INSTALLED.toString(), appInstalled).commit();
} |
public io.nlopez.smartlocation.location.providers.MultiFallbackProvider.Builder withDefaultProvider() {
return this.withProvider(new io.nlopez.smartlocation.location.providers.LocationManagerProvider());
} | public io.nlopez.smartlocation.location.providers.MultiFallbackProvider.Builder withDefaultProvider() {
return withProvider(new io.nlopez.smartlocation.location.providers.LocationManagerProvider());
} |
public java.lang.String getLabel() {
if (label.isEmpty())
return polyTile.getPolyName();
else
return label;
} | public java.lang.String getLabel() {
if ((label.isEmpty()) && ((polyTile) != null))
return polyTile.getPolyName();
else
return label;
} |
public void onClick(android.view.View v) {
int idx = v.getId();
name.mjs001.expensereport.User u2 = gc.getUserList().get(idx);
gc.setCurUser(u2);
} | public void onClick(android.view.View v) {
int idx = v.getId();
name.mjs001.expensereport.User u2 = gc.getUserList().get(idx);
gc.setCurUser(u2.getId());
} |
public android.database.Cursor select(java.lang.String query) {
return mDB.rawQuery(query, null);
} | private android.database.Cursor select(java.lang.String query) {
return mDB.rawQuery(query, null);
} |
public void isPrimeForPrimeNonNumber() {
assertFalse(us.oder.euler.PrimeFactorGenerator.isPrime(4L));
assertFalse(us.oder.euler.PrimeFactorGenerator.isPrime(6L));
assertFalse(us.oder.euler.PrimeFactorGenerator.isPrime(22L));
assertFalse(us.oder.euler.PrimeFactorGenerator.isPrime(100L));
} | public void isPrimeForPrimeNonNumber() {
assertFalse(us.oder.euler.PrimeFactorGenerator.isPrime(1L));
assertFalse(us.oder.euler.PrimeFactorGenerator.isPrime(6L));
assertFalse(us.oder.euler.PrimeFactorGenerator.isPrime(22L));
assertFalse(us.oder.euler.PrimeFactorGenerator.isPrime(100L));
} |
public com.mak001.ircbot.irc.Channel getChannelByName(java.lang.String chan) {
synchronized(channels) {
return channels.get(chan.replace((("[" + (com.mak001.ircbot.IRCBot.CHANNEL_PREFIXES)) + "]+"), ""));
}
} | public com.mak001.ircbot.irc.Channel getChannelByName(java.lang.String chan) {
synchronized(channels) {
return channels.get(chan.toUpperCase());
}
} |
private void setCameraOptions() {
videoCapture.set(Highgui.CV_CAP_PROP_FRAME_WIDTH, 320);
videoCapture.set(Highgui.CV_CAP_PROP_FRAME_HEIGHT, 240);
setExposureAuto();
setTrackingSettings();
} | private void setCameraOptions() {
videoCapture.set(Highgui.CV_CAP_PROP_FRAME_WIDTH, 320);
videoCapture.set(Highgui.CV_CAP_PROP_FRAME_HEIGHT, 240);
} |
private void CloseFile(java.lang.String file) {
final java.lang.String musicFile = com.qsp.player.Utility.QspPathTranslate(file);
runOnUiThread(new java.lang.Runnable() {
public void run() {
CloseFileUI(musicFile);
}
});
} | public void run() {
CloseFileUI(musicFile);
} |
protected java.lang.String getJSBundleFile() {
return BuildConfig.DEBUG ? super.getJSBundleFile() : com.microsoft.codepush.react.CodePush.getBundleUrl();
} | protected java.lang.String getJSBundleFile() {
return super.getJSBundleFile();
} |
public void mousePressed() {
if ((mouseButton) == (LEFT)) {
poly.add(new java.awt.geom.Point2D.Double(mouseX, mouseY));
x = mouseX;
y = mouseY;
time = ANIMATION_TIME;
}
} | public void mousePressed() {
if ((mouseButton) == (LEFT)) {
}
} |
public boolean writeToDB(java.lang.String s, java.lang.String u) throws java.net.UnknownHostException {
com.mongodb.BasicDBObject doc = new com.mongodb.BasicDBObject("title", s);
doc.append("url", u);
coll.insert(doc);
return true;
} | public void writeToDB(java.lang.String t, java.lang.String u) throws java.net.UnknownHostException {
com.mongodb.BasicDBObject doc = new com.mongodb.BasicDBObject("title", t);
doc.append("url", u);
coll.insert(doc);
} |
protected org.bonitasoft.web.toolkit.client.ui.component.containers.Container<org.bonitasoft.web.toolkit.client.ui.component.form.FormNode> getLastContainer() {
if ((this.containers.size()) == 0) {
this.containers.push(new org.bonitasoft.web.toolkit.client.ui.component.form.entry.Section());
}
retur... | protected org.bonitasoft.web.toolkit.client.ui.component.containers.Container<org.bonitasoft.web.toolkit.client.ui.component.form.FormNode> getLastContainer() {
if ((containers.size()) == 0) {
containers.push(new org.bonitasoft.web.toolkit.client.ui.component.form.entry.Section());
}
return containe... |
private double detRandomSubspace(int numberOfAttributes, double factor) {
return (java.lang.Math.sqrt(numberOfAttributes)) * factor;
} | private double detRandomSubspace(int numberOfAttributes, double factor) {
return java.lang.Math.pow(numberOfAttributes, factor);
} |
private boolean checkDiskSpace() {
final long space = org.exist.util.FileUtils.measureFileStore(dataDir, java.nio.file.FileStore::getUsableSpace);
return space > (diskSpaceMin);
} | private boolean checkDiskSpace() {
final long space = org.exist.util.FileUtils.measureFileStore(dataDir, java.nio.file.FileStore::getUsableSpace);
return (space > (diskSpaceMin)) || (space == (-1));
} |
public static controllers.Result signIn(java.lang.String mail, java.lang.String password) {
controllers.Application.userMail = password;
return controllers.Application.game();
} | public static controllers.Result signIn(java.lang.String mail, java.lang.String password) {
controllers.Application.userMail = mail;
return controllers.Application.game();
} |
public double calculateError(org.encog.ml.data.MLDataSet data) {
if ((getOutputMode()) == (PNNOutputMode.Classification)) {
return org.encog.util.simple.EncogUtility.calculateRegressionError(this, data);
}else {
return org.encog.util.simple.EncogUtility.calculateClassificationError(this, data);
... | public double calculateError(org.encog.ml.data.MLDataSet data) {
if ((getOutputMode()) == (PNNOutputMode.Classification)) {
return org.encog.util.simple.EncogUtility.calculateClassificationError(this, data);
}else {
return org.encog.util.simple.EncogUtility.calculateRegressionError(this, data);
... |
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
mTickerStopped = true;
} | public void onDetachedFromWindow() {
super.onDetachedFromWindow();
mTickerStopped = true;
} |
public com.hsjawanda.gaeobjectify.util.UriParser build() {
com.hsjawanda.gaeobjectify.util.UriParser parser = new com.hsjawanda.gaeobjectify.util.UriParser();
parser.consumeMapping = this._consumeMapping;
parser.hasAction = this._hasAction;
return parser;
} | public com.hsjawanda.gaeobjectify.util.UriParser build() {
com.hsjawanda.gaeobjectify.util.UriParser parser = new com.hsjawanda.gaeobjectify.util.UriParser();
parser.hasAction = this._hasAction;
return parser;
} |
public void onError(int i, java.lang.String s) {
android.util.Log.d(context.getPackageName(), ("queryReply err: " + s));
} | public void onError(int i, java.lang.String s) {
android.util.Log.d(context.getPackageName(), ("queryReply err: " + s));
listener.onError(s);
} |
private boolean setFilePath() {
boolean isSuccessfulPath;
return isSuccessfulPath = storage.setFilePath(this.commandDetails.getDescription());
} | private boolean setFilePath() {
return storage.setFilePath(this.commandDetails.getDescription());
} |
public long toTeraByte(long s) {
return s / ((org.zstack.utils.data.SizeUnit.t) / (org.zstack.utils.data.SizeUnit.k));
} | public double toTeraByte(double s) {
return s / ((org.zstack.utils.data.SizeUnit.t) / (org.zstack.utils.data.SizeUnit.k));
} |
public void live() {
java.lang.System.out.println(counter);
setCurrentFeatureIndex(((counter) - 1));
setStart(((counter) - 1));
} | public void live() {
setCurrentFeatureIndex(((counter) - 1));
setStart(((counter) - 1));
} |
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException {
org.eclipse.dirigible.repository.datasource.WrappedDataSource.logger.debug("called - getLogWriter()");
return originalDataSource.getLogWriter();
} | public java.io.PrintWriter getLogWriter() throws java.sql.SQLException {
return originalDataSource.getLogWriter();
} |
public boolean isTransactional() {
return (!(readOnly)) && (transactionsEnabled);
} | public boolean isTransactional() {
synchronized(readOnly) {
return (!(readOnly)) && (transactionsEnabled);
}
} |
public void onScanCompleted(java.lang.String path, android.net.Uri uri) {
android.util.Log.v("Encode activity", path);
} | public void onScanCompleted(java.lang.String path, android.net.Uri uri) {
} |
public static void getFlight(java.lang.String flightId, boolean enhance, @android.support.annotation.Nullable
com.airmap.airmapsdk.networking.callbacks.AirMapCallback<com.airmap.airmapsdk.models.flight.AirMapFlight> callback) {
com.airmap.airmapsdk.networking.services.FlightService.getFlight(flightId, enhance, call... | public static void getFlight(@android.support.annotation.NonNull
java.lang.String flightId, boolean enhance, @android.support.annotation.Nullable
com.airmap.airmapsdk.networking.callbacks.AirMapCallback<com.airmap.airmapsdk.models.flight.AirMapFlight> callback) {
if (flightId != null) {
com.airmap.airmapsdk... |
public void run() {
try {
window = new edu.cmu.lti.bic.sbs.ui.MainWindow(ui);
edu.cmu.lti.bic.sbs.ui.Sound.play("1");
window.setVisible(true);
} catch (java.lang.Exception e) {
e.printStackTrace();
}
} | public void run() {
try {
window = new edu.cmu.lti.bic.sbs.ui.MainWindow(ui);
window.setVisible(true);
} catch (java.lang.Exception e) {
e.printStackTrace();
}
} |
public com.segment.analytics.Properties trackCourseComponentViewed(java.lang.String blockId, java.lang.String courseId, boolean isPortrait) {
return null;
} | public com.segment.analytics.Properties trackCourseComponentViewed(java.lang.String blockId, java.lang.String courseId) {
return null;
} |
public T findOne(ID id, java.lang.String selects) {
return db().find(getEntityType()).select(selects).where().idEq(id).findUnique();
} | public void delete(ID id) {
db().find(getEntityType()).where().idEq(id).delete();
} |
public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
com.mdb.wingit.wingit.modelClasses.Adventure currAdventure = dataSnapshot.getValue(com.mdb.wingit.wingit.modelClasses.Adventure.class);
java.util.ArrayList<java.lang.String> pinKeys = currAdventure.getPinKeysList();
getPinLis... | public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
com.mdb.wingit.wingit.modelClasses.Adventure currAdventure = dataSnapshot.getValue(com.mdb.wingit.wingit.modelClasses.Adventure.class);
if (currAdventure != null) {
java.util.ArrayList<java.lang.String> pinKeys = currAdve... |
protected void onPreExecute() {
android.util.Log.d("preexe", "edit schedule start");
super.onPreExecute();
mProgress.setVisibility(View.VISIBLE);
} | protected void onPreExecute() {
super.onPreExecute();
mProgress.setVisibility(View.VISIBLE);
} |
private boolean peekIdOrKeyword(int index) {
com.google.javascript.jscomp.parsing.parser.TokenType type = peekType(index);
return ((TokenType.IDENTIFIER) == type) || (com.google.javascript.jscomp.parsing.parser.Keywords.isKeyword(type));
} | private boolean peekIdOrKeyword() {
com.google.javascript.jscomp.parsing.parser.TokenType type = peekType();
return ((TokenType.IDENTIFIER) == type) || (com.google.javascript.jscomp.parsing.parser.Keywords.isKeyword(type));
} |
public org.jruby.truffle.nodes.core.RubyString encode(org.jruby.truffle.nodes.core.RubyString string, org.jruby.truffle.nodes.core.RubyString encoding, @java.lang.SuppressWarnings(value = "unused")
org.jruby.truffle.nodes.core.RubyHash options) {
notDesignedForCompilation();
return encode(string, encoding, Unde... | public org.jruby.truffle.nodes.core.RubyString encode(org.jruby.truffle.nodes.core.RubyString string, org.jruby.truffle.nodes.core.RubyString encoding, @java.lang.SuppressWarnings(value = "unused")
org.jruby.truffle.nodes.core.RubyHash options) {
return encode(string, encoding, UndefinedPlaceholder.INSTANCE);
} |
public void removeLast() {
head = null;
tail = null;
} | public void removeLast() {
head = null;
tail = null;
count = 0;
} |
public void visit(de.uni.bremen.monty.moco.ast.statement.WhileLoop node) {
final boolean needsReturnStatementCopy = this.needsReturnStatement;
super.visit(node);
this.needsReturnStatement = needsReturnStatementCopy;
} | public void visit(de.uni.bremen.monty.moco.ast.statement.WhileLoop node) {
boolean needsReturnStatementCopy = needsReturnStatement;
super.visit(node);
needsReturnStatement = needsReturnStatementCopy;
} |
public com.mojang.ld22.item.Item remove(int idx) {
return items.remove(idx);
} | public com.mojang.ld22.item.Item remove(int idx) {
com.mojang.ld22.item.Item i = get(idx);
items.remove(i);
return i;
} |
public void createTable(hu.elte.bfw1p6.poker.model.entity.PTable t) throws java.rmi.RemoteException {
hu.elte.bfw1p6.poker.persist.ptable.PTableRepository.save(t);
java.lang.System.out.println("létrehozta");
} | public void createTable(hu.elte.bfw1p6.poker.model.entity.PTable t) throws java.rmi.RemoteException {
hu.elte.bfw1p6.poker.persist.ptable.PTableRepository.save(t);
} |
private boolean isValid(Pile p, Card c) {
return (p.checkTop().value) > (c.value) ? False : True;
} | private boolean isValid(Pile p, Card c) {
if (p.isEmpty()) {
return true;
}
return (p.checkTop().value) > (c.value) ? false : true;
} |
private void loadMyApps() {
java.lang.System.out.println("Came here1");
javafx.collections.ObservableList<Main_Project.MyAppEntry> populateTable = getPopTable();
myAppList.setItems(populateTable);
} | private void loadMyApps() {
javafx.collections.ObservableList<Main_Project.MyAppEntry> populateTable = getPopTable();
myAppList.setItems(populateTable);
} |
public void surfaceDestroyed(android.view.SurfaceHolder holder) {
if ((mCamera) != null) {
mCamera.stopPreview();
mCamera.release();
}
} | public void surfaceDestroyed(android.view.SurfaceHolder holder) {
} |
public boolean moreThanOrEqualTo(java.lang.Integer obj1, java.lang.Integer obj2) {
return obj1 >= obj2;
} | public boolean moreThanOrEqualTo(java.lang.Integer obj1, java.lang.Integer obj2) {
return (obj1 > obj2) || (obj1.equals(obj2));
} |
public void send(java.lang.String sendMessage) {
if (sendMessage != null) {
output.write(sendMessage);
output.flush();
}
java.lang.System.out.println(("Message sent: " + sendMessage));
} | public void send(java.lang.String sendMessage) {
if (sendMessage != null) {
output.write(sendMessage);
output.flush();
java.lang.System.out.println(("Message sent: " + sendMessage));
}
} |
public void playNext() {
(songPosn)++;
if ((songPosn) > (songs.size()))
songPosn = 0;
playSong();
} | public void playNext() {
(songPosn)++;
if ((songPosn) >= (songs.size()))
songPosn = 0;
playSong();
} |
private static void swLock() {
if (org.jikesrvm.VM.sysWriteLockOffset.isMax())
return ;
while (!(org.jikesrvm.scheduler.Synchronization.testAndSet(org.jikesrvm.runtime.Magic.getJTOC(), org.jikesrvm.VM.sysWriteLockOffset, 1))) {
}
} | private static void swLock() {
} |
private void navigateToMain() {
android.content.Intent toMain = new android.content.Intent(this, org.secfirst.umbrella.MainActivity.class);
toMain.setFlags(((android.content.Intent.FLAG_ACTIVITY_NEW_TASK) | (android.support.v4.content.IntentCompat.FLAG_ACTIVITY_CLEAR_TASK)));
startActivity(toMain);
} | public void navigateToMain() {
android.content.Intent toMain = new android.content.Intent(this, org.secfirst.umbrella.MainActivity.class);
toMain.setFlags(((android.content.Intent.FLAG_ACTIVITY_NEW_TASK) | (android.support.v4.content.IntentCompat.FLAG_ACTIVITY_CLEAR_TASK)));
startActivity(toMain);
} |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.detailed_item_screen_withpicker);
init_views();
setHomeButton();
get_set_intentdata();
setInitial_itemPrice();
setTotalPrice_withquantity();
send_data_tomainmenu();... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.detailed_item_screen_withpicker);
init_views();
setHomeButton();
get_set_intentdata();
setInitial_itemPrice();
send_data_tomainmenu();
} |
public com.intetics.bean.FieldValue newValue(java.util.List<java.lang.String> values, com.intetics.bean.Field field) {
com.intetics.bean.StringValue value = new com.intetics.bean.StringValue();
value.setValue(values.get(0));
return value;
} | public com.intetics.bean.FieldValue newValue(java.util.List<java.lang.String> values, com.intetics.bean.Field field) {
com.intetics.bean.StringValue value = new com.intetics.bean.StringValue();
if (value != null) {
value.setValue(values.get(0));
}
return value;
} |
public int execute(td.olap.computer.data.EmitItem item) {
java.lang.System.out.println(item.getXid());
return 0;
} | public int execute(td.olap.computer.data.EmitItem item) {
java.lang.System.out.println(item.getXid());
commit(item.getXid());
return 0;
} |
private java.lang.String convertStringForCsv(java.lang.String inString) {
java.lang.String retVal = "";
if (null == inString) {
retVal = inString.replace(',', ';');
retVal = retVal.replace('\n', ' ');
}
return retVal;
} | private java.lang.String convertStringForCsv(java.lang.String inString) {
java.lang.String retVal = "";
if (null != inString) {
retVal = inString.replace(',', ';');
retVal = retVal.replace('\n', ' ');
}
return retVal;
} |
public void nameNullTest() {
expected.expect(java.lang.IllegalArgumentException.class);
cz.muni.fi.pb138.odskart.backend.Movie movie = new cz.muni.fi.pb138.odskart.backend.Movie(null);
} | public void nameNullTest() {
expected.expect(java.lang.IllegalArgumentException.class);
movie = new cz.muni.fi.pb138.odskart.backend.Movie(null);
} |
public void testFailTaskTestName_TestNameIsCorrect() {
org.framework.core.runtime.FailTask task = new org.framework.core.runtime.FailTask("test", null, null);
org.junit.Assert.assertEquals(task.getTaskName(), "test");
assertNotEquals(task.getTaskName(), "tesp");
} | public void testFailTaskTestName_TestNameIsCorrect() {
org.framework.core.runtime.FailTask task = new org.framework.core.runtime.FailTask("test", null, null);
org.junit.Assert.assertEquals(task.getTaskName(), "test");
org.junit.Assert.assertNotEquals(task.getTaskName(), "test");
} |
public void onActivityStopped(android.app.Activity activity) {
if (activity instanceof com.example.alex.motoproject.screenMain.MainActivity) {
mMainActivityVisible = false;
android.widget.Toast.makeText(this, "Stopped", Toast.LENGTH_SHORT).show();
}
} | public void onActivityStopped(android.app.Activity activity) {
if (activity instanceof com.example.alex.motoproject.screenMain.MainActivity) {
mMainActivityVisible = false;
}
} |
public java.lang.String[] getFieldValues(com.browseengine.bobo.api.BoboIndexReader reader, int id) {
com.browseengine.bobo.facets.data.MultiValueFacetDataCache dataCache = getFacetData(reader);
return dataCache._nestedArray.getTranslatedData(id, dataCache.valArray);
} | public java.lang.String[] getFieldValues(com.browseengine.bobo.api.BoboIndexReader reader, int id) {
com.browseengine.bobo.facets.data.MultiValueFacetDataCache dataCache = getFacetData(reader);
if (dataCache != null) {
return dataCache._nestedArray.getTranslatedData(id, dataCache.valArray);
}
re... |
public static java.util.List<org.zkoss.bind.PhaseListener> getSystemPhaseListeners() {
return new java.util.LinkedList<org.zkoss.bind.PhaseListener>(org.zkoss.bind.init.ZKBinderPhaseListeners._listeners.values());
} | public static java.util.List<org.zkoss.bind.PhaseListener> getSystemPhaseListeners() {
java.util.Collection<org.zkoss.bind.PhaseListener> values;
synchronized(org.zkoss.bind.init.ZKBinderPhaseListeners._listeners) {
values = org.zkoss.bind.init.ZKBinderPhaseListeners._listeners.values();
}
retur... |
public synchronized java.util.ArrayList<java.lang.String> getZoneIDs() {
synchronized(zoneMap) {
java.util.ArrayList<java.lang.String> zIDS = new java.util.ArrayList<>();
zIDS.addAll(zoneMap.keySet());
return zIDS;
}
} | public java.util.ArrayList<java.lang.String> getZoneIDs() {
java.util.ArrayList<java.lang.String> zIDS = new java.util.ArrayList<>();
zIDS.addAll(zoneMap.keySet());
return zIDS;
} |
public void seti(java.lang.String i) {
this.i = i;
} | private void seti(java.lang.String i) {
this.i = i;
} |
public abstract int findFirstEmpty(int x, int y, int z); | public abstract boolean isEmpty(int x, int y, int z); |
public void call(java.lang.Throwable throwable) {
org.freeshr.interfaces.encounter.ws.EncounterController.logger.error(throwable.getMessage());
deferredResult.setErrorResult(throwable.getMessage());
} | public void call(java.lang.Throwable error) {
org.freeshr.interfaces.encounter.ws.EncounterController.logger.error(error.getMessage());
deferredResult.setErrorResult(error);
} |
public void onConnectionSuspended(int i) {
android.widget.Toast.makeText(this, "onConnectionSuspended", Toast.LENGTH_SHORT).show();
android.util.Log.d(com.tacticsgames.dontdie.activities.PlayServicesActivity.TAG, "onConnectionSuspended(): attempting to reconnect");
googleApiClient.connect();
} | public void onConnectionSuspended(int i) {
android.util.Log.d(com.tacticsgames.dontdie.activities.PlayServicesActivity.TAG, "onConnectionSuspended(): attempting to reconnect");
googleApiClient.connect();
} |
public void setChart(org.meteoinfo.chart.Chart value) {
chart = value;
chart.setParent(this);
} | public void setChart(org.meteoinfo.chart.Chart value) {
chart = value;
if ((this.chart) != null)
chart.setParent(this);
} |
public void endAlgo() {
java.lang.System.out.println("11111");
} | public void endAlgo() {
} |
public void clicked(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y) {
returnIndex = Game.viewIndexes.HOME;
update();
com.mygdx.game.Controller.callViewSwitch();
} | public void clicked(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y) {
returnIndex = Game.viewIndexes.HOME;
} |
private void execute(int newBufferSize, java.util.concurrent.ExecutorService executor, java.util.concurrent.CountDownLatch latch) {
for (int i = 0; i < newBufferSize; i++) {
executor.execute(new com.navercorp.pinpoint.common.server.util.DisruptorExecutorTest.LatchAwaitRunnable(latch));
}
} | private void execute(int newBufferSize, java.util.concurrent.ExecutorService executor, java.util.concurrent.CountDownLatch latch) {
execute(newBufferSize, executor, null, latch);
} |
protected void clickButton() {
intent = new android.content.Intent(getApplicationContext(), aboli.musicbee.easyGame.class);
startActivity(intent);
} | protected void clickButton(android.view.View view) {
startActivity(intent);
} |
public static void init(android.content.Context appContext) {
com.unit5app.Settings.load(com.unit5app.notifications.MyNotificationHandler.context);
com.unit5app.notifications.MyNotificationHandler.context = appContext;
com.unit5app.notifications.MyNotificationHandler.calendar = new com.unit5app.calendars.Un... | public static void init(android.content.Context appContext) {
com.unit5app.notifications.MyNotificationHandler.context = appContext;
com.unit5app.Settings.load(com.unit5app.notifications.MyNotificationHandler.context);
com.unit5app.notifications.MyNotificationHandler.calendar = new com.unit5app.calendars.Un... |
private boolean isChanged(int id, int newVal) {
if ((changeTracker.get(id)) == null) {
return true;
}
return (changeTracker.get(id)) != newVal;
} | private boolean isChanged(int id, int newVal) {
return (changeTracker.get(id).intValue()) != newVal;
} |
public void nameWithInvalidCharactersThrowsAValidationException() throws java.lang.Exception {
testObject.processInput(new java.lang.String[]{ }, new java.lang.String[]{ }, "wibble%", "local", "wibble", "gradle");
} | public void nameWithInvalidCharactersThrowsAValidationException() throws java.lang.Exception {
testObject.processInput(new java.lang.String[]{ }, new java.lang.String[]{ }, "wibble%", "local", "wibble", "gradle", null, null);
} |
public void trim() {
com.heerbann.unsafe.UnsafeBuffer.unsafe.reallocateMemory(pointer, position);
capacity = position;
} | public void trim() {
com.heerbann.unsafe.UnsafeBuffer.unsafe.reallocateMemory(pointer, end);
position = ((position) > (end)) ? end : position;
capacity = end;
} |
public void testRemoveAll() {
org.opendaylight.lispflowmapping.inmemorydb.radixtrie.RadixTrieTest.radixTrie4 = new org.opendaylight.lispflowmapping.inmemorydb.radixtrie.RadixTrie<java.lang.Integer>(32, true);
addIp4Addresses(org.opendaylight.lispflowmapping.inmemorydb.radixtrie.RadixTrieTest.radixTrie4);
or... | public void testRemoveAll() {
org.opendaylight.lispflowmapping.inmemorydb.radixtrie.RadixTrieTest.radixTrie4 = new org.opendaylight.lispflowmapping.inmemorydb.radixtrie.RadixTrie(32, true);
addIp4Addresses(org.opendaylight.lispflowmapping.inmemorydb.radixtrie.RadixTrieTest.radixTrie4);
org.opendaylight.lisp... |
public boolean newEvent(events.Evento evento) {
return this.timeline.add(evento);
} | public void newEvent(events.Evento evento) {
this.timeline.add(evento);
} |
public static void chooseFont(float size) {
com.wafitz.pixelspacebase.scenes.PixelScene.chooseFont(size, com.wafitz.pixelspacebase.scenes.PixelScene.defaultZoom);
} | private static void chooseFont(float size) {
com.wafitz.pixelspacebase.scenes.PixelScene.chooseFont(size, com.wafitz.pixelspacebase.scenes.PixelScene.defaultZoom);
} |
public int size() {
throw new sun.reflect.generics.reflectiveObjects.NotImplementedException();
} | public int size() {
return 0;
} |
public void newReceiver(uk.ac.ucl.excites.sapelli.transmission.model.Correspondent newReceiver) {
updateReceivers(true, newReceiver);
} | public void newReceiver(uk.ac.ucl.excites.sapelli.transmission.model.Correspondent newReceiver) {
if (newReceiver != null)
updateReceivers(true, newReceiver);
} |
protected void paintComponent(java.awt.Graphics g) {
super.paintComponent(g);
g.setColor(color);
g.fillOval(0, 0, 24, 24);
} | protected void paintComponent(java.awt.Graphics g) {
super.paintComponent(g);
g.setColor(color);
g.fillOval(0, 0, 24, 24);
this.g = g;
} |
protected io.reactivex.functions.Consumer<java.lang.Throwable> onRefreshItemsLoadFail() {
return new io.reactivex.functions.Consumer<java.lang.Throwable>() {
@java.lang.Override
public void accept(java.lang.Throwable throwable) throws java.lang.Exception {
doCancelLoading();
}
... | protected io.reactivex.functions.Consumer<java.lang.Throwable> onRefreshItemsLoadFail() {
return new io.reactivex.functions.Consumer<java.lang.Throwable>() {
@java.lang.Override
public void accept(java.lang.Throwable throwable) throws java.lang.Exception {
}
};
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.