buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public jtelecom.grid.ListHolder getUsers(@jtelecom.controller.csr.ModelAttribute
jtelecom.grid.GridRequestDto request) {
java.lang.String sort = request.getSort();
int start = request.getStartBorder();
int length = request.getLength();
java.lang.String search = request.getSearch();
java.util.List<jt... | public jtelecom.grid.ListHolder getUsers(@jtelecom.controller.csr.ModelAttribute
jtelecom.grid.GridRequestDto request) {
java.lang.System.out.println(request.toString());
java.lang.String sort = request.getSort();
int start = request.getStartBorder();
int length = request.getLength();
java.lang.Stri... |
public com.louie.authcode.file.model.AuthcodeFile peekFile() {
com.louie.authcode.file.model.AuthcodeFile file = new com.louie.authcode.file.model.AuthcodeFile();
java.io.File[] files = new java.io.File(((com.louie.authcode.engine.config.EngineParameters.PROJECT_ROOT) + "/waitTraining")).listFiles();
file.s... | public com.louie.authcode.file.model.AuthcodeFile peekFile() {
com.louie.authcode.file.model.AuthcodeFile file = new com.louie.authcode.file.model.AuthcodeFile();
java.io.File[] files = new java.io.File(((com.louie.authcode.engine.config.EngineParameters.PROJECT_ROOT) + "/waitTraining")).listFiles();
if ((f... |
private boolean validateInvoiceNumber(org.kuali.ole.pojo.OleInvoiceRecord oleInvoiceRecord, org.kuali.ole.Exchange exchange, java.lang.Integer recordIndex) {
java.lang.String invoiceNumber = oleInvoiceRecord.getInvoiceNumber();
if ((org.apache.commons.lang3.StringUtils.isBlank(invoiceNumber)) && (org.apache.com... | private boolean validateInvoiceNumber(org.kuali.ole.pojo.OleInvoiceRecord oleInvoiceRecord, org.kuali.ole.Exchange exchange, java.lang.Integer recordIndex) {
java.lang.String invoiceNumber = oleInvoiceRecord.getInvoiceNumber();
if ((org.apache.commons.lang3.StringUtils.isBlank(invoiceNumber)) || (!(org.apache.c... |
public boolean equals(java.lang.Object o) {
if ((this) == o)
return true;
if ((o == null) || ((getClass()) != (o.getClass())))
return false;
io.leao.codecolors.plugin.res.Resource resource = ((io.leao.codecolors.plugin.res.Resource) (o));
if ((mName) != null ? !(mName.equals(re... | public boolean equals(java.lang.Object o) {
if ((this) == o)
return true;
if ((o == null) || ((getClass()) != (o.getClass())))
return false;
io.leao.codecolors.plugin.res.Resource resource = ((io.leao.codecolors.plugin.res.Resource) (o));
if (!(mName.equals(resource.mName)))
... |
public boolean isSubscriptionUpdateSupported() {
if (isSubsUpdateSupported)
return true;
try {
int response = billingService.isBillingSupported(Constants.GOOGLE_API_SUBSCRIPTION_CHANGE_VERSION, contextPackageName, Constants.PRODUCT_TYPE_SUBSCRIPTION);
isSubsUpdateSupported = respons... | public boolean isSubscriptionUpdateSupported() {
if (isSubsUpdateSupported)
return true;
try {
int response = billingService.isBillingSupported(Constants.GOOGLE_API_SUBSCRIPTION_CHANGE_VERSION, contextPackageName, Constants.PRODUCT_TYPE_SUBSCRIPTION);
isSubsUpdateSupported = respons... |
private void onRemoveItemsClicked(java.util.Set<com.sawyer.advadapters.app.data.MovieItem> items) {
if ((items.size()) == 1) {
getListAdapter().remove(items.iterator().next());
}else {
getListAdapter().removeAll(items);
}
} | private void onRemoveItemsClicked(java.util.List<com.sawyer.advadapters.app.data.MovieItem> items) {
if ((items.size()) == 1) {
getListAdapter().remove(items.iterator().next());
}else {
getListAdapter().removeAll(items);
}
} |
public void testMaxiSavingsAccountRateOne() {
com.abc.Bank bank = new com.abc.Bank();
com.abc.Account checkingAccount = new com.abc.Account(Account.MAXI_SAVINGS);
bank.addCustomer(bill.openAccount(checkingAccount));
checkingAccount.deposit(1000.0);
org.junit.Assert.assertEquals(20, bank.totalInteres... | public void testMaxiSavingsAccountRateOne() {
com.abc.Account checkingAccount = new com.abc.Account(Account.MAXI_SAVINGS);
bank.addCustomer(bill.openAccount(checkingAccount));
checkingAccount.deposit(1000.0);
org.junit.Assert.assertEquals(20, bank.totalInterestPaid(), com.abc.BankTest.DOUBLE_DELTA);
} |
private void collectNestedConstraintVariables(net.ssehub.easy.varModel.cst.ConstraintSyntaxTree cst, net.ssehub.easy.varModel.model.ContainableModelElement element) {
if (null != cst) {
net.ssehub.easy.varModel.model.filter.DeclrationInConstraintFinder finder = new net.ssehub.easy.varModel.model.filter.Decl... | private void collectNestedConstraintVariables(net.ssehub.easy.varModel.cst.ConstraintSyntaxTree cst, net.ssehub.easy.varModel.model.ContainableModelElement element) {
if (null != cst) {
net.ssehub.easy.varModel.model.filter.DeclrationInConstraintFinder finder = new net.ssehub.easy.varModel.model.filter.Decl... |
public static java.lang.String addComma(java.lang.Object value) {
if (value == null)
return com.hangum.tadpole.commons.libs.core.define.PublicTadpoleDefine.DEFINE_NULL_VALUE;
try {
java.text.NumberFormat nf = java.text.NumberFormat.getNumberInstance();
return nf.format(java.lang.Dou... | private static java.lang.String addComma(java.lang.Object value) {
if (value == null)
return com.hangum.tadpole.commons.libs.core.define.PublicTadpoleDefine.DEFINE_NULL_VALUE;
try {
java.text.NumberFormat nf = java.text.NumberFormat.getNumberInstance();
return nf.format(java.lang.Do... |
public void notifyObservers(org.openflexo.fge.notifications.FGENotification notification) {
if ((!(notification instanceof org.openflexo.fge.notifications.NodeDeleted)) && (isDeleted())) {
org.openflexo.fge.impl.DrawingTreeNodeImpl.logger.warning("notifyObservers() called by a deleted DrawingTreeNode");
... | public void notifyObservers(org.openflexo.fge.notifications.FGENotification notification) {
if ((!(notification instanceof org.openflexo.fge.notifications.NodeDeleted)) && (isDeleted())) {
org.openflexo.fge.impl.DrawingTreeNodeImpl.logger.warning("notifyObservers() called by a deleted DrawingTreeNode");
... |
public static void main(java.lang.String[] args) {
java.util.concurrent.ExecutorService executor = java.util.concurrent.Executors.newCachedThreadPool();
com.cooksys.assessment.ClientManager clientManager = new com.cooksys.assessment.ClientManager();
com.cooksys.assessment.server.Server server = new com.cook... | public static void main(java.lang.String[] args) {
java.util.concurrent.ExecutorService executor = java.util.concurrent.Executors.newCachedThreadPool();
com.cooksys.assessment.server.Server server = new com.cooksys.assessment.server.Server(8080, executor);
java.util.concurrent.Future<?> done = executor.subm... |
protected java.lang.String joinAliasValue(java.lang.String alias, java.lang.String field) {
alias = ((jpaProvider.getCollectionValueFunction()) != null) ? (((jpaProvider.getCollectionValueFunction()) + "(") + alias) + ")" : alias;
if (field == null) {
return alias;
}
return (alias + ".") + field... | protected java.lang.String joinAliasValue(java.lang.String alias, java.lang.String field) {
if (((jpaProvider.getCollectionValueFunction()) != null) && (field == null)) {
alias = (((jpaProvider.getCollectionValueFunction()) + "(") + alias) + ")";
}
if (field == null) {
return alias;
}
... |
public int[] getPlayersTurns() {
int[] playersTurns = new int[players.length];
for (int playerNum = 0; playerNum < (players.length); playerNum++) {
playersTurns[playerNum] = getPlayerForBoard(players[playerNum].getFigure().toString());
}
return playersTurns;
} | private int[] getPlayersTurns() {
int[] playersTurns = new int[players.length];
for (int playerNum = 0; playerNum < (players.length); playerNum++) {
playersTurns[playerNum] = getPlayerForBoard(players[playerNum].getFigure().toString());
}
return playersTurns;
} |
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View v, int position, long id) {
android.widget.Toast.makeText(this, ("" + position), Toast.LENGTH_SHORT).show();
android.content.Intent intent = new android.content.Intent(this, karan.com.popularmovies1.MovieDetails.class);
android.... | public void onItemClick(android.widget.AdapterView<?> parent, android.view.View v, int position, long id) {
android.content.Intent intent = new android.content.Intent(this, karan.com.popularmovies1.MovieDetails.class);
android.os.Bundle mBundle = new android.os.Bundle();
mBundle.putParcelable(PARCEL_KEY, mo... |
public void sync(java.lang.String uid, java.lang.String token, final com.strongloop.android.loopback.callbacks.VoidCallback callback) {
com.google.common.collect.ImmutableMap params = com.google.common.collect.ImmutableMap.of("user_id", uid, "user_token", token);
invokeStaticMethod("sync", params, new com.stron... | public void sync(java.lang.String token, java.lang.String uid, final com.strongloop.android.loopback.callbacks.VoidCallback callback) {
com.google.common.collect.ImmutableMap params = com.google.common.collect.ImmutableMap.of("user_token", token, "user_id", uid);
invokeStaticMethod("sync", params, new com.stron... |
private static java.lang.String getTaskListString(java.util.List<java.lang.String> taskList) {
if ((taskList != null) & (!(taskList.isEmpty()))) {
java.lang.String list = "";
for (java.lang.String id : taskList) {
list = (list + id) + (org.wso2.carbon.bpmn.extensions.substitution.UserSub... | private static java.lang.String getTaskListString(java.util.List<java.lang.String> taskList) {
if ((taskList != null) && (!(taskList.isEmpty()))) {
java.lang.String list = "";
for (java.lang.String id : taskList) {
list = (list + id) + (org.wso2.carbon.bpmn.extensions.substitution.UserSu... |
private void showLeaderBoard() {
contentPane.remove(0);
contentPane.remove(0);
javax.swing.JPanel leaderBoardPanel = new javax.swing.JPanel();
javax.swing.JButton reset_leader = new javax.swing.JButton("Reset Board");
javax.swing.JButton quit_leader = new javax.swing.JButton("Exit");
quit_leader... | private void showLeaderBoard() {
contentPane.remove(0);
contentPane.remove(0);
javax.swing.JPanel leaderBoardPanel = new javax.swing.JPanel();
javax.swing.JButton reset_leader = new javax.swing.JButton("Reset Board");
javax.swing.JButton quit_leader = new javax.swing.JButton("Exit");
quit_leader... |
public void onItemRangeInserted(int positionStart, int itemCount) {
super.onItemRangeInserted(positionStart, itemCount);
int messageCount = mFirebaseAdapter.getItemCount();
int lastVisiblePosition = mLinearLayoutManager.findLastCompletelyVisibleItemPosition();
if ((lastVisiblePosition == (-1)) || ((posi... | public void onItemRangeInserted(int positionStart, int itemCount) {
super.onItemRangeInserted(positionStart, itemCount);
int messageCount = mFirebaseAdapter.getItemCount();
int lastVisiblePosition = mLinearLayoutManager.findLastCompletelyVisibleItemPosition();
if ((lastVisiblePosition == (-1)) || ((posi... |
protected void replace(org.observe.util.tree.RedBlackNode node) {
if (node != (theLeft))
node.setChild(theLeft, true);
if (node != (theRight))
node.setChild(theRight, false);
setChild(null, true);
setChild(null, false);
setRed(isRed);
if ((theParent) != null) {
... | protected void replace(org.observe.util.tree.RedBlackNode node) {
if (node != (theLeft))
node.setChild(theLeft, true);
if (node != (theRight))
node.setChild(theRight, false);
setChild(null, true);
setChild(null, false);
node.setRed(isRed);
if ((theParent) != null) {
... |
public void addTextToPage(int pageNumber, java.lang.String textToAdd) {
if (this.verifyPassword()) {
if ((pageNumber < 0) || (pageNumber >= (this.pages.length))) {
java.lang.System.out.println("Invalid page number.");
return ;
}
if ((textToAdd == null) || (textToAdd.e... | public void addTextToPage(int pageNumber, java.lang.String textToAdd) {
if (this.verifyPassword()) {
if ((pageNumber <= 0) || (pageNumber > (this.pages.length))) {
java.lang.System.out.println("Invalid page number.");
return ;
}
if ((textToAdd == null) || (textToAdd.e... |
public void mousePressed(java.awt.event.MouseEvent e) {
java.lang.System.out.println("click MOUSE");
mouseX = e.getX();
mouseY = e.getY();
java.lang.System.out.println(((("mouse position" + (mouseX)) + ",") + (mouseY)));
hidePlaceholders();
fr.lri.swingstates.canvas.Canvas canvas = experiment.ge... | public void mousePressed(java.awt.event.MouseEvent e) {
java.lang.System.out.println("click MOUSE");
mouseX = e.getX();
mouseY = e.getY();
hidePlaceholders();
fr.lri.swingstates.canvas.Canvas canvas = experiment.getCanvas();
canvas.removeMouseListener(clickListener);
experiment.nextTrial();
... |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
switch (item.getItemId()) {
case R.id.action_save :
saveProduct();
finish();
return true;
case R.id.action_delete :
return true;
case android.R.id.home :
if (!(mProd... | public void onBackPressed() {
if (!(mProductHasChanged)) {
super.onBackPressed();
return ;
}
android.content.DialogInterface.OnClickListener discardButtonClickListener = new android.content.DialogInterface.OnClickListener() {
@java.lang.Override
public void onClick(android.co... |
public void addWorkdays(java.lang.String bId, java.lang.String empId, java.lang.String day, java.lang.String startTime, java.lang.String endTime) {
java.lang.String combinedData = (((((((bId + " ") + empId) + " ") + day) + " ") + startTime) + " ") + endTime;
java.io.File file = new java.io.File("workdaysList.tx... | public void addWorkdays(java.lang.String bId, java.lang.String empId, java.lang.String day, java.lang.String startTime, java.lang.String endTime) {
java.lang.String combinedData = (((((((bId + " ") + empId) + " ") + day) + " ") + startTime) + " ") + endTime;
java.io.File file = new java.io.File("workdaysList.tx... |
private void createOrUpdateFile(pl.psnc.dl.wf4ever.dlibra.FlowTests.FileRecord file) throws java.io.IOException, pl.psnc.dl.wf4ever.dlibra.DigitalLibraryException, pl.psnc.dlibra.service.IdNotFoundException {
java.io.InputStream f = pl.psnc.dl.wf4ever.dlibra.FlowTests.files[0].open();
pl.psnc.dl.wf4ever.dlibra.... | private void createOrUpdateFile(pl.psnc.dl.wf4ever.dlibra.FlowTests.FileRecord file) throws java.io.IOException, pl.psnc.dl.wf4ever.dlibra.DigitalLibraryException, pl.psnc.dlibra.service.IdNotFoundException {
java.io.InputStream f = file.open();
pl.psnc.dl.wf4ever.dlibra.ResourceInfo r1 = dl.createOrUpdateFile(... |
public java.lang.String execute() {
Command.DELETE_TYPE type = parser.getDeleteType();
java.util.ArrayList<java.lang.Integer> indexes = parser.getTaskToDelete();
switch (type) {
case ALL :
return deleteAll();
case MULTIPLE :
case RANGE :
case SINGLE :
... | public java.lang.String execute() {
Command.DELETE_TYPE type = parser.getDeleteType();
java.util.ArrayList<java.lang.Integer> indexes = null;
switch (type) {
case ALL :
return deleteAll();
case MULTIPLE :
case RANGE :
case SINGLE :
return delete(indexe... |
public void run() {
try {
if (imageViewReused(photoToLoad))
return ;
android.graphics.Bitmap bmp = getBitmapFromFile(photoToLoad.file);
if (imageViewReused(photoToLoad)) {
return ;
}
com.example.futin.importimages.RestService.loaders.FileLoade... | public void run() {
try {
if (imageViewReused(photoToLoad))
return ;
android.graphics.Bitmap bmp = getBitmapFromFile(photoToLoad.url);
if (imageViewReused(photoToLoad)) {
return ;
}
com.example.futin.importimages.RestService.loaders.FileLoader... |
public void requestRide(android.view.View view) {
if (!(requestActive)) {
requestStatusView.setVisibility(View.VISIBLE);
downloadTaskType = "request";
android.util.Log.i("Rider Map", "Ride Requested");
com.akashbhave.locomoto.YourLocation.DownloadTask requestRideTask = new com.akashb... | public void requestRide(android.view.View view) {
if (requestActive) {
requestActive = false;
downloadTaskType = "cancelRequest";
android.util.Log.i("Rider Map", "Ride Cancelled");
com.akashbhave.locomoto.YourLocation.DownloadTask cancelRequestTask = new com.akashbhave.locomoto.YourL... |
private static void addToHistory(final org.quantumbadger.redreader.account.RedditAccount account, final java.util.HashSet<java.lang.String> newSubscriptions) {
for (final java.lang.String sub : newSubscriptions) {
try {
org.quantumbadger.redreader.reddit.RedditSubredditHistory.addSubreddit(accou... | private static void addToHistory(final org.quantumbadger.redreader.account.RedditAccount account, final java.util.HashSet<java.lang.String> newSubscriptions) {
for (final java.lang.String sub : newSubscriptions) {
try {
org.quantumbadger.redreader.reddit.RedditSubredditHistory.addSubreddit(accou... |
public org.springframework.beans.factory.FactoryBean<java.util.Properties> dynamicProperties() {
final java.lang.String defLang = java.util.Locale.getDefault().getLanguage();
org.springframework.beans.factory.config.PropertiesFactoryBean factoryBean = new org.springframework.beans.factory.config.PropertiesFacto... | public org.springframework.beans.factory.FactoryBean<java.util.Properties> dynamicProperties() {
final java.lang.String defLang = java.util.Locale.getDefault().getLanguage();
org.springframework.beans.factory.config.PropertiesFactoryBean factoryBean = new org.springframework.beans.factory.config.PropertiesFacto... |
public java.util.Map<java.lang.Integer, edu.rutgers.MOST.data.SBMLReaction> createCompartmentIdReactionMap(edu.rutgers.MOST.data.ReactionFactory f, java.util.Vector<edu.rutgers.MOST.data.SBMLReaction> rxns) {
java.util.Map<java.lang.Integer, edu.rutgers.MOST.data.SBMLReaction> idReactionMap = new java.util.HashMap<... | public java.util.Map<java.lang.Integer, edu.rutgers.MOST.data.SBMLReaction> createCompartmentIdReactionMap(java.util.Vector<edu.rutgers.MOST.data.SBMLReaction> rxns) {
java.util.Map<java.lang.Integer, edu.rutgers.MOST.data.SBMLReaction> idReactionMap = new java.util.HashMap<java.lang.Integer, edu.rutgers.MOST.data.... |
public static boolean fireWebChatEvent(java.lang.String source, java.lang.String name, java.lang.String message) {
boolean noCancel = true;
if ((org.dynmap.DynmapCommonAPIListener.dynmapapi) != null) {
for (org.dynmap.DynmapCommonAPIListener l : org.dynmap.DynmapCommonAPIListener.listeners) {
... | public static boolean fireWebChatEvent(java.lang.String source, java.lang.String name, java.lang.String message) {
boolean noCancel = true;
if ((org.dynmap.DynmapCommonAPIListener.dynmapapi) != null) {
for (org.dynmap.DynmapCommonAPIListener l : org.dynmap.DynmapCommonAPIListener.listeners) {
... |
public void onPostTokenRenewal(org.wso2.carbon.identity.oauth2.dto.OAuth2AccessTokenReqDTO oAuth2AccessTokenReqDTO, org.wso2.carbon.identity.oauth2.dto.OAuth2AccessTokenRespDTO oAuth2AccessTokenRespDTO, org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext oAuthTokenReqMessageContext, java.util.Map<java.lan... | public void onPostTokenRenewal(org.wso2.carbon.identity.oauth2.dto.OAuth2AccessTokenReqDTO oAuth2AccessTokenReqDTO, org.wso2.carbon.identity.oauth2.dto.OAuth2AccessTokenRespDTO oAuth2AccessTokenRespDTO, org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext oAuthTokenReqMessageContext, java.util.Map<java.lan... |
protected void onPostExecute(java.lang.Boolean bResult) {
progressDL.dismiss();
if (!bResult) {
android.widget.Toast.makeText(this, "Slow or unstable internet connection. Please try again.", Toast.LENGTH_LONG).show();
return ;
}
if (hasUpdate) {
General.mainAutoUpdate.StartAutoUp... | protected void onPostExecute(java.lang.Boolean bResult) {
progressDL.dismiss();
if (!bResult) {
android.widget.Toast.makeText(this, "Slow or unstable internet connection. Please try again.", Toast.LENGTH_LONG).show();
return ;
}
if (hasUpdate) {
General.mainAutoUpdate.StartAutoUp... |
public void addAnswer(java.lang.String answer) {
answer = com.lorepo.icf.utils.StringUtils.unescapeXML(answer);
answer = answer.replaceAll(" ", " ");
answers.add((isCaseSensitive ? answer : answer.toLowerCase()));
if (isIgnorePunctuation) {
answer = com.lorepo.icplayer.client.module.text.Ga... | public void addAnswer(java.lang.String answer) {
answer = com.lorepo.icf.utils.StringUtils.unescapeXML(answer);
answer = answer.replaceAll(" ", " ");
answers.add(answer);
if (isIgnorePunctuation) {
answer = com.lorepo.icplayer.client.module.text.GapInfo.removePunctuation(answer);
}
... |
public static boolean isAdmin(com.willshex.blogwt.shared.api.datatype.User user) {
java.util.List<com.willshex.blogwt.shared.api.datatype.Role> roles = ((user.roles) == null) ? com.willshex.blogwt.server.service.role.RoleServiceProvider.provide().getIdRolesBatch(com.willshex.blogwt.server.service.PersistenceService... | public static boolean isAdmin(com.willshex.blogwt.shared.api.datatype.User user) {
java.util.List<com.willshex.blogwt.shared.api.datatype.Role> roles = (((user.roles) == null) && ((user.roleKeys) != null)) ? com.willshex.blogwt.server.service.role.RoleServiceProvider.provide().getIdRolesBatch(com.willshex.blogwt.se... |
public boolean attackEntityAsMob(net.minecraft.entity.Entity entity) {
boolean entityFrom = entity.attackEntityFrom(net.minecraft.util.DamageSource.causeMobDamage(this), ((float) ((int) (getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).getAttributeValue()))));
if (entityFrom) {
this.applyEnchan... | public boolean attackEntityAsMob(net.minecraft.entity.Entity entity) {
boolean entityFrom = entity.attackEntityFrom(net.minecraft.util.DamageSource.causeMobDamage(this), ((float) ((int) (getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).getAttributeValue()))));
if (entityFrom) {
applyEnchantment... |
public void testFlatten() {
int[] flat = blocked1.flatten();
int[] cmp = new int[]{ 100 , 200 , 400 , 500 , 550 , 600 };
org.junit.Assert.assertEquals("Flatten failed: check length", flat.length, cmp.length);
for (int i = 0; i < (flat.length); i++) {
org.junit.Assert.assertEquals("Flatten failed... | public void testFlatten() {
int[] flat = blocked1.flatten();
int[] cmp = new int[]{ 100 , 200 , 400 , 500 , 550 , 600 };
assertEquals("Flatten failed: check length", flat.length, cmp.length);
for (int i = 0; i < (flat.length); i++) {
assertEquals("Flatten failed.", flat[i], cmp[i]);
}
} |
public java.util.function.Supplier<T> supplier() {
return () -> {
if (iterator.hasNext())
return ((T) (iterator.next()));
else
if (cycle) {
this.iterator = iterable.iterator();
return ((T) (iterator.next()));
}else
r... | public java.util.function.Supplier<T> supplier() {
return () -> {
if (iterator.hasNext())
return ((T) (iterator.next()));
else
if (cycle) {
this.iterator = iterable.iterator();
return ((T) (iterator.next()));
}else
r... |
public void commitChangeset(hudson.plugins.scm_sync_configuration.model.ChangeSet changeset) {
try {
return changeset.isEmpty() ? null : (latestCommitFuture = this.business.queueChangeSet(createScmContext(), changeset, getCurrentUser(), hudson.plugins.scm_sync_configuration.ScmSyncConfigurationDataProvider.... | public void commitChangeset(hudson.plugins.scm_sync_configuration.model.ChangeSet changeset) {
if (!(changeset.isEmpty()))
this.business.queueChangeSet(createScmContext(), changeset, getCurrentUser(), hudson.plugins.scm_sync_configuration.ScmSyncConfigurationDataProvider.retrieveComment());
this.se... |
protected void onPostExecute(java.lang.Void aVoid) {
super.onPostExecute(aVoid);
if ((bm) != null) {
alImgThumbs.add(((alImgThumbs.size()) - 2), bm);
alPathItems.add(((alPathItems.size()) - 2), fileSrc);
gvPhotoGallery.setAdapter(gridAdapter);
}else {
showToastMessage(getStri... | protected void onPostExecute(java.lang.Void aVoid) {
super.onPostExecute(aVoid);
if ((bm) != null) {
alImgThumbs.add(bm);
alPathItems.add(fileSrc);
gvPhotoGallery.setAdapter(gridAdapter);
}else {
showToastMessage(getString(R.string.UnableToAddImage));
}
progressLoadin... |
protected int getNumDataLayers() {
int count = 0;
if (!(org.openstreetmap.josm.Main.isDisplayingMapView()))
return 0;
java.util.Collection<org.openstreetmap.josm.gui.layer.Layer> layers = Main.map.mapView.getAllLayers();
for (org.openstreetmap.josm.gui.layer.Layer layer : layers) {
... | protected int getNumDataLayers() {
if (!(org.openstreetmap.josm.Main.isDisplayingMapView()))
return 0;
int count = 0;
java.util.Collection<org.openstreetmap.josm.gui.layer.Layer> layers = Main.map.mapView.getAllLayers();
for (org.openstreetmap.josm.gui.layer.Layer layer : layers) {
... |
public com.cube.storm.LanguageSettings build() {
com.cube.storm.LanguageSettings.instance = construct;
construct.defaultLanguage = construct.getLanguageManager().loadLanguage(context, defaultLanguageUri);
if ((construct.fallbackLanguage) != null) {
construct.fallbackLanguage = construct.getLanguageM... | public com.cube.storm.LanguageSettings build() {
com.cube.storm.LanguageSettings.instance = construct;
construct.defaultLanguage = construct.getLanguageManager().loadLanguage(context, defaultLanguageUri);
if ((fallbackLanguageUri) != null) {
construct.fallbackLanguage = construct.getLanguageManager(... |
protected void handleTar(java.lang.String name, java.io.InputStream in) throws java.lang.Exception {
org.polymap.p4.imports.FileImporter.log.info((" TAR: " + name));
try (org.apache.commons.compress.archivers.tar.TarArchiveInputStream tar = new org.apache.commons.compress.archivers.tar.TarArchiveInputStream(... | protected void handleTar(java.lang.String name, java.io.InputStream in) throws java.lang.Exception {
org.polymap.p4.imports.FileImporter.log.info((" TAR: " + name));
try (org.apache.commons.compress.archivers.tar.TarArchiveInputStream tar = new org.apache.commons.compress.archivers.tar.TarArchiveInputStream(... |
public java.util.Map<java.lang.String, java.lang.Object> propertiesMap(org.harctoolbox.ircore.IrSignal.Pass state, org.harctoolbox.ircore.IrSignal.Pass pass, org.harctoolbox.irp.GeneralSpec generalSpec, org.harctoolbox.irp.NameEngine nameEngine) {
java.util.Map<java.lang.String, java.lang.Object> map = super.proper... | public java.util.Map<java.lang.String, java.lang.Object> propertiesMap(org.harctoolbox.ircore.IrSignal.Pass state, org.harctoolbox.ircore.IrSignal.Pass pass, org.harctoolbox.irp.GeneralSpec generalSpec, org.harctoolbox.irp.NameEngine nameEngine) {
java.util.Map<java.lang.String, java.lang.Object> map = super.proper... |
public static void main(java.lang.String[] args) {
net.posick.concurrency.comcast.ExecutionScheduler scheduler = new net.posick.concurrency.comcast.ExecutionSchedulerImpl();
for (int index = 0; index <= (net.posick.concurrency.comcast.Main.NUMBER_OF_THREADS); index++) {
scheduler.submit(() -> {
... | public static void main(java.lang.String[] args) {
net.posick.concurrency.comcast.ExecutionScheduler scheduler = new net.posick.concurrency.comcast.ExecutionSchedulerImpl();
for (int index = 0; index < (net.posick.concurrency.comcast.Main.NUMBER_OF_THREADS); index++) {
scheduler.submit(() -> {
... |
public static java.util.List<sh.calaba.espressobackend.actions.webview.CalabashChromeClient> findAndPrepareWebViews() {
java.util.List<sh.calaba.espressobackend.actions.webview.CalabashChromeClient> webViews = new java.util.ArrayList<sh.calaba.espressobackend.actions.webview.CalabashChromeClient>();
sh.calaba.e... | public static java.util.List<sh.calaba.espressobackend.actions.webview.CalabashChromeClient> findAndPrepareWebViews() {
java.util.List<sh.calaba.espressobackend.actions.webview.CalabashChromeClient> webViews = new java.util.ArrayList<sh.calaba.espressobackend.actions.webview.CalabashChromeClient>();
sh.calaba.e... |
public void testSetGetAccessibleDescription() {
java.lang.String description = "componentDescription";
context.setAccessibleDescription(description);
assertEquals(javax.accessibility.AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY, propertyChangeListener.lastEvent.getPropertyName());
assertEquals(desc... | public void testSetGetAccessibleDescription() {
java.lang.String description = "componentDescription";
context.setAccessibleDescription(description);
assertEquals(javax.accessibility.AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY, propertyChangeListener.lastEvent.getPropertyName());
assertEquals(desc... |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
int id = item.getItemId();
if (id == (R.id.action_settings)) {
new xyz.farshad.vocab.component.Server.DataTransfer().execute();
android.widget.Toast.makeText(this, "retrieve from server...", Toast.LENGTH_LONG).show();
sho... | public boolean onOptionsItemSelected(android.view.MenuItem item) {
int id = item.getItemId();
if (id == (R.id.action_settings)) {
new xyz.farshad.vocab.component.Server.DataTransfer(this).execute();
android.widget.Toast.makeText(this, "retrieve from server...", Toast.LENGTH_LONG).show();
... |
protected void onNewIntent(android.content.Intent intent) {
super.onNewIntent(intent);
android.util.Log.v(fr.perso.poneydolist.ItemsActivity.LOG_TAG, ((("On new intent: " + (intent.getIntExtra(SyncService.INTENT_EXTRA_LIST_ID, (-1)))) + " ") + (intent.getStringExtra(SyncService.INTENT_EXTRA_LIST_TITLE))));
... | protected void onNewIntent(android.content.Intent intent) {
super.onNewIntent(intent);
android.util.Log.v(fr.perso.poneydolist.ItemsActivity.LOG_TAG, ((("On new intent: " + (intent.getIntExtra(SyncService.INTENT_EXTRA_LIST_ID, (-1)))) + " ") + (intent.getStringExtra(SyncService.INTENT_EXTRA_LIST_TITLE))));
... |
public static void greaterOrEqual(java.lang.String message, float lhs, float rhs, float margin) {
com.johnuckele.vtest.Tester.checkScope();
java.lang.System.out.println(((((((("\t\t" + message) + ": ") + lhs) + " >= ") + rhs) + " ± ") + margin));
double difference = lhs - rhs;
com.johnuckele.vtest.Teste... | public static void greaterOrEqual(java.lang.String message, float lhs, float rhs, float margin) {
com.johnuckele.vtest.Tester.checkScope();
java.lang.System.out.println(((((((("\t\t" + message) + ": ") + lhs) + " >= ") + rhs) + " ± ") + margin));
com.johnuckele.vtest.Tester.test((lhs >= (rhs + (java.lang.Ma... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
android.content.Intent serviceIntent = new android.content.Intent(this, de.dbaelz.onofftracker.services.OnOffCountService.class);
startService(serviceIntent);
r... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
android.content.Intent serviceIntent = new android.content.Intent(this, de.dbaelz.onofftracker.services.OnOffCountService.class);
startService(serviceIntent);
r... |
public void receiveTaskEndEvent(eu.learnpad.simulator.monitoring.event.impl.TaskEndSimEvent event) {
for (java.lang.String userId : event.involvedusers) {
((eu.learnpad.simulator.uihandler.webserver.UIServlet) (usersMap.get(userId).getServletInstance())).removeTask(event.task.id);
}
webserver.remove... | public void receiveTaskEndEvent(eu.learnpad.simulator.monitoring.event.impl.TaskEndSimEvent event) {
for (java.lang.String userId : event.involvedusers) {
((eu.learnpad.simulator.uihandler.webserver.UIServlet) (usersMap.get(userId).getServletInstance())).removeTask(event.task.id);
}
webserver.remove... |
public boolean setSelectionAtPosition(int position, boolean fireOnClick) {
if ((mDrawerBuilder.mRecyclerView) != null) {
mDrawerBuilder.mAdapter.deselect();
mDrawerBuilder.mAdapter.select(position, false);
if ((((mDrawerBuilder.mOnDrawerItemClickListener) != null) && fireOnClick) && (positio... | public boolean setSelectionAtPosition(int position, boolean fireOnClick) {
if ((mDrawerBuilder.mRecyclerView) != null) {
mDrawerBuilder.mAdapter.deselect();
mDrawerBuilder.mAdapter.select(position, false);
if ((((mDrawerBuilder.mOnDrawerItemClickListener) != null) && fireOnClick) && (positio... |
public static int problemTwo(int max) {
if (max == 0) {
return 0;
}
int previousFib = 0;
int currentFib = 1;
int outPut = 0;
while (currentFib < max) {
int newFib = previousFib + currentFib;
previousFib = currentFib;
currentFib = newFib;
if ((currentFib % ... | public static int problemTwo(int max) {
if (max == 0) {
return 0;
}
int previousFib = 0;
int currentFib = 1;
int output = 0;
while (currentFib < max) {
int newFib = previousFib + currentFib;
previousFib = currentFib;
currentFib = newFib;
if ((currentFib % ... |
public void expected_exception_but_no_exception() throws java.lang.Throwable {
rule.expectThrowable(java.lang.AssertionError.class, "x");
try {
rule.apply(new org.junit.runners.model.Statement() {
public void evaluate() throws java.lang.Throwable {
}
}, org.mockito.Mockit... | public void expected_exception_but_no_exception() throws java.lang.Throwable {
rule.expectThrowable(java.lang.AssertionError.class, "x");
try {
rule.apply(new org.junit.runners.model.Statement() {
public void evaluate() throws java.lang.Throwable {
}
}, org.mockito.Mockit... |
public void encerra() {
br.edu.ifpi.capar.leilao.infra.dao.LeilaoDao dao = new br.edu.ifpi.capar.leilao.infra.dao.LeilaoDao();
java.util.List<br.edu.ifpi.capar.leilao.modelo.Leilao> todosLeiloesCorrentes = dao.correntes();
for (br.edu.ifpi.capar.leilao.modelo.Leilao leilao : todosLeiloesCorrentes) {
... | public void encerra() {
java.util.List<br.edu.ifpi.capar.leilao.modelo.Leilao> todosLeiloesCorrentes = dao.correntes();
for (br.edu.ifpi.capar.leilao.modelo.Leilao leilao : todosLeiloesCorrentes) {
if (comecouSemanaPassada(leilao)) {
leilao.encerra();
(total)++;
dao.a... |
public void onPlayerStateChanged(boolean playWhenReady, int playbackState) {
com.facebook.react.bridge.WritableMap params = com.facebook.react.bridge.Arguments.createMap();
params.putBoolean("playWhenReady", playWhenReady);
params.putInt("playbackState", playbackState);
sendEvent("onPlayerStateChanged",... | public void onPlayerStateChanged(boolean playWhenReady, int playbackState) {
com.facebook.react.bridge.WritableMap params = com.facebook.react.bridge.Arguments.createMap();
params.putBoolean("playWhenReady", playWhenReady);
params.putInt("playbackState", playbackState);
sendEvent("onPlayerStateChanged",... |
public void playMultipleRounds(int numberOfRounds) {
if (displayMessage) {
java.lang.System.out.println("Welcome to the sticks game!");
}
for (int round = 1; round <= numberOfRounds; round++) {
currentPlayer = player1;
board = new Board();
playGame();
}
java.lang.Syst... | public void playMultipleRounds(int numberOfRounds) {
for (int round = 1; round <= numberOfRounds; round++) {
if (displayMessage) {
java.lang.System.out.println("Welcome to the sticks game!");
}
currentPlayer = player1;
board = new Board();
playGame();
}
ja... |
public com.example.kingd.hello_world.History getCurrentEvent() {
int i = 0;
if ((homePage.dbFetch.getCurrentDate().compareTo(homePage.dbFetch.getPast().get(0).getPaymentDate())) == 0) {
return homePage.dbFetch.getPast().get(0);
}else {
return null;
}
} | public com.example.kingd.hello_world.History getCurrentEvent() {
int i = 0;
if (((homePage.dbFetch.getPast().size()) != 0) && ((homePage.dbFetch.getCurrentDate().compareTo(homePage.dbFetch.getPast().get(0).getPaymentDate())) == 0)) {
return homePage.dbFetch.getPast().get(0);
}else {
return n... |
public byte[] imageToBytes(javafx.scene.image.Image screenShot) {
java.io.ByteArrayOutputStream byteOutput = new java.io.ByteArrayOutputStream();
byte[] imageBytes = null;
try {
javax.imageio.ImageIO.write(javafx.embed.swing.SwingFXUtils.fromFXImage(screenShot, null), "png", byteOutput);
ima... | public byte[] imageToBytes(javafx.scene.image.Image screenShot) {
java.io.ByteArrayOutputStream byteOutput = new java.io.ByteArrayOutputStream();
byte[] imageBytes = null;
try {
javax.imageio.ImageIO.write(javafx.embed.swing.SwingFXUtils.fromFXImage(screenShot, null), "png", byteOutput);
ima... |
private void addTalker(world.soapboxrace.srv.protocol.FreeroamTalker newFreeroamTalker, world.soapboxrace.srv.protocol.FreeroamTalker freeroamTalker) {
for (int i = 0; i < (limit); i++) {
if ((visibleTalkers.get(i)) == null) {
visibleTalkers.add(i, newFreeroamTalker);
freeroamTalker.... | private void addTalker(world.soapboxrace.srv.protocol.FreeroamTalker newFreeroamTalker, world.soapboxrace.srv.protocol.FreeroamTalker freeroamTalker) {
for (int i = 0; i < (limit); i++) {
if ((visibleTalkers.get(i)) == null) {
visibleTalkers.set(i, newFreeroamTalker);
return ;
... |
private com.e451.rest.security.Claims getClaimsFromToken(java.lang.String token) {
com.e451.rest.security.Claims claims;
try {
com.e451.rest.security.JwtParser parser = com.e451.rest.security.Jwts.parser();
if (((privateKeyEncoded) == null) || ((publicKeyEncoded) == null)) {
parser.s... | private com.e451.rest.security.Claims getClaimsFromToken(java.lang.String token) {
com.e451.rest.security.Claims claims;
try {
com.e451.rest.security.JwtParser parser = com.e451.rest.security.Jwts.parser();
if ((privateKeyEncoded.isEmpty()) || (publicKeyEncoded.isEmpty())) {
parser.s... |
public <Trans extends com.loic.algo.search.core.Transition> java.util.List<Trans> find(com.loic.algo.search.core.State<Trans> root, int maxDeep) {
java.util.Objects.requireNonNull(root, "Root state is mandatory");
com.google.common.base.Preconditions.checkState((maxDeep > 0), "Max deep must bigger than 0");
... | public <Trans extends com.loic.algo.search.core.Transition> java.util.List<Trans> find(com.loic.algo.search.core.State<Trans> root, int maxDeep) {
java.util.Objects.requireNonNull(root, "Root state is mandatory");
com.google.common.base.Preconditions.checkState((maxDeep > 0), "Max deep must bigger than 0");
... |
boolean revealsTop(ca.mcgill.cs.stg.solitaire.cards.Card pCard, ca.mcgill.cs.stg.solitaire.model.GameModel.StackIndex pIndex) {
int indexOf = aStacks.get(pIndex).indexOf(pCard);
if (indexOf < 1) {
return false;
}
return aVisible.contains(aStacks.get(pIndex).get(indexOf));
} | boolean revealsTop(ca.mcgill.cs.stg.solitaire.cards.Card pCard, ca.mcgill.cs.stg.solitaire.model.GameModel.StackIndex pIndex) {
int indexOf = aStacks.get(pIndex).indexOf(pCard);
if (indexOf < 1) {
return false;
}
return !(aVisible.contains(aStacks.get(pIndex).get((indexOf - 1))));
} |
public static java.util.HashMap<java.lang.String, searchEngine.PostingInfo> getMetaData(java.util.ArrayList<java.lang.String> queries) {
java.util.HashMap<java.lang.String, searchEngine.PostingInfo> metadata = new java.util.HashMap<>();
for (java.lang.String s : queries) {
java.util.HashMap<java.lang.St... | public static java.util.HashMap<java.lang.String, searchEngine.PostingInfo> getMetaData(java.util.ArrayList<java.lang.String> queries) {
java.util.HashMap<java.lang.String, searchEngine.PostingInfo> metadata = new java.util.HashMap<>();
for (java.lang.String s : queries) {
java.util.HashMap<java.lang.St... |
private void updateWithChanges(int startRow, int endRow) {
updatePosition();
updateOffsetOnCaret();
updateScrollBar();
if ((fileType) != (FileType.Text)) {
if (startRow >= 0) {
isShiftPressed = false;
parser.parse(startRow, endRow);
}
parser.bracketLightOf... | private void updateWithChanges(int startRow, int endRow) {
updatePosition();
updateOffsetOnCaret();
if ((fileType) != (FileType.Text)) {
if (startRow >= 0) {
isShiftPressed = false;
parser.parse(startRow, endRow);
}
parser.bracketLightOff();
parser.bra... |
public java.util.List<com.dexpert.feecollection.main.users.applicant.AppBean> getStudentDetailByEnrollMentNumber(java.lang.String enrollmentNumber) {
org.hibernate.Session session = com.dexpert.feecollection.main.users.applicant.AppDAO.factory.openSession();
try {
org.hibernate.Criteria criteria = sessi... | public java.util.List<com.dexpert.feecollection.main.users.applicant.AppBean> getStudentDetailByEnrollMentNumber(java.lang.String enrollmentNumber) {
org.hibernate.Session session = com.dexpert.feecollection.main.users.applicant.AppDAO.factory.openSession();
org.hibernate.Criteria criteria = session.createCrite... |
public java.lang.String editUser(@org.springframework.web.bind.annotation.PathVariable
java.lang.String passportSeriesAndNumber, org.springframework.ui.ModelMap model) {
by.bsuir.banking.entity.User user = null;
try {
user = userService.findByPassport(passportSeriesAndNumber);
} catch (by.bsuir.bank... | public java.lang.String editUser(@org.springframework.web.bind.annotation.PathVariable
java.lang.String passportSeriesAndNumber, org.springframework.ui.ModelMap model) {
by.bsuir.banking.entity.User user;
try {
user = userService.findByPassport(passportSeriesAndNumber);
} catch (by.bsuir.banking.ser... |
private static boolean isEdgeOppositeEdge(java.lang.Integer edge, int pos) {
boolean returnVal = false;
switch (edge) {
case 1 :
returnVal = pos == 7;
break;
case 3 :
returnVal = pos == 5;
break;
case 5 :
returnVal = pos == 3;
... | private static boolean isEdgeOppositeEdge(java.lang.Integer edge, int pos) {
boolean returnVal = false;
switch (edge) {
case 1 :
returnVal = pos == 7;
break;
case 3 :
returnVal = pos == 5;
break;
case 5 :
returnVal = pos == 3;
... |
public int compare(java.lang.Object a, java.lang.Object b) {
java.util.GregorianCalendar date1 = ((BankApplication.Account) (a)).getDateOpened();
java.util.GregorianCalendar date2 = ((BankApplication.Account) (b)).getDateOpened();
if (date1.before(date2))
return -1;
if (date1.after(date2))
... | public int compare(java.lang.Object a, java.lang.Object b) {
java.util.Calendar date1 = ((BankApplication.Account) (a)).getDateOpened();
java.lang.System.out.print(date1);
java.util.Calendar date2 = ((BankApplication.Account) (b)).getDateOpened();
java.lang.System.out.print(date2);
if (date1.before(... |
public java.util.List<eu.trentorise.smartcampus.communicator.model.Notification> getNotifications(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpSession session) throws java.io.IOException {
try {
java.lang.String token = request.getHea... | public java.util.List<eu.trentorise.smartcampus.communicator.model.Notification> getNotifications(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpSession session) throws java.io.IOException {
try {
java.lang.String token = request.getHea... |
public java.sql.ResultSet querySQL(java.lang.String query) throws java.lang.ClassNotFoundException, java.sql.SQLException {
if (!(checkConnection())) {
openConnection();
}
java.sql.Statement statement = connection.createStatement();
java.sql.ResultSet result = statement.executeQuery(query);
... | public java.sql.ResultSet querySQL(java.lang.String query) throws java.lang.ClassNotFoundException, java.sql.SQLException {
if (!(checkConnection())) {
openConnection();
}
java.sql.Statement statement = this.connection.createStatement();
java.sql.ResultSet result = statement.executeQuery(query);... |
public android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState) {
java.lang.String tmp = mTextViewBirthday.getText().toString();
java.lang.String[] arr = tmp.split("/");
int year = java.lang.Integer.parseInt(arr[com.example.framgia.hrm_10.controller.time.DatePickerFragment.YEAR]);
int mon... | public android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState) {
java.lang.String tmp = mTextViewBirthday.getText().toString();
java.lang.String[] arr = tmp.split("/");
int year = java.lang.Integer.parseInt(arr[com.example.framgia.hrm_10.controller.time.DatePickerFragment.YEAR]);
int mon... |
public void Solve() {
for (int j = 0; j < (N); j++) {
for (int k = 0; k < (M); k++) {
Result[j][k] = (A[j][k]) + (B[j][k]);
}
}
} | public void Solve() {
Result = new java.lang.Integer[N][M];
for (int j = 0; j < (N); j++) {
for (int k = 0; k < (M); k++) {
Result[j][k] = (A[j][k]) + (B[j][k]);
}
}
} |
public void doit() {
generateStateList();
generateEventList();
State initialState = unprocessedStates.get("0");
makeChildren(initialState);
if ((unprocessedStates.size()) != 0)
fitInRemainingUnusedStates();
statesMap = processedStates;
} | public void doit() {
generateStateList();
generateEventList();
State initialState = unprocessedStates.get("0");
makeChildren(initialState, true);
if ((unprocessedStates.size()) != 0)
fitInRemainingUnusedStates();
statesMap = processedStates;
} |
private static java.lang.String[] getTemporaryFileListFromHiddenForm() {
play.mvc.Http.MultipartFormData body = request().body().asMultipartFormData();
if (body == null) {
return new java.lang.String[]{ };
}
java.lang.String[] temporaryUploadFiles = body.asFormUrlEncoded().get(AttachmentApp.TAG... | public static java.lang.String[] getTemporaryFileListFromHiddenForm() {
play.mvc.Http.MultipartFormData body = request().body().asMultipartFormData();
if (body == null) {
return new java.lang.String[]{ };
}
java.lang.String[] temporaryUploadFiles = body.asFormUrlEncoded().get(AttachmentApp.TAG_... |
private com.fasterxml.jackson.databind.JsonNode lookupStack(java.lang.Object name) {
com.fasterxml.jackson.databind.JsonNode node = resolve(name, currentFrame);
if (!(node.isMissingNode())) {
return node;
}
com.squarespace.template.Frame frame = currentFrame;
while ((frame != null) && (!(fra... | private com.fasterxml.jackson.databind.JsonNode lookupStack(java.lang.Object name) {
com.fasterxml.jackson.databind.JsonNode node = resolve(name, currentFrame);
if (!(node.isMissingNode())) {
return node;
}
com.squarespace.template.Frame frame = currentFrame;
while (frame != null) {
... |
public void close() {
this.effectiveRibInWriter.close();
this.writer.removePeer();
this.chain.close();
this.writerChain.close();
if ((this.moduleTracker) != null) {
this.moduleTracker.onInstanceClose();
}
} | public void close() {
this.effectiveRibInWriter.close();
this.writer.removePeer();
this.chain.close();
if ((this.moduleTracker) != null) {
this.moduleTracker.onInstanceClose();
}
} |
public void turnBluetoothOn() {
android.bluetooth.BluetoothAdapter btAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter();
if (btAdapter != null) {
android.util.Log.i(de.dralle.bluetoothtest.BGS.LocalBluetoothManager.LOG_TAG, "Turning bluetooth on");
if (btAdapter.isEnabled()) {
... | public void turnBluetoothOn() {
android.bluetooth.BluetoothAdapter btAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter();
if (btAdapter != null) {
android.util.Log.i(de.dralle.bluetoothtest.BGS.LocalBluetoothManager.LOG_TAG, "Turning bluetooth on");
if (!(btAdapter.isEnabled())) {
... |
private java.lang.String tranform(java.lang.String id) {
java.lang.String id_prefix = id.substring(0, 6);
java.lang.String birth_year = id.substring(6, 4);
java.lang.String birth_month_days = id.substring(10, 4);
return ((((((((fileUploadUtils.getIdPrefix()) + "/") + id_prefix) + "/") + birth_year) + "/... | private java.lang.String tranform(java.lang.String id) {
java.lang.String id_prefix = id.substring(0, 6);
java.lang.String birth_year = id.substring(6, 10);
java.lang.String birth_month_days = id.substring(10, 14);
return (((((("/" + id_prefix) + "/") + birth_year) + "/") + birth_month_days) + "/") + (i... |
public void createSubClass(ClassInheritanceHierarchy.ClassPackage pkg, java.lang.String name, int superPos) {
ClassInheritanceHierarchy.Clazz superClazz = pkg.getClasses().get(superPos);
ClassInheritanceHierarchy.Clazz c = ClassInheritanceHierarchyFactory.eINSTANCE.createClazz();
c.setName(name);
c.setS... | public void createSubClass(ClassInheritanceHierarchy.ClassPackage pkg, java.lang.String name, int superPos) {
ClassInheritanceHierarchy.Clazz superClazz = pkg.getClasses().get(superPos);
ClassInheritanceHierarchy.Clazz c = ClassInheritanceHierarchyFactory.eINSTANCE.createClazz();
pkg.getClasses().add(c);
... |
public java.lang.String getOntologyPropertyCorrectCase(java.lang.String property) {
property = property.toLowerCase();
java.lang.String ontologyPropertyValue;
if ((applications.extractionPostprocessing.util.DBpediaResourceServiceOffline.ontologiesPropertiesMap) == null) {
this.loadOntologyClasses();... | public java.lang.String getOntologyPropertyCorrectCase(java.lang.String property) {
property = property.toLowerCase();
java.lang.String ontologyPropertyValue;
if ((applications.extractionPostprocessing.util.DBpediaResourceServiceOffline.ontologiesPropertiesMap) == null) {
this.loadOntologyClasses();... |
public void run() {
synchronized(layoutLock) {
if ((isSurfaceCreated) && (!(eglBase.hasSurface()))) {
eglBase.createSurface(getHolder().getSurface());
eglBase.makeCurrent();
android.opengl.GLES20.glPixelStorei(GLES20.GL_UNPACK_ALIGNMENT, 1);
}
}
} | public void run() {
synchronized(layoutLock) {
if ((((eglBase) != null) && (isSurfaceCreated)) && (!(eglBase.hasSurface()))) {
eglBase.createSurface(getHolder().getSurface());
eglBase.makeCurrent();
android.opengl.GLES20.glPixelStorei(GLES20.GL_UNPACK_ALIGNMENT, 1);
... |
private void requestLocationByTowers() {
towerManager.setOnTowersChangedListener(new codemagnus.com.dealokav2.tower.TowerManager.TowersChangeCallback() {
@java.lang.Override
public void didTowersChanged(java.util.ArrayList<codemagnus.com.dealokav2.tower.Tower> towers, java.lang.Exception e) {
... | private void requestLocationByTowers() {
displayCurrentTower();
towerManager.setOnTowersChangedListener(new codemagnus.com.dealokav2.tower.TowerManager.TowersChangeCallback() {
@java.lang.Override
public void didTowersChanged(java.util.ArrayList<codemagnus.com.dealokav2.tower.Tower> towers, java... |
private int getRequestId(java.nio.ByteBuffer buff) {
int start = 0;
int offset = java.lang.Integer.BYTES;
byte[] byteID = java.util.Arrays.copyOfRange(buff.array(), start, (start + offset));
java.nio.ByteBuffer wrapped = java.nio.ByteBuffer.wrap(byteID);
int num = wrapped.getInt();
return num;
} | private int getRequestId(java.nio.ByteBuffer buff) {
int start = 0;
int offset = java.lang.Integer.BYTES;
byte[] byteID = new byte[java.lang.Integer.BYTES];
buff.get(byteID, start, offset);
java.nio.ByteBuffer wrapped = java.nio.ByteBuffer.wrap(byteID);
int num = wrapped.getInt();
return num... |
private org.scenarioo.model.docu.aggregates.branches.BranchBuilds findBranch(final java.lang.String branchName) {
for (org.scenarioo.model.docu.aggregates.branches.BranchBuilds branchBuilds : this.branchBuildsList) {
if ((!(branchBuilds.isAlias())) && (branchBuilds.getBranch().getName().equals(branchName)))... | private org.scenarioo.model.docu.aggregates.branches.BranchBuilds findBranch(final java.lang.String branchName) {
for (org.scenarioo.model.docu.aggregates.branches.BranchBuilds branchBuilds : this.branchBuildsList) {
if ((!(branchBuilds.isAlias())) && (branchBuilds.getBranch().getName().equals(branchName)))... |
java.lang.String toGraphViz() {
return ((((((" " + (start.toString())) + " -> ") + (end.toString())) + " [label=\"") + (getCommonStringSequence())) + (getWeight())) + "\"]";
} | java.lang.String toGraphViz() {
if ((end) == null) {
return ((((" " + (start.toString())) + " [label=\"") + (getCommonStringSequence())) + (getWeight())) + "\"]";
}
return ((((((" " + (start.toString())) + " -> ") + (end.toString())) + " [label=\"") + (getCommonStringSequence())) + (getWeight())... |
public void displayWebsite(java.lang.String content) {
us.feras.mdv.MarkdownView markdownView = new us.feras.mdv.MarkdownView(this);
markdownView.setWebViewClient(new android.webkit.WebViewClient() {
public boolean shouldOverrideUrlLoading(android.webkit.WebView view, java.lang.String url) {
... | public void displayWebsite(java.lang.String content) {
markdownView = new us.feras.mdv.MarkdownView(this);
markdownView.setWebViewClient(new android.webkit.WebViewClient() {
public boolean shouldOverrideUrlLoading(android.webkit.WebView view, java.lang.String url) {
openNewPage(url);
... |
public boolean equals(java.lang.Object o) {
if (!(this.getClass().equals(o.getClass())))
return false;
core.movement.Move m = ((core.movement.Move) (o));
return ((this.x) == (m.x)) && ((this.y) == (m.y));
} | public boolean equals(java.lang.Object o) {
if ((o == null) || (!(this.getClass().equals(o.getClass()))))
return false;
core.movement.Move m = ((core.movement.Move) (o));
return ((this.x) == (m.x)) && ((this.y) == (m.y));
} |
public int getSum() {
for (com.freshpeople.training.blackjack.Card c : myCardList) {
if (c.getStringNumber().equals("A")) {
if ((sum) >= 21) {
sum += 1;
}else {
sum += 11;
}
}else {
sum += ((c.getIntNumber()) > 10) ? 10 ... | public int getSum() {
sum = 0;
for (com.freshpeople.training.blackjack.Card c : myCardList) {
if (c.getStringNumber().equals("A")) {
if ((sum) >= 21) {
sum += 1;
}else {
sum += 11;
}
}else {
sum += ((c.getIntNumber()... |
public boolean updateCollisionProperties(java.lang.String mobType, com.bergerkiller.bukkit.tc.CollisionMode mode) {
for (com.bergerkiller.bukkit.tc.properties.CollisionConfig collisionConfigObject : com.bergerkiller.bukkit.tc.properties.CollisionConfig.values()) {
if ((mobType.equals(collisionConfigObject.g... | public boolean updateCollisionProperties(java.lang.String mobType, com.bergerkiller.bukkit.tc.CollisionMode mode) {
if (mode == null) {
return false;
}
for (com.bergerkiller.bukkit.tc.properties.CollisionConfig collisionConfigObject : com.bergerkiller.bukkit.tc.properties.CollisionConfig.values()) {... |
private double getMapNormalizeValue(java.util.Map<java.lang.Integer, processing.analyzing.ReuseProbValue> map) {
double sum = 0.0;
for (java.util.Map.Entry<java.lang.Integer, processing.analyzing.ReuseProbValue> entry : map.entrySet()) {
sum += entry.getValue().getSum();
}
return sum;
} | private double getMapNormalizeValue(java.util.Map<java.lang.Integer, processing.analyzing.ReuseProbValue> map) {
double sum = 0.0;
for (java.util.Map.Entry<java.lang.Integer, processing.analyzing.ReuseProbValue> entry : map.entrySet()) {
if ((entry.getValue().getSum()) > sum) {
if ((entry.ge... |
protected void logMessage(java.lang.String key, java.util.Map<java.lang.String, java.lang.Object> variables, org.wicketstuff.security.log.IAuthorizationMessageSource message) {
java.lang.String msg = message.getMessage(key);
if (!(org.apache.wicket.util.string.Strings.isEmpty(msg)))
org.wicketstuff.secu... | protected void logMessage(java.lang.String key, java.util.Map<java.lang.String, java.lang.Object> variables, org.wicketstuff.security.log.IAuthorizationMessageSource message) {
java.lang.String msg = message.getMessage(key, variables);
if (!(org.apache.wicket.util.string.Strings.isEmpty(msg)))
org.wicke... |
public java.lang.String checkServerEncryption() throws java.io.IOException, java.lang.IllegalArgumentException, jhgdc.library.JHGDException {
if (!(connected)) {
throw new java.lang.IllegalStateException("Client not connected");
}
if (!(authenticated)) {
throw new java.lang.IllegalStateExcep... | public java.lang.String checkServerEncryption() throws java.io.IOException, java.lang.IllegalArgumentException, jhgdc.library.JHGDException {
if (!(connected)) {
throw new java.lang.IllegalStateException("Client not connected");
}
sendLineCommand("encrypt?");
java.lang.String returnMessage = inp... |
public java.lang.String validateJsonResponse(@org.springframework.web.bind.annotation.RequestBody
java.lang.String requestString, javax.servlet.http.HttpServletRequest req) throws java.io.UnsupportedEncodingException {
java.lang.System.out.println("At deocdeJsonResponse endpoint.");
java.lang.System.out.println... | public java.lang.String validateJsonResponse(@org.springframework.web.bind.annotation.RequestBody
java.lang.String requestString, javax.servlet.http.HttpServletRequest req) throws java.io.UnsupportedEncodingException {
java.lang.System.out.println("At deocdeJsonResponse endpoint.");
java.lang.System.out.println... |
private int iterateLine(int c) {
int ind = 0;
int ca = 0;
for (int i = 9; i > 0; i--) {
ca = buildLine(c, i, ind);
ind++;
}
return ca;
} | private int iterateLine(int c) {
int ind = 0;
int ca = c;
for (int i = 9; i > 0; i--) {
ca = buildLine(ca, i, ind);
ind++;
}
return ca;
} |
public void newHandCycle() {
java.lang.System.out.println("\n>> DEALING NEW CARDS\n");
for (int i = 0; i < (playersIn.size()); i++) {
playersIn.get(i).amountToCall = 0;
playersIn.get(i).newHand();
if (playersIn.get(i).isHuman()) {
java.lang.System.out.println(playersIn.get(i)... | private void newHandCycle() {
java.lang.System.out.println("\n>> DEALING NEW CARDS\n");
for (int i = 0; i < (playersIn.size()); i++) {
playersIn.get(i).amountToCall = 0;
playersIn.get(i).newHand();
if (playersIn.get(i).isHuman()) {
java.lang.System.out.println(playersIn.get(i... |
public java.io.File showFileChooser(java.lang.String ext) {
jfc.setFileSelectionMode(javax.swing.JFileChooser.FILES_ONLY);
jfc.setDialogTitle("�������� ����");
javax.swing.filechooser.FileNameExtensionFilter ff = new javax.swing.filechooser.FileNameExtensionFilter(("." + ext), ext);
jfc.addChoosableFile... | private java.io.File showFileChooser(java.lang.String ext) {
jfc.setFileSelectionMode(javax.swing.JFileChooser.FILES_ONLY);
jfc.setDialogTitle("�������� ����");
javax.swing.filechooser.FileNameExtensionFilter ff = new javax.swing.filechooser.FileNameExtensionFilter(("." + ext), ext);
jfc.addChoosableFil... |
public void add(int position, T item) {
if ((head) == null) {
head = new cbeaton.SinglyLinkedList.Node(null);
}
int i = 0;
cbeaton.SinglyLinkedList.Node n = head;
while (i < position) {
if ((n.next) == null) {
n.next = new cbeaton.SinglyLinkedList.Node(null);
... | public void add(int position, T item) {
if ((head) == null) {
head = new cbeaton.SinglyLinkedList.Node(null);
(length)++;
}
int i = 0;
cbeaton.SinglyLinkedList.Node n = head;
while (i < position) {
if ((n.next) == null) {
n.next = new cbeaton.SinglyLinkedList.Node... |
protected void updateLastSeen() {
lastSeen = java.util.Calendar.getInstance();
if (isLinked(org.openhab.binding.plugwise.PlugwiseBindingConstants.CHANNEL_LAST_SEEN)) {
updateState(org.openhab.binding.plugwise.PlugwiseBindingConstants.CHANNEL_LAST_SEEN, new org.eclipse.smarthome.core.library.types.DateTi... | protected void updateLastSeen() {
lastSeen = java.util.Calendar.getInstance();
if (isLinked(org.openhab.binding.plugwise.PlugwiseBindingConstants.CHANNEL_LAST_SEEN)) {
updateState(org.openhab.binding.plugwise.PlugwiseBindingConstants.CHANNEL_LAST_SEEN, new org.eclipse.smarthome.core.library.types.DateTi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.