repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/inlong | 1,131 | inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sink/oracle/OracleTableInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.inlong.manager.pojo.sink.oracle;
import lombok.Data;
import java.util.List;
/**
* Oracle table info.
*/
@Data
public class OracleTableInfo {
private String tableName;
private String comment;
private String primaryKey;
private String userName;
private List<OracleColumnInfo> columns;
}
|
apache/jackrabbit | 1,164 | jackrabbit-spi2jcr/src/test/java/org/apache/jackrabbit/test/JCRBenchmark.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jackrabbit.test;
import junit.framework.Test;
import junit.framework.TestCase;
import org.apache.jackrabbit.benchmark.BenchmarkSuite;
/**
* Test suite that includes all test suites from jackrabbit-jcr-benchmark.
*/
public class JCRBenchmark extends TestCase {
public static Test suite() {
return new BenchmarkSuite();
}
} |
apache/jena | 1,154 | jena-arq/src/test/java/org/apache/jena/sparql/core/mem/TestDatasetGraphInMemoryLock.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.sparql.core.mem;
import org.apache.jena.query.Dataset;
import org.apache.jena.query.DatasetFactory;
import org.apache.jena.sparql.core.AbstractTestDataset;
public class TestDatasetGraphInMemoryLock extends AbstractTestDataset {
@Override
protected Dataset createDataset() {
return DatasetFactory.createTxnMem();
}
}
|
apache/jena | 1,171 | jena-core/src/test/java/org/apache/jena/mem2/store/legacy/ArrayBunchTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.mem2.store.legacy;
import org.apache.jena.graph.Triple;
import org.apache.jena.mem2.collection.AbstractJenaSetTripleTest;
import org.apache.jena.mem2.collection.JenaSet;
public class ArrayBunchTest extends AbstractJenaSetTripleTest {
@Override
protected JenaSet<Triple> createTripleSet() {
return new ArrayBunch();
}
} |
apache/jena | 1,181 | jena-base/src/main/java/org/apache/jena/atlas/lib/Copyable.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.atlas.lib;
/**
* Generic interface for objects that can create an independent copy of themselves.
* Any operations on the copy must not affect the original in any way.
* @param <T> must be the type of the implementing class
*/
public interface Copyable<T> {
/**
* Create a copy of this object.
* @return T
*/
T copy();
}
|
apache/joshua | 1,175 | src/main/java/org/apache/joshua/decoder/phrase/Note.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.joshua.decoder.phrase;
// PORT: done
public class Note {
public Object value;
public String toString() {
return value.toString();
}
public Note() {
}
public Note(Object value) {
this.value = value;
}
public Object get() {
return value;
}
public void set(Object object) {
this.value = object;
}
}
|
apache/jspwiki | 1,176 | jspwiki-main/src/test/java/org/apache/wiki/stress/Benchmark.java | /*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR 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.wiki.stress;
import org.apache.commons.lang3.time.StopWatch;
public class Benchmark extends StopWatch
{
/**
* How many operations/second?
*/
public String toString(final int operations )
{
final double totalTime = getTime();
return Double.toString( (operations/totalTime) * 1000.0 );
}
}
|
apache/kafka | 1,150 | connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/entities/LoggerLevel.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.connect.runtime.rest.entities;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
public record LoggerLevel(
@JsonProperty String level,
@JsonProperty("last_modified") Long lastModified
) {
public LoggerLevel {
Objects.requireNonNull(level, "level may not be null");
}
} |
apache/kafka | 1,157 | streams/src/main/java/org/apache/kafka/streams/kstream/internals/JoinWindowsInternal.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.streams.kstream.internals;
import org.apache.kafka.streams.kstream.JoinWindows;
public class JoinWindowsInternal extends JoinWindows {
public JoinWindowsInternal(final JoinWindows joinWindows) {
super(joinWindows);
}
public boolean spuriousResultFixEnabled() {
return enableSpuriousResultFix;
}
}
|
apache/kylin | 1,166 | src/core-common/src/main/java/org/apache/kylin/rest/aspect/EnableRateLimit.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kylin.rest.aspect;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.METHOD })
@Documented
public @interface EnableRateLimit {
}
|
apache/maven-dependency-plugin | 1,131 | src/it/projects/analyze-invalid-exclude-multumodule-project/module1/src/main/java/foo/Main.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package foo;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.metadata.Metadata;
import org.apache.maven.model.Model;
public class Main
{
public static final String SCOPE_COMPILE = Artifact.SCOPE_COMPILE;
public Model model = null;
public Metadata metadata = null;
}
|
apache/maven-dependency-plugin | 1,131 | src/it/projects/analyze-invalid-exclude-multumodule-project/module2/src/main/java/foo/Main.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package foo;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.metadata.Metadata;
import org.apache.maven.model.Model;
public class Main
{
public static final String SCOPE_COMPILE = Artifact.SCOPE_COMPILE;
public Model model = null;
public Metadata metadata = null;
}
|
apache/maven-plugins | 1,124 | maven-project-info-reports-plugin/src/test/java/org/apache/maven/report/projectinfo/stubs/SummaryStub.java | package org.apache.maven.report.projectinfo.stubs;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT 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 <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @version $Id$
*/
public class SummaryStub
extends ProjectInfoProjectStub
{
@Override
protected String getPOM()
{
return "summary-plugin-config.xml";
}
}
|
apache/maven | 1,166 | api/maven-api-core/src/main/java/org/apache/maven/api/DownloadedDependency.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.api;
import org.apache.maven.api.annotations.Experimental;
import org.apache.maven.api.annotations.Immutable;
/**
* A {@link Dependency} that has been resolved, i.e. downloaded to the local repository.
*
* @since 4.0.0
*/
@Experimental
@Immutable
public interface DownloadedDependency extends Dependency, DownloadedArtifact {}
|
apache/maven | 1,171 | api/maven-api-core/src/main/java/org/apache/maven/api/Exclusion.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.api;
import org.apache.maven.api.annotations.Experimental;
import org.apache.maven.api.annotations.Nullable;
/**
* A dependency exclusion.
*
* @since 4.0.0
* @see DependencyCoordinates#getExclusions()
*/
@Experimental
public interface Exclusion {
@Nullable
String getGroupId();
@Nullable
String getArtifactId();
}
|
apache/mnemonic | 1,144 | mnemonic-common/src/main/java/org/apache/mnemonic/service/memory/MemoryServiceFeature.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.service.memory;
public enum MemoryServiceFeature {
VOLATILE(1),
NONVOLATILE(2),
TRANSACTABLE(3),
QUERYABLE(4),
ABSTRACTADDRESSING(5),
EXPANDABLE(6),
SHRINKABLE(7);
private int value;
MemoryServiceFeature(int val) {
this.value = val;
}
public int getValue() {
return value;
}
}
|
apache/myfaces | 1,138 | impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/ActionSourceAttachedObjectTargetImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.tag.composite;
import jakarta.faces.view.ActionSourceAttachedObjectTarget;
public class ActionSourceAttachedObjectTargetImpl extends
AttachedObjectTargetImpl implements ActionSourceAttachedObjectTarget
{
private static final long serialVersionUID = 6944946794856707903L;
}
|
apache/olingo-odata4 | 1,129 | lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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 org.apache.olingo.client.api.domain.ClientDelta;
/**
* Describes an OData retrieve request returning a delta object.
*/
public interface ODataDeltaRequest extends ODataRetrieveRequest<ClientDelta> {
//No additional methods needed for now.
}
|
apache/oodt | 1,159 | resource/src/main/java/org/apache/oodt/cas/resource/jobqueue/JobQueueFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.oodt.cas.resource.jobqueue;
/**
* @author mattmann
* @version $Revision$
*
* <p>
* A factory for creating {@link JobQueue} services
* </p>.
*/
public interface JobQueueFactory {
/**
* Creates new {@link JobQueue} implementations.
*
* @return New {@link JobQueue} implementations.
*/
JobQueue createQueue();
}
|
apache/opennlp | 1,173 | opennlp-core/opennlp-ml/opennlp-dl/src/main/java/opennlp/dl/Tokens.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package opennlp.dl;
/**
* Holds the tokens for input to an ONNX model.
*
* @param tokens The tokens themselves.
* @param ids The token IDs as retrieved from the vocabulary.
* @param mask The token mask. (Typically all 1.)
* @param types The token types. (Typically all 1.)
*/
public record Tokens(String[] tokens, long[] ids, long[] mask, long[] types) {
}
|
apache/parquet-java | 1,166 | parquet-avro/src/main/java/org/apache/parquet/avro/AvroDataSupplier.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.parquet.avro;
import org.apache.avro.generic.GenericData;
/**
* Allows clients to control how the classes associated
* with specific Avro records are managed and found, e.g.,
* by creating an instance of {@code GenericData} that
* uses a particular {@code ClassLoader}.
*/
public interface AvroDataSupplier {
GenericData get();
}
|
apache/pig | 1,167 | test/e2e/pig/udfs/java/org/apache/pig/test/udf/evalfunc/GoodMonitored.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.pig.test.udf.evalfunc;
import java.io.IOException;
import org.apache.pig.EvalFunc;
import org.apache.pig.data.Tuple;
import org.apache.pig.builtin.MonitoredUDF;
@MonitoredUDF
public class GoodMonitored extends EvalFunc<String>
{
//@Override
public String exec(Tuple input) throws IOException
{
return "fred";
}
}
|
apache/pinot | 1,137 | pinot-core/src/main/java/org/apache/pinot/core/operator/transform/transformer/timeunit/TimeUnitTransformer.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.core.operator.transform.transformer.timeunit;
import org.apache.pinot.core.operator.transform.transformer.DataTransformer;
/**
* Interface for time unit transformer to transform time from one time unit to another.
*/
public interface TimeUnitTransformer extends DataTransformer<long[], long[]> {
}
|
apache/polygene-java | 1,118 | libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/common/datatypes/SQLInteger.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.sql.generator.grammar.common.datatypes;
/**
* This class represents the {@code INTEGER} type, sometimes abbreviated as {@code INT} (typically 32-bit integer).
*
* @author Stanislav Muhametsin
*/
public interface SQLInteger
extends SQLDataType
{
} |
apache/polygene-java | 1,153 | libraries/http/src/test/java/org/apache/polygene/library/http/JettyTestSuite.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith( Suite.class )
@Suite.SuiteClasses( {
JettyServiceTest.class,
JettyJMXStatisticsTest.class,
SecureJettyServiceTest.class,
MutualSecureJettyServiceTest.class
} )
public class JettyTestSuite
{
}
|
apache/polygene-java | 1,163 | core/testsupport/src/main/java/org/apache/polygene/test/model/PetShop.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.test.model;
import org.apache.polygene.api.association.Association;
import org.apache.polygene.api.association.ManyAssociation;
import org.apache.polygene.api.property.Property;
public interface PetShop
{
Property<Address> address();
Association<City> city();
ManyAssociation<Owner> owners();
}
|
apache/pulsar | 1,137 | pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/AvroSchemaCompatibilityCheckTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.broker.service.schema;
import org.testng.annotations.Test;
@Test(groups = "broker")
public class AvroSchemaCompatibilityCheckTest extends BaseAvroSchemaCompatibilityTest{
@Override
public SchemaCompatibilityCheck getSchemaCheck() {
return new AvroSchemaCompatibilityCheck();
}
}
|
apache/pulsar | 1,167 | managed-ledger/src/main/java/org/apache/bookkeeper/mledger/EntryProcessor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.bookkeeper.mledger;
import io.netty.buffer.ByteBuf;
import org.apache.pulsar.common.classification.InterfaceAudience;
import org.apache.pulsar.common.classification.InterfaceStability;
@InterfaceAudience.LimitedPrivate
@InterfaceStability.Evolving
public interface EntryProcessor {
void process(Position position, ByteBuf buffer);
}
|
apache/qpid-broker-j | 1,129 | systests/qpid-systests-spawn-admin/src/main/java/org/apache/qpid/systests/admin/BrokerAdminException.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.systests.admin;
public class BrokerAdminException extends RuntimeException
{
public BrokerAdminException(final String message)
{
super(message);
}
public BrokerAdminException(final String message, final Throwable cause)
{
super(message, cause);
}
}
|
apache/qpid-broker-j | 1,136 | broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObjectAttributeOrStatistic.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.model;
import java.lang.reflect.Type;
public interface ConfiguredObjectAttributeOrStatistic<C extends ConfiguredObject, T>
{
String getName();
Class<T> getType();
Type getGenericType();
T getValue(C configuredObject);
//AttributeValueConverter<T> getConverter();
}
|
apache/reef | 1,155 | lang/java/reef-tests/src/main/java/org/apache/reef/tests/library/tasks/EchoTask.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.tests.library.tasks;
import org.apache.reef.task.Task;
import javax.inject.Inject;
/**
* A Task that just sends the memento back.
*/
public final class EchoTask implements Task {
@Inject
private EchoTask() {
}
@Override
public byte[] call(final byte[] memento) throws Exception {
return memento;
}
}
|
apache/reef | 1,158 | lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/implementation/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.
*/
/**
* Tang's implementation. Ideally, applications should never need to be
* aware of anything in this package or its sub-packages. As of this
* writing, some layering violations still exist, and portions of this
* package (such as the InjectionPlan APIs) are needed in rare
* circumstances.
*/
package org.apache.reef.tang.implementation;
|
apache/reef | 1,167 | lang/java/reef-common/src/test/java/org/apache/reef/util/OSUtilsTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.util;
import org.junit.Assert;
import org.junit.Test;
/**
* Test for OSUtil.
*/
public final class OSUtilsTest {
/**
* Test if getPID() gets non-invalid process id.
*/
@Test
public void testGetPID() {
Assert.assertTrue(OSUtils.isUnix() || OSUtils.isWindows());
Assert.assertTrue(OSUtils.getPID() != -1);
}
}
|
apache/rocketmq-connect | 1,123 | connectors/rocketmq-replicator/src/main/java/org/apache/rocketmq/replicator/exception/ParamInvalidException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.replicator.exception;
/**
* @author osgoo
* @date 2022/7/25
*/
public class ParamInvalidException extends RuntimeException {
public ParamInvalidException(String msg) {
super(msg);
}
public ParamInvalidException(String msg, Exception e) {
super(msg, e);
}
}
|
apache/rocketmq-exporter | 1,160 | src/main/java/org/apache/rocketmq/exporter/model/common/TwoTuple.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.exporter.model.common;
public class TwoTuple<T1, T2> {
private T1 first;
private T2 second;
public TwoTuple(T1 first, T2 second) {
this.first = first;
this.second = second;
}
public T1 getFirst() {
return first;
}
public T2 getSecond() {
return second;
}
}
|
apache/samza | 1,159 | samza-api/src/main/java/org/apache/samza/operators/triggers/RepeatingTrigger.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.operators.triggers;
/**
* A {@link Trigger} that repeats its underlying trigger forever.
*/
public class RepeatingTrigger<M> implements Trigger<M> {
private final Trigger<M> trigger;
RepeatingTrigger(Trigger<M> trigger) {
this.trigger = trigger;
}
public Trigger<M> getTrigger() {
return trigger;
}
}
|
apache/seatunnel-web | 1,131 | seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/entity/UserLoginLog.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.seatunnel.app.dal.entity;
import lombok.Data;
import java.util.Date;
@Data
public class UserLoginLog {
private Long id;
private Integer userId;
private String token;
private Boolean tokenStatus;
private Date createTime;
private Date updateTime;
private Long workspaceId;
}
|
apache/servicecomb-java-chassis | 1,123 | foundations/foundation-spi/src/main/java/org/apache/servicecomb/foundation/auth/AuthHeaderProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.foundation.auth;
import java.util.HashMap;
import java.util.Map;
public interface AuthHeaderProvider {
default Map<String, String> authHeaders() {
return new HashMap<>(0);
}
default Map<String, String> getSignAuthHeaders(SignRequest request) {
return authHeaders();
}
}
|
apache/servicecomb-samples | 1,123 | java-chassis-integration-tests/pojo-test/src/test/java/org/apache/servicecomb/demo/pojo/test/PojoTestMain.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.demo.pojo.test;
import org.apache.servicecomb.foundation.common.utils.BeanUtils;
import org.apache.servicecomb.foundation.common.utils.Log4jUtils;
public class PojoTestMain {
public static void main(String[] args) throws Exception {
Log4jUtils.init();
BeanUtils.init();
}
}
|
apache/shardingsphere-elasticjob-ui | 1,057 | shardingsphere-elasticjob-cloud-ui/shardingsphere-elasticjob-cloud-ui-backend/src/main/java/org/apache/shardingsphere/elasticjob/cloud/ui/security/UserAccount.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.cloud.ui.security;
import lombok.Getter;
import lombok.Setter;
/**
* User account.
*/
@Getter
@Setter
public final class UserAccount {
private String username;
private String password;
}
|
apache/shardingsphere | 1,099 | kernel/sql-parser/distsql/statement/src/main/java/org/apache/shardingsphere/parser/distsql/statement/queryable/ShowSQLParserRuleStatement.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.parser.distsql.statement.queryable;
import org.apache.shardingsphere.distsql.statement.type.rql.rule.global.ShowGlobalRulesStatement;
/**
* Show SQL parser rule statement.
*/
public final class ShowSQLParserRuleStatement extends ShowGlobalRulesStatement {
}
|
apache/shardingsphere | 1,108 | infra/rewrite/core/src/main/java/org/apache/shardingsphere/infra/rewrite/sql/token/common/generator/aware/ParametersAware.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shardingsphere.infra.rewrite.sql.token.common.generator.aware;
import java.util.List;
/**
* SQL parameters aware.
*/
public interface ParametersAware {
/**
* Set parameters.
*
* @param params parameters
*/
void setParameters(List<Object> params);
}
|
apache/shardingsphere | 1,128 | kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/constant/TransactionOrder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.transaction.constant;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
/**
* Transaction order.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class TransactionOrder {
/**
* Transaction order.
*/
public static final int ORDER = 600;
}
|
apache/sis | 1,158 | endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/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.
*/
/**
* A set of helper classes for the {@code org.apache.sis.metadata} module.
*
* <STRONG>Do not use!</STRONG>
*
* This package is for internal use by SIS only. Classes in this package
* may change in incompatible ways in any future version without notice.
*
* @author Martin Desruisseaux (Geomatys)
*/
package org.apache.sis.metadata.internal;
|
apache/storm | 1,177 | storm-client/src/jvm/org/apache/storm/trident/tuple/TridentTuple.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.trident.tuple;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import org.apache.storm.tuple.ITuple;
public interface TridentTuple extends ITuple, List<Object> {
interface Factory extends Serializable {
Map<String, ValuePointer> getFieldIndex();
List<String> getOutputFields();
int numDelegates();
}
}
|
apache/storm | 1,186 | storm-client/src/jvm/org/apache/storm/ICredentialsListener.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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;
import java.util.Map;
/**
* Allows a bolt or a spout to be informed when the credentials of the topology have changed.
*/
public interface ICredentialsListener {
/**
* Called when the credentials of a topology have changed.
*
* @param credentials the new credentials, could be null.
*/
void setCredentials(Map<String, String> credentials);
}
|
apache/streampark | 1,119 | streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/bean/FlinkConnector.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.streampark.console.core.bean;
import lombok.Getter;
import lombok.Setter;
import java.util.Map;
@Getter
@Setter
public class FlinkConnector {
private String className;
private String factoryIdentifier;
Map<String, String> requiredOptions;
Map<String, String> optionalOptions;
}
|
apache/struts-examples | 1,128 | using-tags/src/main/java/org/apache/struts/using_tags/helloworld/action/HelloWorldAction.java | package org.apache.struts.using_tags.helloworld.action;
import org.apache.struts.using_tags.helloworld.model.MessageStore;
import org.apache.struts2.ActionSupport;
/**
* Acts as a Struts 2 controller that responds
* to a user action by setting the value
* of the MessageStore model class, and returns a String
* result.
* @author Bruce Phillips
*
*/
public class HelloWorldAction extends ActionSupport {
private static final long serialVersionUID = 1L;
/**
* The model class that stores the message
* to display in the view.
*/
private MessageStore messageStore;
private static int helloCount = 0;
public int getHelloCount() {
return helloCount;
}
/*
* Creates the MessageStore model object,
* increase helloCount by 1 and
* returns success. The MessageStore model
* object will be available to the view.
*/
public String execute() throws Exception {
messageStore = new MessageStore() ;
helloCount++;
return SUCCESS;
}
public MessageStore getMessageStore() {
return messageStore;
}
}
|
apache/struts | 1,130 | plugins/convention/src/test/java/org/apache/struts2/convention/actions/namespace/ClassLevelNamespaceAction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.convention.actions.namespace;
import org.apache.struts2.convention.annotation.Namespace;
/**
* <p>
* This class uses the class level annotation override.
* </p>
*/
@Namespace("/class-level")
public class ClassLevelNamespaceAction {
public String execute() {
return null;
}
} |
apache/struts | 1,157 | plugins/tiles/src/main/java/org/apache/tiles/request/attribute/HasRemovableKeys.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.tiles.request.attribute;
/**
* Allows to get and remove attributes.
*
* @param <V> The type of the value of the attribute.
*/
public interface HasRemovableKeys<V> extends HasKeys<V> {
/**
* Removes an attribute.
*
* @param key The key of the attribute to remove.
*/
void removeValue(String key);
}
|
apache/syncope | 1,135 | core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/UserPushResultHandler.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.syncope.core.provisioning.api.pushpull;
import org.apache.syncope.common.lib.to.Provision;
import org.apache.syncope.core.persistence.api.entity.user.LinkedAccount;
public interface UserPushResultHandler extends SyncopePushResultHandler {
boolean handle(LinkedAccount account, Provision provision);
}
|
apache/tapestry-5 | 1,142 | tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/MapInjectionResources.java | // Copyright 2008 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.ioc.internal.util;
import java.lang.reflect.Type;
import java.util.Map;
/**
* InjectionDefaultProvider that operates using a Map from type to value.
*/
public class MapInjectionResources implements InjectionResources
{
private final Map<Class, Object> map;
public MapInjectionResources(Map<Class, Object> map) {this.map = map;}
@Override
@SuppressWarnings({"unchecked"})
public <T> T findResource(Class<T> type, Type genericType)
{
return (T) map.get(type);
}
}
|
apache/tapestry-5 | 1,169 | plastic/src/main/java/org/apache/tapestry5/plastic/WhileCallback.java | // Copyright 2011 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.plastic;
/**
* Callback used with {@link InstructionBuilder#doWhile(Condition, WhileCallback)}.
*/
public interface WhileCallback
{
/**
* Creates the code to be evaluated by the {@link Condition}; often this involves
* loading a value from a variable or argument, or {@link InstructionBuilder#dupe()}'ing the
* top value on the stack.
*/
void buildTest(InstructionBuilder builder);
/**
* Provides the main code executed inside the loop.
*/
void buildBody(InstructionBuilder builder);
}
|
apache/tomcat80 | 1,203 | java/javax/annotation/PreDestroy.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.0
*/
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface PreDestroy {
// No attributes
}
|
apache/tomee | 1,136 | itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmr/cmrmapping/OneOwningSideLocal.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.test.entity.cmr.cmrmapping;
import jakarta.ejb.EJBLocalObject;
/**
* @version $Revision$ $Date$
*/
public interface OneOwningSideLocal extends EJBLocalObject {
// CMR
public OneInverseSideLocal getOneInverseSide();
public void setOneInverseSide(OneInverseSideLocal oneInverseSideLocal);
}
|
apache/tomee | 1,144 | examples/simple-stateless-with-descriptor/src/main/java/org/superbiz/calculator/CalculatorRemote.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.calculator;
/**
* This is an EJB 3 remote business interface
* This interface is specified using the business-local tag in the deployment descriptor
*/
//START SNIPPET: code
public interface CalculatorRemote {
public int sum(int add1, int add2);
public int multiply(int mul1, int mul2);
}
//END SNIPPET: code
|
apache/trafodion | 1,188 | core/conn/jdbc_type2/src/main/java/JdbcT2.java | // @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
// @@@ END COPYRIGHT @@@
public class JdbcT2
{
public static void main(String[] args)
{
if (args.length == 0)
{
System.out.println("Usage: java JdbcT2 -version");
return;
}
if (args[0].equals("-version"))
System.out.println(org.apache.trafodion.jdbc.t2.T2Driver.driverVproc);
}
}
|
apache/wicket | 1,134 | wicket-core-tests/src/test/java/org/apache/wicket/markup/html/internal/SecuredContainer_13.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup.html.internal;
import org.apache.wicket.markup.html.WebMarkupContainer;
/** */
public class SecuredContainer_13 extends WebMarkupContainer
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*
* @param id
*/
public SecuredContainer_13(String id)
{
super(id);
}
}
|
apache/wicket | 1,144 | wicket-core-tests/src/test/java/org/apache/wicket/markup/html/link/AutolinkPage_6.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup.html.link;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
public class AutolinkPage_6 extends WebPage {
/**
*
*/
private static final long serialVersionUID = 7778422734672899670L;
public AutolinkPage_6() {
add(new Label("label","label"));
}
}
|
apache/xmlgraphics-batik | 1,161 | batik-swing/src/main/java/org/apache/batik/swing/gvt/Overlay.java | /*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR 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.batik.swing.gvt;
import java.awt.Graphics;
/**
* This interface represents an object painted over the GVT rendering
* in a JGVTComponent.
*
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
* @version $Id$
*/
public interface Overlay {
/**
* Paints this overlay.
*/
void paint(Graphics g);
}
|
google/binnavi | 1,143 | src/main/java/com/google/security/zynamics/binnavi/Gui/Debug/RegisterPanel/IDataEnteredListener.java | // Copyright 2011-2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.binnavi.Gui.Debug.RegisterPanel;
import java.math.BigInteger;
/**
* Interface for classes that want to be notified when the user manually changed registers.
*/
public interface IDataEnteredListener {
/**
* Invoked after the value of a register changed.
*
* @param index Index of the register that changed.
* @param previousValue Previous value of the register.
* @param newValue New value of the register.
*/
void registerChanged(int index, BigInteger previousValue, BigInteger newValue);
}
|
google/binnavi | 1,158 | src/main/java/com/google/security/zynamics/binnavi/ZyGraph/Updaters/INodeUpdater.java | // Copyright 2011-2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.binnavi.ZyGraph.Updaters;
import com.google.security.zynamics.binnavi.Gui.GraphWindows.CGraphModel;
import com.google.security.zynamics.binnavi.yfileswrap.zygraph.NaviNode;
/**
* Interface that must be implemented by objects that want to update graph nodes.
*/
public interface INodeUpdater {
/**
* Asks an updater to consider attaching itself to a given node.
*
* @param model The model the node belongs to.
* @param node The node that requires an updater.
*/
void visit(CGraphModel model, NaviNode node);
}
|
google/closure-templates | 1,170 | java/src/com/google/template/soy/jbcsrc/api/SoyVeMetadata.java | /*
* Copyright 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.template.soy.jbcsrc.api;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* A marker annotation for Soy generated VE metadata classes.
*
* <p>This is useful for projects (like Search) who have complex class loading requirements and need
* to be able to find the VE metadata classes so they can put them in the correct class loader.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface SoyVeMetadata {}
|
google/elemental2 | 1,148 | samples/helloworld/java/com/google/elemental2/samples/helloworld/HelloWorld.java | /*
* Copyright 2019 Google LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.elemental2.samples.helloworld;
import static elemental2.dom.DomGlobal.document;
import static elemental2.dom.DomGlobal.window;
import jsinterop.annotations.JsType;
/** A simple hello world example. */
@JsType
public class HelloWorld {
public static void printHelloWorld() {
window.addEventListener("load", e -> addHellowWorld());
}
private static void addHellowWorld() {
document
.body
.appendChild(document.createElement("div"))
.appendChild(document.createTextNode("Hello from Java!"));
}
}
|
google/error-prone | 1,158 | check_api/src/main/java/com/google/errorprone/matchers/method/MatchState.java | /*
* Copyright 2015 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.matchers.method;
import com.sun.tools.javac.code.Symbol.MethodSymbol;
import com.sun.tools.javac.code.Type;
import java.util.List;
/** The state that is propagated across a match operation. */
public interface MatchState {
/** The type of the class in which a member method or constructor is declared. */
Type ownerType();
/** The method being matched. */
MethodSymbol sym();
/** The method's formal parameter types. */
default List<Type> paramTypes() {
return sym().type.getParameterTypes();
}
}
|
google/nomulus | 1,172 | core/src/main/java/google/registry/module/tools/ToolsRequestHandler.java | // Copyright 2017 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.module.tools;
import google.registry.request.RequestHandler;
import google.registry.request.auth.RequestAuthenticator;
import jakarta.inject.Inject;
import jakarta.inject.Provider;
/** Request handler for the tools module. */
public class ToolsRequestHandler extends RequestHandler<ToolsRequestComponent> {
@Inject ToolsRequestHandler(
Provider<ToolsRequestComponent.Builder> componentBuilderProvider,
RequestAuthenticator requestAuthenticator) {
super(componentBuilderProvider, requestAuthenticator);
}
}
|
google/physical-web | 1,151 | android/PhysicalWeb/app/src/main/java/org/physical_web/demos/Demo.java | /*
* Copyright 2016 Google Inc. 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 org.physical_web.demos;
/**
* Provides an interface for Demos to be added to the demo section.
*/
public interface Demo {
/**
* @return The summary of the demo.
*/
String getSummary();
/**
* @return The title of the demo.
*/
String getTitle();
/**
* Checks to see if the demo is running.
* @return True if the demo has been started and not stopped.
*/
boolean isDemoStarted();
/**
* Starts the demo.
*/
void startDemo();
/**
* Stops the demo.
*/
void stopDemo();
}
|
google/santa-tracker-android | 1,125 | doodles-lib/src/main/java/com/google/android/apps/santatracker/doodles/shared/animation/Sprites.java | /*
* Copyright 2019. Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.apps.santatracker.doodles.shared.animation;
import com.google.android.apps.santatracker.doodles.R;
/** Frame data for all the sprites. */
public interface Sprites {
int[] debug_marker = {
R.drawable.debug_marker,
};
int[] tutoappear_new = {
R.drawable.tutoappear_new_00,
R.drawable.tutoappear_new_01,
R.drawable.tutoappear_new_02,
R.drawable.tutoappear_new_03,
R.drawable.tutoappear_new_04,
R.drawable.tutoappear_new_05,
};
}
|
googlearchive/caja | 1,183 | src/com/google/caja/reporting/MessageTypeInt.java | // Copyright (C) 2006 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.caja.reporting;
import java.io.IOException;
/**
* A type of {@link Message message} that knows how to display messages of its
* type.
*
* @author mikesamuel@gmail.com
*/
public interface MessageTypeInt {
/** Render the message and its parts to out using cues from context. */
void format(MessagePart[] parts, MessageContext context, Appendable out)
throws IOException;
/** The default level of messages of this type. */
MessageLevel getLevel();
/** The number of parts required by {@link #format}. */
int getParamCount();
String name();
}
|
googlearchive/science-journal | 1,102 | OpenScienceJournal/whistlepunk_library/src/main/java/com/google/android/apps/forscience/whistlepunk/NotificationChannels.java | /*
* Copyright 2017 Google Inc. 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 com.google.android.apps.forscience.whistlepunk;
/**
* Channel Names for notifications. Android docs say that this value can be truncated if it is "too
* long", but does not specify a limit. These values are namespaced to our package.
*/
public class NotificationChannels {
public static final String NOTIFICATION_CHANNEL = "science_journal_notification_channel";
public static final String SAVE_TO_DEVICE_CHANNEL = "science_journal_save_to_device_channel";
}
|
googlefonts/sfntly | 1,154 | java/src/com/google/typography/font/sfntly/table/opentype/SubstSubtable.java | package com.google.typography.font.sfntly.table.opentype;
import com.google.typography.font.sfntly.data.ReadableFontData;
import com.google.typography.font.sfntly.table.opentype.component.HeaderTable;
public abstract class SubstSubtable extends HeaderTable {
private static final int FIELD_COUNT = 1;
private static final int FORMAT_INDEX = 0;
private static final int FORMAT_DEFAULT = 0;
public final int format;
protected SubstSubtable(ReadableFontData data, int base, boolean dataIsCanonical) {
super(data, base, dataIsCanonical);
format = getField(FORMAT_INDEX);
}
@Override
public int fieldCount() {
return FIELD_COUNT;
}
public abstract static class Builder<T extends SubstSubtable> extends HeaderTable.Builder<T> {
protected int format;
protected Builder(ReadableFontData data, boolean dataIsCanonical) {
super(data);
format = getField(FORMAT_INDEX);
}
protected Builder() {
super();
}
@Override
protected void initFields() {
setField(FORMAT_INDEX, FORMAT_DEFAULT);
}
@Override
public int fieldCount() {
return FIELD_COUNT;
}
}
}
|
hibernate/hibernate-ogm | 1,078 | mongodb/src/test/java/org/hibernate/ogm/datastore/mongodb/test/options/writeconcern/GolfCourse.java | /*
* Hibernate OGM, Domain model persistence for NoSQL datastores
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.ogm.datastore.mongodb.test.options.writeconcern;
import javax.persistence.Entity;
import javax.persistence.Id;
import org.hibernate.ogm.datastore.mongodb.options.WriteConcern;
import org.hibernate.ogm.datastore.mongodb.options.WriteConcernType;
/**
* @author Gunnar Morling
*/
@Entity
@WriteConcern(WriteConcernType.MAJORITY)
public class GolfCourse {
private long id;
private String name;
public GolfCourse(long id, String name) {
this.id = id;
this.name = name;
}
public GolfCourse() {
}
@Id
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
return "GolfCourse [id=" + id + ", name=" + name + "]";
}
}
|
hibernate/hibernate-orm | 1,037 | hibernate-core/src/test/java/org/hibernate/orm/test/legacy/X.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.legacy;
import java.util.ArrayList;
import java.util.List;
public class X {
private long id;
private Y y;
private List xxs = new ArrayList();
/**
* Returns the id.
* @return long
*/
public long getId() {
return id;
}
/**
* Returns the y.
* @return Y
*/
public Y getY() {
return y;
}
/**
* Sets the id.
* @param id The id to set
*/
public void setId(long id) {
this.id = id;
}
/**
* Sets the y.
* @param y The y to set
*/
public void setY(Y y) {
this.y = y;
}
public List getXxs() {
return xxs;
}
public void setXxs(List xxs) {
this.xxs = xxs;
}
public static class XX {
private Long id;
private X x;
private XX() {}
public XX(X x) {
this.x = x;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public X getX() {
return x;
}
public void setX(X x) {
this.x = x;
}
}
}
|
hibernate/hibernate-orm | 1,081 | hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/registry/classloading/LeakUtilitySelfTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.bootstrap.registry.classloading;
import org.junit.Assert;
import org.junit.Test;
/**
* Tests the testing utility PhantomReferenceLeakDetector
*/
public class LeakUtilitySelfTest {
@Test
public void verifyLeakUtility() {
PhantomReferenceLeakDetector.assertActionNotLeaking( LeakUtilitySelfTest::notALeak );
}
@Test
public void verifyLeakUtilitySpotsLeak() {
Assert.assertFalse( PhantomReferenceLeakDetector.verifyActionNotLeaking( LeakUtilitySelfTest::troubleSomeLeak, 2, 1 ) );
}
private static SomeSpecialObject notALeak() {
return new SomeSpecialObject();
}
private static SomeSpecialObject troubleSomeLeak() {
final SomeSpecialObject specialThing = new SomeSpecialObject();
tl.set( specialThing );
return specialThing;
}
private static final ThreadLocal tl = new ThreadLocal<>();
static class SomeSpecialObject {
@Override
public String toString() {
return "this is some hypothetical critical object";
}
}
}
|
hibernate/hibernate-orm | 1,081 | hibernate-core/src/test/java/org/hibernate/orm/test/mapping/usertypes/xmlmapping/Account.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.mapping.usertypes.xmlmapping;
import org.hibernate.annotations.Type;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
@Entity
public class Account {
private Long id;
private String name;
private CurrencyUnit currency;
public Account() {
}
public Account(String name, CurrencyUnit currency) {
this.name = name;
this.currency = currency;
}
@Id
@GeneratedValue( strategy = GenerationType.AUTO )
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Type( value = CurrencyUnitUserType.class )
@Column( length = 3 )
public CurrencyUnit getCurrency() {
return currency;
}
public void setCurrency(CurrencyUnit currency) {
this.currency = currency;
}
}
|
hibernate/hibernate-orm | 1,094 | hibernate-core/src/main/java/org/hibernate/type/EmbeddedComponentType.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.type;
import java.lang.reflect.Method;
import org.hibernate.mapping.Component;
/**
* @author Gavin King
*/
public class EmbeddedComponentType extends ComponentType {
public EmbeddedComponentType(Component component, int[] originalPropertyOrder) {
super( component, originalPropertyOrder );
}
@Override
public boolean isEmbedded() {
return true;
}
@Override
public boolean isMethodOf(Method method) {
if ( mappingModelPart() == null ) {
throw new IllegalStateException( "EmbeddableValuedModelPart not known yet" );
}
final var embeddable = mappingModelPart().getEmbeddableTypeDescriptor();
for ( int i = 0; i < embeddable.getNumberOfAttributeMappings(); i++ ) {
final var attributeMapping = embeddable.getAttributeMapping( i );
final var getterMethod =
attributeMapping.getPropertyAccess()
.getGetter().getMethod();
if ( getterMethod != null && getterMethod.equals( method ) ) {
return true;
}
}
return false;
}
}
|
hibernate/hibernate-search | 1,076 | documentation/src/test/java/org/hibernate/search/documentation/mapper/orm/entrypoints/Associate.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.documentation.mapper.orm.entrypoints;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;
import org.hibernate.search.engine.backend.types.Projectable;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed;
@Entity
@Indexed
public class Associate implements Person {
@Id
private Integer id;
@FullTextField(analyzer = "name", projectable = Projectable.YES)
private String name;
@ManyToOne
private Manager manager;
public Associate() {
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Override
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Manager getManager() {
return manager;
}
public void setManager(Manager manager) {
this.manager = manager;
}
}
|
hibernate/hibernate-search | 1,087 | integrationtest/showcase/library/src/test/java/org/hibernate/search/integrationtest/showcase/library/AbstractLibraryShowcaseSearchIT.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.integrationtest.showcase.library;
import static org.hibernate.search.integrationtest.showcase.library.TestActiveProfilesResolver.configuredBackend;
import org.hibernate.search.util.impl.integrationtest.backend.elasticsearch.SearchBackendContainer;
import org.hibernate.search.util.impl.integrationtest.mapper.orm.DatabaseContainer;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.DynamicPropertyRegistry;
import org.springframework.test.context.DynamicPropertySource;
@SpringBootTest
abstract class AbstractLibraryShowcaseSearchIT {
@DynamicPropertySource
static void configureProperties(DynamicPropertyRegistry registry) {
DatabaseContainer.configuration().addAsSpring( (key, value) -> registry.add( key, () -> value ) );
if ( "elasticsearch".equals( configuredBackend() ) ) {
registry.add( "spring.jpa.properties.hibernate.search.backend.uris", SearchBackendContainer::connectionUrl );
}
}
}
|
openjdk/jdk8 | 1,154 | langtools/test/tools/javac/diags/examples/AlreadyDefinedStaticImport/AlreadDefinedStaticImport.java | /*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.already.defined.static.single.import
import p.E1.A;
import static p.E2.A;
|
openjdk/jdk8 | 1,179 | langtools/test/tools/javac/diags/examples/EnumCantBeInstantiated.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.enum.cant.be.instantiated
class EnumCantBeInstantiated {
enum E { A, B, C }
E e = new E("a");
}
|
openjdk/jdk8 | 1,183 | langtools/test/tools/javac/diags/examples/NonStaticCantBeRef.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.non-static.cant.be.ref
class NonStaticCantBeRef {
int i;
static int m() {
return i;
}
}
|
openjdk/jdk8 | 1,188 | langtools/test/tools/javac/diags/examples/DoesNotOverride.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.does.not.override.abstract
abstract class Base {
abstract void m();
}
class DoesNotOverride extends Base { }
|
openjdk/jdk8 | 1,189 | langtools/test/com/sun/javadoc/testLambdaFeature/pkg/A.java | /*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
@FunctionalInterface
public interface A {
public void method1();
public default void defaultMethod() { }
}
|
openjdk/jdk8 | 1,189 | langtools/test/tools/javac/multicatch/model/UnionTypeInfo.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Used by ModelChecker to validate the modeling information of a union type.
*/
@interface UnionTypeInfo {
String[] value();
}
|
openjdk/jdk8 | 1,190 | langtools/test/com/sun/javadoc/5093723/UndocumentedClass.java | /*
* Copyright 2009 Google, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
class UndocumentedClass {
void method() {}
public void publicMethod() {}
protected void protectedMethod() {}
private void privateMethod() {}
}
|
openjdk/jtreg | 1,206 | test/share/basic/compile/dir/DirTest.java | /*
* Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package dir;
public class DirTest {
public static void main(String [] args) {
System.out.println("Correct file compiled/run");
}
}
|
openjdk/skara | 1,187 | forge/src/main/java/org/openjdk/skara/forge/MemberState.java | /*
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.skara.forge;
/**
* Forge group member states
*/
public enum MemberState {
ACTIVE,
PENDING,
MISSING
}
|
openjdk/skara | 1,194 | args/src/main/java/org/openjdk/skara/args/CommandCtor.java | /*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.skara.args;
public interface CommandCtor<T extends Command> {
T construct(String name, String helpText, Main main);
}
|
oracle/coherence | 1,150 | prj/coherence-core/src/main/java/com/tangosol/dev/assembler/Checkcast.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.dev.assembler;
import java.io.IOException;
import java.io.DataInput;
import java.io.DataOutput;
/**
* The CHECKCAST op compares the class of the reference on the stack to the
* specified ClassConstant.
* <p><code><pre>
* JASM op : CHECKCAST (0xc0)
* JVM byte code(s): CHECKCAST (0xc0)
* Details :
* </pre></code>
*
* @version 0.50, 06/15/98, assembler/dis-assembler
* @author Cameron Purdy
*/
public class Checkcast extends OpConst implements Constants
{
// ----- constructors ---------------------------------------------------
/**
* Construct the op.
*
* @param constant the ClassConstant to cast to
*/
public Checkcast(ClassConstant constant)
{
super(CHECKCAST, constant);
}
// ----- data members ---------------------------------------------------
/**
* The name of this class.
*/
private static final String CLASS = "Checkcast";
}
|
oracle/coherence | 1,160 | prj/coherence-core/src/main/java/com/tangosol/config/xml/AttributeProcessor.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.config.xml;
import com.tangosol.config.ConfigurationException;
import com.tangosol.run.xml.XmlAttribute;
/**
* An {@link AttributeProcessor} is responsible for processing {@link XmlAttribute} content
* to return a strongly-typed value.
*
* @param <T> the type of value that will be returned by the {@link AttributeProcessor}
*
* @author bo 2011.06.14
* @since Coherence 12.1.2
*/
public interface AttributeProcessor<T>
{
/**
* Process an {@link XmlAttribute} and return a specific type of value.
*
* @param context the {@link ProcessingContext} in which the {@link XmlAttribute} is being processed
* @param attribute the {@link XmlAttribute} to be processed
*
* @throws ConfigurationException when a configuration problem was encountered
*
* @return a value of type T
*/
public T process(ProcessingContext context, XmlAttribute attribute)
throws ConfigurationException;
}
|
oracle/fastr | 1,166 | com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/common/package-info.java | /*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 3 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 3 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Classes that are common to all FFI implementations.
*/
package com.oracle.truffle.r.ffi.impl.common;
|
apache/commons-jexl | 1,175 | src/main/java/org/apache/commons/jexl3/parser/ASTMapLiteral.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.jexl3.parser;
public final class ASTMapLiteral extends ExtensibleNode {
/**
*/
private static final long serialVersionUID = 1L;
ASTMapLiteral(final int id) {
super(id);
}
@Override
public Object jjtAccept(final ParserVisitor visitor, final Object data) {
return visitor.visit(this, data);
}
}
|
apache/commons-math | 1,145 | commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/function/Add.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.commons.math4.legacy.analysis.function;
import org.apache.commons.math4.legacy.analysis.BivariateFunction;
/**
* Add the two operands.
*
* @since 3.0
*/
public class Add implements BivariateFunction {
/** {@inheritDoc} */
@Override
public double value(double x, double y) {
return x + y;
}
}
|
apache/commons-vfs | 1,150 | commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/vcs/VcsModifyListener.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.vfs2.operations.vcs;
/**
* Handles VFS file modifications.
*
* @since 0.1
*/
public interface VcsModifyListener {
/**
* Handles a modified event.
*
* @param path The path String.
* @param contentStatus The content status.
*/
void modified(String path, VcsStatus contentStatus);
}
|
apache/ctakes | 1,161 | ctakes-utils/src/main/java/org/apache/ctakes/utils/distsem/WordVectorReader.java | package org.apache.ctakes.utils.distsem;
import java.io.*;
import java.util.Scanner;
public class WordVectorReader {
private WordEmbeddings embeddings = null;
private int dimensionality = 0;
private int numWords = 0;
public WordVectorReader(InputStream in) throws IOException{
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
String line = reader.readLine();
Scanner scanner = new Scanner(line);
numWords = scanner.nextInt();
dimensionality = scanner.nextInt();
scanner.close();
embeddings = new WordEmbeddings(dimensionality);
while((line = reader.readLine()) != null){
embeddings.add(line.trim());
}
reader.close();
}
public WordEmbeddings getEmbeddings(){
return this.embeddings;
}
public static WordEmbeddings getEmbeddings(String fn) throws IOException{
WordVectorReader reader = new WordVectorReader(new FileInputStream(fn));
return reader.getEmbeddings();
}
public static WordEmbeddings getEmbeddings(InputStream in) throws IOException {
WordVectorReader reader = new WordVectorReader(in);
return reader.getEmbeddings();
}
}
|
apache/cxf | 1,162 | rt/features/throttling/src/main/java/org/apache/cxf/throttling/ThrottlingCounter.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.throttling;
import java.util.concurrent.atomic.AtomicInteger;
public class ThrottlingCounter {
private static final AtomicInteger COUNTER = new AtomicInteger();
public int incrementAndGet() {
return COUNTER.incrementAndGet();
}
public int decrementAndGet() {
return COUNTER.decrementAndGet();
}
}
|
apache/cxf | 1,163 | systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/DocumentResourceImpl.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.systest.jaxrs;
import java.util.Collections;
import java.util.Set;
public class DocumentResourceImpl implements DocumentResource<String, Document<String>> {
@Override
public Set<Document<String>> getDocuments(String id) {
Document<String> d = new Document<>(id);
return Collections.singleton(d);
}
}
|
apache/cxf | 1,171 | rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws22/JAXWS22Invoker.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.jaxws22;
import org.apache.cxf.jaxws.JAXWSMethodInvoker;
import org.apache.cxf.service.invoker.Invoker;
/**
* @deprecated - functionality moved into superclass
*/
@Deprecated
public class JAXWS22Invoker extends JAXWSMethodInvoker implements Invoker {
public JAXWS22Invoker(jakarta.xml.ws.spi.Invoker inv) {
super(inv);
}
}
|
apache/datafusion-comet | 1,169 | common/src/main/java/org/apache/comet/ParquetRuntimeException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.comet;
/** The parent class for the subset of Comet runtime exceptions related to Parquet. */
public class ParquetRuntimeException extends CometRuntimeException {
public ParquetRuntimeException(String message) {
super(message);
}
public ParquetRuntimeException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/deltaspike | 1,144 | deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/message/MinimalMessages.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.test.core.api.message;
import org.apache.deltaspike.core.api.message.MessageBundle;
import org.apache.deltaspike.core.api.message.MessageContextConfig;
@MessageBundle
@MessageContextConfig(localeResolver = FixedEnglishLocalResolver.class)
public interface MinimalMessages
{
String sayHello(String name);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.