code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
@Nonnull
public DataTablesDom addCustom (@Nonnull @Nonempty final String sStr)
{
ValueEnforcer.notEmpty (sStr, "Str");
_internalAdd (sStr);
return this;
} | java |
@Nonnull
public FineUploader5Validation setItemLimit (@Nonnegative final int nItemLimit)
{
ValueEnforcer.isGE0 (nItemLimit, "ItemLimit");
m_nValidationItemLimit = nItemLimit;
return this;
} | java |
@Nonnull
public FineUploader5Validation setMinSizeLimit (@Nonnegative final int nMinSizeLimit)
{
ValueEnforcer.isGE0 (nMinSizeLimit, "MinSizeLimit");
m_nValidationMinSizeLimit = nMinSizeLimit;
return this;
} | java |
@Nonnull
public FineUploader5Validation setSizeLimit (@Nonnegative final int nSizeLimit)
{
ValueEnforcer.isGE0 (nSizeLimit, "SizeLimit");
m_nValidationSizeLimit = nSizeLimit;
return this;
} | java |
private void sendTextToServer() {
statusLabel.setText("");
conceptList.clear();
// don't do anything if we have no text
final String text = mainTextArea.getText();
if (text.length() < 1) {
statusLabel.setText(messages.pleaseEnterTextLabel());
return;
... | java |
@Override
public ParseResult parse(Source source) {
if (!testSrcInfo.equals(source.getSrcInfo())) {
throw new RuntimeException("testSrcInfo and source.getSrcInfo were not equal. testSrcInfo = " + testSrcInfo + ", source.getSrcInfo = " + source.getSrcInfo());
}
try {
B... | java |
public void registerPasswordHashCreator (@Nonnull final IPasswordHashCreator aPasswordHashCreator)
{
ValueEnforcer.notNull (aPasswordHashCreator, "PasswordHashCreator");
final String sAlgorithmName = aPasswordHashCreator.getAlgorithmName ();
if (StringHelper.hasNoText (sAlgorithmName))
throw new Il... | java |
@Nullable
public IPasswordHashCreator getPasswordHashCreatorOfAlgorithm (@Nullable final String sAlgorithmName)
{
return m_aRWLock.readLocked ( () -> m_aPasswordHashCreators.get (sAlgorithmName));
} | java |
private List<SemanticError> check(DataType dataType) {
logger.finer("Checking semantic constraints on datatype " + dataType.name);
final List<SemanticError> errors = new ArrayList<SemanticError>();
final Set<String> constructorNames = new HashSet<String>();
for(Constructor construc... | java |
private List<SemanticError> check(DataType dataType, Constructor constructor) {
logger.finer("Checking semantic constraints on data type " + dataType.name + ", constructor " + constructor.name);
final List<SemanticError> errors = new ArrayList<SemanticError>();
final Set<String> argName... | java |
private List<SemanticError> check(DataType dataType, Constructor constructor, Arg arg) {
logger.finest("Checking semantic constraints on data type " + dataType.name + ", constructor " + constructor.name);
final List<SemanticError> errors = new ArrayList<SemanticError>();
final Set<ArgModifier> m... | java |
@SuppressWarnings ("resource")
@Nonnull
@OverrideOnDemand
@WillCloseWhenClosed
protected CSVWriter createCSVWriter (@Nonnull final OutputStream aOS)
{
return new CSVWriter (new OutputStreamWriter (aOS, m_aCharset)).setSeparatorChar (m_cSeparatorChar)
... | java |
private void addJavaAgent(Config.AgentMode junitMode) throws MojoExecutionException {
try {
URL agentJarURL = Types.extractJarURL(EkstaziAgent.class);
if (agentJarURL == null) {
throw new MojoExecutionException("Unable to locate Ekstazi agent");
}
... | java |
private void appendExcludesListToExcludesFile(Plugin plugin, List<String> nonAffectedClasses) throws MojoExecutionException {
String excludesFileName = extractParamValue(plugin, EXCLUDES_FILE_PARAM_NAME);
File excludesFileFile = new File(excludesFileName);
// First restore file in case it has b... | java |
private boolean isParallelOn(Plugin plugin) throws MojoExecutionException {
String value = extractParamValue(plugin, PARALLEL_PARAM_NAME);
// If value is set and it is not an empty string.
return value != null && !value.equals("");
} | java |
private boolean isForkMode(Plugin plugin) throws MojoExecutionException {
String reuseForksValue = extractParamValue(plugin, REUSE_FORKS_PARAM_NAME);
return reuseForksValue != null && reuseForksValue.equals("false");
} | java |
private boolean isForkDisabled(Plugin plugin) throws MojoExecutionException {
String forkCountValue = extractParamValue(plugin, FORK_COUNT_PARAM_NAME);
String forkModeValue = extractParamValue(plugin, FORK_MODE_PARAM_NAME);
return (forkCountValue != null && forkCountValue.equals("0")) ||
... | java |
private void checkParameters(Plugin plugin) throws MojoExecutionException {
// Fail if 'parallel' parameter is used.
if (isParallelOn(plugin)) {
throw new MojoExecutionException("Ekstazi currently does not support parallel parameter");
}
// Fail if fork is disabled.
i... | java |
@Nonnull
public static <T extends IHCNode> T getPreparedNode (@Nonnull final T aNode,
@Nonnull final IHCHasChildrenMutable <?, ? super IHCNode> aTargetNode,
@Nonnull final IHCConversionSettingsToNode aConvers... | java |
public static void prepareForConversion (@Nonnull final IHCNode aStartNode,
@Nonnull final IHCHasChildrenMutable <?, ? super IHCNode> aGlobalTargetNode,
@Nonnull final IHCConversionSettingsToNode aConversionSettings)
{
ValueEnfo... | java |
@Nullable
public static IMicroNode getAsNode (@Nonnull final IHCNode aHCNode)
{
return getAsNode (aHCNode, HCSettings.getConversionSettings ());
} | java |
@SuppressWarnings ("unchecked")
@Nullable
public static IMicroNode getAsNode (@Nonnull final IHCNode aSrcNode,
@Nonnull final IHCConversionSettingsToNode aConversionSettings)
{
IHCNode aConvertNode = aSrcNode;
// Special case for HCHtml - must have been done separate... | java |
@Nonnull
public static String getAsHTMLString (@Nonnull final IHCNode aHCNode)
{
return getAsHTMLString (aHCNode, HCSettings.getConversionSettings ());
} | java |
@Nonnull
public static String getAsHTMLString (@Nonnull final IHCNode aHCNode,
@Nonnull final IHCConversionSettings aConversionSettings)
{
final IMicroNode aMicroNode = getAsNode (aHCNode, aConversionSettings);
if (aMicroNode == null)
return "";
return Micr... | java |
public static int readRawUntil (final StringBuilder out, final String in, final int start, final char end)
{
int pos = start;
while (pos < in.length ())
{
final char ch = in.charAt (pos);
if (ch == end)
break;
out.append (ch);
pos++;
}
return (pos == in.length ()) ... | java |
@Nonnull
public ELoginResult loginUser (@Nullable final String sLoginName, @Nullable final String sPlainTextPassword)
{
return loginUser (sLoginName, sPlainTextPassword, (Iterable <String>) null);
} | java |
@Nonnull
public EChange logoutUser (@Nullable final String sUserID)
{
LoginInfo aInfo;
m_aRWLock.writeLock ().lock ();
try
{
aInfo = m_aLoggedInUsers.remove (sUserID);
if (aInfo == null)
{
AuditHelper.onAuditExecuteSuccess ("logout", sUserID, "user-not-logged-in");
... | java |
@Nullable
public LoginInfo getLoginInfo (@Nullable final String sUserID)
{
return m_aRWLock.readLocked ( () -> m_aLoggedInUsers.get (sUserID));
} | java |
public static void loadConfig(String options, boolean force) {
if (sIsInitialized && !force) return;
sIsInitialized = true;
Properties commandProperties = unpackOptions(options);
String userHome = getUserHome();
File userHomeDir = new File(userHome, Names.EKSTAZI_CONFIG_FILE);
... | java |
protected static boolean checkNamesOfProperties(Properties props) {
Set<String> names = getAllOptionNames(Config.class);
for (Object key : props.keySet()) {
if (!(key instanceof String) || !names.contains(key)) {
return false;
}
}
return true;
... | java |
protected static int getNumOfNonExperimentalOptions(Class<?> clz) {
Field[] options = getAllOptions(clz);
int count = 0;
for (Field option : options) {
count += option.getName().startsWith("X_") ? 0 : 1;
}
return count;
} | java |
public static void main(String[] args) {
DEBUG_MODE_V = DebugMode.SCREEN;
Log.initScreen();
printVerbose(null, null);
} | java |
@Nonnull
public final IMPLTYPE setWidth (final int nWidth)
{
if (nWidth >= 0)
m_sWidth = Integer.toString (nWidth);
return thisAsT ();
} | java |
@Nonnull
public HCConversionSettings setCSSWriterSettings (@Nonnull final ICSSWriterSettings aCSSWriterSettings)
{
ValueEnforcer.notNull (aCSSWriterSettings, "CSSWriterSettings");
m_aCSSWriterSettings = new CSSWriterSettings (aCSSWriterSettings);
return this;
} | java |
@Nonnull
public HCConversionSettings setJSWriterSettings (@Nonnull final IJSWriterSettings aJSWriterSettings)
{
ValueEnforcer.notNull (aJSWriterSettings, "JSWriterSettings");
m_aJSWriterSettings = new JSWriterSettings (aJSWriterSettings);
return this;
} | java |
@Nonnull
public static ESuccess check (@Nonnull @Nonempty final String sServerSideKey,
@Nullable final String sReCaptchaResponse)
{
ValueEnforcer.notEmpty (sServerSideKey, "ServerSideKey");
if (StringHelper.hasNoText (sReCaptchaResponse))
return ESuccess.SUCCESS;
... | java |
@Nonnull
public SimpleURL getInvocationURL (@Nonnull final String sBasePath)
{
ValueEnforcer.notNull (sBasePath, "BasePath");
return new SimpleURL (sBasePath + m_sPath);
} | java |
@Nullable
public final String getHiddenFieldName ()
{
final String sFieldName = getName ();
if (StringHelper.hasNoText (sFieldName))
return null;
return HIDDEN_FIELD_PREFIX + sFieldName;
} | java |
public void addHandler (@Nonnull final EJSEvent eJSEvent, @Nonnull final IHasJSCode aNewHandler)
{
ValueEnforcer.notNull (eJSEvent, "JSEvent");
ValueEnforcer.notNull (aNewHandler, "NewHandler");
CollectingJSCodeProvider aCode = m_aEvents.get (eJSEvent);
if (aCode == null)
{
aCode = new Coll... | java |
public void prependHandler (@Nonnull final EJSEvent eJSEvent, @Nonnull final IHasJSCode aNewHandler)
{
ValueEnforcer.notNull (eJSEvent, "JSEvent");
ValueEnforcer.notNull (aNewHandler, "NewHandler");
CollectingJSCodeProvider aCode = m_aEvents.get (eJSEvent);
if (aCode == null)
{
aCode = new ... | java |
public void setHandler (@Nonnull final EJSEvent eJSEvent, @Nonnull final IHasJSCode aNewHandler)
{
ValueEnforcer.notNull (eJSEvent, "JSEvent");
ValueEnforcer.notNull (aNewHandler, "NewHandler");
// Set only the new handler and remove any existing handler
m_aEvents.put (eJSEvent, new CollectingJSCodeP... | java |
@Override
public List<FileSource> createSources(String srcName) {
final File dirOrFile = new File(srcName);
final File[] files = dirOrFile.listFiles(FILTER);
if (files != null) {
final List<FileSource> sources = new ArrayList<FileSource>(files.length);
for (File file... | java |
@Nonnull
public static AccessToken createAccessTokenValidFromNow (@Nullable final String sTokenString)
{
// Length 66 so that the Base64 encoding does not add the "==" signs
// Length must be dividable by 3
final String sRealTokenString = StringHelper.hasText (sTokenString) ? sTokenString : createNewTok... | java |
@Nullable
public static EFamFamFlagIcon getFlagFromLocale (@Nullable final Locale aFlagLocale)
{
if (aFlagLocale != null)
{
final String sCountry = aFlagLocale.getCountry ();
if (StringHelper.hasText (sCountry))
return EFamFamFlagIcon.getFromIDOrNull (sCountry);
}
return null;
... | java |
private void checkIfEkstaziDirCanBeCreated() throws MojoExecutionException {
File ekstaziDir = Config.createRootDir(parentdir);
// If .ekstazi does not exist and cannot be created, let them
// know. (We also remove directory if successfully created.)
if (!ekstaziDir.exists() && (!ekstaz... | java |
@Nonnull
public EChange setSystemMessage (@Nonnull final ESystemMessageType eMessageType, @Nullable final String sMessage)
{
ValueEnforcer.notNull (eMessageType, "MessageType");
if (m_eMessageType.equals (eMessageType) && EqualsHelper.equals (m_sMessage, sMessage))
return EChange.UNCHANGED;
inte... | java |
public String createChallenge(String request)
throws IllegalArgumentException, ProtocolVersionException {
String userName;
userName = CrtAuthCodec.deserializeRequest(request);
Fingerprint fingerprint;
try {
fingerprint = new Fingerprint(getKeyForUser(userName));
} catch (KeyNotFoundExc... | java |
private RSAPublicKey getKeyForUser(String userName) throws KeyNotFoundException {
RSAPublicKey key = null;
for (final KeyProvider keyProvider : keyProviders) {
try {
key = keyProvider.getKey(userName);
break;
} catch (KeyNotFoundException e) {
// that's fine, try the next pro... | java |
private Fingerprint createFakeFingerprint(String userName) {
byte[] usernameHmac = CrtAuthCodec.getAuthenticationCode(
this.secret, userName.getBytes(Charsets.UTF_8));
return new Fingerprint(Arrays.copyOfRange(usernameHmac, 0, 6));
} | java |
public String createToken(String response)
throws IllegalArgumentException, ProtocolVersionException {
final Response decodedResponse;
final Challenge challenge;
decodedResponse = CrtAuthCodec.deserializeResponse(decode(response));
challenge = CrtAuthCodec.deserializeChallengeAuthenticated(
... | java |
public String validateToken(String token)
throws IllegalArgumentException, TokenExpiredException, ProtocolVersionException {
final Token deserializedToken =
CrtAuthCodec.deserializeTokenAuthenticated(decode(token), secret);
if (deserializedToken.isExpired(timeSupplier)) {
throw new TokenExpi... | java |
public Optional<Object> lookupLexer(PyGateway gateway, String alias) {
Object result = lexerCache.get(alias);
if (result == null) {
result = evalLookupLexer(gateway, alias, NULL);
lexerCache.put(alias, result);
}
if (result == NULL) {
return Optional... | java |
@Nonnull
public static ESuccess execute (@Nonnull final IJSchSessionProvider aSessionProvider,
final int nChannelConnectTimeoutMillis,
@Nonnull final IChannelSftpRunnable aRunnable) throws JSchException
{
ValueEnforcer.notNull (aSessionProvider... | java |
public static void setPasswordConstraintList (@Nonnull final IPasswordConstraintList aPasswordConstraintList)
{
ValueEnforcer.notNull (aPasswordConstraintList, "PasswordConstraintList");
// Create a copy
final IPasswordConstraintList aRealPasswordConstraints = aPasswordConstraintList.getClone ();
s_a... | java |
private CoverageClassVisitor createCoverageClassVisitor(String className, ClassWriter cv, boolean isRedefined) {
// We cannot change classfiles if class is being redefined.
return new CoverageClassVisitor(className, cv);
} | java |
private boolean isMonitorAccessibleFromClassLoader(ClassLoader loader) {
if (loader == null) {
return false;
}
boolean isMonitorAccessible = true;
InputStream monitorInputStream = null;
try {
monitorInputStream = loader.getResourceAsStream(COVERAGE_MONITOR... | java |
@SuppressWarnings("unused")
private void saveClassfileBufferForDebugging(String className, byte[] classfileBuffer) {
try {
if (className.contains("CX")) {
java.io.DataOutputStream tmpout = new java.io.DataOutputStream(new java.io.FileOutputStream("out"));
tmpout.w... | java |
private static byte[] instrumentClassFile(byte[] classfileBuffer) {
String className = new ClassReader(classfileBuffer).getClassName().replace("/", ".");
ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
byte[] newClassfileBuffer = new EkstaziCFT().transform(curren... | java |
@Nonnull
public CollectingJSCodeProvider addAt (@Nonnegative final int nIndex, @Nullable final IHasJSCode aProvider)
{
if (aProvider != null)
m_aList.add (nIndex, aProvider);
return this;
} | java |
@Nonnull
public JSFunction name (@Nonnull @Nonempty final String sName)
{
if (!JSMarshaller.isJSIdentifier (sName))
throw new IllegalArgumentException ("The name '" + sName + "' is not a legal JS identifier!");
m_sName = sName;
return this;
} | java |
@Nonnull
public static TypeaheadEditSelection getSelectionForRequiredObject (@Nonnull final IWebPageExecutionContext aWPEC,
@Nullable final String sEditFieldName,
@Nullable final... | java |
@Nullable
@OverrideOnDemand
protected IHCNode createPageHeader (@Nonnull final ISimpleWebExecutionContext aSWEC,
@Nullable final IHCNode aPageTitle)
{
return BootstrapPageHeader.createOnDemand (aPageTitle);
} | java |
@Nonnull
public static JSInvocation createEventTrackingCode (@Nonnull final String sCategory,
@Nonnull final String sAction,
@Nullable final String sLabel,
... | java |
public static Collection<String> sanitiseSemanticTypes(final Collection<String> semanticTypes) {
if (semanticTypes == null) return ImmutableList.of();
// check that each of the given types are in the map we have, otherwise throw it away
final Set<String> s = new LinkedHashSet<>(semanticTypes);
... | java |
public static String printComments(String indent, List<JavaComment> comments) {
final StringBuilder builder = new StringBuilder();
for (JavaComment comment : comments) {
builder.append(print(indent, comment));
builder.append("\n");
}
return builder.toString();
... | java |
public static String print(final String indent, JavaComment comment) {
return comment.match(new JavaComment.MatchBlock<String>() {
@Override
public String _case(JavaDocComment x) {
final StringBuilder builder = new StringBuilder(indent);
builder.append(x.... | java |
public static String print(Arg arg) {
return printArgModifiers(arg.modifiers) + print(arg.type) + " " + arg.name;
} | java |
public static String printArgModifiers(List<ArgModifier> modifiers) {
final StringBuilder builder = new StringBuilder();
if (modifiers.contains(ArgModifier._Final())) {
builder.append(print(ArgModifier._Final()));
builder.append(" ");
}
if (modifiers.contains(ArgM... | java |
public static String print(Type type) {
return type.match(new Type.MatchBlock<String>(){
@Override
public String _case(Ref x) {
return print(x.type);
}
@Override
public String _case(Primitive x) {
return print(x.type);
... | java |
public static String print(RefType type) {
return type.match(new RefType.MatchBlock<String>() {
@Override
public String _case(ClassType x) {
final StringBuilder builder = new StringBuilder(x.baseName);
if (!x.typeArguments.isEmpty()) {
... | java |
public static String print(PrimitiveType type) {
return type.match(new PrimitiveType.MatchBlock<String>() {
@Override
public String _case(BooleanType x) {
return "boolean";
}
@Override
public String _case(ByteType x) {
... | java |
public static String print(ArgModifier modifier) {
return modifier.match(new ArgModifier.MatchBlock<String>() {
@Override
public String _case(Final x) {
return "final";
}
@Override
public String _case(Volatile x) {
ret... | java |
private static String print(final String indent, JDToken token) {
return token.match(new JDToken.MatchBlock<String>() {
@Override
public String _case(JDAsterisk x) {
return "*";
}
@Override
public String _case(JDEOL x) {
... | java |
public static String print(final Literal literal) {
return literal.match(new Literal.MatchBlock<String>() {
@Override
public String _case(StringLiteral x) {
return x.content;
}
@Override
public String _case(FloatingPointLiteral x) {
... | java |
public static String print(Expression expression) {
return expression.match(new Expression.MatchBlock<String>() {
@Override
public String _case(LiteralExpression x) {
return print(x.literal);
}
@Override
public String _case(VariableEx... | java |
@Nonnull
public BootstrapSpacingBuilder property (@Nonnull final EBootstrapSpacingPropertyType eProperty)
{
ValueEnforcer.notNull (eProperty, "Property");
m_eProperty = eProperty;
return this;
} | java |
@Nonnull
public BootstrapSpacingBuilder side (@Nonnull final EBootstrapSpacingSideType eSide)
{
ValueEnforcer.notNull (eSide, "Side");
m_eSide = eSide;
return this;
} | java |
@Nonnull
@SuppressFBWarnings ("RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE")
public EChange registerState (@Nonnull @Nonempty final String sStateID, @Nonnull final IHasUIState aNewState)
{
ValueEnforcer.notEmpty (sStateID, "StateID");
ValueEnforcer.notNull (aNewState, "NewState");
final ObjectType aOT =... | java |
@Nonnull
public EChange registerState (@Nonnull final IHCElement <?> aNewElement)
{
ValueEnforcer.notNull (aNewElement, "NewElement");
if (aNewElement.hasNoID ())
LOGGER.warn ("Registering the state for an object that has no ID - creating a new ID now!");
return registerState (aNewElement.ensureI... | java |
@Nonnull
public FineUploader5Chunking setPartSize (@Nonnegative final long nPartSize)
{
ValueEnforcer.isGT0 (nPartSize, "PartSize");
m_nChunkingPartSize = nPartSize;
return this;
} | java |
@Nonnull
public FineUploader5Chunking setParamNameChunkSize (@Nonnull @Nonempty final String sParamNameChunkSize)
{
ValueEnforcer.notEmpty (sParamNameChunkSize, "ParamNameChunkSize");
m_sChunkingParamNamesChunkSize = sParamNameChunkSize;
return this;
} | java |
@Nonnull
public FineUploader5Chunking setParamNamePartByteOffset (@Nonnull @Nonempty final String sParamNamePartByteOffset)
{
ValueEnforcer.notEmpty (sParamNamePartByteOffset, "ParamNamePartByteOffset");
m_sChunkingParamNamesPartByteOffset = sParamNamePartByteOffset;
return this;
} | java |
@Nonnull
public FineUploader5Chunking setParamNamePartIndex (@Nonnull @Nonempty final String sParamNamePartIndex)
{
ValueEnforcer.notEmpty (sParamNamePartIndex, "ParamNamePartIndex");
m_sChunkingParamNamesPartIndex = sParamNamePartIndex;
return this;
} | java |
@Nonnull
public FineUploader5Chunking setParamNameTotalParts (@Nonnull @Nonempty final String sParamNameTotalParts)
{
ValueEnforcer.notEmpty (sParamNameTotalParts, "ParamNameTotalParts");
m_sChunkingParamNamesTotalParts = sParamNameTotalParts;
return this;
} | java |
public static byte[] removeDebugInfo(byte[] bytes) {
if (bytes.length >= 4) {
// Check magic number.
int magic = ((bytes[0] & 0xff) << 24) | ((bytes[1] & 0xff) << 16)
| ((bytes[2] & 0xff) << 8) | (bytes[3] & 0xff);
if (magic != 0xCAFEBABE)
... | java |
@Nonnull
public final HCSWFObject addFlashVar (@Nonnull final String sName, final Object aValue)
{
if (!JSMarshaller.isJSIdentifier (sName))
throw new IllegalArgumentException ("The name '" + sName + "' is not a legal JS identifier!");
if (m_aFlashVars == null)
m_aFlashVars = new CommonsLinkedH... | java |
@Nonnull
public final HCSWFObject removeFlashVar (@Nullable final String sName)
{
if (m_aFlashVars != null)
m_aFlashVars.remove (sName);
return this;
} | java |
public static Instrumentation initAgentAtRuntimeAndReportSuccess() {
try {
setSystemClassLoaderClassPath();
} catch (Exception e) {
Log.e("Could not set classpath. Tool will be off.", e);
return null;
}
try {
return addClassfileTransformer(... | java |
private static void setSystemClassLoaderClassPath() throws Exception {
Log.d("Setting classpath");
// We use agent class as we do not extract this class in newly created
// jar (otherwise we may end up creating one -magic jar from another);
// also it will exist even without JUnit classe... | java |
private static void addURL(URL url) throws Exception {
URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader();
Class<?> sysclass = URLClassLoader.class;
Method method = sysclass.getDeclaredMethod("addURL", new Class[] { URL.class });
method.setAccessible(true);
... | java |
public static void t(Class<?> clz) {
// Must be non null and type of interest.
if (clz == null || ClassesCache.check(clz) || Types.isIgnorable(clz)) {
return;
}
// Check and assign id to this class (this must be synchronized).
try {
sLock.lock();
... | java |
public static void t(Class<?> clz, int probeId) {
if (clz != null) {
int index = probeId & PROBE_SIZE_MASK;
if (PROBE_ARRAY[index] != clz) {
PROBE_ARRAY[index] = clz;
t(clz);
}
}
} | java |
public static void addFileURL(File f) {
String absolutePath = f.getAbsolutePath();
if (!filterFile(absolutePath)) {
try {
recordURL(f.toURI().toURL().toExternalForm());
} catch (MalformedURLException e) {
// Never expected.
}
}
... | java |
protected static void recordURL(String externalForm) {
if (filterURL(externalForm)) {
return;
}
if (isWellKnownUrl(externalForm)) {
// Ignore JUnit classes if specified in configuration.
if (Config.DEPENDENCIES_INCLUDE_WELLKNOWN_V) {
safeRecor... | java |
private static void safeRecordURL(String externalForm) {
try {
sLock.lock();
sURLs.add(externalForm);
} finally {
sLock.unlock();
}
} | java |
public static final void c(String msg) {
if (msg.replaceAll("\\s+", "").equals("")) {
println(CONF_TEXT);
} else {
println(CONF_TEXT + ": " + msg);
}
} | java |
@Nonnull
public PathMatchingResult matchesParts (@Nonnull final List <String> aPathParts)
{
ValueEnforcer.notNull (aPathParts, "PathParts");
final int nPartCount = m_aPathParts.size ();
if (aPathParts.size () != nPartCount)
{
// Size must match
return PathMatchingResult.NO_MATCH;
}
... | java |
@Nonnull
public FineUploader5Retry setAutoAttemptDelay (@Nonnegative final int nAutoAttemptDelay)
{
ValueEnforcer.isGE0 (nAutoAttemptDelay, "AutoAttemptDelay");
m_nRetryAutoAttemptDelay = nAutoAttemptDelay;
return this;
} | java |
@Nonnull
public FineUploader5Retry setMaxAutoAttempts (@Nonnegative final int nMaxAutoAttempts)
{
ValueEnforcer.isGE0 (nMaxAutoAttempts, "MaxAutoAttempts");
m_nRetryMaxAutoAttempts = nMaxAutoAttempts;
return this;
} | java |
@Nonnull
public FineUploader5Retry setPreventRetryResponseProperty (@Nonnull @Nonempty final String sPreventRetryResponseProperty)
{
ValueEnforcer.notEmpty (sPreventRetryResponseProperty, "PreventRetryResponseProperty");
m_sRetryPreventRetryResponseProperty = sPreventRetryResponseProperty;
return this;
... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.