repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/servicecomb-pack
1,083
omega/omega-transaction/src/main/java/org/apache/servicecomb/pack/omega/transaction/MessageSender.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.servicecomb.pack.omega.transaction; import org.apache.servicecomb.pack.contract.grpc.ServerMeta; public interface MessageSender { void onConnected(); void onDisconnected(); ServerMeta onGetServerMeta(); void close(); String target(); }
apache/servicecomb-samples
1,068
java-chassis-integration-tests/pojo-test/src/test/java/org/apache/servicecomb/demo/pojo/test/RawPojoIntegrationTest.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.servicecomb.demo.pojo.test; import org.junit.jupiter.api.BeforeAll; public class RawPojoIntegrationTest extends PojoIntegrationTestBase { @BeforeAll public static void setUp() throws Exception { PojoTestMain.main(new String[0]); } }
apache/shardingsphere-ui
1,076
shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/repository/ForwardServiceConfigsRepository.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.shardingsphere.ui.repository; import org.apache.shardingsphere.ui.common.domain.ForwardServiceConfigs; /** * Sharding scaling config repository. */ public interface ForwardServiceConfigsRepository extends ConfigsRepository<ForwardServiceConfigs> { }
apache/shardingsphere
1,084
infra/binder/core/src/main/java/org/apache/shardingsphere/infra/binder/context/aware/ParameterAware.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.shardingsphere.infra.binder.context.aware; import java.util.List; /** * Parameter aware. */ public interface ParameterAware { /** * Bind parameters. * * @param params parameters */ void bindParameters(List<Object> params); }
apache/shenyu
1,103
shenyu-protocol/shenyu-protocol-mqtt/src/main/java/org/apache/shenyu/protocol/mqtt/PingReq.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.shenyu.protocol.mqtt; import io.netty.channel.ChannelHandlerContext; /** * Client sends pingreq to the server. */ public class PingReq extends MessageType { @Override public void pingReq(final ChannelHandlerContext ctx) { new PingResp().pingResp(ctx); } }
apache/shiro
1,109
samples/spring-boot-web/src/main/java/org/apache/shiro/samples/LoginController.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.shiro.samples; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class LoginController { @RequestMapping("/login.html") public String loginTemplate() { return "login"; } }
apache/skywalking-java
1,060
test/plugin/scenarios/spring-3.0.x-scenario/src/main/java/test/apache/skywalking/apm/testcase/spring3/dao/TestRepositoryBean.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 test.apache.skywalking.apm.testcase.spring3.dao; import org.springframework.stereotype.Repository; @Repository public class TestRepositoryBean { public String doSomeStuff(String name) { return name + "-dealWithRepository"; } }
apache/skywalking-java
1,060
test/plugin/scenarios/spring-3.1.x-scenario/src/main/java/test/apache/skywalking/apm/testcase/spring3/dao/TestRepositoryBean.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 test.apache.skywalking.apm.testcase.spring3.dao; import org.springframework.stereotype.Repository; @Repository public class TestRepositoryBean { public String doSomeStuff(String name) { return name + "-dealWithRepository"; } }
apache/skywalking-java
1,060
test/plugin/scenarios/spring-4.1.x-scenario/src/main/java/test/apache/skywalking/apm/testcase/spring3/dao/TestRepositoryBean.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 test.apache.skywalking.apm.testcase.spring3.dao; import org.springframework.stereotype.Repository; @Repository public class TestRepositoryBean { public String doSomeStuff(String name) { return name + "-dealWithRepository"; } }
apache/skywalking-java
1,060
test/plugin/scenarios/spring-4.3.x-scenario/src/main/java/test/apache/skywalking/apm/testcase/spring3/dao/TestRepositoryBean.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 test.apache.skywalking.apm.testcase.spring3.dao; import org.springframework.stereotype.Repository; @Repository public class TestRepositoryBean { public String doSomeStuff(String name) { return name + "-dealWithRepository"; } }
apache/skywalking-java
1,078
apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/plugin/match/MatchTestAnnotation.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.skywalking.apm.agent.core.plugin.match; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @Retention(RetentionPolicy.RUNTIME) @Inherited public @interface MatchTestAnnotation { }
apache/streampark
1,073
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/bean/SparkTaskItem.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.streampark.console.core.bean; import lombok.Getter; import lombok.Setter; import java.io.Serializable; @Getter @Setter public class SparkTaskItem implements Serializable { /** appId */ private Long appId; private Boolean autoStart; }
apache/streampipes
1,072
streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/verification/messages/VerificationWarning.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.streampipes.manager.verification.messages; import org.apache.streampipes.model.message.NotificationType; public class VerificationWarning extends VerificationResult { public VerificationWarning(NotificationType type) { super(type); } }
apache/struts
1,139
core/src/main/java/org/apache/struts2/Validateable.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.struts2; /** * Provides an interface in which a call for a validation check can be done. * * @author Jason Carreira * @see ActionSupport * @see org.apache.struts2.interceptor.DefaultWorkflowInterceptor */ public interface Validateable { /** * Performs validation. */ void validate(); }
apache/tapestry-5
1,107
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Music.java
// Copyright 2008 The Apache Software Foundation // // 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. package org.apache.tapestry5.integration.app1.pages; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.integration.app1.data.Track; import org.apache.tapestry5.integration.app1.services.MusicLibrary; import org.apache.tapestry5.ioc.annotations.Inject; import java.util.List; public class Music { @Inject private MusicLibrary library; @Property private Track track; public List<Track> getTracks() { return library.getTracks(); } }
apache/tomcat
1,142
java/jakarta/transaction/HeuristicCommitException.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 jakarta.transaction; import java.io.Serial; public class HeuristicCommitException extends Exception { @Serial private static final long serialVersionUID = -3977609782149921760L; public HeuristicCommitException() { super(); } public HeuristicCommitException(String msg) { super(msg); } }
apache/tomee
1,113
container/openejb-core/src/main/java/org/apache/openejb/cli/SystemExitException.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.openejb.cli; /** * @version $Rev$ $Date$ */ public class SystemExitException extends Exception { private final int exitCode; public SystemExitException(final int exitCode) { this.exitCode = exitCode; } public int getExitCode() { return exitCode; } }
apache/tsfile
1,117
java/tsfile/src/main/java/org/apache/tsfile/read/query/executor/QueryExecutor.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.tsfile.read.query.executor; import org.apache.tsfile.read.expression.QueryExpression; import org.apache.tsfile.read.query.dataset.QueryDataSet; import java.io.IOException; public interface QueryExecutor { QueryDataSet execute(QueryExpression queryExpression) throws IOException; }
apache/unomi
1,106
extensions/healthcheck/src/main/java/org/apache/unomi/healthcheck/HealthCheckProvider.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.unomi.healthcheck; public interface HealthCheckProvider { String name(); HealthCheckResponse execute(); default HealthCheckResponse timeout() { return new HealthCheckResponse.Builder().name(name()).withData("error.cause", "timeout").error().build(); } }
apache/wicket
1,093
wicket-core-tests/src/test/java/org/apache/wicket/core/util/lang/Country.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.wicket.core.util.lang; /** * @author jcompagner * */ public class Country { private final String name; /** * @param name */ public Country(String name) { this.name = name; } /** * @return The name */ public String getName() { return name; } }
apache/wicket
1,101
wicket-examples/src/main/java/org/apache/wicket/examples/authentication2/SignOut.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.wicket.examples.authentication2; import org.apache.wicket.examples.WicketExamplePage; /** * Simple logout page. * * @author Jonathan Locke */ public class SignOut extends WicketExamplePage { /** * Constructor */ public SignOut() { getSession().invalidate(); } }
apache/wicket
1,101
wicket-examples/src/main/java/org/apache/wicket/examples/authentication3/SignOut.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.wicket.examples.authentication3; import org.apache.wicket.examples.WicketExamplePage; /** * Simple logout page. * * @author Jonathan Locke */ public class SignOut extends WicketExamplePage { /** * Constructor */ public SignOut() { getSession().invalidate(); } }
apache/wicket
1,126
wicket-util/src/main/java/org/apache/wicket/util/IHierarchical.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.wicket.util; /** * Represents an object that is a part of a hierarchy * * @author Igor Vaynberg (ivaynberg) * @param <T> */ @FunctionalInterface public interface IHierarchical<T> { /** * @return object's parent or {@code null} if this object is the root of the hierarchy */ T getParent(); }
google/gdata-java-client
1,122
java/src/com/google/gdata/data/extensions/Deleted.java
/* Copyright (c) 2008 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. */ // All Rights Reserved. package com.google.gdata.data.extensions; import com.google.gdata.data.AbstractExtension; import com.google.gdata.data.ExtensionDescription; import com.google.gdata.util.Namespaces; /** * GData schema extension element for indicating a deleted element (tombstone). * * */ @ExtensionDescription.Default( nsAlias = Namespaces.gAlias, nsUri = Namespaces.g, localName = "deleted") public class Deleted extends AbstractExtension { public Deleted() { super(Namespaces.gNs, "deleted"); } }
google/gdata-java-client
1,125
java/src/com/google/api/gbase/client/GoogleBaseMediaFeed.java
/* Copyright (c) 2007 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. */ package com.google.api.gbase.client; import com.google.gdata.data.media.MediaFeed; /** * Media feed used for managing the media attachments for one Google Base Item. * Every item accessible via the {@code /items} feed contains a media feed in * the form of a {@link com.google.gdata.data.extensions.FeedLink} with relation * {@code media}. */ public class GoogleBaseMediaFeed extends MediaFeed<GoogleBaseMediaFeed, GoogleBaseMediaEntry> { public GoogleBaseMediaFeed() { super(GoogleBaseMediaEntry.class); } }
google/google-java-format
1,133
core/src/main/java/com/google/googlejavaformat/Op.java
/* * Copyright 2015 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. */ package com.google.googlejavaformat; /** * An {@code Op} is a member of the sequence of formatting operations emitted by {@link OpsBuilder} * and transformed by {@link DocBuilder} into a {@link Doc}. Leaf subclasses of {@link Doc} * implement {@code Op}; {@link Doc.Level} is the only non-leaf, and is represented by paired {@link * OpenOp}-{@link CloseOp} {@code Op}s. */ public interface Op { /** * Add an {@code Op} to a {@link DocBuilder}. * * @param builder the {@link DocBuilder} */ void add(DocBuilder builder); }
google/guava
1,106
guava-gwt/src-super/com/google/common/escape/super/com/google/common/escape/Platform.java
/* * Copyright (C) 2009 The Guava 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 * * 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 com.google.common.escape; /** * @author Jesse Wilson */ final class Platform { private static final char[] CHAR_BUFFER = new char[1024]; static char[] charBufferFromThreadLocal() { // ThreadLocal is not available to GWT, so we always reuse the same // instance. It is always safe to return the same instance because // javascript is single-threaded, and only used by blocks that doesn't // involve async callbacks. return CHAR_BUFFER; } private Platform() {} }
google/j2cl
1,088
transpiler/javatests/com/google/j2cl/integration/java/j2ktiosinterop/super-j2kt-native/NativeCustomName.java
/* * Copyright 2022 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 * * 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 j2ktiosinterop; import com.google.j2objc.annotations.ObjectiveCName; import javaemul.internal.annotations.KtNative; import org.jspecify.annotations.NullMarked; @ObjectiveCName("CustomNativeClass") @KtNative @NullMarked public final class NativeCustomName { public native int nativeInstanceMethod(); public static native int nativeStaticMethod(); public static native void nativeParameter(NativeCustomName obj); public static native NativeCustomName nativeReturnType(); }
google/j2cl
1,143
jre/javatests/com/google/j2cl/jre/DateTimeSuite.java
/* * Copyright 2022 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. */ package com.google.j2cl.jre; import com.google.j2cl.jre.java.sql.SqlDateTest; import com.google.j2cl.jre.java.sql.SqlTimeTest; import com.google.j2cl.jre.java.sql.SqlTimestampTest; import com.google.j2cl.jre.java.util.DateTest; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** Test JRE java.lang emulation. */ @RunWith(Suite.class) @SuiteClasses({ DateTest.class, // -- java.sql SqlDateTest.class, SqlTimeTest.class, SqlTimestampTest.class, }) public class DateTimeSuite {}
google/sagetv
1,155
third_party/Ogle/java/sage/dvd/txtdt_mgi_t.java
/* * Copyright 2015 The SageTV Authors. All Rights Reserved. * * Adapted from Ogle - A video player * Copyright (C) 2000, 2001 Håkan Hjort * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ package sage.dvd; public class txtdt_mgi_t extends Struct { public Unsigned8[] disc_name = (Unsigned8[]) array(new Unsigned8[14]); public Unsigned16 nr_of_language_units = new Unsigned16(); public Unsigned32 last_byte = new Unsigned32(); //txtdt_lu_t *lu; } //#define TXTDT_MGI_SIZE 20
googleads/googleads-mobile-unity
1,055
source/plugin/Assets/Plugins/Android/GoogleMobileAdsPlugin.androidlib/src/main/java/com/google/unity/ads/UnityAdInspector.java
package com.google.unity.ads; import android.app.Activity; import com.google.android.gms.ads.AdInspectorError; import com.google.android.gms.ads.MobileAds; import com.google.android.gms.ads.OnAdInspectorClosedListener; /** Ad inspector implementation for the Google Mobile Ads Unity plugin. */ public final class UnityAdInspector { private UnityAdInspector() {} public static void openAdInspector( final Activity activity, final UnityAdInspectorListener adInspectorListener) { activity.runOnUiThread( new Runnable() { @Override public void run() { MobileAds.openAdInspector( activity, new OnAdInspectorClosedListener() { @Override public void onAdInspectorClosed(AdInspectorError adInspectorError) { if (adInspectorListener != null) { adInspectorListener.onAdInspectorClosed(adInspectorError); } } }); } }); } }
googleapis/google-http-java-client
1,096
google-http-client/src/main/java/com/google/api/client/util/Collections2.java
/* * Copyright (c) 2013 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. */ package com.google.api.client.util; import java.util.Collection; /** * Static utility methods pertaining to {@link Collection} instances. * * @since 1.14 * @author Yaniv Inbar * @deprecated use Guava's {@link com.google.common.collect.Collections2} */ @Deprecated public final class Collections2 { /** Used to avoid http://bugs.sun.com/view_bug.do?bug_id=6558557. */ static <T> Collection<T> cast(Iterable<T> iterable) { return (Collection<T>) iterable; } private Collections2() {} }
googleapis/sdk-platform-java
1,072
hermetic_build/library_generation/tests/resources/test-owlbot/testdata/SampleDeprecateClass.java
/* * Copyright 2021 Google LLC * * 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. */ class ExampleClass { public void cat(String bar) { for (int i = 0; i < 3; i++) { System.out.println("this is a test " + bar); } } @Beta @Generated() public void foo(String bar) { for (int i = 0; i < 3; i++) { System.out.println("this is a test " + bar); } } /** * This is an existing comment. */ public void bar(String bar) { for (int i = 0; i < 3; i++) { System.out.println("this is a test " + bar); } } }
hibernate/hibernate-ogm
1,044
infinispan-embedded/src/test/java/org/hibernate/ogm/datastore/infinispan/test/dialect/impl/counter/TransportNotDefinedTableGenerationTest.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.datastore.infinispan.test.dialect.impl.counter; import org.hibernate.ogm.backendtck.id.TableNextValueGenerationTest; import org.hibernate.ogm.datastore.infinispan.InfinispanProperties; import org.hibernate.ogm.utils.TestForIssue; import org.hibernate.ogm.utils.jpa.GetterPersistenceUnitInfo; /** * Repeat {@link TableNextValueGenerationTest} tests * with a configuration does not defining transport * * @author Fabio Massimo Ercoli */ @TestForIssue(jiraKey = "OGM-1376") public class TransportNotDefinedTableGenerationTest extends TableNextValueGenerationTest { protected void configure(GetterPersistenceUnitInfo info) { super.configure( info ); info.getProperties().setProperty( InfinispanProperties.CONFIGURATION_RESOURCE_NAME, "infinispan-local.xml" ); } }
hibernate/hibernate-ogm
1,061
core/src/test/java/org/hibernate/ogm/backendtck/embeddable/MultiAddressAccount.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.backendtck.embeddable; import java.util.ArrayList; import java.util.List; import javax.persistence.ElementCollection; import javax.persistence.Entity; import javax.persistence.Id; /** * @author Emmanuel Bernard */ @Entity public class MultiAddressAccount { private String login; private String password; private List<Address> addresses = new ArrayList<Address>(); @Id public String getLogin() { return login; } public void setLogin(String login) { this.login = login; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @ElementCollection public List<Address> getAddresses() { return addresses; } public void setAddresses(List<Address> addresses) { this.addresses = addresses; } }
hibernate/hibernate-ogm
1,076
mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/type/impl/GeoLineStringGridType.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.datastore.mongodb.type.impl; import org.hibernate.MappingException; import org.hibernate.engine.spi.Mapping; import org.hibernate.ogm.datastore.mongodb.type.GeoLineString; import org.hibernate.ogm.type.impl.AbstractGenericBasicType; /** * Persists {@link GeoLineString} in the format expected by MongoDB. * * @author Guillaume Smet */ public class GeoLineStringGridType extends AbstractGenericBasicType<GeoLineString> { public static final GeoLineStringGridType INSTANCE = new GeoLineStringGridType(); public GeoLineStringGridType() { super( GeoLineStringGridTypeDescriptor.INSTANCE, GeoLineStringTypeDescriptor.INSTANCE ); } @Override public String getName() { return "geolinestring"; } @Override public int getColumnSpan(Mapping mapping) throws MappingException { return 1; } }
hibernate/hibernate-ogm
1,076
mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/type/impl/GeoMultiPointGridType.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.datastore.mongodb.type.impl; import org.hibernate.MappingException; import org.hibernate.engine.spi.Mapping; import org.hibernate.ogm.datastore.mongodb.type.GeoMultiPoint; import org.hibernate.ogm.type.impl.AbstractGenericBasicType; /** * Persists {@link GeoMultiPoint} in the format expected by MongoDB. * * @author Guillaume Smet */ public class GeoMultiPointGridType extends AbstractGenericBasicType<GeoMultiPoint> { public static final GeoMultiPointGridType INSTANCE = new GeoMultiPointGridType(); public GeoMultiPointGridType() { super( GeoMultiPointGridTypeDescriptor.INSTANCE, GeoMultiPointTypeDescriptor.INSTANCE ); } @Override public String getName() { return "geomultipoint"; } @Override public int getColumnSpan(Mapping mapping) throws MappingException { return 1; } }
hibernate/hibernate-orm
1,048
hibernate-core/src/main/java/org/hibernate/dialect/identity/DB2IdentityColumnSupport.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.dialect.identity; /** * @author Andrea Boriero */ public class DB2IdentityColumnSupport extends IdentityColumnSupportImpl { public static final DB2IdentityColumnSupport INSTANCE = new DB2IdentityColumnSupport(); @Override public boolean supportsIdentityColumns() { return true; } @Override public boolean supportsInsertSelectIdentity() { return true; } @Override public String getIdentitySelectString(String table, String column, int type) { return "values identity_val_local()"; } @Override public String getIdentityColumnString(int type) { return "generated by default as identity"; } @Override public String getIdentityInsertString() { return "default"; } @Override public String appendIdentitySelectToInsert(String identityColumnName, String insertString) { return "select " + identityColumnName + " from final table ( " + insertString + " )"; //TODO: should it be 'from new table'? } }
hibernate/hibernate-orm
1,056
hibernate-core/src/main/java/org/hibernate/tuple/entity/EntityBasedAssociationAttribute.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.tuple.entity; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.persister.entity.EntityPersister; import org.hibernate.tuple.BaselineAttributeInformation; import org.hibernate.type.AssociationType; /** * @deprecated No direct replacement */ @Deprecated(forRemoval = true) public class EntityBasedAssociationAttribute extends AbstractEntityBasedAttribute { public EntityBasedAssociationAttribute( EntityPersister source, SessionFactoryImplementor sessionFactory, int attributeNumber, String attributeName, AssociationType attributeType, BaselineAttributeInformation baselineInfo) { super( source, sessionFactory, attributeNumber, attributeName, attributeType, baselineInfo ); } @Override public AssociationType getType() { return (AssociationType) super.getType(); } @Override protected String loggableMetadata() { return super.loggableMetadata() + ",association"; } }
hibernate/hibernate-orm
1,056
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/UserConfEntity.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.mapping; import java.io.Serializable; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.IdClass; import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; @Entity @Table(name = "USER_CONFS") @IdClass(UserConfId.class) public class UserConfEntity implements Serializable{ private static final long serialVersionUID = 9153314908821604322L; @Id @ManyToOne @JoinColumn(name="user_id", nullable = false) private UserEntity user; @Id @ManyToOne @JoinColumn(name="cnf_key", referencedColumnName="confKey") @JoinColumn(name="cnf_value", referencedColumnName="confValue") private ConfEntity conf; public ConfEntity getConf() { return conf; } public void setConf(ConfEntity conf) { this.conf = conf; } public UserEntity getUser() { return user; } public void setUser(UserEntity user) { this.user = user; } }
hibernate/hibernate-orm
1,061
hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/MappingFeature.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.testing.orm.domain; import java.util.EnumSet; /** * Identifies specific mapping features used by a {@link DomainModelDescriptor}. * * The intent is to help categorize which models use specific mapping features * to help facilitate testing various outcomes based on those features. * * For example, when writing a test that depends on JPA's {@link jakarta.persistence.AttributeConverter}, * we could just see which DomainModel reports using {@link #CONVERTER} and re-use that * model. * * @author Steve Ebersole */ public enum MappingFeature { CONVERTER, ENUMERATED, DYNAMIC_MODEL, DISCRIMINATOR_INHERIT, JOINED_INHERIT, UNION_INHERIT, SECONDARY_TABLE, AGG_COMP_ID, NON_AGG_COMP_ID, ID_CLASS, EMBEDDABLE, MANY_ONE, ONE_ONE, ONE_MANY, MANY_MANY, ANY, MANY_ANY, COLLECTION_TABLE, JOIN_TABLE, JOIN_COLUMN, ; public static EnumSet<MappingFeature> all() { return EnumSet.allOf( MappingFeature.class ); } }
hibernate/hibernate-orm
1,074
hibernate-core/src/main/java/org/hibernate/dialect/lock/internal/HSQLLockingSupport.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.dialect.lock.internal; import jakarta.persistence.Timeout; import org.hibernate.dialect.lock.spi.ConnectionLockTimeoutStrategy; import org.hibernate.dialect.lock.spi.LockTimeoutType; import org.hibernate.dialect.lock.spi.LockingSupport; import org.hibernate.dialect.lock.spi.OuterJoinLockingType; /** * LockingSupport for HSQLDialect * * @author Steve Ebersole */ public class HSQLLockingSupport implements LockingSupport, LockingSupport.Metadata { public static final HSQLLockingSupport LOCKING_SUPPORT = new HSQLLockingSupport(); @Override public Metadata getMetadata() { return this; } @Override public LockTimeoutType getLockTimeoutType(Timeout timeout) { return LockTimeoutType.NONE; } @Override public OuterJoinLockingType getOuterJoinLockingType() { return OuterJoinLockingType.IGNORED; } @Override public ConnectionLockTimeoutStrategy getConnectionLockTimeoutStrategy() { return ConnectionLockTimeoutStrategy.NONE; } }
hibernate/hibernate-search
1,029
backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/types/dsl/provider/impl/OpenSearch214IndexFieldTypeFactoryProvider.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.backend.elasticsearch.types.dsl.provider.impl; import org.hibernate.search.backend.elasticsearch.types.mapping.impl.ElasticsearchVectorFieldTypeMappingContributor; import org.hibernate.search.backend.elasticsearch.types.mapping.impl.OpenSearch214VectorFieldTypeMappingContributor; import com.google.gson.Gson; /** * The index field type factory provider for OpenSearch 2.14+. */ public class OpenSearch214IndexFieldTypeFactoryProvider extends AbstractIndexFieldTypeFactoryProvider { private final OpenSearch214VectorFieldTypeMappingContributor vectorFieldTypeMappingContributor = new OpenSearch214VectorFieldTypeMappingContributor(); public OpenSearch214IndexFieldTypeFactoryProvider(Gson userFacingGson) { super( userFacingGson ); } @Override protected ElasticsearchVectorFieldTypeMappingContributor vectorFieldTypeMappingContributor() { return vectorFieldTypeMappingContributor; } }
hibernate/hibernate-search
1,029
integrationtest/v5migrationhelper/orm/src/test/java/org/hibernate/search/test/query/AlternateBook.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.test.query; import jakarta.persistence.Entity; import jakarta.persistence.Id; import org.hibernate.search.annotations.DocumentId; import org.hibernate.search.annotations.Field; import org.hibernate.search.annotations.Indexed; import org.hibernate.search.annotations.SortableField; import org.hibernate.search.annotations.Store; /** * @author Emmanuel Bernard */ @Entity @Indexed(index = "AlternateBook") public class AlternateBook { @Id @DocumentId @Field @SortableField private Integer id; @Field(store = Store.YES) private String summary; public AlternateBook() { } public AlternateBook(Integer id, String summary) { this.id = id; this.summary = summary; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getSummary() { return summary; } public void setSummary(String summary) { this.summary = summary; } }
hibernate/hibernate-search
1,037
integrationtest/v5migrationhelper/orm/src/test/java/org/hibernate/search/test/query/Husband.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.test.query; import jakarta.persistence.Entity; import jakarta.persistence.FetchType; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.ManyToOne; import org.hibernate.search.annotations.Field; import org.hibernate.search.annotations.Indexed; import org.hibernate.search.annotations.Store; /** * @author Emmanuel Bernard */ @Entity @Indexed public class Husband { @Id @GeneratedValue public Long getId() { return id; } public void setId(Long id) { this.id = id; } private Long id; @Field(store = Store.YES) public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } private String lastName; @ManyToOne(fetch = FetchType.LAZY) public Spouse getSpouse() { return spouse; } public void setSpouse(Spouse spouse) { this.spouse = spouse; } private Spouse spouse; }
hibernate/hibernate-search
1,055
backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/client/spi/ElasticsearchClient.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.backend.elasticsearch.client.spi; import java.util.concurrent.CompletableFuture; import org.hibernate.search.util.common.SearchException; /** * An Elasticsearch client, allowing to perform requests to a remote cluster. * */ public interface ElasticsearchClient { /** * @param request A request to execute asynchronously * @return The future that will ultimately hold the response * (or throw an exception if an error occurred or if the request timed out). */ CompletableFuture<ElasticsearchResponse> submit(ElasticsearchRequest request); /** * Unwrap the client to some implementation-specific type. * * @param clientClass The {@link Class} representing the expected client type * @param <T> The expected client type * @return The unwrapped client. * @throws SearchException if the client implementation does not support * unwrapping to the given class. */ <T> T unwrap(Class<T> clientClass); }
hibernate2011/RosClient
1,124
app/src/main/java/com/jilk/ros/rosbridge/operation/Status.java
/** * Copyright (c) 2014 Jilk Systems, Inc. * * This file is part of the Java ROSBridge Client. * * The Java ROSBridge Client is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The Java ROSBridge Client is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with the Java ROSBridge Client. If not, see http://www.gnu.org/licenses/. * */ package com.jilk.ros.rosbridge.operation; import com.jilk.ros.message.MessageType; @MessageType(string = "status") public class Status extends Operation { String level; String msg; public Status() {} public Status(String level, String msg) { this.level = level; this.msg = msg; } }
openjdk/jdk8
1,095
jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509DataContent.java
/* * reserved comment block * DO NOT REMOVE OR ALTER! */ /** * 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 com.sun.org.apache.xml.internal.security.keys.content.x509; /** * Just used for tagging contents that are allowed inside a ds:X509Data Element. * * @author $Author: coheigea $ */ public interface XMLX509DataContent { }
openjdk/jdk8
1,135
langtools/test/com/sun/javadoc/testLambdaFeature/pkg1/NotAFuncInf.java
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package pkg1; public interface NotAFuncInf<V> { V call() throws Exception; }
openjdk/jdk8
1,140
langtools/test/tools/javac/diags/examples/AssertAsIdentifier2.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.assert.as.identifier class AssertAsIdentifier { int assert; }
openjdk/jdk8
1,141
langtools/test/tools/javac/diags/examples/IllegalStartOfExpr.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.illegal.start.of.expr class IllegalStartOfExpr { int i = =3; }
openjdk/jdk8
1,143
langtools/test/com/sun/javadoc/testDocEncoding/pkg/Test.java
/* * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * Portions Copyright (c) 2012 IBM Corporation */ package pkg; public class Test {}
openjdk/jdk8
1,143
langtools/test/tools/javac/diags/examples/DotClassExpected.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.dot.class.expected class DotClassExpected { int f = int[] + 3; }
openjdk/jdk8
1,143
langtools/test/tools/javac/diags/examples/ThisAsIdentifier.java
/* * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.this.as.identifier class ThisAsIdentifier { Object this; }
openjdk/jdk8
1,148
langtools/test/tools/javac/policy/test1/D.java
/* * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ class D { D() { } } class D1 { D1() { } } class D2 { D2() { } }
openjdk/jdk8
1,154
langtools/test/tools/javac/miranda/4686811/p1/C.java
/* * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package p1; public abstract class C extends p2.B { void f() {} // overrides noninherited A.f() }
openjdk/jdk8
1,156
jdk/test/sun/rmi/rmic/covariantReturns/G2Impl.java
/* * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ import java.util.Collection; public class G2Impl implements G2 { public void m(Collection c) { } }
openjdk/jtreg
1,166
test/pkgInfo/lib/p/HelloWorld.java
/* * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package p; public class HelloWorld { public static String getText() { return "Hello World"; } }
openjdk/jtreg
1,168
test/timeoutHandler/test/Test.java
/* * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * @test * @summary dummy test */ public class Test { public static void main(String... args) { } }
oracle/coherence
1,113
prj/coherence-core/src/main/java/com/tangosol/util/InflatableSet.java
/* * Copyright (c) 2000, 2024, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * https://oss.oracle.com/licenses/upl. */ package com.tangosol.util; import com.oracle.coherence.common.base.Nullable; import java.util.Set; /** * A Set specialization of InflatableCollection. * * @author ch 2009.11.22 * @since Coherence 3.6 */ public class InflatableSet extends InflatableCollection implements Set, Nullable<InflatableSet> { // ----- factory methods ------------------------------------------------- /** * {@inheritDoc} */ @Override protected InflatedCollection instantiateCollection() { return new InflatedSet(); } // ----- inner types ----------------------------------------------------- /** * Inflated set implementation. Uses {@link SafeHashSet} and marks the * implementation with {@see InflatedCollection} */ private static class InflatedSet extends SafeHashSet implements InflatedCollection { } }
oracle/coherence
1,117
prj/coherence-core/src/main/java/com/oracle/coherence/ai/Vector.java
/* * Copyright (c) 2000, 2024, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * https://oss.oracle.com/licenses/upl. */ package com.oracle.coherence.ai; import com.tangosol.io.ExternalizableLite; import com.tangosol.io.pof.PortableObject; /** * A representation of a vector. * * @param <T> the type of the vector */ public sealed interface Vector<T> extends ExternalizableLite, PortableObject permits BitVector, Int8Vector, Float32Vector { /** * Returns the number of dimensions in this vector. * * @return the number of dimensions in this vector */ int dimensions(); /** * Return the vector. * <p/> * Mutating the returned vector will result in changes to the internal * state of this vector. * * @return the actual wrapped vector */ T get(); /** * Return binary quantized value for this {@link Vector} as a bit vector. * * @return binary quantized value for this {@link Vector} as a bit vector */ BitVector binaryQuant(); }
oracle/nosql
1,125
kvmain/src/main/java/oracle/kv/impl/security/oauth/IDCSOAuthAuthFactory.java
/*- * Copyright (C) 2011, 2025 Oracle and/or its affiliates. All rights reserved. * * This file was distributed by Oracle as part of a version of Oracle NoSQL * Database made available at: * * http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html * * Please see the LICENSE file included in the top-level directory of the * appropriate version of Oracle NoSQL Database for a copy of the license and * additional information. */ package oracle.kv.impl.security.oauth; import oracle.kv.impl.admin.param.GlobalParams; import oracle.kv.impl.admin.param.SecurityParams; import oracle.kv.impl.security.Authenticator; import oracle.kv.impl.security.AuthenticatorFactory; /** * Factory for IDCS OAuth2 implementation of authenticator. */ public class IDCSOAuthAuthFactory implements AuthenticatorFactory { @Override public Authenticator getAuthenticator(SecurityParams secParams, GlobalParams globalParams) throws IllegalArgumentException { return new IDCSOAuthAuthenticator(secParams, globalParams); } }
apache/crunch
1,126
crunch-core/src/main/java/org/apache/crunch/impl/mr/collect/UnionTable.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.crunch.impl.mr.collect; import org.apache.crunch.impl.dist.collect.BaseUnionTable; import org.apache.crunch.impl.dist.collect.PTableBase; import java.util.List; public class UnionTable<K, V> extends BaseUnionTable<K, V> { UnionTable(List<PTableBase<K, V>> internal) { super(internal); } }
apache/cxf
1,103
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/server/PingService.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.cxf.systest.ws.wssec11.server; import wssec.wssec11.IPingService; /** * */ public class PingService implements IPingService { /** {@inheritDoc}*/ public String echo(String request) { //System.out.println("echo: " + request); return request; } }
apache/cxf
1,108
systests/uncategorized/src/test/java/org/apache/cxf/systest/simple/impl/WSSimpleImpl.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.cxf.systest.simple.impl; import jakarta.jws.WebService; import org.apache.cxf.systest.simple.intf.WSSimple; @WebService(name = "WSSimpleImpl123", targetNamespace = "http://systest.cxf.apache.org") public class WSSimpleImpl implements WSSimple { public void pingMe() { } }
apache/cxf
1,115
testutils/src/main/java/org/apache/hello_world_soap_http/NotAnnotatedProvider.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.hello_world_soap_http; import javax.xml.transform.Source; import jakarta.xml.ws.Provider; public class NotAnnotatedProvider implements Provider<Source> { public NotAnnotatedProvider() { //Complete } public Source invoke(Source source) { return null; } }
apache/cxf
1,122
tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaCommon.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.cxf.tools.common.model; import java.util.Set; import java.util.TreeSet; public class JavaCommon { private final Set<String> imports = new TreeSet<>(); public void addImport(String i) { imports.add(i); } public Set<String> getAllImport() { return imports; } }
apache/deltaspike
1,064
deltaspike/modules/test-control/impl/src/test/java/org/apache/deltaspike/test/testcontrol/mock/uc015/InterceptedBeanClassLevel.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.deltaspike.test.testcontrol.mock.uc015; import jakarta.enterprise.context.RequestScoped; @RequestScoped @TestInterceptor public class InterceptedBeanClassLevel { public void test() { //do nothing - any method is fine } }
apache/deltaspike
1,084
deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/CustomExpressionBasedNoBean.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.deltaspike.test.core.api.exclude; import org.apache.deltaspike.core.api.exclude.Exclude; /** * Bean wil be excluded */ @Exclude(onExpression = "true eq true", interpretedBy = SimpleTestExpressionInterpreter.class) public class CustomExpressionBasedNoBean { }
apache/deltaspike
1,089
deltaspike/examples/jsf-examples/src/main/java/org/apache/deltaspike/example/scope/ScopedBean.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.deltaspike.example.scope; import java.util.Date; /** * */ public class ScopedBean { private Date creationDate; public Date getCreationDate() { return creationDate; } public void init() { creationDate = new Date(); } }
apache/directory-kerby
1,088
kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/message/RenamePrincipalRep.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.kerby.kerberos.kerb.admin.message; /** * Rename principal reply, to general admin message */ public class RenamePrincipalRep extends AdminRep { public RenamePrincipalRep() { super(AdminMessageType.RENAME_PRINCIPAL_REP); } }
apache/directory-kerby
1,096
kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/fast/FastOptions.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.kerby.kerberos.kerb.type.fast; import org.apache.kerby.asn1.type.Asn1Flags; public class FastOptions extends Asn1Flags { public FastOptions() { this(0); } public FastOptions(int value) { setFlags(value); } }
apache/directory-kerby
1,105
kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/kdc/AsReq.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.kerby.kerberos.kerb.type.kdc; import org.apache.kerby.kerberos.kerb.type.base.KrbMessageType; /** AS-REQ ::= [APPLICATION 10] KDC-REQ */ public class AsReq extends KdcReq { public AsReq() { super(KrbMessageType.AS_REQ); } }
apache/directory-scimple
1,091
scim-server/src/main/java/org/apache/directory/scim/server/exception/EtagGenerationException.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.directory.scim.server.exception; public class EtagGenerationException extends Exception { public EtagGenerationException(String message) { super(message); } public EtagGenerationException(String message, Throwable cause) { super(message, cause); } }
apache/dolphinscheduler
1,061
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/ILogicTaskChannel.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.dolphinscheduler.plugin.task.api; /** * Used to mark a task channel as a logic task channel, the logic task channel is a special task channel that will be executed at master. */ public interface ILogicTaskChannel extends TaskChannel { }
apache/drill
1,124
exec/java-exec/src/main/java/org/apache/drill/exec/physical/DataValidationMode.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.drill.exec.physical; public enum DataValidationMode { TERMINATE, // terminate the query if the data doesn't match expected. DROP_RECORD, // drop the record that doesn't match the expected situation. SINK_RECORD // record the failed record along with the rule violation in a secondary location. }
apache/eagle
1,068
eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/evaluator/absence/AbsenceDailyRule.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 * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * 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.eagle.alert.engine.evaluator.absence; /** * Since 7/7/16. */ public class AbsenceDailyRule implements AbsenceRule { public static final long DAY_MILLI_SECONDS = 86400 * 1000L; public long startOffset; public long endOffset; }
apache/falcon
1,130
common/src/test/java/org/apache/falcon/util/FalconTestUtil.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.falcon.util; /** * Utilities for falcon unit tests. */ public final class FalconTestUtil { public static final String TEST_USER_1 = "falcon-ut-user"; public static final String TEST_USER_2 = "testuser-ut-user"; private FalconTestUtil() { //default constructor to avoid } }
apache/felix-dev
1,059
dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/hello/api/ServiceProvider.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.felix.dependencymanager.samples.hello.api; /** * The interface for our service provider. * * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> */ public interface ServiceProvider { public void hello(); }
apache/felix-dev
1,087
scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Protected_Map.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.felix.scr.integration.components.activatesignature; import java.util.Map; public class Signature_Protected_Map extends AbstractActivateSignatureTestComponent { protected void activate(Map<?, ?> config) { setMethodCalled( config ); } }
apache/flink
1,083
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/strategy/RequestInfo.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.flink.connector.base.sink.writer.strategy; import org.apache.flink.annotation.PublicEvolving; /** Interface for dataclass used to encapsulate information about starting requests. */ @PublicEvolving public interface RequestInfo { int getBatchSize(); }
apache/flink
1,099
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/KubernetesConfigMapSharedWatcher.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.flink.kubernetes.kubeclient; import org.apache.flink.kubernetes.kubeclient.resources.KubernetesConfigMap; /** The shared watcher interface for ConfigMap. */ public interface KubernetesConfigMapSharedWatcher extends KubernetesSharedWatcher<KubernetesConfigMap> {}
apache/flink
1,120
flink-python/src/test/java/org/apache/flink/python/util/TestScalarFunction2.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.flink.python.util; import org.apache.flink.table.functions.ScalarFunction; /** Just a simple scalar function for testing add jars from python side. */ public class TestScalarFunction2 extends ScalarFunction { public String eval(long a, String b) { return a + " or " + b; } }
apache/flink
1,132
flink-core/src/main/java/org/apache/flink/util/IterableIterator.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.flink.util; import org.apache.flink.annotation.Internal; import java.util.Iterator; /** * An {@link Iterator} that is also {@link Iterable} (often by returning itself). * * @param <E> The iterated elements' type. */ @Internal public interface IterableIterator<E> extends Iterator<E>, Iterable<E> {}
apache/fory
1,144
integration_tests/jpms_tests/src/main/java/module-info.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. */ module org.apache.fory.integration_tests { requires org.apache.fory.benchmark; requires org.apache.fory.core; requires org.apache.fory.format; requires org.apache.fory.test.core; // we can't really test any classes from this module because it only contains test-classes requires org.apache.fory.test.suite; }
apache/geaflow
1,087
geaflow-console/app/common/dal/src/main/java/org/apache/geaflow/console/common/dal/entity/TenantEntity.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.geaflow.console.common.dal.entity; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Getter; import lombok.Setter; @Getter @Setter @TableName("geaflow_tenant") public class TenantEntity extends NameEntity { private String quotaId; }
apache/geode
1,123
geode-core/src/main/java/org/apache/geode/internal/cache/tier/ConnectionProxy.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.geode.internal.cache.tier; import org.apache.geode.annotations.Immutable; import org.apache.geode.internal.serialization.KnownVersion; /** * Provides the version of the client. */ public interface ConnectionProxy { @Immutable KnownVersion VERSION = KnownVersion.CURRENT.getClientServerProtocolVersion(); }
apache/gobblin
1,119
gobblin-api/src/main/java/org/apache/gobblin/initializer/NoopInitializer.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.gobblin.initializer; import lombok.ToString; @ToString public class NoopInitializer implements Initializer { public static final NoopInitializer INSTANCE = new NoopInitializer(); private NoopInitializer() {} @Override public void initialize() {} @Override public void close() {} }
apache/gobblin
1,123
gobblin-utility/src/main/java/org/apache/gobblin/util/io/MeteredStream.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.gobblin.util.io; import com.codahale.metrics.Meter; /** * A {@link java.io.InputStream} or {@link java.io.OutputStream} that measures bytes processed. */ public interface MeteredStream { /** * @return The {@link Meter} measuring the bytes processed. */ Meter getBytesProcessedMeter(); }
apache/gobblin
1,128
gobblin-api/src/main/java/org/apache/gobblin/dataset/Dataset.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.gobblin.dataset; /** * Interface representing a dataset. */ public interface Dataset extends URNIdentified { /** * URN for this dataset. * @deprecated use {@link #getUrn()} */ @Deprecated public String datasetURN(); @Override default String getUrn() { return datasetURN(); } }
apache/hadoop-common
1,096
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/filter/package-info.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. */ /** * Builtin metrics filters (to be used in metrics config files) */ @InterfaceAudience.Public @InterfaceStability.Evolving package org.apache.hadoop.metrics2.filter; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop-common
1,097
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/PathOperationException.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.hadoop.fs; /** ENOTSUP */ public class PathOperationException extends PathExistsException { static final long serialVersionUID = 0L; /** @param path for the exception */ public PathOperationException(String path) { super(path, "Operation not supported"); } }
apache/hadoop
1,057
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/FileSystemCounter.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.hadoop.mapreduce; import org.apache.hadoop.classification.InterfaceAudience; @InterfaceAudience.Private public enum FileSystemCounter { BYTES_READ, BYTES_WRITTEN, READ_OPS, LARGE_READ_OPS, WRITE_OPS, BYTES_READ_EC, }
apache/hadoop
1,089
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/ToJSON.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.hadoop.yarn.webapp; import java.io.PrintWriter; import org.apache.hadoop.classification.InterfaceAudience; /** * A light-weight JSON rendering interface */ @InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"}) public interface ToJSON { void toJSON(PrintWriter out); }
apache/hadoop
1,103
hadoop-tools/hadoop-aliyun/src/main/java/org/apache/hadoop/fs/aliyun/oss/statistics/package-info.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. */ /** * Statistics collection for the OSS connector: interfaces. */ @InterfaceAudience.Private @InterfaceStability.Unstable package org.apache.hadoop.fs.aliyun.oss.statistics; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/harmony
1,129
classlib/modules/rmi/src/main/java/java/rmi/UnknownHostException.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 java.rmi; public class UnknownHostException extends RemoteException { private static final long serialVersionUID = -8152710247442114228L; public UnknownHostException(String msg, Exception cause) { super(msg, cause); } public UnknownHostException(String msg) { super(msg); } }
apache/hertzbeat
1,075
template-marketplace/hertzbeat-template-hub/src/main/java/org/apache/hertzbeat/templatehub/service/impl/UserServiceImpl.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.hertzbeat.templatehub.service.impl; import org.apache.hertzbeat.templatehub.service.UserService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @Slf4j @Service public class UserServiceImpl implements UserService { }
apache/hive
1,110
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/BusyException.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.hive.hcatalog.templeton; import org.eclipse.jetty.http.HttpStatus; /** * Simple "we are busy, try again" exception. */ public class BusyException extends SimpleWebException { public BusyException() { super(HttpStatus.SERVICE_UNAVAILABLE_503, "Busy, please retry"); } }
apache/hop
1,124
core/src/main/java/org/apache/hop/core/parameters/NamedParameterDefinition.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.hop.core.parameters; /** Target class for the parameter keys. */ public class NamedParameterDefinition { /** key of this parameter */ public String key; /** Description of the parameter */ public String description; /** Default value for this parameter */ public String defaultValue; }
apache/hop
1,131
rap/src/main/java/org/apache/hop/ui/hopgui/context/GuiContextUtilImpl.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.hop.ui.hopgui.context; import org.apache.hop.ui.hopgui.ISingletonProvider; import org.eclipse.rap.rwt.SingletonUtil; public class GuiContextUtilImpl implements ISingletonProvider { @Override public Object getInstanceInternal() { return SingletonUtil.getSessionInstance(GuiContextUtil.class); } }