buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void setMessage(java.lang.String message) {
this.message = message;
} | public void setMessage(java.lang.String message) {
this.message += "\n" + message;
} |
public static void main(java.lang.String[] args) {
com.codegen.util.ShellComandInvoker obj = new com.codegen.util.ShellComandInvoker();
java.lang.String domainName = "google.com";
java.lang.String command = "ping -c 3 " + domainName;
java.lang.String output = obj.executeCommand(command);
java.lang.S... | public static void main(java.lang.String[] args) {
} |
protected double returnPIDInput() {
} | protected double returnPIDInput() {
return 0.0;
} |
public void solve() {
solve(0, 0);
} | public boolean solve() {
return solve(0, 0);
} |
private boolean isMultiScmAvailable() {
final jenkins.model.Jenkins jenkins = jenkins.model.Jenkins.getInstance();
if (jenkins == null) {
return false;
}
return (jenkins.getPlugin("multiple-scms")) != null;
} | private boolean isMultiScmAvailable() {
final jenkins.model.Jenkins jenkins = jenkins.model.Jenkins.getInstance();
return (jenkins.getPlugin("multiple-scms")) != null;
} |
public static play.mvc.Result editResult(int id) {
return TODO;
} | public static play.mvc.Result editResult() {
return TODO;
} |
public void onRestoreInstanceState(android.os.Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
position = savedInstanceState.getInt("Position");
myVideoView.seekTo(position);
} | public void onRestoreInstanceState(android.os.Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
} |
private double getCurrTransformValue(org.json.JSONObject trans, java.lang.String curTransform) {
return java.lang.Double.parseDouble(trans.getJSONObject(curTransform).getString("transform").split(" ")[1]);
} | private java.lang.String getCurrTransformValue(org.json.JSONObject trans, java.lang.String curTransform) {
return trans.getJSONObject(curTransform).getString("transform").split(" ")[1];
} |
public int hashCode() {
return (productId.hashCode()) * 31;
} | public int hashCode() {
if ((productId) != null) {
return (productId.hashCode()) * 31;
}
return 31;
} |
public boolean setLanguageFromPref(java.lang.Class cl) {
if (status) {
setLocale(language, cl);
return true;
}else
return false;
} | public boolean setLanguageFromPref(java.lang.Class cl) {
if (status) {
setLocale(language, cl, false);
return true;
}else
return false;
} |
public void messageFromReceiver(java.lang.String message) {
com.example.leonid.chatzilla.Chat.ChatFactory.addBackgroundText(getActivity(), message).doTask();
com.example.leonid.chatzilla.Utilities.UtilitiesFactory.appendFile(getActivity(), AppController.mPhoneNum, message).doTask();
} | public void messageFromReceiver(java.lang.String message) {
com.example.leonid.chatzilla.Chat.ChatFactory.addBackgroundText(getActivity(), message).doTask();
} |
public boolean hasAttribute(@org.jetbrains.annotations.NotNull
java.lang.String objectReference, @org.jetbrains.annotations.NotNull
java.lang.String attribute) {
return (hasReference(objectReference)) && (objectAttributes.get(objectReference).contains(attribute));
} | public boolean hasAttribute(@org.jetbrains.annotations.NotNull
java.lang.String objectReference, @org.jetbrains.annotations.NotNull
java.lang.String attribute) {
return ((objectAttributes.size()) == 1) || ((hasReference(objectReference)) && (objectAttributes.get(objectReference).contains(attribute)));
} |
public void close() {
if ((br) != null) {
try {
br.close();
} catch (java.io.IOException e) {
e.printStackTrace();
}
}
} | public void close() {
if ((this.br) != null) {
try {
this.br.close();
} catch (java.io.IOException e) {
e.printStackTrace();
}
}
} |
private void setTextGiveUp() {
this.text = "Game is interrupted." + "\nProgress will be lost";
} | private void setTextGiveUp() {
this.message = "Game is interrupted." + "\nProgress will be lost";
} |
void markAsLocalLoss(short atDepth, org.ggp.base.util.propnet.polymorphic.forwardDeadReckon.ForwardDeadReckonLegalMoveInfo withMove) {
if (!(mComplete)) {
mLocalSearchStatus = org.ggp.base.player.gamer.statemachine.sancho.TreeNode.LocalSearchStatus.LOCAL_SEARCH_LOSS;
mCompletionDepth = ((short) ((mD... | void markAsLocalLoss(short atDepth, org.ggp.base.util.propnet.polymorphic.forwardDeadReckon.ForwardDeadReckonLegalMoveInfo withMove) {
assert atDepth >= 0;
if (!(mComplete)) {
mLocalSearchStatus = org.ggp.base.player.gamer.statemachine.sancho.TreeNode.LocalSearchStatus.LOCAL_SEARCH_LOSS;
mComple... |
public void onAuthenticationError(int errorCode, java.lang.CharSequence errString) {
super.onAuthenticationError(errorCode, errString);
if (!(isCancelled)) {
callback.onError(errString.toString());
}
} | public void onAuthenticationError(int errorCode, java.lang.CharSequence errString) {
if (!(isCancelled)) {
callback.onError(errString.toString());
}
} |
private void goToRibbons() {
updateDatabaseWithRibbon();
android.content.Intent ribbonIntent = new android.content.Intent(getApplicationContext(), com.lerenard.bible.RibbonActivity.class).putExtra(com.lerenard.bible.ReadingActivity.RIBBON_KEY, ribbon);
startActivityForResult(ribbonIntent, com.lerenard.bible... | private void goToRibbons() {
updateDatabaseWithRibbon();
android.content.Intent ribbonIntent = new android.content.Intent(getApplicationContext(), com.lerenard.bible.RibbonActivity.class);
startActivityForResult(ribbonIntent, com.lerenard.bible.ReadingActivity.SELECT_RIBBON_CODE);
} |
public void addContextListenerOnce(net.jplugin.core.kernel.api.ctx.ThreadLocalContextListener ruleContextListener) {
if (((listeners) == null) || (listeners.contains(ruleContextListener)))
return ;
else
addContextListener(ruleContextListener);
} | public void addContextListenerOnce(net.jplugin.core.kernel.api.ctx.ThreadLocalContextListener ruleContextListener) {
if (((listeners) != null) && (listeners.contains(ruleContextListener)))
return ;
else
addContextListener(ruleContextListener);
} |
void setProvidedMana(int providedMana) {
if ((Items.Item.generateRandomNumber()) > 50)
this.providedMana = Items.Item.generateRandomNumber();
else
this.providedMana = Items.Item.MIN_STAT_POINTS;
} | void setProvidedMana() {
if ((Items.Item.generateRandomNumber()) > 50)
this.providedMana = Items.Item.generateRandomNumber();
else
this.providedMana = Items.Item.MIN_STAT_POINTS;
} |
protected void drawHoveringText(java.util.List<java.lang.String> text, int mouseX, int mouseY) {
drawHoveringText(text, mouseX, mouseY, 16777215);
} | protected void drawHoveringText(java.util.List<java.lang.String> text, int x, int y) {
drawHoveringText(text, x, y, 16777215);
} |
public void syncConfig(net.minecraftforge.common.config.Configuration config) {
isEnabled = config.getBoolean("Exp Achievements", Const.ConfigCategory.player, true, "Get experience from achievements (random 20-30 exp, multiplied by 100 if it is flagged as special)");
} | public void syncConfig(net.minecraftforge.common.config.Configuration config) {
isEnabled = config.getBoolean("Exp Achievements", Const.ConfigCategory.player, false, "Get experience from achievements (random 20-30 exp, multiplied by 100 if it is flagged as special)");
} |
public void testAddFilterWithParametersNullName() {
org.eclipse.virgo.repository.internal.StandardQueryTests.QUERY.addFilter(null, "bananas", new java.util.HashMap<java.lang.String, java.util.Set<java.lang.String>>(0));
} | public void testAddFilterWithParametersNullName() {
query.addFilter(null, "bananas", new java.util.HashMap<java.lang.String, java.util.Set<java.lang.String>>(0));
} |
public void failure(retrofit.RetrofitError error) {
log(sk.fiit.adhunter.activities.AdditionalnfoActivity.TAG, ("failure = " + (error.getMessage())));
mOwnerSpinner.setVisibility(View.GONE);
} | public void failure(retrofit.RetrofitError error) {
log(sk.fiit.adhunter.activities.AdditionalnfoActivity.TAG, ("failure = " + (error.getMessage())));
} |
public void test_handleException_relogin() throws java.lang.Throwable {
portInvoker.handleException(new java.lang.reflect.InvocationTargetException(new java.lang.RuntimeException(org.solenopsis.lasius.util.ExceptionUtil.INVALID_SESSION_ID)), method, session);
org.mockito.Mockito.verify(sessionMgr, org.mockito.M... | public void test_handleException_relogin() throws java.lang.Throwable {
} |
public boolean onKeyDown(int keyCode, android.view.KeyEvent event) {
switch (keyCode) {
case android.view.KeyEvent.KEYCODE_BACK :
android.content.Intent intent = new android.content.Intent(this, com.system.dormitory.dormitory_system_android.activity_main.Manager.Activity_Manager_Rental.class);
... | public boolean onKeyDown(int keyCode, android.view.KeyEvent event) {
switch (keyCode) {
case android.view.KeyEvent.KEYCODE_BACK :
finish();
return false;
default :
return false;
}
} |
public static java.util.Collection<com.alibaba.dubbo.registry.Registry> getRegistries() {
return java.util.Collections.unmodifiableCollection(com.alibaba.dubbo.registry.support.AbstractRegistryFactory.REGISTRIES.values());
} | public static java.util.Collection<com.alibaba.dubbo.registry.Registry> getRegistries() {
return java.util.Collections.unmodifiableCollection(new java.util.ArrayList<com.alibaba.dubbo.registry.Registry>(com.alibaba.dubbo.registry.support.AbstractRegistryFactory.REGISTRIES.values()));
} |
private java.util.List<interfaces.Feature> getFeatures() {
return new java.util.ArrayList<interfaces.Feature>() {
{
add(getNegationFeature());
add(getStopWordFeature());
}
};
} | private java.util.List<interfaces.Feature> getFeatures() {
return new java.util.ArrayList<interfaces.Feature>() {
{
add(getStopWordFeature());
}
};
} |
public static void setBold(javax.swing.JLabel label) {
java.awt.Font f = label.getFont();
label.setFont(f.deriveFont(((f.getStyle()) | (java.awt.Font.BOLD))));
} | public static javax.swing.JLabel setBold(javax.swing.JLabel label) {
java.awt.Font f = label.getFont();
label.setFont(f.deriveFont(((f.getStyle()) | (java.awt.Font.BOLD))));
return label;
} |
public void undo() throws javax.swing.undo.CannotUndoException {
super.undo();
not.setCondition(null);
condition = null;
conditionContainer.removeAll();
conditionContainer.setSize(300, 20);
refresh();
checkValid();
} | public void undo() throws javax.swing.undo.CannotUndoException {
super.undo();
not.setCondition(null);
condition = null;
conditionContainer.removeAll();
refresh();
checkValid();
} |
public long getCurrent() {
long result = 0;
if (complete) {
result = songs.get(currentPosition).getSongDuration();
}else {
result = mediaPlayer.getCurrentPosition();
}
return result;
} | public long getCurrent() {
return mediaPlayer.getCurrentPosition();
} |
public boolean isFull() {
if (full)
return true;
else
full = (this.sz.get()) >= (maxSz);
return full;
} | public boolean isFull() {
synchronized(this) {
return full;
}
} |
private boolean isProxime() {
boolean result = false;
try {
result = this.sensorsUtility.isProxime();
} catch (java.lang.InstantiationException e) {
e.printStackTrace();
}
return result;
} | protected boolean isProxime() {
boolean result = false;
try {
result = this.sensorsUtility.isProxime();
} catch (java.lang.InstantiationException e) {
e.printStackTrace();
}
return result;
} |
public void run() {
for (org.w2fc.geoportal.ws.RequestGeoObject requestGeoObject : geoObjectsReq) {
try {
geoObjectService.createAndSaveObject(requestGeoObject);
setErrors(false);
} catch (java.lang.Exception e) {
setErrors(true);
}
}
} | public void run() {
for (org.w2fc.geoportal.ws.RequestGeoObject requestGeoObject : geoObjectsReq) {
try {
geoObjectService.createAndSaveObject(requestGeoObject);
} catch (java.lang.Exception e) {
setErrors(true);
}
}
} |
public java.lang.String toUpperCase() {
return asNativeString().toLocaleUpperCase();
} | public java.lang.String toUpperCase() {
return asNativeString().toUpperCase();
} |
public void overrideLayer(int i, org.deeplearning4j.nn.conf.NeuralNetConfiguration.Builder builder) {
if (i == 1) {
builder.activationFunction("softmax");
builder.layerFactory(org.deeplearning4j.nn.layers.factory.LayerFactories.getFactory(org.deeplearning4j.nn.layers.OutputLayer.class));
bui... | public void overrideLayer(int i, org.deeplearning4j.nn.conf.NeuralNetConfiguration.Builder builder) {
builder.activationFunction("softmax");
builder.layerFactory(org.deeplearning4j.nn.layers.factory.LayerFactories.getFactory(org.deeplearning4j.nn.layers.OutputLayer.class));
builder.lossFunction(LossFunction... |
public void printBackward() {
cpe200.week2.PNode tmp = tail;
while (tmp != (head)) {
java.lang.System.out.print(tmp.data);
tmp = tmp.prev;
}
java.lang.System.out.println("");
} | public void printBackward() {
cpe200.week2.PNode tmp = tail;
while (tmp != null) {
java.lang.System.out.print(tmp.data);
tmp = tmp.prev;
}
java.lang.System.out.println("");
} |
public T update(T entity) throws java.lang.Exception {
getSession().saveOrUpdate(entity);
return entity;
} | public T saveOrUpdate(T entity) throws java.lang.Exception {
getSession().saveOrUpdate(entity);
return entity;
} |
public void updated(org.eclipse.leshan.server.registration.RegistrationUpdate update, org.eclipse.leshan.server.registration.Registration updatedRegistration, org.eclipse.leshan.server.registration.Registration previousRegistration) {
if (updatedRegistration.getEndpoint().equals(currentEndpointIdentifier)) {
... | public void updated(org.eclipse.leshan.server.registration.RegistrationUpdate update, org.eclipse.leshan.server.registration.Registration updatedRegistration, org.eclipse.leshan.server.registration.Registration previousRegistration) {
if (updatedRegistration.getEndpoint().equals(currentEndpointIdentifier.get())) {
... |
public boolean canPlaceBlockAt(net.minecraft.world.World worldIn, net.minecraft.util.math.BlockPos pos) {
return !(pl.asie.charset.module.storage.tanks.TileTank.checkPlacementConflict(worldIn.getTileEntity(pos.down()), worldIn.getTileEntity(pos.up())));
} | public boolean canPlaceBlockAt(net.minecraft.world.World worldIn, net.minecraft.util.math.BlockPos pos) {
return !(pl.asie.charset.module.storage.tanks.TileTank.checkPlacementConflict(worldIn.getTileEntity(pos.down()), worldIn.getTileEntity(pos.up()), (-1)));
} |
public void addTaskList(java.util.ArrayList<ScheduleHacks.Task> taskList) {
for (ScheduleHacks.Task newTask : taskList) {
addTask(newTask, true);
}
} | public void addTaskList(java.util.ArrayList<ScheduleHacks.Task> taskList) {
for (ScheduleHacks.Task newTask : taskList) {
addTask(newTask, true, 0);
}
} |
public boolean isLast() {
return (mPosition) == ((getCount()) - 1);
} | public boolean isLast() {
return ((getCount()) - 1) == (mPosition);
} |
public void setEditableMessage(java.lang.Boolean isEditableMessage) {
this.editableMessage = editableMessage;
} | public void setEditableMessage(java.lang.Boolean isEditableMessage) {
this.editableMessage = isEditableMessage;
} |
public void dispatchOnBeforeRestoreInstanceState(android.os.Parcelable state) {
detachMaskedFormatter();
} | public void dispatchOnBeforeRestoreInstanceState(android.os.Parcelable state) {
detachMaskedFormatter(false);
} |
public java.util.Set<com.senzo.qettal.checkout.purchase.PurchaseItem> getItems() {
return items;
} | public java.util.Set<com.senzo.qettal.checkout.purchase.PurchaseItem> getItems() {
return new java.util.HashSet(items);
} |
private java.lang.String regexpFormatFixup(java.lang.String originRegexp) {
java.lang.String fixedupRegexp = originRegexp;
fixedupRegexp = extendedRegexpFixup(fixedupRegexp);
debugPrint(("after extendedRegexpFixup: " + fixedupRegexp));
fixedupRegexp = collectionFixedup(fixedupRegexp);
debugPrint(("a... | private java.lang.String regexpFormatFixup(java.lang.String originRegexp) {
java.lang.String fixedupRegexp = originRegexp;
fixedupRegexp = extendedRegexpFixup(fixedupRegexp);
fixedupRegexp = collectionFixedup(fixedupRegexp);
debugPrint(("after collectionFixedup: " + fixedupRegexp));
return fixedupRe... |
public embla3d.engine.items.Item createBoundingBox(java.lang.String id, java.lang.Float[] pPosition, float pScale, float[] pLenght) {
return embla3d.engine.items.ItemManagement.createBoundingBox(id, pPosition, pScale, pLenght);
} | public embla3d.engine.items.Item createBoundingBox(java.lang.String id, float[] pPosition, float pScale, float[] pLenght) {
return embla3d.engine.items.ItemManagement.createBoundingBox(id, pPosition, pScale, pLenght);
} |
public final void clearEvent() {
delayInputTasks.dispose();
cDelayInputTimer.stop();
Gdx.app.getPreferences("TIMER").clear();
Gdx.app.getPreferences("TIMER").flush();
dispose();
} | public final void clearEvent() {
super.dispose();
delayInputTasks.dispose();
cDelayInputTimer.dispose();
} |
public boolean addPeer(freenet.node.PeerNode pn) {
return addPeer(pn, false, false);
} | public boolean addPeer(freenet.node.PeerNode pn) {
return addPeer(pn, false);
} |
private jcl.LispStruct internalApply(final jcl.functions.Closure currentClosure) {
return new testground.TestGroundLambdaFunction(currentClosure);
} | private static jcl.LispStruct internalApply(final jcl.functions.Closure currentClosure) {
return new testground.TestGroundLambdaFunction(currentClosure);
} |
public springfox.documentation.builders.ResourceListingBuilder authorizations(java.util.List<springfox.documentation.service.AuthorizationType> authorizations) {
this.authorizations.addAll(nullToEmptyList(authorizations));
return this;
} | public springfox.documentation.builders.ResourceListingBuilder authorizations(java.util.List<? extends springfox.documentation.service.AuthorizationType> authorizations) {
this.authorizations.addAll(nullToEmptyList(authorizations));
return this;
} |
public void bindingValueChanged(java.lang.Object source, T newValue) {
performSelect(newValue);
} | public void bindingValueChanged(java.lang.Object source, T newValue) {
performSelect(newValue, false);
} |
public java.lang.String toString() {
return java.lang.String.format("Comment[id=%d, comment='%s', recommended='%s']", getId(), getComment(), getRecommended());
} | public java.lang.String getText() {
return text;
} |
protected void onActivityResult(int request, int response, android.content.Intent data) {
super.onActivityResult(request, response, data);
mHelper.onActivityResult(request, response, data);
} | protected void onActivityResult(int request, int response, android.content.Intent data) {
super.onActivityResult(request, response, data);
mHelper.onActivityResult(request, response);
} |
public java.util.List<com.krishagni.catissueplus.core.common.domain.ConfigSetting> getAllSettings() {
return sessionFactory.getCurrentSession().getNamedQuery(com.krishagni.catissueplus.core.common.repository.impl.ConfigSettingDaoImpl.GET_ALL).list();
} | public java.util.List<com.krishagni.catissueplus.core.common.domain.ConfigSetting> getAllSettings() {
return getCurrentSession().getNamedQuery(com.krishagni.catissueplus.core.common.repository.impl.ConfigSettingDaoImpl.GET_ALL).list();
} |
public int getBurnTime(net.minecraft.item.ItemStack item) {
return (com.vanhal.progressiveautomation.entities.BaseTileEntity.getItemBurnTime(item)) / (com.vanhal.progressiveautomation.PAConfig.fuelCost);
} | public int getBurnTime(net.minecraft.item.ItemStack item) {
if ((com.vanhal.progressiveautomation.PAConfig.fuelCost) == 0)
return 0;
return (com.vanhal.progressiveautomation.entities.BaseTileEntity.getItemBurnTime(item)) / (com.vanhal.progressiveautomation.PAConfig.fuelCost);
} |
public void scoreRoadEndgame() {
java.util.Set<edu.brown.cs.scij.game.Posn> meepledPosns = board.getMeeplePosns();
for (edu.brown.cs.scij.game.Posn p : meepledPosns) {
scoreRoadAt(p);
}
} | public void scoreRoadEndgame() {
java.util.Set<edu.brown.cs.scij.game.Posn> meepledPosns = new java.util.HashSet(board.getMeeplePosns());
for (edu.brown.cs.scij.game.Posn p : meepledPosns) {
scoreRoadAt(p);
}
} |
public boolean onQueryTextSubmit(java.lang.String query) {
android.widget.Toast.makeText(getActivity(), query, Toast.LENGTH_SHORT).show();
return true;
} | public boolean onQueryTextSubmit(java.lang.String query) {
return true;
} |
public static double calculateTimeA(int len) {
double sum = 0;
for (int i = 0; i < 20; i++) {
sum += MergeSortTester.calculateTime(i);
}
return sum / 20;
} | public static double calculateTimeA(int len) {
double sum = 0;
for (int i = 0; i < 20; i++) {
sum += MergeSortTester.calculateTime(len);
}
return sum / 20;
} |
public static void calcU_RIGHT() {
de.sebhn.algorithm.excersise5.DLXNodeOld.calculateFiguresPosition(java.util.Arrays.asList(1, 2, 3, 9, 7), 3);
} | public static void calcU_RIGHT() {
if ((de.sebhn.algorithm.excersise5.DLXNodeOld.n) > 1) {
de.sebhn.algorithm.excersise5.DLXNodeOld.calculateFiguresPosition(java.util.Arrays.asList(1, 2, 3, 9, 7), 3);
}
} |
protected void addRelatedEntity(final java.lang.String name, final java.lang.Class type) {
this.relations.put(name, type);
} | protected void addRelatedEntity(final java.lang.String name, final java.lang.Class type) {
relations.put(name, type);
} |
public boolean getFlagDown() {
if ((flagdown) == true) {
return true;
}else {
return false;
}
} | public boolean getFlagDown() {
return this.flagdown;
} |
public static void deleteFile(java.io.File file) throws java.io.IOException {
if ((file == null) || (file.exists()))
throw new java.io.IOException("(Method deleteFileIfExist) file is null or not exist.");
else
org.apache.commons.io.FileUtils.forceDelete(file);
} | public static void deleteFile(java.io.File file) throws java.io.IOException {
if ((file == null) || (!(file.exists())))
throw new java.io.IOException("(Method deleteFileIfExist) file is null or not exist.");
else
org.apache.commons.io.FileUtils.forceDelete(file);
} |
public void onClick(android.content.DialogInterface dialog, int which) {
dialog.dismiss();
android.content.Intent returnIntent = new android.content.Intent();
returnIntent.putExtra(jycprogrammer.ultimatedbz.ezlapse.FullscreenCamera.EXTRA_PASS, true);
setResult(jycprogrammer.ultimatedbz.ezlapse.RESULT_CA... | public void onClick(android.content.DialogInterface dialog, int which) {
dialog.dismiss();
android.content.Intent returnIntent = new android.content.Intent();
returnIntent.putExtra(jycprogrammer.ultimatedbz.ezlapse.FullscreenCamera.EXTRA_PASS, false);
setResult(jycprogrammer.ultimatedbz.ezlapse.RESULT_C... |
public void setLayer(fr.pigeo.rimap.rimaprcp.riskcatalog.AbstractLayer wms) {
this.layer = wms;
this.layerName = wms.getName();
this.updateDisplay();
this.imgLegendData = new org.eclipse.swt.graphics.ImageData("/home/jean/tmp/shutter_Sélection_014.png");
} | public void setLayer(fr.pigeo.rimap.rimaprcp.riskcatalog.AbstractLayer wms) {
this.layer = wms;
this.layerName = wms.getName();
this.updateDisplay();
} |
public void run() {
tutorialScreen.setVisible(false);
begin();
} | public void run() {
tutorialScreen.setVisible(false);
} |
public void advanceTime(hillbillies.model.Unit unit, double dt) throws ogp.framework.util.ModelException {
} | public void advanceTime(hillbillies.model.Unit unit, double dt) throws ogp.framework.util.ModelException {
unit.advanceTime(dt);
} |
public void onDestroy() {
super.onDestroy();
mThumbnailThread.quit();
android.util.Log.i(com.example.photogallery.PhotoGalleryFragment.TAG, "Background thread destroyed!");
} | public void onDestroy() {
super.onDestroy();
android.util.Log.i(com.example.photogallery.PhotoGalleryFragment.TAG, "Background thread destroyed!");
} |
public void run() {
new TimeWidget.Alarm.AlarmNotify(owner, name, formatTime(time), mediasrc, snoozetime);
} | public void run() {
new TimeWidget.Alarm.AlarmNotify(owner, name, time, formatTime(time), mediasrc, snoozetime);
} |
protected void onResume() {
super.onResume();
if ((android.content.pm.PackageManager.PERMISSION_GRANTED) != (android.support.v4.content.ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE))) {
refreshPhotoList();
}
} | protected void onResume() {
super.onResume();
if ((android.content.pm.PackageManager.PERMISSION_GRANTED) == (android.support.v4.content.ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE))) {
refreshPhotoList();
}
} |
private void serialiseAuditFingerprints() {
try {
hudson.XmlFile file = getSerializationAuditFile();
file.write(this.auditWarnings);
file.write(this.newNumberOfConfirmedWarnings);
} catch (java.io.IOException io) {
java.lang.System.out.println(io);
}
} | private void serialiseAuditFingerprints() {
try {
hudson.XmlFile file = getSerializationAuditFile();
file.write(this.auditWarnings);
} catch (java.io.IOException io) {
java.lang.System.out.println(io);
}
} |
public java.lang.Boolean setChooseDrawings(javax.swing.JComboBox<java.lang.String> combo) {
boolean test = true;
if (test || (m_Trace)) {
java.lang.System.out.println("DrawingView::setChooseDrawings() BEGIN");
}
m_chooseDrawings = combo;
return true;
} | public java.lang.Boolean setChooseDrawings(javax.swing.JComboBox<java.lang.String> combo) {
m_chooseDrawings = combo;
return true;
} |
public boolean remove(java.lang.Object key) {
acquireSharedLock();
try {
return (sbTree.remove(key)) != null;
} finally {
releaseSharedLock();
}
} | public boolean remove(java.lang.Object key) {
return (sbTree.remove(key)) != null;
} |
public void onLayoutChildren(android.support.v7.widget.RecyclerView.Recycler recycler, android.support.v7.widget.RecyclerView.State state) {
recyclerRef = recycler;
if (state.isPreLayout()) {
onPreLayoutChildren(recycler);
}else {
onRealLayoutChildren(recycler);
}
} | public void onLayoutChildren(android.support.v7.widget.RecyclerView.Recycler recycler, android.support.v7.widget.RecyclerView.State state) {
recyclerRef = recycler;
if (state.isPreLayout()) {
onPreLayoutChildren(recycler, state);
}else {
onRealLayoutChildren(recycler);
}
} |
public static java.lang.String reverseMapExternal(java.lang.Class<?> name) {
return com.maxqia.ReflectionRemapper.Utils.reverseMap(name.getName()).replace('$', '.').replace('/', '.');
} | public static java.lang.String reverseMapExternal(java.lang.Class<?> name) {
return com.maxqia.ReflectionRemapper.Utils.reverseMap(name).replace('$', '.').replace('/', '.');
} |
public void addTask(android.content.ContentValues data) {
this.database.insert(DefaultValue.value.DB_table_name, null, data);
this.notifyChange(getTask().toString());
} | public void addTask(android.content.ContentValues data) {
this.database.insert(DefaultValue.value.DB_table_name, null, data);
this.notifyChange(getData().toString());
} |
public void launchJokeActivity(android.view.View view) {
new com.elorri.android.builditbigger.GCEndpointsApiService(this).execute();
} | public void launchJokeActivity(android.view.View view) {
new com.elorri.android.builditbigger.GCEndpointsApiService(this).execute(this);
} |
void initialize(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr, int defStyleRes) {
mImpl = com.slaterama.fab2.widget.roundedbutton.RoundedButtonImpl.newInstance(this, fillAttributes(context, attrs, defStyleAttr, defStyleRes));
} | void initialize(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr, int defStyleRes) {
mImpl = com.slaterama.fab2.widget.roundedbutton.RoundedButtonImpl.newInstance(this, fillAttributes(context, attrs, defStyleAttr, defStyleRes));
mImpl.initialize();
} |
public org.killbill.billing.control.plugin.api.OnFailurePaymentControlResult onFailureCall(final org.killbill.billing.control.plugin.api.PaymentControlContext paymentControlContext, final java.lang.Iterable<org.killbill.billing.payment.api.PluginProperty> properties) throws org.killbill.billing.control.plugin.api.Payme... | public org.killbill.billing.control.plugin.api.OnFailurePaymentControlResult onFailureCall(final org.killbill.billing.control.plugin.api.PaymentControlContext paymentControlContext, final java.lang.Iterable<org.killbill.billing.payment.api.PluginProperty> properties) throws org.killbill.billing.control.plugin.api.Payme... |
public static int findSecond(int money, int cost, int indexOfFirst) {
int costOfSecond = money - cost;
return com.epam.Solution.pull(indexOfFirst, costOfSecond);
} | public static int findSecond(int money, int cost, int indexOfFirst) {
if (cost >= money)
return -1;
int costOfSecond = money - cost;
return com.epam.Solution.pull(indexOfFirst, costOfSecond);
} |
public void onPrepared(android.media.MediaPlayer mediaPlayer) {
mediaPlayer.seekTo(0);
mediaPlayer.setLooping(true);
} | public void onPrepared(android.media.MediaPlayer mediaPlayer) {
mediaPlayer.setLooping(true);
} |
public static void setDefaults(android.content.Context context) {
android.preference.PreferenceManager.setDefaultValues(context, Const.APP_PREFS_NAME, Context.MODE_PRIVATE, R.xml.prefs_defaults, false);
} | public static void setDefaultValues(android.content.Context context) {
android.preference.PreferenceManager.setDefaultValues(context, Const.APP_PREFS_NAME, Context.MODE_PRIVATE, R.xml.prefs_defaults, false);
} |
public void run() {
try {
fallingStars();
fallingBerries();
} catch (java.lang.InterruptedException e) {
e.printStackTrace();
}
} | public void run() {
try {
fallingStars();
} catch (java.lang.InterruptedException e) {
e.printStackTrace();
}
} |
public void updateThingeeName() {
mNameSummary.setText(mThingySdkManager.getDeviceName(mDevice));
} | public void updateThingeeName() {
final java.lang.String name = mThingySdkManager.getDeviceName(mDevice);
if (name != null) {
mNameSummary.setText(name);
}
} |
net.spy.memcached.MemcachedClient client = org.exist.xquery.modules.memcached.MemcachedModule.clients.get(clientHandle);
client.shutdown();
org.exist.xquery.modules.memcached.MemcachedModule.clients.remove(java.lang.Long.valueOf(clientHandle));
} | final net.spy.memcached.MemcachedClient client = org.exist.xquery.modules.memcached.MemcachedModule.clients.remove(java.lang.Long.valueOf(clientHandle));
client.shutdown();
} |
public static int getXIndex(java.lang.String variable) {
int XPos = variable.indexOf("X");
if (XPos == (-1)) {
}
} | public static int getXIndex(java.lang.String variable) {
int XPos = variable.indexOf("X");
if (XPos == (-1)) {
return -1;
}
return java.lang.Integer.parseInt(variable.substring((XPos + 1)));
} |
public void onResume() {
super.onResume();
org.opencv.android.OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_9, this, mLoaderCallback);
} | public void onResume() {
super.onResume();
} |
public void onHandRelease(com.daimajia.swipe.SwipeLayout arg0, float arg1, float arg2) {
android.util.Log.d("TimeFleeting", "onHandRelease");
} | public void onHandRelease(com.daimajia.swipe.SwipeLayout arg0, float arg1, float arg2) {
} |
public android.view.ViewGroup getInnerView() {
if ((mHost) instanceof com.taobao.weex.ui.view.refresh.wrapper.BounceScrollerView) {
return ((com.taobao.weex.ui.view.refresh.wrapper.BounceScrollerView) (mHost)).getInnerView();
}else {
return getHostView();
}
} | public android.view.ViewGroup getInnerView() {
if ((mHost) == null)
return null;
if ((mHost) instanceof com.taobao.weex.ui.view.refresh.wrapper.BounceScrollerView) {
return ((com.taobao.weex.ui.view.refresh.wrapper.BounceScrollerView) (mHost)).getInnerView();
}else {
return getH... |
public lovera.kualpostinvou.modelos.Localizacao getLocalizacao() throws java.lang.Exception {
if (temLastLocation())
return this.localizacao;
forceLocationRequest();
if (temLastLocation())
return this.localizacao;
throw new java.lang.Exception();
} | public lovera.kualpostinvou.modelos.Localizacao getLocalizacao() {
return localizacao;
} |
public org.luaj.vm2.LuaValue arg(int i) {
return values[i];
} | public org.luaj.vm2.LuaValue arg(int i) {
return values[(--i)];
} |
public void turnOffSync() {
android.content.ContentResolver.setSyncAutomatically(mAccount, AUTHORITY, false);
} | public void turnOffSync() {
turnOffSync(mAccount);
} |
public void collideWith(de.himbiss.ld35.engine.Hitbox object, float deltaX, float deltaY) {
java.lang.System.out.println(("Player collided with: " + object));
} | public void collideWith(de.himbiss.ld35.engine.Hitbox object, float deltaX, float deltaY) {
} |
public foo.NullableCollectionFieldsBuilder strings(java.lang.String... strings) {
if (strings == null) {
this.strings = null;
return this;
}
return strings(foo.Arrays.asList(strings));
} | public foo.NullableCollectionFieldsBuilder strings(java.lang.String... strings) {
if (strings == null) {
this.strings = null;
return this;
}
return strings(java.util.Arrays.asList(strings));
} |
public void test_negativeNumbers() throws StringCalculatorException {
StringCalculator cal = new StringCalculator();
int sum = cal.add("-5,6");
assertEquals(1, sum);
} | public void test_negativeNumbers() throws StringCalculatorException {
StringCalculator cal = new StringCalculator();
int sum = cal.add("-5,6");
} |
public double get(int... nd) {
assert (nd.length) == (this.numDimensions);
int index = findIndex(nd);
return index < 0 ? 0 : values.get(index);
} | public double get(int... keys) throws java.lang.Exception {
assert (keys.length) == (this.numDimensions);
int index = findIndex(keys);
return index < 0 ? 0 : values.get(index);
} |
public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRetainInstance(false);
} | public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRetainInstance(true);
} |
public void insere(br.com.marco.agenda.model.Aluno aluno) {
android.database.sqlite.SQLiteDatabase database = getWritableDatabase();
android.content.ContentValues dados = getDados(aluno);
long idAluno = database.insert("Alunos", null, dados);
aluno.setId(idAluno);
} | public void insere(br.com.marco.agenda.model.Aluno aluno) {
android.database.sqlite.SQLiteDatabase database = getWritableDatabase();
android.content.ContentValues dados = getDados(aluno);
database.insert("Alunos", null, dados);
} |
public void removeLast() {
com.filbin.Enumerables.Linked.Single.Node<T> current = head;
com.filbin.Enumerables.Linked.Single.Node<T> previous = null;
while (current != null) {
current = current.next;
previous = current;
}
previous.next = null;
(this.size)--;
} | public void removeLast() {
com.filbin.Enumerables.Linked.Single.Node<T> current = head;
com.filbin.Enumerables.Linked.Single.Node<T> previous = null;
while (current != null) {
previous = current;
current = current.next;
}
previous.next = null;
(this.size)--;
} |
public int getTabindex() {
return (_auxinf) != null ? _auxinf.tabindex : 0;
} | public int getTabindex() {
return ((_auxinf) != null) && ((_auxinf.tabindex) != null) ? _auxinf.tabindex : 0;
} |
public java.util.List<ftTodoList.Note> getNotes() throws java.sql.SQLException {
notes = ftTodoList.DatabaseManager.selectNotes(selected);
return notes;
} | public java.util.List<ftTodoList.Note> getNotes() throws java.sql.SQLException {
return notes;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.