id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
44,301 | package com.skin.ayada.runtime;
import java.io.Writer;
<BUG>import com.skin.ayada.jstl.TagLibrary;
import com.skin.ayada.jstl.TagLibraryFactory;</BUG>
public class JspFactory
{
public static PageContext getDefaultPageContext(Writer writer)
| [DELETED] |
44,302 | public static PageContext getDefaultPageContext(Writer writer, int buffserSize, boolean autoFlush)
{
JspWriter out = new JspWriter(writer, buffserSize, autoFlush);
DefaultPageContext pageContext = new DefaultPageContext(out);
ExpressionContext expressionContext = DefaultExpressionFactory.getDefaultExpressionContext(pag... | [DELETED] |
44,303 | package org.pepsoft.worldpainter;
<BUG>import org.pepsoft.util.ColourUtils;
import org.pepsoft.worldpainter.biomeschemes.CustomBiomeManager;</BUG>
import org.pepsoft.worldpainter.layers.*;
import org.pepsoft.worldpainter.layers.renderers.*;
import java.awt.*;
| import org.pepsoft.util.IconUtils;
import org.pepsoft.worldpainter.biomeschemes.CustomBiomeManager;
|
44,304 | import java.util.List;
import static org.pepsoft.minecraft.Constants.*;
import static org.pepsoft.worldpainter.Constants.*;
public final class TileRenderer {
public TileRenderer(TileProvider tileProvider, ColourScheme colourScheme, BiomeScheme biomeScheme, CustomBiomeManager customBiomeManager, int zoom) {
<BUG>this(ti... | [DELETED] |
44,305 | if (notAllChunksPresent && (tile.getBitLayerValue(NotPresent.INSTANCE, x, y))) {
} else if ((! noOpposites) && oppositesOverlap[x | (y << TILE_SIZE_BITS)] && CEILING_PATTERN[x & 0x7][y & 0x7]) {
renderBuffer[x | (y << TILE_SIZE_BITS)] = 0xff000000;
} else if (_void && tile.getBitLayerValue(org.pepsoft.worldpainter.laye... | int colour = getPixelColour(tileX, tileY, x, y, layers, renderers, contourLines, hideTerrain, hideFluids);
colour = ColourUtils.multiply(colour, getTerrainBrightenAmount());
|
44,306 | if (notAllChunksPresent && (tile.getBitLayerValue(NotPresent.INSTANCE, x, y))) {
} else if ((! noOpposites) && oppositesOverlap[x | (y << TILE_SIZE_BITS)]) {
renderBuffer[x / scale + y * tileSize] = 0xff000000;
} else if (_void && tile.getBitLayerValue(org.pepsoft.worldpainter.layers.Void.INSTANCE, x, y)) {
} else {
<B... | } else if ((! noOpposites) && oppositesOverlap[x | (y << TILE_SIZE_BITS)] && CEILING_PATTERN[x & 0x7][y & 0x7]) {
renderBuffer[x | (y << TILE_SIZE_BITS)] = 0xff000000;
int colour = getPixelColour(tileX, tileY, x, y, layers, renderers, contourLines, hideTerrain, hideFluids);
colour = ColourUtils.multiply(colour, getTerr... |
44,307 | if (lightOrigin == null) {
throw new NullPointerException();
}
this.lightOrigin = lightOrigin;
}
<BUG>private int getPixelColour(int tileX, int tileY, int x, int y, Layer[] layers, LayerRenderer[] renderers, boolean contourLines) {
</BUG>
final int offset = x + y * TILE_SIZE;
final int intHeight = intHeightCache[offset... | private int getPixelColour(int tileX, int tileY, int x, int y, Layer[] layers, LayerRenderer[] renderers, boolean contourLines, boolean hideTerrain, boolean hideFluids) {
|
44,308 | fluidDeltas [2][1] = fluidHeights[2][1] - waterLevel;
fluidHeights[1][2] = getNeighbourFluidHeight(x, y, 0, 1, waterLevel);
fluidDeltas [1][2] = fluidHeights[1][2] - waterLevel;
int colour;
final int worldX = tileX | x, worldY = tileY | y;
<BUG>if ((! dry) && (waterLevel > intHeight)) {
</BUG>
if (tile.getBitLayerValue... | if ((! hideFluids) && (waterLevel > intHeight)) {
|
44,309 | if (tile.getBitLayerValue(FloodWithLava.INSTANCE, x, y)) {
colour = lavaColour;
} else {
colour = waterColour;
}
<BUG>} else {
final float height = floatHeightCache[offset];
colour = ((! bottomless) && (intHeight == 0)) ? bedrockColour : tile.getTerrain(x, y).getColour(seed, worldX, worldY, height, intHeight, colourSch... | } else if (! hideTerrain) {
colour = LIGHT_GREY;
|
44,310 | for (int i = 0; i < layers.length; i++) {
final Layer layer = layers[i];
switch (layer.getDataSize()) {
case BIT:
case BIT_PER_CHUNK:
<BUG>if (dry && (layer instanceof Frost) && (waterLevel > intHeightCache[offset])) {
</BUG>
continue;
}
boolean bitLayerValue = tile.getBitLayerValue(layer, x, y);
| if (hideFluids && (layer instanceof Frost) && (waterLevel > intHeightCache[offset])) {
|
44,311 | private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TileRenderer.class);
public enum LightOrigin {
NORTHWEST {
@Override
public LightOrigin left() {
<BUG>return SOUTHWEST;
}</BUG>
@Override
public LightOrigin right() {
return NORTHEAST;
| return ABOVE;
}
|
44,312 | }
},
SOUTHWEST{
@Override
public LightOrigin left() {
<BUG>return SOUTHEAST;
}</BUG>
@Override
public LightOrigin right() {
return NORTHWEST;
| return NORTHEAST;
NORTHEAST {
|
44,313 | DESC {
@Override
public String toString() {
return "desc";
}
<BUG>};
private static final SortOrder PROTOTYPE = ASC;
</BUG>
@Override
public SortOrder readFrom(StreamInput in) throws IOException {
| public static final SortOrder DEFAULT = DESC;
private static final SortOrder PROTOTYPE = DEFAULT;
|
44,314 | 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 = GeoDistanceSort... | boolean coerce = false;
boolean ignoreMalformed = false;
XContentParser.Token token;
|
44,315 | 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>GeoDistanceSortBuilder.parseGeoPoints(parser, geoPoints);
... | fieldName = currentName;
|
44,316 | if (temp == MultiValueMode.SUM) {
throw new IllegalArgumentException("sort_mode [sum] isn't supported for sorting by geo distance");
}</BUG>
this.sortMode = sortMode;
return this;
<BUG>}
public String sortMode() {
return this.sortMode;</BUG>
}
public GeoDistanceSortBuilder setNestedFilter(QueryBuilder nestedFilter) {
| @Override
public GeoDistanceSortBuilder order(SortOrder order) {
this.order = order;
@Override
public SortBuilder missing(Object missing) {
public GeoDistanceSortBuilder sortMode(String sortMode) {
|
44,317 | builder.field("unit", unit);
builder.field("distance_type", geoDistance.name().toLowerCase(Locale.ROOT));
if (order == SortOrder.DESC) {</BUG>
builder.field("reverse", true);
<BUG>} else {
builder.field("reverse", false);</BUG>
}
if (sortMode != null) {
builder.field("mode", sortMode);
}
| if (geoDistance != null) {
if (order == SortOrder.DESC) {
|
44,318 | package org.metaborg.spoofax.core.analysis.constraint;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Optional;
<BUG>import java.util.UUID;
import org.apache.commons.vfs2.FileObject;</BUG>
import org.metaborg.core.MetaborgException;
import org.metaborg.core.analysis.AnalysisE... | import java.util.stream.Collectors;
import org.apache.commons.vfs2.FileObject;
|
44,319 | import org.metaborg.core.language.ILanguageImpl;
import org.metaborg.core.messages.IMessage;
import org.metaborg.core.messages.MessageFactory;
import org.metaborg.core.messages.MessageSeverity;
import org.metaborg.core.resource.IResourceService;
<BUG>import org.metaborg.core.source.ISourceLocation;
import org.metaborg.... | import org.metaborg.meta.nabl2.constraints.messages.MessageKind;
import org.metaborg.meta.nabl2.solver.ISolution;
import org.metaborg.meta.nabl2.spoofax.analysis.EditorMessage;
import org.metaborg.meta.nabl2.stratego.StrategoTerms;
|
44,320 | protected final IStrategoRuntimeService runtimeService;
protected final IStrategoCommon strategoCommon;
protected final ISpoofaxTracingService tracingService;
protected final ITermFactory termFactory;
protected final StrategoTerms strategoTerms;
<BUG>public AbstractConstraintAnalyzer( final AnalysisCommon analysisCommo... | public AbstractConstraintAnalyzer(final AnalysisCommon analysisCommon, final IResourceService resourceService,
final IStrategoRuntimeService runtimeService, final IStrategoCommon strategoCommon,
final ITermFactoryService termFactoryService, final ISpoofaxTracingService tracingService) {
this.analysisCommon = analysisCo... |
44,321 | input.detached() ? ("detached-" + UUID.randomUUID().toString()) : input.source().getName().getURI();
(input.valid() ? changed : removed).put(source, input);
}
return analyzeAll(changed, removed, context, runtime, facet.strategyName);
}
<BUG>protected abstract ISpoofaxAnalyzeResults analyzeAll(Map<String,ISpoofaxParseUn... | protected abstract ISpoofaxAnalyzeResults analyzeAll(Map<String, ISpoofaxParseUnit> changed,
Map<String, ISpoofaxParseUnit> removed, C context, HybridInterpreter runtime, String strategy)
|
44,322 | } else {
logger.warn("Ignoring location-less {}: {}", severity, message);
return null;
}
}
<BUG>protected List<Message> merge(List<Message> m1, List<Message> m2) {
List<Message> m = Lists.newArrayList();
m.addAll(m1);
m.addAll(m2);
return m;</BUG>
}
| [DELETED] |
44,323 | import org.metaborg.core.analysis.AnalysisException;
import org.metaborg.core.messages.IMessage;
import org.metaborg.core.messages.MessageFactory;
import org.metaborg.core.messages.MessageSeverity;
import org.metaborg.core.resource.IResourceService;
<BUG>import org.metaborg.meta.nabl2.constraints.IConstraint;
import or... | import org.metaborg.meta.nabl2.constraints.messages.MessageKind;
import org.metaborg.meta.nabl2.solver.Solution;
|
44,324 | import org.xwiki.container.servlet.ServletContainerException;
import org.xwiki.container.servlet.ServletContainerInitializer;
import org.xwiki.context.Execution;
import com.xpn.xwiki.XWiki;
import com.xpn.xwiki.XWikiContext;
<BUG>import com.xpn.xwiki.XWikiException;
import com.xpn.xwiki.web.Utils;
import com.xpn.xwiki.... | import com.xpn.xwiki.user.api.XWikiUser;
|
44,325 | super(context, rowDescriptor);
}
@Override
protected void init() {
super.init();
<BUG>mCheckBox = (CheckBox) findViewById(R.id.checkBox);
mCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {</BUG>
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
onVal... | setStyleId(mCheckBox, CellDescriptor.APPEARANCE_TEXT_LABEL, CellDescriptor.COLOR_VALUE);
mCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
44,326 | BatchSuppressManager.SUPPRESS_INSPECTIONS_ANNOTATION_NAME.equals(text)) {
final PsiElement annotationParent = annotation.getParent();
if (annotationParent instanceof PsiModifierList) {
final Collection<String> ids = JavaSuppressionUtil.getInspectionIdsSuppressedInAnnotation((PsiModifierList)annotationParent);
if (!myAl... | registerError(annotation, annotation, Boolean.TRUE);
|
44,327 | package com.easytoolsoft.easyreport.web.controller.common;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping(value = "/error")
<BUG>public class ErrorController extends AbstractController {
@RequestMapping(value = {"/404"})</BUG>... | public class ErrorController {
@RequestMapping(value = {"/404"})
|
44,328 | public class GroupFactory extends GroupManager {
private static GroupFactory s_instance;
private static boolean s_initialized = false;
private File m_groupsConfFile;
private long m_lastModified;
<BUG>private GroupFactory() {
</BUG>
}
public static synchronized void init() throws IOException, FileNotFoundException, Mars... | public GroupFactory() {
|
44,329 | 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.*;
|
44,330 | .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);
|
44,331 | </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... |
44,332 | 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)
|
44,333 | .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))
|
44,334 | .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))
|
44,335 | @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;
|
44,336 | 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;
}
|
44,337 | return configDirectory;
}
public boolean isLoaded() {
return loaded;
}
<BUG>public static Cause getCause() {
return instance().pluginCause;
}</BUG>
public EconomyService getEconomyService() {
return economyService;
| [DELETED] |
44,338 | 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.*;
|
44,339 | .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))
|
44,340 | 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) -> {
|
44,341 | 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... |
44,342 | 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);
|
44,343 | 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() + "\"");
|
44,344 | 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() + "\"");
|
44,345 | 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
|
44,346 | .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")
|
44,347 | package org.jboss.as.jpa.injectors;
import org.jboss.as.ee.component.BindingDescription;
import org.jboss.as.ee.component.BindingSourceDescription;
<BUG>import org.jboss.as.jpa.container.ExtendedEntityManager;
import org.jboss.as.jpa.container.SFSBCallStack;</BUG>
import org.jboss.as.jpa.container.SFSBXPCMap;
import or... | import org.jboss.as.jpa.container.NonTxEmCloser;
import org.jboss.as.jpa.container.SFSBCallStack;
|
44,348 | if (type.equals(PersistenceContextType.TRANSACTION)) {
entityManager = new TransactionScopedEntityManager(unitName, properties, emf);</BUG>
if (log.isDebugEnabled())
log.debug("created new TransactionScopedEntityManager for unit name=" + unitName);
}
<BUG>else {
EntityManager entityManager1 = SFSBCallStack.findPersiste... | isExtended = false;
entityManager = new TransactionScopedEntityManager(unitName, properties, emf);
isExtended = true;
EntityManager entityManager1 = SFSBCallStack.findPersistenceContext(unitName);
|
44,349 | TransactionUtil.getInstance().registerExtendedWithTransaction(puScopedName, result);
}
} else {
if (isInTx) {
result = TransactionUtil.getInstance().getOrCreateTransactionScopedEntityManager(emf, puScopedName, properties);
<BUG>} else {
result = EntityManagerUtil.createEntityManager(emf, properties);
}</BUG>
}
return r... | result = NonTxEmCloser.get(puScopedName);
if (result == null) {
NonTxEmCloser.add(puScopedName, result);
|
44,350 | import javax.persistence.metamodel.Metamodel;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
public abstract class AbstractEntityManager implements EntityManager {
<BUG>private static final HashSet<String> unwrapClassNamesThatShouldSkipPostInvocationStep = new HashSet<String>();
static {
unwr... | [DELETED] |
44,351 | import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;
public class DependencyConvergenceReport
extends AbstractProjectInfoReport
<BUG>{
private List reactorProjects;
private static final int PERCENTAGE = 100;</BUG>
public String getOutputName()
{
| private static final int PERCENTAGE = 100;
private static final List SUPPORTED_FONT_FAMILY_NAMES = Arrays.asList( GraphicsEnvironment
.getLocalGraphicsEnvironment().getAvailableFontFamilyNames() );
|
44,352 | sink.section1();
sink.sectionTitle1();
sink.text( getI18nString( locale, "title" ) );
sink.sectionTitle1_();
Map dependencyMap = getDependencyMap();
<BUG>generateLegend( locale, sink );
generateStats( locale, sink, dependencyMap );
generateConvergence( locale, sink, dependencyMap );
sink.section1_();</BUG>
sink.body_()... | sink.lineBreak();
sink.section1_();
|
44,353 | Iterator it = artifactMap.keySet().iterator();
while ( it.hasNext() )
{
String version = (String) it.next();
sink.tableRow();
<BUG>sink.tableCell();
sink.text( version );</BUG>
sink.tableCell_();
sink.tableCell();
generateVersionDetails( sink, artifactMap, version );
| sink.tableCell( String.valueOf( cellWidth ) + "px" );
sink.text( version );
|
44,354 | sink.tableCell();
sink.text( getI18nString( locale, "legend.shared" ) );
sink.tableCell_();
sink.tableRow_();
sink.tableRow();
<BUG>sink.tableCell();
iconError( sink );</BUG>
sink.tableCell_();
sink.tableCell();
sink.text( getI18nString( locale, "legend.different" ) );
| sink.tableCell( "15px" ); // according /images/icon_error_sml.gif
iconError( sink );
|
44,355 | sink.tableCaption();
sink.text( getI18nString( locale, "stats.caption" ) );
sink.tableCaption_();</BUG>
sink.tableRow();
<BUG>sink.tableHeaderCell();
sink.text( getI18nString( locale, "stats.subprojects" ) + ":" );
sink.tableHeaderCell_();</BUG>
sink.tableCell();
sink.text( String.valueOf( reactorProjects.size() ) );
s... | sink.bold();
sink.bold_();
sink.tableCaption_();
sink.tableHeaderCell( headerCellWidth );
sink.text( getI18nString( locale, "stats.subprojects" ) );
sink.tableHeaderCell_();
|
44,356 | sink.tableCell();
sink.text( String.valueOf( reactorProjects.size() ) );
sink.tableCell_();
sink.tableRow_();
sink.tableRow();
<BUG>sink.tableHeaderCell();
sink.text( getI18nString( locale, "stats.dependencies" ) + ":" );
sink.tableHeaderCell_();</BUG>
sink.tableCell();
sink.text( String.valueOf( depCount ) );
| sink.tableHeaderCell( headerCellWidth );
sink.text( getI18nString( locale, "stats.dependencies" ) );
sink.tableHeaderCell_();
|
44,357 | sink.text( String.valueOf( convergence ) + "%" );
sink.bold_();
sink.tableCell_();
sink.tableRow_();
sink.tableRow();
<BUG>sink.tableHeaderCell();
sink.text( getI18nString( locale, "stats.readyrelease" ) + ":" );
sink.tableHeaderCell_();</BUG>
sink.tableCell();
if ( convergence >= PERCENTAGE && snapshotCount <= 0 )
| sink.tableHeaderCell( headerCellWidth );
sink.text( getI18nString( locale, "stats.readyrelease" ) );
sink.tableHeaderCell_();
|
44,358 | {
ReverseDependencyLink p1 = (ReverseDependencyLink) o1;
ReverseDependencyLink p2 = (ReverseDependencyLink) o2;
return p1.getProject().getId().compareTo( p2.getProject().getId() );
}
<BUG>else
{</BUG>
return 0;
}
}
| iconError( sink );
|
44,359 | @Test(expected = ExecutionException.class)
public void testImproperOrNoManifestFile() throws Exception {
String jar = JarFinder.getJar(WebCrawlApp.class, new Manifest());
Location deployedJar = lf.create(jar);
deployedJar.deleteOnExit();
<BUG>TestHelper.getLocalManager(configuration).deploy(DefaultId.ACCOUNT, deployedJ... | TestHelper.getLocalManager().deploy(DefaultId.ACCOUNT, deployedJar);
}
|
44,360 | @Test
public void testGoodPipeline() throws Exception {
Location deployedJar = lf.create(
JarFinder.getJar(ToyApp.class, TestHelper.getManifestWithMainClass(ToyApp.class))
);
<BUG>ListenableFuture<?> p = TestHelper.getLocalManager(configuration).deploy(DefaultId.ACCOUNT, deployedJar);
ApplicationWithPrograms input = (A... | ListenableFuture<?> p = TestHelper.getLocalManager().deploy(DefaultId.ACCOUNT, deployedJar);
ApplicationWithPrograms input = (ApplicationWithPrograms)p.get();
|
44,361 | return new BasicArguments();
}
}));
}
TimeUnit.SECONDS.sleep(1);
<BUG>OperationExecutor opex = injector.getInstance(OperationExecutor.class);
</BUG>
OperationContext opCtx = new OperationContext(DefaultId.ACCOUNT.getId(),
app.getAppSpecLoc().getSpecification().getName());
QueueProducer queueProducer = new QueueProducer... | @Override
public Arguments getUserArguments() {
OperationExecutor opex = TestHelper.getInjector().getInstance(OperationExecutor.class);
|
44,362 | new QueueEntry(codec.encodePayload(event)));
opex.commit(opCtx, enqueue);
}
TimeUnit.SECONDS.sleep(10);
Gson gson = new Gson();
<BUG>DiscoveryServiceClient discoveryServiceClient = injector.getInstance(DiscoveryServiceClient.class);
</BUG>
discoveryServiceClient.startAndWait();
Discoverable discoverable = discoveryServ... | DiscoveryServiceClient discoveryServiceClient = TestHelper.getInjector().getInstance(DiscoveryServiceClient.class);
|
44,363 | ListenableFuture<?> p = TestHelper.getLocalManager(configuration).deploy(DefaultId.ACCOUNT, deployedJar);
final ApplicationWithPrograms app = (ApplicationWithPrograms)p.get();</BUG>
ProgramController controller = null;
for (final Program program : app.getPrograms()) {
if (program.getProcessorType() == Type.FLOW) {
<BUG... | }
}
@Test
public void testCountRandomApp() throws Exception {
TestHelper.getInjector().getInstance(DiscoveryService.class).startAndWait();
final ApplicationWithPrograms app = TestHelper.deployApplicationWithManager(TestCountRandomApp.class);
ProgramRunner runner = TestHelper.getInjector().getInstance(FlowProgramRunner.... |
44,364 | return p;
}
}
return null;
}
<BUG>private ApplicationWithPrograms deployApp(Class<? extends Application> appClass) throws Exception {
LocalLocationFactory lf = new LocalLocationFactory();
Location deployedJar = lf.create(
JarFinder.getJar(appClass, TestHelper.getManifestWithMainClass(appClass))
);
deployedJar.deleteOnE... | [DELETED] |
44,365 | return new BasicArguments();
}
}));
}
TimeUnit.SECONDS.sleep(4);
<BUG>OperationExecutor opex = injector.getInstance(OperationExecutor.class);
</BUG>
OperationContext opCtx = new OperationContext(DefaultId.ACCOUNT.getId(),
app.getAppSpecLoc().getSpecification().getName());
TransactionProxy proxy = new TransactionProxy()... | @Override
public Arguments getUserArguments() {
OperationExecutor opex = TestHelper.getInjector().getInstance(OperationExecutor.class);
|
44,366 | package com.continuuity;
<BUG>import com.continuuity.api.Application;
import com.continuuity.app.deploy.Manager;</BUG>
import com.continuuity.app.guice.BigMamaModule;
import com.continuuity.app.program.ManifestFields;
import com.continuuity.app.services.AppFabricService;
| import com.continuuity.app.DefaultId;
import com.continuuity.app.deploy.Manager;
|
44,367 | import com.continuuity.filesystem.Location;
import com.continuuity.filesystem.LocationFactory;
import com.continuuity.internal.app.BufferFileInputStream;
import com.continuuity.internal.app.deploy.LocalManager;
import com.continuuity.internal.app.deploy.pipeline.ApplicationWithPrograms;
<BUG>import com.continuuity.app.... | import com.continuuity.internal.filesystem.LocalLocationFactory;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.inject.Guice;
|
44,368 | static {
TempFolder tempFolder = new TempFolder();
configuration = CConfiguration.create();
configuration.set("app.output.dir", tempFolder.newFolder("app").getAbsolutePath());
configuration.set("app.tmp.dir", tempFolder.newFolder("temp").getAbsolutePath());
<BUG>injector = Guice.createInjector(new BigMamaModule(configu... | injector = Guice.createInjector(new BigMamaModule(configuration),
|
44,369 | Manifest manifest = new Manifest();
manifest.getMainAttributes().put(ManifestFields.MANIFEST_VERSION, "1.0");
manifest.getMainAttributes().put(ManifestFields.MAIN_CLASS, klass.getName());
return manifest;
}
<BUG>public static Manager<Location, ApplicationWithPrograms> getLocalManager(CConfiguration configuration) {
inj... | public static Manager<Location, ApplicationWithPrograms> getLocalManager() {
|
44,370 | import org.junit.Test;
import java.util.List;
public class MDSBasedStoreTest {
private MDSBasedStore store;
private MetadataService.Iface metadataService;
<BUG>private static CConfiguration configuration;
static {
configuration = TestHelper.configuration;
}</BUG>
@Before
| private static CConfiguration configuration = TestHelper.configuration;
|
44,371 | import org.mongojack.ObjectId;
import javax.annotation.Nullable;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.time.ZonedDateTime;
<BUG>import static java.util.Objects.requireNonNull;
@AutoValue</BUG>
@WithBeanGetter
@JsonAutoDetect
public abstract class IndexSetConfi... | import static com.google.common.base.Strings.isNullOrEmpty;
@AutoValue
|
44,372 | public abstract RetentionStrategyConfig retentionStrategy();
@JsonProperty(FIELD_CREATION_DATE)
@NotNull
public abstract ZonedDateTime creationDate();
@JsonProperty("index_analyzer")
<BUG>@JsonIgnore
public String indexAnalyzer() {
return "standard";
}</BUG>
@JsonProperty("index_template_name")
| @NotBlank
public abstract String indexAnalyzer();
|
44,373 | .replicas(replicas)
.rotationStrategyClass(rotationStrategyClass)
.rotationStrategy(rotationStrategy)
.retentionStrategyClass(retentionStrategyClass)
.retentionStrategy(retentionStrategy)
<BUG>.creationDate(creationDate)
.build();</BUG>
}
public static IndexSetConfig create(String id,
String title,
| .indexAnalyzer(isNullOrEmpty(indexAnalyzer) ? "standard" : indexAnalyzer)
.indexTemplateName(isNullOrEmpty(indexTemplateName) ? indexPrefix + "-template" : indexTemplateName)
.indexOptimizationMaxNumSegments(maxNumSegments == null ? 1 : maxNumSegments)
.indexOptimizationDisabled(indexOptimizationDisabled == null ? fals... |
44,374 | .indexPrefix(elasticsearchConfiguration.getIndexPrefix())
.shards(elasticsearchConfiguration.getShards())
.replicas(elasticsearchConfiguration.getReplicas())
.rotationStrategy(getRotationStrategyConfig(indexManagementConfig))
.retentionStrategy(getRetentionStrategyConfig(indexManagementConfig))
<BUG>.creationDate(Zoned... | .indexAnalyzer(elasticsearchConfiguration.getAnalyzer())
.indexTemplateName(elasticsearchConfiguration.getTemplateName())
.indexOptimizationMaxNumSegments(elasticsearchConfiguration.getIndexOptimizationMaxNumSegments())
.indexOptimizationDisabled(elasticsearchConfiguration.isDisableIndexOptimization())
.build();
|
44,375 | public abstract String nodeIdFile();
@JsonProperty("allow_highlighting")
public abstract boolean allowHighlighting();
@JsonProperty("allow_leading_wildcard_searches")
public abstract boolean allowLeadingWildcardSearches();
<BUG>@JsonProperty("elasticsearch_shards")
public abstract int shards();
@JsonProperty("elasticse... | [DELETED] |
44,376 | public abstract int streamProcessingMaxFaults();
@JsonProperty("output_module_timeout")
public abstract long outputModuleTimeout();
@JsonProperty("stale_master_timeout")
public abstract int staleMasterTimeout();
<BUG>@JsonProperty("disable_index_optimization")
public abstract boolean disableIndexOptimization();
@JsonPr... | [DELETED] |
44,377 | public abstract boolean disableIndexOptimization();
@JsonProperty("index_optimization_max_num_segments")
public abstract int indexOptimizationMaxSegments();</BUG>
@JsonProperty("gc_warning_threshold")
public abstract String gcWarningThreshold();
<BUG>public static ExposedConfiguration create(Configuration configuration... | public abstract int streamProcessingMaxFaults();
@JsonProperty("output_module_timeout")
public abstract long outputModuleTimeout();
@JsonProperty("stale_master_timeout")
public abstract int staleMasterTimeout();
public static ExposedConfiguration create(Configuration configuration) {
return create(
|
44,378 | configuration.getRingSize(),
configuration.getPluginDir(),
configuration.getNodeIdFile(),
configuration.isAllowHighlighting(),
configuration.isAllowLeadingWildcardSearches(),
<BUG>esConfiguration.getShards(),
esConfiguration.getReplicas(),</BUG>
configuration.getStreamProcessingTimeout(),
configuration.getStreamProcess... | [DELETED] |
44,379 | esConfiguration.getReplicas(),</BUG>
configuration.getStreamProcessingTimeout(),
configuration.getStreamProcessingMaxFaults(),
configuration.getOutputModuleTimeout(),
configuration.getStaleMasterTimeout(),
<BUG>esConfiguration.isDisableIndexOptimization(),
esConfiguration.getIndexOptimizationMaxNumSegments(),</BUG>
con... | configuration.getRingSize(),
configuration.getPluginDir(),
configuration.getNodeIdFile(),
configuration.isAllowHighlighting(),
configuration.isAllowLeadingWildcardSearches(),
|
44,380 | @JsonProperty("ring_size") int ringSize,
@JsonProperty("plugin_dir") String pluginDir,
@JsonProperty("node_id_file") String nodeIdFile,
@JsonProperty("allow_highlighting") boolean allowHighlighting,
@JsonProperty("allow_leading_wildcard_searches") boolean allowLeadingWildcardSearches,
<BUG>@JsonProperty("elasticsearch_... | [DELETED] |
44,381 | @JsonProperty("elasticsearch_replicas") int replicas,</BUG>
@JsonProperty("stream_processing_timeout") long streamProcessingTimeout,
@JsonProperty("stream_processing_max_faults") int streamProcessingMaxFaults,
@JsonProperty("output_module_timeout") long outputModuleTimeout,
@JsonProperty("stale_master_timeout") int sta... | @JsonProperty("ring_size") int ringSize,
@JsonProperty("plugin_dir") String pluginDir,
@JsonProperty("node_id_file") String nodeIdFile,
@JsonProperty("allow_highlighting") boolean allowHighlighting,
@JsonProperty("allow_leading_wildcard_searches") boolean allowLeadingWildcardSearches,
|
44,382 | ringSize,
pluginDir,
nodeIdFile,
allowHighlighting,
allowLeadingWildcardSearches,
<BUG>shards,
replicas,</BUG>
streamProcessingTimeout,
streamProcessingMaxFaults,
outputModuleTimeout,
| [DELETED] |
44,383 | package org.glowroot.agent.config;
import com.google.common.collect.ImmutableList;
<BUG>import org.immutables.value.Value;
import org.glowroot.wire.api.model.AgentConfigOuterClass.AgentConfig;</BUG>
@Value.Immutable
public abstract class UiConfig {
@Value.Default
| import org.glowroot.common.config.ConfigDefaults;
import org.glowroot.wire.api.model.AgentConfigOuterClass.AgentConfig;
|
44,384 | class RepoAdminImpl implements RepoAdmin {
private final DataSource dataSource;
private final List<CappedDatabase> rollupCappedDatabases;
private final CappedDatabase traceCappedDatabase;
private final ConfigRepository configRepository;
<BUG>private final AgentDao agentDao;
</BUG>
private final GaugeValueDao gaugeValue... | private final EnvironmentDao agentDao;
|
44,385 | private final TransactionTypeDao transactionTypeDao;
private final FullQueryTextDao fullQueryTextDao;
private final TraceAttributeNameDao traceAttributeNameDao;
RepoAdminImpl(DataSource dataSource, List<CappedDatabase> rollupCappedDatabases,
CappedDatabase traceCappedDatabase, ConfigRepository configRepository,
<BUG>Ag... | EnvironmentDao agentDao, GaugeValueDao gaugeValueDao, GaugeNameDao gaugeNameDao,
|
44,386 | this.fullQueryTextDao = fullQueryTextDao;
this.traceAttributeNameDao = traceAttributeNameDao;
}
@Override
public void deleteAllData() throws Exception {
<BUG>Environment environment = agentDao.readEnvironment("");
dataSource.deleteAll();</BUG>
agentDao.reinitAfterDeletingDatabase();
gaugeValueDao.reinitAfterDeletingDat... | Environment environment = agentDao.read("");
dataSource.deleteAll();
|
44,387 | public class SimpleRepoModule {
private static final long SNAPSHOT_REAPER_PERIOD_MINUTES = 5;
private final DataSource dataSource;
private final ImmutableList<CappedDatabase> rollupCappedDatabases;
private final CappedDatabase traceCappedDatabase;
<BUG>private final AgentDao agentDao;
private final TransactionTypeDao t... | private final EnvironmentDao environmentDao;
private final TransactionTypeDao transactionTypeDao;
|
44,388 | rollupCappedDatabases.add(new CappedDatabase(file, sizeKb, ticker));
}
this.rollupCappedDatabases = ImmutableList.copyOf(rollupCappedDatabases);
traceCappedDatabase = new CappedDatabase(new File(dataDir, "trace-detail.capped.db"),
storageConfig.traceCappedDatabaseSizeMb() * 1024, ticker);
<BUG>agentDao = new AgentDao(d... | environmentDao = new EnvironmentDao(dataSource);
|
44,389 | traceDao = new TraceDao(dataSource, traceCappedDatabase, transactionTypeDao,
fullQueryTextDao, traceAttributeNameDao);
GaugeNameDao gaugeNameDao = new GaugeNameDao(dataSource);
gaugeValueDao = new GaugeValueDao(dataSource, gaugeNameDao, clock);
repoAdmin = new RepoAdminImpl(dataSource, rollupCappedDatabases, traceCappe... | configRepository, environmentDao, gaugeValueDao, gaugeNameDao, transactionTypeDao,
|
44,390 | new TraceCappedDatabaseStats(traceCappedDatabase),
"org.glowroot:type=TraceCappedDatabase");
platformMBeanServerLifecycle.lazyRegisterMBean(new H2DatabaseStats(dataSource),
"org.glowroot:type=H2Database");
}
<BUG>public AgentDao getAgentDao() {
return agentDao;
</BUG>
}
public TransactionTypeRepository getTransactionTy... | public EnvironmentDao getEnvironmentDao() {
return environmentDao;
|
44,391 | package org.glowroot.agent.embedded.init;
import java.io.Closeable;
import java.io.File;
<BUG>import java.lang.instrument.Instrumentation;
import java.util.Map;</BUG>
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
| import java.util.List;
import java.util.Map;
|
44,392 | import java.util.concurrent.ScheduledExecutorService;
import javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Stopwatch;
import com.google.common.base.Supplier;
<BUG>import com.google.common.base.Ticker;
import org.checkerframework.checker.nullness.qual.MonotonicNonNul... | import com.google.common.collect.ImmutableList;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
44,393 | import org.glowroot.agent.init.EnvironmentCreator;
import org.glowroot.agent.init.GlowrootThinAgentInit;
import org.glowroot.agent.init.JRebelWorkaround;
import org.glowroot.agent.util.LazyPlatformMBeanServer;
import org.glowroot.common.live.LiveAggregateRepository.LiveAggregateRepositoryNop;
<BUG>import org.glowroot.c... | import org.glowroot.common.repo.AgentRepository;
import org.glowroot.common.repo.ImmutableAgentRollup;
import org.glowroot.common.util.Clock;
|
44,394 | SimpleRepoModule simpleRepoModule = new SimpleRepoModule(dataSource,
dataDir, clock, ticker, configRepository, backgroundExecutor);
simpleRepoModule.registerMBeans(new PlatformMBeanServerLifecycleImpl(
agentModule.getLazyPlatformMBeanServer()));
CollectorImpl collectorImpl = new CollectorImpl(
<BUG>simpleRepoModule.get... | simpleRepoModule.getEnvironmentDao(),
simpleRepoModule.getTraceDao(),
|
44,395 | .baseDir(baseDir)
.glowrootDir(glowrootDir)
.ticker(ticker)
.clock(clock)
.liveJvmService(agentModule.getLiveJvmService())
<BUG>.configRepository(simpleRepoModule.getConfigRepository())
.agentRepository(simpleRepoModule.getAgentDao())
</BUG>
.transactionTypeRepository(simpleRepoModule.getTransactionTypeRepository())
.t... | .agentRepository(new AgentRepositoryImpl())
.environmentRepository(simpleRepoModule.getEnvironmentDao())
|
44,396 | .baseDir(baseDir)
.glowrootDir(glowrootDir)
.ticker(ticker)
.clock(clock)
.liveJvmService(null)
<BUG>.configRepository(simpleRepoModule.getConfigRepository())
.agentRepository(simpleRepoModule.getAgentDao())
</BUG>
.transactionTypeRepository(simpleRepoModule.getTransactionTypeRepository())
.traceAttributeNameRepository... | .liveJvmService(agentModule.getLiveJvmService())
.agentRepository(new AgentRepositoryImpl())
.environmentRepository(simpleRepoModule.getEnvironmentDao())
|
44,397 | }
@Override
public void lazyRegisterMBean(Object object, String name) {
lazyPlatformMBeanServer.lazyRegisterMBean(object, name);
}
<BUG>}
}
</BUG>
| void initEmbeddedServer() throws Exception {
if (simpleRepoModule == null) {
return;
|
44,398 | List<GaugeConfig> configs = Lists.newArrayList(configService.getGaugeConfigs());
for (GaugeConfig loopConfig : configs) {
if (loopConfig.mbeanObjectName().equals(gaugeConfig.getMbeanObjectName())) {
throw new DuplicateMBeanObjectNameException();
}
<BUG>}
String version = Versions.getVersion(gaugeConfig);
for (GaugeConf... | [DELETED] |
44,399 | configService.updateGaugeConfigs(configs);
}
}
@Override
public void updateGaugeConfig(String agentId, AgentConfig.GaugeConfig gaugeConfig,
<BUG>String priorVersion) throws Exception {
synchronized (writeLock) {</BUG>
List<GaugeConfig> configs = Lists.newArrayList(configService.getGaugeConfigs());
boolean found = false... | GaugeConfig config = GaugeConfig.create(gaugeConfig);
synchronized (writeLock) {
|
44,400 | boolean found = false;
for (ListIterator<GaugeConfig> i = configs.listIterator(); i.hasNext();) {
GaugeConfig loopConfig = i.next();
String loopVersion = Versions.getVersion(loopConfig.toProto());
if (loopVersion.equals(priorVersion)) {
<BUG>i.set(GaugeConfig.create(gaugeConfig));
found = true;
break;</BUG>
} else if (... | i.set(config);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.