id int64 1 60k | buggy stringlengths 34 37.5k | fixed stringlengths 6 37.4k |
|---|---|---|
401 | handler.post(new Runnable() {
@Override
public void run() {
callBack.success(compressBitmap);
if (compressBitmap != null) {
<BUG>MemoryCache.getInstance().putBitmapToCache(url + reqWidth + "/" + reqHeight, compressBitmap);
DiskCache.getInstance().putBitmapToCache(url + reqWidth + "/" + reqHeight, compressBitmap);
</BU... | handler.post(new Runnable() {
@Override
public void run() {
callBack.success(compressBitmap);
if (compressBitmap != null) {
MemoryCache.getInstance().put(Util.getCacheKey(url + reqWidth + "/" + reqHeight), compressBitmap);
DiskCache.getInstance().put(Util.getCacheKey(url + reqWidth + "/" + reqHeight), compressBitmap);
|
402 | case "deploymentInfo":
try {
DatasetInfoDao.updateDatasetDeployment(rootNode);
} catch (Exception ex) {
Logger.debug("Metadata change exception: deployment ", ex);
<BUG>}
break;
case "caseSensitivity":
try {
DatasetInfoDao.updateDatasetCaseSensitivity(rootNode);
} catch (Exception ex) {
Logger.debug("Metadata change ex... | case "deploymentInfo":
try {
DatasetInfoDao.updateDatasetDeployment(rootNode);
} catch (Exception ex) {
Logger.debug("Metadata change exception: deployment ", ex);
}
|
403 | private static final String DATASET_CAPACITY_TABLE = "dataset_capacity";
private static final String DATASET_TAG_TABLE = "dataset_tag";
private static final String DATASET_CASE_SENSITIVE_TABLE = "dataset_case_sensitivity";
private static final String DATASET_REFERENCE_TABLE = "dataset_reference";
private static final S... | private static final String DATASET_CAPACITY_TABLE = "dataset_capacity";
private static final String DATASET_TAG_TABLE = "dataset_tag";
private static final String DATASET_CASE_SENSITIVE_TABLE = "dataset_case_sensitivity";
private static final String DATASET_REFERENCE_TABLE = "dataset_reference";
private static final S... |
404 | throw new IllegalArgumentException(
"Dataset deployment info update fail, " + "Json missing necessary fields: " + root.toString());
</BUG>
}
<BUG>final Object[] idUrn = findIdAndUrn(idNode, urnNode);
final Integer datasetId = (Integer) idUrn[0];</BUG>
final String urn = (String) idUrn[1];
ObjectMapper om = new ObjectMa... | throw new IllegalArgumentException(
"Dataset deployment info update error, missing necessary fields: " + root.toString());
}
final Object[] idUrn = findDataset(root);
if (idUrn[0] == null || idUrn[1] == null) {
throw new IllegalArgumentException("Cannot identify dataset from id/uri/urn: " + root.toString());
}
final In... |
405 | }
return records;
}
public static void updateDatasetCapacity(JsonNode root)
throws Exception {
<BUG>final JsonNode idNode = root.path("datasetId");
final JsonNode urnNode = root.path("urn");</BUG>
final JsonNode capacity = root.path("capacity");
<BUG>if ((idNode.isMissingNode() && urnNode.isMissingNode()) || capacity.i... | }
return records;
}
|
406 | }
return records;
}
public static void updateDatasetTags(JsonNode root)
throws Exception {
<BUG>final JsonNode idNode = root.path("datasetId");
final JsonNode urnNode = root.path("urn");</BUG>
final JsonNode tags = root.path("tags");
<BUG>if ((idNode.isMissingNode() && urnNode.isMissingNode()) || tags.isMissingNode() |... | }
return records;
}
|
407 | {
ownerName = owner.substring(lastIndex+1);
</BUG>
namespace = owner.substring(0, lastIndex);
<BUG>if (namespace != null && namespace.equalsIgnoreCase("urn:li:griduser"))
{</BUG>
isGroup = "Y";
<BUG>ownerIdType = "GROUP";
}
else
{</BUG>
ownerIdType = "PERSON";
| } else {
datasetId = (Integer) idUrn[0];
urn = (String) idUrn[1];
|
408 | rec.setModifiedTime(System.currentTimeMillis() / 1000);
if (datasetId == 0) {
DatasetRecord record = new DatasetRecord();
record.setUrn(urn);
record.setSourceCreatedTime("" + rec.getCreateTime() / 1000);
<BUG>record.setSchema(rec.getOriginalSchema());
record.setSchemaType(rec.getFormat());
</BUG>
record.setFields((Str... | rec.setModifiedTime(System.currentTimeMillis() / 1000);
if (datasetId == 0) {
DatasetRecord record = new DatasetRecord();
record.setUrn(urn);
record.setSourceCreatedTime("" + rec.getCreateTime() / 1000);
record.setSchema(rec.getOriginalSchema().getText());
record.setSchemaType(rec.getOriginalSchema().getFormat());
reco... |
409 | datasetId = Integer.valueOf(DatasetDao.getDatasetByUrn(urn).get("id").toString());
rec.setDatasetId(datasetId);
}
else {
DICT_DATASET_WRITER.execute(UPDATE_DICT_DATASET_WITH_SCHEMA_CHANGE,
<BUG>new Object[]{rec.getOriginalSchema(), rec.getFormat(), StringUtil.objectToJsonString(rec.getFieldSchema()),
"API", System.curr... | datasetId = Integer.valueOf(DatasetDao.getDatasetByUrn(urn).get("id").toString());
rec.setDatasetId(datasetId);
}
else {
DICT_DATASET_WRITER.execute(UPDATE_DICT_DATASET_WITH_SCHEMA_CHANGE,
new Object[]{rec.getOriginalSchema().getText(), rec.getOriginalSchema().getFormat(),
StringUtil.objectToJsonString(rec.getFieldSche... |
410 | import com.intellij.openapi.actionSystem.ActionGroup;
import com.intellij.openapi.actionSystem.DataProvider;
import com.intellij.openapi.ui.popup.JBPopup;
import com.intellij.openapi.util.ActionCallback;
import com.intellij.openapi.util.DimensionService;
<BUG>import com.intellij.openapi.util.MutualMap;
import com.intel... | import com.intellij.openapi.actionSystem.ActionGroup;
import com.intellij.openapi.actionSystem.DataProvider;
import com.intellij.openapi.ui.popup.JBPopup;
import com.intellij.openapi.util.ActionCallback;
import com.intellij.openapi.util.DimensionService;
import com.intellij.openapi.util.MutualMap;
import com.intellij.u... |
411 | myPlaceInGrid = placeInGrid;
myPlaceholder = placeholder;
myTabs = new JBTabsImpl(myContext.getProject(), myContext.getActionManager(), myContext.getFocusManager(), container) {
@Override
protected Color getFocusedTopFillColor() {
<BUG>return new Color(202, 211, 227);
}</BUG>
@Override
public boolean useSmallLabels() {... | myPlaceInGrid = placeInGrid;
myPlaceholder = placeholder;
myTabs = new JBTabsImpl(myContext.getProject(), myContext.getActionManager(), myContext.getFocusManager(), container) {
@Override
protected Color getFocusedTopFillColor() {
return UIUtil.isUnderDarcula() ? ColorUtil.toAlpha(new Color(0x1E2533), 100) : new Color... |
412 | public boolean useSmallLabels() {
return true;
}
@Override
protected Color getFocusedBottomFillColor() {
<BUG>return new Color(194, 203, 219);
}</BUG>
@Override
public void processDropOver(TabInfo over, RelativePoint point) {
((RunnerContentUi)myContext).myTabs.processDropOver(over, point);
| public boolean useSmallLabels() {
return true;
}
@Override
protected Color getFocusedBottomFillColor() {
return UIUtil.isUnderDarcula() ? new Color(0x1E2533) : new Color(0xc2cbdb);
}
@Override
public Color getBackground() {
return UIUtil.isUnderDarcula() ? new Color(0x27292A) : super.getBackground();
}
@Override
publi... |
413 | package com.intellij.execution.ui.layout.impl;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.actionSystem.ActionGroup;
import com.intellij.openapi.actionSystem.ActionManager;
import com.intellij.openapi.project.Project;
<BUG>import com.intellij.openapi.wm.IdeFocusManager;
import com.intellij.ui.Gr... | package com.intellij.execution.ui.layout.impl;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.actionSystem.ActionGroup;
import com.intellij.openapi.actionSystem.ActionManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.wm.IdeFocusManager;
import com.intellij.ui.ColorUt... |
414 | protected void doPaintInactive(Graphics2D g2d,
boolean leftGhostExists,
TabLabel label,
Rectangle effectiveBounds,
boolean rightGhostExists, int row, int column) {
<BUG>Insets insets = getTabsBorder().getEffectiveBorder();
int _x = effectiveBounds.x + insets.left;</BUG>
int _y = effectiveBounds.y + insets.top + 3;
int ... | protected void doPaintInactive(Graphics2D g2d,
boolean leftGhostExists,
TabLabel label,
Rectangle effectiveBounds,
boolean rightGhostExists, int row, int column) {
Insets insets = getTabsBorder().getEffectiveBorder();
final boolean dark = UIUtil.isUnderDarcula();
int _x = effectiveBounds.x + insets.left;
int _y = effec... |
415 | g2d.fillRect(0, 0, rectangle.x + rectangle.width, 3);
g2d.fillRect(2, maxLength, getSize().width, getSize().height);
g2d.drawLine(0, 0, 0, getSize().height);
}
protected void paintSelectionAndBorder(Graphics2D g2d) {
<BUG>if (getSelectedInfo() == null) return;
TabLabel label = getSelectedLabel();</BUG>
Rectangle r = la... | g2d.fillRect(0, 0, rectangle.x + rectangle.width, 3);
g2d.fillRect(2, maxLength, getSize().width, getSize().height);
g2d.drawLine(0, 0, 0, getSize().height);
}
protected void paintSelectionAndBorder(Graphics2D g2d) {
if (getSelectedInfo() == null) return;
final boolean dark = UIUtil.isUnderDarcula();
final Color col = ... |
416 | Insets i = selectedShape.path.transformInsets(insets);
int _x = r.x;
int _y = r.y;
int _height = r.height;
if (!isHideTabs()) {
<BUG>g2d.setPaint(new GradientPaint(_x, _y, Gray._255, _x, _y + _height - 3, UIUtil.getPanelBackground()));
</BUG>
g2d.fill(selectedShape.fillPath.getShape());
<BUG>g2d.setColor(Gray._255.with... | Insets i = selectedShape.path.transformInsets(insets);
int _x = r.x;
int _y = r.y;
int _height = r.height;
if (!isHideTabs()) {
g2d.setPaint(new GradientPaint(_x, _y, col, _x, _y + _height - 3, panelBg));
g2d.fill(selectedShape.fillPath.getShape());
g2d.setColor(ColorUtil.toAlpha(col, 180));
g2d.draw(selectedShape.fill... |
417 | .transformLine(selectedShape.labelPath.getMaxX() - selectedShape.labelPath.deltaX(1), selectedShape.labelPath.getY() +
selectedShape.labelPath.deltaY(1),
selectedShape.labelPath.getMaxX() - selectedShape.labelPath.deltaX(1), selectedShape.labelPath.getMaxY() -
selectedShape.labelPath.deltaY(4)));
}
<BUG>g2d.setColor(UI... | .transformLine(selectedShape.labelPath.getMaxX() - selectedShape.labelPath.deltaX(1), selectedShape.labelPath.getY() +
selectedShape.labelPath.deltaY(1),
selectedShape.labelPath.getMaxX() - selectedShape.labelPath.deltaX(1), selectedShape.labelPath.getMaxY() -
selectedShape.labelPath.deltaY(4)));
}
g2d.setColor(panelBg... |
418 | package org.gradle.model.internal.manage.schema;
<BUG>import org.gradle.internal.Cast;
import org.gradle.model.internal.core.MutableModelNode;</BUG>
import org.gradle.model.internal.type.ModelType;
<BUG>import java.util.Collection;</BUG>
public class ScalarCollectionSchema<T, E> extends CollectionSchema<T, E> {
public ... | package org.gradle.model.internal.manage.schema;
import org.gradle.model.internal.type.ModelType;
public class ScalarCollectionSchema<T, E> extends CollectionSchema<T, E> {
|
419 | import org.gradle.model.internal.core.rule.describe.ModelRuleDescriptor;
import org.gradle.model.internal.manage.binding.StructBindings;
import org.gradle.model.internal.manage.instance.ManagedInstance;
import org.gradle.model.internal.manage.instance.ManagedProxyFactory;
import org.gradle.model.internal.manage.instanc... | import org.gradle.model.internal.core.rule.describe.ModelRuleDescriptor;
import org.gradle.model.internal.manage.binding.StructBindings;
import org.gradle.model.internal.manage.instance.ManagedInstance;
import org.gradle.model.internal.manage.instance.ManagedProxyFactory;
import org.gradle.model.internal.manage.instanc... |
420 | private <T> T doGet(ModelProperty<T> property, String propertyName) {
ModelType<T> propertyType = property.getType();
MutableModelNode propertyNode = modelNode.getLink(propertyName);
propertyNode.ensureUsable();
ModelView<? extends T> modelView;
<BUG>ModelSchema<T> propertySchema = property.getSchema();
if (property.is... | private <T> T doGet(ModelProperty<T> property, String propertyName) {
ModelType<T> propertyType = property.getType();
MutableModelNode propertyNode = modelNode.getLink(propertyName);
propertyNode.ensureUsable();
ModelView<? extends T> modelView;
if (writable) {
modelView = propertyNode.asMutable(propertyType, ruleDescr... |
421 | private <T> Object doSet(String name, Object value, ModelProperty<T> property) {
ModelSchema<T> propertySchema = property.getSchema();
MutableModelNode propertyNode = modelNode.getLink(name);
propertyNode.ensureUsable();
if (propertySchema instanceof ManagedImplSchema) {
<BUG>if (value == null) {</BUG>
if (propertySche... | private <T> Object doSet(String name, Object value, ModelProperty<T> property) {
ModelSchema<T> propertySchema = property.getSchema();
MutableModelNode propertyNode = modelNode.getLink(name);
propertyNode.ensureUsable();
if (propertySchema instanceof ManagedImplSchema) {
if (propertySchema instanceof ScalarCollectionSc... |
422 | private final ModelType<T> elementType;
public ModelSetModelViewFactory(ModelType<T> elementType) {
this.elementType = elementType;
}
@Override
<BUG>public ModelView<ModelSet<T>> toView(MutableModelNode modelNode, ModelRuleDescriptor ruleDescriptor, boolean writable) {
</BUG>
ModelType<ModelSet<T>> setType = ModelTypes... | private final ModelType<T> elementType;
public ModelSetModelViewFactory(ModelType<T> elementType) {
this.elementType = elementType;
}
@Override
public ModelView<ModelSet<T>> toView(MutableModelNode modelNode, ModelRuleDescriptor ruleDescriptor, boolean mutable) {
ModelType<ModelSet<T>> setType = ModelTypes.modelSet(ele... |
423 | 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 ... | private static FGStorageManager instance;
public final HashMap<IFGObject, Boolean> defaultModifiedMap;
private final UserStorageService userStorageService;
private final Logger logger = FoxGuardMain.instance().getLogger();
private final Set<LoadEntry> loaded = new HashSet<>();
private final Path directory = getDirector... |
424 | constructDirectory(singleDir);
try {
fgObject.save(singleDir);
} catch (Exception e) {
<BUG>logger.error("There was an error while saving region \"" + name + "\"!", e);
</BUG>
}
<BUG>logger.info("Saving metadata for region \"" + name + "\"");
</BUG>
try (DB metaDB = DBMaker.fileDB(singleDir.resolve("metadata.foxdb").no... | constructDirectory(singleDir);
try {
fgObject.save(singleDir);
} catch (Exception e) {
logger.error("There was an error while saving region " + logName + "!", e);
}
logger.info("Saving metadata for region " + logName);
try (DB metaDB = DBMaker.fileDB(singleDir.resolve("metadata.foxdb").normalize().toString()).make()) {... |
425 | metaCategory.set(FGUtil.getCategory(fgObject));
<BUG>metaType.set(fgObject.getUniqueTypeString());
metaEnabled.set(fgObject.isEnabled());</BUG>
}
} else {
<BUG>logger.info("Region \"" + name + "\" is already up to date. Skipping...");
</BUG>
}
mainMap.put(name, FGUtil.getCategory(fgObject));
<BUG>typeMap.put(name, fgOb... | metaCategory.set(FGUtil.getCategory(fgObject));
metaType.set(fgObject.getUniqueTypeString());
metaOwner.set(owner);
metaEnabled.set(fgObject.isEnabled());
}
} else {
logger.info("Region " + logName + " is already up to date. Skipping...");
}
mainMap.put(name, FGUtil.getCategory(fgObject));
typeMap.put(name, fgObject.ge... |
426 | mainMap.put(name, FGUtil.getCategory(fgObject));
<BUG>typeMap.put(name, fgObject.getUniqueTypeString());
enabledMap.put(name, fgObject.isEnabled());</BUG>
defaultModifiedMap.put(fgObject, false);
} else {
<BUG>logger.info("Region " + fgObject.getName() + " does not need saving. Skipping...");
</BUG>
}
if (fgObject.save... | mainMap.put(name, FGUtil.getCategory(fgObject));
typeMap.put(name, fgObject.getUniqueTypeString());
ownerMap.put(name, owner);
enabledMap.put(name, fgObject.isEnabled());
defaultModifiedMap.put(fgObject, false);
} else {
logger.info("Region " + logName + " does not need saving. Skipping...");
}
if (fgObject.saveLinks()... |
427 | constructDirectory(singleDir);
try {
fgObject.save(singleDir);
} catch (Exception e) {
<BUG>logger.error("There was an error while saving world region \"" + name + "\" in world \"" + world.getName() + "\"!", e);
</BUG>
}
<BUG>logger.info("Saving metadata for world region \"" + name + "\"");
</BUG>
try (DB metaDB = DBMa... | constructDirectory(singleDir);
try {
fgObject.save(singleDir);
} catch (Exception e) {
logger.error("There was an error while saving world region " + logName + " in world " + world.getName() + "!", e);
}
logger.info("Saving metadata for world region " + logName);
try (DB metaDB = DBMaker.fileDB(singleDir.resolve("metad... |
428 | metaCategory.set(FGUtil.getCategory(fgObject));
<BUG>metaType.set(fgObject.getUniqueTypeString());
metaEnabled.set(fgObject.isEnabled());</BUG>
}
} else {
<BUG>logger.info("Region \"" + name + "\" is already up to date. Skipping...");
</BUG>
}
mainMap.put(name, FGUtil.getCategory(fgObject));
<BUG>typeMap.put(name, fgOb... | metaCategory.set(FGUtil.getCategory(fgObject));
metaType.set(fgObject.getUniqueTypeString());
metaOwner.set(owner);
metaEnabled.set(fgObject.isEnabled());
}
} else {
logger.info("Region " + logName + " is already up to date. Skipping...");
}
mainMap.put(name, FGUtil.getCategory(fgObject));
typeMap.put(name, fgObject.ge... |
429 | mainMap.put(name, FGUtil.getCategory(fgObject));
<BUG>typeMap.put(name, fgObject.getUniqueTypeString());
enabledMap.put(name, fgObject.isEnabled());</BUG>
defaultModifiedMap.put(fgObject, false);
} else {
<BUG>logger.info("World region " + fgObject.getName() + " does not need saving. Skipping...");
</BUG>
}
if (fgObjec... | mainMap.put(name, FGUtil.getCategory(fgObject));
typeMap.put(name, fgObject.getUniqueTypeString());
ownerMap.put(name, owner);
enabledMap.put(name, fgObject.isEnabled());
defaultModifiedMap.put(fgObject, false);
} else {
logger.info("World region " + logName + " does not need saving. Skipping...");
}
if (fgObject.saveL... |
430 | 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... | String name = fgObject.getName();
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()) {
Pa... |
431 | constructDirectory(singleDir);
try {
fgObject.save(singleDir);
} catch (Exception e) {
<BUG>logger.error("There was an error while saving region \"" + name + "\"!", e);
</BUG>
}
<BUG>logger.info("Saving metadata for region \"" + name + "\"");
</BUG>
try (DB metaDB = DBMaker.fileDB(singleDir.resolve("metadata.foxdb").no... | constructDirectory(singleDir);
try {
fgObject.save(singleDir);
} catch (Exception e) {
logger.error("There was an error while saving region " + logName + "!", e);
}
logger.info("Saving metadata for region " + logName);
try (DB metaDB = DBMaker.fileDB(singleDir.resolve("metadata.foxdb").normalize().toString()).make()) {... |
432 | metaCategory.set(FGUtil.getCategory(fgObject));
<BUG>metaType.set(fgObject.getUniqueTypeString());
metaEnabled.set(fgObject.isEnabled());</BUG>
}
} else {
<BUG>logger.info("Region \"" + name + "\" is already up to date. Skipping...");
</BUG>
}
mainMap.put(name, FGUtil.getCategory(fgObject));
<BUG>typeMap.put(name, fgOb... | metaCategory.set(FGUtil.getCategory(fgObject));
metaType.set(fgObject.getUniqueTypeString());
metaOwner.set(owner);
metaEnabled.set(fgObject.isEnabled());
}
} else {
logger.info("Region " + logName + " is already up to date. Skipping...");
}
mainMap.put(name, FGUtil.getCategory(fgObject));
typeMap.put(name, fgObject.ge... |
433 | mainMap.put(name, FGUtil.getCategory(fgObject));
<BUG>typeMap.put(name, fgObject.getUniqueTypeString());
enabledMap.put(name, fgObject.isEnabled());</BUG>
defaultModifiedMap.put(fgObject, false);
} else {
<BUG>logger.info("Region " + fgObject.getName() + " does not need saving. Skipping...");
</BUG>
}
if (fgObject.save... | mainMap.put(name, FGUtil.getCategory(fgObject));
typeMap.put(name, fgObject.getUniqueTypeString());
ownerMap.put(name, owner);
enabledMap.put(name, fgObject.isEnabled());
defaultModifiedMap.put(fgObject, false);
} else {
logger.info("Region " + logName + " does not need saving. Skipping...");
}
if (fgObject.saveLinks()... |
434 | 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... | if (fgObject.autoSave()) {
Path singleDir = serverDir.resolve(name.toLowerCase());
boolean shouldSave = fgObject.shouldSave();
if (force || shouldSave) {
logger.info((shouldSave ? "S" : "Force s") + "aving world region " + logName + " in directory: " + singleDir);
constructDirectory(singleDir);
try {
fgObject.save(sing... |
435 | </BUG>
constructDirectory(singleDir);
try {
fgObject.save(singleDir);
} catch (Exception e) {
<BUG>logger.error("There was an error while saving world region \"" + name + "\" in world \"" + world.getName() + "\"!", e);
</BUG>
}
<BUG>logger.info("Saving metadata for world region \"" + name + "\"");
</BUG>
try (DB metaDB... | if (fgObject.autoSave()) {
Path singleDir = serverDir.resolve(name.toLowerCase());
boolean shouldSave = fgObject.shouldSave();
if (force || shouldSave) {
logger.info((shouldSave ? "S" : "Force s") + "aving world region " + logName + " in directory: " + singleDir);
constructDirectory(singleDir);
try {
fgObject.save(sing... |
436 | metaCategory.set(FGUtil.getCategory(fgObject));
<BUG>metaType.set(fgObject.getUniqueTypeString());
metaEnabled.set(fgObject.isEnabled());</BUG>
}
} else {
<BUG>logger.info("Region \"" + name + "\" is already up to date. Skipping...");
}</BUG>
mainMap.put(name, FGUtil.getCategory(fgObject));
<BUG>typeMap.put(name, fgObj... | metaCategory.set(FGUtil.getCategory(fgObject));
metaType.set(fgObject.getUniqueTypeString());
metaOwner.set(owner);
metaEnabled.set(fgObject.isEnabled());
}
} else {
logger.info("Region " + name + " is already up to date. Skipping...");
}
mainMap.put(name, FGUtil.getCategory(fgObject));
typeMap.put(name, fgObject.getUn... |
437 | mainMap.put(name, FGUtil.getCategory(fgObject));
<BUG>typeMap.put(name, fgObject.getUniqueTypeString());
enabledMap.put(name, fgObject.isEnabled());</BUG>
defaultModifiedMap.put(fgObject, false);
} else {
<BUG>logger.info("World region " + fgObject.getName() + " does not need saving. Skipping...");
</BUG>
}
if (fgObjec... | mainMap.put(name, FGUtil.getCategory(fgObject));
typeMap.put(name, fgObject.getUniqueTypeString());
ownerMap.put(name, owner);
enabledMap.put(name, fgObject.isEnabled());
defaultModifiedMap.put(fgObject, false);
} else {
logger.info("World region " + logName + " does not need saving. Skipping...");
}
if (fgObject.saveL... |
438 | 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(... | 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(... |
439 | 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... | 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... |
440 | 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;
| StringBuilder builder = new StringBuilder();
for (Iterator<IHandler> it = handlers.iterator(); it.hasNext(); ) {
builder.append(it.next().getName());
if (it.hasNext()) builder.append(",");
}
return builder.toString();
}
public enum Type {
REGION, WREGION, HANDLER
}
private final class LoadEntry {
public final String na... |
441 | 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 org.spongepowered.api.world.Locatable;
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.World;
import javax.annotation.Nullable;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases... |
442 | import net.foxdenstudio.sponge.foxguard.plugin.handler.GlobalHandler;
import net.foxdenstudio.sponge.foxguard.plugin.handler.IHandler;
import net.foxdenstudio.sponge.foxguard.plugin.object.IFGObject;
import net.foxdenstudio.sponge.foxguard.plugin.object.IGlobal;
import net.foxdenstudio.sponge.foxguard.plugin.region.IRe... | import net.foxdenstudio.sponge.foxguard.plugin.handler.GlobalHandler;
import net.foxdenstudio.sponge.foxguard.plugin.handler.IHandler;
import net.foxdenstudio.sponge.foxguard.plugin.object.IFGObject;
import net.foxdenstudio.sponge.foxguard.plugin.object.IGlobal;
import net.foxdenstudio.sponge.foxguard.plugin.region.IRe... |
443 | 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 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;
import java.util.Optional;
import java.util.stream.Stream;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
pu... |
444 | .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... | .append(Text.of(TextColors.GREEN, "Usage: "))
.append(getUsage(source))
.build());
return CommandResult.empty();
} else if (isIn(REGIONS_ALIASES, parse.args[0])) {
if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!"));
String regionName = parse.args[1];
IRegion region = FGManager.getIns... |
445 | </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);
isWorldRegion = true;
}
if (region == null)
th... |
446 | 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[... | 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!"));
Optional<IHandler> handlerOpt = FGManager.getInstance().gethandler(par... |
447 | .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... | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
.map(args -> parse.current.prefix + args)
.collect(GuavaColl... |
448 | .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... | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
.map(args -> parse.current.prefix + args)
.collect(GuavaColl... |
449 | .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... | .autoCloseQuotes(true)
.leaveFinalAsIs(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
return Stream.of("region", "worldregion", "handler", "controller")
.filter(new StartsWithPredicate(parse.current.token))
.collect(GuavaCollectors.toImmu... |
450 | .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... | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
.map(args -> parse.current.prefix + args)
.collect(GuavaColl... |
451 | @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... | @Dependency(id = "foxcore")
},
description = "A world protection plugin built for SpongeAPI. Requires FoxCore.",
authors = {"gravityfox"},
url = "https://github.com/FoxDenStudio/FoxGuard")
public final class FoxGuardMain {
private static FoxGuardMain instanceField;
public final Cause pluginCause = Cause.builder().named... |
452 | 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;
| private UserStorageService userStorage;
private EconomyService economyService = null;
private boolean loaded = false;
private FCCommandDispatcher fgDispatcher;
public static FoxGuardMain instance() {
return instanceField;
}
public static Cause getCause() {
return instance().pluginCause;
}
@Listener
public void construc... |
453 | return configDirectory;
}
public boolean isLoaded() {
return loaded;
}
<BUG>public static Cause getCause() {
return instance().pluginCause;
}</BUG>
public EconomyService getEconomyService() {
return economyService;
| return configDirectory;
}
public boolean isLoaded() {
return loaded;
}
public EconomyService getEconomyService() {
return economyService;
|
454 | public static int lavaBowDurability = 1750;
<BUG>@ModConfigProperty(category = "Weapons.Bows.Properties", name = "guardianBowDurability", comment = "Set the amount of durability the Guardian Bow have")
</BUG>
public static int guardianBowDurability = 1800;
<BUG>@ModConfigProperty(category = "Weapons.Bows.Properties", n... | public static int lavaBowDurability = 1750;
@ModConfigProperty(category = "Weapons.Guardian.Bow", name = "guardianBowDurability", comment = "Set the amount of durability the Guardian Bow have")
public static int guardianBowDurability = 1800;
@ModConfigProperty(category = "Weapons.SuperStar.Bow", name = "superStarBowDur... |
455 | 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... | 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... |
456 | public static boolean enableSlimeArmor = true;
<BUG>@ModConfigProperty(category = "Armors.SteelArmor.Registry", name = "enableSteelArmor", comment = "Enable/Disable The Steel Armors From the Game")
</BUG>
public static boolean enableSteelArmor = true;
<BUG>@ModConfigProperty(category = "Armors.ElectricalArmor.Registry"... | public static boolean enableSlimeArmor = true;
@ModConfigProperty(category = "Armors.SteelArmor.Registry", name = "enableSteelArmor", comment = "Enable/Disable the Steel Armors from the Game")
public static boolean enableSteelArmor = true;
@ModConfigProperty(category = "Armors.ElectricalArmor.Registry", name = "enableE... |
457 | package util;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
<BUG>import java.util.Iterator;
import java.util.SortedSet;</BUG>
import java.util.TreeSet;
import javax.swing.AbstractListModel;
public class SortedListModel extends AbstractListModel
| package util;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import javax.swing.AbstractListModel;
public class SortedListModel extends AbstractListModel
|
458 | import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
<BUG>import java.io.BufferedWriter;</BUG>
import java.io.File;
<BUG>import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import j... | import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import java.io.File;
|
459 | import java.io.FileReader;</BUG>
import java.io.IOException;
<BUG>import java.io.OutputStreamWriter;</BUG>
import java.net.URI;
import java.net.URISyntaxException;
<BUG>import java.util.Map;
import java.util.Set;</BUG>
import java.util.TreeMap;
import javax.imageio.IIOException;
import javax.imageio.ImageIO;
| import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.TreeMap;
import javax.im... |
460 | import javax.swing.JTextField;
import javax.swing.ScrollPaneConstants;
import javax.swing.SwingUtilities;
import javax.swing.border.LineBorder;
import javax.swing.text.AbstractDocument;
<BUG>import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonO... | import javax.swing.JTextField;
import javax.swing.ScrollPaneConstants;
import javax.swing.SwingUtilities;
import javax.swing.border.LineBorder;
import javax.swing.text.AbstractDocument;
import main.AnimeIndex;
|
461 | if (f.isDirectory())
return true;
String extension = MAMUtil.getExtension(f);
if (extension != null)
{
<BUG>if (extension.equalsIgnoreCase(".zip"))
</BUG>
return true;
return false;
}
| if (f.isDirectory())
return true;
String extension = MAMUtil.getExtension(f);
if (extension != null)
{
if (extension.equalsIgnoreCase(".MAMListBKP"))
return true;
return false;
}
|
462 | package util.task;
import java.awt.event.ActionEvent;
<BUG>import java.awt.event.ActionListener;
import java.io.IOException;</BUG>
import java.net.URISyntaxException;
import java.security.GeneralSecurityException;
import javax.swing.SwingWorker;
| package util.task;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.security.GeneralSecurityException;
import javax.swing.SwingWorker;
|
463 | private Set<Conditional> conditionals;
public int fortuneLevel;
public boolean enchanted;
private float sortIndex;
public LootDrop(ItemStack item) {
<BUG>this(item, item.stackSize);
}</BUG>
public LootDrop(ItemStack item, float chance) {
this(item, chance, 0);
}
| private Set<Conditional> conditionals;
public int fortuneLevel;
public boolean enchanted;
private float sortIndex;
public LootDrop(ItemStack item) {
this(item, item.func_190916_E());
}
public LootDrop(ItemStack item, float chance) {
this(item, chance, 0);
}
|
464 | package jeresources.collection;
<BUG>import jeresources.entry.VillagerEntry;
import mezz.jei.api.recipe.IFocus;
import net.minecraft.entity.passive.EntityVillager;</BUG>
import net.minecraft.item.ItemStack;
import net.minecraft.village.MerchantRecipe;
| package jeresources.collection;
import jeresources.entry.VillagerEntry;
import jeresources.util.FakeMerchant;
import mezz.jei.api.recipe.IFocus;
import net.minecraft.entity.IMerchant;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.item.ItemStack;
import net.minecraft.village.MerchantRecipe;
|
465 | import java.util.LinkedList;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
public class TradeList extends LinkedList<TradeList.Trade> {
<BUG>private static final Random r = new Random();
private VillagerEntry villagerEntry;</BUG>
public TradeList(VillagerEntry villagerEntry) {
this... | import java.util.LinkedList;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
public class TradeList extends LinkedList<TradeList.Trade> {
private static final Random r = new Random();
private static final IMerchant m = new FakeMerchant();
private VillagerEntry villagerEntry;
public T... |
466 | return this.stream().filter(trade -> trade.sellsItem(itemStack)).collect(Collectors.toCollection(() -> new TradeList(villagerEntry)));
}
public TradeList getSubListBuy(ItemStack itemStack) {
return this.stream().filter(trade -> trade.buysItem(itemStack)).collect(Collectors.toCollection(() -> new TradeList(villagerEntry... | return this.stream().filter(trade -> trade.sellsItem(itemStack)).collect(Collectors.toCollection(() -> new TradeList(villagerEntry)));
}
public TradeList getSubListBuy(ItemStack itemStack) {
return this.stream().filter(trade -> trade.buysItem(itemStack)).collect(Collectors.toCollection(() -> new TradeList(villagerEntry... |
467 | public boolean buysItem(ItemStack itemStack) {
return this.buy1.isItemEqual(itemStack) || (this.buy2 != null && this.buy2.isItemEqual(itemStack));
}
public ItemStack getMinBuyStack1() {
ItemStack minBuyStack = this.buy1.copy();
<BUG>minBuyStack.stackSize = this.minBuy1;
return minBuyStack;</BUG>
}
public ItemStack getM... | public boolean buysItem(ItemStack itemStack) {
return this.buy1.isItemEqual(itemStack) || (this.buy2 != null && this.buy2.isItemEqual(itemStack));
}
public ItemStack getMinBuyStack1() {
ItemStack minBuyStack = this.buy1.copy();
minBuyStack.func_190920_e(this.minBuy1);
return minBuyStack;
}
public ItemStack getMinBuySta... |
468 | }
@Override
public void getIngredients(@Nonnull IIngredients ingredients) {
ingredients.setOutputs(ItemStack.class, this.chest.getItemStacks(null));
}
<BUG>@Nonnull
@Override
public List getOutputs() {
return this.chest.getItemStacks(null);
}</BUG>
public int amountOfItems(IFocus<ItemStack> focus) {
| }
@Override
public void getIngredients(@Nonnull IIngredients ingredients) {
ingredients.setOutputs(ItemStack.class, this.chest.getItemStacks(null));
}
public int amountOfItems(IFocus<ItemStack> focus) {
|
469 | @Override
<BUG>public void drawAnimations(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {
RenderHelper.renderChest(15, 20, -40, 20, getLidAngle());
}
@Override
public void onTooltip(int slotIndex, boolean input, ItemStack ingredient, List<String> tooltip) {
</BUG>
tooltip.add(this.chest.getChestDrop(... | @Override
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) {
RenderHelper.renderChest(15, 20, -40, 20, getLidAngle());
Font.normal.print(TranslationHelper.translateToLocal(this.chest.getName()), 60, 7);
Font.small.print(DungeonRegistry.getInstance().getNumSta... |
470 | import net.minecraft.client.Minecraft;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.world.World;
public abstract class CompatBase {
public static World getWorld() {
<BUG>World world = Minecraft.getMinecraft().theWorld;
</BUG>
if (world == null) {
world = new FakeClientWorld();
}
| import net.minecraft.client.Minecraft;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.world.World;
public abstract class CompatBase {
public static World getWorld() {
World world = Minecraft.getMinecraft().world;
if (world == null) {
world = new FakeClientWorld();
}
|
471 | import jeresources.entry.DungeonEntry;
import jeresources.entry.MobEntry;
import jeresources.entry.PlantEntry;
import jeresources.entry.WorldGenEntry;
import jeresources.util.LootTableHelper;
<BUG>import net.minecraft.entity.boss.EntityDragon;
import net.minecraft.entity.monster.EntityGiantZombie;
import net.minecraft.... | import jeresources.entry.DungeonEntry;
import jeresources.entry.MobEntry;
import jeresources.entry.PlantEntry;
import jeresources.entry.WorldGenEntry;
import jeresources.util.LootTableHelper;
import net.minecraft.entity.boss.EntityDragon;
import net.minecraft.entity.monster.EntityElderGuardian;
import net.minecraft.ent... |
472 | LootTableHelper.getAllMobLootTables(world).entrySet().stream()
.map(entry -> new MobEntry(entry.getValue(), manager.getLootTableFromLocation(entry.getKey())))
.forEach(this::registerMob);
registerMobRenderHook(EntityBat.class, RenderHooks.BAT);
registerMobRenderHook(EntityDragon.class, RenderHooks.ENDER_DRAGON);
<BUG>r... | LootTableHelper.getAllMobLootTables(world).entrySet().stream()
.map(entry -> new MobEntry(entry.getValue(), manager.getLootTableFromLocation(entry.getKey())))
.forEach(this::registerMob);
registerMobRenderHook(EntityBat.class, RenderHooks.BAT);
registerMobRenderHook(EntityDragon.class, RenderHooks.ENDER_DRAGON);
regist... |
473 | String name = DungeonRegistry.categoryToLocalKeyMap.get(this.name);
return name == null ? this.name : name;
}
public List<ItemStack> getItemStacks(IFocus<ItemStack> focus) {
return drops.stream().map(drop -> drop.item)
<BUG>.filter(stack -> focus == null || focus.getValue() == null || ItemStack.areItemStacksEqual(ItemH... | String name = DungeonRegistry.categoryToLocalKeyMap.get(this.name);
return name == null ? this.name : name;
}
public List<ItemStack> getItemStacks(IFocus<ItemStack> focus) {
return drops.stream().map(drop -> drop.item)
.filter(stack -> focus == null || ItemStack.areItemStacksEqual(ItemHandlerHelper.copyStackWithSize(st... |
474 | package jeresources.compatibility.minecraft;
import jeresources.api.render.IMobRenderHook;
import net.minecraft.client.renderer.GlStateManager;
<BUG>import net.minecraft.entity.boss.EntityDragon;
import net.minecraft.entity.monster.EntityGiantZombie;
import net.minecraft.entity.monster.EntityGuardian;
</BUG>
import net... | package jeresources.compatibility.minecraft;
import jeresources.api.render.IMobRenderHook;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.boss.EntityDragon;
import net.minecraft.entity.monster.EntityElderGuardian;
import net.minecraft.entity.monster.EntityGiantZombie;
import net.minecr... |
475 | import net.minecraftforge.fml.common.ModMetadata;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLLoadCompleteEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
<BUG>@Mod(modid = R... | import net.minecraftforge.fml.common.ModMetadata;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLLoadCompleteEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
@Mod(modid = Refere... |
476 | if (postAnalysisFilterScript != null) {
if (Files.exists(Paths.get(postAnalysisFilterScript))) {
ScriptEngine scriptEngine = new ScriptEngineManager().getEngineByName("groovy");
Bindings bindings = scriptEngine.createBindings();
bindings.put("jApiClasses", jApiClasses);
<BUG>try {
Object returnValue = scriptEngine.eval... | if (postAnalysisFilterScript != null) {
if (Files.exists(Paths.get(postAnalysisFilterScript))) {
ScriptEngine scriptEngine = new ScriptEngineManager().getEngineByName("groovy");
Bindings bindings = scriptEngine.createBindings();
bindings.put("jApiClasses", jApiClasses);
try (InputStreamReader fileReader = new InputStre... |
477 | throw new MojoFailureException("Post-analysis script does not return a list.");
}
} catch (ScriptException e) {
throw new MojoFailureException("Execution of post-analysis script failed: " + e.getMessage(), e);
} catch (FileNotFoundException e) {
<BUG>throw new MojoFailureException("Post-analysis script '" + postAnalysi... | throw new MojoFailureException("Post-analysis script does not return a list.");
}
} catch (ScriptException e) {
throw new MojoFailureException("Execution of post-analysis script failed: " + e.getMessage(), e);
} catch (FileNotFoundException e) {
throw new MojoFailureException("Post-analysis script '" + postAnalysisFilt... |
478 | private String generateDiffOutput(List<JApiClass> jApiClasses, Options options) {
StdoutOutputGenerator stdoutOutputGenerator = new StdoutOutputGenerator(options, jApiClasses);
return stdoutOutputGenerator.generate();
}
private XmlOutput generateXmlOutput(List<JApiClass> jApiClasses, File jApiCmpBuildDir, Options optio... | private String generateDiffOutput(List<JApiClass> jApiClasses, Options options) {
StdoutOutputGenerator stdoutOutputGenerator = new StdoutOutputGenerator(options, jApiClasses);
return stdoutOutputGenerator.generate();
}
private XmlOutput generateXmlOutput(List<JApiClass> jApiClasses, File jApiCmpBuildDir, Options optio... |
479 | } else {
if (getLog().isDebugEnabled()) {
getLog().debug("Element <dependencies/> found. Using " + JApiCli.ClassPathMode.ONE_COMMON_CLASSPATH);
}
for (Dependency dependency : pluginParameters.getDependenciesParam()) {
<BUG>List<File> files = resolveDependencyToFile("dependencies", dependency, mavenParameters, true, plu... | } else {
if (getLog().isDebugEnabled()) {
getLog().debug("Element <dependencies/> found. Using " + JApiCli.ClassPathMode.ONE_COMMON_CLASSPATH);
}
for (Dependency dependency : pluginParameters.getDependenciesParam()) {
List<File> files = resolveDependencyToFile("dependencies", dependency, mavenParameters, true, pluginPa... |
480 | Set<Artifact> dependencyArtifacts = mavenParameters.getMavenProject().getArtifacts();
Set<String> classPathEntries = new HashSet<>();
for (Artifact artifact : dependencyArtifacts) {
String scope = artifact.getScope();
if (!"test".equals(scope) && !artifact.isOptional()) {
<BUG>Set<Artifact> artifacts = resolveArtifact(... | Set<Artifact> dependencyArtifacts = mavenParameters.getMavenProject().getArtifacts();
Set<String> classPathEntries = new HashSet<>();
for (Artifact artifact : dependencyArtifacts) {
String scope = artifact.getScope();
if (!"test".equals(scope) && !artifact.isOptional()) {
Set<Artifact> artifacts = resolveArtifact(artif... |
481 | }
for (String classPathEntry : classPathEntries) {
comparatorOptions.getClassPathEntries().add(classPathEntry);
}
}
<BUG>private List<File> retrieveFileFromConfiguration(DependencyDescriptor dependencyDescriptor, String parameterName, MavenParameters mavenParameters, PluginParameters pluginParameters) throws MojoFailur... | }
comparatorOptions.setClassPathMode(JarArchiveComparatorOptions.ClassPathMode.ONE_COMMON_CLASSPATH);
}
}
}
|
482 | throw new MojoFailureException("Missing configuration parameter 'dependency'.");
}
}
throw new MojoFailureException(String.format("Missing configuration parameter: %s", parameterName));
}
<BUG>private List<File> resolveConfigurationFileToFile(String parameterName, ConfigurationFile configurationFile) throws MojoFailure... | throw new MojoFailureException("Missing configuration parameter 'dependency'.");
}
}
throw new MojoFailureException(String.format("Missing configuration parameter: %s", parameterName));
}
private List<File> resolveConfigurationFileToFile(String parameterName, ConfigurationFile configurationFile, ConfigurationVersion co... |
483 | String path = configurationFile.getPath();
if (path == null) {
throw new MojoFailureException(String.format("The path element in the configuration of the plugin is missing for %s.", parameterName));
}
File file = new File(path);
<BUG>if (!file.exists()) {
throw new MojoFailureException(String.format("The path '%s' does... | String path = configurationFile.getPath();
if (path == null) {
throw new MojoFailureException(String.format("The path element in the configuration of the plugin is missing for %s.", parameterName));
|
484 | throw new MojoFailureException(String.format("The file given by path '%s' is either not a file or is not readable.", path));
}
return Collections.singletonList(file);</BUG>
}
<BUG>private List<File> resolveDependencyToFile(String parameterName, Dependency dependency, MavenParameters mavenParameters, boolean transitivel... | throw new MojoFailureException(String.format("The file given by path '%s' is either not a file or is not readable.", path));
}
}
return Collections.singletonList(file);
}
private List<File> resolveDependencyToFile(String parameterName, Dependency dependency, MavenParameters mavenParameters, boolean transitively, Plugin... |
485 | getLog().debug("Trying to resolve dependency '" + dependency + "' to file.");
}
if (dependency.getSystemPath() == null) {
String descriptor = dependency.getGroupId() + ":" + dependency.getArtifactId() + ":" + dependency.getVersion();
getLog().debug(parameterName + ": " + descriptor);
<BUG>Set<Artifact> artifacts = reso... | getLog().debug("Trying to resolve dependency '" + dependency + "' to file.");
}
if (dependency.getSystemPath() == null) {
String descriptor = dependency.getGroupId() + ":" + dependency.getArtifactId() + ":" + dependency.getVersion();
getLog().debug(parameterName + ": " + descriptor);
Set<Artifact> artifacts = resolveAr... |
486 | throw new MojoFailureException(String.format("Could not resolve dependency with descriptor '%s'.", descriptor));
}
}
if (files.size() == 0) {
String message = String.format("Could not resolve dependency with descriptor '%s'.", descriptor);
<BUG>if (ignoreNonResolvableArtifacts(pluginParameters)) {
getLog().warn(message... | throw new MojoFailureException(String.format("Could not resolve dependency with descriptor '%s'.", descriptor));
}
}
if (files.size() == 0) {
String message = String.format("Could not resolve dependency with descriptor '%s'.", descriptor);
if (ignoreNonResolvableArtifacts(pluginParameters) || ignoreMissingOldVersion(pl... |
487 | Artifact artifact = mavenParameters.getArtifactFactory().createArtifactWithClassifier(dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion(), dependency.getType(), dependency.getClassifier());
<BUG>return resolveArtifact(artifact, mavenParameters, transitively, pluginParameters);
</BUG>
}
<BUG>pri... | Artifact artifact = mavenParameters.getArtifactFactory().createArtifactWithClassifier(dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion(), dependency.getType(), dependency.getClassifier());
return resolveArtifact(artifact, mavenParameters, transitively, pluginParameters, configurationVersion);
... |
488 | JApiMethod jApiMethod = getJApiMethod(jApiClass.getMethods(), "method");
assertThat(jApiMethod.getCompatibilityChanges().size(), is(0));
assertThat(jApiMethod.isBinaryCompatible(), is(true));
assertThat(jApiMethod.isSourceCompatible(), is(true));
}
<BUG>@Test
public void testClassNowCheckedException() throws Exception ... | JApiMethod jApiMethod = getJApiMethod(jApiClass.getMethods(), "method");
assertThat(jApiMethod.getCompatibilityChanges(), hasItem(JApiCompatibilityChange.METHOD_ADDED_TO_INTERFACE));
assertThat(jApiMethod.isBinaryCompatible(), is(true));
assertThat(jApiMethod.isSourceCompatible(), is(false));
}
@Test
public void testAb... |
489 | package com.example.mapdemo;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
<BUG>import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android... | package com.example.mapdemo;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.Dash;
import com.google.android.gms.ma... |
490 | package jetbrains.mps.baseLanguage.behavior;
import jetbrains.mps.smodel.SNode;
import java.util.Set;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
<BUG>import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.internal.collections.runtime.SetSequence;</B... | package jetbrains.mps.baseLanguage.behavior;
import jetbrains.mps.smodel.SNode;
import java.util.Set;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.typesystem.inference.TypeChecker;
import jetbrain... |
491 | Range nod = nodata;
<BUG>Double destNod = null;
</BUG>
if (backgroundValues != null && backgroundValues.length > 0) {
<BUG>destNod = backgroundValues[0];
}</BUG>
if (interp instanceof InterpolationBilinear) {
interpB = (InterpolationBilinear) interp;
this.interp = interpB;
interpB.setROIdata(roiBounds, roiIter);
| Range nod = nodata;
double[] destNod = null;
if (backgroundValues != null && backgroundValues.length > 0) {
destNod = backgroundValues;
}
if (interp instanceof InterpolationBilinear) {
interpB = (InterpolationBilinear) interp;
this.interp = interpB;
interpB.setROIdata(roiBounds, roiIter);
|
492 | interpB.setROIdata(roiBounds, roiIter);
if (nod == null) {
nod = interpB.getNoDataRange();
}
if (destNod == null) {
<BUG>destNod = interpB.getDestinationNoData();
</BUG>
}
}
if (nod != null) {
| interpB.setROIdata(roiBounds, roiIter);
if (nod == null) {
nod = interpB.getNoDataRange();
}
if (destNod == null) {
destNod = new double[]{interpB.getDestinationNoData()};
}
}
if (nod != null) {
|
493 | } else {
<BUG>byteLookupTable[i] = 0;
</BUG>
if(i !=0){
<BUG>byteLookupTable[0] = 1;
</BUG>
}
}
} else {
<BUG>byteLookupTable[i] = value;
</BUG>
}
| } else {
byteLookupTable[b][i] = 0;
if(i !=0){
byteLookupTable[b][0] = 1;
}
}
} else {
byteLookupTable[b][i] = value;
|
494 | s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
495 | dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
dstPixelOffset += dstPixelStride;
}
}
|
496 | s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
dstPixelOffset += dstPixelStride;
}
} else
|
497 | final int w10 = roiIter.getSample(x0, y0 + 1, 0) & 0xff;
final int w11 = roiIter.getSample(x0 + 1, y0 + 1, 0) & 0xff;
if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) {
if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDa... | final int w10 = roiIter.getSample(x0, y0 + 1, 0) & 0xff;
final int w11 = roiIter.getSample(x0 + 1, y0 + 1, 0) & 0xff;
if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) {
if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByt... |
498 | dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
dstPixelOffset += dstPixelStride;
}
}
|
499 | for (int k2 = 0; k2 < dst_num_bands; k2++) {
int s00 = srcDataArrays[k2][posx + posy + bandOffsets[k2]];
int s01 = srcDataArrays[k2][posxhigh + posy + bandOffsets[k2]];
int s10 = srcDataArrays[k2][posx + posyhigh + bandOffsets[k2]];
int s11 = srcDataArrays[k2][posxhigh + posyhigh + bandOffsets[k2]];
<BUG>int w00 = byte... | for (int k2 = 0; k2 < dst_num_bands; k2++) {
int s00 = srcDataArrays[k2][posx + posy + bandOffsets[k2]];
int s01 = srcDataArrays[k2][posxhigh + posy + bandOffsets[k2]];
int s10 = srcDataArrays[k2][posx + posyhigh + bandOffsets[k2]];
int s11 = srcDataArrays[k2][posxhigh + posyhigh + bandOffsets[k2]];
int w00 = byteLooku... |
500 | dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = (byte) (intResult & 0xff);
}
}
} else if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte;
</BUG>
}
}
if (fracx < fracdx1) {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = (byte) (intResult & 0xff);
}
}
} else if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
}
}
if (fracx < fracdx1) {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.