buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private void panelSQMouseClicked(java.awt.event.MouseEvent evt) {
GUI.PT.StatGraph.squatGraph();
panelSQ.add(GUI.PT.StatGraph.squatGraph());
} | private void panelSQMouseClicked(java.awt.event.MouseEvent evt) {
GUI.PT.StatGraph.squatGraph();
} |
public <T> T manufacturePojo(java.lang.Class<T> pojoClass, java.lang.reflect.Type... genericTypeArgs) {
uk.co.jemos.podam.common.ManufacturingContext manufacturingCtx = new uk.co.jemos.podam.common.ManufacturingContext();
manufacturingCtx.getPojos().put(pojoClass, 0);
return doManufacturePojo(pojoClass, man... | public <T> T manufacturePojo(java.lang.Class<T> pojoClass, java.lang.reflect.Type... genericTypeArgs) {
uk.co.jemos.podam.common.ManufacturingContext manufacturingCtx = new uk.co.jemos.podam.common.ManufacturingContext();
manufacturingCtx.getPojos().put(pojoClass, 1);
return doManufacturePojo(pojoClass, man... |
public void request(long n) {
s.onNext(0);
if (!(completed)) {
s.onComplete();
}
} | public void request(long n) {
s.onNext(0);
if (!(completed)) {
s.onComplete();
completed = true;
}
} |
public java.lang.Object process(java.lang.Object object, java.lang.String name, java.lang.Object value) {
return value;
} | public java.lang.Object process(java.lang.Object object, java.lang.String name, java.lang.Object value) {
values.put(name, value);
return value;
} |
public void checkDevice(long userId, long deviceId) throws java.lang.SecurityException {
if (getNotNull(userId).contains(deviceId)) {
throw new java.lang.SecurityException("Device access denied");
}
} | public void checkDevice(long userId, long deviceId) throws java.lang.SecurityException {
if (!(getNotNull(userId).contains(deviceId))) {
throw new java.lang.SecurityException("Device access denied");
}
} |
public void onLocationChanged(android.location.Location location) {
if (mode_active) {
mapView.getController().setCenter(mMyLocationOverlay.getMyLocation());
}
} | public void onLocationChanged(android.location.Location location) {
if ((mode_active) && ((mMyLocationOverlay.getMyLocation()) != null)) {
mapView.getController().setCenter(mMyLocationOverlay.getMyLocation());
}
} |
public boolean tryArchive() {
try {
java.io.File archiveDir = getArchiveStorageDir();
tryWriteToFile(archiveDir);
} catch (java.lang.Exception ex) {
this.error = ex.getMessage();
return false;
}
return true;
} | public boolean tryArchive() {
try {
java.io.File archiveDir = getArchiveStorageDir();
tryWriteToFile(archiveDir);
return true;
} catch (java.lang.Exception ex) {
this.error = ex.getMessage();
return false;
}
} |
public void setHeaderList(java.util.ArrayList<java.lang.String> headerList) {
this.listDataHeader = headerList;
} | public void setHeaderList(java.util.ArrayList<java.lang.String> headerList) {
listDataHeader = headerList;
} |
protected BucketMapReduce.Builder addReducePaging(com.basho.riak.client.api.commands.mapreduce.BucketMapReduce.Builder builder, java.lang.Integer take, java.lang.Integer skip) {
return addReducePaging(builder, false, take, skip);
} | protected BucketMapReduce.Builder addReducePaging(com.basho.riak.client.api.commands.mapreduce.BucketMapReduce.Builder builder, java.lang.Integer take, java.lang.Integer skip) {
return addReducePaging(builder, true, take, skip);
} |
public audio.metadata.Metadata getMetadata(audio.metadata.MetadataType type) {
for (audio.metadata.Metadata metadata : mMetadata) {
if ((metadata.getMetadataType()) == type) {
return metadata;
}
}
return null;
} | public audio.metadata.Metadata getMetadata(audio.metadata.MetadataType type) {
return mMetadata.get(type);
} |
protected com.react_native_signature.RCTSigntureView createViewInstance(com.facebook.react.uimanager.ThemedReactContext reactContext) {
this.mContext = reactContext;
return new com.react_native_signature.RCTSigntureView(reactContext);
} | protected com.react_native_signature.RCTSigntureView createViewInstance(com.facebook.react.uimanager.ThemedReactContext reactContext) {
return new com.react_native_signature.RCTSigntureView(reactContext);
} |
public void onSuccess(T result) {
wrapper.set(result, transaction);
} | public void onSuccess(T result) {
super.onSuccess(result);
wrapper.set(result, transaction);
} |
public static org.joda.time.DateTime getEventTime(com.amazonaws.services.cloudtrail.processinglibrary.model.CloudTrailEvent event) {
event = com.google.common.base.Preconditions.checkNotNull(event, org.zalando.stups.fullstop.events.CloudtrailEventSupport.CLOUD_TRAIL_EVENT_SHOULD_NEVER_BE_NULL);
com.amazonaws.se... | public static org.joda.time.DateTime getEventTime(com.amazonaws.services.cloudtrail.processinglibrary.model.CloudTrailEvent event) {
event = com.google.common.base.Preconditions.checkNotNull(event, org.zalando.stups.fullstop.events.CloudtrailEventSupport.CLOUD_TRAIL_EVENT_SHOULD_NEVER_BE_NULL);
return new org.j... |
public static void initialize() {
ca.q0r.sponge.mchat.api.API.service = ca.q0r.sponge.mchat.util.ServerUtil.getGame().getServiceManager().provide(org.spongepowered.api.service.permission.PermissionService.class).orNull();
ca.q0r.sponge.mchat.api.API.spying = new java.util.HashMap<java.lang.String, java.lang.Boo... | public static void initialize() {
ca.q0r.sponge.mchat.api.API.spying = new java.util.HashMap<java.lang.String, java.lang.Boolean>();
} |
public void onEnable() {
com.nemez.cmdmgr.CommandManager.debugHelpMenu = true;
com.nemez.cmdmgr.CommandManager.registerCommand(new java.io.File("plugins/test.cmd"), this, this);
} | public void onEnable() {
com.nemez.cmdmgr.CommandManager.registerCommand(new java.io.File("plugins/test.cmd"), this, this);
} |
public static org.talend.core.runtime.process.IBuildJobHandler createBuildJobHandler(org.talend.core.model.properties.ProcessItem processItem, java.lang.String contextName, java.lang.String version, java.util.Map<org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManager.ExportChoice, java.lang.Object>... | public static org.talend.core.runtime.process.IBuildJobHandler createBuildJobHandler(org.talend.core.model.properties.ProcessItem processItem, java.lang.String contextName, java.lang.String version, java.util.Map<org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManager.ExportChoice, java.lang.Object>... |
private void insert(int j) {
if ((str) == " ")
str = "";
str = (str) + (java.lang.Integer.toString(j));
showResult.setText(str);
} | private void insert(int j) {
if (str.equals(" "))
str = "";
str = (str) + (java.lang.Integer.toString(j));
showResult.setText(str);
} |
public void renumberDeductions() {
int i = 0;
for (erp.mod.hrs.db.SHrsPayrollReceiptDeduction deduction : maHrsDeductions) {
deduction.setPkMoveId((++i));
}
} | public void renumberDeductions() {
int i = 0;
java.util.Collections.sort(maHrsDeductions);
for (erp.mod.hrs.db.SHrsPayrollReceiptDeduction deduction : maHrsDeductions) {
deduction.setPkMoveId((++i));
}
} |
private void dismissDialogIfOpen() {
if ((mAlertDialog) != null) {
mAlertDialog.dismiss();
mAlertDialog = null;
}
} | public void dismissDialogIfOpen() {
if ((mAlertDialog) != null) {
mAlertDialog.dismiss();
mAlertDialog = null;
}
} |
public void store(com.edu.library.model.Author p_value) {
try {
dataAcces.getByname(p_value.getName());
throw new com.edu.library.business.exception.BusinessException(com.edu.library.business.exception.ErrorMessages.ERROR_CONSTRAINT_VIOLATION);
} catch (com.edu.library.data.exception.TechnicalEx... | public void store(com.edu.library.model.Author p_value) {
dataAcces.store(p_value);
} |
public void PlayGame() {
DivideCardsOnStart();
currentPlayerTurn = 0;
if ((currentPlayerTurn) == 0) {
java.lang.System.out.println("Player Turn!");
java.lang.System.out.println(("userCardsLeft: " + (userCardsLeft)));
}
DrawComputerCards();
} | public void PlayGame() {
DivideCardsOnStart();
currentPlayerTurn = 0;
DrawComputerCards();
} |
public synchronized void insertToCache(java.lang.String key, java.lang.Object is, mrrexz.github.com.downcachedroid.model.downfiles.BaseDownFileModule downFileType) {
dataUpdateListener.cacheElemAdded(key);
put(key, new android.support.v4.util.Pair(is, downFileType));
} | public synchronized void insertToCache(java.lang.String key, java.lang.Object data, mrrexz.github.com.downcachedroid.model.downfiles.BaseDownFileModule downFileType) {
put(key, new android.support.v4.util.Pair(data, downFileType));
dataUpdateListener.cacheElemAdded(key);
} |
public E poll() {
updateFileStore();
return mInMemoryQueue.poll();
} | public E poll() {
E item = mInMemoryQueue.poll();
updateFileStore();
return item;
} |
public android.support.v4.app.Fragment getItem(int position) {
return com.add.toeic.activity.DetailWordActivity.PlaceholderFragment.newInstance((position + 1), mArrayList, mGroupWord, mWord);
} | public android.support.v4.app.Fragment getItem(int position) {
return com.add.toeic.activity.DetailWordActivity.PlaceholderFragment.newInstance(((mWord) + 1), mArrayList, mGroupWord, mWord);
} |
public boolean addSubClassEntityConfig(net.dankito.jpa.annotationreader.config.EntityConfig subClassEntityConfig) throws java.sql.SQLException {
if ((subClassEntityConfigs.contains(subClassEntityConfig)) == false) {
subClassEntityConfig.setParentEntityConfig(this);
return subClassEntityConfigs.add(s... | public boolean addSubClassEntityConfig(net.dankito.jpa.annotationreader.config.EntityConfig subClassEntityConfig) throws java.sql.SQLException {
if ((subClassEntityConfigs.contains(subClassEntityConfig)) == false) {
return subClassEntityConfigs.add(subClassEntityConfig);
}
return false;
} |
public void saveAction() throws java.sql.SQLException {
for (ftTodoList.Note n : notes) {
if ((n.getId()) == (editid))
ftTodoList.DatabaseManager.insertNote(n);
}
updateNotes();
editid = Note.INV_ID;
} | public void saveAction() throws java.sql.SQLException {
for (ftTodoList.Note n : notes) {
if ((n.getId()) == (editid))
ftTodoList.DatabaseManager.insertNote(n);
}
editid = Note.INV_ID;
updateNotes();
} |
public void bind(int port) throws java.net.SocketException {
socket = new java.net.DatagramSocket();
} | public void bind(int port) throws java.net.SocketException {
socket = new java.net.DatagramSocket(port);
} |
private void jCheckBoxSubfoldersActionPerformed(java.awt.event.ActionEvent evt) {
appEngine.setVisitSubDir(jCheckBoxSubfolders.isSelected());
java.lang.System.out.println(jCheckBoxSubfolders.isSelected());
} | private void jCheckBoxSubfoldersActionPerformed(java.awt.event.ActionEvent evt) {
appEngine.setVisitSubDir(jCheckBoxSubfolders.isSelected());
} |
private <K, V, T> org.infinispan.filter.Converter<K, V, T> wrap(org.radargun.service.Converter<K, V, T> converter) {
return new org.radargun.service.InfinispanIterable.ConverterWrapper<K, V, T>(converter);
} | protected <K, V, T> org.infinispan.filter.Converter<K, V, T> wrap(org.radargun.service.Converter<K, V, T> converter) {
return new org.radargun.service.InfinispanIterable.ConverterWrapper(converter);
} |
public byte getUspesna() {
return this.uspesna;
} | public boolean getUspesna() {
return (this.uspesna) != 0;
} |
protected org.mycore.vidconv.frontend.entity.HWAccelDeviceSpec clone() {
throw new java.lang.UnsupportedOperationException();
} | protected abstract org.mycore.vidconv.frontend.entity.HWAccelDeviceSpec clone(); |
public org.neo4j.graphdb.Label createLabel(java.lang.String label) {
org.neo4j.graphdb.Label l = null;
try (org.neo4j.graphdb.Transaction tx = uk.ac.ebi.neo4jUtils.Neo4jAccessUtils.db.beginTx()) {
l = org.neo4j.graphdb.DynamicLabel.label("Annotation");
tx.close();
}
return l;
} | public org.neo4j.graphdb.Label createLabel(java.lang.String label) {
org.neo4j.graphdb.Label l = null;
try (org.neo4j.graphdb.Transaction tx = uk.ac.ebi.neo4jUtils.Neo4jAccessUtils.db.beginTx()) {
l = org.neo4j.graphdb.DynamicLabel.label(label);
tx.close();
}
return l;
} |
private java.util.Properties getHibernateProperties() {
java.util.Properties properties = new java.util.Properties();
properties.put("hibernate.show_sql", "true");
properties.put("hibernate.dialect", "org.hibernate.dialect.MySQLDialect");
properties.put("hibernate.hbm2ddl.auto", "update");
java.lang... | private java.util.Properties getHibernateProperties() {
java.util.Properties properties = new java.util.Properties();
properties.put("hibernate.show_sql", "false");
properties.put("hibernate.dialect", "org.hibernate.dialect.MySQLDialect");
properties.put("hibernate.hbm2ddl.auto", "update");
java.lan... |
public java.lang.Boolean apply(java.lang.Boolean aBoolean) throws java.lang.Exception {
_log("We are inside map operator of Observable");
_doSomethingLong();
return null;
} | public java.lang.Boolean apply(java.lang.Boolean aBoolean) throws java.lang.Exception {
_log("We are inside map operator of Observable");
_doSomethingLong();
return aBoolean;
} |
protected void onStart() {
super.onStart();
mAuth.addAuthStateListener(mAuthListener);
UserProfileInfo();
} | protected void onStart() {
super.onStart();
mAuth.addAuthStateListener(mAuthListener);
} |
public boolean isShuffle() {
if (((audioTrackProvider) instanceof fredboat.audio.queue.SimpleTrackProvider) && (((fredboat.audio.queue.SimpleTrackProvider) (audioTrackProvider)).isShuffle())) {
return true;
}
return false;
} | public boolean isShuffle() {
return ((audioTrackProvider) instanceof fredboat.audio.queue.SimpleTrackProvider) && (((fredboat.audio.queue.SimpleTrackProvider) (audioTrackProvider)).isShuffle());
} |
public com.SIMRacingApps.Data setVolume(double percentage) {
if ((m_clip) != null)
synchronized(m_clip) {
m_clip.setVolume((percentage / 100.0));
}
synchronized(m_volume) {
m_volume = percentage;
}
return getVolume();
} | public com.SIMRacingApps.Data setVolume(double percentage) {
if ((m_clip) != null)
synchronized(m_clip) {
m_clip.setVolume(percentage);
}
synchronized(m_volume) {
m_volume = percentage;
}
return getVolume();
} |
public boolean accept(java.net.URL x) {
java.lang.String fn = x.getFile();
java.lang.System.err.println(("fn = " + fn));
return fileFilter.accept(new java.io.File(fn));
} | public boolean accept(java.net.URL x) {
java.lang.String fn = x.getFile();
return fileFilter.accept(new java.io.File(fn));
} |
public void SelectModel(android.view.View v) {
modelADBObject.show();
} | public void SelectModel(android.view.View v) {
if ((modelADBObject) != null) {
modelADBObject.show();
}
} |
public int getRenderPasses(int metadata) {
return 9;
} | public int getRenderPasses(int metadata) {
return 0;
} |
public static void main(java.lang.String[] args) {
src.Test t = new src.Test();
src.StatsView test = new src.StatsView();
test.setVisible(true);
t.setContentPane(test);
t.setVisible(true);
} | public static void main(java.lang.String[] args) {
src.Test t = new src.Test();
src.StatsView test = new src.StatsView(null);
test.setVisible(true);
t.setContentPane(test);
t.setVisible(true);
} |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_diaryentry);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
evaluateData();
} | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_diaryentry);
evaluateData();
} |
protected void onResume() {
super.onResume();
android.content.Intent intent = new android.content.Intent(this, com.android.grabhouse.FetchAndSaveDataService.class);
bindService(intent, connection, Context.BIND_AUTO_CREATE);
} | protected void onResume() {
android.content.Intent intent = new android.content.Intent(this, com.android.grabhouse.FetchAndSaveDataService.class);
bindService(intent, connection, Context.BIND_AUTO_CREATE);
super.onResume();
} |
private void initializePlayer(float x, float y) {
player = new com.niklasnson.nightmare.Object.Player(world, 32, (64 + ((com.niklasnson.nightmare.Constants.player_height) / 2)));
player.setAction(2);
} | private void initializePlayer() {
player = new com.niklasnson.nightmare.Object.Player(world, 32, (64 + ((com.niklasnson.nightmare.Constants.player_height) / 2)));
player.setAction(0);
} |
public int startSowing() {
int seedsToSow = this.numSeeds;
StdOut.println((("Sowing " + seedsToSow) + " seeds."));
return this.nextPit.sowSeed(seedsToSow);
} | public int startSowing() {
int seedsToSow = this.numSeeds;
StdOut.println((("Sowing " + seedsToSow) + " seeds."));
this.numSeeds = 0;
return this.nextPit.sowSeed(seedsToSow);
} |
public void add(java.lang.String word) {
addWord(word, 0, root);
} | public void add(java.lang.String word) {
word = word.toLowerCase();
addWord(word, 0, root);
} |
public void placeBlock(net.glowstone.entity.GlowPlayer player, net.glowstone.block.GlowBlockState state, org.bukkit.block.BlockFace face, org.bukkit.inventory.ItemStack holding, java.util.Vector clickedLoc) {
state.setType(getMaterial());
state.setData(holding.getData());
} | public void placeBlock(net.glowstone.entity.GlowPlayer player, net.glowstone.block.GlowBlockState state, org.bukkit.block.BlockFace face, org.bukkit.inventory.ItemStack holding, java.util.Vector clickedLoc) {
state.setType(holding.getType());
state.setData(holding.getData());
} |
public java.lang.String getFilePath() {
return getFilePath();
} | public java.lang.String getFilePath() {
return filePath;
} |
private android.view.View bindUI(android.view.View root) {
listView = ((android.widget.ListView) (root.findViewById(R.id.PXForm_linearPanel)));
setToolbarNavigationOnClickListener(mainActivityHomeButton);
setToolbarNavigationDisplayHomeAsUpEnabled();
return root;
} | private android.view.View bindUI(android.view.View root) {
listView = ((android.widget.ListView) (root.findViewById(R.id.PXForm_linearPanel)));
return root;
} |
public void onDestroyView() {
if ((mBound) == true)
getActivity().unbindService(mConnection);
super.onDestroyView();
} | public void onDestroyView() {
if (mBound)
getActivity().unbindService(mConnection);
super.onDestroyView();
} |
public void onActivityPaused(android.app.Activity activity) {
android.util.Log.i("BACKGROUND", "pause");
++(pause);
} | public void onActivityPaused(android.app.Activity activity) {
++(pause);
} |
public void googleLoginClick(android.view.View view) {
new com.github.randoapp.service.GoogleAuthService(this).process();
} | public void googleLoginClick(android.view.View view) {
} |
public void onNext(rx.Notification<T> t) {
if (t.isOnError())
child.onError(t.getThrowable());
else {
isLocked.set(false);
filteredTerminals.onNext(t);
}
} | public void onNext(rx.Notification<T> t) {
isLocked.set(false);
filteredTerminals.onNext(t);
} |
public T get(long selector) {
int index = ((int) (selector % (elementIndex.length)));
return elements.get(index);
} | public T get(long selector) {
int index = ((int) (selector % (elementIndex.length)));
index = elementIndex[index];
return elements.get(index);
} |
public com.etiennelawlor.loop.network.models.Video getItem(int position) {
try {
return mVideos.get(position);
} catch (java.lang.IndexOutOfBoundsException e) {
timber.log.Timber.e(e, "index is %d, and size is %d", position, getItemCount());
return null;
}
} | public com.etiennelawlor.loop.network.models.Video getItem(int position) {
return mVideos.get(position);
} |
protected void setStatusBarTint(int primaryDarkColor) {
com.readystatesoftware.systembartint.SystemBarTintManager tintManager = new com.readystatesoftware.systembartint.SystemBarTintManager(this);
tintManager.setStatusBarTintEnabled(true);
tintManager.setStatusBarTintColor(primaryDarkColor);
} | protected void setStatusBarTint(int primaryDarkColor) {
com.readystatesoftware.systembartint.SystemBarTintManager tintManager = new com.readystatesoftware.systembartint.SystemBarTintManager(this);
tintManager.setStatusBarTintEnabled(true);
} |
public void doAction(int speedOfTravel, java.lang.String timeOfDeath) {
int searchRadius = cit260.murderInTheCity.control.CaseControl.calculateSearchRadius(speedOfTravel, timeOfDeath);
java.lang.System.out.println(searchRadius);
} | public void doAction(int speedOfTravel, java.lang.String timeOfDeath) {
java.lang.String searchRadius = cit260.murderInTheCity.control.CaseControl.calculateSearchRadius(speedOfTravel, timeOfDeath);
java.lang.System.out.println(searchRadius);
} |
public double getConfidenceScore() {
return this.steinerNodes.getConfidence().getConfidenceValue();
} | public double getConfidenceScore() {
return (this.steinerNodes.getConfidence()) == null ? 0.0 : this.steinerNodes.getConfidence().getConfidenceValue();
} |
public void setStatus(int status) {
if (status == (uk.ac.aber.cs221.group15.task.Task.ABANDONED)) {
throw new java.lang.IllegalArgumentException("Not allowed to set status as ABANDONED!");
}
this.status.set(status);
} | public void setStatus(int status) {
this.status.set(status);
} |
protected void setUp() throws java.lang.Exception {
super.setUp();
mMainActivity = getActivity();
} | protected void setUp() throws java.lang.Exception {
mMainActivity = getActivity();
super.setUp();
} |
public void tesEndPositionDods() {
java.util.regex.Pattern pattern = java.util.regex.Pattern.compile("\\.");
java.lang.String str = "this is a pen...";
cc.redpen.util.EndOfSentenceDetector detector = new cc.redpen.util.EndOfSentenceDetector(pattern);
org.junit.Assert.assertEquals(15, detector.getSentenc... | public void tesEndPositionDods() {
java.util.regex.Pattern pattern = java.util.regex.Pattern.compile("\\.");
java.lang.String str = "this is a pen...";
cc.redpen.util.EndOfSentenceDetector detector = new cc.redpen.util.EndOfSentenceDetector(pattern);
org.junit.Assert.assertEquals(15, detector.getSentenc... |
public void getNextChar() {
try {
prevChar = currChar;
currChar = charStream.currentChar();
} catch (LexicalAnalyzer.LexicalError ex) {
ex.printStackTrace(java.lang.System.out);
}
} | public void getNextChar() {
try {
prevChar = currChar;
currChar = charStream.currentChar();
} catch (LexicalAnalyzer.LexicalError ex) {
java.lang.System.err.println(ex);
java.lang.System.exit(1);
}
} |
public void onPause() {
android.util.Log.d(org.openhab.habdroid.ui.OpenHABMainActivity.TAG, "onPause()");
super.onPause();
org.openhab.habdroid.ui.OpenHABMainActivity.mAsyncHttpClient.cancelAllRequests(true);
} | public void onPause() {
android.util.Log.d(org.openhab.habdroid.ui.OpenHABMainActivity.TAG, "onPause()");
super.onPause();
} |
private char read() throws java.io.IOException {
final char c = peek();
at = +1;
return c;
} | private char read() throws java.io.IOException {
final char c = peek();
at += 1;
return c;
} |
private boolean addNodeToEmptyList(java.lang.Object o) {
week3.linkedList.MyLinkedList.Node newNode = new week3.linkedList.MyLinkedList.Node(o);
if (isEmpty()) {
head = tail = newNode;
return true;
}else
return false;
} | private boolean addNodeToEmptyList(java.lang.Object o) {
if (isEmpty()) {
week3.linkedList.MyLinkedList.Node newNode = new week3.linkedList.MyLinkedList.Node(o);
head = tail = newNode;
(size)++;
return true;
}else
return false;
} |
public void end() {
setX(document.getCurrentLine().getLenght());
} | public void end() {
setX(getCurrentLine().getLenght());
} |
public void ChoosePicture(com.myflightbook.android.ActMFBForm.GallerySource gs) {
android.content.Intent i = new android.content.Intent(android.content.Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
i.setType("image/* video/*");
startActivityForResult(i, com.myflightbook... | public void ChoosePicture() {
android.content.Intent i = new android.content.Intent(android.content.Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
i.setType("image/* video/*");
startActivityForResult(i, com.myflightbook.android.ActMFBForm.SELECT_IMAGE_ACTIVITY_REQUEST_CO... |
public void afterLast() {
this.index = this.rows.size();
} | public void afterLast() {
if ((this.rows.size()) > 0) {
this.index = this.rows.size();
}
} |
protected void onFileClick() {
getItems(restClient.getItemsFromFile());
} | protected void onFileClick() {
getItems(restClient.getItemsFromFile(), true);
} |
public void draw() {
for (com.flatworks.games.flatcraft.gui.Gui guiItem : this.guiItems) {
guiItem.draw();
}
} | public void draw() {
super.draw();
for (com.flatworks.games.flatcraft.gui.Gui guiItem : this.guiItems) {
guiItem.draw();
}
} |
protected synchronized void buildGoogleApiClient() {
mGoogleApiClient = new com.google.android.gms.common.api.GoogleApiClient.Builder(this.getActivity()).addConnectionCallbacks(this).addOnConnectionFailedListener(this).addApi(LocationServices.API).build();
} | protected synchronized void buildGoogleApiClient() {
if ((mGoogleApiClient) == null) {
mGoogleApiClient = new com.google.android.gms.common.api.GoogleApiClient.Builder(this.getActivity()).addConnectionCallbacks(this).addOnConnectionFailedListener(this).addApi(LocationServices.API).build();
}
} |
protected void onDestroy() {
super.onDestroy();
mPhotoTargetFolder = null;
mSelectPhotoList.clear();
java.lang.System.gc();
} | protected void onDestroy() {
super.onDestroy();
mPhotoTargetFolder = null;
if ((mSelectPhotoList) != null) {
mSelectPhotoList.clear();
}
java.lang.System.gc();
} |
public java.util.Set<java.lang.String> getBusinessId(java.lang.String category); | public java.util.Set<java.lang.String> getBusinessId(java.lang.String state, java.lang.String category); |
public void mismatch() {
java.lang.System.out.println("SomeDemo");
org.mockito.BDDMockito.given(mock.simpleMethod(2)).willReturn("");
mock.simpleMethod(3);
} | public void mismatch() {
org.mockito.BDDMockito.given(mock.simpleMethod(2)).willReturn("");
mock.simpleMethod(3);
} |
public com.jantuomi.tunkki.core.parser.datatype.Datatype evaluate(java.util.List<com.jantuomi.tunkki.core.parser.datatype.Datatype> params) throws com.jantuomi.tunkki.exception.types.TunkkiError {
com.jantuomi.tunkki.core.parser.datatype.Datatype param = params.get(0);
com.jantuomi.tunkki.utils.IO.getInstance()... | public com.jantuomi.tunkki.core.parser.datatype.Datatype evaluate(java.util.List<com.jantuomi.tunkki.core.parser.datatype.Datatype> params) throws com.jantuomi.tunkki.exception.types.TunkkiError {
com.jantuomi.tunkki.core.parser.datatype.Datatype param = params.get(0);
java.lang.System.out.println(param.toStrin... |
public java.lang.String saveNewRateFile() {
markCustomerRateFile();
rateFileService.createRateFile(rateFile);
messageUtil.addMessage("message.ratefile.created.title", "message.ratefile.created.detail", rateFile.getName());
return "views/rate/admin/manageRates.xhtml";
} | public java.lang.String saveNewRateFile() {
rateFileService.createRateFile(rateFile);
messageUtil.addMessage("message.ratefile.created.title", "message.ratefile.created.detail", rateFile.getName());
return "views/rate/admin/manageRates.xhtml";
} |
public void join(ViewProxy proxy, java.lang.String session) throws java.io.IOException {
java.lang.System.out.println((("Writting J and the " + session) + " <Byte> <UTF>"));
out.writeByte('J');
out.writeUTF(session);
} | public void join(ViewProxy proxy, java.lang.String session) throws java.io.IOException {
out.writeByte('J');
out.writeUTF(session);
} |
public boolean hasPlayer(java.lang.String user) {
return (users.contains(user.toLowerCase())) || (user.equalsIgnoreCase(leader));
} | public boolean hasPlayer(java.lang.String user) {
if ((users) == null)
return false;
return (users.contains(user.toLowerCase())) || (user.equalsIgnoreCase(leader));
} |
public int getEdgeNumbers() {
return (edgeNumbers) == (gr.getEdgeCount()) ? edgeNumbers : -1;
} | public int getEdgeNumbers() {
return edgeNumbers;
} |
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
if ((mInsetBackground) != null) {
mInsetBackground.setCallback(null);
}
} | public void onDetachedFromWindow() {
super.onDetachedFromWindow();
if ((mInsetBackground) != null) {
mInsetBackground.setCallback(null);
}
} |
public void testtoDot() {
org.thegalactic.lattice.Concept c = new org.thegalactic.lattice.Concept(true, true);
} | public void testtoDot() {
} |
public com.danimahardhika.cafebar.CafeBar.Builder neutralTypeface(java.lang.String fontName) {
mNeutralTypeface = com.danimahardhika.cafebar.CafeBarUtil.getTypeface(mContext, fontName);
return this;
} | public com.danimahardhika.cafebar.CafeBar.Builder neutralTypeface(java.lang.String fontName) {
return neutralTypeface(com.danimahardhika.cafebar.CafeBarUtil.getTypeface(mContext, fontName));
} |
public void toggleMenuState() {
if (isRunning) {
java.lang.System.out.println("test");
draw();
menuPanel.setVisible(true);
menuPanel.requestFocus();
menuPanel.repaint();
}
} | public void toggleMenuState() {
if (isRunning) {
draw();
menuPanel.setVisible(true);
menuPanel.requestFocus();
menuPanel.repaint();
}
} |
private static native void _Priv_ReadJPEGString_C(long image, long string, int stringLength); | private static void _Priv_ReadJPEGString_C(long image, long string, int stringLength) {
} |
@org.springframework.data.jpa.repository.Query(value = "select lostItem from LostItem lostItem")
java.util.List<cn.gaoyuexiang.LostAndFound.item.model.entity.LostItem> findAll(org.springframework.data.domain.Sort sort, org.springframework.data.domain.Pageable pageable); | @org.springframework.data.jpa.repository.Query(value = "select lostItem from LostItem lostItem")
java.util.List<cn.gaoyuexiang.LostAndFound.item.model.entity.LostItem> findAll(org.springframework.data.domain.Pageable pageable); |
public void instantDisconnect(java.lang.String message) {
disconnect(message);
privateDisconnect();
} | public void instantDisconnect(java.lang.String message) {
disconnect(message);
privateDisconnect(true);
} |
public boolean sendDatagrams(java.nio.ByteBuffer[] bytesList) {
try {
channel.write(bytesList);
} catch (java.io.IOException e) {
return false;
}
return true;
} | public boolean sendDatagrams(java.nio.ByteBuffer[] bytesList) {
try {
for (java.nio.ByteBuffer buffer : bytesList) {
channel.write(buffer);
}
} catch (java.io.IOException e) {
return false;
}
return true;
} |
public void registerSchemas(org.apache.drill.exec.store.SchemaConfig schemaConfig, org.apache.calcite.schema.SchemaPlus parent) throws java.io.IOException {
org.apache.drill.exec.store.openTSDB.schema.OpenTSDBSchemaFactory.OpenTSDBTables schema = new org.apache.drill.exec.store.openTSDB.schema.OpenTSDBSchemaFactory... | public void registerSchemas(org.apache.drill.exec.store.SchemaConfig schemaConfig, org.apache.calcite.schema.SchemaPlus parent) throws java.io.IOException {
org.apache.drill.exec.store.openTSDB.schema.OpenTSDBSchemaFactory.OpenTSDBTables schema = new org.apache.drill.exec.store.openTSDB.schema.OpenTSDBSchemaFactory... |
public java.lang.CharSequence getPageTitle(int position) {
java.lang.String[] mTitles = new java.lang.String[]{ getString(R.string.task) , getString(R.string.project) , getString(R.string.note) };
return mTitles[position];
} | public java.lang.CharSequence getPageTitle(int position) {
java.lang.String[] mTitles = new java.lang.String[]{ getString(R.string.task) , getString(R.string.project) };
return mTitles[position];
} |
public synchronized void appendLog(java.lang.String log) {
if ((txtLog.getLineCount()) > 300) {
txtLog.getText().substring(1000);
}
txtLog.append(log);
java.lang.System.out.print(log);
} | public synchronized void appendLog(java.lang.String log) {
txtLog.append(log);
java.lang.System.out.print(log);
} |
public void executeCommand() {
VASL.build.module.OBA.Module mod = oba.getModuleAt(index);
oldState = mod.getState();
mod.setState(newState);
} | public void executeCommand() {
final VASL.build.module.OBA.Module mod = oba.getModuleAt(index);
oldState = mod.getState();
mod.setState(newState);
} |
public static void addScore(int i) {
com.titanicrun.game.TitanicClass.gpgs.submitScore(i);
} | public static void addScore(int i) {
if ((com.titanicrun.game.TitanicClass.gpgs) != null) {
com.titanicrun.game.TitanicClass.gpgs.submitScore(i);
}
} |
public void onDestroy() {
unregisterReceiver(mServiceReceiver);
if ((mAudioPlayer) != null) {
mAudioPlayer.release();
mAudioPlayer = null;
}
super.onDestroy();
} | public void onDestroy() {
if ((mAudioPlayer) != null) {
mAudioPlayer.release();
mAudioPlayer = null;
}
unregisterReceiver(mServiceReceiver);
super.onDestroy();
} |
public boolean hasPoint(int index) {
return ((!(this.points.isEmpty())) && (index >= 0)) && (index < ((this.points.size()) - 1));
} | public boolean hasPoint(int index) {
return ((!(this.points.isEmpty())) && (index >= 0)) && (index < (this.points.size()));
} |
public void interact(int interactionType, actors.Status status) {
if (interactionType != (gameobjects.Interactive.INTERACTION_PICKUP)) {
return ;
}
status.getInventory().addItem(this);
onGround = false;
} | public void interact(int interactionType, actors.Status status) {
if (interactionType != (gameobjects.Interactive.INTERACTION_PICKUP)) {
return ;
}
if (!(onGround)) {
return ;
}
status.getInventory().addItem(this);
onGround = false;
} |
public java.util.List<? extends java.lang.Object> execute(org.flowable.engine.impl.interceptor.CommandContext commandContext) {
org.flowable.engine.impl.EventSubscriptionQueryImpl query = new org.flowable.engine.impl.EventSubscriptionQueryImpl(commandContext);
return commandContext.getEventSubscriptionEntityMan... | public java.util.List<? extends java.lang.Object> execute(org.flowable.engine.impl.interceptor.CommandContext commandContext) {
org.flowable.engine.impl.EventSubscriptionQueryImpl query = new org.flowable.engine.impl.EventSubscriptionQueryImpl(commandContext);
return commandContext.getEventSubscriptionEntityMan... |
public void voidItem(java.lang.String i, double p) {
price = 0;
price -= p;
item = i;
if (i != null) {
(edu.cis232.SemesterProject.POS.itemNumber)--;
}
edu.cis232.SemesterProject.POS.allItems.remove(i);
} | public void voidItem(java.lang.String i, double p) {
price = 0;
price -= p;
item = i;
edu.cis232.SemesterProject.POS.allItems.remove(i);
} |
public void run() {
popWindow.setAnimationStyle(android.R.style.Animation);
popWindow.dismiss();
} | public void run() {
popWindow.setAnimationStyle(android.R.style.Animation);
popWindow.update();
} |
public void onLongPress(android.view.MotionEvent e) {
java.lang.CharSequence word = bookView.getWordAt(e.getX(), e.getY());
selectedWord = word;
openContextMenu(bookView);
} | public void onLongPress(android.view.MotionEvent e) {
java.lang.CharSequence word = bookView.getWordAt(e.getX(), e.getY());
if (word != null) {
selectedWord = word;
openContextMenu(bookView);
}
} |
public void msgReciveManufacturer(de.dmarcini.submatix.android4.full.comm.BtServiceMessage msg) {
if (de.dmarcini.submatix.android4.full.ApplicationDEBUG.DEBUG) {
android.util.Log.d(de.dmarcini.submatix.android4.full.gui.MainActivity.TAG, (("SPX Manufacturer <" + ((java.lang.String) (msg.getContainer()))) +... | public void msgReciveManufacturer(de.dmarcini.submatix.android4.full.comm.BtServiceMessage msg) {
if (de.dmarcini.submatix.android4.full.ApplicationDEBUG.DEBUG) {
android.util.Log.d(de.dmarcini.submatix.android4.full.gui.MainActivity.TAG, (("SPX Manufacturer <" + (msg.getContainer())) + "> recived. Ignore."... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.