id stringlengths 7 14 | text stringlengths 1 106k |
|---|---|
152134_47 | public void parse (Reader input, Writer output) throws Exception {
this.input = input;
this.output = output;
int i;
while (-1 != (i = input.read())) {
this.c = (char)i;
this.cnt++;
switch (this.state) {
case IN_BODY:
this.handleInBody();
break;
default:
this.handleUnknown();
break;
}
}
} |
152134_48 | public void parse (Reader input, Writer output) throws Exception {
this.input = input;
this.output = output;
int i;
while (-1 != (i = input.read())) {
this.c = (char)i;
this.cnt++;
switch (this.state) {
case IN_BODY:
this.handleInBody();
break;
default:
this.handleUnknown();
break;
}
}
} |
152134_49 | public void parse(Reader input, Writer output) throws Exception {
this.input = input;
this.output = output;
int c;
while (-1 != (c = input.read())) {
output.write(c);
}
} |
1526495_0 | public void prepareESBDeployment() throws BusNotPreparedException {
PreparerTask task = new PreparerTask();
InvokerFactory<Void> factory = new InvokerFactory<Void>();
Invoker<Void> invoker = factory.geNewInvokerInstance(TASK_NAME, task);
try {
invoker.invoke();
} catch (InvokerException e) {... |
1526495_1 | public void prepareESBDeployment() throws BusNotPreparedException {
PreparerTask task = new PreparerTask();
InvokerFactory<Void> factory = new InvokerFactory<Void>();
Invoker<Void> invoker = factory.geNewInvokerInstance(TASK_NAME, task);
try {
invoker.invoke();
} catch (InvokerException e) {... |
1526495_2 | @Override
public String proxifyService(String serviceUrl, String serviceWsdl) throws EasyESBException {
rManagementClient cli = linagoraFactory.getUserManagementClient(adminEndpoint);
ing response = null;
{
response = cli.proxify(serviceUrl, serviceWsdl);
atch (ManagementException e) {
fail("Proxifying " + serviceUr... |
1526495_3 | public void configureTopology() throws TopologyNotConfigureException {
for (DeployableService service : chor.getDeployableServices()) {
for (ServiceInstance instance : service.getInstances()) {
EasyESBNode esbNode = getESBNode(instance);
List<ServiceDependency> dependencies = service... |
1526495_4 | public void prepareDeployment() throws PrepareDeploymentFailedException {
DeploymentPrepare();
eduleHandler();
} |
1526495_5 | public DeployableService createService(DeployableServiceSpec serviceSpec) throws ServiceNotCreatedException {
{
service = new DeployableService(serviceSpec);
service.generateUUID();
atch (IllegalArgumentException e1) {
logger.error("Could not create service " + serviceSpec.getName());
throw new ServiceNotCreatedEx... |
1526495_6 | @Override
public void applyUpdate() throws UpdateActionFailedException {
decreaseAmount = currentService.getSpec().getNumberOfInstances() - newSpec.getNumberOfInstances();
viceUndeploymentPreparer undeploymentPreparer = ServiceUndeploymentPreparerFactory.getNewInstance(
rrentService, decreaseAmount);
{
undeploymentP... |
1526495_7 | public List<UpdateAction> getActions(DeployableService currentService, DeployableServiceSpec newServiceSpec) {
DeployableServiceSpec currentServiceSpec = currentService.getSpec();
List<UpdateAction> actions = new ArrayList<UpdateAction>();
logger.info("Calculating changes on service spec \nOld = " + current... |
1526495_8 | public List<UpdateAction> getActions(DeployableService currentService, DeployableServiceSpec newServiceSpec) {
DeployableServiceSpec currentServiceSpec = currentService.getSpec();
List<UpdateAction> actions = new ArrayList<UpdateAction>();
logger.info("Calculating changes on service spec \nOld = " + current... |
1526495_9 | public List<UpdateAction> getActions(DeployableService currentService, DeployableServiceSpec newServiceSpec) {
DeployableServiceSpec currentServiceSpec = currentService.getSpec();
List<UpdateAction> actions = new ArrayList<UpdateAction>();
logger.info("Calculating changes on service spec \nOld = " + current... |
152812_10 | public List<K> getKeysSortedByValue( final Comparator<V> comparator ) {
synchronized ( _map ) {
@SuppressWarnings( "unchecked" )
final
Entry<K, ManagedItem<V>>[] a = _map.entrySet().toArray( new Map.Entry[_map.size()] );
final Comparator<Entry<K, ManagedItem<V>>> c = new Comparator<E... |
152812_11 | public void clear() {
synchronized ( _map ) {
_map.clear();
}
} |
152812_12 | static int toMemcachedExpiration(final int expirationInSeconds) {
return expirationInSeconds <= THIRTY_DAYS ? expirationInSeconds : (int)(System.currentTimeMillis() / 1000) + expirationInSeconds;
} |
152812_13 | URI createURI(String redisUrl) throws URISyntaxException {
URI uri = new URI(redisUrl);
// set default port 6379 unless specified.
if (uri.getPort() < 0)
uri = new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), 6379, uri.getPath(), uri.getQuery(), uri.getFragment());
return uri;
} |
152812_14 | public List<String> getReadOnlyRequestsByFrequency() {
return _readOnlyRequests.getKeysSortedByValue( ATOMLONG_COMP );
} |
152812_15 | @Nonnull
public static MemcachedNodesManager createFor(final String memcachedNodes, final String failoverNodes, final StorageKeyFormat storageKeyFormat,
final StorageClientCallback storageClientCallback) {
if ( memcachedNodes == null || memcachedNodes.trim().isEmpty() ) {
throw new IllegalArgumentExcep... |
152812_16 | @Nonnull
public static MemcachedNodesManager createFor(final String memcachedNodes, final String failoverNodes, final StorageKeyFormat storageKeyFormat,
final StorageClientCallback storageClientCallback) {
if ( memcachedNodes == null || memcachedNodes.trim().isEmpty() ) {
throw new IllegalArgumentExcep... |
152812_17 | @Nonnull
public static MemcachedNodesManager createFor(final String memcachedNodes, final String failoverNodes, final StorageKeyFormat storageKeyFormat,
final StorageClientCallback storageClientCallback) {
if ( memcachedNodes == null || memcachedNodes.trim().isEmpty() ) {
throw new IllegalArgumentExcep... |
152812_18 | @Nonnull
public static MemcachedNodesManager createFor(final String memcachedNodes, final String failoverNodes, final StorageKeyFormat storageKeyFormat,
final StorageClientCallback storageClientCallback) {
if ( memcachedNodes == null || memcachedNodes.trim().isEmpty() ) {
throw new IllegalArgumentExcep... |
152812_19 | @Nonnull
public static MemcachedNodesManager createFor(final String memcachedNodes, final String failoverNodes, final StorageKeyFormat storageKeyFormat,
final StorageClientCallback storageClientCallback) {
if ( memcachedNodes == null || memcachedNodes.trim().isEmpty() ) {
throw new IllegalArgumentExcep... |
152812_20 | public boolean isEncodeNodeIdInSessionId() {
return _encodeNodeIdInSessionId;
} |
152812_21 | @Nonnull
public String getNodeId(final InetSocketAddress socketAddress) throws IllegalArgumentException {
if ( socketAddress == null ) {
throw new IllegalArgumentException("SocketAddress must not be null.");
}
final String result = _address2Ids.get( socketAddress );
if ( result == null ) {
throw new IllegalArgu... |
152812_22 | @CheckForNull
public String getNextPrimaryNodeId(final String nodeId) {
return _primaryNodeIds.getNextNodeId(nodeId);
} |
152812_23 | public String getNextAvailableNodeId(final String nodeId) {
String result = nodeId;
do {
result = _primaryNodeIds.getNextNodeId(result);
if(result != null && result.equals(nodeId)) {
result = null;
}
} while(result != null && !isNodeAvailable(result));
return result;
... |
152812_24 | @Nonnull
public List<InetSocketAddress> getAllMemcachedAddresses() {
return new ArrayList<InetSocketAddress>( _address2Ids.keySet() );
} |
152812_25 | @Nonnull
public SessionIdFormat getSessionIdFormat() {
return _sessionIdFormat;
} |
152812_26 | public void setNodeAvailable(@Nullable final String nodeId, final boolean available) {
if ( _nodeIdService != null ) {
_nodeIdService.setNodeAvailable(nodeId, available);
}
} |
152812_27 | public boolean isCouchbaseBucketConfig() {
return COUCHBASE_BUCKET_NODES_PATTERN.matcher(_memcachedNodes).matches();
} |
152812_28 | public List<URI> getCouchbaseBucketURIs() {
if(!isCouchbaseBucketConfig())
throw new IllegalStateException("This is not a couchbase bucket configuration.");
final List<URI> result = new ArrayList<URI>(_address2Ids.size());
final Matcher matcher = COUCHBASE_BUCKET_NODE_PATTERN.matcher(_memcachedNodes... |
152812_29 | public String changeSessionIdForTomcatFailover( @Nonnull final String sessionId, final String jvmRoute ) {
final String newSessionId = jvmRoute != null && !jvmRoute.trim().isEmpty()
? _sessionIdFormat.changeJvmRoute( sessionId, jvmRoute )
: _sessionIdFormat.stripJvmRoute(sessionId);
if (... |
152812_30 | public static Statistics create() {
return create( true );
} |
152812_31 | public void register( @Nonnull final StatsType statsType, final long value ) {
_probes.get( statsType ).register( value );
} |
152812_32 | protected String getSessionCookieName() {
return _sessionCookieName;
} |
152812_33 | @Override
public void invoke( final Request request, final Response response ) throws IOException, ServletException {
final String requestId = getURIWithQueryString( request );
if(!_enabled.get() || !_msmContext.equals(request.getContext())) {
getNext().invoke( request, response );
} else if ( _igno... |
152812_34 | @Nonnull
public String createSessionId(@Nonnull final String sessionId, @Nullable final String memcachedId) {
if ( LOG.isDebugEnabled() ) {
LOG.debug( "Creating new session id with orig id '" + sessionId + "' and memcached id '" + memcachedId + "'." );
}
if ( memcachedId == null ) {
return s... |
152812_35 | @Nonnull
public String createNewSessionId( @Nonnull final String sessionId, @Nonnull final String newMemcachedId) {
final int idxDot = sessionId.indexOf( '.' );
if ( idxDot != -1 ) {
final String plainSessionId = sessionId.substring( 0, idxDot );
final String jvmRouteWithDot = sessionId.substrin... |
152812_36 | @CheckForNull
public String extractMemcachedId( @Nonnull final String sessionId ) {
final int idxDash = sessionId.indexOf( '-' );
if ( idxDash < 0 ) {
return null;
}
final int idxDot = sessionId.indexOf( '.' );
if ( idxDot < 0 ) {
return sessionId.substring( idxDash + 1 );
} else... |
152812_37 | public boolean isValid( @Nullable final String sessionId ) {
return sessionId != null && _pattern.matcher( sessionId ).matches();
} |
152812_38 | @Nonnull
public String createBackupKey( @Nonnull final String origKey ) {
if ( origKey == null ) {
throw new IllegalArgumentException( "The origKey must not be null." );
}
return BACKUP_PREFIX + _storageKeyFormat.format(origKey);
} |
152812_39 | public boolean isBackupKey( @Nonnull final String key ) {
return key.startsWith( BACKUP_PREFIX );
} |
152812_40 | @Nonnull
public String createLockName( @Nonnull final String sessionId ) {
if ( sessionId == null ) {
throw new IllegalArgumentException( "The sessionId must not be null." );
}
return "lock:" + _storageKeyFormat.format(sessionId);
} |
152812_41 | @Nonnull
public String createValidityInfoKeyName( @Nonnull final String origKey ) {
if ( origKey == null ) {
throw new IllegalArgumentException( "The sessionId must not be null." );
}
return "validity:" + _storageKeyFormat.format(origKey);
} |
152812_42 | @CheckForNull
public String getNextNodeId( @Nonnull final String nodeId ) throws IllegalArgumentException {
final int idx = indexOf( nodeId );
if ( idx < 0 ) {
throw new IllegalArgumentException( "The given node id "+ nodeId +" is not part of this list " + toString() );
}
if ( size() == 1 ) {
... |
152812_43 | public String getAvailableNodeId( final String nodeId ) {
String result = null;
/*
* first check regular nodes
*/
result = getRandomNextNodeId( nodeId, _nodeIds );
/*
* we got no node from the first nodes list, so we must check the
* alternative node list
*/
if ( result == n... |
152812_44 | public String getAvailableNodeId( final String nodeId ) {
String result = null;
/*
* first check regular nodes
*/
result = getRandomNextNodeId( nodeId, _nodeIds );
/*
* we got no node from the first nodes list, so we must check the
* alternative node list
*/
if ( result == n... |
152812_45 | public String getAvailableNodeId( final String nodeId ) {
String result = null;
/*
* first check regular nodes
*/
result = getRandomNextNodeId( nodeId, _nodeIds );
/*
* we got no node from the first nodes list, so we must check the
* alternative node list
*/
if ( result == n... |
152812_46 | public String getAvailableNodeId( final String nodeId ) {
String result = null;
/*
* first check regular nodes
*/
result = getRandomNextNodeId( nodeId, _nodeIds );
/*
* we got no node from the first nodes list, so we must check the
* alternative node list
*/
if ( result == n... |
152812_47 | public String getAvailableNodeId( final String nodeId ) {
String result = null;
/*
* first check regular nodes
*/
result = getRandomNextNodeId( nodeId, _nodeIds );
/*
* we got no node from the first nodes list, so we must check the
* alternative node list
*/
if ( result == n... |
152812_48 | public String getAvailableNodeId( final String nodeId ) {
String result = null;
/*
* first check regular nodes
*/
result = getRandomNextNodeId( nodeId, _nodeIds );
/*
* we got no node from the first nodes list, so we must check the
* alternative node list
*/
if ( result == n... |
152812_49 | public String getAvailableNodeId( final String nodeId ) {
String result = null;
/*
* first check regular nodes
*/
result = getRandomNextNodeId( nodeId, _nodeIds );
/*
* we got no node from the first nodes list, so we must check the
* alternative node list
*/
if ( result == n... |
1529680_0 | String getJavaCommand() {
if (configuration == null) {
throw new IllegalStateException("setup not called");
}
return configuration.getJavaHome() + File.separator + "bin" + File.separator + "java";
} |
1529680_1 | public String getJavaHome() {
return javaHome;
} |
1535924_0 | static boolean isReRegisterBuiltinNodeType(Exception e) {
return
(e instanceof RepositoryException)
& (e.getMessage() != null && e.getMessage().contains("reregister built-in node type"));
} |
1535924_1 | @Override
public void start( BundleContext bundleContext ) throws Exception {
this.bundleContext = bundleContext;
if (null == activatorHelper) {
this.activatorHelper = getActivatorHelper();
}
ServiceReference configurationAdminServiceReference = bundleContext.getServiceReference(CONFIG_ADMIN_NAM... |
1535924_2 | @Override
public void start( BundleContext bundleContext ) throws Exception {
this.bundleContext = bundleContext;
if (null == activatorHelper) {
this.activatorHelper = getActivatorHelper();
}
ServiceReference configurationAdminServiceReference = bundleContext.getServiceReference(CONFIG_ADMIN_NAM... |
1535924_3 | @Override
public void start( BundleContext bundleContext ) throws Exception {
this.bundleContext = bundleContext;
if (null == activatorHelper) {
this.activatorHelper = getActivatorHelper();
}
ServiceReference configurationAdminServiceReference = bundleContext.getServiceReference(CONFIG_ADMIN_NAM... |
1535924_4 | @Override
public void stop( BundleContext bundleContext ) throws Exception {
AccessManagerFactoryTracker managerFactoryTracker = getAccessManagerFactoryTracker();
if (null != managerFactoryTracker) {
managerFactoryTracker.close();
}
} |
1535924_5 | @Override
public void stop( BundleContext bundleContext ) throws Exception {
AccessManagerFactoryTracker managerFactoryTracker = getAccessManagerFactoryTracker();
if (null != managerFactoryTracker) {
managerFactoryTracker.close();
}
} |
1535924_6 | @Override
public void serviceChanged( ServiceEvent event ) {
if (ServiceEvent.REGISTERED == event.getType()) {
getActivatorHelper().verifyConfiguration(event.getServiceReference());
bundleContext.removeServiceListener(this);
}
} |
1535924_7 | @Override
public void serviceChanged( ServiceEvent event ) {
if (ServiceEvent.REGISTERED == event.getType()) {
getActivatorHelper().verifyConfiguration(event.getServiceReference());
bundleContext.removeServiceListener(this);
}
} |
1535924_8 | File getHomeDir() {
File homeDir;
String repoHomePath = bundleContext.getProperty(SLING_REPOSITORY_HOME);
String slingHomePath = bundleContext.getProperty(SLING_HOME);
String repositoryName = getRepositoryName();
if (repoHomePath != null) {
homeDir = new File(repoHomePath, repositoryName);
... |
1535924_9 | File getHomeDir() {
File homeDir;
String repoHomePath = bundleContext.getProperty(SLING_REPOSITORY_HOME);
String slingHomePath = bundleContext.getProperty(SLING_HOME);
String repositoryName = getRepositoryName();
if (repoHomePath != null) {
homeDir = new File(repoHomePath, repositoryName);
... |
1545929_0 | static ParameterTable parse(File file) throws IOException {
LOG.debug("parsing JSON parameter table: {}", file); //$NON-NLS-1$
JsonFactory json = new JsonFactory();
json.disable(JsonParser.Feature.AUTO_CLOSE_SOURCE);
json.enable(JsonParser.Feature.ALLOW_COMMENTS);
json.enable(JsonParser.Feature.ALLO... |
1545929_1 | static ParameterTable parse(File file) throws IOException {
LOG.debug("parsing JSON parameter table: {}", file); //$NON-NLS-1$
JsonFactory json = new JsonFactory();
json.disable(JsonParser.Feature.AUTO_CLOSE_SOURCE);
json.enable(JsonParser.Feature.ALLOW_COMMENTS);
json.enable(JsonParser.Feature.ALLO... |
1545929_2 | static ParameterTable parse(File file) throws IOException {
LOG.debug("parsing JSON parameter table: {}", file); //$NON-NLS-1$
JsonFactory json = new JsonFactory();
json.disable(JsonParser.Feature.AUTO_CLOSE_SOURCE);
json.enable(JsonParser.Feature.ALLOW_COMMENTS);
json.enable(JsonParser.Feature.ALLO... |
1545929_3 | @Override
public Extension handle(String tag, String value) throws IOException {
if (tag.equals(TAG) == false) {
return null;
}
File file = new File(value);
if (file.isFile() == false) {
throw new FileNotFoundException(file.getAbsolutePath());
}
ParameterTable table = parse(file)... |
1545929_4 | @Override
public Extension handle(String tag, String value) throws IOException {
if (tag.equals(TAG) == false) {
return null;
}
File file = new File(value);
if (file.isFile() == false) {
throw new FileNotFoundException(file.getAbsolutePath());
}
ParameterTable table = parse(file)... |
1545929_5 | @Override
public boolean isAvailable(String name) {
Objects.requireNonNull(name);
return toMap().containsKey(name);
} |
1545929_6 | @Override
public String get(String name) {
Objects.requireNonNull(name);
return toMap().get(name);
} |
1545929_7 | @Override
public Set<String> getAvailable() {
return toMap().keySet();
} |
1545929_8 | @Override
public List<ParameterSet> getRows() {
List<ParameterSet> results = new ArrayList<>();
for (ParameterSet element : this) {
results.add(element);
}
return results;
} |
1545929_9 | @Override
public List<ParameterSet> getRows() {
List<ParameterSet> results = new ArrayList<>();
for (ParameterSet element : this) {
results.add(element);
}
return results;
} |
1548514_0 | @Override
public List<MethodRef> getDeclaredMethods(RubyModule clazz) {
List<MethodRef> r = new ArrayList<MethodRef>();
for (DynamicMethod m : clazz.getMethods().values()) {
// TODO: not sure if this is entirely correct
if (m.getImplementationClass()==clazz)
r.add(new RubyMethodRef(c... |
1548514_1 | @Override
public List<FieldRef> getDeclaredFields(RubyModule clazz) {
// IIUC, Ruby doesn't have statically defined instance fields
return Collections.emptyList();
} |
1548514_2 | @Override
public List<Function> getFunctions(RubyModule clazz) {
// implemented as a fallback to Java through reified class, but maybe there's a better way to do this
return new ClassDescriptor(toJavaClass(clazz)).methods;
} |
1548514_3 | public String select(Iterable<String> supported) {
float bestQ = 0;
String best = null;
for (String s : supported) {
Atom a = match(s);
if (a!= null && a.q > bestQ) {
bestQ = a.q;
best = s;
}
}
if (best==null)
throw HttpResponses.error(HttpServ... |
1548514_4 | public String select(Iterable<String> supported) {
float bestQ = 0;
String best = null;
for (String s : supported) {
Atom a = match(s);
if (a!= null && a.q > bestQ) {
bestQ = a.q;
best = s;
}
}
if (best==null)
throw HttpResponses.error(HttpServ... |
1548514_5 | public String select(Iterable<String> supported) {
float bestQ = 0;
String best = null;
for (String s : supported) {
Atom a = match(s);
if (a!= null && a.q > bestQ) {
bestQ = a.q;
best = s;
}
}
if (best==null)
throw HttpResponses.error(HttpServ... |
1548514_6 | public String select(Iterable<String> supported) {
float bestQ = 0;
String best = null;
for (String s : supported) {
Atom a = match(s);
if (a!= null && a.q > bestQ) {
bestQ = a.q;
best = s;
}
}
if (best==null)
throw HttpResponses.error(HttpServ... |
1548514_7 | public String select(Iterable<String> supported) {
float bestQ = 0;
String best = null;
for (String s : supported) {
Atom a = match(s);
if (a!= null && a.q > bestQ) {
bestQ = a.q;
best = s;
}
}
if (best==null)
throw HttpResponses.error(HttpServ... |
1548514_8 | public String select(Iterable<String> supported) {
float bestQ = 0;
String best = null;
for (String s : supported) {
Atom a = match(s);
if (a!= null && a.q > bestQ) {
bestQ = a.q;
best = s;
}
}
if (best==null)
throw HttpResponses.error(HttpServ... |
1548514_9 | public String select(Iterable<String> supported) {
float bestQ = 0;
String best = null;
for (String s : supported) {
Atom a = match(s);
if (a!= null && a.q > bestQ) {
bestQ = a.q;
best = s;
}
}
if (best==null)
throw HttpResponses.error(HttpServ... |
1549503_0 | public ExpiryPolicy getExpiryPolicy() {
return expiryPolicy;
} |
1549503_1 | @Override
public <T> T unwrap(final Class<T> clazz) {
if(clazz.isAssignableFrom(getClass())) {
return clazz.cast(this);
}
if(clazz.isAssignableFrom(cacheManager.getClass())) {
return clazz.cast(cacheManager);
}
throw new IllegalArgumentException();
} |
1549503_2 | @Override
public <T> T unwrap(final Class<T> clazz) {
if(clazz.isAssignableFrom(getClass())) {
return clazz.cast(this);
}
if(clazz.isAssignableFrom(cacheManager.getClass())) {
return clazz.cast(cacheManager);
}
throw new IllegalArgumentException();
} |
1549503_3 | @Override
public CacheManager getCacheManager() {
return getCacheManager(getDefaultURI(), getDefaultClassLoader());
} |
1549503_4 | @Override
public CacheManager getCacheManager() {
return getCacheManager(getDefaultURI(), getDefaultClassLoader());
} |
1549503_5 | void shutdown(final JCacheManager jCacheManager) {
synchronized (cacheManagers) {
final ConcurrentMap<URI, JCacheManager> map = cacheManagers.get(jCacheManager.getClassLoader());
if(map != null && map.remove(jCacheManager.getURI()) != null) {
jCacheManager.shutdown();
}
}
} |
1551432_0 | static public Set<String> getNames(InputStream is) throws IOException {
Set<String> names = new HashSet<String>();
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(is));
ZipEntry entry;
while ((entry = zis.getNextEntry()) != null) {
if (!entry.isDirectory())
names.add(entry.getName());
}
zis.c... |
1551432_1 | static public Set<String> getApacheNames(InputStream is) throws IOException, ArchiveException {
Set<String> names = new HashSet<String>();
ArchiveInputStream ais = new ArchiveStreamFactory().createArchiveInputStream(is);
ArchiveEntry entry;
while ((entry = ais.getNextEntry()) != null) {
if (!entry.isDirectory())
... |
1551432_2 | public void parseMets(String folderName, String metsName) throws DocumentException, IOException {
SAXReader saxReader = new SAXReader();
Document metsDoc = saxReader.read(new InputStreamReader(new FileInputStream(folderName+metsName), "UTF-8"));
Element rootElt = metsDoc.getRootElement();
otElt.addNa... |
1551432_3 | public static List<String> getFileLisst() {
if (fileList.size() == 0)
FileListLoader.load();
return fileList;
} |
1551432_4 | public static int getNumOfPages(String pdfFile) throws IOException {
PDDocument pdf = PDDocument.load(new File(pdfFile));
int count = pdf.getNumberOfPages();
pdf.close();
return count;
} |
1553760_0 | @Override
public String generateId(String headingText) {
String id = headingText.toLowerCase(Locale.getDefault());
id = id.replaceAll("[^a-z0-9_-]", "-"); //$NON-NLS-1$//$NON-NLS-2$
CharMatcher hyphenMatcher = CharMatcher.is('-');
id = hyphenMatcher.trimFrom(hyphenMatcher.collapseFrom(id, '-'));
return id;
} |
1553760_1 | @Override
public String generateId(String headingText) {
String id = headingText.toLowerCase(Locale.getDefault());
id = id.replaceAll("[^a-z0-9_-]", "-"); //$NON-NLS-1$//$NON-NLS-2$
CharMatcher hyphenMatcher = CharMatcher.is('-');
id = hyphenMatcher.trimFrom(hyphenMatcher.collapseFrom(id, '-'));
return id;
} |
1553760_2 | @Override
public String generateId(String headingText) {
String id = headingText.toLowerCase(Locale.getDefault());
id = id.replaceAll("[^a-z0-9_-]", "-"); //$NON-NLS-1$//$NON-NLS-2$
CharMatcher hyphenMatcher = CharMatcher.is('-');
id = hyphenMatcher.trimFrom(hyphenMatcher.collapseFrom(id, '-'));
return id;
} |
1553760_3 | @Override
public String generateId(String headingText) {
String id = headingText.toLowerCase(Locale.getDefault());
id = id.replaceAll("[^a-z0-9_-]", "-"); //$NON-NLS-1$//$NON-NLS-2$
CharMatcher hyphenMatcher = CharMatcher.is('-');
id = hyphenMatcher.trimFrom(hyphenMatcher.collapseFrom(id, '-'));
return id;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.