code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public void markRevoked (@Nonnull @Nonempty final String sRevocationUserID,
@Nonnull final LocalDateTime aRevocationDT,
@Nonnull @Nonempty final String sRevocationReason)
{
ValueEnforcer.notEmpty (sRevocationUserID, "RevocationUserID");
ValueEnforcer.notNu... | java |
@GET
@Produces(MediaType.TEXT_PLAIN)
public InputStream doc() throws IOException {
//noinspection ConstantConditions
return getClass().getClassLoader().getResource("SnomedCoderService_help.txt").openStream();
} | java |
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
public static Collection<Utterance> mapTextWithOptions(final AnalysisRequest r)
throws IOException, InterruptedException, JAXBException, SQLException, ParserConfigurationException,
... | java |
private static Collection<Utterance> destructiveFilter(final MMOs root) {
final Collection<Utterance> utterances = new ArrayList<>();
for (final MMO mmo : root.getMMO()) {
for (final Utterance utterance : mmo.getUtterances().getUtterance()) {
// clear candidates to save heap... | java |
private static void _initialFillSet (@Nonnull final ICommonsOrderedSet <String> aSet,
@Nullable final String sItemList,
final boolean bUnify)
{
ValueEnforcer.notNull (aSet, "Set");
if (!aSet.isEmpty ())
throw new IllegalArgume... | java |
public List<Page> extractText(InputStream src) throws IOException {
List<Page> pages = Lists.newArrayList();
PdfReader reader = new PdfReader(src);
RenderListener listener = new InternalListener();
PdfContentStreamProcessor processor = new PdfContentStreamProcessor(listener);
f... | java |
public String createResponse(String challenge)
throws IllegalArgumentException, KeyNotFoundException, ProtocolVersionException {
byte[] decodedChallenge = decode(challenge);
Challenge deserializedChallenge = CrtAuthCodec.deserializeChallenge(decodedChallenge);
if (!deserializedChallenge.getServerName(... | java |
private static boolean initSingleCoverageMode(final String runName, Instrumentation instrumentation) {
// Check if run is affected and if not start coverage.
if (Ekstazi.inst().checkIfAffected(runName)) {
Ekstazi.inst().startCollectingDependencies(runName);
// End coverage when V... | java |
@OverrideOnDemand
protected void addMetaElements (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope,
@Nonnull final HCHead aHead)
{
final ICommonsList <IMetaElement> aMetaElements = new CommonsArrayList <> ();
{
// add special meta element at the beginning
... | java |
@Nonnull
public FineUploader5Core setMaxConnections (@Nonnegative final int nMaxConnections)
{
ValueEnforcer.isGT0 (nMaxConnections, "MaxConnections");
m_nCoreMaxConnections = nMaxConnections;
return this;
} | java |
@Nonnull
public JSFormatter outdentAlways ()
{
if (m_nIndentLevel == 0)
throw new IllegalStateException ("Nothing left to outdent!");
m_nIndentLevel--;
m_sIndentCache = m_sIndentCache.substring (0, m_nIndentLevel * m_aSettings.getIndent ().length ());
return this;
} | java |
@Nonnull
@CodingStyleguideUnaware
public JSDefinedClass _extends (@Nonnull final AbstractJSClass aSuperClass)
{
m_aSuperClass = ValueEnforcer.notNull (aSuperClass, "SuperClass");
return this;
} | java |
@Nonnull
public JSMethod method (@Nonnull @Nonempty final String sName)
{
final JSMethod aMethod = new JSMethod (this, sName);
m_aMethods.add (aMethod);
return aMethod;
} | java |
@Nonnull
public JSPackage openModal (@Nullable final EBootstrapModalOptionBackdrop aBackdrop,
@Nullable final Boolean aKeyboard,
@Nullable final Boolean aFocus,
@Nullable final Boolean aShow,
@Nulla... | java |
@Nullable
@OverrideOnDemand
protected ICommonsSet <String> onShowSelectedObjectCustomAttrs (@Nonnull final WPECTYPE aWPEC,
@Nonnull final DATATYPE aSelectedObject,
@Nonnull final Map <... | java |
@OverrideOnDemand
@Nullable
protected ICommonsMap <String, String> validateCustomInputParameters (@Nonnull final WPECTYPE aWPEC,
@Nullable final DATATYPE aSelectedObject,
@... | java |
public void addUploadedFile (@Nonnull @Nonempty final String sFieldName, @Nonnull final TemporaryUserDataObject aUDO)
{
ValueEnforcer.notEmpty (sFieldName, "FieldName");
ValueEnforcer.notNull (aUDO, "UDO");
m_aRWLock.writeLocked ( () -> {
// Remove an eventually existing old UDO with the same filen... | java |
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <String, UserDataObject> confirmUploadedFiles (@Nullable final String... aFieldNames)
{
final ICommonsOrderedMap <String, UserDataObject> ret = new CommonsLinkedHashMap <> ();
if (aFieldNames != null)
{
m_aRWLock.writeLocked ( () -> {
... | java |
@Nullable
public UserDataObject confirmUploadedFile (@Nullable final String sFieldName)
{
return m_aRWLock.writeLocked ( () -> {
if (StringHelper.hasText (sFieldName))
{
// Remove an eventually existing old UDO
final TemporaryUserDataObject aUDO = m_aMap.remove (sFieldName);
... | java |
@Nonnull
@ReturnsMutableCopy
public ICommonsList <String> cancelUploadedFiles (@Nullable final String... aFieldNames)
{
final ICommonsList <String> ret = new CommonsArrayList <> ();
if (ArrayHelper.isNotEmpty (aFieldNames))
{
m_aRWLock.writeLocked ( () -> {
for (final String sFieldName :... | java |
@Nullable
public TemporaryUserDataObject getUploadedFile (@Nullable final String sFieldName)
{
if (StringHelper.hasNoText (sFieldName))
return null;
return m_aRWLock.readLocked ( () -> m_aMap.get (sFieldName));
} | java |
@OverrideOnDemand
protected void modifyFirstControlIfLabelIsPresent (@Nonnull final IHCElementWithChildren <?> aLabel,
@Nonnull final IHCControl <?> aFirstControl)
{
// Set the default placeholder (if none is present)
if (aFirstControl instanceof IHCInput... | java |
@Nonnull
public IHasJSCode getJSUpdateCode (@Nonnull final IJSExpression aJSDataVar)
{
final JSPackage ret = new JSPackage ();
// Cleanup old chart
ret.invoke (JSExpr.ref (getJSChartVar ()), "destroy");
// Use new chart
ret.assign (JSExpr.ref (getJSChartVar ()), new JSDefinedClass ("Chart")._new... | java |
public static void unregisterJSIncludeFromThisRequest (@Nonnull final IJSPathProvider aJSPathProvider)
{
final JSResourceSet aSet = _getPerRequestSet (false);
if (aSet != null)
aSet.removeItem (aJSPathProvider);
} | java |
public static byte[] readFile(File file) throws IOException {
// Open file
RandomAccessFile f = new RandomAccessFile(file, "r");
try {
// Get and check length
long longlength = f.length();
int length = (int) longlength;
if (length != longlength) {
... | java |
public static void writeFile(File file, byte[] bytes) throws IOException {
FileOutputStream fos = null;
try {
fos = new FileOutputStream(file);
fos.write(bytes);
} finally {
if (fos != null) {
fos.close();
}
}
} | java |
public static boolean isSecondNewerThanFirst(File first, File second) {
boolean isSecondNewerThanFirst = false;
// If file does not exist, it cannot be newer.
if (second.exists()) {
long firstLastModified = first.lastModified();
long secondLastModified = second.lastModifi... | java |
public static byte[] loadBytes(URL url) {
byte[] bytes = null;
try {
bytes = loadBytes(url.openStream());
} catch (IOException ex) {
// ex.printStackTrace();
}
return bytes;
} | java |
@Nullable
public WebSiteResourceBundleSerialized getResourceBundleOfID (@Nullable final String sBundleID)
{
if (StringHelper.hasNoText (sBundleID))
return null;
return m_aRWLock.readLocked ( () -> m_aMapToBundle.get (sBundleID));
} | java |
public boolean containsResourceBundleOfID (@Nullable final String sBundleID)
{
if (StringHelper.hasNoText (sBundleID))
return false;
return m_aRWLock.readLocked ( () -> m_aMapToBundle.containsKey (sBundleID));
} | java |
protected static void throwMojoExecutionException(Object mojo, String message, Exception cause) throws Exception {
Class<?> clz = mojo.getClass().getClassLoader().loadClass(MavenNames.MOJO_EXECUTION_EXCEPTION_BIN);
Constructor<?> con = clz.getConstructor(String.class, Exception.class);
Exception... | java |
protected static String invokeAndGetString(String methodName, Object mojo) throws Exception {
return (String) invokeGetMethod(methodName, mojo);
} | java |
protected static boolean invokeAndGetBoolean(String methodName, Object mojo) throws Exception {
return (Boolean) invokeGetMethod(methodName, mojo);
} | java |
@SuppressWarnings("unchecked")
protected static List<String> invokeAndGetList(String methodName, Object mojo) throws Exception {
return (List<String>) invokeGetMethod(methodName, mojo);
} | java |
protected static void setField(String fieldName, Object mojo, Object value) throws Exception {
Field field = null;
try {
field = mojo.getClass().getDeclaredField(fieldName);
} catch (NoSuchFieldException ex) {
// Ignore exception and try superclass.
field = mo... | java |
protected static Object getField(String fieldName, Object mojo) throws Exception {
Field field = null;
try {
field = mojo.getClass().getDeclaredField(fieldName);
} catch (NoSuchFieldException ex) {
// Ignore exception and try superclass.
field = mojo.getClass(... | java |
public static boolean loadAgent(URL agentJarURL) throws Exception {
File toolsJarFile = findToolsJar();
Class<?> vmClass = null;
if (toolsJarFile == null || !toolsJarFile.exists()) {
// likely Java 9+ (when tools.jar is not available). Java
// 9 also requires that
... | java |
private static void attachAgent(Class<?> vmClass, URL agentJarURL) throws Exception {
String pid = getPID();
String agentAbsolutePath = new File(agentJarURL.toURI().getSchemeSpecificPart()).getAbsolutePath();
Object vm = getAttachMethod(vmClass).invoke(null, new Object[] { pid });
getLo... | java |
private static Method getAttachMethod(Class<?> vmClass) throws SecurityException, NoSuchMethodException {
return vmClass.getMethod("attach", new Class<?>[] { String.class });
} | java |
private static Method getLoadAgentMethod(Class<?> vmClass) throws SecurityException, NoSuchMethodException {
return vmClass.getMethod("loadAgent", new Class[] { String.class });
} | java |
private static String getPID() {
String vmName = ManagementFactory.getRuntimeMXBean().getName();
return vmName.substring(0, vmName.indexOf("@"));
} | java |
private static File findToolsJar() {
String javaHome = System.getProperty("java.home");
File javaHomeFile = new File(javaHome);
File toolsJarFile = new File(javaHomeFile, "lib" + File.separator + TOOLS_JAR_NAME);
if (!toolsJarFile.exists()) {
toolsJarFile = new File(System.g... | java |
public Token lookahead() {
Token current = token;
if (current.next == null) {
current.next = token_source.getNextToken();
}
return current.next;
} | java |
protected List<JDToken> whiteSpace(Token token) {
final List<JDToken> wss = new ArrayList<JDToken>();
Token ws = token.specialToken;
while(ws != null) {
switch(ws.kind) {
case WS:
wss.add(_JDWhiteSpace(ws.image));
break;
default... | java |
public static boolean hasOperator (@Nullable final IJSExpression aExpr)
{
return aExpr instanceof JSOpUnary || aExpr instanceof JSOpBinary || aExpr instanceof JSOpTernary;
} | java |
@Nonnull
public static JSOpBinary band (@Nonnull final IJSExpression aLeft, @Nonnull final IJSExpression aRight)
{
return new JSOpBinary (aLeft, "&", aRight);
} | java |
@Nonnull
public static JSOpBinary bor (@Nonnull final IJSExpression aLeft, @Nonnull final IJSExpression aRight)
{
return new JSOpBinary (aLeft, "|", aRight);
} | java |
@Nonnull
public static IJSExpression cand (@Nonnull final IJSExpression aLeft, @Nonnull final IJSExpression aRight)
{
// Some optimizations
if (aLeft == JSExpr.TRUE)
return aRight;
if (aRight == JSExpr.TRUE)
return aLeft;
if (aLeft == JSExpr.FALSE || aRight == JSExpr.FALSE)
return ... | java |
@Nonnull
public static JSOpBinary xor (@Nonnull final IJSExpression aLeft, @Nonnull final IJSExpression aRight)
{
return new JSOpBinary (aLeft, "^", aRight);
} | java |
@Nonnull
public static JSOpBinary ene (@Nonnull final IJSExpression aLeft, @Nonnull final IJSExpression aRight)
{
return new JSOpBinary (aLeft, "!==", aRight);
} | java |
@OverrideOnDemand
@Nullable
protected String determineMimeType (@Nonnull final String sFilename, @Nonnull final IReadableResource aResource)
{
return MimeTypeInfoManager.getDefaultInstance ().getPrimaryMimeTypeStringForFilename (sFilename);
} | java |
@Nullable
public static ICommonsList <IHCNode> createPasswordConstraintTip (@Nonnull final Locale aDisplayLocale)
{
final ICommonsList <String> aTexts = GlobalPasswordSettings.getPasswordConstraintList ()
.getAllPasswordConstraintDescriptions (aDisp... | java |
@Nonnull
@Nonempty
public String onStartJob (@Nonnull final ILongRunningJob aJob, @Nullable final String sStartingUserID)
{
ValueEnforcer.notNull (aJob, "Job");
// Create a new unique in-memory ID
final String sJobID = GlobalIDFactory.getNewStringID ();
final LongRunningJobData aJobData = new Lon... | java |
public void onEndJob (@Nullable final String sJobID,
@Nonnull final ESuccess eExecSucess,
@Nonnull final LongRunningJobResult aResult)
{
ValueEnforcer.notNull (eExecSucess, "ExecSuccess");
ValueEnforcer.notNull (aResult, "Result");
// Remove from running jo... | java |
public static void unregisterMetaElementFromThisRequest (@Nullable final String sMetaElementName)
{
final MetaElementList aSet = _getPerRequestSet (false);
if (aSet != null)
aSet.removeMetaElement (sMetaElementName);
} | java |
@OverrideOnDemand
@OverridingMethodsMustInvokeSuper
protected void fillHead (@Nonnull final ISimpleWebExecutionContext aSWEC, @Nonnull final HCHtml aHtml)
{
final IRequestWebScopeWithoutResponse aRequestScope = aSWEC.getRequestScope ();
final HCHead aHead = aHtml.head ();
// Add all meta elements
... | java |
@Nonnull
public final EChange setType (@Nonnull final EBootstrapPanelType eType)
{
ValueEnforcer.notNull (eType, "Type");
if (eType.equals (m_eType))
return EChange.UNCHANGED;
removeClass (m_eType);
addClass (eType);
m_eType = eType;
return EChange.CHANGED;
} | java |
@Nonnull
public TypeaheadDataset setLimit (@Nonnegative final int nLimit)
{
ValueEnforcer.isGT0 (nLimit, "Limit");
m_nLimit = nLimit;
return this;
} | java |
@Nonnull
public TypeaheadDataset setPrefetch (@Nullable final ISimpleURL aURL)
{
return setPrefetch (aURL == null ? null : new TypeaheadPrefetch (aURL));
} | java |
@Nonnull
public final IMPLTYPE scaleBestMatching (@Nonnegative final int nMaxWidth, @Nonnegative final int nMaxHeight)
{
if (m_aExtent != null)
m_aExtent = m_aExtent.getBestMatchingSize (nMaxWidth, nMaxHeight);
return thisAsT ();
} | java |
@Nonnegative
public int checkInternalMappings (@Nonnull final IMenuTree aMenuTree,
@Nonnull final Consumer <GoMappingItem> aErrorCallback)
{
ValueEnforcer.notNull (aMenuTree, "MenuTree");
ValueEnforcer.notNull (aErrorCallback, "ErrorCallback");
final IRequestParameter... | java |
@Nullable
public static String getGuestUserDisplayName (@Nonnull final Locale aDisplayLocale)
{
ValueEnforcer.notNull (aDisplayLocale, "DisplayLocale");
return ESecurityUIText.GUEST.getDisplayText (aDisplayLocale);
} | java |
@Nullable
public static String getUserDisplayName (@Nullable final String sUserID, @Nonnull final Locale aDisplayLocale)
{
if (StringHelper.hasNoText (sUserID))
return getGuestUserDisplayName (aDisplayLocale);
final IUser aUser = PhotonSecurityManager.getUserMgr ().getUserOfID (sUserID);
return a... | java |
public static byte[] serialize(Challenge challenge, byte[] hmacSecret) {
MiniMessagePack.Packer packer = new MiniMessagePack.Packer();
packer.pack(VERSION);
packer.pack(CHALLENGE_MAGIC);
packer.pack(challenge.getUniqueData());
packer.pack(challenge.getValidFromTimestamp());
packer.pack(challenge... | java |
public static byte[] serialize(Response response) {
MiniMessagePack.Packer packer = new MiniMessagePack.Packer();
packer.pack(VERSION);
packer.pack(RESPONSE_MAGIC);
packer.pack(response.getPayload());
packer.pack(response.getSignature());
return packer.getBytes();
} | java |
private static byte[] getAuthenticationCode(byte[] secret, byte[] data, int length) {
try {
SecretKey secretKey = new SecretKeySpec(secret, MAC_ALGORITHM);
Mac mac = Mac.getInstance(MAC_ALGORITHM);
mac.init(secretKey);
mac.update(data, 0, length);
return mac.doFinal();
} catch (Exc... | java |
public static String serializeEncodedRequest(String username) {
MiniMessagePack.Packer packer = new MiniMessagePack.Packer();
packer.pack(1);
packer.pack('q');
packer.pack(username);
return ASCIICodec.encode(packer.getBytes());
} | java |
public static String deserializeRequest(String request)
throws IllegalArgumentException, ProtocolVersionException {
MiniMessagePack.Unpacker unpacker = new MiniMessagePack.Unpacker(ASCIICodec.decode(request));
try {
parseVersionMagic(REQUEST_MAGIC, unpacker);
return unpacker.unpackString();
... | java |
private static boolean constantTimeEquals(byte[] a, byte[] b) {
if (a.length != b.length) {
return false;
}
int result = 0;
for (int i = 0; i < a.length; i++) {
result |= a[i] ^ b[i];
}
return result == 0;
} | java |
public static void setFallbackLocale (@Nonnull final Locale aFallbackLocale)
{
ValueEnforcer.notNull (aFallbackLocale, "FallbackLocale");
s_aRWLock.writeLocked ( () -> s_aFallbackLocale = aFallbackLocale);
} | java |
public static void setStorageFileProvider (@Nonnull final IFunction <InternalErrorMetadata, File> aStorageFileProvider)
{
ValueEnforcer.notNull (aStorageFileProvider, "StorageFileProvider");
s_aStorageFileProvider = aStorageFileProvider;
} | java |
public static void setDefaultStorageFileProvider ()
{
setStorageFileProvider (aMetadata -> {
final LocalDateTime aNow = PDTFactory.getCurrentLocalDateTime ();
final String sFilename = StringHelper.getConcatenatedOnDemand (PDTIOHelper.getLocalDateTimeForFilename (aNow),
... | java |
@Nonnull
public static TriggerKey schedule (@Nonnull final IScheduleBuilder <? extends ITrigger> aScheduleBuilder,
@Nonnegative final long nThresholdBytes)
{
ValueEnforcer.notNull (aScheduleBuilder, "ScheduleBuilder");
ValueEnforcer.isGE0 (nThresholdBytes, "ThresholdByte... | java |
@Override
public List<StringSource> createSources(String sourceFileName) {
return Util.list(new StringSource(sourceFileName, source));
} | java |
@Nullable
public static HC_Target getFromName (@Nonnull final String sName, @Nullable final HC_Target aDefault)
{
if (BLANK.getAttrValue ().equalsIgnoreCase (sName))
return BLANK;
if (SELF.getAttrValue ().equalsIgnoreCase (sName))
return SELF;
if (PARENT.getAttrValue ().equalsIgnoreCase (sNa... | java |
@Nullable
public IUser createPredefinedUser (@Nonnull @Nonempty final String sID,
@Nonnull @Nonempty final String sLoginName,
@Nullable final String sEmailAddress,
@Nonnull final String sPlainTextPassword,
... | java |
@Nullable
public IUser getUserOfLoginName (@Nullable final String sLoginName)
{
if (StringHelper.hasNoText (sLoginName))
return null;
return findFirst (x -> x.getLoginName ().equals (sLoginName));
} | java |
@Nonnull
public EChange deleteUser (@Nullable final String sUserID)
{
final User aUser = getOfID (sUserID);
if (aUser == null)
{
AuditHelper.onAuditDeleteFailure (User.OT, "no-such-user-id", sUserID);
return EChange.UNCHANGED;
}
m_aRWLock.writeLock ().lock ();
try
{
if... | java |
@Nonnull
public EChange undeleteUser (@Nullable final String sUserID)
{
final User aUser = getOfID (sUserID);
if (aUser == null)
{
AuditHelper.onAuditUndeleteFailure (User.OT, sUserID, "no-such-user-id");
return EChange.UNCHANGED;
}
m_aRWLock.writeLock ().lock ();
try
{
... | java |
@Nonnull
public EChange disableUser (@Nullable final String sUserID)
{
final User aUser = getOfID (sUserID);
if (aUser == null)
{
AuditHelper.onAuditModifyFailure (User.OT, sUserID, "no-such-user-id", "disable");
return EChange.UNCHANGED;
}
m_aRWLock.writeLock ().lock ();
try
... | java |
public boolean areUserIDAndPasswordValid (@Nullable final String sUserID, @Nullable final String sPlainTextPassword)
{
// No password is not allowed
if (sPlainTextPassword == null)
return false;
// Is there such a user?
final IUser aUser = getOfID (sUserID);
if (aUser == null)
return ... | java |
public static boolean isOutOfBandNode (@Nonnull final IHCNode aHCNode)
{
ValueEnforcer.notNull (aHCNode, "HCNode");
// Is the @OutOfBandNode annotation present?
if (s_aOOBNAnnotationCache.hasAnnotation (aHCNode))
return true;
// If it is a wrapped node, look into it
if (HCHelper.isWrappedN... | java |
public static void recursiveExtractAndRemoveOutOfBandNodes (@Nonnull final IHCNode aParentElement,
@Nonnull final List <IHCNode> aTargetList)
{
ValueEnforcer.notNull (aParentElement, "ParentElement");
ValueEnforcer.notNull (aTargetList, "TargetList... | java |
@Nonnull
@CodingStyleguideUnaware
public JSBlock _continue (@Nullable final JSLabel aLabel)
{
addStatement (new JSContinue (aLabel));
return this;
} | java |
@Nonnull
public final APIDescriptor addRequiredHeader (@Nullable final String sHeaderName)
{
if (StringHelper.hasText (sHeaderName))
m_aRequiredHeaders.add (sHeaderName);
return this;
} | java |
@Nonnull
public final APIDescriptor addRequiredHeaders (@Nullable final String... aHeaderNames)
{
if (aHeaderNames != null)
for (final String sHeaderName : aHeaderNames)
addRequiredHeader (sHeaderName);
return this;
} | java |
@Nonnull
public final APIDescriptor addRequiredParam (@Nullable final String sParamName)
{
if (StringHelper.hasText (sParamName))
m_aRequiredParams.add (sParamName);
return this;
} | java |
@Nonnull
public final APIDescriptor addRequiredParams (@Nullable final String... aParamNames)
{
if (aParamNames != null)
for (final String sParamName : aParamNames)
addRequiredParam (sParamName);
return this;
} | java |
@Override
@Nonnull
public JQueryInvocation jqinvoke (@Nonnull @Nonempty final String sMethod)
{
return new JQueryInvocation (this, sMethod);
} | java |
@Nonnull
public static HCLink createCSSLink (@Nonnull final ISimpleURL aCSSURL)
{
return new HCLink ().setRel (EHCLinkType.STYLESHEET).setType (CMimeType.TEXT_CSS).setHref (aCSSURL);
} | java |
public static JADT standardConfigDriver() {
logger.fine("Using standard configuration.");
final SourceFactory sourceFactory = new FileSourceFactory();
final ClassBodyEmitter classBodyEmitter = new StandardClassBodyEmitter();
final ConstructorEmitter constructorEmitter = new StandardConstruc... | java |
public void parseAndEmit(String[] args) {
logger.finest("Checking command line arguments.");
if (args.length != 2) {
final String version = new Version().getVersion();
logger.info("jADT version " + version + ".");
logger.info("Not enough arguments provided to jADT");
log... | java |
public void parseAndEmit(String srcPath, final String destDir) {
final String version = new Version().getVersion();
logger.info("jADT version " + version + ".");
logger.info("Will read from source " + srcPath);
logger.info("Will write to destDir " + destDir);
final List<? extends S... | java |
public static JADT createDummyJADT(List<SyntaxError> syntaxErrors, List<SemanticError> semanticErrors, String testSrcInfo, SinkFactoryFactory factory) {
final SourceFactory sourceFactory = new StringSourceFactory(TEST_STRING);
final Doc doc = new Doc(TEST_SRC_INFO, Pkg._Pkg(NO_COMMENTS, "pkg"), Util.<Im... | java |
private boolean hasHashChanged(Set<RegData> regData) {
for (RegData el : regData) {
if (hasHashChanged(mHasher, el)) {
return true;
}
}
return false;
} | java |
protected final boolean hasHashChanged(Hasher hasher, RegData regDatum) {
String urlExternalForm = regDatum.getURLExternalForm();
// Check hash.
String newHash = hasher.hashURL(urlExternalForm);
boolean anyDiff = !newHash.equals(regDatum.getHash());
return anyDiff;
} | java |
@Nonnull
public TypeaheadRemote setCache (@Nonnull final ETriState eCache)
{
m_eCache = ValueEnforcer.notNull (eCache, "Cache");
return this;
} | java |
@Nonnull
public PhotonGlobalState setDefaultApplicationID (@Nullable final String sDefaultApplicationID)
{
m_aRWLock.writeLocked ( () -> {
if (!EqualsHelper.equals (m_sDefaultApplicationID, sDefaultApplicationID))
{
m_sDefaultApplicationID = sDefaultApplicationID;
if (LOGGER.isInfoEn... | java |
@Nonnull
public HCNodeList createSelectedFileEdit (@Nullable final String sPlaceholder)
{
final HCEdit aEdit = new HCEdit ().setPlaceholder (sPlaceholder).setReadOnly (true);
final HCScriptInline aScript = new HCScriptInline (JQuery.idRef (m_aEdit)
... | java |
@Nonnull
public FineUploader5DeleteFile setEndpoint (@Nonnull final ISimpleURL aEndpoint)
{
ValueEnforcer.notNull (aEndpoint, "Endpoint");
m_aDeleteFileEndpoint = aEndpoint;
return this;
} | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.