id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
43,101
notifyItemChanged(position); if (mItemClickListener != null) mItemClickListener.onItemClick(v, position); } }); <BUG>if (tag.selected) label.getChildAt(0).setBackgroundResource(R.color.colorPrimary); else label.getChildAt(0).setBackgroundResource(R.color.dimgray);</BUG> }
[DELETED]
43,102
loadPicture(picture, task, null, true); } else if (!TextUtils.isEmpty(picture.pic) && !highRes) { picture.retries = 0; loadPicture(picture, task, null, false); } else if (task.collection.site.hasFlag(Site.FLAG_SINGLE_PAGE_BIG_PICTURE) <BUG>&& task.collection.site.extraRule != null && task.collection.site.extraRule.pictureUrl != null) { </BUG> getPictureUrl(picture, task, task.collection.site.extraRule.pictureUrl, task.collection.site.extraRule.pictureHighRes);
&& task.collection.site.extraRule != null) { if(task.collection.site.extraRule.pictureRule != null && task.collection.site.extraRule.pictureRule.url != null) getPictureUrl(picture, task, task.collection.site.extraRule.pictureRule.url, task.collection.site.extraRule.pictureRule.highRes); else if(task.collection.site.extraRule.pictureUrl != null)
43,103
if (Picture.hasPicPosfix(picture.url)) { picture.pic = picture.url; loadPicture(picture, task, null, false); } else if (task.collection.site.hasFlag(Site.FLAG_JS_NEEDED_ALL)) { <BUG>new Handler(Looper.getMainLooper()).post(()->{ </BUG> WebView webView = new WebView(HViewerApplication.mContext); WebSettings mWebSettings = webView.getSettings(); mWebSettings.setJavaScriptEnabled(true);
new Handler(Looper.getMainLooper()).post(() -> {
43,104
mTachyonConf.get(Constants.UNDERFS_ADDRESS, tachyonHome + "/underFSStorage"); String ufsWorkerFolder = mTachyonConf.get(Constants.UNDERFS_WORKERS_FOLDER, ufsAddress + "/tachyon/workers"); mUfsWorkerFolder = CommonUtils.concatPath(ufsWorkerFolder, mWorkerId); mUsers = new Users(mUfsWorkerFolder, mTachyonConf); <BUG>mBlockDataManager.setUsers(mUsers); }</BUG> public void process() { mSyncExecutorService.submit(mBlockMasterSync); mThriftServer.serve();
mBlockDataManager.setWorkerId(mWorkerId); }
43,105
public boolean requestSpace(long userId, long blockId, long bytesRequested) throws IOException { return mBlockStore.requestSpace(userId, blockId, bytesRequested); } public void setUsers(Users users) { mUsers = users; <BUG>} public boolean unlockBlock(long lockId) {</BUG> return mBlockStore.unlockBlock(lockId); } public boolean userHeartbeat(long userId, List<Long> metrics) {
public void setWorkerId(long workerId) { mWorkerId = workerId; public boolean unlockBlock(long lockId) {
43,106
mMetaManager = Preconditions.checkNotNull(metadata); } @Override public Optional<TempBlockMeta> allocateBlock(long userId, long blockId, long blockSize, BlockStoreLocation location) { <BUG>if (location == BlockStoreLocation.anyTier()) { </BUG> for (StorageTier tier : mMetaManager.getTiers()) { for (StorageDir dir : tier.getStorageDirs()) { if (dir.getAvailableBytes() >= blockSize) {
if (location.equals(BlockStoreLocation.anyTier())) {
43,107
} return Optional.absent(); } int tierAlias = location.tier(); StorageTier tier = mMetaManager.getTier(tierAlias); <BUG>if (location == BlockStoreLocation.anyDirInTier(tierAlias)) { </BUG> for (StorageDir dir : tier.getStorageDirs()) { if (dir.getAvailableBytes() >= blockSize) { return Optional.of(new TempBlockMeta(userId, blockId, blockSize, dir));
@Override public Optional<TempBlockMeta> allocateBlock(long userId, long blockId, long blockSize, BlockStoreLocation location) { if (location.equals(BlockStoreLocation.anyTier())) { for (StorageTier tier : mMetaManager.getTiers()) {
43,108
@Override public EvictionPlan freeSpace(long bytes, BlockStoreLocation location) { List<Pair<Long, BlockStoreLocation>> toMove = new ArrayList<Pair<Long, BlockStoreLocation>>(); List<Long> toEvict = new ArrayList<Long>(); long sizeFreed = 0; <BUG>if (location == BlockStoreLocation.anyTier()) { </BUG> for (StorageTier tier : mMetaManager.getTiers()) { for (StorageDir dir : tier.getStorageDirs()) { for (BlockMeta block : dir.getBlocks()) {
if (location.equals(BlockStoreLocation.anyTier())) {
43,109
} return new EvictionPlan(toMove, toEvict); } int tierAlias = location.tier(); StorageTier tier = mMetaManager.getTier(tierAlias); <BUG>if (location == BlockStoreLocation.anyDirInTier(tierAlias)) { </BUG> for (StorageDir dir : tier.getStorageDirs()) { for (BlockMeta block : dir.getBlocks()) { toEvict.add(block.getBlockId());
@Override public EvictionPlan freeSpace(long bytes, BlockStoreLocation location) { List<Pair<Long, BlockStoreLocation>> toMove = new ArrayList<Pair<Long, BlockStoreLocation>>(); List<Long> toEvict = new ArrayList<Long>(); long sizeFreed = 0; if (location.equals(BlockStoreLocation.anyTier())) { for (StorageTier tier : mMetaManager.getTiers()) {
43,110
import tachyon.util.CommonUtils; public class StorageTier { private List<StorageDir> mDirs; private final int mTierAlias; public StorageTier(TachyonConf tachyonConf, int tierAlias) { <BUG>mTierAlias = tierAlias; String tierDirPathConf = String.format(Constants.WORKER_TIERED_STORAGE_LEVEL_DIRS_PATH_FORMAT, tierAlias); </BUG> String[] dirPaths = tachyonConf.get(tierDirPathConf, "/mnt/ramdisk").split(",");
int level = tierAlias - 1; String.format(Constants.WORKER_TIERED_STORAGE_LEVEL_DIRS_PATH_FORMAT, level);
43,111
String tierDirPathConf = String.format(Constants.WORKER_TIERED_STORAGE_LEVEL_DIRS_PATH_FORMAT, tierAlias); </BUG> String[] dirPaths = tachyonConf.get(tierDirPathConf, "/mnt/ramdisk").split(","); String tierDirCapacityConf = <BUG>String.format(Constants.WORKER_TIERED_STORAGE_LEVEL_DIRS_QUOTA_FORMAT, tierAlias); </BUG> String[] dirQuotas = tachyonConf.get(tierDirCapacityConf, "0").split(","); mDirs = new ArrayList<StorageDir>(dirPaths.length); for (int i = 0; i < dirPaths.length; i ++) {
String.format(Constants.WORKER_TIERED_STORAGE_LEVEL_DIRS_PATH_FORMAT, level); String.format(Constants.WORKER_TIERED_STORAGE_LEVEL_DIRS_QUOTA_FORMAT, level);
43,112
if (connect(isProducer)) { break; } } catch (InvalidSelectorException e) { throw new ConnectionException( <BUG>"Connection to JMS failed. Invalid message selector"); } catch (JMSException | NamingException e) { logger.log(LogLevel.ERROR, "RECONNECTION_EXCEPTION", </BUG> new Object[] { e.toString() });
Messages.getString("CONNECTION_TO_JMS_FAILED_INVALID_MSG_SELECTOR")); //$NON-NLS-1$ logger.log(LogLevel.ERROR, "RECONNECTION_EXCEPTION", //$NON-NLS-1$
43,113
private synchronized void createConnectionNoRetry() throws ConnectionException { if (!isConnectValid()) { try { connect(isProducer); } catch (JMSException e) { <BUG>logger.log(LogLevel.ERROR, "Connection to JMS failed", new Object[] { e.toString() }); throw new ConnectionException( "Connection to JMS failed. Did not try to reconnect as the policy is reconnection policy does not apply here."); }</BUG> }
logger.log(LogLevel.ERROR, "CONNECTION_TO_JMS_FAILED", new Object[] { e.toString() }); //$NON-NLS-1$ Messages.getString("CONNECTION_TO_JMS_FAILED_NO_RECONNECT_AS_RECONNECT_POLICY_DOES_NOT_APPLY")); //$NON-NLS-1$
43,114
boolean res = false; int count = 0; do { try { if(count > 0) { <BUG>logger.log(LogLevel.INFO, "ATTEMPT_TO_RESEND_MESSAGE", new Object[] { count }); </BUG> Thread.sleep(messageRetryDelay); } synchronized (getSession()) {
logger.log(LogLevel.INFO, "ATTEMPT_TO_RESEND_MESSAGE", new Object[] { count }); //$NON-NLS-1$
43,115
getProducer().send(message); res = true; } } catch (JMSException e) { <BUG>logger.log(LogLevel.WARN, "ERROR_DURING_SEND", new Object[] { e.toString() }); logger.log(LogLevel.INFO, "ATTEMPT_TO_RECONNECT"); </BUG> setConnect(null);
logger.log(LogLevel.WARN, "ERROR_DURING_SEND", new Object[] { e.toString() }); //$NON-NLS-1$ logger.log(LogLevel.INFO, "ATTEMPT_TO_RECONNECT"); //$NON-NLS-1$
43,116
import org.w3c.dom.NodeList; import org.xml.sax.SAXException; import com.ibm.streams.operator.Attribute; import com.ibm.streams.operator.StreamSchema; import com.ibm.streams.operator.Type; <BUG>import com.ibm.streams.operator.Type.MetaType; class ConnectionDocumentParser {</BUG> private static final Set<String> supportedSPLTypes = new HashSet<String>(Arrays.asList("int8", "uint8", "int16", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ "uint16", "int32", "uint32", "int64", "float32", "float64", "boolean", "blob", "rstring", "uint64", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ "decimal32", "decimal64", "decimal128", "ustring", "timestamp", "xml")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
import com.ibm.streamsx.messaging.jms.Messages; class ConnectionDocumentParser {
43,117
return msgClass; } private void convertProviderURLPath(File applicationDir) throws ParseConnectionDocumentException { if(!isAMQ()) { if(this.providerURL == null || this.providerURL.trim().length() == 0) { <BUG>throw new ParseConnectionDocumentException("A value must be specified for provider_url attribute in connection document"); }</BUG> try { URL url = new URL(providerURL); if("file".equalsIgnoreCase(url.getProtocol())) { //$NON-NLS-1$
throw new ParseConnectionDocumentException(Messages.getString("PROVIDER_URL_MUST_BE_SPECIFIED_IN_CONN_DOC")); //$NON-NLS-1$
43,118
URL absProviderURL = new URL(url.getProtocol(), url.getHost(), applicationDir.getAbsolutePath() + File.separator + path); this.providerURL = absProviderURL.toExternalForm(); } } } catch (MalformedURLException e) { <BUG>throw new ParseConnectionDocumentException("Invalid provider_url value detected: " + e.getMessage()); }</BUG> } } public void parseAndValidateConnectionDocument(String connectionDocument, String connection, String access,
throw new ParseConnectionDocumentException(Messages.getString("INVALID_PROVIDER_URL", e.getMessage())); //$NON-NLS-1$
43,119
for (int j = 0; j < accessSpecChildNodes.getLength(); j++) { if (accessSpecChildNodes.item(j).getNodeName().equals("destination")) { //$NON-NLS-1$ destIndex = j; } else if (accessSpecChildNodes.item(j).getNodeName().equals("uses_connection")) { //$NON-NLS-1$ if (!connection.equals(accessSpecChildNodes.item(j).getAttributes().getNamedItem("connection") //$NON-NLS-1$ <BUG>.getNodeValue())) { throw new ParseConnectionDocumentException("The value of the connection parameter " + connection + " is not the same as the connection used by access element " + access + " as mentioned in the uses_connection element in connections document");</BUG> }
throw new ParseConnectionDocumentException(Messages.getString("VALUE_OF_CONNECTION_PARAM_NOT_THE_SAME_AS_CONN_USED_BY_ACCESS_ELEMENT", connection, access )); //$NON-NLS-1$
43,120
nativeSchema = access_specification.item(i).getChildNodes().item(nativeSchemaIndex); } break; } } <BUG>if (!accessFound) { throw new ParseConnectionDocumentException("The value of the access parameter " + access + " is not found in the connections document");</BUG> } return nativeSchema;
throw new ParseConnectionDocumentException(Messages.getString("VALUE_OF_ACCESS_PARAM_NOT_FOUND_IN_CONN_DOC", access )); //$NON-NLS-1$
43,121
nativeAttrLength = Integer.parseInt((attrList.item(i).getAttributes().getNamedItem("length") //$NON-NLS-1$ .getNodeValue())); } if ((msgClass == MessageClass.wbe || msgClass == MessageClass.wbe22) && ((streamSchema.getAttribute(nativeAttrName) != null) && (streamSchema <BUG>.getAttribute(nativeAttrName).getType().getMetaType() == Type.MetaType.BLOB))) { throw new ParseConnectionDocumentException(" Blob data type is not supported for message class " + msgClass);</BUG> } Iterator<NativeSchema> it = nativeSchemaObjects.iterator();
throw new ParseConnectionDocumentException(Messages.getString("BLOB_NOT_SUPPORTED_FOR_MSG_CLASS", msgClass)); //$NON-NLS-1$
43,122
throw new ParseConnectionDocumentException(" Blob data type is not supported for message class " + msgClass);</BUG> } Iterator<NativeSchema> it = nativeSchemaObjects.iterator(); while (it.hasNext()) { <BUG>if (it.next().getName().equals(nativeAttrName)) { throw new ParseConnectionDocumentException("Parameter name: " + nativeAttrName + " is appearing more than once In native schema file");</BUG> } }
nativeAttrLength = Integer.parseInt((attrList.item(i).getAttributes().getNamedItem("length") //$NON-NLS-1$ .getNodeValue())); if ((msgClass == MessageClass.wbe || msgClass == MessageClass.wbe22) && ((streamSchema.getAttribute(nativeAttrName) != null) && (streamSchema .getAttribute(nativeAttrName).getType().getMetaType() == Type.MetaType.BLOB))) { throw new ParseConnectionDocumentException(Messages.getString("BLOB_NOT_SUPPORTED_FOR_MSG_CLASS", msgClass)); //$NON-NLS-1$ throw new ParseConnectionDocumentException(Messages.getString("PARAMETER_NOT_UNIQUE_IN_NATIVE_SCHEMA", nativeAttrName )); //$NON-NLS-1$
43,123
if (msgClass == MessageClass.text) { typesWithLength = new HashSet<String>(Arrays.asList("Bytes")); //$NON-NLS-1$ } Set<String> typesWithoutLength = new HashSet<String>(Arrays.asList("Byte", "Short", "Int", "Long", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ "Float", "Double", "Boolean")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ <BUG>if (typesWithoutLength.contains(nativeAttrType) && nativeAttrLength != LENGTH_ABSENT_IN_NATIVE_SCHEMA) { throw new ParseConnectionDocumentException("Length attribute should not be present for parameter: " + nativeAttrName + " In native schema file");</BUG> } if ((nativeAttrLength != LENGTH_ABSENT_IN_NATIVE_SCHEMA)
throw new ParseConnectionDocumentException(Messages.getString("LENGTH_ATTRIB_SHOULD_NOT_BE_PRESENT_FOR_PARAM_IN_NATIVE_SCHEMA", nativeAttrName )); //$NON-NLS-1$
43,124
if ((nativeAttrLength != LENGTH_ABSENT_IN_NATIVE_SCHEMA) && (msgClass == MessageClass.wbe || msgClass == MessageClass.wbe22 || msgClass == MessageClass.xml) && (streamSchema.getAttribute(nativeAttrName) != null) && (streamSchema.getAttribute(nativeAttrName).getType().getMetaType() != Type.MetaType.RSTRING) && (streamSchema.getAttribute(nativeAttrName).getType().getMetaType() != Type.MetaType.USTRING) <BUG>&& (streamSchema.getAttribute(nativeAttrName).getType().getMetaType() != Type.MetaType.BLOB)) { throw new ParseConnectionDocumentException("Length attribute should not be present for parameter: " + nativeAttrName + " In native schema file");</BUG> } if (streamSchema.getAttribute(nativeAttrName) != null) {
throw new ParseConnectionDocumentException(Messages.getString("LENGTH_ATTRIB_SHOULD_NOT_BE_PRESENT_FOR_PARAM_IN_NATIVE_SCHEMA", nativeAttrName )); //$NON-NLS-1$
43,125
if (streamSchema.getAttribute(nativeAttrName) != null) { MetaType metaType = streamSchema.getAttribute(nativeAttrName).getType().getMetaType(); if (metaType == Type.MetaType.DECIMAL32 || metaType == Type.MetaType.DECIMAL64 || metaType == Type.MetaType.DECIMAL128 || metaType == Type.MetaType.TIMESTAMP) { if (nativeAttrLength != LENGTH_ABSENT_IN_NATIVE_SCHEMA) { <BUG>throw new ParseConnectionDocumentException( "Length attribute should not be present for parameter: " + nativeAttrName + " with type " + metaType + " in native schema file.");</BUG> } if (msgClass == MessageClass.bytes) {
Messages.getString("LENGTH_ATTRIB_SHOULD_NOT_BE_PRESENT_FOR_PARAM_WITH_TYPE_IN_NATIVE_SCHEMA", nativeAttrName, metaType )); //$NON-NLS-1$
43,126
nativeAttrLength = -4; } } } if (typesWithLength.contains(nativeAttrType)) { <BUG>if (nativeAttrLength == LENGTH_ABSENT_IN_NATIVE_SCHEMA && msgClass == MessageClass.bytes) { throw new ParseConnectionDocumentException("Length attribute should be present for parameter: " + nativeAttrName + " In native schema file for message class bytes");</BUG> } if ((nativeAttrLength < 0) && nativeAttrLength != LENGTH_ABSENT_IN_NATIVE_SCHEMA) {
throw new ParseConnectionDocumentException(Messages.getString("LENGTH_ATTRIB_SHOULD_NOT_BE_PRESENT_FOR_PARAM_IN_NATIVE_SCHEMA_FOR_MSG_CLASS_BYTES", nativeAttrName )); //$NON-NLS-1$
43,127
if (streamSchema.getAttribute(nativeAttrName) != null) { streamAttrName = streamSchema.getAttribute(nativeAttrName).getName(); streamAttrMetaType = streamSchema.getAttribute(nativeAttrName).getType().getMetaType(); if ((msgClass == MessageClass.stream || msgClass == MessageClass.map) && !mapSPLToNativeSchemaDataTypesForOtherMsgClass.get(streamAttrMetaType.getLanguageType()) <BUG>.equals(nativeAttrType)) { throw new ParseConnectionDocumentException("Attribute Name: " + nativeAttrName + " with type:" + nativeAttrType + " in the native schema cannot be mapped with attribute: " + streamAttrName + " with type : " + streamAttrMetaType.getLanguageType());</BUG> }
throw new ParseConnectionDocumentException(Messages.getString("ATTRIB_WITH_TYPE_IN_NATIVE_SCHEMA_CANNOT_BE_MAPPED_TO_ATTRIB_WITH_TYPE", nativeAttrName, nativeAttrType, streamAttrName, streamAttrMetaType.getLanguageType())); //$NON-NLS-1$
43,128
+ nativeAttrType + " in the native schema cannot be mapped with attribute: " + streamAttrName + " with type : " + streamAttrMetaType.getLanguageType());</BUG> } else if (msgClass == MessageClass.bytes && !mapSPLToNativeSchemaDataTypesForBytes.get(streamAttrMetaType.getLanguageType()).equals( <BUG>nativeAttrType)) { throw new ParseConnectionDocumentException("Attribute Name: " + nativeAttrName + " with type:" + nativeAttrType + " in the native schema cannot be mapped with attribute: " + streamAttrName + " with type : " + streamAttrMetaType.getLanguageType());</BUG> }
if (streamSchema.getAttribute(nativeAttrName) != null) { streamAttrName = streamSchema.getAttribute(nativeAttrName).getName(); streamAttrMetaType = streamSchema.getAttribute(nativeAttrName).getType().getMetaType(); if ((msgClass == MessageClass.stream || msgClass == MessageClass.map) && !mapSPLToNativeSchemaDataTypesForOtherMsgClass.get(streamAttrMetaType.getLanguageType()) .equals(nativeAttrType)) { throw new ParseConnectionDocumentException(Messages.getString("ATTRIB_WITH_TYPE_IN_NATIVE_SCHEMA_CANNOT_BE_MAPPED_TO_ATTRIB_WITH_TYPE", nativeAttrName, nativeAttrType, streamAttrName, streamAttrMetaType.getLanguageType())); //$NON-NLS-1$ throw new ParseConnectionDocumentException(Messages.getString("ATTRIB_WITH_TYPE_IN_NATIVE_SCHEMA_CANNOT_BE_MAPPED_TO_ATTRIB_WITH_TYPE", nativeAttrName, nativeAttrType, streamAttrName, streamAttrMetaType.getLanguageType())); //$NON-NLS-1$
43,129
package com.ibm.streamsx.messaging.i18n; import java.text.MessageFormat; import java.util.MissingResourceException; import java.util.ResourceBundle; public class Messages { <BUG>private static final String BUNDLE_NAME = "com.ibm.streamsx.messaging.mqtt.MQTTMessages"; //$NON-NLS-1$ </BUG> private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle .getBundle(BUNDLE_NAME); private Messages() {
private static final String BUNDLE_NAME = "com.ibm.streamsx.messaging.i18n.CommonMessages"; //$NON-NLS-1$
43,130
retShape = new int[]{1, retShape[0]}; else retShape = new int[]{retShape[0], 1}; } else if (retShape.length == 0) { retShape = new int[]{1, 1}; <BUG>} INDArray ret = Nd4j.valueArrayOf(retShape,op.zeroDouble()); op.setZ(ret);</BUG> if (dimension.length == op.x().rank()) dimension = new int[]{Integer.MAX_VALUE};
INDArray ret; if (op.x().data().dataType() == DataBuffer.Type.DOUBLE) ret = Nd4j.valueArrayOf(retShape,op.zeroFloat()); op.setZ(ret);
43,131
import net.minecraft.util.math.MathHelper; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.fluids.FluidActionResult; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidUtil; <BUG>import net.minecraftforge.fluids.capability.IFluidTankProperties; import buildcraft.api.core.IFluidFilter;</BUG> import buildcraft.api.core.IFluidHandlerAdv; import buildcraft.api.fuels.BuildcraftFuelRegistry; import buildcraft.api.fuels.IFuel;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import net.minecraftforge.fml.relauncher.Side; import buildcraft.api.core.IFluidFilter;
43,132
import buildcraft.lib.engine.TileEngineBase_BC8; import buildcraft.lib.fluids.Tank; import buildcraft.lib.fluids.TankManager; import buildcraft.lib.fluids.TankProperties; import buildcraft.lib.misc.CapUtil; <BUG>import buildcraft.lib.misc.EntityUtil; public class TileEngineIron_BC8 extends TileEngineBase_BC8 {</BUG> public static final int MAX_FLUID = 10_000; public static final double COOLDOWN_RATE = 0.05; public static final int MAX_COOLANT_PER_TICK = 40;
import buildcraft.lib.net.PacketBufferBC; public class TileEngineIron_BC8 extends TileEngineBase_BC8 {
43,133
import buildcraft.core.list.GuiList; import buildcraft.core.tile.TileMarkerVolume; import buildcraft.lib.client.render.DetatchedRenderer; import buildcraft.lib.client.render.DetatchedRenderer.RenderMatrixType; public abstract class BCCoreProxy implements IGuiHandler { <BUG>@SidedProxy private static BCCoreProxy proxy = null;</BUG> public static BCCoreProxy getProxy() { return proxy; }
@SidedProxy(modId = BCCore.MODID) private static BCCoreProxy proxy = null;
43,134
public static void postInit(FMLPostInitializationEvent evt) { BCLibProxy.getProxy().fmlPostInit(); BuildCraftObjectCaches.fmlPostInit(); BCMessageHandler.fmlPostInit(); VanillaListHandlers.fmlPostInit(); <BUG>MarkerCache.postInit(); }</BUG> @Mod.EventHandler public static void onServerStarted(FMLServerStartedEvent evt) { BCLibEventDist.onServerStarted(evt);
ListMatchHandlerFluid.fmlPostInit(); }
43,135
public class BCLibConfig { public static boolean useColouredLabels = true; public static int itemLifespan = 60; public static boolean useBucketsStatic = true; public static boolean useBucketsFlow = true; <BUG>public static boolean useLocalizedLongName = false; </BUG> public static RenderRotation rotateTravelingItems = RenderRotation.ENABLED; public static ChunkLoaderType chunkLoadingType = ChunkLoaderType.AUTO; public static ChunkLoaderLevel chunkLoadingLevel = ChunkLoaderLevel.SELF_TILES;
public static boolean useLongLocalizedName = false;
43,136
public static boolean minePlayerProteted; public static boolean useColouredLabels; public static boolean hidePower; public static boolean hideFluid; public static boolean useBucketsStatic; <BUG>public static boolean useBucketsFlow; public static int itemLifespan;</BUG> public static int markerMaxDistance; public static int networkUpdateRate = 10; private static Property propColourBlindMode;
public static boolean useLongLocalizedName; public static int itemLifespan;
43,137
private static Property propMinePlayerProtected; private static Property propUseColouredLabels; private static Property propHidePower; private static Property propHideFluid; private static Property propUseBucketsStatic; <BUG>private static Property propUseBucketsFlow; private static Property propItemLifespan;</BUG> private static Property propMarkerMaxDistance; private static Property propNetworkUpdateRate; public static void preInit(File cfgFolder) {
private static Property propUseLongLocalizedName; private static Property propItemLifespan;
43,138
propUseBucketsStatic = config.get(display, "useBucketsStatic", false); propUseBucketsStatic.setComment("Should static fluid values be displayed in terms of buckets rather than thousandths of a bucket? (B vs mB)"); none.setTo(propUseBucketsStatic); propUseBucketsFlow = config.get(display, "useBucketsFlow", false); propUseBucketsFlow.setComment("Should flowing fluid values be displayed in terms of buckets per second rather than thousandths of a bucket per tick? (B/s vs mB/t)"); <BUG>none.setTo(propUseBucketsFlow); propItemLifespan = config.get(general, "itemLifespan", 60);</BUG> propItemLifespan.setMinValue(5).setMaxValue(600); propItemLifespan.setComment("How long, in seconds, should items stay on the ground? (Vanilla = 300, default = 60)"); none.setTo(propItemLifespan);
propUseLongLocalizedName = config.get(display, "propUseLongLocalizedName", false); propUseLongLocalizedName.setComment("Should localised strings be displayed in long or short form (10 mB / t vs 10 milli buckets per tick"); none.setTo(propUseLongLocalizedName); propItemLifespan = config.get(general, "itemLifespan", 60);
43,139
useColouredLabels = propUseColouredLabels.getBoolean(); BCLibConfig.useColouredLabels = useColouredLabels; hidePower = propHidePower.getBoolean(); hideFluid = propHideFluid.getBoolean(); BCLibConfig.useBucketsStatic = useBucketsStatic = propUseBucketsStatic.getBoolean(); <BUG>BCLibConfig.useBucketsFlow = useBucketsFlow = propUseBucketsFlow.getBoolean(); itemLifespan = propItemLifespan.getInt();</BUG> BCLibConfig.itemLifespan = itemLifespan; markerMaxDistance = propMarkerMaxDistance.getInt(); if (EnumRestartRequirement.GAME.hasBeenRestarted(restarted)) {
BCLibConfig.useLongLocalizedName = useLongLocalizedName = propUseLongLocalizedName.getBoolean(); itemLifespan = propItemLifespan.getInt();
43,140
private boolean isCarryingNonEmptyList() { ItemStack stack = mc.player.inventory.getItemStack(); return stack != null && stack.getItem() instanceof ItemList_BC8 && stack.getTagCompound() != null; } private boolean hasListEquipped() { <BUG>return container.getListItemStack() != null; </BUG> } @Override protected void keyTyped(char typedChar, int keyCode) throws IOException {
return !container.getListItemStack().isEmpty();
43,141
.getLogger(CustomCommandActivity.class); private RaspberryDeviceBean currentDevice; private ListView commandListView; private DeviceDbHelper deviceDb = new DeviceDbHelper(this); private Cursor fullCommandCursor; <BUG>private Pattern placeHolderPattern = Pattern.compile("(\\$\\{[a-zA-z0-9]+\\})"); @Override</BUG> protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_commands);
private Pattern placeHolderPattern = Pattern @Override
43,142
args.putString("passphrase", keyPassphrase); } runCommandDialog.setArguments(args); runCommandDialog.show(getSupportFragmentManager(), "runCommand"); } <BUG>private List<String> parsePlaceholders(String commandString) { List<String> placeholders = new ArrayList<String>(); </BUG> Matcher m = placeHolderPattern.matcher(commandString);
private ArrayList<String> parsePlaceholders(String commandString) { ArrayList<String> placeholders = new ArrayList<String>();
43,143
package de.eidottermihi.rpicheck.fragment; <BUG>import java.util.ArrayList; import android.app.AlertDialog;</BUG> import android.app.Dialog; import android.content.DialogInterface; import android.os.Bundle;
import android.app.Activity; import android.app.AlertDialog;
43,144
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() );
43,145
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_();
43,146
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 );
43,147
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 );
43,148
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() ) ); sink.tableCell_();
sink.bold(); sink.bold_(); sink.tableCaption_(); sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.subprojects" ) ); sink.tableHeaderCell_();
43,149
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_();
43,150
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_();
43,151
{ ReverseDependencyLink p1 = (ReverseDependencyLink) o1; ReverseDependencyLink p2 = (ReverseDependencyLink) o2; return p1.getProject().getId().compareTo( p2.getProject().getId() ); } <BUG>else {</BUG> return 0; } }
iconError( sink );
43,152
package io.vertx.core.impl.launcher.commands; import io.vertx.core.cli.annotations.*; import io.vertx.core.impl.launcher.CommandLineUtils; import io.vertx.core.spi.launcher.DefaultCommand; import java.io.File; <BUG>import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.UUID; @Name("start")</BUG> @Summary("Start a vert.x application in background")
import java.util.*; import java.util.stream.Collectors; @Name("start")
43,153
ExecUtils.addArgument(cmd, CommandLineUtils.getJar()); } else { ExecUtils.addArgument(cmd, CommandLineUtils.getFirstSegmentOfCommand()); ExecUtils.addArgument(cmd, "run"); } <BUG>getArguments().stream().forEach(arg -> ExecUtils.addArgument(cmd, arg)); </BUG> try { builder.command(cmd); if (redirect) {
cliArguments.forEach(arg -> ExecUtils.addArgument(cmd, arg));
43,154
Integer datasetId; String datasetUrn; String capacityName; String capacityType; String capacityUnit; <BUG>String capacityLow; String capacityHigh; </BUG> Long modifiedTime;
Long capacityLow; Long capacityHigh;
43,155
import com.fasterxml.jackson.databind.ObjectMapper; public class DatasetFieldPathRecord { String fieldPath; String role; public DatasetFieldPathRecord() { <BUG>} @Override public String toString() { try { return new ObjectMapper().writeValueAsString(this); } catch (JsonProcessingException ex) { return null; }</BUG> }
[DELETED]
43,156
new DatabaseWriter(JdbcUtil.wherehowsJdbcTemplate, DATASET_INVENTORY_TABLE); public static final String GET_DATASET_DEPLOYMENT_BY_DATASET_ID = "SELECT * FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_DEPLOYMENT_BY_URN = "SELECT * FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_urn = :dataset_urn"; <BUG>public static final String DELETE_DATASET_DEPLOYMENT_BY_URN = "DELETE FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_urn=?"; </BUG> public static final String GET_DATASET_CAPACITY_BY_DATASET_ID =
public static final String DELETE_DATASET_DEPLOYMENT_BY_DATASET_ID = "DELETE FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id=?";
43,157
</BUG> public static final String GET_DATASET_CAPACITY_BY_DATASET_ID = "SELECT * FROM " + DATASET_CAPACITY_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_CAPACITY_BY_URN = "SELECT * FROM " + DATASET_CAPACITY_TABLE + " WHERE dataset_urn = :dataset_urn"; <BUG>public static final String DELETE_DATASET_CAPACITY_BY_URN = "DELETE FROM " + DATASET_CAPACITY_TABLE + " WHERE dataset_urn=?"; </BUG> public static final String GET_DATASET_TAG_BY_DATASET_ID =
new DatabaseWriter(JdbcUtil.wherehowsJdbcTemplate, DATASET_INVENTORY_TABLE); public static final String GET_DATASET_DEPLOYMENT_BY_DATASET_ID = "SELECT * FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_DEPLOYMENT_BY_URN = "SELECT * FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_urn = :dataset_urn"; public static final String DELETE_DATASET_DEPLOYMENT_BY_DATASET_ID = "DELETE FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id=?"; public static final String DELETE_DATASET_CAPACITY_BY_DATASET_ID = "DELETE FROM " + DATASET_CAPACITY_TABLE + " WHERE dataset_id=?";
43,158
"SELECT * FROM " + DATASET_CASE_SENSITIVE_TABLE + " WHERE dataset_urn = :dataset_urn"; public static final String GET_DATASET_REFERENCE_BY_DATASET_ID = "SELECT * FROM " + DATASET_REFERENCE_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_REFERENCE_BY_URN = "SELECT * FROM " + DATASET_REFERENCE_TABLE + " WHERE dataset_urn = :dataset_urn"; <BUG>public static final String DELETE_DATASET_REFERENCE_BY_URN = "DELETE FROM " + DATASET_REFERENCE_TABLE + " WHERE dataset_urn=?"; </BUG> public static final String GET_DATASET_PARTITION_BY_DATASET_ID =
public static final String DELETE_DATASET_REFERENCE_BY_DATASET_ID = "DELETE FROM " + DATASET_REFERENCE_TABLE + " WHERE dataset_id=?";
43,159
"SELECT * FROM " + DATASET_SECURITY_TABLE + " WHERE dataset_urn = :dataset_urn"; public static final String GET_DATASET_OWNER_BY_DATASET_ID = "SELECT * FROM " + DATASET_OWNER_TABLE + " WHERE dataset_id = :dataset_id ORDER BY sort_id"; public static final String GET_DATASET_OWNER_BY_URN = "SELECT * FROM " + DATASET_OWNER_TABLE + " WHERE dataset_urn = :dataset_urn ORDER BY sort_id"; <BUG>public static final String DELETE_DATASET_OWNER_BY_URN = "DELETE FROM " + DATASET_OWNER_TABLE + " WHERE dataset_urn=?"; </BUG> public static final String GET_USER_BY_USER_ID = "SELECT * FROM " + EXTERNAL_USER_TABLE + " WHERE user_id = :user_id";
public static final String DELETE_DATASET_OWNER_BY_DATASET_ID = "DELETE FROM " + DATASET_OWNER_TABLE + " WHERE dataset_id=?";
43,160
"SELECT app_id FROM " + EXTERNAL_GROUP_TABLE + " WHERE group_id = :group_id GROUP BY group_id"; public static final String GET_DATASET_CONSTRAINT_BY_DATASET_ID = "SELECT * FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_CONSTRAINT_BY_URN = "SELECT * FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_urn = :dataset_urn"; <BUG>public static final String DELETE_DATASET_CONSTRAINT_BY_URN = "DELETE FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_urn=?"; </BUG> public static final String GET_DATASET_INDEX_BY_DATASET_ID =
public static final String DELETE_DATASET_CONSTRAINT_BY_DATASET_ID = "DELETE FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_id=?";
43,161
</BUG> public static final String GET_DATASET_INDEX_BY_DATASET_ID = "SELECT * FROM " + DATASET_INDEX_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_INDEX_BY_URN = "SELECT * FROM " + DATASET_INDEX_TABLE + " WHERE dataset_urn = :dataset_urn"; <BUG>public static final String DELETE_DATASET_INDEX_BY_URN = "DELETE FROM " + DATASET_INDEX_TABLE + " WHERE dataset_urn=?"; </BUG> public static final String GET_DATASET_SCHEMA_BY_DATASET_ID =
"SELECT app_id FROM " + EXTERNAL_GROUP_TABLE + " WHERE group_id = :group_id GROUP BY group_id"; public static final String GET_DATASET_CONSTRAINT_BY_DATASET_ID = "SELECT * FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_CONSTRAINT_BY_URN = "SELECT * FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_urn = :dataset_urn"; public static final String DELETE_DATASET_CONSTRAINT_BY_DATASET_ID = "DELETE FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_id=?"; public static final String DELETE_DATASET_INDEX_BY_DATASET_ID = "DELETE FROM " + DATASET_INDEX_TABLE + " WHERE dataset_id=?";
43,162
DatasetSecurityRecord record = om.convertValue(security, DatasetSecurityRecord.class); record.setDatasetId(datasetId); record.setDatasetUrn(urn); record.setModifiedTime(System.currentTimeMillis() / 1000); try { <BUG>Map<String, Object> result = getDatasetSecurityByDatasetId(datasetId); </BUG> String[] columns = record.getDbColumnNames(); Object[] columnValues = record.getAllValuesToString(); String[] conditions = {"dataset_id"};
DatasetSecurityRecord result = getDatasetSecurityByDatasetId(datasetId);
43,163
"confidential_flags", "is_recursive", "partitioned", "indexed", "namespace", "default_comment_id", "comment_ids"}; } @Override public List<Object> fillAllFields() { return null; <BUG>} public String[] getFieldDetailColumns() {</BUG> return new String[]{"dataset_id", "sort_id", "parent_sort_id", "parent_path", "field_name", "fields_layout_id", "field_label", "data_type", "data_size", "data_precision", "data_fraction", "is_nullable", "is_indexed", "is_partitioned", "is_recursive", "confidential_flags", "default_value", "namespace", "default_comment_id",
@JsonIgnore public String[] getFieldDetailColumns() {
43,164
partitioned != null && partitioned ? "Y" : "N", isRecursive != null && isRecursive ? "Y" : "N", confidentialFlags, defaultValue, namespace, defaultCommentId, commentIds}; } public DatasetFieldSchemaRecord() { } <BUG>@Override public String toString() { try { return new ObjectMapper().writeValueAsString(this.getFieldValueMap()); } catch (Exception ex) { return null; } }</BUG> public Integer getDatasetId() {
[DELETED]
43,165
String fieldPath; String descend; Integer prefixLength; String filter; public DatasetFieldIndexRecord() { <BUG>} @Override public String toString() { try { return new ObjectMapper().writeValueAsString(this); } catch (JsonProcessingException ex) { return null; }</BUG> }
[DELETED]
43,166
String actorUrn; String type; Long time; String note; public DatasetChangeAuditStamp() { <BUG>} @Override public String toString() { try { return new ObjectMapper().writeValueAsString(this); } catch (JsonProcessingException ex) { return null; }</BUG> }
[DELETED]
43,167
package wherehows.common.schemas; <BUG>import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.reflect.Field; import java.util.HashMap;</BUG> import java.util.List; import java.util.Map;
import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; import java.util.Date; import java.util.Collection; import java.util.HashMap;
43,168
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() );
43,169
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_();
43,170
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 );
43,171
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 );
43,172
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() ) ); sink.tableCell_();
sink.bold(); sink.bold_(); sink.tableCaption_(); sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.subprojects" ) ); sink.tableHeaderCell_();
43,173
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_();
43,174
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_();
43,175
{ ReverseDependencyLink p1 = (ReverseDependencyLink) o1; ReverseDependencyLink p2 = (ReverseDependencyLink) o2; return p1.getProject().getId().compareTo( p2.getProject().getId() ); } <BUG>else {</BUG> return 0; } }
iconError( sink );
43,176
drawLegendEntry(number++, getSpecialsDescription(special), getSpecialsColor(special), true); } } if (epAvailable) { <BUG>drawLegendEntry(number++, "Entry Point", colorMap.get(ENTRY_POINT), true); }</BUG> if (overlayAvailable) { drawLegendEntry(number++, "Overlay", colorMap.get(OVERLAY));
drawLegendEntry(number++, "Entry Point", colorMap.get(ENTRY_POINT), true);
43,177
int stringX = startX; int stringY = startY + LEGEND_SAMPLE_SIZE; Graphics g = image.getGraphics(); g.setColor(color); g.drawString(description, stringX, stringY); <BUG>g.drawString("---------------------------------", stringX, stringY + LEGEND_SAMPLE_SIZE); }</BUG> @SuppressWarnings("unused") private void drawLegendCrossEntry(int number, String description, Color color) {
g.drawString("---------------------------------", stringX, stringY }
43,178
drawLegendEntry(number, description, color, false); } private void drawLegendEntry(int number, String description, Color color, boolean withOutLine) { assert description != null && color != null; <BUG>int startX = fileWidth + LEGEND_GAP; int startY = LEGEND_GAP + (LEGEND_ENTRY_HEIGHT * number);</BUG> if (startY >= height) { startX = startX + legendWidth / 2; startY = startY - (height);
int startX = LEGEND_GAP; int startY = LEGEND_GAP + (LEGEND_ENTRY_HEIGHT * number);
43,179
long fileSize = data.getFile().length(); long pixelMax = getXPixels() * (long) getYPixels(); return (int) Math.ceil(fileSize / (double) pixelMax); } public static void main(String[] args) throws IOException { <BUG>File file = new File( "/home/katja/samples/RegisterMe.Oops.exe"); </BUG> VisualizerBuilder builder = new VisualizerBuilder(); Visualizer vi = builder.build();
File file = new File("/home/katja/samples/RegisterMe.Oops.exe");
43,180
} @RootTask static Task<Exec.Result> exec(String parameter, int number) { Task<String> task1 = MyTask.create(parameter); Task<Integer> task2 = Adder.create(number, number + 2); <BUG>return Task.ofType(Exec.Result.class).named("exec", "/bin/sh") .in(() -> task1)</BUG> .in(() -> task2) .process(Exec.exec((str, i) -> args("/bin/sh", "-c", "\"echo " + i + "\""))); }
return Task.named("exec", "/bin/sh").ofType(Exec.Result.class) .in(() -> task1)
43,181
return args; } static class MyTask { static final int PLUS = 10; static Task<String> create(String parameter) { <BUG>return Task.ofType(String.class).named("MyTask", parameter) .in(() -> Adder.create(parameter.length(), PLUS))</BUG> .in(() -> Fib.create(parameter.length())) .process((sum, fib) -> something(parameter, sum, fib)); }
return Task.named("MyTask", parameter).ofType(String.class) .in(() -> Adder.create(parameter.length(), PLUS))
43,182
final String instanceField = "from instance"; final TaskContext context = TaskContext.inmem(); final AwaitingConsumer<String> val = new AwaitingConsumer<>(); @Test public void shouldJavaUtilSerialize() throws Exception { <BUG>Task<Long> task1 = Task.ofType(Long.class).named("Foo", "Bar", 39) .process(() -> 9999L); Task<String> task2 = Task.ofType(String.class).named("Baz", 40) .in(() -> task1)</BUG> .ins(() -> singletonList(task1))
Task<Long> task1 = Task.named("Foo", "Bar", 39).ofType(Long.class) Task<String> task2 = Task.named("Baz", 40).ofType(String.class) .in(() -> task1)
43,183
assertEquals(des.id().name(), "Baz"); assertEquals(val.awaitAndGet(), "[9999] hello 10004"); } @Test(expected = NotSerializableException.class) public void shouldNotSerializeWithInstanceFieldReference() throws Exception { <BUG>Task<String> task = Task.ofType(String.class).named("WithRef") .process(() -> instanceField + " causes an outer reference");</BUG> serialize(task); } @Test
Task<String> task = Task.named("WithRef").ofType(String.class) .process(() -> instanceField + " causes an outer reference");
43,184
serialize(task); } @Test public void shouldSerializeWithLocalReference() throws Exception { String local = instanceField; <BUG>Task<String> task = Task.ofType(String.class).named("WithLocalRef") .process(() -> local + " won't cause an outer reference");</BUG> serialize(task); Task<String> des = deserialize(); context.evaluate(des).consume(val);
Task<String> task = Task.named("WithLocalRef").ofType(String.class) .process(() -> local + " won't cause an outer reference");
43,185
} @RootTask public static Task<String> standardArgs(int first, String second) { firstInt = first; secondString = second; <BUG>return Task.ofType(String.class).named("StandardArgs", first, second) .process(() -> second + " " + first * 100);</BUG> } @Test public void shouldParseFlags() throws Exception {
return Task.named("StandardArgs", first, second).ofType(String.class) .process(() -> second + " " + first * 100);
43,186
assertThat(parsedEnum, is(CustomEnum.BAR)); } @RootTask public static Task<String> enums(CustomEnum enm) { parsedEnum = enm; <BUG>return Task.ofType(String.class).named("Enums", enm) .process(enm::toString);</BUG> } @Test public void shouldParseCustomTypes() throws Exception {
return Task.named("Enums", enm).ofType(String.class) .process(enm::toString);
43,187
assertThat(parsedType.content, is("blarg parsed for you!")); } @RootTask public static Task<String> customType(CustomType myType) { parsedType = myType; <BUG>return Task.ofType(String.class).named("Types", myType.content) .process(() -> myType.content);</BUG> } public enum CustomEnum { BAR
return Task.named("Types", myType.content).ofType(String.class) .process(() -> myType.content);
43,188
TaskContext taskContext = TaskContext.inmem(); TaskContext.Value<Long> value = taskContext.evaluate(fib92); value.consume(f92 -> System.out.println("fib(92) = " + f92)); } static Task<Long> create(long n) { <BUG>TaskBuilder<Long> fib = Task.ofType(Long.class).named("Fib", n); </BUG> if (n < 2) { return fib .process(() -> n);
TaskBuilder<Long> fib = Task.named("Fib", n).ofType(Long.class);
43,189
public void testAddCA() throws Exception { selenium.click(RuntimeVariables.replace("link=Return to Full Page")); selenium.waitForPageToLoad("30000"); selenium.click(RuntimeVariables.replace("link=Users")); selenium.waitForPageToLoad("30000"); <BUG>selenium.click(RuntimeVariables.replace("//input[@value='Add User']")); </BUG> selenium.waitForPageToLoad("30000"); selenium.typeKeys("_79_screenName", RuntimeVariables.replace("CA")); selenium.type("_79_screenName", RuntimeVariables.replace("CA"));
selenium.click(RuntimeVariables.replace("link=Add User"));
43,190
RuntimeVariables.replace("label=July")); selenium.select("_79_birthdayDay", RuntimeVariables.replace("label=26")); selenium.select("_79_birthdayYear", RuntimeVariables.replace("label=1987")); selenium.select("_79_male", RuntimeVariables.replace("label=Female")); <BUG>selenium.typeKeys("_79_jobTitle", RuntimeVariables.replace("Community Admin")); selenium.type("_79_jobTitle", RuntimeVariables.replace("Community Admin"));</BUG> selenium.click(RuntimeVariables.replace("//input[@value='Save']"));
[DELETED]
43,191
RuntimeVariables.replace("Community Admin")); selenium.type("_79_jobTitle", RuntimeVariables.replace("Community Admin"));</BUG> selenium.click(RuntimeVariables.replace("//input[@value='Save']")); selenium.waitForPageToLoad("30000"); <BUG>selenium.click("link=Password"); </BUG> selenium.type("_79_password1", RuntimeVariables.replace("test")); selenium.type("_79_password2", RuntimeVariables.replace("test")); selenium.click(RuntimeVariables.replace("//input[@value='Save']"));
RuntimeVariables.replace("label=July")); selenium.select("_79_birthdayDay", RuntimeVariables.replace("label=26")); selenium.select("_79_birthdayYear", RuntimeVariables.replace("label=1987")); selenium.select("_79_male", RuntimeVariables.replace("label=Female")); selenium.click("passwordLink");
43,192
import com.liferay.portalweb.portal.util.RuntimeVariables; public class AddMemberTest extends BaseTestCase { public void testAddMember() throws Exception { selenium.click(RuntimeVariables.replace("link=Users")); selenium.waitForPageToLoad("30000"); <BUG>selenium.click(RuntimeVariables.replace("//input[@value='Add User']")); </BUG> selenium.waitForPageToLoad("30000"); selenium.typeKeys("_79_screenName", RuntimeVariables.replace("Member")); selenium.type("_79_screenName", RuntimeVariables.replace("Member"));
selenium.click(RuntimeVariables.replace("link=Add User"));
43,193
RuntimeVariables.replace("label=April")); selenium.select("_79_birthdayDay", RuntimeVariables.replace("label=10")); selenium.select("_79_birthdayYear", RuntimeVariables.replace("label=1986")); selenium.select("_79_male", RuntimeVariables.replace("label=Male")); <BUG>selenium.typeKeys("_79_jobTitle", RuntimeVariables.replace("Community Member")); selenium.type("_79_jobTitle", RuntimeVariables.replace("Community Member"));</BUG> selenium.click(RuntimeVariables.replace("//input[@value='Save']"));
[DELETED]
43,194
import com.liferay.portalweb.portal.util.RuntimeVariables; public class AddPublisherTest extends BaseTestCase { public void testAddPublisher() throws Exception { selenium.click(RuntimeVariables.replace("link=Users")); selenium.waitForPageToLoad("30000"); <BUG>selenium.click(RuntimeVariables.replace("//input[@value='Add User']")); </BUG> selenium.waitForPageToLoad("30000"); selenium.typeKeys("_79_screenName", RuntimeVariables.replace("Publisher"));
selenium.click(RuntimeVariables.replace("link=Add User"));
43,195
import java.util.Map.Entry; import java.util.Queue; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; <BUG>import java.util.concurrent.TimeUnit; import javax.portlet.Event;</BUG> import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession;
import java.util.concurrent.atomic.AtomicInteger; import javax.portlet.Event;
43,196
import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.pluto.container.om.portlet.ContainerRuntimeOption; import org.apache.pluto.container.om.portlet.PortletDefinition; import org.jasig.portal.portlet.om.IPortletDefinition; <BUG>import org.jasig.portal.portlet.om.IPortletDefinitionParameter; import org.jasig.portal.portlet.om.IPortletEntity;</BUG> import org.jasig.portal.portlet.om.IPortletEntityId; import org.jasig.portal.portlet.om.IPortletWindow; import org.jasig.portal.portlet.om.IPortletWindowId;
import org.jasig.portal.portlet.om.IPortletDescriptorKey; import org.jasig.portal.portlet.om.IPortletEntity;
43,197
return DEBUG_TIMEOUT; } final IPortletDefinition portletDefinition = getPortletDefinition(portletWindowId, request); final Integer actionTimeout = portletDefinition.getActionTimeout(); if (actionTimeout != null) { <BUG>return actionTimeout; } return portletDefinition.getTimeout(); }</BUG> protected long getPortletEventTimeout(IPortletWindowId portletWindowId, HttpServletRequest request) {
return getModifiedTimeout(portletDefinition, request, actionTimeout); return getModifiedTimeout(portletDefinition, request, portletDefinition.getTimeout());
43,198
return DEBUG_TIMEOUT; } final IPortletDefinition portletDefinition = getPortletDefinition(portletWindowId, request); final Integer eventTimeout = portletDefinition.getEventTimeout(); if (eventTimeout != null) { <BUG>return eventTimeout; } return portletDefinition.getTimeout(); }</BUG> protected long getPortletRenderTimeout(IPortletWindowId portletWindowId, HttpServletRequest request) {
final Integer actionTimeout = portletDefinition.getActionTimeout(); if (actionTimeout != null) { return getModifiedTimeout(portletDefinition, request, actionTimeout); return getModifiedTimeout(portletDefinition, request, portletDefinition.getTimeout()); protected long getPortletEventTimeout(IPortletWindowId portletWindowId, HttpServletRequest request) {
43,199
return DEBUG_TIMEOUT; } final IPortletDefinition portletDefinition = getPortletDefinition(portletWindowId, request); final Integer renderTimeout = portletDefinition.getRenderTimeout(); if (renderTimeout != null) { <BUG>return renderTimeout; } return portletDefinition.getTimeout(); }</BUG> protected long getPortletResourceTimeout(IPortletWindowId portletWindowId, HttpServletRequest request) {
final Integer actionTimeout = portletDefinition.getActionTimeout(); if (actionTimeout != null) { return getModifiedTimeout(portletDefinition, request, actionTimeout); return getModifiedTimeout(portletDefinition, request, portletDefinition.getTimeout()); protected long getPortletEventTimeout(IPortletWindowId portletWindowId, HttpServletRequest request) {
43,200
package com.cronutils.model.time.generator; import java.util.Collections; <BUG>import java.util.List; import org.apache.commons.lang3.Validate;</BUG> import com.cronutils.model.field.CronField; import com.cronutils.model.field.expression.FieldExpression; public abstract class FieldValueGenerator {
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;