repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
openjdk/jdk8
1,181
langtools/test/tools/javac/diags/examples/VoidNotAllowed.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.void.not.allowed.here class X { void m() { } void m2() { System.err.println(m()); } }
openjdk/jdk8
1,185
jdk/test/sun/misc/JarIndex/metaInfFilenames/jarA/a/A.java
/* * Copyright (c) 2011, 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 a; public class A { public static void hello() throws Exception { System.out.println("Hello from a.A"); } }
openjdk/jdk8
1,185
jdk/test/sun/security/provider/PolicyParser/ExtDirsB.java
/* * Copyright (c) 2001, 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. */ public class ExtDirsB { public void go() { System.out.println("user.home = " + System.getProperty("user.home")); } }
openjdk/jdk8
1,196
langtools/test/tools/javac/danglingDep/RefX.java
/* * Copyright (c) 2005, 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. */ // This class is used to check whether a class has been marked deprecated or not. class RefX { void refX() { X x = new X(); } }
openjdk/jtreg
1,182
test/modlibs/compileAction/usermods/um3/um3_p1/um3_p1_C.java
/* * Copyright (c) 2015, 2017, 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 um3_p1; public class um3_p1_C { public void run() { System.out.println(getClass().getName()); } }
openjdk/jtreg
1,202
test/extra-props/bad-compile/Test1.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. */ /* * @test * @requires extra */ public class Test1 { public static void main(String... args) { // this test should be executed } }
openjdk/jtreg
1,202
test/extra-props/bad-execute/Test1.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. */ /* * @test * @requires extra */ public class Test1 { public static void main(String... args) { // this test should be executed } }
openjdk/jtreg
1,209
test/junitTrace/Pass.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. */ /* * @test * @run junit Pass */ import org.junit.*; public class Pass { @Test public void test() { System.out.println("Pass"); } }
apache/ctakes
1,145
ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/vo/LookupToken.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.ctakes.dictionary.lookup.vo; /** * This object represents the SMALLEST span of text that could potentially * be a lookup hit. In some cases this may be a single word or it can be a * group of words such as a noun phrase. * * @author Mayo Clinic */ public interface LookupToken extends LookupAnnotation { }
apache/cxf
1,118
rt/rs/security/http-signature/src/main/java/org/apache/cxf/rs/security/httpsignature/exception/InvalidSignatureException.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.rs.security.httpsignature.exception; public class InvalidSignatureException extends SignatureException { private static final long serialVersionUID = 1L; public InvalidSignatureException() { } public InvalidSignatureException(String message) { super(message); } }
apache/cxf
1,125
integration/tracing/tracing-brave/src/main/java/org/apache/cxf/tracing/brave/jaxrs/BraveTracerContextClassProvider.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.tracing.brave.jaxrs; import org.apache.cxf.jaxrs.ext.ContextClassProvider; import org.apache.cxf.tracing.TracerContext; public class BraveTracerContextClassProvider implements ContextClassProvider { @Override public Class<?> getContextClass() { return TracerContext.class; } }
apache/cxf
1,142
services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateException.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.xkms.exception; public class XKMSValidateException extends XKMSException { private static final long serialVersionUID = 868729742068991785L; public XKMSValidateException(String msg) { super(msg); } public XKMSValidateException(String msg, Throwable e) { super(msg, e); } }
apache/deltaspike
1,111
deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc004/PageBean004.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.jsf.impl.config.view.controller.uc004; import org.apache.deltaspike.core.api.config.view.controller.PreRenderView; import jakarta.enterprise.inject.Model; @Model public class PageBean004 { @PreRenderView protected void preRenderViewCallbackMethod() { } }
apache/deltaspike
1,111
deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc005/PageBean005.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.jsf.impl.config.view.controller.uc005; import org.apache.deltaspike.core.api.config.view.controller.PreRenderView; import jakarta.enterprise.inject.Model; @Model public class PageBean005 { @PreRenderView protected void preRenderViewCallbackMethod() { } }
apache/deltaspike
1,132
deltaspike/modules/data/impl/src/test/java/org/apache/deltaspike/data/test/service/MySimpleRepository.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.data.test.service; import org.apache.deltaspike.data.api.EntityRepository; import org.apache.deltaspike.data.api.Repository; import org.apache.deltaspike.data.test.domain.Simple; @Repository public interface MySimpleRepository extends MyEntityRepository<Simple>, EntityRepository<Simple, Long> { }
apache/deltaspike
1,145
deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/DevBean.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; import org.apache.deltaspike.core.api.projectstage.ProjectStage; /** * Class which gets only included in case of project-stage development */ @Exclude(exceptIfProjectStage = ProjectStage.Development.class) public class DevBean { }
apache/dolphinscheduler
1,119
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/lifecycle/ServerLifeCycleException.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.common.lifecycle; public class ServerLifeCycleException extends Exception { public ServerLifeCycleException(String message) { super(message); } public ServerLifeCycleException(String message, Throwable throwable) { super(message, throwable); } }
apache/doris-manager
1,105
manager/general/src/main/java/org/apache/doris/stack/exception/RequestFieldNullException.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.doris.stack.exception; /** * @Description:There is a problem with the request body */ public class RequestFieldNullException extends Exception { public static final String MESSAGE = "存在必填字段未填写,请重新填写"; public RequestFieldNullException() { super(MESSAGE); } }
apache/doris-manager
1,130
manager/dm-agent/src/main/java/org/apache/doris/manager/agent/exceptions/InstanceServiceException.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.doris.manager.agent.exceptions; public class InstanceServiceException extends Exception { private final String moduleName; public InstanceServiceException(String moduleName) { super(String.format("instance %s service exception", moduleName)); this.moduleName = moduleName; } }
apache/druid
1,133
indexing-service/src/test/java/org/apache/druid/indexing/common/task/SupervisorTaskAccessWithNullClient.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.druid.indexing.common.task; import org.apache.druid.indexing.common.task.batch.parallel.SupervisorTaskAccess; public class SupervisorTaskAccessWithNullClient extends SupervisorTaskAccess { public SupervisorTaskAccessWithNullClient(String supervisorTaskId) { super(supervisorTaskId, null); } }
apache/druid
1,147
processing/src/main/java/org/apache/druid/segment/serde/cell/PayloadEntrySpan.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.druid.segment.serde.cell; public class PayloadEntrySpan { private final long start; private final int size; public PayloadEntrySpan(long start, int size) { this.start = start; this.size = size; } public long getStart() { return start; } public int getSize() { return size; } }
apache/druid
1,152
processing/src/test/java/org/apache/druid/segment/loading/NoopDataSegmentMover.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.druid.segment.loading; import org.apache.druid.timeline.DataSegment; import java.util.Map; /** * Mostly used for test purpose. */ public class NoopDataSegmentMover implements DataSegmentMover { @Override public DataSegment move(DataSegment segment, Map<String, Object> targetLoadSpec) { return segment; } }
apache/druid
1,162
processing/src/main/java/org/apache/druid/guice/DruidGuiceExtensions.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.druid.guice; import com.google.inject.Binder; import com.google.inject.Module; import org.apache.druid.guice.annotations.PublicApi; /** */ @PublicApi public class DruidGuiceExtensions implements Module { @Override public void configure(Binder binder) { binder.bindScope(LazySingleton.class, DruidScopes.SINGLETON); } }
apache/dubbo-spi-extensions
1,098
dubbo-serialization-extensions/dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/serialize/kryo/KryoPersonOkTest.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.dubbo.common.serialize.kryo; import org.apache.dubbo.common.serialize.base.AbstractSerializationPersonOkTest; /** * KryoPersonOkTest */ public class KryoPersonOkTest extends AbstractSerializationPersonOkTest { { serialization = new KryoSerialization(); } }
apache/dubbo-spi-extensions
1,121
dubbo-rpc-extensions/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/RestServerFactory.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.dubbo.rpc.protocol.rest; /** * Only the server that implements servlet container * could support something like @Context injection of servlet objects. */ public class RestServerFactory { public RestProtocolServer createServer(String name) { return new NettyHttpRestServer(); } }
apache/eagle
1,126
eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/resolver/TopologyRackResolver.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.eagle.topology.resolver; import org.apache.eagle.topology.TopologyCheckAppConfig; public interface TopologyRackResolver { default void prepare(TopologyCheckAppConfig config) {} /** *resolve rack by hostname. * @return rack name */ String resolve(String hostname); }
apache/eventmesh
1,131
eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/mq/kafka/KafkaSinkConfig.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.eventmesh.common.config.connector.mq.kafka; import org.apache.eventmesh.common.config.connector.SinkConfig; import lombok.Data; import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) @Data public class KafkaSinkConfig extends SinkConfig { public SinkConnectorConfig connectorConfig; }
apache/felix-dev
1,078
ipojo/runtime/composite-it/ipojo-composite-import-export-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/BazService.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.ipojo.runtime.core.services; import java.util.Properties; public interface BazService { boolean foo(); Properties fooProps(); Boolean getObject(); boolean getBoolean(); int getInt(); long getLong(); double getDouble(); }
apache/felix-dev
1,078
ipojo/runtime/composite-it/ipojo-composite-import-export-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.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.ipojo.runtime.core.services; import java.util.Properties; public interface FooService { boolean foo(); Properties fooProps(); Boolean getObject(); boolean getBoolean(); int getInt(); long getLong(); double getDouble(); }
apache/felix-dev
1,078
ipojo/runtime/core-it/ipojo-core-configuration-processor-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.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.ipojo.runtime.core.services; import java.util.Properties; public interface FooService { boolean foo(); Properties fooProps(); Boolean getObject(); boolean getBoolean(); int getInt(); long getLong(); double getDouble(); }
apache/felix-dev
1,093
dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/hello/annot/ServiceConsumerConf.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.annot; /** * This is our type-safe configuration for the ServiceConsumer component. * * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> */ public interface ServiceConsumerConf { String getKey(); }
apache/fineract
1,122
fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/MoneyHolder.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.fineract.portfolio.loanaccount.domain.transactionprocessor; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; import org.apache.fineract.organisation.monetary.domain.Money; @Getter @Setter @AllArgsConstructor public class MoneyHolder { private Money moneyObject; }
apache/fineract
1,124
fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureReadPlatformService.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.fineract.accounting.closure.service; import java.util.List; import org.apache.fineract.accounting.closure.data.GLClosureData; public interface GLClosureReadPlatformService { List<GLClosureData> retrieveAllGLClosures(Long OfficeId); GLClosureData retrieveGLClosureById(long glClosureId); }
apache/fineract
1,145
fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/EventMessage.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.fineract.test.messaging; import java.time.LocalDate; import lombok.Getter; import lombok.RequiredArgsConstructor; @RequiredArgsConstructor @Getter public class EventMessage<T> { private final String type; private final LocalDate businessDate; private final T data; private final String idempotencyKey; }
apache/flink-cdc
1,135
flink-cdc-pipeline-udf-examples/src/main/java/org/apache/flink/udf/examples/java/FormatFunctionClass.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.udf.examples.java; import org.apache.flink.table.functions.ScalarFunction; /** This is an example UDF class for testing purposes only. */ public class FormatFunctionClass extends ScalarFunction { public String eval(String format, Object... args) { return String.format(format, args); } }
apache/flink
1,152
flink-filesystems/flink-s3-fs-presto/src/main/java/org/openjdk/jol/info/ClassLayout.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.openjdk.jol.info; /** Mock class avoid a dependency on OpenJDK JOL, which is incompatible with the Apache License. */ public class ClassLayout { public static ClassLayout parseClass(Class<?> ignored) { return new ClassLayout(); } public int instanceSize() { return 64; // random, means nothing } }
apache/fluss
1,147
fluss-common/src/main/java/org/apache/fluss/exception/TabletServerNotAvailableException.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.fluss.exception; import org.apache.fluss.annotation.PublicEvolving; /** * Thrown when the tabletServer is not available. * * @since 0.8 */ @PublicEvolving public class TabletServerNotAvailableException extends ApiException { public TabletServerNotAvailableException(String message) { super(message); } }
apache/fory
1,175
java/fory-core/src/main/java/org/apache/fory/annotation/Expose.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.fory.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** Only fields with this annotation are permitted for de/serialization. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface Expose {}
apache/freemarker-online-tester
1,115
src/main/java/org/apache/freemarker/onlinetester/healthchecks/FreeMarkerOnlineTesterOverallHealthCheck.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.freemarker.onlinetester.healthchecks; import com.codahale.metrics.health.HealthCheck; public class FreeMarkerOnlineTesterOverallHealthCheck extends HealthCheck { @Override protected Result check() throws Exception { return Result.healthy(); // we're always healthy! } }
apache/freemarker
1,151
freemarker-core/src/main/java/freemarker/core/UndefinedCustomFormatException.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 freemarker.core; /** * @since 2.3.24 */ public class UndefinedCustomFormatException extends InvalidFormatStringException { public UndefinedCustomFormatException(String message, Throwable cause) { super(message, cause); } public UndefinedCustomFormatException(String message) { super(message); } }
apache/geaflow
1,101
geaflow-console/app/common/service/integration/src/main/java/org/apache/geaflow/console/common/service/integration/engine/JsonPlan.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.service.integration.engine; import java.util.Map; import org.apache.geaflow.console.common.util.proxy.ProxyClass; @ProxyClass("org.apache.geaflow.dsl.common.compile.JsonPlan") public interface JsonPlan { Map<String, Vertex> getVertices(); }
apache/geaflow
1,110
geaflow/geaflow-core/geaflow-runtime/geaflow-processor/src/main/java/org/apache/geaflow/processor/builder/IProcessorBuilder.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.processor.builder; import org.apache.geaflow.operator.Operator; import org.apache.geaflow.processor.Processor; public interface IProcessorBuilder { /** * Build processor based on corresponding operator. */ Processor buildProcessor(Operator operator); }
apache/geode
1,164
geode-core/src/distributedTest/java/org/apache/geode/management/Manager.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.management; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; @Target(FIELD) @Retention(RUNTIME) @Documented public @interface Manager { String name() default ""; }
apache/giraph
1,149
giraph-core/src/main/java/org/apache/giraph/types/ops/collections/ResettableIterator.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.giraph.types.ops.collections; import java.util.Iterator; /** * Defines an iterator that can iterated over multiple times, by * rewinding it via reset() function. * * @param <T> Element type */ public interface ResettableIterator<T> extends Iterator<T> { /** Rewinds iterator to the beginning. */ void reset(); }
apache/giraph
1,151
giraph-core/src/main/java/org/apache/giraph/types/BooleanWritableToBooleanUnwrapper.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.giraph.types; import org.apache.hadoop.io.BooleanWritable; /** * Converts BooleanWritables to Booleans. */ public class BooleanWritableToBooleanUnwrapper implements WritableUnwrapper<BooleanWritable, Boolean> { @Override public Boolean unwrap(BooleanWritable writableValue) { return writableValue.get(); } }
apache/gobblin
1,124
gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/kafka/serialize/SerializationException.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.kafka.serialize; public class SerializationException extends Exception { public SerializationException(String message) { super(message); } public SerializationException(String s, Exception e) { super(s, e); } public SerializationException(Exception e) { super(e); } }
apache/gobblin
1,137
gobblin-core/src/main/java/org/apache/gobblin/source/extractor/exception/ExtractPrepareException.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.source.extractor.exception; public class ExtractPrepareException extends Exception { private static final long serialVersionUID = 1L; public ExtractPrepareException(String message) { super(message); } public ExtractPrepareException(String message, Exception e) { super(message, e); } }
apache/gobblin
1,148
gobblin-core/src/main/java/org/apache/gobblin/source/extractor/schema/MapDataType.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.source.extractor.schema; public class MapDataType extends DataType { String values; public MapDataType(String type, String values) { super(type); this.values = values; } public String getValues() { return this.values; } public void setValues(String values) { this.values = values; } }
apache/gobblin
1,159
gobblin-api/src/main/java/org/apache/gobblin/records/RecordStreamConsumer.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.records; /** * An object that a {@link RecordStreamWithMetadata}. * @param <S> schema type * @param <D> data type */ public interface RecordStreamConsumer<S, D> { /** * Subscribe to the input {@link RecordStreamWithMetadata}. */ void consumeRecordStream(RecordStreamWithMetadata<D, S> stream) throws Exception; }
apache/gora
1,170
gora-redis/src/main/java/org/apache/gora/redis/util/StorageMode.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.gora.redis.util; /** * Storage mode of Objects for gora-redis * * More details in: * https://cwiki.apache.org/confluence/display/GORA/Redis+backend+documentation */ public enum StorageMode { /** * The records are stored in a single hash in redis. */ SINGLEKEY, /** * The records are stored in multiple keys. */ MULTIKEY }
apache/groovy
1,164
src/main/java/org/codehaus/groovy/runtime/callsite/CallSiteAwareMetaMethod.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.codehaus.groovy.runtime.callsite; import groovy.lang.MetaClassImpl; import groovy.lang.MetaMethod; public abstract class CallSiteAwareMetaMethod extends MetaMethod{ public abstract CallSite createPojoCallSite(CallSite site, MetaClassImpl metaClass, MetaMethod metaMethod, Class[] params, Object receiver, Object[] args); }
apache/hadoop-common
1,137
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/test/TestException.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.test; import java.lang.annotation.Retention; import java.lang.annotation.Target; @Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @Target(java.lang.annotation.ElementType.METHOD) public @interface TestException { Class<? extends Throwable> exception(); String msgRegExp() default ".*"; }
apache/hadoop-mapreduce
1,138
src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/server/IJobListener.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.eclipse.server; /** * Interface for updating/adding jobs to the MapReduce Server view. */ public interface IJobListener { void jobChanged(HadoopJob job); void jobAdded(HadoopJob job); void jobRemoved(HadoopJob job); void publishStart(JarModule jar); void publishDone(JarModule jar); }
apache/hadoop
1,031
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/resourceplugin/deviceframework/FakeTestDevicePlugin2.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.server.nodemanager.containermanager.resourceplugin.deviceframework; /** * Only used for testing. * This isn't a implementation of DevicePlugin * */ public class FakeTestDevicePlugin2 { }
apache/hadoop
1,080
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/checkpoint/CheckpointNamingService.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.checkpoint; /** * This class represent a naming service for checkpoints. */ public interface CheckpointNamingService { /** * Generate a new checkpoint Name * @return the checkpoint name */ public String getNewName(); }
apache/hadoop
1,147
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RpcMultiplexer.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.ipc; /** * Implement this interface to make a pluggable multiplexer in the * FairCallQueue. */ public interface RpcMultiplexer { /** * Should get current index and optionally perform whatever is needed * to prepare the next index. * @return current index */ int getAndAdvanceCurrentIndex(); }
apache/harmony
1,139
classlib/modules/auth/src/main/java/common/javax/security/auth/login/AccountNotFoundException.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 javax.security.auth.login; public class AccountNotFoundException extends AccountException { private static final long serialVersionUID = 1498349563916294614L; public AccountNotFoundException() { super(); } public AccountNotFoundException(String message) { super(message); } }
apache/harmony
1,159
classlib/modules/swing/src/main/java/common/javax/swing/tree/MutableTreeNode.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. */ /** * @author Anton Avtamonov */ package javax.swing.tree; public interface MutableTreeNode extends TreeNode { void insert(MutableTreeNode child, int index); void remove(int index); void remove(MutableTreeNode node); void setUserObject(Object object); void removeFromParent(); void setParent(MutableTreeNode parent); }
apache/harmony
1,193
drlvm/src/test/regression/H5067/Test.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.harmony.drlvm.tests.regression.h5067; import junit.framework.TestCase; public class Test extends TestCase { public void test() { char c_max = Character.MAX_VALUE; String max = String.valueOf(Character.MAX_VALUE); String s = String.valueOf("abcde"); int res = max.compareTo(s); assertEquals(65438, res); } }
apache/hop
1,150
engine/src/main/java/org/apache/hop/pipeline/engines/local/LocalPipelineEngineCapabilities.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.pipeline.engines.local; import org.apache.hop.pipeline.engine.PipelineEngineCapabilities; public class LocalPipelineEngineCapabilities extends PipelineEngineCapabilities { /** Locally we can do preview, debug, sniff testing, ... */ public LocalPipelineEngineCapabilities() { super(true, true, true, true); } }
apache/ignite-3
1,136
modules/network/src/main/java/org/apache/ignite/internal/network/recovery/message/InternalMessage.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.ignite.internal.network.recovery.message; import org.apache.ignite.internal.network.NetworkMessage; /** * Message that does not need an acknowledgement from the remote node. */ public interface InternalMessage extends NetworkMessage { @Override default boolean needAck() { return false; } }
apache/ignite-3
1,148
modules/raft/src/test/java/org/apache/ignite/raft/jraft/storage/impl/LocalLogStorageTest.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.ignite.raft.jraft.storage.impl; import org.apache.ignite.raft.jraft.option.RaftOptions; import org.apache.ignite.raft.jraft.storage.LogStorage; public class LocalLogStorageTest extends BaseLogStorageTest { @Override protected LogStorage newLogStorage() { return new LocalLogStorage(new RaftOptions()); } }
apache/ignite-3
1,151
modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/RpcResponseClosure.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.ignite.raft.jraft.rpc; import org.apache.ignite.raft.jraft.Closure; /** * RPC response closure. * * @param <T> */ public interface RpcResponseClosure<T extends Message> extends Closure { /** * Called by request handler to set response. * * @param resp rpc response */ void setResponse(T resp); }
apache/ignite-extensions
1,132
modules/ml-ext/ml/src/main/java/org/apache/ignite/ml/composition/boosting/convergence/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. */ /** * <!-- Package description. --> * Package contains implementation of convergence checking algorithms for gradient boosting. * This algorithms may stop training of gradient boosting if it achieve error on dataset less than precision * specified by user. */ package org.apache.ignite.ml.composition.boosting.convergence;
apache/ignite
1,101
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTwoNodesTest.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.ignite.internal.processors.cache.query.continuous; /** * */ public class CacheContinuousQueryRandomOperationsTwoNodesTest extends CacheContinuousQueryRandomOperationsTest { /** {@inheritDoc} */ @Override protected int getServerNodeCount() { return 1; } }
apache/ignite
1,150
examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesMultiNodeSelfTest.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.ignite.examples; /** * Deployment examples multi-node self test. */ public class DeploymentExamplesMultiNodeSelfTest extends DeploymentExamplesSelfTest { /** {@inheritDoc} */ @Override public void testDeploymentExample() throws Exception { startRemoteNodes(); super.testDeploymentExample(); } }
apache/ignite
1,161
modules/core/src/main/java/org/apache/ignite/client/ClientRetryNonePolicy.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.ignite.client; /** * Retry policy that always returns {@code false}. */ public class ClientRetryNonePolicy implements ClientRetryPolicy { /** */ private static final long serialVersionUID = 0L; /** {@inheritDoc} */ @Override public boolean shouldRetry(ClientRetryPolicyContext context) { return false; } }
apache/incubator-baremaps
1,140
baremaps-postgres/src/main/java/org/apache/baremaps/postgres/metadata/TableMetadata.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.baremaps.postgres.metadata; import java.util.List; public record TableMetadata( TableResult table, List<PrimaryKeyResult> primaryKeys, List<ColumnResult> columns) { public List<ColumnResult> getGeometryColumns() { return columns.stream().filter(column -> "geometry".equals(column.typeName())).toList(); } }
apache/incubator-brooklyn
1,120
brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/redis/RedisSlaveImpl.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.brooklyn.entity.nosql.redis; /** * A {@link RedisStore} configured as a slave. */ public class RedisSlaveImpl extends RedisStoreImpl implements RedisSlave { public RedisSlaveImpl() { } @Override public RedisStore getMaster() { return getConfig(MASTER); } }
apache/incubator-brooklyn
1,127
brooklyn-server/utils/common/src/main/java/org/apache/brooklyn/util/net/Protocol.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.brooklyn.util.net; public enum Protocol { TCP("tcp"), UDP("udp"), ICMP("icmp"), ALL("all"); final String protocol; private Protocol(String protocol) { this.protocol = protocol; } @Override public String toString() { return protocol; } }
apache/incubator-datalab
1,130
services/self-service/src/main/java/com/epam/datalab/backendapi/domain/EndpointResourcesDTO.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 com.epam.datalab.backendapi.domain; import com.epam.datalab.dto.UserInstanceDTO; import lombok.AllArgsConstructor; import lombok.Data; import java.util.List; @Data @AllArgsConstructor public class EndpointResourcesDTO { private List<UserInstanceDTO> exploratories; private List<ProjectDTO> projects; }
apache/incubator-gluten
1,164
backends-velox/src/test/java/org/apache/gluten/tags/FuzzerTest.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.gluten.tags; import org.scalatest.TagAnnotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @TagAnnotation @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD, ElementType.TYPE}) public @interface FuzzerTest {}
apache/incubator-kie-drools
1,113
drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/waltz/WaltzMain.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.drools.mvel.integrationtests.waltz; import org.drools.testcoverage.common.util.KieBaseTestConfiguration; public class WaltzMain extends ReteOOWaltzTest { public static final void main(String[] args) { new WaltzMain().testWaltz(KieBaseTestConfiguration.CLOUD_IDENTITY); } }
apache/incubator-kie-drools
1,113
kie-maven-plugin/src/it/kie-maven-plugin-test-kjar-9-exec-model/src/main/java/org/declaredtype/FactA.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.declaredtype; public class FactA { private String propA; public FactA() { } public FactA(String propA) { this.propA = propA; } public String getPropA() { return propA; } public void setPropA(String propA) { this.propA = propA; } }
apache/incubator-kie-drools
1,162
kie-api/src/main/java/org/kie/api/internal/weaver/KieWeavers.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.kie.api.internal.weaver; import org.kie.api.definition.KiePackage; import org.kie.api.internal.io.ResourceTypePackage; import org.kie.api.internal.utils.KieService; public interface KieWeavers extends KieService { void weave(KiePackage newPkg, ResourceTypePackage rtkKpg); void merge(KiePackage pkg, ResourceTypePackage rtkKpg); }
apache/incubator-kie-kogito-runtimes
1,106
springboot/addons/common/common-auth/src/main/java/org/kie/addons/springboot/auth/PrincipalAuthTokenReader.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.kie.addons.springboot.auth; public interface PrincipalAuthTokenReader<T> { Class<T> getPrincipalType(); String readToken(T principal); default boolean acceptsPrincipal(Object principal) { return getPrincipalType().isAssignableFrom(principal.getClass()); } }
apache/incubator-myriad
1,132
myriad-scheduler/src/main/java/org/apache/myriad/scheduler/event/OfferRescindedEventFactory.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.myriad.scheduler.event; import com.lmax.disruptor.EventFactory; /** * offer rescinded event factory */ public class OfferRescindedEventFactory implements EventFactory<OfferRescindedEvent> { @Override public OfferRescindedEvent newInstance() { return new OfferRescindedEvent(); } }
apache/incubator-seata-samples
1,096
at-sample/dubbo-samples-seata/dubbo-samples-seata-order/src/test/java/org/apache/dubbo/samples/seata/OrderApplicationTests.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.dubbo.samples.seata; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest(classes = OrderApplicationTests.class) class OrderApplicationTests { @Test void contextLoads() { } }
apache/incubator-seata-samples
1,096
at-sample/dubbo-samples-seata/dubbo-samples-seata-stock/src/test/java/org/apache/dubbo/samples/seata/StockApplicationTests.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.dubbo.samples.seata; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest(classes = StockApplicationTests.class) class StockApplicationTests { @Test void contextLoads() { } }
apache/incubator-tuweni
1,172
junit/src/main/java/org/apache/tuweni/junit/TempDirectory.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.tuweni.junit; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * A parameter annotation for injecting a temporary directory into junit5 tests. */ @Target(ElementType.PARAMETER) @Retention(RetentionPolicy.RUNTIME) public @interface TempDirectory { }
apache/incubator-wayang
1,143
wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/mapping/Mapping.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.wayang.core.mapping; import java.util.Collection; /** * A mapping issues a set of {@link PlanTransformation}s that make up the complete mapping. */ public interface Mapping { /** * @return the transformations that make up this mapping */ Collection<PlanTransformation> getTransformations(); }
apache/incubator-weex
1,168
android/sdk/src/main/java/org/apache/weex/bridge/Invoker.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.weex.bridge; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Type; /** * Created by sospartan on 6/16/16. */ public interface Invoker { Object invoke(Object receiver,Object...params) throws InvocationTargetException, IllegalAccessException; Type[] getParameterTypes(); boolean isRunOnUIThread(); }
apache/inlong
1,128
inlong-manager/manager-client-tools/src/main/java/org/apache/inlong/manager/client/cli/pojo/ClusterInfo.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.inlong.manager.client.cli.pojo; import lombok.Data; /** * Cluster info, including cluster name, cluster type, etc. */ @Data public class ClusterInfo { private int id; private String name; private String type; private String url; private String clusterTags; private Integer status; }
apache/iotdb-web-workbench
1,154
backend/src/main/java/org/apache/iotdb/admin/model/vo/QueryInfoVO.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.iotdb.admin.model.vo; import lombok.Data; import java.util.List; @Data public class QueryInfoVO { private Integer queryClassificationId; private String latestRunningTime; private Integer totalCount; private Integer totalPage; private Integer serverId; private List<QueryDataStrVO> filteredQueryDataStrVOSList; }
apache/iotdb
1,143
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/SchemaRegion.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.iotdb.db.schemaengine.schemaregion; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface SchemaRegion { String mode(); }
apache/jackrabbit-oak
1,140
oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ConcurrentReadWriteTest.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.jackrabbit.oak.benchmark; /** * A {@link ConcurrentReadTest} with a single writer thread that continuously * updates the nodes being accessed by the readers. */ public class ConcurrentReadWriteTest extends ConcurrentReadTest { public ConcurrentReadWriteTest() { super(getScale(20), 1, true); } }
apache/jclouds
1,164
providers/glesys/src/test/java/org/jclouds/glesys/GleSYSProviderTest.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.jclouds.glesys; import org.jclouds.providers.internal.BaseProviderMetadataTest; import org.testng.annotations.Test; @Test(groups = "unit", testName = "GleSYSProviderTest") public class GleSYSProviderTest extends BaseProviderMetadataTest { public GleSYSProviderTest() { super(new GleSYSProviderMetadata(), new GleSYSApiMetadata()); } }
apache/jclouds
1,164
providers/gogrid/src/test/java/org/jclouds/gogrid/GoGridProviderTest.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.jclouds.gogrid; import org.jclouds.providers.internal.BaseProviderMetadataTest; import org.testng.annotations.Test; @Test(groups = "unit", testName = "GoGridProviderTest") public class GoGridProviderTest extends BaseProviderMetadataTest { public GoGridProviderTest() { super(new GoGridProviderMetadata(), new GoGridApiMetadata()); } }
apache/jclouds
1,169
providers/b2/src/test/java/org/jclouds/b2/B2ProviderMetadataTest.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.jclouds.b2; import org.jclouds.providers.internal.BaseProviderMetadataTest; import org.testng.annotations.Test; @Test(groups = "unit", testName = "B2ProviderMetadataTest") public final class B2ProviderMetadataTest extends BaseProviderMetadataTest { public B2ProviderMetadataTest() { super(new B2ProviderMetadata(), new B2ApiMetadata()); } }
apache/jena
1,155
jena-db/jena-dboe-storage/src/test/java/org/apache/jena/dboe/storage/TC_StoreBase.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.jena.dboe.storage; import org.apache.jena.dboe.storage.prefixes.TS_Prefixes; import org.apache.jena.dboe.storage.storage.TS_Storage; import org.junit.platform.suite.api.SelectClasses; import org.junit.platform.suite.api.Suite; @Suite @SelectClasses({ TS_Storage.class, TS_Prefixes.class }) public class TC_StoreBase {}
apache/jena
1,159
jena-tdb1/src/test/java/org/apache/jena/tdb1/base/objectfile/TS_ObjectFile.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.jena.tdb1.base.objectfile; import org.junit.runner.RunWith ; import org.junit.runners.Suite ; @RunWith(Suite.class) @Suite.SuiteClasses( { TestObjectFileMem.class , TestObjectFileDisk.class , TestObjectFileBuffering.class , TestStringFileMem.class , TestStringFileDisk.class }) public class TS_ObjectFile { }
apache/jena
1,174
jena-core/src/main/java/org/apache/jena/graph/TripleIterator.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.jena.graph; import org.apache.jena.util.iterator.ExtendedIterator ; /** An extended iterator that can return its next element as a Triple. */ public interface TripleIterator extends ExtendedIterator<Triple> { /** Answer the next() element cast to Triple. @return (Triple) next() */ Triple nextTriple(); }
apache/jmeter
1,169
src/core/src/main/java/org/apache/jmeter/samplers/Interruptible.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.jmeter.samplers; /** * Samplers which are able to interrupt a potentially long-running operation should * implement this interface. * */ public interface Interruptible { /** * Interrupt the current operation if possible. * * @return <code>true</code> if there was an operation to interrupt. */ boolean interrupt(); }
apache/kafka
1,160
clients/src/main/java/org/apache/kafka/common/errors/FencedStateEpochException.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.kafka.common.errors; /** * Thrown when the share coordinator rejected the request because the share-group state epoch did not match. */ public class FencedStateEpochException extends ApiException { private static final long serialVersionUID = 1L; public FencedStateEpochException(String message) { super(message); } }
apache/kylin
1,153
src/common-service/src/main/java/org/apache/kylin/rest/service/ProjectModelSupporter.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.kylin.rest.service; import org.apache.kylin.metadata.realization.RealizationStatusEnum; public interface ProjectModelSupporter { void onModelUpdate(String project, String modelId); void onUpdateSCD2ModelStatus(String project, RealizationStatusEnum status); void onOfflineMultiPartitionModels(String project); }
apache/logging-log4j2
1,162
log4j-api/src/main/java/org/apache/logging/log4j/util/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. */ /** * Internal utility classes for the Log4j 2 API. Note that the use of any classes in this package is not supported. * There are no guarantees for binary or logical compatibility in this package. */ @Export @Version("2.25.0") package org.apache.logging.log4j.util; import org.osgi.annotation.bundle.Export; import org.osgi.annotation.versioning.Version;
apache/lucene
1,143
lucene/core/src/test/org/apache/lucene/codecs/compressing/TestLZ4WithPresetDictCompressionMode.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.lucene.codecs.compressing; import org.apache.lucene.codecs.lucene90.LZ4WithPresetDictCompressionMode; public class TestLZ4WithPresetDictCompressionMode extends AbstractTestCompressionMode { @Override public void setUp() throws Exception { super.setUp(); mode = new LZ4WithPresetDictCompressionMode(); } }
apache/lucene
1,145
lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/word2vec/TermAndBoost.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.lucene.analysis.synonym.word2vec; import org.apache.lucene.util.BytesRef; /** * Wraps a term and boost * * @param term the term * @param boost the boost */ public record TermAndBoost(BytesRef term, float boost) { /** Creates a new TermAndBoost */ public TermAndBoost { term = BytesRef.deepCopyOf(term); } }
apache/lucene
1,169
lucene/luke/src/java/org/apache/lucene/luke/util/BytesRefUtils.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.lucene.luke.util; import org.apache.lucene.util.BytesRef; /** An utility class for handling {@link BytesRef} objects. */ public final class BytesRefUtils { public static String decode(BytesRef ref) { try { return ref.utf8ToString(); } catch (Exception _) { return ref.toString(); } } private BytesRefUtils() {} }
apache/maven-javadoc-plugin
1,108
src/it/projects/MJAVADOC-449_aggr_modulepath/modulea/src/main/java/com/javamodularity/modulea/HelloWorld.java
package com.javamodularity.modulea; /* * 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. */ /** * <p>Javadoc aggregation from module a.</p> */ public class HelloWorld { /** * <p>method f does something</p> */ public void f() { } public static void main(String... args) { System.out.println("Hello Modular World!"); } }