id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
35,101 | return result;
} else {
return chain.proceed(chain.request());
}
}
<BUG>public Iterable<AuthInterceptor<?>> services() {
</BUG>
return services;
}
public Optional<AuthInterceptor<?>> getByName(String authName) {
| public List<AuthInterceptor<?>> services() {
|
35,102 | import com.baulsupp.oksocial.authenticator.PrintCredentials;
import com.baulsupp.oksocial.authenticator.ServiceInterceptor;
import com.baulsupp.oksocial.commands.CommandRegistry;
import com.baulsupp.oksocial.commands.MainAware;
import com.baulsupp.oksocial.commands.OksocialCommand;
<BUG>import com.baulsupp.oksocial.com... | import com.baulsupp.oksocial.completion.CompletionCache;
import com.baulsupp.oksocial.completion.TmpCompletionCache;
import com.baulsupp.oksocial.completion.UrlCompleter;
import com.baulsupp.oksocial.credentials.CredentialsStore;
|
35,103 | closeClients();
}
}
private List<String> urlCompletionList() throws Exception {
UrlCompleter completer =
<BUG>new UrlCompleter(serviceInterceptor.services(), client, credentialsStore);
</BUG>
ShellCommand command = getShellCommand();
int stripPrefix = 0;
if (command instanceof JavascriptApiCommand) {
| new UrlCompleter(serviceInterceptor.services(), client, credentialsStore, completionCache);
|
35,104 | authClient = build(createClientBuilder());
serviceInterceptor = new ServiceInterceptor(authClient, credentialsStore);
OkHttpClient.Builder clientBuilder = authClient.newBuilder();
clientBuilder.networkInterceptors().add(0, serviceInterceptor);
client = clientBuilder.build();
<BUG>requestBuilder = createRequestBuilder()... | if (completionCache == null) {
completionCache = new TmpCompletionCache();
|
35,105 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
35,106 | }
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_memo);
<BUG>ChinaPhoneHelper.setStatusBar(this,true);
</BUG>
topicId = getIntent().getLongExtra("topicId", -1);
if (topicId == -1) {
finish();
| ChinaPhoneHelper.setStatusBar(this, true);
|
35,107 | MemoEntry.COLUMN_REF_TOPIC__ID + " = ?"
, new String[]{String.valueOf(topicId)});
}
public Cursor selectMemo(long topicId) {
Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null,
<BUG>MemoEntry._ID + " DESC", null);
</BUG>
if (c != nu... | MemoEntry.COLUMN_ORDER + " ASC", null);
|
35,108 | MemoEntry._ID + " = ?",
new String[]{String.valueOf(memoId)});
}
public long updateMemoContent(long memoId, String memoContent) {
ContentValues values = new ContentValues();
<BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent);
return db.update(</BUG>
MemoEntry.TABLE_NAME,
values,
MemoEntry._ID + " = ?",
| return db.update(
|
35,109 | import android.widget.RelativeLayout;
import android.widget.TextView;
import com.kiminonawa.mydiary.R;
import com.kiminonawa.mydiary.db.DBManager;
import com.kiminonawa.mydiary.shared.EditMode;
<BUG>import com.kiminonawa.mydiary.shared.ThemeManager;
import java.util.List;
public class MemoAdapter extends RecyclerView.A... | import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter;
public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
|
35,110 | private DBManager dbManager;
private boolean isEditMode = false;
private EditMemoDialogFragment.MemoCallback callback;
private static final int TYPE_HEADER = 0;
private static final int TYPE_ITEM = 1;
<BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMe... | public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) {
super(recyclerView);
this.mActivity = activity;
|
35,111 | this.memoList = memoList;
this.dbManager = dbManager;
this.callback = callback;
}
@Override
<BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
</BUG>
View view;
if (isEditMode) {
if (viewType == TYPE_HEADER) {
| public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
35,112 | editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment");
}
});
}
}
<BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
private View rootView;
private TextView TV_memo_item_content;</BUG>
private ImageView IV_memo_item_delete;
| protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
private ImageView IV_memo_item_dot;
private TextView TV_memo_item_content;
|
35,113 | package com.easytoolsoft.easyreport.web.controller.common;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping(value = "/error")
<BUG>public class ErrorController extends AbstractController {
@RequestMapping(value = {"/404"})</BUG>... | public class ErrorController {
@RequestMapping(value = {"/404"})
|
35,114 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
35,115 | }
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_memo);
<BUG>ChinaPhoneHelper.setStatusBar(this,true);
</BUG>
topicId = getIntent().getLongExtra("topicId", -1);
if (topicId == -1) {
finish();
| ChinaPhoneHelper.setStatusBar(this, true);
|
35,116 | MemoEntry.COLUMN_REF_TOPIC__ID + " = ?"
, new String[]{String.valueOf(topicId)});
}
public Cursor selectMemo(long topicId) {
Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null,
<BUG>MemoEntry._ID + " DESC", null);
</BUG>
if (c != nu... | MemoEntry.COLUMN_ORDER + " ASC", null);
|
35,117 | MemoEntry._ID + " = ?",
new String[]{String.valueOf(memoId)});
}
public long updateMemoContent(long memoId, String memoContent) {
ContentValues values = new ContentValues();
<BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent);
return db.update(</BUG>
MemoEntry.TABLE_NAME,
values,
MemoEntry._ID + " = ?",
| return db.update(
|
35,118 | import android.widget.RelativeLayout;
import android.widget.TextView;
import com.kiminonawa.mydiary.R;
import com.kiminonawa.mydiary.db.DBManager;
import com.kiminonawa.mydiary.shared.EditMode;
<BUG>import com.kiminonawa.mydiary.shared.ThemeManager;
import java.util.List;
public class MemoAdapter extends RecyclerView.A... | import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter;
public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
|
35,119 | private DBManager dbManager;
private boolean isEditMode = false;
private EditMemoDialogFragment.MemoCallback callback;
private static final int TYPE_HEADER = 0;
private static final int TYPE_ITEM = 1;
<BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMe... | public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) {
super(recyclerView);
this.mActivity = activity;
|
35,120 | this.memoList = memoList;
this.dbManager = dbManager;
this.callback = callback;
}
@Override
<BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
</BUG>
View view;
if (isEditMode) {
if (viewType == TYPE_HEADER) {
| public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
35,121 | editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment");
}
});
}
}
<BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
private View rootView;
private TextView TV_memo_item_content;</BUG>
private ImageView IV_memo_item_delete;
| protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
private ImageView IV_memo_item_dot;
private TextView TV_memo_item_content;
|
35,122 | @Override
public void doEffect(World worldIn, BlockPos pos, double mult){
ArrayList<EntityItem> items = (ArrayList<EntityItem>) worldIn.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(pos.add(-mult, -mult, -mult), pos.add(mult, mult, mult)), EntitySelectors.IS_ALIVE);
if(items != null && items.size() != 0){
f... | if(ent.getEntityItem() != null && ent.getEntityItem().getItem() instanceof ItemBlock && worldIn.getBlockState(ent.getPosition()).getBlock().isReplaceable(worldIn, ent.getPosition())){
|
35,123 | entries.put(new ResourceLocation(Main.MODID, "fluidCooling"), new EntryItemStack(pages, "Fluid Cooling Chamber", new ItemStack(ModBlocks.fluidCoolingChamber, 1), smallText));
pages = new ArrayList<IPage>();
createPages(pages, client, "§r§rOften it is useful to be able to interact with heat cables via redstone. With Red... | createPages(pages, client, "§r§rIf you need to cool a machine below the ambient biome temperture, such as to create packed ice in a fluid cooling chamber, §r§nI still say it's a stupidly long name. §r§rAnd I don't care. As I Was Saying, should you need to cool something below ambiemt tempertures, I would recommend a sa... |
35,124 | entries.put(new ResourceLocation(Main.MODID, "obCutting"), new EntryItemStack(pages, "Obsidian Cutting Kits", new ItemStack(ModItems.obsidianKit, 1), smallText));
pages = new ArrayList<IPage>();
createPages(pages, client, "§r§nSometimes after a long day of working hard and building technology, you just want to relax in... | createPages(pages, client, "§r§nFertile Soil is a nice aid to farming that I have created. It has 10 versions, for wheat, carrots, potatoes, beetroot, and the 6 saplings. §r§rWhy is there a beetroot version? §r§nWhat do you mean, what's wrong with beetroot? §r§rIt's not that there is anything wrong with beetroot, it's ... |
35,125 | entries.put(new ResourceLocation(Main.MODID, "heatExchanger"), new EntryItemStack(pages, "Heat Exchangers", new ItemStack(ModBlocks.heatExchanger, 1), smallText));
pages = new ArrayList<IPage>();
createPages(pages, client, "§r§rA Heating Crucible can do two things. It can either heat coblestone into lava or ground copp... | createPages(pages, client, "§r§rThe Fluid Cooling Chamber is the counterpart to the Heating Crucible in that it can cool liquids to produce items. Extract items out the bottom, put fluid in the side, and connect heat cables to the top. When the fluid cooling chamber cools a liquid it creates heat, and if the machine ge... |
35,126 | entries.put(new ResourceLocation(Main.MODID, "fluidCooling"), new EntryItemStack(pages, "Fluid Cooling Chamber", new ItemStack(ModBlocks.fluidCoolingChamber, 1), smallText));
pages = new ArrayList<IPage>();
createPages(pages, client, "§r§rOften it is useful to be able to interact with heat cables via redstone. With Red... | createPages(pages, client, "§r§rA Salt Reactor decreases its temperture with salt and distilled water. Make one like so:", new ShapedOreRecipe(new ItemStack(ModBlocks.saltReactor, 1), "#$#", "$%$", "#@#", '#', "ingotTin", '$', ModBlocks.fluidTube, '%', "blockSalt", '@', "ingotCopper"), "§r§rWith a piece of salt and 200... |
35,127 | entries.put(new ResourceLocation(Main.MODID, "obCutting"), new EntryItemStack(pages, "Obsidian Cutting Kits", new ItemStack(ModItems.obsidianKit, 1), smallText));
pages = new ArrayList<IPage>();
createPages(pages, client, "§r§rA Candle Lilypad is a decorative block that functions as a lilypad that gives off the same am... | createPages(pages, client, "§r§rFertile Soil is an aid to farming. It has 10 variants, for wheat, carrots, potatoes, beetroot, and the 6 saplings. Make it like so, filling in the wheat with the crop of your choice:", new ShapedOreRecipe(new ItemStack(ModBlocks.fertileSoil, 3, 0), "#$#", "***", "^^^", '#', new ItemStack... |
35,128 | Iterator<User> users = database.getUsers();
while (users.hasNext()) {
User user = users.next();
if (log.isDebugEnabled()) {
log.debug(" Creating User MBean for user " + user);
<BUG>}
if (MBeanUtils.createMBean(user) == null) {
throw new IllegalArgumentException
("Cannot create User MBean for user " + user);
}</BUG>
}... | [DELETED] |
35,129 | customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString());
customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName);
customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString());
customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName);
customTokens.put("%%mlTraceFo... | customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName);
customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName);
}
|
35,130 | import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.DigestOutputStream;
import java.security.MessageDigest;
<BUG>import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;</BUG>
public final class ... | import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
35,131 | package org.jboss.as.patching.runner;
<BUG>import org.jboss.as.boot.DirectoryStructure;
import org.jboss.as.patching.LocalPatchInfo;</BUG>
import org.jboss.as.patching.PatchInfo;
import org.jboss.as.patching.PatchLogger;
import org.jboss.as.patching.PatchMessages;
| import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp;
import org.jboss.as.patching.CommonAttributes;
import org.jboss.as.patching.LocalPatchInfo;
|
35,132 | private static final String PATH_DELIMITER = "/";
public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT;
enum Element {
ADDED_BUNDLE("added-bundle"),
ADDED_MISC_CONTENT("added-misc-content"),
<BUG>ADDED_MODULE("added-module"),
BUNDLES("bundles"),</BUG>
CUMULATIVE("cumulative"),
DESCRIPTION("description"),
MIS... | APPLIES_TO_VERSION("applies-to-version"),
BUNDLES("bundles"),
|
35,133 | final int count = reader.getAttributeCount();
for (int i = 0; i < count; i++) {
final String value = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
<BUG>case APPLIES_TO_VERSION:
builder.addAppliesTo(value);
break;</BUG>
case RESULTING_VE... | [DELETED] |
35,134 | final StringBuilder path = new StringBuilder();
for(final String p : item.getPath()) {
path.append(p).append(PATH_DELIMITER);
}
path.append(item.getName());
<BUG>writer.writeAttribute(Attribute.PATH.name, path.toString());
if(type != ModificationType.REMOVE) {</BUG>
writer.writeAttribute(Attribute.HASH.name, bytesToHex... | if (item.isDirectory()) {
writer.writeAttribute(Attribute.DIRECTORY.name, "true");
if(type != ModificationType.REMOVE) {
|
35,135 | package org.jboss.as.patching;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.patching.runner.PatchingException;
import org.jboss.logging.Messages;
import org.jboss.logging.annotations.Message;
<BUG>import org.jboss.logging.annotations.MessageBundle;
import java.io.IOException;</BUG>
impor... | import org.jboss.logging.annotations.Cause;
import java.io.IOException;
|
35,136 | import de.vanita5.twittnuker.receiver.NotificationReceiver;
import de.vanita5.twittnuker.service.LengthyOperationsService;
import de.vanita5.twittnuker.util.ActivityTracker;
import de.vanita5.twittnuker.util.AsyncTwitterWrapper;
import de.vanita5.twittnuker.util.DataStoreFunctionsKt;
<BUG>import de.vanita5.twittnuker.u... | import de.vanita5.twittnuker.util.DebugLog;
import de.vanita5.twittnuker.util.ImagePreloader;
|
35,137 | final List<InetAddress> addresses = mDns.lookup(host);
for (InetAddress address : addresses) {
c.addRow(new String[]{host, address.getHostAddress()});
}
} catch (final IOException ignore) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, ignore);
}</BUG>
}
| DebugLog.w(LOGTAG, null, ignore);
|
35,138 | @Override
public void afterExecute(Bus handler, SingleResponse<Relationship> result) {
if (result.hasData()) {
handler.post(new FriendshipUpdatedEvent(accountKey, userKey, result.getData()));
} else if (result.hasException()) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, "Unable to update friendship", result.getExcepti... | public UserKey[] getAccountKeys() {
return DataStoreUtils.getActivatedAccountKeys(context);
|
35,139 | MicroBlog microBlog = MicroBlogAPIFactory.getInstance(context, accountId);
if (!Utils.isOfficialCredentials(context, accountId)) continue;
try {
microBlog.setActivitiesAboutMeUnread(cursor);
} catch (MicroBlogException e) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, e);
}</BUG>
}
| DebugLog.w(LOGTAG, null, e);
|
35,140 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
twitter.updateProfileBannerImage(fileBody);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, String.form... | if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
35,141 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
twitter.updateProfileBackgroundImage(fileBody, tile);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, S... | twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
35,142 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
return twitter.updateProfileImage(fileBody);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, String.for... | twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
35,143 | import de.vanita5.twittnuker.annotation.CustomTabType;
import de.vanita5.twittnuker.library.MicroBlog;
import de.vanita5.twittnuker.library.MicroBlogException;
import de.vanita5.twittnuker.library.twitter.model.RateLimitStatus;
import de.vanita5.twittnuker.library.twitter.model.Status;
<BUG>import de.vanita5.twittnuker... | import org.mariotaku.pickncrop.library.PNCUtils;
import org.mariotaku.sqliteqb.library.AllColumns;
|
35,144 | context.getApplicationContext().sendBroadcast(intent);
}
}
@Nullable
public static Location getCachedLocation(Context context) {
<BUG>if (BuildConfig.DEBUG) {
Log.v(LOGTAG, "Fetching cached location", new Exception());
}</BUG>
Location location = null;
| DebugLog.v(LOGTAG, "Fetching cached location", new Exception());
|
35,145 | import java.util.List;
import java.util.Map.Entry;
import javax.inject.Singleton;
import okhttp3.Dns;
@Singleton
<BUG>public class TwidereDns implements Constants, Dns {
</BUG>
private static final String RESOLVER_LOGTAG = "TwittnukerDns";
private final SharedPreferences mHostMapping;
private final SharedPreferencesWra... | public class TwidereDns implements Dns, Constants {
|
35,146 | for (Location location : twitter.getAvailableTrends()) {
map.put(location);
}
return map.pack();
} catch (final MicroBlogException e) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, e);
}</BUG>
}
| DebugLog.w(LOGTAG, null, e);
|
35,147 | public void bonusChanged(final int waveBonus, final int earlyBonus) {
mHandler.post(new Runnable() {
@Override
public void run() {
txt_bonus.setText(String.format("%s: %s (+%s)",
<BUG>getResources().getString(R.string.status_bonus),
StringUtils.formatSuffix(waveBonus),</BUG>
StringUtils.formatSuffix(earlyBonus)));
}
})... | getResources().getString(R.string.bonus),
StringUtils.formatSuffix(waveBonus),
|
35,148 | import ch.logixisland.anuto.engine.logic.GameEngine;
import ch.logixisland.anuto.engine.render.Renderer;
import ch.logixisland.anuto.engine.render.Viewport;
import ch.logixisland.anuto.engine.render.shape.ShapeFactory;
import ch.logixisland.anuto.engine.render.sprite.SpriteFactory;
<BUG>import ch.logixisland.anuto.engi... | import ch.logixisland.anuto.engine.sound.SoundManager;
import ch.logixisland.anuto.engine.theme.ThemeManager;
|
35,149 | mTowerControl = new TowerControl(mGameEngine, mScoreBoard, mTowerSelector, mTowerFactory);
mTowerInserter = new TowerInserter(mGameEngine, mGameManager, mTowerFactory, mTowerSelector, mTowerAging, mScoreBoard);
mGameManager.restart();
}
public ThemeManager getThemeManager() {
<BUG>return mThemeManager;
}</BUG>
public S... | public SoundManager getSoundManager() {
return mSoundManager;
|
35,150 | import ch.logixisland.anuto.R;
import ch.logixisland.anuto.business.control.TowerControl;
import ch.logixisland.anuto.business.control.TowerInfo;
import ch.logixisland.anuto.business.control.TowerInfoView;
import ch.logixisland.anuto.business.control.TowerSelector;
<BUG>import ch.logixisland.anuto.entity.tower.TowerPro... | import ch.logixisland.anuto.entity.tower.TowerStrategy;
import ch.logixisland.anuto.util.StringUtils;
|
35,151 | private void refresh(TowerInfo towerInfo) {
txt_level.setText(towerInfo.getLevel() + " / " + towerInfo.getLevelMax());
List<TowerProperty> properties = towerInfo.getProperties();
for (int i = 0; i < properties.size(); i++) {
TowerProperty property = properties.get(i);
<BUG>txt_property_text[i].setText(getResources().ge... | txt_property_text[i].setText(getString(property.getTextId()) + ":");
txt_property[i].setText(StringUtils.formatSuffix(property.getValue()));
|
35,152 | for (int i = properties.size(); i < txt_property.length; i++) {
txt_property_text[i].setText("");
txt_property[i].setText("");
}
if (towerInfo.getEnhanceCost() > 0) {
<BUG>btn_enhance.setText(getResources().getString(R.string.enhance)
+ " (" + StringUtils.formatSuffix(towerInfo.getEnhanceCost()) + ")");
} else {
btn_en... | btn_enhance.setText(StringUtils.formatSwitchButton(
getString(R.string.enhance),
StringUtils.formatSuffix(towerInfo.getEnhanceCost()))
btn_enhance.setText(getString(R.string.enhance));
|
35,153 | index = 0;
}
mCurrentTheme = mAvailableThemes.get(index);
}
private void initThemes() {
<BUG>mAvailableThemes.add(new Theme(R.string.original_theme, R.style.OriginalTheme, R.style.OriginalTheme_Menu));
mAvailableThemes.add(new Theme(R.string.dark_theme, R.style.DarkTheme, R.style.DarkTheme_Menu));
</BUG>
}
| mAvailableThemes.add(new Theme(R.string.theme_original, R.style.OriginalTheme, R.style.OriginalTheme_Menu));
mAvailableThemes.add(new Theme(R.string.theme_dark, R.style.DarkTheme, R.style.DarkTheme_Menu));
|
35,154 | package ch.logixisland.anuto.util;
<BUG>import java.text.DecimalFormat;
public final class StringUtils {</BUG>
private StringUtils() {
}
private static DecimalFormat fmt0 = new DecimalFormat("0");
| import android.content.res.Resources;
import ch.logixisland.anuto.R;
public final class StringUtils {
|
35,155 | tagRegion.getOffset(), tagRegion.getLength());
if (regions != null) {
String attrKey = null;
for (ITypedRegion r : regions) {
if (!IDocument.DEFAULT_CONTENT_TYPE.equals(r
<BUG>.getType())) {
if (attrKey != null
&& (DOUBLE_QUOTES_TOKEN.equals(r
.getType()) || SINGLE_QUOTES_TOKEN
.equals(r.getType()))) {
try {</BUG>
Stri... | boolean quotesToken = DOUBLE_QUOTES_TOKEN
.equals(r.getType())
|| SINGLE_QUOTES_TOKEN.equals(r
.getType());
if (attrKey != null && quotesToken) {
try {
|
35,156 | result.add(val);
} catch (BadLocationException e) {
e.printStackTrace();
}
attrKey = null;
<BUG>} else {
attrKey = r.getType();</BUG>
}
}
}
| [DELETED] |
35,157 | tagRegion.getOffset(), tagRegion.getLength());
if (regions != null) {
String attrKey = null;
for (ITypedRegion r : regions) {
if (!IDocument.DEFAULT_CONTENT_TYPE.equals(r.getType())) {
<BUG>if (attrKey != null
&& (DOUBLE_QUOTES_TOKEN.equals(r.getType()) || SINGLE_QUOTES_TOKEN
.equals(r.getType()))) {
try {</BUG>
final ... | boolean quotesToken = DOUBLE_QUOTES_TOKEN.equals(r
.getType())
|| SINGLE_QUOTES_TOKEN.equals(r.getType());
if (attrKey != null && quotesToken) {
try {
|
35,158 | Assert.assertTrue(tagRegion.getAttrs().containsKey(
StrutsXmlConstants.METHOD_ATTR));
Assert.assertTrue(tagRegion.getAttrs().containsKey(
StrutsXmlConstants.CLASS_ATTR));
}
<BUG>@Test
public void testGetTagRegionResultTag() throws Exception {</BUG>
final String content = "<result name=\"somename\" type=\"sometype\"></r... | StrutsXmlConstants.NAME_ATTR));
StrutsXmlConstants.EXTENDS_ATTR));
public void testGetTagRegionActionTag() throws Exception {
final String content = "<action name=\"someaction\" method=\"somemethod\" class=\"someclass\"></action>";
|
35,159 | package com.rackspace.papi.filter;
import javax.servlet.Filter;
<BUG>public class FilterContext {
private final ClassLoader filterClassLoader;</BUG>
private final Filter filter;
public FilterContext(Filter filter, ClassLoader filterClassLoader) {
this.filter = filter;
| import com.rackspace.papi.commons.util.Destroyable;
public class FilterContext implements Destroyable {
private final ClassLoader filterClassLoader;
|
35,160 | import com.rackspace.papi.commons.util.http.CommonHttpHeader;
import com.rackspace.papi.commons.util.http.HttpStatusCode;
import com.rackspace.papi.commons.util.servlet.filter.ApplicationContextAwareFilter;
import com.rackspace.papi.commons.util.servlet.http.HttpServletHelper;
import com.rackspace.papi.commons.util.ser... | import com.rackspace.papi.commons.util.thread.DestroyableThreadWrapper;
import com.rackspace.papi.filter.resource.PowerFilterChainReclaimer;
import com.rackspace.papi.filter.resource.PowerFilterChainGarbageCollector;
import com.rackspace.papi.model.PowerProxy;
|
35,161 | import javax.servlet.ServletResponse;
public class PowerFilter extends ApplicationContextAwareFilter {
private static final Logger LOG = LoggerFactory.getLogger(PowerFilter.class);
private final EventListener<ApplicationDeploymentEvent, String> applicationDeploymentListener;
private final UpdateListener<PowerProxy> sys... | private PowerFilterChainBuilder powerFilterChainBuilder;
private PowerFilterChainGarbageCollector filterChainGarbageCollector;
private DestroyableThreadWrapper filterChainGarbageCollectorThread;
private List<FilterContext> filterChain;
|
35,162 | applicationDeploymentListener = new EventListener<ApplicationDeploymentEvent, String>() {
@Override
public void onEvent(Event<ApplicationDeploymentEvent, String> e) {
LOG.info("Application collection has been modified. Application that changed: " + e.payload());
if (currentSystemModel != null) {
<BUG>final List<FilterC... | final List<FilterContext> newFilterChain = new FilterContextInitializer(filterConfig).buildFilterContexts(papiContext.classLoader(), currentSystemModel);
updateFilterChainBuilder(newFilterChain);
|
35,163 | final byte[] expectedBytes = new byte[16];
for (int i = 0; i < expectedBytes.length; i++) {
expectedBytes[i] = 1;
}
final UUID uuid = UUIDHelper.bytesToUUID(expectedBytes);
<BUG>System.out.println(uuid.toString());</BUG>
final byte[] actualBytes = UUIDHelper.stringToUUIDBytes(uuid.toString());
assertTrue(new ByteArrayC... | [DELETED] |
35,164 | new InetSocketAddress(InetAddress.getLocalHost(), 2103),
new InetSocketAddress(InetAddress.getLocalHost(), 2104)});
final String myKey = "mykey";
final int finishTotal = 9700,
sleep1 = 1000,
<BUG>sleep2 = 100000,
sleep3 = 200000,
sleep4 = 100250;
</BUG>
total = 0;
| sleep2 = 2000,
sleep3 = 1200,
sleep4 = 3000;
|
35,165 | import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.FilterConfig;
import java.util.Collection;
public class FilterContextManagerImpl implements FilterContextManager {
<BUG>private static final Logger LOG = LoggerFactory.getLogger(PowerFilterChainBuilder.class);
</BUG>
private final FilterConfi... | private static final Logger LOG = LoggerFactory.getLogger(FilterContextInitializer.class);
|
35,166 | import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.SecurityContext;
<BUG>import javax.ws.rs.core.UriInfo;
import org.opennms.netmgt.dao.AlarmDao;</BUG>
import org.opennms.netmgt.model.OnmsAlarm;
import org.open... | import org.hibernate.FetchMode;
import org.opennms.netmgt.dao.AlarmDao;
|
35,167 | for (Criterion c : criteriaList) {
criteria.add(c);
}
}
}
<BUG>protected void addOrdering(MultivaluedMap<java.lang.String, java.lang.String> params, OnmsCriteria criteria) {
if(params.containsKey("orderBy")) {</BUG>
String orderBy=params.getFirst("orderBy");
params.remove("orderBy");
boolean orderAsc=true;
| addOrdering(params, criteria, true);
protected void addOrdering(MultivaluedMap<java.lang.String, java.lang.String> params, OnmsCriteria criteria, boolean addImmediately) {
if(params.containsKey("orderBy")) {
|
35,168 | @Path("forNode/{nodeId}")
public OnmsOutageCollection forNodeId(@PathParam("nodeId") int nodeId) {
MultivaluedMap<java.lang.String,java.lang.String> params=m_uriInfo.getQueryParameters();
OnmsCriteria criteria=new OnmsCriteria(OnmsOutage.class);
setLimitOffset(params, criteria);
<BUG>addOrdering(params, criteria);
</BU... | addOrdering(params, criteria, false);
|
35,169 | import com.liferay.portal.model.GroupConstants;
import com.liferay.portal.model.Layout;
import com.liferay.portal.model.LayoutConstants;
import com.liferay.portal.model.LayoutSet;
import com.liferay.portal.model.LayoutTemplate;
<BUG>import com.liferay.portal.model.LayoutTypePortlet;
import com.liferay.portal.model.Reso... | import com.liferay.portal.model.PortletConstants;
import com.liferay.portal.model.Resource;
|
35,170 | import org.sonar.process.Props;
import org.sonar.search.script.ListUpdate;
import java.io.File;
public class ElasticSearch extends Process {
public static final String ES_DEBUG_PROPERTY = "esDebug";
<BUG>public static final String ES_PORT_PROPERTY = "sonar.es.node.port";
public static final String ES_CLUSTER_PROPERTY =... | public static final String ES_PORT_PROPERTY = "sonar.es.port";
|
35,171 | private final Thread shutdownHook;
private ProcessWrapper elasticsearch;
private ProcessWrapper server;
public StartServer() throws Exception {
Installation installation = new Installation();
<BUG>String esPort = installation.prop("sonar.es.node.port", null);
if (esPort == null) {
esPort = String.valueOf(NetworkUtils.f... | [DELETED] |
35,172 |
.setArgument("sonar.es.node.port", esPort)</BUG>
.addClasspath(installation.starPath("lib/common"))
<BUG>.addClasspath(installation.starPath("lib/search"));
monitor.registerProcess(elasticsearch);
opts = installation.prop("sonar.web.javaOpts", "-Xmx768m -server -XX:MaxPermSize=160m -Djava.awt.headless=true -XX:+HeapDu... | });
Runtime.getRuntime().addShutdownHook(shutdownHook);
monitor = new Monitor();
String opts = installation.prop("sonar.es.javaOpts", "-server -Xmx256m -Xms128m -Xss256k -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly");
elasticsearch = new ProcessWrappe... |
35,173 | .addClasspath(installation.starPath("extensions/jdbc-driver/mysql"))
.addClasspath(installation.starPath("extensions/jdbc-driver/mssql"))
.addClasspath(installation.starPath("extensions/jdbc-driver/oracle"))
.addClasspath(installation.starPath("extensions/jdbc-driver/postgresql"))
.addClasspath(installation.starPath("l... | .addClasspath(installation.starPath("lib/server"))
.execute();
monitor.registerProcess(server);
|
35,174 | package org.sonar.application;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
<BUG>import org.apache.commons.io.IOUtils;
import javax.annotation.CheckForNull;</BUG>
import javax.annotation.Nullable;
import java.io.File;
import java.io.FileReader;
| import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.process.NetworkUtils;
import javax.annotation.CheckForNull;
|
35,175 | props.put(propKey, d.getAbsolutePath());
return d;
}
Map<String, String> props() {
return props;
<BUG>}
@CheckForNull</BUG>
String prop(String key, @Nullable String defaultValue) {
String s = props.get(key);
return s != null ? s : defaultValue;
| String prop(String key) {
return props.get(key);
@CheckForNull
|
35,176 | private String processName, className;
private int jmxPort = -1;
private final List<String> javaOpts = new ArrayList<String>();
private final List<String> classpath = new ArrayList<String>();
private final Map<String, String> envProperties = new HashMap<String, String>();
<BUG>private final Map<String, String> argument... | private final Map<String, String> properties = new HashMap<String, String>();
|
35,177 |
arguments.put(key, value);
</BUG>
return this;
}
<BUG>public ProcessWrapper setArguments(Map<String, String> args) {
arguments.clear();
arguments.putAll(args);
</BUG>
return this;
| public ProcessWrapper setClassName(String s) {
this.className = s;
|
35,178 | command.addAll(buildClasspath());
command.add(className);
command.add(buildPropertiesFile().getAbsolutePath());
ProcessBuilder processBuilder = new ProcessBuilder();
processBuilder.command(command);
<BUG>processBuilder.directory(workDir);
try {</BUG>
LOGGER.debug("ProcessWrapper::executeProcess() -- Starting process wi... | processBuilder.environment().putAll(envProperties);
try {
|
35,179 | LOGGER.debug("ProcessWrapper::executeProcess() -- Process started: {}", process.toString());
errorGobbler = new StreamGobbler(process.getErrorStream(), this.getName() + "-ERROR");
outputGobbler = new StreamGobbler(process.getInputStream(), this.getName());
outputGobbler.start();
errorGobbler.start();
<BUG>processMXBean... | return this;
} catch (IOException e) {
|
35,180 | "-Dcom.sun.management.jmxremote.port=" + jmxPort,
"-Dcom.sun.management.jmxremote.authenticate=false",
"-Dcom.sun.management.jmxremote.ssl=false");
}
private List<String> buildClasspath() {
<BUG>return Arrays.asList("-cp", StringUtils.join(classpath, ";"));
</BUG>
}
private File buildPropertiesFile() {
try {
| return Arrays.asList("-cp", StringUtils.join(classpath, System.getProperty("path.separator")));
|
35,181 | String consoleEnabled = defaultIfEmpty(defaultIfEmpty(
event.getServletContext().getInitParameter(CONFIG_LOG_CONSOLE),
System.getProperty(CONFIG_LOG_CONSOLE)),
"false");
Map<String, String> variables = ImmutableMap.of(
<BUG>"RAILS_LOGGER_LEVEL", profilingLevel == Profiling.Level.FULL ? "DEBUG" : "WARN",</BUG>
"LOGFILE_... | [DELETED] |
35,182 | CacheControl cacheControl = map.get(portletWindowId);
if(cacheControl == null) {
cacheControl = new CacheControlImpl();
final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(httpRequest, portletWindowId);
if(portletWindow == null) {
<BUG>log.warn("portletWindowRegistry returned null portletWi... | logger.warn("portletWindowRegistry returned null for {}, returning default cacheControl", portletWindowId);
return cacheControl;
|
35,183 | CacheControl cacheControl = map.get(portletWindowId);
if(cacheControl == null) {
cacheControl = new CacheControlImpl(httpResponse);
final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(httpRequest, portletWindowId);
if(portletWindow == null) {
<BUG>log.warn("portletWindowRegistry returned nu... | cacheControl = new CacheControlImpl();
logger.warn("portletWindowRegistry returned null for {}, returning default cacheControl", portletWindowId);
return cacheControl;
|
35,184 | final int expirationTime = cacheControl.getExpirationTime();
CachedPortletData newData = new CachedPortletData();
newData.setExpirationTimeSeconds(expirationTime);
newData.setTimeStored(new Date());
newData.setStringData(content);
<BUG>newData.setEtag(cacheControl.getETag());
if(cacheControl.isPublicScope()) {
newData.... | final Locale locale = RequestContextUtils.getLocale(httpRequest);
final PublicPortletCacheKey publicCacheKey = new PublicPortletCacheKey(definitionId, portletWindow, locale);
newData.setCacheConfigurationMaxTTL((int)publicScopePortletRenderOutputCache.getCacheConfiguration().getTimeToLiveSeconds());
|
35,185 | public boolean isDumbAware() {
return true;
}
@Override
public boolean isApplicable(AnActionEvent event, final Map<String, Object> _params) {
<BUG>return SNodeOperations.isInstanceOf(((SNode) MapSequence.fromMap(_params).get("selectedNode")), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c... | return SNodeOperations.isInstanceOf(event.getData(MPSCommonDataKeys.NODE), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, "jetbrains.mps.baseLanguage.structure.ClassConcept")) && ListSequence.fromList(((List<SNode>) BHReflection.invoke(SNodeOperations.cast(event.getData(MPSCommon... |
35,186 | }
}
return true;
}
@Override
<BUG>public void doExecute(@NotNull final AnActionEvent event, final Map<String, Object> _params) {
final Project project = ((IOperationContext) MapSequence.fromMap(_params).get("operationContext")).getProject();
new OverrideImplementMethodAction(project, ((SNode) MapSequence.fromMap(_param... | public void doUpdate(@NotNull AnActionEvent event, final Map<String, Object> _params) {
this.setEnabledState(event.getPresentation(), this.isApplicable(event, _params));
|
35,187 | import jetbrains.mps.smodel.behaviour.BHReflection;
import jetbrains.mps.core.aspects.behaviour.SMethodTrimmedId;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.ide.actions.MPSCommonDataKeys;
import jetbrains.mps.ide.editor.MPSEditorDataKeys;
<BUG>import jetbrains.mps.smodel.IOperationContext;
import je... | import jetbrains.mps.project.MPSProject;
import jetbrains.mps.smodel.ModelAccessHelper;
|
35,188 | import jetbrains.mps.smodel.behaviour.BHReflection;
import jetbrains.mps.core.aspects.behaviour.SMethodTrimmedId;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.ide.actions.MPSCommonDataKeys;
import jetbrains.mps.ide.editor.MPSEditorDataKeys;
<BUG>import jetbrains.mps.smodel.IOperationContext;
import je... | import jetbrains.mps.project.MPSProject;
import jetbrains.mps.smodel.ModelAccessHelper;
|
35,189 | import jetbrains.mps.smodel.behaviour.BHReflection;
import jetbrains.mps.core.aspects.behaviour.SMethodTrimmedId;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.ide.actions.MPSCommonDataKeys;
import jetbrains.mps.ide.editor.MPSEditorDataKeys;
<BUG>import jetbrains.mps.smodel.IOperationContext;
import je... | import jetbrains.mps.project.MPSProject;
import jetbrains.mps.smodel.ModelAccessHelper;
|
35,190 | import de.vanita5.twittnuker.receiver.NotificationReceiver;
import de.vanita5.twittnuker.service.LengthyOperationsService;
import de.vanita5.twittnuker.util.ActivityTracker;
import de.vanita5.twittnuker.util.AsyncTwitterWrapper;
import de.vanita5.twittnuker.util.DataStoreFunctionsKt;
<BUG>import de.vanita5.twittnuker.u... | import de.vanita5.twittnuker.util.DebugLog;
import de.vanita5.twittnuker.util.ImagePreloader;
|
35,191 | final List<InetAddress> addresses = mDns.lookup(host);
for (InetAddress address : addresses) {
c.addRow(new String[]{host, address.getHostAddress()});
}
} catch (final IOException ignore) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, ignore);
}</BUG>
}
| DebugLog.w(LOGTAG, null, ignore);
|
35,192 | @Override
public void afterExecute(Bus handler, SingleResponse<Relationship> result) {
if (result.hasData()) {
handler.post(new FriendshipUpdatedEvent(accountKey, userKey, result.getData()));
} else if (result.hasException()) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, "Unable to update friendship", result.getExcepti... | public UserKey[] getAccountKeys() {
return DataStoreUtils.getActivatedAccountKeys(context);
|
35,193 | MicroBlog microBlog = MicroBlogAPIFactory.getInstance(context, accountId);
if (!Utils.isOfficialCredentials(context, accountId)) continue;
try {
microBlog.setActivitiesAboutMeUnread(cursor);
} catch (MicroBlogException e) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, e);
}</BUG>
}
| DebugLog.w(LOGTAG, null, e);
|
35,194 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
twitter.updateProfileBannerImage(fileBody);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, String.form... | if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
35,195 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
twitter.updateProfileBackgroundImage(fileBody, tile);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, S... | twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
35,196 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
return twitter.updateProfileImage(fileBody);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, String.for... | twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
35,197 | import de.vanita5.twittnuker.annotation.CustomTabType;
import de.vanita5.twittnuker.library.MicroBlog;
import de.vanita5.twittnuker.library.MicroBlogException;
import de.vanita5.twittnuker.library.twitter.model.RateLimitStatus;
import de.vanita5.twittnuker.library.twitter.model.Status;
<BUG>import de.vanita5.twittnuker... | import org.mariotaku.pickncrop.library.PNCUtils;
import org.mariotaku.sqliteqb.library.AllColumns;
|
35,198 | context.getApplicationContext().sendBroadcast(intent);
}
}
@Nullable
public static Location getCachedLocation(Context context) {
<BUG>if (BuildConfig.DEBUG) {
Log.v(LOGTAG, "Fetching cached location", new Exception());
}</BUG>
Location location = null;
| DebugLog.v(LOGTAG, "Fetching cached location", new Exception());
|
35,199 | import java.util.List;
import java.util.Map.Entry;
import javax.inject.Singleton;
import okhttp3.Dns;
@Singleton
<BUG>public class TwidereDns implements Constants, Dns {
</BUG>
private static final String RESOLVER_LOGTAG = "TwittnukerDns";
private final SharedPreferences mHostMapping;
private final SharedPreferencesWra... | public class TwidereDns implements Dns, Constants {
|
35,200 | for (Location location : twitter.getAvailableTrends()) {
map.put(location);
}
return map.pack();
} catch (final MicroBlogException e) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, e);
}</BUG>
}
| DebugLog.w(LOGTAG, null, e);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.