buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
java.util.ArrayList<personal.vinay.bigdata.PrepData.Record> setMaxSpread(java.util.ArrayList<personal.vinay.bigdata.PrepData.Record> records) {
float maxSpread = 0;
for (personal.vinay.bigdata.PrepData.Record record : records) {
if (((record.getBidPrice()) - (record.getAskPrice())) > maxSpread) {
... | java.util.ArrayList<personal.vinay.bigdata.PrepData.Record> setMaxSpread(java.util.ArrayList<personal.vinay.bigdata.PrepData.Record> records) {
double maxSpread = 0;
for (personal.vinay.bigdata.PrepData.Record record : records) {
if (((record.getBidPrice()) - (record.getAskPrice())) > maxSpread) {
... |
public void downloadMessage(java.lang.String locationUrl, java.lang.String transactionId, android.app.PendingIntent downloadedIntent) {
if (android.text.TextUtils.isEmpty(locationUrl)) {
throw new java.lang.IllegalArgumentException("Empty MMS location URL");
}
try {
final com.android.interna... | public void downloadMessage(java.lang.String locationUrl, android.app.PendingIntent downloadedIntent) {
if (android.text.TextUtils.isEmpty(locationUrl)) {
throw new java.lang.IllegalArgumentException("Empty MMS location URL");
}
try {
final com.android.internal.telephony.mms.IMms iMms = IMms... |
public void onSuccess(java.lang.String s) {
android.graphics.Bitmap bitmap = com.example.hitao.activity.RecyclerViewAdapter.decodeSampledBitmapfromFielPath(file.getPath(), width, height);
addBitmapToMemoryCache(file.getPath(), bitmap);
if (bitmap != null) {
holder.productPic.setImageBitmap(bitmap);
... | public void onSuccess(java.lang.String s) {
android.graphics.Bitmap bitmap = com.example.hitao.activity.RecyclerViewAdapter.decodeSampledBitmapfromFielPath(file.getPath(), width, height);
if (((file.getPath()) != null) || (bitmap != null)) {
addBitmapToMemoryCache(file.getPath(), bitmap);
}
if (... |
private static void createTeam() {
if ((LeagueManager.players.length) < (LeagueManager.teams.size())) {
LeagueManager.prompt.printTitle("Create a team");
java.lang.String teamName = LeagueManager.prompt.getLine("Team name");
java.lang.String coach = LeagueManager.prompt.getLine("Coach");
... | private static void createTeam() {
if ((LeagueManager.teams.size()) < (LeagueManager.players.length)) {
LeagueManager.prompt.printTitle("Create a team");
java.lang.String teamName = LeagueManager.prompt.getLine("Team name");
java.lang.String coach = LeagueManager.prompt.getLine("Coach");
... |
public void onMapBtnClicked(android.view.View v) {
if (isState(com.v2tech.presenter.MainPresenter.VIDEO_SHARE_BTN_SHOW)) {
ui.showVideoshareBtnLayout(false);
unsetState(com.v2tech.presenter.MainPresenter.VIDEO_SHARE_BTN_SHOW);
ui.showP2PLiverLayout(true);
ls.getWatcherList(currentLiv... | public void onMapBtnClicked(android.view.View v) {
if (isState(com.v2tech.presenter.MainPresenter.VIDEO_SHARE_BTN_SHOW)) {
ui.showVideoshareBtnLayout(false);
unsetState(com.v2tech.presenter.MainPresenter.VIDEO_SHARE_BTN_SHOW);
ui.showP2PLiverLayout(true);
if ((currentLive) != null) {... |
public void logOUT() {
com.facebook.Session session = com.facebook.Session.getActiveSession();
if (session != null) {
session.close();
session.closeAndClearTokenInformation();
}else {
com.facebook.Session session2 = com.facebook.Session.openActiveSession(((android.app.Activity) (this... | public void logOUT() {
com.facebook.Session session = com.facebook.Session.getActiveSession();
if (session != null) {
session.close();
session.closeAndClearTokenInformation();
}else {
com.facebook.Session session2 = com.facebook.Session.openActiveSession(this, false, null);
i... |
public void doAll() {
if ((PreferenceList.EnableYandex) == true)
doInBackground();
else {
available.acquireUninterruptibly();
long time = java.lang.System.currentTimeMillis();
if (time > (akhil.alltrans.GetTranslateToken.lastExpireTime)) {
android.util.Log.i("AllTrans... | public void doAll() {
if (PreferenceList.EnableYandex)
doInBackground();
else {
available.acquireUninterruptibly();
long time = java.lang.System.currentTimeMillis();
if (time > (akhil.alltrans.GetTranslateToken.lastExpireTime)) {
android.util.Log.i("AllTrans", ((("All... |
public void switchScenes() {
if ((currentRoot) == (draftLayout)) {
votingLayout.setWorldMap(draftLayout.getWorldMap());
primaryStage.getScene().setRoot(votingLayout);
votingLayout.setWorldMap(getDraftLayout().getWorldMap());
currentRoot = votingLayout;
draftingPhase = false;
... | public void switchScenes() {
if ((currentRoot) == (draftLayout)) {
primaryStage.getScene().setRoot(votingLayout);
currentRoot = votingLayout;
draftingPhase = false;
}else {
primaryStage.getScene().setRoot(draftLayout);
currentRoot = draftLayout;
draftingPhase = tr... |
public static double adjustedrSquared(double rSquared, int numRegressors, int numDataPoints) {
double divide = (numDataPoints - 1) / ((numDataPoints - numRegressors) - 1);
double rSquaredDiff = 1 - rSquared;
return 1 - (rSquaredDiff * divide);
} | public static double adjustedrSquared(double rSquared, int numRegressors, int numDataPoints) {
double divide = (numDataPoints - 1.0) / ((numDataPoints - numRegressors) - 1.0);
double rSquaredDiff = 1 - rSquared;
return 1 - (rSquaredDiff * divide);
} |
private void resetItems() {
if ((menuItems.size()) > 0) {
java.util.List<android.view.ext.SatelliteMenuItem> items = new java.util.ArrayList<android.view.ext.SatelliteMenuItem>(menuItems);
menuItems.clear();
this.removeAllViews();
addItems(items);
}
} | private void resetItems() {
if ((menuItems.size()) > 0) {
java.util.List<android.view.ext.SatelliteMenuItem> items = new java.util.ArrayList(menuItems);
menuItems.clear();
this.removeAllViews();
addItems(items);
}
} |
public void mouseClicked(java.awt.event.MouseEvent e) {
int temp;
temp = (firstPage) + (change);
if ((temp + (LEN)) >= (len)) {
firstPage = (len) - (LEN);
}else
if (temp < 0) {
firstPage = 0;
}else {
firstPage = temp;
}
setCategory(firstPa... | public void mouseClicked(java.awt.event.MouseEvent e) {
int temp;
temp = (firstPage) + (change);
if ((temp + (LEN)) >= (len)) {
firstPage = (((len) - (LEN)) > 0) ? (len) - (LEN) : 0;
}else
if (temp < 0) {
firstPage = 0;
}else {
firstPage = temp;
}
... |
public void activate(java.lang.String nsr_id, java.lang.String vnfr_id) throws org.openbaton.exceptions.NotFoundException, org.openbaton.exceptions.VimException {
log.debug(("Activating Elasticity for NSR with id: " + nsr_id));
detectionManagment.start(nsr_id, vnfr_id);
if (autoScalingProperties.getPool().i... | public void activate(java.lang.String nsr_id, java.lang.String vnfr_id) throws org.openbaton.exceptions.NotFoundException, org.openbaton.exceptions.VimException {
log.debug(("Activating Elasticity for NSR with id: " + nsr_id));
if (autoScalingProperties.getPool().isActivate()) {
log.debug("Activating po... |
public java.util.List<org.openbox.sf5.model.Settings> getSettingsByArbitraryFilter(@org.springframework.web.bind.annotation.PathVariable(value = "type")
java.lang.String fieldName, @org.springframework.web.bind.annotation.PathVariable(value = "typeValue")
java.lang.String typeValue) {
java.lang.System.out.println("... | public java.util.List<org.openbox.sf5.model.Settings> getSettingsByArbitraryFilter(@org.springframework.web.bind.annotation.PathVariable(value = "type")
java.lang.String fieldName, @org.springframework.web.bind.annotation.PathVariable(value = "typeValue")
java.lang.String typeValue) {
java.util.List<org.openbox.sf5... |
public static net.pms.dlna.DLNAImageProfile parseThumbRequest(java.lang.String fileName) {
if (fileName.startsWith("thumbnail0000")) {
fileName = fileName.substring(13);
return net.pms.image.ImagesUtil.parseImageRequest(fileName, DLNAImageProfile.JPEG_TN);
}else {
net.pms.image.ImagesUti... | public static net.pms.dlna.DLNAImageProfile parseThumbRequest(java.lang.String fileName) {
if (fileName.startsWith("thumbnail0000")) {
fileName = fileName.substring(13);
return net.pms.image.ImagesUtil.parseImageRequest(fileName, DLNAImageProfile.JPEG_TN);
}
net.pms.image.ImagesUtil.LOGGER.w... |
public void playerJoined(org.bukkit.entity.Player p) {
for (org.bukkit.entity.Player x : org.bukkit.Bukkit.getOnlinePlayers())
if (!(x.equals(p)))
x.showPlayer(p);
if (!(p.hasPermission("Necessities.seehidden")))
for (java.util.UUID uuid : com.crossge.necessities.Comman... | public void playerJoined(org.bukkit.entity.Player p) {
for (org.bukkit.entity.Player x : org.bukkit.Bukkit.getOnlinePlayers())
if (!(x.equals(p))) {
x.showPlayer(p);
p.showPlayer(x);
}
if (!(p.hasPermission("Necessities.seehidden")))
for (java.util.UUID uuid ... |
public void onClick(android.view.View v) {
if ((adapter.getSectionItems(getHeader()).size()) == 1) {
holder.textViewKey.setText(null);
holder.textViewValue.setText(null);
return ;
}
int position = holder.getAdapterPosition();
if ((position < 0) || (position >= (adapter.getItemCou... | public void onClick(android.view.View v) {
int position = holder.getAdapterPosition();
if ((position < 0) || (position >= (adapter.getItemCount())))
return ;
if ((adapter.getSectionItems(getHeader()).size()) == 1) {
holder.textViewKey.setText(null);
holder.textViewValue.setText(... |
public void execute(org.getspout.api.command.CommandSource source, java.lang.String[] args, int baseIndex, boolean fuzzyLookup) throws org.getspout.api.command.CommandException {
org.bukkit.Bukkit.getServer().getCommandAliases();
args[baseIndex] = "/" + (args[baseIndex]);
if (!(plugin.getWorldEdit().handleC... | public void execute(org.getspout.api.command.CommandSource source, java.lang.String[] args, int baseIndex, boolean fuzzyLookup) throws org.getspout.api.command.CommandException {
args[baseIndex] = "/" + (args[baseIndex]);
if (!(plugin.getWorldEdit().handleCommand(plugin.wrapCommandSender(source), org.getspout.a... |
public void onBlockPlacedBy(net.minecraft.world.World world, int x, int y, int z, net.minecraft.entity.EntityLivingBase placer, net.minecraft.item.ItemStack stack) {
int l = net.minecraft.block.BlockPistonBase.determineOrientation(world, x, y, z, placer);
world.setBlockMetadataWithNotify(x, y, z, l, 2);
} | public void onBlockPlacedBy(net.minecraft.world.World world, int x, int y, int z, net.minecraft.entity.EntityLivingBase placer, net.minecraft.item.ItemStack stack) {
int l = net.minecraft.block.BlockPistonBase.determineOrientation(world, x, y, z, placer);
java.lang.System.out.println(l);
world.setBlockMetad... |
public void _vtepBindVlan(org.eclipse.osgi.framework.console.CommandInterpreter ci) {
ci.println("Let's bind a vlan");
java.lang.String vlan = ci.nextArgument();
java.lang.String lsName = ci.nextArgument();
java.lang.String portName = ci.nextArgument();
vtepBindVlan(lsName, portName, vlan, null);
} | public void _vtepBindVlan(org.eclipse.osgi.framework.console.CommandInterpreter ci) {
ci.println("Let's bind a vlan");
java.lang.String vlan = ci.nextArgument();
java.lang.String lsName = ci.nextArgument();
java.lang.String portName = ci.nextArgument();
vtepBindVlan(lsName, portName, vlan, null, new... |
public void turn(Landable[][] board, Monopoly game) {
game.clear();
if (_inJail) {
jailTurn();
}else {
move(board);
game.printBoard();
executeLandOn(board, game);
playerOptions(game);
}
} | public boolean turn(Landable[][] board, Monopoly game) {
game.clear();
if (_inJail) {
jailTurn();
return playerOptions(game);
}else {
move(board);
game.printBoard();
executeLandOn(board, game);
return playerOptions(game);
}
} |
public DragAndDrop.Payload dragStart(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer) {
com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Payload payload = new com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Payload();
com.badlogic.gdx.scenes.scene2d.ui.Tree.Node node = tree.ge... | public DragAndDrop.Payload dragStart(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer) {
com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Payload payload = new com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Payload();
com.badlogic.gdx.scenes.scene2d.ui.Tree.Node node = tree.ge... |
public void shootBullet() {
game.Game.getInstance().getLevel().getBullets().add(new entity.Bullet(new entity.Coordinate(((getX()) + ((getWidth()) / 2)), ((getY()) - ((getHeight()) / 2))), Direction.SOUTH, this));
} | public void shootBullet() {
game.Game.getInstance().getLevel().getBullets().add(new entity.Bullet(new entity.Coordinate(((getX()) + ((getWidth()) / 2)), ((getY()) + ((getHeight()) / 2))), Direction.SOUTH, this));
} |
public void visitMethodInsn(int opcode, java.lang.String owner, java.lang.String name, java.lang.String desc, boolean itf) {
super.visitMethodInsn(opcode, owner, name, desc, itf);
if (name.equals("<init>")) {
com.sadboys.Models.UseModel usie = new com.sadboys.Models.UseModel(ownerClass.getName(), saniti... | public void visitMethodInsn(int opcode, java.lang.String owner, java.lang.String name, java.lang.String desc, boolean itf) {
super.visitMethodInsn(opcode, owner, name, desc, itf);
if (!(sanitize(ownerClass.getName()).equals(sanitize(owner)))) {
com.sadboys.Models.UseModel usie = new com.sadboys.Models.U... |
public final org.workcraft.workspace.WorkspaceEntry execute(org.workcraft.workspace.WorkspaceEntry we) {
we.saveMemento();
org.workcraft.dom.visual.VisualModel model = org.workcraft.workspace.WorkspaceUtils.getAs(we, org.workcraft.dom.visual.VisualModel.class);
layout(model);
final org.workcraft.Framewo... | public final org.workcraft.workspace.WorkspaceEntry execute(org.workcraft.workspace.WorkspaceEntry we) {
we.saveMemento();
org.workcraft.dom.visual.VisualModel model = org.workcraft.workspace.WorkspaceUtils.getAs(we, org.workcraft.dom.visual.VisualModel.class);
layout(model);
final org.workcraft.Framewo... |
public void cancel(org.andork.swing.async.Task task) {
org.andork.swing.async.Task removed = null;
org.andork.swing.async.Task.State state = task.getState();
if ((state != (Task.State.CANCELED)) && (state != (Task.State.CANCELING))) {
task.cancel();
}
int index = tasks.indexOf(task);
if ... | public void cancel(org.andork.swing.async.Task task) {
if (!(tasks.remove(task))) {
return ;
}
org.andork.swing.async.Task.State state = task.getState();
if ((state != (Task.State.CANCELED)) && (state != (Task.State.CANCELING))) {
task.cancel();
}
fireTaskRemoved(task);
} |
public boolean checkCondForResendMail(java.util.HashMap<java.lang.String, java.lang.String> details, java.lang.String email, int cmid) {
java.lang.String status = getStatus(details);
java.lang.String currentEmail = details.get("email_address");
if (currentEmail.equals(email)) {
if (status.equals("ve... | public boolean checkCondForResendMail(java.util.HashMap<java.lang.String, java.lang.String> details, java.lang.String email, int cmid) {
java.lang.String status = getStatus(details);
java.lang.String currentEmail = details.get("email_address");
if (currentEmail.equals(email)) {
return status.equals(... |
public java.lang.String[] getColumnNames() {
java.lang.String[] ret = new java.lang.String[columnNames.size()];
int index = 0;
for (java.lang.String s : columnNames.values()) {
if (!(s.equals("ID"))) {
java.lang.System.out.println(s);
ret[index] = s;
index++;
... | public java.lang.String[] getColumnNames() {
java.lang.String[] ret = new java.lang.String[columnNames.size()];
int index = 0;
for (java.lang.String s : columnNames.values()) {
if (!(s.equals("ID"))) {
ret[index] = s;
index++;
}
}
return ret;
} |
public java.lang.Object getPrediction3D(@org.springframework.web.bind.annotation.PathVariable(value = "id")
java.lang.Long id) {
org.oracul.service.dto.Prediction3D prediction = prediction3dRepository.findById(id);
if ((prediction != null) && ((prediction.getLevels()) != null)) {
return prediction;
... | public java.lang.Object getPrediction3D(@org.springframework.web.bind.annotation.PathVariable(value = "id")
java.lang.Long id) {
org.oracul.service.dto.Prediction3D prediction = prediction3dRepository.findById(id);
if ((prediction != null) && ((prediction.getLevels().size()) != 0)) {
return prediction;
... |
public void propertyAction(Property square, Monopoly game) {
if (((square.getOwner()) == null) && ((square.getOwner()) != (this))) {
autoBuy(square);
if ((getCash()) < (square.getBuyPrice()))
game.auction(square);
}else
if ((square.getOwner()) != (this))
... | public void propertyAction(Property square, Monopoly game) {
if (((square.getOwner()) == null) && ((square.getOwner()) != (this))) {
if ((autoBuy(square)) == (-1))
game.auction(square);
}else
if ((square.getOwner()) != (this))
pay(square);
} |
public void handle(long now) {
time += 0.015;
if (((time) >= 0.5) && (!(board.checkBoardFull()))) {
time = 0;
update(grid, sideGrid, preview, scoreLabel, false);
}
if (board.checkBoardFull()) {
scene.setOnKeyPressed(null);
displayGameOver(layoutGrid, this);
}
} | public void handle(long now) {
time += 0.015;
if (((time) >= 0.5) && (!(board.checkBoardFull()))) {
time = 0;
update(grid, sideGrid, preview, scoreLabel, false);
}
if (board.checkBoardFull()) {
displayGameOver(layoutGrid, this);
}
} |
public void areNotEqual() {
java.util.Date creationDate = new java.util.Date();
com.clouway.oauth2.token.Token token1 = new com.clouway.oauth2.token.Token("value1", TokenType.BEARER, "refreshToken", "identityId", 1L, creationDate);
com.clouway.oauth2.token.Token token2 = new com.clouway.oauth2.token.Token("... | public void areNotEqual() {
java.util.Date creationDate = new java.util.Date();
com.clouway.oauth2.token.Token token1 = new com.clouway.oauth2.token.Token("value1", TokenType.BEARER, "refreshToken", "identityId", 1L, creationDate);
com.clouway.oauth2.token.Token token2 = new com.clouway.oauth2.token.Token("... |
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
multiFileSelection = useFiles.getSelection();
org.dawb.common.ui.util.GridUtils.setVisible(multiFilesLabel, multiFileSelection);
setFileChoosingEnabled((!(multiFileSelection)));
org.dawb.common.ui.util.GridUtils.setVisible(filter, mul... | public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
multiFileSelection = useFiles.getSelection();
org.dawb.common.ui.util.GridUtils.setVisible(multiFilesLabel, multiFileSelection);
setFileChoosingEnabled((!(multiFileSelection)));
org.dawb.common.ui.util.GridUtils.setVisible(filter, mul... |
public void onClick(android.view.View v) {
super.onClick(v);
switch (v.getId()) {
case R.id.iv_my_task :
break;
case R.id.iv_news :
changeFragment(R.id.fl_home_content, new com.softtanck.framework.fragment.NewsFragment());
MainActivity.sm.toggle();
... | public void onClick(android.view.View v) {
super.onClick(v);
switch (v.getId()) {
case R.id.iv_my_task :
break;
case R.id.iv_news :
changeFragment(R.id.fl_home_content, new com.softtanck.framework.fragment.NewsFragment());
break;
case R.id.iv_study_his... |
private void onScrollEnd() {
if (mOverScrollable) {
float fixX = ensureTranslationBounds(0, true, false);
float fixY = ensureTranslationBounds(0, false, false);
if ((fixX != 0) || (fixY != 0)) {
animateTo(getZoom(), fixX, fixY, true, false);
return ;
}
}
... | private void onScrollEnd() {
if (mOverScrollable) {
@com.otaliastudios.zoom.ZoomEngine.ScaledPan
float fixX = ensureTranslationBounds(0, true, false);
@com.otaliastudios.zoom.ZoomEngine.ScaledPan
float fixY = ensureTranslationBounds(0, false, false);
if ((fixX != 0) || (fixY ... |
public void deleteItem(csc4700.Item item) {
if (item == null) {
throw new java.lang.NullPointerException();
}
csc4700.CartItem cartItem = findCartItem(item);
if (cartItem == null) {
return ;
}
if ((cartItem.getCount()) == 0) {
cartItems.remove(cartItem);
}else {
... | public void deleteItem(csc4700.Item item) {
if (item == null) {
throw new java.lang.NullPointerException();
}
csc4700.CartItem cartItem = findCartItem(item);
if (cartItem == null) {
return ;
}
if ((cartItem.getCount()) == 1) {
cartItems.remove(cartItem);
}else {
... |
public void onClick(android.view.View v) {
holder.imageViewFollowed.setImageResource(R.drawable.followed);
if (com.wewow.UserInfo.isUserLogged(context)) {
postReadToServer(stringObjectHashMap.get("id").toString());
}else {
android.content.Intent i = new android.content.Intent();
i.se... | public void onClick(android.view.View v) {
holder.imageViewFollowed.setImageResource(R.drawable.followed);
if (com.wewow.UserInfo.isUserLogged(context)) {
id = stringObjectHashMap.get("id").toString();
postReadToServer(id);
}else {
android.content.Intent i = new android.content.Inten... |
public void saveChangesAtomically() throws net.cubespace.geSuit.core.storage.StorageException {
boolean USE_TRANSACTIONS = true;
redis.clients.jedis.Jedis jedis = null;
try {
if (USE_TRANSACTIONS) {
redis.clients.jedis.Transaction transaction = jedis.multi();
saveChanges(tran... | public void saveChangesAtomically() throws net.cubespace.geSuit.core.storage.StorageException {
boolean USE_TRANSACTIONS = true;
redis.clients.jedis.Jedis jedis = null;
try {
jedis = redis.getJedis();
if (USE_TRANSACTIONS) {
redis.clients.jedis.Transaction transaction = jedis.mul... |
private double accumulateGradient(com.yahoo.labs.yamall.core.Instance sample) {
(gatherGradIter)++;
double pred = predict(sample);
final double grad = -(lossFnc.negativeGradient(pred, sample.getLabel(), sample.getWeight()));
if ((java.lang.Math.abs(grad)) > 1.0E-8) {
sample.getVector().addScaled... | private double accumulateGradient(com.yahoo.labs.yamall.core.Instance sample) {
(gatherGradIter)++;
double pred = predict(sample);
final double grad = lossFnc.negativeGradient(pred, sample.getLabel(), sample.getWeight());
if ((java.lang.Math.abs(grad)) > 1.0E-8) {
sample.getVector().addScaledSpa... |
public void disconnect() {
try {
java.lang.System.out.println("disconnect now");
if ((socket) != null) {
socket.close();
}
requestThread.interrupt();
taskQueue.clear();
} catch (java.io.IOException e) {
e.printStackTrace();
}
} | public void disconnect() {
try {
java.lang.System.out.println("disconnect now");
if ((socket) != null) {
socket.close();
}
if ((requestThread) != null) {
requestThread.interrupt();
}
taskQueue.clear();
} catch (java.io.IOException e) {
... |
private void clickBuyButton() {
android.content.res.Resources res = getResources();
java.lang.String textBuyResult = java.lang.String.format(res.getString(R.string.buy_button_pressed), totalPrice);
android.widget.Toast toast = android.widget.Toast.makeText(getActivity(), textBuyResult, Toast.LENGTH_SHORT);
... | private void clickBuyButton() {
android.content.res.Resources res = getResources();
java.lang.String textBuyResult = java.lang.String.format(res.getString(R.string.buy_button_pressed), totalPrice);
android.widget.Toast toast = android.widget.Toast.makeText(getActivity(), textBuyResult, Toast.LENGTH_SHORT);
... |
public org.tiogasolutions.couchace.core.api.request.PutDesignRequest design(java.lang.String designName, java.nio.file.Path designFile, java.lang.String documentRevision) {
org.tiogasolutions.couchace.core.internal.util.ArgUtil.assertNotNull(designName, "designName");
org.tiogasolutions.couchace.core.internal.u... | public org.tiogasolutions.couchace.core.api.request.PutDesignRequest design(java.lang.String designName, java.nio.file.Path designFile, java.lang.String documentRevision) {
org.tiogasolutions.couchace.core.internal.util.ArgUtil.assertNotNull(designName, "designName");
org.tiogasolutions.couchace.core.internal.u... |
public void importConcept_shouldUpdateNameTypeInConcept() throws java.lang.Exception {
org.openmrs.module.openconceptlab.client.OclConcept oclConcept = newOclConcept();
importer.importConcept(new org.openmrs.module.openconceptlab.CacheService(conceptService), null, oclConcept);
for (org.openmrs.module.openc... | public void importConcept_shouldUpdateNameTypeInConcept() throws java.lang.Exception {
org.openmrs.module.openconceptlab.client.OclConcept oclConcept = newOclConcept();
importer.importConcept(new org.openmrs.module.openconceptlab.CacheService(conceptService), update, oclConcept);
for (org.openmrs.module.ope... |
public void queue() {
compiler.Ecriture.ecrireStringln(flux, ";queue", 1);
compiler.Ecriture.ecrireStringln(flux, "nop", 1);
compiler.Ecriture.ecrireStringln(flux, "EXITCODE", 1);
compiler.Ecriture.ecrireStringln(flux, "end debut", 1);
compiler.Ecriture.fermer(flux);
} | public void queue() {
compiler.Ecriture.ecrireStringln(flux, ";queue");
compiler.Ecriture.ecrireStringln(flux, "nop");
compiler.Ecriture.ecrireStringln(flux, "EXITCODE");
compiler.Ecriture.ecrireStringln(flux, "end debut");
compiler.Ecriture.fermer(flux);
} |
public void addEdge(int u, int v) {
if (this.edges.containsKey(u)) {
this.edges.get(u).add(v);
}else {
java.util.List<java.lang.Integer> destList = new structures.LinkedList<java.lang.Integer>();
destList.add(v);
this.edges.put(u, destList);
}
} | public void addEdge(int u, int v) {
if (this.edges.containsKey(u)) {
this.edges.get(u).add(v);
}else {
java.util.List<java.lang.Integer> destList = new java.util.LinkedList<java.lang.Integer>();
destList.add(v);
this.edges.put(u, destList);
}
} |
public void actionPerformed(java.awt.event.ActionEvent arg0) {
try {
cardImage = javax.imageio.ImageIO.read(picProvider.getPictureURL(magicCardEditorPanel.getMagicCard()));
panelPictures.revalidate();
panelPictures.repaint();
jsonPanel.showCard(magicCardEditorPanel.getMagicCard());
... | public void actionPerformed(java.awt.event.ActionEvent arg0) {
try {
cardImage = javax.imageio.ImageIO.read(picProvider.getPictureURL(magicCardEditorPanel.getMagicCard()));
panelPictures.revalidate();
panelPictures.repaint();
jsonPanel.show(magicCardEditorPanel.getMagicCard());
}... |
public static void store(java.util.List<entity.TravelPossibility> travelPossibilities) {
javax.persistence.EntityManagerFactory emf = javax.persistence.Persistence.createEntityManagerFactory("TravelPossibilityPersistence");
javax.persistence.EntityManager entityManager = emf.createEntityManager();
entityMan... | private static void store(java.util.List<entity.TravelPossibility> travelPossibilities) {
javax.persistence.EntityManagerFactory emf = javax.persistence.Persistence.createEntityManagerFactory("TravelPossibilityPersistence");
javax.persistence.EntityManager entityManager = emf.createEntityManager();
entityMa... |
protected org.ehcache.transactions.xa.SoftLock<V> copyAfterDeserialization(org.ehcache.spi.serialization.Serializer<V> valueSerializer, org.ehcache.transactions.xa.SoftLock<V> serializedSoftLock) throws java.lang.ClassNotFoundException {
V oldValue = valueSerializer.read(java.nio.ByteBuffer.wrap(serializedSoftLock.... | protected org.ehcache.transactions.xa.SoftLock<V> copyAfterDeserialization(org.ehcache.spi.serialization.Serializer<V> valueSerializer, org.ehcache.transactions.xa.SoftLock<V> serializedSoftLock) throws java.lang.ClassNotFoundException {
V oldValue = null;
if ((serializedSoftLock.oldValueSerialized) != null) {
... |
public com.joanzapata.tilesview.internal.Tile becomeMRU(com.joanzapata.tilesview.internal.Tile lastMRU) {
if ((newerTile) != null)
newerTile.olderTile = olderTile;
if ((olderTile) != null)
olderTile.newerTile = newerTile;
if (lastMRU != (this)) {
olderTile = lastMRU;
... | public com.joanzapata.tilesview.internal.Tile becomeMRU(com.joanzapata.tilesview.internal.Tile lastMRU) {
if ((newerTile) != null)
newerTile.olderTile = olderTile;
if ((olderTile) != null)
olderTile.newerTile = newerTile;
newerTile = null;
if (lastMRU != (this)) {
older... |
public void showServerError(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, java.lang.Throwable e) throws java.io.IOException, javax.servlet.ServletException {
resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
req.setAttribute(com.lftechnology.batch7crud.contr... | protected void showServerError(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, java.lang.Throwable e) throws java.io.IOException, javax.servlet.ServletException {
resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
req.setAttribute(com.lftechnology.batch7crud.co... |
private void auxAllocateAndAdjustFields(long auxAddress, long oldCapacity, long newCapacity) {
try {
allocateArrayAndAdjustFields(size(), newCapacity);
} catch (java.lang.Error e) {
try {
baseAddress = move(auxAddress, oldCapacity, auxMalloc, malloc);
} catch (java.lang.Error... | private void auxAllocateAndAdjustFields(long auxAddress, long size, long oldCapacity, long newCapacity) {
try {
allocateArrayAndAdjustFields(size, newCapacity);
} catch (java.lang.Error e) {
try {
baseAddress = move(auxAddress, oldCapacity, auxMalloc, malloc);
} catch (java.l... |
public void processFinish(java.lang.String output) {
java.lang.String[] colNames = new java.lang.String[]{ "Name" , "dec" , "Quantity" , "inc" , "Cost_Each" , "Type" , "Id" };
java.lang.String[] rowNames = new java.lang.String[]{ "name" , "quantity" , "cost_each" , "type" , "id" };
table = new table.SalesTa... | public void processFinish(java.lang.String output) {
java.lang.String[] colNames = new java.lang.String[]{ "Name" , "dec" , "Quantity" , "inc" , "Cost_Each" , "Type" };
java.lang.String[] rowNames = new java.lang.String[]{ "name" , "quantity" , "cost_each" , "type" , "id" };
table = new table.SalesTable(out... |
void checkAlternatives(java.util.List<com.graphhopper.routing.AlternativeRoute.AlternativeInfo> alternativeInfos) {
for (com.graphhopper.routing.AlternativeRoute.AlternativeInfo a : alternativeInfos) {
if ((a.getPlateauWeight()) > (a.getPath().getWeight()))
org.junit.Assert.assertTrue(("plateau ... | void checkAlternatives(java.util.List<com.graphhopper.routing.AlternativeRoute.AlternativeInfo> alternativeInfos) {
for (com.graphhopper.routing.AlternativeRoute.AlternativeInfo a : alternativeInfos) {
if ((a.getPlateauWeight()) > (a.getPath().getWeight()))
assertTrue(("plateau or sortby incorre... |
private void writeCategoriesFrame() throws java.io.IOException {
org.apache.velocity.Template template = loadTemplate("frame-categories.vm");
org.apache.velocity.VelocityContext context = new org.apache.velocity.VelocityContext();
context.put("categories", statCatProvider.getCategories());
java.io.FileW... | private void writeCategoriesFrame() throws java.io.IOException {
org.apache.velocity.VelocityContext context = new org.apache.velocity.VelocityContext();
context.put("categories", statCatProvider.getCategories());
java.io.FileWriter writer = new java.io.FileWriter(new java.io.File(this.outputFolder, "frame-... |
static void setEncodingByUser(neoe.ne.PlainPage plainPage, java.lang.String msg) {
java.lang.String s = javax.swing.JOptionPane.showInputDialog(plainPage.uiComp, msg, plainPage.pageData.encoding);
if (s == null) {
return ;
}
try {
"a".getBytes(s);
} catch (java.lang.Exception e) {
... | static boolean setEncodingByUser(neoe.ne.PlainPage plainPage, java.lang.String msg) {
java.lang.String s = javax.swing.JOptionPane.showInputDialog(plainPage.uiComp, msg, plainPage.pageData.encoding);
if (s == null) {
return false;
}
try {
"a".getBytes(s);
} catch (java.lang.Exception... |
public boolean addBBData(java.lang.String type, com.seanModTest.templates.BuildBlockData bbd) {
java.util.ArrayList<com.seanModTest.templates.BuildBlockData> bbdList = typeToBBData.get(type);
if (bbdList == null) {
bbdList = new java.util.ArrayList<com.seanModTest.templates.BuildBlockData>();
ty... | public boolean addBBData(java.lang.String type, com.seanModTest.templates.BuildBlockData bbd) {
java.util.ArrayList<com.seanModTest.templates.BuildBlockData> bbdList = typeToBBData.get(type);
if (bbdList == null) {
bbdList = new java.util.ArrayList<com.seanModTest.templates.BuildBlockData>();
ty... |
protected void onDestroy() {
super.onDestroy();
if ((mLocService) != null) {
mLocService.removeGpsStatusListener(this);
mLocService.removeUpdates(this);
}
releaseWakeLockIfHeld();
if (isServiceBound) {
doUnbindService();
}
final android.bluetooth.BluetoothAdapter btAd... | protected void onDestroy() {
super.onDestroy();
if ((mLocService) != null) {
mLocService.removeGpsStatusListener(this);
mLocService.removeUpdates(this);
}
releaseWakeLockIfHeld();
if (isServiceBound) {
doUnbindService();
}
final android.bluetooth.BluetoothAdapter btAd... |
protected void sendMessage(org.bukkit.command.CommandSender sender, java.lang.String message, java.lang.String prefix) {
if (sender instanceof org.bukkit.entity.Player) {
message = parseColors(message);
prefix = parseColors(prefix);
messagePrinter(((org.bukkit.entity.Player) (sender)), messa... | protected void sendMessage(org.bukkit.command.CommandSender sender, java.lang.String message, java.lang.String prefix) {
if (sender instanceof org.bukkit.entity.Player) {
message = parseColors(message);
prefix = parseColors(prefix);
messagePrinter(((org.bukkit.entity.Player) (sender)), messa... |
public void changeTheme(int themeId) {
if (themeId == (cn.zhihu.daily.zhihu_daily.constant.Constant.THEME_HOME_ID)) {
if ((contentList.getAdapter()) != (contentListAdapter))
contentList.setAdapter(contentListAdapter);
}else {
themeStoriesListAdapter = new cn.zhihu.daily.zhih... | public void changeTheme(int themeId) {
if (themeId == (cn.zhihu.daily.zhihu_daily.constant.Constant.THEME_HOME_ID)) {
if ((contentList.getAdapter()) != (contentListAdapter))
contentList.setAdapter(contentListAdapter);
this.themeId = cn.zhihu.daily.zhihu_daily.constant.Constant.T... |
public static void markAsVirtualMachine(com.vmware.vim25.mo.VirtualMachine vmTemplate, com.vmware.vim25.mo.HostSystem host, com.vmware.vim25.mo.ResourcePool pool) {
if (!(vmTemplate.getConfig().isTemplate())) {
org.occiware.clouddesigner.occi.infrastructure.connector.vmware.utils.VMHelper.LOGGER.warn("This ... | public static boolean markAsVirtualMachine(com.vmware.vim25.mo.VirtualMachine vmTemplate, com.vmware.vim25.mo.HostSystem host, com.vmware.vim25.mo.ResourcePool pool) throws java.rmi.RemoteException {
boolean result = false;
if (!(vmTemplate.getConfig().isTemplate())) {
return result;
}
vmTemplat... |
public static void initializeSMSApp() {
final android.content.Intent mainIntent = new android.content.Intent(android.content.Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_APP_MESSAGING);
android.content.pm.PackageManager pm = com.anna.util.MyApplication.getAppContext().getPackageManager(... | private static void initializeSMSApp() {
final android.content.Intent mainIntent = new android.content.Intent(android.content.Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_APP_MESSAGING);
android.content.pm.PackageManager pm = com.anna.util.MyApplication.getAppContext().getPackageManager... |
public static com.codeest.geeknews.di.component.AppComponent getAppComponent() {
if ((com.codeest.geeknews.app.App.appComponent) == null) {
com.codeest.geeknews.app.App.appComponent = com.codeest.geeknews.di.component.DaggerAppComponent.builder().appModule(new com.codeest.geeknews.di.module.AppModule(com.co... | public static com.codeest.geeknews.di.component.AppComponent getAppComponent() {
if ((com.codeest.geeknews.app.App.appComponent) == null) {
com.codeest.geeknews.app.App.appComponent = com.codeest.geeknews.di.component.DaggerAppComponent.builder().appModule(new com.codeest.geeknews.di.module.AppModule(com.co... |
private void confirmDialog(final int exercise_id) {
com.afollestad.materialdialogs.MaterialDialog dialog = new com.afollestad.materialdialogs.MaterialDialog.Builder(context).title("confirm").content(("Are you sure you want to delete it?" + (java.lang.String.valueOf(exercise_id)))).positiveText("OK").negativeText("C... | private void confirmDialog(final int exercise_id) {
com.afollestad.materialdialogs.MaterialDialog dialog = new com.afollestad.materialdialogs.MaterialDialog.Builder(context).title("confirm").content("Are you sure you want to delete it?").positiveText("OK").negativeText("CANCEL").cancelable(false).onPositive(new com... |
public static java.util.List<com.aimluck.eip.cayenne.om.portlet.VEipTScheduleList> getScheduleList(int userId, java.util.Date viewStart, java.util.Date viewEnd, java.util.List<java.lang.Integer> users, java.util.List<java.lang.Integer> facilities) {
return com.aimluck.eip.schedule.util.ScheduleUtils.getScheduleList... | public static java.util.List<com.aimluck.eip.cayenne.om.portlet.VEipTScheduleList> getScheduleList(int userId, java.util.Date viewStart, java.util.Date viewEnd, java.util.List<java.lang.Integer> users, java.util.List<java.lang.Integer> facilities) {
return com.aimluck.eip.schedule.util.ScheduleUtils.getScheduleList... |
public void onBucketFill(net.minecraftforge.event.entity.player.FillBucketEvent event) {
net.minecraft.util.math.RayTraceResult pos = event.getTarget();
net.minecraft.item.ItemStack ret = fillCustomBucket(event.getWorld(), pos);
if (ret == null) {
return ;
}
event.setFilledBucket(ret);
e... | public void onBucketFill(net.minecraftforge.event.entity.player.FillBucketEvent event) {
net.minecraft.util.math.RayTraceResult pos = event.getTarget();
if (pos == null) {
return ;
}
net.minecraft.item.ItemStack ret = fillCustomBucket(event.getWorld(), pos);
if (ret == null) {
return... |
private boolean isExpired() {
if (((expirationMonth) > 12) || ((expirationYear) < 1)) {
return false;
}
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.setTime(new java.util.Date());
return ((cal.get(java.util.Calendar.YEAR)) > (expirationYear)) || (((cal.get(java.util.Calenda... | private boolean isExpired() {
if (((expirationMonth) > 12) || ((expirationYear) < 1)) {
return true;
}
java.util.Calendar cal = java.util.Calendar.getInstance();
return ((cal.get(java.util.Calendar.YEAR)) > (expirationYear)) || (((cal.get(java.util.Calendar.YEAR)) == (expirationYear)) && ((cal.g... |
public synchronized void spawnActiveGameThread(java.lang.String gameType, com.netboard.game.Player host, com.netboard.game.Player guest) {
com.netboard.server.ActiveGameThread agt = new com.netboard.server.ActiveGameThread(gameType, host, guest);
java.lang.Thread gameThread = new java.lang.Thread(agt);
game... | public synchronized void spawnActiveGameThread(java.lang.String gameType, com.netboard.game.Player host, com.netboard.game.Player guest) {
com.netboard.server.ActiveGameThread agt = new com.netboard.server.ActiveGameThread(gameType, host, guest, this);
java.lang.Thread gameThread = new java.lang.Thread(agt);
... |
private boolean checkAnnotated(edu.umd.cs.findbugs.ba.XMethod bcelMethod) {
for (edu.umd.cs.findbugs.classfile.analysis.AnnotationValue annotation : bcelMethod.getAnnotations()) {
java.lang.String type = annotation.getAnnotationClass().getSignature();
if ("Lcom/google/common/annotations/VisibleForTe... | private boolean checkAnnotated(@javax.annotation.Nonnull
final edu.umd.cs.findbugs.ba.XMethod bcelMethod) {
for (final edu.umd.cs.findbugs.classfile.analysis.AnnotationValue annotation : bcelMethod.getAnnotations()) {
final java.lang.String type = annotation.getAnnotationClass().getSignature();
if (... |
public void Test2() {
result = tr.readFile("src\\test\\resources\\Header\\Incorrect bigconst E.tif");
org.junit.Assert.assertEquals(0, result);
org.junit.Assert.assertEquals(false, tr.getValidation().correct);
to = tr.getModel();
com.easyinnova.tiff.model.Metadata metadata = to.getMetadata();
or... | public void Test2() {
result = tr.readFile("src\\test\\resources\\Header\\Incorrect bigconst E.tif");
org.junit.Assert.assertEquals(0, result);
org.junit.Assert.assertEquals(false, tr.getValidation().correct);
to = tr.getModel();
org.junit.Assert.assertEquals(null, to.getMetadata());
} |
public static double boldTerms(org.codehaus.jettison.json.JSONObject q) {
java.util.List<java.lang.String> boldWords = annotatorstub.utils.SMAPHFeatures.getBoldWords(q);
double avgLength = 0.0;
for (java.lang.String bw : boldWords) {
avgLength += bw.length();
}
avgLength /= boldWords.size();... | public static double boldTerms(org.codehaus.jettison.json.JSONObject q) {
java.util.List<java.util.ArrayList<java.lang.String>> boldWords = annotatorstub.utils.SMAPHFeatures.getBoldWords(q);
double avgLength = 0.0;
for (java.util.ArrayList<java.lang.String> bw : boldWords) {
avgLength += bw.size();
... |
private void logoutUser() {
session.setLogin(false);
db.deleteUsers();
android.util.Log.d(materialtest.theartistandtheengineer.co.materialtest.materialtest.ActivityUsingTabLibrary.class.toString(), "Logging out of messaging");
stopService(new android.content.Intent(getApplicationContext(), materialtest.... | public void logoutUser() {
session.setLogin(false);
db.deleteUsers();
android.util.Log.d(materialtest.theartistandtheengineer.co.materialtest.materialtest.ActivityUsingTabLibrary.class.toString(), "Logging out of messaging");
stopService(new android.content.Intent(getApplicationContext(), materialtest.t... |
public static java.lang.String[] getConfig(java.lang.String key, java.lang.String[] default_val, java.lang.String delim) {
java.lang.String value = org.loklak.data.DAO.config.getProperty(key);
return (value == null) || ((value.length()) == 0) ? default_val : value.split(delim);
} | public static java.lang.String[] getConfig(java.lang.String key, java.lang.String[] default_val, java.lang.String delim) {
java.lang.String value = org.loklak.data.DAO.config.get(key);
return (value == null) || ((value.length()) == 0) ? default_val : value.split(delim);
} |
private android.content.Intent doBGforSB() {
com.rfo.basic.Basic.SD_ProgramPath = com.rfo.basic.Basic.SAMPLES_DIR;
if (new java.io.File(com.rfo.basic.Basic.getFilePath()).exists()) {
copyAssets(com.rfo.basic.Basic.AppPath);
doFirstLoad();
}else {
doCantLoad();
}
com.rfo.basic... | private android.content.Intent doBGforSB() {
if (new java.io.File(com.rfo.basic.Basic.getFilePath()).exists()) {
copyAssets(com.rfo.basic.Basic.AppPath);
doFirstLoad();
}else {
doCantLoad();
}
com.rfo.basic.Basic.DoAutoRun = false;
return new android.content.Intent(this, com.... |
private com.google.common.collect.Multimap<java.lang.String, java.lang.String> buildMap(com.appdynamics.extensions.io.Lines lines) {
com.google.common.collect.Multimap<java.lang.String, java.lang.String> jkStatsMap = com.google.common.collect.ArrayListMultimap.create();
for (java.lang.String line : lines) {
... | protected com.google.common.collect.Multimap<java.lang.String, java.lang.String> buildMap(com.appdynamics.extensions.io.Lines lines) {
com.google.common.collect.Multimap<java.lang.String, java.lang.String> jkStatsMap = com.google.common.collect.ArrayListMultimap.create();
for (java.lang.String line : lines) {
... |
public com.seanModTest.templates.BuildBlockData getFineOrDamagedBBD(java.util.Random rand, com.seanModTest.templates.BuildBlockData bbd) {
if (!(damagedBlockChances.containsKey(bbd.getBlockName())))
return bbd;
else {
float damageChance = damagedBlockChances.get(bbd.getBlockName());
floa... | public com.seanModTest.templates.BuildBlockData getFineOrDamagedBBD(java.util.Random rand, com.seanModTest.templates.BuildBlockData bbd, java.lang.String type) {
if (!(damagedBlockChances.containsKey(type)))
return bbd;
else {
float damageChance = damagedBlockChances.get(type);
float f =... |
public void characters(final char[] buffer, final int start, final int length) {
java.lang.String string = new java.lang.String(buffer, start, length);
if ((this.type) != null) {
switch (this.type) {
case ID :
storeProfile(string);
break;
case MODU... | public void characters(final char[] buffer, final int start, final int length) {
java.lang.String string = new java.lang.String(buffer, start, length);
if ((this.type) != null) {
switch (this.type) {
case ID :
storeProfile(string);
break;
case MODU... |
public void apply() throws com.intellij.openapi.options.ConfigurationException {
sonarModuleComponent.getState().host = txtHost.getText();
sonarModuleComponent.getState().user = txtUser.getText();
sonarModuleComponent.getState().password = txtPassword.getPassword().toString();
sonarModuleComponent.getSt... | public void apply() throws com.intellij.openapi.options.ConfigurationException {
sonarModuleComponent.getState().host = txtHost.getText();
sonarModuleComponent.getState().user = txtUser.getText();
sonarModuleComponent.getState().password = new java.lang.String(txtPassword.getPassword());
sonarModuleComp... |
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
android.view.View rootView = inflater.inflate(R.layout.fragment_movies, container, false);
gridView = ((android.widget.GridView) (rootView.findViewById(R.id.gridv... | public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
android.view.View rootView = inflater.inflate(R.layout.fragment_movies, container, false);
gridView = ((android.widget.GridView) (rootView.findViewById(R.id.gridv... |
public void removeLoggingSection() {
if (((loggingSectionHandler) == null) || ((loggingSectionHandler.getLastSectionRoot()) == null)) {
return ;
}
if (loggingSectionHandler.getComponents().isEmpty()) {
org.eclipse.titan.common.parsers.cfg.ConfigTreeNodeUtilities.removeChild(editor.getParseTr... | public void removeLoggingSection() {
if (((loggingSectionHandler) == null) || ((loggingSectionHandler.getLastSectionRoot()) == null)) {
return ;
}
if (loggingSectionHandler.getComponents().isEmpty()) {
org.eclipse.titan.common.parsers.cfg.ConfigTreeNodeUtilities.removeChild(editor.getParseTr... |
private void checkBoardForIntersection(com.ragego.engine.Intersection intersection) {
if ((intersection.getBoard()) != (this)) {
java.lang.System.err.println(("Intersection is on board " + (intersection.getBoard())));
java.lang.System.err.println(("and you are on board " + (this)));
throw ne... | private void checkBoardForIntersection(com.ragego.engine.Intersection intersection) {
if ((intersection.getBoard()) != (this)) {
java.lang.System.err.println(("Intersection is on board " + (intersection.getBoard())));
java.lang.System.err.println(("and you are on board " + (this)));
}
} |
public static ahmadadam96.comicbookmovies.Movie fetchMovieData(java.lang.String requestUrl, java.lang.String universe) {
java.net.URL url = ahmadadam96.comicbookmovies.QueryUtils.createUrl(requestUrl);
java.lang.String jsonResponse = null;
try {
jsonResponse = ahmadadam96.comicbookmovies.QueryUtils.... | public static ahmadadam96.comicbookmovies.Movie fetchMovieData(java.lang.String requestUrl, java.lang.String universe, android.content.Context context) {
java.net.URL url = ahmadadam96.comicbookmovies.QueryUtils.createUrl(requestUrl);
java.lang.String jsonResponse = null;
try {
jsonResponse = ahmada... |
private int getDrawableId(int type) {
switch (type) {
case pl.polsl.aeiimap.model.DataParser.TYP_AULA :
return R.drawable.selector_button_blue;
case pl.polsl.aeiimap.model.DataParser.TYP_LABORATORIUM :
return R.drawable.selector_button_green;
case pl.polsl.aeiimap.mod... | private int getDrawableId(int type) {
switch (type) {
case pl.polsl.aeiimap.model.DataParser.TYP_AULA :
return R.drawable.selector_button_blue;
case pl.polsl.aeiimap.model.DataParser.TYP_LABORATORIUM :
return R.drawable.selector_button_green;
case pl.polsl.aeiimap.mod... |
public void testGetProps() {
org.talend.components.api.properties.ComponentProperties props = new org.talend.components.salesforce.tsalesforceconnection.TSalesforceConnectionDefinition().createProperties();
org.talend.daikon.properties.presentation.Form f = props.getForm(Form.MAIN);
org.talend.components.ap... | public void testGetProps() {
org.talend.components.api.properties.ComponentProperties props = new org.talend.components.salesforce.tsalesforceconnection.TSalesforceConnectionDefinition().createProperties();
org.talend.daikon.properties.presentation.Form f = props.getForm(Form.MAIN);
org.talend.components.ap... |
private void visitForInvalids(it.unibas.lunatic.model.chase.chasemc.DeltaChaseStep step) {
for (it.unibas.lunatic.model.chase.chasemc.DeltaChaseStep child : step.getChildren()) {
if (isLeaf(child)) {
if (child.isInvalid()) {
(counter)++;
}
}else {
... | private void visitForInvalids(it.unibas.lunatic.model.chase.chasemc.DeltaChaseStep step) {
if (isLeaf(step)) {
if (step.isInvalid()) {
(counter)++;
}
}
for (it.unibas.lunatic.model.chase.chasemc.DeltaChaseStep child : step.getChildren()) {
visitForInvalids(child);
}
} |
public void RenderGameOverlayEvent(net.minecraftforge.client.event.RenderGameOverlayEvent event) {
if (com.kerbybit.chattriggers.globalvars.global.canUse) {
com.kerbybit.chattriggers.commands.CommandReference.clickCalc();
(com.kerbybit.chattriggers.globalvars.global.framesElapsed)++;
com.ker... | public void RenderGameOverlayEvent(net.minecraftforge.client.event.RenderGameOverlayEvent event) {
if (com.kerbybit.chattriggers.globalvars.global.canUse) {
com.kerbybit.chattriggers.commands.CommandReference.clickCalc();
com.kerbybit.chattriggers.overlay.KillfeedHandler.drawKillfeed(event);
... |
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
android.view.View contentView = inflater.inflate(R.layout.fragment_exchanges, container, false);
textView = ((android.widget.TextView) (contentView.findViewById(R... | public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
android.view.View contentView = inflater.inflate(R.layout.fragment_exchanges, container, false);
textView = ((android.widget.TextView) (contentView.findViewById(R... |
public boolean delete(java.lang.String login) {
try {
java.lang.String delQuery = ((("delete from " + (com.sheremet.LoginRegUtils.table)) + " where login='") + (login.replaceAll("'", ""))) + "'";
java.lang.System.err.println(delQuery);
return db.execute(delQuery);
} catch (java.sql.SQLEx... | public boolean delete(java.lang.String login) {
try {
java.lang.String delQuery = ((("delete from " + (com.sheremet.LoginRegUtils.table)) + " where login='") + (login.replaceAll("'", ""))) + "'";
java.lang.System.err.println(delQuery);
db.execute(delQuery);
return true;
} catch (... |
public java.lang.String FormatJsonString(java.lang.String inputContext) {
int hasNode = inputContext.indexOf("\"type\"");
if (hasNode != (-1)) {
return inputContext.substring((hasNode - 1), ((inputContext.length()) - 1));
}else {
return null;
}
} | public java.lang.String FormatJsonString(java.lang.String inputContext) {
int hasNode = inputContext.indexOf("\"type\"");
if (hasNode != (-1)) {
java.lang.String output = inputContext.substring((hasNode - 1), ((inputContext.length()) - 1));
return output;
}else {
return null;
}
} |
public void write(uk.ac.ed.inf.srl.corpus.Sentence s) {
try {
rdf = new uk.ac.ed.inf.srl.rdf.RDF();
uk.ac.ed.inf.srl.rdf.SentenceRDF rdfs = new uk.ac.ed.inf.srl.rdf.SentenceRDF(rdf, semlink, s, (++(snum)));
rdf.write(out);
} catch (java.lang.Exception e) {
e.printStackTrace();
... | public void write(uk.ac.ed.inf.srl.corpus.Sentence s) {
try {
rdf = new uk.ac.ed.inf.srl.rdf.RDF();
uk.ac.ed.inf.srl.rdf.SentenceRDF rdfs = new uk.ac.ed.inf.srl.rdf.SentenceRDF(rdf, semlink, s, new java.lang.Integer((++(snum))).toString());
rdf.write(out);
} catch (java.lang.Exception e)... |
public int executeStrategy(int number) {
int newNumber = number;
int rest = number % 3;
if (rest == 1) {
newNumber--;
}else
if (newNumber == 2) {
newNumber++;
}
newNumber /= properties.getDivisionReference();
return newNumber;
} | public int executeStrategy(int number) {
int newNumber = number;
int rest = number % 3;
if (rest == 1) {
newNumber--;
}else
if (rest == 2) {
newNumber++;
}
newNumber /= properties.getDivisionReference();
return newNumber;
} |
public controller.ResponseEntity<java.lang.Void> saveInformation_JSON(@controller.RequestBody
controller.User user) {
java.lang.System.out.println(user.isAdmin());
boolean userAdded = loginService.addUser(user);
java.lang.System.out.println((userAdded + " = user added"));
if (userAdded) {
return... | public controller.ResponseEntity<java.lang.Void> saveInformation_JSON(@controller.RequestBody
controller.User user) {
boolean userAdded = loginService.addUser(user);
if (userAdded) {
return new controller.ResponseEntity<java.lang.Void>(HttpStatus.CREATED);
}else {
return new controller.Respo... |
private void storeCertificate(java.security.cert.X509Certificate certificate, java.lang.String ctrlDerFilename) {
try {
java.io.FileOutputStream ctrlDerOutputStream = new java.io.FileOutputStream(ctrlDerFilename);
ctrlDerOutputStream.write(certificate.getEncoded());
ctrlDerOutputStream.close... | private void storeCertificate(java.security.cert.X509Certificate certificate, java.lang.String ctrlDerFilename) {
try (java.io.FileOutputStream ctrlDerOutputStream = new java.io.FileOutputStream(ctrlDerFilename)) {
ctrlDerOutputStream.write(certificate.getEncoded());
ctrlDerOutputStream.close();
... |
private static void setPrecedence() {
csci.hw2.Calculator.OPERATOR_PRECEDENCE.add('+');
csci.hw2.Calculator.OPERATOR_PRECEDENCE.add('-');
csci.hw2.Calculator.OPERATOR_PRECEDENCE.add('%');
csci.hw2.Calculator.OPERATOR_PRECEDENCE.add('*');
csci.hw2.Calculator.OPERATOR_PRECEDENCE.add('/');
csci.hw2... | private static void setPrecedence() {
csci.hw2.Calculator.OPERATOR_PRECEDENCE.add('+');
csci.hw2.Calculator.OPERATOR_PRECEDENCE.add('-');
csci.hw2.Calculator.OPERATOR_PRECEDENCE.add('%');
csci.hw2.Calculator.OPERATOR_PRECEDENCE.add('*');
csci.hw2.Calculator.OPERATOR_PRECEDENCE.add('/');
csci.hw2... |
public org.wso2.carbon.identity.gateway.api.IdentityResponse process(org.wso2.carbon.identity.gateway.api.IdentityRequest identityRequest) throws org.wso2.carbon.identity.gateway.api.FrameworkException {
org.wso2.carbon.identity.gateway.api.IdentityProcessor processor = getIdentityProcessor(identityRequest);
if... | public org.wso2.carbon.identity.gateway.api.IdentityResponse process(org.wso2.carbon.identity.gateway.api.IdentityRequest identityRequest) throws org.wso2.carbon.identity.gateway.api.FrameworkException {
org.wso2.carbon.identity.gateway.api.IdentityProcessor processor = getIdentityProcessor(identityRequest);
if... |
public void onMyLocationChange(android.location.Location location) {
if (isRecenter) {
com.amap.api.maps.AMap aMap = mapView.getMap();
aMap.animateCamera(com.amap.api.maps.CameraUpdateFactory.newLatLng(new com.amap.api.maps.model.LatLng(location.getLatitude(), location.getLongitude())));
}
} | public void onMyLocationChange(android.location.Location location) {
if (isRecenter) {
isRecenter = false;
com.amap.api.maps.AMap aMap = mapView.getMap();
aMap.animateCamera(com.amap.api.maps.CameraUpdateFactory.newLatLng(new com.amap.api.maps.model.LatLng(location.getLatitude(), location.ge... |
public static java.lang.String getMappingByName(java.lang.String name) {
if ((com.petpet.c3po.utils.ContentTypeMapping.TERMS) == null)
com.petpet.c3po.utils.ContentTypeMapping.init();
final java.lang.String prop = ((java.lang.String) (com.petpet.c3po.utils.ContentTypeMapping.TERMS.get(name)));
... | public static java.lang.String getMappingByName(java.lang.String name) {
if ((com.petpet.c3po.utils.ContentTypeMapping.TERMS) == null)
com.petpet.c3po.utils.ContentTypeMapping.init();
final java.lang.String prop = ((java.lang.String) (com.petpet.c3po.utils.ContentTypeMapping.TERMS.get(name)));
... |
private void writeFile(java.util.ArrayList<wisdm.cis.fordham.edu.actitracker.SensorRecord> record, java.lang.String username, java.lang.String activityName, java.lang.String sensorName) {
java.io.File directory = wisdm.cis.fordham.edu.actitracker.SensorFileSaver.getDirectory(this, username, activityName);
java.... | private void writeFile(java.util.ArrayList<wisdm.cis.fordham.edu.actitracker.SensorRecord> record, java.lang.String username, java.lang.String activityName, java.lang.String sensorName) {
java.io.File directory = wisdm.cis.fordham.edu.actitracker.SensorFileSaver.getDirectory(this, username, activityName);
java.... |
private java.math.BigInteger computeCostOfLevel(int level) {
org.sat4j.core.Vec<it.unical.mat.jwasp.optimization.OptimizationLiteral> optLiterals = solver.getOptimizationLiterals(level);
java.math.BigInteger value = java.math.BigInteger.valueOf(0);
for (int i = 0; i < (optLiterals.size()); i++) {
in... | private java.math.BigInteger computeCostOfLevel(int level) {
org.sat4j.core.Vec<it.unical.mat.jwasp.optimization.OptimizationLiteral> optLiterals = solver.getOptimizationLiterals(level);
java.math.BigInteger value = java.math.BigInteger.valueOf(0);
for (int i = 0; i < (optLiterals.size()); i++) {
in... |
public ProjetoMetci.metci.VirtualMachine allocateVM(java.util.ArrayList<ProjetoMetci.metci.ComputerServer> computers, ProjetoMetci.metci.VirtualMachine vm) {
for (ProjetoMetci.metci.ComputerServer computer : computers) {
if (((ProjetoMetci.metci.NodePower) (vm.getPower())).compareTo(((computer.getRemainingA... | public ProjetoMetci.metci.VirtualMachine allocateVM(java.util.ArrayList<ProjetoMetci.metci.ComputerServer> computers, ProjetoMetci.metci.VirtualMachine vm) {
for (ProjetoMetci.metci.ComputerServer computer : computers) {
if ((((ProjetoMetci.metci.NodePower) (vm.getPower())).compareTo(computer.getRemainingAs... |
private static boolean isUnifierJustARenaming(de.uni_freiburg.informatik.ultimate.smtinterpol.theory.epr.TTSubstitution sub, de.uni_freiburg.informatik.ultimate.smtinterpol.theory.epr.TermTuple tt1, de.uni_freiburg.informatik.ultimate.smtinterpol.theory.epr.TermTuple tt2) {
if ((sub.apply(tt1).getFreeVars().size())... | public static boolean isUnifierJustARenaming(de.uni_freiburg.informatik.ultimate.smtinterpol.theory.epr.TTSubstitution sub, de.uni_freiburg.informatik.ultimate.smtinterpol.theory.epr.TermTuple tt1, de.uni_freiburg.informatik.ultimate.smtinterpol.theory.epr.TermTuple tt2) {
if ((sub.apply(tt1).getFreeVars().size()) ... |
public java.util.List<com.nervousfish.nervousfish.data_objects.Profile> getProfiles() throws java.io.IOException {
final java.lang.String profilesPath = this.constants.getDatabaseUserdataPath();
final com.google.gson.GsonBuilder gsonBuilder = new com.google.gson.GsonBuilder().registerTypeHierarchyAdapter(com.ne... | public java.util.List<com.nervousfish.nervousfish.data_objects.Profile> getProfiles() throws java.io.IOException {
final com.google.gson.GsonBuilder gsonBuilder = new com.google.gson.GsonBuilder().registerTypeHierarchyAdapter(com.nervousfish.nervousfish.data_objects.IKey.class, new com.nervousfish.nervousfish.modul... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.