code stringlengths 12 2.05k | label_name stringclasses 5
values | label int64 0 4 |
|---|---|---|
default Optional<MediaType> contentType() {
return getFirst(HttpHeaders.CONTENT_TYPE, MediaType.class);
} | Class | 2 |
public void setEntityResolver(EntityResolver entityResolver) {
this.entityResolver = entityResolver;
} | Base | 1 |
private void processExtras(Bundle extras) {
final String downloadUuid = extras.getString(ConversationsActivity.EXTRA_DOWNLOAD_UUID);
final String text = extras.getString(Intent.EXTRA_TEXT);
final String nick = extras.getString(ConversationsActivity.EXTRA_NICK);
final boolean asQuote ... | Class | 2 |
public void view(@RequestParam String filename,
@RequestParam(required = false) String base,
@RequestParam(required = false) Integer tailLines,
HttpServletResponse response) throws IOException {
securityCheck(filename);
response.setConte... | Base | 1 |
public void toScientificString(StringBuilder result) {
assert(!isApproximate);
if (isNegative()) {
result.append('-');
}
if (precision == 0) {
result.append("0E+0");
return;
}
// NOTE: It is not safe to add to lOptPos (aka maxInt) o... | Base | 1 |
public void translate(ServerPlayerAbilitiesPacket packet, GeyserSession session) {
session.setCanFly(packet.isCanFly());
session.setFlying(packet.isFlying());
session.sendAdventureSettings();
} | Class | 2 |
protected List<PropertySource> readPropertySourceListFromFiles(String files) {
List<PropertySource> propertySources = new ArrayList<>();
Collection<PropertySourceLoader> propertySourceLoaders = getPropertySourceLoaders();
Optional<Collection<String>> filePathList = Optional.ofNullable(files)... | Base | 1 |
public TMap readMapBegin() throws TException {
return new TMap(readByte(), readByte(), readI32());
} | Base | 1 |
private void parse(UserRequest ureq) {
String[] sFiles = ureq.getHttpReq().getParameterValues(FORM_ID);
if (sFiles == null || sFiles.length == 0) return;
files = Arrays.asList(sFiles);
} | Base | 1 |
public void validateFail(ViolationCollector col) {
} | Class | 2 |
private Document parseFromBytes(byte[] bytes) throws SAMLException {
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
try {
DocumentBuilder builder = documentBuilderFactory.newDocumentBuilder();
return builder... | Base | 1 |
public void testGetShellCommandLineBash_WithWorkingDirectory()
throws Exception
{
Commandline cmd = new Commandline( new BourneShell() );
cmd.setExecutable( "/bin/echo" );
cmd.addArguments( new String[] {
"hello world"
} );
File root = File.listRoots()... | Base | 1 |
public void testLoadMapper_serializade() {
//create a mapper
String mapperId = UUID.randomUUID().toString();
String sessionId = UUID.randomUUID().toString().substring(0, 32);
PersistentMapper sMapper = new PersistentMapper("mapper-to-persist");
PersistedMapper pMapper = mapperDao.persistMapper(sessionId, map... | Base | 1 |
public void encodeByteArray() {
Packet<byte[]> packet = new Packet<>(Parser.BINARY_EVENT);
packet.data = "abc".getBytes(Charset.forName("UTF-8"));
packet.id = 23;
packet.nsp = "/cool";
Helpers.testBin(packet);
} | Base | 1 |
public static boolean isPermitted(
final Optional<AuthenticationService> authenticationService,
final Optional<User> optionalUser,
final JsonRpcMethod jsonRpcMethod) {
AtomicBoolean foundMatchingPermission = new AtomicBoolean();
if (authenticationService.isPresent()) {
if (optionalUs... | Class | 2 |
public int decryptWithAd(byte[] ad, byte[] ciphertext,
int ciphertextOffset, byte[] plaintext, int plaintextOffset,
int length) throws ShortBufferException, BadPaddingException {
int space;
if (ciphertextOffset > ciphertext.length)
space = 0;
else
space = ciphertext.length - ciphertextOffset;
if (l... | Base | 1 |
public void existingDocumentFromUITemplateProviderSpecified() throws Exception
{
// current document = xwiki:Main.WebHome
DocumentReference documentReference = new DocumentReference("xwiki", Arrays.asList("Main"), "WebHome");
XWikiDocument document = mock(XWikiDocument.class);
wh... | Class | 2 |
public int encryptWithAd(byte[] ad, byte[] plaintext, int plaintextOffset,
byte[] ciphertext, int ciphertextOffset, int length)
throws ShortBufferException {
int space;
if (ciphertextOffset > ciphertext.length)
space = 0;
else
space = ciphertext.length - ciphertextOffset;
if (keySpec == null) {
... | Base | 1 |
private void processReturnFiles(VFSLeaf target, List<BulkAssessmentRow> rows) {
Map<String, BulkAssessmentRow> assessedIdToRow = new HashMap<>();
for(BulkAssessmentRow row:rows) {
assessedIdToRow.put(row.getAssessedId(), row);
}
if(target.exists()) {
File parentTarget = ((LocalImpl)target).getBasefile()... | Base | 1 |
public void testBourneShellQuotingCharacters()
throws Exception
{
// { ' ', '$', ';', '&', '|', '<', '>', '*', '?', '(', ')' };
// test with values http://steve-parker.org/sh/bourne.shtml Appendix B - Meta-characters and Reserved Words
Commandline commandline = new Commandline( n... | Base | 1 |
public void setErrorHandler(ErrorHandler errorHandler) {
this.errorHandler = errorHandler;
} | Base | 1 |
public void sendError(int sc, String msg) throws IOException {
if (isIncluding()) {
Logger.log(Logger.ERROR, Launcher.RESOURCES, "IncludeResponse.Error",
new String[] { "" + sc, msg });
return;
}
Logger.log(Logger.DEBUG, Launcher.RESOURCES... | Base | 1 |
public URL createURL(String spaces, String name, String queryString, String anchor, String wikiId,
XWikiContext context, FilesystemExportContext exportContext) throws Exception
{
// Check if the current user has the right to view the SX file. We do this since this is what would happen
//... | Base | 1 |
private static boolean validateChainData(JsonNode data) throws Exception {
ECPublicKey lastKey = null;
boolean validChain = false;
for (JsonNode node : data) {
JWSObject jwt = JWSObject.parse(node.asText());
if (!validChain) {
validChain = EncryptionU... | Class | 2 |
public Operation.OperationResult executeFixedCostOperation(
final MessageFrame frame, final EVM evm) {
Bytes shiftAmount = frame.popStackItem();
if (shiftAmount.size() > 4 && (shiftAmount = shiftAmount.trimLeadingZeros()).size() > 4) {
frame.popStackItem();
frame.pushStackItem(UInt256.ZERO);... | Base | 1 |
public void translate(LoginDisconnectPacket packet, GeyserSession session) {
// The client doesn't manually get disconnected so we have to do it ourselves
session.disconnect(MessageTranslator.convertMessage(packet.getReason(), session.getLocale()));
} | Class | 2 |
public void translate(EntityEventPacket packet, GeyserSession session) {
switch (packet.getType()) {
case EATING_ITEM:
// Resend the packet so we get the eating sounds
session.sendUpstreamPacket(packet);
return;
case COMPLETE_TRADE:
... | Class | 2 |
private void sendStreamingResponse(HttpExchange pExchange, ParsedUri pParsedUri, JSONStreamAware pJson) throws IOException {
Headers headers = pExchange.getResponseHeaders();
if (pJson != null) {
headers.set("Content-Type", getMimeType(pParsedUri) + "; charset=utf-8");
String... | Base | 1 |
final void set(CharSequence name, String... values) {
final AsciiString normalizedName = normalizeName(name);
requireNonNull(values, "values");
final int h = normalizedName.hashCode();
final int i = index(h);
remove0(h, i, normalizedName);
for (String v : values) {
... | Class | 2 |
public void translate(LoginSuccessPacket packet, GeyserSession session) {
PlayerEntity playerEntity = session.getPlayerEntity();
AuthType remoteAuthType = session.getRemoteAuthType();
// Required, or else Floodgate players break with Spigot chunk caching
GameProfile profile = packet... | Class | 2 |
public void translate(ServerSpawnPlayerPacket packet, GeyserSession session) {
Vector3f position = Vector3f.from(packet.getX(), packet.getY(), packet.getZ());
Vector3f rotation = Vector3f.from(packet.getYaw(), packet.getPitch(), packet.getYaw());
PlayerEntity entity;
if (packet.getU... | Class | 2 |
public static SecretKey decryptCEK(final PrivateKey priv,
final byte[] encryptedCEK,
final int keyLength,
final Provider provider)
throws JOSEException {
try {
Cipher cipher = CipherHelper.getInstance("RSA/ECB/PKCS1Padding",... | Class | 2 |
public void getPermissions() {
List<String> permissions = method.getPermissions();
assertThat(permissions).containsExactlyInAnyOrder("net:*", "net:listening", "*:*");
} | Class | 2 |
private File createTemporaryFolderIn(File parentFolder) throws IOException {
File createdFolder = null;
for (int i = 0; i < TEMP_DIR_ATTEMPTS; ++i) {
// Use createTempFile to get a suitable folder name.
String suffix = ".tmp";
File tmpFile = File.createTempFile(TM... | Class | 2 |
private static String encodeToPercents(Bytes value, boolean isPath) {
final BitSet allowedChars = isPath ? ALLOWED_PATH_CHARS : ALLOWED_QUERY_CHARS;
final int length = value.length;
boolean needsEncoding = false;
for (int i = 0; i < length; i++) {
if (!allowedChars.get(va... | Base | 1 |
public void translate(ServerChatPacket packet, GeyserSession session) {
TextPacket textPacket = new TextPacket();
textPacket.setPlatformChatId("");
textPacket.setSourceName("");
textPacket.setXuid(session.getAuthData().getXboxUUID());
switch (packet.getType()) {
c... | Class | 2 |
void equal() {
final PathAndQuery res = PathAndQuery.parse("/=?a=b=1");
assertThat(res).isNotNull();
assertThat(res.path()).isEqualTo("/=");
assertThat(res.query()).isEqualTo("a=b=1");
// '%3D' in a query string should never be decoded into '='.
final PathAndQuery re... | Base | 1 |
public void existingDocumentFromUINoName() throws Exception
{
// current document = xwiki:Main.WebHome
DocumentReference documentReference = new DocumentReference("xwiki", Arrays.asList("Main"), "WebHome");
XWikiDocument document = mock(XWikiDocument.class);
when(document.getDocu... | Class | 2 |
public void translate(AnimatePacket packet, GeyserSession session) {
// Stop the player sending animations before they have fully spawned into the server
if (!session.isSpawned()) {
return;
}
switch (packet.getAction()) {
case SWING_ARM:
// De... | Class | 2 |
protected DocumentReference resolveTemplate(String template)
{
if (StringUtils.isNotBlank(template)) {
DocumentReference templateReference = this.currentmixedReferenceResolver.resolve(template);
// Make sure the current user have access to the template document before copying it... | Class | 2 |
void validSave() throws Exception
{
when(mockClonedDocument.getRCSVersion()).thenReturn(new Version("1.2"));
when(mockClonedDocument.getComment()).thenReturn("My Changes");
when(mockClonedDocument.getLock(this.context)).thenReturn(mock(XWikiLock.class));
when(mockForm.getTemplate... | Class | 2 |
final void setObject(CharSequence name, Object... values) {
final AsciiString normalizedName = normalizeName(name);
requireNonNull(values, "values");
final int h = normalizedName.hashCode();
final int i = index(h);
remove0(h, i, normalizedName);
for (Object v: value... | Class | 2 |
public static long compileTime() {
return 1649510957985L;
} | Base | 1 |
private static void validate(final byte[] iv, final int authTagLength)
throws JOSEException {
if (ByteUtils.bitLength(iv) != IV_BIT_LENGTH) {
throw new JOSEException(String.format("IV length of %d bits is required, got %d", IV_BIT_LENGTH, ByteUtils.bitLength(iv)));
}
if (authTagLength != AUTH_TAG_BIT_LE... | Class | 2 |
public void handle(final HttpServletRequest request, final HttpServletResponse response)
throws Exception
{
new ContextualHttpServletRequest(request)
{
@Override
public void process() throws Exception
{
ServletContexts.instance().setRequest(request);
... | Class | 2 |
public Controller execute(FolderComponent folderComponent, UserRequest ureq, WindowControl wControl, Translator trans) {
setTranslator(trans);
currentContainer = folderComponent.getCurrentContainer();
if (currentContainer.canWrite() != VFSConstants.YES) {
throw new AssertException("Cannot write to current fol... | Base | 1 |
public static Object deserialize(byte[] data)
throws IOException, ClassNotFoundException
{
ByteArrayInputStream in = new ByteArrayInputStream(data);
ObjectInputStream is = new ObjectInputStream(in);
return is.readObject();
} | Base | 1 |
public void init(KeyGenerationParameters param)
{
this.param = (RSAKeyGenerationParameters)param;
this.iterations = getNumberOfIterations(this.param.getStrength(), this.param.getCertainty());
} | Class | 2 |
public void setAllShouldOverwriteSomeAndLeaveOthersUntouched() {
final HttpHeadersBase h1 = newEmptyHeaders();
h1.add("name1", "value1");
h1.add("name2", "value2");
h1.add("name2", "value3");
h1.add("name3", "value4");
final HttpHeadersBase h2 = newEmptyHeaders();
... | Class | 2 |
public BourneShell( boolean isLoginShell )
{
setShellCommand( "/bin/sh" );
setArgumentQuoteDelimiter( '\'' );
setExecutableQuoteDelimiter( '\"' );
setSingleQuotedArgumentEscaped( true );
setSingleQuotedExecutableEscaped( false );
setQuotedExecutableEnabled( true )... | Base | 1 |
private ServiceStat getRateLimitOpCountStat() throws Throwable {
URI managementServiceUri = this.host.getManagementServiceUri();
return this.host.getServiceStats(managementServiceUri)
.get(ServiceHostManagementService.STAT_NAME_RATE_LIMITED_OP_COUNT);
} | Class | 2 |
protected void runTeardown() {
Assert.assertTrue("Error during initialization", messagedInitialization);
Assert.assertTrue("HTTP connection is not allowed", messagedAccessDenied);
} | Class | 2 |
public void handle(HttpServletRequest request, final HttpServletResponse response)
throws Exception
{
// We're sending an XML response, so set the response content type to text/xml
response.setContentType("text/xml");
// Parse the incoming request as XML
SAXReader xmlReader = new SAXReader();... | Class | 2 |
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
throws IOException {
String filename = file.getFileName().toString();
if(filename.endsWith(WikiManager.WIKI_PROPERTIES_SUFFIX)) {
String f = convertAlternativeFilename(file.toString());
final Path destF... | Base | 1 |
public static DomainSocketAddress newSocketAddress() {
try {
File file;
do {
file = File.createTempFile("NETTY", "UDS");
if (!file.delete()) {
throw new IOException("failed to delete: " + file);
}
} while... | Base | 1 |
protected void parseModuleConfigFile(Digester digester, String path)
throws UnavailableException {
InputStream input = null;
try {
URL url = getServletContext().getResource(path);
// If the config isn't in the servlet context, try the class loader
// whi... | Class | 2 |
public Document read(Reader reader) throws DocumentException {
InputSource source = new InputSource(reader);
if (this.encoding != null) {
source.setEncoding(this.encoding);
}
return read(source);
} | Base | 1 |
static public UStroke getStrokeInternal(IGroup group, ISkinParam skinParam, Style style) {
final Colors colors = group.getColors();
if (colors.getSpecificLineStroke() != null)
return colors.getSpecificLineStroke();
if (style != null)
return style.getStroke();
if (group.getUSymbol() != null && group.get... | Base | 1 |
public void testCurveCheckOk()
throws Exception {
ECPublicKey ephemeralPublicKey = generateECPublicKey(ECKey.Curve.P_256);
ECPrivateKey privateKey = generateECPrivateKey(ECKey.Curve.P_256);
ECDH.ensurePointOnCurve(ephemeralPublicKey, privateKey);
} | Base | 1 |
public Claims validateToken(String token) throws AuthenticationException {
try {
RsaKeyUtil rsaKeyUtil = new RsaKeyUtil();
PublicKey publicKey = rsaKeyUtil.fromPemEncoded(keycloakPublicKey);
return Jwts.parser().setSigningKey(publicKey).parseJws(token.replace("Bearer ", ... | Base | 1 |
public void addSynchronously(MediaPackage mediaPackage) throws SearchException, MediaPackageException,
IllegalArgumentException, UnauthorizedException {
if (mediaPackage == null) {
throw new IllegalArgumentException("Unable to add a null mediapackage");
}
logger.debug("Attempting to add me... | Class | 2 |
public AuthenticationInfo loadAuthenticationInfo(JSONWebToken token) {
Key key = getJWTKey();
Jwt jwt;
try {
jwt = Jwts.parser().setSigningKey(key).parse(token.getPrincipal());
} catch (JwtException e) {
throw new AuthenticationException(e);
}
... | Base | 1 |
public static IRubyObject read_memory(ThreadContext context, IRubyObject klazz, IRubyObject content) {
String data = content.convertToString().asJavaString();
return getSchema(context, (RubyClass) klazz, new StreamSource(new StringReader(data)));
} | Base | 1 |
public ChangeState(TimeTick when, String comment, Colors colors, String... states) {
if (states.length == 0) {
throw new IllegalArgumentException();
}
this.when = when;
this.states = states;
this.comment = comment;
this.colors = colors;
} | Base | 1 |
public void shouldNotAllowToListFileOutsideRoot() throws Exception {
// given
expectedException.expect(IllegalArgumentException.class);
expectedException.expectMessage(containsString("this String argument must not contain the substring [..]"));
// when
logViewEndpoint.view("... | Base | 1 |
public void translate(ServerSetActionBarTextPacket packet, GeyserSession session) {
String text;
if (packet.getText() == null) { //TODO 1.17 can this happen?
text = " ";
} else {
text = MessageTranslator.convertMessage(packet.getText(), session.getLocale());
}... | Class | 2 |
public static <T> T withPassword(AuthenticationRequestType type, Properties info,
PasswordAction<char @Nullable [], T> action) throws PSQLException, IOException {
char[] password = null;
String authPluginClassName = PGProperty.AUTHENTICATION_PLUGIN_CLASS_NAME.get(info);
if (authPluginClassName == ... | Class | 2 |
public void testCycle_ECDH_ES_Curve_P256_attackPoint1()
throws Exception {
ECKey ecJWK = generateECJWK(ECKey.Curve.P_256);
BigInteger privateReceiverKey = ecJWK.toECPrivateKey().getS();
JWEHeader header = new JWEHeader.Builder(JWEAlgorithm.ECDH_ES,
EncryptionMethod.A128GCM)
.agreementPartyUInfo(... | Base | 1 |
public void setIncludeExternalDTDDeclarations(boolean include) {
this.includeExternalDTDDeclarations = include;
} | Base | 1 |
public void translate(ServerSetSubtitleTextPacket packet, GeyserSession session) {
String text;
if (packet.getText() == null) { //TODO 1.17 can this happen?
text = " ";
} else {
text = MessageTranslator.convertMessage(packet.getText(), session.getLocale());
}
... | Class | 2 |
private HColor getColorLegacy(ISkinParam skinParam, ColorParam colorParam, Stereotype stereo) {
return new Rose().getHtmlColor(skinParam, stereo, colorParam);
} | Base | 1 |
private static void createBaloInHomeRepo(HttpURLConnection conn, String modulePathInBaloCache,
String moduleNameWithOrg, boolean isNightlyBuild, String newUrl, String contentDisposition) {
long responseContentLength = conn.getContentLengthLong();
if (responseContentLength <= 0) {
... | Base | 1 |
public int addFileName(String file) {
workUnitList.add(new WorkUnit(file));
return size();
} | Base | 1 |
public void translate(ServerSetTitlesAnimationPacket packet, GeyserSession session) {
SetTitlePacket titlePacket = new SetTitlePacket();
titlePacket.setType(SetTitlePacket.Type.TIMES);
titlePacket.setText("");
titlePacket.setFadeInTime(packet.getFadeIn());
titlePacket.setFade... | Class | 2 |
public AbstractEpsgFactory(final Hints userHints) throws FactoryException {
super(MAXIMUM_PRIORITY - 20);
// The following hints have no effect on this class behaviour,
// but tell to the user what this factory do about axis order.
hints.put(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Bo... | Class | 2 |
public void removingANameForASecondTimeShouldReturnFalse() {
final HttpHeadersBase headers = newEmptyHeaders();
headers.add("name1", "value1");
headers.add("name2", "value2");
assertThat(headers.remove("name2")).isTrue();
assertThat(headers.remove("name2")).isFalse();
} | Class | 2 |
public void newDocumentWebHomeFromURLTemplateProviderSpecifiedTerminalOverriddenFromUIToNonTerminal()
throws Exception
{
// new document = xwiki:X.Y.WebHome
DocumentReference documentReference = new DocumentReference("xwiki", Arrays.asList("X", "Y"), "WebHome");
XWikiDocument doc... | Class | 2 |
public <T> List<T> search(String filter, Object[] filterArgs, Mapper<T> mapper, int maxResult) {
List<T> results = new ArrayList<>();
DirContext dirContext = getDirContext(ldapConfiguration, ldapConfiguration.getManagerDn(), ldapConfiguration.getPassword());
try {
List<SearchRes... | Class | 2 |
public void newDocumentWebHomeFromURLTemplateProviderSpecifiedButNotAllowed() throws Exception
{
// new document = xwiki:X.Y.WebHome
DocumentReference documentReference = new DocumentReference("xwiki", Arrays.asList("X", "Y"), "WebHome");
XWikiDocument document = mock(XWikiDocument.class... | Class | 2 |
public void setDefaultHandler(ElementHandler handler) {
getDispatchHandler().setDefaultHandler(handler);
} | Base | 1 |
public static void serializeToStream(final OutputStream os, final Object payload) throws IOException {
ObjectOutputStream oos = null;
try {
oos = new ObjectOutputStream(os);
oos.writeObject(payload);
} finally {
if (oos != null) {
try {
... | Base | 1 |
public Group createDefaultReadGroup(Context context, Collection collection, String typeOfGroupString,
int defaultRead)
throws SQLException, AuthorizeException {
Group role = groupService.create(context);
groupService.setName(role, "COLLECTION_" + colle... | Class | 2 |
public void translate(ContainerClosePacket packet, GeyserSession session) {
byte windowId = packet.getId();
//Client wants close confirmation
session.sendUpstreamPacket(packet);
session.setClosingInventory(false);
if (windowId == -1 && session.getOpenInventory() instanceof ... | Class | 2 |
default Optional<Integer> findInt(CharSequence name) {
return get(name, Integer.class);
} | Class | 2 |
public VideoMetadata readVideoMetadataFile(OLATResource videoResource){
VFSContainer baseContainer= FileResourceManager.getInstance().getFileResourceRootImpl(videoResource);
VFSLeaf metaDataFile = (VFSLeaf) baseContainer.resolve(FILENAME_VIDEO_METADATA_XML);
try {
return (VideoMetadata) XStreamHelper.readObje... | Base | 1 |
void routingResult() throws URISyntaxException {
final RoutingResultBuilder builder = RoutingResult.builder();
final RoutingResult routingResult = builder.path("/foo")
.query("bar=baz")
.rawParam("q... | Base | 1 |
public void translate(ServerAdvancementTabPacket packet, GeyserSession session) {
AdvancementsCache advancementsCache = session.getAdvancementsCache();
advancementsCache.setCurrentAdvancementCategoryId(packet.getTabId());
advancementsCache.buildAndShowListForm();
} | Class | 2 |
public SAXReader(DocumentFactory factory, boolean validating) {
this.factory = factory;
this.validating = validating;
} | Base | 1 |
public SAXEntityResolver(String uriPrefix) {
this.uriPrefix = uriPrefix;
} | Base | 1 |
public void add(File fileToAdd) {
String[] args = new String[]{"add", fileToAdd.getName()};
CommandLine gitAdd = gitWd().withArgs(args);
runOrBomb(gitAdd);
} | Class | 2 |
public Cipher encrypt() {
try {
Cipher cipher = Secret.getCipher(ALGORITHM);
cipher.init(Cipher.ENCRYPT_MODE, getKey());
return cipher;
} catch (GeneralSecurityException e) {
throw new AssertionError(e);
}
} | Class | 2 |
public String[] getCommandline()
{
final String[] args = getArguments();
String executable = getExecutable();
if ( executable == null )
{
return args;
}
final String[] result = new String[args.length + 1];
result[0] = executable;
Syste... | Base | 1 |
public static byte[] computeLength(final byte[] aad) {
final int bitLength = ByteUtils.bitLength(aad);
return ByteBuffer.allocate(8).putLong(bitLength).array();
} | Class | 2 |
public byte[] toByteArray()
{
/* index || secretKeySeed || secretKeyPRF || publicSeed || root */
int n = params.getDigestSize();
int indexSize = (params.getHeight() + 7) / 8;
int secretKeySize = n;
int secretKeyPRFSize = n;
int publicSeedSize = n;
int rootSize =... | Base | 1 |
public void correctExample() throws Exception {
assertThat(ConstraintViolations.format(validator.validate(new CorrectExample())))
.isEmpty();
assertThat(TestLoggerFactory.getAllLoggingEvents())
.isEmpty();
} | Class | 2 |
public static String printFormattedMetadata(final IBaseDataObject payload) {
final StringBuilder out = new StringBuilder();
out.append(LS);
for (final Map.Entry<String, Collection<Object>> entry : payload.getParameters().entrySet()) {
out.append(entry.getKey() + SEP + entry.getVa... | Base | 1 |
public void testHeaderNameNormalization() {
final HttpHeadersBase headers = newHttp2Headers();
headers.add("Foo", "bar");
assertThat(headers.getAll("foo")).containsExactly("bar");
assertThat(headers.getAll("fOO")).containsExactly("bar");
assertThat(headers.names()).contains(H... | Class | 2 |
public TSet readSetBegin() throws TException {
return new TSet(readByte(), readI32());
} | Base | 1 |
private void verifyHostname(X509Certificate cert)
throws CertificateParsingException
{
try {
Collection sans = cert.getSubjectAlternativeNames();
if (sans == null) {
String dn = cert.getSubjectX500Principal().getName();
LdapName ln = new LdapName(dn);
fo... | Base | 1 |
protected SymbolContext getContextLegacy() {
if (UseStyle.useBetaStyle() == false)
return new SymbolContext(HColorUtils.COL_D7E0F2, HColorUtils.COL_038048).withStroke(new UStroke(2));
final HColor lineColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
skinParam.getIHtmlColorSet());
... | Base | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.