repo stringlengths 1 191 ⌀ | file stringlengths 23 351 | code stringlengths 0 5.32M | file_length int64 0 5.32M | avg_line_length float64 0 2.9k | max_line_length int64 0 288k | extension_type stringclasses 1 value |
|---|---|---|---|---|---|---|
codeql | codeql-master/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/multipart/MultipartFile.java | /*
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.multipart;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import org.springframework.core.io.InputStreamSource;
import org.springframework.core.io.Resource;
import org.springframework.lang.Nullable;
/**
* A representation of an uploaded file received in a multipart request.
*
* <p>The file contents are either stored in memory or temporarily on disk.
* In either case, the user is responsible for copying file contents to a
* session-level or persistent store as and if desired. The temporary storage
* will be cleared at the end of request processing.
*
* @author Juergen Hoeller
* @author Trevor D. Cook
* @since 29.09.2003
* @see org.springframework.web.multipart.MultipartHttpServletRequest
* @see org.springframework.web.multipart.MultipartResolver
*/
public interface MultipartFile extends InputStreamSource {
/**
* Return the name of the parameter in the multipart form.
* @return the name of the parameter (never {@code null} or empty)
*/
String getName();
/**
* Return the original filename in the client's filesystem.
* <p>This may contain path information depending on the browser used,
* but it typically will not with any other than Opera.
* @return the original filename, or the empty String if no file has been chosen
* in the multipart form, or {@code null} if not defined or not available
* @see org.apache.commons.fileupload.FileItem#getName()
* @see org.springframework.web.multipart.commons.CommonsMultipartFile#setPreserveFilename
*/
@Nullable
String getOriginalFilename();
/**
* Return the content type of the file.
* @return the content type, or {@code null} if not defined
* (or no file has been chosen in the multipart form)
*/
@Nullable
String getContentType();
/**
* Return whether the uploaded file is empty, that is, either no file has
* been chosen in the multipart form or the chosen file has no content.
*/
boolean isEmpty();
/**
* Return the size of the file in bytes.
* @return the size of the file, or 0 if empty
*/
long getSize();
/**
* Return the contents of the file as an array of bytes.
* @return the contents of the file as bytes, or an empty byte array if empty
* @throws IOException in case of access errors (if the temporary store fails)
*/
byte[] getBytes() throws IOException;
/**
* Return an InputStream to read the contents of the file from.
* <p>The user is responsible for closing the returned stream.
* @return the contents of the file as stream, or an empty stream if empty
* @throws IOException in case of access errors (if the temporary store fails)
*/
@Override
InputStream getInputStream() throws IOException;
/**
* Return a Resource representation of this MultipartFile. This can be used
* as input to the {@code RestTemplate} or the {@code WebClient} to expose
* content length and the filename along with the InputStream.
* @return this MultipartFile adapted to the Resource contract
* @since 5.1
*/
Resource getResource();
/**
* Transfer the received file to the given destination file.
* <p>This may either move the file in the filesystem, copy the file in the
* filesystem, or save memory-held contents to the destination file. If the
* destination file already exists, it will be deleted first.
* <p>If the target file has been moved in the filesystem, this operation
* cannot be invoked again afterwards. Therefore, call this method just once
* in order to work with any storage mechanism.
* <p><b>NOTE:</b> Depending on the underlying provider, temporary storage
* may be container-dependent, including the base directory for relative
* destinations specified here (e.g. with Servlet 3.0 multipart handling).
* For absolute destinations, the target file may get renamed/moved from its
* temporary location or newly copied, even if a temporary copy already exists.
* @param dest the destination file (typically absolute)
* @throws IOException in case of reading or writing errors
* @throws IllegalStateException if the file has already been moved
* in the filesystem and is not available anymore for another transfer
* @see org.apache.commons.fileupload.FileItem#write(File)
* @see javax.servlet.http.Part#write(String)
*/
void transferTo(File dest) throws IOException, IllegalStateException;
/**
* Transfer the received file to the given destination file.
* <p>The default implementation simply copies the file input stream.
* @since 5.1
* @see #getInputStream()
* @see #transferTo(File)
*/
void transferTo(Path dest) throws IOException, IllegalStateException;
}
| 5,341 | 37.431655 | 91 | java |
codeql | codeql-master/java/ql/test/stubs/springframework-5.2.3/org/springframework/util/MultiValueMap.java | /*
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.util;
import java.util.List;
import java.util.Map;
import org.springframework.lang.Nullable;
/**
* Extension of the {@code Map} interface that stores multiple values.
*
* @author Arjen Poutsma
* @since 3.0
* @param <K> the key type
* @param <V> the value element type
*/
public interface MultiValueMap<K, V> extends Map<K, List<V>> {
/**
* Return the first value for the given key.
* @param key the key
* @return the first value for the specified key, or {@code null} if none
*/
@Nullable
V getFirst(K key);
/**
* Add the given single value to the current list of values for the given key.
* @param key the key
* @param value the value to be added
*/
void add(K key, @Nullable V value);
/**
* Add all the values of the given list to the current list of values for the given key.
* @param key they key
* @param values the values to be added
* @since 5.0
*/
void addAll(K key, List<? extends V> values);
/**
* Add all the values of the given {@code MultiValueMap} to the current values.
* @param values the values to be added
* @since 5.0
*/
void addAll(MultiValueMap<K, V> values);
/**
* {@link #add(Object, Object) Add} the given value, only when the map does not
* {@link #containsKey(Object) contain} the given key.
* @param key the key
* @param value the value to be added
* @since 5.2
*/
default void addIfAbsent(K key, @Nullable V value) {
if (!containsKey(key)) {
add(key, value);
}
}
/**
* Set the given single value under the given key.
* @param key the key
* @param value the value to set
*/
void set(K key, @Nullable V value);
/**
* Set the given values under.
* @param values the values.
*/
void setAll(Map<K, V> values);
/**
* Return a {@code Map} with the first values contained in this {@code MultiValueMap}.
* @return a single value representation of this map
*/
Map<K, V> toSingleValueMap();
}
| 2,571 | 25.515464 | 89 | java |
codeql | codeql-master/java/ql/test/stubs/springframework-5.2.3/org/springframework/context/ApplicationEventPublisher.java | package org.springframework.context;
@FunctionalInterface
public interface ApplicationEventPublisher {
void publishEvent(Object event);
}
| 141 | 19.285714 | 44 | java |
codeql | codeql-master/java/ql/test/stubs/springframework-5.2.3/org/springframework/context/ApplicationContext.java | package org.springframework.context;
import org.springframework.beans.factory.HierarchicalBeanFactory;
import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.core.env.EnvironmentCapable;
import org.springframework.core.io.support.ResourcePatternResolver;
public interface ApplicationContext extends EnvironmentCapable, ListableBeanFactory, HierarchicalBeanFactory,
MessageSource, ApplicationEventPublisher, ResourcePatternResolver {}
| 472 | 46.3 | 109 | java |
codeql | codeql-master/java/ql/test/stubs/springframework-5.2.3/org/springframework/context/MessageSource.java | package org.springframework.context;
public interface MessageSource {}
| 72 | 17.25 | 36 | java |
codeql | codeql-master/java/ql/test/stubs/springframework-5.2.3/org/springframework/boot/security/servlet/ApplicationContextRequestMatcher.java | package org.springframework.boot.security.servlet;
import org.springframework.security.web.util.matcher.RequestMatcher;
public abstract class ApplicationContextRequestMatcher<C> implements RequestMatcher {}
| 209 | 34 | 86 | java |
codeql | codeql-master/java/ql/test/stubs/springframework-5.2.3/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequest.java | package org.springframework.boot.actuate.autoconfigure.security.servlet;
import org.springframework.boot.security.servlet.ApplicationContextRequestMatcher;
import org.springframework.web.context.WebApplicationContext;
public final class EndpointRequest {
public static EndpointRequestMatcher toAnyEndpoint() {
return null;
}
public static EndpointRequestMatcher to(String... endpoints) {
return null;
}
public static final class EndpointRequestMatcher extends AbstractRequestMatcher {}
private abstract static class AbstractRequestMatcher
extends ApplicationContextRequestMatcher<WebApplicationContext> {}
}
| 632 | 30.65 | 84 | java |
codeql | codeql-master/java/ql/test/stubs/springframework-5.2.3/org/springframework/jndi/JndiTemplate.java | package org.springframework.jndi;
import java.util.Properties;
import javax.naming.NamingException;
public class JndiTemplate {
public JndiTemplate() {}
public JndiTemplate(Properties environment) {}
public Object lookup(final String name) throws NamingException {
return new Object();
}
@SuppressWarnings("unchecked")
public <T> T lookup(String name, Class<T> requiredType) throws NamingException {
return (T) new Object();
}
public void setEnvironment(Properties environment) {}
}
| 503 | 21.909091 | 81 | java |
codeql | codeql-master/java/ql/test/stubs/springframework-5.2.3/org/springframework/stereotype/Indexed.java | package org.springframework.stereotype;
import java.lang.annotation.*;
@Target(value=ElementType.TYPE)
@Retention(value=RetentionPolicy.RUNTIME)
@Documented
public @interface Indexed { }
| 189 | 20.111111 | 41 | java |
codeql | codeql-master/java/ql/test/stubs/springframework-5.2.3/org/springframework/stereotype/Component.java | package org.springframework.stereotype;
import java.lang.annotation.*;
@Target(value=ElementType.TYPE)
@Retention(value=RetentionPolicy.RUNTIME)
@Documented
@Indexed
public @interface Component { }
| 200 | 19.1 | 41 | java |
codeql | codeql-master/java/ql/test/stubs/springframework-5.2.3/org/springframework/stereotype/Controller.java | package org.springframework.stereotype;
import java.lang.annotation.*;
@Target(value=ElementType.TYPE)
@Retention(value=RetentionPolicy.RUNTIME)
@Documented
@Component
public @interface Controller { }
| 203 | 19.4 | 41 | java |
codeql | codeql-master/java/ql/test/stubs/springframework-5.2.3/org/springframework/beans/factory/ListableBeanFactory.java | package org.springframework.beans.factory;
public interface ListableBeanFactory extends BeanFactory {}
| 104 | 25.25 | 59 | java |
codeql | codeql-master/java/ql/test/stubs/springframework-5.2.3/org/springframework/beans/factory/BeanFactory.java | package org.springframework.beans.factory;
public interface BeanFactory {}
| 76 | 18.25 | 42 | java |
codeql | codeql-master/java/ql/test/stubs/springframework-5.2.3/org/springframework/beans/factory/InitializingBean.java | package org.springframework.beans.factory;
public interface InitializingBean {} | 80 | 26 | 42 | java |
codeql | codeql-master/java/ql/test/stubs/springframework-5.2.3/org/springframework/beans/factory/HierarchicalBeanFactory.java | package org.springframework.beans.factory;
public interface HierarchicalBeanFactory extends BeanFactory {}
| 108 | 26.25 | 63 | java |
codeql | codeql-master/java/ql/test/stubs/junit-jupiter-api-5.2.0/org/junit/jupiter/api/Test.java | /*
* Copyright 2015-2018 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
* accompanies this distribution and is available at
*
* http://www.eclipse.org/legal/epl-v20.html
*/
/*
* MODIFIED version of junit-jupiter-api 5.2.0 as available at
* https://search.maven.org/classic/remotecontent?filepath=org/junit/jupiter/junit-jupiter-api/5.2.0/junit-jupiter-api-5.2.0-sources.jar
* Only parts of this file have been retained for test purposes.
*/
package org.junit.jupiter.api;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Test {
}
| 959 | 31 | 138 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/HeaderIterator.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HeaderIterator.java $
* $Revision: 581981 $
* $Date: 2007-10-04 11:26:26 -0700 (Thu, 04 Oct 2007) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http;
import java.util.Iterator;
/**
* A type-safe iterator for {@link Header Header} objects.
*
* @version $Revision: 581981 $
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public interface HeaderIterator extends Iterator {
/**
* Indicates whether there is another header in this iteration.
*
* @return <code>true</code> if there is another header, <code>false</code>
* otherwise
*/
boolean hasNext();
/**
* Obtains the next header from this iteration. This method should only be
* called while {@link #hasNext hasNext} is true.
*
* @return the next header in this iteration
*/
Header nextHeader();
}
| 2,335 | 34.938462 | 138 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/NameValuePair.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/NameValuePair.java $
* $Revision: 496070 $
* $Date: 2007-01-14 04:18:34 -0800 (Sun, 14 Jan 2007) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http;
/**
* A simple class encapsulating an attribute/value pair.
* <p>
* This class comforms to the generic grammar and formatting rules outlined in
* the <a href=
* "http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2">Section
* 2.2</a> and <a href=
* "http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6">Section
* 3.6</a> of <a href="http://www.w3.org/Protocols/rfc2616/rfc2616.txt">RFC
* 2616</a>
* </p>
* <h>2.2 Basic Rules</h>
* <p>
* The following rules are used throughout this specification to describe basic
* parsing constructs. The US-ASCII coded character set is defined by ANSI
* X3.4-1986.
* </p>
*
* <pre>
* OCTET = <any 8-bit sequence of data>
* CHAR = <any US-ASCII character (octets 0 - 127)>
* UPALPHA = <any US-ASCII uppercase letter "A".."Z">
* LOALPHA = <any US-ASCII lowercase letter "a".."z">
* ALPHA = UPALPHA | LOALPHA
* DIGIT = <any US-ASCII digit "0".."9">
* CTL = <any US-ASCII control character
* (octets 0 - 31) and DEL (127)>
* CR = <US-ASCII CR, carriage return (13)>
* LF = <US-ASCII LF, linefeed (10)>
* SP = <US-ASCII SP, space (32)>
* HT = <US-ASCII HT, horizontal-tab (9)>
* <"> = <US-ASCII double-quote mark (34)>
* </pre>
* <p>
* Many HTTP/1.1 header field values consist of words separated by LWS or
* special characters. These special characters MUST be in a quoted string to be
* used within a parameter value (as defined in section 3.6).
* <p>
*
* <pre>
* token = 1*<any CHAR except CTLs or separators>
* separators = "(" | ")" | "<" | ">" | "@"
* | "," | ";" | ":" | "\" | <">
* | "/" | "[" | "]" | "?" | "="
* | "{" | "}" | SP | HT
* </pre>
* <p>
* A string of text is parsed as a single word if it is quoted using
* double-quote marks.
* </p>
*
* <pre>
* quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
* qdtext = <any TEXT except <">>
* </pre>
* <p>
* The backslash character ("\") MAY be used as a single-character quoting
* mechanism only within quoted-string and comment constructs.
* </p>
*
* <pre>
* quoted-pair = "\" CHAR
* </pre>
*
* <h>3.6 Transfer Codings</h>
* <p>
* Parameters are in the form of attribute/value pairs.
* </p>
*
* <pre>
* parameter = attribute "=" value
* attribute = token
* value = token | quoted-string
* </pre>
*
* @author <a href="mailto:oleg at ural.com">Oleg Kalnichevski</a>
*
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public interface NameValuePair {
String getName();
String getValue();
}
| 4,455 | 34.648 | 137 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/RequestLine.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/RequestLine.java $
* $Revision: 573864 $
* $Date: 2007-09-08 08:53:25 -0700 (Sat, 08 Sep 2007) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http;
/**
* The first line of an {@link HttpRequest HttpRequest}. It contains the method,
* URI, and HTTP version of the request. For details, see RFC 2616.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision: 573864 $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public interface RequestLine {
String getMethod();
ProtocolVersion getProtocolVersion();
String getUri();
}
| 2,100 | 34.610169 | 135 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/HttpEntity.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpEntity.java $
* $Revision: 645824 $
* $Date: 2008-04-08 03:12:41 -0700 (Tue, 08 Apr 2008) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* An entity that can be sent or received with an HTTP message. Entities can be
* found in some {@link HttpEntityEnclosingRequest requests} and in
* {@link HttpResponse responses}, where they are optional.
* <p>
* In some places, the JavaDoc distinguishes three kinds of entities, depending
* on where their {@link #getContent content} originates:
* <ul>
* <li><b>streamed</b>: The content is received from a stream, or generated on
* the fly. In particular, this category includes entities being received from a
* {@link HttpConnection connection}. {@link #isStreaming Streamed} entities are
* generally not {@link #isRepeatable repeatable}.</li>
* <li><b>self-contained</b>: The content is in memory or obtained by means that
* are independent from a connection or other entity. Self-contained entities
* are generally {@link #isRepeatable repeatable}.</li>
* <li><b>wrapping</b>: The content is obtained from another entity.</li>
* </ul>
* This distinction is important for connection management with incoming
* entities. For entities that are created by an application and only sent using
* the HTTP components framework, the difference between streamed and
* self-contained is of little importance. In that case, it is suggested to
* consider non-repeatable entities as streamed, and those that are repeatable
* (without a huge effort) as self-contained.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision: 645824 $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public interface HttpEntity {
/**
* Tells if the entity is capable to produce its data more than once. A
* repeatable entity's getContent() and writeTo(OutputStream) methods can be
* called more than once whereas a non-repeatable entity's can not.
*
* @return true if the entity is repeatable, false otherwise.
*/
boolean isRepeatable();
/**
* Tells about chunked encoding for this entity. The primary purpose of this
* method is to indicate whether chunked encoding should be used when the entity
* is sent. For entities that are received, it can also indicate whether the
* entity was received with chunked encoding. <br/>
* The behavior of wrapping entities is implementation dependent, but should
* respect the primary purpose.
*
* @return <code>true</code> if chunked encoding is preferred for this entity,
* or <code>false</code> if it is not
*/
boolean isChunked();
/**
* Tells the length of the content, if known.
*
* @return the number of bytes of the content, or a negative number if unknown.
* If the content length is known but exceeds
* {@link java.lang.Long#MAX_VALUE Long.MAX_VALUE}, a negative number is
* returned.
*/
long getContentLength();
/**
* Obtains the Content-Type header, if known. This is the header that should be
* used when sending the entity, or the one that was received with the entity.
* It can include a charset attribute.
*
* @return the Content-Type header for this entity, or <code>null</code> if the
* content type is unknown
*/
Header getContentType();
/**
* Obtains the Content-Encoding header, if known. This is the header that should
* be used when sending the entity, or the one that was received with the
* entity. Wrapping entities that modify the content encoding should adjust this
* header accordingly.
*
* @return the Content-Encoding header for this entity, or <code>null</code> if
* the content encoding is unknown
*/
Header getContentEncoding();
/**
* Creates a new InputStream object of the entity. It is a programming error to
* return the same InputStream object more than once. Entities that are not
* {@link #isRepeatable repeatable} will throw an exception if this method is
* called multiple times.
*
* @return a new input stream that returns the entity data.
*
* @throws IOException if the stream could not be created
* @throws IllegalStateException if this entity is not repeatable and the stream
* has already been obtained previously
*/
InputStream getContent() throws IOException, IllegalStateException;
/**
* Writes the entity content to the output stream.
*
* @param outstream the output stream to write entity content to
*
* @throws IOException if an I/O error occurs
*/
void writeTo(OutputStream outstream) throws IOException;
/**
* Tells whether this entity depends on an underlying stream. Streamed entities
* should return <code>true</code> until the content has been consumed,
* <code>false</code> afterwards. Self-contained entities should return
* <code>false</code>. Wrapping entities should delegate this call to the
* wrapped entity. <br/>
* The content of a streamed entity is consumed when the stream returned by
* {@link #getContent getContent} has been read to EOF, or after
* {@link #consumeContent consumeContent} has been called. If a streamed entity
* can not detect whether the stream has been read to EOF, it should return
* <code>true</code> until {@link #consumeContent consumeContent} is called.
*
* @return <code>true</code> if the entity content is streamed and not yet
* consumed, <code>false</code> otherwise
*/
boolean isStreaming(); // don't expect an exception here
/**
* TODO: The name of this method is misnomer. It will be renamed to #finish() in
* the next major release. <br/>
* This method is called to indicate that the content of this entity is no
* longer required. All entity implementations are expected to release all
* allocated resources as a result of this method invocation. Content streaming
* entities are also expected to dispose of the remaining content, if any.
* Wrapping entities should delegate this call to the wrapped entity. <br/>
* This method is of particular importance for entities being received from a
* {@link HttpConnection connection}. The entity needs to be consumed completely
* in order to re-use the connection with keep-alive.
*
* @throws IOException if an I/O error occurs. This indicates that connection
* keep-alive is not possible.
*/
void consumeContent() throws IOException;
} // interface HttpEntity
| 8,356 | 43.68984 | 134 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/HttpMessage.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpMessage.java $
* $Revision: 610823 $
* $Date: 2008-01-10 07:53:53 -0800 (Thu, 10 Jan 2008) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http;
import org.apache.http.params.HttpParams;
/**
* A generic HTTP message.
* Holds what is common between requests and responses.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision: 610823 $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead.
* Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a>
* for further details.
*/
@Deprecated
public interface HttpMessage {
/**
* Returns the protocol version this message is compatible with.
*/
ProtocolVersion getProtocolVersion();
/**
* Checks if a certain header is present in this message. Header values are
* ignored.
*
* @param name the header name to check for.
* @return true if at least one header with this name is present.
*/
boolean containsHeader(String name);
/**
* Returns all the headers with a specified name of this message. Header values
* are ignored. Headers are orderd in the sequence they will be sent over a
* connection.
*
* @param name the name of the headers to return.
* @return the headers whose name property equals <code>name</code>.
*/
Header[] getHeaders(String name);
/**
* Returns the first header with a specified name of this message. Header
* values are ignored. If there is more than one matching header in the
* message the first element of {@link #getHeaders(String)} is returned.
* If there is no matching header in the message <code>null</code> is
* returned.
*
* @param name the name of the header to return.
* @return the first header whose name property equals <code>name</code>
* or <code>null</code> if no such header could be found.
*/
Header getFirstHeader(String name);
/**
* Returns the last header with a specified name of this message. Header values
* are ignored. If there is more than one matching header in the message the
* last element of {@link #getHeaders(String)} is returned. If there is no
* matching header in the message <code>null</code> is returned.
*
* @param name the name of the header to return.
* @return the last header whose name property equals <code>name</code>.
* or <code>null</code> if no such header could be found.
*/
Header getLastHeader(String name);
/**
* Returns all the headers of this message. Headers are orderd in the sequence
* they will be sent over a connection.
*
* @return all the headers of this message
*/
Header[] getAllHeaders();
/**
* Adds a header to this message. The header will be appended to the end of
* the list.
*
* @param header the header to append.
*/
void addHeader(Header header);
/**
* Adds a header to this message. The header will be appended to the end of
* the list.
*
* @param name the name of the header.
* @param value the value of the header.
*/
void addHeader(String name, String value);
/**
* Overwrites the first header with the same name. The new header will be appended to
* the end of the list, if no header with the given name can be found.
*
* @param header the header to set.
*/
void setHeader(Header header);
/**
* Overwrites the first header with the same name. The new header will be appended to
* the end of the list, if no header with the given name can be found.
*
* @param name the name of the header.
* @param value the value of the header.
*/
void setHeader(String name, String value);
/**
* Overwrites all the headers in the message.
*
* @param headers the array of headers to set.
*/
void setHeaders(Header[] headers);
/**
* Removes a header from this message.
*
* @param header the header to remove.
*/
void removeHeader(Header header);
/**
* Removes all headers with a certain name from this message.
*
* @param name The name of the headers to remove.
*/
void removeHeaders(String name);
/**
* Returns an iterator of all the headers.
*
* @return Iterator that returns Header objects in the sequence they are
* sent over a connection.
*/
HeaderIterator headerIterator();
/**
* Returns an iterator of the headers with a given name.
*
* @param name the name of the headers over which to iterate, or
* <code>null</code> for all headers
*
* @return Iterator that returns Header objects with the argument name
* in the sequence they are sent over a connection.
*/
HeaderIterator headerIterator(String name);
/**
* Returns the parameters effective for this message as set by
* {@link #setParams(HttpParams)}.
*/
HttpParams getParams();
/**
* Provides parameters to be used for the processing of this message.
* @param params the parameters
*/
void setParams(HttpParams params);
}
| 6,642 | 32.720812 | 135 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/Header.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/Header.java $
* $Revision: 569636 $
* $Date: 2007-08-25 00:34:47 -0700 (Sat, 25 Aug 2007) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http;
/**
* Represents an HTTP header field.
*
* <p>
* The HTTP header fields follow the same generic format as that given in
* Section 3.1 of RFC 822. Each header field consists of a name followed by a
* colon (":") and the field value. Field names are case-insensitive. The field
* value MAY be preceded by any amount of LWS, though a single SP is preferred.
*
* <pre>
* message-header = field-name ":" [ field-value ]
* field-name = token
* field-value = *( field-content | LWS )
* field-content = <the OCTETs making up the field-value
* and consisting of either *TEXT or combinations
* of token, separators, and quoted-string>
* </pre>
*
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
* @version $Revision: 569636 $
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public interface Header {
String getName();
String getValue();
HeaderElement[] getElements() throws ParseException;
}
| 2,718 | 37.295775 | 130 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/HeaderElementIterator.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HeaderElementIterator.java $
* $Revision: 584542 $
* $Date: 2007-10-14 06:29:34 -0700 (Sun, 14 Oct 2007) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http;
import java.util.Iterator;
/**
* A type-safe iterator for {@link HeaderElement HeaderElement} objects.
*
* @version $Revision: 584542 $
*
* @deprecated Please use {@link java.net.URL#openConnection} instead.
* Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a>
* for further details.
*/
@Deprecated
public interface HeaderElementIterator extends Iterator {
/**
* Indicates whether there is another header element in this
* iteration.
*
* @return <code>true</code> if there is another header element,
* <code>false</code> otherwise
*/
boolean hasNext();
/**
* Obtains the next header element from this iteration.
* This method should only be called while {@link #hasNext hasNext}
* is true.
*
* @return the next header element in this iteration
*/
HeaderElement nextElement();
}
| 2,402 | 34.865672 | 145 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/HeaderElement.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HeaderElement.java $
* $Revision: 569828 $
* $Date: 2007-08-26 08:49:38 -0700 (Sun, 26 Aug 2007) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http;
/**
* One element of an HTTP {@link Header header} value.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
*
* <!-- empty lines above to avoid 'svn diff' context problems -->
* @version $Revision: 569828 $ $Date: 2007-08-26 08:49:38 -0700 (Sun, 26 Aug
* 2007) $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public interface HeaderElement {
String getName();
String getValue();
NameValuePair[] getParameters();
NameValuePair getParameterByName(String name);
int getParameterCount();
NameValuePair getParameter(int index);
}
| 2,274 | 33.469697 | 137 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/HttpRequest.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpRequest.java $
* $Revision: 528428 $
* $Date: 2007-04-13 03:26:04 -0700 (Fri, 13 Apr 2007) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http;
/**
* An HTTP request.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision: 528428 $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public interface HttpRequest extends HttpMessage {
/**
* Returns the request line of this request.
*
* @return the request line.
*/
RequestLine getRequestLine();
}
| 2,042 | 33.627119 | 135 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/ProtocolVersion.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/ProtocolVersion.java $
* $Revision: 609106 $
* $Date: 2008-01-05 01:15:42 -0800 (Sat, 05 Jan 2008) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http;
import java.io.Serializable;
/**
* Represents a protocol version, as specified in RFC 2616. RFC 2616 specifies
* only HTTP versions, like "HTTP/1.1" and "HTTP/1.0". RFC 3261 specifies a
* message format that is identical to HTTP except for the protocol name. It
* defines a protocol version "SIP/2.0". There are some nitty-gritty differences
* between the interpretation of versions in HTTP and SIP. In those cases, HTTP
* takes precedence.
* <p>
* This class defines a protocol version as a combination of protocol name,
* major version number, and minor version number. Note that {@link #equals} and
* {@link #hashCode} are defined as final here, they cannot be overridden in
* derived classes.
*
* @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
*
* @version $Revision: 609106 $
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public class ProtocolVersion implements Serializable, Cloneable {
/**
* Create a protocol version designator.
*
* @param protocol the name of the protocol, for example "HTTP"
* @param major the major version number of the protocol
* @param minor the minor version number of the protocol
*/
public ProtocolVersion(String protocol, int major, int minor) {
}
/**
* Returns the name of the protocol.
*
* @return the protocol name
*/
public final String getProtocol() {
return null;
}
/**
* Returns the major version number of the protocol.
*
* @return the major version number.
*/
public final int getMajor() {
return -1;
}
/**
* Returns the minor version number of the HTTP protocol.
*
* @return the minor version number.
*/
public final int getMinor() {
return -1;
}
/**
* Obtains a specific version of this protocol. This can be used by derived
* classes to instantiate themselves instead of the base class, and to define
* constants for commonly used versions. <br/>
* The default implementation in this class returns <code>this</code> if the
* version matches, and creates a new {@link ProtocolVersion} otherwise.
*
* @param major the major version
* @param minor the minor version
*
* @return a protocol version with the same protocol name and the argument
* version
*/
public ProtocolVersion forVersion(int major, int minor) {
return null;
}
/**
* Obtains a hash code consistent with {@link #equals}.
*
* @return the hashcode of this protocol version
*/
public final int hashCode() {
return -1;
}
/**
* Checks equality of this protocol version with an object. The object is equal
* if it is a protocl version with the same protocol name, major version number,
* and minor version number. The specific class of the object is <i>not</i>
* relevant, instances of derived classes with identical attributes are equal to
* instances of the base class and vice versa.
*
* @param obj the object to compare with
*
* @return <code>true</code> if the argument is the same protocol version,
* <code>false</code> otherwise
*/
public final boolean equals(Object obj) {
return false;
}
/**
* Checks whether this protocol can be compared to another one. Only protocol
* versions with the same protocol name can be {@link #compareToVersion
* compared}.
*
* @param that the protocol version to consider
*
* @return <code>true</code> if {@link #compareToVersion compareToVersion} can
* be called with the argument, <code>false</code> otherwise
*/
public boolean isComparable(ProtocolVersion that) {
return false;
}
/**
* Compares this protocol version with another one. Only protocol versions with
* the same protocol name can be compared. This method does <i>not</i> define a
* total ordering, as it would be required for {@link java.lang.Comparable}.
*
* @param that the protocl version to compare with
*
* @return a negative integer, zero, or a positive integer as this version is
* less than, equal to, or greater than the argument version.
*
* @throws IllegalArgumentException if the argument has a different protocol
* name than this object, or if the argument is
* <code>null</code>
*/
public int compareToVersion(ProtocolVersion that) {
return -1;
}
/**
* Tests if this protocol version is greater or equal to the given one.
*
* @param version the version against which to check this version
*
* @return <code>true</code> if this protocol version is {@link #isComparable
* comparable} to the argument and {@link #compareToVersion compares} as
* greater or equal, <code>false</code> otherwise
*/
public final boolean greaterEquals(ProtocolVersion version) {
return false;
}
/**
* Tests if this protocol version is less or equal to the given one.
*
* @param version the version against which to check this version
*
* @return <code>true</code> if this protocol version is {@link #isComparable
* comparable} to the argument and {@link #compareToVersion compares} as
* less or equal, <code>false</code> otherwise
*/
public final boolean lessEquals(ProtocolVersion version) {
return false;
}
/**
* Converts this protocol version to a string.
*
* @return a protocol version string, like "HTTP/1.1"
*/
public String toString() {
return null;
}
public Object clone() throws CloneNotSupportedException {
return null;
}
}
| 7,624 | 34.966981 | 139 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/ParseException.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/ParseException.java $
* $Revision: 609106 $
* $Date: 2008-01-05 01:15:42 -0800 (Sat, 05 Jan 2008) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http;
/**
* Indicates a parse error. Parse errors when receiving a message will typically
* trigger {@link ProtocolException}. Parse errors that do not occur during
* protocol execution may be handled differently. This is an unchecked
* exceptions, since there are cases where the data to be parsed has been
* generated and is therefore known to be parseable.
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public class ParseException extends RuntimeException {
/**
* Creates a {@link ParseException} without details.
*/
public ParseException() {
}
/**
* Creates a {@link ParseException} with a detail message.
*
* @param message the exception detail message, or <code>null</code>
*/
public ParseException(String message) {
}
}
| 2,459 | 36.846154 | 138 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/HttpEntityEnclosingRequest.java | /*
* $Header: $
* $Revision: 618017 $
* $Date: 2008-02-03 08:42:22 -0800 (Sun, 03 Feb 2008) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http;
/**
* A request with an entity.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision: 618017 $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public interface HttpEntityEnclosingRequest extends HttpRequest {
/**
* Tells if this request should use the expect-continue handshake. The expect
* continue handshake gives the server a chance to decide whether to accept the
* entity enclosing request before the possibly lengthy entity is sent across
* the wire.
*
* @return true if the expect continue handshake should be used, false if not.
*/
boolean expectContinue();
/**
* Hands the entity to the request.
*
* @param entity the entity to send.
*/
void setEntity(HttpEntity entity);
HttpEntity getEntity();
}
| 2,380 | 32.535211 | 95 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpEntityEnclosingRequestBase.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/methods/HttpEntityEnclosingRequestBase.java $
* $Revision: 674186 $
* $Date: 2008-07-05 05:18:54 -0700 (Sat, 05 Jul 2008) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.client.methods;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpEntityEnclosingRequest;
/**
* Basic implementation of an HTTP request that can be modified.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision: 674186 $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public abstract class HttpEntityEnclosingRequestBase extends HttpRequestBase implements HttpEntityEnclosingRequest {
public HttpEntityEnclosingRequestBase() {
}
public HttpEntity getEntity() {
return null;
}
public void setEntity(final HttpEntity entity) {
}
public boolean expectContinue() {
return false;
}
} | 2,424 | 35.19403 | 173 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpRequestBase.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/methods/HttpRequestBase.java $
* $Revision: 674186 $
* $Date: 2008-07-05 05:18:54 -0700 (Sat, 05 Jul 2008) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.client.methods;
import java.io.IOException;
import java.net.URI;
import org.apache.http.message.AbstractHttpMessage;
import org.apache.http.ProtocolVersion;
import org.apache.http.RequestLine;
/**
* Basic implementation of an HTTP request that can be modified.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision: 674186 $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public abstract class HttpRequestBase extends AbstractHttpMessage {
public HttpRequestBase() {
}
public abstract String getMethod();
public ProtocolVersion getProtocolVersion() {
return null;
}
public URI getURI() {
return null;
}
public RequestLine getRequestLine() {
return null;
}
public void setURI(final URI uri) {
}
public void abort() {
}
public boolean isAborted() {
return false;
}
// Add method from `org.apache.http.HttpMessage`
public void addHeader(String name, String value) {
}
// Add method from `org.apache.http.HttpMessage`
public void setHeader(String name, String value) {
}
} | 2,829 | 30.444444 | 158 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpGet.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/methods/HttpGet.java $
* $Revision: 664505 $
* $Date: 2008-06-08 06:21:20 -0700 (Sun, 08 Jun 2008) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.client.methods;
import java.net.URI;
/**
* HTTP GET method.
* <p>
* The HTTP GET method is defined in section 9.3 of
* <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>: <blockquote> The
* GET method means retrieve whatever information (in the form of an entity) is
* identified by the Request-URI. If the Request-URI refers to a data-producing
* process, it is the produced data which shall be returned as the entity in the
* response and not the source text of the process, unless that text happens to
* be the output of the process. </blockquote>
* </p>
* <p>
* GetMethods will follow redirect requests from the http server by default.
* This behavour can be disabled by calling setFollowRedirects(false).
* </p>
*
* @version $Revision: 664505 $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public class HttpGet extends HttpRequestBase {
public final static String METHOD_NAME = "GET";
public HttpGet() {
}
public HttpGet(final URI uri) {
}
/**
* @throws IllegalArgumentException if the uri is invalid.
*/
public HttpGet(final String uri) {
}
@Override
public String getMethod() {
return METHOD_NAME;
}
} | 2,887 | 34.654321 | 150 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpPost.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/methods/HttpPost.java $
* $Revision: 664505 $
* $Date: 2008-06-08 06:21:20 -0700 (Sun, 08 Jun 2008) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.client.methods;
import java.net.URI;
/**
* HTTP POST method.
* <p>
* The HTTP POST method is defined in section 9.5 of
* <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>: <blockquote> The
* POST method is used to request that the origin server accept the entity
* enclosed in the request as a new subordinate of the resource identified by
* the Request-URI in the Request-Line. POST is designed to allow a uniform
* method to cover the following functions:
* <ul>
* <li>Annotation of existing resources</li>
* <li>Posting a message to a bulletin board, newsgroup, mailing list, or
* similar group of articles</li>
* <li>Providing a block of data, such as the result of submitting a form, to a
* data-handling process</li>
* <li>Extending a database through an append operation</li>
* </ul>
* </blockquote>
* </p>
*
* @version $Revision: 664505 $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public class HttpPost extends HttpEntityEnclosingRequestBase {
public final static String METHOD_NAME = "POST";
public HttpPost() {
}
public HttpPost(final URI uri) {
}
/**
* @throws IllegalArgumentException if the uri is invalid.
*/
public HttpPost(final String uri) {
}
@Override
public String getMethod() {
return METHOD_NAME;
}
} | 3,009 | 34.411765 | 151 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpPut.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/methods/HttpPut.java $
* $Revision: 664505 $
* $Date: 2008-06-08 06:21:20 -0700 (Sun, 08 Jun 2008) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.client.methods;
import java.net.URI;
/**
* HTTP PUT method.
* <p>
* The HTTP PUT method is defined in section 9.6 of
* <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>: <blockquote> The
* PUT method requests that the enclosed entity be stored under the supplied
* Request-URI. If the Request-URI refers to an already existing resource, the
* enclosed entity SHOULD be considered as a modified version of the one
* residing on the origin server. </blockquote>
* </p>
*
* @version $Revision: 664505 $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public class HttpPut extends HttpEntityEnclosingRequestBase {
public final static String METHOD_NAME = "PUT";
public HttpPut() {
}
public HttpPut(final URI uri) {
}
/**
* @throws IllegalArgumentException if the uri is invalid.
*/
public HttpPut(final String uri) {
}
@Override
public String getMethod() {
return METHOD_NAME;
}
} | 2,647 | 33.842105 | 150 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/params/HttpParams.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/HttpParams.java $
* $Revision: 610763 $
* $Date: 2008-01-10 04:01:13 -0800 (Thu, 10 Jan 2008) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.params;
/**
* Represents a collection of HTTP protocol and framework parameters.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision: 610763 $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead.
* Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a>
* for further details.
*/
@Deprecated
public interface HttpParams {
/**
* Obtains the value of the given parameter.
*
* @param name the parent name.
*
* @return an object that represents the value of the parameter,
* <code>null</code> if the parameter is not set or if it
* is explicitly set to <code>null</code>
*
* @see #setParameter(String, Object)
*/
Object getParameter(String name);
/**
* Assigns the value to the parameter with the given name.
*
* @param name parameter name
* @param value parameter value
*/
HttpParams setParameter(String name, Object value);
/**
* Creates a copy of these parameters.
*
* @return a new set of parameters holding the same values as this one
*/
HttpParams copy();
/**
* Removes the parameter with the specified name.
*
* @param name parameter name
*
* @return true if the parameter existed and has been removed, false else.
*/
boolean removeParameter(String name);
/**
* Returns a {@link Long} parameter value with the given name.
* If the parameter is not explicitly set, the default value is returned.
*
* @param name the parent name.
* @param defaultValue the default value.
*
* @return a {@link Long} that represents the value of the parameter.
*
* @see #setLongParameter(String, long)
*/
long getLongParameter(String name, long defaultValue);
/**
* Assigns a {@link Long} to the parameter with the given name
*
* @param name parameter name
* @param value parameter value
*/
HttpParams setLongParameter(String name, long value);
/**
* Returns an {@link Integer} parameter value with the given name.
* If the parameter is not explicitly set, the default value is returned.
*
* @param name the parent name.
* @param defaultValue the default value.
*
* @return a {@link Integer} that represents the value of the parameter.
*
* @see #setIntParameter(String, int)
*/
int getIntParameter(String name, int defaultValue);
/**
* Assigns an {@link Integer} to the parameter with the given name
*
* @param name parameter name
* @param value parameter value
*/
HttpParams setIntParameter(String name, int value);
/**
* Returns a {@link Double} parameter value with the given name.
* If the parameter is not explicitly set, the default value is returned.
*
* @param name the parent name.
* @param defaultValue the default value.
*
* @return a {@link Double} that represents the value of the parameter.
*
* @see #setDoubleParameter(String, double)
*/
double getDoubleParameter(String name, double defaultValue);
/**
* Assigns a {@link Double} to the parameter with the given name
*
* @param name parameter name
* @param value parameter value
*/
HttpParams setDoubleParameter(String name, double value);
/**
* Returns a {@link Boolean} parameter value with the given name.
* If the parameter is not explicitly set, the default value is returned.
*
* @param name the parent name.
* @param defaultValue the default value.
*
* @return a {@link Boolean} that represents the value of the parameter.
*
* @see #setBooleanParameter(String, boolean)
*/
boolean getBooleanParameter(String name, boolean defaultValue);
/**
* Assigns a {@link Boolean} to the parameter with the given name
*
* @param name parameter name
* @param value parameter value
*/
HttpParams setBooleanParameter(String name, boolean value);
/**
* Checks if a boolean parameter is set to <code>true</code>.
*
* @param name parameter name
*
* @return <tt>true</tt> if the parameter is set to value <tt>true</tt>,
* <tt>false</tt> if it is not set or set to <code>false</code>
*/
boolean isParameterTrue(String name);
/**
* Checks if a boolean parameter is not set or <code>false</code>.
*
* @param name parameter name
*
* @return <tt>true</tt> if the parameter is either not set or
* set to value <tt>false</tt>,
* <tt>false</tt> if it is set to <code>true</code>
*/
boolean isParameterFalse(String name);
} | 6,342 | 35.039773 | 141 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/message/BasicRequestLine.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/message/BasicRequestLine.java $
* $Revision: 604625 $
* $Date: 2007-12-16 06:11:11 -0800 (Sun, 16 Dec 2007) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.message;
import org.apache.http.ProtocolVersion;
import org.apache.http.RequestLine;
/**
* The first line of an {@link org.apache.http.HttpRequest HttpRequest}.
* It contains the method, URI, and HTTP version of the request.
* For details, see RFC 2616.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
*
* <!-- empty lines above to avoid 'svn diff' context problems -->
* @version $Revision: 604625 $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead.
* Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a>
* for further details.
*/
@Deprecated
public class BasicRequestLine implements RequestLine, Cloneable {
public BasicRequestLine(final String method, final String uri, final ProtocolVersion version) {
}
public String getMethod() {
return null;
}
public ProtocolVersion getProtocolVersion() {
return null;
}
public String getUri() {
return null;
}
public String toString() {
return null;
}
} | 2,556 | 34.513889 | 148 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/message/BasicHttpRequest.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/message/BasicHttpRequest.java $
* $Revision: 573864 $
* $Date: 2007-09-08 08:53:25 -0700 (Sat, 08 Sep 2007) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.message;
import org.apache.http.HttpRequest;
import org.apache.http.ProtocolVersion;
import org.apache.http.RequestLine;
/**
* Basic implementation of an HTTP request that can be modified.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision: 573864 $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public class BasicHttpRequest extends AbstractHttpMessage implements HttpRequest {
public BasicHttpRequest(final String method, final String uri) {
}
public BasicHttpRequest(final String method, final String uri, final ProtocolVersion ver) {
}
public BasicHttpRequest(final RequestLine requestline) {
}
public ProtocolVersion getProtocolVersion() {
return null;
}
public RequestLine getRequestLine() {
return null;
}
// Add method from `org.apache.http.HttpMessage`
public void addHeader(String name, String value) {
}
// Add method from `org.apache.http.HttpMessage`
public void setHeader(String name, String value) {
}
}
| 2,735 | 33.632911 | 148 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/message/BasicHttpEntityEnclosingRequest.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/message/BasicHttpEntityEnclosingRequest.java $
* $Revision: 618017 $
* $Date: 2008-02-03 08:42:22 -0800 (Sun, 03 Feb 2008) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.message;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpEntityEnclosingRequest;
import org.apache.http.ProtocolVersion;
import org.apache.http.RequestLine;
/**
* Basic implementation of a request with an entity that can be modified.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision: 618017 $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public class BasicHttpEntityEnclosingRequest extends BasicHttpRequest implements HttpEntityEnclosingRequest {
public BasicHttpEntityEnclosingRequest(final String method, final String uri) {
super(method, uri);
}
public BasicHttpEntityEnclosingRequest(final String method, final String uri, final ProtocolVersion ver) {
super(method, uri, ver);
}
public BasicHttpEntityEnclosingRequest(final RequestLine requestline) {
super(requestline);
}
public HttpEntity getEntity() {
return null;
}
public void setEntity(final HttpEntity entity) {
}
public boolean expectContinue() {
return false;
}
}
| 2,815 | 34.2 | 163 | java |
codeql | codeql-master/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/message/AbstractHttpMessage.java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/message/AbstractHttpMessage.java $
* $Revision: 620287 $
* $Date: 2008-02-10 07:15:53 -0800 (Sun, 10 Feb 2008) $
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.message;
import java.util.Iterator;
import org.apache.http.Header;
import org.apache.http.HeaderIterator;
import org.apache.http.HttpMessage;
import org.apache.http.params.HttpParams;
/**
* Basic implementation of an HTTP message that can be modified.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision: 620287 $
*
* @since 4.0
*
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
* visit <a href=
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
* webpage</a> for further details.
*/
@Deprecated
public abstract class AbstractHttpMessage implements HttpMessage {
// non-javadoc, see interface HttpMessage
public boolean containsHeader(String name) {
return false;
}
// non-javadoc, see interface HttpMessage
public Header[] getHeaders(final String name) {
return null;
}
// non-javadoc, see interface HttpMessage
public Header getFirstHeader(final String name) {
return null;
}
// non-javadoc, see interface HttpMessage
public Header getLastHeader(final String name) {
return null;
}
// non-javadoc, see interface HttpMessage
public Header[] getAllHeaders() {
return null;
}
// non-javadoc, see interface HttpMessage
public void addHeader(final Header header) {
}
// non-javadoc, see interface HttpMessage
public void addHeader(final String name, final String value) {
}
// non-javadoc, see interface HttpMessage
public void setHeader(final Header header) {
}
// non-javadoc, see interface HttpMessage
public void setHeader(final String name, final String value) {
}
// non-javadoc, see interface HttpMessage
public void setHeaders(final Header[] headers) {
}
// non-javadoc, see interface HttpMessage
public void removeHeader(final Header header) {
}
// non-javadoc, see interface HttpMessage
public void removeHeaders(final String name) {
}
// non-javadoc, see interface HttpMessage
public HeaderIterator headerIterator() {
return null;
}
// non-javadoc, see interface HttpMessage
public HeaderIterator headerIterator(String name) {
return null;
}
// non-javadoc, see interface HttpMessage
public HttpParams getParams() {
return null;
}
// non-javadoc, see interface HttpMessage
public void setParams(final HttpParams params) {
}
}
| 4,002 | 30.031008 | 151 | java |
codeql | codeql-master/java/ql/test/stubs/jdom-1.1.3/org/jdom/Document.java | /*--
$Id: Document.java,v 1.85 2007/11/10 05:28:58 jhunter Exp $
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the disclaimer that follows
these conditions in the documentation and/or other materials
provided with the distribution.
3. The name "JDOM" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact <request_AT_jdom_DOT_org>.
4. Products derived from this software may not be called "JDOM", nor
may "JDOM" appear in their name, without prior written permission
from the JDOM Project Management <request_AT_jdom_DOT_org>.
In addition, we request (but do not require) that you include in the
end-user documentation provided with the redistribution and/or in the
software itself an acknowledgement equivalent to the following:
"This product includes software developed by the
JDOM Project (http://www.jdom.org/)."
Alternatively, the acknowledgment may be graphical using the logos
available at http://www.jdom.org/images/logos.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
This software consists of voluntary contributions made by many
individuals on behalf of the JDOM Project and was originally
created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information
on the JDOM Project, please see <http://www.jdom.org/>.
*/
/*
* Adapted from JDOM version 1.1.3 as available at
* https://search.maven.org/remotecontent?filepath=org/jdom/jdom/1.1.3/jdom-1.1.3-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.jdom;
public class Document {
} | 2,826 | 41.19403 | 95 | java |
codeql | codeql-master/java/ql/test/stubs/jdom-1.1.3/org/jdom/input/SAXBuilder.java | /*--
$Id: SAXBuilder.java,v 1.93 2009/07/23 06:26:26 jhunter Exp $
Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the disclaimer that follows
these conditions in the documentation and/or other materials
provided with the distribution.
3. The name "JDOM" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact <request_AT_jdom_DOT_org>.
4. Products derived from this software may not be called "JDOM", nor
may "JDOM" appear in their name, without prior written permission
from the JDOM Project Management <request_AT_jdom_DOT_org>.
In addition, we request (but do not require) that you include in the
end-user documentation provided with the redistribution and/or in the
software itself an acknowledgement equivalent to the following:
"This product includes software developed by the
JDOM Project (http://www.jdom.org/)."
Alternatively, the acknowledgment may be graphical using the logos
available at http://www.jdom.org/images/logos.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
This software consists of voluntary contributions made by many
individuals on behalf of the JDOM Project and was originally
created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information
on the JDOM Project, please see <http://www.jdom.org/>.
*/
/*
* Adapted from JDOM version 1.1.3 as available at
* https://search.maven.org/remotecontent?filepath=org/jdom/jdom/1.1.3/jdom-1.1.3-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.jdom.input;
import java.io.*;
import org.jdom.*;
public class SAXBuilder {
public void setFeature(String name, boolean value) {
}
public Document build(InputStream in)
throws IOException {
return null;
}
} | 3,035 | 37.43038 | 95 | java |
codeql | codeql-master/java/ql/test/stubs/apache-commons-io-2.6/org/apache/commons/io/IOUtils.java | package org.apache.commons.io;
import java.io.*;
import java.util.*;
public class IOUtils {
public static BufferedInputStream buffer(InputStream inputStream) { return null; }
public static void copy(InputStream input, Writer output, String inputEncoding) throws IOException { }
public static long copyLarge(Reader input, Writer output) throws IOException { return 42; }
public static int read(InputStream input, byte[] buffer) throws IOException { return 42; }
public static void readFully(InputStream input, byte[] buffer) throws IOException { }
public static byte[] readFully(InputStream input, int length) throws IOException { return null; }
public static List<String> readLines(InputStream input, String encoding) throws IOException { return null; }
public static InputStream toBufferedInputStream(InputStream input) throws IOException { return null; }
public static BufferedReader toBufferedReader(Reader reader) { return null; }
public static byte[] toByteArray(InputStream input, int size) throws IOException { return null; }
public static char[] toCharArray(InputStream is, String encoding) throws IOException { return null; }
public static InputStream toInputStream(String input, String encoding) throws IOException { return null; }
public static String toString(InputStream input, String encoding) throws IOException { return null; }
public static void write(char[] data, Writer output) throws IOException { }
public static void writeChunked(char[] data, Writer output) throws IOException { }
public static void writeLines(Collection<?> lines, String lineEnding, Writer writer) throws IOException { }
}
| 1,646 | 70.608696 | 110 | java |
codeql | codeql-master/java/ql/test/stubs/jsr311-api-1.1.1/javax/ws/rs/core/MediaType.java | /*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* http://www.opensource.org/licenses/cddl1.php
* See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* MediaType.java
*
* Created on March 22, 2007, 2:35 PM
*
*/
/*
* Adapted from JAX-RS version 1.1.1 as available at
* https://search.maven.org/remotecontent?filepath=javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package javax.ws.rs.core;
public class MediaType {
} | 779 | 25 | 110 | java |
codeql | codeql-master/java/ql/test/stubs/jsr311-api-1.1.1/javax/ws/rs/core/MultivaluedMap.java | /*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* http://www.opensource.org/licenses/cddl1.php
* See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* MultivaluedMap.java
*
* Created on February 13, 2007, 2:30 PM
*
*/
/*
* Adapted from JAX-RS version 1.1.1 as available at
* https://search.maven.org/remotecontent?filepath=javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package javax.ws.rs.core;
import java.util.List;
import java.util.Map;
public interface MultivaluedMap<K, V> extends Map<K, List<V>> {
}
| 873 | 24.705882 | 110 | java |
codeql | codeql-master/java/ql/test/stubs/jsr311-api-1.1.1/javax/ws/rs/ext/MessageBodyReader.java | /*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* http://www.opensource.org/licenses/cddl1.php
* See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* MessageBodyReader.java
*
* Created on November 8, 2007, 3:57 PM
*
*/
/*
* Adapted from JAX-RS version 1.1.1 as available at
* https://search.maven.org/remotecontent?filepath=javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package javax.ws.rs.ext;
import java.io.IOException;
import java.io.InputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
public interface MessageBodyReader<T> {
boolean isReadable(Class<?> type, Type genericType,
Annotation annotations[], MediaType mediaType);
T readFrom(Class<T> type, Type genericType,
Annotation annotations[], MediaType mediaType,
MultivaluedMap<String, String> httpHeaders,
InputStream entityStream) throws IOException;
} | 1,352 | 29.066667 | 110 | java |
codeql | codeql-master/java/ql/test/stubs/kryo-4.0.2/com/esotericsoftware/kryo/Registration.java | /* Copyright (c) 2008, Nathan Sweet
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided with the distribution.
* - Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
* SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
/*
* Adapted from Kryo version 4.0.2 as available at
* https://search.maven.org/remotecontent?filepath=com/esotericsoftware/kryo/4.0.2/kryo-4.0.2-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package com.esotericsoftware.kryo;
public class Registration {
} | 1,839 | 62.448276 | 133 | java |
codeql | codeql-master/java/ql/test/stubs/kryo-4.0.2/com/esotericsoftware/kryo/Kryo.java | /* Copyright (c) 2008, Nathan Sweet
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided with the distribution.
* - Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
* SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
/*
* Adapted from Kryo version 4.0.2 as available at
* https://search.maven.org/remotecontent?filepath=com/esotericsoftware/kryo/4.0.2/kryo-4.0.2-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package com.esotericsoftware.kryo;
import com.esotericsoftware.kryo.io.Input;
public class Kryo {
public Registration readClass (Input input) {
return null;
}
public <T> T readObject (Input input, Class<T> type) {
return null;
}
public <T> T readObjectOrNull (Input input, Class<T> type) {
return null;
}
public Object readClassAndObject (Input input) {
return null;
}
public void setRegistrationRequired (boolean registrationRequired) {
}
} | 2,240 | 43.82 | 133 | java |
codeql | codeql-master/java/ql/test/stubs/kryo-4.0.2/com/esotericsoftware/kryo/io/Input.java | /* Copyright (c) 2008, Nathan Sweet
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided with the distribution.
* - Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
* SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
/*
* Adapted from Kryo version 4.0.2 as available at
* https://search.maven.org/remotecontent?filepath=com/esotericsoftware/kryo/4.0.2/kryo-4.0.2-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package com.esotericsoftware.kryo.io;
import java.io.InputStream;
public class Input {
public Input (InputStream inputStream) {
}
} | 1,909 | 56.878788 | 133 | java |
codeql | codeql-master/java/ql/test/stubs/xstream-1.4.10/com/thoughtworks/xstream/XStream.java | /*
* Copyright (C) 2003, 2004, 2005, 2006 Joe Walnes.
* Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 XStream Committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
* style license a copy of which has been included with this distribution in
* the LICENSE.txt file.
*
* Created on 26. September 2003 by Joe Walnes
*/
/*
* Adapted from XStream version 1.4.10 as available at
* https://search.maven.org/remotecontent?filepath=com/thoughtworks/xstream/xstream/1.4.10/xstream-1.4.10-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package com.thoughtworks.xstream;
import java.io.File;
import java.io.InputStream;
import java.io.Reader;
import java.net.URL;
public class XStream {
public Object fromXML(String xml) {
return null;
}
public Object fromXML(Reader reader) {
return null;
}
public Object fromXML(InputStream input) {
return null;
}
public Object fromXML(URL url) {
return null;
}
public Object fromXML(File file) {
return null;
}
public Object fromXML(String xml, Object root) {
return null;
}
public Object fromXML(Reader xml, Object root) {
return null;
}
public Object fromXML(URL url, Object root) {
return null;
}
public Object fromXML(File file, Object root) {
return null;
}
public Object fromXML(InputStream input, Object root) {
return null;
}
} | 1,584 | 22.308824 | 119 | java |
codeql | codeql-master/java/ql/test/stubs/j2objc/com/google/j2objc/security/IosRSASignature.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* MODIFIED version of the file available at
* https://github.com/google/j2objc/blob/24fc3bb5d007ec318cbbdd25229499f520cef177/jre_emul/Classes/com/google/j2objc/security/IosRSASignature.java
* For test purposes, some code in this file has been stubbed
* to avoid dependencies on other source files.
*/
package com.google.j2objc.security;
import java.io.IOException;
import java.io.OutputStream;
import java.security.InvalidKeyException;
import java.security.InvalidParameterException;
import java.security.Key;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.SignatureException;
import java.security.SignatureSpi;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
/*-[
#include "NSDataOutputStream.h"
#include <CommonCrypto/CommonDigest.h>
#include <Security/Security.h>
// Public iOS API (Security/SecKey.h). These functions are private in OS X due
// to issues with ECC certificates, but are still useful for jre_emul unit tests.
OSStatus SecKeyRawSign(
SecKeyRef key,
SecPadding padding,
const uint8_t *dataToSign,
size_t dataToSignLen,
uint8_t *sig,
size_t *sigLen);
OSStatus SecKeyRawVerify(
SecKeyRef key,
SecPadding padding,
const uint8_t *signedData,
size_t signedDataLen,
const uint8_t *sig,
size_t sigLen);
]-*/
/**
* Signature verification provider, implemented using the iOS Security Framework.
*
* @author Tom Ball
*/
public abstract class IosRSASignature extends SignatureSpi {
protected OutputStream buffer = newNSDataOutputStream();
private Key key;
@Override
protected void engineInitVerify(PublicKey publicKey)
throws InvalidKeyException {
key = publicKey;
}
private static native OutputStream newNSDataOutputStream() /*-[
return [NSDataOutputStream stream];
]-*/;
@Override
protected void engineInitSign(PrivateKey privateKey)
throws InvalidKeyException {
key = privateKey;
}
@Override
protected void engineUpdate(byte b) throws SignatureException {
try {
buffer.write(b);
} catch (IOException e) {
throw new SignatureException(e);
}
}
@Override
protected void engineUpdate(byte[] b, int off, int len)
throws SignatureException {
try {
buffer.write(b, off, len);
} catch (IOException e) {
throw new SignatureException(e);
}
}
@Override
protected byte[] engineSign() throws SignatureException {
if (key == null || !(key instanceof RSAPrivateKey)) {
throw new SignatureException("Needs RSA private key");
}
long privateKey = -1;
return nativeEngineSign(privateKey);
}
protected abstract byte[] nativeEngineSign(long nativeKey);
protected abstract boolean nativeEngineVerify(long nativeKey, byte[] sigBytes);
@Override
protected boolean engineVerify(byte[] sigBytes) throws SignatureException {
if (key == null || !(key instanceof RSAPublicKey)) {
throw new SignatureException("Needs RSA public key");
}
long publicKey = -1;
return nativeEngineVerify(publicKey, sigBytes);
}
@Override
protected Object engineGetParameter(String param) throws InvalidParameterException {
return null;
}
@Override
protected void engineSetParameter(String param, Object value) throws InvalidParameterException {
}
/*-[
- (IOSByteArray *)nativeEngineSign:(SecKeyRef)privateKey
hashBytes:(uint8_t *)hashBytes
size:(size_t)hashBytesSize {
size_t signedHashBytesSize = SecKeyGetBlockSize(privateKey);
uint8_t *signedHashBytes = calloc(signedHashBytesSize, sizeof(uint8_t));
SecKeyRawSign(privateKey,
kSecPaddingNone,
hashBytes,
hashBytesSize,
signedHashBytes,
&signedHashBytesSize);
IOSByteArray *result = [IOSByteArray arrayWithBytes:(jbyte *)signedHashBytes
count:(NSUInteger)signedHashBytesSize];
if (signedHashBytes) {
free(signedHashBytes);
}
return result;
}
- (jboolean)nativeEngineVerify:(SecKeyRef)publicKey
signature:(IOSByteArray *)signature
hashBytes:(uint8_t *)hashBytes
size:(size_t)hashBytesSize {
size_t signatureSize = SecKeyGetBlockSize(publicKey);
if (signatureSize != (size_t)signature->size_) {
return false;
}
OSStatus status = SecKeyRawVerify(publicKey,
kSecPaddingNone,
hashBytes,
hashBytesSize,
(uint8_t*)signature->buffer_,
signatureSize);
return status == errSecSuccess;
}
]-*/
public static final class MD5RSA extends IosRSASignature {
@Override
protected native byte[] nativeEngineSign(long nativeKey) /*-[
NSData *plainData = [(NSDataOutputStream *)buffer_ data];
size_t hashBytesSize = CC_MD5_DIGEST_LENGTH;
uint8_t* hashBytes = malloc(hashBytesSize);
if (!CC_MD5([plainData bytes], (CC_LONG)[plainData length], hashBytes)) {
return nil;
}
IOSByteArray *result = [self nativeEngineSign:(SecKeyRef)nativeKey
hashBytes:hashBytes
size:hashBytesSize];
free(hashBytes);
return result;
]-*/;
@Override
protected native boolean nativeEngineVerify(long nativeKey, byte[] sigBytes) /*-[
NSData *plainData = [(NSDataOutputStream *)buffer_ data];
size_t hashBytesSize = CC_MD5_DIGEST_LENGTH;
uint8_t* hashBytes = malloc(hashBytesSize);
if (!CC_MD5([plainData bytes], (CC_LONG)[plainData length], hashBytes)) {
return false;
}
BOOL result = [self nativeEngineVerify:(SecKeyRef)nativeKey
signature:sigBytes
hashBytes:hashBytes
size:hashBytesSize];
free(hashBytes);
return result;
]-*/;
}
public static final class SHA1RSA extends IosRSASignature {
@Override
protected native byte[] nativeEngineSign(long nativeKey) /*-[
NSData *plainData = [(NSDataOutputStream *)buffer_ data];
size_t hashBytesSize = CC_SHA1_DIGEST_LENGTH;
uint8_t* hashBytes = malloc(hashBytesSize);
if (!CC_SHA1([plainData bytes], (CC_LONG)[plainData length], hashBytes)) {
return nil;
}
IOSByteArray *result = [self nativeEngineSign:(SecKeyRef)nativeKey
hashBytes:hashBytes
size:hashBytesSize];
free(hashBytes);
return result;
]-*/;
@Override
protected native boolean nativeEngineVerify(long nativeKey, byte[] sigBytes) /*-[
NSData *plainData = [(NSDataOutputStream *)buffer_ data];
size_t hashBytesSize = CC_SHA1_DIGEST_LENGTH;
uint8_t* hashBytes = malloc(hashBytesSize);
if (!CC_SHA1([plainData bytes], (CC_LONG)[plainData length], hashBytes)) {
return false;
}
BOOL result = [self nativeEngineVerify:(SecKeyRef)nativeKey
signature:sigBytes
hashBytes:hashBytes
size:hashBytesSize];
free(hashBytes);
return result;
]-*/;
}
public static final class SHA256RSA extends IosRSASignature {
@Override
protected native byte[] nativeEngineSign(long nativeKey) /*-[
NSData *plainData = [(NSDataOutputStream *)buffer_ data];
size_t hashBytesSize = CC_SHA256_DIGEST_LENGTH;
uint8_t* hashBytes = malloc(hashBytesSize);
if (!CC_SHA256([plainData bytes], (CC_LONG)[plainData length], hashBytes)) {
return nil;
}
IOSByteArray *result = [self nativeEngineSign:(SecKeyRef)nativeKey
hashBytes:hashBytes
size:hashBytesSize];
free(hashBytes);
return result;
]-*/;
@Override
protected native boolean nativeEngineVerify(long nativeKey, byte[] sigBytes) /*-[
NSData *plainData = [(NSDataOutputStream *)buffer_ data];
size_t hashBytesSize = CC_SHA256_DIGEST_LENGTH;
uint8_t* hashBytes = malloc(hashBytesSize);
if (!CC_SHA256([plainData bytes], (CC_LONG)[plainData length], hashBytes)) {
return false;
}
BOOL result = [self nativeEngineVerify:(SecKeyRef)nativeKey
signature:sigBytes
hashBytes:hashBytes
size:hashBytesSize];
free(hashBytes);
return result;
]-*/;
}
public static final class SHA384RSA extends IosRSASignature {
@Override
protected native byte[] nativeEngineSign(long nativeKey) /*-[
NSData *plainData = [(NSDataOutputStream *)buffer_ data];
size_t hashBytesSize = CC_SHA384_DIGEST_LENGTH;
uint8_t* hashBytes = malloc(hashBytesSize);
if (!CC_SHA384([plainData bytes], (CC_LONG)[plainData length], hashBytes)) {
return nil;
}
IOSByteArray *result = [self nativeEngineSign:(SecKeyRef)nativeKey
hashBytes:hashBytes
size:hashBytesSize];
free(hashBytes);
return result;
]-*/;
@Override
protected native boolean nativeEngineVerify(long nativeKey, byte[] sigBytes) /*-[
NSData *plainData = [(NSDataOutputStream *)buffer_ data];
size_t hashBytesSize = CC_SHA384_DIGEST_LENGTH;
uint8_t* hashBytes = malloc(hashBytesSize);
if (!CC_SHA384([plainData bytes], (CC_LONG)[plainData length], hashBytes)) {
return false;
}
BOOL result = [self nativeEngineVerify:(SecKeyRef)nativeKey
signature:sigBytes
hashBytes:hashBytes
size:hashBytesSize];
free(hashBytes);
return result;
]-*/;
}
public static final class SHA512RSA extends IosRSASignature {
@Override
protected native byte[] nativeEngineSign(long nativeKey) /*-[
NSData *plainData = [(NSDataOutputStream *)buffer_ data];
size_t hashBytesSize = CC_SHA512_DIGEST_LENGTH;
uint8_t* hashBytes = malloc(hashBytesSize);
if (!CC_SHA512([plainData bytes], (CC_LONG)[plainData length], hashBytes)) {
return nil;
}
IOSByteArray *result = [self nativeEngineSign:(SecKeyRef)nativeKey
hashBytes:hashBytes
size:hashBytesSize];
free(hashBytes);
return result;
]-*/;
@Override
protected native boolean nativeEngineVerify(long nativeKey, byte[] sigBytes) /*-[
NSData *plainData = [(NSDataOutputStream *)buffer_ data];
size_t hashBytesSize = CC_SHA512_DIGEST_LENGTH;
uint8_t* hashBytes = malloc(hashBytesSize);
if (!CC_SHA512([plainData bytes], (CC_LONG)[plainData length], hashBytes)) {
return false;
}
jboolean result = [self nativeEngineVerify:(SecKeyRef)nativeKey
signature:sigBytes
hashBytes:hashBytes
size:hashBytesSize];
free(hashBytes);
return result;
]-*/;
}
}
| 12,590 | 36.032353 | 148 | java |
codeql | codeql-master/java/ql/test/stubs/unboundid-ldap-4.0.14/com/unboundid/ldap/sdk/LDAPConnection.java | package com.unboundid.ldap.sdk;
public class LDAPConnection {
public AsyncRequestID asyncSearch(ReadOnlySearchRequest searchRequest) throws LDAPException { return null; }
public AsyncRequestID asyncSearch(SearchRequest searchRequest) throws LDAPException { return null; }
public SearchResult search(ReadOnlySearchRequest searchRequest) throws LDAPSearchException { return null; }
public SearchResult search(SearchRequest searchRequest) throws LDAPSearchException { return null; }
public SearchResult search(SearchResultListener searchResultListener, String baseDN, SearchScope scope, DereferencePolicy derefPolicy,
int sizeLimit, int timeLimit, boolean typesOnly, Filter filter, String... attributes) throws LDAPSearchException { return null; }
public SearchResult search(SearchResultListener searchResultListener, String baseDN, SearchScope scope, DereferencePolicy derefPolicy,
int sizeLimit, int timeLimit, boolean typesOnly, String filter, String... attributes) throws LDAPSearchException { return null; }
public SearchResult search(String baseDN, SearchScope scope, DereferencePolicy derefPolicy, int sizeLimit, int timeLimit,
boolean typesOnly, String filter, String... attributes) throws LDAPSearchException { return null; }
public SearchResultEntry searchForEntry(String baseDN, SearchScope scope, DereferencePolicy derefPolicy, int timeLimit,
boolean typesOnly, String filter, String... attributes) throws LDAPSearchException { return null; }
}
| 1,549 | 69.454545 | 147 | java |
codeql | codeql-master/java/ql/test/stubs/unboundid-ldap-4.0.14/com/unboundid/ldap/sdk/SearchResultListener.java | package com.unboundid.ldap.sdk;
public interface SearchResultListener { }
| 75 | 18 | 41 | java |
codeql | codeql-master/java/ql/test/stubs/unboundid-ldap-4.0.14/com/unboundid/ldap/sdk/LDAPSearchException.java | package com.unboundid.ldap.sdk;
public class LDAPSearchException extends LDAPException { }
| 92 | 22.25 | 58 | java |
codeql | codeql-master/java/ql/test/stubs/unboundid-ldap-4.0.14/com/unboundid/ldap/sdk/SearchResultEntry.java | package com.unboundid.ldap.sdk;
public class SearchResultEntry { }
| 68 | 16.25 | 34 | java |
codeql | codeql-master/java/ql/test/stubs/unboundid-ldap-4.0.14/com/unboundid/ldap/sdk/SearchRequest.java | package com.unboundid.ldap.sdk;
public class SearchRequest implements ReadOnlySearchRequest {
public SearchRequest(String baseDN, SearchScope scope, String filter, String... attributes) throws LDAPException { }
public SearchRequest(SearchResultListener searchResultListener, String baseDN, SearchScope scope, DereferencePolicy derefPolicy,
int sizeLimit, int timeLimit, boolean typesOnly, Filter filter, String... attributes) { }
public SearchRequest(SearchResultListener searchResultListener, String baseDN, SearchScope scope, DereferencePolicy derefPolicy,
int sizeLimit, int timeLimit, boolean typesOnly, String filter, String... attributes) throws LDAPException { }
public SearchRequest duplicate() { return null; }
public void setBaseDN(String baseDN) { }
public void setFilter(String filter) throws LDAPException { }
}
| 869 | 47.333333 | 130 | java |
codeql | codeql-master/java/ql/test/stubs/unboundid-ldap-4.0.14/com/unboundid/ldap/sdk/AsyncRequestID.java | package com.unboundid.ldap.sdk;
public class AsyncRequestID { }
| 65 | 15.5 | 31 | java |
codeql | codeql-master/java/ql/test/stubs/unboundid-ldap-4.0.14/com/unboundid/ldap/sdk/DereferencePolicy.java | package com.unboundid.ldap.sdk;
public class DereferencePolicy { }
| 68 | 16.25 | 34 | java |
codeql | codeql-master/java/ql/test/stubs/unboundid-ldap-4.0.14/com/unboundid/ldap/sdk/SearchResult.java | package com.unboundid.ldap.sdk;
public class SearchResult { }
| 63 | 15 | 31 | java |
codeql | codeql-master/java/ql/test/stubs/unboundid-ldap-4.0.14/com/unboundid/ldap/sdk/SearchScope.java | package com.unboundid.ldap.sdk;
public class SearchScope { }
| 62 | 14.75 | 31 | java |
codeql | codeql-master/java/ql/test/stubs/unboundid-ldap-4.0.14/com/unboundid/ldap/sdk/Filter.java | package com.unboundid.ldap.sdk;
public class Filter {
public static Filter create(java.lang.String filterString) throws LDAPException { return null; }
public static Filter createNOTFilter(Filter notComponent) { return null; }
public static Filter createEqualityFilter(java.lang.String attributeName, java.lang.String assertionValue) { return null; }
public static java.lang.String encodeValue(java.lang.String value) { return null; }
public void toNormalizedString(java.lang.StringBuilder buffer) { }
public String toString() { return ""; }
}
| 561 | 34.125 | 125 | java |
codeql | codeql-master/java/ql/test/stubs/unboundid-ldap-4.0.14/com/unboundid/ldap/sdk/ReadOnlySearchRequest.java | package com.unboundid.ldap.sdk;
public interface ReadOnlySearchRequest {
SearchRequest duplicate();
}
| 105 | 16.666667 | 40 | java |
codeql | codeql-master/java/ql/test/stubs/unboundid-ldap-4.0.14/com/unboundid/ldap/sdk/LDAPException.java | package com.unboundid.ldap.sdk;
public class LDAPException extends Exception { }
| 82 | 19.75 | 48 | java |
codeql | codeql-master/java/ql/test/stubs/snakeyaml-1.21/org/yaml/snakeyaml/Yaml.java | /**
* Copyright (c) 2008, http://www.snakeyaml.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Adapted from SnakeYAML version 1.21 as available at
* https://search.maven.org/remotecontent?filepath=org/yaml/snakeyaml/1.21/snakeyaml-1.21-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.yaml.snakeyaml;
import java.io.InputStream;
import java.io.Reader;
import java.util.Iterator;
import org.yaml.snakeyaml.constructor.BaseConstructor;
import org.yaml.snakeyaml.constructor.Constructor;
import org.yaml.snakeyaml.events.Event;
public class Yaml {
public Yaml() {
}
public Yaml(BaseConstructor constructor) {
}
public <T> T load(String yaml) {
return null;
}
public <T> T load(InputStream io) {
return null;
}
public <T> T load(Reader io) {
return null;
}
public <T> T loadAs(Reader io, Class<T> type) {
return null;
}
public <T> T loadAs(String yaml, Class<T> type) {
return null;
}
public <T> T loadAs(InputStream input, Class<T> type) {
return null;
}
public Iterable<Object> loadAll(Reader yaml) {
return null;
}
public Iterable<Object> loadAll(String yaml) {
return null;
}
public Iterable<Object> loadAll(InputStream yaml) {
return null;
}
public Iterable<Event> parse(Reader yaml) {
return null;
}
} | 1,950 | 23.3875 | 103 | java |
codeql | codeql-master/java/ql/test/stubs/snakeyaml-1.21/org/yaml/snakeyaml/events/Event.java | /**
* Copyright (c) 2008, http://www.snakeyaml.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Adapted from SnakeYAML version 1.21 as available at
* https://search.maven.org/remotecontent?filepath=org/yaml/snakeyaml/1.21/snakeyaml-1.21-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.yaml.snakeyaml.events;
public abstract class Event {
} | 923 | 34.538462 | 103 | java |
codeql | codeql-master/java/ql/test/stubs/snakeyaml-1.21/org/yaml/snakeyaml/constructor/SafeConstructor.java | /**
* Copyright (c) 2008, http://www.snakeyaml.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Adapted from SnakeYAML version 1.21 as available at
* https://search.maven.org/remotecontent?filepath=org/yaml/snakeyaml/1.21/snakeyaml-1.21-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.yaml.snakeyaml.constructor;
public class SafeConstructor extends BaseConstructor {
public SafeConstructor() {
}
} | 992 | 32.1 | 103 | java |
codeql | codeql-master/java/ql/test/stubs/snakeyaml-1.21/org/yaml/snakeyaml/constructor/BaseConstructor.java | /**
* Copyright (c) 2008, http://www.snakeyaml.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Adapted from SnakeYAML version 1.21 as available at
* https://search.maven.org/remotecontent?filepath=org/yaml/snakeyaml/1.21/snakeyaml-1.21-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.yaml.snakeyaml.constructor;
public abstract class BaseConstructor {
public BaseConstructor() {
}
} | 975 | 33.857143 | 103 | java |
codeql | codeql-master/java/ql/test/stubs/snakeyaml-1.21/org/yaml/snakeyaml/constructor/Constructor.java | /**
* Copyright (c) 2008, http://www.snakeyaml.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Adapted from SnakeYAML version 1.21 as available at
* https://search.maven.org/remotecontent?filepath=org/yaml/snakeyaml/1.21/snakeyaml-1.21-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.yaml.snakeyaml.constructor;
public class Constructor extends SafeConstructor {
public Constructor() {
}
public Constructor(Class<? extends Object> theRoot) {
}
} | 1,049 | 30.818182 | 103 | java |
codeql | codeql-master/java/ql/test/stubs/guice-4.2.2/com/google/inject/Provider.java | /*
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Adapted from Guice version 4.2.2 as available at
* https://search.maven.org/classic/remotecontent?filepath=com/google/inject/guice/4.2.2/guice-4.2.2-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package com.google.inject;
/**
* An object capable of providing instances of type {@code T}. Providers are used in numerous ways
* by Guice:
*
* <ul>
* <li>When the default means for obtaining instances (an injectable or parameterless constructor)
* is insufficient for a particular binding, the module can specify a custom {@code Provider}
* instead, to control exactly how Guice creates or obtains instances for the binding.
* <li>An implementation class may always choose to have a {@code Provider<T>} instance injected,
* rather than having a {@code T} injected directly. This may give you access to multiple
* instances, instances you wish to safely mutate and discard, instances which are out of scope
* (e.g. using a {@code @RequestScoped} object from within a {@code @SessionScoped} object), or
* instances that will be initialized lazily.
* <li>A custom {@link Scope} is implemented as a decorator of {@code Provider<T>}, which decides
* when to delegate to the backing provider and when to provide the instance some other way.
* <li>The {@link Injector} offers access to the {@code Provider<T>} it uses to fulfill requests for
* a given key, via the {@link Injector#getProvider} methods.
* </ul>
*
* @param <T> the type of object this provides
* @author crazybob@google.com (Bob Lee)
*/
public interface Provider<T> {
/**
* Provides an instance of {@code T}.
*
* @throws OutOfScopeException when an attempt is made to access a scoped object while the scope
* in question is not currently active
* @throws ProvisionException if an instance cannot be provided. Such exceptions include messages
* and throwables to describe why provision failed.
*/
T get();
}
| 2,600 | 43.084746 | 114 | java |
codeql | codeql-master/java/ql/test/stubs/jsr223-api/javax/script/ScriptContext.java | package javax.script;
public interface ScriptContext {} | 56 | 18 | 33 | java |
codeql | codeql-master/java/ql/test/stubs/jsr223-api/javax/script/ScriptException.java | package javax.script;
public class ScriptException extends Exception {}
| 73 | 17.5 | 49 | java |
codeql | codeql-master/java/ql/test/stubs/jsr223-api/javax/script/SimpleScriptContext.java | package javax.script;
public class SimpleScriptContext implements ScriptContext {} | 83 | 27 | 60 | java |
codeql | codeql-master/java/ql/test/stubs/jsr223-api/javax/script/CompiledScript.java | package javax.script;
public class CompiledScript {
public Object eval() throws ScriptException { return null; }
} | 117 | 22.6 | 62 | java |
codeql | codeql-master/java/ql/test/stubs/dom4j-2.1.1/org/dom4j/Document.java | /*
* Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
*
* This software is open source.
* See the bottom of this file for the licence.
*/
/*
* Adapted from DOM4J version 2.1.1 as available at
* https://search.maven.org/remotecontent?filepath=org/dom4j/dom4j/2.1.1/dom4j-2.1.1-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.dom4j;
public interface Document {
}
/*
* Redistribution and use of this software and associated documentation
* ("Software"), with or without modification, are permitted provided that the
* following conditions are met:
*
* 1. Redistributions of source code must retain copyright statements and
* notices. Redistributions must also contain a copy of this document.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The name "DOM4J" must not be used to endorse or promote products derived
* from this Software without prior written permission of MetaStuff, Ltd. For
* written permission, please contact dom4j-info@metastuff.com.
*
* 4. Products derived from this Software may not be called "DOM4J" nor may
* "DOM4J" appear in their names without prior written permission of MetaStuff,
* Ltd. DOM4J is a registered trademark of MetaStuff, Ltd.
*
* 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org
*
* THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
*/ | 2,381 | 43.111111 | 98 | java |
codeql | codeql-master/java/ql/test/stubs/dom4j-2.1.1/org/dom4j/io/SAXReader.java | /*
* Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
*
* This software is open source.
* See the bottom of this file for the licence.
*/
/*
* Adapted from DOM4J version 2.1.1 as available at
* https://search.maven.org/remotecontent?filepath=org/dom4j/dom4j/2.1.1/dom4j-2.1.1-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.dom4j.io;
import java.io.File;
import java.io.InputStream;
import java.io.Reader;
import java.net.URL;
import org.dom4j.Document;
import org.xml.sax.XMLReader;
public class SAXReader {
public void setFeature(String name, boolean value) {
}
public Document read(File file) {
return null;
}
public Document read(URL url) {
return null;
}
public Document read(String systemId) {
return null;
}
public Document read(InputStream in) {
return null;
}
public Document read(Reader reader) {
return null;
}
public Document read(InputStream in, String systemId)
{
return null;
}
public Document read(Reader reader, String systemId)
{
return null;
}
public XMLReader getXMLReader() {
return null;
}
}
/*
* Redistribution and use of this software and associated documentation
* ("Software"), with or without modification, are permitted provided that the
* following conditions are met:
*
* 1. Redistributions of source code must retain copyright statements and
* notices. Redistributions must also contain a copy of this document.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The name "DOM4J" must not be used to endorse or promote products derived
* from this Software without prior written permission of MetaStuff, Ltd. For
* written permission, please contact dom4j-info@metastuff.com.
*
* 4. Products derived from this Software may not be called "DOM4J" nor may
* "DOM4J" appear in their names without prior written permission of MetaStuff,
* Ltd. DOM4J is a registered trademark of MetaStuff, Ltd.
*
* 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org
*
* THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
*/ | 3,183 | 30.524752 | 98 | java |
codeql | codeql-master/java/ql/test/stubs/jackson-databind-2.10/com/fasterxml/jackson/databind/ObjectMapper.java | package com.fasterxml.jackson.databind;
import java.io.*;
import java.util.*;
public class ObjectMapper {
public ObjectMapper() {
}
public void writeValue(File resultFile, Object value) {
}
public void writeValue(com.fasterxml.jackson.core.JsonGenerator jgen, Object value) {
}
public void writeValue(OutputStream out, Object value) {
}
public void writeValue(Writer w, Object value) {
}
public byte[] writeValueAsBytes(Object value) {
return null;
}
public String writeValueAsString(Object value) {
return null;
}
}
| 561 | 17.733333 | 87 | java |
codeql | codeql-master/java/ql/test/stubs/jackson-databind-2.10/com/fasterxml/jackson/databind/ObjectWriter.java | package com.fasterxml.jackson.databind;
import java.io.*;
import java.util.*;
public class ObjectWriter {
public ObjectWriter() {
}
public void writeValue(File resultFile, Object value) {
}
public void writeValue(com.fasterxml.jackson.core.JsonGenerator jgen, Object value) {
}
public void writeValue(OutputStream out, Object value) {
}
public void writeValue(Writer w, Object value) {
}
public byte[] writeValueAsBytes(Object value) {
return null;
}
public String writeValueAsString(Object value) {
return null;
}
}
| 561 | 17.733333 | 87 | java |
codeql | codeql-master/java/ql/test/stubs/jackson-databind-2.10/com/fasterxml/jackson/core/JsonGenerator.java | package com.fasterxml.jackson.core;
public class JsonGenerator {
protected JsonGenerator() {
}
}
| 102 | 13.714286 | 35 | java |
codeql | codeql-master/java/ql/test/stubs/jackson-databind-2.10/com/fasterxml/jackson/core/JsonFactory.java | package com.fasterxml.jackson.core;
import java.io.Writer;
public class JsonFactory {
public JsonFactory() {
}
public JsonGenerator createGenerator(Writer writer) {
return new JsonGenerator();
}
}
| 212 | 15.384615 | 55 | java |
codeql | codeql-master/java/ql/test/stubs/shiro-core-1.4.0/org/apache/shiro/SecurityUtils.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*
* Adapted from Apache Shiro version 1.4.0 as available at
* https://search.maven.org/remotecontent?filepath=org/apache/shiro/shiro-core/1.4.0/shiro-core-1.4.0-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.apache.shiro;
import org.apache.shiro.subject.Subject;
public abstract class SecurityUtils {
public static Subject getSubject() {
return null;
}
} | 1,246 | 33.638889 | 115 | java |
codeql | codeql-master/java/ql/test/stubs/shiro-core-1.4.0/org/apache/shiro/subject/Subject.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*
* Adapted from Apache Shiro version 1.4.0 as available at
* https://search.maven.org/remotecontent?filepath=org/apache/shiro/shiro-core/1.4.0/shiro-core-1.4.0-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.apache.shiro.subject;
public interface Subject {
boolean isPermitted(String permission);
boolean[] isPermitted(String... permissions);
boolean isPermittedAll(String... permissions);
} | 1,280 | 34.583333 | 115 | java |
codeql | codeql-master/java/ql/test/stubs/apache-commons-email-1.6.0/org/apache/commons/mail/SimpleEmail.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.mail;
/**
* This class is used to send simple internet email messages without
* attachments.
*
* @since 1.0
*/
public class SimpleEmail extends Email
{
/**
* Set the content of the mail.
*
* @param msg A String.
* @return An Email.
* @throws EmailException see javax.mail.internet.MimeBodyPart
* for definitions
* @since 1.0
*/
@Override
public Email setMsg(final String msg) throws EmailException
{
return null;
}
}
| 1,320 | 30.452381 | 75 | java |
codeql | codeql-master/java/ql/test/stubs/apache-commons-email-1.6.0/org/apache/commons/mail/EmailException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.mail;
import java.io.PrintStream;
import java.io.PrintWriter;
/**
* Exception thrown when a checked error occurs in commons-email.
* <p>
* Adapted from FunctorException in Commons Collections.
* <p>
* Emulation support for nested exceptions has been removed in
* {@code Email 1.3}, supported by JDK ≥ 1.4.
*
* @since 1.0
*/
public class EmailException extends Exception {
/**
* Constructs a new {@code EmailException} with no detail message.
*/
public EmailException() {
super();
}
/**
* Constructs a new {@code EmailException} with specified detail message.
*
* @param msg the error message.
*/
public EmailException(final String msg) {
super(msg);
}
/**
* Constructs a new {@code EmailException} with specified nested
* {@code Throwable} root cause.
*
* @param rootCause the exception or error that caused this exception to be
* thrown.
*/
public EmailException(final Throwable rootCause) {
super(rootCause);
}
/**
* Constructs a new {@code EmailException} with specified detail message and
* nested {@code Throwable} root cause.
*
* @param msg the error message.
* @param rootCause the exception or error that caused this exception to be
* thrown.
*/
public EmailException(final String msg, final Throwable rootCause) {
super(msg, rootCause);
}
/**
* Prints the stack trace of this exception to the standard error stream.
*/
@Override
public void printStackTrace() {
printStackTrace(System.err);
}
/**
* Prints the stack trace of this exception to the specified stream.
*
* @param out the {@code PrintStream} to use for output
*/
@Override
public void printStackTrace(final PrintStream out) {
}
/**
* Prints the stack trace of this exception to the specified writer.
*
* @param out the {@code PrintWriter} to use for output
*/
@Override
public void printStackTrace(final PrintWriter out) {
synchronized (out) {
super.printStackTrace(out);
}
}
}
| 3,047 | 28.882353 | 80 | java |
codeql | codeql-master/java/ql/test/stubs/apache-commons-email-1.6.0/org/apache/commons/mail/DefaultAuthenticator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.mail;
import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;
/**
* This is a very simple authentication object that can be used for any
* transport needing basic userName and password type authentication.
*
* @since 1.0
*/
public class DefaultAuthenticator extends Authenticator
{
/** Stores the login information for authentication. */
private final PasswordAuthentication authentication;
/**
* Default constructor.
*
* @param userName user name to use when authentication is requested
* @param password password to use when authentication is requested
* @since 1.0
*/
public DefaultAuthenticator(final String userName, final String password)
{
this.authentication = new PasswordAuthentication(userName, password);
}
/**
* Gets the authentication object that will be used to login to the mail
* server.
*
* @return A {@code PasswordAuthentication} object containing the
* login information.
* @since 1.0
*/
@Override
protected PasswordAuthentication getPasswordAuthentication()
{
return this.authentication;
}
}
| 2,004 | 32.983051 | 77 | java |
codeql | codeql-master/java/ql/test/stubs/apache-commons-email-1.6.0/org/apache/commons/mail/Email.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.mail;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import javax.mail.Authenticator;
/**
* The base class for all email messages. This class sets the sender's email
* & name, receiver's email & name, subject, and the sent date.
* <p>
* Subclasses are responsible for setting the message body.
*
* @since 1.0
*/
public abstract class Email {
/**
* Sets the userName and password if authentication is needed. If this method is
* not used, no authentication will be performed.
* <p>
* This method will create a new instance of {@code DefaultAuthenticator} using
* the supplied parameters.
*
* @param userName User name for the SMTP server
* @param password password for the SMTP server
* @see DefaultAuthenticator
* @see #setAuthenticator
* @since 1.0
*/
public void setAuthentication(final String userName, final String password) {
}
/**
* Sets the {@code Authenticator} to be used when authentication is requested
* from the mail server.
* <p>
* This method should be used when your outgoing mail server requires
* authentication. Your mail server must also support RFC2554.
*
* @param newAuthenticator the {@code Authenticator} object.
* @see Authenticator
* @since 1.0
*/
public void setAuthenticator(final Authenticator newAuthenticator) {
}
/**
* Set the hostname of the outgoing mail server.
*
* @param aHostName aHostName
* @throws IllegalStateException if the mail session is already initialized
* @since 1.0
*/
public void setHostName(final String aHostName) {
}
/**
* Set or disable the STARTTLS encryption. Please see EMAIL-105 for the reasons
* of deprecation.
*
* @deprecated since 1.3, use setStartTLSEnabled() instead
* @param withTLS true if STARTTLS requested, false otherwise
* @since 1.1
*/
@Deprecated
public void setTLS(final boolean withTLS) {
}
/**
* Set or disable the STARTTLS encryption.
*
* @param startTlsEnabled true if STARTTLS requested, false otherwise
* @return An Email.
* @throws IllegalStateException if the mail session is already initialized
* @since 1.3
*/
public Email setStartTLSEnabled(final boolean startTlsEnabled) {
return null;
}
/**
* Set or disable the required STARTTLS encryption.
* <p>
* Defaults to {@link #smtpPort}; can be overridden by using
* {@link #setSmtpPort(int)}
*
* @param startTlsRequired true if STARTTLS requested, false otherwise
* @return An Email.
* @throws IllegalStateException if the mail session is already initialized
* @since 1.3
*/
public Email setStartTLSRequired(final boolean startTlsRequired) {
return null;
}
/**
* Set the non-SSL port number of the outgoing mail server.
*
* @param aPortNumber aPortNumber
* @throws IllegalArgumentException if the port number is < 1
* @throws IllegalStateException if the mail session is already initialized
* @since 1.0
* @see #setSslSmtpPort(String)
*/
public void setSmtpPort(final int aPortNumber) {
}
/**
* Set the FROM field of the email to use the specified address. The email
* address will also be used as the personal name. The name will be encoded by
* the charset of {@link #setCharset(java.lang.String) setCharset()}. If it is
* not set, it will be encoded using the Java platform's default charset
* (UTF-16) if it contains non-ASCII characters; otherwise, it is used as is.
*
* @param email A String.
* @return An Email.
* @throws EmailException Indicates an invalid email address.
* @since 1.0
*/
public Email setFrom(final String email) throws EmailException {
return null;
}
/**
* Set the FROM field of the email to use the specified address and the
* specified personal name. The name will be encoded by the charset of
* {@link #setCharset(java.lang.String) setCharset()}. If it is not set, it will
* be encoded using the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
* @param email A String.
* @param name A String.
* @return An Email.
* @throws EmailException Indicates an invalid email address.
* @since 1.0
*/
public Email setFrom(final String email, final String name) throws EmailException {
return null;
}
/**
* Set the FROM field of the email to use the specified address, personal name,
* and charset encoding for the name.
*
* @param email A String.
* @param name A String.
* @param charset The charset to encode the name with.
* @return An Email.
* @throws EmailException Indicates an invalid email address or charset.
* @since 1.1
*/
public Email setFrom(final String email, final String name, final String charset) throws EmailException {
return null;
}
/**
* Add a recipient TO to the email. The email address will also be used as the
* personal name. The name will be encoded by the charset of
* {@link #setCharset(java.lang.String) setCharset()}. If it is not set, it will
* be encoded using the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
* @param email A String.
* @return An Email.
* @throws EmailException Indicates an invalid email address.
* @since 1.0
*/
public Email addTo(final String email) throws EmailException {
return null;
}
/**
* Add a list of TO recipients to the email. The email addresses will also be
* used as the personal names. The names will be encoded by the charset of
* {@link #setCharset(java.lang.String) setCharset()}. If it is not set, it will
* be encoded using the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
* @param emails A String array.
* @return An Email.
* @throws EmailException Indicates an invalid email address.
* @since 1.3
*/
public Email addTo(final String... emails) throws EmailException {
return null;
}
/**
* Add a recipient TO to the email using the specified address and the specified
* personal name. The name will be encoded by the charset of
* {@link #setCharset(java.lang.String) setCharset()}. If it is not set, it will
* be encoded using the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
* @param email A String.
* @param name A String.
* @return An Email.
* @throws EmailException Indicates an invalid email address.
* @since 1.0
*/
public Email addTo(final String email, final String name) throws EmailException {
return null;
}
/**
* Add a recipient TO to the email using the specified address, personal name,
* and charset encoding for the name.
*
* @param email A String.
* @param name A String.
* @param charset The charset to encode the name with.
* @return An Email.
* @throws EmailException Indicates an invalid email address or charset.
* @since 1.1
*/
public Email addTo(final String email, final String name, final String charset) throws EmailException {
return null;
}
/**
* Add a recipient CC to the email. The email address will also be used as the
* personal name. The name will be encoded by the charset of
* {@link #setCharset(java.lang.String) setCharset()}. If it is not set, it will
* be encoded using the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
* @param email A String.
* @return An Email.
* @throws EmailException Indicates an invalid email address.
* @since 1.0
*/
public Email addCc(final String email) throws EmailException {
return null;
}
/**
* Add an array of CC recipients to the email. The email addresses will also be
* used as the personal name. The names will be encoded by the charset of
* {@link #setCharset(java.lang.String) setCharset()}. If it is not set, it will
* be encoded using the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
* @param emails A String array.
* @return An Email.
* @throws EmailException Indicates an invalid email address.
* @since 1.3
*/
public Email addCc(final String... emails) throws EmailException {
return null;
}
/**
* Add a recipient CC to the email using the specified address and the specified
* personal name. The name will be encoded by the charset of
* {@link #setCharset(java.lang.String) setCharset()}. If it is not set, it will
* be encoded using the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
* @param email A String.
* @param name A String.
* @return An Email.
* @throws EmailException Indicates an invalid email address.
* @since 1.0
*/
public Email addCc(final String email, final String name) throws EmailException {
return null;
}
/**
* Add a recipient CC to the email using the specified address, personal name,
* and charset encoding for the name.
*
* @param email A String.
* @param name A String.
* @param charset The charset to encode the name with.
* @return An Email.
* @throws EmailException Indicates an invalid email address or charset.
* @since 1.1
*/
public Email addCc(final String email, final String name, final String charset) throws EmailException {
return null;
}
/**
* Add a blind BCC recipient to the email. The email address will also be used
* as the personal name. The name will be encoded by the charset of
* {@link #setCharset(java.lang.String) setCharset()}. If it is not set, it will
* be encoded using the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
* @param email A String.
* @return An Email.
* @throws EmailException Indicates an invalid email address
* @since 1.0
*/
public Email addBcc(final String email) throws EmailException {
return null;
}
/**
* Add an array of blind BCC recipients to the email. The email addresses will
* also be used as the personal name. The names will be encoded by the charset
* of {@link #setCharset(java.lang.String) setCharset()}. If it is not set, it
* will be encoded using the Java platform's default charset (UTF-16) if it
* contains non-ASCII characters; otherwise, it is used as is.
*
* @param emails A String array.
* @return An Email.
* @throws EmailException Indicates an invalid email address
* @since 1.3
*/
public Email addBcc(final String... emails) throws EmailException {
return null;
}
/**
* Add a blind BCC recipient to the email using the specified address and the
* specified personal name. The name will be encoded by the charset of
* {@link #setCharset(java.lang.String) setCharset()}. If it is not set, it will
* be encoded using the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
* @param email A String.
* @param name A String.
* @return An Email.
* @throws EmailException Indicates an invalid email address
* @since 1.0
*/
public Email addBcc(final String email, final String name) throws EmailException {
return null;
}
/**
* Add a blind BCC recipient to the email using the specified address, personal
* name, and charset encoding for the name.
*
* @param email A String.
* @param name A String.
* @param charset The charset to encode the name with.
* @return An Email.
* @throws EmailException Indicates an invalid email address
* @since 1.1
*/
public Email addBcc(final String email, final String name, final String charset) throws EmailException {
return null;
}
/**
* Add a reply to address to the email. The email address will also be used as
* the personal name. The name will be encoded by the charset of
* {@link #setCharset(java.lang.String) setCharset()}. If it is not set, it will
* be encoded using the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
* @param email A String.
* @return An Email.
* @throws EmailException Indicates an invalid email address
* @since 1.0
*/
public Email addReplyTo(final String email) throws EmailException {
return null;
}
/**
* Add a reply to address to the email using the specified address and the
* specified personal name. The name will be encoded by the charset of
* {@link #setCharset(java.lang.String) setCharset()}. If it is not set, it will
* be encoded using the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
* @param email A String.
* @param name A String.
* @return An Email.
* @throws EmailException Indicates an invalid email address
* @since 1.0
*/
public Email addReplyTo(final String email, final String name) throws EmailException {
return null;
}
/**
* Add a reply to address to the email using the specified address, personal
* name, and charset encoding for the name.
*
* @param email A String.
* @param name A String.
* @param charset The charset to encode the name with.
* @return An Email.
* @throws EmailException Indicates an invalid email address or charset.
* @since 1.1
*/
public Email addReplyTo(final String email, final String name, final String charset) throws EmailException {
return null;
}
/**
* Used to specify the mail headers. Example:
*
* X-Mailer: Sendmail, X-Priority: 1( highest ) or 2( high ) 3( normal ) 4( low
* ) and 5( lowest ) Disposition-Notification-To: user@domain.net
*
* @param map A Map.
* @throws IllegalArgumentException if either of the provided header / value is
* null or empty
* @since 1.0
*/
public void setHeaders(final Map<String, String> map) {
}
/**
* Adds a header ( name, value ) to the headers Map.
*
* @param name A String with the name.
* @param value A String with the value.
* @since 1.0
* @throws IllegalArgumentException if either {@code name} or {@code value} is
* null or empty
*/
public void addHeader(final String name, final String value) {
}
/**
* Gets the specified header.
*
* @param header A string with the header.
* @return The value of the header, or null if no such header.
* @since 1.5
*/
public String getHeader(final String header) {
return null;
}
/**
* Gets all headers on an Email.
*
* @return a Map of all headers.
* @since 1.5
*/
public Map<String, String> getHeaders() {
return null;
}
/**
* Sets the email subject. Replaces end-of-line characters with spaces.
*
* @param aSubject A String.
* @return An Email.
* @since 1.0
*/
public Email setSubject(final String aSubject) {
return null;
}
/**
* Gets the "bounce address" of this email.
*
* @return the bounce address as string
* @since 1.4
*/
public String getBounceAddress() {
return null;
}
/**
* Set the "bounce address" - the address to which undeliverable messages will
* be returned. If this value is never set, then the message will be sent to the
* address specified with the System property "mail.smtp.from", or if that value
* is not set, then to the "from" address.
*
* @param email A String.
* @return An Email.
* @throws IllegalStateException if the mail session is already initialized
* @since 1.0
*/
public Email setBounceAddress(final String email) {
return null;
}
/**
* Define the content of the mail. It should be overridden by the subclasses.
*
* @param msg A String.
* @return An Email.
* @throws EmailException generic exception.
* @since 1.0
*/
public abstract Email setMsg(String msg) throws EmailException;
/**
* Does the work of actually building the MimeMessage. Please note that a user
* rarely calls this method directly and only if he/she is interested in the
* sending the underlying MimeMessage without commons-email.
*
* @throws IllegalStateException if the MimeMessage was already built
* @throws EmailException if there was an error.
* @since 1.0
*/
public void buildMimeMessage() throws EmailException {
}
/**
* Sends the previously created MimeMessage to the SMTP server.
*
* @return the message id of the underlying MimeMessage
* @throws IllegalArgumentException if the MimeMessage has not been created
* @throws EmailException the sending failed
*/
public String sendMimeMessage() throws EmailException {
return null;
}
/**
* Sends the email. Internally we build a MimeMessage which is afterwards sent
* to the SMTP server.
*
* @return the message id of the underlying MimeMessage
* @throws IllegalStateException if the MimeMessage was already built, ie
* {@link #buildMimeMessage()} was already called
* @throws EmailException the sending failed
*/
public String send() throws EmailException {
return null;
}
/**
* Sets the sent date for the email. The sent date will default to the current
* date if not explicitly set.
*
* @param date Date to use as the sent date on the email
* @since 1.0
*/
public void setSentDate(final Date date) {
}
/**
* Gets the sent date for the email.
*
* @return date to be used as the sent date for the email
* @since 1.0
*/
public Date getSentDate() {
return null;
}
/**
* Gets the subject of the email.
*
* @return email subject
*/
public String getSubject() {
return null;
}
/**
* Gets the host name of the SMTP server,
*
* @return host name
*/
public String getHostName() {
return null;
}
/**
* Gets the listening port of the SMTP server.
*
* @return smtp port
*/
public String getSmtpPort() {
return null;
}
/**
* Gets whether the client is configured to require STARTTLS.
*
* @return true if using STARTTLS for authentication, false otherwise
* @since 1.3
*/
public boolean isStartTLSRequired() {
return false;
}
/**
* Gets whether the client is configured to try to enable STARTTLS.
*
* @return true if using STARTTLS for authentication, false otherwise
* @since 1.3
*/
public boolean isStartTLSEnabled() {
return false;
}
/**
* Gets whether the client is configured to try to enable STARTTLS. See
* EMAIL-105 for reason of deprecation.
*
* @deprecated since 1.3, use isStartTLSEnabled() instead
* @return true if using STARTTLS for authentication, false otherwise
* @since 1.1
*/
@Deprecated
public boolean isTLS() {
return false;
}
/**
* Set details regarding "pop3 before smtp" authentication.
*
* @param newPopBeforeSmtp Whether or not to log into pop3 server before sending
* mail.
* @param newPopHost The pop3 host to use.
* @param newPopUsername The pop3 username.
* @param newPopPassword The pop3 password.
* @since 1.0
*/
public void setPopBeforeSmtp(final boolean newPopBeforeSmtp, final String newPopHost, final String newPopUsername,
final String newPopPassword) {
}
/**
* Returns whether SSL/TLS encryption for the transport is currently enabled
* (SMTPS/POPS). See EMAIL-105 for reason of deprecation.
*
* @deprecated since 1.3, use isSSLOnConnect() instead
* @return true if SSL enabled for the transport
*/
@Deprecated
public boolean isSSL() {
return false;
}
/**
* Returns whether SSL/TLS encryption for the transport is currently enabled
* (SMTPS/POPS).
*
* @return true if SSL enabled for the transport
* @since 1.3
*/
public boolean isSSLOnConnect() {
return false;
}
/**
* Sets whether SSL/TLS encryption should be enabled for the SMTP transport upon
* connection (SMTPS/POPS). See EMAIL-105 for reason of deprecation.
*
* @deprecated since 1.3, use setSSLOnConnect() instead
* @param ssl whether to enable the SSL transport
*/
@Deprecated
public void setSSL(final boolean ssl) {
}
/**
* Sets whether SSL/TLS encryption should be enabled for the SMTP transport upon
* connection (SMTPS/POPS). Takes precedence over
* {@link #setStartTLSRequired(boolean)}
* <p>
* Defaults to {@link #sslSmtpPort}; can be overridden by using
* {@link #setSslSmtpPort(String)}
*
* @param ssl whether to enable the SSL transport
* @return An Email.
* @throws IllegalStateException if the mail session is already initialized
* @since 1.3
*/
public Email setSSLOnConnect(final boolean ssl) {
return null;
}
/**
* Is the server identity checked as specified by RFC 2595
*
* @return true if the server identity is checked
* @since 1.3
*/
public boolean isSSLCheckServerIdentity() {
return false;
}
/**
* Sets whether the server identity is checked as specified by RFC 2595
*
* @param sslCheckServerIdentity whether to enable server identity check
* @return An Email.
* @throws IllegalStateException if the mail session is already initialized
* @since 1.3
*/
public Email setSSLCheckServerIdentity(final boolean sslCheckServerIdentity) {
return null;
}
/**
* Returns the current SSL port used by the SMTP transport.
*
* @return the current SSL port used by the SMTP transport
*/
public String getSslSmtpPort() {
return null;
}
/**
* Sets the SSL port to use for the SMTP transport. Defaults to the standard
* port, 465.
*
* @param sslSmtpPort the SSL port to use for the SMTP transport
* @throws IllegalStateException if the mail session is already initialized
* @see #setSmtpPort(int)
*/
public void setSslSmtpPort(final String sslSmtpPort) {
}
/**
* If partial sending of email enabled.
*
* @return true if sending partial email is enabled
* @since 1.3.2
*/
public boolean isSendPartial() {
return false;
}
/**
* Sets whether the email is partially send in case of invalid addresses.
* <p>
* In case the mail server rejects an address as invalid, the call to
* {@link #send()} may throw a {@link javax.mail.SendFailedException}, even if
* partial send mode is enabled (emails to valid addresses will be transmitted).
* In case the email server does not reject invalid addresses immediately, but
* return a bounce message, no exception will be thrown by the {@link #send()}
* method.
*
* @param sendPartial whether to enable partial send mode
* @return An Email.
* @throws IllegalStateException if the mail session is already initialized
* @since 1.3.2
*/
public Email setSendPartial(final boolean sendPartial) {
return null;
}
/**
* Get the socket connection timeout value in milliseconds.
*
* @return the timeout in milliseconds.
* @since 1.2
*/
public int getSocketConnectionTimeout() {
return -1;
}
/**
* Set the socket connection timeout value in milliseconds. Default is a 60
* second timeout.
*
* @param socketConnectionTimeout the connection timeout
* @throws IllegalStateException if the mail session is already initialized
* @since 1.2
*/
public void setSocketConnectionTimeout(final int socketConnectionTimeout) {
}
/**
* Get the socket I/O timeout value in milliseconds.
*
* @return the socket I/O timeout
* @since 1.2
*/
public int getSocketTimeout() {
return -1;
}
/**
* Set the socket I/O timeout value in milliseconds. Default is 60 second
* timeout.
*
* @param socketTimeout the socket I/O timeout
* @throws IllegalStateException if the mail session is already initialized
* @since 1.2
*/
public void setSocketTimeout(final int socketTimeout) {
}
}
| 26,846 | 32.308933 | 118 | java |
codeql | codeql-master/java/ql/test/stubs/hamcrest-2.2/org/hamcrest/MatcherAssert.java | package org.hamcrest;
public class MatcherAssert {
public static <T> void assertThat(T actual, Object matcher) {
assertThat("", actual, matcher);
}
public static <T> void assertThat(String reason, T actual, Object matcher) {
}
public static void assertThat(String reason, boolean assertion) {
}
}
| 341 | 21.8 | 80 | java |
codeql | codeql-master/java/ql/test/stubs/hamcrest-2.2/org/hamcrest/core/IsNull.java | package org.hamcrest.core;
public class IsNull {
public static Object notNullValue() {
return new String();
}
public static <T> Object notNullValue(Class<T> type) {
return new String();
}
}
| 226 | 15.214286 | 58 | java |
codeql | codeql-master/java/ql/test/stubs/amazon-aws-sdk-1.11.700/com/amazonaws/auth/BasicAWSCredentials.java | /*
* Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.auth;
/**
* Basic implementation of the AWSCredentials interface that allows callers to
* pass in the AWS access key and secret access in the constructor.
*/
public class BasicAWSCredentials implements AWSCredentials {
/**
* Constructs a new BasicAWSCredentials object, with the specified AWS
* access key and AWS secret key.
*
* @param accessKey
* The AWS access key.
* @param secretKey
* The AWS secret access key.
*/
public BasicAWSCredentials(String accessKey, String secretKey) {
}
/* (non-Javadoc)
* @see com.amazonaws.auth.AWSCredentials#getAWSAccessKeyId()
*/
public String getAWSAccessKeyId() {
return null;
}
/* (non-Javadoc)
* @see com.amazonaws.auth.AWSCredentials#getAWSSecretKey()
*/
public String getAWSSecretKey() {
return null;
}
}
| 1,498 | 28.98 | 79 | java |
codeql | codeql-master/java/ql/test/stubs/amazon-aws-sdk-1.11.700/com/amazonaws/auth/AWSCredentials.java | /*
* Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.auth;
/**
* Provides access to the AWS credentials used for accessing AWS services: AWS
* access key ID and secret access key. These credentials are used to securely
* sign requests to AWS services.
* <p>
* A basic implementation of this interface is provided in
* {@link BasicAWSCredentials}, but callers are free to provide their own
* implementation, for example, to load AWS credentials from an encrypted file.
* <p>
* For more details on AWS access keys, see: <a href="http://docs.amazonwebservices.com/AWSSecurityCredentials/1.0/AboutAWSCredentials.html#AccessKeys"
* >http://docs.amazonwebservices.com/AWSSecurityCredentials/1.0/
* AboutAWSCredentials.html#AccessKeys</a>
*/
public interface AWSCredentials {
/**
* Returns the AWS access key ID for this credentials object.
*
* @return The AWS access key ID for this credentials object.
*/
public String getAWSAccessKeyId();
/**
* Returns the AWS secret access key for this credentials object.
*
* @return The AWS secret access key for this credentials object.
*/
public String getAWSSecretKey();
}
| 1,741 | 36.06383 | 151 | java |
codeql | codeql-master/java/ql/test/stubs/simple-xml-2.7.1/org/simpleframework/xml/Serializer.java | /*
* Serializer.java July 2006
*
* Copyright (C) 2006, Niall Gallagher <niallg@users.sf.net>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Adapted from Simple XML serialization framework version 2.7.1 as available at
* https://search.maven.org/remotecontent?filepath=org/simpleframework/simple-xml/2.7.1/simple-xml-2.7.1-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.simpleframework.xml;
import java.io.InputStream;
import java.io.Reader;
import java.io.File;
public interface Serializer {
<T> T read(Class<? extends T> type, String source) throws Exception;
<T> T read(Class<? extends T> type, File source) throws Exception;
<T> T read(Class<? extends T> type, InputStream source) throws Exception;
<T> T read(Class<? extends T> type, Reader source) throws Exception;
<T> T read(Class<? extends T> type, String source, boolean strict) throws Exception;
<T> T read(Class<? extends T> type, File source, boolean strict) throws Exception;
<T> T read(Class<? extends T> type, InputStream source, boolean strict) throws Exception;
<T> T read(Class<? extends T> type, Reader source, boolean strict) throws Exception;
<T> T read(T value, String source) throws Exception;
<T> T read(T value, File source) throws Exception;
<T> T read(T value, InputStream source) throws Exception;
<T> T read(T value, Reader source) throws Exception;
<T> T read(T value, String source, boolean strict) throws Exception;
<T> T read(T value, File source, boolean strict) throws Exception;
<T> T read(T value, InputStream source, boolean strict) throws Exception;
<T> T read(T value, Reader source, boolean strict) throws Exception;
boolean validate(Class type, String source) throws Exception;
boolean validate(Class type, File source) throws Exception;
boolean validate(Class type, InputStream source) throws Exception;
boolean validate(Class type, Reader source) throws Exception;
boolean validate(Class type, String source, boolean strict) throws Exception;
boolean validate(Class type, File source, boolean strict) throws Exception;
boolean validate(Class type, InputStream source, boolean strict) throws Exception;
boolean validate(Class type, Reader source, boolean strict) throws Exception;
}
| 2,862 | 34.345679 | 118 | java |
codeql | codeql-master/java/ql/test/stubs/simple-xml-2.7.1/org/simpleframework/xml/core/Persister.java | /*
* Persister.java July 2006
*
* Copyright (C) 2006, Niall Gallagher <niallg@users.sf.net>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Adapted from Simple XML serialization framework version 2.7.1 as available at
* https://search.maven.org/remotecontent?filepath=org/simpleframework/simple-xml/2.7.1/simple-xml-2.7.1-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.simpleframework.xml.core;
import java.io.File;
import java.io.InputStream;
import java.io.Reader;
import org.simpleframework.xml.Serializer;
public class Persister implements Serializer {
public <T> T read(Class<? extends T> type, String source) throws Exception {return null;}
public <T> T read(Class<? extends T> type, File source) throws Exception {return null;}
public <T> T read(Class<? extends T> type, InputStream source) throws Exception {return null;}
public <T> T read(Class<? extends T> type, Reader source) throws Exception {return null;}
public <T> T read(Class<? extends T> type, String source, boolean strict) throws Exception {return null;}
public <T> T read(Class<? extends T> type, File source, boolean strict) throws Exception {return null;}
public <T> T read(Class<? extends T> type, InputStream source, boolean strict) throws Exception {return null;}
public <T> T read(Class<? extends T> type, Reader source, boolean strict) throws Exception {return null;}
public <T> T read(T value, String source) throws Exception{return null;}
public <T> T read(T value, File source) throws Exception{return null;}
public <T> T read(T value, InputStream source) throws Exception{return null;}
public <T> T read(T value, Reader source) throws Exception{return null;}
public <T> T read(T value, String source, boolean strict) throws Exception{return null;}
public <T> T read(T value, File source, boolean strict) throws Exception{return null;}
public <T> T read(T value, InputStream source, boolean strict) throws Exception{return null;}
public <T> T read(T value, Reader source, boolean strict) throws Exception{return null;}
public boolean validate(Class type, String source) throws Exception {return false;}
public boolean validate(Class type, File source) throws Exception {return false;}
public boolean validate(Class type, InputStream source) throws Exception {return false;}
public boolean validate(Class type, Reader source) throws Exception {return false;}
public boolean validate(Class type, String source, boolean strict) throws Exception {return false;}
public boolean validate(Class type, File source, boolean strict) throws Exception {return false;}
public boolean validate(Class type, InputStream source, boolean strict) throws Exception {return false;}
public boolean validate(Class type, Reader source, boolean strict) throws Exception {return false;}
}
| 3,472 | 40.843373 | 118 | java |
codeql | codeql-master/java/ql/test/stubs/simple-xml-2.7.1/org/simpleframework/xml/stream/Formatter.java | /*
* Formatter.java July 2006
*
* Copyright (C) 2006, Niall Gallagher <niallg@users.sf.net>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Adapted from Simple XML serialization framework version 2.7.1 as available at
* https://search.maven.org/remotecontent?filepath=org/simpleframework/simple-xml/2.7.1/simple-xml-2.7.1-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.simpleframework.xml.stream;
import java.io.Writer;
public class Formatter {
public void format(String source, Writer writer) {}
public void format(String source) {}
}
| 1,136 | 30.583333 | 118 | java |
codeql | codeql-master/java/ql/test/stubs/simple-xml-2.7.1/org/simpleframework/xml/stream/StreamProvider.java | /*
* StreamProvider.java January 2010
*
* Copyright (C) 2010, Niall Gallagher <niallg@users.sf.net>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Adapted from Simple XML serialization framework version 2.7.1 as available at
* https://search.maven.org/remotecontent?filepath=org/simpleframework/simple-xml/2.7.1/simple-xml-2.7.1-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.simpleframework.xml.stream;
import java.io.InputStream;
import java.io.Reader;
public class StreamProvider implements Provider {
public void provide(InputStream source) throws Exception {}
public void provide(Reader source) throws Exception {}
}
| 1,216 | 32.805556 | 118 | java |
codeql | codeql-master/java/ql/test/stubs/simple-xml-2.7.1/org/simpleframework/xml/stream/NodeBuilder.java | /*
* NodeBuilder.java July 2006
*
* Copyright (C) 2006, Niall Gallagher <niallg@users.sf.net>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Adapted from Simple XML serialization framework version 2.7.1 as available at
* https://search.maven.org/remotecontent?filepath=org/simpleframework/simple-xml/2.7.1/simple-xml-2.7.1-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.simpleframework.xml.stream;
import java.io.InputStream;
import java.io.Reader;
public final class NodeBuilder {
public static void read(InputStream source) throws Exception {}
public static void read(Reader source) throws Exception {}
}
| 1,201 | 32.388889 | 118 | java |
codeql | codeql-master/java/ql/test/stubs/simple-xml-2.7.1/org/simpleframework/xml/stream/DocumentProvider.java | /*
* DocumentProvider.java January 2010
*
* Copyright (C) 2010, Niall Gallagher <niallg@users.sf.net>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Adapted from Simple XML serialization framework version 2.7.1 as available at
* https://search.maven.org/remotecontent?filepath=org/simpleframework/simple-xml/2.7.1/simple-xml-2.7.1-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.simpleframework.xml.stream;
import java.io.InputStream;
import java.io.Reader;
public class DocumentProvider implements Provider {
public void provide(InputStream source) throws Exception {}
public void provide(Reader source) throws Exception {}
}
| 1,222 | 32.972222 | 118 | java |
codeql | codeql-master/java/ql/test/stubs/simple-xml-2.7.1/org/simpleframework/xml/stream/Provider.java | /*
* Provider.java January 2010
*
* Copyright (C) 2010, Niall Gallagher <niallg@users.sf.net>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Adapted from Simple XML serialization framework version 2.7.1 as available at
* https://search.maven.org/remotecontent?filepath=org/simpleframework/simple-xml/2.7.1/simple-xml-2.7.1-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package org.simpleframework.xml.stream;
import java.io.InputStream;
import java.io.Reader;
interface Provider {
void provide(InputStream source) throws Exception;
void provide(Reader source) throws Exception;
}
| 1,163 | 31.333333 | 118 | java |
codeql | codeql-master/java/ql/test/stubs/esapi-2.0.1/org/owasp/esapi/Encoder.java | package org.owasp.esapi;
public interface Encoder {
String encodeForLDAP(String input);
}
| 93 | 14.666667 | 37 | java |
codeql | codeql-master/java/ql/test/stubs/esapi-2.0.1/org/owasp/esapi/reference/DefaultEncoder.java | package org.owasp.esapi.reference;
import org.owasp.esapi.Encoder;
public class DefaultEncoder implements Encoder {
public static Encoder getInstance() { return null; }
public String encodeForLDAP(String input) { return null; }
}
| 236 | 25.333333 | 60 | java |
codeql | codeql-master/java/ql/test/stubs/guice-servlet-4.2.2/com/google/inject/servlet/RequestParameters.java | /*
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Adapted from Guice Servlet version 4.2.2 as available at
* https://search.maven.org/classic/remotecontent?filepath=com/google/inject/extensions/guice-servlet/4.2.2/guice-servlet-4.2.2-sources.jar
* Only relevant stubs of this file have been retained for test purposes.
*/
package com.google.inject.servlet;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Apply this to field or parameters of type {@code Map<String, String[]>} when you want the HTTP
* request parameter map to be injected.
*
* @author crazybob@google.com (Bob Lee)
*/
@Retention(RUNTIME)
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
public @interface RequestParameters {}
| 1,416 | 34.425 | 141 | java |
codeql | codeql-master/java/ql/test/stubs/mvel2-2.4.7/org/mvel2/MVEL.java | package org.mvel2;
import java.io.Serializable;
public class MVEL {
public static Object eval(String expression) { return null; }
public static Serializable compileExpression(String expression) { return null; }
public static Object executeExpression(Object compiledExpression) { return null; }
} | 303 | 32.777778 | 84 | java |
codeql | codeql-master/java/ql/test/stubs/mvel2-2.4.7/org/mvel2/ParserContext.java | package org.mvel2;
public class ParserContext {} | 49 | 15.666667 | 29 | java |
codeql | codeql-master/java/ql/test/stubs/mvel2-2.4.7/org/mvel2/MVELRuntime.java | package org.mvel2;
import org.mvel2.compiler.CompiledExpression;
import org.mvel2.integration.VariableResolverFactory;
public class MVELRuntime {
public static Object execute(boolean debugger, CompiledExpression expression, Object ctx, VariableResolverFactory variableFactory) { return null; }
} | 299 | 36.5 | 149 | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.