repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/jena
1,138
jena-arq/src/main/java/org/apache/jena/sparql/function/library/leviathan/reciprocal.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.sparql.function.library.leviathan; import org.apache.jena.sparql.expr.NodeValue; import org.apache.jena.sparql.function.FunctionBase1; public class reciprocal extends FunctionBase1 { @Override public NodeValue exec(NodeValue v) { return NodeValue.makeDouble(1d / v.getDouble()); } }
apache/jena
1,152
jena-arq/src/main/java/org/apache/jena/sparql/lang/SPARQLParserFactory.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.sparql.lang; import org.apache.jena.query.Syntax; public interface SPARQLParserFactory { /** Return true if this factory can create a parser for the given syntax */ public boolean accept ( Syntax syntax ); /** Return a parser for the given syntax */ public SPARQLParser create ( Syntax syntax ); }
apache/jena
1,152
jena-arq/src/main/java/org/apache/jena/sparql/lang/UpdateParserFactory.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.sparql.lang; import org.apache.jena.query.Syntax; public interface UpdateParserFactory { /** Return true if this factory can create a parser for the given syntax */ public boolean accept ( Syntax syntax ); /** Return a parser for the given syntax */ public UpdateParser create ( Syntax syntax ); }
apache/jena
1,154
jena-arq/src/main/java/org/apache/jena/atlas/json/JsonException.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.atlas.json; public class JsonException extends RuntimeException { public JsonException() { super() ; } public JsonException(Throwable cause) { super(cause) ; } public JsonException(String msg) { super(msg) ; } public JsonException(String msg, Throwable cause) { super(msg, cause) ; } }
apache/kafka
1,142
clients/src/main/java/org/apache/kafka/common/errors/SnapshotNotFoundException.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; public class SnapshotNotFoundException extends ApiException { private static final long serialVersionUID = 1; public SnapshotNotFoundException(String s) { super(s); } public SnapshotNotFoundException(String message, Throwable cause) { super(message, cause); } }
apache/kafka
1,148
trogdor/src/main/java/org/apache/kafka/trogdor/task/NoOpTaskController.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.trogdor.task; import org.apache.kafka.trogdor.common.Topology; import java.util.Set; public class NoOpTaskController implements TaskController { public NoOpTaskController() { } @Override public Set<String> targetNodes(Topology topology) { return Topology.Util.agentNodeNames(topology); } }
apache/linkis
1,075
linkis-computation-governance/linkis-manager/linkis-manager-common/src/main/java/org/apache/linkis/manager/common/entity/recycle/AssignUserRule.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.linkis.manager.common.entity.recycle; public class AssignUserRule implements RecyclingRule { private final String user; public AssignUserRule(String user) { this.user = user; } @Override public String getUser() { return user; } }
apache/linkis
1,097
linkis-public-enhancements/linkis-pes-publicservice/src/main/java/org/apache/linkis/basedatamanager/server/conf/UdfTreeConf.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.linkis.basedatamanager.server.conf; import org.apache.linkis.common.conf.CommonVars; public class UdfTreeConf { public static final CommonVars<String> UDF_FUN_SYSTEM_CATEGORY = CommonVars.apply("linkis.udf.fun.system.category", "user_name,sys,expire,share,bdp"); }
apache/lucene
1,129
lucene/analysis/common/src/test/org/apache/lucene/analysis/hunspell/TestHomonyms.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.hunspell; import org.junit.BeforeClass; public class TestHomonyms extends StemmerTestBase { @BeforeClass public static void beforeClass() throws Exception { init("homonyms.aff", "homonyms.dic"); } public void testExamples() { assertStemsTo("works", "work", "work"); } }
apache/lucene
1,140
lucene/luke/src/java/org/apache/lucene/luke/app/desktop/util/inifile/OptionMap.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.app.desktop.util.inifile; import java.util.LinkedHashMap; /** Key-value store for options */ public class OptionMap extends LinkedHashMap<String, String> { String getAsString(String key) { return get(key); } Boolean getAsBoolean(String key) { return Boolean.parseBoolean(get(key)); } }
apache/maven-plugins
1,108
maven-compiler-plugin/src/it/includes-excludes/src/test/java/org/apache/maven/it0055/PersonTest.java
package org.apache.maven.it0055; /* * 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. */ import junit.framework.TestCase; public class PersonTest extends TestCase { public void testPerson() { Person person = new Person(); person.setName( "foo" ); assertEquals( "foo", person.getName() ); } }
apache/maven-plugins
1,126
maven-compiler-plugin/src/it/jpms_add-exports/src/main/java/org/maven/test/Main.java
package org.maven.test; /* * 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. */ public class Main { /** * @param args */ public static void main(String[] args) { try { Class.forName( "jdk.internal.util.Preconditions" ).newInstance(); } catch ( Exception e ) { // noop } } }
apache/maven
1,060
its/core-it-suite/src/test/resources/mng-5640-lifecycleParticipant-afterSession/buildfailure-depmissing/src/test/java/org/apache/maven/its/mng5640/FailingTest.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.maven.its.mng5640; import junit.framework.TestCase; /** * Always failing UT. */ public class FailingTest extends TestCase { /** * Rigourous Test :-) */ public void testApp() { assertTrue(false); } }
apache/maven
1,140
compat/maven-compat/src/main/java/org/apache/maven/toolchain/java/JavaToolchain.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.maven.toolchain.java; import org.apache.maven.toolchain.Toolchain; /** * JDK toolchain interface. * * @since 2.0.9, renamed from JavaToolChain in 3.2.4 * @deprecated Use {@link org.apache.maven.api.JavaToolchain} instead. */ @Deprecated(since = "4.0.0") public interface JavaToolchain extends Toolchain {}
apache/mina-sshd
1,126
sshd-core/src/main/java/org/apache/sshd/common/forward/ForwardingTunnelEndpointsProvider.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.sshd.common.forward; import org.apache.sshd.common.util.net.SshdSocketAddress; /** * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> */ public interface ForwardingTunnelEndpointsProvider { SshdSocketAddress getTunnelEntrance(); SshdSocketAddress getTunnelExit(); }
apache/mina-sshd
1,135
sshd-common/src/main/java/org/apache/sshd/common/compression/CompressionFactory.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.sshd.common.compression; import org.apache.sshd.common.BuiltinFactory; /** * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> */ // CHECKSTYLE:OFF public interface CompressionFactory extends BuiltinFactory<Compression>, CompressionInformation { // nothing extra } //CHECKSTYLE:ON
apache/myfaces
1,156
impl/src/main/java/org/apache/myfaces/config/element/Redirect.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.myfaces.config.element; import java.io.Serializable; import java.util.List; import java.util.Map; public abstract class Redirect implements Serializable { private static final long serialVersionUID = 1L; public abstract Map<String, List<String>> getViewParams(); public abstract String getIncludeViewParams(); }
apache/nifi
1,087
nifi-extension-bundles/nifi-py4j-extension-bundle/nifi-py4j-bridge/src/main/java/org/apache/nifi/python/processor/FlowFileSourceResult.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.nifi.python.processor; import org.apache.nifi.python.PythonObjectProxy; import java.util.Map; public interface FlowFileSourceResult extends PythonObjectProxy { String getRelationship(); byte[] getContents(); Map<String, String> getAttributes(); }
apache/nifi
1,090
nifi-extension-bundles/nifi-extension-utils/nifi-syslog-utils/src/test/java/org/apache/nifi/syslog/StrictSyslog5424ParserDashPolicyTest.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.nifi.syslog; import org.apache.nifi.syslog.utils.NilHandlingPolicy; public class StrictSyslog5424ParserDashPolicyTest extends BaseStrictSyslog5424ParserTest { @Override protected NilHandlingPolicy getPolicy() { return NilHandlingPolicy.DASH; } }
apache/nifi
1,090
nifi-extension-bundles/nifi-extension-utils/nifi-syslog-utils/src/test/java/org/apache/nifi/syslog/StrictSyslog5424ParserNullPolicyTest.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.nifi.syslog; import org.apache.nifi.syslog.utils.NilHandlingPolicy; public class StrictSyslog5424ParserNullPolicyTest extends BaseStrictSyslog5424ParserTest { @Override protected NilHandlingPolicy getPolicy() { return NilHandlingPolicy.NULL; } }
apache/nifi
1,090
nifi-extension-bundles/nifi-extension-utils/nifi-syslog-utils/src/test/java/org/apache/nifi/syslog/StrictSyslog5424ParserOmitPolicyTest.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.nifi.syslog; import org.apache.nifi.syslog.utils.NilHandlingPolicy; public class StrictSyslog5424ParserOmitPolicyTest extends BaseStrictSyslog5424ParserTest { @Override protected NilHandlingPolicy getPolicy() { return NilHandlingPolicy.OMIT; } }
apache/nifi
1,128
nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/result/OkResult.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.nifi.toolkit.cli.impl.result; /** * Result for commands that want to print 'OK' for a successful command. */ public class OkResult extends StringResult { public static final String OK_VALUE = "OK"; public OkResult(final boolean isInteractive) { super(OK_VALUE, isInteractive); } }
apache/nutch
1,160
src/java/org/apache/nutch/metadata/CaseInsensitiveMetadata.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.nutch.metadata; import java.util.TreeMap; /** * A decorator to Metadata that adds for case-insensitive lookup of keys. */ public class CaseInsensitiveMetadata extends Metadata { /** * Constructs a new, empty metadata. */ public CaseInsensitiveMetadata() { metadata = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); } }
apache/openjpa
1,111
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/meta/common/apps/OrderByPCRelSub.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.openjpa.persistence.meta.common.apps; import jakarta.persistence.Entity; @Entity public class OrderByPCRelSub extends OrderByPCRel { private int sub; public int getSub() { return this.sub; } public void setSub(int sub) { this.sub = sub; } }
apache/openwebbeans
1,105
webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/initializer/BrokenInitializer3.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.webbeans.test.component.exception.initializer; import jakarta.enterprise.inject.Disposes; import jakarta.inject.Inject; public class BrokenInitializer3 { public BrokenInitializer3() { } @Inject public void init3(@Disposes int x) { } }
apache/ozhera
1,095
ozhera-monitor/ozhera-monitor-service/src/main/java/org/apache/ozhera/monitor/service/model/prometheus/MetricResponse.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.ozhera.monitor.service.model.prometheus; import lombok.Data; import java.io.Serializable; /** * @author gaoxihui * @date 2021/8/16 11:25 上午 */ @Data public class MetricResponse implements Serializable { private String status; private MetricData data; }
apache/ozhera
1,115
ozhera-monitor/ozhera-monitor-service/src/main/java/org/apache/ozhera/monitor/dao/model/AppWithRules.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.ozhera.monitor.dao.model; import lombok.Data; import java.util.List; /** * @author gaoxihui * @date 2021/9/20 7:39 PM */ @Data public class AppWithRules { private Integer projectId; private Integer iamId; private String projectName; List<AppAlarmRule> alarmRules; }
apache/ozhera
1,121
ozhera-monitor/ozhera-monitor-api/src/main/java/org/apache/ozhera/monitor/service/AlertGroupFacade.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.ozhera.monitor.service; import org.apache.ozhera.monitor.service.bo.AlertGroupQryInfo; import java.util.List; public interface AlertGroupFacade { List<AlertGroupQryInfo> query(String account, String likeName); List<AlertGroupQryInfo> queryByIds(String account, List<Long> ids); }
apache/paimon-webui
1,130
paimon-web-api/src/main/java/org/apache/paimon/web/api/common/MetastoreType.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.paimon.web.api.common; /** Enum of catalog metastore type. */ public enum MetastoreType { FILE_SYSTEM("filesystem"), HIVE("hive"); private final String value; MetastoreType(String value) { this.value = value; } public String toString() { return value; } }
apache/paimon
1,147
paimon-core/src/main/java/org/apache/paimon/catalog/CatalogLockContext.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.paimon.catalog; import org.apache.paimon.options.Options; import java.io.Serializable; /** Context for lock factory to create lock. */ public interface CatalogLockContext extends Serializable { Options options(); static CatalogLockContext fromOptions(Options options) { return () -> options; } }
apache/pinot
1,144
pinot-spi/src/main/java/org/apache/pinot/spi/stream/TransientConsumerException.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.pinot.spi.stream; /** * A stream subsystem error that indicates a situation that is likely to be transient (for example, network error or * broker not available). */ public class TransientConsumerException extends RuntimeException { public TransientConsumerException(Throwable cause) { super(cause); } }
apache/plc4x
1,128
plc4j/drivers/ab-eth/src/test/java/org/apache/plc4x/protocol/abeth/AbEthParserSerializerTest.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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.plc4x.protocol.abeth; import org.apache.plc4x.test.parserserializer.ParserSerializerTestsuiteRunner; public class AbEthParserSerializerTest extends ParserSerializerTestsuiteRunner { public AbEthParserSerializerTest() { super("/protocols/abeth/ParserSerializerTestsuite.xml"); } }
apache/poi
1,168
poi/src/main/java/org/apache/poi/sl/draw/DrawConnectorShape.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.poi.sl.draw; import org.apache.poi.sl.usermodel.ConnectorShape; public class DrawConnectorShape extends DrawSimpleShape { public DrawConnectorShape(ConnectorShape<?,?> shape) { super(shape); } }
apache/polaris
1,115
persistence/nosql/async/api/src/testFixtures/java/org/apache/polaris/nosql/async/AsyncTestConfigProvider.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.polaris.nosql.async; import jakarta.enterprise.context.ApplicationScoped; import jakarta.enterprise.inject.Produces; @ApplicationScoped public class AsyncTestConfigProvider { @Produces AsyncConfiguration asyncConfiguration() { return AsyncConfiguration.builder().build(); } }
apache/polygene-java
1,117
libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/spi/ResponseWriter.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.polygene.library.rest.server.spi; import org.restlet.Response; import org.restlet.resource.ResourceException; /** * TODO */ public interface ResponseWriter { boolean writeResponse( final Object result, final Response response ) throws ResourceException; }
apache/polygene-java
1,123
libraries/scripting/src/main/java/org/apache/polygene/library/scripting/ScriptException.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.polygene.library.scripting; public class ScriptException extends RuntimeException { public ScriptException( String message ) { super( message ); } public ScriptException( String message, Throwable cause ) { super( message, cause ); } }
apache/polygene-java
1,130
core/runtime/src/main/java/org/apache/polygene/runtime/composite/ConstraintsCheck.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.polygene.runtime.composite; import org.apache.polygene.api.constraint.ConstraintViolationException; /** * Call this to perform a value constraint check */ public interface ConstraintsCheck { void checkConstraints( Object value ) throws ConstraintViolationException; }
apache/qpid-broker-j
1,124
systests/systests-utils/src/main/java/org/apache/qpid/tests/utils/AddOAuth2MockProvider.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.qpid.tests.utils; 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.METHOD}) public @interface AddOAuth2MockProvider { }
apache/reef
1,135
lang/java/reef-common/src/main/java/org/apache/reef/io/parameters/TempFileRootFolder.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.reef.io.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; /** * Directory for temp files. */ @NamedParameter(doc = "Directory for temp files", default_value = "./reef/temp") public final class TempFileRootFolder implements Name<String> { }
apache/rocketmq-externals
1,132
logappender/src/test/java/org/apache/rocketmq/logappender/Log4jXmlTest.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.rocketmq.logappender; import org.apache.log4j.xml.DOMConfigurator; public class Log4jXmlTest extends Log4jTest { @Override public void init() { DOMConfigurator.configure("src/test/resources/log4j-example.xml"); } @Override public String getType() { return "xml"; } }
apache/rocketmq-spring
1,113
rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/core/RocketMQPushConsumerLifecycleListener.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.rocketmq.spring.core; import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer; import org.apache.rocketmq.spring.support.RocketMQConsumerLifecycleListener; public interface RocketMQPushConsumerLifecycleListener extends RocketMQConsumerLifecycleListener<DefaultMQPushConsumer> { }
apache/royale-compiler
1,117
compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/metadata/AlternativeTagNode.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.royale.compiler.internal.tree.as.metadata; import org.apache.royale.compiler.constants.IMetaAttributeConstants; public class AlternativeTagNode extends TypedTagNode { public AlternativeTagNode() { super(IMetaAttributeConstants.ATTRIBUTE_ALTERNATIVE); } }
apache/servicecomb-java-chassis
1,115
governance/src/test/java/org/apache/servicecomb/governance/MockInstanceIsolationExtension.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.governance; import org.apache.servicecomb.governance.handler.ext.AbstractInstanceIsolationExtension; public class MockInstanceIsolationExtension extends AbstractInstanceIsolationExtension { @Override protected String extractStatusCode(Object result) { return "200"; } }
apache/servicecomb-java-chassis
1,129
core/src/main/java/org/apache/servicecomb/core/event/InvocationBaseEvent.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.core.event; import org.apache.servicecomb.core.Invocation; public class InvocationBaseEvent { private final Invocation invocation; public InvocationBaseEvent(Invocation invocation) { this.invocation = invocation; } public Invocation getInvocation() { return invocation; } }
apache/servicecomb-pack
1,105
acceptance-tests/acceptance-pack-spring-demo/src/test/java/org/apache/servicecomb/pack/RunCucumberIT.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.pack; import org.junit.runner.RunWith; import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) @CucumberOptions(plugin = {"pretty", "html:target/cucumber"}, features = "src/test/resources") public class RunCucumberIT { }
apache/servicecomb-pack
1,137
pack-common/src/main/java/org/apache/servicecomb/pack/common/EventType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.pack.common; public enum EventType { SagaStartedEvent, TxStartedEvent, TxEndedEvent, TxAbortedEvent, TxCompensatedEvent, SagaEndedEvent, SagaAbortedEvent, SagaTimeoutEvent, TxCompensateEvent, TxCompensateAckFailedEvent, TxCompensateAckSucceedEvent, CompensateAckTimeoutEvent }
apache/servicecomb-samples
1,048
java-chassis-samples/custom-handler-sample/custom-handler-provider/src/main/java/org/apache/servicecomb/samples/customerhandler/provider/CustomHandlerProviderMain.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.samples.customerhandler.provider; import org.apache.servicecomb.foundation.common.utils.BeanUtils; public class CustomHandlerProviderMain { public static void main(String[] args) { BeanUtils.init(); } }
apache/shardingsphere-example
1,077
example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/repository/MybatisAddressRepository.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shardingsphere.example.core.mybatis.repository; import org.apache.ibatis.annotations.Mapper; import org.apache.shardingsphere.example.core.api.repository.AddressRepository; @Mapper public interface MybatisAddressRepository extends AddressRepository { }
apache/shenyu
1,139
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/manager/DocParser.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shenyu.admin.service.manager; import com.google.gson.JsonObject; import org.apache.shenyu.admin.model.bean.DocInfo; /** * DocParser. */ public interface DocParser { /** * parseJson. * * @param docRoot docRoot * @return DocInfo DocInfo */ DocInfo parseJson(JsonObject docRoot); }
apache/shindig
1,145
java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/OAuthUriManager.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.shindig.gadgets.uri; import org.apache.shindig.common.uri.Uri; /** * Methods used by the oauth proxy, currently only used for an OAuth callback. */ public interface OAuthUriManager { /** * @return the OAuth Callback Uri on the provided host. */ Uri makeOAuthCallbackUri(String container, String host); }
apache/skywalking-java
1,051
test/plugin/scenarios/shenyu-2.4.x-sofarpc-scenario/shenyu-sofarpc-service/src/main/java/test/apache/skywalking/apm/testcase/shenyu/sofarpc/interfaces/SofaBean.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package test.apache.skywalking.apm.testcase.shenyu.sofarpc.interfaces; public class SofaBean { String data; public String getData() { return data; } public void setData(String data) { this.data = data; } }
apache/skywalking-java
1,096
test/plugin/scenarios/spring-6.x-scenario/src/main/java/test/apache/skywalking/apm/testcase/inherit/ChildController.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package test.apache.skywalking.apm.testcase.inherit; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/inherit/child") public class ChildController extends ParentController { }
apache/skywalking
1,090
oap-server/server-library/library-module/src/main/java/org/apache/skywalking/oap/server/library/module/ModuleNotFoundException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.library.module; public class ModuleNotFoundException extends Exception { public ModuleNotFoundException(Throwable cause) { super(cause); } public ModuleNotFoundException(String message) { super(message); } }
apache/skywalking
1,098
oap-server/analyzer/meter-analyzer/src/main/java/org/apache/skywalking/oap/meter/analyzer/dsl/ExpressionParsingException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.meter.analyzer.dsl; /** * ExpressionParsingException is throw in expression parsing phase. */ public class ExpressionParsingException extends RuntimeException { public ExpressionParsingException(final String message) { super(message); } }
apache/storm
1,157
storm-client/src/jvm/org/apache/storm/streams/operations/FlatMapFunction.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.storm.streams.operations; /** * A function that accepts one argument and returns an {@link Iterable} of elements as its result. * * @param <T> the type of the input to the function * @param <R> the result type. An iterable of this type is returned from this function */ public interface FlatMapFunction<T, R> extends Function<T, Iterable<R>> { }
apache/stratos
1,075
components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/signup/ApplicationSignUpAddedEventListener.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.stratos.messaging.listener.application.signup; import org.apache.stratos.messaging.listener.EventListener; /** * Application signup added event listener. */ public abstract class ApplicationSignUpAddedEventListener extends EventListener { }
apache/stratos
1,111
components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/utils/StratosManagerConstants.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.stratos.manager.utils; /** * Stratos manager constants. */ public class StratosManagerConstants { public static final String STATS_PUBLISHER_THREAD_POOL_ID = "stratos.manager.stats.publisher.thread.pool"; public static final int STATS_PUBLISHER_THREAD_POOL_SIZE = 10; }
apache/stratos
1,112
components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/Constants.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.stratos.metadata.service; /** * Global constants used in this module */ public class Constants { public static final String METADATASERVICE_CONFIG_FILE_NAME = "metadataservice.xml"; public static final String METADATA_SERVICE_THREAD_POOL_ID = "metadata.service.thread.pool."; }
apache/streampipes
1,053
streampipes-extensions/streampipes-processors-enricher-jvm/src/main/java/org/apache/streampipes/processors/enricher/jvm/processor/math/operation/OperationSubtracting.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.processors.enricher.jvm.processor.math.operation; public class OperationSubtracting implements Operation { @Override public Double operate(Double valLeft, Double valRight) { return valLeft - valRight; } }
apache/streampipes
1,113
streampipes-commons/src/main/java/org/apache/streampipes/commons/exceptions/connect/AdapterException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.commons.exceptions.connect; public class AdapterException extends Exception { public AdapterException() { } public AdapterException(String message) { super(message); } public AdapterException(String message, Throwable cause) { super(message, cause); } }
apache/syncope
1,097
common/keymaster/client-zookeeper/src/test/java/org/apache/syncope/common/keymaster/client/zookeeper/ZookeeperDomainOpsTest.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.syncope.common.keymaster.client.zookeeper; import org.junit.jupiter.api.BeforeAll; public class ZookeeperDomainOpsTest extends ZookeeperDomainOpsITCase { @BeforeAll public static void setUp() throws Exception { ZookeeperTestingServer.start(); } }
apache/syncope
1,123
core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AnyTypeClass.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.syncope.core.persistence.api.entity; import java.util.List; public interface AnyTypeClass extends ProvidedKeyEntity { boolean add(PlainSchema schema); List<? extends PlainSchema> getPlainSchemas(); boolean add(DerSchema schema); List<? extends DerSchema> getDerSchemas(); }
apache/tapestry-5
1,104
tapestry-openapi-viewer/src/main/java/org/apache/tapestry5/openapiviewer/modules/TapestryOpenApiViewerModule.java
// Copyright 2021 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.openapiviewer.modules; import org.apache.tapestry5.commons.Configuration; import org.apache.tapestry5.services.LibraryMapping; /** * Defines services and definitions for the Tapestry OpenAPI viewer. */ public class TapestryOpenApiViewerModule { public static void contributeComponentClassResolver(Configuration<LibraryMapping> configuration) { configuration.add(new LibraryMapping("openapiviewer", "org.apache.tapestry5.openapiviewer")); } }
apache/tapestry-5
1,106
tapestry-webresources/src/main/java/org/apache/tapestry5/internal/webresources/DelegatingResourceTransformer.java
// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.internal.webresources; import org.apache.tapestry5.http.ContentType; import org.apache.tapestry5.services.assets.ResourceTransformer; public abstract class DelegatingResourceTransformer implements ResourceTransformer { protected final ResourceTransformer delegate; protected DelegatingResourceTransformer(ResourceTransformer delegate) { this.delegate = delegate; } @Override public ContentType getTransformedContentType() { return delegate.getTransformedContentType(); } }
apache/tapestry-5
1,127
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/EndOfRequestEventHub.java
// Copyright 2008 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.internal.services; import org.apache.tapestry5.internal.events.EndOfRequestListener; /** * Manages request notifications for the {@link org.apache.tapestry5.internal.events.EndOfRequestListener} interface. */ public interface EndOfRequestEventHub { void addEndOfRequestListener(EndOfRequestListener listener); void removeEndOfRequestListener(EndOfRequestListener listener); /** * Invoked at the end of the request to notify the listeners. */ void fire(); }
apache/tapestry-5
1,144
tapestry-cdi/src/test/java/org/apache/tapestry5/cdi/test/annotation/Iced.java
// Copyright 2013 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.cdi.test.annotation; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; import jakarta.inject.Qualifier; @Qualifier @Retention(RUNTIME) @Target({TYPE,METHOD,FIELD,PARAMETER}) public @interface Iced{ }
apache/tinkerpop
1,112
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalInterruptedException.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.tinkerpop.gremlin.process.traversal.util; import org.apache.tinkerpop.gremlin.process.traversal.Traversal; /** * Thrown if a {@link Traversal} is interrupted during execution. This is an unchecked exception. */ public class TraversalInterruptedException extends RuntimeException { }
apache/tomcat
1,165
java/jakarta/transaction/InvalidTransactionException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package jakarta.transaction; import java.io.Serial; public class InvalidTransactionException extends java.rmi.RemoteException { @Serial private static final long serialVersionUID = 3597320220337691496L; public InvalidTransactionException() { super(); } public InvalidTransactionException(String msg) { super(msg); } }
apache/tomee
1,141
examples/movies-complete/src/main/java/org/superbiz/injection/tx/AddInterceptor.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.superbiz.injection.tx; import jakarta.interceptor.AroundInvoke; import jakarta.interceptor.InvocationContext; /** * @version $Revision$ $Date$ */ public class AddInterceptor { @AroundInvoke public Object invoke(InvocationContext context) throws Exception { // Log Add return context.proceed(); } }
apache/tomee
1,154
container/mbean-annotation-api/src/main/java/javax/management/MBean.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.management; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(value = RetentionPolicy.RUNTIME) @Target(value = ElementType.TYPE) @Inherited public @interface MBean { }
apache/usergrid
1,105
stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/exceptions/JsonWriteException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. 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. For additional information regarding * copyright in this work, please see the NOTICE file in the top level * directory of this distribution. */ package org.apache.usergrid.persistence.index.exceptions; public class JsonWriteException extends RuntimeException { private static final long serialVersionUID = 1L; public JsonWriteException( String msg, Throwable t ) { super( msg, t ); } }
apache/usergrid
1,111
stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/guice/TestCommonModule.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.usergrid.persistence.core.guice; /** * Module for testing common frameworks */ public class TestCommonModule extends TestModule { @Override protected void configure() { install(new CommonModule()); } }
apache/usergrid
1,141
stack/services/src/main/java/org/apache/usergrid/security/salt/SaltProvider.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.usergrid.security.salt; import java.util.UUID; /** * Returns the salt for a user to be used to hash the password * * @author tnine */ public interface SaltProvider { /** Get the salt that should be used for a user in the given application */ public String getSalt( UUID applicationId, UUID userId ); }
apache/wicket
1,121
wicket-core-tests/src/test/java/org/apache/wicket/markupFragments/MyBorderPage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.markupFragments; import org.apache.wicket.markup.html.WebPage; /** * */ public class MyBorderPage extends WebPage { private static final long serialVersionUID = 1L; /** * Construct. */ public MyBorderPage() { add(new MyBorder("border")); add(new MyBorder2("border2")); } }
apache/xmlgraphics-fop
1,132
fop-core/src/test/java/org/apache/fop/intermediate/AreaTreeXMLFormatTestSuite.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. */ /* $Id$ */ package org.apache.fop.intermediate; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** * JUnit test suite for the area tree XML format */ @RunWith(Suite.class) @SuiteClasses(AreaTreeParserTestCase.class) public class AreaTreeXMLFormatTestSuite { }
apache/zookeeper
1,139
zookeeper-server/src/main/java/org/apache/zookeeper/cli/Base64OutputFormatter.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.zookeeper.cli; import java.util.Base64; public class Base64OutputFormatter implements OutputFormatter { public static final Base64OutputFormatter INSTANCE = new Base64OutputFormatter(); @Override public String format(byte[] data) { return Base64.getEncoder().encodeToString(data); } }
google-cloudsearch/connector-sdk
1,127
it/src/main/java/com/google/enterprise/cloudsearch/sdk/TestProperties.java
/* * Copyright © 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.enterprise.cloudsearch.sdk; /** * Common configuration properties for test case classes. */ public class TestProperties { // Credentials to authenticate as a service account. This is required by the connectors SDK and // also to programmatically manage test users and groups. public static final String SERVICE_KEY_PROPERTY_NAME = qualifyTestProperty("serviceAccountPrivateKeyFile"); public static String qualifyTestProperty(String propertyName) { return "api.test." + propertyName; } }
google/auto
1,158
factory/src/test/resources/good/ConstructorAnnotatedThrows.java
/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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 tests; import com.google.auto.factory.AutoFactory; import com.google.auto.factory.Provided; import java.io.IOException; final class ConstructorAnnotatedThrows { @AutoFactory ConstructorAnnotatedThrows() throws IOException, InterruptedException {} ConstructorAnnotatedThrows(Object obj) {} @AutoFactory ConstructorAnnotatedThrows(String s) {} @AutoFactory ConstructorAnnotatedThrows(@Provided Object obj, int i) throws IOException {} @AutoFactory ConstructorAnnotatedThrows(@Provided Object obj, char c) throws InterruptedException {} }
google/closure-templates
1,117
java/tests/com/google/template/soy/jbcsrc/shared/LargeStringConstantFactoryTest.java
/* * Copyright 2021 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.template.soy.jbcsrc.shared; import static com.google.common.truth.Truth.assertThat; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) public final class LargeStringConstantFactoryTest { @Test public void testConstant() throws Throwable { String constant = LargeStringConstantFactory.bootstrapLargeStringConstant( null, null, null, "foo", "bar", "baz"); assertThat(constant).isEqualTo("foobarbaz"); } }
google/copybara
1,171
java/com/google/copybara/CopybaraCmd.java
/* * Copyright (C) 2018 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.copybara; import com.google.copybara.exception.RepoException; import com.google.copybara.exception.ValidationException; import com.google.copybara.util.ExitCode; import java.io.IOException; /** * A Copybara command like 'info' 'migrate', etc. */ public interface CopybaraCmd { /** * Run the command * @param commandEnv Command environment: Params, workdir, etc. * @return Result exit code */ ExitCode run(CommandEnv commandEnv) throws ValidationException, IOException, RepoException; /** * Command name */ String name(); }
google/guava
1,136
guava-testlib/src/com/google/common/collect/testing/google/GoogleHelpers.java
/* * Copyright (C) 2015 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.common.collect.testing.google; import static junit.framework.Assert.fail; import com.google.common.annotations.GwtCompatible; import com.google.common.collect.Multimap; /** * Helper methods/assertions for use with {@code com.google.common.collect} types. * * @author Colin Decker */ @GwtCompatible final class GoogleHelpers { private GoogleHelpers() {} static void assertEmpty(Multimap<?, ?> multimap) { if (!multimap.isEmpty()) { fail("Not true that " + multimap + " is empty"); } } }
google/j2cl
1,133
junit/generator/javatests/com/google/j2cl/junit/integration/testing/async/Timer.java
/* * Copyright 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.j2cl.junit.integration.testing.async; import java.util.TimerTask; /** A simple timer for tests */ public class Timer { /** A simple callback interface */ @FunctionalInterface public interface Callback { void execute(); } public static void schedule(final Callback c, final int delay) { new java.util.Timer() .schedule( new TimerTask() { @Override public void run() { c.execute(); } }, delay); } }
google/j2objc
1,153
jre_emul/android/frameworks/base/core/java/android/text/GetChars.java
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.text; /** * Please implement this interface if your CharSequence has a * getChars() method like the one in String that is faster than * calling charAt() multiple times. */ public interface GetChars extends CharSequence { /** * Exactly like String.getChars(): copy chars <code>start</code> * through <code>end - 1</code> from this CharSequence into <code>dest</code> * beginning at offset <code>destoff</code>. */ public void getChars(int start, int end, char[] dest, int destoff); }
googleapis/google-cloud-java
1,046
java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/LoadSnapshotResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/orchestration/airflow/service/v1/environments.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.orchestration.airflow.service.v1; public interface LoadSnapshotResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse) com.google.protobuf.MessageOrBuilder {}
googlearchive/androidtv-Leanback
1,124
app/src/main/java/com/example/android/tvleanback/ui/OnboardingActivity.java
/* * Copyright (c) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.android.tvleanback.ui; import android.os.Bundle; import androidx.fragment.app.FragmentActivity; import com.example.android.tvleanback.R; /* * OnboardingActivity for OnboardingFragment */ public class OnboardingActivity extends FragmentActivity { /** * Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.onboarding); } }
googlemaps-samples/android-samples
1,116
ApiDemos/project/java-app/src/main/java/com/example/mapdemo/MultiMapDemoActivity.java
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // 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.example.mapdemo; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; /** * This shows how to create a simple activity with multiple maps on screen. */ public class MultiMapDemoActivity extends SamplesBaseActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(com.example.common_ui.R.layout.multimap_demo); applyInsets(findViewById(com.example.common_ui.R.id.map_container)); } }
hibernate/hibernate-demos
1,063
hibernate-search/hsearch-feature-examples/search-advanced/src/main/java/org/hibernate/demos/hsearchfeatureexamples/model/TShirtVariant.java
package org.hibernate.demos.hsearchfeatureexamples.model; import java.math.BigDecimal; import jakarta.persistence.Column; import jakarta.persistence.Embeddable; import jakarta.persistence.EnumType; import jakarta.persistence.Enumerated; import org.hibernate.search.engine.backend.types.Aggregable; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.GenericField; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.KeywordField; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.ScaledNumberField; @Embeddable public class TShirtVariant { @FullTextField @KeywordField(name = "color_keyword", aggregable = Aggregable.YES) public String color; @FullTextField @KeywordField(name = "size_keyword", aggregable = Aggregable.YES) @Enumerated(EnumType.STRING) public TShirtSize size; @Column(precision = 12, scale = 2) @ScaledNumberField(aggregable = Aggregable.YES, decimalScale = 2) public BigDecimal price; }
hibernate/hibernate-ogm
1,096
core/src/test/java/org/hibernate/ogm/backendtck/id/PianoPlayer.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.backendtck.id; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.TableGenerator; /** * @author Gunnar Morling */ @Entity public class PianoPlayer { private long id; private String name; PianoPlayer() { } public PianoPlayer(String name) { this.name = name; } @Id @GeneratedValue(strategy = GenerationType.TABLE, generator = "pianoGen") @TableGenerator(name = "pianoGen", table = "PianoPlayerSequence", pkColumnValue = "pianoPlayer", valueColumnName = "nextPianoPlayerId", allocationSize = 1) public long getId() { return id; } public void setId(long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
hibernate/hibernate-orm
1,078
hibernate-core/src/test/java/org/hibernate/orm/test/interceptor/merge/MergeInterceptor.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.interceptor.merge; import org.hibernate.Hibernate; import org.hibernate.Interceptor; import org.hibernate.type.Type; /** * An interceptor that initializes null collection references * when an entity is passed to persist() or merge(). * * @author Gavin King */ public class MergeInterceptor implements Interceptor { @Override public boolean onPersist(Object entity, Object id, Object[] state, String[] propertyNames, Type[] types) { boolean result = false; for ( int i = 0; i < types.length; i++ ) { if ( types[i].isCollectionType() && state[i] == null ) { state[i] = Hibernate.set().createNewInstance(); result = true; } } return result; } @Override public void preMerge(Object entity, Object[] state, String[] propertyNames, Type[] types) { for ( int i = 0; i < types.length; i++ ) { if ( types[i].isCollectionType() && state[i] == null ) { state[i] = Hibernate.set().createDetachedInstance(); } } } }
hibernate/hibernate-orm
1,088
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metadata/SecondMetadataTest.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.jpa.metadata; import jakarta.persistence.EntityManagerFactory; import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; import org.hibernate.testing.orm.junit.Jpa; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertNotNull; /** * @author Emmanuel Bernard */ @Jpa( annotatedClasses = { DeskWithRawType.class, EmployeeWithRawType.class, SimpleMedicalHistory.class, SimplePerson.class } ) public class SecondMetadataTest { @Test public void testBaseOfService(EntityManagerFactoryScope scope) { EntityManagerFactory emf = scope.getEntityManagerFactory(); assertNotNull( emf.getMetamodel() ); assertNotNull( emf.getMetamodel().entity( DeskWithRawType.class ) ); assertNotNull( emf.getMetamodel().entity( EmployeeWithRawType.class ) ); assertNotNull( emf.getMetamodel().entity( SimpleMedicalHistory.class ) ); assertNotNull( emf.getMetamodel().entity( SimplePerson.class ) ); } }
hibernate/hibernate-orm
1,130
hibernate-core/src/main/java/org/hibernate/OrderingMode.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate; import jakarta.persistence.EntityGraph; import jakarta.persistence.FindOption; import java.util.List; /** * Indicates whether the result list should be ordered relative to the * position of the identifier list. E.g. * <pre> * List&lt;Person&gt; results = session.findMultiple( * Person.class, * List.of(1,2,3,2), * ORDERED * ); * assert results.get(0).getId() == 1; * assert results.get(1).getId() == 2; * assert results.get(2).getId() == 3; * assert results.get(3).getId() == 2; * </pre> * <p> * The default is {@link #ORDERED}. * * @see org.hibernate.Session#findMultiple(Class, List, FindOption...) * @see org.hibernate.Session#findMultiple(EntityGraph, List , FindOption...) * * @since 7.2 */ @Incubating public enum OrderingMode implements FindMultipleOption { /** * The default. The result list is ordered relative to the * position of the identifiers list. * * @see RemovalsMode */ ORDERED, /** * The result list may be in any order. */ UNORDERED }
hibernate/hibernate-search
1,032
documentation/src/test/java/org/hibernate/search/documentation/mapper/orm/gettingstarted/withhsearch/defaultanalysis/Author.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.documentation.mapper.orm.gettingstarted.withhsearch.defaultanalysis; // tag::include[] import java.util.HashSet; import java.util.Set; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.ManyToMany; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField; @Entity // <7> public class Author { @Id @GeneratedValue private Integer id; @FullTextField // <3> private String name; @ManyToMany(mappedBy = "authors") private Set<Book> books = new HashSet<>(); public Author() { } // Getters and setters // ... // tag::getters-setters[] public Integer getId() { return id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Set<Book> getBooks() { return books; } // end::getters-setters[] } // end::include[]
hibernate/hibernate-search
1,055
documentation/src/test/java/org/hibernate/search/documentation/mapper/orm/schema/management/Book.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.documentation.mapper.orm.schema.management; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.ManyToOne; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.IndexedEmbedded; @Entity @Indexed public class Book { @Id private Integer id; @FullTextField(analyzer = "english") private String title; @ManyToOne @IndexedEmbedded private Author author; public Book() { } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public Author getAuthor() { return author; } public void setAuthor(Author author) { this.author = author; } }
hibernate/hibernate-search
1,066
documentation/src/test/java/org/hibernate/search/documentation/search/query/Associate.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.documentation.search.query; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.ManyToOne; import org.hibernate.search.engine.backend.types.Projectable; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed; @Entity @Indexed public class Associate implements Person { @Id private Integer id; @FullTextField(analyzer = "name", projectable = Projectable.YES) private String name; @ManyToOne private Manager manager; public Associate() { } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Override public String getName() { return name; } public void setName(String name) { this.name = name; } public Manager getManager() { return manager; } public void setManager(Manager manager) { this.manager = manager; } }
hibernate/hibernate-validator
1,097
engine/src/test/java/org/hibernate/validator/test/internal/metadata/provider/ConsistentDateParameters.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.validator.test.internal.metadata.provider; import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.ElementType.METHOD; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import jakarta.validation.Constraint; import jakarta.validation.Payload; /** * Cross-parameter constraint that checks that two date parameters are in the * correct order. Applies to methods with the signature * {@code methodName(DateMidnight start, DateMidnight end)}. * * @author Gunnar Morling */ @Target({ METHOD, ANNOTATION_TYPE }) @Retention(RetentionPolicy.RUNTIME) @Constraint(validatedBy = ConsistentDateParametersValidator.class) @Documented public @interface ConsistentDateParameters { String message() default "{ConsistentDateParameters.message}"; Class<?>[] groups() default { }; Class<? extends Payload>[] payload() default { }; }
openjdk/jdk8
1,160
langtools/test/com/sun/javadoc/testNewLanguageFeatures/pkg2/Foo.java
/* * Copyright (c) 2003, 2004, 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 pkg2; import java.util.*; public class Foo { public void method(Vector<Object> o){} }
openjdk/jdk8
1,165
langtools/test/com/sun/javadoc/testCmndLineClass/pkg1/C1.java
/* * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package pkg1; /** *This is a description for C1. */ public class C1 { public static final int I = 1; }
openjdk/jdk8
1,165
langtools/test/tools/javadoc/generics/genericSuper/pkg1/A.java
/* * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package pkg1; class S<T,U> { } interface I<R> { } public class A<V,W> extends S<W,V> implements I<String> { }
openjdk/jdk8
1,167
langtools/test/tools/javac/diags/examples/TypeVarCantBeDeref.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.type.var.cant.be.deref class Base<T> { } class TypeVarCantBeDeref<T> extends Base<T.foo> {}
openjdk/jdk8
1,167
langtools/test/tools/javac/diags/examples/VarargsAndReceiver.java
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.varargs.and.receiver class VarargsAndReceiver { void m(VarargsAndReceiver... this) { } }