id stringlengths 7 14 | text stringlengths 1 106k |
|---|---|
3937364_7 | public boolean mustSkipAccountSetup() {
if (skipSetup == null) {
SettingValue accountSetupNode = settingService.get(Context.GLOBAL, Scope.GLOBAL, ACCOUNT_SETUP_NODE);
String propertySetupSkip = PropertyManager.getProperty(ACCOUNT_SETUP_SKIP_PROPERTY);
if (propertySetupSkip == null) {
LOG.debug("Prop... |
3937364_8 | @Override
public void updateBrandingInformation(Branding branding) throws Exception {
updateCompanyName(branding.getCompanyName());
updateTopBarTheme(branding.getTopBarTheme());
updateLogo(branding.getLogo());
} |
3937364_9 | @Override
public void updateBrandingInformation(Branding branding) throws Exception {
updateCompanyName(branding.getCompanyName());
updateTopBarTheme(branding.getTopBarTheme());
updateLogo(branding.getLogo());
} |
3943003_0 | public String filePathFromURL(URL url) {
if (url == null) {
throw new IllegalArgumentException("url is null");
}
// Old solution does not deal well with "<" | ">" | "#" | "%" |
// <"> "{" | "}" | "|" | "\" | "^" | "[" | "]" | "`" since they may occur
// inside an URL but are prohibited for an URI. See
... |
3943003_1 | public String filePathFromURL(URL url) {
if (url == null) {
throw new IllegalArgumentException("url is null");
}
// Old solution does not deal well with "<" | ">" | "#" | "%" |
// <"> "{" | "}" | "|" | "\" | "^" | "[" | "]" | "`" since they may occur
// inside an URL but are prohibited for an URI. See
... |
3943003_2 | public String filePathFromURL(URL url) {
if (url == null) {
throw new IllegalArgumentException("url is null");
}
// Old solution does not deal well with "<" | ">" | "#" | "%" |
// <"> "{" | "}" | "|" | "\" | "^" | "[" | "]" | "`" since they may occur
// inside an URL but are prohibited for an URI. See
... |
3946094_0 | @Override
public String sayHello() {
return "Hello";
} |
3946094_1 | @Override
public String sayHello() {
DroolsTest droolsTest = new DroolsTest();
droolsTest.work();
DecisionTableTest decisionTableTest = new DecisionTableTest();
decisionTableTest.work();
ProcessTest processTest = new ProcessTest();
processTest.work();
return "Hello";
} |
3946094_2 | @Override
public String sayHello() {
Pojo pojo = new Pojo();
pojo.version();
return "Hello";
} |
3946094_3 | @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public String sayHello(String user) {
System.out.println("hello");
Session session = doWork(user);
//session.logout();
return "Hello";
} |
3946094_4 | @Override
public String sayHello() {
System.out.println("sayHello");
return "Hello";
} |
3946094_5 | @Override
public String sayHello() {
Group group = findGroup();
System.out.println(group);
return "Hello";
} |
3946094_6 | public void addOne() {
count++;
System.out.println("[" + Thread.currentThread().getName() + "] count = " + count);
} |
3951979_0 | protected List<DataPoint> downsample(long duration, Aggregator aggregator, List<DataPoint> points) {
List<DataPoint> result = Lists.newArrayList();
int offset = 0;
long maxSampleTimestamp = 0;
for (int i = 0; i < points.size(); i++) {
DataPoint dataPoint = points.get(i);
if (dataPoint.getTimestamp() > m... |
3978781_0 | @VisibleForTesting
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public int size() {
return mValues.size();
} |
3978781_1 | @VisibleForTesting
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public int size() {
return mValues.size();
} |
3978781_2 | @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@TypeConverter
public static @NonNull Data fromByteArray(@NonNull byte[] bytes) throws IllegalStateException {
if (bytes.length > MAX_DATA_BYTES) {
throw new IllegalStateException(
"Data cannot occupy more than " + MAX_DATA_BYTES + " bytes when ser... |
3978781_3 | void bindService() {
if (mHasBound) {
throw new IllegalStateException(
"Each BufferedServiceConnection can only be bound once.");
}
mHasBound = true;
mContext.bindService(mBindIntent, mConnection, mFlags);
} |
3978781_4 | void bindService() {
if (mHasBound) {
throw new IllegalStateException(
"Each BufferedServiceConnection can only be bound once.");
}
mHasBound = true;
mContext.bindService(mBindIntent, mConnection, mFlags);
} |
3978781_5 | void bindService() {
if (mHasBound) {
throw new IllegalStateException(
"Each BufferedServiceConnection can only be bound once.");
}
mHasBound = true;
mContext.bindService(mBindIntent, mConnection, mFlags);
} |
3978781_6 | void unbind() {
if (!mHasBound) {
throw new IllegalStateException("bindService must be called before unbind");
}
mIsDead = true;
mContext.unbindService(mConnection);
} |
3978781_7 | void send(Message message) {
if (mIsDead) {
return;
}
if (mMessenger == null) {
while (mBuffer.size() >= MAX_BUFFER_SIZE) {
mBuffer.poll();
}
mBuffer.add(message);
return;
}
trySendMessage(message);
} |
3978781_8 | @Override
public void setStates(@NonNull Collection<KeyedAppState> states) {
setStates(states, false);
} |
3978781_9 | @Override
public void setStates(@NonNull Collection<KeyedAppState> states) {
setStates(states, false);
} |
3988459_0 | @Override
public Response get(Request req) {
return proxyRequest(req, new GetMethod());
} |
3988459_1 | @Override
public Response get(Request req) {
return proxyRequest(req, new GetMethod());
} |
3988459_2 | @Override
public Response get(Request req) {
return proxyRequest(req, new GetMethod());
} |
3988459_3 | @Override
public Response get(Request req) {
return proxyRequest(req, new GetMethod());
} |
3988459_4 | @Override
public Response get(Request req) {
return proxyRequest(req, new GetMethod());
} |
3988459_5 | @Override
public Response get(Request req) {
return proxyRequest(req, new GetMethod());
} |
3988459_6 | @Override
public Response get(Request req) {
return proxyRequest(req, new GetMethod());
} |
3988459_7 | @Override
public Response get(Request req) {
return proxyRequest(req, new GetMethod());
} |
3988459_8 | @Override
public Response post(Request req) {
PostMethod m = new PostMethod();
setRequestRepresentation(req, m);
return proxyRequest(req, m);
} |
3988459_9 | @Override
public Response put(Request req) {
PutMethod m = new PutMethod();
setRequestRepresentation(req, m);
return proxyRequest(req, m);
} |
3993813_0 | public static XAResourceProducer get(final String uniqueName) {
if (uniqueName != null) {
for (ProducerHolder holder : resources) {
if (!holder.isInitialized())
continue;
if (uniqueName.equals(holder.getUniqueName()))
return holder.producer;
}
... |
3993813_1 | public static XAResourceProducer get(final String uniqueName) {
if (uniqueName != null) {
for (ProducerHolder holder : resources) {
if (!holder.isInitialized())
continue;
if (uniqueName.equals(holder.getUniqueName()))
return holder.producer;
}
... |
3993813_2 | public static Set<String> getResourcesUniqueNames() {
final Set<String> names = new HashSet<String>(resources.size());
for (ProducerHolder holder : resources) {
if (!holder.isInitialized())
continue;
names.add(holder.getUniqueName());
}
return Collections.unmodifiableSet(name... |
3993813_3 | public static void register(XAResourceProducer producer) throws RecoveryException {
try {
final boolean alreadyRunning = TransactionManagerServices.isTransactionManagerRunning();
final ProducerHolder holder = alreadyRunning ? new InitializableProducerHolder(producer) : new ProducerHolder(producer);
... |
3993813_4 | public static void register(XAResourceProducer producer) throws RecoveryException {
try {
final boolean alreadyRunning = TransactionManagerServices.isTransactionManagerRunning();
final ProducerHolder holder = alreadyRunning ? new InitializableProducerHolder(producer) : new ProducerHolder(producer);
... |
3993813_5 | public static void unregister(XAResourceProducer producer) {
final ProducerHolder holder = new ProducerHolder(producer);
if (!resources.remove(holder)) {
if (log.isDebugEnabled()) { log.debug("resource with uniqueName '{}' has not been registered", holder.getUniqueName()); }
}
} |
3993813_6 | public boolean waitOnEnlisted() {
long enlistedElementNumber = pendingRecordsQueue.getMaxElementSequenceNumberForCurrentThread(true);
try {
// Wait until we have our entry forced (may not require a wait at all if it already happened).
forceLock.lockInterruptibly();
try {
whil... |
3993813_7 | public ByteBuffer createEmptyPayload(int payloadSize) {
if (payloadSize < 0)
throw new IllegalArgumentException("Cannot specify a negative capacity when creating the payload.");
final int requiredCapacity = payloadSize + RECORD_HEADER_SIZE + RECORD_TRAILER_SIZE;
if (requiredCapacity > JOURNAL_MAX_RE... |
3993813_8 | public ByteBuffer createEmptyPayload(int payloadSize) {
if (payloadSize < 0)
throw new IllegalArgumentException("Cannot specify a negative capacity when creating the payload.");
final int requiredCapacity = payloadSize + RECORD_HEADER_SIZE + RECORD_TRAILER_SIZE;
if (requiredCapacity > JOURNAL_MAX_RE... |
3993813_9 | public static FindResult findNextRecord(UUID delimiter, ByteBuffer source) {
final byte hook = RECORD_DELIMITER_PREFIX[0];
if (source.hasRemaining()) {
do {
if (source.get() == hook) {
int originalSourcePosition = source.position();
source.position(originalSou... |
3996100_0 | public static Loader getLoader(final String key) {
for (final Loader loader : ServiceLoader.load(Loader.class)) {
if (key.equals(loader.key())) {
return loader;
}
}
throw new DiagramGeneratorRuntimeException("no loader found for key " + key, null);
} |
3996100_1 | public static Loader getLoader(final String key) {
for (final Loader loader : ServiceLoader.load(Loader.class)) {
if (key.equals(loader.key())) {
return loader;
}
}
throw new DiagramGeneratorRuntimeException("no loader found for key " + key, null);
} |
3996100_2 | @Override
public String key() {
return "camel";
} |
3996100_3 | @Override
public List<Diagram> load(String input, FileType fileType) {
return camelContextToDiagram(input, fileType);
} |
3996100_4 | @Override
public List<Diagram> load(String input, FileType fileType) {
return camelContextToDiagram(input, fileType);
} |
3996100_5 | @Override
public List<Diagram> load(String input, FileType fileType) {
return camelContextToDiagram(input, fileType);
} |
3996100_6 | @Override
public void execute() throws MojoExecutionException, MojoFailureException {
final Loader loader = LoaderHelper.getLoader(type);
final ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
final ClassLoader cl = classloader();
Thread.currentThread().setContextClassLoader(cl);
... |
3999381_0 | public char[] toCharArray() {
return Arrays.copyOfRange(chars, start, end);
} |
3999381_1 | @Override
public TermIdNode getRoot() {
return newDoubleArrayNode(0);
} |
3999381_2 | @Override
public Iterable<Pair<String, Integer>> commonPrefixSearchWithTermId(
String query) {
List<Pair<String, Integer>> ret = new ArrayList<Pair<String, Integer>>();
char[] chars = query.toCharArray();
int charsLen = chars.length;
int checkLen = check.length;
int nodeIndex = 0;
for(int i = 0; i < charsLen; i... |
3999381_3 | public long[] getLongs(){
return longs;
} |
3999381_4 | public int[] getCountCache0(){
return countCache0;
} |
3999381_5 | public static void divide01(BitVector org, BitVector vec0, BitVector vec1){
if(org.size() == 0) return;
if(org.size() == 1){
if(!org.isZero(0)) throw new IllegalArgumentException("invalid bv for trie");
vec0.append1();
return;
}
boolean zeroCounting = org.isZero(0);
int n = org.size();
for(int i = 1; i < n;... |
3999381_6 | @Override
public int rank1(int pos){
int cn = pos / CACHE_WIDTH;
if((pos + 1) % CACHE_WIDTH == 0) return countCache1[cn];
if(cn > 0){
int ret = countCache1[cn - 1];
int n = pos / 8;
for(int i = (cn * (CACHE_WIDTH / 8)); i < n; i++){
ret += BITCOUNTS1[bytes[i] & 0xff];
}
return ret + BITCOUNTS1[bytes[n] ... |
3999381_7 | @Override
public int rank1(int pos){
int cn = pos / CACHE_WIDTH;
if((pos + 1) % CACHE_WIDTH == 0) return countCache1[cn];
if(cn > 0){
int ret = countCache1[cn - 1];
int n = pos / 8;
for(int i = (cn * (CACHE_WIDTH / 8)); i < n; i++){
ret += BITCOUNTS1[bytes[i] & 0xff];
}
return ret + BITCOUNTS1[bytes[n] ... |
3999381_8 | public int rank1(int pos){
int cn = pos / BITS_IN_COUNTCACHE;
if((pos + 1) % BITS_IN_COUNTCACHE == 0) return countCache1[cn];
int ret = (cn > 0) ? countCache1[cn - 1] : 0;
int n = pos / BITS_IN_BLOCK;
for(int i = (cn * BITS_IN_COUNTCACHE / BITS_IN_BLOCK); i < n; i++){
ret += Long.bitCount(longs[i]);
}
return r... |
3999381_9 | public long[] getLongs(){
return longs;
} |
4001968_0 | public java.util.Map<String, AnnotationProperty> getProperties() {
return properties;
} |
4001968_1 | public java.util.Map<String, AnnotationProperty> getProperties() {
return properties;
} |
4001968_2 | public java.util.Map<String, AnnotationProperty> getProperties() {
return properties;
} |
4001968_3 | public java.util.Map<String, AnnotationProperty> getProperties() {
return properties;
} |
4016036_0 | public List<DeltaSQLStatementSnapshot> getDeltaSqlStatementSnapshots() {
return deltaSQLStatementSnapshots;
} |
4021268_0 | public String getName()
{
return name;
} |
4021268_1 | public String getComment()
{
return comment;
} |
4021268_2 | public List<Double> getRatio()
{
if (ratio == null)
{
ratio = new ArrayList<Double>();
}
return this.ratio;
} |
4021268_3 | public String getName()
{
return name;
} |
4021268_4 | public String getComment()
{
return comment;
} |
4021268_5 | public List<Scale.Note> getNote()
{
if (note == null)
{
note = new ArrayList<Scale.Note>();
}
return this.note;
} |
4021268_6 | public String getName()
{
return name;
} |
4021268_7 | public String getComment()
{
return comment;
} |
4021268_8 | public BigInteger getNumberOfHoles()
{
return numberOfHoles;
} |
4021268_9 | public List<Fingering> getFingering()
{
if (fingering == null)
{
fingering = new ArrayList<Fingering>();
}
return this.fingering;
} |
4023244_0 | public static boolean implementsInterface(final Class type, final Class interfaceClass)
{
return interfaceClass.isAssignableFrom(type);
} |
4023244_1 | public static String of(final String name) {
return of(callingClass(), name);
} |
4023244_2 | public DAO(Class<T> entityClass, Mongo mongo, Morphia morphia, String dbName) {
super(entityClass, mongo, morphia, dbName);
} |
4023244_3 | @Override
protected void check(MappedClass mc, MappedField mf, Set<ConstraintViolation> ve) {
if (mf.hasAnnotation(Version.class)) {
Class<?> type = mf.getType();
if (Long.class.equals(type) || long.class.equals(type)) {
//TODO: Replace this will a read ObjectFactory call -- requires Mapper instance.
Obj... |
4023244_4 | @Override
protected void check(MappedClass mc, MappedField mf, Set<ConstraintViolation> ve) {
if (mf.isMap() && (!mf.hasAnnotation(Serialized.class))) {
Class<?> parameterizedClass = ReflectionUtils.getParameterizedClass(mf.getField(), 0);
if (parameterizedClass == null) {
ve.add(new ConstraintViolation(Level.W... |
4023244_5 | @Override
protected void check(MappedClass mc, MappedField mf, Set<ConstraintViolation> ve) {
if (mf.isMap()) {
if (mf.hasAnnotation(Serialized.class)) {
Class<?> keyClass = ReflectionUtils.getParameterizedClass(mf.getField(), 0);
Class<?> valueClass = ReflectionUtils.getParameterizedClass(mf.getField(), 1);
... |
4023244_6 | public void check(MappedClass mc, Set<ConstraintViolation> ve) {
List<MappedField> versionFields = mc.getFieldsAnnotatedWith(Version.class);
if (versionFields.size() > 1)
ve.add(new ConstraintViolation(Level.FATAL, mc, this.getClass(), "Multiple @" + Version.class
+ " annotations are not allowed. (" + new Field... |
4023244_7 | public static byte[] serialize(final Object o, final boolean zip) throws IOException
{
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
OutputStream os = baos;
if (zip)
{
os = new GZIPOutputStream(os);
}
final ObjectOutputStream oos = new ObjectOutputStream(os);
oos.writeObject(o);
oos.flush();... |
4023244_8 | public <T> T createProxy(final Class<T> targetClass, final Key<T> key,
final DatastoreProvider p) {
SerializableEntityObjectReference objectReference = new SerializableEntityObjectReference(
targetClass, p, key);
T backend = (T) new NonFinalizingHotSwappingInvoker(new Class[] { targetClass,
Serializable.cla... |
4024302_0 | public Target getTarget(Method method, Object[] args) {
List<Member> memberList = members.get();
if (memberList.isEmpty()) {
throw new NoMemberAvailableException(
format("RoundRobinLoadBalancer: There are no real members in the cluster of Hazelcast instance [%s]", hazelcastInstance.getNa... |
4024302_1 | public Target getTarget(Method method, Object[] args) {
List<Member> memberList = members.get();
if (memberList.isEmpty()) {
throw new NoMemberAvailableException(
format("RoundRobinLoadBalancer: There are no real members in the cluster of Hazelcast instance [%s]", hazelcastInstance.getNa... |
4024302_2 | public <T> T getProxy(Class<T> distributedServiceClass) {
notNull("distributedServiceClass", distributedServiceClass);
Object proxy = proxies.get(distributedServiceClass);
if (proxy == null) {
DistributedServiceInvocationHandler invocationHandler = buildDistributedServiceInvocationHandler(distribute... |
4024302_3 | public <T> T getProxy(Class<T> distributedServiceClass) {
notNull("distributedServiceClass", distributedServiceClass);
Object proxy = proxies.get(distributedServiceClass);
if (proxy == null) {
DistributedServiceInvocationHandler invocationHandler = buildDistributedServiceInvocationHandler(distribute... |
4024302_4 | public <T> T getProxy(Class<T> distributedServiceClass) {
notNull("distributedServiceClass", distributedServiceClass);
Object proxy = proxies.get(distributedServiceClass);
if (proxy == null) {
DistributedServiceInvocationHandler invocationHandler = buildDistributedServiceInvocationHandler(distribute... |
4024302_5 | public <T> T getProxy(Class<T> distributedServiceClass) {
notNull("distributedServiceClass", distributedServiceClass);
Object proxy = proxies.get(distributedServiceClass);
if (proxy == null) {
DistributedServiceInvocationHandler invocationHandler = buildDistributedServiceInvocationHandler(distribute... |
4024302_6 | public <T> T getProxy(Class<T> distributedServiceClass) {
notNull("distributedServiceClass", distributedServiceClass);
Object proxy = proxies.get(distributedServiceClass);
if (proxy == null) {
DistributedServiceInvocationHandler invocationHandler = buildDistributedServiceInvocationHandler(distribute... |
4024302_7 | public <T> T getProxy(Class<T> distributedServiceClass) {
notNull("distributedServiceClass", distributedServiceClass);
Object proxy = proxies.get(distributedServiceClass);
if (proxy == null) {
DistributedServiceInvocationHandler invocationHandler = buildDistributedServiceInvocationHandler(distribute... |
4024302_8 | public <T> T getProxy(Class<T> distributedServiceClass) {
notNull("distributedServiceClass", distributedServiceClass);
Object proxy = proxies.get(distributedServiceClass);
if (proxy == null) {
DistributedServiceInvocationHandler invocationHandler = buildDistributedServiceInvocationHandler(distribute... |
4024302_9 | public <T> T getProxy(Class<T> distributedServiceClass) {
notNull("distributedServiceClass", distributedServiceClass);
Object proxy = proxies.get(distributedServiceClass);
if (proxy == null) {
DistributedServiceInvocationHandler invocationHandler = buildDistributedServiceInvocationHandler(distribute... |
4026983_0 | public static ControlMessage fromJson(String json) {
return new Gson().fromJson(json, ControlMessage.class);
} |
4026983_1 | public String toJson() {
return new Gson().toJson(this);
} |
4031229_0 | public static URI toUri(final String s) {
URI uri = createURI(s);
if (uri.getScheme() != null) {
final Matcher matcher = supportedUriSchemeRe.matcher(uri.getScheme());
Preconditions.checkArgument(matcher.find(), "Supported URI schemes are: http, https and file");
return uri;
}
re... |
4031229_1 | public static boolean isFileUri(final URI uri) {
return "file".equals(uri.getScheme());
} |
4031229_2 | public static Optional<String> getLastSegment(final URI uri) {
return getSegment(uri, -1);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.