repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
openjdk/jdk8
1,101
langtools/test/tools/javadoc/dupOk/sp1/p/A.java
/* * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package p; public class A { public int x; }
openjdk/jdk8
1,101
langtools/test/tools/javadoc/dupOk/sp2/p/B.java
/* * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package p; public class B { public int x; }
openjdk/jdk8
1,106
langtools/test/tools/javac/6902720/E1.java
/* * Copyright (c) 2009, 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. */ enum E1 { A, B { }, C { void m() { } }; }
apache/commons-ognl
1,061
src/test/java/org/apache/commons/ognl/test/objects/SimpleEnum.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.ognl.test.objects; /** */ public enum SimpleEnum { ONE( 1 ); private final int _value; SimpleEnum( int value ) { _value = value; } public int getValue() { return _value; } }
apache/curator
1,057
curator-framework/src/main/java/org/apache/curator/framework/api/ReconfigBuilderMain.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.curator.framework.api; public interface ReconfigBuilderMain extends Joinable<LeaveStatConfigEnsembleable>, Leaveable<JoinStatConfigEnsembleable>, Membersable<StatConfigureEnsembleable> {}
apache/derby
1,042
java/org.apache.derby.engine/org/apache/derby/impl/store/replication/buffer/LogBufferFullException.java
/* Derby - Class org.apache.derby.impl.store.replication.buffer.LogBufferFullException Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.derby.impl.store.replication.buffer; public class LogBufferFullException extends Exception{ public LogBufferFullException(){} }
apache/directory-fortress-core
1,057
src/main/java/org/apache/directory/fortress/core/util/PropUpdater.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.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.directory.fortress.core.util; /** * This interface is used by DAO objects that are using the GID/UID config update utility. */ public interface PropUpdater { String newValue(String value); }
apache/directory-kerby
1,056
kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1SetOf.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.asn1.type; import org.apache.kerby.asn1.UniversalTag; public class Asn1SetOf<T extends Asn1Type> extends Asn1CollectionOf<T> { public Asn1SetOf() { super(UniversalTag.SET_OF); } }
apache/doris-manager
1,026
manager/general/src/main/java/org/apache/doris/stack/exception/HdfsUrlException.java
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. package org.apache.doris.stack.exception; public class HdfsUrlException extends Exception { public static final String MESSAGE = "HDFS集群URL错误,请检查后重新输入"; public HdfsUrlException() { super(MESSAGE); } }
apache/drill
1,070
drill-yarn/src/main/java/org/apache/drill/yarn/appMaster/AMException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.drill.yarn.appMaster; public class AMException extends Exception { private static final long serialVersionUID = 1L; public AMException(String msg) { super(msg); } public AMException(String msg, Exception e) { super(msg, e); } }
apache/dubbo
1,035
dubbo-plugin/dubbo-rest-openapi/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/openapi/ProtoEncoder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.rpc.protocol.tri.rest.openapi; import org.apache.dubbo.rpc.protocol.tri.rest.openapi.model.OpenAPI; public final class ProtoEncoder { public String encode(OpenAPI openAPI) { return ""; } }
apache/dubbo
1,069
dubbo-common/src/test/java/org/apache/dubbo/common/utils/TimeUtilsTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.common.utils; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertTrue; class TimeUtilsTest { @Test void testCurrentTimeMillis() { assertTrue(0 < TimeUtils.currentTimeMillis()); } }
apache/felix-dev
1,050
healthcheck/annotation/src/main/java/org/apache/felix/hc/annotation/HealthCheckMBean.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The SF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ package org.apache.felix.hc.annotation; import org.osgi.service.component.annotations.ComponentPropertyType; @ComponentPropertyType public @interface HealthCheckMBean { public static final String PREFIX_ = "hc.mbean."; String name(); }
apache/felix-dev
1,052
http/base/src/main/java/org/apache/felix/http/base/internal/registry/ServletResolution.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.felix.http.base.internal.registry; import org.apache.felix.http.base.internal.handler.ServletHandler; public class ServletResolution { public ServletHandler handler; public PerContextHandlerRegistry handlerRegistry; }
apache/fesod
1,071
fesod/src/main/java/org/apache/fesod/excel/metadata/Cell.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fesod.excel.metadata; /** * Cell * * **/ public interface Cell { /** * Row index * * @return */ Integer getRowIndex(); /** * Column index * * @return */ Integer getColumnIndex(); }
apache/fineract
1,030
fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanStatusChangedEvent.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fineract.test.messaging.event.loan; public class LoanStatusChangedEvent extends AbstractLoanEvent { @Override public String getEventName() { return "LoanStatusChangedBusinessEvent"; } }
apache/flink-statefun
1,049
statefun-sdk-embedded/src/main/java/org/apache/flink/statefun/sdk/metrics/Metrics.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.statefun.sdk.metrics; public interface Metrics { /** * Retrieves (or creates) a counter metric with this name. * * @param name a metric name * @return a counter. */ Counter counter(String name); }
apache/flink
1,052
flink-table/flink-table-common/src/main/java/org/apache/flink/table/expressions/TableSymbol.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.table.expressions; import org.apache.flink.annotation.PublicEvolving; /** The base interface for all table symbols. Symbols might be time units or other enumerations. */ @PublicEvolving public interface TableSymbol {}
apache/freemarker
1,064
freemarker-core/src/main/java/freemarker/template/SuppressFBWarnings.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package freemarker.template; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @Retention(RetentionPolicy.CLASS) @interface SuppressFBWarnings { String[] value() default {}; String justification() default ""; }
apache/geaflow
1,043
geaflow/geaflow-core/geaflow-core-common/src/main/java/org/apache/geaflow/selector/ISelector.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.geaflow.selector; import java.io.Serializable; public interface ISelector extends Serializable { /** * Compute the channel list for partitionKey. */ <T> int[] selectChannels(T partitionKey); }
apache/gobblin
1,047
gobblin-compaction/src/main/java/org/apache/gobblin/compaction/suite/CompactionSuiteFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.gobblin.compaction.suite; import org.apache.gobblin.configuration.State; /** * Build {@link CompactionSuite} for a job execution */ public interface CompactionSuiteFactory { CompactionSuite createSuite (State state); }
apache/gobblin
1,049
gobblin-core/src/main/java/org/apache/gobblin/writer/objectstore/response/DeleteResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.gobblin.writer.objectstore.response; import lombok.AllArgsConstructor; import lombok.Getter; /** * Response of a delete operation */ @AllArgsConstructor @Getter public class DeleteResponse { private final int statusCode; }
apache/grails-core
1,047
grails-databinding-core/src/main/groovy/grails/databinding/converters/ValueConverter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.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 grails.databinding.converters; /** * @author Jeff Brown * @since 3.0 */ public interface ValueConverter { boolean canConvert(Object value); Object convert(Object value); Class<?> getTargetType(); }
apache/groovy
1,112
src/test/groovy/bugs/G3839A4.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package bugs; import org.codehaus.groovy.transform.GroovyASTTransformationClass; // add ast transforms both by class names and classes, which should result in an error @GroovyASTTransformationClass(value="bugs.G3839Transform2", classes=G3839Transform3.class) public @interface G3839A4 {}
apache/harmony
1,042
classlib/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/TestMain.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.harmony.tests.java.lang.instrument; /* * For instrument test only */ public class TestMain { public static void main(String[] args) { // do nothing, only as execuable main class return; } }
apache/harmony
1,052
classlib/modules/awt/src/main/java/common/org/apache/harmony/awt/state/CheckboxState.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT 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 Pavel Dolgov */ package org.apache.harmony.awt.state; /** * State of Checkbox component */ public interface CheckboxState extends TextState { boolean isChecked(); boolean isInGroup(); boolean isPressed(); }
apache/hive
1,026
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/common/metrics/metrics2/MetricsReporting.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hive.common.metrics.metrics2; /** * Reporting options for org.apache.hadoop.hive.common.metrics.metrics2.Metrics. */ public enum MetricsReporting { JMX, CONSOLE, JSON_FILE, HADOOP2 }
apache/hive
1,038
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DeadlineException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hive.metastore; /** * Thrown when a long running method timeout is checked. */ public class DeadlineException extends Exception { public DeadlineException(String message) { super(message); } }
apache/hive
1,078
beeline/src/java/org/apache/hive/beeline/BooleanCompleter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hive.beeline; import org.apache.hive.common.util.MatchingStringsCompleter; /** * JLine completer boolean value (true/false) */ class BooleanCompleter extends MatchingStringsCompleter { public BooleanCompleter(){ super("true", "false"); } }
apache/hudi
1,039
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/versioning/DefaultInstantFileNameGenerator.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hudi.common.table.timeline.versioning; import org.apache.hudi.common.table.timeline.versioning.v2.InstantFileNameGeneratorV2; public class DefaultInstantFileNameGenerator extends InstantFileNameGeneratorV2 { }
apache/hudi
1,059
hudi-common/src/main/java/org/apache/hudi/metrics/InMemoryMetricsReporter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hudi.metrics; /** * Used for testing. */ public class InMemoryMetricsReporter extends MetricsReporter { @Override public void start() { } @Override public void report() { } @Override public void stop() { } }
apache/hudi
1,061
hudi-common/src/main/java/org/apache/hudi/exception/HoodieNotSupportedException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hudi.exception; /** * An exception throws when meet not supported operation. */ public class HoodieNotSupportedException extends HoodieException { public HoodieNotSupportedException(String errorMsg) { super(errorMsg); } }
apache/hudi
1,063
hudi-common/src/main/java/org/apache/hudi/common/HoodieSchemaNotFoundException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.hudi.common; import org.apache.hudi.internal.schema.HoodieSchemaException; public class HoodieSchemaNotFoundException extends HoodieSchemaException { public HoodieSchemaNotFoundException(String message) { super(message); } }
apache/ignite-3
1,047
modules/cli/src/main/java/org/apache/ignite/internal/cli/core/exception/ConnectionException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ignite.internal.cli.core.exception; /** Connection exception. */ public class ConnectionException extends IgniteCliException { /** Constructor. */ public ConnectionException(String msg) { super(msg); } }
apache/ignite-3
1,057
modules/cli/src/main/java/org/apache/ignite/internal/cli/event/EventPublisher.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ignite.internal.cli.event; /** * Publish events. */ public interface EventPublisher { /** * Publish event to the registered event listeners. * * @param event event to fire */ void publish(Event event); }
apache/ignite
1,061
modules/core/src/main/java/org/apache/ignite/client/events/HandshakeStartEvent.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ignite.client.events; /** */ public class HandshakeStartEvent extends ConnectionEvent { /** * @param conn Connection description. */ public HandshakeStartEvent(ConnectionDescription conn) { super(conn); } }
apache/incubator-hugegraph-computer
1,031
computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/IOMode.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with this * work for additional information regarding copyright ownership. The ASF * licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package org.apache.hugegraph.computer.core.network; /** * Selector for which form of low-level IO we should use. * NIO is always available, while EPOLL is only available on Linux. */ public enum IOMode { NIO, EPOLL }
apache/incubator-kie-drools
1,052
kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/api/ContextEntry.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.dmn.model.api; public interface ContextEntry extends DMNElement { InformationItem getVariable(); void setVariable(InformationItem value); Expression getExpression(); void setExpression(Expression value); }
apache/incubator-kie-drools
1,056
kie-api/src/main/java/org/kie/api/internal/runtime/KieRuntimeService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.api.internal.runtime; import org.kie.api.KieBase; import org.kie.api.internal.utils.KieService; public interface KieRuntimeService<T> extends KieService { T newKieRuntime(KieBase kieBase); Class getServiceInterface(); }
apache/incubator-retired-wave
1,048
wave/src/main/java/org/waveprotocol/wave/client/scheduler/knobs/KnobsView.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.waveprotocol.wave.client.scheduler.knobs; /** * UI component for scheduler knobs. This component serves as a factory for * creating per-level UI components. * */ public interface KnobsView extends KnobView.Factory { }
apache/incubator-retired-wave
1,050
wave/src/test/java/org/waveprotocol/wave/client/wavepanel/EmptyTest.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.waveprotocol.wave.client.wavepanel; import junit.framework.TestCase; /** * Empty test to make the genrules work. * */ public final class EmptyTest extends TestCase { public void testNothing() { Math.random(); } }
apache/inlong
1,037
inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/converter/DoubleConverter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.sdk.transform.process.converter; public class DoubleConverter implements TypeConverter { @Override public Object convert(String value) throws Exception { return Double.parseDouble(value); } }
apache/inlong
1,044
inlong-audit/audit-service/src/main/java/org/apache/inlong/audit/service/entities/JdbcConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.audit.service.entities; import lombok.AllArgsConstructor; import lombok.Data; @Data @AllArgsConstructor public class JdbcConfig { String driverClass; String JdbcUrl; String userName; String password; }
apache/inlong
1,057
inlong-sdk/sort-sdk/src/main/java/org/apache/inlong/sdk/sort/api/MessageInterceptor.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.sdk.sort.api; import org.apache.inlong.sdk.sort.entity.MessageRecord; import java.io.Serializable; public interface MessageInterceptor extends Serializable { void process(ClientContext context, final MessageRecord message); }
apache/iotdb
1,044
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/flush/FlushStatus.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iotdb.db.storageengine.dataregion.flush; public enum FlushStatus { /** MemTable is still working */ WORKING, /** MemTable flush is flushing */ FLUSHING, /** MemTable flush has been flushed */ FLUSHED }
apache/jackrabbit
1,068
jackrabbit-spi2jcr/src/test/java/org/apache/jackrabbit/test/TestAll.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.TestCase; import junit.framework.Test; import org.apache.jackrabbit.test.JCRTestSuite; public class TestAll extends TestCase { public static Test suite() { return new JCRTestSuite(); } }
apache/jena
1,070
jena-core/src/main/java/org/apache/jena/shared/NoWriterForLangException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.shared; /** Exception to throw if there is no writer for the specified language. */ public class NoWriterForLangException extends JenaException { public NoWriterForLangException( String lang ) { super( lang ); } }
apache/jmeter
1,056
src/components/src/main/java/org/apache/jmeter/modifiers/JSR223PreProcessorBeanInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jmeter.modifiers; import org.apache.jmeter.util.JSR223BeanInfoSupport; public class JSR223PreProcessorBeanInfo extends JSR223BeanInfoSupport { public JSR223PreProcessorBeanInfo() { super(JSR223PreProcessor.class); } }
apache/kylin
1,050
src/common-service/src/main/java/org/apache/kylin/rest/request/ShardNumConfigRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.request; import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; @Data public class ShardNumConfigRequest { @JsonProperty("col_to_num") private Map colToNum; }
apache/kylin
1,066
src/kylin-it/src/test/java/org/apache/kylin/query/ICompareQueryTranslator.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.query; import java.io.File; public interface ICompareQueryTranslator { /** * * @param f origin query file * @return the compare query to submit to standard DB like H2 */ public String transform(File f); }
apache/lens
1,076
lens-cube/src/main/java/org/apache/lens/cube/parse/QueryWriter.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.lens.cube.parse; import org.apache.lens.server.api.error.LensException; public interface QueryWriter { /** * Get the HQL query. * * @return query string * @throws LensException */ String toHQL() throws LensException; }
apache/linkis
1,039
linkis-public-enhancements/linkis-bml-server/src/main/java/org/apache/linkis/bml/LinkisBMLApplication.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.linkis.bml; import org.apache.linkis.LinkisBaseServerApp; public class LinkisBMLApplication { public static void main(String[] args) throws ReflectiveOperationException { LinkisBaseServerApp.main(args); } }
apache/logging-log4j2
1,043
log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/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. */ /** * Configuration Builder Implementation. * * @since 2.4 */ @Export @Version("2.25.0") package org.apache.logging.log4j.core.config.builder.impl; import org.osgi.annotation.bundle.Export; import org.osgi.annotation.versioning.Version;
apache/logging-log4j2
1,050
log4j-1.2-api/src/main/java/org/apache/log4j/builders/rolling/TriggeringPolicyBuilder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.log4j.builders.rolling; import org.apache.log4j.builders.Parser; import org.apache.logging.log4j.core.appender.rolling.TriggeringPolicy; public interface TriggeringPolicyBuilder extends Parser<TriggeringPolicy> { // NOP }
apache/logging-log4j2
1,051
log4j-api-java9/src/main/java/org/apache/logging/log4j/util/EnvironmentPropertySource.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.logging.log4j.util; /** * This is a dummy class and is only here to allow module-info.java to compile. It will not * be copied into the log4j-api module. */ public class EnvironmentPropertySource implements PropertySource {}
apache/lucene
1,046
lucene/test-framework/src/java/org/apache/lucene/tests/codecs/uniformsplit/sharedterms/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. */ /** * Test {@link org.apache.lucene.codecs.PostingsFormat} for testing {@link * org.apache.lucene.codecs.uniformsplit.sharedterms} with block encryption using basic ROT13. */ package org.apache.lucene.tests.codecs.uniformsplit.sharedterms;
apache/manifoldcf
1,043
connectors/documentum/build-stub/src/main/java/com/documentum/fc/client/IDfPersistentObject.java
/* $Id$ */ /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.documentum.fc.client; import com.documentum.fc.common.*; /** Stub interface to allow the connector to build fully. */ public interface IDfPersistentObject extends IDfTypedObject { public boolean isDeleted() throws DfException; }
apache/maven-checkstyle-plugin
1,072
src/it/MCHECKSTYLE-268/src/main/java/org/MyClass.java
package org; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Yada yada yada. */ public class MyClass { // This is a line that is more than 100 characters long and starts with a tab character, so it should trigger two violations using google_checks.xml public static void main(String[] args) { } }
apache/maven-indexer
1,064
indexer-core/src/main/java/org/apache/maven/index/expr/SearchTyped.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.index.expr; import org.apache.maven.index.SearchType; /** * SearchTyped is a interface that describes the wanted search type to be used. * * @author cstamas */ public interface SearchTyped { SearchType getSearchType(); }
apache/maven-plugins
1,040
maven-ejb-plugin/src/it/mejb-34-filtered/src/main/java/org/apache/maven/mejb34/Person.java
package org.apache.maven.mejb34; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ public class Person { private String name; public void setName( String name ) { this.name = name; } public String getName() { return name; } }
apache/maven-plugins
1,047
maven-site-plugin/src/it/MSITE-497/apps/app/src/main/java/org/apache/maven/App.java
package org.apache.maven; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.log4j.Logger; public class App { public static void main( String[] args ) { Logger mylogger = Logger.getLogger("MyLogger"); mylogger.info( "Hello World!" ); } }
apache/maven-plugins
1,049
maven-ant-plugin/src/it/test-custom-selector-it/src/test/java/it/BadTest.java
package it; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import junit.framework.TestCase; /** * @version $Id$ */ public class BadTest extends TestCase { public void testFail() throws Exception { fail( "This test should have been excluded." ); } }
apache/maven-shade-plugin
1,072
src/it/projects/MSHADE-316/test/src/main/java/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. */ public class Main { public SomeUsedClass essentialDependency; public static void main( String[] args ) throws ClassNotFoundException { Class.forName( "x.y.z.SomeExemptedClass" ); Class.forName( "x.y.z.AnotherExemptedClass" ); } }
apache/maven-surefire
1,050
surefire-api/src/main/java/org/apache/maven/surefire/api/stream/SegmentType.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.surefire.api.stream; /** * */ public enum SegmentType { RUN_MODE, TEST_RUN_ID, STRING_ENCODING, DATA_STRING, DATA_INTEGER, DATA_INT, DATA_BYTE, DATA_STRING_ARRAY, END_OF_FRAME }
apache/maven
1,042
impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/BuilderNotFoundException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.lifecycle.internal.builder; /** * BuilderNotFoundException */ public class BuilderNotFoundException extends Exception { public BuilderNotFoundException(String message) { super(message); } }
apache/maven
1,045
its/core-it-suite/src/test/resources/mng-3203/src/main/java/org/apache/maven/it/mng3203/App.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.it.mng3203; import java.util.ArrayList; import java.util.List; /** * Hello world! * */ public class App { public static void main(String[] args) { List<String> stuff = new ArrayList<>(); } }
apache/nifi
1,028
nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/diagnostics/DiagnosticUtils.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.diagnostics; /** */ public final class DiagnosticUtils { public static int getUtilization(final double used, final double total) { return (int) Math.round((used / total) * 100); } }
apache/openjpa
1,052
openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/DateTimeExtractPart.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.kernel.exps; /** * Date and time identifiers used by EXTRACT DATETIME PART */ public enum DateTimeExtractPart { /** * Means the date */ DATE, /** * Means the time */ TIME; }
apache/opennlp
1,066
opennlp-api/src/main/java/opennlp/tools/cmdline/params/LanguageParams.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 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.tools.cmdline.params; import opennlp.tools.cmdline.ArgumentParser.ParameterDescription; public interface LanguageParams { @ParameterDescription(valueName = "language", description = "language which is being processed.") String getLang(); }
apache/paimon-webui
1,053
paimon-web-server/src/main/java/org/apache/paimon/web/server/service/TenantService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.paimon.web.server.service; import org.apache.paimon.web.server.data.model.Tenant; import com.baomidou.mybatisplus.extension.service.IService; /** Tenant Service. */ public interface TenantService extends IService<Tenant> {}
apache/phoenix
1,069
phoenix-core-client/src/main/java/org/apache/phoenix/util/TimeKeeper.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.phoenix.util; public interface TimeKeeper { static final TimeKeeper SYSTEM = new TimeKeeper() { @Override public long getCurrentTime() { return EnvironmentEdgeManager.currentTimeMillis(); } }; long getCurrentTime(); }
apache/plc4x
1,063
plc4j/drivers/eip/src/test/java/org/apache/plc4x/java/eip/base/EIPDriverIT.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.plc4x.java.eip.base; import org.apache.plc4x.test.driver.DriverTestsuiteRunner; public class EIPDriverIT extends DriverTestsuiteRunner { public EIPDriverIT() { super("/protocols/eip/DriverTestsuite.xml", false); } }
apache/reef
1,058
lang/java/reef-wake/wake/src/main/java/org/apache/reef/wake/time/event/StopTime.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.wake.time.event; import org.apache.reef.wake.time.Time; /** * Represents the Time at which a component stops. */ public class StopTime extends Time { public StopTime(final long timestamp) { super(timestamp); } }
apache/rocketmq-connect
1,043
metric-exporter/src/main/java/org/apache/rocketmq/connect/metrics/AutoConfiguration.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.connect.metrics; import java.util.Map; /** * auto configuration */ public interface AutoConfiguration { /** * configs * * @param configs */ void config(Map<String, String> configs); }
apache/royale-compiler
1,071
swfutils/src/main/java/flash/swf/types/ColorMatrixFilter.java
/* * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package flash.swf.types; /** * A value object for color matrix filter data. */ public class ColorMatrixFilter extends Filter { public final static int ID = 6; public int getID() { return ID; } public float[] values = new float[20]; }
apache/seatunnel
1,037
seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/util/JobIdGenerator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.e2e.common.util; import java.util.concurrent.ThreadLocalRandom; public class JobIdGenerator { public static Long newJobId() { return Math.abs(ThreadLocalRandom.current().nextLong()); } }
apache/shenyu
1,025
shenyu-examples/shenyu-examples-plugin/src/main/java/org/apache/shenyu/examples/plugin/ext/ExtendsShenyuZerBean.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shenyu.examples.plugin.ext; import org.springframework.stereotype.Component; /** * ExtendsShenyuBean. */ @Component public class ExtendsShenyuZerBean { private final String name = "test"; }
apache/shiro
1,063
support/jakarta-ee/src/main/java/org/apache/shiro/ee/cdi/ShiroSessionScoped.java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shiro.ee.cdi; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import javax.inject.Scope; /** * {@code @SessionScoped} interface that works with Shiro sessions * Primarily for plugging into Shiro destruction pipeline */ @Scope @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}) @interface ShiroSessionScoped { }
apache/solr
1,092
solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.cloud; /** * Test sync phase that occurs when Leader goes down and a new Leader is elected. Implementation * moved to AbstractSyncSliceTestBase.java as it is also used by the HDFS contrib tests. */ public class SyncSliceTest extends AbstractSyncSliceTestBase {}
apache/streampipes
1,028
streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/migration/utils/DocumentKeys.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.model.connect.adapter.migration.utils; public class DocumentKeys { public static final String INTERNAL_NAME = "internalName"; public static final String ALTERNATIVES = "alternatives"; }
apache/struts
1,034
plugins/convention/src/test/java/org/apache/struts2/convention/actions/namespace2/DefaultNamespaceAction.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.namespace2; /** * <p> * This class uses the package level annotation. * </p> */ public class DefaultNamespaceAction { public String execute() { return null; } }
apache/syncope
1,041
ext/scimv2/scim-rest-api/src/main/java/org/apache/syncope/ext/scimv2/api/service/SCIMGroupService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.ext.scimv2.api.service; import jakarta.ws.rs.Path; import org.apache.syncope.ext.scimv2.api.data.SCIMGroup; @Path("v2/Groups") public interface SCIMGroupService extends SCIMResourceService<SCIMGroup> { }
apache/syncope
1,044
core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ReportExec.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.core.persistence.api.entity; public interface ReportExec extends Exec { byte[] getExecResult(); Report getReport(); void setExecResult(byte[] execResult); void setReport(Report report); }
apache/tapestry-5
1,044
tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/test/internal/ComplexAutobuildModule.java
// Copyright 2007, 2012 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.test.internal; import org.apache.tapestry5.ioc.ServiceBinder; import org.apache.tapestry5.ioc.test.StringHolder; import org.apache.tapestry5.ioc.test.StringHolderImpl; public class ComplexAutobuildModule { public static void bind(ServiceBinder binder) { binder.bind(StringHolder.class, StringHolderImpl.class).eagerLoad().scope("magic").withId("SH").preventDecoration(); } }
apache/tapestry-5
1,055
tapestry-cdi/src/test/java/org/apache/tapestry5/cdi/test/beans/Menu.java
// Copyright 2013 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.cdi.test.beans; import jakarta.inject.Inject; import org.apache.tapestry5.cdi.test.annotation.Iced; public class Menu { private Dessert dessert; @Inject void initQuery(@Iced Dessert dessert){ this.dessert = dessert; } public String getDessert(){ if(dessert !=null){ return dessert.getName(); }else{ return "no dessert"; } } }
apache/teaclave-java-tee-sdk
1,045
test/common/src/main/java/org/apache/teaclave/javasdk/test/common/EnclaveException.java
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. package org.apache.teaclave.javasdk.test.common; import org.apache.teaclave.javasdk.common.annotations.EnclaveService; @EnclaveService public interface EnclaveException { void enclaveException(String info) throws JavaEnclaveException; }
apache/teaclave-java-tee-sdk
1,051
test/common/src/main/java/org/apache/teaclave/javasdk/test/common/SHAService.java
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. package org.apache.teaclave.javasdk.test.common; import org.apache.teaclave.javasdk.common.annotations.EnclaveService; @EnclaveService public interface SHAService { String encryptPlaintext(String plaintext, String SHAType) throws Exception; }
apache/tomee
1,060
examples/mp-jwt-bean-validation-strongly-typed/src/main/java/org/superbiz/Api.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.superbiz; import org.eclipse.microprofile.auth.LoginConfig; import jakarta.ws.rs.ApplicationPath; import jakarta.ws.rs.core.Application; @ApplicationPath("/api") @LoginConfig(authMethod = "MP-JWT") public class Api extends Application { }
apache/tomee
1,070
container/openejb-jee/src/main/java/org/apache/openejb/jee/sun/Default.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.jee.sun; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") public class Default { }
apache/trafodion
1,058
core/conn/trafci/src/main/java/org/trafodion/ci/InterfaceQueryException.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 @@@ package org.trafodion.ci; public class InterfaceQueryException extends Exception { /** * */ private static final long serialVersionUID = 1L; InterfaceQueryException() { } }
apache/tsfile
1,059
java/tsfile/src/main/java/org/apache/tsfile/read/expression/IBinaryExpression.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.tsfile.read.expression; public interface IBinaryExpression extends IExpression { IExpression getLeft(); IExpression getRight(); void setLeft(IExpression leftExpression); void setRight(IExpression rightExpression); }
apache/uima-uimaj
1,069
uimaj-core/src/main/java/org/apache/uima/cas/impl/FsGenerator3.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.uima.cas.impl; import org.apache.uima.jcas.cas.TOP; /** * A Functional Interface for generating V3 Java Feature Structures */ @FunctionalInterface public interface FsGenerator3 { TOP createFS(TypeImpl typeImpl, CASImpl casImpl); }
apache/xmlbeans
1,066
src/main/java/org/apache/xmlbeans/impl/values/XmlNonNegativeIntegerImpl.java
/* Copyright 2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.xmlbeans.impl.values; import org.apache.xmlbeans.XmlNonNegativeInteger; import org.apache.xmlbeans.SchemaType; public class XmlNonNegativeIntegerImpl extends JavaIntegerHolderEx implements XmlNonNegativeInteger { public XmlNonNegativeIntegerImpl() { super(XmlNonNegativeInteger.type, false); } public XmlNonNegativeIntegerImpl(SchemaType type, boolean complex) { super(type, complex); } }
apache/xmlbeans
1,066
src/main/java/org/apache/xmlbeans/impl/values/XmlNonPositiveIntegerImpl.java
/* Copyright 2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.xmlbeans.impl.values; import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlNonPositiveInteger; public class XmlNonPositiveIntegerImpl extends JavaIntegerHolderEx implements XmlNonPositiveInteger { public XmlNonPositiveIntegerImpl() { super(XmlNonPositiveInteger.type, false); } public XmlNonPositiveIntegerImpl(SchemaType type, boolean complex) { super(type, complex); } }
apache/zookeeper
1,046
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LeaderElectionMXBean.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.zookeeper.server.quorum; /** * Leader election protocol MBean. */ public interface LeaderElectionMXBean { /** * * @return the time when the leader election started */ String getStartTime(); }
google/closure-templates
1,069
java/src/com/google/template/soy/types/ProtoTypeRegistry.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.types; import com.google.template.soy.base.SourceLogicalPath; import com.google.template.soy.base.internal.SoyFileKind; import javax.annotation.Nullable; /** A repository of proto descriptors that can lookup a type by its FQN. */ public interface ProtoTypeRegistry { @Nullable SoyType getProtoType(String protoFqn); default SoyFileKind getDepKind(SourceLogicalPath importPath) { throw new UnsupportedOperationException(); } }
google/graphicsfuzz
1,054
ast/src/test/java/com/graphicsfuzz/common/ast/expr/FloatConstantExprTest.java
/* * Copyright 2018 The GraphicsFuzz Project 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 * * 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.graphicsfuzz.common.ast.expr; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import org.junit.Test; public class FloatConstantExprTest { @Test public void testClone() throws Exception { FloatConstantExpr fce = new FloatConstantExpr("42.0"); FloatConstantExpr fce2 = fce.clone(); assertEquals(fce.getValue(), fce2.getValue()); assertFalse(fce == fce2); } }
google/MOE
1,054
client/src/main/java/com/google/devtools/moe/client/testing/DummyDraftRevision.java
/* * Copyright (c) 2011 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.devtools.moe.client.testing; import com.google.devtools.moe.client.writer.DraftRevision; /** * Draft revision in a dummy repository. */ public class DummyDraftRevision implements DraftRevision { private final String repositoryName; public DummyDraftRevision(String repositoryName) { this.repositoryName = repositoryName; } @Override public String getLocation() { return "/dummy/revision/" + repositoryName; } }
google/schemaorg-java
1,064
src/main/java/com/google/schemaorg/core/datatype/Float.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 com.google.schemaorg.core.datatype; import com.google.schemaorg.core.CoreConstants; /** * Represents <a href="http://schema.org/Float">http://schema.org/Float</a>. */ public class Float extends Number { Float(float value) { super(String.valueOf(value)); } @Override public String getFullTypeName() { return CoreConstants.NAMESPACE + "Float"; } public static Float of(float value) { return new Float(value); } }
google/search-samples
1,055
recipe-app-start/app/src/main/java/com/recipe_app/client/HomeActivity.java
/* * Copyright 2014 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.recipe_app.client; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import com.recipe_app.R; /** * This Activity class defines the home screen for the recipe app. */ public class HomeActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_home); } }