repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/hadoop-common
1,089
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/ToJSON.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.yarn.webapp; import java.io.PrintWriter; import org.apache.hadoop.classification.InterfaceAudience; /** * A light-weight JSON rendering interface */ @InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"}) public interface ToJSON { void toJSON(PrintWriter out); }
apache/hadoop
1,105
hadoop-cloud-storage-project/hadoop-tos/src/main/java/org/apache/hadoop/fs/tosfs/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Classes for hadoop-tos tosfs. */ @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce", "YARN", "Hive"}) @InterfaceStability.Evolving package org.apache.hadoop.fs.tosfs; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop
1,113
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/SpanContext.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.tracing; import java.io.Closeable; /** * Wrapper class for SpanContext to avoid using OpenTracing/OpenTelemetry * SpanContext class directly for better separation. */ public class SpanContext implements Closeable { public SpanContext() { } public void close() { } }
apache/harmony
1,089
classlib/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/MockBean4CodecBadGetter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.harmony.beans.tests.support.mock; public class MockBean4CodecBadGetter extends MockBean4Codec { public MockBean4CodecBadGetter() { super(); } @Override public String getName() { throw new UnsupportedOperationException(); } }
apache/harmony
1,119
classlib/modules/awt/src/main/java/common/java/awt/event/HierarchyBoundsAdapter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @author Michael Danilov */ package java.awt.event; public abstract class HierarchyBoundsAdapter implements HierarchyBoundsListener { public HierarchyBoundsAdapter() { } public void ancestorMoved(HierarchyEvent e) { } public void ancestorResized(HierarchyEvent e) { } }
apache/harmony
1,124
classlib/modules/awt/src/main/java/common/java/awt/print/PrinterException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @author Igor A. Pyankov */ package java.awt.print; public class PrinterException extends Exception { private static final long serialVersionUID = -3757589981158265819L; public PrinterException() { super(); } public PrinterException (String msg) { super(msg); } }
apache/harmony
1,135
classlib/modules/sound/src/main/java/javax/sound/midi/Patch.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.sound.midi; public class Patch { private int bank; private int program; public Patch(int bank, int program) { this.bank = bank; this.program = program; } public int getBank() { return bank; } public int getProgram() { return program; } }
apache/hbase
1,120
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ReadOnlyByteRangeException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hbase.util; import org.apache.yetus.audience.InterfaceAudience; /** * Exception thrown when a read only byte range is modified */ @InterfaceAudience.Public public class ReadOnlyByteRangeException extends UnsupportedOperationException { public ReadOnlyByteRangeException() { } }
apache/hive
1,103
itests/hive-unit/src/test/java/org/apache/hive/service/auth/TestImproperTrustDomainAuthenticationBinary.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hive.service.auth; import org.junit.BeforeClass; public class TestImproperTrustDomainAuthenticationBinary extends TrustDomainAuthenticationTest { @BeforeClass public static void setUp() throws Exception { initialize(HS2_TRANSPORT_MODE_BINARY, false); } }
apache/hudi
1,127
hudi-common/src/main/java/org/apache/hudi/exception/HoodieIndexException.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.hudi.exception; /** * <p> * Exception thrown for HoodieIndex related errors. * </p> */ public class HoodieIndexException extends HoodieException { public HoodieIndexException(String msg) { super(msg); } public HoodieIndexException(String msg, Throwable e) { super(msg, e); } }
apache/ignite-extensions
1,112
modules/ml-ext/ml/src/test/java/org/apache/ignite/ml/math/stat/StatsTestSuite.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ignite.ml.math.stat; import org.junit.runner.RunWith; import org.junit.runners.Suite; /** * Test suite for stat package. */ @RunWith(Suite.class) @Suite.SuiteClasses({ DistributionMixtureTest.class, MultivariateGaussianDistributionTest.class }) public class StatsTestSuite { }
apache/ignite
1,141
modules/core/src/main/java/org/apache/ignite/internal/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * <!-- Package description. --> * Contains main implementation. All classes and interfaces are not public API. * API Compatibility is not maintained. * See also <a href='https://github.com/apache/ignite/tree/master/modules/core/src/main/java/org/apache/ignite/internal'>GitHub Readme</a> */ package org.apache.ignite.internal;
apache/incubator-brooklyn
1,094
brooklyn-server/utils/common/src/main/java/org/apache/brooklyn/util/internal/IntegerSystemProperty.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.brooklyn.util.internal; public class IntegerSystemProperty extends BasicDelegatingSystemProperty { public IntegerSystemProperty(String name) { super(name); } public int getValue() { return Integer.parseInt(delegate.getValue()); } }
apache/incubator-hugegraph-toolchain
1,099
hugegraph-client/src/main/java/org/apache/hugegraph/structure/version/Versions.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.hugegraph.structure.version; import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; public class Versions { @JsonProperty private Map<String, String> versions; public String get(String name) { return this.versions.get(name); } }
apache/incubator-kie-drools
1,095
kie-dmn/kie-dmn-api/src/main/java/org/kie/dmn/api/core/event/AfterEvaluateConditionalEvent.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.dmn.api.core.event; import org.kie.dmn.api.core.EvaluatorResult; /** * Event fired after the if <b>if</b> conditional is evaluated * */ public interface AfterEvaluateConditionalEvent { EvaluatorResult getEvaluatorResultResult(); String getExecutedId(); }
apache/incubator-kie-drools
1,096
drools-verifier/drools-verifier-core/src/main/java/org/drools/verifier/core/index/query/Where.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.drools.verifier.core.index.query; import org.drools.verifier.core.index.select.Listen; import org.drools.verifier.core.index.select.Select; public abstract class Where<S extends Select, L extends Listen> { public abstract S select(); public abstract L listen(); }
apache/incubator-kie-drools
1,113
kie-drl/kie-drl-api/src/main/java/org/kie/drl/api/identifiers/data/DataIds.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.drl.api.identifiers.data; public class DataIds { private final DataSourceId dataSourceId; public DataIds(DataSourceId dataSourceId) { this.dataSourceId = dataSourceId; } public DataId get(String dataId) { return new DataId(dataSourceId, dataId); } }
apache/incubator-kie-kogito-runtimes
1,081
api/kogito-api-incubation-common/src/main/java/org/kie/kogito/incubation/common/MapLikeDataContext.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.kogito.incubation.common; /** * A DataContext that behaves like a Map. */ public interface MapLikeDataContext extends DataContext { void set(String key, Object value); Object get(String key); <T> T get(String key, Class<T> expectedType); }
apache/incubator-kie-kogito-runtimes
1,092
grafana-api/src/main/java/org/kie/kogito/grafana/model/functions/GrafanaOperation.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.kogito.grafana.model.functions; public enum GrafanaOperation { DIVISION("/"); private String stringValue; GrafanaOperation(String s) { this.stringValue = s; } @Override public String toString() { return stringValue; } }
apache/incubator-kie-kogito-runtimes
1,098
addons/common/kubernetes/src/main/java/org/kie/kogito/addons/k8s/CacheNames.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.kogito.addons.k8s; /** * Cache names for the discovery API. */ public final class CacheNames { public static final String CACHE_BY_NAME = "endpoint-by-name"; public static final String CACHE_BY_LABELS = "endpoint-by-labels"; private CacheNames() { } }
apache/incubator-kie-optaplanner
1,056
core/optaplanner-core-impl/src/test/java/org/optaplanner/core/impl/testdata/domain/clone/deepcloning/AnnotatedTestdataVariousTypes.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.optaplanner.core.impl.testdata.domain.clone.deepcloning; import org.optaplanner.core.api.domain.solution.cloner.DeepPlanningClone; @DeepPlanningClone public final class AnnotatedTestdataVariousTypes extends TestdataVariousTypes { }
apache/incubator-retired-slider
1,103
slider-core/src/main/java/org/apache/slider/core/exceptions/NoSuchNodeException.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.slider.core.exceptions; import java.io.IOException; /** * Exception raised when a node cannot be found in the structure * that is being examined. */ public class NoSuchNodeException extends IOException { public NoSuchNodeException(String uuid) { super(uuid); } }
apache/incubator-seata
1,110
saga/seata-saga-engine/src/main/java/org/apache/seata/saga/engine/pcext/StateHandler.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.seata.saga.engine.pcext; import org.apache.seata.saga.engine.exception.EngineExecutionException; import org.apache.seata.saga.proctrl.ProcessContext; /** * State Handler * */ public interface StateHandler { void process(ProcessContext context) throws EngineExecutionException; }
apache/iotdb
1,103
iotdb-core/metrics/core/src/main/java/org/apache/iotdb/metrics/core/type/IoTDBHistogramMBean.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iotdb.metrics.core.type; import javax.management.ObjectName; public interface IoTDBHistogramMBean { ObjectName objectName(); long getCount(); double getMax(); double getMean(); int getSize(); double get50thPercentile(); double get99thPercentile(); }
apache/jackrabbit-oak
1,089
oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/directaccess/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Package related to direct upload/download of data records. */ @Internal @Version("1.0.1") package org.apache.jackrabbit.oak.plugins.blob.datastore.directaccess; import org.apache.jackrabbit.oak.commons.annotations.Internal; import org.osgi.annotation.versioning.Version;
apache/jclouds
1,084
apis/rackspace-cloudidentity/src/main/java/org/jclouds/rackspace/cloudidentity/v2_0/config/CloudIdentityCredentialTypes.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jclouds.rackspace.cloudidentity.v2_0.config; import org.jclouds.openstack.keystone.auth.config.CredentialTypes; public class CloudIdentityCredentialTypes extends CredentialTypes { public static final String API_KEY_CREDENTIALS = "RAX-KSKEY:apiKeyCredentials"; }
apache/jclouds
1,116
providers/aws-sqs/src/test/java/org/jclouds/aws/sqs/features/AWSQueueApiLiveTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jclouds.aws.sqs.features; import org.jclouds.sqs.features.QueueApiLiveTest; import org.testng.annotations.Test; @Test(groups = "live", testName = "AWSQueueApiLiveTest") public class AWSQueueApiLiveTest extends QueueApiLiveTest { public AWSQueueApiLiveTest() { provider = "aws-sqs"; } }
apache/jena
1,135
jena-shex/src/test/java/org/apache/jena/arq/junit4/manifest/ExTestSetup.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.arq.junit4.manifest; public class ExTestSetup extends RuntimeException { public ExTestSetup() { super() ; } public ExTestSetup(Throwable cause) { super(cause) ; } public ExTestSetup(String msg) { super(msg) ; } public ExTestSetup(String msg, Throwable cause) { super(msg, cause) ; } }
apache/johnzon
1,135
johnzon-core/src/main/java/org/apache/johnzon/core/Experimental.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.johnzon.core; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * Marker for experimental API. */ @Target(TYPE) @Retention(RUNTIME) public @interface Experimental { }
apache/kafka
1,119
clients/src/main/java/org/apache/kafka/clients/admin/ListClientMetricsResourcesOptions.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.clients.admin; /** * Options for {@link Admin#listClientMetricsResources()}. * @deprecated Since 4.1. Use {@link ListConfigResourcesOptions} instead. */ @Deprecated(since = "4.1") public class ListClientMetricsResourcesOptions extends AbstractOptions<ListClientMetricsResourcesOptions> { }
apache/lens
1,118
lens-server-api/src/main/java/org/apache/lens/server/api/metrics/MethodMetricsContext.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.lens.server.api.metrics; /** * Metrics context for a method. Has methods to start/end measuring metrics and one callback for errors */ public interface MethodMetricsContext { /** Error came. Mark it. */ void markError(); /** Method succeeded. mark it. */ void markSuccess(); }
apache/linkis
1,105
linkis-engineconn-plugins/repl/src/main/java/org/apache/linkis/engineplugin/repl/conf/ReplType.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.engineplugin.repl.conf; public class ReplType { public static final String JAVA = "java"; public static final String SCALA = "scala"; public static boolean isSupportReplType(String type) { return JAVA.equalsIgnoreCase(type) || SCALA.equalsIgnoreCase(type); } }
apache/maven-plugins
1,108
maven-pmd-plugin/src/test/resources/unit/exclude-roots/baseroot/src1/PMDViolationExample.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. */ public class PMDViolationExample { public void jumbledIncrementer() { for (int i = 0; i < 10; i++) { // only references 'i' for (int k = 0; k < 20; i++) { // references both 'i' and 'k' System.out.println("Hello"); } } } }
apache/maven-plugins
1,108
maven-pmd-plugin/src/test/resources/unit/exclude-roots/baseroot/src2/PMDViolationExample.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. */ public class PMDViolationExample { public void jumbledIncrementer() { for (int i = 0; i < 10; i++) { // only references 'i' for (int k = 0; k < 20; i++) { // references both 'i' and 'k' System.out.println("Hello"); } } } }
apache/maven-release
1,106
maven-release-api/src/main/java/org/apache/maven/shared/release/ReleaseFailureException.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.shared.release; /** * A failure during the release process. * * @author <a href="mailto:brett@apache.org">Brett Porter</a> */ public class ReleaseFailureException extends Exception { public ReleaseFailureException(String message) { super(message); } }
apache/maven-surefire
1,056
surefire-its/src/test/resources/surefire-803-multiFailsafeExec-rebuildOverwrites/src/main/java/org/apache/maven/surefire/test/App.java
package org.apache.maven.surefire.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 App { private String test = "value"; public String getTest() { return test; } public void setTest( final String test ) { this.test = test; } }
apache/maven
1,120
api/maven-api-plugin/src/main/java/org/apache/maven/api/plugin/descriptor/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Provides classes for Maven plugin descriptors that define plugin metadata, configuration, * and execution parameters. These descriptors are typically stored in plugin.xml files * within the META-INF/maven directory of plugin JARs. * * @since 4.0.0 */ package org.apache.maven.api.plugin.descriptor;
apache/mina-ftpserver
1,122
core/src/test/java/org/apache/ftpserver/impl/FtpStatisticsImplTest.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.ftpserver.impl; /** * * @author <a href="http://mina.apache.org">Apache MINA Project</a> * */ public class FtpStatisticsImplTest extends ServerFtpStatisticsTestTemplate { @Override protected DefaultFtpStatistics createStatistics() { return new DefaultFtpStatistics(); } }
apache/mnemonic
1,135
mnemonic-core/src/main/java/org/apache/mnemonic/HandlerStore.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.mnemonic; public interface HandlerStore { /** * determine whether this allocator supports to store durable handler or * not * * @return true if there is */ boolean hasDurableHandlerStore(); long handlerCapacity(); long getHandler(long key); void setHandler(long key, long handler); }
apache/myfaces
1,116
impl/src/test/java/org/apache/myfaces/view/facelets/test/component/InputTextWithClass.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.view.facelets.test.component; import jakarta.faces.component.FacesComponent; import jakarta.faces.component.html.HtmlInputText; @FacesComponent(tagName = "inputText", createTag = true, namespace = "http://test.com/test") public class InputTextWithClass extends HtmlInputText { }
apache/nifi
1,051
nifi-system-tests/nifi-system-test-extensions-bundle/nifi-system-test-extensions-services/src/main/java/org/apache/nifi/cs/tests/system/FakeControllerService1.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.cs.tests.system; import org.apache.nifi.controller.AbstractControllerService; public class FakeControllerService1 extends AbstractControllerService implements BaseFakeService { @Override public void foo() { } }
apache/nifi
1,053
nifi-framework-bundle/nifi-framework-extensions/nifi-questdb-bundle/nifi-questdb/src/main/java/org/apache/nifi/questdb/embedded/ClientDisconnectedException.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.questdb.embedded; import org.apache.nifi.questdb.DatabaseException; final class ClientDisconnectedException extends DatabaseException { ClientDisconnectedException(final String message) { super(message); } }
apache/nifi
1,079
nifi-extension-bundles/nifi-mqtt-bundle/nifi-mqtt-processors/src/main/java/org/apache/nifi/processors/mqtt/common/MqttException.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.processors.mqtt.common; public class MqttException extends RuntimeException { public MqttException(String message) { super(message); } public MqttException(String message, Throwable cause) { super(message, cause); } }
apache/olingo-odata4
1,091
lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataMediaRequest.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.olingo.client.api.communication.request.retrieve; import java.io.InputStream; /** * This class implements an OData media query request. */ public interface ODataMediaRequest extends ODataRetrieveRequest<InputStream> { //No additional methods needed for now. }
apache/olingo-odata4
1,108
lib/server-api/src/main/java/org/apache/olingo/server/api/uri/UriResourcePrimitiveProperty.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.olingo.server.api.uri; /** * Used to describe an primitive property used within an resource path * For example: http://.../serviceroot/entityset(1)/property */ public interface UriResourcePrimitiveProperty extends UriResourceProperty { // No additional methods needed for now. }
apache/olingo-odata4
1,114
ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/Context.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.olingo.ext.proxy.context; public class Context { private final EntityContext entities; public Context() { this.entities = new EntityContext(); } public EntityContext entityContext() { return entities; } public void detachAll() { entities.detachAll(); } }
apache/openjpa
1,099
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/hugariannotation/OtherClass.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.hugariannotation; import jakarta.persistence.Entity; import jakarta.persistence.Id; /** * Created by IntelliJ IDEA. * User: Ben * Date: 31-Oct-2007 * Time: 21:04:54 */ @Entity public class OtherClass { @Id private Integer m_intBarFoo1; }
apache/openjpa
1,102
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/common/apps/AIntf.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.kernel.common.apps; /** * Interface inplemented by {@link A}, used for interface * testing. * * @author <a href="mailto:marc@solarmetric.com">Marc Prud'hommeaux</a> */ public interface AIntf { String getName(); void setName(String name); }
apache/ozone
1,116
hadoop-ozone/integration-test/src/test/java/org/apache/ozone/test/TestOzoneIntegrationHA.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.ozone.test; import org.apache.hadoop.ozone.MiniOzoneHAClusterImpl; /** Test Ozone with HA cluster. */ public class TestOzoneIntegrationHA extends HATests { @Override protected MiniOzoneHAClusterImpl createCluster() throws Exception { return newClusterBuilder() .build(); } }
apache/paimon-webui
1,116
paimon-web-server/src/main/java/org/apache/paimon/web/server/mapper/DatabaseMapper.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.server.mapper; import org.apache.paimon.web.server.data.vo.DatabaseVO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; /** Database table mapper. */ @Mapper public interface DatabaseMapper extends BaseMapper<DatabaseVO> {}
apache/pinot
1,097
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/startree/v2/builder/SingleTreeBuilder.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.segment.local.startree.v2.builder; import java.io.Closeable; /** * A star-tree builder that builds a single star-tree. */ public interface SingleTreeBuilder extends Closeable { /** * Builds the star-tree. */ void build() throws Exception; }
apache/pinot
1,134
pinot-spi/src/main/java/org/apache/pinot/spi/trace/NoOpRecording.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.trace; /** * Used when tracing is disabled. */ public final class NoOpRecording extends BaseRecording implements InvocationScope { public static final NoOpRecording INSTANCE = new NoOpRecording(); public NoOpRecording() { super(false); } @Override public void close() { } }
apache/polygene-java
1,092
extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBAccessors.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.entitystore.mongodb; import com.mongodb.MongoClient; import com.mongodb.client.MongoDatabase; public interface MongoDBAccessors { MongoClient mongoInstanceUsed(); MongoDatabase dbInstanceUsed(); String collectionUsed(); }
apache/polygene-java
1,104
tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/LibraryService.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.tutorials.services.step3; import org.apache.polygene.api.activation.Activators; import org.apache.polygene.api.mixin.Mixins; @Mixins( LibraryMixin.class ) @Activators( LibraryActivator.class ) public interface LibraryService extends Library { }
apache/polygene-java
1,119
core/api/src/main/java/org/apache/polygene/api/identity/UuidGeneratorMixin.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.api.identity; import java.util.UUID; public class UuidGeneratorMixin implements IdentityGenerator { @Override public Identity generate(Class<?> compositeType) { return StringIdentity.identityOf( UUID.randomUUID().toString() ); } }
apache/polygene-java
1,122
libraries/http/src/main/java/org/apache/polygene/library/http/JettyService.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.http; import org.apache.polygene.api.activation.Activators; import org.apache.polygene.api.mixin.Mixins; @Mixins( JettyMixin.class ) @Activators( JettyActivation.Activator.class ) public interface JettyService extends HttpService, JettyActivation { }
apache/pulsar
1,093
pulsar-io/elastic-search/src/test/java/org/apache/pulsar/io/elasticsearch/opensearch/OpenSearchSinkRawDataTest.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.pulsar.io.elasticsearch.opensearch; import org.apache.pulsar.io.elasticsearch.ElasticSearchSinkRawDataTest; public class OpenSearchSinkRawDataTest extends ElasticSearchSinkRawDataTest { public OpenSearchSinkRawDataTest() { super(OPENSEARCH); } }
apache/qpid-broker-j
1,112
bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/upgrade/StoreUpgrade.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.server.store.berkeleydb.upgrade; import com.sleepycat.je.Environment; import org.apache.qpid.server.model.ConfiguredObject; public interface StoreUpgrade { void performUpgrade(Environment environment, UpgradeInteractionHandler handler, ConfiguredObject<?> parent); }
apache/qpid-broker-j
1,124
broker-core/src/main/java/org/apache/qpid/server/queue/StandardQueue.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.server.queue; import org.apache.qpid.server.model.ManagedObject; import org.apache.qpid.server.model.Queue; @ManagedObject( category = false, type="standard", amqpName = "org.apache.qpid.StandardQueue" ) public interface StandardQueue<X extends StandardQueue<X>> extends Queue<X> { }
apache/qpid-jms
1,114
qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/basictypes/Role.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.jms.test.testpeer.basictypes; /** * Generated by generate-types.xsl, which resides in this package. */ public class Role { public static final boolean SENDER = false; public static final boolean RECEIVER = true; private Role() { //No instances } }
apache/ranger
1,102
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerRowFilterPolicyItemEvaluator.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.ranger.plugin.policyevaluator; import org.apache.ranger.plugin.model.RangerPolicy.RangerPolicyItemRowFilterInfo; public interface RangerRowFilterPolicyItemEvaluator extends RangerPolicyItemEvaluator { void init(); RangerPolicyItemRowFilterInfo getRowFilterInfo(); }
apache/reef
1,100
lang/java/reef-examples/src/main/java/org/apache/reef/examples/group/broadcast/parameters/Dimensions.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.examples.group.broadcast.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; /** * */ @NamedParameter(doc = "Model dimensions", short_name = "dim") public class Dimensions implements Name<Integer> { }
apache/rocketmq
1,133
example/src/main/java/org/apache/rocketmq/example/simple/CachedQueue.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.example.simple; import java.util.TreeMap; import org.apache.rocketmq.common.message.MessageExt; public class CachedQueue { private final TreeMap<Long, MessageExt> msgCachedTable = new TreeMap<>(); public TreeMap<Long, MessageExt> getMsgCachedTable() { return msgCachedTable; } }
apache/rya
1,115
extras/indexing/src/main/java/org/apache/rya/indexing/IndexPlanValidator/TupleValidator.java
package org.apache.rya.indexing.IndexPlanValidator; /* * 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 java.util.Iterator; import org.eclipse.rdf4j.query.algebra.TupleExpr; public interface TupleValidator { public boolean isValid(TupleExpr te); public Iterator<TupleExpr> getValidTuples(Iterator<TupleExpr> tupleList); }
apache/samza
1,132
samza-api/src/main/java/org/apache/samza/metrics/MetricsReporterFactory.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.samza.metrics; import java.io.Serializable; import org.apache.samza.config.Config; /** * Build a {@link org.apache.samza.metrics.MetricsReporter} */ public interface MetricsReporterFactory extends Serializable { MetricsReporter getMetricsReporter(String name, String processorId, Config config); }
apache/sentry
1,093
sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/exception/SentryHdfsServiceException.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.sentry.core.common.exception; public class SentryHdfsServiceException extends Exception { private static final long serialVersionUID = 1511645864949767378L; public SentryHdfsServiceException(String message, Throwable cause) { super(message, cause); } }
apache/servicecomb-saga-actuator
1,112
saga-core/src/main/java/org/apache/servicecomb/saga/core/RecoveryPolicy.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.saga.core; public interface RecoveryPolicy extends Descriptive { String SAGA_FORWARD_RECOVERY_POLICY = "ForwardRecovery"; String SAGA_BACKWARD_RECOVERY_POLICY = "BackwardRecovery"; SagaResponse apply(SagaTask task, SagaRequest request, SagaResponse parentResponse); }
apache/shardingsphere-elasticjob
1,086
api/src/main/java/org/apache/shardingsphere/elasticjob/spi/executor/item/param/JobRuntimeService.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.elasticjob.spi.executor.item.param; /** * Job runtime service. */ public interface JobRuntimeService { /** * Judge job whether to need resharding. * * @return need resharding or not */ boolean isNeedSharding(); }
apache/shenyu
1,126
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/EnumService.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; import org.apache.shenyu.admin.model.vo.EnumVO; import java.util.List; import java.util.Map; /** * this is enum service. */ public interface EnumService { /** * find list of enum. * * @return {@linkplain Map} */ Map<String, List<EnumVO>> list(); }
apache/shiro
1,144
core/src/main/java/org/apache/shiro/authz/annotation/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Annotations used to restrict which classes, instances, or methods may be accessed or invoked depending on the * caller's access abilities or authentication state. * Since 1.1, all core annotations were extends to accept Target ElementType.TYPE in addition to ElementType.METHOD */ package org.apache.shiro.authz.annotation;
apache/sis
1,106
endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/internal/Resources_en.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.sis.storage.netcdf.internal; /** * Resource in English language. */ public class Resources_en extends Resources { /** * Constructs a new resource bundle loading data from * the resource file of the same name as this class. */ public Resources_en() { } }
apache/skywalking
1,102
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/sql/KeyValues.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.core.query.sql; import java.util.LinkedList; import java.util.List; import lombok.Getter; import lombok.Setter; public class KeyValues { @Getter @Setter private String key; @Getter private List<String> values = new LinkedList<>(); }
apache/storm
1,137
external/storm-hdfs/src/main/java/org/apache/storm/hdfs/bolt/Writer.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version * 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package org.apache.storm.hdfs.bolt; import java.io.IOException; import org.apache.hadoop.fs.Path; import org.apache.storm.tuple.Tuple; public interface Writer { long write(Tuple tuple) throws IOException; void sync() throws IOException; void close() throws IOException; boolean needsRotation(); Path getFilePath(); }
apache/stratos
1,063
components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/application/ApplicationsEventMessageQueue.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.message.receiver.application; import org.apache.stratos.messaging.domain.Message; import java.util.concurrent.LinkedBlockingQueue; public class ApplicationsEventMessageQueue extends LinkedBlockingQueue<Message> { }
apache/streampipes
1,060
streampipes-extensions/streampipes-pipeline-elements-experimental-flink/src/main/java/com/kohlschutter/boilerpipe/filters/english/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /** * These BoilerpipeFilters have only been tested on English text. * <p> * That is, they will probably work with other Western languages, but maybe need some parameter tuning to perform well. */ package com.kohlschutter.boilerpipe.filters.english;
apache/struts
1,114
plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateConstants.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.struts2.views.java; public class JavaTemplateConstants { public static final String STRUTS_JAVATEMPLATES_DEFAULT_TEMPLATE_TYPE = "struts.javatemplates.defaultTemplateType"; public static final String STRUTS_JAVATEMPLATES_CUSTOM_THEMES = "struts.javatemplates.customThemes"; }
apache/struts
1,119
apps/showcase/src/test/java/it/org/apache/struts2/showcase/ParameterUtils.java
/* * $Id$ * * 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 it.org.apache.struts2.showcase; public class ParameterUtils { public static String getBaseUrl() { String port = System.getProperty("http.port"); if (port == null) { port = "8080"; } return "http://localhost:"+port+"/struts2-showcase"; } }
apache/syncope
1,117
common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/AttrReleasePolicyConf.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.lib.policy; import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.apache.syncope.common.lib.BaseBean; @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "_class") public interface AttrReleasePolicyConf extends BaseBean { }
apache/tapestry-5
1,128
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/LoggerSource.java
// Copyright 2006, 2007 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.ioc; import org.slf4j.Logger; /** * A wrapper around SLF4J's LoggerFactory that exists to allow particular projects to "hook" the creation of Logger * instances. */ public interface LoggerSource { /** * Creates or retrieves a log based on Class. This is rarely used in Tapestry IOC. */ Logger getLogger(Class clazz); /** * Creates or retrieves a log based on name. Typically, the name will be a service id. */ Logger getLogger(String name); }
apache/tomcat
1,148
java/jakarta/transaction/HeuristicRollbackException.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 HeuristicRollbackException extends Exception { @Serial private static final long serialVersionUID = -3483618944556408897L; public HeuristicRollbackException() { super(); } public HeuristicRollbackException(String msg) { super(msg); } }
apache/tomee
1,120
container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PortRefInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.assembler.classic; import javax.xml.namespace.QName; import java.util.Properties; public class PortRefInfo extends InfoObject { public QName qname; public String serviceEndpointInterface; public boolean enableMtom; public final Properties properties = new Properties(); }
apache/tomee
1,121
examples/component-interfaces/src/main/java/org/superbiz/FriendlyPersonEjbLocalHome.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; //START SNIPPET: code import jakarta.ejb.CreateException; import jakarta.ejb.EJBLocalHome; import java.rmi.RemoteException; public interface FriendlyPersonEjbLocalHome extends EJBLocalHome { FriendlyPersonEjbLocalObject create() throws CreateException, RemoteException; } //END SNIPPET: code
apache/tomee
1,135
server/openejb-client/src/main/java/javax/xml/ws/WebServiceFeature.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.xml.ws; /** * This class is only provided so JaxWS code can be compiled under Java6 update 4 which * uses JaxWS 2.1. */ public abstract class WebServiceFeature { protected boolean enabled; public abstract java.lang.String getID(); public boolean isEnabled() { return enabled; } }
apache/trafficcontrol
1,069
traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/util/AbstractUpdatable.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.traffic_control.traffic_router.core.util; public abstract class AbstractUpdatable { private long lastUpdated = 0; public abstract boolean update(String newDB); public abstract boolean noChange(); public void complete() { // override if you wish to exec code after the download is complete } public long getLastUpdated() { return lastUpdated; } public void setLastUpdated(final long lastUpdated) { this.lastUpdated = lastUpdated; } public void cancelUpdate() {} }
apache/uniffle
1,129
common/src/main/java/org/apache/uniffle/common/web/resource/BaseResource.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.uniffle.common.web.resource; import java.util.concurrent.Callable; public abstract class BaseResource { protected <T> Response<T> execute(Callable<T> callable) { try { return Response.success(callable.call()); } catch (Throwable e) { return Response.fail(e.getMessage()); } } }
apache/usergrid
1,117
stack/query-validator/src/main/java/org/apache/usergrid/query/validator/QueryRunner.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.query.validator; import java.util.List; import org.apache.usergrid.persistence.Entity; /** * @author Sungju Jin */ public interface QueryRunner { public boolean setup(); public List<Entity> execute(String query); public List<Entity> execute(String query, int limit); }
apache/usergrid
1,133
stack/core/src/main/java/org/apache/usergrid/utils/NumberUtils.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.utils; public class NumberUtils { public static int sign( int i ) { if ( i < 0 ) { return -1; } if ( i > 0 ) { return 1; } return 0; } public static long roundLong( long l, long r ) { return ( l / r ) * r; } }
apache/xmlbeans
1,153
src/test/java/xmlobject/checkin/DumbTest.java
/* Copyright 2004 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 xmlobject.checkin; import dumbNS.RootDocument; import dumbNS.RootDocument.Root; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; import static xmlcursor.common.BasicCursorTestCase.jobj; public class DumbTest { @Test void testGetB2() throws Exception { RootDocument rootDoc = (RootDocument) jobj("xbean/simple/dumb/dumb.xml"); Root root = rootDoc.getRoot(); assertEquals(4, root.getB2().intValue(), "bar:b attribute != 4"); } }
apache/xmlgraphics-fop
1,134
fop-core/src/main/java/org/apache/fop/afp/StructuredData.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.afp; /** * An AFP object which is able to know its own data length prior to writeToStream() */ public interface StructuredData { /** * Returns the data length of this structured field * * @return the data length of this structured field */ int getDataLength(); }
google/conscrypt
1,130
android-stub/src/main/java/dalvik/system/CloseGuard.java
/* * Copyright 2014 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 dalvik.system; @SuppressWarnings("DoNotCallSuggester") public class CloseGuard { private CloseGuard() {} public static CloseGuard get() { throw new UnsupportedOperationException("Stub!"); } public void open(String message) { throw new UnsupportedOperationException("Stub!"); } public void close() { throw new UnsupportedOperationException("Stub!"); } public void warnIfOpen() { throw new UnsupportedOperationException("Stub!"); } }
google/copybara
1,141
java/com/google/copybara/git/gerritapi/DeleteVoteInput.java
/* * Copyright (C) 2020 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.git.gerritapi; import com.google.api.client.util.Key; import javax.annotation.Nullable; /** see https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#delete-vote-input * request json * <p>NotifyInfo (notify_details) not included for now * <p>label not included for now since it matches the label in the URL. */ public class DeleteVoteInput { @Key String notify; public DeleteVoteInput(@Nullable NotifyType notify) { this.notify = notify == null ? null : notify.toString(); } }
google/copybara
1,143
java/com/google/copybara/testing/DummyTrigger.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.testing; import com.google.copybara.Endpoint; import com.google.copybara.Trigger; import net.starlark.java.annot.StarlarkBuiltin; /** * A dummy trigger for feedback mechanism. * * <p>Extends {@link DummyEndpoint} just for convenience for the tests. */ @StarlarkBuiltin( name = "dummy_trigger", doc = "A dummy trigger for feedback mechanism", documented = false) public class DummyTrigger extends DummyEndpoint implements Trigger { @Override public Endpoint getEndpoint() { return this; } }
google/error-prone
1,108
core/src/main/java/com/google/errorprone/bugpatterns/argumentselectiondefects/Heuristic.java
/* * Copyright 2017 The Error Prone 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.errorprone.bugpatterns.argumentselectiondefects; import com.google.errorprone.VisitorState; import com.sun.source.tree.Tree; import com.sun.tools.javac.code.Symbol.MethodSymbol; /** * A heuristic to apply to a suggested change. If the test method returns false then the change will * be abandoned. * * @author andrewrice@google.com (Andrew Rice) */ interface Heuristic { boolean isAcceptableChange(Changes changes, Tree node, MethodSymbol symbol, VisitorState state); }
google/guice
1,151
core/src/com/google/inject/spi/LinkedKeyBinding.java
/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.inject.spi; import com.google.inject.Binding; import com.google.inject.Key; /** * A binding to a linked key. The other key's binding is used to resolve injections. * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 */ public interface LinkedKeyBinding<T> extends Binding<T> { /** * Returns the linked key used to resolve injections. That binding can be retrieved from an * injector using {@link com.google.inject.Injector#getBinding(Key) Injector.getBinding(key)}. */ Key<? extends T> getLinkedKey(); }
google/j2cl
1,101
transpiler/javatests/com/google/j2cl/integration/java/allsimplebridges/Tester514.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 * * 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 allsimplebridges; import static com.google.j2cl.integration.testing.Asserts.assertTrue; public class Tester514 { static interface I1 { default String get(String value) { return "I1.get"; } } static class C1 implements I1 { C1() {} @Override public String get(String value) { return "C1.get"; } } public static void test() { C1 s = new C1(); assertTrue(s.get("").equals("C1.get")); assertTrue(((I1) s).get("").equals("C1.get")); } }
google/j2cl
1,112
junit/generator/javatests/com/google/j2cl/junit/apt/AdvancedJUnit3TestCaseGrandParent.java
/* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.j2cl.junit.apt; import junit.framework.TestCase; /** * A Unit test to test processing in {@link J2clTestingProcessingStepTest}. */ public class AdvancedJUnit3TestCaseGrandParent extends TestCase { @Override protected void setUp() throws Exception {} @Override protected void tearDown() throws Exception {} public void testFromGrandParent() {} public void testFromGrandParent1() {} public void someOtherMethodFromGrandParent() {} public void testOverridenFromGrandParent() {} }
google/j2cl
1,158
jre/java/java/util/NavigableSet.java
/* * Copyright 2014 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 java.util; /** * A {@code SortedSet} with more flexible queries. * * @param <E> element type. */ public interface NavigableSet<E> extends SortedSet<E> { E ceiling(E e); Iterator<E> descendingIterator(); NavigableSet<E> descendingSet(); E floor(E e); NavigableSet<E> headSet(E toElement, boolean inclusive); E higher(E e); E lower(E e); E pollFirst(); E pollLast(); NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive); NavigableSet<E> tailSet(E fromElement, boolean inclusive); }
google/j2cl
1,159
jre/java/java/util/Enumeration.java
/* * Copyright 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package java.util; /** * An interface to generate a series of elements, one at a time. <a * href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Enumeration.html">[Sun docs]</a> * * @param <E> the type being enumerated. */ public interface Enumeration<E> { boolean hasMoreElements(); E nextElement(); default Iterator<E> asIterator() { return new Iterator<E>() { @Override public boolean hasNext() { return hasMoreElements(); } @Override public E next() { return nextElement(); } }; } }
google/nomulus
1,132
util/src/test/java/google/registry/util/RegistrarUtilsTest.java
// Copyright 2019 The Nomulus Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT 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 google.registry.util; import static com.google.common.truth.Truth.assertThat; import org.junit.jupiter.api.Test; /** Unit tests for {@link RegistrarUtils}. */ class RegistrarUtilsTest { @Test void testNormalizeRegistrarName_letterOrDigitOnly() { assertThat(RegistrarUtils.normalizeRegistrarName("129abzAZ")).isEqualTo("129abzaz"); } @Test void testNormalizeRegistrarName_hasSymbols() { assertThat(RegistrarUtils.normalizeRegistrarName("^}129a(bzAZ/:")).isEqualTo("129abzaz"); } }
google/sagetv
1,170
third_party/Ogle/java/sage/dvd/pci_t.java
/* * Copyright 2015 The SageTV Authors. All Rights Reserved. * * Adapted from Ogle - A video player * Copyright (C) 2000, 2001 Håkan Hjort * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ package sage.dvd; public class pci_t extends Struct { public pci_gi_t pci_gi = (pci_gi_t) inner(new pci_gi_t()); public nsml_agli_t nsml_agli = (nsml_agli_t) inner(new nsml_agli_t()); public hli_t hli = (hli_t) inner(new hli_t()); public Unsigned8[] zero1 = (Unsigned8[]) array(new Unsigned8[189]); }