repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/tomee
1,157
container/openejb-core/src/main/java/org/apache/openejb/core/ivm/ClientSecurity.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.core.ivm; /** * @version $Rev$ $Date$ */ public class ClientSecurity { private static Object clientIdentity; public static Object getIdentity() { return clientIdentity; } public static void setIdentity(final Object clientIdentity) { ClientSecurity.clientIdentity = clientIdentity; } }
apache/tsfile
1,170
java/common/src/main/java/org/apache/tsfile/enums/ColumnCategory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.enums; import java.util.ArrayList; import java.util.List; public enum ColumnCategory { TAG, FIELD, ATTRIBUTE; public static List<ColumnCategory> nCopy(ColumnCategory type, int n) { List<ColumnCategory> result = new ArrayList<>(n); for (int i = 0; i < n; i++) { result.add(type); } return result; } }
apache/usergrid
1,125
stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/exceptions/BadRequestException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.usergrid.persistence.qakka.exceptions; public class BadRequestException extends QakkaRuntimeException { public BadRequestException(String message) { super( message ); } public BadRequestException(String message, Throwable cause) { super( message, cause ); } }
apache/usergrid
1,159
stack/services/src/main/java/org/apache/usergrid/management/ApplicationCreator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.usergrid.management; import org.apache.usergrid.management.exceptions.ApplicationCreationException; /** * Methods for marshalling application creation logic * * @author zznate */ public interface ApplicationCreator { ApplicationInfo createSampleFor( OrganizationInfo organizationInfo ) throws ApplicationCreationException; }
apache/wicket
1,136
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/header/testing3/Panel1.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.markup.html.header.testing3; import org.apache.wicket.markup.html.panel.Panel; /** * * @author Juergen Donnerstag */ public class Panel1 extends Panel { private static final long serialVersionUID = 1L; /** * Construct. * * @param id */ public Panel1(final String id) { super(id); } }
apache/wicket
1,136
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/header/testing3/Panel2.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.markup.html.header.testing3; import org.apache.wicket.markup.html.panel.Panel; /** * * @author Juergen Donnerstag */ public class Panel2 extends Panel { private static final long serialVersionUID = 1L; /** * Construct. * * @param id */ public Panel2(final String id) { super(id); } }
apache/xmlbeans
1,179
src/test/java/org/w3c/domts/DOMTestLoadException.java
/* * Copyright (c) 2001 World Wide Web Consortium, * (Massachusetts Institute of Technology, Institut National de * Recherche en Informatique et en Automatique, Keio University). All * Rights Reserved. This program is distributed under the W3C's Software * Intellectual Property License. This program is distributed in the * hope that it will be useful, but WITHOUT ANY WARRANTY; without even * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. * See W3C License http://www.w3.org/Consortium/Legal/ for more details. */ package org.w3c.domts; /** * Encapsulates a concrete load exception such as * a SAX exception * * @author Curt Arnold * @date 2 Feb 2002 */ public class DOMTestLoadException extends Exception { private final Throwable innerException; /** * Constructor * * @param innerException should not be null */ public DOMTestLoadException(Throwable innerException) { this.innerException = innerException; } public String toString() { if (innerException != null) { return innerException.toString(); } return super.toString(); } }
google/bindiff
1,114
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/dialogs/criteriadialog/conditions/root/RootCriterionCreator.java
// Copyright 2011-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.bindiff.gui.dialogs.criteriadialog.conditions.root; import com.google.security.zynamics.bindiff.gui.dialogs.criteriadialog.criterion.Criterion; import com.google.security.zynamics.bindiff.gui.dialogs.criteriadialog.criterion.CriterionCreator; public class RootCriterionCreator implements CriterionCreator { @Override public Criterion createCriterion() { return new RootCriterion(); } @Override public String getCriterionDescription() { return "Root Node"; } }
google/copybara
1,177
java/com/google/copybara/transform/ReversibleFunction.java
/* * Copyright (C) 2019 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.copybara.transform; import com.google.copybara.exception.NonReversibleValidationException; import java.util.function.Function; import net.starlark.java.annot.StarlarkBuiltin; import net.starlark.java.eval.StarlarkValue; @StarlarkBuiltin( name = "mapping_function", doc = "A function that given an object can map to another object") public interface ReversibleFunction<T, R> extends Function<T, R>, StarlarkValue { /** * Create a reverse of the function */ ReversibleFunction<R, T> reverseMapping() throws NonReversibleValidationException; }
google/copybara
1,185
java/com/google/copybara/jcommander/MapConverter.java
/* * Copyright (C) 2019 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.copybara.jcommander; import com.beust.jcommander.IStringConverter; import com.google.common.base.Splitter; import com.google.common.collect.ImmutableMap; /** * Convert a String in the form of foo:value1,bar:value2 into an ImmutableMap of Strings. */ public class MapConverter implements IStringConverter<ImmutableMap<String, String>> { @Override public ImmutableMap<String, String> convert(String s) { return ImmutableMap .copyOf(Splitter.on(',') .omitEmptyStrings().trimResults().withKeyValueSeparator(':') .split(s)); } }
google/error-prone
1,153
core/src/main/java/com/google/errorprone/refaster/annotation/UseImportPolicy.java
/* * Copyright 2013 The Error Prone Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.errorprone.refaster.annotation; import com.google.errorprone.refaster.ImportPolicy; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotation to indicate which import policy to use. * * @author lowasser@google.com (Louis Wasserman) */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.SOURCE) @RequiredAnnotation(AfterTemplate.class) public @interface UseImportPolicy { ImportPolicy value(); }
google/guice
1,164
extensions/grapher/test/com/google/inject/grapher/demo/MultibinderModule.java
/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.inject.grapher.demo; import com.google.inject.AbstractModule; import com.google.inject.multibindings.Multibinder; /** * Module to add {@link Multibinder}-based bindings to the injector. * * @author phopkins@gmail.com (Pete Hopkins) */ public class MultibinderModule extends AbstractModule { @Override protected void configure() { Multibinder<Person> charactersBinder = Multibinder.newSetBinder(binder(), Person.class); charactersBinder.addBinding().to(MartyMcFly.class); charactersBinder.addBinding().to(DocBrown.class); } }
googleapis/gapic-generator
1,146
src/main/java/com/google/api/codegen/viewmodel/metadata/SimpleModuleView.java
/* Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.api.codegen.viewmodel.metadata; import com.google.auto.value.AutoValue; @AutoValue public abstract class SimpleModuleView implements ModuleView { public abstract String moduleName(); public static Builder newBuilder() { return new AutoValue_SimpleModuleView.Builder(); } public String type() { return SimpleModuleView.class.getSimpleName(); } @AutoValue.Builder public abstract static class Builder { public abstract Builder moduleName(String val); public abstract SimpleModuleView build(); } }
googleapis/google-cloud-java
1,057
java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/src/main/java/com/google/cloud/contactcenterinsights/v1/BulkUploadFeedbackLabelsResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.contactcenterinsights.v1; public interface BulkUploadFeedbackLabelsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,057
java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/src/main/java/com/google/cloud/contactcenterinsights/v1/InitializeEncryptionSpecResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.contactcenterinsights.v1; public interface InitializeEncryptionSpecResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse) com.google.protobuf.MessageOrBuilder {}
hibernate/hibernate-orm
1,080
hibernate-core/src/test/java/org/hibernate/orm/test/interceptor/Log.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.interceptor; import java.util.Calendar; public class Log { private Long id; private String entityName; private String entityId; private String action; private Calendar time; public Log(String action, String id, String name) { super(); this.action = action; entityId = id; entityName = name; time = Calendar.getInstance(); } public Log() { super(); } public String getAction() { return action; } public void setAction(String action) { this.action = action; } public String getEntityId() { return entityId; } public void setEntityId(String entityId) { this.entityId = entityId; } public String getEntityName() { return entityName; } public void setEntityName(String entityName) { this.entityName = entityName; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Calendar getTime() { return time; } public void setTime(Calendar time) { this.time = time; } }
hibernate/hibernate-orm
1,100
hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/NationalizedAnnotation.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.boot.models.annotations.internal; import java.lang.annotation.Annotation; import java.util.Map; import org.hibernate.annotations.Nationalized; import org.hibernate.models.spi.ModelsContext; @SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" }) @jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor") public class NationalizedAnnotation implements Nationalized { /** * Used in creating dynamic annotation instances (e.g. from XML) */ public NationalizedAnnotation(ModelsContext modelContext) { } /** * Used in creating annotation instances from JDK variant */ public NationalizedAnnotation(Nationalized annotation, ModelsContext modelContext) { } /** * Used in creating annotation instances from Jandex variant */ public NationalizedAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) { } @Override public Class<? extends Annotation> annotationType() { return Nationalized.class; } }
hibernate/hibernate-orm
1,100
hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/PartitionKeyAnnotation.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.boot.models.annotations.internal; import java.lang.annotation.Annotation; import java.util.Map; import org.hibernate.annotations.PartitionKey; import org.hibernate.models.spi.ModelsContext; @SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" }) @jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor") public class PartitionKeyAnnotation implements PartitionKey { /** * Used in creating dynamic annotation instances (e.g. from XML) */ public PartitionKeyAnnotation(ModelsContext modelContext) { } /** * Used in creating annotation instances from JDK variant */ public PartitionKeyAnnotation(PartitionKey annotation, ModelsContext modelContext) { } /** * Used in creating annotation instances from Jandex variant */ public PartitionKeyAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) { } @Override public Class<? extends Annotation> annotationType() { return PartitionKey.class; } }
hibernate/hibernate-search
1,125
v5migrationhelper/engine/src/main/java/org/hibernate/search/util/logging/impl/BaseHibernateSearchLogger.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.util.logging.impl; import org.jboss.logging.BasicLogger; import org.jboss.logging.annotations.MessageLogger; /** * Parent interface for all Loggers of the various compilations units * of Hibernate Search. * Sharing the same messages across all units should be avoided but * we don't want to strictly enforce this rule so to maintain historical * stability of logging messages defined before this split, or to allow * the occasional reasonable exception. * * The primary reason to avoid this is to encourage each module to define * more specific error messages and codes, but also to consider is that * blindly inheriting all messages from another module causes the Logger * annotation processor to generate a significant amount of code, which * is mostly unnecessary as most of those codes are unlikely to be actually * reused by other modules. * * @author Sanne Grinovero */ @MessageLogger(projectCode = "HSEARCH") public interface BaseHibernateSearchLogger extends BasicLogger { }
openjdk/jdk8
1,168
langtools/test/tools/javac/diags/examples/MalformedSupported/MalformedSupported.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.warn.proc.malformed.supported.string // options: -processor AnnoProc class MalformedSupported { }
openjdk/jdk8
1,169
langtools/test/tools/javac/annotations/repeatingAnnotations/SeparateCompile.java
/* * Copyright (c) 2012, 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. */ /** * part of test for bug: 7199925 * see: ClassReaderDefault.java */ @Foo @Foo public class SeparateCompile { }
openjdk/jdk8
1,172
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/cdbg/PointerType.java
/* * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. * */ package sun.jvm.hotspot.debugger.cdbg; public interface PointerType extends Type { public Type getTargetType(); }
openjdk/jdk8
1,180
langtools/test/tools/javac/protectedInner/mypackage/Superclass.java
/* * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package mypackage; public class Superclass { protected void doStuff() { System.out.println("doing stuff"); } }
openjdk/jdk8
1,185
langtools/test/tools/javac/diags/examples/UnsupportedEncoding.java
/* * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.unsupported.encoding // options: -encoding UNSUPPORTED -doe // run: simple class UnsupportedEncoding { }
openjdk/jdk8
1,204
jdk/test/java/lang/annotation/Missing/B.java
/* * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** * Class to have an indirectly missing annotation applied for for * running MisssingTest. */ @MissingWrapper(@Missing) @Marker public class B { }
openjdk/jtreg
1,218
test/timelimit/Slow.java
/* * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * @test * @run main/timeout=400 Slow */ public class Slow { public static void main(String... args) { System.err.println("Hello World!"); } }
oracle/coherence
1,140
prj/coherence-jcache/src/main/java/com/tangosol/coherence/jcache/common/InternalConverter.java
/* * Copyright (c) 2000, 2020, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.tangosol.coherence.jcache.common; /** * Converts values of a specified type to and from an internal representation. * <p> * {@link InternalConverter}s are typically used convert cache keys and values * to and from an appropriate internal representation. * <p> * The internal representation is declared as an Object as the type is typically * unknown until runtime. * * @param <T> the type of value to convert * * @author bo 2013.11.24 * @since Coherence 12.1.3 */ public interface InternalConverter<T> { /** * Converts a value to an internal representation. * * @param value the value to convert * @return an internal representation of the value */ Object toInternal(T value); /** * Converts an internal representation of a value to a value. * * @param object the internal representation of the value * @return the value */ T fromInternal(Object object); }
oracle/coherence
1,149
prj/coherence-core/src/main/java/com/tangosol/dev/assembler/If_icmplt.java
/* * Copyright (c) 2000, 2020, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.tangosol.dev.assembler; import java.io.IOException; import java.io.DataInput; import java.io.DataOutput; /** * The IF_ICMPLT op branches to the label if the second integer on the stack * is less than the first integer on the stack. * <p><code><pre> * JASM op : IF_ICMPLT (0xa1) * JVM byte code(s): IF_ICMPLT (0xa1) * Details : * </pre></code> * * @version 0.50, 06/14/98, assembler/dis-assembler * @author Cameron Purdy */ public class If_icmplt extends OpBranch implements Constants { // ----- constructors --------------------------------------------------- /** * Construct the op. * * @param label the label to branch to */ public If_icmplt(Label label) { super(IF_ICMPLT, label); } // ----- data members --------------------------------------------------- /** * The name of this class. */ private static final String CLASS = "If_icmplt"; }
apache/commons-jexl
1,171
src/main/java/org/apache/commons/jexl3/parser/ASTAmbiguous.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.jexl3.parser; public final class ASTAmbiguous extends JexlNode { /** */ private static final long serialVersionUID = 1L; ASTAmbiguous(final int id) { super(id); } @Override public Object jjtAccept(final ParserVisitor visitor, final Object data) { return visitor.visit(this, data); } }
apache/commons-math
1,131
commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/linear/FrenchRealVectorFormatTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.math4.legacy.linear; import java.util.Locale; public class FrenchRealVectorFormatTest extends RealVectorFormatAbstractTest { @Override protected char getDecimalCharacter() { return ','; } @Override protected Locale getLocale() { return Locale.FRENCH; } }
apache/ctakes
1,148
ctakes-ytex/src/main/java/org/apache/ctakes/jdl/common/Singleton.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.ctakes.jdl.common; /** * Singleton example. * * @author mas */ public final class Singleton { private static Singleton istance; private Singleton() { } /** * @return the instance */ public static Singleton getIstance() { if (istance == null) { istance = new Singleton(); } return istance; } }
apache/curator
1,156
curator-test/src/main/java/org/apache/curator/test/compatibility/CuratorTestBase.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.test.compatibility; import org.apache.curator.test.BaseClassForTests; public class CuratorTestBase extends BaseClassForTests { public static final String zk36Group = "zk36"; public static final String zk35TestCompatibilityGroup = "zk35TestCompatibility"; protected final Timing2 timing = new Timing2(); }
apache/cxf
1,139
rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/AttributeTestService.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.javascript.fortest; import jakarta.jws.WebService; /** * */ @WebService(name = "AttributeTestService", targetNamespace = "uri:cxf.apache.org.javascript.attribute") public interface AttributeTestService { AttributeTestBean returnAtrributeBean(); void acceptAttributeTestBean(AttributeTestBean atb); }
apache/cxf
1,148
rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/MemoryTokenStoreFactory.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.ws.security.tokenstore; import org.apache.cxf.message.Message; /** * A factory to return a MemoryTokenStore instance. */ public class MemoryTokenStoreFactory extends TokenStoreFactory { @Override public TokenStore newTokenStore(String key, Message message) { return new MemoryTokenStore(); } }
apache/cxf
1,164
systests/transports/src/test/java/org/apache/cxf/systest/hc/jaxrs/RETRIEVE.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.systest.hc.jaxrs; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import jakarta.ws.rs.HttpMethod; @Target({ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) @HttpMethod("RETRIEVE") public @interface RETRIEVE { }
apache/cxf
1,175
rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/UID.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.aegis.util; import java.security.SecureRandom; public final class UID { private static int counter; private static SecureRandom random = new SecureRandom(); private UID() { //utility } public static String generate() { return String.valueOf(System.currentTimeMillis()) + counter++ + random.nextInt(); } }
apache/datafu
1,160
datafu-hourglass/src/main/java/datafu/hourglass/jobs/DateRangeConfigurable.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package datafu.hourglass.jobs; import datafu.hourglass.fs.DateRange; /** * An interface for an object with a configurable output date range. * */ public interface DateRangeConfigurable { /** * Sets the date range for the output. * * @param dateRange output date range */ public void setOutputDateRange(DateRange dateRange); }
apache/deltaspike
1,119
deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc009/TestConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.deltaspike.test.core.api.partialbean.uc009; import jakarta.enterprise.context.SessionScoped; import jakarta.enterprise.inject.Produces; @TestTypeSafeConfig public interface TestConfig extends TestBaseConfig { Integer value3(); @Produces @SessionScoped TestCustomType value4(); }
apache/deltaspike
1,134
deltaspike/modules/jpa/api/src/main/java/org/apache/deltaspike/jpa/api/transaction/TransactionConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.deltaspike.jpa.api.transaction; import org.apache.deltaspike.core.api.config.DeltaSpikeConfig; /** * Optional config for transactions */ public interface TransactionConfig extends DeltaSpikeConfig { /** * @return timeout in seconds or null */ Integer getUserTransactionTimeoutInSeconds(); }
apache/deltaspike
1,140
deltaspike/core/api/obsolete/src/main/java/org/apache/deltaspike/core/api/literal/DefaultLiteral.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.deltaspike.core.api.literal; import jakarta.enterprise.inject.Default; import jakarta.enterprise.util.AnnotationLiteral; /** * Literal for {@link Default} */ public class DefaultLiteral extends AnnotationLiteral<Default> implements Default { private static final long serialVersionUID = 3240069236025230401L; }
apache/dolphinscheduler
1,139
dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/plugin/SPIIdentify.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.spi.plugin; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @Data @Builder @AllArgsConstructor public class SPIIdentify { private static final int DEFAULT_PRIORITY = 0; private String name; @Builder.Default private int priority = DEFAULT_PRIORITY; }
apache/drill
1,160
exec/vector/src/main/java/org/apache/drill/exec/expr/holders/RepeatedValueHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.exec.expr.holders; import org.apache.drill.exec.vector.complex.reader.FieldReader; public abstract class RepeatedValueHolder implements ValueHolder { /** The first index (inclusive) into the Vector. **/ public int start; /** The last index (exclusive) into the Vector. **/ public int end; public FieldReader reader; }
apache/druid
1,159
processing/src/main/java/org/apache/druid/frame/field/NumericFieldWriterFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.druid.frame.field; import org.apache.druid.segment.ColumnValueSelector; /** * Factory for {@link NumericFieldWriter} */ public interface NumericFieldWriterFactory { /** * Constructs an instance of {@link NumericFieldWriter} given the column selector */ NumericFieldWriter get(ColumnValueSelector<Number> selector); }
apache/dubbo
1,142
dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/action/DemoInterceptor.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.config.spring.action; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; public class DemoInterceptor implements MethodInterceptor { public Object invoke(MethodInvocation invocation) throws Throwable { return "aop:" + invocation.proceed(); } }
apache/dubbo
1,157
dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/filter/DemoServiceLocal.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.cluster.filter; class DemoServiceLocal implements DemoService { public DemoServiceLocal(DemoService demoService) {} public String sayHello(String name) { return name; } public int plus(int a, int b) { return a + b; } public void ondisconnect() {} public void onconnect() {} }
apache/eventmesh
1,106
eventmesh-connectors/eventmesh-connector-wechat/src/main/java/org/apache/eventmesh/connector/wechat/config/WeChatConnectServerConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eventmesh.connector.wechat.config; import org.apache.eventmesh.common.config.connector.Config; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) public class WeChatConnectServerConfig extends Config { private boolean sinkEnable; }
apache/falcon
1,162
addons/hivedr/src/main/java/org/apache/falcon/hive/util/DelimiterUtils.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.falcon.hive.util; /** * Public delimiters used for event processing. */ public final class DelimiterUtils { public static final String FIELD_DELIM = "\u0001"; public static final String NEWLINE_DELIM = System.getProperty("line.separator"); public static final String TAB_DELIM = "\t"; private DelimiterUtils() {} }
apache/felix-dev
1,079
ipojo/manipulator/manipulator-it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.ipojo.runtime.core.services; import java.util.Properties; public interface FooService { boolean foo(); Properties fooProps(); Boolean getObject(); boolean getBoolean(); int getInt(); long getLong(); double getDouble(); }
apache/felix-dev
1,083
ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/main/java/org/apache/felix/ipojo/runtime/core/test/services/FooService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.ipojo.runtime.core.test.services; import java.util.Properties; public interface FooService { boolean foo(); Properties fooProps(); Boolean getObject(); boolean getBoolean(); int getInt(); long getLong(); double getDouble(); }
apache/felix-dev
1,095
dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/MultipleAnnotationsParallelTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.dm.runtime.itest.tests; /** * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> */ public class MultipleAnnotationsParallelTest extends MultipleAnnotationsTest { public MultipleAnnotationsParallelTest() { setParallel(); } }
apache/felix-dev
1,095
dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/PropagateAnnotationParallelTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.dm.runtime.itest.tests; /** * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> */ public class PropagateAnnotationParallelTest extends PropagateAnnotationTest { public PropagateAnnotationParallelTest() { setParallel(); } }
apache/felix-dev
1,095
dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/TemporalAnnotationsParallelTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.dm.runtime.itest.tests; /** * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> */ public class TemporalAnnotationsParallelTest extends TemporalAnnotationsTest { public TemporalAnnotationsParallelTest() { setParallel(); } }
apache/felix-dev
1,155
rootcause/src/test/java/org/apache/felix/rootcause/examples/CompWithMissingRef2.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.rootcause.examples; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; @Component( name = "CompWithMissingRef2", service = CompWithMissingRef2.class ) public class CompWithMissingRef2 { @Reference CompWithMissingRef other; }
apache/felix-dev
1,157
framework/src/main/java/org/osgi/framework/hooks/resolver/package-info.java
/* * Copyright (c) OSGi Alliance (2010, 2013). 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. */ /** * Framework Resolver Hooks Package Version 1.0. * * <p> * Bundles wishing to use this package must list the package in the * Import-Package header of the bundle's manifest. * * <p> * Example import for consumers using the API in this package: * <p> * {@code Import-Package: org.osgi.framework.hooks.resolver; version="[1.0,2.0)"} * * @author $Id: de050037c6b835045603f09b12ad58a6353d1229 $ */ @Version("1.0") package org.osgi.framework.hooks.resolver; import org.osgi.annotation.versioning.Version;
apache/fesod
1,162
fesod/src/main/java/org/apache/fesod/excel/enums/NumericCellTypeEnum.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.enums; import org.apache.poi.ss.usermodel.CellType; /** * Used to supplement {@link CellType}. * * Cannot distinguish between date and number in write case. * * */ public enum NumericCellTypeEnum { /** * number */ NUMBER, /** * date. Support only when writing. */ DATE, ; }
apache/fineract
1,121
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeeReadPlatformService.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fineract.portfolio.loanaccount.service; import java.util.List; import org.apache.fineract.portfolio.loanaccount.data.BuyDownFeeAmortizationDetails; public interface BuyDownFeeReadPlatformService { List<BuyDownFeeAmortizationDetails> retrieveLoanBuyDownFeeAmortizationDetails(Long loanId); }
apache/fineract
1,122
fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageType.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.infrastructure.event.external.service.message.domain; import java.util.Objects; import lombok.Getter; @Getter public class MessageType { private final String type; public MessageType(String type) { this.type = Objects.requireNonNull(type, "type cannot be null"); } }
apache/fineract
1,143
fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalOwnerJournalEntryData.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.investor.data; import lombok.Data; import org.apache.fineract.accounting.journalentry.data.JournalEntryData; import org.springframework.data.domain.Page; @Data public class ExternalOwnerJournalEntryData { private ExternalTransferOwnerData ownerData; private Page<JournalEntryData> journalEntryData; }
apache/flink
1,156
flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/MockTtlTimeProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.runtime.state.ttl; /** Mocked time provider for state TTL. */ public class MockTtlTimeProvider implements TtlTimeProvider { public long time = 0; @Override public long currentTimestamp() { return time; } public void setCurrentTimestamp(long timestamp) { this.time = timestamp; } }
apache/fluss
1,171
fluss-server/src/test/java/org/apache/fluss/server/zk/NOPErrorHandler.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.fluss.server.zk; import org.apache.fluss.server.utils.FatalErrorHandler; /** A FatalErrorHandler that does nothing . */ public class NOPErrorHandler implements FatalErrorHandler { public static final NOPErrorHandler INSTANCE = new NOPErrorHandler(); @Override public void onFatalError(Throwable exception) { // ignore } }
apache/geaflow
1,118
geaflow/geaflow-metrics/geaflow-metrics-common/src/main/java/org/apache/geaflow/metrics/common/reporter/MetricReporter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.metrics.common.reporter; import com.codahale.metrics.MetricRegistry; import org.apache.geaflow.common.config.Configuration; public interface MetricReporter { void open(Configuration config, MetricRegistry metricRegistry); void close(); String getReporterType(); }
apache/geaflow
1,136
geaflow/geaflow-dsl/geaflow-dsl-plan/src/test/java/org/apache/geaflow/dsl/udf/string/UDFHashTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.dsl.udf.string; import static org.testng.Assert.assertEquals; import org.apache.geaflow.dsl.udf.table.string.Hash; import org.testng.annotations.Test; public class UDFHashTest { @Test public void test() { Hash u = new Hash(); assertEquals((int) u.eval("1"), 49); } }
apache/geaflow
1,156
geaflow/geaflow-memory/src/main/java/org/apache/geaflow/memory/cleaner/Cleaner.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.memory.cleaner; import java.nio.ByteBuffer; /** * This class is an adaptation of Netty's io.netty.util.internal.Cleaner. * Allows to free direct {@link ByteBuffer}s. */ public interface Cleaner { /** * Free a direct {@link ByteBuffer} if possible. */ void freeDirectBuffer(ByteBuffer buffer); }
apache/geode
1,145
geode-old-client-support/src/distributedTest/java/org/apache/geode/ClientPDXSerializableObject.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package org.apache.geode; import org.apache.geode.pdx.PdxReader; import org.apache.geode.pdx.PdxSerializable; import org.apache.geode.pdx.PdxWriter; public class ClientPDXSerializableObject implements PdxSerializable { @Override public void toData(final PdxWriter writer) { } @Override public void fromData(final PdxReader reader) { } }
apache/gobblin
1,144
gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/QueryExecutor.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.compliance; import java.io.IOException; import java.sql.SQLException; import java.util.List; /** * @author adsharma */ public interface QueryExecutor { void executeQuery(String query) throws IOException, SQLException; void executeQueries(List<String> query) throws IOException, SQLException; }
apache/gora
1,197
gora-core/src/main/java/org/apache/gora/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. */ /** * Gora source code is organized in a modular architecture. The <b>gora-core</b> * module is the main module which contains the core of the code. * All other modules depend on the gora-core module. Each data store backend * in Gora resides in it's own module. The documentation for the specific module * can be found at the module's documentation directory. */ package org.apache.gora;
apache/grails-core
1,133
grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/model/lifecycle/Initializable.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.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.grails.datastore.mapping.model.lifecycle; /** * Interface for object that requires explicit initialization * * @author Graeme Rocher * @since 1.0 */ public interface Initializable { /** * Call to initialize the object */ void initialize(); boolean isInitialized(); }
apache/hadoop-common
1,075
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/ContainerManagerEvent.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.yarn.server.nodemanager; import org.apache.hadoop.yarn.event.AbstractEvent; public class ContainerManagerEvent extends AbstractEvent<ContainerManagerEventType> { public ContainerManagerEvent(ContainerManagerEventType type) { super(type); } }
apache/hadoop-common
1,115
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/s3native/TestInMemoryNativeS3FileSystemContract.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.fs.s3native; import java.io.IOException; public class TestInMemoryNativeS3FileSystemContract extends NativeS3FileSystemContractBaseTest { @Override NativeFileSystemStore getNativeFileSystemStore() throws IOException { return new InMemoryNativeFileSystemStore(); } }
apache/hadoop
1,069
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/attempt/RMAppAttemptState.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt; public enum RMAppAttemptState { NEW, SUBMITTED, SCHEDULED, ALLOCATED, LAUNCHED, FAILED, RUNNING, FINISHING, FINISHED, KILLED, ALLOCATED_SAVING, LAUNCHED_UNMANAGED_SAVING, FINAL_SAVING }
apache/hadoop
1,078
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/GetJobReportResponse.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.mapreduce.v2.api.protocolrecords; import org.apache.hadoop.mapreduce.v2.api.records.JobReport; public interface GetJobReportResponse { public abstract JobReport getJobReport(); public abstract void setJobReport(JobReport jobReport); }
apache/hadoop
1,084
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/job/event/JobCommitCompletedEvent.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.mapreduce.v2.app.job.event; import org.apache.hadoop.mapreduce.v2.api.records.JobId; public class JobCommitCompletedEvent extends JobEvent { public JobCommitCompletedEvent(JobId jobID) { super(jobID, JobEventType.JOB_COMMIT_COMPLETED); } }
apache/hadoop
1,146
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandUtils.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.fs.shell; final class CommandUtils { static String formatDescription(String usage, String... desciptions) { StringBuilder b = new StringBuilder(usage + ": " + desciptions[0]); for(int i = 1; i < desciptions.length; i++) { b.append("\n\t\t" + desciptions[i]); } return b.toString(); } }
apache/harmony
1,135
classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ThreadDeathTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.luni.tests.java.lang; public class ThreadDeathTest extends junit.framework.TestCase { /** * @tests java.lang.ThreadDeath#ThreadDeath() */ public void test_Constructor() { ThreadDeath td = new ThreadDeath(); assertNull(td.getCause()); assertNull(td.getMessage()); } }
apache/harmony
1,153
classlib/modules/awt/src/main/java/common/java/awt/dnd/InvalidDnDOperationException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @author Michael Danilov */ package java.awt.dnd; public class InvalidDnDOperationException extends IllegalStateException { private static final long serialVersionUID = -6062568741193956678L; public InvalidDnDOperationException(String msg) { super(msg); } public InvalidDnDOperationException() { } }
apache/harmony
1,168
classlib/modules/nio/src/main/java/common/java/nio/channels/ByteChannel.java
/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package java.nio.channels; /** * A ByteChannel is both readable and writable. * <p> * The methods for the byte channel are precisely those defined by readable and * writable byte channels. * * @see ReadableByteChannel * @see WritableByteChannel */ public interface ByteChannel extends ReadableByteChannel, WritableByteChannel { // No methods defined. }
apache/hbase
1,161
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AbstractResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hbase.client; import org.apache.yetus.audience.InterfaceAudience; /** * This class is used to extend AP to process single action request, like delete, get etc. */ @InterfaceAudience.Private abstract class AbstractResponse { public enum ResponseType { SINGLE, MULTI; } public abstract ResponseType type(); }
apache/hbase
1,177
hbase-client/src/main/java/org/apache/hadoop/hbase/client/Row.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hbase.client; import java.util.Comparator; import org.apache.hadoop.hbase.util.Bytes; import org.apache.yetus.audience.InterfaceAudience; /** * Has a row. */ @InterfaceAudience.Public public interface Row { Comparator<Row> COMPARATOR = (v1, v2) -> Bytes.compareTo(v1.getRow(), v2.getRow()); /** Returns The row. */ byte[] getRow(); }
apache/hertzbeat
1,115
hertzbeat-collector/hertzbeat-collector-common/src/main/java/org/apache/hertzbeat/collector/dispatch/MetricsTaskDispatch.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hertzbeat.collector.dispatch; import org.apache.hertzbeat.common.timer.Timeout; /** * Metrics collection task scheduler interface */ public interface MetricsTaskDispatch { /** * schedule task * @param timeout timeout */ void dispatchMetricsTask(Timeout timeout); }
apache/hertzbeat
1,147
hertzbeat-manager/src/main/java/org/apache/hertzbeat/manager/pojo/dto/AiMessage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hertzbeat.manager.pojo.dto; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; /** * ai message */ @Data @NoArgsConstructor @AllArgsConstructor public class AiMessage { /** * role */ private String role; /** * content */ private String content; }
apache/hertzbeat
1,148
hertzbeat-manager/src/main/java/org/apache/hertzbeat/manager/pojo/dto/MuteConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.hertzbeat.manager.pojo.dto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; /** * Mute Configuration */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class MuteConfig { /** * mute */ private boolean mute; }
apache/hop
1,144
plugins/transforms/ldap/src/main/java/org/apache/hop/pipeline/transforms/ldapinput/ILdapMeta.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hop.pipeline.transforms.ldapinput; public interface ILdapMeta { String getProtocol(); String getHost(); String getPort(); String getDerefAliases(); String getReferrals(); boolean isUseCertificate(); String getTrustStorePath(); String getTrustStorePassword(); boolean isTrustAllCertificates(); }
apache/ignite
1,144
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/BiScalar.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ignite.internal.processors.query.calcite.exec.exp; import org.apache.ignite.internal.processors.query.calcite.exec.ExecutionContext; /** */ @FunctionalInterface public interface BiScalar extends Scalar { /** Multi input and single output. */ void execute(ExecutionContext ctx, Object in1, Object in2, Object out); }
apache/ignite
1,144
modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridSingleSplitTestJobTarget.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.tests.p2p; /** * Test class for p2p chained deployment. */ public class GridSingleSplitTestJobTarget { /** * @param level Test argument. * @return Always 1. */ @SuppressWarnings("unused") public int executeLoadTestJob(int level) { assert level > 0; return 1; } }
apache/ignite
1,160
modules/core/src/main/java/org/apache/ignite/internal/management/cdc/CdcCommand.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.management.cdc; import org.apache.ignite.internal.management.api.CommandRegistryImpl; /** Cdc commands. */ public class CdcCommand extends CommandRegistryImpl { /** */ public CdcCommand() { super( new CdcDeleteLostSegmentLinksCommand(), new CdcResendCommand() ); } }
apache/incubator-brooklyn
1,136
brooklyn-server/api/src/main/java/org/apache/brooklyn/api/location/HardwareDetails.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.brooklyn.api.location; import javax.annotation.Nullable; /** * @since 0.7.0 */ public interface HardwareDetails { /** * The number of CPUs on the machine */ @Nullable Integer getCpuCount(); /** * Amount of RAM in megabytes */ @Nullable Integer getRam(); }
apache/incubator-heron
1,141
storm-compatibility/v0.10.2/src/java/backtype/storm/spout/NothingEmptyEmitStrategy.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package backtype.storm.spout; import java.util.Map; public class NothingEmptyEmitStrategy implements ISpoutWaitStrategy { @Override public void emptyEmit(long streak) { } @Override @SuppressWarnings("rawtypes") public void prepare(Map conf) { throw new UnsupportedOperationException("Not supported yet."); } }
apache/incubator-hugegraph-computer
1,123
computer/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/PropertiesCombiner.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with this * work for additional information regarding copyright ownership. The ASF * licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS 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.combiner; import org.apache.hugegraph.computer.core.graph.properties.Properties; /** * When vertex properties with the same vertex id are loaded, this class * specifies how to combine their properties. */ public interface PropertiesCombiner extends Combiner<Properties> { }
apache/incubator-kie-drools
1,138
drools-model/drools-canonical-model/src/main/java/org/drools/model/AccumulatePattern.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.drools.model; import org.drools.model.functions.accumulate.AccumulateFunction; public interface AccumulatePattern<T> extends Pattern<T> { AccumulateFunction[] getAccumulateFunctions(); boolean isCompositePatterns(); boolean isQuerySource(); Pattern getPattern(); Condition getCondition(); }
apache/incubator-kie-drools
1,139
drools-compiler/src/main/java/org/drools/compiler/builder/impl/GlobalVariableContext.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.drools.compiler.builder.impl; import java.lang.reflect.Type; import java.util.Map; /** * A build context that holds all the declared global variables * as a string -> type map. * */ public interface GlobalVariableContext { Map<String, Type> getGlobals(); void addGlobal(String identifier, Type type); }
apache/incubator-kie-drools
1,143
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/functions/ParameterName.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR 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.feel.runtime.functions; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME ) @Target( {ElementType.PARAMETER} ) public @interface ParameterName { String value(); }
apache/incubator-kie-drools
1,150
drools-mvel/src/test/java/org/drools/mvel/integrationtests/IteratorToList.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.drools.mvel.integrationtests; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class IteratorToList { public static List convert(Iterator it) { List list = new ArrayList(); while ( it.hasNext() ) { list.add( it.next() ); } return list; } }
apache/incubator-kie-kogito-apps
1,081
data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/UserTaskInstanceEntityMapperIT.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.kogito.index.postgresql.mapper; import org.kie.kogito.index.jpa.mapper.AbstractUserTaskInstanceEntityMapperIT; import io.quarkus.test.junit.QuarkusTest; @QuarkusTest class UserTaskInstanceEntityMapperIT extends AbstractUserTaskInstanceEntityMapperIT { }
apache/incubator-kie-kogito-apps
1,108
jobs-service/jobs-service-common/src/main/java/org/kie/kogito/jobs/service/resource/error/NotFoundExceptionMapper.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.kogito.jobs.service.resource.error; import jakarta.ws.rs.NotFoundException; import jakarta.ws.rs.ext.Provider; @Provider public class NotFoundExceptionMapper extends BaseExceptionMapper<NotFoundException> { public NotFoundExceptionMapper() { super(404, false); } }
apache/incubator-kie-optaplanner
1,124
core/optaplanner-core-impl/src/main/java/org/optaplanner/core/config/partitionedsearch/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. */ @XmlSchema( namespace = SolverConfig.XML_NAMESPACE, elementFormDefault = XmlNsForm.QUALIFIED) package org.optaplanner.core.config.partitionedsearch; import jakarta.xml.bind.annotation.XmlNsForm; import jakarta.xml.bind.annotation.XmlSchema; import org.optaplanner.core.config.solver.SolverConfig;
apache/incubator-kie-optaplanner
1,124
core/optaplanner-core-impl/src/main/java/org/optaplanner/core/config/solver/monitoring/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. */ @XmlSchema( namespace = SolverConfig.XML_NAMESPACE, elementFormDefault = XmlNsForm.QUALIFIED) package org.optaplanner.core.config.solver.monitoring; import jakarta.xml.bind.annotation.XmlNsForm; import jakarta.xml.bind.annotation.XmlSchema; import org.optaplanner.core.config.solver.SolverConfig;
apache/incubator-retired-slider
1,145
slider-core/src/main/java/org/apache/slider/common/params/ActionEchoArgs.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.slider.common.params; import com.beust.jcommander.Parameter; public class ActionEchoArgs extends AbstractActionArgs { @Override public String getActionName() { return SliderActions.ACTION_ECHO; } @Parameter(names = {ARG_MESSAGE}, description = "message to echo") public String message; }
apache/incubator-retired-wave
1,132
wave/src/main/java/org/waveprotocol/wave/client/widget/profile/i18n/ProfilePopupMessages.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR 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.widget.profile.i18n; import com.google.gwt.i18n.client.Messages; import com.google.gwt.i18n.client.Messages.DefaultMessage; /** * * @author akaplanov (Andrew Kaplanov) */ public interface ProfilePopupMessages extends Messages { @DefaultMessage("Address:") String address(); }
apache/incubator-seata
1,165
core/src/main/java/org/apache/seata/core/compressor/Compressor.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seata.core.compressor; public interface Compressor { /** * compress byte[] to byte[]. * @param bytes the bytes * @return the byte[] */ byte[] compress(byte[] bytes); /** * decompress byte[] to byte[]. * @param bytes the bytes * @return the byte[] */ byte[] decompress(byte[] bytes); }
apache/incubator-tez
1,175
tez-api/src/main/java/org/apache/tez/dag/api/TezException.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tez.dag.api; /** * Base TezException */ public class TezException extends Exception { private static final long serialVersionUID = 6337442733802964447L; public TezException(Throwable cause) { super(cause); } public TezException(String message) { super(message); } public TezException(String message, Throwable cause) { super(message, cause); } }