id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
39,801
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;
39,802
} public QueryOperation() { } @Override public void run() throws Exception { <BUG>List<Integer> initialPartitions = mapService.getOwnedPartitions().get(); IndexService indexService = mapService.getMapContainer(name).getIndexService();</BUG> Set<QueryableEntry> entries = null; if (!getNodeEngine().getPartitionService()....
List<Integer> initialPartitions = mapService.getOwnedPartitions(); IndexService indexService = mapService.getMapContainer(name).getIndexService();
39,803
result.add(new QueryResultEntryImpl(entry.getKeyData(), entry.getKeyData(), entry.getValueData())); } } else { runParallel(initialPartitions); } <BUG>List<Integer> finalPartitions = mapService.getOwnedPartitions().get(); if (initialPartitions.equals(finalPartitions)) {</BUG> result.setPartitionIds(finalPartitions); } i...
List<Integer> finalPartitions = mapService.getOwnedPartitions(); if (initialPartitions.equals(finalPartitions)) {
39,804
import com.hazelcast.monitor.impl.LocalMapStatsImpl; import com.hazelcast.nio.Address; import com.hazelcast.nio.ClassLoaderUtil; import com.hazelcast.nio.serialization.Data; import com.hazelcast.nio.serialization.SerializationService; <BUG>import com.hazelcast.partition.MigrationEndpoint; import com.hazelcast.partitio...
import com.hazelcast.partition.*; import com.hazelcast.partition.PartitionService;
39,805
public void commitMigration(PartitionMigrationEvent event) { migrateIndex(event); if (event.getMigrationEndpoint() == MigrationEndpoint.SOURCE) { clearPartitionData(event.getPartitionId()); } <BUG>ownedPartitions.set(nodeEngine.getPartitionService().getMemberPartitions(nodeEngine.getThisAddress())); }</BUG> private voi...
ownedPartitions.set(getMemberPartitions());
39,806
import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.widget.LinearLayout; public class StatusBarUtil { <BUG>public static final int DEFAULT_STATUS_BAR_ALPHA = 112; public static void setColor(Activity activity, @ColorInt int color) {</BUG> setColor(activity, color, ...
public static final int FAKE_STATUS_BAR_VIEW_ID = R.id.statusbarutil_fake_status_bar_view; public static final int FAKE_TRANSLUCENT_VIEW_ID = R.id.statusbarutil_translucent_view; public static void setColor(Activity activity, @ColorInt int color) {
39,807
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { return; } transparentStatusBar(activity); ViewGroup contentView = (ViewGroup) activity.findViewById(android.R.id.content); <BUG>if (contentView.getChildCount() > 1) { contentView.getChildAt(1).setBackgroundColor(color); } else {</BUG> contentView.addView(createS...
View fakeStatusBarView = contentView.findViewById(FAKE_STATUS_BAR_VIEW_ID); if (fakeStatusBarView != null) { if (fakeStatusBarView.getVisibility() == View.GONE) { fakeStatusBarView.setVisibility(View.VISIBLE); fakeStatusBarView.setBackgroundColor(color); } else {
39,808
activity.getWindow().setStatusBarColor(Color.TRANSPARENT); } else { activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); } ViewGroup contentLayout = (ViewGroup) drawerLayout.getChildAt(0); <BUG>if (contentLayout.getChildCount() > 0 && contentLayout.getChildAt(0) instanceof StatusBarView) {...
View fakeStatusBarView = contentLayout.findViewById(FAKE_STATUS_BAR_VIEW_ID); if (fakeStatusBarView != null) { if (fakeStatusBarView.getVisibility() == View.GONE) { fakeStatusBarView.setVisibility(View.VISIBLE); fakeStatusBarView.setBackgroundColor(color); contentLayout.addView(createStatusBarView(activity, color), 0);...
39,809
rootView.setPadding(0, 0, 0, 0); } } private static void addTranslucentView(Activity activity, int statusBarAlpha) { ViewGroup contentView = (ViewGroup) activity.findViewById(android.R.id.content); <BUG>if (contentView.getChildCount() > 1) { contentView.getChildAt(1).setBackgroundColor(Color.argb(statusBarAlpha, 0, 0, ...
View fakeTranslucentView = contentView.findViewById(FAKE_TRANSLUCENT_VIEW_ID); if (fakeTranslucentView != null) { if (fakeTranslucentView.getVisibility() == View.GONE) { fakeTranslucentView.setVisibility(View.VISIBLE); fakeTranslucentView.setBackgroundColor(Color.argb(statusBarAlpha, 0, 0, 0));
39,810
private static StatusBarView createStatusBarView(Activity activity, @ColorInt int color, int alpha) { StatusBarView statusBarView = new StatusBarView(activity); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, getStatusBarHeight(activity)); statusBarView.setLayoutPar...
statusBarView.setId(FAKE_STATUS_BAR_VIEW_ID); return statusBarView;
39,811
private static StatusBarView createTranslucentStatusBarView(Activity activity, int alpha) { StatusBarView statusBarView = new StatusBarView(activity); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, getStatusBarHeight(activity)); statusBarView.setLayoutParams(params...
statusBarView.setId(FAKE_TRANSLUCENT_VIEW_ID); return statusBarView;
39,812
return new PointerReader(segment, location, nestingLimit); } public boolean isNull() { return this.segment.buffer.getLong(this.pointer) == 0; } <BUG>public StructReader getStruct() { return WireHelpers.readStructPointer(this.segment, this.pointer,</BUG> null, 0,
public <T> T getStruct(FromStructReader<T> factory) { return WireHelpers.readStructPointer(factory, this.pointer,
39,813
public final PointerReader reader; public Reader(PointerReader reader) { this.reader = reader; } public final <T> T getAsStruct(FromStructReader<T> factory) { <BUG>return factory.fromStructReader(this.reader.getStruct()); }</BUG> public final <T> T getAsList(FromPointerReader<T> factory) { return factory.fromPointerRea...
return this.reader.getStruct(factory);
39,814
public final PointerBuilder builder; public Builder(PointerBuilder builder) { this.builder = builder; } public final <T> T initAsStruct(FromStructBuilder<T> factory) { <BUG>return factory.fromStructBuilder(this.builder.initStruct(factory.structSize())); }</BUG> public final void clear() { this.builder.clear(); }
return this.builder.initStruct(factory);
39,815
public int idx = 0; public Iterator(Reader<T> list) { this.list = list; } public T next() { <BUG>return list.factory.fromStructReader(list.reader.getStructElement(idx++)); }</BUG> public boolean hasNext() { return idx < list.size(); }
return list.reader.getStructElement(factory, idx++);
39,816
public int idx = 0; public Iterator(Builder<T> list) { this.list = list; } public T next() { <BUG>return list.factory.fromStructBuilder(list.builder.getStructElement(idx++)); }</BUG> public boolean hasNext() { return idx < list.size(); }
public Iterator(Reader<T> list) { return list.reader.getStructElement(factory, idx++);
39,817
package org.capnproto; <BUG>public final class StructBuilder { final SegmentBuilder segment; final int data; // byte offset to data section final int pointers; // word offset of pointer section final int dataSize; // in bits final short pointerCount; final byte bit0Offset; </BUG> public StructBuilder(SegmentBuilde...
public class StructBuilder { protected final SegmentBuilder segment; protected final int data; // byte offset to data section protected final int pointers; // word offset of pointer section protected final int dataSize; // in bits protected final short pointerCount; protected final byte bit0Offset;
39,818
this.pointers = pointers; this.dataSize = dataSize; this.pointerCount = pointerCount; this.bit0Offset = bit0Offset; } <BUG>public final StructReader asReader() { return new StructReader(this.segment, this.data, this.pointers, this.dataSize, this.pointerCount, this.bit0Offset, 0x7fffffff); } public final boolean getBool...
public final boolean _getBooleanField(int offset) {
39,819
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 androi...
import static ml.puredark.hviewer.R.id.container; public class PictureViewerAdapter extends RecyclerView.Adapter<PictureViewerAdapter.PictureViewerViewHolder> {
39,820
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...
} 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.extr...
39,821
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.pured...
import ml.puredark.hviewer.beans.PictureRule; import ml.puredark.hviewer.beans.Rule;
39,822
inputGalleryRulePictureUrlReplacement.setText(site.galleryRule.pictureUrl.replacement); } if (site.galleryRule.pictureHighRes != null) { inputGalleryRulePictureHighResSelector.setText(joinSelector(site.galleryRule.pictureHighRes)); inputGalleryRulePictureHighResRegex.setText(site.galleryRule.pictureHighRes.regex); <BUG...
[DELETED]
39,823
inputExtraRuleCommentDatetimeReplacement.setText(site.extraRule.commentDatetime.replacement); } if (site.extraRule.commentContent != null) { inputExtraRuleCommentContentSelector.setText(joinSelector(site.extraRule.commentContent)); inputExtraRuleCommentContentRegex.setText(site.extraRule.commentContent.regex); <BUG>inp...
[DELETED]
39,824
lastSite.galleryRule.cover = loadSelector(inputGalleryRuleCoverSelector, inputGalleryRuleCoverRegex, inputGalleryRuleCoverReplacement); lastSite.galleryRule.category = loadSelector(inputGalleryRuleCategorySelector, inputGalleryRuleCategoryRegex, inputGalleryRuleCategoryReplacement); lastSite.galleryRule.datetime = load...
lastSite.galleryRule.pictureRule = (lastSite.galleryRule.pictureRule == null) ? new PictureRule() : lastSite.galleryRule.pictureRule; lastSite.galleryRule.pictureRule.thumbnail = loadSelector(inputGalleryRulePictureThumbnailSelector, inputGalleryRulePictureThumbnailRegex, inputGalleryRulePictureThumbnailReplacement); l...
39,825
lastSite.extraRule.cover = loadSelector(inputExtraRuleCoverSelector, inputExtraRuleCoverRegex, inputExtraRuleCoverReplacement); lastSite.extraRule.category = loadSelector(inputExtraRuleCategorySelector, inputExtraRuleCategoryRegex, inputExtraRuleCategoryReplacement); lastSite.extraRule.datetime = loadSelector(inputExtr...
lastSite.extraRule.pictureRule = (lastSite.extraRule.pictureRule == null) ? new PictureRule() : lastSite.extraRule.pictureRule; lastSite.extraRule.pictureRule.thumbnail = loadSelector(inputExtraRulePictureThumbnailSelector, inputExtraRulePictureThumbnailRegex, inputExtraRulePictureThumbnailReplacement); lastSite.extraR...
39,826
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]
39,827
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.pic...
&& 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.ext...
39,828
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...
new Handler(Looper.getMainLooper()).post(() -> {
39,829
package com.ge.predix.acs.rest; <BUG>import java.util.Set; import org.apache.commons.lang.builder.EqualsBuilder;</BUG> import org.apache.commons.lang.builder.HashCodeBuilder; import com.ge.predix.acs.model.Attribute; import io.swagger.annotations.ApiModel;
import java.util.LinkedHashSet; import org.apache.commons.lang.builder.EqualsBuilder;
39,830
hashCodeBuilder.append(this.action).append(this.resourceIdentifier).append(this.subjectIdentifier); if (null != this.subjectAttributes) { for (Attribute attribute : this.subjectAttributes) { hashCodeBuilder.append(attribute); } <BUG>} return hashCodeBuilder.toHashCode();</BUG> } @Override public boolean equals(final Ob...
for (String policyID : this.policySetsEvaluationOrder) { hashCodeBuilder.append(policyID); return hashCodeBuilder.toHashCode();
39,831
package com.ge.predix.acs.policy.evaluation.cache; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; <BUG>import java.util.HashSet; import java.util.List;</BUG> import java.util.Map; import java.util.Set; import java.util.stream.Collectors;
import java.util.LinkedHashSet; import java.util.List;
39,832
keys.add(key.toRedisKey()); return keys; } private void logCacheGetDebugMessages(final PolicyEvaluationRequestCacheKey key, final String redisKey, final List<String> keys, final List<String> values) { <BUG>if (LOGGER.isDebugEnabled()) { LOGGER.debug(String.format("Getting timestamp for policy set: '%s', key: '%s', time...
LinkedHashSet<String> policySetIds = key.getPolicySetIds(); policySetIds.forEach(policySetId -> LOGGER policySetId, keys.get(0), values.get(0))));
39,833
this.privilegeHelper.putResource(this.acsAdminRestTemplate, resource, endpoint, this.acsZone1Headers, this.privilegeHelper.getDefaultOrgAttribute()); this.privilegeHelper.putSubject(this.acsAdminRestTemplate, subject, endpoint, this.acsZone1Headers, this.privilegeHelper.getDefaultAttribute(), this.privilegeHelper.getDe...
this.policyHelper.setTestPolicy(this.acsAdminRestTemplate, this.acsZone1Headers, endpoint, policyFile);
39,834
Assert.assertEquals(postForEntity.getStatusCode(), HttpStatus.OK); responseBody = postForEntity.getBody(); Assert.assertEquals(responseBody.getEffect(), Effect.NOT_APPLICABLE); } @Test <BUG>public void testPolicyEvalCacheWhenResourceDeleted() throws Exception { BaseResource resource = new BaseResource("/secured-by-val...
PolicyEvaluationResult responseBody = postForEntity.getBody(); Assert.assertEquals(responseBody.getEffect(), Effect.PERMIT); this.privilegeHelper.putResource(this.acsAdminRestTemplate, resource, endpoint, this.acsZone1Headers, this.privilegeHelper.getAlternateOrgAttribute()); postForEntity = this.acsAdminRestTemplate.p...
39,835
MARISSA_V1.getSubjectIdentifier(), "/v1/site/1/plant/asset/1", null); String endpoint = this.acsUrl; this.privilegeHelper.putSubject(this.acsAdminRestTemplate, subject, endpoint, this.acsZone1Headers, this.privilegeHelper.getDefaultAttribute(), this.privilegeHelper.getDefaultOrgAttribute()); String policyFile = "src/te...
this.policyHelper.setTestPolicy(this.acsAdminRestTemplate, this.acsZone1Headers, endpoint, policyFile);
39,836
package com.ge.predix.test.utils; import static com.ge.predix.test.utils.ACSTestUtil.ACS_VERSION; import java.io.File; import java.io.IOException; import java.net.URI; <BUG>import java.util.Collections; import java.util.Random;</BUG> import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; i...
import java.util.LinkedHashSet; import java.util.Random;
39,837
public PolicyEvaluationRequestV1 createRandomEvalRequest() { Random r = new Random(System.currentTimeMillis()); Set<Attribute> subjectAttributes = Collections.emptySet(); return this.createEvalRequest(ACTIONS[r.nextInt(4)], String.valueOf(r.nextLong()), "/alarms/sites/" + String.valueOf(r.nextLong()), subjectAttributes...
public PolicyEvaluationRequestV1 createMultiplePolicySetsEvalRequest(final String action, final String subjectIdentifier, final String resourceIdentifier, final Set<Attribute> subjectAttributes, final LinkedHashSet<String> policySetIds) {
39,838
b.setSubjectAttributes( </BUG> new HashSet<Attribute>( Arrays.asList( new Attribute[] { <BUG>new Attribute("issuer", "role"), new Attribute("issuer", "group") }))); Assert.assertEquals(a, b);</BUG> }
b.setPolicySetsEvaluationOrder(EVALUATION_ORDER_P1_P2); Assert.assertEquals(a, b);
39,839
new Attribute("issuer", "role"), new Attribute("issuer", "group") }))); Assert.assertNotEquals(a, b); } <BUG>@Test public void testHashCodeNoAttributes() {</BUG> PolicyEvaluationRequestV1 a = new PolicyEvaluationRequestV1(); a.setSubjectIdentifier("subject"); a.setAction("GET");
b.setPolicySetsEvaluationOrder(EVALUATION_ORDER_P1_P2); Assert.assertEquals(a, b); public void testEqualsThisHasNoAttributes() {
39,840
b.setResourceIdentifier("/resource"); b.setSubjectAttributes( new HashSet<Attribute>( Arrays.asList( new Attribute[] { <BUG>new Attribute("issuer", "role"), new Attribute("issuer", "group") }))); Assert.assertEquals(a.hashCode(), b.hashCode());</BUG> }
Assert.assertNotEquals(a, b);
39,841
new Attribute("issuer", "role"), new Attribute("issuer", "group") }))); Assert.assertNotEquals(a.hashCode(), b.hashCode()); } <BUG>@Test public void testHashCodeDifferentAttributes() {</BUG> PolicyEvaluationRequestV1 a = new PolicyEvaluationRequestV1(); a.setSubjectIdentifier("subject"); a.setAction("GET");
Assert.assertNotEquals(a, b); public void testEqualsDifferentAttributes() {
39,842
import org.spongepowered.api.world.Locatable; import org.spongepowered.api.world.Location; import org.spongepowered.api.world.World; import javax.annotation.Nullable; import java.util.List; <BUG>import java.util.Optional; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG> public class CommandDel...
import java.util.stream.Stream; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
39,843
.append(Text.of(TextColors.GREEN, "Usage: ")) .append(getUsage(source)) .build()); return CommandResult.empty(); } else if (isIn(REGIONS_ALIASES, parse.args[0])) { <BUG>if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!")); IRegion region = FGManager.getInstance().getRegion(parse.args[1...
String regionName = parse.args[1]; IRegion region = FGManager.getInstance().getRegion(regionName).orElse(null);
39,844
</BUG> isWorldRegion = true; } if (region == null) <BUG>throw new CommandException(Text.of("No region exists with the name \"" + parse.args[1] + "\"!")); if (region instanceof GlobalWorldRegion) { </BUG> throw new CommandException(Text.of("You may not delete the global region!")); }
if (world == null) throw new CommandException(Text.of("No world exists with name \"" + worldName + "\"!")); if (world == null) throw new CommandException(Text.of("Must specify a world!")); region = FGManager.getInstance().getWorldRegion(world, regionName).orElse(null); throw new CommandException(Text.of("No region exis...
39,845
source.getName() + " deleted " + (isWorldRegion ? "world" : "") + "region" ); return CommandResult.success(); } else if (isIn(HANDLERS_ALIASES, parse.args[0])) { if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!")); <BUG>IHandler handler = FGManager.getInstance().gethandler(parse.args[...
Optional<IHandler> handlerOpt = FGManager.getInstance().gethandler(parse.args[1]); if (!handlerOpt.isPresent()) IHandler handler = handlerOpt.get(); if (handler instanceof GlobalHandler)
39,846
.excludeCurrent(true) .autoCloseQuotes(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "handler").stream() .filter(new StartsWithPredicate(parse.current.token))</BUG> .map(args -> parse.current.prefix...
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
39,847
.excludeCurrent(true) .autoCloseQuotes(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "handler").stream() .filter(new StartsWithPredicate(parse.current.token))</BUG> .map(args -> parse.current.prefix...
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
39,848
@Dependency(id = "foxcore") }, description = "A world protection plugin built for SpongeAPI. Requires FoxCore.", authors = {"gravityfox"}, url = "https://github.com/FoxDenStudio/FoxGuard") <BUG>public final class FoxGuardMain { public final Cause pluginCause = Cause.builder().named("plugin", this).build(); private stat...
private static FoxGuardMain instanceField;
39,849
private UserStorageService userStorage; private EconomyService economyService = null; private boolean loaded = false; private FCCommandDispatcher fgDispatcher; public static FoxGuardMain instance() { <BUG>return instanceField; }</BUG> @Listener public void construct(GameConstructionEvent event) { instanceField = this;
} public static Cause getCause() { return instance().pluginCause; }
39,850
return configDirectory; } public boolean isLoaded() { return loaded; } <BUG>public static Cause getCause() { return instance().pluginCause; }</BUG> public EconomyService getEconomyService() { return economyService;
[DELETED]
39,851
import org.spongepowered.api.world.Locatable; import org.spongepowered.api.world.Location; import org.spongepowered.api.world.World; import javax.annotation.Nullable; import java.util.*; <BUG>import java.util.stream.Collectors; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG> public class Comm...
import java.util.stream.Stream; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
39,852
.excludeCurrent(true) .autoCloseQuotes(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "handler").stream() .filter(new StartsWithPredicate(parse.current.token))</BUG> .map(args -> parse.current.prefix...
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
39,853
private static FGStorageManager instance; private final Logger logger = FoxGuardMain.instance().getLogger();</BUG> private final Set<LoadEntry> loaded = new HashSet<>(); private final Path directory = getDirectory(); private final Map<String, Path> worldDirectories; <BUG>private FGStorageManager() { defaultModifiedMap ...
public final HashMap<IFGObject, Boolean> defaultModifiedMap; private final UserStorageService userStorageService; private final Logger logger = FoxGuardMain.instance().getLogger(); userStorageService = FoxGuardMain.instance().getUserStorage(); defaultModifiedMap = new CacheMap<>((k, m) -> {
39,854
String name = fgObject.getName(); Path singleDir = dir.resolve(name.toLowerCase()); </BUG> boolean shouldSave = fgObject.shouldSave(); if (force || shouldSave) { <BUG>logger.info((shouldSave ? "S" : "Force s") + "aving handler \"" + name + "\" in directory: " + singleDir); </BUG> constructDirectory(singleDir); try { fg...
UUID owner = fgObject.getOwner(); boolean isOwned = !owner.equals(SERVER_UUID); Optional<User> userOwner = userStorageService.get(owner); String logName = (userOwner.isPresent() ? userOwner.get().getName() + ":" : "") + (isOwned ? owner + ":" : "") + name; if (fgObject.autoSave()) { Path singleDir = serverDir.resolve(n...
39,855
if (fgObject.autoSave()) { Path singleDir = dir.resolve(name.toLowerCase()); </BUG> boolean shouldSave = fgObject.shouldSave(); if (force || shouldSave) { <BUG>logger.info((shouldSave ? "S" : "Force s") + "aving world region \"" + name + "\" in directory: " + singleDir); </BUG> constructDirectory(singleDir); try { fgOb...
Path singleDir = serverDir.resolve(name.toLowerCase()); logger.info((shouldSave ? "S" : "Force s") + "aving world region " + logName + " in directory: " + singleDir);
39,856
public synchronized void loadRegionLinks() { logger.info("Loading region links"); try (DB mainDB = DBMaker.fileDB(directory.resolve("regions.foxdb").normalize().toString()).make()) { Map<String, String> linksMap = mainDB.hashMap("links", Serializer.STRING, Serializer.STRING).createOrOpen(); linksMap.entrySet().forEach(...
Optional<IRegion> regionOpt = FGManager.getInstance().getRegion(entry.getKey()); if (regionOpt.isPresent()) { IRegion region = regionOpt.get(); logger.info("Loading links for region \"" + region.getName() + "\"");
39,857
public synchronized void loadWorldRegionLinks(World world) { logger.info("Loading world region links for world \"" + world.getName() + "\""); try (DB mainDB = DBMaker.fileDB(worldDirectories.get(world.getName()).resolve("wregions.foxdb").normalize().toString()).make()) { Map<String, String> linksMap = mainDB.hashMap("l...
Optional<IWorldRegion> regionOpt = FGManager.getInstance().getWorldRegion(world, entry.getKey()); if (regionOpt.isPresent()) { IWorldRegion region = regionOpt.get(); logger.info("Loading links for world region \"" + region.getName() + "\"");
39,858
StringBuilder builder = new StringBuilder(); for (Iterator<IHandler> it = handlers.iterator(); it.hasNext(); ) { builder.append(it.next().getName()); if (it.hasNext()) builder.append(","); } <BUG>return builder.toString(); }</BUG> private final class LoadEntry { public final String name; public final Type type;
public enum Type { REGION, WREGION, HANDLER
39,859
.autoCloseQuotes(true) .leaveFinalAsIs(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "worldregion", "handler", "controller").stream() </BUG> .filter(new StartsWithPredicate(parse.current.token)) .co...
return Stream.of("region", "worldregion", "handler", "controller")
39,860
public DefaultGrailsCodecClass(Class<?> clazz) { super(clazz, CODEC); initializeCodec();</BUG> } <BUG>private void initializeCodec() { Integer orderSetting = getPropertyOrStaticPropertyOrFieldValue("order", Integer.class);</BUG> if (orderSetting != null) { order = orderSetting; } if (Encoder.class.isAssignableFrom(getC...
public void afterPropertiesSet() { initializeCodec(); if (initialized) return; initialized = true; Integer orderSetting = getPropertyOrStaticPropertyOrFieldValue("order", Integer.class);
39,861
if (orderSetting != null) { order = orderSetting; } if (Encoder.class.isAssignableFrom(getClazz())) { encoder = (Encoder)getReferenceInstance(); <BUG>autowireCodecBean(encoder); if (encoder instanceof Ordered) {</BUG> order = ((Ordered)encoder).getOrder(); } }
encoder = (Encoder)autowireCodecBean(encoder); if (encoder instanceof Ordered) {
39,862
order = ((Ordered)encoder).getOrder(); } } if (Decoder.class.isAssignableFrom(getClazz())) { decoder = (Decoder)getReferenceInstance(); <BUG>autowireCodecBean(decoder); if (decoder instanceof Ordered) {</BUG> order = ((Ordered)decoder).getOrder(); } }
decoder = (Decoder)autowireCodecBean(decoder); if (decoder instanceof Ordered) {
39,863
return encoder; } public Decoder getDecoder() { return decoder; } <BUG>public void setGrailsApplication(GrailsApplication grailsApplication) { if (grailsApplication == null || grailsApplication.getFlatConfig() == null) {</BUG> return; } Object htmlCodecSetting = grailsApplication.getFlatConfig().get(CONFIG_PROPERTY_GSP...
this.grailsApplication = grailsApplication; public void afterPropertiesSet() { if (grailsApplication == null || grailsApplication.getFlatConfig() == null) {
39,864
vaction.setChecked(false); form.getToolBarManager().add(haction); form.getToolBarManager().add(vaction); } private static void writeRObj(String outputLoc, CorpusClass cls) throws Exception{ <BUG>String saveLocation = "\"" + outputLoc + File.separator + cls.getParent().getCorpusName() + "-" + cls.getClassName() + ".RDat...
String saveLocation = "\"" + outputLoc + File.separator + cls.getParent().getCorpusName().replace(" ", "_") + "-" + cls.getClassName().replace(" ", "_") + ".RData" + "\"";
39,865
if(jsonFiles[i].endsWith(".json")){ corpusClassLocation = corpusLocation + File.separator + jsonFiles[i]; break; } } <BUG>String corpusName = cls.getClassName(); ScriptEngineManager manager = new ScriptEngineManager();</BUG> ScriptEngine engine = manager.getEngineByName("Renjin"); if(engine == null) { throw new Excepti...
corpusName = corpusName.replace(" ", "_"); ScriptEngineManager manager = new ScriptEngineManager();
39,866
JSONObject singleJsonObject = (JSONObject)arrayIterator.next(); keyIterator = keySet.iterator(); while(keyIterator.hasNext()){ key = keyIterator.next(); if(singleJsonObject.containsKey(key)){ <BUG>String data = singleJsonObject.get(key).toString(); data = data.replaceAll("\"", " ").replaceAll("\'", " ").replaceAll("\\n...
data = data.toLowerCase() .replaceAll("-", " ") .replaceAll("[^a-z0-9. ]", "") .replaceAll("\\s+", " ") data = data.replaceAll("\"", " ").replaceAll("\'", " ").replaceAll("\\n", " ").replaceAll("\\r", " ").trim();
39,867
if(jsonFiles[i].endsWith(".json")){ corpusClassLocation = corpusLocation + File.separator + jsonFiles[i]; break; } } <BUG>String corpusName = cls.getClassName(); </BUG> try { JSONParser jsonParser = new JSONParser(); JSONArray entireJsonArray = (JSONArray)jsonParser.parse(new FileReader(new File(corpusClassLocation)));...
String corpusName = cls.getClassName().replace(" ", "_");
39,868
StringBuffer singleCsvEntry= new StringBuffer(); keyIterator = keySet.iterator(); while(keyIterator.hasNext()){ key = keyIterator.next(); if(singleJsonObject.containsKey(key)){ <BUG>String data = singleJsonObject.get(key).toString(); data = data.replaceAll("\"", " ").replaceAll("\'", " ").replaceAll("\\n", " ").replace...
data = data.toLowerCase() .replaceAll("-", " ") .replaceAll("[^a-z0-9. ]", "") .replaceAll("\\s+", " ") data = data.replaceAll("\"", " ").replaceAll("\'", " ").replaceAll("\\n", " ").replaceAll(",", " ").replaceAll("\\r", " ").trim();
39,869
ConsoleView.printlInConsoleln("CSV file saved at : " + saveLocation); } private static void writeCSVforReddit(String outputLoc, CorpusClass cls)throws Exception{ JSONParser jsonParser = new JSONParser(); RedditJsonHandler redditJsonHandler = new RedditJsonHandler(); <BUG>String saveLocation =outputLoc + File.separator ...
String saveLocation =outputLoc + File.separator + cls.getParent().getCorpusName().replace(" ", "_") + "-" + cls.getClassName().replace(" ", "_") + ".csv";
39,870
</BUG> FileWriter fileWriter = new FileWriter(new File(saveLocation)); String corpusLocation = cls.getTacitLocation(); File corpusDirectory = new File(corpusLocation); String[] jsonFiles = corpusDirectory.list(); <BUG>String corpusName = cls.getClassName(); </BUG> try { String singleRedditLocation = "" ; JSONObject sin...
ConsoleView.printlInConsoleln("CSV file saved at : " + saveLocation); } private static void writeCSVforReddit(String outputLoc, CorpusClass cls)throws Exception{ JSONParser jsonParser = new JSONParser(); RedditJsonHandler redditJsonHandler = new RedditJsonHandler(); String saveLocation =outputLoc + File.separator + cls...
39,871
JSONObject post = (JSONObject)singleReddit.get("post"); keyIterator = keySet.iterator(); while(keyIterator.hasNext()){ key = keyIterator.next(); if(post.containsKey(key)){ <BUG>String data = post.get(key).toString(); data = data.replaceAll("\"", " ").replaceAll("\'", " ").replaceAll("\\n", " ").replaceAll(",", " ").tri...
data = data.toLowerCase() .replaceAll("-", " ") .replaceAll("[^a-z0-9. ]", "") .replaceAll("\\s+", " ") data = data.replaceAll("\"", " ").replaceAll("\'", " ").replaceAll("\\n", " ").replaceAll(",", " ").replace("\\r", " ").trim();
39,872
String[] redditPostComments = redditJsonHandler.getPostComments(singleReddit); int remainingComments = maxComments; if (redditPostComments != null){ remainingComments = maxComments - redditPostComments.length; int commentCountStamp = 1; <BUG>for(String redditPostComment : redditPostComments){ redditPostComment = reddit...
redditPostComment = redditPostComment.toLowerCase() .replaceAll("-", " ") .replaceAll("[^a-z0-9. ]", "") .replaceAll("\\s+", " ") redditPostComment = redditPostComment.replaceAll("\"", " ").replaceAll("\'", " ").replaceAll("\\n", " ").replaceAll(",", " ").replace("\\r", " ").trim();
39,873
</BUG> String corpusLocation = cls.getTacitLocation(); File corpusDirectory = new File(corpusLocation); String[] jsonFiles = corpusDirectory.list(); <BUG>String corpusName = cls.getClassName(); </BUG> ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine engine = manager.getEngineByName("Renjin"); if(en...
ConsoleView.printlInConsoleln("CSV file saved at : " + saveLocation); } private static void writeRObjforReddit(String outputLoc, CorpusClass cls)throws Exception{ JSONParser jsonParser = new JSONParser(); RedditJsonHandler redditJsonHandler = new RedditJsonHandler(); String saveLocation = "\"" + outputLoc + File.separa...
39,874
JSONObject post = (JSONObject)singleReddit.get("post"); keyIterator = keySet.iterator(); while(keyIterator.hasNext()){ key = keyIterator.next(); if(post.containsKey(key)){ <BUG>String data = post.get(key).toString(); data = data.replaceAll("\"", " ").replaceAll("\'", " ").replaceAll("\\n", " ").trim(); </BUG> engine.ev...
data = data.toLowerCase() .replaceAll("-", " ") .replaceAll("[^a-z0-9. ]", "") .replaceAll("\\s+", " ") data = data.replaceAll("\"", " ").replaceAll("\'", " ").replaceAll("\\n", " ").replace("\\r", " ").trim();
39,875
String[] redditPostComments = redditJsonHandler.getPostComments(singleReddit); int remainingComments = maxComments; if (redditPostComments != null){ remainingComments = maxComments - redditPostComments.length; int commentCountStamp = 1; <BUG>for(String redditPostComment : redditPostComments){ redditPostComment = reddit...
redditPostComment = redditPostComment.toLowerCase() .replaceAll("-", " ") .replaceAll("[^a-z0-9. ]", "") .replaceAll("\\s+", " ") redditPostComment = redditPostComment.replaceAll("\"", " ").replaceAll("\'", " ").replaceAll("\\n", " ").replace("\\r", " ").trim();
39,876
else if (t == ANY_CYPHER_OPTION) { r = AnyCypherOption(b, 0); } else if (t == ANY_FUNCTION_INVOCATION) { r = AnyFunctionInvocation(b, 0); <BUG>} else if (t == BULK_IMPORT_QUERY) {</BUG> r = BulkImportQuery(b, 0); } else if (t == CALL) {
else if (t == ARRAY) { r = Array(b, 0); else if (t == BULK_IMPORT_QUERY) {
39,877
if (!r) r = MapLiteral(b, l + 1); if (!r) r = MapProjection(b, l + 1); if (!r) r = CountStar(b, l + 1); if (!r) r = ListComprehension(b, l + 1); if (!r) r = PatternComprehension(b, l + 1); <BUG>if (!r) r = Expression1_12(b, l + 1); if (!r) r = FilterFunctionInvocation(b, l + 1);</BUG> if (!r) r = ExtractFunctionInvocat...
if (!r) r = Array(b, l + 1); if (!r) r = FilterFunctionInvocation(b, l + 1);
39,878
processorTarget.addDeploymentProcessor(Phase.PARSE, Phase.PARSE_EJB_INJECTION_ANNOTATION, new EjbResourceInjectionAnnotationProcessor()); processorTarget.addDeploymentProcessor(Phase.DEPENDENCIES, Phase.DEPENDENCIES_EJB, new EjbDependencyDeploymentUnitProcessor()); processorTarget.addDeploymentProcessor(Phase.POST_MODU...
processorTarget.addDeploymentProcessor(Phase.POST_MODULE, Phase.POST_MODULE_EJB_ORB_BIND, new ORBJndiBindingProcessor()); processorTarget.addDeploymentProcessor(Phase.INSTALL, Phase.INSTALL_RESOLVE_EJB_INJECTIONS, new EjbInjectionResolutionProcessor());
39,879
import org.jboss.as.server.deployment.DeploymentUnitProcessingException; import org.jboss.as.server.deployment.DeploymentUnitProcessor; import org.jboss.msc.service.ServiceName; import org.jboss.msc.service.ServiceTarget; import org.omg.CORBA.ORB; <BUG>public class ORBJndiBindingProcessor implements DeploymentUnitProce...
public class ORBJndiBindingProcessor implements DeploymentUnitProcessor {
39,880
return new CommentViewHolder(view, fragment.getActivity(), (ICommentableFragment) fragment); } else if (viewType == GiveawayDetailsCard.VIEW_LAYOUT) { return new GiveawayCardViewHolder(view, (GiveawayDetailFragment) fragment); } else if (viewType == DiscussionDetailsCard.VIEW_LAYOUT) { return new DiscussionCardViewHold...
[DELETED]
39,881
GiveawayDetailsCard card = (GiveawayDetailsCard) getItem(position); holder.setFrom(card); } else if (h instanceof DiscussionCardViewHolder) { DiscussionCardViewHolder holder = (DiscussionCardViewHolder) h; DiscussionDetailsCard card = (DiscussionDetailsCard) getItem(position); <BUG>holder.setFrom(card); } else if (h in...
[DELETED]
39,882
setContentView(R.layout.activity_one_fragment); if (savedInstanceState == null) loadFragment(DiscussionDetailFragment.newInstance((BasicDiscussion) serializable, commentContext)); return; } <BUG>serializable = getIntent().getSerializableExtra(TradeDetailFragment.ARG_TRADE); if (serializable != null) { setContentView(R....
[DELETED]
39,883
params.width = commentMarker.getLayoutParams().width * Math.min(MAX_VISIBLE_DEPTH, comment.getDepth()); commentIndent.setLayoutParams(params); Picasso.with(context).load(comment.getAvatar()).placeholder(R.drawable.default_avatar_mask).transform(new RoundedCornersTransformation(20, 0)).into(commentImage); View.OnClickLi...
if(comment instanceof TradeComment) fragment.showProfile(((TradeComment) comment).getSteamID64()); else fragment.showProfile(comment.getAuthor());
39,884
return super.onKeyDown(keyCode, event); } @Override public boolean onKeyLongPress(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { <BUG>final CharSequence[] strings = new CharSequence[]{getString(R.string.go_to_giveaway), getString(R.string.go_to_discussion), getString(R.string.go_to_user), getStr...
final CharSequence[] strings = new CharSequence[]{getString(R.string.go_to_giveaway), getString(R.string.go_to_discussion), getString(R.string.go_to_user)}; AlertDialog.Builder builder = new AlertDialog.Builder(this);
39,885
intent.putExtra(DiscussionDetailFragment.ARG_DISCUSSION, new BasicDiscussion(target)); break; case 2: intent.putExtra(UserDetailFragment.ARG_USER, target); break; <BUG>case 3: intent.putExtra(TradeDetailFragment.ARG_TRADE, new BasicTrade(target)); break;</BUG> } startActivity(intent);
[DELETED]
39,886
package org.apache.ambari.server.upgrade; import com.google.inject.Guice; <BUG>import com.google.inject.Injector; import com.google.inject.Provider; import com.google.inject.persist.PersistService; import junit.framework.Assert; import org.apache.ambari.server.api.services.AmbariMetaInfo; import org.apache.ambari.serve...
import com.google.inject.Binder; import com.google.inject.Module; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.orm.DBAccessor;
39,887
public class UpgradeCatalog240Test { private Injector injector; </BUG> private Provider<EntityManager> entityManagerProvider = createStrictMock(Provider.class); private EntityManager entityManager = createNiceMock(EntityManager.class); <BUG>private UpgradeCatalogHelper upgradeCatalogHelper; private StackEntity desiredS...
private static Injector injector; @BeforeClass public static void classSetUp() { injector = Guice.createInjector(new InMemoryDefaultTestModule()); injector.getInstance(GuiceJpaInitializer.class); } @Before
39,888
} @Test public void test_addParam_ParamsAvailableWithOneOFNeededItem() { UpgradeCatalog240 upgradeCatalog240 = new UpgradeCatalog240(injector); String inputSource = "{\"path\":\"test_path\",\"type\":\"SCRIPT\",\"parameters\":[{\"name\":\"connection.timeout\",\"display_name\":\"Connection Timeout\",\"value\":5.0,\"type\...
public void test_addParam_ParamsNotAvailable() { String inputSource = "{ \"path\" : \"test_path\", \"type\" : \"SCRIPT\"}"; List<String> params = Arrays.asList("connection.timeout", "checkpoint.time.warning.threshold", "checkpoint.time.critical.threshold"); String expectedSource = "{\"path\":\"test_path\",\"type\":\"SC...
39,889
import com.google.inject.Injector; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.controller.AmbariManagementController; import org.apache.ambari.server.orm.DBAccessor; import org.apache.ambari.server.orm.dao.AlertDefinitionDAO; <BUG>import org.apache.ambari.server.orm.dao.DaoUtils; im...
import org.apache.ambari.server.orm.dao.PermissionDAO; import org.apache.ambari.server.orm.dao.ResourceTypeDAO; import org.apache.ambari.server.orm.entities.AlertDefinitionEntity;
39,890
private static final Logger LOG = LoggerFactory.getLogger(UpgradeCatalog240.class); @Inject</BUG> public UpgradeCatalog240(Injector injector) { super(injector); <BUG>this.injector = injector; }</BUG> @Override public String getTargetVersion() { return "2.4.0"; }
private static final String ID = "id"; private static final String SETTING_TABLE = "setting"; @Inject injector.injectMembers(this);
39,891
public String getSourceVersion() { return "2.3.0"; } @Override protected void executeDDLUpdates() throws AmbariException, SQLException { <BUG>updateAdminPermissionTable(); }</BUG> @Override protected void executePreDMLUpdates() throws AmbariException, SQLException { }
createSettingTable();
39,892
import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.os.Handler; <BUG>import android.support.v4.app.NavUtils; import android.support.v7.app.AppCompatActivity;</BUG> import android.support.v7.widget.Toolbar; import android.util.Log; import androi...
import android.support.v4.view.MenuItemCompat; import android.support.v7.app.AppCompatActivity;
39,893
import android.database.ContentObserver; import android.graphics.Bitmap; import android.net.Uri; import android.os.Bundle; import android.os.Handler; <BUG>import android.support.v4.app.NavUtils; import android.support.v7.app.AppCompatActivity;</BUG> import android.support.v7.widget.Toolbar; import android.util.Log; imp...
import android.support.v4.view.MenuItemCompat; import android.support.v7.app.AppCompatActivity;
39,894
import android.os.Handler; import android.os.Looper; import android.os.PowerManager; import android.os.PowerManager.WakeLock; import android.preference.PreferenceManager; <BUG>import android.support.design.widget.FloatingActionButton; import android.support.v7.widget.Toolbar;</BUG> import android.util.Log; import andro...
import android.support.v4.view.MenuItemCompat; import android.support.v7.widget.Toolbar;
39,895
mAltitude.setOnCheckedChangeListener(mCheckedChangeListener); mDistance.setOnCheckedChangeListener(mCheckedChangeListener); mCompass.setOnCheckedChangeListener(mCheckedChangeListener); mLocation.setOnCheckedChangeListener(mCheckedChangeListener); builder.setTitle(R.string.dialog_layer_title).setIcon(android.R.drawable....
(android.R.string.ok, null).setView(view);
39,896
import org.spongepowered.api.world.Locatable; import org.spongepowered.api.world.Location; import org.spongepowered.api.world.World; import javax.annotation.Nullable; import java.util.List; <BUG>import java.util.Optional; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG> public class CommandDel...
import java.util.stream.Stream; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
39,897
.append(Text.of(TextColors.GREEN, "Usage: ")) .append(getUsage(source)) .build()); return CommandResult.empty(); } else if (isIn(REGIONS_ALIASES, parse.args[0])) { <BUG>if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!")); IRegion region = FGManager.getInstance().getRegion(parse.args[1...
String regionName = parse.args[1]; IRegion region = FGManager.getInstance().getRegion(regionName).orElse(null);
39,898
</BUG> isWorldRegion = true; } if (region == null) <BUG>throw new CommandException(Text.of("No region exists with the name \"" + parse.args[1] + "\"!")); if (region instanceof GlobalWorldRegion) { </BUG> throw new CommandException(Text.of("You may not delete the global region!")); }
if (world == null) throw new CommandException(Text.of("No world exists with name \"" + worldName + "\"!")); if (world == null) throw new CommandException(Text.of("Must specify a world!")); region = FGManager.getInstance().getWorldRegion(world, regionName).orElse(null); throw new CommandException(Text.of("No region exis...
39,899
source.getName() + " deleted " + (isWorldRegion ? "world" : "") + "region" ); return CommandResult.success(); } else if (isIn(HANDLERS_ALIASES, parse.args[0])) { if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!")); <BUG>IHandler handler = FGManager.getInstance().gethandler(parse.args[...
Optional<IHandler> handlerOpt = FGManager.getInstance().gethandler(parse.args[1]); if (!handlerOpt.isPresent()) IHandler handler = handlerOpt.get(); if (handler instanceof GlobalHandler)
39,900
.excludeCurrent(true) .autoCloseQuotes(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "handler").stream() .filter(new StartsWithPredicate(parse.current.token))</BUG> .map(args -> parse.current.prefix...
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))