id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
40,201
import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.terraingen.DecorateBiomeEvent; <BUG>import net.minecraftforge.event.terraingen.OreGenEvent; import nex.entity.monster.EntitySpinout;</BUG> import nex.handler.ConfigHandler; import nex.init.NetherExBiomes; import nex.init.NetherExBlocks;
import nex.block.BlockNetherrack; import nex.entity.monster.EntitySpinout;
40,202
private WorldGenerator ancientAltar = new WorldGenAncientAltar(); public BiomeRuthlessSands() { super(new BiomeProperties("Ruthless Sands").setTemperature(2.0F).setRainfall(0.0F).setRainDisabled(), "ruthless_sands"); topBlock = Blocks.SOUL_SAND.getDefaultState(); <BUG>fillerBlock = NetherExBlocks.BLOCK_NETHERRACK.getStateFromMeta(3); spawnableMonsterList.add(new SpawnListEntry(EntitySpinout.class, 100, 1, 4));</BUG> spawnableMonsterList.add(new SpawnListEntry(EntityWitherSkeleton.class, 65, 1, 4)); spawnableMonsterList.add(new SpawnListEntry(EntityPigZombie.class, 45, 1, 4)); if(ConfigHandler.Biome.RuthlessSands.generateBiome)
fillerBlock = NetherExBlocks.BLOCK_NETHERRACK.getDefaultState().withProperty(BlockNetherrack.TYPE, BlockNetherrack.EnumType.GLOOMY); spawnableMonsterList.add(new SpawnListEntry(EntitySpinout.class, 100, 1, 4));
40,203
import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.terraingen.DecorateBiomeEvent; <BUG>import net.minecraftforge.event.terraingen.OreGenEvent; import nex.entity.monster.EntityWight;</BUG> import nex.handler.ConfigHandler; import nex.init.NetherExBiomes; import nex.init.NetherExBlocks;
import nex.block.BlockNetherrack; import nex.entity.monster.EntityWight;
40,204
@SuppressWarnings("ConstantConditions") public class BiomeArcticAbyss extends BiomeNetherEx { private WorldGenerator glowstonePass1 = new WorldGenGlowStone(); private WorldGenerator glowstonePass2 = new WorldGenGlowStone(); <BUG>private WorldGenerator quartzOre = new WorldGenMinableMeta(NetherExBlocks.ORE_QUARTZ.getStateFromMeta(1), 14, NetherExBlocks.BLOCK_NETHERRACK.getStateFromMeta(1)); private WorldGenerator rimeOre = new WorldGenMinableMeta(NetherExBlocks.ORE_RIME.getDefaultState(), 7, NetherExBlocks.BLOCK_NETHERRACK.getStateFromMeta(1)); </BUG> private WorldGenerator ichorPit = new WorldGenPit(NetherExBlocks.FLUID_ICHOR, NetherExBlocks.BLOCK_ICE_FROSTBURN.getDefaultState(), Blocks.MAGMA.getDefaultState()); public BiomeArcticAbyss()
private WorldGenerator quartzOre = new WorldGenMinableMeta(NetherExBlocks.ORE_QUARTZ.getDefaultState().withProperty(BlockNetherrack.TYPE, BlockNetherrack.EnumType.ICY), 14, NetherExBlocks.BLOCK_NETHERRACK.getDefaultState().withProperty(BlockNetherrack.TYPE, BlockNetherrack.EnumType.ICY)); private WorldGenerator rimeOre = new WorldGenMinableMeta(NetherExBlocks.ORE_RIME.getDefaultState(), 7, NetherExBlocks.BLOCK_NETHERRACK.getDefaultState().withProperty(BlockNetherrack.TYPE, BlockNetherrack.EnumType.ICY));
40,205
import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.terraingen.DecorateBiomeEvent; <BUG>import net.minecraftforge.event.terraingen.OreGenEvent; import nex.entity.monster.EntitySpore;</BUG> import nex.entity.monster.EntitySporeCreeper; import nex.entity.neutral.EntityMogus; import nex.handler.ConfigHandler;
import nex.block.BlockNetherrack; import nex.entity.monster.EntitySpore;
40,206
@SuppressWarnings("ConstantConditions") public class BiomeFungiForest extends BiomeNetherEx { private WorldGenerator glowstonePass1 = new WorldGenGlowStone(); private WorldGenerator glowstonePass2 = new WorldGenGlowStone(); <BUG>private WorldGenerator quartzOre = new WorldGenMinableMeta(NetherExBlocks.ORE_QUARTZ.getStateFromMeta(2), 14, NetherExBlocks.BLOCK_NETHERRACK.getStateFromMeta(2)); private WorldGenerator brownElderMushroom = new WorldGenElderMushroom(WorldGenElderMushroom.brownVariants, true);</BUG> private WorldGenerator redElderMushroom = new WorldGenElderMushroom(WorldGenElderMushroom.redVariants, true); private WorldGenerator enokiMushroom = new WorldGenEnokiMushroom(); public BiomeFungiForest()
private WorldGenerator quartzOre = new WorldGenMinableMeta(NetherExBlocks.ORE_QUARTZ.getDefaultState().withProperty(BlockNetherrack.TYPE, BlockNetherrack.EnumType.LIVELY), 14, NetherExBlocks.BLOCK_NETHERRACK.getDefaultState().withProperty(BlockNetherrack.TYPE, BlockNetherrack.EnumType.LIVELY)); private WorldGenerator brownElderMushroom = new WorldGenElderMushroom(WorldGenElderMushroom.brownVariants, true);
40,207
super(new BiomeProperties("Fungi Forest").setTemperature(1.1F).setRainfall(0.0F).setRainDisabled(), "fungi_forest"); spawnableMonsterList.add(new SpawnListEntry(EntityMogus.class, 100, 4, 6)); spawnableMonsterList.add(new SpawnListEntry(EntitySporeCreeper.class, 50, 1, 4)); spawnableMonsterList.add(new SpawnListEntry(EntitySpore.class, 25, 1, 4)); topBlock = NetherExBlocks.BLOCK_HYPHAE.getDefaultState(); <BUG>fillerBlock = NetherExBlocks.BLOCK_NETHERRACK.getStateFromMeta(2); if(ConfigHandler.Biome.FungiForest.generateBiome)</BUG> { NetherExBiomes.addBiome(this, ConfigHandler.Biome.FungiForest.biomeRarity, new ItemStack(Blocks.LAVA, 1, 0)); }
fillerBlock = NetherExBlocks.BLOCK_NETHERRACK.getDefaultState().withProperty(BlockNetherrack.TYPE, BlockNetherrack.EnumType.LIVELY); if(ConfigHandler.Biome.FungiForest.generateBiome)
40,208
if(!flag && !flag1) { return false; } IBlockState state1 = wordIn.getBlockState(blockpos.up()); <BUG>if(state1.getBlock() == this || state1.getBlock() == Blocks.NETHERRACK || state1 == NetherExBlocks.BLOCK_NETHERRACK.getStateFromMeta(2)) </BUG> { return true; }
if(state1.getBlock() == this || state1.getBlock() == Blocks.NETHERRACK || state1 == NetherExBlocks.BLOCK_NETHERRACK.getDefaultState().withProperty(BlockNetherrack.TYPE, BlockNetherrack.EnumType.LIVELY))
40,209
import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.Event; <BUG>import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import nex.entity.item.EntityObsidianBoat;</BUG> import nex.entity.monster.EntityNethermite; import nex.entity.monster.EntitySpore; import nex.entity.neutral.EntityMogus;
import nex.block.BlockNetherrackPath; import nex.block.BlockTilledSoulSand; import nex.entity.item.EntityObsidianBoat;
40,210
player.swingArm(hand); } } int meta = state.getBlock() == Blocks.NETHERRACK ? 0 : NetherExBlocks.BLOCK_NETHERRACK.getMetaFromState(state) + 1; world.playSound(player, pos, SoundEvents.ITEM_SHOVEL_FLATTEN, SoundCategory.BLOCKS, 1.0F, 1.0F); <BUG>world.setBlockState(pos, NetherExBlocks.BLOCK_NETHERRACK_PATH.getStateFromMeta(meta), 11); stack.damageItem(1, player);</BUG> } } if(stack.getItem() == NetherExItems.TOOL_HOE_BONE || stack.getItem() == Items.GOLDEN_HOE || ConfigHandler.Block.SoulSand.allowAllHoesToTill && stack.getItem() instanceof ItemHoe)
world.setBlockState(pos, NetherExBlocks.BLOCK_NETHERRACK_PATH.getDefaultState().withProperty(BlockNetherrackPath.TYPE, BlockNetherrackPath.EnumType.fromMeta(meta)), 11); stack.damageItem(1, player);
40,211
import nex.init.NetherExBlocks; import java.util.Random; @SuppressWarnings("ConstantConditions") public class BlockTilledSoulSand extends BlockNetherEx { <BUG>private static final PropertyInteger MOISTURE = PropertyInteger.create("moisture", 0, 7); </BUG> private static final AxisAlignedBB FARMLAND_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.9375D, 1.0D); public BlockTilledSoulSand() {
public static final PropertyInteger MOISTURE = PropertyInteger.create("moisture", 0, 7);
40,212
{ setCounter(0); setSpinning(false); setCooldown(ConfigHandler.Entity.Spinout.spinCooldown * 20); } <BUG>if(getCooldown() > 0 && !isInLava()) {</BUG> setCooldown(getCooldown() - 1); } }
private static final DataParameter<Integer> COUNTER = EntityDataManager.createKey(EntitySpinout.class, DataSerializers.VARINT); private static final DataParameter<Integer> COOLDOWN = EntityDataManager.createKey(EntitySpinout.class, DataSerializers.VARINT); private static final DataParameter<Boolean> SPINNING = EntityDataManager.createKey(EntitySpinout.class, DataSerializers.BOOLEAN); private final EntityAIBase attackMelee = new EntityAIAttackMelee(this, 1.0D, true); private final EntityAIBase wander = new EntityAIWander(this, 1.0D); public EntitySpinout(World world) super(world); setSize(0.55F, 1.95F); stepHeight = 0.5F; isImmuneToFire = true;
40,213
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
40,214
} @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);
40,215
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 != null) { c.moveToFirst(); }
MemoEntry.COLUMN_ORDER + " ASC", null);
40,216
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(
40,217
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.Adapter<RecyclerView.ViewHolder> implements EditMode { </BUG> private List<MemoEntity> memoList;
import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter; public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
40,218
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, EditMemoDialogFragment.MemoCallback callback) { this.mActivity = activity;</BUG> this.topicId = topicId; this.memoList = memoList;
public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) { super(recyclerView); this.mActivity = activity;
40,219
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) {
40,220
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;
40,221
} @RootTask static Task<Exec.Result> exec(String parameter, int number) { Task<String> task1 = MyTask.create(parameter); Task<Integer> task2 = Adder.create(number, number + 2); <BUG>return Task.ofType(Exec.Result.class).named("exec", "/bin/sh") .in(() -> task1)</BUG> .in(() -> task2) .process(Exec.exec((str, i) -> args("/bin/sh", "-c", "\"echo " + i + "\""))); }
return Task.named("exec", "/bin/sh").ofType(Exec.Result.class) .in(() -> task1)
40,222
return args; } static class MyTask { static final int PLUS = 10; static Task<String> create(String parameter) { <BUG>return Task.ofType(String.class).named("MyTask", parameter) .in(() -> Adder.create(parameter.length(), PLUS))</BUG> .in(() -> Fib.create(parameter.length())) .process((sum, fib) -> something(parameter, sum, fib)); }
return Task.named("MyTask", parameter).ofType(String.class) .in(() -> Adder.create(parameter.length(), PLUS))
40,223
final String instanceField = "from instance"; final TaskContext context = TaskContext.inmem(); final AwaitingConsumer<String> val = new AwaitingConsumer<>(); @Test public void shouldJavaUtilSerialize() throws Exception { <BUG>Task<Long> task1 = Task.ofType(Long.class).named("Foo", "Bar", 39) .process(() -> 9999L); Task<String> task2 = Task.ofType(String.class).named("Baz", 40) .in(() -> task1)</BUG> .ins(() -> singletonList(task1))
Task<Long> task1 = Task.named("Foo", "Bar", 39).ofType(Long.class) Task<String> task2 = Task.named("Baz", 40).ofType(String.class) .in(() -> task1)
40,224
assertEquals(des.id().name(), "Baz"); assertEquals(val.awaitAndGet(), "[9999] hello 10004"); } @Test(expected = NotSerializableException.class) public void shouldNotSerializeWithInstanceFieldReference() throws Exception { <BUG>Task<String> task = Task.ofType(String.class).named("WithRef") .process(() -> instanceField + " causes an outer reference");</BUG> serialize(task); } @Test
Task<String> task = Task.named("WithRef").ofType(String.class) .process(() -> instanceField + " causes an outer reference");
40,225
serialize(task); } @Test public void shouldSerializeWithLocalReference() throws Exception { String local = instanceField; <BUG>Task<String> task = Task.ofType(String.class).named("WithLocalRef") .process(() -> local + " won't cause an outer reference");</BUG> serialize(task); Task<String> des = deserialize(); context.evaluate(des).consume(val);
Task<String> task = Task.named("WithLocalRef").ofType(String.class) .process(() -> local + " won't cause an outer reference");
40,226
} @RootTask public static Task<String> standardArgs(int first, String second) { firstInt = first; secondString = second; <BUG>return Task.ofType(String.class).named("StandardArgs", first, second) .process(() -> second + " " + first * 100);</BUG> } @Test public void shouldParseFlags() throws Exception {
return Task.named("StandardArgs", first, second).ofType(String.class) .process(() -> second + " " + first * 100);
40,227
assertThat(parsedEnum, is(CustomEnum.BAR)); } @RootTask public static Task<String> enums(CustomEnum enm) { parsedEnum = enm; <BUG>return Task.ofType(String.class).named("Enums", enm) .process(enm::toString);</BUG> } @Test public void shouldParseCustomTypes() throws Exception {
return Task.named("Enums", enm).ofType(String.class) .process(enm::toString);
40,228
assertThat(parsedType.content, is("blarg parsed for you!")); } @RootTask public static Task<String> customType(CustomType myType) { parsedType = myType; <BUG>return Task.ofType(String.class).named("Types", myType.content) .process(() -> myType.content);</BUG> } public enum CustomEnum { BAR
return Task.named("Types", myType.content).ofType(String.class) .process(() -> myType.content);
40,229
TaskContext taskContext = TaskContext.inmem(); TaskContext.Value<Long> value = taskContext.evaluate(fib92); value.consume(f92 -> System.out.println("fib(92) = " + f92)); } static Task<Long> create(long n) { <BUG>TaskBuilder<Long> fib = Task.ofType(Long.class).named("Fib", n); </BUG> if (n < 2) { return fib .process(() -> n);
TaskBuilder<Long> fib = Task.named("Fib", n).ofType(Long.class);
40,230
System.out.println("Expected = " + secretState); System.out.println("Got = " + value); System.out.println(); } System.out.println("Trading the Request Token for an Access Token..."); <BUG>OAuth2AccessToken accessToken = service.getAccessToken(verifier); </BUG> System.out.println("Got the Access Token!"); System.out.println("(if your curious it looks like this: " + accessToken + ", 'rawResponse'='" + accessToken.getRawResponse() + "')");
OAuth2AccessToken accessToken = service.getAccessToken(code);
40,231
System.out.println("Expected = " + secretState); System.out.println("Got = " + value); System.out.println(); } System.out.println("Trading the Request Token for an Access Token..."); <BUG>final OAuth2AccessToken accessToken = service.getAccessToken(verifier); </BUG> System.out.println("Got the Access Token!"); System.out.println("(if your curious it looks like this: " + accessToken + ", 'rawResponse'='" + accessToken.getRawResponse() + "')");
final OAuth2AccessToken accessToken = service.getAccessToken(code);
40,232
System.out.println("Expected = " + secretState); System.out.println("Got = " + value); System.out.println(); } System.out.println("Trading the Request Token for an Access Token..."); <BUG>final OAuth2AccessToken accessToken = service.getAccessTokenAsync(verifier, null).get(); </BUG> System.out.println("Got the Access Token!"); System.out.println("(if your curious it looks like this: " + accessToken + ", 'rawResponse'='" + accessToken.getRawResponse() + "')");
final OAuth2AccessToken accessToken = service.getAccessTokenAsync(code, null).get();
40,233
System.out.println("Expected = " + secretState); System.out.println("Got = " + value); System.out.println(); } System.out.println("Trading the Request Token for an Access Token..."); <BUG>final OAuth2AccessToken accessToken = service.getAccessToken(verifier); </BUG> System.out.println("Got the Access Token!"); System.out.println("(if your curious it looks like this: " + accessToken + ", 'rawResponse'='" + accessToken.getRawResponse() + "')");
final OAuth2AccessToken accessToken = service.getAccessToken(code);
40,234
import ml.puredark.hviewer.ui.activities.BaseActivity; import ml.puredark.hviewer.ui.dataproviders.ListDataProvider; import ml.puredark.hviewer.ui.fragments.SettingFragment; import ml.puredark.hviewer.ui.listeners.OnItemLongClickListener; import ml.puredark.hviewer.utils.SharedPreferencesUtil; <BUG>import static android.webkit.WebSettings.LOAD_CACHE_ELSE_NETWORK; public class PictureViewerAdapter extends RecyclerView.Adapter<PictureViewerAdapter.PictureViewerViewHolder> {</BUG> private BaseActivity activity; private Site site; private ListDataProvider mProvider;
import static ml.puredark.hviewer.R.id.container; public class PictureViewerAdapter extends RecyclerView.Adapter<PictureViewerAdapter.PictureViewerViewHolder> {
40,235
final PictureViewHolder viewHolder = new PictureViewHolder(view); if (pictures != null && position < pictures.size()) { final Picture picture = pictures.get(getPicturePostion(position)); if (picture.pic != null) { loadImage(container.getContext(), picture, viewHolder); <BUG>} else if (site.hasFlag(Site.FLAG_SINGLE_PAGE_BIG_PICTURE) && site.extraRule != null && site.extraRule.pictureUrl != null) { getPictureUrl(container.getContext(), viewHolder, picture, site, site.extraRule.pictureUrl, site.extraRule.pictureHighRes);</BUG> } else if (site.picUrlSelector != null) { getPictureUrl(container.getContext(), viewHolder, picture, site, site.picUrlSelector, null); } else {
} else if (site.hasFlag(Site.FLAG_SINGLE_PAGE_BIG_PICTURE) && site.extraRule != null) { if(site.extraRule.pictureRule != null && site.extraRule.pictureRule.url != null) getPictureUrl(container.getContext(), viewHolder, picture, site, site.extraRule.pictureRule.url, site.extraRule.pictureRule.highRes); else if(site.extraRule.pictureUrl != null) getPictureUrl(container.getContext(), viewHolder, picture, site, site.extraRule.pictureUrl, site.extraRule.pictureHighRes);
40,236
import java.util.regex.Pattern; import butterknife.BindView; import butterknife.ButterKnife; import ml.puredark.hviewer.R; import ml.puredark.hviewer.beans.Category; <BUG>import ml.puredark.hviewer.beans.CommentRule; import ml.puredark.hviewer.beans.Rule;</BUG> import ml.puredark.hviewer.beans.Selector; import ml.puredark.hviewer.beans.Site; import ml.puredark.hviewer.ui.adapters.CategoryInputAdapter;
import ml.puredark.hviewer.beans.PictureRule; import ml.puredark.hviewer.beans.Rule;
40,237
inputGalleryRulePictureUrlReplacement.setText(site.galleryRule.pictureUrl.replacement); } if (site.galleryRule.pictureHighRes != null) { inputGalleryRulePictureHighResSelector.setText(joinSelector(site.galleryRule.pictureHighRes)); inputGalleryRulePictureHighResRegex.setText(site.galleryRule.pictureHighRes.regex); <BUG>inputGalleryRulePictureHighResReplacement.setText(site.galleryRule.pictureHighRes.replacement); }</BUG> if (site.galleryRule.commentRule != null) { if (site.galleryRule.commentRule.item != null) { inputGalleryRuleCommentItemSelector.setText(joinSelector(site.galleryRule.commentRule.item));
[DELETED]
40,238
inputExtraRuleCommentDatetimeReplacement.setText(site.extraRule.commentDatetime.replacement); } if (site.extraRule.commentContent != null) { inputExtraRuleCommentContentSelector.setText(joinSelector(site.extraRule.commentContent)); inputExtraRuleCommentContentRegex.setText(site.extraRule.commentContent.regex); <BUG>inputExtraRuleCommentContentReplacement.setText(site.extraRule.commentContent.replacement); }</BUG> } } }
[DELETED]
40,239
lastSite.galleryRule.cover = loadSelector(inputGalleryRuleCoverSelector, inputGalleryRuleCoverRegex, inputGalleryRuleCoverReplacement); lastSite.galleryRule.category = loadSelector(inputGalleryRuleCategorySelector, inputGalleryRuleCategoryRegex, inputGalleryRuleCategoryReplacement); lastSite.galleryRule.datetime = loadSelector(inputGalleryRuleDatetimeSelector, inputGalleryRuleDatetimeRegex, inputGalleryRuleDatetimeReplacement); lastSite.galleryRule.rating = loadSelector(inputGalleryRuleRatingSelector, inputGalleryRuleRatingRegex, inputGalleryRuleRatingReplacement); lastSite.galleryRule.description = loadSelector(inputGalleryRuleDescriptionSelector, inputGalleryRuleDescriptionRegex, inputGalleryRuleDescriptionReplacement); <BUG>lastSite.galleryRule.tags = loadSelector(inputGalleryRuleTagsSelector, inputGalleryRuleTagsRegex, inputGalleryRuleTagsReplacement); lastSite.galleryRule.pictureThumbnail = loadSelector(inputGalleryRulePictureThumbnailSelector, inputGalleryRulePictureThumbnailRegex, inputGalleryRulePictureThumbnailReplacement); lastSite.galleryRule.pictureUrl = loadSelector(inputGalleryRulePictureUrlSelector, inputGalleryRulePictureUrlRegex, inputGalleryRulePictureUrlReplacement); lastSite.galleryRule.pictureHighRes = loadSelector(inputGalleryRulePictureHighResSelector, inputGalleryRulePictureHighResRegex, inputGalleryRulePictureHighResReplacement); lastSite.galleryRule.commentRule = new CommentRule(); lastSite.galleryRule.commentRule.item = loadSelector(inputGalleryRuleCommentItemSelector, inputGalleryRuleCommentItemRegex, inputGalleryRuleCommentItemReplacement);</BUG> lastSite.galleryRule.commentRule.avatar = loadSelector(inputGalleryRuleCommentAvatarSelector, inputGalleryRuleCommentAvatarRegex, inputGalleryRuleCommentAvatarReplacement);
lastSite.galleryRule.pictureRule = (lastSite.galleryRule.pictureRule == null) ? new PictureRule() : lastSite.galleryRule.pictureRule; lastSite.galleryRule.pictureRule.thumbnail = loadSelector(inputGalleryRulePictureThumbnailSelector, inputGalleryRulePictureThumbnailRegex, inputGalleryRulePictureThumbnailReplacement); lastSite.galleryRule.pictureRule.url = loadSelector(inputGalleryRulePictureUrlSelector, inputGalleryRulePictureUrlRegex, inputGalleryRulePictureUrlReplacement); lastSite.galleryRule.pictureRule.highRes = loadSelector(inputGalleryRulePictureHighResSelector, inputGalleryRulePictureHighResRegex, inputGalleryRulePictureHighResReplacement); lastSite.galleryRule.commentRule = (lastSite.galleryRule.commentRule == null) ? new CommentRule() : lastSite.galleryRule.commentRule; lastSite.galleryRule.commentRule.item = loadSelector(inputGalleryRuleCommentItemSelector, inputGalleryRuleCommentItemRegex, inputGalleryRuleCommentItemReplacement);
40,240
lastSite.extraRule.cover = loadSelector(inputExtraRuleCoverSelector, inputExtraRuleCoverRegex, inputExtraRuleCoverReplacement); lastSite.extraRule.category = loadSelector(inputExtraRuleCategorySelector, inputExtraRuleCategoryRegex, inputExtraRuleCategoryReplacement); lastSite.extraRule.datetime = loadSelector(inputExtraRuleDatetimeSelector, inputExtraRuleDatetimeRegex, inputExtraRuleDatetimeReplacement); lastSite.extraRule.rating = loadSelector(inputExtraRuleRatingSelector, inputExtraRuleRatingRegex, inputExtraRuleRatingReplacement); lastSite.extraRule.description = loadSelector(inputExtraRuleDescriptionSelector, inputExtraRuleDescriptionRegex, inputExtraRuleDescriptionReplacement); <BUG>lastSite.extraRule.tags = loadSelector(inputExtraRuleTagsSelector, inputExtraRuleTagsRegex, inputExtraRuleTagsReplacement); lastSite.extraRule.pictureThumbnail = loadSelector(inputExtraRulePictureThumbnailSelector, inputExtraRulePictureThumbnailRegex, inputExtraRulePictureThumbnailReplacement); lastSite.extraRule.pictureUrl = loadSelector(inputExtraRulePictureUrlSelector, inputExtraRulePictureUrlRegex, inputExtraRulePictureUrlReplacement); lastSite.extraRule.pictureHighRes = loadSelector(inputExtraRulePictureHighResSelector, inputExtraRulePictureHighResRegex, inputExtraRulePictureHighResReplacement); lastSite.extraRule.commentRule = new CommentRule(); lastSite.extraRule.commentRule.item = loadSelector(inputExtraRuleCommentItemSelector, inputExtraRuleCommentItemRegex, inputExtraRuleCommentItemReplacement);</BUG> lastSite.extraRule.commentRule.avatar = loadSelector(inputExtraRuleCommentAvatarSelector, inputExtraRuleCommentAvatarRegex, inputExtraRuleCommentAvatarReplacement);
lastSite.extraRule.pictureRule = (lastSite.extraRule.pictureRule == null) ? new PictureRule() : lastSite.extraRule.pictureRule; lastSite.extraRule.pictureRule.thumbnail = loadSelector(inputExtraRulePictureThumbnailSelector, inputExtraRulePictureThumbnailRegex, inputExtraRulePictureThumbnailReplacement); lastSite.extraRule.pictureRule.url = loadSelector(inputExtraRulePictureUrlSelector, inputExtraRulePictureUrlRegex, inputExtraRulePictureUrlReplacement); lastSite.extraRule.pictureRule.highRes = loadSelector(inputExtraRulePictureHighResSelector, inputExtraRulePictureHighResRegex, inputExtraRulePictureHighResReplacement); lastSite.extraRule.commentRule = (lastSite.extraRule.commentRule == null) ? new CommentRule() : lastSite.extraRule.commentRule; lastSite.extraRule.commentRule.item = loadSelector(inputExtraRuleCommentItemSelector, inputExtraRuleCommentItemRegex, inputExtraRuleCommentItemReplacement);
40,241
notifyItemChanged(position); if (mItemClickListener != null) mItemClickListener.onItemClick(v, position); } }); <BUG>if (tag.selected) label.getChildAt(0).setBackgroundResource(R.color.colorPrimary); else label.getChildAt(0).setBackgroundResource(R.color.dimgray);</BUG> }
[DELETED]
40,242
loadPicture(picture, task, null, true); } else if (!TextUtils.isEmpty(picture.pic) && !highRes) { picture.retries = 0; loadPicture(picture, task, null, false); } else if (task.collection.site.hasFlag(Site.FLAG_SINGLE_PAGE_BIG_PICTURE) <BUG>&& task.collection.site.extraRule != null && task.collection.site.extraRule.pictureUrl != null) { </BUG> getPictureUrl(picture, task, task.collection.site.extraRule.pictureUrl, task.collection.site.extraRule.pictureHighRes);
&& task.collection.site.extraRule != null) { if(task.collection.site.extraRule.pictureRule != null && task.collection.site.extraRule.pictureRule.url != null) getPictureUrl(picture, task, task.collection.site.extraRule.pictureRule.url, task.collection.site.extraRule.pictureRule.highRes); else if(task.collection.site.extraRule.pictureUrl != null)
40,243
if (Picture.hasPicPosfix(picture.url)) { picture.pic = picture.url; loadPicture(picture, task, null, false); } else if (task.collection.site.hasFlag(Site.FLAG_JS_NEEDED_ALL)) { <BUG>new Handler(Looper.getMainLooper()).post(()->{ </BUG> WebView webView = new WebView(HViewerApplication.mContext); WebSettings mWebSettings = webView.getSettings(); mWebSettings.setJavaScriptEnabled(true);
new Handler(Looper.getMainLooper()).post(() -> {
40,244
import org.meridor.perspective.beans.ImageState; import org.meridor.perspective.config.Cloud; import org.meridor.perspective.config.OperationType; import org.meridor.perspective.events.*; import org.meridor.perspective.worker.misc.CloudConfigurationProvider; <BUG>import org.meridor.perspective.worker.operation.OperationProcessor; import org.slf4j.Logger;</BUG> import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component;
import org.meridor.perspective.worker.processor.event.MailSender; import org.slf4j.Logger;
40,245
}) public class ImageFSM { private static final Logger LOG = LoggerFactory.getLogger(ImageFSM.class); private final OperationProcessor operationProcessor; private final CloudConfigurationProvider cloudConfigurationProvider; <BUG>private final ImagesAware imagesAware; @Autowired public ImageFSM(OperationProcessor operationProcessor, ImagesAware imagesAware, CloudConfigurationProvider cloudConfigurationProvider) { </BUG> this.operationProcessor = operationProcessor;
private final MailSender mailSender; public ImageFSM(OperationProcessor operationProcessor, ImagesAware imagesAware, CloudConfigurationProvider cloudConfigurationProvider, MailSender mailSender) {
40,246
image.setState(ImageState.QUEUED); imagesAware.saveImage(image); } } @OnTransit <BUG>public void onImageSaving(ImageSavingEvent event) { </BUG> Image image = event.getImage(); String cloudId = image.getCloudId(); Cloud cloud = cloudConfigurationProvider.getCloud(cloudId);
public void onImageSaving(@Event ImageSavingEvent event) {
40,247
image.setState(ImageState.SAVED); imagesAware.saveImage(image); } } @OnTransit <BUG>public void onImageDeleting(ImageDeletingEvent event) { </BUG> Image image = event.getImage(); String cloudId = image.getCloudId(); Cloud cloud = cloudConfigurationProvider.getCloud(cloudId);
public void onImageDeleting(@Event ImageDeletingEvent event) {
40,248
package org.meridor.perspective.events; <BUG>import org.meridor.perspective.beans.*; import java.time.ZonedDateTime; import java.util.UUID; public final class EventFactory {</BUG> public static <T extends InstanceEvent> T instanceEvent(Class<T> eventClass, Instance instance) {
import org.meridor.perspective.beans.InstanceState; import static org.meridor.perspective.beans.InstanceState.*; public final class EventFactory {
40,249
return new InstanceResumingEvent(); case SHUTOFF: return new InstanceShutOffEvent(); case SHUTTING_DOWN: return new InstanceShuttingDownEvent(); <BUG>case SNAPSHOTTING: return new InstanceSnapshottingEvent();</BUG> case STARTING: return new InstanceStartingEvent(); case SUSPENDING:
[DELETED]
40,250
package org.meridor.perspective.events; import org.junit.Test; <BUG>import org.meridor.perspective.beans.*; import java.time.ZonedDateTime;</BUG> import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertThat; import static org.meridor.perspective.beans.InstanceState.*;
import org.meridor.perspective.beans.InstanceState; import java.time.ZonedDateTime;
40,251
testInstanceToEvent(PAUSED, InstancePausedEvent.class); testInstanceToEvent(PAUSING, InstancePausingEvent.class); testInstanceToEvent(QUEUED, InstanceQueuedEvent.class); testInstanceToEvent(REBOOTING, InstanceRebootingEvent.class); testInstanceToEvent(REBUILDING, InstanceRebuildingEvent.class); <BUG>testInstanceToEvent(RESIZING, InstanceResizingEvent.class); testInstanceToEvent(SHUTOFF, InstanceShutOffEvent.class);</BUG> testInstanceToEvent(SHUTTING_DOWN, InstanceShuttingDownEvent.class); testInstanceToEvent(STARTING, InstanceStartingEvent.class); testInstanceToEvent(SUSPENDING, InstanceSuspendingEvent.class);
testInstanceToEvent(RESUMING, InstanceResumingEvent.class); testInstanceToEvent(SHUTOFF, InstanceShutOffEvent.class);
40,252
"Syncing image {} ({}) with state = {} for the first time", event.getImage().getName(), event.getImage().getId(), event.getClass().getSimpleName() ); <BUG>Yatomata<ImageFSM> fsm = fsmBuilderAware.get(ImageFSM.class).build(); fsm.fire(event);</BUG> } else { LOG.debug( "Will not update image {} ({}) as it does not exist or was already deleted",
Yatomata<ImageFSM> fsm = new FSMBuilder<>(fsmInstance).build(); fsm.fire(event);
40,253
import com.intellij.openapi.ui.DialogWrapper; import com.intellij.refactoring.BaseRefactoringProcessor; import com.intellij.refactoring.RefactoringBundle; import org.jetbrains.annotations.NotNull; import javax.swing.*; <BUG>import java.awt.event.ActionEvent; public abstract class RefactoringDialog extends DialogWrapper {</BUG> private Action myRefactorAction; private Action myPreviewAction; private boolean myCbPreviewResults;
import java.util.ArrayList; import java.util.List; public abstract class RefactoringDialog extends DialogWrapper {
40,254
customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString()); customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName); customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString()); customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName); customTokens.put("%%mlTraceForestsPerHost%%", hubConfig.traceForestsPerHost.toString()); <BUG>customTokens.put("%%mlModulesDbName%%", hubConfig.modulesDbName); }</BUG> public void init() { try { LOGGER.error("PLUGINS DIR: " + pluginsDir.toString());
customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName); customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName); }
40,255
public static boolean debugMode = false; @ModConfigProperty(category = "Debug", name = "debugModeGOTG", comment = "Enable/Disable Debug Mode for the Gift Of The Gods") public static boolean debugModeGOTG = false; @ModConfigProperty(category = "Debug", name = "debugModeEnchantments", comment = "Enable/Disable Debug Mode for the Enchantments") public static boolean debugModeEnchantments = false; <BUG>@ModConfigProperty(category = "Weapons", name = "enableSwordsRecipes", comment = "Enable/Disable The ArmorPlus Sword's Recipes") public static boolean enableSwordsRecipes = true; @ModConfigProperty(category = "Weapons", name = "enableBattleAxesRecipes", comment = "Enable/Disable The ArmorPlus Battle Axes's Recipes") public static boolean enableBattleAxesRecipes = true; @ModConfigProperty(category = "Weapons", name = "enableBowsRecipes", comment = "Enable/Disable The ArmorPlus Bows's Recipes") public static boolean enableBowsRecipes = true; @ModConfigProperty(category = "Armors.SuperStarArmor.Effects", name = "enableSuperStarHRegen", comment = "Enable/Disable The Super Star Helmet Regeneration") </BUG> public static boolean enableSuperStarHRegen = true;
@ModConfigProperty(category = "Weapons", name = "enableSwordsRecipes", comment = "Enable/Disable ArmorPlus Sword's Recipes") @ModConfigProperty(category = "Weapons", name = "enableBattleAxesRecipes", comment = "Enable/Disable ArmorPlus Battle Axes's Recipes") @ModConfigProperty(category = "Weapons", name = "enableBowsRecipes", comment = "Enable/Disable ArmorPlus Bows's Recipes")
40,256
import org.openstreetmap.josm.tools.ImageProvider; import org.openstreetmap.josm.actions.MergeNodesAction; public class SelectAction extends MapMode implements SelectionEnded { enum Mode { move, rotate, select } private Mode mode = null; <BUG>private long mouseDownTime = 0; private Cursor oldCursor;</BUG> private Point mousePos; private SelectionManager selectionManager; private int initialMoveDelay = 100;
private boolean didMove = false; private Cursor oldCursor;
40,257
((RotateCommand)c).rotateAgain(mouseStartEN, mouseEN); else Main.main.undoRedo.add(new RotateCommand(selection, mouseStartEN, mouseEN)); } Main.map.mapView.repaint(); <BUG>mousePos = e.getPoint(); }</BUG> @Override public void mousePressed(MouseEvent e) { if (e.getButton() != MouseEvent.BUTTON1) return;
didMove = true;
40,258
if (ctrl && shift) { if (Main.ds.getSelected().isEmpty()) selectPrims(osmColl, true, false); mode = Mode.rotate; setCursor(ImageProvider.getCursor("rotate", null)); } else if (!osmColl.isEmpty()) { <BUG>if (Main.ds.getSelected().isEmpty()) selectPrims(osmColl, shift, ctrl); mode = Mode.move;</BUG> } else { mode = Mode.select; oldCursor = Main.map.mapView.getCursor();
selectPrims(osmColl, true, ctrl); mode = Mode.move;
40,259
if (mode == Mode.select) { selectionManager.unregister(Main.map.mapView); } restoreCursor(); if (mode == Mode.move) { <BUG>boolean ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0; if (ctrl) { </BUG> Collection<OsmPrimitive> selection = Main.ds.getSelected(); Collection<Node> affectedNodes = AllNodesVisitor.getAllNodes(selection);
boolean shift = (e.getModifiers() & ActionEvent.SHIFT_MASK) != 0; if (!didMove) { selectPrims( Main.map.mapView.getNearestCollection(e.getPoint()), shift, ctrl); } else if (ctrl) {
40,260
package org.openstreetmap.josm.gui; import java.awt.Point; <BUG>import java.util.Collection; import java.util.HashSet;</BUG> import java.util.TreeMap; import java.util.List; import java.util.ArrayList;
import java.util.Collections; import java.util.HashSet;
40,261
@Override public String toString() { return "desc"; } }; <BUG>public static final SortOrder DEFAULT = DESC; private static final SortOrder PROTOTYPE = DEFAULT; </BUG> @Override public SortOrder readFrom(StreamInput in) throws IOException {
return "asc"; }, DESC { private static final SortOrder PROTOTYPE = ASC;
40,262
GeoDistance geoDistance = GeoDistance.DEFAULT; boolean reverse = false; MultiValueMode sortMode = null; NestedInnerQueryParseSupport nestedHelper = null; final boolean indexCreatedBeforeV2_0 = context.indexShard().getIndexSettings().getIndexVersionCreated().before(Version.V_2_0_0); <BUG>boolean coerce = false; boolean ignoreMalformed = false; XContentParser.Token token;</BUG> String currentName = parser.currentName(); while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
boolean coerce = GeoDistanceSortBuilder.DEFAULT_COERCE; boolean ignoreMalformed = GeoDistanceSortBuilder.DEFAULT_IGNORE_MALFORMED; XContentParser.Token token;
40,263
String currentName = parser.currentName(); while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) { if (token == XContentParser.Token.FIELD_NAME) { currentName = parser.currentName(); } else if (token == XContentParser.Token.START_ARRAY) { <BUG>parseGeoPoints(parser, geoPoints); </BUG> fieldName = currentName; } else if (token == XContentParser.Token.START_OBJECT) { if ("nested_filter".equals(currentName) || "nestedFilter".equals(currentName)) {
GeoDistanceSortBuilder.parseGeoPoints(parser, geoPoints);
40,264
package org.elasticsearch.search.sort; <BUG>import org.elasticsearch.script.Script; public class SortBuilders {</BUG> public static ScoreSortBuilder scoreSort() { return new ScoreSortBuilder(); }
import org.elasticsearch.common.geo.GeoPoint; import java.util.Arrays; public class SortBuilders {
40,265
public GeoDistanceSortBuilder ignoreMalformed(boolean ignoreMalformed) { this.ignoreMalformed = ignoreMalformed; return this; }</BUG> @Override <BUG>public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject("_geo_distance"); if (geohashes.size() == 0 && points.size() == 0) { throw new ElasticsearchParseException("No points provided for _geo_distance sort."); }</BUG> builder.startArray(fieldName);
if (coerce == false) { } } public boolean ignoreMalformed() { return this.ignoreMalformed; } builder.startObject(NAME);
40,266
import java.util.ResourceBundle; public class I18n extends OERWorldMap { public Result get() { Map<String, Object> i18n = new HashMap<>(); Map<String, String> messages = new HashMap<>(); <BUG>ResourceBundle messageBundle = ResourceBundle.getBundle("messages", OERWorldMap.mLocale); for (String key : Collections.list(ResourceBundle.getBundle("messages", OERWorldMap.mLocale).getKeys())) { </BUG> try {
ResourceBundle messageBundle = ResourceBundle.getBundle("messages", getLocale()); for (String key : Collections.list(ResourceBundle.getBundle("messages", getLocale()).getKeys())) {
40,267
} catch (UnsupportedEncodingException e) { messages.put(key, messageBundle.getString(key)); } } i18n.put("messages", messages); <BUG>i18n.put("countries", Countries.map(OERWorldMap.mLocale)); i18n.put("languages", Languages.map(OERWorldMap.mLocale)); </BUG> String countryMap = new ObjectMapper().convertValue(i18n, JsonNode.class).toString();
i18n.put("countries", Countries.map(getLocale())); i18n.put("languages", Languages.map(getLocale()));
40,268
import play.libs.F; import play.mvc.*; import services.QueryContext; import java.io.UnsupportedEncodingException; import java.util.*; <BUG>public class Authorized extends Action.Simple { public static final String AUTHORIZATION = "authorization"; </BUG> @Override public F.Promise<Result> call(Http.Context ctx) throws Throwable {
private static final String AUTHORIZATION = "authorization";
40,269
public class CountryIndex extends OERWorldMap { public Result read(String id, boolean embed) throws IOException { if (!Arrays.asList(java.util.Locale.getISOCountries()).contains(id.toUpperCase())) { return notFound("Not found"); } <BUG>QueryContext queryContext = (QueryContext) ctx().args.get("queryContext"); queryContext.setFetchSource(new String[]{</BUG> "about.@id", "about.@type", "about.name", "about.alternateName", "about.location", "about.image", "about.provider.@id", "about.provider.@type", "about.provider.name", "about.provider.location", "about.participant.@id", "about.participant.@type", "about.participant.name", "about.participant.location",
QueryContext queryContext = getQueryContext(); queryContext.setFetchSource(new String[]{
40,270
filters.clear(); filters.put(Record.RESOURCE_KEY + ".location.address.addressCountry", Arrays.asList(id.toUpperCase())); ResourceList resources = mBaseRepository.query("*", 0, 9999, null, filters, queryContext); Map<String, Object> scope = new HashMap<>(); scope.put("alpha-2", id.toUpperCase()); <BUG>scope.put("name", Countries.getNameFor(id, OERWorldMap.mLocale)); </BUG> scope.put("champions", champions.getItems()); scope.put("resources", resources.toResource()); scope.put("countryAggregation", countryAggregation);
scope.put("name", Countries.getNameFor(id, getLocale()));
40,271
</BUG> scope.put("champions", champions.getItems()); scope.put("resources", resources.toResource()); scope.put("countryAggregation", countryAggregation); scope.put("embed", embed); <BUG>if (request().accepts("text/html")) { return ok(render(Countries.getNameFor(id, OERWorldMap.mLocale), "CountryIndex/read.mustache", scope)); </BUG> } else {
filters.clear(); filters.put(Record.RESOURCE_KEY + ".location.address.addressCountry", Arrays.asList(id.toUpperCase())); ResourceList resources = mBaseRepository.query("*", 0, 9999, null, filters, queryContext); Map<String, Object> scope = new HashMap<>(); scope.put("alpha-2", id.toUpperCase()); scope.put("name", Countries.getNameFor(id, getLocale())); if (ctx().request().accepts("text/html")) { return ok(render(Countries.getNameFor(id, getLocale()), "CountryIndex/read.mustache", scope));
40,272
private String letschatRoomExpression = "fabric8_${namespace}"; private GitRepoClient gitRepoClient; private boolean recreateMode; private String namespace; private KubernetesClient kubernetes; <BUG>private boolean tryLoadConfigFileFromRemoteGit = true; @Override</BUG> public String toString() { return "DevOpsConnector{" + "gitUrl='" + gitUrl + '\'' +
private boolean modifiedConfig; @Override
40,273
package io.fabric8.devops; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import io.fabric8.utils.Strings; import java.util.ArrayList; <BUG>import java.util.List; @JsonInclude(JsonInclude.Include.NON_EMPTY)</BUG> public class ProjectConfig { private List<String> flows = new ArrayList<>(); private String chatRoom;
import java.util.Map; import java.util.TreeMap; @JsonInclude(JsonInclude.Include.NON_EMPTY)
40,274
public void testGenerateYaml() throws Exception { ProjectConfig config = new ProjectConfig(); config.addFlow("io.fabric8.flow.maven.Deploy.groovy"); config.setChatRoom("myroom"); config.setCodeReview(true); <BUG>config.setIssueProjectName("THING"); String yaml = ProjectConfigs.toYaml(config);</BUG> System.out.println("Config: " + config + " is yaml: " + yaml); } @Test
config.addLink("Room", "http://letschat.vagrant.f8/rooms/foo"); config.addLink("Jenkins", "http://jenkins.vagrant.f8/builds/foo"); String yaml = ProjectConfigs.toYaml(config);
40,275
customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString()); customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName); customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString()); customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName); customTokens.put("%%mlTraceForestsPerHost%%", hubConfig.traceForestsPerHost.toString()); <BUG>customTokens.put("%%mlModulesDbName%%", hubConfig.modulesDbName); }</BUG> public void init() { try { LOGGER.error("PLUGINS DIR: " + pluginsDir.toString());
customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName); customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName); }
40,276
}else if(programsSelected.size() == 1){ lytProgsPanel.setVisibility(View.VISIBLE); lytProg2MAHAdsExtDlg.setVisibility(View.GONE); prog1 = programsSelected.get(0); ((TextView)view.findViewById(R.id.tvProg1NameMAHAdsExtDlg)).setText(prog1.getName()); <BUG>if (prog1.getImg() != null && !prog1.getImg().trim().isEmpty()) { ((SmartImageView)view.findViewById(R.id.ivProg1ImgMAHAds)).setImageUrl(MAHAdsController.urlRootOnServer + prog1.getImg()); } AngledLinearLayout prog1LytNewText = (AngledLinearLayout)view.findViewById(R.id.lytProg1NewText);</BUG> if(prog1.isNewPrgram()){
Picasso.with(view.getContext()) .load(MAHAdsController.urlRootOnServer + prog1.getImg()) .placeholder(R.drawable.img_place_holder_normal) .error(R.drawable.img_not_found) .into((ImageView) view.findViewById(R.id.ivProg1ImgMAHAds)); AngledLinearLayout prog1LytNewText = (AngledLinearLayout)view.findViewById(R.id.lytProg1NewText);
40,277
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding maxY = src.getMaxY() - 2; // Bottom padding </BUG> }
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
40,278
final int lineStride = dst.getScanlineStride(); final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final byte[][] data = dst.getByteDataArrays(); final float[] warpData = new float[2 * dstWidth]; <BUG>int lineOffset = 0; if (ctable == null) { // source does not have IndexColorModel if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset;
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
40,279
pixelOffset += pixelStride; } // COLS LOOP } // ROWS LOOP } } else {// source has IndexColorModel <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += lineStride; warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
} else if (caseB) { for (int h = 0; h < dstHeight; h++) {
40,280
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding maxY = src.getMaxY() - 2; // Bottom padding </BUG> }
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
40,281
final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final short[][] data = dst.getShortDataArrays(); final float[] warpData = new float[2 * dstWidth]; int lineOffset = 0; <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += lineStride; warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
40,282
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding maxY = src.getMaxY() - 2; // Bottom padding </BUG> }
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
40,283
final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final short[][] data = dst.getShortDataArrays(); final float[] warpData = new float[2 * dstWidth]; int lineOffset = 0; <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += lineStride; warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
40,284
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding maxY = src.getMaxY() - 2; // Bottom padding </BUG> }
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
40,285
final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final int[][] data = dst.getIntDataArrays(); final float[] warpData = new float[2 * dstWidth]; int lineOffset = 0; <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += lineStride; warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
40,286
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding maxY = src.getMaxY() - 2; // Bottom padding </BUG> }
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
40,287
final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final float[][] data = dst.getFloatDataArrays(); final float[] warpData = new float[2 * dstWidth]; int lineOffset = 0; <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += lineStride; warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
40,288
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding maxY = src.getMaxY() - 2; // Bottom padding </BUG> }
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
40,289
final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final double[][] data = dst.getDoubleDataArrays(); final float[] warpData = new float[2 * dstWidth]; int lineOffset = 0; <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += lineStride; warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
40,290
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
40,291
} @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);
40,292
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 != null) { c.moveToFirst(); }
MemoEntry.COLUMN_ORDER + " ASC", null);
40,293
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(
40,294
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.Adapter<RecyclerView.ViewHolder> implements EditMode { </BUG> private List<MemoEntity> memoList;
import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter; public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
40,295
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, EditMemoDialogFragment.MemoCallback callback) { this.mActivity = activity;</BUG> this.topicId = topicId; this.memoList = memoList;
public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) { super(recyclerView); this.mActivity = activity;
40,296
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) {
40,297
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;
40,298
@Path("jobs/{jobName}") @GET public long jobName(final @PathParam("jobName") String jobName, final @Context UriInfo uriInfo) throws Exception { final Properties jobParams = new Properties(); <BUG>jobParams.setProperty("param1 key", "param1 value"); final ProducerTemplate producerTemplate = camelContext.createProducerTemplate(); producerTemplate.setDefaultEndpointUri(getJBeretComponentUri(uriInfo, null)); final Long jobExecutionId = producerTemplate.requestBody(jobParams, long.class); producerTemplate.stop(); return jobExecutionId;</BUG> }
return requestBody(getJBeretComponentUri(uriInfo, null), jobParams, long.class);
40,299
return jobExecutionId;</BUG> } @Path("jobs/{jobName}/start") @GET public long jobNameStart(final @PathParam("jobName") String jobName, <BUG>final @Context UriInfo uriInfo) throws Exception { final ProducerTemplate producerTemplate = camelContext.createProducerTemplate(); producerTemplate.setDefaultEndpointUri(getJBeretComponentUri(uriInfo, null)); final Long jobExecutionId = producerTemplate.requestBody((Properties) null, long.class); producerTemplate.stop(); return jobExecutionId;</BUG> }
@Path("jobs/{jobName}") public long jobName(final @PathParam("jobName") String jobName, final Properties jobParams = new Properties(); jobParams.setProperty("param1 key", "param1 value"); return requestBody(getJBeretComponentUri(uriInfo, null), jobParams, long.class); return requestBody(getJBeretComponentUri(uriInfo, null), null, long.class);
40,300
package com.jetbrains.python.testing.pytest; import com.intellij.execution.ExecutionException; import com.intellij.execution.Executor; import com.intellij.execution.configurations.*; import com.intellij.execution.runners.ExecutionEnvironment; <BUG>import com.intellij.openapi.options.SettingsEditor; import com.intellij.openapi.util.InvalidDataException;</BUG> import com.intellij.openapi.util.JDOMExternalizerUtil; import com.intellij.openapi.util.WriteExternalException; import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.projectRoots.Sdk; import com.intellij.openapi.util.InvalidDataException;