buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void onInterrupt() {
if ((stopped) || (!(isEnabled()))) {
setStatusEmpty();
}else {
setStatusWorking();
}
} | public void onInterrupt() {
if (!(isEnabled())) {
setStatusEmpty();
}else {
setStatusWorking();
}
} |
private static double convertTime(double timeInSec) {
return timeInSec / 60.0;
} | private static double convertTime(double timeInSec) {
return timeInSec;
} |
public void configureGlobal(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth, org.springframework.security.crypto.password.PasswordEncoder passwordEncoder) throws java.lang.Exception {
auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder... | public void configureGlobal(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth) throws java.lang.Exception {
auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());
} |
public void removeSemanticTypeComponentIdentity(java.lang.Long semanticTypeComponentIdentityId) throws java.lang.Exception {
org.apache.log4j.Logger.getLogger(getClass()).debug(("Umls Identity Service - remove semanticTypeComponent identity " + semanticTypeComponentIdentityId));
final com.wci.umls.server.model.... | public void removeSemanticTypeComponentIdentity(long semanticTypeComponentIdentityId) throws java.lang.Exception {
org.apache.log4j.Logger.getLogger(getClass()).debug(("Umls Identity Service - remove semanticTypeComponent identity " + semanticTypeComponentIdentityId));
final com.wci.umls.server.model.meta.Seman... |
public void startTimer() {
remainingTime = 300000;
javax.swing.Timer timer = new javax.swing.Timer(1000, new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
remainingTime -= 1000;
repaint();
}
});
timer.start();
} | public void startTimer() {
remainingTime = 300000;
timer.start();
} |
public java.lang.Integer getConnectionPoolTimeout() {
return (timeout) == null ? org.commonjava.util.jhttpc.model.SiteConfig.DEFAULT_CONNECTION_POOL_TIMEOUT_SECONDS : connectionPoolTimeout;
} | public java.lang.Integer getConnectionPoolTimeout() {
return (connectionPoolTimeout) == null ? org.commonjava.util.jhttpc.model.SiteConfig.DEFAULT_CONNECTION_POOL_TIMEOUT_SECONDS : connectionPoolTimeout;
} |
public void close() throws org.scribble.main.ScribbleRuntimeException {
if (!(this.ep.isCompleted())) {
this.ep.close();
throw new org.scribble.main.ScribbleRuntimeException(("Session not completed: " + (this.ep.self)));
}
} | public void close() throws org.scribble.main.ScribbleRuntimeException {
this.ep.close();
if (!(this.ep.isCompleted())) {
throw new org.scribble.main.ScribbleRuntimeException(("Session not completed: " + (this.ep.self)));
}
} |
public void close() throws java.io.IOException {
lock.writeLock().lock();
this.f.getFD().sync();
this.f.close();
lock.writeLock().unlock();
} | public void close() throws java.io.IOException {
this.f.getFD().sync();
this.f.close();
} |
public void closeBranch() {
branching = false;
branch.close();
branch = null;
} | public void closeBranch() {
branching = false;
if ((branch) != null) {
branch.close();
}
branch = null;
} |
public void onAttach(android.content.Context context) {
super.onAttach(context);
if ((getActivity()) instanceof com.globant.practice.presentation.view.fragment.SubscriberListFragment.SubscriberListFragmentActions) {
subscriberListFragmentActions = ((com.globant.practice.presentation.view.fragment.Subscr... | public void onAttach(android.content.Context context) {
super.onAttach(context);
if ((getActivity()) instanceof com.globant.practice.presentation.view.fragment.SubscriberListFragment.SubscriberListFragmentActions) {
subscriberListFragmentActions = ((com.globant.practice.presentation.view.fragment.Subscr... |
public int[] getHistory(kbs_rover_project.WorldTile key) {
if (this.dataSource.containsKey(key)) {
return this.dataSource.get(key);
}else {
return null;
}
} | public int[] getHistory(kbs_rover_project.WorldTile key) {
if (this.dataSource.containsKey(key)) {
return this.dataSource.get(key);
}else {
return new int[0];
}
} |
public void widgetSelected(final org.eclipse.swt.events.SelectionEvent event) {
if (useFilterTextRadio.getSelection()) {
useFileTextRadio.setSelection(false);
updateSqlText();
}
} | public void widgetSelected(final org.eclipse.swt.events.SelectionEvent event) {
if (useFileTextRadio.getSelection()) {
useFilterTextRadio.setSelection(false);
updateSqlText();
}
} |
public java.lang.String displayMainPage(org.springframework.ui.ModelMap model) {
model.addAttribute("message", "log report");
return "main";
} | public java.lang.String displayMainPage(org.springframework.ui.ModelMap model) {
return "main";
} |
private void saveWorkingDirectories(java.lang.String repositoryId) {
org.repositoryminer.mining.local.WorkingDirectoryProcessor wdProcessor = new org.repositoryminer.mining.local.WorkingDirectoryProcessor();
wdProcessor.setReferences(selectedReferences);
wdProcessor.setRepositoryId(repositoryId);
wdProc... | private void saveWorkingDirectories(java.lang.String repositoryId) {
org.repositoryminer.mining.local.WorkingDirectoryProcessor wdProcessor = new org.repositoryminer.mining.local.WorkingDirectoryProcessor();
wdProcessor.setReferences(selectedReferences);
wdProcessor.setRepositoryId(repositoryId);
wdProc... |
public void onBackPressed() {
if ((end) == 1) {
finish();
}
(end)++;
} | public void onBackPressed() {
if ((end) >= 1) {
finish();
}
(end)++;
} |
public boolean isNewFile() {
return fileName.equals(com.romanpulov.violetnotefx.Model.Document.NEW_FILE_NAME);
} | public boolean isNewFile() {
return fileName.getValue().equals(com.romanpulov.violetnotefx.Model.Document.NEW_FILE_NAME);
} |
public boolean accepts(java.lang.reflect.Field field) {
return (field.isAnnotationPresent(sirius.search.annotations.NestedObject.class)) && (!(field.isAnnotationPresent(sirius.search.annotations.FastCompletion.class)));
} | public boolean accepts(java.lang.reflect.Field field) {
return field.isAnnotationPresent(sirius.search.annotations.NestedObject.class);
} |
public static <D> com.squareup.moshi.JsonAdapter<ru.rinekri.udacitypopularmovies.network.models.PagedResponse<D>> jsonAdapter(com.squareup.moshi.Moshi moshi) {
return new ru.rinekri.udacitypopularmovies.network.models.AutoValue_PagedResponse.MoshiJsonAdapter(moshi, new java.lang.Class[]{ java.lang.Object.class });
... | public static com.squareup.moshi.JsonAdapter<ru.rinekri.udacitypopularmovies.network.models.PagedResponse> jsonAdapter(com.squareup.moshi.Moshi moshi) {
return new ru.rinekri.udacitypopularmovies.network.models.AutoValue_PagedResponse.MoshiJsonAdapter(moshi);
} |
private int getPositionFromScrollProgress(float scrollProgress) {
return ((int) ((mRecyclerView.getAdapter().getItemCount()) * scrollProgress));
} | private int getPositionFromScrollProgress(float scrollProgress) {
return ((int) (((mRecyclerView.getAdapter().getItemCount()) - 1) * scrollProgress));
} |
public void setLegs(java.util.List<com.leon.rfq.domains.OptionDetailImpl> legs) {
this.legs = legs;
aggregate();
} | public void setLegs(java.util.List<com.leon.rfq.domains.OptionDetailImpl> legs) {
this.legs = legs;
} |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
switch (item.getItemId()) {
case R.id.add_playlist :
break;
default :
break;
}
return super.onOptionsItemSelected(item);
} | public boolean onOptionsItemSelected(android.view.MenuItem item) {
switch (item.getItemId()) {
default :
break;
}
return super.onOptionsItemSelected(item);
} |
public void serialize(im.actor.core.api.BserWriter writer) throws java.io.IOException {
for (im.actor.core.api.ApiRawValue i : this.array) {
writer.writeBytes(i, 1).buildContainer();
}
} | public void serialize(im.actor.core.api.BserWriter writer) throws java.io.IOException {
for (im.actor.core.api.ApiRawValue i : this.array) {
writer.writeBytes(1, i.buildContainer());
}
} |
public void write(byte[] bytes, int off, int len) throws java.io.IOException {
java.nio.ByteBuffer buffer = bufferContainer.getBuffer();
expandIfNeeded(len);
buffer.put(bytes, off, len);
} | public void write(byte[] bytes, int off, int len) throws java.io.IOException {
java.nio.ByteBuffer buffer = expandIfNeeded(len);
buffer.put(bytes, off, len);
} |
public void onCancelled(com.google.firebase.database.DatabaseError databaseError) {
android.util.Log.w(taylorandtanner.gasscanmk1.MainActivity.TAG, "loadPost:onCancelled", databaseError.toException());
} | public void onCancelled(com.google.firebase.database.DatabaseError databaseError) {
} |
public java.util.Collection<com.github.u1152.uportal.model.Author> getArt() {
return art;
} | public java.util.Set<com.github.u1152.uportal.model.Author> getArt() {
return art;
} |
private void doLoadReddit(java.lang.String url) {
me.ccrama.redditslide.Views.RedditItemView v = ((me.ccrama.redditslide.Views.RedditItemView) (findViewById(R.id.reddit_item)));
v.loadUrl(url);
} | private void doLoadReddit(java.lang.String url) {
me.ccrama.redditslide.Views.RedditItemView v = ((me.ccrama.redditslide.Views.RedditItemView) (findViewById(R.id.reddit_item)));
v.loadUrl(this, url);
} |
public void actionPerformed(java.awt.event.ActionEvent e) {
setVisible(false);
writeList();
lk.ac.mrt.cse.RegWindow regWindow = new lk.ac.mrt.cse.RegWindow(node);
regWindow.setLocation(x(), y());
regWindow.setVisible(true);
} | public void actionPerformed(java.awt.event.ActionEvent e) {
setVisible(false);
lk.ac.mrt.cse.RegWindow regWindow = new lk.ac.mrt.cse.RegWindow(node);
regWindow.setLocation(x(), y());
regWindow.setVisible(true);
} |
public void run() {
if (!(gameover)) {
if (running) {
gameLoop();
}else {
pause();
onPause();
}
}else {
gameOver();
}
} | public void run() {
if (!(gameover)) {
if (running) {
gameLoop();
}else {
pause();
}
}else {
gameOver();
}
} |
public void setTypeface(android.widget.TextView view, int fontFamilyResId, int style) {
setTypeface(view, fontFamilyResId, style);
} | public void setTypeface(android.widget.TextView view, int fontFamilyResId, int style) {
setTypeface(view, view.getContext().getString(fontFamilyResId), style);
} |
public void saveOrUpdate(org.my.adventure.dao_manager.api.entities.Common object) {
org.hibernate.Session session = sessionFactory.openSession();
session.saveOrUpdate(object);
session.flush();
session.close();
} | public java.lang.Long saveOrUpdate(org.my.adventure.dao_manager.api.entities.Common object) {
org.hibernate.Session session = sessionFactory.openSession();
session.saveOrUpdate(object);
session.flush();
session.close();
return object.getId();
} |
public void setMilage() {
if (((milage) < 0) && ((milage) > 1000000)) {
throw new java.lang.IllegalArgumentException("Milage must be between 0, and 1 000 000 miles");
}else {
this.milage = milage;
}
} | public void setMilage(int milage) {
if ((milage < 0) && (milage > 1000000)) {
throw new java.lang.IllegalArgumentException("Milage must be between 0, and 1 000 000 miles");
}else {
this.milage = milage;
}
} |
protected void getSipNumber() {
conn.invoke("getSipNumber", new java.lang.Object[]{ java.lang.Integer.valueOf(roomId).longValue() }, this);
} | protected void getSipNumber() {
conn.invoke("getSipNumber", new java.lang.Object[]{ roomId }, this);
} |
public org.json.simple.JSONObject postJson(@javax.ws.rs.QueryParam(value = "url")
java.lang.String url, @javax.ws.rs.QueryParam(value = "type")
java.lang.String type, org.apache.ambari.view.proxy.MultivaluedMap<java.lang.String, java.lang.String> data) {
return getJson(url, type, data);
} | public org.json.simple.JSONObject postJson(@javax.ws.rs.QueryParam(value = "url")
java.lang.String url, @javax.ws.rs.QueryParam(value = "type")
java.lang.String type, java.lang.String data) {
return getJson(url, type, data);
} |
public void onCreate(@android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRetainInstance(true);
} | public void onCreate(@android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
} |
public void onTextChanged(java.lang.CharSequence s, int start, int before, int count) {
adapter.getFilter().filter(s);
} | public void onTextChanged(java.lang.CharSequence s, int start, int before, int count) {
} |
public void onReceive(android.content.Context context, android.content.Intent intent) {
if ((mTransactionns.size()) != 0)
sendUpdate();
} | public void onReceive(android.content.Context context, android.content.Intent intent) {
sendUpdate();
} |
public void categoryChanged(int activePosition) {
android.util.Log.d(com.shakenbeer.babalex.MainActivity.TAG, ("categoryChanged: " + activePosition));
categoriesManager.onCategoryChanged(activePosition);
categoryAdapter.setSelected(activePosition);
showNextCategoryText();
} | public void categoryChanged(int activePosition) {
categoriesManager.onCategoryChanged(activePosition);
categoryAdapter.setSelected(activePosition);
showNextCategoryText();
} |
public void fail(java.lang.Exception e); | public void fail(java.lang.Throwable t); |
public void onDestroy() {
super.onDestroy();
android.content.SharedPreferences pref = getSharedPreferences("SearchMyCarPreferences", Context.MODE_PRIVATE);
pref.edit().putInt("isEditFilter", 0).commit();
android.util.Log.d("lis", "destroyEdit");
} | public void onDestroy() {
super.onDestroy();
android.content.SharedPreferences pref = getSharedPreferences("SearchMyCarPreferences", Context.MODE_PRIVATE);
pref.edit().putInt("isEditFilter", 0).commit();
} |
private int getItemViewTypeHelper(android.database.Cursor cursor) {
boolean is_from_user = (cursor.getInt(cursor.getColumnIndexOrThrow("is_from_user"))) > 0;
if (is_from_user == true) {
return 0;
}else {
return 1;
}
} | private int getItemViewTypeHelper(android.database.Cursor cursor) {
int is_from_user = cursor.getInt(cursor.getColumnIndexOrThrow("is_from_user"));
if (is_from_user == 1) {
return 0;
}else {
return 1;
}
} |
private static java.lang.String getLastWord(java.util.ArrayList<java.lang.String> s) {
int i = s.size();
return s.get((i - 1));
} | public static java.lang.String getLastWord(java.util.ArrayList<java.lang.String> s) {
int i = s.size();
return s.get((i - 1));
} |
public void run() {
domino.FPSAnimator animator = new domino.FPSAnimator(canvas, fpsCap);
animator.setRunAsFastAsPossible(true);
animator.start();
} | public void run() {
animator = new domino.FPSAnimator(canvas, fpsCap);
animator.setRunAsFastAsPossible(true);
animator.start();
} |
public java.lang.String toString() {
return ((("(" + (mLocation1.toString())) + ",") + (mLocation2.toString())) + ")";
} | public java.lang.String toString() {
return ((mLocation1.toString()) + ",") + (mLocation2.toString());
} |
public net.minecraft.client.renderer.entity.Render<? super ckhbox.villagebox.common.entity.villager.EntityVillager> createRenderFor(net.minecraft.client.renderer.entity.RenderManager manager) {
java.lang.System.out.println("get renderer");
return new ckhbox.villagebox.client.renderer.villager.RenderVillager(man... | public net.minecraft.client.renderer.entity.Render<? super ckhbox.villagebox.common.entity.villager.EntityVillager> createRenderFor(net.minecraft.client.renderer.entity.RenderManager manager) {
return new ckhbox.villagebox.client.renderer.villager.RenderVillager(manager);
} |
public boolean initProcesso(Engine.Processo p) {
boolean ok = checkProcesso(p);
if (ok) {
persistProcesso(p);
sendInfoByEmail(p, ok);
}else
sendInfoByEmail(p, ok);
} | public boolean initProcesso(Engine.Processo p) {
boolean ok = checkProcesso(p);
if (ok) {
persistProcesso(p);
sendInfoByEmail(p, ok);
}else
sendInfoByEmail(p, ok);
return ok;
} |
public <TInArr> org.simple.coollection.query.Query<T> in(TInArr... values) {
return in(java.util.Arrays.asList(values));
} | public org.simple.coollection.query.Query<T> in(T... values) {
return in(java.util.Arrays.asList(values));
} |
private boolean isMegaSlot(shuffle.fwk.data.simulation.SimulationTask task) {
shuffle.fwk.data.Species s = task.getEffectSpecies(getCoords());
return task.getState().getCore().getMegaSlot().equals(s);
} | private boolean isMegaSlot(shuffle.fwk.data.simulation.SimulationTask task) {
shuffle.fwk.data.Species s = task.getEffectSpecies(getCoords());
return s.equals(task.getState().getCore().getMegaSlot());
} |
public void onDestroy() {
super.onDestroy();
mPlayerReady = false;
mPlayer.release();
} | public void onDestroy() {
super.onDestroy();
mPlayerReady = false;
if ((mPlayer) != null)
mPlayer.release();
} |
public int lineno() {
return (ruby_sourceline) + (src.getLineOffset());
} | public int lineno() {
return ((ruby_sourceline) + (src.getLineOffset())) - 1;
} |
protected long getMaxVal() {
return maxVal;
} | public long getMaxVal() {
return maxVal;
} |
protected java.lang.Void doInBackground(java.lang.Void... aVoid) {
com.ringsterz.androidtextreader.BibleManager bibleManager = com.ringsterz.androidtextreader.BibleManager.getInstance(context);
bibleManager.insertBook();
bibleManager.insertPhrase();
return null;
} | protected java.lang.Void doInBackground(java.lang.Void... aVoid) {
com.ringsterz.androidtextreader.BibleManager bibleManager = com.ringsterz.androidtextreader.BibleManager.getInstance(context);
bibleManager.insertBook();
return null;
} |
public double angleIncrease() {
return java.lang.Math.toRadians(((2 * (java.lang.Math.PI)) / ((this.period) / 10)));
} | public double angleIncrease() {
return java.lang.Math.toRadians(((2 * (java.lang.Math.PI)) / (this.period)));
} |
public void notify(org.shaolin.bmdp.runtime.entity.EntityAddedEvent<org.shaolin.bmdp.datamodel.page.WebService, org.shaolin.bmdp.datamodel.common.DiagramType> event) {
try {
org.shaolin.uimaster.page.cache.PageCacheManager.addWebService(event.getEntity());
} catch (org.shaolin.javacc.exception.ParsingEx... | public void notify(org.shaolin.bmdp.runtime.entity.EntityAddedEvent<org.shaolin.bmdp.datamodel.page.WebService, org.shaolin.bmdp.datamodel.common.DiagramType> event) {
} |
public mycai.pojo.User getUserByWechatId(java.lang.String fromUserName) {
mycai.pojo.User user = userDao.getUserByWechatId(fromUserName);
java.util.List<mycai.pojo.Order> orderList = orderDao.getList(user.getOpenid());
user.setOrderList(orderList);
return user;
} | public mycai.pojo.User getUserByWechatId(java.lang.String fromUserName) {
mycai.pojo.User user = userDao.getUserByWechatId(fromUserName);
return user;
} |
public void add(java.lang.String s) {
heap.add(s);
pushUp();
} | public void add(java.lang.String s) {
heap.add(s);
pushUp(1);
} |
public void dispose() {
super.dispose();
getSpriteBatch().dispose();
} | public void dispose() {
super.dispose();
} |
public void onClick() {
openPublisher(config.buildType, config.appPublisher, config.packageName);
if ((config.analytics) != null) {
config.analytics.logUiEvent(config.logUiEventName, getString(R.string.egab_try_other_app_log_event));
}
} | public void onClick(boolean b) {
openPublisher(config.buildType, config.appPublisher, config.packageName);
if ((config.analytics) != null) {
config.analytics.logUiEvent(config.logUiEventName, getString(R.string.egab_try_other_app_log_event));
}
} |
private java.lang.String getInputWithoutCommand(java.lang.String input, java.lang.String command) {
java.lang.String temp = input.substring(command.length()).trim();
return temp;
} | private java.lang.String getInputWithoutCommand(java.lang.String input, java.lang.String command) {
return input.substring(command.length()).trim();
} |
private void log(java.lang.String s) {
android.util.Log.d(org.epfl.locationprivacy.privacyestimation.PrivacyEstimator.LOGTAG, s);
org.epfl.locationprivacy.util.Utils.appendLog(((org.epfl.locationprivacy.privacyestimation.PrivacyEstimator.LOGTAG) + ".txt"), s);
} | private void log(java.lang.String s) {
android.util.Log.d(org.epfl.locationprivacy.privacyestimation.PrivacyEstimator.LOGTAG, s);
org.epfl.locationprivacy.util.Utils.appendLog(((org.epfl.locationprivacy.privacyestimation.PrivacyEstimator.LOGTAG) + ".txt"), s, context);
} |
public java.lang.Object call() throws java.lang.Exception {
if (exec instanceof com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect)
((com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect) (exec)).setLazyIteration(false);
return exec.execute(null);
} | public java.lang.Object call() throws java.lang.Exception {
return exec.execute(null);
} |
public configuration.parameters.PluginParameter<T> setAdditionalParameters(java.util.ArrayList<configuration.parameters.Parameter> additionalParameters) {
if (additionalParameters.isEmpty())
return this;
this.additionalParameters = additionalParameters;
initChildList();
return this;
} | public configuration.parameters.PluginParameter<T> setAdditionalParameters(java.util.List<configuration.parameters.Parameter> additionalParameters) {
if (additionalParameters.isEmpty())
return this;
this.additionalParameters = additionalParameters;
initChildList();
return this;
} |
public boolean isCannedRule() {
return (this.value) > 0;
} | public boolean isCannedRule() {
return (this.value) < 0;
} |
public synchronized boolean rotateShape(int position) {
return rotateShape(stateComponent.activeShapes[position]);
} | public synchronized boolean rotateShape(int position) {
if ((stateComponent.activeShapes[position]) == null)
return false;
return rotateShape(stateComponent.activeShapes[position]);
} |
void load(final java.util.Properties properties) {
pp.populateBean(properties, this);
} | void load(final java.util.Properties properties) {
this.pp.populateBean(properties, this);
} |
public com.sst.anouncements.DbAdapter open() throws android.database.SQLException {
dbHelper = new com.sst.anouncements.DbAdapter.DbHelper(context);
SQLdb = dbHelper.getWritableDatabase();
return this;
} | public com.sst.anouncements.DbAdapter open() throws android.database.SQLException {
this.dbHelper = new com.sst.anouncements.DbAdapter.DbHelper(this.context);
this.SQLdb = this.dbHelper.getWritableDatabase();
return this;
} |
public java.lang.Void call() throws java.lang.Exception {
getConnectionWithProps(sha256defaultDbUrl, propsNoRetrieval);
return null;
} | public java.lang.Void call() throws java.lang.Exception {
getConnectionWithProps(propsNoRetrieval);
return null;
} |
public void setQuantity(java.lang.String quantity) throws com.gracehoppers.jlovas.bookwrm.NegativeNumberException {
int converted = java.lang.Integer.parseInt(quantity);
if (converted < 1) {
throw new com.gracehoppers.jlovas.bookwrm.NegativeNumberException();
}else {
}
} | public void setQuantity(java.lang.String quantity) throws com.gracehoppers.jlovas.bookwrm.NegativeNumberException {
int converted = java.lang.Integer.parseInt(quantity);
if (converted < 1) {
throw new com.gracehoppers.jlovas.bookwrm.NegativeNumberException();
}else {
this.quantity = converte... |
public int compareTo(com.kylinolap.job.JobInstance o) {
return ((int) ((o.lastModified) - (this.lastModified)));
} | public int compareTo(com.kylinolap.job.JobInstance o) {
return (o.lastModified) < (this.lastModified) ? -1 : (o.lastModified) > (this.lastModified) ? 1 : 0;
} |
public void onNextCancelled(int pos); | void onNextCancelled(int pos); |
public void clearOldInput() {
try {
lastCountryClicked.getInputBanner().clearAll();
} catch (java.lang.NullPointerException npe) {
java.lang.System.out.println("Null");
}
} | public void clearOldInput() {
try {
lastCountryClicked.getInputBanner().clearAll();
} catch (java.lang.NullPointerException npe) {
}
} |
public void onGalleryEvent(com.collage.util.events.GalleryEvent galleryEvent) {
this.currentFriend = galleryEvent.getFriend();
galleryPresenter.populatePhotosList(currentFriend);
noFriendSelectedTextView.setVisibility(View.GONE);
} | public void onGalleryEvent(com.collage.util.events.GalleryEvent galleryEvent) {
currentFriend = galleryEvent.getFriend();
galleryPresenter.populatePhotosList(currentFriend);
noFriendSelectedTextView.setVisibility(View.GONE);
} |
public void setValue(java.io.File value) {
getEditor().setText((value == null ? "" : value.getAbsolutePath()));
} | public void setValue(java.io.File value) {
getEditor().setText((value == null ? null : value.getAbsolutePath()));
} |
public void onClick(android.content.DialogInterface dialog, int which) {
Reddit.seen.edit().putBoolean(SettingValues.PREF_FAB_CLEAR, true).apply();
me.ccrama.redditslide.Reddit.fabClear = true;
clearSeenPosts(false);
} | public void onClick(android.content.DialogInterface dialog, int which) {
Reddit.seen.edit().putBoolean(SettingValues.PREF_FAB_CLEAR, true).apply();
me.ccrama.redditslide.Reddit.fabClear = true;
clearSeenPosts(true);
} |
public gr.iti.mklab.reveal.crawler.CrawlRequest submitCrawlingJob(@gr.iti.mklab.reveal.web.RequestBody
gr.iti.mklab.reveal.web.Requests.CrawlPostRequest request) {
java.lang.String rootCrawlerDir = "/home/iti-310/VisualIndex/data/";
return crawlerCtrler.submit(request.isNew, ((rootCrawlerDir + "crawl_") + (requ... | public gr.iti.mklab.reveal.crawler.CrawlRequest submitCrawlingJob(@gr.iti.mklab.reveal.web.RequestBody
gr.iti.mklab.reveal.web.Requests.CrawlPostRequest request) {
java.lang.String rootCrawlerDir = "/home/iti-310/VisualIndex/data/";
return crawlerCtrler.submit(request.isNew, (rootCrawlerDir + (request.collectio... |
public void test() {
assertEquals(5, 5);
} | public void test() {
} |
public int compare(com.crystalplanet.obsidianpoker.util.Pair<com.crystalplanet.obsidianpoker.game.card.CardRank, java.lang.Integer> l, com.crystalplanet.obsidianpoker.util.Pair<com.crystalplanet.obsidianpoker.game.card.CardRank, java.lang.Integer> r) {
return l.second.equals(r.second) ? l.first.compareTo(r.first) :... | public int compare(com.crystalplanet.obsidianpoker.util.Pair<com.crystalplanet.obsidianpoker.game.card.CardRank, java.lang.Integer> l, com.crystalplanet.obsidianpoker.util.Pair<com.crystalplanet.obsidianpoker.game.card.CardRank, java.lang.Integer> r) {
return -(l.second.equals(r.second) ? l.first.compareTo(r.first)... |
public static java.lang.String toStringQuoted(java.util.List<?> a) {
return plume.ArraysMDE.toString(a, true);
} | public static java.lang.String toStringQuoted(java.util.Collection<?> a) {
return plume.ArraysMDE.toString(a, true);
} |
public void setUp() throws java.io.IOException {
scheduleCSV = getAbsolutePathOfResource("schedule.csv");
loadedSchedule = services.CSVHelper.createScheduleFromCSV(scheduleCSV);
homeController = new controllers.HomeController();
} | public void setUp() throws java.io.IOException {
scheduleCSV = new services.CSVHelper().getAbsolutePathOfResource("schedule.csv");
loadedSchedule = services.CSVHelper.createScheduleFromCSV(scheduleCSV);
homeController = new controllers.HomeController();
} |
if (((side == (DisplaySide.A)) && (base.isBaseOrAutoMerge())) || (base.isParent())) {
return com.google.gerrit.extensions.client.Side.PARENT;
}
return com.google.gerrit.extensions.client.Side.REVISION;
} | if ((side == (DisplaySide.A)) && ((base.isBaseOrAutoMerge()) || (base.isParent()))) {
return com.google.gerrit.extensions.client.Side.PARENT;
}
return com.google.gerrit.extensions.client.Side.REVISION;
} |
public boolean noMoodLogs() {
dbMoodLog.openRead();
boolean check = (dbMoodLog.getCountMoodLogs()) < 0;
dbMoodLog.close();
return check;
} | public boolean noMoodLogs() {
dbMoodLog.openRead();
boolean check = (dbMoodLog.getCountMoodLogs()) == 0;
dbMoodLog.close();
return check;
} |
public void moveTo(net.minecraft.util.BlockPos addDirection, int turn, net.minecraft.world.World world) {
moveTo(addDirection, world, turn);
} | private void moveTo(net.minecraft.util.BlockPos addDirection, int turn, net.minecraft.world.World world) {
moveTo(addDirection, world, turn);
} |
public android.view.View getDecorView() {
return getWindow().getDecorView();
} | private android.view.View getDecorView() {
return getWindow().getDecorView();
} |
void log(com.ysj.log.LogLevel logLevel, java.lang.Object object) {
log(settings.getTag(), logLevel, object);
} | void log(@com.ysj.log.LogLevel.Level
int logLevel, java.lang.Object object) {
log(settings.getTag(), logLevel, object);
} |
public void startThreads() {
new ayapplications.chat.sendThread(socket, username, serverAddress, serverPort, chatTextView, sendBox, sendButton).start();
new ayapplications.chat.recThread(socket, chatTextView, tC).start();
} | public void startThreads() {
new ayapplications.chat.sendThread(socket, username, serverAddress, serverPort, chatTextView, sendBox, sendButton, tC).start();
new ayapplications.chat.recThread(socket, serverAddress, serverPort, chatTextView, tC).start();
} |
public static boolean isYDifferenceTwoOrLess(int y, int newY) {
return (y - newY) <= 2;
} | public static boolean isYDifferenceTwoOrLess(int y, int newY) {
return (y - newY) >= (-2);
} |
public static com.fasterxml.jackson.databind.JsonNode createSingletonJSONNode(java.lang.String key, com.fasterxml.jackson.databind.JsonNode value) {
final com.fasterxml.jackson.databind.node.ObjectNode jsonNodes = JsonNodeFactory.instance.objectNode();
jsonNodes.put(key, value);
return jsonNodes;
} | private static com.fasterxml.jackson.databind.JsonNode createSingletonJSONNode(java.lang.String key, com.fasterxml.jackson.databind.JsonNode value) {
final com.fasterxml.jackson.databind.node.ObjectNode jsonNodes = JsonNodeFactory.instance.objectNode();
jsonNodes.put(key, value);
return jsonNodes;
} |
public ui.DropdownSearch setValue(float newValue) {
searchBuffer = new java.lang.StringBuilder("");
reorderItems();
super.setValue(newValue);
return this;
} | public ui.DropdownSearch setValue(float newValue) {
super.setValue(newValue);
searchBuffer = new java.lang.StringBuilder("");
return this;
} |
public boolean isClueAnsweredBy(final com.jam.jampardy.model.GameBoard.Contestant contestant, final com.jam.jampardy.model.Clue clue) {
return (answeredClueMap.get(clue)) == contestant;
} | public boolean isClueAnsweredBy(final com.jam.jampardy.model.GameBoard.Contestant contestant, final com.jam.jampardy.model.Clue clue) {
return ((contestant != null) && (clue != null)) && ((answeredClueMap.get(clue)) == contestant);
} |
public static final boolean extractSupportIncludedViews(final de.metas.ui.web.view.IViewRow row, final de.metas.ui.web.view.IViewRowOverrides rowOverrides) {
if (rowOverrides != null) {
return (rowOverrides.getIncludedViewId()) != null;
}else {
return row.hasIncludedView();
}
} | public static final boolean extractSupportIncludedViews(final de.metas.ui.web.view.IViewRow row, final de.metas.ui.web.view.IViewRowOverrides rowOverrides) {
if (rowOverrides != null) {
if ((rowOverrides.getIncludedViewId()) != null) {
return true;
}
}
return row.hasIncludedView(... |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
switch (item.getItemId()) {
case R.id.action_camera :
selectImage();
break;
}
return true;
} | public boolean onOptionsItemSelected(android.view.MenuItem item) {
switch (item.getItemId()) {
case R.id.action_camera :
selectImage();
return true;
}
return false;
} |
protected void onDetachedFromWindow() {
mViewPager.removeOnPageChangeListener(this);
super.onDetachedFromWindow();
} | protected void onDetachedFromWindow() {
if ((mViewPager) != null)
mViewPager.removeOnPageChangeListener(this);
super.onDetachedFromWindow();
} |
public void setRegionValues(java.util.ArrayList<com.pbm.Region> regions) {
regionValues = regions;
adapter.clear();
adapter.addAll(regionValues);
updateLocation();
} | public void setRegionValues(java.util.ArrayList<com.pbm.Region> regions) {
regionValues = regions;
if ((adapter) != null) {
adapter.clear();
adapter.addAll(regionValues);
updateLocation();
}
} |
public static java.io.InputStream getResourceAsStream(java.net.URL url) throws java.lang.Exception {
return org.aksw.kbox.KBox.getResourceAsStream(url, false, false);
} | public static java.io.InputStream getResourceAsStream(java.net.URL url) throws java.lang.Exception {
return org.aksw.kbox.KBox.getResourceAsStream(url, false);
} |
public final boolean isEmpty() {
return iterator().hasNext();
} | public final boolean isEmpty() {
return !(iterator().hasNext());
} |
public void sendEmail(cz.muni.fi.pv243.mustech.model.NotificationMessage message) {
sendEmail(message.getDestination(), message.getSubject(), message.getMessage());
java.lang.System.out.println(("Sending mail to: " + (message.getDestination())));
} | public void sendEmail(cz.muni.fi.pv243.mustech.model.NotificationMessage message) {
sendEmail(message.getDestination(), message.getSubject(), message.getMessage());
} |
public java.lang.String getUsernameFromToken(java.lang.String token) {
try {
final io.jsonwebtoken.Claims claims = getClaimsFromToken(token);
return claims.getSubject();
} catch (java.lang.Exception e) {
throw new java.lang.RuntimeException(e);
}
} | public java.lang.String getUsernameFromToken(java.lang.String token) {
try {
final io.jsonwebtoken.Claims claims = getClaimsFromToken(token);
return claims.getSubject();
} catch (java.lang.Exception e) {
return null;
}
} |
public static int getMarioYPos(final float[] marioPos) {
return ((int) (java.lang.Math.round(marioPos[1]))) / (MarioAI.MarioMethods.BLOCK_PIXEL_SIZE);
} | public static int getMarioYPos(final float[] marioPos) {
return ((int) ((marioPos[1]) / (MarioAI.MarioMethods.BLOCK_PIXEL_SIZE)));
} |
private void scanForBots(java.util.ArrayList<util.QueryObject> list) {
userObject = new util.UserObject(list);
if (userObject.checkForFrequentQueries()) {
userObject.printUserObject();
}
} | private void scanForBots(java.util.ArrayList<util.QueryObject> list) {
userObject = new util.UserObject(list);
java.lang.System.out.println(userObject.checkForFrequentQueries());
if (userObject.checkForFrequentQueries()) {
userObject.printUserObject();
}
} |
public Cell calculateDistance(Cell currentCell, Cell finaldestination) {
skillCheck();
if ((destinationCell) != null) {
}
return destinationCell;
} | public Cell calculateDistance(Cell currentCell, Cell finaldestination) {
skillCheck();
if ((destinationCell) != null) {
return currentCell;
}
return currentCell;
} |
public boolean mustLose() {
return ((((height) > 1) && (isEaten(0, 1))) && ((width) > 1)) && (isEaten(1, 0));
} | public boolean mustLose() {
return ((((height) > 1) && (isEaten(0, 1))) && ((width) > 1)) && (isEaten(0, 1));
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.