id
stringlengths
7
14
text
stringlengths
1
37.2k
4673630_6
public Map<String, LdapUserMapping> getUserMappings() { if (userMappings == null) { // Use linked hash map to preserve order userMappings = new LinkedHashMap<>(); String[] serverKeys = settings.getStringArray(LDAP_SERVERS_PROPERTY); if (serverKeys.length > 0) { for (String serverKey : serverKeys...
4676768_3
public static OtaBuildHtmlGenerator getInstance() { return getInstance(null); }
4678495_8
@Override public Boolean exec(Tuple tuple) throws IOException { if (tuple == null || tuple.size() == 0) { return false; } try { Object object = tuple.get(0); if (object == null) { return false; } int i = (Integer) object; return i == 0 || i == 1 || i == 4 || i == 5 || i == 9; } cat...
4685138_0
public void greet() { System.out.println("Hello, I am Java!"); new HelloClojure().hello("Java"); new HelloFrege().hello("Java"); new HelloGosu().hello("Java"); new HelloGroovy().hello("Java"); new HelloJava().hello("Java"); new HelloKotlin().hello("Java"); new HelloPython().hello("Java"); new HelloRuby().hello...
4694994_16
static String[] getTitleAndSubtitle(String title) { Matcher titleMatcher = Pattern.compile("<\u00ac1>([^<]*)</\u00ac1>").matcher(title); Matcher subtitleMatcher = Pattern.compile("<\u00ac2>([^<]*)</\u00ac2>").matcher(title); if (titleMatcher.find()) { String theTitle = Jsoup.parse(titleMatcher.group...
4695543_1
public static String camelCaseToLowerUnderscore(String s) { if (s.toUpperCase().equals(s) && isLettersAndDigits(s)) { return s.toLowerCase(); } StringBuilder b = new StringBuilder(); b.append(s.charAt(0)); boolean underscoreAdded = false; boolean lastCharacterUppercase = false; for ...
4695732_1
static int writeHeaderBuffer(final MapWriterConfiguration configuration, final TileBasedDataProcessor dataProcessor, final ByteBuffer containerHeaderBuffer) { LOGGER.fine("writing header"); LOGGER.fine("Bounding box for file: " + dataProcessor.getBoundingBox().maxLatitudeE6 + ", " + dataProcessor.getBoundingBox...
4709330_67
public void save(User user, FileEntry fileEntry, String encoding) { SVNClientManager svnClientManager = null; ISVNEditor editor = null; String checksum = null; InputStream bais = null; try { svnClientManager = getSVNClientManager(); SVNRepository repo = svnClientManager.createRepository(SVNURL.fromFile(getUser...
4713292_14
public List<Mistake> check(Sentence sentence) { List<Mistake> mistakes = new LinkedList<Mistake>(); int offset = sentence.getSpan().getStart(); List<Token> tokens = sentence.getTokens(); String token = tokens.get(0).getLexeme().toLowerCase(); for (int i = 1; i < tokens.size(); i++) { String next = tokens.get...
4726303_127
public List<JsonStream> getOutputs() { final ArrayList<JsonStream> outputs = new ArrayList<JsonStream>(this.maxOutputs); for (int index = 0; index < this.maxOutputs; index++) outputs.add(this.getOutput(index)); return outputs; }
4726428_33
public int getRequiredInt(String property) { String prop = getRequiredString(property); try { return Integer.parseInt(prop); } catch (NumberFormatException e) { throw new IllegalArgumentException("Property " + property + " expected type: int"); } }
4732484_0
public <T, U extends T> T specialize(Class<T> parent, U t) throws SpecializationException { try (Logger l = new Logger("ROOT specialize(" + parent.getSimpleName() + " " + t + ")")) { ClassDescriptor specializedClass = specializeClass(t.getClass(), t); return parent.cast(specializeInstance(specializedClass, t)...
4737996_7
@Override public Map<SignatureType, SortedMap<String, SignatureFileInfo>> getAvailableSignatureFiles() { final Path binSigFileDir = config.getSignatureFileDir(); final Path containerSigFileDir = config.getContainerSignatureDir(); //File textSigFileDir = config.getTextSignatureFileDir(); final ...
4738719_1
@Override public void setAttributes(Properties properties) { // Some lunatics illegally put non String objects into System props // as keys / values - we ignore them. for ( String key : properties.stringPropertyNames() ) { setAttribute( key, properties.getProperty( key ) ); } }
4741942_80
@Override public Status process() throws EventDeliveryException { Status status = null; Iterator<Sink> sinkIterator = selector.createSinkIterator(); while (sinkIterator.hasNext()) { Sink sink = sinkIterator.next(); try { status = sink.process(); break; } catch (Exception ex) { LOGGE...
4741958_389
@Override public Vector classify(Vector instance) { if (models.get(0) instanceof SoftCluster) { Collection<SoftCluster> clusters = Lists.newArrayList(); List<Double> distances = Lists.newArrayList(); for (Cluster model : models) { SoftCluster sc = (SoftCluster) model; clusters.add(sc); d...
4744588_1
public String toCommand(LuaWrapper table) { StringBuilder sb = new StringBuilder(table.getString(LuaFields.COMMAND_BASE)); if (!table.isNil(LuaFields.ARGS)) { LuaWrapper a = table.getTable(LuaFields.ARGS); Iterator<LuaPair> namedArgsIter = a.hashIterator(); while (namedArgsIter.hasNext()) { LuaPai...
4750298_0
Pair<URL, Map<String, Serializable>> createParams(BufferedReader reader) throws Exception { String line = reader.readLine(); URL resourceId = null; Map<String, Serializable> params = new HashMap<String, Serializable>(); while (line != null) { line = line.trim(); if (line.length() > 0) { if (resourceId ==...
4757131_6
public String save() { // For some reason, WebTest + Tomcat causes version to be 0. Works fine on Jetty. if (user.getId() != null && user.getId() == 0) { user.setId(null); } if (user.getId() == null) { user.setVersion(null); } try { userManager.saveUser(user); } cat...
4759439_0
public static void processImage(String in, String out) throws IOException { File imageFile = new File(in); BufferedImage bufferedImage= ImageIO.read(imageFile); int width = bufferedImage.getWidth(null); int height = bufferedImage.getHeight(null); BufferedImage alphaImage = new BufferedImage((width+(...
4782751_9
public void setMethodName(String methodName) { this.methodName = methodName; }
4805389_0
public String getName() { return name; }
4810329_146
@Override public InferredType type() { Symbol calleeSymbol = calleeSymbol(); if (calleeSymbol != null) { InferredType type = getType(calleeSymbol); if (type.equals(InferredTypes.anyType()) && callee.is(Kind.QUALIFIED_EXPR)) { return getDeclaredType(callee); } return type; } return Inferred...
4812336_3
public void register(Object object) { if (object == null) { throw new NullPointerException("Object to register must not be null."); } enforcer.enforce(this); Map<Class<?>, EventProducer> foundProducers = handlerFinder.findAllProducers(object); for (Class<?> type : foundProducers.keySet()) { final Ev...
4812472_36
public static double minAbsDiag(Matrix matrix) { double min = Double.MAX_VALUE; for (int i = 0; i < matrix.getColumnDimension(); i++) { double curr = Math.abs(matrix.get(i, i)); if (min > curr) { min = curr; } } return min; }
4820146_5
public boolean CheckPassword(String password, String storedHash) { String hash = cryptPrivate(password, storedHash); MessageDigest md = null; if (hash.startsWith("*")) { // If not phpass, try some algorythms from unix crypt() if (storedHash.startsWith("$6$")) { try { md =...
4823750_0
@RequestMapping(method = RequestMethod.POST) public String handleLogin(@RequestParam String username, @RequestParam String password, HttpSession session) throws AuthenticationException { Account account = this.accountService.login(username, password); session.setAttribute(ACCOUNT_ATTRIBUTE, account); ...
4835576_9
@SuppressWarnings("unchecked") public <T> OrderedSet<T> selectMocks(OrderedSet<Object> mocks, Class<T> mockClass) { OrderedSet<T> matchingMocks = new OrderedSet<T>(); for (Object object : mocks) { if (mockClass.isAssignableFrom(object.getClass())) { matchingMocks.add((T) object); } } return matchingMocks; }
4889322_32
public Map<String, ClientActionClassInformation> resolve() { Map<String, ClientActionClassInformation> actionClasses = new HashMap<String, ClientActionClassInformation>(); Map<String, Object> foundActions = springIntegration.getActualContext().getBeansWithAnnotation(ClientActionClass.class); for (Map.Entry<Strin...
4889980_4
public static ValidatorMandatory getInstance() { return INSTANCE; }
4898786_11
synchronized void tryAcceptTask(TaskHandle taskHandle) throws IllegalStateException { tryCheckLoad(); TaskExclusivity prevExclusivity = currentExclusivity; String prevExclusiveId = currentExclusiveId; boolean canAccept = tryChangeExclusivity(taskHandle); if (canAccept) { try { taskHandle.setAccepted(); ...
4908338_0
@Override public void doBeforeRender(final HstRequest request, final HstResponse response) throws HstComponentException { HippoBean doc = getContentBean(request); if (doc == null) { log.warn("Did not find a content bean for relative content path '{}' for pathInfo '{}'", request.g...
4910671_5
private List<Result> search(Query query, Optional<Sort> sort) { IndexSearcher searcher = null; try { searcher = new IndexSearcher(DirectoryReader.open(directory)); List<Result> result = new ArrayList<>(); TopDocs topDocs = searcher.search(query, 10, sort.or(Sort.RELEVANCE)); for ...
4925395_67
@Override public void install(final Version version) { new Thread(new Runnable() { @Override public void run() { wrapped.install(version); } }).start(); }
4937246_21
static List<String> convertFileToOutput(String filepath) throws IOException { FileReader fileReader = new FileReader(filepath); BufferedReader bufferedReader = new BufferedReader(fileReader); String firstLine = bufferedReader.readLine(); Integer numberOfProblems = Integer.valueOf(firstLine); List<String> rv = ne...
4941867_5
public Set<Class<?>> getAnnotatedClasses() { return annotatedClasses; }
4946769_202
public static String completeUrlWithHttpIfProtocolIsNotHttpOrHttpsOrPropertyExpansion(String endpoint) { if (StringUtils.isNullOrEmpty(endpoint)) { return endpoint; } endpoint = endpoint.trim(); String lowerCaseEndpoint = endpoint.toLowerCase(); if (!lowerCaseEndpoint.startsWith("http://") &...
4955633_3
public static Builder builder(String previousId) { return new Builder(previousId); }
4955657_3
@Override public Set<PrimitiveImplementor<?>> getAllImplementors() { return Collections.unmodifiableSet(finder.getAllImplementors()); }
4959580_16
@Override public String isComponentScrollBarAtBottom(MarkupContainer component) { return String.format("QuickView.isComponentScrollBarAtBottom('%s');", component.getMarkupId()); }
4992906_267
@Override public List<String> getRuleChainVisits() { initializeXPathExpression(); return super.getRuleChainVisits(); }
5002457_14
public static double splitLineStringIntoPoints(LineString geom, double segmentSizeConstraint, List<Coordinate> pts) { // If the linear sound source length is inferior than half the distance between the nearest point of the sound // source and the receiver then it can be ...
5003951_0
public void write(Writer writer, Map<String, Object> stringObjectMap, Model model) throws IOException { try { final Var REQUIRE = Var.intern(RT.CLOJURE_NS, Symbol.create("require")); final Symbol REFLECTOR = Symbol.create("org.sonatype.maven.polyglot.clojure.dsl.writer"); REQUIRE.invoke(REFL...
5017081_2
@Deprecated public Slugify(boolean lowerCase) { this(); withLowerCase(lowerCase); }
5022064_10
public static float example03() { String a = "A quirky thing it is. This is a sentence."; String b = "This sentence is similar; a quirky thing it is."; StringDistance metric = with(new EuclideanDistance<String>()) .tokenize(Tokenizers.whitespace()) .build(); return metric.distance(a, b); // 2.0000 }
5054231_2
static public List<BodyPart> extractMessageAttachments(Log logger, Object content) throws MessagingException, IOException { ArrayList<BodyPart> ret = new ArrayList<BodyPart>(); if (content instanceof Multipart) { Multipart part = (Multipart) content; for (int i = 0; i < part.getCount(); i++) { ...
5054234_1
protected CharSequence getValue(String key) { CharSequence val = tagValues.get(key); if (val == null) return getDefault(key); else return val; }
5054237_27
public Integer getNumericValueForTag(String tag, String exceptionMessage) throws SyntaxException { Argument argument = retrieveArgumentIfExists(tag, exceptionMessage); if (argument == null) { return null; } return retrieveNumericValue(argument, exceptionMessage); }
5061371_1
@Override public int getTotalIPLength() { // byte 3 - 4 return this.headers.getUnsignedShort(2); }
5073742_77
@Override public String toString() { return new ToStringBuilder(this) .appendSuper(super.toString()) .append("history", history) .toString(); }
5074598_40
public void run(List<File> files) throws Exception { for (File file : files) { logger.info("processing: " + file.getPath()); try { PomWrapper wrapped = new PomWrapper(file); boolean changed = possiblyUpdateProjectVersion(wrapped) | poss...
5077412_43
public static Color fromBGR(int blue, int green, int red) throws IllegalArgumentException { return new Color(red, green, blue); }
5084932_20
@Override public List<Job> getJobsAwaitingLibraryCreation(){ List<Job> JobsAwaitingLibraryCreation = new ArrayList<Job>(); for (Job job : getActiveJobs()){ for (Sample sample: job.getSample()){ if (sampleService.isSampleAwaitingLibraryCreation(sample)){ JobsAwaitingLibraryCreation.add(job); break; } ...
5093728_1
public T run() { T result = null; if(context.hasFeature(featureName)) { result = onFeatureEnabled(); } else { result = onFeatureDisabled(); } return result; }
5094929_0
static void sum(InputStream in, PrintStream out) { try ( Scanner scanner = new Scanner(in);) { int a = scanner.nextInt(); int b = scanner.nextInt(); int s = a + b; out.print(s); } }
5104280_226
@Override public boolean satisfiesFilter(String filterCriterion) { return name.toLowerCase(Locale.getDefault()).startsWith(filterCriterion.toLowerCase()) || String.valueOf(ec_number).startsWith(filterCriterion) || String.valueOf(thayi).startsWith(filterCriterion); }
5109749_18
public static String getEnumLocalizationKey(Enum<?> e) { //Enumy zurnalovanych objektu pouzivaji klice, aby se nemusely prekladat dvakrat if (Localizable.class.isAssignableFrom(e.getClass())) return ((Localizable) e).getKey(); return new StringBuilder(e.getDeclaringClass().getName()).append(".").append(e.name...
5122021_99
@Override public JSONObject get() throws JSONException { JSONObject mergedJsonObject = new JSONObject(); for (JSONProvider jsonProvider : jsonProviderList) { JSONObject jsonObject = jsonProvider.get(); mergeInto(mergedJsonObject, jsonObject); } return mergedJsonObject; }
5123943_1
public static double zeta(double x, double q) { // * Check arguments if(x == 1.0) return Double.POSITIVE_INFINITY; if(q < 1.0) return Double.NaN; if(q <= 0.0) if(q == floor(q)) return Double.POSITIVE_INFINITY; else return Double.NaN; double s = pow(q, -x); double a = q; double b = 0.0; int i ...
5129094_1
public void addHandler(Pattern uriPattern, RequestHandler requestHandler) { LOGGER.debug("Registering pattern {}", uriPattern.pattern()); synchronized (requestHandles) { requestHandles.add(new RequestHandle(uriPattern, requestHandler)); } }
5151102_34
public BigDecimal getTimeToRepetitionInMinutes() { return new BigDecimal(timeToRepetition.orElse(0).doubleValue() / 1000 / 60); }
5158290_56
public static GEIndividual getIndividual(final GEGrammar grammar, final Phenotype phen, final Genotype genotype, final Fitness fitness) { final GEIndividual gei; grammar instanceof GEGrammar) { gei = new GEIndividual(grammar, phen, genotype, fitness); } else { throw new IllegalArgumentException(grammar+" is n...
5171172_70
public List<Put> insert(long tableId, final Row row) { return insert(tableId, row, store.getSchema(tableId).getIndices()); }
5173512_5
public void ensureVersionCompatible(final String rawVersion) throws Exception { String version = parseVersion(rawVersion); VersionScheme scheme = new GenericVersionScheme(); VersionConstraint constraint = scheme.parseVersionConstraint(VERSION_CONSTRAINT); Version _version = scheme.parseVersion(version); log.d...
5175291_2
@GET @Path("/coordinator") @Produces(MediaType.APPLICATION_JSON) public Response getAllCoordinators(@Context UriInfo uriInfo) { Predicate<CoordinatorStatus> coordinatorPredicate = CoordinatorFilterBuilder.build(uriInfo); List<CoordinatorStatus> coordinators = coordinator.getCoordinators(coordinatorPredicate); ...
5176218_4
@OnClick({R.id.original_user_icon, R.id.original_user_name}) void showUser() { unitClicks.onNext(post.getOriginalUnit()); }
5176685_4
public AqlQueryBuilder or(AqlItem... items) { if (isNotEmpty(items)) { root.putAll(AqlItem.or((Object[]) items).value()); } return this; }
5185108_32
@JsonProperty public Set<Service> getServices() { return services; }
5194874_8
public String evaluateTemplate(String templateName, Map<String, Object> bindings) { // what is this user thinking? if (templateName == null) { log.info("Template name is null"); return ""; } HL7Template template = getHl7queryService().getHL7TemplateByName(templateName); // didn't find the template, fail ea...
5203853_12
public Instance newInstance(String sourceAET, Attributes data, Attributes modified, StoreContext storeContext) throws DicomServiceException { StoreParam storeParam = storeContext.getStoreParam(); Availability rnAvailability = storeParam.getRejectionNoteAvailability(data); if (rnAvailabil...
5208272_30
public GitAddResponse add(File repositoryPath, GitAddOptions options, List<File> paths) throws IOException, JavaGitException { CheckUtilities.checkFileValidity(repositoryPath.getAbsoluteFile()); IClient client = ClientManager.getInstance().getPreferredClient(); IGitAdd gitAdd = client.getGitAddInstance(); r...
5208822_0
@Override public void execute() throws MojoExecutionException { getLog().info("Undeploying"); final CloudHubAdapter domainConnection = createDomainConnection(); domainConnection.undeploy(this.maxWaitTime); }
5210246_2
public int compareTo(Expression e) { if (this == e) return 0; if (e instanceof Parameter) { Parameter o = (Parameter) e; return order - o.order; } else { return getClass().getName().compareTo(e.getClass().getName()); } }
5212656_133
public Field replaceWithSimpleField(Field.FieldType fieldType) { int leftLength = textSelection.getText().length(); int index = textSelection.getIndex(); prepareSpanContainer(leftLength, index); Field field = null; switch (fieldType) { case DATE_FIELD: field = Fields.createDateField(spanContainer); break; ca...
5223349_1
public static String formatRequest(String url, Position position) { return formatRequest(url, position, null); }
5225735_6
public static EntityNameExtractor<?> forNamedPersistentEntity(String name) { return new NamedPersistentEntityNameExtractor(name); }
5243160_0
Fvdl parse(InputStream inputStream) throws ParserConfigurationException, SAXException, IOException { SMInputFactory inputFactory = FortifyUtils.newStaxParser(); try { SMHierarchicCursor rootC = inputFactory.rootElementCursor(inputStream); rootC.advance(); // <FVDL> SMInputCursor childCursor = rootC.ch...
5243237_3
public VersionRange range(final int... parts) { checkNotNull(parts); checkArgument(parts.length != 0); StringBuilder buff = new StringBuilder() .append("["); for (int i = 0; i < parts.length; i++) { buff.append(parts[i]); if (i + 1 < parts.length) { buff.append("."); } } buff.appe...
5244017_8
@Override public boolean matches(Map<String, Object> nodeCapability, Map<String, Object> requestedCapability) { if (nodeCapability == null || requestedCapability == null) { return false; } for (String key : requestedCapability.keySet()) { if (toConsider.contains(key)) { if (requestedCapability.get(k...
5244445_9
@NonNull public static Permutor<FeedItem> getPermutor(@NonNull SortOrder sortOrder) { Comparator<FeedItem> comparator = null; Permutor<FeedItem> permutor = null; switch (sortOrder) { case EPISODE_TITLE_A_Z: comparator = (f1, f2) -> itemTitle(f1).compareTo(itemTitle(f2)); br...
5258499_1
public HttpUrl createHttpsGatewayUrl(String gatewayUrl) throws MalformedURLException, URIException { HttpMethod method = new GetMethod(gatewayUrl); method.setQueryString("ssl=true"); String url = method.getURI().getEscapedURI(); return new HttpUrl(url); }
5264820_1
public Matrix() { }
5265034_1
public static MTEF parse(InputStream is) throws ParseException, IOException { PushbackInputStream pis = new PushbackInputStream(is); // hack - throw away 28 byte OLE header pis.read(new byte[28]); return new MTEFParser().parse(pis); }
5265087_58
@Override public List<OperationId> execute(MasterContext context, List<MasterOperation> runningOperations) throws Exception { InteractionProtocol protocol = context.getProtocol(); IndexMetaData indexMD = protocol.getIndexMD(_indexName); if (indexMD == null) {// could be undeployed in meantime LOG.info("skip b...
5279091_17
String shortName(String key) { Matcher matcher = KEY_PATTERN.matcher(key); if (!matcher.matches()) throw new IllegalArgumentException("Unexpected key: " + key); StringBuilder result = new StringBuilder(); String annotationSimpleName = matcher.group(1); if (annotationSimpleName != null) { result.append('@...
5284141_13
public static String packageNameToDirName(final String packageName) { return "/" + packageName.replace('.', '/'); }
5291703_32
public <ValueType> MutableProperty<ValueType> getProperty( PropertyDef<?, ValueType> propertyDef) { return new DomTrackingProperty<>(propertyDef); }
5294661_0
public static JSONDocTemplate build(Class<?> clazz, Set<Class<?>> jsondocObjects) { final JSONDocTemplate jsonDocTemplate = new JSONDocTemplate(); if(jsondocObjects.contains(clazz)) { try { Set<JSONDocFieldWrapper> fields = getAllDeclaredFields(clazz); for (JSONDocFieldWrapper jsondocFieldWrapper : fields)...
5312808_68
public static nfsace4[] compact(nfsace4[] acl) { int size = acl.length; if (size == 0) { return acl; } for(int i = 0; i < size; i++) { nfsace4 a = acl[i]; utf8str_mixed pricipal = a.who; int processedMask = a.access_mask.value.value; for(int j = i+1; j < size;...
5320077_16
public static String camelToUpper(String name) { StringBuilder buf = new StringBuilder(); for (int i = 0; i < name.length(); i++) { char c = name.charAt(i); if (Character.isUpperCase(c)) { buf.append('_'); } else { c = Character.toUpperCase(c); } buf.append(c); } return buf.toStr...
5346043_623
public static int distance (String str1, String str2){ return distance(Transformations.convertStringToIntArray(str1),Transformations.convertStringToIntArray(str2)); }
5346068_0
public EtagCache resetStats() { hits.set(0); misses.set(0); return this; }
5349536_0
public OHLC[] getHistoricalData(Contract contract, Date endDate, int numPeriods, int periodUnit) throws IOException { if (!(periodUnit == HistoricalDataSource.PERIOD_1_DAY || periodUnit == HistoricalDataSource.PERIOD_1_WEEK || periodUnit == HistoricalDataSource.PERIOD_1_MONTH)) throw new IllegalArgumentExcepti...
5380818_17
@VisibleForTesting @Nullable String getFilenameFromPath(@Nullable String filePath) { String filename; if (!isEmpty(filePath) && filePath.contains(File.separator) && filePath.contains(".")) { filename = filePath.substring(filePath.lastIndexOf(File.separator) + 1); } else { filename = filePath...
5402142_0
@Override public <T extends Component> T createComponent(Class<T> componentClass) { Unmanaged<T> unmanagedClass = new Unmanaged<T>(componentClass); Unmanaged.UnmanagedInstance<T> instance = unmanagedClass.newInstance(); instance.produce().inject().postConstruct(); return instance.get(); }
5402462_72
@Override public JobReport call() { start(); try { openReader(); openWriter(); setStatus(JobStatus.STARTED); while (moreRecords() && !isInterrupted()) { Batch<O> batch = readAndProcessBatch(); writeBatch(batch); } setStatus(JobStatus.STOPPI...
5405905_273
@PostConstruct public void init() { view.init(this); view.initWidgets(queryTarget.view, serverTemplateId.view, dataSource.view, dbSQL.view); queryTarget.setSelectHint(DashboardConstants.INSTANCE.remote_query_target_hint()); List<DropDownEditor.Entry> entries = Stream.of("CUSTOM", ...
5405932_0
public static InputStream lookupFile(final String filename) throws IOException { Preconditions.checkNotNull(filename, "filename"); final ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); InputStream stream = classLoader.getResourceAsStream(filename); if (stream == null) { ...
5418564_0
@Override public E set(int index, E element) { if (wrapped != null) { return wrapped.set(index, element); } throw new UnsupportedOperationException(); }
5426219_354
public int index( Experiment experiment, Map<String, Map<BioentityPropertyName, Set<String>>> bioentityIdToProperties, int batchSize) { List<SolrInputDocument> toLoad = new ArrayList<>(batchSize); int addedIntoThisBatch = 0; int addedInTotal = 0; try (SolrInputDocumentInputStream solrI...